diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-09 04:52:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-09 04:52:39 +0000 |
commit | 89f3604407aff8f4cb2ed958252c61e23c767e24 (patch) | |
tree | 7fbf408102cab051557d38193524d8c6e991d070 /web/gui/dashboard/static/js/main.2d23101e.chunk.js | |
parent | Adding upstream version 1.34.1. (diff) | |
download | netdata-upstream/1.35.0.tar.xz netdata-upstream/1.35.0.zip |
Adding upstream version 1.35.0.upstream/1.35.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/gui/dashboard/static/js/main.2d23101e.chunk.js | 3 | ||||
-rw-r--r-- | web/gui/dashboard/static/js/main.2d23101e.chunk.js.LICENSE (renamed from web/gui/dashboard/static/js/main.485cc284.chunk.js.LICENSE) | 0 | ||||
-rw-r--r-- | web/gui/dashboard/static/js/main.2d23101e.chunk.js.map | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/web/gui/dashboard/static/js/main.2d23101e.chunk.js b/web/gui/dashboard/static/js/main.2d23101e.chunk.js new file mode 100644 index 000000000..569823e75 --- /dev/null +++ b/web/gui/dashboard/static/js/main.2d23101e.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see main.2d23101e.chunk.js.LICENSE */ +(this["webpackJsonp@netdata/dashboard"]=this["webpackJsonp@netdata/dashboard"]||[]).push([[0],{100:function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return d}));var n,r,o=function(e){return e>-10&&e<10?"0".concat(e):"".concat(e)},i=function(e,t){var a=Math.abs(e),n="DAYS"===t?Math.floor(a/86400):0;a-=86400*n;var r="DAYS"===t||"HOURS"===t?Math.floor(a/3600):0;a-=3600*r;var i=Math.floor(a/60);a-=60*i;var s="DAYS"===t?"".concat(n,"d:"):"",l="DAYS"===t||"HOURS"===t?"".concat(o(r),":"):"",c="".concat(o(i),":"),u=o(a.toFixed(2));return"".concat(s).concat(l).concat(c).concat(u)},s={"packets/s":{pps:1,Kpps:1e3,Mpps:1e6},pps:{pps:1,Kpps:1e3,Mpps:1e6},"kilobits/s":{"bits/s":.001,"kilobits/s":1,"megabits/s":1e3,"gigabits/s":1e6,"terabits/s":1e9},"bytes/s":{"bytes/s":1,"kilobytes/s":1024,"megabytes/s":1048576,"gigabytes/s":1073741824,"terabytes/s":1099511627776},"kilobytes/s":{"bytes/s":1/1024,"kilobytes/s":1,"megabytes/s":1024,"gigabytes/s":1048576,"terabytes/s":1073741824},"B/s":{"B/s":1,"KiB/s":1024,"MiB/s":1048576,"GiB/s":1073741824,"TiB/s":1099511627776},"KB/s":{"B/s":1/1024,"KB/s":1,"MB/s":1024,"GB/s":1048576,"TB/s":1073741824},"KiB/s":{"B/s":1/1024,"KiB/s":1,"MiB/s":1024,"GiB/s":1048576,"TiB/s":1073741824},bytes:{bytes:1,kilobytes:1024,megabytes:1048576,gigabytes:1073741824,terabytes:1099511627776},Hz:{Hz:1,kHz:Math.pow(10,3),MHz:Math.pow(10,6),GHz:Math.pow(10,9),THz:Math.pow(10,12),PHz:Math.pow(10,15),EHz:Math.pow(10,18),ZHz:Math.pow(10,21)},B:{B:1,KiB:1024,MiB:1048576,GiB:1073741824,TiB:1099511627776,PiB:0x4000000000000},KB:{B:1/1024,KB:1,MB:1024,GB:1048576,TB:1073741824},KiB:{B:1/1024,KiB:1,MiB:1024,GiB:1048576,TiB:1073741824},MB:{B:1/1048576,KB:1/1024,MB:1,GB:1024,TB:1048576,PB:1073741824},MiB:{B:1/1048576,KiB:1/1024,MiB:1,GiB:1024,TiB:1048576,PiB:1073741824},GB:{B:1/1073741824,KB:1/1048576,MB:1/1024,GB:1,TB:1024,PB:1048576,EB:1073741824},GiB:{B:1/1073741824,KiB:1/1048576,MiB:1/1024,GiB:1,TiB:1024,PiB:1048576,EiB:1073741824}},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return function(t){return(t*e).toFixed(2)}},c={Celsius:{Fahrenheit:{check:function(){return"fahrenheit"===n},convert:function(e){return 9*e/5+32}}},celsius:{fahrenheit:{check:function(){return"fahrenheit"===n},convert:function(e){return 9*e/5+32}}},milliseconds:{microseconds:{check:function(e){return e<1},convert:l(1e3)},milliseconds:{check:function(e){return e>=1&&e<1e3},convert:l()},seconds:{check:function(e){return e>=1e3&&e<6e4},convert:l(.001)},"MM:SS.ms":{check:function(e){return r&&e>=6e4&&e<36e5},convert:function(e){return i(e/1e3,"MINUTES")}},"HH:MM:SS.ms":{check:function(e){return r&&e>=36e5&&e<864e5},convert:function(e){return i(e/1e3,"HOURS")}},"dHH:MM:SS.ms":{check:function(e){return r&&e>=864e5},convert:function(e){return i(e/1e3,"DAYS")}}},seconds:{microseconds:{check:function(e){return e<.001},convert:l(1e6)},milliseconds:{check:function(e){return e>=.001&&e<1},convert:l(1e3)},seconds:{check:function(e){return e>=1&&e<60},convert:l(1)},"MM:SS.ms":{check:function(e){return r&&e>=60&&e<3600},convert:function(e){return i(e,"MINUTES")}},"HH:MM:SS.ms":{check:function(e){return r&&e>=3600&&e<86400},convert:function(e){return i(e,"HOURS")}},"dHH:MM:SS.ms":{check:function(e){return r&&e>=86400},convert:function(e){return i(e,"DAYS")}}}},u=function(e){return e},d={keys:{},latest:{},globalReset:function(){this.keys={},this.latest={}},get:function(e,t,a,o,i,l,d,h,p){if("undefined"===typeof o&&(o="undefined"),n=h,r=p,"undefined"===typeof s[o]&&"undefined"===typeof c[o])return function(e){return e};if(void 0===i||null===i||"original"===i||i===o)return d(o),u;var f,g=null,m=0;if("undefined"!==typeof s[o]){if("auto"===i){(t=Math.abs(t))>(a=Math.abs(a))&&(a=t);var b=s[o];if(Object.keys(b).forEach((function(e){var t=b[e];t<=a&&t>m&&(g=e,m=t)})),null===g||m<=0)return d(o),u;if("string"===typeof l){var v="".concat(l,"-").concat(o),_=this.keys[v];"undefined"===typeof _&&(this.keys[v]={},_=this.keys[v]),_[e]={units:g,divider:m};var y=_[e];Object.keys(_).forEach((function(e){_[e].divider>y.divider&&(y=_[e])}));var O={units:y.units,divider:y.divider};return this.latest[v]=O,m=O.divider,d(g=O.units),function(e){return m!==O.divider&&(m=O.divider,d(g=O.units)),e/m}}return d(g),function(e){return e/m}}return"undefined"!==typeof s[o][i]?(m=s[o][i],d(i),function(e){return e/m}):(console.log("Units conversion from ".concat(o.toString()," to ").concat(i.toString(),"\n is not supported.")),d(o),u)}return"undefined"!==typeof c[o]?"auto"===i?(Object.keys(c[o]).forEach((function(e){f||c[o][e].check(a)&&(d(e),f=c[o][e].convert)})),f||(d(o),u)):"undefined"!==typeof c[o][i]?(d(i),c[o][i].convert):(console.log("Units conversion from ".concat(o.toString()," to ").concat(i.toString(),"\n is not supported.")),d(o),u):(console.log("Unmatched unit conversion method for units ".concat(o.toString())),d(o),u)}}},104:function(e,t,a){"use strict";a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return h}));var n=a(5),r=a(0),o=a.n(r),i=a(110),s=a(18),l=a(55),c=a(8),u="chart_heights.",d="chart_height.",h=function(e){var t=e.chartContainerElement,a=e.chartUuid,u=e.heightId,h=e.isLegendOnBottom,p=Object(r.useState)((function(){return t.clientHeight})),f=Object(n.a)(p,2),g=f[0],m=f[1],b=Object(c.a)();Object(r.useEffect)((function(){g>=70&&b(Object(s.i)({id:a,resizeHeight:g}))}),[g,a,u,b]);var v=Object(r.useCallback)((function(e){e.preventDefault();var a=t.clientHeight,n="touchstart"===e.type?e.touches[0].clientY:e.clientY,r=function(e){var r=a+e-n;if(t.style.height="".concat(r.toString(),"px"),m(r),u){var o=h?r-l.a:r;localStorage.setItem("".concat(d).concat(u),"".concat(o))}},o=function(e){return r(e.clientY)},i=function(e){return r(e.touches[0].clientY)};"touchstart"===e.type?(document.addEventListener("touchmove",i),document.addEventListener("touchend",(function e(){document.removeEventListener("touchmove",i),document.removeEventListener("touchend",e)}))):(document.addEventListener("mousemove",o),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)})))}),[t.clientHeight,t.style.height,u,h]);return o.a.createElement(i.a,{className:"netdata-legend-resize-handler",onDoubleClick:function(e){e.preventDefault(),e.stopPropagation()},onMouseDown:v,onTouchStart:v,iconType:"resize",popoverTitle:"Chart Resize",popoverContent:"Drag this point with your mouse or your finger (on touch devices), to resize the chart vertically. You can also <b>double click it</b> or <b>double tap it</b> to reset between 2 states: the default and the one that fits all the values.<br/><small>Help can be disabled from the settings.</small>"})}},110:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(34),i=a.n(o),s=a(8),l=a(9),c=a(161),u=a(37),d=(a(316),n.forwardRef((function(e,t){var a=e.children,r=e.className,o=Object(u.a)(e,["children","className"]);return n.createElement("button",Object.assign({},o,{type:"button",className:i()("netdata-reset-button",r),ref:t}),a)})));a.d(t,"a",(function(){return h}));var h=function(e){var t=e.className,a=e.iconType,o=e.onClick,u=e.onDoubleClick,h=e.onMouseDown,p=e.onTouchStart,f=e.popoverContent,g=e.popoverTitle,m=Object(n.useRef)(null),b=Object(s.b)(l.B);return Object(n.useEffect)((function(){m.current&&b&&window.$(m.current).popover({container:"body",animation:!1,html:!0,trigger:"hover",placement:"bottom",delay:{show:window.NETDATA.options.current.show_help_delay_show_ms,hide:window.NETDATA.options.current.show_help_delay_hide_ms},title:g,content:f})}),[]),r.a.createElement(d,{className:i()(t),onClick:o,onDoubleClick:u,onMouseDown:h,onTouchStart:p,ref:m},r.a.createElement(c.a,{iconType:a}))}},12:function(e,t,a){"use strict";a.d(t,"h",(function(){return i})),a.d(t,"p",(function(){return s})),a.d(t,"o",(function(){return l})),a.d(t,"u",(function(){return c})),a.d(t,"s",(function(){return u})),a.d(t,"j",(function(){return d})),a.d(t,"q",(function(){return h})),a.d(t,"i",(function(){return p})),a.d(t,"r",(function(){return f})),a.d(t,"b",(function(){return g})),a.d(t,"d",(function(){return m})),a.d(t,"D",(function(){return b})),a.d(t,"f",(function(){return v})),a.d(t,"C",(function(){return _})),a.d(t,"a",(function(){return y})),a.d(t,"A",(function(){return O})),a.d(t,"e",(function(){return x})),a.d(t,"B",(function(){return w})),a.d(t,"v",(function(){return E})),a.d(t,"l",(function(){return S})),a.d(t,"g",(function(){return C})),a.d(t,"c",(function(){return A})),a.d(t,"w",(function(){return k})),a.d(t,"x",(function(){return j})),a.d(t,"n",(function(){return T})),a.d(t,"m",(function(){return D})),a.d(t,"t",(function(){return P})),a.d(t,"k",(function(){return M})),a.d(t,"y",(function(){return L})),a.d(t,"z",(function(){return I}));var n=a(22),r=a(90),o=a(26),i=Object(n.createAction)("".concat(o.e,"/globalRequestCommonColors")),s=Object(n.createAction)("".concat(o.e,"/setCommonMin")),l=Object(n.createAction)("".concat(o.e,"/setCommonMax")),c=Object(n.createAction)("".concat(o.e,"/setGlobalSelection")),u=Object(n.createAction)("".concat(o.e,"/setGlobalPanAndZoom")),d=Object(n.createAction)("".concat(o.e,"/resetGlobalPanAndZoomAction")),h=Object(n.createAction)("".concat(o.e,"/setDefaultAfterAction")),p=Object(n.createAction)("".concat(o.e,"/resetDefaultAfterAction")),f=Object(n.createAction)("".concat(o.e,"/setGlobalChartUnderlay")),g=Object(n.createAction)("".concat(o.e,"/centerAroundHighlightAction")),m=Object(n.createAction)("".concat(o.e,"/clearHighlightAction")),b=Object(n.createAction)("".concat(o.e,"/windowFocusChangeAction")),v=Object(r.a)("".concat(o.e,"/fetchHelloAction")),_=Object(n.createAction)("".concat(o.e,"/updatePersonUrlsAction")),y=Object(n.createAction)("".concat(o.e,"/accessRegistrySuccessAction")),O=Object(n.createAction)("".concat(o.e,"/startAlarmsAction")),x=Object(r.a)("".concat(o.e,"/fetchAllAlarmsAction")),w=Object(n.createAction)("".concat(o.e,"/updateActiveAlarmsAction")),E=Object(n.createAction)("".concat(o.e,"/setOptionAction")),S=Object(n.createAction)("".concat(o.e,"/resetOptions")),C=Object(n.createAction)("".concat(o.e,"/loadSnapshotAction")),A=Object(n.createAction)("".concat(o.e,"/chartsMetadataRequestSuccess")),k=Object(n.createAction)("".concat(o.e,"/setSpacePanelStatusAction")),j=Object(n.createAction)("".concat(o.e,"/setSpacePanelStatusAction")),T=Object(n.createAction)("".concat(o.e,"/setAlarmAction")),D=Object(n.createAction)("".concat(o.e,"/resetRegistry")),P=Object(n.createAction)("".concat(o.e,"/setGlobalPauseAction")),M=Object(n.createAction)("".concat(o.e,"/resetGlobalPauseAction")),L=Object(n.createAction)("".concat(o.e,"/setUTCOffset")),I=Object(n.createAction)("".concat(o.e,"/setUserNodeAccess"))},124:function(e,t,a){"use strict";a.d(t,"b",(function(){return l}));var n=a(0),r=a(27),o=a(73),i=a(12),s=a(182),l=function(){return Object(n.useCallback)((function(){Object(o.a)(s.a,{type:"request-refresh-access",payload:!0})}),[])};t.a=function(){var e=Object(r.d)();Object(o.b)("user-node-access",(function(t){e(Object(i.z)({message:t}))}))}},132:function(e,t,a){"use strict";var n=a(37),r=a(0),o=a.n(r),i=a(4),s=a(3),l=Object(i.d)("a").withConfig({displayName:"anchor__BaseAnchor",componentId:"sc-1eq5dgj-0"})(["&&{color:",";:hover{color:",";}:visited{color:",";}}"],Object(s.F)("primary"),Object(s.F)("primary"),Object(s.F)("accent"));t.a=function(e){var t=e.Component,a=void 0===t?s.z:t,r=Object(n.a)(e,["Component"]);return o.a.createElement(a,Object.assign({as:l},r))}},140:function(e,t,a){"use strict";var n=a(28);a.d(t,"a",(function(){return n.c}))},142:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n=function(e){return e.replace(/ /g,"_").replace(/:/g,"_").replace(/\(/g,"_").replace(/\)/g,"_").replace(/\./g,"_").replace(/\//g,"_")}},155:function(e,t,a){"use strict";a.d(t,"b",(function(){return b})),a.d(t,"a",(function(){return v}));var n=a(7),r=a(14),o=a(35),i=a(219),s=a(496),l=a(218),c=a(22),u=a(28),d=a(74),h=a(18),p=a(12),f=a(98),g=a(26),m={commonColorsKeys:{},commonMin:{},commonMax:{},currentSelectionMasterId:null,globalPanAndZoom:null,defaultAfter:d.b?Object(u.d)():-900,globalChartUnderlay:null,hoveredX:null,hasWindowFocus:document.hasFocus(),globalPause:!1,spacePanelIsActive:!1,spacePanelTransitionEndIsActive:!1,registry:{cloudBaseURL:null,hasFetchedInfo:!1,hasFetchedHello:!1,isHelloCallError:null,hostname:"unknown",isCloudEnabled:null,isCloudAvailable:null,isAgentClaimed:null,isACLKAvailable:null,hasStartedInfo:!1,isFetchingHello:!1,fullInfoPayload:null,machineGuid:null,personGuid:null,registryMachines:null,registryMachinesArray:null,registryServer:null},snapshot:null,alarms:{activeAlarms:null,hasStartedAlarms:!1},alarm:null,chartsMetadata:{isFetching:!1,isFetchingError:!1,data:null},options:f.e,userNodeAccess:null},b=Object(c.createReducer)({},m),v=function(e){var t=e.colorsAttribute,a=e.commonColorsAttribute,n=e.chartUuid,r=e.chartContext,o="string"===typeof t&&t.length>0;return a||(o?n:r)},_=function(e){return"ONLY"===Object(i.a)(e)},y=function(e,t){var a,n=t?(a=e.split(" "),_(a)?Object(s.a)(a):a):[],r=!t||!_(e.split(" "));return{assigned:{},available:[].concat(Object(o.a)(n),Object(o.a)(r||0===n.length?window.NETDATA.themes.current.colors:[])),custom:n}};b.on(p.h,(function(e,t){var a=t.chartContext,o=t.chartUuid,i=t.colorsAttribute,s=t.commonColorsAttribute,c=t.dimensionNames,u=v({colorsAttribute:i,commonColorsAttribute:s,chartUuid:o,chartContext:a}),d="string"===typeof i&&i.length>0,h=e.commonColorsKeys[u]||y(i,d),p=Object.keys(h.assigned).length,f=Object(l.a)(c.filter((function(e){return!h.assigned[e]})).map((function(e,t){return Object(r.a)({},e,h.available[(t+p)%h.available.length])}))),g=Object(n.a)({},h.assigned,{},f);return Object(n.a)({},e,{commonColorsKeys:Object(n.a)({},e.commonColorsKeys,Object(r.a)({},u,Object(n.a)({},h,{assigned:g})))})})),b.on(p.p,(function(e,t){var a,i=t.chartUuid,s=t.commonMinKey,l=t.value,c=Object(n.a)({},null===(a=e.commonMin[s])||void 0===a?void 0:a.charts,Object(r.a)({},i,l)),u=Math.min.apply(Math,Object(o.a)(Object.values(c)));return Object(n.a)({},e,{commonMin:Object(n.a)({},e.commonMin,Object(r.a)({},s,{charts:c,currentExtreme:u}))})})),b.on(p.o,(function(e,t){var a,i=t.chartUuid,s=t.commonMaxKey,l=t.value,c=Object(n.a)({},null===(a=e.commonMax[s])||void 0===a?void 0:a.charts,Object(r.a)({},i,l)),u=Math.max.apply(Math,Object(o.a)(Object.values(c)));return Object(n.a)({},e,{commonMax:Object(n.a)({},e.commonMax,Object(r.a)({},s,{charts:c,currentExtreme:u}))})})),b.on(p.w,(function(e,t){var a=t.isActive;return Object(n.a)({},e,{spacePanelIsActive:a})})),b.on(p.x,(function(e,t){var a=t.isActive;return Object(n.a)({},e,{spacePanelTransitionEndIsActive:a})})),b.on(p.u,(function(e,t){var a=t.chartUuid,r=t.hoveredX;return Object(n.a)({},e,{hoveredX:r,currentSelectionMasterId:a})})),b.on(p.s,(function(e,t){return Object(n.a)({},e,{globalPanAndZoom:t})})),b.on(p.j,(function(e){return Object(n.a)({},e,{globalPanAndZoom:m.globalPanAndZoom,hoveredX:m.hoveredX})})),b.on(p.q,(function(e,t){var a=t.after;return Object(n.a)({},e,{defaultAfter:a})})),b.on(p.i,(function(e){return Object(n.a)({},e,{defaultAfter:m.defaultAfter})})),b.on(p.r,(function(e,t){var a=t.after,r=t.before,o=t.masterID;return Object(n.a)({},e,{globalChartUnderlay:{after:a,before:r,masterID:o}})})),b.on(p.b,(function(e){if(!e.globalChartUnderlay)return console.warn("Cannot center around empty selection"),e;var t=e.globalChartUnderlay,a=t.after,r=t.before,o=(r-a)/2;return Object(n.a)({},e,{globalPanAndZoom:{after:a-o,before:r+o}})})),b.on(p.d,(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.resetPanAndZoom,r=void 0===a||a;return Object(n.a)({},e,{globalChartUnderlay:m.globalChartUnderlay},r?{globalPanAndZoom:m.globalPanAndZoom}:{})})),b.on(p.D,(function(e,t){var a=t.hasWindowFocus,r=document.hasFocus();return Object(n.a)({},e,{hasWindowFocus:r||a})})),b.on(p.t,(function(e){return Object(n.a)({},e,{globalPause:!0})})),b.on(p.k,(function(e,t){var a=t.forcePlay;return Object(n.a)({},e,{globalPause:m.globalPause,globalPanAndZoom:m.globalPanAndZoom,hoveredX:m.hoveredX,options:Object(n.a)({},e.options,{stop_updates_when_focus_is_lost:!a})})})),b.on(p.y,(function(e,t){var a=t.utcOffset;return Object(n.a)({},e,{options:Object(n.a)({},e.options,{utcOffset:a})})})),b.on(p.f.request,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{isFetchingHello:!0})})})),b.on(p.f.success,(function(e,t){var a=t.cloudBaseURL,r=t.hostname,o=t.machineGuid;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{cloudBaseURL:a,isFetchingHello:!1,hasFetchedHello:!0,hostname:r,machineGuid:o})})})),b.on(p.f.failure,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{cloudBaseURL:g.a,isFetchingHello:!1,isHelloCallError:!0})})})),b.on(p.a,(function(e,t){var a=t.registryServer;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{registryServer:a})})})),b.on(p.m,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{hasFetchedHello:m.registry.hasFetchedHello})})})),b.on(h.f,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{hasStartedInfo:!0})})})),b.on(h.f.success,(function(e,t){var a=t.isCloudAvailable,r=t.isCloudEnabled,o=t.isAgentClaimed,i=t.isACLKAvailable,s=t.fullInfoPayload;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{hasFetchedInfo:!0,isCloudAvailable:a,isCloudEnabled:r,isAgentClaimed:o,isACLKAvailable:i,fullInfoPayload:s})})})),b.on(h.f.failure,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{isCloudAvailable:!1,isCloudEnabled:!1,isAgentClaimed:!1,isACLKAvailable:!1})})})),b.on(p.C,(function(e,t){var a=t.personGuid,r=t.registryMachines,o=t.registryMachinesArray;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{personGuid:a,registryMachines:r,registryMachinesArray:o})})})),b.on(p.A,(function(e){return Object(n.a)({},e,{alarms:Object(n.a)({},e.alarms,{hasStartedAlarms:!0})})})),b.on(p.B,(function(e,t){var a=t.activeAlarms;return Object(n.a)({},e,{alarms:Object(n.a)({},e.alarms,{activeAlarms:a})})})),b.on(p.v,(function(e,t){var a=t.key,o=t.value;return Object(n.a)({},e,{options:Object(n.a)({},e.options,Object(r.a)({},a,o))})})),b.on(p.l,(function(e){return Object(f.b)(),Object(n.a)({},e,{options:Object(f.c)()})})),b.on(p.g,(function(e,t){var a=t.snapshot,o=Object.keys(a.data).map((function(e){var t,n;try{if(null===(t=a.uncompress(a.data[e])))return console.warn("uncompressed snapshot data for key ".concat(e," is null")),null;if("undefined"===typeof t)return console.warn("uncompressed snapshot data for key ".concat(e," is undefined")),null}catch(o){console.warn("decompression of snapshot data for key ".concat(e," failed"),o),t=null}if("string"!==typeof t)return console.warn("uncompressed snapshot data for key ".concat(e," is not string")),{};try{n=JSON.parse(t)}catch(o){return console.warn("parsing snapshot data for key ".concat(e," failed")),{}}return Object(r.a)({},e,n)})).reduce((function(e,t){return Object(n.a)({},e,{},t)}),{});return Object(n.a)({},e,{snapshot:Object(n.a)({},a,{data:o})})})),b.on(p.n,(function(e,t){var a=t.alarm;return Object(n.a)({},e,{alarm:a})})),b.on(p.c,(function(e,t){var a=t.data;return Object(n.a)({},e,{chartsMetadata:Object(n.a)({},e.chartsMetadata,{data:a})})})),b.on(p.z,(function(e,t){var a=t.message;return Object(n.a)({},e,{userNodeAccess:a})}))},161:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),o=a(34),i=a.n(o),s=function(e){return{left:"fa-backward",reset:"fa-play",right:"fa-forward",zoomIn:"fa-plus",zoomOut:"fa-minus",resize:"fa-sort",lineChart:"fa-chart-line",areaChart:"fa-chart-area",noChart:"fa-chart-area",loading:"fa-sync-alt",noData:"fa-exclamation-triangle"}[e]},l=function(e){var t=e.iconType;return r.a.createElement("i",{className:i()("fas",s(t))})}},163:function(e,t,a){"use strict";a.d(t,"b",(function(){return f})),a.d(t,"a",(function(){return g}));var n=a(14),r=a(7),o=a(193),i=a(497),s=a(498),l=a(286),c=a(22),u=a(12),d=a(98),h=a(28),p=a(18),f={chartData:null,chartId:null,chartMetadata:null,chartPanAndZoom:null,fetchDataParams:{isRemotelyControlled:!1,viewRange:null},isFetchingData:!1,isFetchDataFailure:!1,isFetchDetailsFailure:!1,isFetchingDetails:!1,resizeHeight:null,snapshotDataIsFetching:!1,snapshotDataIsError:!1,snapshotData:null,viewRange:null},g=Object(c.createReducer)({},{}),m=function(e,t){return e[t]||f};g.on(p.c.request,(function(e,t){var a=t.chart,o=t.fetchDataParams,i=t.id;return Object(r.a)({},e,Object(n.a)({},i,Object(r.a)({},m(e,i),{chartId:a,isFetchingData:!0,viewRange:o.viewRange})))})),g.on(p.d,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchingData:!1})))})),g.on(p.c.failure,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchingData:!1,isFetchDataFailure:!0})))})),g.on(p.c.success,(function(e,t){var a=t.id,o=t.chartData,i=t.fetchDataParams,s=m(e,a);return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},s,{chartData:Object(h.f)(["dimension_names"],s.chartData,o),fetchDataParams:i,isFetchingData:!1,isFetchDataFailure:!1,viewRange:i.viewRange})))})),g.on(p.e.request,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{snapshotDataIsFetching:!0})))})),g.on(p.e.failure,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{snapshotDataIsFetching:!1,snapshotDataIsError:!0})))})),g.on(p.e.success,(function(e,t){var a=t.id,o=t.snapshotData;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{snapshotDataIsFetching:!1,snapshotDataIsError:!1,snapshotData:o})))})),g.on(p.j,(function(e){return Object(o.a)((function(e){return Object(r.a)({},e,{},Object(i.a)(["snapshotDataIsFetching","snapshotDataIsError","snapshotData"],f))}),e)})),g.on(p.b.request,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchingDetails:!0})))})),g.on(p.b.failure,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchDetailsFailure:!0})))})),g.on(p.b.success,(function(e,t){var a=t.id,o=t.chartMetadata;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{chartMetadata:o,isFetchingDetails:!1,isFetchDetailsFailure:!1})))})),g.on(p.i,(function(e,t){var a=t.id,o=t.resizeHeight;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{resizeHeight:o})))})),g.on(p.h,(function(e,t){var a=t.after,o=t.before,i=t.id,s=t.shouldForceTimeRange;return Object(r.a)({},e,Object(n.a)({},i,Object(r.a)({},m(e,i),{chartPanAndZoom:{after:a,before:o,shouldForceTimeRange:s}})))})),g.on(p.g,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{chartPanAndZoom:f.chartPanAndZoom})))})),g.on(u.v,(function(e,t){var a=t.key,n=t.value;return a===d.a&&!0===n?Object(o.a)(Object(s.a)("chartPanAndZoom",f.chartPanAndZoom),e):e})),g.on(p.a,(function(e,t){var a=t.id;return Object(l.a)([a],e)}))},170:function(e,t,a){"use strict";a.d(t,"b",(function(){return d})),a.d(t,"a",(function(){return h}));var n=a(7),r=a(14),o=a(499),i=a(218),s=a(503),l=a(98),c=function(e,t,a){var n="data-".concat(t);if(e.hasAttribute(n)){var r=e.getAttribute(n);return"true"===r||"false"!==r&&("null"===r?null:r==="".concat(+r)?+r:/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/.test(r)?JSON.parse(r):r)}return a},u=function(e){return Object(o.a)((function(t){return"boolean"===t.type?function(e,t,a){var n=c(e,t,a);return!0===n||!1===n?n:"string"===typeof n?"yes"===n||"on"===n||""!==n&&"no"!==n&&"off"!==n&&"null"!==n&&a:"number"===typeof n?0!==n:a}(e,t.key,t.defaultValue):c(e,t.key,t.defaultValue)}),{id:{key:"netdata"},host:{key:"host"},httpMethod:{key:"http-method"},title:{key:"title"},chartLibrary:{key:"chart-library",defaultValue:window.NETDATA.chartDefaults.library},width:{key:"width",defaultValue:window.NETDATA.chartDefaults.width},height:{key:"height",defaultValue:window.NETDATA.chartDefaults.height},after:{key:"after"},before:{key:"before",defaultValue:window.NETDATA.chartDefaults.before},legend:{key:"legend",type:"boolean",defaultValue:!0},legendPosition:{key:"legend-position"},units:{key:"units"},unitsCommon:{key:"common-units"},unitsDesired:{key:"desired-units"},aggrMethod:{key:"aggr-method"},labels:{key:"labels"},postGroupBy:{key:"post-group-by"},postAggregationMethod:{key:"post-aggregation-method"},dimensionsAggrMethod:{key:"dimensions-aggr-method"},aggrGroups:{key:"aggrGroups"},selectedChart:{key:"selected-chart"},filteredRows:{key:"filtered-rows"},groupBy:{key:"group-by"},nodeIDs:{key:"node-ids"},colors:{key:"colors"},commonColors:{key:"common-colors"},decimalDigits:{key:"decimal-digits"},dimensions:{key:"dimensions"},selectedDimensions:{key:"selected-dimensions"},forceTimeWindow:{key:"force-time-window"},appendOptions:{key:"append-options"},gtime:{key:"gtime"},method:{key:"method"},overrideOptions:{key:"override-options"},pixelsPerPoint:{key:"pixels-per-point"},points:{key:"points"},heightId:{key:"id"},hideResizeHandler:{key:"hide-resize-handler"},detectResize:{key:"detect-resize"},commonMin:{key:"common-min"},commonMax:{key:"common-max"},dygraphType:{key:"dygraph-type"},dygraphValueRange:{key:"dygraph-valuerange"},dygraphTheme:{key:"dygraph-theme"},dygraphSmooth:{key:"dygraph-smooth",type:"boolean"},dygraphColors:{key:"dygraph-colors"},dygraphRightGap:{key:"dygraph-rightgap"},dygraphShowRangeSelector:{key:"dygraph-showrangeselector",type:"boolean"},dygraphShowRoller:{key:"dygraph-showroller",type:"boolean"},dygraphTitle:{key:"dygraph-title"},dygraphTitleHeight:{key:"dygraph-titleheight"},dygraphLegend:{key:"dygraph-legend"},dygraphLabelsDiv:{key:"dygraph-labelsdiv"},dygraphLabelsSeparateLine:{key:"dygraph-labelsseparatelines",type:"boolean"},dygraphIncludeZero:{key:"dygraph-includezero",type:"boolean"},dygraphShowZeroValues:{key:"dygraph-labelsshowzerovalues",type:"boolean"},dygraphShowLabelsOnHighLight:{key:"dygraph-showlabelsonhighlight",type:"boolean"},dygraphHideOverlayOnMouseOut:{key:"dygraph-hideoverlayonmouseout",type:"boolean"},dygraphXRangePad:{key:"dygraph-xrangepad"},dygraphYRangePad:{key:"dygraph-yrangepad"},dygraphYLabelWidth:{key:"dygraph-ylabelwidth"},dygraphStrokeWidth:{key:"dygraph-strokewidth"},dygraphStrokePattern:{key:"dygraph-strokepattern"},dygraphDrawPoints:{key:"dygraph-drawpoints",type:"boolean"},dygraphDrawGapEdgePoints:{key:"dygraph-drawgapedgepoints",type:"boolean"},dygraphConnectSeparatedPoints:{key:"dygraph-connectseparatedpoints",type:"boolean"},dygraphPointSize:{key:"dygraph-pointsize"},dygraphStepPlot:{key:"dygraph-stepplot",type:"boolean"},dygraphStrokeBorderColor:{key:"dygraph-strokebordercolor"},dygraphStrokeBorderWidth:{key:"dygraph-strokeborderwidth"},dygraphFillGraph:{key:"dygraph-fillgraph",type:"boolean"},dygraphFillAlpha:{key:"dygraph-fillalpha"},dygraphStackedGraph:{key:"dygraph-stackedgraph",type:"boolean"},dygraphStackedGraphNanFill:{key:"dygraph-stackedgraphnanfill"},dygraphAxisLabelFontSize:{key:"dygraph-axislabelfontsize"},dygraphAxisLineColor:{key:"dygraph-axislinecolor"},dygraphAxisLineWidth:{key:"dygraph-axislinewidth"},dygraphDrawGrid:{key:"dygraph-drawgrid",type:"boolean"},dygraphGridLinePattern:{key:"dygraph-gridlinepattern"},dygraphGridLineWidth:{key:"dygraph-gridlinewidth"},dygraphGridLineColor:{key:"dygraph-gridlinecolor"},dygraphMaxNumberWidth:{key:"dygraph-maxnumberwidth"},dygraphSigFigs:{key:"dygraph-sigfigs"},dygraphDigitsAfterDecimal:{key:"dygraph-digitsafterdecimal"},dygraphHighlighCircleSize:{key:"dygraph-highlightcirclesize"},dygraphHighlightSeriesOpts:{key:"dygraph-highlightseriesopts"},dygraphHighlightSeriesBackgroundAlpha:{key:"dygraph-highlightseriesbackgroundalpha"},dygraphXPixelsPerLabel:{key:"dygraph-xpixelsperlabel"},dygraphXAxisLabelWidth:{key:"dygraph-xaxislabelwidth"},dygraphDrawXAxis:{key:"dygraph-drawxaxis",type:"boolean"},dygraphYPixelsPerLabel:{key:"dygraph-ypixelsperlabel"},dygraphYAxisLabelWidth:{key:"dygraph-yaxislabelwidth"},dygraphDrawYAxis:{key:"dygraph-drawyaxis",type:"boolean"},dygraphDrawAxis:{key:"dygraph-drawaxis",type:"boolean"},easyPieChartMinValue:{key:"easypiechart-min-value"},easyPieChartMaxValue:{key:"easypiechart-max-value"},easyPieChartBarColor:{key:"easypiechart-barcolor"},easyPieChartTrackColor:{key:"easypiechart-trackcolor"},easyPieChartScaleColor:{key:"easypiechart-scalecolor"},easyPieChartScaleLength:{key:"easypiechart-scalelength"},easyPieChartLineCap:{key:"easypiechart-linecap"},easyPieChartLineWidth:{key:"easypiechart-linewidth"},easyPieChartTrackWidth:{key:"easypiechart-trackwidth"},easyPieChartSize:{key:"easypiechart-size"},easyPieChartRotate:{key:"easypiechart-rotate"},easyPieChartAnimate:{key:"easypiechart-animate"},easyPieChartEasing:{key:"easypiechart-easing"},gaugeMinValue:{key:"gauge-min-value"},gaugeMaxValue:{key:"gauge-max-value"},gaugePointerColor:{key:"gauge-pointer-color"},gaugeStrokeColor:{key:"gauge-stroke-color"},gaugeStartColor:{key:"gauge-start-color"},gaugeStopColor:{key:"gauge-stop-color"},gaugeGenerateGradient:{key:"gauge-generate-gradient"},sparklineType:{key:"sparkline-type"},sparklineLineColor:{key:"sparkline-linecolor"},sparklineFillColor:{key:"sparkline-fillcolor"},sparklineChartRangeMin:{key:"sparkline-chartrangemin"},sparklineChartRangeMax:{key:"sparkline-chartrangemax"},sparklineComposite:{key:"sparkline-composite"},sparklineEnableTagOptions:{key:"sparkline-enabletagoptions"},sparklineTagOptionPrefix:{key:"sparkline-tagoptionprefix"},sparklineTagValuesAttribute:{key:"sparkline-tagvaluesattribute"},sparklineDisableHiddenCheck:{key:"sparkline-disablehiddencheck"},sparklineDefaultPixelsPerValue:{key:"sparkline-defaultpixelspervalue"},sparklineSpotColor:{key:"sparkline-spotcolor"},sparklineMinSpotColor:{key:"sparkline-minspotcolor"},sparklineMaxSpotColor:{key:"sparkline-maxspotcolor"},sparklineSpotRadius:{key:"sparkline-spotradius"},sparklineValueSpots:{key:"sparkline-valuespots"},sparklineHighlightSpotColor:{key:"sparkline-highlightspotcolor"},sparklineHighlightLineColor:{key:"sparkline-highlightlinecolor"},sparklineLineWidth:{key:"sparkline-linewidth"},sparklineNormalRangeMin:{key:"sparkline-normalrangemin"},sparklineNormalRangeMax:{key:"sparkline-normalrangemax"},sparklineDrawNormalOnTop:{key:"sparkline-drawnormalontop"},sparklineXvalues:{key:"sparkline-xvalues"},sparklineChartRangeClip:{key:"sparkline-chartrangeclip"},sparklineChartRangeMinX:{key:"sparkline-chartrangeminx"},sparklineChartRangeMaxX:{key:"sparkline-chartrangemaxx"},sparklineDisableInteraction:{key:"sparkline-disableinteraction",type:"boolean"},sparklineDisableTooltips:{key:"sparkline-disabletooltips",type:"boolean"},sparklineOnHover:{key:"sparkline-on-hover"},sparklineDisableHighlight:{key:"sparkline-disablehighlight",type:"boolean"},sparklineHighlightLighten:{key:"sparkline-highlightlighten"},sparklineHighlightColor:{key:"sparkline-highlightcolor"},sparklineTooltipContainer:{key:"sparkline-tooltipcontainer"},sparklineTooltipClassname:{key:"sparkline-tooltipclassname"},sparklineTooltipFormat:{key:"sparkline-tooltipformat"},sparklineTooltipPrefix:{key:"sparkline-tooltipprefix"},sparklineTooltipSuffix:{key:"sparkline-tooltipsuffix"},sparklineTooltipSkipNull:{key:"sparkline-tooltipskipnull",type:"boolean"},sparklineTooltipValueLookups:{key:"sparkline-tooltipvaluelookups"},sparklineTooltipFormatFieldlist:{key:"sparkline-tooltipformatfieldlist"},sparklineTooltipFormatFieldlistKey:{key:"sparkline-tooltipformatfieldlistkey"},sparklineNumberFormatter:{key:"sparkline-numberformatter"},sparklineNumberDigitGroupSep:{key:"sparkline-numberdigitgroupsep"},sparklineNumberDecimalMark:{key:"sparkline-numberdecimalmark"},sparklineNumberDigitGroupCount:{key:"sparkline-numberdigitgroupcount"},sparklineAnimatedZooms:{key:"sparkline-animatedzooms",type:"boolean"},d3pieTitle:{key:"d3pie-title"},d3pieSubtitle:{key:"d3pie-subtitle"},d3pieFooter:{key:"d3pie-footer"},d3pieTitleColor:{key:"d3pie-title-color"},d3pieTitleFontsize:{key:"d3pie-title-fontsize"},d3pieTitleFontweight:{key:"d3pie-title-fontweight"},d3pieTitleFont:{key:"d3pie-title-font"},d3PieSubtitleColor:{key:"d3pie-subtitle-color"},d3PieSubtitleFontsize:{key:"d3pie-subtitle-fontsize"},d3PieSubtitleFontweight:{key:"d3pie-subtitle-fontweight"},d3PieSubtitleFont:{key:"d3pie-subtitle-font"},d3PieFooterColor:{key:"d3pie-footer-color"},d3PieFooterFontsize:{key:"d3pie-footer-fontsize"},d3PieFooterFontweight:{key:"d3pie-footer-fontweight"},d3PieFooterFont:{key:"d3pie-footer-font"},d3PieFooterLocation:{key:"d3pie-footer-location"},d3PiePieinnerradius:{key:"d3pie-pieinnerradius"},d3PiePieouterradius:{key:"d3pie-pieouterradius"},d3PieSortorder:{key:"d3pie-sortorder"},d3PieSmallsegmentgroupingEnabled:{key:"d3pie-smallsegmentgrouping-enabled",type:"boolean"},d3PieSmallsegmentgroupingValue:{key:"d3pie-smallsegmentgrouping-value"},d3PieSmallsegmentgroupingValuetype:{key:"d3pie-smallsegmentgrouping-valuetype"},d3PieSmallsegmentgroupingLabel:{key:"d3pie-smallsegmentgrouping-label"},d3PieSmallsegmentgroupingColor:{key:"d3pie-smallsegmentgrouping-color"},d3PieLabelsOuterFormat:{key:"d3pie-labels-outer-format"},d3PieLabelsOuterHidewhenlessthanpercentage:{key:"d3pie-labels-outer-hidewhenlessthanpercentage"},d3PieLabelsOuterPiedistance:{key:"d3pie-labels-outer-piedistance"},d3PieLabelsInnerFormat:{key:"d3pie-labels-inner-format"},d3PieLabelsInnerHidewhenlessthanpercentage:{key:"d3pie-labels-inner-hidewhenlessthanpercentage"},d3PieLabelsMainLabelColor:{key:"d3pie-labels-mainLabel-color"},d3PieLabelsMainLabelFont:{key:"d3pie-labels-mainLabel-font"},d3PieLabelsMainLabelFontsize:{key:"d3pie-labels-mainLabel-fontsize"},d3PieLabelsMainLabelFontweight:{key:"d3pie-labels-mainLabel-fontweight"},d3PieLabelsPercentageColor:{key:"d3pie-labels-percentage-color"},d3PieLabelsPercentageFont:{key:"d3pie-labels-percentage-font"},d3PieLabelsPercentageFontsize:{key:"d3pie-labels-percentage-fontsize"},d3PieLabelsPercentageFontweight:{key:"d3pie-labels-percentage-fontweight"},d3PieLabelsValueColor:{key:"d3pie-labels-value-color"},d3PieLabelsValueFont:{key:"d3pie-labels-value-font"},d3PieLabelsValueFontsize:{key:"d3pie-labels-value-fontsize"},d3PieLabelsValueFontweight:{key:"d3pie-labels-value-fontweight"},d3PieLabelsLinesEnabled:{key:"d3pie-labels-lines-enabled",type:"boolean"},d3PieLabelsLinesStyle:{key:"d3pie-labels-lines-style"},d3PieLabelsLinesColor:{key:"d3pie-labels-lines-color"},d3PieLabelsTruncationEnabled:{key:"d3pie-labels-truncation-enabled",type:"boolean"},d3PieLabelsTruncationTruncatelength:{key:"d3pie-labels-truncation-truncatelength"},d3PieMiscColorsSegmentstroke:{key:"d3pie-misc-colors-segmentstroke"},d3PieMiscGradientEnabled:{key:"d3pie-misc-gradient-enabled",type:"boolean"},d3PieMiscColorsPercentage:{key:"d3pie-misc-colors-percentage"},d3PieMiscGradientColor:{key:"d3pie-misc-gradient-color"},d3PieCssprefix:{key:"d3pie-cssprefix"},peityStrokeWidth:{key:"peity-strokewidth"},textOnlyDecimalPlaces:{key:"textonly-decimal-places"},textOnlyPrefix:{key:"textonly-prefix"},textOnlySuffix:{key:"textonly-suffix"}})},d=function(e){var t=u(e),a=function(e){var t=Array.from(e.attributes).filter((function(e){return e.name.startsWith("data-show-value-of")})).map((function(e){return Object(r.a)({},e.name.replace("data-",""),e.value)})),a=Object(i.a)(t);return Object(s.a)(a)?void 0:a}(e);return Object(n.a)({},t,{showValueOf:a})},h={legendPosition:l.d?"right":"bottom"}},18:function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"d",(function(){return s})),a.d(t,"e",(function(){return l})),a.d(t,"j",(function(){return c})),a.d(t,"b",(function(){return u})),a.d(t,"i",(function(){return d})),a.d(t,"h",(function(){return h})),a.d(t,"g",(function(){return p})),a.d(t,"a",(function(){return f})),a.d(t,"f",(function(){return g}));var n=a(22),r=a(90),o=a(45),i=(Object(n.createAction)("".concat(o.c,"/updateChartData")),Object(n.createAction)("".concat(o.c,"/updateChartMetadata")),Object(r.a)("".concat(o.c,"/fetchDataAction"))),s=Object(n.createAction)("".concat(o.c,"/fetchDataCancelAction")),l=Object(r.a)("".concat(o.c,"/fetchDataForSnapshotAction")),c=Object(r.a)("".concat(o.c,"/snapshotExportResetAction")),u=Object(r.a)("".concat(o.c,"/fetchChartAction")),d=Object(n.createAction)("".concat(o.c,"/setResizeHeight")),h=Object(n.createAction)("".concat(o.c,"/setChartPanAndZoom")),p=Object(n.createAction)("".concat(o.c,"/resetChartPanAndZoomAction")),f=Object(n.createAction)("".concat(o.c,"/clearChartStateAction")),g=Object(r.a)("".concat(o.c,"/fetchInfoAction"))},182:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n="sign_in_iframe"},216:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return updateLocaleFunctions})),__webpack_require__.d(__webpack_exports__,"a",(function(){return netdataCallback}));var ramda__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(500),ramda__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(146),_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12),_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(9),_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(46),_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(100),_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(44),_domains_chart_actions__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(18),_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(39),_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(36),_utils_name_2_id__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(142),_utils_date_time__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(42),_utils__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(140),utils_hash_utils__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(56),_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(83),_domains_chart_utils_legend_utils__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(55),_domains_chart_utils_transformDataAttributes__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(170),_getHashParam,_getHashParam2,localeDateString,localeTimeString,updateLocaleFunctions=function(e){var t=e.localeDateString,a=e.localeTimeString;localeDateString=t,localeTimeString=a},netdataShowAlarms=!0,netdataRegistry=!0,netdataServer=void 0,netdataServerStatic=void 0,netdataCheckXSS=void 0,reduxStore;function escapeUserInputHTML(e){return e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/#/g,"#").replace(/'/g,"'").replace(/\(/g,"(").replace(/\)/g,")").replace(/\//g,"/")}var setOption=function(e,t){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.v)({key:e,value:t}))},getFromRegistry=function(e){var t=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.y)(reduxStore.getState());return null===t||void 0===t?void 0:t[e]};function verifyURL(e){return"string"===typeof e&&(e.startsWith("http://")||e.startsWith("https://"))?e.replace(/'/g,"%22").replace(/"/g,"%27").replace(/\)/g,"%28").replace(/\(/g,"%29"):(console.log("invalid URL detected:"),console.log(e),'javascript:alert("invalid url");')}window.urlOptions={hash:"#",theme:null,help:null,mode:"live",update_always:!1,pan_and_zoom:!1,server:null,after:null!==(_getHashParam=Object(utils_hash_utils__WEBPACK_IMPORTED_MODULE_13__.a)("after"))&&void 0!==_getHashParam?_getHashParam:0,before:null!==(_getHashParam2=Object(utils_hash_utils__WEBPACK_IMPORTED_MODULE_13__.a)("before"))&&void 0!==_getHashParam2?_getHashParam2:0,highlight:!1,highlight_after:0,highlight_before:0,nowelcome:!1,show_alarms:!1,chart:null,family:null,alarm:null,utc:null,hasProperty:function(e){return"undefined"!==typeof this[e]},genHash:function(e){var t=urlOptions.hash;return t+=";after="+urlOptions.after.toString()+";before="+urlOptions.before.toString(),!0===urlOptions.highlight&&(t+=";highlight_after="+urlOptions.highlight_after.toString()+";highlight_before="+urlOptions.highlight_before.toString()),null!==urlOptions.theme&&(t+=";theme="+urlOptions.theme.toString()),null!==urlOptions.help&&(t+=";help="+urlOptions.help.toString()),!0===urlOptions.update_always&&(t+=";update_always=true"),!0===e&&null!==urlOptions.server&&(t+=";server="+urlOptions.server.toString()),"live"!==urlOptions.mode&&(t+=";mode="+urlOptions.mode),null!==urlOptions.utc&&(t+=";utc="+urlOptions.utc),t},parseHash:function(){for(var e=document.location.hash.split(";"),t=e.length;t--;)if(0!==t){var a=e[t].split("=");urlOptions.hasProperty(a[0])&&"undefined"!==typeof a[1]&&(urlOptions[a[0]]=decodeURIComponent(a[1]))}else e[t].length>0&&(urlOptions.hash=e[t]);var n=["nowelcome","show_alarms","update_always"];for(t=n.length;t--;)"true"===urlOptions[n[t]]||!0===urlOptions[n[t]]||"1"===urlOptions[n[t]]||1===urlOptions[n[t]]?urlOptions[n[t]]=!0:urlOptions[n[t]]=!1;var r=["after","before","highlight_after","highlight_before"];for(t=r.length;t--;)if("string"===typeof urlOptions[r[t]])try{urlOptions[r[t]]=parseInt(urlOptions[r[t]])}catch(o){console.log("failed to parse URL hash parameter "+r[t]),urlOptions[r[t]]=0}switch(null!==urlOptions.server&&""!==urlOptions.server?(netdataServerStatic=document.location.origin.toString()+document.location.pathname.toString(),netdataServer=urlOptions.server,netdataCheckXSS=!0):urlOptions.server=null,urlOptions.before>0&&urlOptions.after>0?(urlOptions.pan_and_zoom=!0,urlOptions.nowelcome=!0):urlOptions.pan_and_zoom=!1,urlOptions.highlight_before>0&&urlOptions.highlight_after>0?urlOptions.highlight=!0:urlOptions.highlight=!1,urlOptions.mode){case"print":urlOptions.theme="white",urlOptions.welcome=!1,urlOptions.help=!1,urlOptions.show_alarms=!1,!1===urlOptions.pan_and_zoom&&(urlOptions.pan_and_zoom=!0,urlOptions.before=Date.now(),urlOptions.after=urlOptions.before-6e5),netdataShowAlarms=!1,netdataRegistry=!1;break;case"live":default:urlOptions.mode="live"}},hashUpdate:function(){history.replaceState(null,"",urlOptions.genHash(!0))},netdataPanAndZoomCallback:function(e,t,a){null===netdataSnapshotData&&(urlOptions.pan_and_zoom=e,urlOptions.after=t,urlOptions.before=a,urlOptions.hashUpdate())},updateUtcParam:function(e){e&&(urlOptions.utc=e,urlOptions.hashUpdate())},netdataHighlightCallback:function(e,t,a){if(!0===e&&(null===t||null===a||t<=0||a<=0||t>=a)&&(e=!1,t=0,a=0),null===window.netdataSnapshotData?urlOptions.highlight=e:urlOptions.highlight=!1,urlOptions.highlight_after=Math.round(t),urlOptions.highlight_before=Math.round(a),urlOptions.hashUpdate(),!0===e&&t>0&&a>0&&t<a){var n=localeDateString(t),r=localeDateString(a);n===r&&(r=""),document.getElementById("navbar-highlight-content").innerHTML='<span class="navbar-highlight-bar highlight-tooltip" onclick="urlOptions.showHighlight();" title="restore the highlighted view" data-toggle="tooltip" data-placement="bottom">highlighted time-frame <b>'+n+" <code>"+localeTimeString(t)+"</code></b> to <b>"+r+" <code>"+localeTimeString(a)+"</code></b>, duration <b>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(Math.round((a-t)/1e3))+'</b></span><span class="navbar-highlight-button-right highlight-tooltip" onclick="urlOptions.clearHighlight();" title="clear the highlighted time-frame" data-toggle="tooltip" data-placement="bottom"><i class="fas fa-times"></i></span>',$(".navbar-highlight").show(),$(".navbar-highlight").width("80%"),$(".highlight-tooltip").tooltip({html:!0,delay:{show:500,hide:0},container:"body"})}else $(".navbar-highlight").hide(),$(".navbar-highlight").width("100%")},clearHighlight:function(){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.d)())},showHighlight:function(){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.b)())}},urlOptions.parseHash();var localStorageTested=-1;function localStorageTest(){if(-1!==localStorageTested)return localStorageTested;if("undefined"!==typeof Storage&&"object"===typeof localStorage){try{localStorage.setItem("test","test"),localStorage.removeItem("test"),localStorageTested=!0}catch(e){console.log(e),localStorageTested=!1}}else localStorageTested=!1;return localStorageTested}function loadLocalStorage(e){var t=null;try{!0===localStorageTest()?t=localStorage.getItem(e):console.log("localStorage is not available")}catch(a){return console.log(a),null}return"undefined"===typeof t||null===t?null:t}function saveLocalStorage(e,t){try{if(!0===localStorageTest())return localStorage.setItem(e,t.toString()),!0}catch(a){console.log(a)}return!1}function getTheme(e){if("print"===urlOptions.mode)return"white";var t=loadLocalStorage("netdataTheme");return"undefined"===typeof t||null===t||"undefined"===t?e:t}function setTheme(e){return"print"!==urlOptions.mode&&(e!==netdataTheme&&saveLocalStorage("netdataTheme",e))}window.netdataTheme=getTheme("slate"),NETDATA.updateTheme();var netdataShowHelp=!0;function naturalSortChunkify(e){for(var t,a,n=[],r=0,o=-1,i=0;t=(a=e.charAt(r++)).charCodeAt(0);){var s=t>=48&&t<=57;s!==i&&(n[++o]="",i=s),n[o]+=a}return n}function naturalSortCompare(e,t){for(var a=naturalSortChunkify(e.toLowerCase()),n=naturalSortChunkify(t.toLowerCase()),r=0;a[r]&&n[r];r++)if(a[r]!==n[r]){var o=Number(a[r]),i=Number(n[r]);return o.toString()===a[r]&&i.toString()===n[r]?o-i:a[r]>n[r]?1:-1}return a.length-n.length}function saveTextToClient(e,t){var a=new Blob([e],{type:"application/octet-stream"}),n=URL.createObjectURL(a),r=document.createElement("a");r.setAttribute("href",n),r.setAttribute("download",t);var o=document.getElementById("hiddenDownloadLinks");o.innerHTML="",o.appendChild(r),setTimeout((function(){o.removeChild(r),URL.revokeObjectURL(n)}),60),r.click()}function saveObjectToClient(e,t){saveTextToClient(JSON.stringify(e),t)}function netdataURL(e,t){return"undefined"===typeof e&&(e=""),-1!==e.indexOf("#")&&(e=e.substring(0,e.indexOf("#"))),e+urlOptions.genHash(t)}function netdataReload(e){document.location=verifyURL(netdataURL(e,!0)),location.reload()}null!==urlOptions.theme?(setTheme(urlOptions.theme),netdataTheme=urlOptions.theme,window.NETDATA.updateTheme()):urlOptions.theme=netdataTheme,null!==urlOptions.help?(saveLocalStorage("options.show_help",urlOptions.help),netdataShowHelp=urlOptions.help):urlOptions.help=loadLocalStorage("options.show_help"),window.gotoHostedModalHandler=function(e){return document.location=verifyURL(e+urlOptions.genHash()),!1};var gotoServerValidateRemaining=0,gotoServerMiddleClick=!1,gotoServerStop=!1;function gotoServerValidateUrl(e,t,a){var n=0,r="failed";document.location.toString().startsWith("http://")&&a.toString().startsWith("https://")?n=500:document.location.toString().startsWith("https://")&&a.toString().startsWith("http://")&&(r="can't check");var o=netdataURL(a);setTimeout((function(){document.getElementById("gotoServerList").innerHTML+='<tr><td style="padding-left: 20px;"><a href="'+verifyURL(o)+'" target="_blank">'+escapeUserInputHTML(a)+'</a></td><td style="padding-left: 30px;"><code id="'+t+"-"+e+'-status">checking...</code></td></tr>',NETDATA.registryHello(a,(function(n){if("undefined"!==typeof n&&null!==n&&"string"===typeof n.machine_guid&&n.machine_guid===t){if(document.getElementById(t+"-"+e+"-status").innerHTML="OK",!gotoServerStop)if(gotoServerStop=!0,gotoServerMiddleClick){window.open(verifyURL(o),"_blank"),gotoServerMiddleClick=!1;var i=getFromRegistry("registryMachines");document.getElementById("gotoServerResponse").innerHTML="<b>Opening new window to "+i[t].name+'<br/><a href="'+verifyURL(o)+'">'+escapeUserInputHTML(a)+"</a></b><br/>(check your pop-up blocker if it fails)"}else document.getElementById("gotoServerResponse").innerHTML+="found it! It is at:<br/><small>"+escapeUserInputHTML(a)+"</small>",document.location=verifyURL(o),$("#gotoServerModal").modal("hide")}else"undefined"!==typeof n&&null!==n&&"string"===typeof n.machine_guid&&n.machine_guid!==t&&(r="wrong machine"),document.getElementById(t+"-"+e+"-status").innerHTML=r,--gotoServerValidateRemaining<=0&&(gotoServerMiddleClick=!1,document.getElementById("gotoServerResponse").innerHTML="<b>Sorry! I cannot find any operational URL for this server</b>")}))}),50*e+n)}window.gotoServerModalHandler=function(e){gotoServerStop=!1;var t={},a=getFromRegistry("registryMachines"),n=a[e].alternateUrls.length,r=0;for(document.getElementById("gotoServerResponse").innerHTML="",document.getElementById("gotoServerList").innerHTML="",document.getElementById("gotoServerName").innerHTML=a[e].name,$("#gotoServerModal").modal("show"),gotoServerValidateRemaining=n;n--;){var o=a[e].alternateUrls[n];t[o]=!0,gotoServerValidateUrl(r++,e,o)}return setTimeout((function(){!1===gotoServerStop&&(document.getElementById("gotoServerResponse").innerHTML="<b>Added all the known URLs for this machine.</b>",NETDATA.registrySearch(e,getFromRegistry,(function(a){for(n=a.urls.length;n--;){var o=a.urls[n][1];"undefined"===typeof t[o]&&(gotoServerValidateRemaining++,t[o]=!0,gotoServerValidateUrl(r++,e,o))}})))}),2e3),!1},window.switchRegistryModalHandler=function(){document.getElementById("switchRegistryPersonGUID").value=getFromRegistry("personGuid"),document.getElementById("switchRegistryURL").innerHTML=getFromRegistry("registryServer"),document.getElementById("switchRegistryResponse").innerHTML="",$("#switchRegistryModal").modal("show")},window.notifyForSwitchRegistry=function(){var e=document.getElementById("switchRegistryPersonGUID").value;""!==e&&36===e.length?$.ajax({url:getFromRegistry("registryServer")+"/api/v1/registry?action=switch&machine="+getFromRegistry("machineGuid")+"&name="+encodeURIComponent(getFromRegistry("hostname"))+"&url="+encodeURIComponent(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b)+"&to="+e,async:!0,cache:!1,headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},xhrFields:{withCredentials:!0}}).done((function(e){"string"===typeof(e=NETDATA.xss.checkAlways("/api/v1/registry?action=switch",e)).status&&"ok"===e.status||(console.warn("Netdata registry server send invalid response to SWITCH",e),e=null),$("#switchRegistryModal").modal("hide")})).fail((function(){console.warn("Netdata registry SWITCH failed"),document.getElementById("switchRegistryResponse").innerHTML="<b>Sorry! The registry rejected your request.</b>"})):document.getElementById("switchRegistryResponse").innerHTML="<b>The ID you have entered is not a GUID.</b>"};var deleteRegistryGuid=null,deleteRegistryUrl=null;window.deleteRegistryModalHandler=function(e,t,a){deleteRegistryGuid=e,deleteRegistryUrl=a,document.getElementById("deleteRegistryServerName").innerHTML=t,document.getElementById("deleteRegistryServerName2").innerHTML=t,document.getElementById("deleteRegistryServerURL").innerHTML=a,document.getElementById("deleteRegistryResponse").innerHTML="",$("#deleteRegistryModal").modal("show")},window.notifyForDeleteRegistry=function(){var e=document.getElementById("deleteRegistryResponse");deleteRegistryUrl&&NETDATA.registryDelete(getFromRegistry,_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,deleteRegistryUrl,(function(t){null!==t?(deleteRegistryUrl=null,$("#deleteRegistryModal").modal("hide"),reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.m)())):e.innerHTML="<b>Sorry, this command was rejected by the registry server!</b>"}))};var options={menus:{},submenu_names:{},data:null,hostname:"netdata_server",version:"unknown",release_channel:"unknown",hosts:[],duration:0,update_every:1,chartsPerRow:0,chartsHeight:180};function chartsPerRow(e){return 0===options.chartsPerRow?1:options.chartsPerRow}function prioritySort(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:naturalSortCompare(e.name,t.name)}function sortObjectByPriority(e){var t={},a=[];for(var n in e)e.hasOwnProperty(n)&&"undefined"===typeof t[n]&&(t[n]=e[n],a.push(n));return a.sort((function(e,a){return t[e].priority<t[a].priority?-1:t[e].priority>t[a].priority?1:naturalSortCompare(e,a)})),a}window.scrollToId=function(e){if(e&&""!==e&&null!==document.getElementById(e)){var t=$("#"+e).offset();"undefined"!==typeof t&&$("html, body").animate({scrollTop:t.top-30},0)}return!1},window.customDashboard={menu:{},submenu:{},context:{}};var netdataDashboard={sparklines_registry:{},os:"unknown",menu:{},submenu:{},context:{},sparkline:function(e,t,a,n,r){if(null===options.data||"undefined"===typeof options.data.charts)return"";if("undefined"===typeof options.data.charts[t])return"";if("undefined"===typeof options.data.charts[t].dimensions)return"";if("undefined"===typeof options.data.charts[t].dimensions[a])return"";var o=t+"."+a;return"undefined"===typeof n&&(n=""),"undefined"===typeof this.sparklines_registry[o]?this.sparklines_registry[o]={count:1}:this.sparklines_registry[o].count++,e+'<div class="netdata-container" data-netdata="'+t+'" data-width="25%" data-height="15px" data-chart-library="dygraph" data-dygraph-theme="sparkline" data-dimensions="'+a+'" data-show-value-of-'+a+'-at="'+(o=o+"."+this.sparklines_registry[o].count)+'"></div> (<span id="'+o+'" style="display: inline-block; min-width: 50px; text-align: right;">X</span>'+n+")"+r},gaugeChart:function(e,t,a,n){return"undefined"===typeof n&&(n=""),"undefined"===typeof a&&(a=""),'<div class="netdata-container" data-netdata="CHART_UNIQUE_ID" data-dimensions="'+a+'" data-chart-library="gauge" data-gauge-adjust="width" data-title="'+e+'" data-width="'+t+'" data-points="CHART_DURATION" data-colors="'+n+'" role="application"></div>'},anyAttribute:function(e,t,a,n){if("undefined"!==typeof e[a]){var r=e[a][t];return"undefined"===typeof r?n:"function"===typeof r?r(netdataDashboard.os):r}return n},menuTitle:function(e){return"undefined"!==typeof e.menu_pattern?(this.anyAttribute(this.menu,"title",e.menu_pattern,e.menu_pattern).toString()+" "+e.type.slice(-(e.type.length-e.menu_pattern.length-1)).toString()).replace(/_/g," "):this.anyAttribute(this.menu,"title",e.menu,e.menu).toString().replace(/_/g," ")},menuIcon:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"icon",e.menu_pattern,'<i class="fas fa-puzzle-piece"></i>').toString():this.anyAttribute(this.menu,"icon",e.menu,'<i class="fas fa-puzzle-piece"></i>')},menuInfo:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"info",e.menu_pattern,null):this.anyAttribute(this.menu,"info",e.menu,null)},menuHeight:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"height",e.menu_pattern,1):this.anyAttribute(this.menu,"height",e.menu,1)},submenuTitle:function(e,t){var a=e+"."+t,n=this.anyAttribute(this.submenu,"title",a,t).toString().replace(/_/g," ");return n.length>28?n.substring(0,13)+"..."+n.substring(n.length-12,n.length):n},submenuInfo:function(e,t){var a=e+"."+t;return this.anyAttribute(this.submenu,"info",a,null)},submenuHeight:function(e,t,a){var n=e+"."+t;return this.anyAttribute(this.submenu,"height",n,1)*a},contextInfo:function(e){var t=this.anyAttribute(this.context,"info",e,null);return null!==t?'<div class="shorten dashboard-context-info netdata-chart-alignment" role="document">'+t+"</div>":""},contextValueRange:function(e){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].valueRange?this.context[e].valueRange:"[null, null]"},contextHeight:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].height?t*this.context[e].height:t},contextDecimalDigits:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].decimalDigits?this.context[e].decimalDigits:t}};function enrichChartData(e){var t=e.type.split("_"),a=t[0];switch(a){case"ap":case"net":case"disk":case"powersupply":e.menu=a;break;case"apache":e.menu=e.type,t.length>2&&"cache"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"bind":e.menu=e.type,t.length>2&&"rndc"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"cgroup":e.menu=e.type,e.id.match(/.*[\._\/-:]qemu[\._\/-:]*/)||e.id.match(/.*[\._\/-:]kvm[\._\/-:]*/)?e.menu_pattern="cgqemu":e.menu_pattern="cgroup";break;case"go":e.menu=e.type,t.length>2&&"expvar"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"mount":t.length>2?e.menu=a+"_"+t[1]:e.menu=a;break;case"isc":e.menu=e.type,t.length>2&&"dhcpd"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"ovpn":e.menu=e.type,t.length>3&&"status"===t[1]&&"log"===t[2]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"smartd":case"web":e.menu=e.type,t.length>2&&"log"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"anomaly":t.length>=2&&t[1].startsWith("detection")&&(e.menu=a+"_detection");break;case"tc":if(e.menu=a,"tc.qos"===e.context&&("undefined"===typeof options.submenu_names[e.family]||options.submenu_names[e.family]===e.family)){var n=e.name.split(".")[1];n.endsWith("_in")?options.submenu_names[e.family]=n.slice(0,n.lastIndexOf("_in")):n.endsWith("_out")?options.submenu_names[e.family]=n.slice(0,n.lastIndexOf("_out")):n.startsWith("in_")?options.submenu_names[e.family]=n.slice(3,n.length):n.startsWith("out_")?options.submenu_names[e.family]=n.slice(4,n.length):options.submenu_names[e.family]=n}e.id.match(/.*-ifb$/)&&e.priority--;break;default:e.menu=e.type,t.length>1&&(e.menu_pattern=a)}e.submenu=e.family}function headMain(e,t,a){if("print"===urlOptions.mode)return"";var n="";return"undefined"!==typeof t["system.swap"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.swap" data-dimensions="used" data-append-options="percentage" data-chart-library="easypiechart" data-title="Used Swap" data-units="%" data-easypiechart-max-value="100" data-width="9%" data-points="'+a.toString()+'" data-colors="#DD4400" role="application"></div>'),"undefined"!==typeof t["system.io"]?(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.io" data-dimensions="in" data-chart-library="easypiechart" data-title="Disk Read" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.io.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.io" data-dimensions="out" data-chart-library="easypiechart" data-title="Disk Write" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.io.mainhead" role="application"></div>'):"undefined"!==typeof t["system.pgpgio"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.pgpgio" data-dimensions="in" data-chart-library="easypiechart" data-title="Disk Read" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.pgpgio.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.pgpgio" data-dimensions="out" data-chart-library="easypiechart" data-title="Disk Write" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.pgpgio.mainhead" role="application"></div>'),"undefined"!==typeof t["system.cpu"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.cpu" data-chart-library="gauge" data-title="CPU" data-units="%" data-gauge-max-value="100" data-width="20%" data-points="'+a.toString()+'" data-colors="'+NETDATA.colors[12]+'" role="application"></div>'),"undefined"!==typeof t["system.net"]?(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.net" data-dimensions="received" data-chart-library="easypiechart" data-title="Net Inbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.net.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.net" data-dimensions="sent" data-chart-library="easypiechart" data-title="Net Outbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.net.mainhead" role="application"></div>'):"undefined"!==typeof t["system.ip"]?(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ip" data-dimensions="received" data-chart-library="easypiechart" data-title="IP Inbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ip.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ip" data-dimensions="sent" data-chart-library="easypiechart" data-title="IP Outbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ip.mainhead" role="application"></div>'):"undefined"!==typeof t["system.ipv4"]?(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ipv4" data-dimensions="received" data-chart-library="easypiechart" data-title="IPv4 Inbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ipv4.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ipv4" data-dimensions="sent" data-chart-library="easypiechart" data-title="IPv4 Outbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ipv4.mainhead" role="application"></div>'):"undefined"!==typeof t["system.ipv6"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ipv6" data-dimensions="received" data-chart-library="easypiechart" data-title="IPv6 Inbound" data-units="kbps" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ipv6.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ipv6" data-dimensions="sent" data-chart-library="easypiechart" data-title="IPv6 Outbound" data-units="kbps" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ipv6.mainhead" role="application"></div>'),"undefined"!==typeof t["system.ram"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ram" data-dimensions="used|buffers|active|wired" data-append-options="percentage" data-chart-library="easypiechart" data-title="Used RAM" data-units="%" data-easypiechart-max-value="100" data-width="9%" data-points="'+a.toString()+'" data-colors="'+NETDATA.colors[7]+'" role="application"></div>'),n}function generateHeadCharts(e,t,a){if("print"===urlOptions.mode)return"";var n="",r=netdataDashboard.anyAttribute(netdataDashboard.context,e,t.context,[]);if(r.length>0)for(var o=0,i=r.length;o<i;)"function"===typeof r[o]?n+=r[o](netdataDashboard.os,t.id).replace(/CHART_DURATION/g,a.toString()).replace(/CHART_UNIQUE_ID/g,t.id):n+=r[o].replace(/CHART_DURATION/g,a.toString()).replace(/CHART_UNIQUE_ID/g,t.id),o++;return n}function renderPage(e,t){var a=document.getElementById("charts_div"),n=Math.floor(100/chartsPerRow($(a).width())),r=60*Math.round($(a).width()*n/100*t.update_every/3/60);options.duration=r,options.update_every=t.update_every;for(var o,i,s,l="",c='<ul class="nav dashboard-sidenav" data-spy="affix" id="sidebar_ul">',u=headMain(netdataDashboard.os,t.charts,r),d=sortObjectByPriority(e),h=0,p=d.length,f="bottom"===_domains_chart_utils_transformDataAttributes__WEBPACK_IMPORTED_MODULE_16__.a.legendPosition,g=f?_domains_chart_utils_legend_utils__WEBPACK_IMPORTED_MODULE_15__.a:0;h<p;){var m=d[h++],b=NETDATA.name2id("menu_"+m);c+='<li class=""><a href="#'+b+'" onClick="return scrollToId(\''+b+"');\">"+e[m].icon+" "+e[m].title+'</a><ul class="nav">',l+='<div role="section" class="dashboard-section"><div role="sectionhead"><h1 id="'+b+'" role="heading">'+e[m].icon+" "+e[m].title+'</h1></div><div role="section" class="dashboard-subsection">',null!==e[m].info&&(l+=e[m].info);var v="",_='<div class="netdata-chart-row">'+u;u="";for(var y=sortObjectByPriority(e[m].submenus),O=0,x=y.length;O<x;){var w=y[O++],E=NETDATA.name2id("menu_"+m+"_submenu_"+w);c+='<li class><a href="#'+E+'" onClick="return scrollToId(\''+E+"');\">"+e[m].submenus[w].title+"</a></li>",v+='<div role="section" class="dashboard-section-container" id="'+E+'"><h2 id="'+E+'" class="netdata-chart-alignment" role="heading">'+e[m].submenus[w].title+"</h2>",null!==e[m].submenus[w].info&&(v+='<div class="dashboard-submenu-info netdata-chart-alignment" role="document">'+e[m].submenus[w].info+"</div>");var S='<div class="netdata-chart-row">',C="";e[m].submenus[w].charts.sort(prioritySort);for(var A=0,k=e[m].submenus[w].charts.length;A<k;){var j=e[m].submenus[w].charts[A++];_+=generateHeadCharts("mainheads",j,r),S+=generateHeadCharts("heads",j,r),"print"===urlOptions.mode&&(C+='<div role="row" class="dashboard-print-row">');var T=netdataDashboard.contextHeight(j.context,options.chartsHeight)+g;C+='<div class="netdata-chartblock-container" style="width: '+n.toString()+'%;">'+netdataDashboard.contextInfo(j.context)+'<div class="netdata-container" id="chart_'+NETDATA.name2id(j.id)+'" data-netdata="'+j.id+'" data-width="100%" data-height="'+T.toString()+'px" data-dygraph-valuerange="'+netdataDashboard.contextValueRange(j.context)+'" data-id="'+NETDATA.name2id(options.hostname+"/"+j.id)+'" data-colors="'+netdataDashboard.anyAttribute(netdataDashboard.context,"colors",j.context,"")+'" data-decimal-digits="'+netdataDashboard.contextDecimalDigits(j.context,-1)+'"'+(f?' data-legend-position="bottom"':"")+(o=j.family,i=j.context,s=j.units,"undefined"!==typeof netdataDashboard.anyAttribute(netdataDashboard.context,"commonMin",i,void 0)?' data-common-min="'+o+"/"+i+"/"+s+'"':"")+function(e,t,a){return"undefined"!==typeof netdataDashboard.anyAttribute(netdataDashboard.context,"commonMax",t,void 0)?' data-common-max="'+e+"/"+t+"/"+a+'"':""}(j.family,j.context,j.units)+' role="application"></div></div>',"print"===urlOptions.mode&&(C+="</div>")}v+=(S+="</div>")+C+"</div>"}c+="</ul></li>",l+=(_+="</div>")+v+'</div></div><hr role="separator"/>'}var D="dbengine"===t.memory_mode;c+='<li class="" style="padding-top:15px;"><a href="https://learn.netdata.cloud/docs/agent/collectors/quickstart/" target="_blank"><i class="fas fa-plus"></i> Add more charts</a></li>',c+='<li class=""><a href="https://learn.netdata.cloud/docs/agent/health/quickstart/" target="_blank"><i class="fas fa-plus"></i> Add more alarms</a></li>',c+='<li class="" style="margin:20px;color:#666;"><small>Every '+(1===t.update_every?"second":t.update_every.toString()+" seconds")+", Netdata collects <strong>"+t.dimensions_count.toLocaleString()+"</strong> metrics on "+t.hostname.toString()+", presents them in <strong>"+t.charts_count.toLocaleString()+"</strong> charts"+(D?"":",")+" and monitors them with <strong>"+t.alarms_count.toLocaleString()+"</strong> alarms.",D||(c+='<br /> <br />Get more history by <a href="https://learn.netdata.cloud/guides/longer-metrics-storage#using-the-round-robin-database" target=_blank>configuring Netdata\'s <strong>history</strong></a> or switching to the <a href="https://learn.netdata.cloud/docs/agent/database/engine" target=_blank>database engine.</a>'),c+="<br/> <br/><strong>netdata</strong><br/>"+t.version.toString()+"</small>",c+="</li>",c+='<li id="sidebar-end-portal-container"></li>',c+="</ul>",a.innerHTML=l,document.getElementById("sidebar").innerHTML=c,!0===urlOptions.highlight&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.r)({after:urlOptions.highlight_after,before:urlOptions.highlight_before})),"print"===urlOptions.mode?printPage():finalizePage()}function renderChartsAndMenu(e){options.menus={},options.submenu_names={};var t,a=options.menus,n=e.charts;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];enrichChartData(o),"undefined"===typeof a[i=o.menu]?a[i]={menu_pattern:o.menu_pattern,priority:o.priority,submenus:{},title:netdataDashboard.menuTitle(o),icon:netdataDashboard.menuIcon(o),info:netdataDashboard.menuInfo(o),height:netdataDashboard.menuHeight(o)*options.chartsHeight}:("undefined"===typeof a[i].menu_pattern&&(a[i].menu_pattern=o.menu_pattern),o.priority<a[i].priority&&(a[i].priority=o.priority)),t="undefined"!==typeof a[i].menu_pattern?a[i].menu_pattern:i,"undefined"===typeof a[i].submenus[o.submenu]?a[i].submenus[o.submenu]={priority:o.priority,charts:[],title:null,info:netdataDashboard.submenuInfo(t,o.submenu),height:netdataDashboard.submenuHeight(t,o.submenu,a[i].height)}:o.priority<a[i].submenus[o.submenu].priority&&(a[i].submenus[o.submenu].priority=o.priority),a[i].submenus[o.submenu].charts.push(o)}for(var i in a)if(a.hasOwnProperty(i))for(var s in a[i].submenus)a[i].submenus.hasOwnProperty(s)&&("undefined"!==typeof options.submenu_names[s]?a[i].submenus[s].title=s+" ("+options.submenu_names[s]+")":(t="undefined"!==typeof a[i].menu_pattern?a[i].menu_pattern:i,a[i].submenus[s].title=netdataDashboard.submenuTitle(t,s)));renderPage(a,e)}window.netdataDashboard=netdataDashboard;var handleLoadJs=function(e,t,a){return e.catch((function(e){console.warn("error",e),alert("Cannot load required JS library: ".concat(t))})).then((function(){a()}))};function loadClipboard(e){handleLoadJs(__webpack_require__.e(8).then(__webpack_require__.bind(null,504)).then((function(e){window.clipboard=e})),"clipboard-polyfill",e)}function loadBootstrapTable(e){handleLoadJs(Promise.all([__webpack_require__.e(6).then(__webpack_require__.t.bind(null,505,7)).then((function(){return __webpack_require__.e(7).then(__webpack_require__.t.bind(null,506,7))})),__webpack_require__.e(10).then(__webpack_require__.t.bind(null,507,7))]),"bootstrap-table",e)}function loadBootstrapSlider(e){handleLoadJs(Promise.all([__webpack_require__.e(5).then(__webpack_require__.t.bind(null,508,7)).then((function(e){var t=e.default;window.Slider=t})),__webpack_require__.e(4).then(__webpack_require__.t.bind(null,509,7))]),"bootstrap-slider",e)}function loadLzString(e){handleLoadJs(__webpack_require__.e(9).then(__webpack_require__.t.bind(null,510,7)),"lz-string",e)}function loadPako(e){handleLoadJs(__webpack_require__.e(3).then(__webpack_require__.t.bind(null,511,7)).then((function(e){var t=e.default;window.pako=t})),"pako",e)}function alarmsUpdateModal(){var e='<h3>Raised Alarms</h3><table class="table">',t='<h3>All Running Alarms</h3><div class="panel-group" id="alarms_all_accordion" role="tablist" aria-multiselectable="true">',a='<hr/><a href="https://github.com/netdata/netdata/tree/master/web/api/badges#netdata-badges" target="_blank">netdata badges</a> refresh automatically. Their color indicates the state of the alarm: <span style="color: #e05d44"><b> red </b></span> is critical, <span style="color:#fe7d37"><b> orange </b></span> is warning, <span style="color: #4c1"><b> bright green </b></span> is ok, <span style="color: #9f9f9f"><b> light grey </b></span> is undefined (i.e. no data or no status), <span style="color: #000"><b> black </b></span> is not initialized. You can copy and paste their URLs to embed them in any web page.<br/>netdata can send notifications for these alarms. Check <a href="https://github.com/netdata/netdata/blob/master/health/notifications/health_alarm_notify.conf" target="_blank">this configuration file</a> for more information.';loadClipboard((function(){}));reduxStore.dispatch(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.e.request({callback:function(n){if(options.alarm_families=[],null!==n){var r,o,i,s=0,l=0,c={},u=[];for(r in n.alarms)if(n.alarms.hasOwnProperty(r)){o=(i=n.alarms[r]).family;var d=options.data.charts[i.chart];"undefined"===typeof d&&(d=options.data.charts_by_name[i.chart]),"undefined"===typeof d?(console.log("WARNING: alarm "+r+" is linked to chart "+i.chart+", which is not found in the list of chart got from the server."),d={priority:9999999}):"undefined"!==typeof d.menu&&"undefined"!==typeof d.submenu&&(o=d.menu+" - "+d.submenu),"undefined"===typeof c[o]&&(c[o]={name:o,arr:[],priority:d.priority},u.push(c[o])),d.priority<c[o].priority&&(c[o].priority=d.priority),c[o].arr.unshift(i)}for(var h=u.sort((function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:naturalSortCompare(e.name,t.name)})),p=0,f=0,g=h.length;g--;){o=h[p++].name;var m=!1;0!==f&&(t+="</table></div></div></div>"),t+='<div class="panel panel-default"><div class="panel-heading" role="tab" id="alarm_all_heading_'+f.toString()+'"><h4 class="panel-title"><a class="collapsed" role="button" data-toggle="collapse" data-parent="#alarms_all_accordion" href="#alarm_all_'+f.toString()+'" aria-expanded="false" aria-controls="alarm_all_'+f.toString()+'">'+o.toString()+'</a></h4></div><div id="alarm_all_'+f.toString()+'" class="panel-collapse collapse " role="tabpanel" aria-labelledby="alarm_all_heading_'+f.toString()+'" data-alarm-id="'+f.toString()+'"><div class="panel-body" id="alarm_all_body_'+f.toString()+'">',options.alarm_families[f]=c[o],f++;for(var b=c[o].arr,v=b.length;v--;)"WARNING"!==(i=b[v]).status&&"CRITICAL"!==i.status||(m||(m=!0,e+='<tr><th class="text-center" colspan="2"><h4>'+o+"</h4></th></tr>"),s++,e+=x(i,!0)),l++}e+="</table>",h.length>0&&(t+="</div></div></div>"),t+="</div>",e+=s?a:'<div style="width:100%; height: 100px; text-align: center;"><span style="font-size: 50px;"><i class="fas fa-thumbs-up"></i></span><br/>Everything is normal. No raised alarms.</div>',t+=l?a:"<h4>No alarms are running in this system.</h4>",document.getElementById("alarms_active").innerHTML=e,document.getElementById("alarms_all").innerHTML=t,enableTooltipsAndPopovers(),h.length>0&&w(0);var _=$("#alarms_all_accordion");_.on("show.bs.collapse",(function(e){var t=$(e.target);w($(t).data("alarm-id"))})),_.on("hidden.bs.collapse",(function(e){var t=$(e.target),a=$(t).data("alarm-id");$("#alarm_all_"+a.toString()).html("")})),document.getElementById("alarms_log").innerHTML='<h3>Alarm Log</h3><table id="alarms_log_table"></table>',loadBootstrapTable((function(){$("#alarms_log_table").bootstrapTable({url:"".concat(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,"/api/v1/alarm_log?all"),cache:!1,pagination:!0,pageSize:10,showPaginationSwitch:!1,search:!0,searchTimeOut:300,searchAlign:"left",showColumns:!0,showExport:!0,exportDataType:"all",exportOptions:{fileName:"netdata_alarm_log"},onClickRow:function(e){return scrollToChartAfterHidingModal(e.chart,1e3*e.when,e.status),$("#alarmsModal").modal("hide"),!1},rowStyle:function(e){switch(e.status){case"CRITICAL":return{classes:"danger"};case"WARNING":return{classes:"warning"};case"UNDEFINED":return{classes:"info"};case"CLEAR":return{classes:"success"}}return{}},showFooter:!1,showHeader:!0,showRefresh:!0,showToggle:!1,sortable:!0,silentSort:!1,columns:[{field:"when",title:"Event Date",valign:"middle",titleTooltip:"The date and time the even took place",formatter:function(e,t,a){return O(e," ")},align:"center",switchable:!1,sortable:!0},{field:"hostname",title:"Host",valign:"middle",titleTooltip:"The host that generated this event",align:"center",visible:!1,sortable:!0},{field:"unique_id",title:"Unique ID",titleTooltip:"The host unique ID for this event",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"alarm_id",title:"Alarm ID",titleTooltip:"The ID of the alarm that generated this event",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"alarm_event_id",title:"Alarm Event ID",titleTooltip:"The incremental ID of this event for the given alarm",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"chart",title:"Chart",titleTooltip:"The chart the alarm is attached to",align:"center",valign:"middle",switchable:!1,sortable:!0},{field:"family",title:"Family",titleTooltip:"The family of the chart the alarm is attached to",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"name",title:"Alarm",titleTooltip:"The alarm name that generated this event",formatter:function(e,t,a){return e.toString().replace(/_/g," ")},align:"center",valign:"middle",switchable:!1,sortable:!0},{field:"value_string",title:"Friendly Value",titleTooltip:"The value of the alarm, that triggered this event",align:"right",valign:"middle",sortable:!0},{field:"old_value_string",title:"Friendly Old Value",titleTooltip:"The value of the alarm, just before this event",align:"right",valign:"middle",visible:!1,sortable:!0},{field:"old_value",title:"Old Value",titleTooltip:"The value of the alarm, just before this event",formatter:function(e,t,a){return(null!==e?Math.round(100*e)/100:"NaN").toString()},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"value",title:"Value",titleTooltip:"The value of the alarm, that triggered this event",formatter:function(e,t,a){return(null!==e?Math.round(100*e)/100:"NaN").toString()},align:"right",valign:"middle",visible:!1,sortable:!0},{field:"units",title:"Units",titleTooltip:"The units of the value of the alarm",align:"left",valign:"middle",visible:!1,sortable:!0},{field:"old_status",title:"Old Status",titleTooltip:"The status of the alarm, just before this event",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"status",title:"Status",titleTooltip:"The status of the alarm, that was set due to this event",align:"center",valign:"middle",switchable:!1,sortable:!0},{field:"duration",title:"Last Duration",titleTooltip:"The duration the alarm was at its previous state, just before this event",formatter:function(e,t,a){return Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e,{negative_suffix:"",space:" ",now:"no time"})},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"non_clear_duration",title:"Raised Duration",titleTooltip:"The duration the alarm was raised, just before this event",formatter:function(e,t,a){return Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e,{negative_suffix:"",space:" ",now:"no time"})},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"recipient",title:"Recipient",titleTooltip:"The recipient of this event",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"processed",title:"Processed Status",titleTooltip:"True when this event is processed",formatter:function(e,t,a){return!0===e?"DONE":"PENDING"},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"updated",title:"Updated Status",titleTooltip:"True when this event has been updated by another event",formatter:function(e,t,a){return!0===e?"UPDATED":"CURRENT"},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"updated_by_id",title:"Updated By ID",titleTooltip:"The unique ID of the event that obsoleted this one",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"updates_id",title:"Updates ID",titleTooltip:"The unique ID of the event obsoleted because of this event",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"exec",title:"Script",titleTooltip:"The script to handle the event notification",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"exec_run",title:"Script Run At",titleTooltip:"The date and time the script has been ran",formatter:function(e,t,a){return O(e," ")},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"exec_code",title:"Script Return Value",titleTooltip:"The return code of the script",formatter:function(e,t,a){return 0===e?"OK (returned 0)":"FAILED (with code "+e.toString()+")"},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"delay",title:"Script Delay",titleTooltip:"The hysteresis of the notification",formatter:function(e,t,a){return Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e,{negative_suffix:"",space:" ",now:"no time"})},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"delay_up_to_timestamp",title:"Script Delay Run At",titleTooltip:"The date and time the script should be run, after hysteresis",formatter:function(e,t,a){return O(e," ")},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"info",title:"Description",titleTooltip:"A short description of the alarm",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"source",title:"Alarm Source",titleTooltip:"The source of configuration of the alarm",align:"center",valign:"middle",visible:!1,sortable:!0}]})}))}else document.getElementById("alarms_active").innerHTML=document.getElementById("alarms_all").innerHTML=document.getElementById("alarms_log").innerHTML="failed to load alarm data!";function y(e){return 0===e?"-":e.toString()}function O(e,t){if(0===e)return"-";"undefined"===typeof t&&(t=" ");var a=new Date(1e3*e);return a.toLocaleDateString()+t+a.toLocaleTimeString()}function x(e,t){var a=options.data.charts[e.chart];if("undefined"===typeof a&&"undefined"===typeof(a=options.data.charts_by_name[e.chart]))return console.log("Cannot find chart "+e.chart+", you probably need to refresh the page."),"";var n="undefined"!==typeof e.warn||"undefined"!==typeof e.crit,r="".concat(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,"/api/v1/badge.svg?chart=").concat(e.chart,"&alarm=").concat(e.name,"&refresh=auto"),o="<br/> <br/>role: <b>"+e.recipient+'</b><br/> <br/><div class="action-button ripple" title="click to scroll the dashboard to the chart of this alarm" data-toggle="tooltip" data-placement="bottom" onClick="scrollToChartAfterHidingModal(\''+e.chart+"', "+1e3*e.last_status_change+", '"+e.status+'\'); $(\'#alarmsModal\').modal(\'hide\'); return false;"><i class="fab fa-periscope"></i></div><div class="action-button ripple" title="click to copy to the clipboard the URL of this badge" data-toggle="tooltip" data-placement="bottom" onClick="clipboardCopy(\''+r+'\'); return false;"><i class="far fa-copy"></i></div><div class="action-button ripple" title="click to copy to the clipboard an auto-refreshing <code>embed</code> html element for this badge" data-toggle="tooltip" data-placement="bottom" onClick="clipboardCopyBadgeEmbed(\''+r+'\'); return false;"><i class="fas fa-copy"></i></div>',i='<tr><td class="text-center" style="vertical-align: middle; word-break: break-word;" width="40%"><b>'+e.chart+'</b><br/> <br/><embed src="'+r+'" type="image/svg+xml" height="20"/><br/> <br/><span style="font-size: 18px;">'+e.info+"</span>"+o+'</td><td><table class="table">'+("undefined"!==typeof e.warn?'<tr><td width="10%" style="text-align:right">warning when</td><td><span style="font-family: monospace; color:#fe7d37; font-weight: bold;">'+e.warn+"</span></td></tr>":"")+("undefined"!==typeof e.crit?'<tr><td width="10%" style="text-align:right">critical when</td><td><span style="font-family: monospace; color: #e05d44; font-weight: bold;">'+e.crit+"</span></td></tr>":"");if(!0===t){var s=a.units;"%"===s&&(s="%"),i+=("undefined"!==typeof e.lookup_after?'<tr><td width="10%" style="text-align:right">db lookup</td><td>'+function(e,t){var a=" of all values ";return t.dimensions.length>1&&(a=" of the sum of all dimensions "),"undefined"!==typeof e.lookup_dimensions&&(a=e.lookup_dimensions.replace(/|/g,",").split(",").length>1?"of the sum of dimensions <code>"+e.lookup_dimensions+"</code> ":"of all values of dimension <code>"+e.lookup_dimensions+"</code> "),"<code>"+e.lookup_method+"</code> "+a+", of chart <code>"+e.chart+"</code>, starting <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.lookup_after+e.lookup_before,{space:" "})+"</code> and up to <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.lookup_before,{space:" "})+"</code>"+(e.lookup_options?", with options <code>"+e.lookup_options.replace(/ /g,", ")+"</code>":"")+"."}(e,a)+"</td></tr>":"")+("undefined"!==typeof e.calc?'<tr><td width="10%" style="text-align:right">calculation</td><td><span style="font-family: monospace;">'+e.calc+"</span></td></tr>":"")+(null!==a.green?'<tr><td width="10%" style="text-align:right">green threshold</td><td><code>'+a.green+" "+s+"</code></td></tr>":"")+(null!==a.red?'<tr><td width="10%" style="text-align:right">red threshold</td><td><code>'+a.red+" "+s+"</code></td></tr>":"")}e.warn_repeat_every>0&&(i+='<tr><td width="10%" style="text-align:right">repeat warning</td><td>'+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.warn_repeat_every)+"</td></tr>"),e.crit_repeat_every>0&&(i+='<tr><td width="10%" style="text-align:right">repeat critical</td><td>'+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.crit_repeat_every)+"</td></tr>");var l="";return(e.delay_up_duration>0||e.delay_down_duration>0)&&0!==e.delay_multiplier&&e.delay_max_duration>0&&(e.delay_up_duration===e.delay_down_duration?l+="<small><br/>hysteresis "+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_up_duration,{space:" ",negative_suffix:""}):(l="<small><br/>hysteresis ",e.delay_up_duration>0&&(l+="on escalation <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_up_duration,{space:" ",negative_suffix:""})+"</code>, "),e.delay_down_duration>0&&(l+="on recovery <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_down_duration,{space:" ",negative_suffix:""})+"</code>, ")),1!==e.delay_multiplier&&(l+="multiplied by <code>"+e.delay_multiplier.toString()+"</code>",l+=", up to <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_max_duration,{space:" ",negative_suffix:""})+"</code>"),l+="</small>"),i+='<tr><td width="10%" style="text-align:right">check every</td><td>'+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.update_every,{space:" ",negative_suffix:""})+"</td></tr>"+(!0===n?'<tr><td width="10%" style="text-align:right">execute</td><td><span style="font-family: monospace;">'+e.exec+"</span>"+l+"</td></tr>":"")+'<tr><td width="10%" style="text-align:right">source</td><td><span style="font-family: monospace; word-break: break-word;">'+e.source+"</span></td></tr></table></td></tr>"}function w(e){for(var t='<table class="table">',a=options.alarm_families[e],n=a.arr.length;n--;){t+=x(a.arr[n],!0)}t+="</table>",$("#alarm_all_"+e.toString()).html(t),enableTooltipsAndPopovers()}},serverDefault:_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b}))}function initializeDynamicDashboardWithData(e){if(null!==e){options.hostname=e.hostname,options.data=e,options.version=e.version,options.release_channel=e.release_channel,options.timezone=e.timezone,netdataDashboard.os=e.os,"undefined"!==typeof e.hosts&&(options.hosts=e.hosts),document.getElementById("netdataVersion").innerHTML=options.version,document.title=options.hostname+" netdata dashboard",e.charts_by_name={};var t,a=e.charts;for(t in a)if(a.hasOwnProperty(t)){var n=a[t];e.charts_by_name[n.name]=n}renderChartsAndMenu(e)}}window.clipboardCopy=function(e){clipboard.writeText(e)},window.clipboardCopyBadgeEmbed=function(e){clipboard.writeText('<embed src="'+e+'" type="image/svg+xml" height="20"/>')};var initializeConfig={url:null,custom_info:!0},loadDashboardInfo=Object(ramda__WEBPACK_IMPORTED_MODULE_0__.a)(ramda__WEBPACK_IMPORTED_MODULE_1__.a,(function(){return $.ajax({url:"".concat(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,"dashboard_info.js"),cache:!0,dataType:"script",xhrFields:{withCredentials:!0}}).fail((function(){alert("Cannot load required JS library: dashboard_info.js")}))}));function loadCustomDashboardInfo(e,t){$.ajax({url:e,cache:!0,dataType:"script",xhrFields:{withCredentials:!0}}).fail((function(){alert("Cannot load required JS library: ".concat(e))})).always((function(){$.extend(!0,netdataDashboard,customDashboard),t()}))}function initializeChartsAndCustomInfo(){loadDashboardInfo().then((function(){NETDATA.chartRegistry.downloadAll(initializeConfig.url,(function(e){null!==e&&(reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.c)({data:e})),!0===initializeConfig.custom_info&&"undefined"!==typeof e.custom_info&&""!==e.custom_info&&null===window.netdataSnapshotData?loadCustomDashboardInfo(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b+e.custom_info,(function(){initializeDynamicDashboardWithData(e)})):initializeDynamicDashboardWithData(e))}))}))}function initializeDynamicDashboard(e){e&&(reduxStore=e,netdataPrepCallback(),initializeConfig.url=_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b),"undefined"!==typeof netdataCheckXSS&&!0===netdataCheckXSS?(document.getElementById("netdataXssModalServer").innerText=initializeConfig.url,$("#xssModal").modal("show")):initializeChartsAndCustomInfo()}function versionLog(e){document.getElementById("versionCheckLog").innerHTML=e}function versionsMatch(e,t){if(e==t)return!0;var a=e.split("."),n=t.split("."),r=parseInt(a[0].substring(1,2),10),o=parseInt(n[0].substring(1,2),10);return!(r<o)&&(r>o||!((r=parseInt(a[1],10))<(o=parseInt(n[1],10)))&&(r>o||(a=a[2].split("-"),n=n[2].split("-"),!((r=parseInt(a[0],10))<(o=parseInt(n[0],10)))&&(r>o||!((r=a.length>1?parseInt(a[1],10):0)<(o=n.length>1?parseInt(n[1],10):0))))))}function getGithubLatestVersion(e){versionLog("Downloading latest version id from github..."),$.ajax({url:"https://api.github.com/repos/netdata/netdata/releases/latest",async:!0,cache:!1}).done((function(t){versionLog("Latest stable version from github is "+(t=t.tag_name.replace(/(\r\n|\n|\r| |\t)/gm,""))),e(t)})).fail((function(){versionLog("Failed to download the latest stable version id from github!"),e(null)}))}function getGCSLatestVersion(e){versionLog("Downloading latest version id from GCS..."),$.ajax({url:"https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt",async:!0,cache:!1}).done((function(t){$.ajax({url:t.mediaLink,async:!0,cache:!1}).done((function(t){versionLog("Latest nightly version from GCS is "+(t=t.replace(/(\r\n|\n|\r| |\t)/gm,""))),e(t)})).fail((function(t,a,n){versionLog("Failed to download the latest nightly version id from GCS!"),e(null)}))})).fail((function(t,a,n){versionLog("Failed to download the latest nightly version from GCS!"),e(null)}))}function checkForUpdateByVersion(e,t){return"stable"===options.release_channel?getGithubLatestVersion((function(e){t(options.version,e)})):getGCSLatestVersion((function(e){t(options.version,e)})),null}function showPageFooter(){document.getElementById("footer").style.display="block"}function printPage(){window.NETDATA.parseDom(),!0===urlOptions.pan_and_zoom&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:urlOptions.after,before:urlOptions.before})),showPageFooter()}function jsonStringifyFn(e){return JSON.stringify(e,(function(e,t){return"function"===typeof t?t.toString():t}))}function jsonParseFn(str){return JSON.parse(str,(function(key,value){return"string"!=typeof value?value:"function"==value.substring(0,8)?eval("("+value+")"):value}))}window.xssModalDisableXss=function(){return NETDATA.xss.enabled=!1,NETDATA.xss.enabled_for_data=!1,initializeConfig.custom_info=!0,initializeChartsAndCustomInfo(),!1},window.xssModalKeepXss=function(){return NETDATA.xss.enabled=!0,NETDATA.xss.enabled_for_data=!0,initializeConfig.custom_info=!1,initializeChartsAndCustomInfo(),!1},window.notifyForUpdate=function(e){versionLog("<p>checking for updates...</p>");var t=Date.now();if("undefined"===typeof e||!0!==e){var a=loadLocalStorage("last_update_check");if(a="string"===typeof a?parseInt(a):0,t-a<288e5)return}checkForUpdateByVersion(e,(function(e,a){var n=!1;if(null===e)n=!1,versionLog('<p><big>Failed to get your netdata version!</big></p><p>You can always get the latest netdata from <a href="https://github.com/netdata/netdata" target="_blank">its github page</a>.</p>');else if(null===a)n=!1,versionLog('<p><big>Failed to get the latest netdata version.</big></p><p>You can always get the latest netdata from <a href="https://github.com/netdata/netdata" target="_blank">its github page</a>.</p>');else if(versionsMatch(e,a))n=!0,versionLog('<p><big>You already have the latest netdata!</big></p><p>No update yet?<br/>We probably need some motivation to keep going on!</p><p>If you haven\'t already, <a href="https://github.com/netdata/netdata" target="_blank">give netdata a <b><i class="fas fa-star"></i></b> at its github page</a>.</p>');else{n=!0;versionLog("<p><big><strong>New version of netdata available!</strong></big></p><p>Latest version: <b><code>"+a+'</code></b></p><p><a href="https://learn.netdata.cloud/docs/agent/changelog/" target="_blank">Click here for the changes log</a> and<br/><a href="https://github.com/netdata/netdata/tree/master/packaging/installer/UPDATE.md" target="_blank">click here for directions on updating</a> your netdata installation.</p><p>We suggest to review the changes log for new features you may be interested, or important bug fixes you may need.<br/>Keeping your netdata updated is generally a good idea.</p>')}n&&saveLocalStorage("last_update_check",t.toString())}))},window.printPreflight=function(){var e=document.location.origin.toString()+document.location.pathname.toString()+document.location.search.toString()+urlOptions.genHash()+";mode=print",t=90*screen.height/100;window.open(e,"","width="+990..toString()+",height="+t.toString()+",menubar=no,toolbar=no,personalbar=no,location=no,resizable=no,scrollbars=yes,status=no,chrome=yes,centerscreen=yes,attention=yes,dialog=yes"),$("#printPreflightModal").modal("hide")};var snapshotOptions={bytes_per_chart:2048,compressionDefault:"pako.deflate.base64",compressions:{none:{bytes_per_point_memory:5.2,bytes_per_point_disk:5.6,compress:function(e){return e},compressed_length:function(e){return e.length},uncompress:function(e){return e}},"pako.deflate.base64":{bytes_per_point_memory:1.8,bytes_per_point_disk:1.9,compress:function(e){return btoa(pako.deflate(e,{to:"string"}))},compressed_length:function(e){return e.length},uncompress:function(e){return pako.inflate(atob(e),{to:"string"})}},"pako.deflate":{bytes_per_point_memory:1.4,bytes_per_point_disk:3.2,compress:function(e){return pako.deflate(e,{to:"string"})},compressed_length:function(e){return e.length},uncompress:function(e){return pako.inflate(e,{to:"string"})}},"lzstring.utf16":{bytes_per_point_memory:1.7,bytes_per_point_disk:2.6,compress:function(e){return LZString.compressToUTF16(e)},compressed_length:function(e){return 2*e.length},uncompress:function(e){return LZString.decompressFromUTF16(e)}},"lzstring.base64":{bytes_per_point_memory:2.1,bytes_per_point_disk:2.3,compress:function(e){return LZString.compressToBase64(e)},compressed_length:function(e){return e.length},uncompress:function(e){return LZString.decompressFromBase64(e)}},"lzstring.uri":{bytes_per_point_memory:2.1,bytes_per_point_disk:2.3,compress:function(e){return LZString.compressToEncodedURIComponent(e)},compressed_length:function(e){return e.length},uncompress:function(e){return LZString.decompressFromEncodedURIComponent(e)}}}};function loadSnapshotModalLog(e,t){document.getElementById("loadSnapshotStatus").className="alert alert-"+e,document.getElementById("loadSnapshotStatus").innerHTML=t}var tmpSnapshotData=null;function loadSnapshotPreflightFile(e){var t=NETDATA.xss.string(e.name),a=new FileReader;a.onload=function(e){document.getElementById("loadSnapshotFilename").innerHTML=t;var a=null;try{a=NETDATA.xss.checkAlways("snapshot",JSON.parse(e.target.result),/^(snapshot\.info|snapshot\.data)$/);var n=new Date(a.after_ms),r=new Date(a.before_ms);"undefined"===typeof a.charts_ok&&(a.charts_ok="unknown"),"undefined"===typeof a.charts_failed&&(a.charts_failed=0),"undefined"===typeof a.compression&&(a.compression="none"),"undefined"===typeof a.data_size&&(a.data_size=0),document.getElementById("loadSnapshotFilename").innerHTML="<code>"+t+"</code>",document.getElementById("loadSnapshotHostname").innerHTML="<b>"+a.hostname+"</b>, netdata version: <b>"+a.netdata_version.toString()+"</b>",document.getElementById("loadSnapshotURL").innerHTML=a.url,document.getElementById("loadSnapshotCharts").innerHTML=a.charts.charts_count.toString()+" charts, "+a.charts.dimensions_count.toString()+" dimensions, "+a.data_points.toString()+" points per dimension, "+Math.round(a.duration_ms/a.data_points).toString()+" ms per point",document.getElementById("loadSnapshotInfo").innerHTML="version: <b>"+a.snapshot_version.toString()+"</b>, includes <b>"+a.charts_ok.toString()+"</b> unique chart data queries "+(a.charts_failed>0?"<b>"+a.charts_failed.toString()+"</b> failed":"").toString()+", compressed with <code>"+a.compression.toString()+"</code>, data size "+(Math.round(100*a.data_size/1024/1024)/100).toString()+" MB",document.getElementById("loadSnapshotTimeRange").innerHTML="<b>"+localeDateString(n)+" "+localeTimeString(n)+"</b> to <b>"+localeDateString(r)+" "+localeTimeString(r)+"</b>",document.getElementById("loadSnapshotComments").innerHTML=(a.comments?a.comments:"").toString(),loadSnapshotModalLog("success","File loaded, click <b>Import</b> to render it!"),$("#loadSnapshotImport").removeClass("disabled"),tmpSnapshotData=a}catch(e){console.log(e),document.getElementById("loadSnapshotStatus").className="alert alert-danger",document.getElementById("loadSnapshotStatus").innerHTML="Failed to parse this file!",$("#loadSnapshotImport").addClass("disabled")}},a.readAsText(e)}function loadSnapshotPreflightEmpty(){document.getElementById("loadSnapshotFilename").innerHTML="",document.getElementById("loadSnapshotHostname").innerHTML="",document.getElementById("loadSnapshotURL").innerHTML="",document.getElementById("loadSnapshotCharts").innerHTML="",document.getElementById("loadSnapshotInfo").innerHTML="",document.getElementById("loadSnapshotTimeRange").innerHTML="",document.getElementById("loadSnapshotComments").innerHTML="",loadSnapshotModalLog("success","Browse for a snapshot file (or drag it and drop it here), then click <b>Import</b> to render it."),$("#loadSnapshotImport").addClass("disabled")}window.loadSnapshot=function(){if($("#loadSnapshotImport").addClass("disabled"),null===tmpSnapshotData)return loadSnapshotPreflightEmpty(),void loadSnapshotModalLog("danger","no data have been loaded");loadPako((function(){loadLzString((function(){if(loadSnapshotModalLog("info","Please wait, activating snapshot..."),$("#loadSnapshotModal").modal("hide"),netdataShowAlarms=!1,netdataRegistry=!1,netdataServer=tmpSnapshotData.server,document.getElementById("charts_div").innerHTML="",document.getElementById("sidebar").innerHTML="","undefined"!==typeof tmpSnapshotData.hash?urlOptions.hash=tmpSnapshotData.hash:urlOptions.hash="#","undefined"!==typeof tmpSnapshotData.info){var e=jsonParseFn(tmpSnapshotData.info);"undefined"!==typeof e.menu&&(netdataDashboard.menu=e.menu),"undefined"!==typeof e.submenu&&(netdataDashboard.submenu=e.submenu),"undefined"!==typeof e.context&&(netdataDashboard.context=e.context)}"string"!==typeof tmpSnapshotData.compression&&(tmpSnapshotData.compression="none"),"undefined"===typeof snapshotOptions.compressions[tmpSnapshotData.compression]&&(alert("unknown compression method: "+tmpSnapshotData.compression),tmpSnapshotData.compression="none"),tmpSnapshotData.uncompress=snapshotOptions.compressions[tmpSnapshotData.compression].uncompress,window.NETDATA.parseDom(),reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.g)({snapshot:tmpSnapshotData})),window.netdataSnapshotData=tmpSnapshotData,urlOptions.after=tmpSnapshotData.after_ms,urlOptions.before=tmpSnapshotData.before_ms,"undefined"!==typeof tmpSnapshotData.highlight_after_ms&&null!==tmpSnapshotData.highlight_after_ms&&tmpSnapshotData.highlight_after_ms>0&&"undefined"!==typeof tmpSnapshotData.highlight_before_ms&&null!==tmpSnapshotData.highlight_before_ms&&tmpSnapshotData.highlight_before_ms>0?(urlOptions.highlight_after=tmpSnapshotData.highlight_after_ms,urlOptions.highlight_before=tmpSnapshotData.highlight_before_ms,urlOptions.highlight=!0):(urlOptions.highlight_after=0,urlOptions.highlight_before=0,urlOptions.highlight=!1),netdataCheckXSS=!1,NETDATA.xss.enabled=!0,NETDATA.xss.enabled_for_data=!0,loadSnapshotPreflightEmpty(),initializeDynamicDashboard()}))}))};var loadSnapshotDragAndDropInitialized=!1;function loadSnapshotDragAndDropSetup(){!1===loadSnapshotDragAndDropInitialized&&(loadSnapshotDragAndDropInitialized=!0,$("#loadSnapshotDragAndDrop").on("drag dragstart dragend dragover dragenter dragleave drop",(function(e){e.preventDefault(),e.stopPropagation()})).on("drop",(function(e){e.originalEvent.dataTransfer.files.length?loadSnapshotPreflightFile(e.originalEvent.dataTransfer.files.item(0)):(loadSnapshotPreflightEmpty(),loadSnapshotModalLog("danger","No file selected"))})))}window.loadSnapshotPreflight=function(){var e=document.getElementById("loadSnapshotSelectFiles").files;if(!e.length)return loadSnapshotPreflightEmpty(),void loadSnapshotModalLog("danger","No file selected");loadSnapshotModalLog("info","Loading file..."),loadSnapshotPreflightFile(e.item(0))};var saveSnapshotStop=!1;function saveSnapshotCancel(){reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.f)()),saveSnapshotStop=!0}var saveSnapshotModalInitialized=!1;function saveSnapshotModalSetup(){!1===saveSnapshotModalInitialized&&(saveSnapshotModalInitialized=!0,$("#saveSnapshotModal").on("hide.bs.modal",saveSnapshotCancel).on("show.bs.modal",saveSnapshotModalInit).on("shown.bs.modal",(function(){$("#saveSnapshotResolutionSlider").find(".slider-handle:first").attr("tabindex",1),document.getElementById("saveSnapshotComments").focus()})))}function saveSnapshotModalLog(e,t){document.getElementById("saveSnapshotStatus").className="alert alert-"+e,document.getElementById("saveSnapshotStatus").innerHTML=t}function saveSnapshotModalShowExpectedSize(){var e=Math.round(saveSnapshotViewDuration/saveSnapshotSelectedSecondsPerPoint),t="info",a="A moderate snapshot.",n=Math.round(10*(options.data.charts_count*snapshotOptions.bytes_per_chart+options.data.dimensions_count*e*snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_disk)/1024/1024)/10,r=Math.round(10*(options.data.charts_count*snapshotOptions.bytes_per_chart+options.data.dimensions_count*e*snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_memory)/1024/1024)/10;n<10&&(t="success",a="A nice small snapshot!"),n>50&&(t="warning",a="Will stress your browser..."),n>100&&(t="danger",a="Hm... good luck..."),saveSnapshotModalLog(t,"The snapshot will have "+e.toString()+" points per dimension. Expected size on disk "+n+" MB, at browser memory "+r+" MB.<br/>"+a)}var saveSnapshotCompression=snapshotOptions.compressionDefault;function saveSnapshotSetCompression(e){saveSnapshotCompression=e,document.getElementById("saveSnapshotCompressionName").innerHTML=saveSnapshotCompression,saveSnapshotModalShowExpectedSize()}var saveSnapshotSlider=null,saveSnapshotSelectedSecondsPerPoint=1,saveSnapshotViewDuration=1,browser_timezone;function saveSnapshotModalInit(){$("#saveSnapshotModalProgressSection").hide(),$("#saveSnapshotResolutionRadio").show(),saveSnapshotModalLog("info","Select resolution and click <b>Save</b>"),$("#saveSnapshotExport").removeClass("disabled"),loadBootstrapSlider((function(){var e=reduxStore.getState();saveSnapshotViewDuration=-Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.i)(e);var t=Math.round(Date.now()-1e3*saveSnapshotViewDuration),a=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.m)(e);Boolean(a)&&(saveSnapshotViewDuration=Math.round((a.before-a.after)/1e3),t=a.after);var n=new Date(t),r=n.getFullYear()+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getMonth()+1)+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getDate())+"-"+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getHours())+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getMinutes())+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getSeconds());document.getElementById("saveSnapshotFilename").value="netdata-"+options.hostname.toString()+"-"+r.toString()+"-"+saveSnapshotViewDuration.toString()+".snapshot",saveSnapshotSetCompression(saveSnapshotCompression);var o=options.update_every,i=Math.round(saveSnapshotViewDuration/100);Boolean(a)&&(i=Math.round(saveSnapshotViewDuration/50));var s=Math.round(saveSnapshotViewDuration/Math.round($(document.getElementById("charts_div")).width()/2));i<10&&(i=10),i<o&&(i=o),s<o&&(s=o),s>i&&(s=i),null!==saveSnapshotSlider&&saveSnapshotSlider.destroy(),saveSnapshotSlider=new Slider("#saveSnapshotResolutionSlider",{ticks:[o,s,i],min:o,max:i,step:options.update_every,value:s,scale:i>100?"logarithmic":"linear",tooltip:"always",formatter:function(e){e<1&&(e=1),e<options.data.update_every&&(e=options.data.update_every),saveSnapshotSelectedSecondsPerPoint=e,saveSnapshotModalShowExpectedSize();var t=" seconds ";return 1===e&&(t=" second "),e+t+"per point"+(e===options.data.update_every?", server default":"").toString()}})}))}window.saveSnapshot=function(){loadPako((function(){loadLzString((function(){saveSnapshotStop=!1,$("#saveSnapshotModalProgressSection").show(),$("#saveSnapshotResolutionRadio").hide(),$("#saveSnapshotExport").addClass("disabled");var e=document.getElementById("saveSnapshotFilename").value;saveSnapshotModalLog("info","Generating snapshot as <code>"+e.toString()+"</code>");var t=document.getElementById("saveSnapshotModalProgressBar"),a=document.getElementById("saveSnapshotModalProgressBarText");options.data.charts_by_name=null;var n=reduxStore.getState(),r=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.i)(n),o={hostname:options.hostname,server:_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,netdata_version:options.data.version,snapshot_version:1,after_ms:Date.now()+1e3*r,before_ms:Date.now(),highlight_after_ms:urlOptions.highlight_after,highlight_before_ms:urlOptions.highlight_before,duration_ms:1e3*options.duration,update_every_ms:1e3*options.update_every,data_points:0,url:(null!==urlOptions.server?urlOptions.server:document.location.origin.toString()+document.location.pathname.toString()+document.location.search.toString()).toString(),comments:document.getElementById("saveSnapshotComments").value.toString(),hash:urlOptions.hash,charts:options.data,info:jsonStringifyFn({menu:netdataDashboard.menu,submenu:netdataDashboard.submenu,context:netdataDashboard.context}),charts_ok:0,charts_failed:0,compression:saveSnapshotCompression,data_size:0,data:{}};"undefined"===typeof snapshotOptions.compressions[o.compression]&&(alert("unknown compression method: "+o.compression),o.compression="none");var i=snapshotOptions.compressions[o.compression].compress,s=snapshotOptions.compressions[o.compression].compressed_length;function l(e){var t=e.data,a=e.chartDataUniqueID;if(null===t)return 0;var n=JSON.stringify(t),r=i(n);return o.data[a]=r,s(r)}var c=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.m)(n),u=!1;c?(o.after_ms=c.after,o.before_ms=c.before):(reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:o.after_ms,before:o.before_ms})),u=!0),o.duration_ms=o.before_ms-o.after_ms,o.data_points=Math.round((o.before_ms-o.after_ms)/(1e3*saveSnapshotSelectedSecondsPerPoint)),saveSnapshotModalLog("info","Generating snapshot with "+o.data_points.toString()+" data points per dimension..."),reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.e)({charts:o.charts,dataPoints:o.data_points})),window.saveSnapshotRestore=function(){$("#saveSnapshotModal").modal("hide"),$(t).css("width","0%").attr("aria-valuenow",0),a.innerText="0%",reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.f)()),reduxStore.dispatch(Object(_domains_chart_actions__WEBPACK_IMPORTED_MODULE_7__.j)()),u&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.j)()),$("#saveSnapshotExport").removeClass("disabled")};var d=0,h=" Resolution: <b>"+saveSnapshotSelectedSecondsPerPoint.toString()+(1===saveSnapshotSelectedSecondsPerPoint?" second ":" seconds ").toString()+"per point</b>.";window.chartUpdated=function(n){var r=n.chart,i=n.chartDataUniqueID,s=n.data;!0===saveSnapshotStop&&(saveSnapshotModalLog("info","Cancelled!"),saveSnapshotRestore());var c=reduxStore.getState(),u=Object(_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__.b)(c),p=Object(_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__.e)(c),f=Object(_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__.d)(c),g=(p+f)/u*100;$(t).css("width",g+"%").attr("aria-valuenow",g),a.innerText=Math.round(g).toString()+"%, "+(r||s.id),d+=l({data:s,chartDataUniqueID:i}),saveSnapshotModalLog(f?"danger":"info","Generated snapshot data size <b>"+(Math.round(100*d/1024/1024)/100).toString()+" MB</b>. "+(f?f.toString()+" charts have failed to be downloaded":"").toString()+h),window.saveData=o,p+f===u&&(o.charts_ok=p,o.charts_failed=f,o.data_size=d,saveObjectToClient(o,e),f>0&&alert("".concat(f," failed to be downloaded")),saveSnapshotRestore(),o=null)}}))}))};try{browser_timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){console.log("failed to detect browser timezone: "+e.toString()),browser_timezone="cannot-detect-it"}var getOption=function(e){var t=reduxStore.getState();return Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.b)(e)(t)};function dashboardSettingsSetup(){var e=function(){var e=function(e){var t=$("#"+e);t.prop("checked")!==getOption(e)&&t.bootstrapToggle(getOption(e)?"on":"off")};e("stop_updates_when_focus_is_lost"),e("eliminate_zero_dimensions"),e("destroy_on_hide"),e("async_on_scroll"),e("parallel_refresher"),e("concurrent_refreshes"),e("sync_selection"),e("legend_right"),$("#"+"netdata_theme_control").bootstrapToggle("slate"===netdataTheme?"on":"off"),e("show_help"),e("pan_and_zoom_data_padding"),e("smooth_plot"),function(e){var t=$("#"+e);t.prop("checked")!==("auto"===getOption("units"))&&t.bootstrapToggle("auto"===getOption("units")?"on":"off"),!0===t.prop("checked")?($("#settingsLocaleTempRow").show(),$("#settingsLocaleTimeRow").show()):($("#settingsLocaleTempRow").hide(),$("#settingsLocaleTimeRow").hide())}("units_conversion"),function(e){var t=$("#"+e);t.prop("checked")!==("celsius"===getOption("temperature"))&&t.bootstrapToggle("celsius"===getOption("temperature")?"on":"off")}("units_temp"),e("seconds_as_time"),!1===getOption("parallel_refresher")?$("#concurrent_refreshes_row").hide():$("#concurrent_refreshes_row").show()};e(),$("#eliminate_zero_dimensions").change((function(){setOption("eliminate_zero_dimensions",$(this).prop("checked"))})),$("#destroy_on_hide").change((function(){setOption("destroy_on_hide",$(this).prop("checked"))})),$("#async_on_scroll").change((function(){setOption("async_on_scroll",$(this).prop("checked"))})),$("#parallel_refresher").change((function(){setOption("parallel_refresher",$(this).prop("checked"))})),$("#concurrent_refreshes").change((function(){setOption("concurrent_refreshes",$(this).prop("checked"))})),$("#sync_selection").change((function(){setOption("sync_selection",$(this).prop("checked")),netdataReload()})),$("#stop_updates_when_focus_is_lost").change((function(){urlOptions.update_always=!$(this).prop("checked"),urlOptions.hashUpdate(),setOption("stop_updates_when_focus_is_lost",!urlOptions.update_always)})),$("#smooth_plot").change((function(){setOption("smooth_plot",$(this).prop("checked"))})),$("#pan_and_zoom_data_padding").change((function(){setOption("pan_and_zoom_data_padding",$(this).prop("checked"))})),$("#seconds_as_time").change((function(){setOption("seconds_as_time",$(this).prop("checked"))})),$("#units_conversion").change((function(){setOption("units",$(this).prop("checked")?"auto":"original"),e()})),$("#units_temp").change((function(){setOption("temperature",$(this).prop("checked")?"celsius":"fahrenheit")})),$("#legend_right").change((function(){setOption("legend_right",$(this).prop("checked")),netdataReload()})),$("#show_help").change((function(){urlOptions.help=$(this).prop("checked"),urlOptions.hashUpdate(),setOption("show_help",urlOptions.help),netdataReload()})),$("#netdata_theme_control").change((function(){urlOptions.theme=$(this).prop("checked")?"slate":"white",urlOptions.hashUpdate(),setTheme(urlOptions.theme)&&netdataReload()}))}var CHART_DIV_ID_PREFIX="chart_",CHART_DIV_OFFSET=-50;function scrollDashboardTo(){if(null!==window.netdataSnapshotData&&"undefined"!==typeof window.netdataSnapshotData.hash)scrollToId(window.netdataSnapshotData.hash.replace("#",""));else if(scrollToId(urlOptions.hash.replace("#","")),null!==urlOptions.chart){var e=document.getElementById("".concat(CHART_DIV_ID_PREFIX).concat(Object(_utils_name_2_id__WEBPACK_IMPORTED_MODULE_10__.a)(urlOptions.chart)));if(e){var t=e.offsetTop+CHART_DIV_OFFSET;document.querySelector("html").scrollTop=t}}}var modalHiddenCallback=null;function enableTooltipsAndPopovers(){$('[data-toggle="tooltip"]').tooltip({animated:"fade",trigger:"hover",html:!0,delay:{show:500,hide:0},container:"body"}),$('[data-toggle="popover"]').popover()}window.scrollToChartAfterHidingModal=function(e,t,a){modalHiddenCallback=function(){if("string"===typeof e){var n=document.getElementById("".concat(CHART_DIV_ID_PREFIX).concat(Object(_utils_name_2_id__WEBPACK_IMPORTED_MODULE_10__.a)(e)));if(n){var r=n.offsetTop+CHART_DIV_OFFSET;document.querySelector("html").scrollTop=r}}if(["WARNING","CRITICAL"].includes(a)){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:t-12e4,before:t+12e4}))}}};var runOnceOnDashboardLastRun=0;function runOnceOnDashboardWithjQuery(){if(0!==runOnceOnDashboardLastRun)return scrollDashboardTo(),$(document.body).scrollspy("refresh"),void $(document.body).scrollspy("process");runOnceOnDashboardLastRun=Date.now();var e=0,t=0,a=!1,n=!1,r=$(window).height()/3;$(".modal").on("show.bs.modal",(function(){0===t&&(e=window.scrollY,$("body").css({overflow:"hidden",position:"fixed",top:-e}),a=!0,null===NETDATA.options.pauseCallback?(NETDATA.pause((function(){})),n=!0):n=!1),t++})).on("hide.bs.modal",(function(){--t<=0&&(t=0,$("body").css({overflow:"",position:"",top:""}),$("html, body").animate({scrollTop:e},0),!0===n&&(NETDATA.unpause(),n=!1),$(document.body).scrollspy("process"))})).on("hidden.bs.modal",(function(){0===t&&(a=!1),"function"===typeof modalHiddenCallback&&modalHiddenCallback(),modalHiddenCallback=null})),$("#sidebar").affix({offset:{top:0,bottom:0}}).on("affixed.bs.affix",(function(){$(this).removeAttr("style")})).on("affix-top.bs.affix",(function(){if(a)return!1})).on("activate.bs.scrollspy",(function(e){if(!1===a){var t=$(e.target).find("a").attr("href");"string"===typeof t&&"#"===t.substring(0,1)&&!1===urlOptions.hash.startsWith(t+"_submenu_")&&(urlOptions.hash=t,urlOptions.hashUpdate())}})),Ps.initialize(document.getElementById("sidebar"),{wheelSpeed:.5,wheelPropagation:!0,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,suppressScrollX:!0,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,theme:"default"}),r>250&&(r=250),r<75&&(r=75),document.body.setAttribute("data-offset",r),scrollDashboardTo(),$(document.body).scrollspy({target:"#sidebar",offset:r}),$("#deleteRegistryModal").on("hidden.bs.modal",(function(){deleteRegistryGuid=null})),$("#updateModal").on("show.bs.modal",(function(){versionLog("checking, please wait...")})).on("shown.bs.modal",(function(){notifyForUpdate(!0)})),$("#alarmsModal").on("shown.bs.modal",(function(){alarmsUpdateModal()})).on("hidden.bs.modal",(function(){document.getElementById("alarms_active").innerHTML=document.getElementById("alarms_all").innerHTML=document.getElementById("alarms_log").innerHTML="loading..."})),dashboardSettingsSetup(),loadSnapshotDragAndDropSetup(),saveSnapshotModalSetup(),showPageFooter(),$.fn.shorten=function(e){var t={showChars:750,minHideChars:10,ellipsesText:"...",moreText:'<i class="fas fa-expand"></i> show more information',lessText:'<i class="fas fa-compress"></i> show less information',onLess:function(){NETDATA.onscroll()},onMore:function(){NETDATA.onscroll()},errMsg:null,force:!1};return e&&$.extend(t,e),!($(this).data("jquery.shorten")&&!t.force)&&($(this).data("jquery.shorten",!0),$(document).off("click",".morelink"),$(document).on({click:function(){var e=$(this);return e.hasClass("less")?(e.removeClass("less"),e.html(t.moreText),e.parent().prev().animate({height:"0%"},0,(function(){e.parent().prev().prev().show()})).hide(0,(function(){t.onLess()}))):(e.addClass("less"),e.html(t.lessText),e.parent().prev().animate({height:"100%"},0,(function(){e.parent().prev().prev().hide()})).show(0,(function(){t.onMore()}))),!1}},".morelink"),this.each((function(){var e=$(this),a=e.html();if(e.text().length>t.showChars+t.minHideChars){var n=a.substr(0,t.showChars);if(n.indexOf("<")>=0){for(var r=!1,o="",i=0,s=[],l=null,c=0,u=0;u<=t.showChars;c++)if("<"!==a[c]||r||(r=!0,"/"===(l=a.substring(c+1,a.indexOf(">",c)))[0]?l!=="/"+s[0]?t.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":s.shift():"br"!==l.toLowerCase()&&s.unshift(l)),r&&">"===a[c]&&(r=!1),r)o+=a.charAt(c);else if(u++,i<=t.showChars)o+=a.charAt(c),i++;else if(s.length>0){for(var d=0;d<s.length;d++)o+="</"+s[d]+">";break}n=$("<div/>").html(o+'<span class="ellip">'+t.ellipsesText+"</span>").html()}else n+=t.ellipsesText;var h='<div class="shortcontent">'+n+'</div><div class="allcontent">'+a+'</div><span><a href="javascript://nop/" class="morelink">'+t.moreText+"</a></span>";e.html(h),e.find(".allcontent").hide(),$(".shortcontent p:last",e).css("margin-bottom",0)}})))}}function finalizePage(){urlOptions.after<0?reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.q)({after:urlOptions.after})):!0===urlOptions.pan_and_zoom&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:urlOptions.after,before:urlOptions.before})),NETDATA.parseDom(),NETDATA.unpause(),runOnceOnDashboardWithjQuery(),$(".shorten").shorten(),enableTooltipsAndPopovers(),_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__.a?(NETDATA.options.current.retries_on_data_failures=60,setTimeout((function(){var e,t,a,n,r,o;e=window,t=document,a="script",n="ga",e.GoogleAnalyticsObject=n,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,r=t.createElement(a),o=t.getElementsByTagName(a)[0],r.async=1,r.src="https://www.google-analytics.com/analytics.js",o.parentNode.insertBefore(r,o),ga("create","UA-64295674-3","auto"),ga("send","pageview","/demosite/"+window.location.host)}),2e3)):notifyForUpdate(),!0===urlOptions.show_alarms&&setTimeout((function(){$("#alarmsModal").modal("show")}),1e3),NETDATA.onresizeCallback=function(){Ps.update(document.getElementById("sidebar"))},NETDATA.onresizeCallback(),null!==window.netdataSnapshotData&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:window.netdataSnapshotData.after_ms,before:window.netdataSnapshotData.before_ms}))}window.resetDashboardOptions=function(){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.l)()),urlOptions.update_always=!1,urlOptions.help=!1,urlOptions.theme="slate",urlOptions.hashUpdate(),netdataReload()};var netdataPrepCallback=function(){_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__.a?document.getElementById("masthead").style.display="block":!0===urlOptions.update_always&&setOption("stop_updates_when_focus_is_lost",!urlOptions.update_always)};window.selected_server_timezone=function(e,t){if(document.getElementById("timezone_error_message").innerHTML="","undefined"===typeof t)setOption("user_set_server_timezone",e),Object(_utils_date_time__WEBPACK_IMPORTED_MODULE_11__.a)(e)?($("#local_timezone").prop("checked")&&$("#local_timezone").bootstrapToggle("off"),setOption("timezone",e)):(setOption("timezone","default"),$("#local_timezone").prop("checked")||$("#local_timezone").bootstrapToggle("on"),document.getElementById("timezone_error_message").innerHTML="Ooops! That timezone was not accepted by your browser. Please open a github issue to help us fix it.",setOption("user_set_server_timezone",options.timezone));else if(!0===t)setOption("timezone","default");else{var a=getOption("user_set_server_timezone");"default"===a&&(setOption("user_set_server_timezone",options.timezone),a=options.timezone),Object(_utils_date_time__WEBPACK_IMPORTED_MODULE_11__.a)(a)?setOption("timezone",a):(setOption("timezone","default"),$("#local_timezone").prop("checked")||$("#local_timezone").bootstrapToggle("on"),document.getElementById("timezone_error_message").innerHTML='Sorry. The timezone "'+e.toString()+'" is not accepted by your browser. Please select one from the list.',setOption("user_set_server_timezone",options.timezone))}var n=getOption("timezone");return document.getElementById("current_timezone").innerText="default"===n?"unset, using browser default":n,!1};var netdataCallback=initializeDynamicDashboard;window.showSignInModal=function(){document.getElementById("sim-registry").innerHTML=getFromRegistry("registryServer"),$("#signInModal").modal("show")},window.explicitlySignIn=function(){$("#signInModal").modal("hide"),reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.a)())}},256:function(e,t){},257:function(e,t,a){"use strict";var n=a(5),r=a(0),o=a.n(r),i=a(132),s=a(3),l=function(e){var t=e.userStatus,a=e.nodeStatus,n=e.date;return Object(r.useMemo)((function(){return function(e){var t=e.nodeStatus,a=e.userStatus;e.date;return{title:"Netdata Cloud connection status",text:{header:function(){return o.a.createElement(s.z,null,"This node is currently"," ",o.a.createElement(s.z,{strong:!0},"LIVE"===t?"Connected":"Not Connected")," to Netdata Cloud")},bullets:"NOT_LIVE"===t?[function(){return o.a.createElement(s.z,null,"To troubleshoot Netdata Cloud connection issues, please follow"," ",o.a.createElement(i.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim#troubleshooting"},"this guide"),".")}]:[],footer:function(){return o.a.createElement(s.z,null,"You are"," ",o.a.createElement(s.z,{strong:!0},"LOGGED_IN"===a?"Logged In":"EXPIRED_LOGIN"===a?"Logged out":"Not signed-up")," ","to Netdata Cloud")}},CTA1:{text:"Take me to Netdata Cloud"}}}({userStatus:t,nodeStatus:a,date:n})}),[t,a,n])},c=a(78),u=function(e){var t=e.title,a=e.text,n=e.CTA1,i=e.closeModal,l=e.onRefresh,u=e.isCTA1Disabled,d=Object(r.useCallback)((function(e){var t=e.link;i(),window.location.href=t}),[i]);return o.a.createElement(s.q,null,o.a.createElement(s.t,{width:180,background:"modalBackground"},o.a.createElement(s.v,null,o.a.createElement(s.k,{margin:[0]},t),o.a.createElement(s.s,{onClose:i})),o.a.createElement(s.r,null,o.a.createElement(s.j,{padding:[0,0,4,0],column:!0,gap:3},a.header({}),a.bullets.length>0&&o.a.createElement(s.j,{column:!0,gap:3},o.a.createElement(s.j,{column:!0,gap:1,as:"ul"},a.bullets.map((function(e,t){return"function"===typeof e?o.a.createElement("li",{key:t}," ",e()):o.a.createElement("li",{key:e},o.a.createElement(s.z,null,e))})))),a.footer())),o.a.createElement(s.u,null,o.a.createElement(s.a,{"data-testid":"cta1",margin:[0,2,0,0],width:{min:40}},o.a.createElement(c.a,{utmParameters:{content:"connection_to_cloud",campaign:"agent_nudge_to_cloud"}},(function(e){var t=e.link;return o.a.createElement(s.b,{"data-ga":"connection-to-cloud::click-ct1::ad",disabled:u,textTransform:"none","data-testid":"cta1-button",onClick:function(){return d({link:t})},width:"100%",label:n.text})}))),o.a.createElement(s.a,{"data-ga":"connection-to-cloud::click-check-now::ad",onClick:l,height:10,className:"btn btn-default","data-testid":"cta2-button",width:{min:40}},o.a.createElement(s.a,{as:s.z,sx:{fontWeight:"500",lineHeight:"25px"}},"Check Now")))))},d=a(27),h=a(124),p=a(9);t.a=function(){var e=Object(d.e)(p.P),t=Object(d.e)(p.u),a=Object(r.useState)(!1),i=Object(n.a)(a,2),c=i[0],f=i[1],g=l({userStatus:(null===e||void 0===e?void 0:e.userStatus)||"UNKNOWN",nodeStatus:(null===e||void 0===e?void 0:e.nodeLiveness)||"NOT_LIVE",date:""});Object(r.useEffect)((function(){document.documentElement.style.overflow=c?"hidden":"auto"}),[c]);var m=Object(r.useCallback)((function(){f(!0)}),[]),b=Object(r.useCallback)((function(){f(!1)}),[]),v=Object(h.b)();return t?o.a.createElement(s.j,{column:!0},o.a.createElement(s.x,{"data-ga":"connection-to-cloud::click-pill::ad","data-testid":"header-connection-to-cloud-button",onClick:m,flavour:"neutral"},"Connection to Cloud"),c&&o.a.createElement(u,Object.assign({},g,{isCTA1Disabled:"LIVE"!==(null===e||void 0===e?void 0:e.nodeLiveness),closeModal:b,onRefresh:v}))):null}},26:function(e,t,a){"use strict";a.d(t,"e",(function(){return n})),a.d(t,"c",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return i})),a.d(t,"d",(function(){return s}));var n="global",r="***",o=5e3,i="CLOUD_BASE_URL_DISABLED",s=["WARNING","ERROR","REMOVED","UNDEFINED","UNINITIALIZED","CLEAR","CRITICAL"]},276:function(e,t,a){var n,r,o;r=[],void 0===(o="function"===typeof(n=function(){var e=0,t={header:{title:{text:"",color:"#333333",fontSize:18,fontWeight:"bold",font:"arial"},subtitle:{text:"",color:"#666666",fontSize:14,fontWeight:"bold",font:"arial"},location:"top-center",titleSubtitlePadding:8},footer:{text:"",color:"#666666",fontSize:14,fontWeight:"bold",font:"arial",location:"left"},size:{canvasHeight:500,canvasWidth:500,pieInnerRadius:"0%",pieOuterRadius:null},data:{sortOrder:"none",ignoreSmallSegments:{enabled:!1,valueType:"percentage",value:null},smallSegmentGrouping:{enabled:!1,value:1,valueType:"percentage",label:"Other",color:"#cccccc"},content:[]},labels:{outer:{format:"label",hideWhenLessThanPercentage:null,pieDistance:30},inner:{format:"percentage",hideWhenLessThanPercentage:null},mainLabel:{color:"#333333",font:"arial",fontWeight:"normal",fontSize:10},percentage:{color:"#dddddd",font:"arial",fontWeight:"bold",fontSize:10,decimalPlaces:0},value:{color:"#cccc44",fontWeight:"bold",font:"arial",fontSize:10},lines:{enabled:!0,style:"curved",color:"segment"},truncation:{enabled:!1,truncateLength:30},formatter:null},effects:{load:{effect:"none",speed:1e3},pullOutSegmentOnClick:{effect:"none",speed:300,size:10},highlightSegmentOnMouseover:!1,highlightLuminosity:-.2},tooltips:{enabled:!1,type:"placeholder",string:"",placeholderParser:null,styles:{fadeInSpeed:250,backgroundColor:"#000000",backgroundOpacity:.5,color:"#efefef",borderRadius:2,font:"arial",fontWeight:"bold",fontSize:10,padding:4}},misc:{colors:{background:null,segments:["#2484c1","#65a620","#7b6888","#a05d56","#961a1a","#d8d23a","#e98125","#d0743c","#635222","#6ada6a","#0c6197","#7d9058","#207f33","#44b9b0","#bca44a","#e4a14b","#a3acb2","#8cc3e9","#69a6f9","#5b388f","#546e91","#8bde95","#d2ab58","#273c71","#98bf6e","#4daa4b","#98abc5","#cc1010","#31383b","#006391","#c2643f","#b0a474","#a5a39c","#a9c2bc","#22af8c","#7fcecf","#987ac6","#3d3b87","#b77b1c","#c9c2b6","#807ece","#8db27c","#be66a2","#9ed3c6","#00644b","#005064","#77979f","#77e079","#9c73ab","#1f79a7"],segmentStroke:"#ffffff"},gradient:{enabled:!1,percentage:95,color:"#000000"},canvasPadding:{top:5,right:5,bottom:5,left:5},pieCenterOffset:{x:0,y:0},cssPrefix:null},callbacks:{onload:null,onMouseoverSegment:null,onMouseoutSegment:null,onClickSegment:null}},a=function(e){var t=e.cssPrefix,a=e.element,r=e.options;if(!window.d3||!window.d3.hasOwnProperty("version"))return console.error("d3pie error: d3 is not available"),!1;if(!(a instanceof HTMLElement||a instanceof SVGElement))return console.error("d3pie error: the first d3pie() param must be a valid DOM element (not jQuery) or a ID string."),!1;if(!/[a-zA-Z][a-zA-Z0-9_-]*$/.test(t))return console.error("d3pie error: invalid options.misc.cssPrefix"),!1;if(!n.isArray(r.data.content))return console.error("d3pie error: invalid config structure: missing data.content property."),!1;if(0===r.data.content.length)return console.error("d3pie error: no data supplied."),!1;for(var o=[],i=0;i<r.data.content.length;i++)"number"!==typeof r.data.content[i].value||isNaN(r.data.content[i].value)?console.log("not valid: ",r.data.content[i]):r.data.content[i].value<=0?console.log("not valid - should have positive value: ",r.data.content[i]):o.push(r.data.content[i]);return e.options.data.content=o,!0},n={addSVGSpace:function(e){var t=e.element,a=e.options.size.canvasWidth,n=e.options.size.canvasHeight,r=e.options.misc.colors.background,o=d3.select(t).append("svg:svg").attr("width",a).attr("height",n);return"transparent"!==r&&o.style("background-color",(function(){return r})),o},shuffleArray:function(e){for(var t,a,n=e.length;0!==n;)a=Math.floor(Math.random()*n),t=e[n-=1],e[n]=e[a],e[a]=t;return e},processObj:function(e,t,a){return"string"===typeof t?n.processObj(e,t.split("."),a):1===t.length&&void 0!==a?(e[t[0]]=a,e[t[0]]):0===t.length?e:n.processObj(e[t[0]],t.slice(1),a)},getDimensions:function(e){"string"===typeof e&&(e=document.getElementById(e));var t=0,a=0;if(e){var n=e.getBBox();t=n.width,a=n.height}else console.log("error: getDimensions() "+id+" not found.");return{w:t,h:a}},rectIntersect:function(e,t){return!(t.x>e.x+e.w||t.x+t.w<e.x||t.y+t.h<e.y||t.y>e.y+e.h)},getColorShade:function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var a="#",n=0;n<3;n++){var r=parseInt(e.substr(2*n,2),16);a+=("00"+(r=Math.round(Math.min(Math.max(0,r+r*t),255)).toString(16))).substr(r.length)}return a},initSegmentColors:function(e){for(var t=e.options.data.content,a=e.options.misc.colors.segments,n=[],r=0;r<t.length;r++)t[r].hasOwnProperty("color")?n.push(t[r].color):n.push(a[r]);return n},applySmallSegmentGrouping:function(e,t){var a;"percentage"===t.valueType&&(a=o.getTotalPieSize(e));for(var n=[],r=[],i=0,s=0;s<e.length;s++)if("percentage"===t.valueType){if(e[s].value/a*100<=t.value){r.push(e[s]),i+=e[s].value;continue}e[s].isGrouped=!1,n.push(e[s])}else{if(e[s].value<=t.value){r.push(e[s]),i+=e[s].value;continue}e[s].isGrouped=!1,n.push(e[s])}return r.length&&n.push({color:t.color,label:t.label,value:i,isGrouped:!0,groupedData:r}),n},showPoint:function(e,t,a){e.append("circle").attr("cx",t).attr("cy",a).attr("r",2).style("fill","black")},isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)}},r=function e(){var t,a,n,r,o,i,s=arguments[0]||{},l=1,c=arguments.length,u=!1,d=Object.prototype.toString,h=Object.prototype.hasOwnProperty,p={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},f={isFunction:function(e){return"function"===f.type(e)},isArray:Array.isArray||function(e){return"array"===f.type(e)},isWindow:function(e){return null!==e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null===e?String(e):p[d.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==f.type(e)||e.nodeType)return!1;try{if(e.constructor&&!h.call(e,"constructor")&&!h.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(a){return!1}var t;for(t in e);return void 0===t||h.call(e,t)}};for("boolean"===typeof s&&(u=s,s=arguments[1]||{},l=2),"object"===typeof s||f.isFunction(s)||(s={}),c===l&&(s=this,--l);l<c;l++)if(null!==(t=arguments[l]))for(a in t)n=s[a],s!==(r=t[a])&&(u&&r&&(f.isPlainObject(r)||(o=f.isArray(r)))?(o?(o=!1,i=n&&f.isArray(n)?n:[]):i=n&&f.isPlainObject(n)?n:{},s[a]=e(u,i,r)):void 0!==r&&(s[a]=r));return s},o={toRadians:function(e){return e*(Math.PI/180)},toDegrees:function(e){return e*(180/Math.PI)},computePieRadius:function(e){var t=e.options.size,a=e.options.misc.canvasPadding,n=t.canvasWidth-a.left-a.right,r=t.canvasHeight-a.top-a.bottom;"pie-center"!==e.options.header.location&&(r-=e.textComponents.headerHeight),e.textComponents.footer.exists&&(r-=e.textComponents.footer.h);var o,i,s=(n<(r=r<0?0:r)?n:r)/3;if(null!==t.pieOuterRadius)if(/%/.test(t.pieOuterRadius)){i=(i=(i=parseInt(t.pieOuterRadius.replace(/[\D]/,""),10))>99?99:i)<0?0:i;var l=n<r?n:r;if("none"!==e.options.labels.outer.format){var c=2*parseInt(e.options.labels.outer.pieDistance,10);l-c>0&&(l-=c)}s=Math.floor(l/100*i)/2}else s=parseInt(t.pieOuterRadius,10);/%/.test(t.pieInnerRadius)?(i=(i=(i=parseInt(t.pieInnerRadius.replace(/[\D]/,""),10))>99?99:i)<0?0:i,o=Math.floor(s/100*i)):o=parseInt(t.pieInnerRadius,10),e.innerRadius=o,e.outerRadius=s},getTotalPieSize:function(e){for(var t=0,a=0;a<e.length;a++)t+=e[a].value;return t},sortPieData:function(e){var t=e.options.data.content;switch(e.options.data.sortOrder){case"none":break;case"random":t=n.shuffleArray(t);break;case"value-asc":t.sort((function(e,t){return e.value<t.value?-1:1}));break;case"value-desc":t.sort((function(e,t){return e.value<t.value?1:-1}));break;case"label-asc":t.sort((function(e,t){return e.label.toLowerCase()>t.label.toLowerCase()?1:-1}));break;case"label-desc":t.sort((function(e,t){return e.label.toLowerCase()<t.label.toLowerCase()?1:-1}))}return t},getPieTranslateCenter:function(e){return"translate("+e.x+","+e.y+")"},calculatePieCenter:function(e){var t=e.options.misc.pieCenterOffset,a=e.textComponents.title.exists&&"pie-center"!==e.options.header.location,n=e.textComponents.subtitle.exists&&"pie-center"!==e.options.header.location,r=e.options.misc.canvasPadding.top;a&&n?r+=e.textComponents.title.h+e.options.header.titleSubtitlePadding+e.textComponents.subtitle.h:a?r+=e.textComponents.title.h:n&&(r+=e.textComponents.subtitle.h);var o=0;e.textComponents.footer.exists&&(o=e.textComponents.footer.h+e.options.misc.canvasPadding.bottom);var i=(e.options.size.canvasWidth-e.options.misc.canvasPadding.left-e.options.misc.canvasPadding.right)/2+e.options.misc.canvasPadding.left,s=(e.options.size.canvasHeight-o-r)/2+r;i+=t.x,s+=t.y,e.pieCenter={x:i,y:s}},rotate:function(e,t,a,n,r){r=r*Math.PI/180;var o=Math.cos,i=Math.sin;return{x:(e-a)*o(r)-(t-n)*i(r)+a,y:(e-a)*i(r)+(t-n)*o(r)+n}},translate:function(e,t,a,n){var r=o.toRadians(n);return{x:e+a*Math.sin(r),y:t-a*Math.cos(r)}},pointIsInArc:function(e,t,a){var n=a.innerRadius()(t),r=a.outerRadius()(t),o=a.startAngle()(t),i=a.endAngle()(t),s=e.x*e.x+e.y*e.y,l=Math.atan2(e.x,-e.y);return l=l<0?l+2*Math.PI:l,n*n<=s&&s<=r*r&&o<=l&&l<=i}},i={add:function(e,t,a){var n=i.getIncludes(a),r=e.options.labels,o=e.svg.insert("g","."+e.cssPrefix+"labels-"+t).attr("class",e.cssPrefix+"labels-"+t),s=e.__labels[t]=o.selectAll("."+e.cssPrefix+"labelGroup-"+t).data(e.options.data.content).enter().append("g").attr("id",(function(a,n){return e.cssPrefix+"labelGroup"+n+"-"+t})).attr("data-index",(function(e,t){return t})).attr("class",e.cssPrefix+"labelGroup-"+t).style("opacity",0),l={section:t,sectionDisplayType:a};n.mainLabel&&s.append("text").attr("id",(function(a,n){return e.cssPrefix+"segmentMainLabel"+n+"-"+t})).attr("class",e.cssPrefix+"segmentMainLabel-"+t).text((function(e,t){var a=e.label;return r.formatter?(l.index=t,l.part="mainLabel",l.value=e.value,l.label=a,a=r.formatter(l)):r.truncation.enabled&&e.label.length>r.truncation.truncateLength&&(a=e.label.substring(0,r.truncation.truncateLength)+"..."),a})).style("font-size",r.mainLabel.fontSize+"px").style("font-family",r.mainLabel.font).style("font-weight",r.mainLabel.fontWeight).style("fill",(function(t,a){return"segment"===r.mainLabel.color?e.options.colors[a]:r.mainLabel.color})),n.percentage&&s.append("text").attr("id",(function(a,n){return e.cssPrefix+"segmentPercentage"+n+"-"+t})).attr("class",e.cssPrefix+"segmentPercentage-"+t).text((function(e,t){var a=e.percentage;return r.formatter?(l.index=t,l.part="percentage",l.value=e.value,l.label=e.percentage,a=r.formatter(l)):a+="%",a})).style("font-size",r.percentage.fontSize+"px").style("font-family",r.percentage.font).style("font-weight",r.percentage.fontWeight).style("fill",r.percentage.color),n.value&&s.append("text").attr("id",(function(a,n){return e.cssPrefix+"segmentValue"+n+"-"+t})).attr("class",e.cssPrefix+"segmentValue-"+t).text((function(e,t){return l.index=t,l.part="value",l.value=e.value,l.label=e.value,r.formatter?r.formatter(l,e.value):e.value})).style("font-size",r.value.fontSize+"px").style("font-family",r.value.font).style("font-weight",r.value.fontWeight).style("fill",r.value.color)},positionLabelElements:function(e,t,a){i["dimensions-"+t]=[],e.__labels[t].each((function(a,n){var r=d3.select(this).selectAll("."+e.cssPrefix+"segmentMainLabel-"+t),o=d3.select(this).selectAll("."+e.cssPrefix+"segmentPercentage-"+t),s=d3.select(this).selectAll("."+e.cssPrefix+"segmentValue-"+t);i["dimensions-"+t].push({mainLabel:null!==r.node()?r.node().getBBox():null,percentage:null!==o.node()?o.node().getBBox():null,value:null!==s.node()?s.node().getBBox():null})}));var n=i["dimensions-"+t];switch(a){case"label-value1":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+5}));break;case"label-value2":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dy",(function(e,t){return n[t].mainLabel.height}));break;case"label-percentage1":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+5}));break;case"label-percentage2":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width/2-n[t].percentage.width/2})).attr("dy",(function(e,t){return n[t].mainLabel.height}))}},computeLabelLinePositions:function(e){e.lineCoordGroups=[],e.__labels.outer.each((function(t,a){return i.computeLinePosition(e,a)}))},computeLinePosition:function(e,t){var a,n,r,i,l=s.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),c=o.rotate(e.pieCenter.x,e.pieCenter.y-e.outerRadius,e.pieCenter.x,e.pieCenter.y,l),u=e.outerLabelGroupData[t].h/5,d=Math.floor(l/90);switch(2===d&&180===l&&(d=1),d){case 0:a=e.outerLabelGroupData[t].x-6-(e.outerLabelGroupData[t].x-6-c.x)/2,n=e.outerLabelGroupData[t].y+(c.y-e.outerLabelGroupData[t].y)/4,r=e.outerLabelGroupData[t].x-6,i=e.outerLabelGroupData[t].y-u;break;case 1:a=c.x+(e.outerLabelGroupData[t].x-c.x)/4,n=c.y+(e.outerLabelGroupData[t].y-c.y)/4,r=e.outerLabelGroupData[t].x-6,i=e.outerLabelGroupData[t].y-u;break;case 2:var h=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6;a=c.x-(c.x-h)/4,n=c.y+(e.outerLabelGroupData[t].y-c.y)/4,r=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6,i=e.outerLabelGroupData[t].y-u;break;case 3:var p=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6;a=p+(c.x-p)/4,n=e.outerLabelGroupData[t].y+(c.y-e.outerLabelGroupData[t].y)/4,r=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6,i=e.outerLabelGroupData[t].y-u}"straight"===e.options.labels.lines.style?e.lineCoordGroups[t]=[{x:c.x,y:c.y},{x:r,y:i}]:e.lineCoordGroups[t]=[{x:c.x,y:c.y},{x:a,y:n},{x:r,y:i}]},addLabelLines:function(e){var t=e.svg.insert("g","."+e.cssPrefix+"pieChart").attr("class",e.cssPrefix+"lineGroups").style("opacity",1).selectAll("."+e.cssPrefix+"lineGroup").data(e.lineCoordGroups).enter().append("g").attr("class",e.cssPrefix+"lineGroup"),a=d3.line().curve(d3.curveBasis).x((function(e){return e.x})).y((function(e){return e.y}));t.append("path").attr("d",a).attr("stroke",(function(t,a){return"segment"===e.options.labels.lines.color?e.options.colors[a]:e.options.labels.lines.color})).attr("stroke-width",1).attr("fill","none").style("opacity",(function(t,a){var n=e.options.labels.outer.hideWhenLessThanPercentage;return null!==n&&t.percentage<n||""===e.options.data.content[a].label?0:1}))},positionLabelGroups:function(e,t){"none"!==e.options.labels[t].format&&e.__labels[t].style("opacity",(function(a,n){var r=e.options.labels[t].hideWhenLessThanPercentage;return null!==r&&a.percentage<r?0:1})).attr("transform",(function(a,i){var l,c;if("outer"===t)l=e.outerLabelGroupData[i].x,c=e.outerLabelGroupData[i].y;else{var u=r(!0,{},e.pieCenter);if(e.innerRadius>0){var d=s.getSegmentAngle(i,e.options.data.content,e.totalSize,{midpoint:!0}),h=o.translate(e.pieCenter.x,e.pieCenter.y,e.innerRadius,d);u.x=h.x,u.y=h.y}var p=n.getDimensions(e.cssPrefix+"labelGroup"+i+"-inner"),f=p.w/2,g=p.h/4;l=u.x+(e.lineCoordGroups[i][0].x-u.x)/1.8,c=u.y+(e.lineCoordGroups[i][0].y-u.y)/1.8,l-=f,c+=g}return"translate("+l+","+c+")"}))},getIncludes:function(e){var t=!1,a=!1,n=!1;switch(e){case"label":t=!0;break;case"value":a=!0;break;case"percentage":n=!0;break;case"label-value1":case"label-value2":t=!0,a=!0;break;case"label-percentage1":case"label-percentage2":t=!0,n=!0}return{mainLabel:t,value:a,percentage:n}},computeOuterLabelCoords:function(e){e.__labels.outer.each((function(t,a){return i.getIdealOuterLabelPositions(e,a)})),i.resolveOuterLabelCollisions(e)},resolveOuterLabelCollisions:function(e){if("none"!==e.options.labels.outer.format){var t=e.options.data.content.length;i.checkConflict(e,0,"clockwise",t),i.checkConflict(e,t-1,"anticlockwise",t)}},checkConflict:function(e,t,a,r){var o,s;if(!(r<=1)){var l=e.outerLabelGroupData[t].hs;if(("clockwise"!==a||"right"===l)&&("anticlockwise"!==a||"left"===l)){var c="clockwise"===a?t+1:t-1,u=e.outerLabelGroupData[t],d=e.outerLabelGroupData[c],h={labelHeights:e.outerLabelGroupData[0].h,center:e.pieCenter,lineLength:e.outerRadius+e.options.labels.outer.pieDistance,heightChange:e.outerLabelGroupData[0].h+1};if("clockwise"===a){for(o=0;o<=t;o++)if(s=e.outerLabelGroupData[o],!i.isLabelHidden(e,o)&&n.rectIntersect(s,d)){i.adjustLabelPos(e,c,u,h);break}}else for(o=r-1;o>=t;o--)if(s=e.outerLabelGroupData[o],!i.isLabelHidden(e,o)&&n.rectIntersect(s,d)){i.adjustLabelPos(e,c,u,h);break}i.checkConflict(e,c,a,r)}}},isLabelHidden:function(e,t){var a=e.options.labels.outer.hideWhenLessThanPercentage;return null!==a&&d.percentage<a||""===e.options.data.content[t].label},adjustLabelPos:function(e,t,a,n){var r,o,i,s;s=a.y+n.heightChange,o=n.center.y-s,r=Math.abs(n.lineLength)>Math.abs(o)?Math.sqrt(n.lineLength*n.lineLength-o*o):Math.sqrt(o*o-n.lineLength*n.lineLength),i="right"===a.hs?n.center.x+r:n.center.x-r-e.outerLabelGroupData[t].w,e.outerLabelGroupData[t].x=i,e.outerLabelGroupData[t].y=s},getIdealOuterLabelPositions:function(e,t){var a=e.svg.select("#"+e.cssPrefix+"labelGroup"+t+"-outer").node();if(a){var n=a.getBBox(),r=s.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),i=e.pieCenter.x,l=e.pieCenter.y-(e.outerRadius+e.options.labels.outer.pieDistance),c=o.rotate(i,l,e.pieCenter.x,e.pieCenter.y,r),u="right";r>180?(c.x-=n.width+8,u="left"):c.x+=8,e.outerLabelGroupData[t]={x:c.x,y:c.y,w:n.width,h:n.height,hs:u}}}},s={effectMap:{none:d3.easeLinear,bounce:d3.easeBounce,linear:d3.easeLinear,sin:d3.easeSin,elastic:d3.easeElastic,back:d3.easeBack,quad:d3.easeQuad,circle:d3.easeCircle,exp:d3.easeExp},create:function(e){var t=e.pieCenter,a=e.options.colors,n=(e.options.effects.load,e.options.misc.colors.segmentStroke),r=e.svg.insert("g","#"+e.cssPrefix+"title").attr("transform",(function(){return o.getPieTranslateCenter(t)})).attr("class",e.cssPrefix+"pieChart"),i=d3.arc().innerRadius(e.innerRadius).outerRadius(e.outerRadius).startAngle(0).endAngle((function(t){return t.value/e.totalSize*2*Math.PI}));r.selectAll("."+e.cssPrefix+"arc").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"arc").append("path").attr("id",(function(t,a){return e.cssPrefix+"segment"+a})).attr("fill",(function(t,n){var r=a[n];return e.options.misc.gradient.enabled&&(r="url(#"+e.cssPrefix+"grad"+n+")"),r})).style("stroke",n).style("stroke-width",1).attr("data-index",(function(e,t){return t})).attr("d",i),e.svg.selectAll("g."+e.cssPrefix+"arc").attr("transform",(function(t,a){var n=0;return a>0&&(n=s.getSegmentAngle(a-1,e.options.data.content,e.totalSize)),"rotate("+n+")"})),e.arc=i},addGradients:function(e){var t=e.svg.append("defs").selectAll("radialGradient").data(e.options.data.content).enter().append("radialGradient").attr("gradientUnits","userSpaceOnUse").attr("cx",0).attr("cy",0).attr("r","120%").attr("id",(function(t,a){return e.cssPrefix+"grad"+a}));t.append("stop").attr("offset","0%").style("stop-color",(function(t,a){return e.options.colors[a]})),t.append("stop").attr("offset",e.options.misc.gradient.percentage+"%").style("stop-color",e.options.misc.gradient.color)},addSegmentEventHandlers:function(e){var t=e.svg.selectAll("."+e.cssPrefix+"arc");(t=t.merge(e.__labels.inner.merge(e.__labels.outer))).on("click",(function(){var t,a=d3.select(this);if(a.attr("class")===e.cssPrefix+"arc")t=a.select("path");else{var n=a.attr("data-index");t=d3.select("#"+e.cssPrefix+"segment"+n)}var r=t.attr("class")===e.cssPrefix+"expanded";s.onSegmentEvent(e,e.options.callbacks.onClickSegment,t,r),"none"!==e.options.effects.pullOutSegmentOnClick.effect&&(r?s.closeSegment(e,t.node()):s.openSegment(e,t.node()))})),t.on("mouseover",(function(){var t,a,r=d3.select(this);if(r.attr("class")===e.cssPrefix+"arc"?t=r.select("path"):(a=r.attr("data-index"),t=d3.select("#"+e.cssPrefix+"segment"+a)),e.options.effects.highlightSegmentOnMouseover){a=t.attr("data-index");var o=e.options.colors[a];t.style("fill",n.getColorShade(o,e.options.effects.highlightLuminosity))}e.options.tooltips.enabled&&(a=t.attr("data-index"),c.showTooltip(e,a));var i=t.attr("class")===e.cssPrefix+"expanded";s.onSegmentEvent(e,e.options.callbacks.onMouseoverSegment,t,i)})),t.on("mousemove",(function(){c.moveTooltip(e)})),t.on("mouseout",(function(){var t,a,n=d3.select(this);if(n.attr("class")===e.cssPrefix+"arc"?t=n.select("path"):(a=n.attr("data-index"),t=d3.select("#"+e.cssPrefix+"segment"+a)),e.options.effects.highlightSegmentOnMouseover){a=t.attr("data-index");var r=e.options.colors[a];e.options.misc.gradient.enabled&&(r="url(#"+e.cssPrefix+"grad"+a+")"),t.style("fill",r)}e.options.tooltips.enabled&&(a=t.attr("data-index"),c.hideTooltip(e,a));var o=t.attr("class")===e.cssPrefix+"expanded";s.onSegmentEvent(e,e.options.callbacks.onMouseoutSegment,t,o)}))},onSegmentEvent:function(e,t,a,r){if(n.isFunction(t)){var o=parseInt(a.attr("data-index"),10);t({segment:a.node(),index:o,expanded:r,data:e.options.data.content[o]})}},openSegment:function(e,t){e.isOpeningSegment||(e.isOpeningSegment=!0,s.maybeCloseOpenSegment(e),d3.select(t).transition().ease(s.effectMap[e.options.effects.pullOutSegmentOnClick.effect]).duration(e.options.effects.pullOutSegmentOnClick.speed).attr("transform",(function(t,a){var n=e.arc.centroid(t),r=n[0],o=n[1],i=Math.sqrt(r*r+o*o),s=parseInt(e.options.effects.pullOutSegmentOnClick.size,10);return"translate("+r/i*s+","+o/i*s+")"})).on("end",(function(a,n){e.currentlyOpenSegment=t,e.isOpeningSegment=!1,d3.select(t).attr("class",e.cssPrefix+"expanded")})))},maybeCloseOpenSegment:function(e){"undefined"!==typeof e&&e.svg.selectAll("."+e.cssPrefix+"expanded").size()>0&&s.closeSegment(e,e.svg.select("."+e.cssPrefix+"expanded").node())},closeSegment:function(e,t){d3.select(t).transition().duration(400).attr("transform","translate(0,0)").on("end",(function(a,n){d3.select(t).attr("class",""),e.currentlyOpenSegment=null}))},getCentroid:function(e){var t=e.getBBox();return{x:t.x+t.width/2,y:t.y+t.height/2}},getSegmentAngle:function(e,t,a,n){var o,i=r({compounded:!0,midpoint:!1},n),s=t[e].value;if(i.compounded){o=0;for(var l=0;l<=e;l++)o+=t[l].value}"undefined"===typeof o&&(o=s);var c=o/a*360;return i.midpoint&&(c-=s/a*360/2),c}},l={offscreenCoord:-1e4,addTitle:function(e){e.__title=e.svg.selectAll("."+e.cssPrefix+"title").data([e.options.header.title]).enter().append("text").text((function(e){return e.text})).attr("id",e.cssPrefix+"title").attr("class",e.cssPrefix+"title").attr("x",l.offscreenCoord).attr("y",l.offscreenCoord).attr("text-anchor",(function(){return"top-center"===e.options.header.location||"pie-center"===e.options.header.location?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize+"px"})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionTitle:function(e){var t,a=e.textComponents,n=e.options.header.location,r=e.options.misc.canvasPadding,o=e.options.size.canvasWidth,i=e.options.header.titleSubtitlePadding;t="top-left"===n?r.left:(o-r.right)/2+r.left,t+=e.options.misc.pieCenterOffset.x;var s=r.top+a.title.h;"pie-center"===n&&(s=e.pieCenter.y,a.subtitle.exists?s=s-(a.title.h+i+a.subtitle.h)/2+a.title.h:s+=a.title.h/4),e.__title.attr("x",t).attr("y",s)},addSubtitle:function(e){var t=e.options.header.location;e.__subtitle=e.svg.selectAll("."+e.cssPrefix+"subtitle").data([e.options.header.subtitle]).enter().append("text").text((function(e){return e.text})).attr("x",l.offscreenCoord).attr("y",l.offscreenCoord).attr("id",e.cssPrefix+"subtitle").attr("class",e.cssPrefix+"subtitle").attr("text-anchor",(function(){return"top-center"===t||"pie-center"===t?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize+"px"})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionSubtitle:function(e){var t,a=e.options.misc.canvasPadding,n=e.options.size.canvasWidth;t="top-left"===e.options.header.location?a.left:(n-a.right)/2+a.left,t+=e.options.misc.pieCenterOffset.x;var r=l.getHeaderHeight(e);e.__subtitle.attr("x",t).attr("y",r)},addFooter:function(e){e.__footer=e.svg.selectAll("."+e.cssPrefix+"footer").data([e.options.footer]).enter().append("text").text((function(e){return e.text})).attr("x",l.offscreenCoord).attr("y",l.offscreenCoord).attr("id",e.cssPrefix+"footer").attr("class",e.cssPrefix+"footer").attr("text-anchor",(function(){var t="left";return"bottom-center"===e.options.footer.location?t="middle":"bottom-right"===e.options.footer.location&&(t="left"),t})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize+"px"})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionFooter:function(e){var t,a=e.options.footer.location,n=e.textComponents.footer.w,r=e.options.size.canvasWidth,o=e.options.size.canvasHeight,i=e.options.misc.canvasPadding;t="bottom-left"===a?i.left:"bottom-right"===a?r-n-i.right:r/2,e.__footer.attr("x",t).attr("y",o-i.bottom)},getHeaderHeight:function(e){var t;if(e.textComponents.title.exists){var a=e.textComponents.title.h+e.options.header.titleSubtitlePadding+e.textComponents.subtitle.h;t="pie-center"===e.options.header.location?e.pieCenter.y-a/2+a:a+e.options.misc.canvasPadding.top}else if("pie-center"===e.options.header.location){var n=e.options.misc.canvasPadding.bottom+e.textComponents.footer.h;t=(e.options.size.canvasHeight-n)/2+e.options.misc.canvasPadding.top+e.textComponents.subtitle.h/2}else t=e.options.misc.canvasPadding.top+e.textComponents.subtitle.h;return t}},c={addTooltips:function(e){var t=e.svg.insert("g").attr("class",e.cssPrefix+"tooltips");t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"tooltip").attr("id",(function(t,a){return e.cssPrefix+"tooltip"+a})).style("opacity",0).append("rect").attr("rx",e.options.tooltips.styles.borderRadius).attr("ry",e.options.tooltips.styles.borderRadius).attr("x",-e.options.tooltips.styles.padding).attr("opacity",e.options.tooltips.styles.backgroundOpacity).style("fill",e.options.tooltips.styles.backgroundColor),t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).append("text").attr("fill",(function(t){return e.options.tooltips.styles.color})).style("font-size",(function(t){return e.options.tooltips.styles.fontSize})).style("font-weight",(function(t){return e.options.tooltips.styles.fontWeight})).style("font-family",(function(t){return e.options.tooltips.styles.font})).text((function(t,a){var n=e.options.tooltips.string;return"caption"===e.options.tooltips.type&&(n=t.caption),c.replacePlaceholders(e,n,a,{label:t.label,value:t.value,percentage:t.percentage})})),t.selectAll("."+e.cssPrefix+"tooltip rect").attr("width",(function(t,a){return n.getDimensions(e.cssPrefix+"tooltip"+a).w+2*e.options.tooltips.styles.padding})).attr("height",(function(t,a){return n.getDimensions(e.cssPrefix+"tooltip"+a).h+2*e.options.tooltips.styles.padding})).attr("y",(function(t,a){return-n.getDimensions(e.cssPrefix+"tooltip"+a).h/2+1}))},showTooltip:function(e,t){var a=e.options.tooltips.styles.fadeInSpeed;c.currentTooltip===t&&(a=1),c.currentTooltip=t,d3.select("#"+e.cssPrefix+"tooltip"+t).transition().duration(a).style("opacity",(function(){return 1})),c.moveTooltip(e)},moveTooltip:function(e){d3.selectAll("#"+e.cssPrefix+"tooltip"+c.currentTooltip).attr("transform",(function(t){var a=d3.mouse(this.parentNode);return"translate("+(a[0]+e.options.tooltips.styles.padding+2)+","+(a[1]-2*e.options.tooltips.styles.padding-2)+")"}))},hideTooltip:function(e,t){d3.select("#"+e.cssPrefix+"tooltip"+t).style("opacity",(function(){return 0})),d3.select("#"+e.cssPrefix+"tooltip"+c.currentTooltip).attr("transform",(function(t,a){return"translate("+(e.options.size.canvasWidth+1e3)+","+(e.options.size.canvasHeight+1e3)+")"}))},replacePlaceholders:function(e,t,a,r){return n.isFunction(e.options.tooltips.placeholderParser)&&e.options.tooltips.placeholderParser(a,r),t.replace(/\{(\w+)\}/g,(function(e){var t=arguments[1];return r.hasOwnProperty(t)?r[arguments[1]]:arguments[0]}))}},u=function(n,o){if(this.element=n,"string"===typeof n){var i=n.replace(/^#/,"");this.element=document.getElementById(i)}var s={};r(!0,s,t,o),this.options=s,null!==this.options.misc.cssPrefix?this.cssPrefix=this.options.misc.cssPrefix:(this.cssPrefix="p"+e+"_",e++),a(this)&&(d3.select(this.element).attr("d3pie","0.2.1"),h.call(this),p.call(this))};u.prototype.recreate=function(){a(this)&&(h.call(this),p.call(this))},u.prototype.redraw=function(){this.element.innerHTML="",p.call(this)},u.prototype.destroy=function(){this.element.innerHTML="",d3.select(this.element).attr("d3pie",null)},u.prototype.getOpenSegment=function(){var e=this.currentlyOpenSegment;if(null!==e&&"undefined"!==typeof e){var t=parseInt(d3.select(e).attr("data-index"),10);return{element:e,index:t,data:this.options.data.content[t]}}return null},u.prototype.openSegment=function(e){(e=parseInt(e,10))<0||e>this.options.data.content.length-1||s.openSegment(this,d3.select("#"+this.cssPrefix+"segment"+e).node())},u.prototype.closeSegment=function(){s.maybeCloseOpenSegment(this)},u.prototype.updateProp=function(e,t){switch(e){case"header.title.text":var a=n.processObj(this.options,e);n.processObj(this.options,e,t),d3.select("#"+this.cssPrefix+"title").html(t),(""===a&&""!==t||""!==a&&""===t)&&this.redraw();break;case"header.subtitle.text":var r=n.processObj(this.options,e);n.processObj(this.options,e,t),d3.select("#"+this.cssPrefix+"subtitle").html(t),(""===r&&""!==t||""!==r&&""===t)&&this.redraw();break;case"callbacks.onload":case"callbacks.onMouseoverSegment":case"callbacks.onMouseoutSegment":case"callbacks.onClickSegment":case"effects.pullOutSegmentOnClick.effect":case"effects.pullOutSegmentOnClick.speed":case"effects.pullOutSegmentOnClick.size":case"effects.highlightSegmentOnMouseover":case"effects.highlightLuminosity":n.processObj(this.options,e,t);break;default:n.processObj(this.options,e,t),this.destroy(),this.recreate()}};var h=function(){this.options.data.content=o.sortPieData(this),this.options.data.smallSegmentGrouping.enabled&&(this.options.data.content=n.applySmallSegmentGrouping(this.options.data.content,this.options.data.smallSegmentGrouping)),this.options.colors=n.initSegmentColors(this),this.totalSize=o.getTotalPieSize(this.options.data.content);for(var e=this.options.labels.percentage.decimalPlaces,t=0;t<this.options.data.content.length;t++)this.options.data.content[t].percentage=f(this.options.data.content[t].value,this.totalSize,e);for(var a=0,r=0;r<this.options.data.content.length;r++)r===this.options.data.content.length-1&&(this.options.data.content[r].percentage=(100-a).toFixed(e)),a+=parseFloat(this.options.data.content[r].percentage)},p=function(){this.svg=n.addSVGSpace(this),this.textComponents={headerHeight:0,title:{exists:""!==this.options.header.title.text,h:0,w:0},subtitle:{exists:""!==this.options.header.subtitle.text,h:0,w:0},footer:{exists:""!==this.options.footer.text,h:0,w:0}},this.outerLabelGroupData=[],this.textComponents.title.exists&&l.addTitle(this),this.textComponents.subtitle.exists&&l.addSubtitle(this),l.addFooter(this),l.positionFooter(this);var e=n.getDimensions(this.__footer.node());if(this.textComponents.footer.h=e.h,this.textComponents.footer.w=e.w,this.textComponents.title.exists){var t=n.getDimensions(this.__title.node());this.textComponents.title.h=t.h,this.textComponents.title.w=t.w}if(this.textComponents.subtitle.exists){var a=n.getDimensions(this.__subtitle.node());this.textComponents.subtitle.h=a.h,this.textComponents.subtitle.w=a.w}if(this.textComponents.title.exists||this.textComponents.subtitle.exists){var r=0;this.textComponents.title.exists&&(r+=this.textComponents.title.h,this.textComponents.subtitle.exists&&(r+=this.options.header.titleSubtitlePadding)),this.textComponents.subtitle.exists&&(r+=this.textComponents.subtitle.h),this.textComponents.headerHeight=r}if(o.computePieRadius(this),o.calculatePieCenter(this),l.positionTitle(this),l.positionSubtitle(this),this.options.misc.gradient.enabled&&s.addGradients(this),s.create(this),this.__labels={},i.add(this,"inner",this.options.labels.inner.format),i.add(this,"outer",this.options.labels.outer.format),i.positionLabelElements(this,"inner",this.options.labels.inner.format),i.positionLabelElements(this,"outer",this.options.labels.outer.format),i.computeOuterLabelCoords(this),i.positionLabelGroups(this,"outer"),i.computeLabelLinePositions(this),this.options.labels.lines.enabled&&"none"!==this.options.labels.outer.format&&i.addLabelLines(this),i.positionLabelGroups(this,"inner"),n.isFunction(this.options.callbacks.onload))try{this.options.callbacks.onload()}catch(u){}this.options.tooltips.enabled&&c.addTooltips(this),s.addSegmentEventHandlers(this)},f=function(e,t,a){var n=e/t;return a<=0?Math.round(100*n):(100*n).toFixed(a)};return u})?n.apply(t,r):n)||(e.exports=o)},28:function(e,t,a){"use strict";a.d(t,"e",(function(){return i})),a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"c",(function(){return c})),a.d(t,"g",(function(){return u})),a.d(t,"d",(function(){return d})),a.d(t,"f",(function(){return h}));var n=a(14),r=a(7),o=a(133),i=function(e){return e>0},s="https://registry.my-netdata.io",l=1e3,c=function(e,t){return"".concat(e,"/sso/v2/").concat(t)},u="&utm_source=agent&utm_medium=web",d=function(){var e=document.getElementById("charts_div");return e?60*-Math.round(e.getBoundingClientRect().width/3/60):(console.error("Couldn't find '.charts_div' element to calculate width"),-900)},h=function(e,t,a){return t?e.reduce((function(e,i){return Object(r.a)({},e,Object(n.a)({},i,Object(o.a)(t[i],a[i])?t[i]:a[i]))}),a):a}},282:function(e,t,a){"use strict";a(256);var n=a(257);a.d(t,"CloudConnectionStatus",(function(){return n.a}))},300:function(e,t,a){e.exports=a(489)},316:function(e,t,a){},355:function(e,t){},36:function(e,t,a){"use strict";a.d(t,"a",(function(){return p})),a.d(t,"b",(function(){return f})),a.d(t,"c",(function(){return g}));var n=a(287),r=a(146),o=a(285),i=a(219),s=a(288),l=a(133),c=a(494),u=a(74),d=u.c?{src:"http://localhost:3000/some-script.js"}:document.currentScript,h=function(){if(u.a)return"http://localhost:19999";if(u.b){var e=window.location.pathname.replace("index.html","").replace("default.html","");return window.location.origin+e}return function(e){return e.replace(new RegExp("[^\\/]*\\.js(\\/?.*)?$"),"").replace("/static/js","")}(Object(n.a)([[Boolean,r.a],[o.a,function(){return Object(i.a)(document.getElementsByTagName("script"))}]])(d).src)},p=Object(n.a)([[Object(s.a)(i.a,Object(l.a)("/")),r.a],[o.a,function(e){return Object(c.a)(e,"/")}]]),f=p(window.netdataServer||h()),g=u.a?"/":p(h())},39:function(e,t,a){"use strict";a.d(t,"f",(function(){return u})),a.d(t,"a",(function(){return f})),a.d(t,"j",(function(){return g})),a.d(t,"h",(function(){return m})),a.d(t,"g",(function(){return b})),a.d(t,"l",(function(){return v})),a.d(t,"i",(function(){return _})),a.d(t,"c",(function(){return y})),a.d(t,"b",(function(){return O})),a.d(t,"k",(function(){return x})),a.d(t,"e",(function(){return w})),a.d(t,"d",(function(){return E}));var n=a(49),r=a(17),o=a(9),i=a(163),s=a(45),l=function(e){return e[s.c]},c=Object(r.a)(l,(function(e,t){return t.id}),(function(e,t){return e[t]||i.b})),u=Object(r.a)(c,(function(e){return e.chartData})),d=Object(r.a)(c,Object(n.a)("chartMetadata")),h=Object(r.a)(o.e,d,(function(e,t){return e||t})),p=Object(r.a)(c,Object(n.a)("isFetchingDetails")),f=function(){return Object(r.a)(h,p,(function(e,t){return{chartMetadata:e,isFetchingDetails:t}}))},g=Object(r.a)(c,(function(e){return e.viewRange})),m=Object(r.a)(c,(function(e){return e.isFetchingData})),b=Object(r.a)(c,(function(e){return e.fetchDataParams})),v=Object(r.a)(c,(function(e){return e.resizeHeight})),_=Object(r.a)(c,Object(n.a)("chartPanAndZoom")),y=(Object(r.a)(l,(function(e){return Object.values(e).some((function(e){return e.isFetchingData}))})),Object(r.a)(l,(function(e){return Object.values(e).reduce((function(e,t){return e+(function(e){return e.isFetchDataFailure||Boolean(e.chartData)||e.isFetchDetailsFailure}(t)?1:0)}),0)}))),O=Object(r.a)(l,(function(e){return Object.keys(e).length})),x=Object(r.a)(l,(function(e){var t;return null===(t=Object.values(e).find((function(e){return e.isFetchingData})))||void 0===t?void 0:t.chartId})),w=Object(r.a)(l,(function(e){return Object.values(e).reduce((function(e,t){return e+(t.snapshotData?1:0)}),0)})),E=Object(r.a)(l,(function(e){return Object.values(e).reduce((function(e,t){return e+(t.snapshotDataIsError?1:0)}),0)}))},396:function(e,t,a){},416:function(e,t,a){},42:function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"b",(function(){return b}));var n=a(37),r=a(7),o=a(0),i=(a(99),a(8)),s=a(9),l=function(e){return e>-10&&e<10?"0".concat(e.toString()):e.toString()},c=!!(Intl&&Intl.DateTimeFormat&&navigator.language),u=function(e){return"number"===typeof e?new Date(e):e},d=function(e){return u(e).toLocaleDateString()},h=function(e){return u(e).toLocaleTimeString()},p=function(e){var t=u(e);return"".concat(l(t.getHours()),":").concat(l(t.getMinutes()),":").concat(l(t.getSeconds()))},f=function(e){try{Intl.DateTimeFormat(navigator.language,{localeMatcher:"best fit",formatMatcher:"best fit",weekday:"short",year:"numeric",month:"short",day:"2-digit",timeZone:e})}catch(t){return!1}return!0},g=function(e,t){var a=t.locale,o=Object(n.a)(t,["locale"]);return new Intl.DateTimeFormat(null!==a&&void 0!==a?a:navigator.language,function(e){var t=e.long,a=e.isTime,n=e.secs,o=e.timezone;return Object(r.a)({hourCycle:"h23"},a?{}:t?{weekday:"short",year:"numeric",month:"short",day:"2-digit"}:{dateStyle:"short"},{},a&&{timeStyle:n?"medium":"short"},{timeZone:o})}(o)).format(e)},m=function(e){return""!==e&&"default"!==e?e:void 0},b=function(){var e=Object(i.b)(s.M),t=Object(i.b)(s.N),a=Object(o.useMemo)((function(){return c?function(t,a){return g(t,Object(r.a)({long:!0,timezone:m(e)},a))}:d}),[e]),n=Object(o.useMemo)((function(){return c?function(t,a){return g(t,Object(r.a)({secs:!0,isTime:!0,timezone:m(e)},a))}:h}),[e]),l=Object(o.useMemo)((function(){return c?function(t){return g(t,{secs:!0,isTime:!0,timezone:m(e)})}:p}),[e]);return{localeDateString:a,localeTimeString:n,xAxisDateString:Object(o.useMemo)((function(){return c?function(t){return g(t,{long:!0,timezone:m(e)})}:p}),[e]),xAxisTimeString:l,utcOffset:t}}},436:function(e,t,a){},44:function(e,t,a){"use strict";a.d(t,"e",(function(){return o})),a.d(t,"f",(function(){return i})),a.d(t,"d",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return u}));var n=a(22),r=a(75),o=Object(n.createAction)("".concat(r.a,"/isSnapshotModeAction")),i=Object(n.createAction)("".concat(r.a,"/stopSnapshotModeAction")),s=Object(n.createAction)("".concat(r.a,"/showSignInModal")),l=Object(n.createAction)("".concat(r.a,"/explicitlySignIn")),c=Object(n.createAction)("".concat(r.a,"/isSignedInAction")),u=Object(n.createAction)("".concat(r.a,"/setOfflineAction"))},440:function(e,t,a){},441:function(e,t,a){},45:function(e,t,a){"use strict";a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o}));var n="chart",r=2e3,o=300},46:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(7),r=function(e,t){var a={now:"now",space:" ",negative_suffix:"ago",day:"day",days:"days",hour:"hour",hours:"hours",minute:"min",minutes:"mins",second:"sec",seconds:"secs",and:"and"},r="object"===typeof t?Object(n.a)({},a,{},t):a,o="string"===typeof e?parseInt(e,10):e;if(0===o)return r.now;var i="";o<0&&(o=-o,""!==r.negative_suffix&&(i=r.space+r.negative_suffix));var s=Math.floor(o/86400);o-=86400*s;var l=Math.floor(o/3600);o-=3600*l;var c=Math.floor(o/60);o-=60*c;var u=[];if(s>1?u.push(s.toString()+r.space+r.days):1===s&&u.push(s.toString()+r.space+r.day),l>1?u.push(l.toString()+r.space+r.hours):1===l&&u.push(l.toString()+r.space+r.hour),c>1?u.push(c.toString()+r.space+r.minutes):1===c&&u.push(c.toString()+r.space+r.minute),o>1?u.push(Math.floor(o).toString()+r.space+r.seconds):1===o&&u.push(Math.floor(o).toString()+r.space+r.second),1===u.length)return u.pop()+i;var d=u.pop();return"".concat(u.join(", ")," ").concat(r.and," ").concat(d).concat(i)}},487:function(e,t){},488:function(e,t,a){},489:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),o=a(32),i=a.n(o),s=a(27),l=a(48),c=a(126),u=a(14),d=a(155),h=a(26),p=a(163),f=a(45),g=a(7),m=a(22),b=a(44),v={isSnapshotMode:!1,snapshotCharts:null,snapshotDataPoints:null,isSignedIn:!1,offline:!1},_=Object(m.createReducer)({},v);_.on(b.e,(function(e,t){var a=t.charts,n=t.dataPoints;return Object(g.a)({},e,{snapshotCharts:a,snapshotDataPoints:n,isSnapshotMode:!0})})),_.on(b.f,(function(e){return Object(g.a)({},e,{isSnapshotMode:v.isSnapshotMode,snapshotCharts:v.snapshotCharts,snapshotDataPoints:v.snapshotDataPoints})})),_.on(b.b,(function(e,t){var a=t.isSignedIn;return Object(g.a)({},e,{isSignedIn:a})})),_.on(b.c,(function(e,t){var a=t.offline;return Object(g.a)({},e,{offline:a})}));var y,O=a(75),x=Object(l.c)((y={},Object(u.a)(y,h.e,d.b),Object(u.a)(y,f.c,p.a),Object(u.a)(y,O.a,_),y)),w=a(21),E=a.n(w),S=a(16),C=a(35),A=a(5),k=a(93),j=a.n(k),T=j.a.create({headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},withCredentials:!0}),D=a(36),P=a(554),M=a(184),L=a(529),I=a(261),N=a(527),R=a(528),F=a(549),B=a(530),H=j.a.create({headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},withCredentials:!0}),z=function(e){var t=new P.a,a=new P.a,n=Object(I.a)((function(e){var t=e.url,a=e.method,n=void 0===a?"GET":a,r=e.params,o=void 0===r?{}:r,i=e.data,s=e.onErrorCallback,l=e.onSuccessCallback,c=e.cancelTokenSource;return Object(M.a)(H.request({url:t,method:n,params:o,data:i,timeout:15e3,cancelToken:null===c||void 0===c?void 0:c.token})).pipe(Object(N.a)((function(e){var t=e.data;l(t)})),Object(R.a)((function(e){return"Chart scrolled out of view"!==(null===e||void 0===e?void 0:e.message)&&console.warn("fetch error",t),s(e),Object(L.a)()})))}),e);return a.pipe(Object(F.a)(null),Object(B.a)((function(){return t.pipe(n)}))).subscribe(),[t,a]},U=a(74),G=a(260),W=a(531),V=a(558),Y=function(e,t){return"json"===e.format?function(e,t){var a=e.view_update_every;if(!e.result.data.length)return e;var n=e.result.data[0][0]-t*a,r=Object(G.a)(e.result.labels).map((function(){return null})),o=new Array(t).fill(null).map((function(e,t){return[n+t*a].concat(Object(C.a)(r))}));return Object(g.a)({},e,{after:e.after-a*t,result:Object(g.a)({},e.result,{data:o.concat(e.result.data)})})}(e,t):e},X=[],K=function(e,t,a){if("array"===t&&"json"===e.format){if(Array.isArray(e.result))return e;var n=a?Object(W.a)(e.result.data):e.result.data;return Object(g.a)({},e,{format:"array",result:n.reduce((function(e,t){return t.shift(),[].concat(Object(C.a)(e),[Object(V.a)(t)])}),X)})}return e},Z=a(3),q=a(135),$=a(4),J=$.d.div.withConfig({displayName:"styled__Container",componentId:"qqn9iy-0"})(["width:100%;height:100%;min-height:",";display:flex;flex-flow:row nowrap;padding:"," "," "," ",";"],Object(Z.H)(10),Object(Z.H)(2),Object(Z.H)(2),Object(Z.H)(2),Object(Z.H)(2)),Q=$.d.div.withConfig({displayName:"styled__SideContent",componentId:"qqn9iy-1"})(["flex-grow:0;flex-shrink:0;height:100%;align-self:stretch;"]),ee=$.d.div.withConfig({displayName:"styled__ContentContainer",componentId:"qqn9iy-2"})([""]),te=Object($.d)(Z.z).withConfig({displayName:"styled__HeaderText",componentId:"qqn9iy-3"})(["color:",";font-weight:bold;display:block;margin-bottom:",";"],(function(e){var t=e.error;return e.success&&Object(Z.F)("success")||t&&Object(Z.F)("error")}),Object(Z.H)()),ae=Object($.d)(Z.D).withConfig({displayName:"styled__ContentText",componentId:"qqn9iy-4"})(["display:block;color:",";"],(function(e){return e.error&&Object(Z.F)("error")||Object(Z.F)("border")})),ne=function(e){var t=e.header,a=e.text,n=e.leftContent,o=e.rightContent,i=e.renderContent,s=e.success,l=e.error;return r.a.createElement(J,null,n&&r.a.createElement(Q,null,n),r.a.createElement(ee,null,t&&r.a.createElement(te,{success:s,error:l},t),a&&r.a.createElement(ae,{success:s,error:l},a),i&&i(e)),o&&r.a.createElement(Q,{right:!0},o))},re=function(e){return r.a.createElement(ne,e)},oe=$.d.div.withConfig({displayName:"styled__NodeIconContainer",componentId:"fe9uuu-0"})(["width:",";height:",";margin-right:",";display:flex;justify-content:center;align-items:center;"],Object(Z.H)(5),Object(Z.H)(5),Object(Z.H)(2)),ie=$.d.a.withConfig({displayName:"styled__NotificationLink",componentId:"fe9uuu-1"})(["&,&:hover{text-decoration:underline;color:inherit;}"]),se={position:q.b.POSITION.BOTTOM_RIGHT,autoClose:1e4,pauseOnFocusLoss:!1},le=function(){var e=re(Object(g.a)({},{header:"Installation error",text:"The installer could not prepare the required dependencies to enable Netdata Cloud functionality"},{error:!0,leftContent:r.a.createElement(oe,null,r.a.createElement(Z.o,{name:"gear",size:"large",color:"error"}))}));q.b.error(e,se)},ce=function(){var e={header:"Connection Problem",text:r.a.createElement(ie,{href:"https://learn.netdata.cloud/docs/agent/packaging/installer#automatic-one-line-installation-script",target:"_blank"},"To access Cloud install again your agent via the kickstart script")},t=re(Object(g.a)({},e,{error:!0,leftContent:r.a.createElement(oe,null,r.a.createElement(Z.o,{name:"gear",size:"large",color:"error"}))}));q.b.error(t,se)},ue=a(9),de=a(288),he=a(559),pe=a(218),fe=a(495),ge=a(552),me={hash:"#",theme:null,help:null,mode:"live",update_always:!1,pan_and_zoom:!1,server:null,after:0,before:0,highlight:!1,highlight_after:0,highlight_before:0,nowelcome:!1,show_alarms:!1,chart:null,family:null,alarm:null,alarm_unique_id:0,alarm_id:0,alarm_event_id:0,alarm_when:0},be=function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return void 0===me[a]||void 0===n}([a,n])?{}:Object(u.a)({},a,decodeURIComponent(n))},ve="print"===Object(de.a)(Object(he.a)(";"),Object(ge.a)((function(e,t){return 0===t?{hash:e}:be(e.split("="))})),pe.a,Object(fe.a)(me))(document.location.hash).mode,_e=a(18),ye=E.a.mark(Ae),Oe=E.a.mark(Me),xe=E.a.mark(He),we=E.a.mark(ze),Ee=E.a.mark(Ue),Se=U.b?30:60,Ce=Object(c.a)();function Ae(){var e,t,a,n,r,o;return E.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=3,Object(S.f)(Ce);case 3:if((e=i.sent).type!==_e.c.success.toString()){i.next=15;break}return t=e.payload,a=t.fetchDataParams.viewRange,n=Object(A.a)(a,2),r=n[0],o=n[1],i.next=10,Object(S.d)(ue.m);case 10:if(!i.sent||!(r<=0||o<=0)){i.next=15;break}return i.next=14,Object(S.c)(Object(_e.d)({id:t.id}));case 14:return i.abrupt("continue",0);case 15:return i.next=17,Object(S.c)(e);case 17:i.next=0;break;case 19:case"end":return i.stop()}}),ye)}var ke=function(e,t){return"".concat(void 0===e?"null":encodeURIComponent(e),",").concat(encodeURIComponent(t))},je=!1,Te=function(e){return"chart"===e?"node":"node"===e||"dimension"===e?e:"label=".concat(e)},De=z(ve?2:Se),Pe=Object(A.a)(De,1)[0];function Me(e){var t,a,n,r,o,i,s,l,c,u,d,h,p,f,m,b,v,_,y,O,x,w,A,k,j,T,P,M,L,I,N,R,F,B,H,z,G,W,V;return E.a.wrap((function(E){for(;;)switch(E.prev=E.next){case 0:return t=e.payload,a=t.host,n=t.context,r=t.chart,o=t.format,i=t.points,s=t.group,l=t.gtime,c=t.options,u=t.after,d=t.before,h=t.dimensions,p=t.labels,f=t.postGroupBy,m=t.postAggregationMethod,b=t.aggrMethod,v=t.dimensionsAggrMethod,_=t.nodeIDs,y=t.httpMethod,O=t.groupBy,x=void 0===O?"dimension":O,w=t.aggrGroups,A=void 0===w?[]:w,k=t.fetchDataParams,j=t.id,T=t.cancelTokenSource,E.next=4,Object(S.d)(ue.E);case 4:if(!(P=E.sent)){E.next=15;break}if(M=ke(h,c),L=Object.keys(P.data).find((function(e){return e.startsWith(r)&&e.includes(M)}))){E.next=11;break}return console.warn("Could not find snapshot key for chart: ".concat(r," and id ").concat(j)),E.abrupt("return");case 11:return I=P.data[L],E.next=14,Object(S.c)(_e.c.success({chartData:I,fetchDataParams:k,id:j}));case 14:return E.abrupt("return");case 15:N=U.b?"".concat(Object(D.a)(a),"api/v1/data"):a,R=c.split("|"),F=R.includes("flip"),H=(B=!je&&!F)?R.concat("flip"):R,z=[Te(x),f&&"label=".concat(f)].filter(Boolean),G="POST"===y?{data:Object(g.a)({filter:{nodeIDs:_,context:n,dimensions:h?h.split(/['|]/):void 0,labels:p},after:u,before:d,points:i,group:s,gtime:l,agent_options:H},m&&{post_aggregation_methods:[m]},{aggregations:["dimension"!==x&&{method:v||"sum",groupBy:["chart"].concat(Object(C.a)(z))},"chart"!==x&&Object(g.a)({method:b,groupBy:z},A.length&&{labels:A})].filter(Boolean)})}:{params:{chart:r,_:(new Date).valueOf(),format:o,points:i,group:s,gtime:l,options:c,after:u,before:d,dimensions:h}},W=function(e){if(null===e||void 0===e?void 0:e.result){var t=k.fillMissingPoints,a=K(e,o,B),n=Object(g.a)({},a,{},"post_aggregated_data"in e.result&&{postAggregationMethod:m,groupBy:x,postGroupBy:f,aggrGroups:A,postAggregated:e.result.post_aggregated_data[m]});Ce.put(_e.c.success({chartData:t?Y(n,t):n,fetchDataParams:k,id:j}))}else Ce.put(_e.c.failure({id:j}))},V=function(e){console.warn("fetch chart data failure",e),Ce.put(_e.c.failure({id:j}))},Pe.next(Object(g.a)({},G,{method:y||"GET",url:N,onErrorCallback:V,onSuccessCallback:W,cancelTokenSource:T}));case 25:case"end":return E.stop()}}),Oe)}var Le=z(1),Ie=Object(A.a)(Le,2),Ne=Ie[0],Re=Ie[1];function Fe(e){var t=e.payload,a=t.host,n=t.chart,r=t.format,o=t.points,i=t.group,s=t.gtime,l=t.options,c=t.after,u=t.before,d=t.dimensions,h=t.aggrMethod,p=t.groupBy,f=t.nodeIDs,m=t.chartLibrary,b=t.id,v="".concat(n,",").concat(m,",").concat(ke(d,l)),_="".concat(Object(D.a)(a),"api/v1/data"),y=Object(g.a)({chart:n,_:(new Date).valueOf(),format:r,points:o,group:i,gtime:s,options:l,after:c,before:u,dimensions:d},h&&{aggr_method:h},{},f&&{node_ids:f.join(",")},{},p&&{groupBy:p});Ne.next({url:_,params:y,onErrorCallback:function(){Ce.put(_e.e.failure({id:b})),window.chartUpdated({chartDataUniqueID:v,chart:n,data:null})},onSuccessCallback:function(e){Ce.put(_e.e.success({snapshotData:e,id:b})),window.chartUpdated({chartDataUniqueID:v,data:e})}})}function Be(){Re.next()}function He(e){var t,a,n,r,o,i,s;return E.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.payload,a=t.chart,n=t.id,r=t.host,l.next=4,Object(S.d)(ue.E);case 4:if(!(o=l.sent)){l.next=9;break}return l.next=8,Object(S.c)(_e.b.success({chartMetadata:o.charts.charts[a],id:n}));case 8:return l.abrupt("return");case 9:return s=U.b?"".concat(Object(D.a)(r),"api/v1/chart"):r.replace("/data","/chart"),l.prev=10,l.next=13,Object(S.a)(T.get,s,{params:{chart:a}});case 13:i=l.sent,l.next=22;break;case 16:return l.prev=16,l.t0=l.catch(10),console.warn("fetch chart details failure"),l.next=21,Object(S.c)(_e.b.failure({id:n}));case 21:return l.abrupt("return");case 22:return l.next=24,Object(S.c)(_e.b.success({chartMetadata:i.data,id:n}));case 24:case"end":return l.stop()}}),xe,null,[[10,16]])}function ze(e){var t,a,n,r,o,i,s,l,c,u,d;return E.a.wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return t=e.payload,a=t.poll,n=!1,r=!1,o=!1,i=!1,p.prev=6,p.next=9,Object(S.d)(ue.y);case 9:return s=p.sent,l=null===s||void 0===s?void 0:s.isCloudAvailable,c=null===s||void 0===s?void 0:s.isACLKAvailable,p.next=14,Object(S.a)(T.get,"".concat(D.b,"/api/v1/info"));case 14:return u=p.sent,d=u.data,o=(null===d||void 0===d?void 0:d["cloud-available"])||!1,n=(null===d||void 0===d?void 0:d["cloud-enabled"])||!1,r=(null===d||void 0===d?void 0:d["agent-claimed"])||!1,i=(null===d||void 0===d?void 0:d["aclk-available"])||!1,p.next=22,Object(S.c)(_e.f.success({isCloudAvailable:o,isCloudEnabled:n,isAgentClaimed:r,isACLKAvailable:i,fullInfoPayload:d}));case 22:n&&null===l&&!o&&le(),o&&r&&!1!==c&&!i&&ce(),p.next=31;break;case 26:return p.prev=26,p.t0=p.catch(6),console.warn("fetch agent info failure"),p.next=31,Object(S.c)(_e.f.failure());case 31:if(!(a&&n&&r)){p.next=36;break}return p.next=34,Object(S.b)(h.b);case 34:return p.next=36,Object(S.c)(Object(_e.f)({poll:!0}));case 36:case"end":return p.stop()}}),we,null,[[6,26]])}function Ue(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.g)(_e.c.request,Me);case 2:return e.next=4,Object(S.g)(_e.b.request,He);case 4:return e.next=6,Object(S.g)(_e.e.request,Fe);case 6:return e.next=8,Object(S.g)(b.f,Be);case 8:return e.next=10,Object(S.g)(_e.f.request,ze);case 10:return e.next=12,Object(S.e)(Ae);case 12:case"end":return e.stop()}}),Ee)}var Ge=a(284),We=a(553),Ve=a(28),Ye=a(83),Xe=.2,Ke=a(12),Ze=a(532),qe=a(49),$e=a(219),Je=a(142),Qe=E.a.mark(mt),et=E.a.mark(vt),tt=E.a.mark(_t),at=E.a.mark(yt),nt=E.a.mark(Ot),rt=E.a.mark(xt),ot=E.a.mark(wt),it=1e3,st=1e4,lt=500,ct="Notification"in window,ut=window.netdataAlarmsNotifCallback,dt=0,ht=0,pt=function(e){"object"===typeof e&&(function(e){if("string"===typeof e){var t=document.querySelector("#chart_".concat(Object(Je.a)(e)));if(t){var a=t.offsetTop+-50;return document.querySelector("html").scrollTop=a,!0}}return!1}(e.chart)&&window.focus())},ft=function(){ct&&"default"===Notification.permission&&Notification.requestPermission()},gt=function(){return ct&&"granted"===Notification.permission};function mt(e,t){var a,n;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(S.a)(T.get,"".concat(t,"/api/v1/alarm_log?after=").concat(e));case 3:return a=r.sent,n=a.data,r.abrupt("return",n);case 8:return r.prev=8,r.t0=r.catch(0),console.warn("Error fetching alarms log",r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),Qe,null,[[0,8]])}var bt=function(e,t,a){if(!e.updated){var n=e.value_string,r=t.alarms["".concat(e.chart,".").concat(e.name)];"undefined"!==typeof r&&e.status===r.status&&"undefined"!==typeof r.value_string&&(n=r.value_string);var o=e.name.replace(/_/g," "),i=e.status.toLowerCase(),s="".concat(o," = ").concat(n),l=e.alarm_id,c="images/banner-icon-144x144.png",u=!1,d=!0;switch(e.status){case"REMOVED":d=!1;break;case"UNDEFINED":case"UNINITIALIZED":return;case"CLEAR":if(e.unique_id<a)return;if("UNINITIALIZED"===e.old_status||"UNDEFINED"===e.old_status)return;if(e.no_clear_notification)return;s="".concat(o," back to normal (").concat(n,")"),c="images/check-mark-2-128-green.png",u=!1;break;case"WARNING":"CRITICAL"===e.old_status&&(i="demoted to ".concat(e.status.toLowerCase())),c="images/alert-128-orange.png",u=!1;break;case"CRITICAL":"WARNING"===e.old_status&&(i="escalated to ".concat(e.status.toLowerCase())),c="images/alert-128-red.png",u=!0;break;default:return void console.warn("invalid alarm status ".concat(e.status))}return d&&("function"===typeof ut&&(d=ut(e)),d)?{notificationTitle:s,notificationOptions:{body:"".concat(e.hostname," - ").concat(e.chart," (").concat(e.family,") - ").concat(i,": ").concat(e.info),tag:"".concat(l),requireInteraction:u,icon:D.c+c,data:e},notificationHandler:function(e){if(e.preventDefault(),e.target){var t=e.target.data;pt(t)}}}:void 0}};function vt(e,t){var a,n,r,o,i,s,l,c,u;return E.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,Object(S.a)(mt,ht,e);case 2:if(null!==(a=d.sent)&&"object"===typeof a){d.next=6;break}return console.warn("invalid alarms log response"),d.abrupt("return");case 6:if(0!==a.length){d.next=9;break}return console.log("received empty alarm log"),d.abrupt("return");case 9:n=Object(Ze.a)(Object(qe.a)("unique_id"),a),r=n.filter((function(e){return e.unique_id>ht})),o=r.map((function(e){return bt(e,t,dt)})).filter((function(e){return void 0!==e})),i=0;case 13:if(!(i<o.length)){d.next=22;break}return s=o[i],l=s.notificationTitle,c=s.notificationOptions,u=s.notificationHandler,new Notification(l,c).onclick=u,d.next=19,Object(S.b)(lt);case 19:i+=1,d.next=13;break;case 22:ht=Object($e.a)(n).unique_id,("undefined"===typeof window.netdataAlarmsRemember||window.netdataAlarmsRemember)&&localStorage.setItem("last_notification_id","".concat(ht));case 24:case"end":return d.stop()}}),et)}function _t(e,t){var a,n;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(S.a)(T.get,"".concat(t,"/api/v1/alarms?").concat(e));case 2:return a=r.sent,n=a.data,0===dt&&"number"===typeof n.latest_alarm_log_unique_id&&(dt=n.latest_alarm_log_unique_id),r.abrupt("return",n);case 6:case"end":return r.stop()}}),tt)}function yt(e){var t;return E.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=3,Object(S.a)(_t,"active",e);case 3:if(!(t=a.sent)){a.next=12;break}return a.next=7,Object(S.c)(Object(Ke.B)({activeAlarms:t}));case 7:if(!(gt()&&t.latest_alarm_log_unique_id>ht)){a.next=12;break}return a.next=10,Object(S.a)(vt,e,t);case 10:if(!1!==t.status){a.next=12;break}return a.abrupt("break",16);case 12:return a.next=14,Object(S.b)(st);case 14:a.next=0;break;case 16:case"end":return a.stop()}}),at)}function Ot(){var e,t,a;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(S.f)(Ke.A);case 2:return e=n.sent,t=e.payload,a=t.serverDefault,n.next=7,Object(S.b)(it);case 7:return ht=+(localStorage.getItem("last_notification_id")||ht),ft(),n.next=11,Object(S.a)(yt,a);case 11:case"end":return n.stop()}}),nt)}function xt(e){var t,a,n,r;return E.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload,a=t.callback,n=t.serverDefault,o.next=4,Object(S.a)(_t,"all",n);case 4:r=o.sent,a(r);case 6:case"end":return o.stop()}}),rt)}function wt(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.e)(Ot);case 2:return e.next=4,Object(S.g)(Ke.e.request,xt);case 4:case"end":return e.stop()}}),ot)}var Et=["","https://www.google.com/","https://duckduckgo.com/","https://www.reddit.com/"],St=function(e){return Et.includes(e)||e.endsWith(".my-netdata.io/")||e.startsWith("https://github.com/")||e.endsWith("netdata.cloud/")||e.startsWith("https://app.netdata.cloud/")},Ct=E.a.mark(Lt),At=E.a.mark(It),kt=E.a.mark(Nt),jt=E.a.mark(Bt),Tt=E.a.mark(Ut),Dt=E.a.mark(Gt),Pt=Object(c.a)();function Mt(){window.addEventListener("focus",(function(){Pt.put(Object(Ke.D)({hasWindowFocus:!0}))})),window.addEventListener("blur",(function(){Pt.put(Object(Ke.D)({hasWindowFocus:!1}))}))}function Lt(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Object(S.f)(Pt);case 3:return e=t.sent,t.next=6,Object(S.c)(e);case 6:t.next=0;break;case 8:case"end":return t.stop()}}),Ct)}function It(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.f)(_e.f.success);case 2:return e.abrupt("return",e.sent.payload.fullInfoPayload);case 3:case"end":return e.stop()}}),At)}function Nt(e,t){var a,n,r,o,i,s;return E.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(!window.posthog){l.next=2;break}return l.abrupt("return");case 2:return l.next=4,Object(S.d)(ue.k);case 4:if(l.t1=l.sent,l.t1){l.next=9;break}return l.next=8,Object(S.a)(It);case 8:l.t1=l.sent;case 9:if(l.t0=l.t1,l.t0){l.next=12;break}l.t0={};case 12:i=l.t0,function(e,t){var a,n,r,o;t.__SV||(window.posthog=t,t._i=[],t.init=function(i,s,l){function c(e,t){var a=t.split(".");2==a.length&&(e=e[a[0]],t=a[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}(r=e.createElement("script")).type="text/javascript",r.async=!0,r.src=s.api_host+"/static/array.js",(o=e.getElementsByTagName("script")[0]).parentNode.insertBefore(r,o);var u=t;for(void 0!==l?u=t[l]=[]:l="posthog",u.people=u.people||[],u.toString=function(e){var t="posthog";return"posthog"!==l&&(t+="."+l),e||(t+=" (stub)"),t},u.people.toString=function(){return u.toString(1)+".people (stub)"},a="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags".split(" "),n=0;n<a.length;n++)c(u,a[n]);t._i.push([i,s,l])},t.__SV=1)}(document,window.posthog||[]),window.posthog.init("mqkwGT0JNFqO-zX2t0mW6Tec9yooaVu7xCBlXtHnt5Y",{api_host:"https://posthog.netdata.cloud",loaded:function(e){t&&e.identify(t)}}),s=!Ye.a&&!St(document.referrer),"masked",window.posthog.register(Object(Ge.a)((function(e){return void 0!==e&&null!==e}),{$ip:"127.0.0.1",$current_url:Ye.a?null:"agent dashboard",$pathname:Ye.a?null:"netdata-dashboard",$host:Ye.a?null:"dashboard.netdata.io",$initial_referring_domain:s?"masked":null,$initial_referrer:s?"masked":null,$referring_domain:s?"masked":null,$referrer:s?"masked":null,event_source:"agent dashboard",netdata_version:i.version,netdata_machine_guid:e,netdata_person_id:t||"Unavailable",netdata_buildinfo:i.buildinfo,netdata_release_channel:i["release-channel"],mirrored_host_count:null===(a=i.mirrored_hosts)||void 0===a?void 0:a.length,alarms_normal:null===(n=i.alarms)||void 0===n?void 0:n.normal,alarms_warning:null===(r=i.alarms)||void 0===r?void 0:r.warning,alarms_critical:i.alarms.critical,host_os_name:i.os_name,host_os_id:i.os_id,host_os_id_like:i.os_id_like,host_os_version:i.os_version,host_os_version_id:i.os_version_id,host_os_detection:i.os_detection,system_cores_total:i.cores_total,system_total_disk_space:i.total_disk_space,system_cpu_freq:i.cpu_freq,system_ram_total:i.ram_total,system_kernel_name:i.kernel_name,system_kernel_version:i.kernel_version,system_architecture:i.architecture,system_virtualization:i.virtualization,system_virt_detection:i.virt_detection,system_container:i.container,system_container_detection:i.container_detection,container_os_name:i.container_os_name,container_os_id:i.container_os_id,container_os_id_like:i.container_os_id_like,container_os_version:i.container_os_version,container_os_version_id:i.container_os_version_id,host_collectors_count:i.collectors.length,host_cloud_enabled:i["cloud-enabled"],host_cloud_available:i["cloud-available"],host_agent_claimed:i["agent-claimed"],host_aclk_available:i["aclk-available"],host_aclk_implementation:i["aclk-implementation"],host_allmetrics_json_used:i["allmetrics-json-used"],host_allmetrics_prometheus_used:i["allmetrics-prometheus-used"],host_allmetrics_shell_used:i["allmetrics-shell-used"],host_charts_count:i["charts-count"],host_dashboard_used:i["dashboard-used"],host_metrics_count:i["metrics-count"],host_notification_methods:i["notification-methods"],config_memory_mode:i["memory-mode"],config_exporting_enabled:i["exporting-enabled"],config_exporting_connectors:i["exporting-connectors"],config_hosts_available:i["hosts-available"],config_https_enabled:i["https-enabled"],config_multidb_disk_quota:i["multidb-disk-quota"],config_page_cache_size:i["page-cache-size"],config_stream_enabled:i["stream-enabled"],config_web_enabled:i["web-enabled"],host_is_parent:null===(o=i.host_labels)||void 0===o?void 0:o._is_parent,mirrored_hosts_reachable:i.mirrored_hosts_status.filter((function(e){return e.reachable})).length,mirrored_hosts_unreachable:i.mirrored_hosts_status.filter((function(e){return!e.reachable})).length,host_collectors:i.collectors,host_is_k8s_node:i.is_k8s_node}));case 18:case"end":return l.stop()}}),kt)}var Rt=function e(t){var a=t.machineGuid,n=t.maxRedirects,r=t.name,o=t.registryServer,i=t.url;return T.get("".concat(o,"/api/v1/registry"),{headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},params:{action:"access",machine:a,name:r,url:i},withCredentials:!0}).then((function(t){var s=t.data,l="string"===typeof s.registry,c=s;if("string"===typeof s.status&&"ok"===s.status||(c=null),null===c)return l&&n>0?e({maxRedirects:n-1,machineGuid:a,name:r,registryServer:s.registry,url:i}):{registryServer:o};var u=s.urls.filter((function(e){return e[1]!==h.c}));return{personGuid:s.person_guid||null,registryServer:o,urls:u}})).catch((function(){return console.warn("error calling registry:",o),null}))},Ft=function(e){var t={};e.slice().reverse().forEach((function(e){var a=Object(A.a)(e,5),n=a[0],r=a[1],o=a[2],i=a[3],s=a[4],l=t[n]||{lastTimestamp:0,accesses:0,alternateUrls:[],guid:"",url:"",name:""},c=l.lastTimestamp<o,u={guid:l.guid||n,url:c?r:l.url,lastTimestamp:c?o:l.lastTimestamp,accesses:l.accesses+i,name:c?s:l.name,alternateUrls:l.alternateUrls.concat(r)};t[n]=u}));var a=Object(We.a)(e.slice().reverse().map((function(e){return Object(A.a)(e,1)[0]}))).map((function(e){return t[e]}));return{registryMachines:t,registryMachinesArray:a}};function Bt(e){var t,a,n,r,o,i,s,l,c,u,d,p,f,g,m;return E.a.wrap((function(b){for(;;)switch(b.prev=b.next){case 0:return t=e.payload,a=t.serverDefault,n="".concat(a,"api/v1/registry?action=hello"),b.prev=3,b.next=6,Object(S.a)(T.get,n,{headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},withCredentials:!0});case 6:r=b.sent,b.next=15;break;case 9:return b.prev=9,b.t0=b.catch(3),console.warn("error accessing registry or Do-Not-Track is enabled"),b.next=14,Object(S.c)(Ke.f.failure());case 14:return b.abrupt("return");case 15:return o=r.data.cloud_base_url,i=r.data.hostname,s=r.data.machine_guid,l=r.data.registry,c=l===Ve.b,b.next=22,Object(S.c)(Ke.f.success({cloudBaseURL:o,hostname:i,isUsingGlobalRegistry:c,machineGuid:s}));case 22:return u=c?h.c:i,d=c?h.c:a,b.next=26,Object(S.a)(Rt,{machineGuid:s,maxRedirects:2,name:u,registryServer:l,url:d});case 26:if(p=b.sent,!r.data.anonymous_statistics){b.next=30;break}return b.next=30,Object(S.e)(Nt,r.data.machine_guid,null===p||void 0===p?void 0:p.personGuid);case 30:if(!((null===p||void 0===p?void 0:p.urls)&&(null===p||void 0===p?void 0:p.personGuid))){b.next=35;break}return f=Ft(p.urls),g=f.registryMachines,m=f.registryMachinesArray,b.next=35,Object(S.c)(Object(Ke.C)({personGuid:p.personGuid,registryMachines:g,registryMachinesArray:m}));case 35:return b.next=37,Object(S.c)(Object(Ke.a)({registryServer:(null===p||void 0===p?void 0:p.registryServer)||l}));case 37:case"end":return b.stop()}}),jt,null,[[3,9]])}var Ht=function(e){return"options.".concat(e)};function zt(e){var t=e.payload,a=t.key,n=t.value;"stop_updates_when_focus_is_lost"!==a&&localStorage.setItem(Ht(a),JSON.stringify(n))}function Ut(e){var t;return E.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return(t=e.payload).isActive?document.body.className="with-panel":document.body.className="",a.next=4,Object(S.b)(1e3*Xe);case 4:return a.next=6,Object(S.c)(Object(Ke.x)({isActive:t.isActive}));case 6:case"end":return a.stop()}}),Tt)}function Gt(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.e)(Mt);case 2:return e.next=4,Object(S.e)(Lt);case 4:return e.next=6,Object(S.g)(Ke.f.request,Bt);case 6:return e.next=8,Object(S.e)(wt);case 8:return e.next=10,Object(S.g)(Ke.v,zt);case 10:return e.next=12,Object(S.g)(Ke.w,Ut);case 12:case"end":return e.stop()}}),Dt)}var Wt=a(56),Vt=E.a.mark(qt),Yt=E.a.mark($t),Xt="LOCAL-STORAGE-NEEDS-SYNC";function Kt(e){var t=e.payload,a=t.after,n=t.before;if(window.urlOptions)window.urlOptions.after===a&&window.urlOptions.before===n||window.urlOptions.netdataHighlightCallback(!0,a,n);else{var r=Object(Wt.b)(),o=Math.round(a).toString(),i=Math.round(n).toString();r.highlight_after===o&&r.highlight_before===i||Object(Wt.e)({highlight_after:o,highlight_before:i})}}function Zt(){window.urlOptions?window.urlOptions.netdataHighlightCallback(!1,0,0):Object(Wt.d)(["highlight_after","highlight_before"])}function qt(e){var t,a;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.payload,!window.showSignInModal){n.next=8;break}return window.showSignInModal(),n.next=5,Object(S.f)(b.a);case 5:a=t.signInLinkHref,window.localStorage.setItem(Xt,"true"),window.location.href=a;case 8:case"end":return n.stop()}}),Vt)}function $t(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.g)(Ke.r,Kt);case 2:return e.next=4,Object(S.g)(Ke.d,Zt);case 4:return e.next=6,Object(S.g)(b.d,qt);case 6:case"end":return e.stop()}}),Yt)}var Jt=E.a.mark(Qt);function Qt(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.e)(Gt);case 2:return e.next=4,Object(S.e)(Ue);case 4:return e.next=6,Object(S.e)($t);case 6:case"end":return e.stop()}}),Jt)}var ea=Object(c.b)(),ta=function(){var e=Object(l.e)(x,Object(l.d)(Object(l.a)(ea)));return ea.run(Qt),e}(),aa=a(270),na=a.n(aa),ra=(a(374),a(393),a(394),a(395),a(396),a(152)),oa=a.n(ra);window.$=oa.a,window.jQuery=oa.a;a(397),a(410),a(411),a(412),a(413),a(416);var ia=function(e){return new Promise((function(t,a){var n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href",e),n.onload=function(){t()},n.onerror=function(){a(Error("Error loading css: ".concat(e)))},document.getElementsByTagName("head")[0].appendChild(n)}))},sa=a(42),la=a(8),ca=a(170),ua=a(287),da=a(535),ha=a(285),pa=a(543),fa=a(560),ga=a(273),ma=a(561),ba=a(34),va=a.n(ba),_a=function(e){return"sparkline"===e.dygraphTheme},ya={dygraph:{hasToolboxPanAndZoom:!0,xssRegexIgnore:new RegExp("^/api/v1/data.result.data$"),format:"json",options:function(e){return"function"===typeof this.isLogScale?"ms|flip".concat(this.isLogScale(e)?"|abs":""):""},hasLegend:function(e){var t=e.legend,a=void 0===t||t;return!_a(e)&&Boolean(a)},trackColors:!0,pixelsPerPoint:function(e){return _a(e)?2:3},isLogScale:function(e){return"logscale"===e.dygraphTheme},containerClass:function(e){return this.hasLegend(e)?va()("netdata-container-with-legend","bottom"===e.legendPosition&&"netdata-container-with-legend--bottom"):"netdata-container"}},sparkline:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$"),format:"array",options:function(){return"flip|abs"},hasLegend:function(){return!1},trackColors:!1,pixelsPerPoint:function(){return 3},containerClass:function(){return"netdata-container"}},peity:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$"),format:"ssvcomma",options:function(){return"null2zero|flip|abs"},hasLegend:function(){return!1},trackColors:!1,pixelsPerPoint:function(){return 3},containerClass:function(){return"netdata-container"}},google:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result.rows$"),format:"datatable",options:function(){return""},hasLegend:function(){return!1},trackColors:!1,pixelsPerPoint:function(){return 4},containerClass:function(){return"netdata-container"}},d3pie:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result.data$"),format:"json",hasLegend:function(){return!1},options:function(){return"objectrows|ms"},trackColors:!1,pixelsPerPoint:function(){return 15},containerClass:function(){return"netdata-container"}},easypiechart:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$"),format:"array",options:function(){return"absolute"},hasLegend:function(){return!1},trackColors:!0,pixelsPerPoint:function(){return 3},aspectRatio:100,containerClass:function(){return"netdata-container-easypiechart"}},gauge:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$"),format:"array",options:function(){return"absolute"},hasLegend:function(){return!1},trackColors:!0,pixelsPerPoint:function(){return 3},aspectRatio:60,containerClass:function(){return"netdata-container-gauge"}},textonly:{containerClass:function(){return"netdata-container"},format:"array",hasLegend:function(){return!1},options:function(){return"absolute"},pixelsPerPoint:function(){return 3},trackColors:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$")},groupbox:{containerClass:function(){return"netdata-container"},hasLegend:function(){return!1},options:function(){return"absolute"},format:"json",trackColors:!1,pixelsPerPoint:function(){return 3},xssRegexIgnore:new RegExp("^/api/v1/data.result$")}},Oa=function(e,t){var a=e.appendOptions,n=e.overrideOptions,r="";return r+=n?n.toString():ya[e.chartLibrary].options(e),"string"===typeof a&&(r+="|".concat(encodeURIComponent(a))),r+="|jsonwrap",t&&(r+="|nonzero"),("sum-of-abs"===e.dimensionsAggrMethod||!e.dimensionsAggrMethod&&e.groupBy&&"dimension"!==e.groupBy)&&(r+="|absolute"),r},xa=a(533),wa=Math.pow(2,31)-1,Ea=a(39),Sa=a(161),Ca=function(e){var t=e.containerNode,a=e.hasEmptyData,n=window.screen.height,o=t.clientHeight,i=Math.max(.2*o,5);o-=i;var s=(i-5)/2,l=t.clientWidth/10;o>l&&(s+=(o-l)/2,o=l),o>n/20&&(s+=(o-n/20)/2,o=n/20);var c=a?" empty":" netdata",u=a?"noData":"loading";return r.a.createElement("div",{className:"netdata-message icon",style:{fontSize:o,paddingTop:s}},r.a.createElement(Sa.a,{iconType:u}),c)},Aa=a(541),ka=a(540),ja=function(e){return e.ctrlKey?window.NETDATA.options.current.pan_and_zoom_factor*window.NETDATA.options.current.pan_and_zoom_factor_multiplier_control:e.shiftKey?window.NETDATA.options.current.pan_and_zoom_factor*window.NETDATA.options.current.pan_and_zoom_factor_multiplier_shift:e.altKey?window.NETDATA.options.current.pan_and_zoom_factor*window.NETDATA.options.current.pan_and_zoom_factor_multiplier_alt:window.NETDATA.options.current.pan_and_zoom_factor},Ta=a(146),Da=a(100),Pa=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)},Ma=[],La=[],Ia=function(e,t){var a=t;return e===t?("undefined"===typeof Ma[a]&&(Ma[a]=new Intl.NumberFormat(void 0,{useGrouping:!0,minimumFractionDigits:e,maximumFractionDigits:t})),Ma[a]):0===e?("undefined"===typeof La[a]&&(La[a]=new Intl.NumberFormat(void 0,{useGrouping:!0,minimumFractionDigits:e,maximumFractionDigits:t})),La[a]):new Intl.NumberFormat(void 0,{useGrouping:!0,minimumFractionDigits:e,maximumFractionDigits:t})},Na=function(e,t,a){return function(n){if("number"!==typeof n)return"-";var r,o,i=e(n);if("number"!==typeof i)return i;if(null!==t)return t.format(i);if(-1!==a)r=a,o=a;else{r=0;var s=i<0?-i:i;o=s>1e3?0:s>10?1:s>1?2:s>.1?2:s>.01?4:s>.001?5:s>1e-4?6:7}return Ia(r,o).format(i)}},Ra=function(e){var t=e.attributes,a=e.data,r=e.units,o=e.unitsCommon,i=e.unitsDesired,s=e.uuid,l=Object(la.b)(ue.K),c=Object(la.b)(ue.z),u=Object(n.useState)((function(){return Ta.a})),d=Object(A.a)(u,2),h=d[0],p=d[1],f=Object(n.useState)(),g=Object(A.a)(f,2),m=g[0],b=g[1],v=Object(n.useState)(),_=Object(A.a)(v,2),y=_[0],O=_[1],x=Object(n.useState)(r),w=Object(A.a)(x,2),E=w[0],S=w[1],C=Object(n.useState)(-1),k=Object(A.a)(C,2),j=k[0],T=k[1],D=Object(n.useState)(null),P=Object(A.a)(D,2),M=P[0],L=P[1],I=t.decimalDigits,N=void 0===I?-1:I,R=Object(n.useMemo)((function(){return Na(h,M,N)}),[h,N,M]),F=Object(n.useRef)(R),B=function(e,t,a){F.current=Na(e,t,a)};return{legendFormatValue:R,legendFormatValueDecimalsFromMinMax:Object(n.useCallback)((function(e,t){if(Pa(m,e)&&Pa(y,t))return F.current;b(e),O(t);var n=Da.a.get(s,e,t,r,i,o,(function(e){S(e)}),l,c);p((function(){return n}));var u,d=n(e),h=n(t);if("number"!==typeof d||"number"!==typeof h)return B(n,M,N),F.current;if(a.min===a.max)u=-1;else if(-1!==N)u=N;else{var f;u=(f=d===h?Math.abs(d):Math.abs(h-d))>1e3?0:f>10?1:f>1?2:f>.1?2:f>.01?4:f>.001?5:f>1e-4?6:7}var g=M;return u!==j&&(g=u<0?null:Ia(u,u),L((function(){return g})),T(u)),B(n,g,u),F.current}),[j,N,m,y,s,l,r,i,o,c,a.min,a.max,M]),unitsCurrent:E}},Fa=a(55),Ba={r:255,g:0,b:0},Ha=a(17),za=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendContainer",componentId:"ltgk2z-0"})(["margin-bottom:",";padding-left:35px;"],Object(Z.H)(3)),Ua=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendFirstRow",componentId:"ltgk2z-1"})(["margin-top:4px;display:flex;justify-content:space-between;"]),Ga=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendSecondRow",componentId:"ltgk2z-2"})(["margin-top:4px;display:flex;justify-content:space-between;"]),Wa=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendUnit",componentId:"ltgk2z-3"})([""]),Va=$.d.span.withConfig({displayName:"chart-legend-bottomstyled__DateTimeSeparator",componentId:"ltgk2z-4"})(["margin:0 3px;"]),Ya=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendItems",componentId:"ltgk2z-5"})(["display:flex;flex-wrap:wrap;overflow:auto;max-height:80px;"]),Xa=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__DimensionItem",componentId:"ltgk2z-6"})(["display:flex;align-items:center;color:",";margin-right:12px;cursor:pointer;opacity:",";user-select:none;font-size:11px;&:focus{outline:none;}"],(function(e){return e.color}),(function(e){return e.isDisabled?.3:null})),Ka=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__DimensionItemToolboxPlaceholder",componentId:"ltgk2z-7"})(["width:140px;height:20px;"]),Za=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__DimensionIcon",componentId:"ltgk2z-8"})(["width:14px;height:7px;border-radius:4px;overflow:hidden;background-color:",";"],(function(e){return e.color})),qa=$.d.span.withConfig({displayName:"chart-legend-bottomstyled__DimensionLabel",componentId:"ltgk2z-9"})(["margin-left:3px;"]),$a=$.d.span.withConfig({displayName:"chart-legend-bottomstyled__DimensionValue",componentId:"ltgk2z-10"})(["margin-left:5px;min-width:30px;"]),Ja=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__ToolboxContainer",componentId:"ltgk2z-11"})(["position:relative;touch-action:none;"]),Qa={},en=Object(Ha.a)(Ea.f,(function(e){var t=e.dimension_names,a=e.keys;return{dimensionNames:t,keys:void 0===a?Qa:a}})),tn=function(e){var t=e.id,a=e.index,o=Object(la.b)(Object(n.useCallback)((function(e){return en(e,{id:t})}),[t])),i=o.dimensionNames,s=o.keys,l=s.chart,c=s.node;if(l&&c&&2===Object.keys(s).length)return r.a.createElement(qa,null,l[a],"@",c[a]);var u=i[a];return r.a.createElement(qa,null,u)},an=function(e){var t=e.chartUuid,a=e.chartMetadata,o=e.chartLibrary,i=e.colors,s=e.hoveredRow,l=e.hoveredX,c=e.legendFormatValue,u=e.onDimensionClick,d=e.selectedDimensions,h=e.showLatestOnBlur,p=e.unitsCurrent,f=e.viewBefore,g=Object(la.b)(Object(n.useCallback)((function(e){return Object(Ea.f)(e,{id:t})}),[t])),m=g.dimension_names,b=g.dimension_ids,v=-1===s&&!h,_=new Date(l||f),y=window.NETDATA.options.current["color_fill_opacity_".concat(a.chart_type)],O=Object(sa.b)(),x=O.localeDateString,w=O.localeTimeString,E=Object(n.useRef)(null);return Object(n.useEffect)((function(){E.current&&window.Ps.initialize(E.current,{wheelSpeed:.2,wheelPropagation:!0,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,suppressScrollX:!0,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,theme:"default"})}),[E]),r.a.createElement("div",{className:va()("netdata-chart-legend","netdata-".concat(o,"-legend"))},r.a.createElement("span",{className:"netdata-legend-title-date",title:Object(Fa.c)(!0,a)},v?Object(Fa.c)(!1,a):x(_)),r.a.createElement("br",null),r.a.createElement("span",{className:"netdata-legend-title-time",title:Object(Fa.d)(g,a)},v?a.context.toString():w(_)),r.a.createElement("br",null),r.a.createElement("span",{className:"netdata-legend-title-units"},p),r.a.createElement("br",null),r.a.createElement("div",{className:"netdata-legend-series",ref:E},r.a.createElement("div",{className:"netdata-legend-series-content"},b.map((function(e,o){var l,h=m[o],p=i[h],f=function(e){if(!e)return Ba;var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,a,n){return t+t+a+a+n+n})),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return a||console.warn("wrong color format:",e),a?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:Ba}(p),b=0===d.length||d.includes(h);if(v)l=null;else if(-1!==s){var _=g.result.data[s];l=_?_[o+1]:null}else l=g.view_latest_values[o];return r.a.createElement(n.Fragment,{key:e},0!==o&&r.a.createElement("br",null),r.a.createElement("span",{title:h,className:va()("netdata-legend-name",b?"selected":"not-selected"),onClick:function(e){u(h,e)},role:"button",style:{color:p},tabIndex:0},r.a.createElement("table",{className:"netdata-legend-name-table-".concat(a.chart_type),style:{backgroundColor:"rgba(".concat(f.r,",").concat(f.g,",").concat(f.b,",").concat(y,")")}},r.a.createElement("tbody",null,r.a.createElement("tr",{className:"netdata-legend-name-tr"},r.a.createElement("td",{className:"netdata-legend-name-td"}))))," ",r.a.createElement(tn,{id:t,index:o})),r.a.createElement("span",{title:h,className:va()("netdata-legend-value",!b&&"hidden"),onClick:function(e){u(h,e)},role:"button",style:{color:p},tabIndex:0},c(l)))})))))},nn=function(e){var t=e.chartMetadata,a=e.showUndefined,n=e.hoveredX,o=e.viewBefore,i=e.chartData,s=Object(sa.b)(),l=s.localeDateString,c=s.localeTimeString,u=new Date(n||o);return r.a.createElement("div",null,r.a.createElement("span",{title:Object(Fa.c)(!0,t)},a?Object(Fa.c)(!1,t):l(u)),r.a.createElement(Va,null,"|"),r.a.createElement("span",{title:Object(Fa.d)(i,t)},a?t.context.toString():c(u)))},rn=function(e){var t=e.chartUuid,a=e.chartMetadata,o=e.colors,i=e.hoveredRow,s=e.hoveredX,l=e.legendFormatValue,c=e.onDimensionClick,u=e.selectedDimensions,d=e.showLatestOnBlur,h=e.unitsCurrent,p=e.viewBefore,f=e.legendToolbox,g=e.resizeHandler,m=-1===i&&!d,b=Object(la.b)(Object(n.useCallback)((function(e){return Object(Ea.f)(e,{id:t})}),[t])),v=b.dimension_names,_=b.dimension_ids;return r.a.createElement(za,null,r.a.createElement(Ua,null,r.a.createElement(Wa,null,h),r.a.createElement(nn,{chartMetadata:a,showUndefined:m,hoveredX:s,viewBefore:p,chartData:b})),r.a.createElement(Ga,null,r.a.createElement(Ya,null,_.map((function(e,a){var n,s=v[a],d=o[s],h=0===u.length||u.includes(s);if(m)n=null;else if(-1!==i){var p=b.result.data[i];n=p?p[a+1]:null}else n=b.view_latest_values[a];return r.a.createElement(Xa,{color:d,onClick:function(e){c(s,e)},role:"button",tabIndex:0,isDisabled:!h,key:e},r.a.createElement(Za,{title:s,color:d}),r.a.createElement(tn,{id:t,index:a}),r.a.createElement($a,null,h&&l(n)))})),r.a.createElement(Ka,null)),r.a.createElement(Ja,null,f,g)))},on=function(e){var t=e.attributes,a=e.chartUuid,o=e.chartMetadata,i=e.chartLibrary,s=e.colors,l=e.hoveredRow,c=e.hoveredX,u=e.legendFormatValue,d=e.selectedDimensions,h=e.setSelectedDimensions,p=e.showLatestOnBlur,f=e.unitsCurrent,g=e.viewBefore,m=e.legendToolbox,b=e.resizeHandler,v=Object(la.b)(Object(n.useCallback)((function(e){return Object(Ea.f)(e,{id:a}).dimension_names}),[a])),_=function(e,t){t.preventDefault();var a=t.shiftKey||t.ctrlKey,n=Object(Fa.b)({allDimensions:v,selectedDimensions:d,clickedDimensionName:e,isModifierKeyPressed:a});h(n)};return"bottom"===t.legendPosition?r.a.createElement(rn,{chartUuid:a,chartLibrary:i,chartMetadata:o,colors:s,hoveredRow:l,hoveredX:c,legendFormatValue:u,onDimensionClick:_,selectedDimensions:d,showLatestOnBlur:p,unitsCurrent:f,viewBefore:g,legendToolbox:m,resizeHandler:b}):r.a.createElement(an,{chartUuid:a,chartLibrary:i,chartMetadata:o,colors:s,hoveredRow:l,hoveredX:c,legendFormatValue:u,onDimensionClick:_,selectedDimensions:d,showLatestOnBlur:p,unitsCurrent:f,viewBefore:g})},sn=a(110),ln=function(e){var t=e.onToolboxLeftClick,a=e.onToolboxRightClick,n=e.onToolboxZoomInClick,o=e.onToolboxZoomOutClick;return r.a.createElement("div",{className:"netdata-legend-toolbox"},r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:t,iconType:"left",popoverTitle:"Pan Left",popoverContent:"Pan the chart to the left. You can also <b>drag it</b> with your mouse or your finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>"}),r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:a,iconType:"right",popoverTitle:"Pan Right",popoverContent:"Pan the chart to the right. You can also <b>drag it</b> with your mouse or your finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>"}),r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:n,iconType:"zoomIn",popoverTitle:"Chart Zoom In",popoverContent:"Zoom in the chart. You can also press SHIFT and select an area of the chart, or press SHIFT or ALT and use the mouse wheel or 2-finger touchpad scroll to zoom in or out. <br/><small>Help can be disabled from the settings.</small>"}),r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:o,iconType:"zoomOut",popoverTitle:"Chart Zoom Out",popoverContent:"Zoom out the chart. You can also press SHIFT or ALT and use the mouse wheel, or 2-finger touchpad scroll to zoom in or out.<br/><small>Help can be disabled from the settings.</small>"}))},cn=a(104),un=a(503),dn=a(534),hn=a(51),pn=a.n(hn),fn=(a(418),a(271)),gn=a(272),mn=a(500),bn=a(215),vn=a.n(bn),_n=function(e,t){return e.map((function(e){var a=Object(gn.a)(e),n=a[0],r=a.slice(1),o=[],i=0,s=0;return r.map((function(e,a){return{isVisible:t[a],value:e}})).slice().reverse().forEach((function(e){var t=e.isVisible,a=e.value;t?a>=0?(s+=a,o.push(s)):(i+=a,o.push(i)):o.push(0)})),[n].concat(o)}))},yn=function(e,t,a,n){var r,o=n.isLogScale(e),i=e.dygraphType,s=void 0===i?a.chart_type:i,l=e.groupBy;if(l&&"dimension"!==l&&("percentage"===(r=a.units)||"percent"===r||-1!==r.indexOf("%")))return"line";var c=s;return"stacked"===c&&1===t.dimensions&&(c="area"),"stacked"===c&&o&&(c="area"),c},On=Object(mn.a)(Object(da.a)("true"),(function(){return vn()(window.NETDATA.themes.current.background)})),xn=function(e){return e.map((function(e){return vn()(e).mix(On(),.2).hex()}))},wn=function(e,t){return e?window.NETDATA.options.current.color_fill_opacity_fake_stacked:"stacked"===t?window.NETDATA.options.current.color_fill_opacity_stacked:window.NETDATA.options.current.color_fill_opacity_area},En=(a(436),a(536)),Sn=function(e,t){var a=Object(En.a)(!1),r=Object(A.a)(a,2),o=r[0],i=r[1],s=Object(n.useRef)(null),l=Object(n.useCallback)((function(a){var n=a.getArea().x,r=a.toDomXCoord(1e3*t.current.chartData.first_entry),o=r>n;if(i(o),o&&s.current){var l=e.current.getBoundingClientRect().height;s.current.style.left="".concat(n,"px"),s.current.style.right="calc(100% - ".concat(r,"px)"),s.current.style.top="".concat(l/2,"px")}}),[]);return[o,s,l]},Cn=function(e,t,a,n){e.current.style.left="".concat(t,"px"),e.current.style.right="calc(100% - ".concat(a,"px)"),e.current.style.top=n},An=function(){var e=Object(En.a)(!1),t=Object(A.a)(e,2),a=t[0],r=t[1],o=Object(n.useRef)(null);return[a,o,function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Cn;if(e){if(o.current){r(!0);var i=t.getArea(),s=i.x;n(o,s,a,"40px")}}else r(!1)}]},kn=$.d.div.withConfig({displayName:"proceeded-chart-disclaimer__Container",componentId:"sc-5o8wdv-0"})(["display:block;"]),jn=Object(n.forwardRef)((function(e,t){return r.a.createElement(kn,{ref:t,className:"dygraph__history-tip","data-testid":"proceededChartDisclaimer"},r.a.createElement("span",{className:"dygraph__history-tip-content"},"Want to extend your history of real-time metrics?",r.a.createElement("br",null),r.a.createElement("a",{href:"https://learn.netdata.cloud/guides/longer-metrics-storage/",target:"_blank",rel:"noopener noreferrer","data-testid":"proceededChartDisclaimer-configure"},"Configure Netdata's\xa0",r.a.createElement("b",null,"history")),"\xa0or use the\xa0",r.a.createElement("a",{href:"https://learn.netdata.cloud/docs/agent/database/engine/",target:"_blank",rel:"noopener noreferrer","data-testid":"proceededChartDisclaimer-engine"},"DB engine"),"."))})),Tn={WARNING:"#FFF8E1",CRITICAL:"#FFEBEF",CLEAR:"#E5F5E8"},Dn=function(e){return Tn[e]||null},Pn={WARNING:"#FFC300",CRITICAL:"#F59B9B",CLEAR:"#68C47D"},Mn=function(e){return Pn[e]||null},Ln={WARNING:"#536775",CRITICAL:"#FF4136",CLEAR:"#00AB44"},In=function(e){return Ln[e]||null},Nn=$.d.div.withConfig({displayName:"alarmBadge__Container",componentId:"tz967u-0"})(["position:absolute;margin-right:10px;overflow:hidden;pointer-events:none;direction:rtl;z-index:10;"]),Rn=$.d.div.withConfig({displayName:"alarmBadge__Badge",componentId:"tz967u-1"})(["display:inline-block;border-radius:36px;padding:2px 12px;background:",";border:1px solid ",";color:",";font-size:12px;font-weight:700;direction:ltr;white-space:nowrap;"],(function(e){return e.background}),(function(e){return e.border}),(function(e){return e.color})),Fn=Object(n.forwardRef)((function(e,t){var a=e.isVisible,n=e.status,o=e.label;return r.a.createElement(Nn,{ref:t},a&&r.a.createElement(Rn,{background:Dn(n),border:Mn(n),color:In(n)},o))})),Bn=$.d.div.withConfig({displayName:"neutralPill__Container",componentId:"gtu76-0"})(["position:absolute;margin-right:10px;overflow:hidden;pointer-events:none;direction:rtl;z-index:10;"]),Hn=$.d.div.withConfig({displayName:"neutralPill__Badge",componentId:"gtu76-1"})(["display:inline-block;border-radius:36px;padding:2px 12px;background:",";border:1px solid ",";color:",";font-size:12px;font-weight:700;direction:ltr;white-space:nowrap;"],Object(Z.F)("mainBackground"),Object(Z.F)("border"),Object(Z.F)("text")),zn=Object(n.forwardRef)((function(e,t){var a=e.isVisible,n=(e.before-e.after)/1e3;return r.a.createElement(Bn,{ref:t},a&&r.a.createElement(Hn,null,Math.round(n)," sec.",function(e){return e<15?" (Select at least 15 sec)":e>180?" (Select up to 180 sec)":""}(n)))})),Un=function(e){var t=e.attributes,a=e.chartData,n=e.chartMetadata,r=e.chartSettings,o=e.dimensionsVisibility,i=e.hiddenLabelsElementId,s=e.isFakeStacked,l=e.orderedColors,c=e.setMinMax,u=e.shouldSmoothPlot,d=e.unitsCurrent,h=e.xAxisDateString,p=e.xAxisTimeString,f="sparkline"===t.dygraphTheme,g=f?3:4,m=r.isLogScale(t),b=yn(t,a,n,r),v=t.dygraphSmooth,_=void 0===v?"line"===b&&!f:v,y=t.dygraphDrawAxis,O=void 0===y||y,x="bottom"===t.legendPosition,w=t.dygraphColors,E=void 0===w?l:w,S=t.dygraphRightGap,C=void 0===S?5:S,A=t.dygraphShowRangeSelector,k=void 0!==A&&A,j=t.dygraphShowRoller,T=void 0!==j&&j,D=t.dygraphTitle,P=void 0===D?t.title||n.title:D,M=t.dygraphTitleHeight,L=void 0===M?19:M,I=t.dygraphLegend,N=void 0===I?"always":I,R=t.dygraphLabelsDiv,F=void 0===R?i:R,B=t.dygraphLabelsSeparateLine,H=void 0===B||B,z=t.dygraphIncludeZero,U=void 0===z?"stacked"===b:z,G=t.dygraphShowZeroValues,V=void 0===G||G,Y=t.dygraphShowLabelsOnHighLight,X=void 0===Y||Y,K=t.dygraphHideOverlayOnMouseOut,Z=void 0===K||K,q=t.dygraphXRangePad,$=void 0===q?0:q,J=t.dygraphYRangePad,Q=void 0===J?1:J,ee=t.dygraphValueRange,te=void 0===ee?[null,null]:ee,ae=t.dygraphYLabelWidth,ne=void 0===ae?12:ae,re=t.dygraphStrokeWidth,oe=void 0===re?"stacked"===b?.1:!0===_?1.5:.7:re,ie=t.dygraphStrokePattern,se=t.dygraphDrawPoints,le=void 0!==se&&se,ce=t.dygraphDrawGapEdgePoints,ue=void 0===ce||ce,de=t.dygraphConnectSeparatedPoints,he=void 0!==de&&de,pe=t.dygraphPointSize,fe=void 0===pe?1:pe,ge=t.dygraphStepPlot,me=void 0!==ge&&ge,be=t.dygraphStrokeBorderColor,ve=void 0===be?window.NETDATA.themes.current.background:be,_e=t.dygraphStrokeBorderWidth,ye=void 0===_e?0:_e,Oe=t.dygraphFillGraph,xe=void 0===Oe?"area"===b||"stacked"===b:Oe,we=t.dygraphFillAlpha,Ee=void 0===we?wn(s,b):we,Se=t.dygraphStackedGraph,Ce=void 0===Se?"stacked"===b&&!s:Se,Ae=t.dygraphStackedGraphNanFill,ke=void 0===Ae?"none":Ae,je=t.dygraphAxisLabelFontSize,Te=void 0===je?10:je,De=t.dygraphAxisLineColor,Pe=void 0===De?window.NETDATA.themes.current.axis:De,Me=t.dygraphAxisLineWidth,Le=void 0===Me?1:Me,Ie=t.dygraphDrawGrid,Ne=void 0===Ie||Ie,Re=t.dygraphGridLinePattern,Fe=t.dygraphGridLineWidth,Be=void 0===Fe?1:Fe,He=t.dygraphGridLineColor,ze=void 0===He?window.NETDATA.themes.current.grid:He,Ue=t.dygraphMaxNumberWidth,Ge=void 0===Ue?8:Ue,We=t.dygraphSigFigs,Ve=t.dygraphDigitsAfterDecimal,Ye=void 0===Ve?2:Ve,Xe=t.dygraphHighlighCircleSize,Ke=void 0===Xe?g:Xe,Ze=t.dygraphHighlightSeriesOpts,qe=t.dygraphHighlightSeriesBackgroundAlpha,$e=t.dygraphXPixelsPerLabel,Je=void 0===$e?50:$e,Qe=t.dygraphXAxisLabelWidth,et=void 0===Qe?60:Qe,tt=t.dygraphDrawXAxis,at=void 0===tt?O:tt,nt=t.dygraphYPixelsPerLabel,rt=void 0===nt?15:nt,ot=t.dygraphYAxisLabelWidth,it=void 0===ot?x?30:50:ot,st=t.dygraphDrawYAxis,lt=void 0===st?O:st;return{colors:s?xn(Object(W.a)(E)):E,rightGap:f?0:C,showRangeSelector:k,showRoller:T,title:f?void 0:P,titleHeight:L,legend:N,labels:a.result.labels,labelsDiv:F,labelsSeparateLines:!!f||H,labelsShowZeroValues:!m&&V,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:X,hideOverlayOnMouseOut:Z,includeZero:U,xRangePad:$,yRangePad:f?1:Q,valueRange:te,ylabel:f||x?void 0:d,yLabelWidth:f||x?0:ne,plotter:_&&u?window.smoothPlotter:null,strokeWidth:oe,strokePattern:ie,drawPoints:le,drawGapEdgePoints:ue,connectSeparatedPoints:!m&&he,pointSize:fe,stepPlot:me,strokeBorderColor:ve,strokeBorderWidth:ye,fillGraph:xe,fillAlpha:Ee,stackedGraph:Ce,stackedGraphNaNFill:ke,drawAxis:!f&&O,axisLabelFontSize:Te,axisLineColor:Pe,axisLineWidth:Le,drawGrid:!f&&Ne,gridLinePattern:Re,gridLineWidth:Be,gridLineColor:ze,maxNumberWidth:Ge,sigFigs:We,digitsAfterDecimal:Ye,highlightCircleSize:Ke,highlightSeriesOpts:Ze,highlightSeriesBackgroundAlpha:qe,visibility:o,logscale:m,axes:{x:{pixelsPerLabel:Je,ticker:pn.a.dateTicker,axisLabelWidth:et,drawAxis:!f&&at,axisLabelFormatter:function(e){return e.toTimeString().startsWith("00:00:00")?h(e):p(e)}},y:{logscale:m,pixelsPerLabel:rt,axisLabelWidth:it,drawAxis:!f&<,axisLabelFormatter:function(e){return c([this.axes_[0].extremeRange[0],this.axes_[0].extremeRange[1]])(e)}}}}},Gn=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.chartLibrary,c=e.chartUuid,u=e.dimensionsVisibility,d=e.hasEmptyData,h=e.hasLegend,p=e.isRemotelyControlled,f=e.onUpdateChartPanAndZoom,m=e.orderedColors,b=e.immediatelyDispatchPanAndZoom,v=e.hoveredRow,_=e.hoveredX,y=e.setGlobalChartUnderlay,O=e.setHoveredX,x=e.setMinMax,w=e.unitsCurrent,E=e.viewAfter,S=e.viewBefore,k=Object(la.b)(ue.l),j=Object(la.b)(ue.d),T=(null===j||void 0===j?void 0:j.chartId)===a.id?j:null,D=Object(la.b)(ue.M),P=Object(sa.b)(),M=P.xAxisDateString,L=P.xAxisTimeString,I=ya[l],N="".concat(c,"-hidden-labels-id"),R=yn(t,a,o,I),F=a.min<0&&"stacked"===R,B=wn(F,R),H=Object(n.useRef)(null),z=Object(n.useCallback)((function(e){var t=e.after,a=e.before,n=e.callback,r=e.shouldNotExceedAvailableRange;f({after:t,before:a,callback:n,masterID:c,shouldNotExceedAvailableRange:r})}),[c,f]),U=Object(n.useRef)(),G=Object(n.useRef)(!1),V=Object(n.useRef)(!1),Y=Object(n.useRef)(null),X=Object(n.useRef)(0),K=Object(n.useRef)(0),Z=Object(n.useRef)(),q=Object(la.a)(),$=Object(la.b)(ue.I),J=Object(n.useCallback)((function(){G.current=!1,U.current&&U.current.updateOptions({dateWindow:null}),q($?Object(Ke.j)():Object(_e.g)({id:c}))}),[c,q,$]),Q=An(),ee=Object(A.a)(Q,3),te=ee[0],ae=ee[1],ne=ee[2],re=An(),oe=Object(A.a)(re,3),ie=oe[0],se=oe[1],le=oe[2],ce=Object(n.useRef)({alarm:T,chartData:a,globalChartUnderlay:k,hoveredX:_,immediatelyDispatchPanAndZoom:b,resetGlobalPanAndZoom:J,setGlobalChartUnderlay:y,updateAlarmBadge:ne,updateHighlightBadge:le,updateChartPanOrZoom:z,viewAfter:E,viewBefore:S}),de=Sn(H,ce),he=Object(A.a)(de,3),pe=he[0],fe=he[1],ge=he[2];Object(n.useLayoutEffect)((function(){ce.current.alarm=T,ce.current.chartData=a,ce.current.hoveredX=_,ce.current.immediatelyDispatchPanAndZoom=b,ce.current.globalChartUnderlay=k,ce.current.resetGlobalPanAndZoom=J,ce.current.setGlobalChartUnderlay=y,ce.current.updateAlarmBadge=ne,ce.current.updateHighlightBadge=le,ce.current.updateChartPanOrZoom=z,ce.current.viewAfter=E,ce.current.viewBefore=S}),[T,a,k,_,b,J,y,ne,le,z,E,S]);var me=Object(n.useState)(null),be=Object(A.a)(me,2),ve=be[0],ye=be[1],Oe=Object(la.b)(ue.D);Object(n.useLayoutEffect)((function(){if(H&&H.current&&!U.current&&!d){var e=Un({attributes:t,chartData:a,chartMetadata:o,chartSettings:I,dimensionsVisibility:u,hiddenLabelsElementId:N,isFakeStacked:F,orderedColors:m,setMinMax:x,shouldSmoothPlot:Oe,unitsCurrent:w,xAxisDateString:M,xAxisTimeString:L});G.current=!1;var n=Object(g.a)({},e,{dateWindow:[ce.current.viewAfter,ce.current.viewBefore],highlightCallback:function(e,t){var a=V.current?null:t;a!==ce.current.hoveredX&&O(a)},unhighlightCallback:function(){null!==ce.current.hoveredX&&O(null)},drawCallback:function(e){if(G.current){G.current=!1;var t=e.xAxisRange(),a=Math.round(t[0]),n=Math.round(t[1]);(function(e){var t=e.after,a=e.before,n=e.chartData;return t>=1e3*n.first_entry&&a<=1e3*n.last_entry})({after:a,before:n,chartData:ce.current.chartData})&&ce.current.updateChartPanOrZoom({after:a,before:n})}},zoomCallback:function(e,t){G.current=!0,ce.current.updateChartPanOrZoom({after:e,before:t})},underlayCallback:function(e,t,a){if(ge(a),ce.current.alarm){var n=ce.current.alarm,r=a.toDomXCoord(1e3*n.when),o=Mn(n.status);requestAnimationFrame((function(){e.fillStyle=o;var a=e.globalAlpha;e.globalAlpha=.7,e.fillRect(r-3,t.y,6,t.h),e.globalAlpha=a})),ce.current.updateAlarmBadge(ce.current.alarm,a,r-3)}if(Object(Wt.c)("metrics_correlation")&&ce.current.globalChartUnderlay){var i=ce.current.globalChartUnderlay,s=i.before,l=i.masterID;if(l&&l!==ce.current.chartData.id)ce.current.updateHighlightBadge(!1);else{ce.current.updateHighlightBadge(!0,a,a.toDomXCoord(s),(function(e,t,a,n){e.current.style.left="".concat(a+3,"px"),e.current.style.top=n}))}}else ce.current.updateHighlightBadge(!1);if(ce.current.globalChartUnderlay){var c=ce.current.globalChartUnderlay,u=c.after,d=c.before;if(u<d){var h=a.toDomCoords(u,-20),p=a.toDomCoords(d,20),f=h[0],g=p[0];e.fillStyle=window.NETDATA.themes.current.highlight,e.fillRect(f,t.y,g-f,t.h)}}},interactionModel:{mousedown:function(e,t,a){e.button&&2===e.button||(G.current=!0,V.current=!0,a.initializeMouseDown(e,t,a),a.tarp.tarps=a.tarp.tarps.filter((function(e){var t=Number(e.style.left.replace("px",""))>1e4;return t&&e.parentNode.removeChild(e),!t})),q(Object(Ke.t)()),e.button&&1===e.button?e.shiftKey?(Y.current=null,pn.a.startPan(e,t,a)):e.altKey||e.ctrlKey||e.metaKey?(Y.current=t.toDataXCoord(e.offsetX),pn.a.startZoom(e,t,a)):(Y.current=null,pn.a.startZoom(e,t,a)):e.shiftKey?(Y.current=null,pn.a.startZoom(e,t,a)):e.altKey||e.ctrlKey||e.metaKey?(Y.current=t.toDataXCoord(e.offsetX),pn.a.startZoom(e,t,a)):(Y.current=null,pn.a.startPan(e,t,a)))},mousemove:function(e,t,a){if(null!==Y.current){if(G.current=!0,pn.a.moveZoom(e,t,a),Object(Wt.c)("metrics_correlation")){var n=t.toDataXCoord(e.offsetX),r=Y.current;n-r>1e3&&(ye({after:r,before:n}),ce.current.updateHighlightBadge(!0,t,t.toDomXCoord(n),(function(e,t,a,n){e.current.style.left="".concat(a,"px"),e.current.style.top=n})))}e.preventDefault()}else a.isPanning?(G.current=!0,a.is2DPan=!1,pn.a.movePan(e,t,a)):a.isZooming&&pn.a.moveZoom(e,t,a)},mouseup:function(e,t,n){if(V.current=!1,null!==Y.current){var r=Object(Ze.a)((function(e){return+e}),[Y.current,t.toDataXCoord(e.offsetX)]);ce.current.setGlobalChartUnderlay({after:r[0],before:r[1],masterID:a.id}),Y.current=null,ye(null),n.isZooming=!1,t.clearZoomRect_(),t.drawGraph_(!1)}else n.isPanning?(G.current=!0,pn.a.endPan(e,t,n),ce.current.immediatelyDispatchPanAndZoom()):n.isZooming&&(G.current=!0,pn.a.endZoom(e,t,n),ce.current.immediatelyDispatchPanAndZoom())},wheel:function(e,t){function a(e,t,a){var n=(e[1]-e[0])*t,r=[n*a,n*(1-a)];return[e[0]+r[0],e[1]-r[1]]}if(e.altKey||e.shiftKey){var n;G.current=!0,n="number"!==typeof e.wheelDelta||Number.isNaN(e.wheelDelta)?-1.2*e.deltaY:e.wheelDelta/40;var r=(e.detail?-1*e.detail:n)/50,o=function(e,t,a){var n=e.toDomXCoord(e.xAxisRange()[0]),r=e.yAxisRange(0),o=e.toDomYCoord(r[1]),i=t-n,s=a-o,l=e.toDomXCoord(e.xAxisRange()[1])-n,c=e.toDomYCoord(r[0])-o;return[0===l?0:i/l,1-(0===c?0:s/c)]}(t,e.offsetX,e.offsetY),i=o[0],s=o[1],l=function(e,t,n,r){for(var o=e.yAxisRanges(),i=[],s=0;s<o.length;s+=1)i[s]=a(o[s],t,r||.5);return a(e.xAxisRange(),t,n||.5)}(t,r,i,s),c=Object(A.a)(l,2),u=c[0],d=c[1];ce.current.updateChartPanOrZoom({after:u,before:d,shouldNotExceedAvailableRange:!0,callback:function(e,a){t.updateOptions({dateWindow:[e,a]})}}),e.preventDefault()}},click:function(e){e.preventDefault()},dblclick:function(){q(Object(Ke.k)({forcePlay:!1})),ce.current.resetGlobalPanAndZoom()},touchstart:function(e,t,a){V.current=!0,G.current=!0,pn.a.defaultInteractionModel.touchstart(e,t,a),a.touchDirections={x:!0,y:!1},X.current=0,"number"===typeof e.touches[0].pageX?K.current=e.touches[0].pageX:K.current=0},touchmove:function(e,t,a){G.current=!0,pn.a.defaultInteractionModel.touchmove(e,t,a),X.current=Date.now()},touchend:function(e,t,a){if(V.current=!1,G.current=!0,pn.a.defaultInteractionModel.touchend(e,t,a),0===X.current&&0!==K.current&&H.current){G.current=!1;var n=t.plotter_,r=(K.current-(n.area.x+H.current.getBoundingClientRect().left))/n.area.w,o=ce.current,i=Math.round(o.viewAfter+(o.viewBefore-o.viewAfter)*r);O(i,!0)}var s=Date.now();"undefined"!==typeof Z.current&&(0===X.current&&s-Z.current<=window.NETDATA.options.current.double_click_speed&&ce.current.resetGlobalPanAndZoom());Z.current=s,ce.current.immediatelyDispatchPanAndZoom()}}}),r=F?_n(a.result.data,u):a.result.data,i=new pn.a(H.current,r,n);U.current=i}}),[t,a,o,I,c,u,d,N,F,m,O,x,Oe,w,M,L,ge,q]),Object(fa.a)((function(){if(U.current){var e="sparkline"===t.dygraphTheme,a="bottom"===t.legendPosition;U.current.updateOptions({ylabel:e||a?void 0:w})}}),[t,w]),Object(fa.a)((function(){U.current&&U.current.updateOptions({})}),[T,k]);var xe=Object(la.b)(ue.G);Object(fa.a)((function(){U.current&&window.requestAnimationFrame((function(){U.current&&U.current.resize()}))}),[xe]),Object(fa.a)((function(){if(U.current&&!d){var e=[E,S],n=U.current.xAxisRange(),r=Math.abs(S-E-(n[1]-n[0]))>5e3,o=S<=0&&n[1]>S&&n[0]>E&&!r,i=p&&!o?{dateWindow:e}:{},s=t.dygraphColors,l=void 0===s?m:s,c=F?_n(a.result.data,u):a.result.data,h=1===u.length||u.filter((function(e){return!0===e})).length>1;U.current.updateOptions(Object(g.a)({},i,{colors:F?xn(Object(W.a)(l)):l,file:c,labels:a.result.labels,fillAlpha:B},"stacked"===R?{includeZero:h}:{},{stackedGraph:"stacked"===R&&!F,visibility:F?Object(W.a)(u):u}))}}),[t,a.result,c,u,R,B,d,F,p,m,E,S]),Object(fa.a)((function(){if(U.current){var e=Un({attributes:t,chartData:a,chartMetadata:o,chartSettings:I,dimensionsVisibility:u,hiddenLabelsElementId:N,isFakeStacked:F,orderedColors:m,setMinMax:x,shouldSmoothPlot:Oe,unitsCurrent:w,xAxisDateString:M,xAxisTimeString:L});d||U.current.updateOptions(e)}}),[R,D]);var we=Object(la.b)(ue.p);Object(n.useLayoutEffect)((function(){if(U.current&&we!==c){if(-1===v)return void(-1!==U.current.getSelection()&&U.current.clearSelection());U.current.setSelection(v)}}),[a,c,we,v,E,S]);var Ee=Object(la.b)((function(e){return Object(Ea.l)(e,{id:c})}));Object(n.useLayoutEffect)((function(){U.current&&U.current.resize()}),[Ee,a.dimension_names.length]);var Se=Object(la.b)((function(e){return t.commonMin?Object(ue.h)(e,t.commonMin):void 0})),Ce=Object(la.b)((function(e){return t.commonMax?Object(ue.g)(e,t.commonMax):void 0}));Object(n.useLayoutEffect)((function(){var e=t.commonMin,a=t.commonMax;if(U.current&&(e||a)){var n=U.current.yAxisExtremes()[0],r=Object(A.a)(n,2),o=r[0],i=r[1],s=t.dygraphValueRange,l=void 0===s?[null,null]:s,u=null===l[0],d=null===l[1],h=!1,p=Object(C.a)(n);if(e&&u&&Se&&Se.currentExtreme<o&&(p[0]=Se.currentExtreme,h=!0),a&&d&&Ce&&Ce.currentExtreme>i&&(p[1]=Ce.currentExtreme,h=!0),h){U.current.updateOptions({valueRange:p});var f=U.current.yAxisExtremes()[0];p=Object(C.a)(f)}e&&u&&p[0]!==(null===Se||void 0===Se?void 0:Se.charts[c])&&q(Object(Ke.p)({chartUuid:c,commonMinKey:e,value:p[0]})),a&&d&&p[1]!==(null===Ce||void 0===Ce?void 0:Ce.charts[c])&&q(Object(Ke.o)({chartUuid:c,commonMaxKey:a,value:p[1]}))}}),[t,a.result,c,Se,Ce,q]),Object(n.useLayoutEffect)((function(){pe&&U.current&&ge(U.current)}),[pe]),Object(ga.a)((function(){U.current&&U.current.destroy()}));var Ae=Object(n.useRef)();Object(dn.a)((function(){if(t.detectResize){var e=!1,a=function(e,t){var a=null;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null!==a&&(clearTimeout(a),a=null),a=setTimeout((function(){return e.apply(void 0,r)}),t)}}((function(){e?U.current&&U.current.resize():e=!0}),500);Ae.current=new fn.a((function(){a()})),Ae.current.observe(H.current)}})),Object(ga.a)((function(){U.current=null,Ae.current&&Ae.current.disconnect()}));var ke="bottom"===t.legendPosition;return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{ref:H,id:s,className:va()(i,{"dygraph-chart--legend-bottom":ke})}),pe&&h&&r.a.createElement(jn,{ref:fe}),(null===T||void 0===T?void 0:T.value)&&h&&r.a.createElement(Fn,{isVisible:te,ref:ae,status:T.status,label:T.value}),h&&r.a.createElement(zn,Object.assign({isVisible:ie,ref:se},k,ve)),r.a.createElement("div",{className:"dygraph-chart__labels-hidden",id:N}))},Wn=a(274),Vn=a.n(Wn),Yn=a(193),Xn=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.chartWidth,c=e.hoveredRow,u=e.legendFormatValue,d=e.orderedColors,h=e.setMinMax,p=e.showUndefined,f=e.unitsCurrent,g=Object(n.useRef)(null),m=Object(n.useState)(),b=Object(A.a)(m,2),v=b[0],_=b[1],y=-1===c?0:a.result.length-1-c,O=p?null:a.result[y],x=t.easyPieChartMinValue,w=void 0===x?a.min:x,E=t.easyPieChartMaxValue,S=void 0===E?a.max:E,C=Object(de.a)(Object(Yn.a)((function(e){return+e})),Object(Ze.a)(Ta.a),(function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return[Math.min(a,O||0),Math.max(n,O||0)]}))([w,S]);Object(n.useEffect)((function(){h(C)}),[C]);var k=function(e){var t,a=e.value,n=void 0===a?0:a,r=e.min,o=void 0===r?0:r,i=e.max,s=void 0===i?0:i;return!e.isMinOverride&&o>0&&(o=0),!e.isMaxOverride&&s<0&&(s=0),o<0&&s>0?(s=-o>s?-o:s,t=Math.round(100*n/s)):n>=0&&o>=0&&s>=0?0===(t=Math.round(100*(n-o)/(s-o)))&&(t=.1):0===(t=Math.round(100*(n-s)/(s-o)))&&(t=-.1),t}({value:p?0:O,min:C[0],max:C[1],isMinOverride:void 0!==t.easyPieChartMinValue,isMaxOverride:void 0!==t.easyPieChartMaxValue});Object(n.useEffect)((function(){if(g.current&&!v){var e=Object(ua.a)([[function(e){return e<3},Object(da.a)(2)],[ha.a,Ta.a]])(Math.floor(l/22)),a=t.easyPieChartTrackColor,n=void 0===a?window.NETDATA.themes.current.easypiechart_track:a,r=t.easyPieChartScaleColor,o=void 0===r?window.NETDATA.themes.current.easypiechart_scale:r,i=t.easyPieChartScaleLength,s=void 0===i?5:i,c=t.easyPieChartLineCap,u=void 0===c?"round":c,h=t.easyPieChartLineWidth,p=void 0===h?e:h,f=t.easyPieChartTrackWidth,m=t.easyPieChartSize,b=void 0===m?l:m,y=t.easyPieChartRotate,O=void 0===y?0:y,x=t.easyPieChartAnimate,w=void 0===x?{duration:500,enabled:!0}:x,E=t.easyPieChartEasing,S=new Vn.a(g.current,{barColor:d[0],trackColor:n,scaleColor:o,scaleLength:s,lineCap:u,lineWidth:p,trackWidth:f,size:b,rotate:O,animate:w,easing:E});_(S)}}),[t,a,v,l,d]),Object(n.useEffect)((function(){if(v){var e=-1===c&&!p;e&&!v.options.animate.enabled?v.enableAnimation():!e&&v.options.animate.enabled&&v.disableAnimation(),setTimeout((function(){v.update(k)}),0)}}),[v,c,k,p]);var j=2*l/3/5,T=Math.round((l-j-l/40)/2),D=Math.round(1.6*j/3),P=Math.round(T-2*D-l/40),M=Math.round(.9*D),L=Math.round(T+(j+M)+l/40);return r.a.createElement("div",{ref:g,id:s,className:i},r.a.createElement("span",{className:"easyPieChartLabel",style:{fontSize:j,top:T}},u(O)),r.a.createElement("span",{className:"easyPieChartTitle",style:{fontSize:D,top:P}},t.title||o.title),r.a.createElement("span",{className:"easyPieChartUnits",style:{fontSize:M,top:L}},f))},Kn=a(275),Zn=function(e){return"number"===typeof e},qn=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.chartUuid,c=e.chartHeight,u=e.chartWidth,d=e.hoveredRow,h=e.legendFormatValue,p=e.orderedColors,f=e.setMinMax,g=e.showUndefined,m=e.unitsCurrent,b=Object(n.useRef)(null),v=Object(n.useState)(),_=Object(A.a)(v,2),y=_[0],O=_[1],x=-1===d?0:a.result.length-1-d,w=a.result[x],E=t.gaugeMinValue,S=t.gaugeMaxValue,C=Zn(E)?E:a.min,k=Zn(S)?S:a.max,j=Object(de.a)(Object(Yn.a)((function(e){return+e})),(function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return[!Zn(E)&&a>0?0:a,!Zn(S)&&n<0?0:n]}),Object(Ze.a)(Ta.a),(function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return[Math.min(a,w),Math.max(n,w)]}))([C,k]),T=Object(A.a)(j,2),D=T[0],P=T[1];Object(n.useEffect)((function(){f([D,P])}),[D,P]);var M=Object(de.a)(Object(da.a)(100*(w-D)/(P-D)),(function(e){return Math.max(.001,e)}),(function(e){return Math.min(99.999,e)}))();Object(n.useEffect)((function(){if(b.current&&!y){var e=t.gaugePointerColor,a=void 0===e?window.NETDATA.themes.current.gauge_pointer:e,n=t.gaugeStrokeColor,r=void 0===n?window.NETDATA.themes.current.gauge_stroke:n,o=t.gaugeStartColor,i=void 0===o?p[0]:o,s=t.gaugeStopColor,l=t.gaugeGenerateGradient,c={lines:12,angle:.14,lineWidth:.57,radiusScale:1,pointer:{length:.85,strokeWidth:.045,color:a},limitMax:!0,limitMin:!0,colorStart:i,colorStop:s,strokeColor:r,generateGradient:!0===(void 0!==l&&l),gradientType:0,highDpiSupport:!0},u=new Kn.Gauge(b.current).setOptions(c);u.minValue=0,u.maxValue=100,O(u)}}),[t,a,y,u,p]),Object(n.useEffect)((function(){if(y){var e=-1===d&&!g?32:1e9;y.animationSpeed=e,setTimeout((function(){y.set(g?0:M)}),0)}}),[y,c,u,d,M,g]);var L=Math.floor(c/5),I=Math.round((c-L)/3.2),N=Math.round(L/2.1),R=Math.round(.9*N),F=Math.round(.75*L);return r.a.createElement("div",{id:s,className:i},r.a.createElement("canvas",{ref:b,className:"gaugeChart",id:"gauge-".concat(l,"-canvas"),style:{width:u,height:c}}),r.a.createElement("span",{className:"gaugeChartLabel",style:{fontSize:L,top:I}},h(g?null:w)),r.a.createElement("span",{className:"gaugeChartTitle",style:{fontSize:N,top:0}},t.title||o.title),r.a.createElement("span",{className:"gaugeChartUnits",style:{fontSize:R}},m),r.a.createElement("span",{className:"gaugeChartMin",style:{fontSize:F}},h(g?null:D)),r.a.createElement("span",{className:"gaugeChartMax",style:{fontSize:F}},h(g?null:P)))},$n=(a(254),a(134)),Jn=a(537),Qn=a(538),er=Object(de.a)($n.a,Object(Jn.a)(/[^0-9a-f]/gi,""),Object(ua.a)([[function(e){return e.length<6},function(e){return e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}],[ha.a,Ta.a]])),tr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=er(e),n=Object(de.a)((function(e){return Object(Qn.a)(2,e)}),Object(Yn.a)(Object(de.a)((function(e){return parseInt(e,16)}),(function(e){return Math.round(Math.min(Math.max(0,e+e*t),255)).toString(16)}),(function(e){return"00".concat(e).substr(e.length)}))),(function(e){return e.join("")}))(a);return"#".concat(n)},ar=function(e){return e>0?e:(new Date).valueOf()+e},nr=function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartElementClassName,l=e.chartElementId,c=e.orderedColors,u=e.unitsCurrent,d=e.viewAfterForCurrentData,h=e.viewBeforeForCurrentData,p=Object(n.useRef)(null),f=Object(n.useState)(),m=Object(A.a)(f,2),b=m[0],v=m[1],_=Object(n.useRef)(),y=t.forceTimeWindow?function(e,t){var a=ar(t[0]),n=ar(t[1]),r=e.after*Ve.a,o=e.before*Ve.a-r,i=n-a;if(o>i/1.03)return{};var s=o/i;return{paddingLeftPercentage:"".concat((r-a)/(n-a)*100,"%"),widthRatio:s}}(o,[d,h]):{},O=y.paddingLeftPercentage,x=void 0===O?void 0:O,w=y.widthRatio,E=void 0===w?1:w;Object(n.useEffect)((function(){var e=t.sparklineLineColor,a=void 0===e?c[0]:e,n="line"===i.chart_type?window.NETDATA.themes.current.background:tr(a,window.NETDATA.chartDefaults.fill_luminance),r=t.title||i.title,o=function(e){return"disable"===e?"":e},s=t.sparklineType,l=void 0===s?"line":s,d=t.sparklineFillColor,h=void 0===d?n:d,f=t.sparklineDisableInteraction,g=void 0!==f&&f,m=t.sparklineDisableTooltips,y=void 0!==m&&m,O=t.sparklineDisableHighlight,x=void 0!==O&&O,w=t.sparklineHighlightLighten,E=void 0===w?1.4:w,S=t.sparklineTooltipSuffix,C=void 0===S?" ".concat(u):S,A=t.sparklineNumberFormatter,k=void 0===A?function(e){return e.toFixed(2)}:A,j={type:l,lineColor:a,fillColor:h,chartRangeMin:t.sparklineChartRangeMin,chartRangeMax:t.sparklineChartRangeMax,composite:t.sparklineComposite,enableTagOptions:t.sparklineEnableTagOptions,tagOptionPrefix:t.sparklineTagOptionPrefix,tagValuesAttribute:t.sparklineTagValuesAttribute,disableHiddenCheck:t.sparklineDisableHiddenCheck,defaultPixelsPerValue:t.sparklineDefaultPixelsPerValue,spotColor:o(t.sparklineSpotColor),minSpotColor:o(t.sparklineMinSpotColor),maxSpotColor:o(t.sparklineMaxSpotColor),spotRadius:t.sparklineSpotRadius,valueSpots:t.sparklineValueSpots,highlightSpotColor:t.sparklineHighlightSpotColor,highlightLineColor:t.sparklineHighlightLineColor,lineWidth:t.sparklineLineWidth,normalRangeMin:t.sparklineNormalRangeMin,normalRangeMax:t.sparklineNormalRangeMax,drawNormalOnTop:t.sparklineDrawNormalOnTop,xvalues:t.sparklineXvalues,chartRangeClip:t.sparklineChartRangeClip,chartRangeMinX:t.sparklineChartRangeMinX,chartRangeMaxX:t.sparklineChartRangeMaxX,disableInteraction:g,disableTooltips:y,disableHighlight:x,highlightLighten:E,highlightColor:t.sparklineHighlightColor,tooltipContainer:t.sparklineTooltipContainer,tooltipClassname:t.sparklineTooltipClassname,tooltipChartTitle:r,tooltipFormat:t.sparklineTooltipFormat,tooltipPrefix:t.sparklineTooltipPrefix,tooltipSuffix:C,tooltipSkipNull:t.sparklineTooltipSkipNull,tooltipValueLookups:t.sparklineTooltipValueLookups,tooltipFormatFieldlist:t.sparklineTooltipFormatFieldlist,tooltipFormatFieldlistKey:t.sparklineTooltipFormatFieldlistKey,numberFormatter:k,numberDigitGroupSep:t.sparklineNumberDigitGroupSep,numberDecimalMark:t.sparklineNumberDecimalMark,numberDigitGroupCount:t.sparklineNumberDigitGroupCount,animatedZooms:t.sparklineAnimatedZooms};_.current=j,p.current&&!b&&v((function(){return window.$(p.current)}))}),[b,t,a,o.result,i,c,u,E]);var S=t.sparklineOnHover;Object(n.useEffect)((function(){if(b&&S){var e=function(){return S(null)},t=function(e){var t=Object(A.a)(e.sparklines,1)[0].getCurrentRegionFields(),a=t.x,n=t.y;S({x:a,y:n})};return b.bind("sparklineRegionChange",t).bind("mouseleave",e),function(){b.unbind("sparklineRegionChange",t).unbind("mouseleave",e)}}}),[b,S]),Object(n.useEffect)((function(){if(b){var e=a.getBoundingClientRect(),t=e.width,n=e.height;b.sparkline(o.result,Object(g.a)({},_.current,{width:Math.floor(t*E),height:Math.floor(n)}))}}),[b,o.result]);var C=x?{textAlign:"initial",paddingLeft:x}:void 0;return r.a.createElement("div",{ref:p,id:l,className:s,style:C})},rr=a(144);window.d3=rr;var or,ir=a(276),sr=a.n(ir),lr=a(46),cr={label:"no data",value:100,color:"#666666"},ur=function(e){var t=e.chartData,a=e.index,n=e.localeDateString,r=e.localeTimeString,o=Math.round((t.before-t.after+1)/t.points),i=Object(lr.a)(o),s=t.result.data[a].time,l=s-1e3*o,c=n(l),u=r(l),d=n(s),h=r(s);return c===d?"".concat(c," ").concat(u," to ").concat(h,", ").concat(i):"".concat(c," ").concat(u," to ").concat(d," ").concat(h,", ").concat(i)},dr=function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartElementClassName,l=e.chartElementId,c=e.hoveredRow,u=e.hoveredX,d=e.legendFormatValue,h=e.orderedColors,p=e.setMinMax,f=e.unitsCurrent,g=Object(n.useRef)(null),m=Object(n.useRef)(d);m.current=d;var b=Object(n.useState)(),v=Object(A.a)(b,2),_=v[0],y=v[1],O=Object(n.useRef)(),x=Object(sa.b)(),w=x.localeDateString,E=x.localeTimeString;return Object(n.useEffect)((function(){if(g.current&&!_){p([o.min,o.max]);var e=Object(G.a)(o.result.labels).map((function(e,t){return{label:e,value:o.result.data[0][e],color:h[t]}})).filter((function(e){return null!==e.value&&e.value>0})),n=e.length>0?e:cr,r=t.title||i.title,s=ur({chartData:o,index:0,localeDateString:w,localeTimeString:E}),l=t.d3pieTitle,c=void 0===l?r:l,u=t.d3pieSubtitle,d=void 0===u?f:u,b=t.d3pieFooter,v=void 0===b?s:b,x=t.d3pieTitleColor,S=void 0===x?window.NETDATA.themes.current.d3pie.title:x,C=t.d3pieTitleFontsize,A=void 0===C?12:C,k=t.d3pieTitleFontweight,j=void 0===k?"bold":k,T=t.d3pieTitleFont,D=void 0===T?"arial":T,P=t.d3PieSubtitleColor,M=void 0===P?window.NETDATA.themes.current.d3pie.subtitle:P,L=t.d3PieSubtitleFontsize,I=void 0===L?10:L,N=t.d3PieSubtitleFontweight,R=void 0===N?"normal":N,F=t.d3PieSubtitleFont,B=void 0===F?"arial":F,H=t.d3PieFooterColor,z=void 0===H?window.NETDATA.themes.current.d3pie.footer:H,U=t.d3PieFooterFontsize,W=void 0===U?9:U,V=t.d3PieFooterFontweight,Y=void 0===V?"bold":V,X=t.d3PieFooterFont,K=void 0===X?"arial":X,Z=t.d3PieFooterLocation,q=void 0===Z?"bottom-center":Z,$=t.d3PiePieinnerradius,J=void 0===$?"45%":$,Q=t.d3PiePieouterradius,ee=void 0===Q?"80%":Q,te=t.d3PieSortorder,ae=void 0===te?"value-desc":te,ne=t.d3PieSmallsegmentgroupingEnabled,re=void 0!==ne&&ne,oe=t.d3PieSmallsegmentgroupingValue,ie=void 0===oe?1:oe,se=t.d3PieSmallsegmentgroupingValuetype,le=void 0===se?"percentage":se,ce=t.d3PieSmallsegmentgroupingLabel,ue=void 0===ce?"other":ce,de=t.d3PieSmallsegmentgroupingColor,he=void 0===de?window.NETDATA.themes.current.d3pie.other:de,pe=t.d3PieLabelsOuterFormat,fe=void 0===pe?"label-value1":pe,ge=t.d3PieLabelsOuterHidewhenlessthanpercentage,me=void 0===ge?null:ge,be=t.d3PieLabelsOuterPiedistance,ve=void 0===be?15:be,_e=t.d3PieLabelsInnerFormat,ye=void 0===_e?"percentage":_e,Oe=t.d3PieLabelsInnerHidewhenlessthanpercentage,xe=void 0===Oe?2:Oe,we=t.d3PieLabelsMainLabelColor,Ee=void 0===we?window.NETDATA.themes.current.d3pie.mainlabel:we,Se=t.d3PieLabelsMainLabelFont,Ce=void 0===Se?"arial":Se,Ae=t.d3PieLabelsMainLabelFontsize,ke=void 0===Ae?10:Ae,je=t.d3PieLabelsMainLabelFontweight,Te=void 0===je?"normal":je,De=t.d3PieLabelsPercentageColor,Pe=void 0===De?window.NETDATA.themes.current.d3pie.percentage:De,Me=t.d3PieLabelsPercentageFont,Le=void 0===Me?"arial":Me,Ie=t.d3PieLabelsPercentageFontsize,Ne=void 0===Ie?10:Ie,Re=t.d3PieLabelsPercentageFontweight,Fe=void 0===Re?"bold":Re,Be=t.d3PieLabelsValueColor,He=void 0===Be?window.NETDATA.themes.current.d3pie.value:Be,ze=t.d3PieLabelsValueFont,Ue=void 0===ze?"arial":ze,Ge=t.d3PieLabelsValueFontsize,We=void 0===Ge?10:Ge,Ve=t.d3PieLabelsValueFontweight,Ye=void 0===Ve?"bold":Ve,Xe=t.d3PieLabelsLinesEnabled,Ke=void 0===Xe||Xe,Ze=t.d3PieLabelsLinesStyle,qe=void 0===Ze?"curved":Ze,$e=t.d3PieLabelsLinesColor,Je=void 0===$e?"segment":$e,Qe=t.d3PieLabelsTruncationEnabled,et=void 0!==Qe&&Qe,tt=t.d3PieLabelsTruncationTruncatelength,at=void 0===tt?30:tt,nt=t.d3PieMiscColorsSegmentstroke,rt=void 0===nt?window.NETDATA.themes.current.d3pie.segment_stroke:nt,ot=t.d3PieMiscGradientEnabled,it=void 0!==ot&&ot,st=t.d3PieMiscColorsPercentage,lt=void 0===st?95:st,ct=t.d3PieMiscGradientColor,ut=void 0===ct?window.NETDATA.themes.current.d3pie.gradient_color:ct,dt=t.d3PieCssprefix,ht=void 0===dt?null:dt,pt=a.getBoundingClientRect(),ft=pt.width,gt=pt.height,mt={header:{title:{text:c,color:S,fontSize:A,fontWeight:j,font:D},subtitle:{text:d,color:M,fontSize:I,fontWeight:R,font:B},titleSubtitlePadding:1},footer:{text:v,color:z,fontSize:W,fontWeight:Y,font:K,location:q},size:{canvasHeight:Math.floor(gt),canvasWidth:Math.floor(ft),pieInnerRadius:J,pieOuterRadius:ee},data:{sortOrder:ae,smallSegmentGrouping:{enabled:re,value:ie,valueType:le,label:ue,color:he},content:n},labels:{outer:{format:fe,hideWhenLessThanPercentage:me,pieDistance:ve},inner:{format:ye,hideWhenLessThanPercentage:xe},mainLabel:{color:Ee,font:Ce,fontSize:ke,fontWeight:Te},percentage:{color:Pe,font:Le,fontSize:Ne,fontWeight:Fe,decimalPlaces:0},value:{color:He,font:Ue,fontSize:We,fontWeight:Ye},lines:{enabled:Ke,style:qe,color:Je},truncation:{enabled:et,truncateLength:at},formatter:function(e){return"value"===e.part?m.current(e.value):"percentage"===e.part?"".concat(e.label,"%"):e.label}},effects:{load:{effect:"none",speed:0},pullOutSegmentOnClick:{effect:"bounce",speed:400,size:5},highlightSegmentOnMouseover:!0,highlightLuminosity:-.2},tooltips:{enabled:!1,type:"placeholder",string:"",placeholderParser:null,styles:{fadeInSpeed:250,backgroundColor:window.NETDATA.themes.current.d3pie.tooltip_bg,backgroundOpacity:.5,color:window.NETDATA.themes.current.d3pie.tooltip_fg,borderRadius:2,font:"arial",fontSize:12,padding:4}},misc:{colors:{background:"transparent",segmentStroke:rt},gradient:{enabled:it,percentage:lt,color:ut},canvasPadding:{top:5,right:5,bottom:5,left:5},pieCenterOffset:{x:0,y:0},cssPrefix:ht},callbacks:{onload:null,onMouseoverSegment:null,onMouseoutSegment:null,onClickSegment:null}},bt=new sr.a(g.current,mt);O.current=mt,y((function(){return bt}))}}),[t,a,o,i,_,d,w,E,h,p,f]),Object(n.useEffect)((function(){if(_&&O.current){var e=ur({chartData:o,index:0,localeDateString:w,localeTimeString:E}),a=t.d3pieSubtitle,n=void 0===a?f:a,r=t.d3pieFooter,i=void 0===r?e:r,s=!!u&&-1===c,l=o.result.data.length-c-1,d=l<0||l>=o.result.data.length?0:l,p=Object(G.a)(o.result.labels).map((function(e,t){return{label:e,value:o.result.data[d][e],color:h[t]}})).filter((function(e){return null!==e.value&&e.value>0})),g=p.length>0&&!s?p:[cr];_.options.header.subtitle.text=n,_.options.footer.text=i,_.options.data.content=g,_.destroy(),_.recreate()}}),[t,o,_,c,u,w,E,h,f]),r.a.createElement("div",{ref:g,id:l,className:s})},hr=(a(437),function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartElementClassName,l=e.chartElementId,c=e.orderedColors,u=Object(n.useRef)(null),d=Object(n.useState)(),h=Object(A.a)(d,2),p=h[0],f=h[1],m=Object(n.useRef)();return Object(n.useLayoutEffect)((function(){if(u.current&&!p){var e=window.$(u.current),n=a.getBoundingClientRect(),r=n.width,o=n.height,i=t.peityStrokeWidth,s=void 0===i?1:i,l={stroke:window.NETDATA.themes.current.foreground,strokeWidth:s,width:Math.floor(r),height:Math.floor(o),fill:window.NETDATA.themes.current.foreground};f((function(){return e})),m.current=l}}),[t,p,a]),Object(n.useLayoutEffect)((function(){if(p&&m.current){var e=Object(g.a)({},m.current,{stroke:c[0],fill:c[0]===m.current.stroke?m.current.fill:"line"===i.chart_type?window.NETDATA.themes.current.background:tr(c[0],window.NETDATA.chartDefaults.fill_luminance)});p.peity("line",e),m.current=e}}),[p,o,i,c]),r.a.createElement("div",{ref:u,id:l,className:s},o.result)}),pr=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.orderedColors,c=e.unitsCurrent,u=Object(n.useRef)(null),d=Object(n.useRef)(),h=Object(n.useState)(!1),p=Object(A.a)(h,2),f=p[0],g=p[1];(or||(or=new Promise((function(e,t){setTimeout((function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://www.google.com/jsapi",a.onerror=function(){t(Error("error loading google.js api"))},a.onload=function(){e("ok")};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}),1e3)})).then((function(){return new Promise((function(e){window.google.load("visualization","1.1",{packages:["corechart","controls"],callback:e})}))})))).then((function(){g(!0)}));var m=Object(n.useRef)();return Object(n.useLayoutEffect)((function(){if(d.current&&m.current){var e=new window.google.visualization.DataTable(a.result);d.current.draw(e,m.current)}}),[a]),Object(n.useLayoutEffect)((function(){if(u.current&&!m.current&&f){var e=new window.google.visualization.DataTable(a.result),n=t.title,r=void 0===n?o.title:n,i=o.chart_type,s=new Map([["area",window.NETDATA.options.current.color_fill_opacity_area],["stacked",window.NETDATA.options.current.color_fill_opacity_stacked]]).get(i)||.3,h={colors:l,lineWidth:"line"===i?2:1,title:r,fontSize:11,hAxis:{viewWindowMode:"maximized",slantedText:!1,format:"HH:mm:ss",textStyle:{fontSize:9},gridlines:{color:"#EEE"}},vAxis:{title:c,viewWindowMode:"area"===i||"stacked"===i?"maximized":"pretty",minValue:"stacked"===i?void 0:-.1,maxValue:"stacked"===i?void 0:.1,direction:1,textStyle:{fontSize:9},gridlines:{color:"#EEE"}},chartArea:{width:"65%",height:"80%"},focusTarget:"category",annotation:{1:{style:"line"}},pointsVisible:!1,titlePosition:"out",titleTextStyle:{fontSize:11},tooltip:{isHtml:!1,ignoreBounds:!0,textStyle:{fontSize:9}},curveType:"function",areaOpacity:s,isStacked:"stacked"===i},p=["area","stacked"].includes(o.chart_type)?new window.google.visualization.AreaChart(u.current):new window.google.visualization.LineChart(u.current);p.draw(e,h),m.current=h,d.current=p}}),[t,a.result,o,u,f,l,c]),r.a.createElement("div",{ref:u,id:s,className:i})},fr=function(e){var t=e.attributes,a=e.chartData,n=e.chartElementClassName,o=e.chartElementId,i=t.textOnlyDecimalPlaces,s=void 0===i?1:i,l=t.textOnlyPrefix,c=void 0===l?"":l,u=t.textOnlySuffix,d=void 0===u?"":u,h=Math.pow(10,s),p=Math.round(a.result[0]*h)/h,f=0===a.result.length?"":c+p+d;return r.a.createElement("div",{id:o,className:n},f)},gr=a(37),mr=Math.round(16/9),br=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e-t},vr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mr;return Math.sqrt(e.length/t)},_r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mr;return e*t},yr=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.floor(t%e)*a},Or=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.floor(t/e)*a},xr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11;return Math.ceil(e)*t},wr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.ceil(e)*t+a},Er=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11;return Math.floor(e/t)},Sr=function(e,t,a,n){var r=n.onMouseenter,o=n.onMouseout,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=i.cellSize,l=i.cellPadding,c=-1,u=function(a){var n=e.getBoundingClientRect(),r=yr(t,a,s),o=Or(t,a,s),i=n.left+r,c=n.top+o,u=br(s,l);return{index:a,left:i,top:c,right:i+u,bottom:c+u,width:u,height:u,offsetX:r,offsetY:o}},d=function(){o(u(c)),c=-1},h=function(e){var n=e.offsetX,o=e.offsetY,i=Er(n,s),l=Er(o,s)*t+i;l!==c&&(-1!==c&&d(),l>=a||(r(u(l)),c=l))};return e.addEventListener("mousemove",h),e.addEventListener("mouseout",d),function(){e.removeEventListener("mousemove",h),e.removeEventListener("mouseout",d)}},Cr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.aspectRatio,n=t.cellSize,r=vr(e,a),o=_r(r,a);return xr(o,n)},Ar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.aspectRatio,n=t.cellSize,r=t.padding,o=vr(e,a),i=_r(o,a),s=xr(i,n),l=wr(o,n,r);return{width:s,height:l,columns:Math.ceil(i)}},kr=["rgba(198, 227, 246, 0.9)","rgba(14, 154, 255, 0.9)"],jr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kr;return Object(rr.scaleLinear)().domain(Object(rr.extent)(e,(function(e){return e}))).range(t)},Tr=function(e){return e.getBoundingClientRect().top/window.innerHeight>.5?"top":"bottom"},Dr={top:{bottom:"top"},bottom:{top:"bottom"}},Pr=function(e){var t=e.data,a=e.renderTooltip,o=Object(gr.a)(e,["data","renderTooltip"]),i=Object(n.useRef)(),s=Object(n.useRef)(),l=Object(n.useRef)(),c=Object(n.useState)(null),u=Object(A.a)(c,2),d=u[0],h=u[1],p=Object(n.useRef)(!1),f=Object(n.useRef)(-1),g=Object(n.useRef)(),m=function(){l.current.deactivateBox(),h(null),p.current=!1,f.current=-1},b=function(){return requestAnimationFrame((function(){h((function(e){return p.current||-1!==f.current&&f.current===(null===e||void 0===e?void 0:e.index)||m(),e}))}))};Object(n.useLayoutEffect)((function(){return l.current=function(e,t){var a=t.onMouseenter,n=t.onMouseout,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.cellSize,i=r.cellPadding,s=r.cellStroke,l=void 0===s?2:s,c=r.lineWidth,u=void 0===c?1:c,d=r.colorRange,h=e.getContext("2d"),p=-1,f=function(){},g={},m=function(){},b=function(){f(),m(),h.clearRect(0,0,e.width,e.height),h.beginPath()},v=function(t){var s=t.data,c=Ar(s,r),v=c.width,_=c.height,y=c.columns;e.width=parseInt(v),e.height=parseInt(_),b(),m();var O=jr(s,d),x=function(e,t){h.fillStyle=O(e);var a=yr(y,t,o),n=Or(y,t,o);u&&l&&h.clearRect(a-u,n-u,br(o,i)+l,br(o,i)+l),h.fillRect(a,n,br(o,i),br(o,i))};s.forEach(x),m=Sr(e,y,s.length,{onMouseenter:a,onMouseout:n},r),f=function(){-1!==p&&x(s[p],p)},g=function(e){f(),p=e;var t=yr(y,e,o),a=Or(y,e,o);u&&l&&(h.lineWidth=u,h.strokeStyle="#fff",h.strokeRect(t+u,a+u,br(o,i)-l,br(o,i)-l))}};return{clear:b,update:v,activateBox:function(e){return g(e)},deactivateBox:function(){return f()}}}(s.current,{onMouseenter:function(e){var t=e.index,a=Object(gr.a)(e,["index"]);f.current=t,l.current.activateBox(t),g.current=setTimeout((function(){h({target:{getBoundingClientRect:function(){return a}},index:t,rect:a})}),600)},onMouseout:function(){f.current=-1,clearTimeout(g.current),b()}},o),function(){return l.current.clear()}}),[]),Object(n.useLayoutEffect)((function(){d&&i.current&&i.current.labels[d.index]!==t.labels[d.index]&&m(),i.current=t,l.current.update(t)}),[t]);var v=Object(n.useCallback)((function(){p.current=!0}),[]),_=Object(n.useCallback)((function(){p.current=!1,b()}),[]),y=d&&Tr(d.target);return r.a.createElement(n.Fragment,null,r.a.createElement("canvas",{"data-testid":"groupBox",ref:s}),d&&a&&r.a.createElement(Z.h,{align:Dr[y],target:d.target,onMouseEnter:v,onMouseLeave:_},a(d.index,y)))},Mr=$.d.span.withConfig({displayName:"groupBoxes__Title",componentId:"sc-11qnspu-0"})(["white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;"]),Lr=Object($.d)(Z.j).attrs({as:Z.B,gap:1}).withConfig({displayName:"groupBoxes__Label",componentId:"sc-11qnspu-1"})(["cursor:default;&:hover{font-weight:bold;}"]),Ir=function(e){var t=e.data,a=e.label,o=e.groupIndex,i=e.renderGroupPopover,s=e.renderBoxPopover,l=Object(n.useRef)(),c=l.current&&Tr(l.current),u=Object(n.useMemo)((function(){return{maxWidth:"".concat(Cr(t.data),"px")}}),[t]),d=s&&function(e,t){return s({group:a,groupIndex:o,align:t,index:e})},h=i&&function(){return i({group:a,groupIndex:o,align:c})};return r.a.createElement(Z.j,{"data-testid":"groupBoxWrapper",column:!0,alignItems:"start",gap:1,margin:[0,4,0,0]},r.a.createElement(Z.y,{content:h,align:c,plain:!0},(function(e){var n=e.isOpen,o=e.ref,i=Object(gr.a)(e,["isOpen","ref"]);return r.a.createElement(Lr,Object.assign({"data-testid":"groupBoxWrapper-title",ref:function(e){l.current=e,o(e)},strong:n,style:u},i),r.a.createElement(Mr,null,a),t.data.length>3&&r.a.createElement("span",null,"(",t.data.length,")"))})),r.a.createElement(Pr,{data:t,renderTooltip:d}))},Nr=function(e){var t=e.data,a=e.labels,n=e.renderBoxPopover,o=e.renderGroupPopover;return r.a.createElement(Z.j,{"data-testid":"groupBoxes",flexWrap:!0,overflow:{vertical:"auto"},flex:!0},a.map((function(e,a){return t[a].data.length?r.a.createElement(Ir,{key:e,label:e,groupIndex:a,data:t[a],renderGroupPopover:o,renderBoxPopover:n}):null})))},Rr=Object($.d)(Z.j).attrs({width:"120px",height:"12px",round:!0}).withConfig({displayName:"legend__LinearColorScaleBar",componentId:"sc-7zc5gz-0"})(["background:linear-gradient(to right,#c6e3f6,#0e9aff);"]),Fr=function(e){var t=e.children;return r.a.createElement(Z.j,{"data-testid":"groupBox-legend",gap:4,alignItems:"center"},r.a.createElement(Z.C,{strong:!0},t),r.a.createElement(Z.j,{gap:2,alignItems:"center"},r.a.createElement(Z.C,null,"0%"),r.a.createElement(Rr,null),r.a.createElement(Z.C,null,"100%")))},Br={k8s_cluster_id:{icon:"cluster",title:"Cluster Id"},k8s_node_name:{icon:"nodes_hollow",title:"Node"},k8s_namespace:{icon:"cluster_spaces",title:"Namespace"},k8s_controller_kind:{icon:"controller_kind",title:"Controller Kind"},k8s_controller_name:{icon:"controller_name",title:"Controller Name"},k8s_pod_name:{icon:"pod",title:"Pod Name"},k8s_container_name:{icon:"container",title:"Container"}},Hr=Object.keys(Br),zr=function(e){return e in Br?Br[e]:{title:e.replace(/_./g,(function(e){return" ".concat(e[1].toUpperCase())})).replace(/^k8s /,""),icon:"node"}},Ur=function(){return r.a.createElement(Z.j,{height:"1px",width:"100%",background:"separator"})},Gr=function(e){return r.a.createElement(Z.m,Object.assign({color:"bright",wordBreak:"break-all","data-testid":"k8sPopover-header"},e))},Wr=Object($.d)(Z.b).attrs((function(e){return{flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",disabled:e.active,"data-testid":"k8sPopoverChart-tab"}})).withConfig({displayName:"tabs__TabButton",componentId:"sc-18vk2nn-0"})(["&&&{height:initial;width:initial;padding:2px 20px;"," color:","}"],(function(e){var t=e.active,a=e.theme;return t&&"border-bottom: 3px solid ".concat(Object(Z.F)("bright")({theme:a}),";")}),(function(e){var t=e.active,a=e.theme;return Object(Z.F)(t?"bright":"separator")({theme:a})})),Vr=function(e){var t=e.value,a=e.onChange,n=Object(gr.a)(e,["value","onChange"]);return r.a.createElement(Z.j,Object.assign({"data-testid":"k8sPopoverChart-tabs"},n),r.a.createElement(Wr,{label:"Context",active:"context"===t,onClick:function(){return a("context")}}),r.a.createElement(Wr,{label:"Metrics",active:"metrics"===t,onClick:function(){return a("metrics")}}))},Yr=Object($.d)(Object(Z.I)(Z.b)).attrs({icon:"chevron_right_s",label:"More",flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",alignItems:"baseline",gap:1,direction:"rowReverse"}).withConfig({displayName:"section__ExpandButton",componentId:"z6mskd-0"})(["&&&{padding:0;margin:0;font-weight:normal;height:initial;width:initial;svg{height:6px;width:6px;position:initial;}}"]),Xr=function(e){var t=e.title,a=e.onExpand,n=e.children,o=e.noBorder;return r.a.createElement(Z.j,{gap:3,padding:[0,0,3],border:!o&&{side:"bottom",color:"separator"},column:!0,"data-testid":"k8sPopoverSection"},r.a.createElement(Z.j,{justifyContent:"between","data-testid":"k8sPopoverSection-header"},r.a.createElement(Z.n,{color:"border",wordBreak:"break-all"},t),a&&r.a.createElement(Yr,{onClick:a})),r.a.createElement(Z.j,{gap:4,column:!0,"data-testid":"k8sPopoverSection-content"},n))},Kr=a(169),Zr=a(539),qr=["180px","90px"],$r=function(e,t,a){var n,r;"string"===typeof e.width?n=e.width:"number"===typeof e.width&&(n="".concat(e.width.toString(),"px")),void 0===t.aspectRatio&&("string"===typeof e.height?r=e.height:"number"===typeof e.height&&(r="".concat(e.height.toString(),"px")));var o="bottom"===e.legendPosition,i=e.heightId?function(e,t){var a=localStorage.getItem("".concat(cn.a).concat(e));if(a)return Number.isNaN(Number(a))?null:"".concat(t?Number(a)+Fa.a:a,"px");var n=localStorage.getItem("".concat(cn.b).concat(e));return n?qr.includes(n)?null:n:null}(e.heightId,o):null;if(i&&(r=i.replace(/"/g,"")),a){var s=o?.5*window.innerHeight:.4*window.innerHeight;r="".concat(s,"px")}var l=window.NETDATA.chartDefaults.min_width;return{height:r,width:n,minWidth:null===l?void 0:l}},Jr={root:null,rootMargin:"0px",threshold:void 0},Qr=function(){var e=[],t=new IntersectionObserver((function(t){t.forEach((function(t){var a,n=t.isIntersecting,r=t.target,o=null===(a=e.find((function(e){return e.element===r})))||void 0===a?void 0:a.callback;o&&o(n)}))}),Jr);return{subscribe:function(a,n){t.observe(a),e=e.concat({element:a,callback:n})},unsubscribe:function(t){e=e.filter((function(e){return e.element!==t}))}}}(),eo=function(e){var t=e.attributes;return r.a.createElement("span",{style:{position:"absolute",opacity:0,width:0}},t.id)},to=localStorage.getItem("wipe-chart-state"),ao=function(e){var t,a=e.attributes,o=e.chartUuid,i=e.children,s=e.portalNode,l=Object(la.a)();Object(n.useEffect)((function(){return function(){l(Object(_e.a)({id:o}))}}),[]);var c=ya[a.chartLibrary],u=Object(n.useState)(!1),d=Object(A.a)(u,2),h=d[0],p=d[1],f=(null===(t=Object(la.b)(ue.d))||void 0===t?void 0:t.chartId)===a.id;Object(n.useLayoutEffect)((function(){if(!h){var e=f&&"dygraph"===a.chartLibrary&&c.hasLegend(a),t=$r(a,c,e);Object(Zr.a)((function(e,t){e&&s.style.setProperty(t,e)}),t),s.className=c.containerClass(a),p(!0)}}),[a,c,h,f,s,p]);var g=Object(la.b)(ue.j),m=Object(n.useRef)(),b=function(e,t){var a=Object(n.useState)(!1),r=Object(A.a)(a,2),o=r[0],i=r[1],s=Object(n.useRef)(o);return Object(n.useEffect)((function(){return"function"===typeof IntersectionObserver&&Qr.subscribe(e,(function(e){s.current!==e&&(t.current&&(t.current.style.visibility=e?"visible":"hidden"),s.current=e,i(e))})),function(){Qr.unsubscribe(e)}}),[t,e]),o}(s,m),v=Object(la.b)(ue.t)?750:100,_=Object(n.useState)(!b),y=Object(A.a)(_,2),O=y[0],x=y[1];Object(ma.a)((function(){x(!b)}),v,[b]);var w=!b||O,E=Object(n.useRef)(b);if(m.current&&E.current!==b&&(E.current=b),Object(n.useEffect)((function(){!ve&&w&&to&&l(Object(_e.a)({id:o}))}),[o,l,w]),ve)return i;if(w){if(g)return r.a.createElement(eo,{attributes:a});if(!m.current){var S=Array.from(s.children).map((function(e){return function(e){var t=e.cloneNode(!0),a=t.querySelectorAll("canvas");return e.querySelectorAll("canvas").forEach((function(e,t){var n=a[t],r=n.getContext("2d");n.width=e.width,n.height=e.height,r&&r.drawImage(e,0,0)})),t}(e)})),C=document.createElement("div");C.style.visibility="hidden",S.forEach((function(e){C.appendChild(e)})),m.current=C}return r.a.createElement(r.a.Fragment,null,r.a.createElement(eo,{attributes:a}),r.a.createElement("div",{ref:function(e){e&&m.current&&e.appendChild(m.current)}}))}return!g&&m.current&&(m.current=void 0),i},no=function(e){var t=e.attributes,a=e.chartMetadata,n=e.chartUuid,o=e.dropdownMenu,i=e.portalNode,s=e.renderCustomElementForDygraph,l=e.onAttributesChange,c=e.uuid;return r.a.createElement(ao,{attributes:t,portalNode:i,chartUuid:n},r.a.createElement(Xo,{attributes:t,chartUuid:n,renderCustomElementForDygraph:s,onAttributesChange:l,dropdownMenu:o,externalChartMetadata:a,portalNode:i,uuid:c}))},ro=null,oo={sparklines_registry:{},os:"unknown",menu:{},submenu:{},context:{},sparkline:function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4?arguments[4]:void 0;if(null===ro||"undefined"===typeof ro.charts)return"";if("undefined"===typeof ro.charts[t])return"";if("undefined"===typeof ro.charts[t].dimensions)return"";if("undefined"===typeof ro.charts[t].dimensions[a])return"";var o="".concat(t,".").concat(a);return"undefined"===typeof this.sparklines_registry[o]?this.sparklines_registry[o]={count:1}:this.sparklines_registry[o].count+=1,o="".concat(o,".").concat(this.sparklines_registry[o].count),"".concat(e,'<div class="netdata-container" data-netdata="').concat(t,'" data-after="-120"\n data-width="25%" data-height="15px" data-chart-library="dygraph"\n data-dygraph-theme="sparkline" data-dimensions="').concat(a,'"\n data-show-value-of-').concat(a,'-at="').concat(o,'"></div>\n (<span id="').concat(o,'" style="display: inline-block; min-width: 50px; text-align: right;">\n X</span>').concat(n,")").concat(r)},gaugeChart:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return"".concat('<div class="netdata-container" data-netdata="CHART_UNIQUE_ID" data-dimensions="').concat(a,'"')+' data-chart-library="gauge" data-gauge-adjust="width"'+' data-title="'.concat(e,'"')+' data-width="'.concat(t,'"')+' data-before="0" data-after="-CHART_DURATION" data-points="CHART_DURATION"'+' data-colors="'.concat(n,'"')+' role="application"></div>'},anyAttribute:function(e,t,a,n){if("undefined"!==typeof e[a]){var r=e[a][t];return"undefined"===typeof r?n:"function"===typeof r?r(oo.os):r}return n},menuTitle:function(e){if(e.sectionTitle)return e.sectionTitle;if("undefined"!==typeof e.menu_pattern){var t=e.type||e.id.split(".")[0];return"".concat(this.anyAttribute(this.menu,"title",e.menu_pattern,e.menu_pattern).toString()," ").concat(t.slice(-(t.length-e.menu_pattern.length-1)).toString()).replace(/_/g," ")}return this.anyAttribute(this.menu,"title",e.menu,e.menu).toString().replace(/_/g," ")},menuIcon:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"icon",e.menu_pattern,'<i class="fas fa-puzzle-piece"></i>').toString():this.anyAttribute(this.menu,"icon",e.menu,'<i class="fas fa-puzzle-piece"></i>')},menuInfo:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"info",e.menu_pattern,null):this.anyAttribute(this.menu,"info",e.menu,null)},menuHeight:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"height",e.menu_pattern,1):this.anyAttribute(this.menu,"height",e.menu,1)},submenuTitle:function(e,t){var a="".concat(e,".").concat(t),n=this.anyAttribute(this.submenu,"title",a,t).toString().replace(/_/g," ");if(n.length>28){var r=n.substring(0,13),o=n.substring(n.length-12,n.length);return"".concat(r,"...").concat(o)}return n},submenuInfo:function(e,t){var a="".concat(e,".").concat(t);return this.anyAttribute(this.submenu,"info",a,null)},submenuHeight:function(e,t,a){var n="".concat(e,".").concat(t);return this.anyAttribute(this.submenu,"height",n,1)*a},contextInfo:function(e){var t=this.anyAttribute(this.context,"info",e,null);return null!==t?'<div class="shorten dashboard-context-info"\n role="document">'.concat(t,"</div>"):""},contextValueRange:function(e){if("undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].valueRange)try{return JSON.parse(this.context[e].valueRange)}catch(t){return[null,null]}return[null,null]},contextHeight:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].height?t*this.context[e].height:t},contextDecimalDigits:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].decimalDigits?this.context[e].decimalDigits:t}};window.netdataDashboard=oo;var io,so,lo,co=Object($.d)(Z.z).withConfig({displayName:"chartOverview__Title",componentId:"sc-1ga681p-0"})(["text-overflow:ellipsis;max-width:120px;overflow-x:hidden;"]),uo={avg:"Average",sum:"Sum",min:"Min",max:"Max"},ho=Object(n.memo)((function(e){var t,a=e.id,n=e.units,o=e.aggrMethod,i=e.displayedIndex,s=Object(la.b)((function(e){return Object(Ea.f)(e,{id:a})})),l="number"===typeof i?s.result[i]:s.view_latest_values[0],c=Ra({attributes:{},data:s,units:n,unitsCommon:null,unitsDesired:null,uuid:a}),u=c.legendFormatValue,d=c.unitsCurrent,h=function(e){return"".concat(uo[e])||""}(o);return r.a.createElement(Z.z,{wordBreak:"keep-all",color:"bright",margin:[0,0,0,"auto"],"data-testid":"k8sPopoverChart-chartValue"},h&&r.a.createElement(Z.z,{margin:[0,1,0,0],color:"separator","data-testid":"k8sPopoverChart-chartValue-aggr"},h),u(l),"percentage"===(t=d)?"%":" ".concat(t.replace(/milliseconds/,"ms")))})),po=function(e){var t=e.id,a=Object(gr.a)(e,["id"]),n=Object(la.b)((function(e){return Object(Ea.f)(e,{id:t})}));return n&&0!==n.result.length?r.a.createElement(ho,Object.assign({id:t},a)):null},fo=Object(n.memo)((function(e){var t=e.id,a=e.chartMetadata,n=e.aggrMethod,o=e.displayedIndex,i=a.units,s=a.context.replace(/cgroup\./,""),l=oo.menuIcon(a);return r.a.createElement(Z.j,{gap:2,"data-testid":"k8sPopoverChart-overview"},r.a.createElement(Z.z,{color:"bright",dangerouslySetInnerHTML:{__html:l}}),r.a.createElement(co,{color:"bright","data-testid":"k8sPopoverChart-title"},s),r.a.createElement(po,{id:t,units:i,aggrMethod:n,displayedIndex:o}))})),go=Object(n.memo)((function(e){var t=e.groupLabel,a=e.postGroupLabel,o=e.id,i=e.attributes,s=e.relatedIndex,l=Object(n.useContext)($.a),c=Object(n.useRef)(),d=Object(n.useState)(),h=Object(A.a)(d,2),p=h[0],f=h[1],m=Object(n.useMemo)((function(){return Object(Kr.b)(400,f)}),[]),b=Object(n.useState)(),v=Object(A.a)(b,2)[1];Object(n.useLayoutEffect)((function(){v(!0)}),[]);var _=i.relatedCharts[s],y=_.chartMetadata,O=_.attributes,x=Object(n.useMemo)((function(){return{id:y.id,width:"100%",height:"60px",chartLibrary:"sparkline",sparklineLineWidth:"2px",sparklineLineColor:Object(Z.F)("border")({theme:l}),sparklineFillColor:Object(Z.F)("disabled")({theme:l}),sparklineSpotRadius:0,sparklineDisableTooltips:!0,sparklineOnHover:function(e){return m(null===e||void 0===e?void 0:e.x)},httpMethod:"POST",host:i.host,nodeIDs:i.nodeIDs,dimensions:O.dimensions,aggrMethod:O.aggrMethod,labels:Object(g.a)(Object(u.a)({k8s_cluster_id:[y.chartLabels.k8s_cluster_id[0]]},i.groupBy,[t]),a&&Object(u.a)({},i.postGroupBy,[a]))}}),[y,i]);return r.a.createElement(Z.j,{gap:2,column:!0,"data-testid":"k8sPopoverChart"},r.a.createElement("div",{ref:c,style:{height:"60px",width:"100%"},"data-testid":"k8sPopoverChart-container"},c.current&&r.a.createElement(no,{chartUuid:o,attributes:x,chartMetadata:y,portalNode:c.current})),r.a.createElement(fo,{id:o,aggrMethod:x.aggrMethod,chartMetadata:y,displayedIndex:p}))})),mo=Object($.d)(Z.o).attrs({margin:[0,0,0,"auto"],color:"bright",width:"10px",height:"10px",alignSelf:"center",name:"nav_arrow_goto",role:"button",title:"Go to node","data-testid":"k8sPopoverItem-externalButton"}).withConfig({displayName:"item__ExternalButton",componentId:"sc-351vj-0"})(["cursor:pointer;"]),bo=function(e){var t=e.icon,a=e.title,n=e.secondary,o=e.onClick;return r.a.createElement(Z.j,{gap:1,alignItems:"start","data-testid":"k8sPopoverItem"},r.a.createElement(Z.j,{width:"22px",height:"22px","data-testid":"k8sPopoverItem-icon"},r.a.createElement(Z.o,{name:t,color:"bright",margin:[0,1,0,0],width:"22px",height:"22px"})),r.a.createElement(Z.z,{color:"bright","data-testid":"k8sPopoverItem-title"},a),n&&r.a.createElement(Z.z,{color:"border",wordBreak:"break-all","data-testid":"k8sPopoverItem-detail"},n),o&&r.a.createElement(mo,{onClick:o}))},vo=function(e){var t=e.date,a=e.title,n=Object(sa.b)(),o=n.localeDateString,i=n.localeTimeString;return r.a.createElement(bo,{icon:"around_clock",title:a,secondary:"".concat(o(t)," | ").concat(i(t))})},_o=function(e){var t=e.before,a=e.after;return r.a.createElement(Xr,{title:"Time"},r.a.createElement(vo,{title:"From",date:a}),r.a.createElement(vo,{title:"To",date:t}))},yo=function(e){var t=e.groupLabel,a=e.postGroupLabel,n=e.attributes,o=e.viewAfter,i=e.viewBefore;return r.a.createElement(Z.j,{gap:3,column:!0,width:"100%","data-testid":"k8sPopoverMetrics"},r.a.createElement(_o,{after:o,before:i}),r.a.createElement(Xr,{title:"Metrics",noBorder:!0},r.a.createElement(Z.j,{gap:3,column:!0,"data-testid":"k8sPopoverMetrics-container"},n.relatedCharts.map((function(e,o){var i=e.chartMetadata;return r.a.createElement(go,{key:i.id,id:[t,a,n.id,i.id].join("|"),attributes:n,relatedIndex:o,groupLabel:t,postGroupLabel:a})})))))},Oo=function(e){var t=e.labelId,a=e.items,n=e.onExpand,o=e.onItemClick,i=Object(gr.a)(e,["labelId","items","onExpand","onItemClick"]),s=zr(t),l=s.title,c=s.icon,u=a.slice(0,3),d=a.length>3,h=d?"".concat(l," (").concat(a.length,")"):l;return r.a.createElement(Xr,Object.assign({title:h,onExpand:d&&n},i),u.map((function(e){return r.a.createElement(bo,{key:e,icon:c,title:e,onClick:o&&function(){return o(e)}})})))},xo=Object(n.memo)((function(e){var t=e.chartLabels,a=e.onExpand,n=e.onNodeClick,o=function(e){e=Object(g.a)({},e);var t=Hr.reduce((function(t,a){return a in e?(delete e[a],[].concat(Object(C.a)(t),[a])):t}),[]);return[].concat(Object(C.a)(t),Object(C.a)(Object.keys(e)))}(t);return r.a.createElement(Z.j,{gap:3,column:!0,width:"100%","data-testid":"k8sPopoverContext"},o.map((function(e,i){return r.a.createElement(Oo,{key:e,labelId:e,items:t[e],onExpand:function(){return a(e)},noBorder:i===o.length-1,onItemClick:"k8s_node_name"===e&&n})})))})),wo=Object($.d)(Object(Z.I)(Z.b)).attrs({flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",alignItems:"start",gap:1}).withConfig({displayName:"list__StyledButton",componentId:"sc-11aix5x-0"})(["&&&{padding:0;margin:0;height:initial;width:initial;svg{height:18px;width:18px;position:initial;}}"]),Eo=function(e){var t=e.labelId,a=e.items,n=e.onBack,o=e.onItemClick,i=zr(t),s=i.title,l=i.icon;return r.a.createElement(Z.j,{height:"100%",gap:3,"data-testid":"k8sPopoverList",column:!0},r.a.createElement(Gr,null,r.a.createElement(wo,{label:"".concat(s," (").concat(a.length,")"),icon:"chevron_left",onClick:n,"data-testid":"k8sPopoverList-back"})),r.a.createElement(Ur,null),r.a.createElement(Z.j,{gap:3,overflow:{vertical:"auto",horizontal:"hidden"},column:!0,"data-testid":"k8sPopoverList-container"},a.map((function(e){return r.a.createElement(bo,{key:e,icon:l,title:e,onClick:o&&function(){return o(e)}})}))))},So=function(e){return r.a.createElement(Z.i,Object.assign({background:["transparent","popover"],padding:[2,4],width:"322px",height:"422px"},e))},Co=function(e){var t=e.label,a=e.value,n=e.onChange,o=e.children;return r.a.createElement(Z.j,{height:"100%",column:!0},r.a.createElement(Gr,null,t),r.a.createElement(Vr,{value:a,onChange:n,margin:[4,0,0,0]}),r.a.createElement(Ur,null),r.a.createElement(Z.j,{gap:3,overflow:{vertical:"auto",horizontal:"hidden"},margin:[4,0,0,0]},o))},Ao=function(e){var t=e.title,a=e.groupLabel,o=e.postGroupLabel,i=e.chartLabels,s=e.attributes,l=e.viewBefore,c=e.viewAfter,u=Object(gr.a)(e,["title","groupLabel","postGroupLabel","chartLabels","attributes","viewBefore","viewAfter"]),d=Object(n.useState)("context"),h=Object(A.a)(d,2),p=h[0],f=h[1],g="context"!==p&&"metrics"!==p,m=s.onNodeClick;return r.a.createElement(So,Object.assign({"data-testid":"k8sPopover"},u),g&&r.a.createElement(Eo,{labelId:p,items:i[p],attributes:s,onBack:function(){return f("context")},onItemClick:"k8s_node_name"===p&&m}),!g&&r.a.createElement(Co,{label:t,value:p,onChange:f},"context"===p&&r.a.createElement(xo,{chartLabels:i,onExpand:f,onNodeClick:m}),"metrics"===p&&r.a.createElement(yo,{groupLabel:a,postGroupLabel:o,attributes:s,viewAfter:c,viewBefore:l})))},ko=function(e){var t=e.chartData,a=e.chartMetadata,o=e.attributes,i=e.viewAfter,s=e.viewBefore,l=e.hoveredRow,c=e.hoveredX,d=e.showUndefined,h=o.filteredRows,p=Object(n.useMemo)((function(){return function(e,t){var a=e.keys,n=e.labels,r=e.groupBy,o=e.postGroupBy,i=e.aggrGroups,s=e.postAggregated,l=a[r],c=a[o],d=(t||Object(C.a)(Array(l.length)).map((function(e,t){return t}))).reduce((function(e,t){var a=l[t];a in e||(e[a]={labels:[],indexes:[],chartLabels:[],postAggregated:[]});var r=e[a];r.indexes.push(t),r.labels.push(c[t]),r.postAggregated.push(s[t]);var o=i.reduce((function(e,a){return n[a][t]?Object(g.a)({},e,Object(u.a)({},a,n[a][t])):e}),{});return r.chartLabels.push(o),e}),{}),h=Object.keys(d).sort((function(e,t){return d[t].indexes.length-d[e].indexes.length})),p=h.map((function(e){return d[e]})),f=p.map((function(e){return i.reduce((function(t,a){var n=new Set(e.chartLabels.reduce((function(e,t){return t[a]?[].concat(Object(C.a)(e),Object(C.a)(t[a])):e}),[]));return 0===n.size?t:Object(g.a)({},t,Object(u.a)({},a,Array.from(n)))}),{})}));return{labels:h,data:p,chartLabels:f}}(t,h)}),[h,t]),f=p.data,m=p.labels,b=p.chartLabels,v=t.id,_=t.result.data,y=t.groupBy,O=t.postGroupBy,x=Object(n.useMemo)((function(){return f.map((function(e){return{labels:e.labels,data:-1===l||l>_.length||!(l in _)?e.postAggregated:e.indexes.map((function(e){return _[l][e+1]}))||[]}}))}),[_,f,l]);return r.a.createElement(Z.j,{column:!0,width:"100%",height:"100%",gap:4,padding:[4,2]},r.a.createElement(Nr,{data:x,labels:m,renderBoxPopover:function(e){var t=e.groupIndex,a=e.index,n=e.align,l=f[t].labels[a],c=zr(O).title;return r.a.createElement(Ao,{align:n,title:"".concat(c,": ").concat(l),groupLabel:m[t],postGroupLabel:l,chartLabels:f[t].chartLabels[a],attributes:o,viewBefore:s,viewAfter:i})},renderGroupPopover:function(e){var t=e.groupIndex,a=e.align,n=m[t],l=zr(y).title;return r.a.createElement(Ao,{align:a,title:"".concat(l,": ").concat(n),groupLabel:n,chartLabels:b[t],attributes:o,viewBefore:s,viewAfter:i})}}),r.a.createElement(Z.j,{"data-testid":"legend-container",justifyContent:"between"},r.a.createElement(Fr,null,v),r.a.createElement(nn,{chartMetadata:a,showUndefined:d,hoveredX:c,viewBefore:s,chartData:t})))},jo=function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartLibrary,l=e.colors,c=e.chartUuid,u=e.chartHeight,d=e.chartWidth,h=e.dimensionsVisibility,p=e.hasEmptyData,f=e.isRemotelyControlled,g=e.legendFormatValue,m=e.orderedColors,b=e.hoveredRow,v=e.hoveredX,_=e.onUpdateChartPanAndZoom,y=e.immediatelyDispatchPanAndZoom,O=e.setHoveredX,x=e.setMinMax,w=e.showLatestOnBlur,E=e.unitsCurrent,S=e.viewAfterForCurrentData,C=e.viewBeforeForCurrentData,A=Object(la.a)(),k=Object(la.b)(ue.I),j=Object(n.useCallback)((function(e){var t=e.after,a=e.before,n=e.masterID;A(Object(Ke.r)({after:t,before:a,masterID:n})),A(k?Object(Ke.s)({after:S,before:C}):Object(_e.h)({after:S,before:C,id:c}))}),[c,A,k,S,C]),T=ya[s],D=T.hasLegend,P=D(t)?va()("netdata-chart-with-legend-".concat(t.legendPosition||"right"),"netdata-".concat(s,"-chart-with-legend-right")):va()("netdata-chart","netdata-".concat(s,"-chart")),M="".concat(s,"-").concat(c,"-chart"),L=-1===b&&!w;return function(e){var t=e.attributes,a=e.chartData,r=e.chartSettings,o=e.hoveredRow,i=e.legendFormatValue,s=e.showUndefined,l=Object(n.useRef)([]);Object(dn.a)((function(){var e=t.showValueOf;if(e&&!Object(un.a)(e)){var n=a.dimension_names,r=a.dimension_ids;n.forEach((function(t,a){var n=e["show-value-of-".concat(t.toLowerCase())]||e["show-value-of-".concat(r[a].toLowerCase(),"-at")];l.current=l.current.concat(document.getElementById(n))}))}})),Object(n.useEffect)((function(){if(l.current.length){var e=r.options(t),n=e.includes("flip");if("json"===a.format&&!e.includes("objectrows")){var c=a.result.data,u=-1===o?c.length-1:o,d=c[n?u:c.length-u-1];a.dimension_names.forEach((function(e,t){var a=s||!d?"":i(d[t+1]),n=l.current[t];n&&(n.innerText="".concat(a))}))}}}),[t,a,r,o,i,s])}({attributes:t,chartData:o,chartSettings:T,hoveredRow:b,legendFormatValue:g,showUndefined:L}),"easypiechart"===s?r.a.createElement(Xn,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,chartLibrary:s,chartWidth:d,colors:l,chartUuid:c,dimensionsVisibility:h,isRemotelyControlled:f,key:d,legendFormatValue:g,orderedColors:m,hoveredRow:b,onUpdateChartPanAndZoom:_,setGlobalChartUnderlay:j,setMinMax:x,showUndefined:L,unitsCurrent:E,viewAfter:S,viewBefore:C}):"gauge"===s?r.a.createElement(qn,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,chartLibrary:s,chartHeight:u,chartWidth:d,colors:l,chartUuid:c,dimensionsVisibility:h,isRemotelyControlled:f,legendFormatValue:g,orderedColors:m,hoveredRow:b,hoveredX:v,onUpdateChartPanAndZoom:_,setGlobalChartUnderlay:j,setHoveredX:O,setMinMax:x,showUndefined:L,unitsCurrent:E,viewAfter:S,viewBefore:C}):"sparkline"===s?r.a.createElement(nr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,dimensionsVisibility:h,isRemotelyControlled:f,orderedColors:m,unitsCurrent:E,viewAfterForCurrentData:S,viewBeforeForCurrentData:C}):"d3pie"===s?r.a.createElement(dr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,dimensionsVisibility:h,hoveredRow:b,hoveredX:v,isRemotelyControlled:f,legendFormatValue:g,orderedColors:m,setMinMax:x,showUndefined:L,unitsCurrent:E}):"peity"===s?r.a.createElement(hr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,orderedColors:m}):"google"===s?r.a.createElement(pr,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,orderedColors:m,unitsCurrent:E}):"textonly"===s?r.a.createElement(fr,{attributes:t,chartData:o,chartElementClassName:P,chartElementId:M}):"groupbox"===s?r.a.createElement(ko,{chartData:o,chartMetadata:i,attributes:t,viewAfter:S,viewBefore:C,hoveredRow:b,hoveredX:v,showUndefined:L}):r.a.createElement(Gn,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,chartLibrary:s,colors:l,chartUuid:c,dimensionsVisibility:h,hasEmptyData:p,hasLegend:D(t),isRemotelyControlled:f,orderedColors:m,immediatelyDispatchPanAndZoom:y,hoveredRow:b,hoveredX:v,onUpdateChartPanAndZoom:_,setGlobalChartUnderlay:j,setHoveredX:O,setMinMax:x,unitsCurrent:E,viewAfter:S,viewBefore:C})},To=Object(n.memo)((function(e){var t=e.attributes,a=e.attributes.chartLibrary,o=e.chartContainerElement,i=e.chartData,s=e.chartMetadata,l=e.chartHeight,c=e.chartUuid,u=e.chartWidth,d=e.defaultAfter,h=e.globalPanAndZoom,p=e.hasEmptyData,f=e.isRemotelyControlled,g=e.viewRangeForCurrentData,m=e.viewRange,b=e.selectedDimensions,v=e.setSelectedDimensions,_=e.showLatestOnBlur,y=Object(n.useContext)($.a),O=Object(la.b)(ue.O),x=ya[a].hasLegend,w=t.units,E=void 0===w?s.units:w,S=t.unitsCommon,C=t.unitsDesired,k=void 0===C?O:C,j=Object(n.useMemo)((function(){return i.dimension_names.map((function(e){return 0===b.length||b.includes(e)}))}),[i.dimension_names,b]),T=x(t)&&window.NETDATA.options.current.legend_toolbox,D=T&&window.NETDATA.options.current.resize_charts&&!t.hideResizeHandler,P=Object(la.a)(),M=Object(n.useMemo)((function(){var e=Object.values(s.dimensions).map((function(e){return e.name})),t=i.dimension_names.filter((function(t){return!e.includes(t)}));return e.concat(t)}),[i.dimension_names,s.dimensions]);Object(n.useEffect)((function(){P(Object(Ke.h)({chartContext:s.context,chartUuid:c,colorsAttribute:t.colors,commonColorsAttribute:t.commonColors,dimensionNames:M}))}),[M,t.colors,t.commonColors,s.context,c,P]);var L=Ra({attributes:t,data:i,units:E,unitsCommon:S,unitsDesired:k,uuid:c}),I=L.legendFormatValue,N=L.legendFormatValueDecimalsFromMinMax,R=L.unitsCurrent,F=Object(n.useState)(null),B=Object(A.a)(F,2),H=B[0],z=B[1],U=Object(la.b)(ue.J),G=Object(n.useCallback)((function(e,t){if(U){var a=t?{chartUuid:null,hoveredX:e}:{chartUuid:c,hoveredX:e};P(Object(Ke.u)(a))}else z(e)}),[c,P,U]),W=Object(la.b)(ue.o),V=U?W:H,Y=Object(Ve.e)(m[0])?m[0]:i.after*Ve.a,X=Object(Ve.e)(m[1])?m[1]:i.before*Ve.a,K=Object(Ve.e)(g[0])?g[0]:i.after*Ve.a,Z=Object(Ve.e)(g[1])?g[1]:i.before*Ve.a,q=i.first_entry*Ve.a,J=i.last_entry*Ve.a,Q=Object(n.useMemo)((function(){return Math.round(u/30*s.update_every*Ve.a)}),[s.update_every,u]),ee=Object(la.b)(ue.I),te=Object(ka.a)((function(e){P(Object(Ke.s)(e))}),400),ae=Object(n.useCallback)((function(){te.flush()}),[te]),ne=Object(n.useCallback)((function(e){var t=e.after,a=e.before,n=e.callback,r=e.shouldFlushImmediately,o=void 0!==r&&r,s=e.shouldForceTimeRange,l=e.shouldNotExceedAvailableRange;if(!(a<t)){var u=Q,d=Math.round(X-Y),h=Math.round(t),p=Math.round(a),f=i.view_update_every*Ve.a;if(l){var g=q+f,m=J+f;p>m&&(h-=a-m,p=m),h<g&&(h=g)}var b=(p+=f-p%f)-(h-=h%f);d-f<u&&(u=d-f);var v=!0;if(b<d&&b<u){var _=((u=Q)-b)/2;b=(p+=_)-(h-=_),v=!1}var y=2*f,O=Math.abs(p-X);Math.abs(d-b)<=y&&O<=y&&v||(ee?(te.callback({after:h,before:p,masterID:c,shouldForceTimeRange:s}),o&&te.flush()):P(Object(_e.h)({after:h,before:p,id:c,shouldForceTimeRange:s})),v&&"function"===typeof n&&n(h,p))}}),[i.view_update_every,c,P,Q,ee,q,J,te,Y,X]),re=Object(n.useCallback)((function(e,t){var a=Math.max(e,q),n=Math.min(t,J);ne({after:a,before:n,shouldForceTimeRange:!0,shouldFlushImmediately:!0})}),[ne,q,J]),oe=Object(n.useCallback)((function(e){var t=(X-Y)*ja(e),a=Y-t;a>=q&&re(a,X-t)}),[re,q,Y,X]),ie=Object(n.useCallback)((function(e){var t=X-Y,a=t*ja(e),n=Math.min(X+a,J);re(n-t,n)}),[re,J,Y,X]),se=Object(n.useCallback)((function(e){var t=.8*ja(e);if(h)if(X-Y>1.2*(J-q))re(q,J);else{var a=(X-Y)*t/2;re(Y+a,X-a)}else P(Object(Ke.q)({after:Math.round(d/(t+1))}))}),[d,P,h,re,q,J,Y,X]),le=Object(n.useCallback)((function(e){var t=.8*ja(e);if(h){var a=((X-Y)/(1-.8*t)-(X-Y))/2;re(Y-a,X+a)}else P(Object(Ke.q)({after:Math.round(d*(t+1))}))}),[d,P,h,re,Y,X]),ce=Object(n.useMemo)((function(){return Object(ue.a)({chartContext:s.context,chartUuid:c,colorsAttribute:t.colors,commonColorsAttribute:t.commonColors})}),[t.colors,t.commonColors,s,c]),de=Object(la.b)(ce),he=Object(n.useMemo)((function(){return i.dimension_names.map(Object(qe.a)(Aa.a,de))}),[i,de]);if(!de)return r.a.createElement("span",null);var pe=V&&V>=Y&&V<=X,fe=i.view_update_every*Ve.a,ge=pe?Math.floor((V-i.after*Ve.a)/fe):-1,me="bottom"===t.legendPosition,be=r.a.createElement(ln,{onToolboxLeftClick:oe,onToolboxRightClick:ie,onToolboxZoomInClick:se,onToolboxZoomOutClick:le}),ve=D&&r.a.createElement(cn.c,{chartContainerElement:o,chartUuid:c,heightId:t.heightId,isLegendOnBottom:me});return r.a.createElement(r.a.Fragment,null,r.a.createElement(jo,{key:y.name,attributes:t,chartContainerElement:o,chartData:i,chartMetadata:s,chartLibrary:a,colors:de,chartUuid:c,chartHeight:l,chartWidth:u,dimensionsVisibility:j,hasEmptyData:p,onUpdateChartPanAndZoom:ne,immediatelyDispatchPanAndZoom:ae,isRemotelyControlled:f,legendFormatValue:I,orderedColors:he,hoveredX:V,hoveredRow:ge,setHoveredX:G,setMinMax:function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return N(a,n)},showLatestOnBlur:_,unitsCurrent:R,viewAfterForCurrentData:K,viewBeforeForCurrentData:Z}),x(t)&&r.a.createElement(on,{attributes:t,chartUuid:c,chartMetadata:s,chartLibrary:a,colors:de,hoveredX:V,hoveredRow:ge,legendFormatValue:I,selectedDimensions:b,setSelectedDimensions:v,showLatestOnBlur:_,unitsCurrent:R,viewBefore:X,legendToolbox:be,resizeHandler:ve}),T&&!me&&be,!me&&ve)})),Do=a(555),Po=a(548),Mo=a(192),Lo=$.d.div.withConfig({displayName:"styled__DropdownItem",componentId:"sc-1pvwpze-0"})(["display:flex;flex-direction:start;align-items:center;color:",";white-space:nowrap;& > svg use{fill:",";}"],Object(Z.F)(["neutral","limedSpruce"]),Object(Z.F)(["neutral","limedSpruce"])),Io=$.d.span.withConfig({displayName:"styled__DropdownItemLabel",componentId:"sc-1pvwpze-1"})(["margin-left:12px;"]),No=Object($.d)(Z.o).withConfig({displayName:"styled__DotsBtn",componentId:"sc-1pvwpze-2"})(["width:6px;height:10px;cursor:pointer;& use{fill:",";&:hover{fill:",";}}"],Object(Z.F)(["neutral","limedSpruce"]),Object(Z.F)(["neutral","regentgrey"])),Ro=function(e){var t=e.attributes,a=e.chartID,o=e.chartMetadata,i=e.dropdownMenu,s=Object(n.useState)(!1),l=Object(A.a)(s,2),c=l[0],u=l[1],d=function(){u(!1)};return r.a.createElement(r.a.Fragment,null,r.a.createElement(No,{name:"dots_2x3",onClick:function(){u(!0)}}),r.a.createElement(Mo.b,null,r.a.createElement(Mo.a,{open:c,onClose:d},r.a.createElement(Do.a,null,i.map((function(e){var n=e.icon,i=e.label,s=e.onClick;return r.a.createElement(Po.b,{key:i,text:r.a.createElement(Lo,null,n,r.a.createElement(Io,null,i)),onClick:function(){s({attributes:t,chartMetadata:o,chartID:a}),d()}})}))))))},Fo=Object($.e)(["0%{opacity:.1;}50%{opacity:.5;}100%{opacity:.1;}"]),Bo=$.d.div.withConfig({displayName:"styled__SpinnerContainer",componentId:"sc-1foc7xt-0"})(["position:absolute;top:","px;right:","px;display:flex;"],Object(qe.a)("top"),Object(qe.a)("right")),Ho=$.d.div.withConfig({displayName:"styled__Circle",componentId:"sc-1foc7xt-1"})(["width:","px;height:","px;background:",";border-radius:50%;animation:1s linear infinite both ",";"],Object(qe.a)("size"),Object(qe.a)("size"),Object(Z.F)("border"),Fo),zo=Object($.d)(Ho).withConfig({displayName:"styled__Circle2",componentId:"sc-1foc7xt-2"})(["animation-delay:.3s;margin-left:","px;"],Object(qe.a)("spaceBetween")),Uo=Object($.d)(Ho).withConfig({displayName:"styled__Circle3",componentId:"sc-1foc7xt-3"})(["animation-delay:.6s;margin-left:","px;"],Object(qe.a)("spaceBetween")),Go=function(e){var t=e.chartLibrary,a="dygraph"===t?33:0,n="dygraph"===t?8:0,o="dygraph"===t?10:7,i="dygraph"===t?4:2;return r.a.createElement(Bo,{top:a,right:n},r.a.createElement(Ho,{size:o}),r.a.createElement(zo,{size:o,spaceBetween:i}),r.a.createElement(Uo,{size:o,spaceBetween:i}))},Wo=$.d.div.withConfig({displayName:"styled__ChartDropdownContainer",componentId:"sc-177ahzb-0"})(["position:absolute;top:0;left:40px;width:20px;height:20px;z-index:",";"],10),Vo=(a(440),{"sum-of-abs":"sum"}),Yo=[],Xo=function(e){var t,a,o,i,s,l=e.attributes,c=e.chartUuid,u=e.uuid,d=e.dropdownMenu,h=e.externalChartMetadata,p=e.portalNode,g=e.renderCustomElementForDygraph,m=e.onAttributesChange,b=l.host,v=void 0===b?D.b:b,_=l.id,y=l.nodeIDs,O=Object(la.a)(),x=Object(n.useMemo)(Ea.a,[]),w=Object(la.b)((function(e){return x(e,{chartId:_,id:c})})),E=w.chartMetadata,S=w.isFetchingDetails,k=h||E;Object(n.useEffect)((function(){E||S||h||O(_e.b.request({chart:_,id:c,host:v,nodeIDs:y}))}),[_,c,O,v,S,E,h,y,u]);var T=Object(la.b)(ue.m),P=Object(la.b)((function(e){return Object(Ea.i)(e,{id:c})})),M=P||T,L=!!T&&T.masterID===c||Boolean(P),I=(null===M||void 0===M?void 0:M.shouldForceTimeRange)||!1,N=!M||!L||I,R=Object(la.b)((function(e){return Object(Ea.g)(e,{id:c})})),F=Object(la.b)((function(e){return Object(Ea.j)(e,{id:c})})),B=Object(la.b)((function(e){return Object(Ea.f)(e,{id:c})})),H=Object(la.b)((function(e){return Object(Ea.h)(e,{id:c})})),z=Object(la.b)(ue.o),U=Object(ua.a)([[Object(da.a)(!!B),function(){return 1e3*B.view_update_every}],[Object(da.a)(!!k),function(){return 1e3*k.update_every}],[ha.a,Object(da.a)(f.a)]])(),G=function(e){var t=e.areCriteriaMet,a=e.preferedIntervalTime,r=Object(la.b)(ue.s),o=Object(la.b)(ue.H),i=Object(la.b)(ue.n),s=!(!r&&o)&&!i,l=Object(n.useState)(!0),c=Object(A.a)(l,2),u=c[0],d=c[1],h=Object(n.useState)(!1),p=Object(A.a)(h,2),f=p[0],g=p[1];Object(n.useEffect)((function(){f&&s&&(g(!1),d(!0))}),[f,g,s]);var m=!s&&f||ve?wa:a;return Object(xa.a)((function(){if(t){if(!s)return void g(!0);d(!0)}}),m),[u,d]}({areCriteriaMet:!M&&!z,preferedIntervalTime:U}),W=Object(A.a)(G,2),V=W[0],Y=W[1],X=Object(pa.a)(M,f.b);Object(n.useEffect)((function(){Y(!0)}),[X,Y]);var K=Object(la.b)(ue.i);Object(fa.a)((function(){Y(!0)}),[l.after,l.before,K,l.dimensions,l.aggrMethod,l.groupBy]);var Z=l.before,q=void 0===Z?window.NETDATA.chartDefaults.before:Z,$=l.after||K,J=ya[l.chartLibrary],Q=J.hasLegend,ee=p.getBoundingClientRect(),te=ee.width-(Q(l)?140:0),ae=ee.height,ne=Boolean(Object(la.b)(ue.E)),re=Object(la.b)(ue.A)||ne,oe=Object(la.b)(ue.x),ie=j.a.CancelToken,se=Object(n.useMemo)((function(){return ie.source()}),[]);Object(ga.a)((function(){se.cancel("Chart scrolled out of view")}));var le=Object(n.useState)(!1),ce=Object(A.a)(le,2),de=ce[0],he=ce[1],pe=de&&H;Object(ma.a)((function(){H&&he(!0)}),2e3,[H]),Object(n.useEffect)((function(){!H&&de&&he(!1)}),[H,de]),Object(n.useEffect)((function(){if(V&&k&&!H){var e,t,a,n=window.NETDATA.options.force_data_points,r=1;if(M)if(L){if(a=[e=Math.round(M.after/1e3),t=Math.round(M.before/1e3)],oe){var o=Math.round((t-e)/2);e-=o,t+=o,r=2}}else e=Math.round(M.after/1e3),t=Math.round(M.before/1e3),r=1;else t=q,e=$,r=1;a=(a||[e,t]).map((function(e){return 1e3*e}));var i=l.points||Math.round(te/function(e){var t=e.attributes,a=e.chartSettings,n=t.pixelsPerPoint;if("number"===typeof n)return n;var r=a.pixelsPerPoint(t);return Math.max.apply(Math,Object(C.a)([r,window.NETDATA.options.current.pixels_per_point].filter((function(e){return"number"===typeof e}))))}({attributes:l,chartSettings:J})),s=n||i*r,u=l.forceTimeWindow||Boolean(K)?function(e){var t=e.after,a=e.before,n=e.firstEntry,r=e.points,o=Math.round((new Date).valueOf()/1e3),i=t>0?t:o+t,s=a>0?a:o+a;if(i<n){var l=s-i,c=s-Math.max(i,n);return Math.round(r*c/l)}return null}({after:e,before:t,firstEntry:k.first_entry,points:s}):null,d=l.method||window.NETDATA.chartDefaults.method;Y(!1),O(_e.c.request({host:v,context:k.context,chart:k.id,format:J.format,points:u||s,group:d,gtime:l.gtime||0,options:Oa(l,re),after:e||null,before:t||null,dimensions:l.dimensions,labels:l.labels,postGroupBy:l.postGroupBy,postAggregationMethod:l.postAggregationMethod,aggrMethod:l.aggrMethod,aggrGroups:l.aggrGroups,dimensionsAggrMethod:Vo[l.dimensionsAggrMethod]||l.dimensionsAggrMethod,nodeIDs:y,httpMethod:l.httpMethod,groupBy:l.groupBy,fetchDataParams:{fillMissingPoints:u?s-u:void 0,isRemotelyControlled:N,viewRange:a},id:c,cancelTokenSource:se}))}}),[l,k,J,c,te,K,O,Q,v,q,H,L,N,$,M,p,Y,re,oe,V,se,y,u]),Object(la.b)(ue.G);var fe=null===l||void 0===l?void 0:l.selectedDimensions,ge=Object(n.useState)(fe||Yo),me=Object(A.a)(ge,2),be=me[0],ye=me[1];Object(n.useLayoutEffect)((function(){fe&&ye(fe)}),[fe]),Object(n.useLayoutEffect)((function(){ye(fe||Yo)}),[null===l||void 0===l?void 0:l.groupBy]);var Oe=Object(n.useMemo)((function(){return g&&g({onAttributesChange:m,attributes:l,chartMetadata:k,chartData:B,chartID:_})}),[m,g,l,_,k,B]),xe=0===(null===(t=B)||void 0===t?void 0:null===(a=t.result)||void 0===a?void 0:null===(o=a.data)||void 0===o?void 0:o.length)||0===(null===(i=B)||void 0===i?void 0:null===(s=i.result)||void 0===s?void 0:s.length);return B&&k?r.a.createElement(r.a.Fragment,null,xe&&r.a.createElement(Ca,{key:"".concat(xe),hasEmptyData:xe,containerNode:p}),r.a.createElement(To,{attributes:l,chartContainerElement:p,chartData:B,chartMetadata:k,chartUuid:c,chartHeight:ae,chartWidth:te,defaultAfter:K,globalPanAndZoom:T,hasEmptyData:xe,isRemotelyControlled:R.isRemotelyControlled,viewRangeForCurrentData:R.viewRange,viewRange:F,selectedDimensions:be,setSelectedDimensions:ye,showLatestOnBlur:!M}),pe&&r.a.createElement(Go,{chartLibrary:l.chartLibrary}),d&&d.length>0&&r.a.createElement(Wo,null,r.a.createElement(Ro,{dropdownMenu:d,chartID:_,attributes:l,chartMetadata:k})),Oe):r.a.createElement(r.a.Fragment,null,r.a.createElement(Ca,{key:"".concat(xe),hasEmptyData:xe,containerNode:p}),pe&&r.a.createElement(Go,{chartLibrary:l.chartLibrary}))},Ko=a(497),Zo=function(e){return e[O.a]},qo=Object(Ha.a)(Zo,Object(qe.a)("isSnapshotMode")),$o=Object(Ha.a)(Zo,Object(Ko.a)(["snapshotCharts","snapshotDataPoints"])),Jo=function(e){var t=e.attributes,a=e.chartUuid,r=t.host||D.b,o=Object(la.b)($o).snapshotDataPoints,i=t.method||window.NETDATA.chartDefaults.method,s=t.chartLibrary,l=ya[s],c=Object(la.b)(ue.m),u=c.after/Ve.a,d=c.before/Ve.a,h=Object(la.a)();return Object(n.useEffect)((function(){h(_e.e.request({host:r,context:t.id,chart:t.id,format:l.format,points:o,group:i,gtime:t.gtime||0,options:Oa(t,!0),after:u||null,before:d||null,dimensions:t.dimensions,aggrMethod:t.aggrMethod,nodeIDs:t.nodeIDs,chartLibrary:s,id:a,groupBy:t.groupBy}))})),null},Qo=function(e){var t=e.attributes,a=e.chartUuid;return Object(la.b)(qo)?r.a.createElement(Jo,{attributes:t,chartUuid:a}):null},ei=Object(n.memo)((function(){var e=Array.from(document.querySelectorAll("[data-netdata]"));return r.a.createElement(r.a.Fragment,null,e.map((function(e,t){var a=Object(ca.b)(e),n="".concat(a.id,"-").concat(t);return Object(o.createPortal)(r.a.createElement(r.a.Fragment,null,r.a.createElement(ao,{attributes:a,chartUuid:n,portalNode:e},r.a.createElement(Xo,{attributes:a,chartUuid:n,portalNode:e})),r.a.createElement(Qo,{attributes:a,chartUuid:n})),e)})))})),ti=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0,r=Object(n.useState)(!1),o=Object(A.a)(r,2),i=o[0],s=o[1],l=Object(n.useState)(!1),c=Object(A.a)(l,2),u=c[0],d=c[1],h=Object(n.useState)(null),p=Object(A.a)(h,2),f=p[0],g=p[1];return Object(n.useEffect)((function(){if(t&&e){var n=a?{headers:null,withCredentials:!1}:{};s(!0),T.get(e,n).then((function(e){e.data&&(g(e.data),d(!1),s(!1))})).catch((function(t){console.warn("error fetching ".concat(e),t),d(!0),s(!1)}))}}),[a,t,e]),[f,i,u]},ai=document.getElementById("modal-root"),ni=function(e){var t=e.children,a=Object(n.useRef)(document.createElement("div"));return Object(n.useEffect)((function(){return ai.appendChild(a.current),function(){ai.removeChild(a.current)}}),[]),Object(o.createPortal)(t,a.current)},ri=(a(441),function(){var e=Object(n.useRef)(null);Object(n.useEffect)((function(){e.current&&window.$(e.current).modal("show")}));var t=Object(la.b)(Ea.b),a=Object(la.b)(Ea.c),o=Object(la.b)(Ea.k),i=0===t?0:a/t*100;Object(n.useEffect)((function(){100===i&&setTimeout((function(){window.$(e.current).modal("hide"),window.print(),window.close()}),1e3)}),[i]);var s=o&&"".concat(Math.round(i),"%, ").concat(o);return r.a.createElement(ni,null,r.a.createElement("div",{ref:e,className:"modal fade",id:"printModal",tabIndex:-1,role:"dialog","aria-labelledby":"printModalLabel","data-keyboard":"false","data-backdrop":"static"},r.a.createElement("div",{className:"modal-dialog modal-lg",role:"document"},r.a.createElement("div",{className:"modal-content"},r.a.createElement("div",{className:"modal-header"},r.a.createElement("button",{type:"button",className:va()("close",{"print-modal__close-button--disabled":!0}),"data-dismiss":"modal","aria-label":"Close"},r.a.createElement("span",{"aria-hidden":"true"},"\xd7")),r.a.createElement("h4",{className:"modal-title",id:"printModalLabel"},"Preparing dashboard for printing...")),r.a.createElement("div",{className:"modal-body"},"Please wait while we initialize and render all the charts on the dashboard.",r.a.createElement("div",{className:"progress progress-striped active",style:{height:"2em"}},r.a.createElement("div",{id:"printModalProgressBar",className:"progress-bar progress-bar-info",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,style:{minWidth:"2em",width:"".concat(i,"%")}},r.a.createElement("span",{id:"printModalProgressBarText",style:{paddingLeft:10,paddingTop:4,fontSize:"1.2em",textAlign:"left",width:"100%",position:"absolute",display:"block",color:"black"}},s))),"The print dialog will appear as soon as we finish rendering the page."),r.a.createElement("div",{className:"modal-footer"})))))}),oi=$.d.div.withConfig({displayName:"styled__SocialMediaContainer",componentId:"sc-3gu94j-0"})(["width:185px;padding:",";background:",";font-size:12px;margin-bottom:",";"],Object(Z.H)(2),Object(Z.F)("borderSecondary"),Object(Z.H)(3)),ii=$.d.div.withConfig({displayName:"styled__FirstRow",componentId:"sc-3gu94j-1"})(["display:flex;justify-content:space-between;"]),si=$.d.div.withConfig({displayName:"styled__GithubCopy",componentId:"sc-3gu94j-2"})([""]),li=$.d.div.withConfig({displayName:"styled__GithubCopyLine",componentId:"sc-3gu94j-3"})([""]),ci=$.d.a.withConfig({displayName:"styled__SocialMediaLink",componentId:"sc-3gu94j-4"})(["&,&:hover{color:",";}"],Object(Z.F)("main")),ui=Object($.d)(ci).withConfig({displayName:"styled__GithubStarQuestion",componentId:"sc-3gu94j-5"})([""]),di=Object($.d)(ci).withConfig({displayName:"styled__GithubIcon",componentId:"sc-3gu94j-6"})(["font-size:24px;"]),hi=Object($.d)(ci).withConfig({displayName:"styled__TwitterIcon",componentId:"sc-3gu94j-7"})(["font-size:17px;"]),pi=Object($.d)(ci).withConfig({displayName:"styled__FacebookIcon",componentId:"sc-3gu94j-8"})(["font-size:23px;"]),fi=$.d.div.withConfig({displayName:"styled__Separator",componentId:"sc-3gu94j-9"})(["margin-top:",";border-top:1px solid ",";"],Object(Z.H)(2),Object(Z.F)("separator")),gi=$.d.div.withConfig({displayName:"styled__SecondRow",componentId:"sc-3gu94j-10"})(["margin-top:",";display:flex;align-items:center;justify-content:space-between;"],Object(Z.H)(2)),mi=$.d.span.withConfig({displayName:"styled__SecondRowText",componentId:"sc-3gu94j-11"})(["font-size:10px;"]),bi=function(){return r.a.createElement(oi,null,r.a.createElement(ii,null,r.a.createElement(si,null,r.a.createElement(li,null,"Do you like Netdata?"),r.a.createElement(ui,{href:"https://github.com/netdata/netdata/",target:"_blank"},"Give us a star!")),r.a.createElement(di,{href:"https://github.com/netdata/netdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-github"}))),r.a.createElement(fi,null),r.a.createElement(gi,null,r.a.createElement(mi,null,"And share the word!"),r.a.createElement(hi,{href:"https://twitter.com/linuxnetdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-twitter"})),r.a.createElement(pi,{href:"https://www.facebook.com/linuxnetdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-facebook"}))))},vi=function(e){var t=e.children,a=Object(n.useRef)(document.querySelector("#sidebar-end-portal-container"));return Object(o.createPortal)(t,a.current)},_i=(a(442),Object($.d)((function(e){var t=e.className,a=Object(gr.a)(e,["className"]);return r.a.createElement("div",{className:t},r.a.createElement(q.a,Object.assign({},a,{closeButton:!1})))})).withConfig({displayName:"notifications-container__NotificationsContainer",componentId:"n0kffi-0"})([".Toastify__toast-container{position:fixed;width:unset;min-width:400px;max-width:500px;",";color:",";}.Toastify__toast{padding:0;padding-top:5px;}.Toastify__toast--error{background:",";border:1px solid ",";}.Toastify__toast--warning{}.Toastify__toast--success{background:",";border:1px solid ",";}.Toastify__toast-body{}.Toastify__progress-bar{bottom:unset;top:0;}.Toastify__progress-bar--success{background-color:",";}.Toastify__progress-bar--error{background-color:",";}"],"z-index: 50;",Object(Z.F)(["neutral","limedSpruce"]),Object(Z.F)(["red","lavender"]),Object(Z.F)("error"),Object(Z.F)(["green","frostee"]),Object(Z.F)("success"),Object(Z.F)("success"),Object(Z.F)("error"))),yi=function(e){var t=e.icon,a=e.children,n=e.hasBorder;return r.a.createElement(Z.j,{gap:2,border:n&&{side:"right",color:"separator"},alignItems:"center",padding:[0,3,0,0],height:"100%"},!!t&&r.a.createElement(Z.o,{name:t,color:"bright",height:"15px"}),a)},Oi=function(e){var t=e.global.snapshot,a=e.global.chartsMetadata.data;return t||a?t?t.hostname:a.hostname:""},xi=function(){var e=Object(la.b)(Oi);return r.a.createElement(yi,{icon:"node_hollow"},r.a.createElement(Z.z,{"data-testid":"header-nodename-".concat(e),color:"bright",strong:!0,truncate:!0},e))},wi=["neutral","black"],Ei=function(e){var t=e.children,a=e.isBasic;return r.a.createElement(Z.j,Object.assign({padding:[1.5,2],margin:[2],background:wi,round:1},!a&&{width:{max:"300px"}}),r.a.createElement(Z.D,{color:"bright"},t))},Si=function(e,t){var a=t.isBasic,n="function"===typeof e?e():e;return"string"===typeof e||a?r.a.createElement(Ei,{isBasic:a},n):n},Ci=function(e){var t=e.children,a=e.content,o=e.isBasic,i=Object(gr.a)(e,["children","content","isBasic"]),s=Object(n.useCallback)((function(){return Si(a,{isBasic:o})}),[a,o]);return r.a.createElement(Z.E,Object.assign({plain:!0,animation:!0,content:s},i),t)},Ai=function(){var e=Object(la.a)(),t=Object(n.useCallback)((function(){return e(Object(Ke.t)())}),[e]);return r.a.createElement(Z.j,{gap:2,"data-testid":"header-options-button"},r.a.createElement(Ci,{content:"Import a Netdata snapshot",align:"bottom",plain:!0},r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark","data-toggle":"modal","data-target":"#loadSnapshotModal",icon:"download"})),r.a.createElement(Ci,{content:"Export a Netdata snapshot",align:"bottom",plain:!0},r.a.createElement(Z.b,{onClick:t,flavour:"borderless",neutral:!0,themeType:"dark","data-toggle":"modal","data-target":"#saveSnapshotModal",icon:"upload"})),r.a.createElement(Ci,{content:"Print the dashboard",align:"bottom",plain:!0},r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark","data-toggle":"modal","data-target":"#printPreflightModal",icon:"print"})))},ki=a(544),ji=Object($.d)(Z.j).attrs({padding:[4],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[4,0,0],width:110}).withConfig({displayName:"dropdown__Dropdown",componentId:"sc-1pb06sp-0"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),Ti=ji,Di=Object($.d)(Z.j).withConfig({displayName:"protoBuf__PillContainer",componentId:"sc-15abcpz-0"})(["white-space:nowrap;"]),Pi=Object($.d)(Z.z).attrs({as:"a",color:"success",target:"_blank"}).withConfig({displayName:"protoBuf__Link",componentId:"sc-15abcpz-1"})([""]),Mi=function(){var e=Object(En.a)(),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(la.b)(ue.w),s=Object(n.useRef)(),l=Object(ki.a)("(min-width: 1400px)"),c=function(){o(!1)};return i?r.a.createElement(Z.j,{flex:!1},r.a.createElement(Di,{ref:s},r.a.createElement(Z.x,{"data-testid":"header-options-button",onClick:o,flavour:"warning",icon:"warning_triangle_hollow"},l?"NOT MONITORED IN CLOUD":"")),s.current&&a&&r.a.createElement(Z.h,{target:s.current,align:{top:"bottom",left:"left"},onEsc:c,onClickOutside:c,animation:!0},r.a.createElement(Ti,null,r.a.createElement(Z.j,{background:"modalTabsBackground",padding:[4]},r.a.createElement(Z.j,{width:14,flex:!1,alignItems:"start"},r.a.createElement(Z.j,{padding:[2.5],round:"50%",background:"warningText"},r.a.createElement(Z.o,{color:"warningBackground",name:"informationPress"}))),r.a.createElement(Z.j,null,r.a.createElement(Z.z,null,"It will not be possible to monitor this node from Netdata Cloud after 1st of March. ",r.a.createElement("br",null)," ",r.a.createElement("br",null),"This node does not have proto-buf support. In order to learn how to apply proto-buf support to your nodes"," ",r.a.createElement(Pi,{href:"https://www.netdata.cloud/blog/netdata-clouds-new-architecture"},"read our documentation."),r.a.createElement("br",null),r.a.createElement("br",null)," If you are not interested in monitoring this node from Netdata Cloud, you can"," ",r.a.createElement(Pi,{href:"https://learn.netdata.cloud/docs/agent/claim#remove-and-reconnect-a-node"},"unclaim it."))))))):null},Li=function(e){var t,a=e.currentVersion,n="stable"===e.releaseChannel,o=ti("https://api.github.com/repos/netdata/netdata/releases/latest",n,!0),i=Object(A.a)(o,1)[0],s=ti("https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt",!n),l=Object(A.a)(s,1)[0],c=ti(null===l||void 0===l?void 0:l.mediaLink,Boolean(l)),u=Object(A.a)(c,1)[0],d=n?null===(t=i)||void 0===t?void 0:t.tag_name.replace(/(\r\n|\n|\r| |\t)/gm,""):u?function(e){return e.replace(/(\r\n|\n|\r| |\t)/gm,"")}(u):null;if(!d)return null;var h=!function(e,t){if(e===t)return!0;var a=e.split("."),n=t.split("."),r=parseInt(a[0].substring(1,2),10),o=parseInt(n[0].substring(1,2),10);return!(r<o)&&(r>o||!((r=parseInt(a[1],10))<(o=parseInt(n[1],10)))&&(r>o||(a=a[2].split("-"),n=n[2].split("-"),!((r=parseInt(a[0],10))<(o=parseInt(n[0],10)))&&(r>o||!((r=a.length>1?parseInt(a[1],10):0)<(o=n.length>1?parseInt(n[1],10):0))))))}(a,d);return r.a.createElement(Ci,{content:h?"Need help?":"Check Version",align:"bottom",plain:!0},r.a.createElement(Z.b,{"data-testid":"header-version-control-button",flavour:"borderless",themeType:"dark",small:!0,neutral:!h,warning:h,name:h?"update_pending":"update",icon:h?"update_pending":"update","data-toggle":"modal","data-target":"#updateModal"}))},Ii=function(e){var t=e.global.chartsMetadata.data;return t?{version:t.version,releaseChannel:t.release_channel}:null},Ni=function(){var e=Object(la.b)(Ii);return e&&r.a.createElement(Li,{currentVersion:e.version,releaseChannel:e.releaseChannel})},Ri=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(n.useState)(!!e),a=Object(A.a)(t,2),r=a[0],o=a[1],i=Object(n.useCallback)((function(){return o((function(e){return!e}))}),[]),s=Object(n.useCallback)((function(){return o(!0)}),[]),l=Object(n.useCallback)((function(){return o(!1)}),[]);return[r,i,s,l]},Fi=function(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=JSON.parse(localStorage.getItem(e)))&&void 0!==t?t:a},Bi=function(e,t){var a=Object(n.useState)((function(){return Fi(e,t)})),r=Object(A.a)(a,2),o=r[0],i=r[1];return Object(n.useEffect)((function(){return localStorage.setItem(e,JSON.stringify(o))}),[e,o]),[o,i]},Hi=a(551),zi=$.d.div.withConfig({displayName:"styled__RootContainer",componentId:"sc-1al6duq-0"})(["width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;"]),Ui=(Object($.d)(Hi.a).withConfig({displayName:"styled__StyledMenu",componentId:"sc-1al6duq-1"})([""]),$.d.div.withConfig({displayName:"styled__DropdownContainer",componentId:"sc-1al6duq-2"})(["cursor:pointer;color:",";.mdc-menu-surface{border-radius:0;.mdc-list{padding:0;}.mdc-list-item{padding:0 "," 0 ",";font-size:14px;height:",";}}"],Object(Z.F)("bright"),Object(Z.H)(5),Object(Z.H)(5),Object(Z.H)(6))),Gi=$.d.div.withConfig({displayName:"styled__ListContainer",componentId:"sc-1al6duq-3"})(["padding:"," 0;"],Object(Z.H)(3)),Wi=Object($.d)(Z.o).withConfig({displayName:"styled__OpenerIcon",componentId:"sc-1al6duq-4"})(["flex-shrink:0;flex-grow:0;margin-left:",";fill:",";width:10px;height:5px;"],(function(e){return e.noMargin?"unset":"16px"}),Object(Z.F)("bright")),Vi=$.d.div.withConfig({displayName:"styled__PickerBox",componentId:"y9nggg-0"})(["display:flex;position:relative;min-width:",";min-height:",";flex-direction:column;align-items:flex-end;background-color:",";color:",";z-index:",";border-radius:8px;"],Object(Z.H)(102),Object(Z.H)(43),Object(Z.F)("mainBackground"),Object(Z.F)("text"),60),Yi=$.d.span.withConfig({displayName:"styled__StyledTimePeriod",componentId:"y9nggg-1"})(["margin-top:",";cursor:pointer;width:187px;height:",";&:first-of-type{margin-top:",";}&:last-of-type{margin-bottom:",";}& > span:hover{color:",";}"],Object(Z.H)(3),Object(Z.H)(2),Object(Z.H)(1),Object(Z.H)(1),Object(Z.F)("textLite")),Xi=$.d.span.withConfig({displayName:"styled__StyledCustomTimePeriod",componentId:"y9nggg-2"})(["margin:"," "," 0;color:",";cursor:pointer;&:first-of-type{margin-top:0;}&:hover{color:",";}"],Object(Z.H)(1),Object(Z.H)(3),(function(e){var t=e.isSelected,a=e.theme;return Object(Z.F)(t?"primary":"text")({theme:a})}),Object(Z.F)("textLite")),Ki=Object($.d)((function(e){var t,a=e.title,o=e.children,i=e.className,s=e.renderTitle,l=e.isOpen,c=void 0!==l&&l,u=e.onMenuToggle,d=e.anchorCorner,h=void 0===d?"bottomStart":d,p=e.renderOpener,f=Object(n.useRef)();return r.a.createElement(Ui,{className:i},r.a.createElement(Mo.b,null,r.a.createElement(Mo.a,{ref:f,open:c,onClose:function(){u(!1)},anchorCorner:h},"function"===typeof o?c&&r.a.createElement(Gi,null,r.a.createElement(Do.a,null,o({maxHeight:null===(t=f.current)||void 0===t?void 0:t.root.ref.style.maxHeight}))):r.a.createElement(Gi,null,r.a.createElement(Do.a,null,o))),r.a.createElement(zi,{onClick:function(){u(!c)}},a||s&&s(),p?p():r.a.createElement(Wi,{name:"triangle_down",noMargin:Boolean(s)}))))})).withConfig({displayName:"styled__StyledDropdown",componentId:"y9nggg-3"})(["width:88px;height:32px;padding-top:8px;padding-bottom:8px;padding-left:8px;padding-right:7px;border:1px solid ",";box-sizing:border-box;border-radius:4px;display:flex;justify-content:center;align-items:center;color:",";.mdc-menu-surface--anchor{.mdc-menu-surface--open{"," margin-top:",";background:",";border-radius:4px;}}.mdc-list{display:flex;flex-direction:column;justify-content:center;align-items:center;}"],Object(Z.F)("border"),Object(Z.F)("text"),"z-index: 45;",Object(Z.H)(2),Object(Z.F)("mainBackground")),Zi=Object($.d)(Z.o).withConfig({displayName:"styled__DropdownIcon",componentId:"y9nggg-4"})(["fill:",";width:12px;height:12px;"],Object(Z.F)("text")),qi=$.d.input.withConfig({displayName:"styled__CustomInput",componentId:"y9nggg-5"})(["border:1px solid ",";color:inherit;background:",";box-sizing:border-box;border-radius:4px;padding:4px;width:32px;height:32px;margin-left:10px;margin-right:10px;outline:none;&:focus{border:1px solid ",";}"],Object(Z.F)("border"),Object(Z.F)("mainBackground"),Object(Z.F)("primary")),$i=Object($.d)(Z.h).attrs({background:"mainBackground",round:2,margin:[4,0,0],border:{side:"all",color:"elementBackground"},animation:!0}).withConfig({displayName:"styled__StyledDrop",componentId:"y9nggg-6"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),Ji=$.d.hr.withConfig({displayName:"styled__StyledHR",componentId:"y9nggg-7"})(["border:none;margin:0;border-left:1px solid ",";height:284px;"],Object(Z.F)("borderSecondary")),Qi=Object(n.memo)((function(e){var t=e.value,a=e.period,o=e.resolution,i=e.isSelected,s=e.setTimeRange,l=e.tagging,c=Object(n.useCallback)((function(){return s(t,o)}),[t,o,s]);return r.a.createElement(Yi,{key:t,onClick:c,"data-ga":"date-picker::click-quick-selector::".concat(l,"::").concat(-t),"data-testid":"timePeriod-value"},r.a.createElement(Z.z,{color:i?"primary":"text"},a))})),es=a(556),ts=a(545),as=a(550),ns=a(546),rs=a(283),os=a(557),is=a(278),ss=["minutes","hours","days","months"],ls={minutes:60,hours:3600,days:86400,months:2592e3},cs=function(e,t){return Math.round(e/ls[t])},us=function(e,t){var a=Object(es.a)(new Date(0),Object(u.a)({},t,e));return-Object(ts.a)(a)},ds={startDate:"start",endDate:"finish"},hs=[{period:"Last 5 minutes",value:-300,resolution:"minutes"},{period:"Last 15 minutes",value:-900,resolution:"minutes"},{period:"Last 30 minutes",value:-1800,resolution:"minutes"},{period:"Last 2 hours",value:-7200,resolution:"hours"},{period:"Last 6 hours",value:-21600,resolution:"hours"},{period:"Last 12 hours",value:-43200,resolution:"hours"},{period:"Last Day",value:-86400,resolution:"days"},{period:"Last 2 Days",value:-172800,resolution:"days"},{period:"Last 7 Days",value:-604800,resolution:"days"}],ps=function(e,t){var a=Object(ns.a)(e,"MMMM d yyyy, H:mm")?e:Object(rs.a)(e,"MMMM d yyyy, H:mm",Date.now());return Object(rs.a)("".concat(a," ").concat(function(e){if(!e)return"+00:00";var t=e.toString().split("."),a=t[0]>0?"+":"-",n=Math.abs(t[0]).toString(),r="".concat(a).concat(n.padStart(2,0));return t.length>1?"".concat(r,":").concat(String(.6*t[1]).padEnd(2,0)):"".concat(r,":00")}(t)),"MMMM d yyyy, H:mm xxx",Date.now())},fs=function(e){var t=e.handleTimePeriodChange,a=e.selectedDate,n=e.tagging;return r.a.createElement(Z.j,{column:!0,justifyContent:"start",alignItems:"start",height:{max:"240px"},overflow:{vertical:"scroll"},"data-testid":"timePeriods"},hs.map((function(e){var o=e.period,i=e.value,s=e.resolution;return r.a.createElement(Qi,{key:i,value:i,period:o,resolution:s,setTimeRange:t,isSelected:a===i,tagging:n})})))},gs=a(174),ms=function(e){var t=e.handleTimePeriodChange,a=e.value,o=e.resolution,i=e.tagging,s=function(){return a<=0?cs(-a,o):0},l=Object(n.useState)(s),c=Object(A.a)(l,2),d=c[0],h=c[1],p=Object(n.useState)(!1),f=Object(A.a)(p,2),g=f[0],m=f[1];Object(n.useEffect)((function(){return h(s())}),[a]);var b=Object(n.useCallback)((function(e){return h(e.target.value)}),[]),v=Object(n.useCallback)((function(e){var n=Number(e.currentTarget.value),r=!Number.isNaN(n)&&Number.isInteger(n)&&n>0,i=Object(es.a)(new Date(0),Object(u.a)({},o,n));return r&&Object(gs.a)(i)&&Object(ts.a)(i)<=94694400?t(us(n,o),o):h(a<=0?cs(-a,o):0)}),[o,a,t]),_=Object(n.useCallback)((function(e){return function(){t(us(d,e),e),m(!1)}}),[d,t]);return r.a.createElement(Z.j,{justifyContent:"start",alignItems:"center",height:8,"data-ga":"date-picker::click-last-integer::".concat(i),"data-testid":"customTimePeriod"},r.a.createElement(Z.z,null,"Last"),r.a.createElement(qi,{value:d,onChange:b,onBlur:v,"data-ga":"date-picker::click-last-integer::".concat(i,"::").concat(d),"data-testid":"timePeriod-timeInput"}),r.a.createElement(Ki,{isOpen:g,onMenuToggle:m,renderTitle:function(){return r.a.createElement(Z.j,{alignItems:"center",flexWrap:!1,width:"100%"},r.a.createElement(Z.z,{padding:[0,4,0,0]},o),r.a.createElement(Zi,{name:"triangle_down"}))},renderOpener:function(){return null}},(function(){return ss.map((function(e){return r.a.createElement(Xi,{key:e,onClick:_(e),"data-ga":"date-picker::click-last-time-".concat(e,"::").concat(i),"data-testid":"timePeriod-option"},e)}))})))},bs=a(547),vs=a(279),_s=a.n(vs),ys=(a(444),function(e){var t=e.selected,a=e.selectsStart,n=void 0!==a&&a,o=e.selectsEnd,i=void 0!==o&&o,s=e.startDate,l=e.endDate,c=e.onChange,u=e.minDate,d=e.maxDate,h=e.dateFormat,p=void 0===h?"MM/dd/yyyy":h,f=e.open,g=void 0!==f&&f,m=e.startOpen,b=void 0!==m&&m,v=e.inline,_=void 0!==v&&v,y=e.selectsRange,O=void 0!==y&&y,x=e.monthsShown,w=void 0===x?1:x,E=e.showPopperArrow,S=void 0===E||E,C=e.calendarContainer,A=void 0===C?null:C;return r.a.createElement(_s.a,{selected:t,onChange:c,selectsStart:n,selectsEnd:i,startDate:s,endDate:l,minDate:u,maxDate:d,dateFormat:p,open:g,startOpen:b,inline:_,selectsRange:O,monthsShown:w,showPopperArrow:S,calendarContainer:A})}),Os=$.d.input.withConfig({displayName:"styled__StyledDateInput",componentId:"sc-1tun1nl-0"})(["width:100%;text-align:center;border:1px solid ",";color:inherit;background:",";box-sizing:border-box;border-radius:4px;padding:4px;height:32px;margin-left:20px;margin-right:20px;outline:none;&:focus{border:1px solid ",";}"],Object(Z.F)("border"),Object(Z.F)("mainBackground"),Object(Z.F)("primary")),xs=$.d.div.withConfig({displayName:"styled__StyledCalendar",componentId:"sc-1tun1nl-1"})(["background:",";border:0;.react-datepicker{&__navigation{top:8px;&-icon::before{border-color:",";}}&__header{background:",";border:0;.react-datepicker__current-month{color:",";font-weight:normal;}.react-datepicker__day-name{color:",";}}&__day{color:",";&:hover{background:",";}&--disabled{color:",";&:hover{background:inherit;}}&--keyboard-selected,&--keyboard-selected:hover{color:",";background:inherit;border-radius:inherit;}&--selected,&--selected:hover{color:",";background:",";border-radius:8px;}&--in-selecting-range,&--in-range{color:",";background:",";border-radius:0;}&--selecting-range-start,&--range-start{color:",";background:",";border-top-left-radius:8px;border-bottom-left-radius:8px;&:hover{color:",";background:",";border-radius:0;border-top-left-radius:8px;border-bottom-left-radius:8px;}}&--selecting-range-end,&--range-end{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;&:hover{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;}}}}"],Object(Z.F)("mainBackground"),Object(Z.F)("text"),Object(Z.F)("mainBackground"),Object(Z.F)("main"),Object(Z.F)("textLite"),Object(Z.F)("main"),Object(Z.F)("elementBackground"),Object(Z.F)("textLite"),Object(Z.F)("main"),Object(Z.F)("bright"),Object(Z.F)("primary"),Object(Z.F)("primary"),Object(Z.F)("elementBackground"),Object(Z.F)("bright"),Object(Z.F)("primary"),Object(Z.F)("bright"),Object(Z.G)(["green","netdata"],.8),Object(Z.F)("bright"),Object(Z.F)("primary"),Object(Z.F)("bright"),Object(Z.G)(["green","netdata"],.8)),ws=function(e){var t=e.name,a=void 0===t?"":t,o=e.value,i=void 0===o?"":o,s=e.onDatesChange,l=e.onFocus,c=e.placeholderText,u=void 0===c?"":c,d=Object(sa.b)().utcOffset,h=Object(n.useState)(""),p=Object(A.a)(h,2),f=p[0],g=p[1],m=Object(n.useCallback)((function(e){var t=e.target.value;g(t)}),[]),b=Object(n.useCallback)((function(e){if(Object(gs.a)(e)){var t=Object(as.a)(e,"MMMM d yyyy, H:mm");g(t)}}),[]),v=Object(n.useCallback)((function(e){var t=ps(e.target.value,d);if(Object(gs.a)(t)&&Object(is.a)(t)>0){var a=Object(is.a)(t);s(a,(function(){return b(i)}))}else b(i)}),[i,d,s,b]);return Object(n.useEffect)((function(){return b(i)}),[i,b]),r.a.createElement(Os,{type:"text",name:a,value:i?f:u,onChange:m,onBlur:v,onFocus:l,placeholder:u,"data-testid":"datePicker-input"})},Es=a(24),Ss=function(){var e=Object(sa.b)(),t=e.localeTimeString,a=e.localeDateString;return Object(n.useCallback)((function(e){return"".concat(a(e,{locale:"en-us",long:!1})," ").concat(t(e,{secs:!1}))}),[t,a])},Cs=function(e,t){return e>0?Object(Es.a)(new Date(t(e))):e||0===e?Object(Es.a)(new Date(t((new Date).valueOf()+1e3*e))):null},As=function(e,t){var a=Ss();return Object(n.useMemo)((function(){return[Cs(e,a),Cs(t,a)]}),[e,t,a])},ks=function(e){var t=e.startDate,a=e.setStartDate,o=e.endDate,i=e.setEndDate,s=e.onDatesChange,l=e.onInputFocus,c=Ss(),u=As(t,o),d=Object(A.a)(u,2),h=d[0],p=d[1],f=Object(sa.b)().utcOffset,g=Object(n.useCallback)((function(e,t){return Object(bs.a)(Cs(e,c),p)?a(e):t()}),[p,c,a]),m=Object(n.useCallback)((function(e,t){return Object(bs.a)(h,Cs(e,c))?i(e):t()}),[h,c,i]),b=Object(n.useCallback)((function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1],r=a?ps(Object(as.a)(a,"MMMM d yyyy, H:mm"),f):a,o=n?ps(Object(as.a)(n,"MMMM d yyyy, H:mm"),f):n,i=Object(is.a)(r)||null,l=Object(is.a)(o)||null;s(i,l)}),[f,s]);return r.a.createElement(Z.j,{column:!0,justifyContent:"center",alignItems:"center",flex:{grow:1},gap:3,margin:[0,0,0,7],"data-testid":"datePicker-wrapper"},r.a.createElement(ys,{selected:h,onChange:b,startDate:h,endDate:p,maxDate:new Date,minDate:new Date("1/1/2018"),inline:!0,selectsRange:!0,monthsShown:2,dateFormat:"MMMM d yyyy, H:mm",showPopperArrow:!1,calendarContainer:xs}),r.a.createElement(Z.j,{justifyContent:"around",alignItems:"center",width:"100%"},r.a.createElement(ws,{name:"startDate",value:h,onDatesChange:g,onFocus:l,placeholderText:"Select a start date"}),r.a.createElement(ws,{name:"endDate",value:p,onDatesChange:m,onFocus:l,placeholderText:"Select an end date"})))},js=function(e){var t=e.startDate,a=e.endDate,o=As(t,a),i=Object(A.a)(o,2),s=i[0],l=i[1],c=Object(n.useMemo)((function(){return function(e,t){return{formattedStartDate:Object(as.a)(e,"MMMM d yyyy, H:mm:ss"),formattedEndDate:Object(as.a)(t,"MMMM d yyyy, H:mm:ss")}}(s,l)}),[s,l]),u=c.formattedStartDate,d=c.formattedEndDate,h=Object(n.useMemo)((function(){return function(e,t){return Object(os.a)(Object(is.a)(e),Object(is.a)(t))}(s,l)}),[s,l]);return r.a.createElement(Z.j,{alignItems:"center",justifyContent:"between",gap:2},r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:1.5},r.a.createElement(Z.D,{strong:!0,whiteSpace:"nowrap"},"From"),r.a.createElement(Z.D,{whiteSpace:"nowrap","data-testid":"periodIndication-from"},u)),r.a.createElement(Z.o,{name:"arrow_left",size:"small",color:"textLite",rotate:2}),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:1.5},r.a.createElement(Z.D,{strong:!0,whiteSpace:"nowrap"},"To"),r.a.createElement(Z.D,{whiteSpace:"nowrap","data-testid":"periodIndication-to"},d)),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:2},r.a.createElement(Z.D,{whiteSpace:"nowrap"},"/"),r.a.createElement(Z.D,{color:"textLite",whiteSpace:"nowrap","data-testid":"periodIndication-period"},h)))},Ts=a(99),Ds=a.n(Ts),Ps=[{value:864e5,unit:"d"},{value:36e5,unit:"h"},{value:6e4,unit:"min"},{value:6e4,unit:"min"},{value:1e3,unit:"s"}],Ms=function(e,t){return Ds.a.duration(e.diff(t))},Ls=function(e){var t=Math.abs(e),a=t<6e4;return Ps.reduce((function(e,n){var r=n.value,o=n.unit;return 1e3!==r||a?(e+=function(e,t){return e>1?"".concat(Math.floor(e)).concat(t):""}(t/r,o),t%=r,e):e}),"")},Is=Object($.d)(Z.j).withConfig({displayName:"container__Container",componentId:"sc-1oifnqd-0"})(["cursor:pointer;&:hover *{color:",";fill:",";}"],Object(Z.F)("textLite"),Object(Z.F)("textLite")),Ns=function(e){var t=e.isPlaying,a=e.startDate,n=e.endDate,o=e.isSameDate,i=Object(sa.b)(),s=i.localeTimeString,l=i.localeDateString;return r.a.createElement(Z.j,{gap:2},r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},l(a,{long:!1})," \u2022"," ",r.a.createElement(Z.D,{color:t?"accent":"textFocus",whiteSpace:"nowrap"},s(a,{secs:!1}))),r.a.createElement(Z.o,{name:"arrow_left",color:t?"accent":"textFocus",size:"small",rotate:2}),r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},!o&&"".concat(l(n,{long:!1})," \u2022 "),r.a.createElement(Z.D,{color:t?"accent":"textFocus",whiteSpace:"nowrap"},s(n,{secs:!1}))))},Rs=function(e){var t=e.isPlaying,a=e.duration;return r.a.createElement(Z.j,{gap:1},r.a.createElement(Z.j,{width:"24px",justifyContent:"center"},t&&r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},"\u2022 last")),r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},a))},Fs=Object(n.forwardRef)((function(e,t){var a=e.onClick,o=e.start,i=void 0===o?9e5:o,s=e.end,l=e.isPlaying,c=e.isPickerOpen,u=e.setRangeValues,d=e.tagging,h=Object(n.useState)(),p=Object(A.a)(h,2),f=p[0],g=p[1],m=function(e){return e<0?Ds()(new Date).add(e,"seconds"):Ds()(e)}(i),b=function(e){return e?Ds()(e):Ds()(new Date)}(s),v=Object(la.b)(ue.m);Object(n.useEffect)((function(){var e=Ms(m,b).as("seconds");l||f===e||g(Math.round(e)),l&&f&&v&&(u({start:Math.round(f)}),g(null))}),[m,b,f,l]);var _=Object(n.useMemo)((function(){return function(e,t){return e.isSame(t,"day")}(m,b)}),[m,b]),y=Object(n.useMemo)((function(){return Ls(Ms(m,b).as("milliseconds"))}),[l,m,b]);return r.a.createElement(Ci,{content:c?function(){}:"Select a predefined or a custom timeframe",align:"bottom",plain:!0},r.a.createElement(Is,{alignItems:"center",justifyContent:"center",gap:1,height:"100%",width:{min:"380px"},onMouseDown:a,padding:[0,1],ref:t,"data-ga":"date-picker::click-time::".concat(d),"data-testid":"datePicker-accessorElement"},r.a.createElement(Ns,{isPlaying:l,endDate:b,startDate:m,isSameDate:_}),r.a.createElement(Rs,{isPlaying:l,duration:y})))})),Bs=function(e){var t=e.onChange,a=e.values,o=(a=void 0===a?{}:a).start,i=a.end,s=e.defaultValue,l=void 0===s?-900:s,c=e.tagging,u=void 0===c?"":c,d=e.isPlaying,h=Object(n.useState)(o),p=Object(A.a)(h,2),f=p[0],g=p[1],m=Object(n.useState)(o),b=Object(A.a)(m,2),v=b[0],_=b[1],y=Bi("resolution","minutes"),O=Object(A.a)(y,2),x=O[0],w=O[1],E=Object(n.useState)("startDate"),S=Object(A.a)(E,2),C=S[0],k=S[1],j=Ri(),T=Object(A.a)(j,4),D=T[0],P=T[1],M=T[3],L=Object(n.useRef)(),I=Object(n.useCallback)((function(e){var t=e.startDate,a=e.endDate;g(t),_(a)}),[]);Object(n.useEffect)((function(){I({startDate:o,endDate:i})}),[o,i,I]);var N=Object(n.useCallback)((function(){return I({startDate:l,endDate:0})}),[]),R=Object(n.useCallback)((function(e){e.target.name&&k(e.target.name)}),[]),F=Object(n.useCallback)((function(e){e.stopPropagation(),P()}),[P]),B=Object(n.useMemo)((function(){return function(e){return ds[e]}(C)}),[C]),H=null!==f&&null!==v&&f!==v,z=f===o&&v===i,U=Object(n.useMemo)((function(){return l}),[]),G=f===U,W=Object(n.useCallback)((function(e,t){w(t),I({startDate:e,endDate:0})}),[I,w]),V=L.current&&D?r.a.createElement($i,{target:L.current,canHideTarget:!1,align:{top:"bottom",left:"left"},onEsc:M,onClickOutside:M},r.a.createElement(Vi,{"data-testid":"datePicker"},r.a.createElement(Z.j,{justifyContent:"between",alignItems:"center",width:"100%",padding:[6,6,0,6]},r.a.createElement(Z.j,{column:!0,gap:3,margin:[0,7,0,0]},r.a.createElement(fs,{handleTimePeriodChange:W,selectedDate:f,tagging:u}),r.a.createElement(ms,{handleTimePeriodChange:W,value:f,resolution:x,tagging:u})),r.a.createElement(Ji,null),r.a.createElement(ks,{startDate:f,endDate:v,setStartDate:g,setEndDate:_,onDatesChange:function(e,t){I({startDate:e,endDate:t}),function(e,t,a,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"gaCustomEvent";if(window.dataLayer){var o={event:r,eventCategory:e,eventAction:t,eventLabel:a,eventValue:n};window.dataLayer.push(o)}}("date-picker","click-date-picker",u,String("finish"===B?t||e:e||t))},onInputFocus:R})),r.a.createElement(Z.j,{alignItems:"center",justifyContent:H?"between":"end",width:"100%",padding:[5,6],gap:2},H&&r.a.createElement(js,{startDate:f,endDate:v}),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:4},r.a.createElement(Z.b,{label:"Clear",flavour:"hollow",onClick:N,disabled:G,"data-ga":"date-picker::click-clear::".concat(u,"-").concat(B),"data-testid":"datePicker-clear"}),r.a.createElement(Z.b,{label:"Apply",onClick:function(){t({start:f,end:v}),M()},disabled:!H||z,"data-ga":"date-picker::click-apply::".concat(u,"-").concat(B),"data-testid":"datePicker-apply"}))))):null;return r.a.createElement(r.a.Fragment,null,r.a.createElement(Fs,{onClick:F,tagging:u,isPickerOpen:D,isPlaying:d,setRangeValues:t,start:o,end:i,ref:L}),V)},Hs=Object(n.memo)((function(e){var t=e.tagging,a=e.isPlaying,o=Object(la.a)(),i=Object(la.b)(ue.m),s=Boolean(i),l=Object(la.b)(ue.i),c=Object(n.useMemo)((function(){return s?{start:i.after,end:i.before}:{start:l,end:0}}),[s,i,l]);return Object(n.useEffect)((function(){var e=c.start,t=c.end;Object(Wt.e)({after:e.toString(),before:t.toString()})}),[c]),r.a.createElement(Bs,{values:c,defaultValue:l,onChange:function(e){var t=e.start,a=e.end;t<0?(o(Object(Ke.q)({after:t})),s&&o(Object(Ke.j)())):o(Object(Ke.s)({after:t,before:a}))},tagging:t,isPlaying:a})})),zs=Object($.d)(Z.j).withConfig({displayName:"container__Container",componentId:"sc-1y4i7z8-0"})(["background:",";"],(function(e){var t=e.theme,a=e.isPlaying;return("Dark"===t.name?Object(Z.G)(a?["green","netdata"]:["neutral","tuna"],a?.3:1):Object(Z.G)(a?["green","frostee"]:["neutral","blackhaze"]))({theme:t})})),Us=function(e){var t=e.isPlaying;return Object(Z.F)(t?["green","chateau"]:["neutral","iron"])},Gs=Object($.d)(Z.x).attrs((function(e){return{flavour:e.isPlaying?"success":"neutral"}})).withConfig({displayName:"styledPill__StyledPill",componentId:"sc-151yrns-0"})(["&:hover{background:",";border-color:",";}"],Us,Us),Ws=function(e){var t=e.isPlaying,a=e.isForcePlaying,o=Object(la.a)(),i=Object(n.useMemo)((function(){return function(e,t){return e?t?"forcePlay":"playSolid":"pauseSolid"}(t,a)}),[t,a]);return r.a.createElement(Ci,{content:t?"Click to pause":"Click to play",align:"bottom",plain:!0},r.a.createElement(Gs,{icon:i,onClick:t?function(){return o(Object(Ke.t)())}:function(){return o(Object(Ke.k)({forcePlay:!1}))},isPlaying:t},t?"Playing":"Paused"))},Vs=Object($.d)(Z.j).withConfig({displayName:"item__PanelRowContainer",componentId:"sc-1qh9192-0"})(["cursor:pointer;&:hover{background:",";}",""],Object(Z.F)("selected"),(function(e){return e.selected&&"background: ".concat(Object(Z.F)("selected")(e),";")})),Ys=Object(n.forwardRef)((function(e,t){var a=e.disabled,o=e.children,i=e.Wrapper,s=void 0===i?Z.z:i,l=e.onClick,c=e.testid,u=e.icon,d=e.padding,h=void 0===d?[2,3]:d,p=e.margin,f=void 0===p?[0]:p,g=e.round,m=void 0===g?0:g,b=e.actions,v=e.selected,_=e.width,y=void 0===_?"100%":_,O=Object(n.useCallback)((function(){a||l&&l()}),[l,a]);return r.a.createElement(Vs,{ref:t,flexWrap:!1,justifyContent:"between",alignItems:"center",padding:h,margin:f,round:m,onClick:O,"data-testid":c,width:y,selected:v,disabled:a},r.a.createElement(Z.j,{alignItems:"center",gap:3,flex:!0,basis:""},"string"===typeof u?r.a.createElement(Z.o,{name:u,disabled:a,color:"text",height:"16px",width:"16px"}):u,r.a.createElement(s,{opacity:a?"medium":void 0,width:"150px"},o)),b)})),Xs=Object($.d)(Z.l).attrs({padding:[0],margin:[0]}).withConfig({displayName:"list__DefaultListHeader",componentId:"cb73mo-0"})(["cursor:pointer;"]),Ks=function(e){var t=e.toggleOpen,a=e.label,n=e.testid,o=e.Header,i=void 0===o?Xs:o;return r.a.createElement(i,{"data-testid":n,onClick:t},a)},Zs=function(e){var t=e.isOpen,a=void 0!==t&&t,n=e.toggleOpen,o=e.label,i=e.children,s=e.testid,l=e.Header;return r.a.createElement(Z.j,{column:!0},r.a.createElement(Ks,{Header:l,toggleOpen:n,label:o,testid:s}),r.a.createElement(Z.d,{open:a},i))},qs=(Object($.d)(Z.j).attrs({bacgkround:"disabled",height:"1px",margin:[2,6]}).withConfig({displayName:"styled__Divider",componentId:"sc-1gb5vnf-0"})([""]),function(){return r.a.createElement(Z.j,{padding:[1,2],margin:[1],background:["neutral","black"],round:1,justifyContent:"center",width:{max:"320px"}},r.a.createElement(Z.D,{color:"bright"},"Play to refresh and have live content, pause to see historical, or force play to keep refreshing even when the tab loses focus at the expense of some system performance."))}),$s=Object($.d)(Z.j).attrs({padding:[1],role:"button"}).withConfig({displayName:"playOptions__MenuButton",componentId:"cm1181-0"})(["cursor:pointer;"]),Js=Object($.d)(Z.j).attrs({column:!0,padding:[2],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[2,0,0],width:40}).withConfig({displayName:"playOptions__Dropdown",componentId:"cm1181-1"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),Qs=Object(n.memo)((function(e){var t=e.target,a=Object(la.a)(),o=Object(En.a)(),i=Object(A.a)(o,2),s=i[0],l=i[1],c=function(){return l(!1)};return r.a.createElement(n.Fragment,null,s?r.a.createElement($s,{onClick:l,width:"auto"},r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"})):r.a.createElement(Ci,{content:r.a.createElement(qs,null),align:"bottom",plain:!0},r.a.createElement($s,{onClick:l,width:"auto"},r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"}))),t.current&&s&&r.a.createElement(Z.h,{target:t.current,align:{top:"bottom",left:"left"},onEsc:c,onClickOutside:c,animation:!0},r.a.createElement(Js,null,r.a.createElement(Ys,{round:1,icon:"playOutline",onClick:function(){a(Object(Ke.k)({forcePlay:!1})),c()}},"Play"),r.a.createElement(Ys,{round:1,icon:"pauseOutline",onClick:function(){a(Object(Ke.t)()),c()}},"Pause"),r.a.createElement(Ys,{round:1,icon:"forcePlayOutline",onClick:function(){a(Object(Ke.k)({forcePlay:!0})),c()}},"Force Play"))))})),el=function(){var e=Object(n.useRef)(),t=Object(la.b)(ue.s),a=Object(la.b)(ue.H),o=Object(la.b)(ue.m),i=Object(la.b)(ue.o),s=Object(la.b)(ue.n),l=Object(n.useMemo)((function(){return Boolean((t||!a)&&!o&&!i&&!s)}),[t,a,o,i,s]);return r.a.createElement(yi,{hasBorder:!0},r.a.createElement(zs,{isPlaying:l,padding:[2,2],round:!0,height:"100%",alignItems:"center",gap:1,ref:e},r.a.createElement(Ws,{isPlaying:l,isForcePlaying:!a}),r.a.createElement(Qs,{target:e}),r.a.createElement(Hs,{isPlaying:l,tagging:"global-view"})))},tl={warning:"#FFF8E1",error:"#FFEBEF"},al=Object($.d)(Z.j).attrs((function(e){var t=e.round,a=void 0===t?999:t,n=e.hollow,r=e.background;return{padding:[.5,2],round:a,border:!!n&&{side:"all",color:r,size:"1px"}}})).withConfig({displayName:"styled__StyledPill",componentId:"sc-1rgk900-0"})(["background:",";cursor:pointer;"],(function(e){var t=e.background;return e.hollow?tl[t]:t})),nl=Object(n.forwardRef)((function(e,t){var a=e.children,n=e.background,o=e.color,i=e.hollow,s=Object(gr.a)(e,["children","background","color","hollow"]);return r.a.createElement(al,Object.assign({background:n,hollow:i,ref:t},s),r.a.createElement(Z.B,{color:i?n:o,strong:!0},a))})),rl={"data-toggle":"modal","data-target":"#alarmsModal"},ol=function(){var e=Object(la.b)(ue.c),t=Object(n.useMemo)((function(){return e?Object.values(e.alarms):[]}),[e]),a=Object(n.useMemo)((function(){return t.reduce((function(e,t){var a=t.status;return"CRITICAL"===a&&(e.critical=e.critical+1),"WARNING"===a&&(e.warning=e.warning+1),e}),{critical:0,warning:0})}),[t]),o=a.critical,i=a.warning;return r.a.createElement(yi,{icon:"alarm"},r.a.createElement(Ci,{content:o?"".concat(o," critical alert").concat(o.length>1?"s":""):"No critical alerts",align:"bottom",plain:!0},r.a.createElement(nl,Object.assign({background:"error",hollow:!0},rl),o)),r.a.createElement(Ci,{content:i?"".concat(i," warning alert").concat(i.length>1?"s":""):"No warning alerts",align:"bottom",plain:!0},r.a.createElement(nl,Object.assign({background:"warning",hollow:!0},rl),i)))},il=function(){return r.a.createElement(Z.w,{app:"agent"},(function(e){var t=e.toggle,a=e.upToDate;return r.a.createElement(Ci,{content:"News",align:"bottom",plain:!0},r.a.createElement(Z.b,{"data-testid":"header-news-button",themeType:"dark",name:"news",icon:"insights",flavour:"borderless",neutral:a,warning:!a,onClick:t}))}))},sl=Object($.d)(Z.j).attrs({column:!0,padding:[2],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[2,0,0],width:80}).withConfig({displayName:"dropdown__Dropdown",componentId:"i5fe1c-0"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),ll=Object($.d)(Z.A).withConfig({displayName:"searchInput__SearchInput",componentId:"sc-1j08rwh-0"})(["& input{background:transparent;}& > label{margin-bottom:0;}"]),cl=Object(n.forwardRef)((function(e,t){var a=e.value,n=e.onChange;return r.a.createElement(ll,{inputRef:t,value:a,onChange:n,placeholder:"Search",metaShrinked:!0})})),ul=Object($.d)(Z.j).attrs({column:!0,padding:[2,0,0],overflow:{vertical:"auto"},height:{max:"320px"}}).withConfig({displayName:"container__Container",componentId:"qngq57-0"})([""]),dl=Object($.d)(Z.j).attrs({justifyContent:"between",alignItems:"center",width:"100%",gap:2}).withConfig({displayName:"wrapper__Wrapper",componentId:"sc-1m1od8q-0"})([""]),hl=function(e){var t=e.name,a=e.offset,o=e.utc,i=e.onSelect,s=Object(n.useCallback)((function(){return i(o)}),[o,i]);return r.a.createElement(Ys,{round:1,onClick:s,Wrapper:dl},r.a.createElement(Z.z,{color:"text"},t),r.a.createElement(Z.z,{color:"textLite",whiteSpace:"nowrap"},"UTC ",a))},pl=[{value:"Dateline Standard Time",abbr:"DST",text:"International Date Line West",utc:["Etc/GMT+12"]},{value:"UTC-11",abbr:"U",text:"Coordinated Universal Time-11",utc:["Etc/GMT+11","Pacific/Midway","Pacific/Niue","Pacific/Pago_Pago"]},{value:"Hawaiian Standard Time",abbr:"HST",text:"Hawaii",utc:["Etc/GMT+10","Pacific/Honolulu","Pacific/Johnston","Pacific/Rarotonga","Pacific/Tahiti"]},{value:"Alaskan Standard Time",abbr:"AKDT",text:"Alaska",utc:["America/Anchorage","America/Juneau","America/Nome","America/Sitka","America/Yakutat"]},{value:"Pacific Standard Time (Mexico)",abbr:"PDT",text:"Baja California",utc:["America/Santa_Isabel"]},{value:"Pacific Standard Time",abbr:"PST",text:"Pacific Time (US & Canada)",utc:["America/Dawson","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse","PST8PDT"]},{value:"US Mountain Standard Time",abbr:"UMST",text:"Arizona",utc:["America/Creston","America/Dawson_Creek","America/Hermosillo","America/Phoenix","Etc/GMT+7"]},{value:"Mountain Standard Time (Mexico)",abbr:"MDT",text:"Chihuahua, La Paz, Mazatlan",utc:["America/Chihuahua","America/Mazatlan"]},{value:"Mountain Standard Time",abbr:"MDT",text:"Mountain Time (US & Canada)",utc:["America/Boise","America/Cambridge_Bay","America/Denver","America/Edmonton","America/Inuvik","America/Ojinaga","America/Yellowknife","MST7MDT"]},{value:"Central America Standard Time",abbr:"CAST",text:"Central America",utc:["America/Belize","America/Costa_Rica","America/El_Salvador","America/Guatemala","America/Managua","America/Tegucigalpa","Etc/GMT+6","Pacific/Galapagos"]},{value:"Central Standard Time",abbr:"CDT",text:"Central Time (US & Canada)",utc:["America/Chicago","America/Indiana/Knox","America/Indiana/Tell_City","America/Matamoros","America/Menominee","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Rainy_River","America/Rankin_Inlet","America/Resolute","America/Winnipeg","CST6CDT"]},{value:"Central Standard Time (Mexico)",abbr:"CDT",text:"Guadalajara, Mexico City, Monterrey",utc:["America/Bahia_Banderas","America/Cancun","America/Merida","America/Mexico_City","America/Monterrey"]},{value:"Canada Central Standard Time",abbr:"CCST",text:"Saskatchewan",utc:["America/Regina","America/Swift_Current"]},{value:"SA Pacific Standard Time",abbr:"SPST",text:"Bogota, Lima, Quito",utc:["America/Bogota","America/Cayman","America/Coral_Harbour","America/Eirunepe","America/Guayaquil","America/Jamaica","America/Lima","America/Panama","America/Rio_Branco","Etc/GMT+5"]},{value:"Eastern Standard Time",abbr:"EDT",text:"Eastern Time (US & Canada)",utc:["America/Detroit","America/Havana","America/Indiana/Petersburg","America/Indiana/Vincennes","America/Indiana/Winamac","America/Iqaluit","America/Kentucky/Monticello","America/Louisville","America/Montreal","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port-au-Prince","America/Thunder_Bay","America/Toronto","EST5EDT"]},{value:"US Eastern Standard Time",abbr:"UEDT",text:"Indiana (East)",utc:["America/Indiana/Marengo","America/Indiana/Vevay","America/Indianapolis"]},{value:"Venezuela Standard Time",abbr:"VST",text:"Caracas",utc:["America/Caracas"]},{value:"Paraguay Standard Time",abbr:"PYT",text:"Asuncion",utc:["America/Asuncion"]},{value:"Atlantic Standard Time",abbr:"ADT",text:"Atlantic Time (Canada)",utc:["America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Moncton","America/Thule","Atlantic/Bermuda"]},{value:"Central Brazilian Standard Time",abbr:"CBST",text:"Cuiaba",utc:["America/Campo_Grande","America/Cuiaba"]},{value:"SA Western Standard Time",abbr:"SWST",text:"Georgetown, La Paz, Manaus, San Juan",utc:["America/Anguilla","America/Antigua","America/Aruba","America/Barbados","America/Blanc-Sablon","America/Boa_Vista","America/Curacao","America/Dominica","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guyana","America/Kralendijk","America/La_Paz","America/Lower_Princes","America/Manaus","America/Marigot","America/Martinique","America/Montserrat","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Santo_Domingo","America/St_Barthelemy","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Tortola","Etc/GMT+4"]},{value:"Pacific SA Standard Time",abbr:"PSST",text:"Santiago",utc:["America/Santiago","Antarctica/Palmer"]},{value:"Newfoundland Standard Time",abbr:"NDT",text:"Newfoundland",utc:["America/St_Johns"]},{value:"E. South America Standard Time",abbr:"ESAST",text:"Brasilia",utc:["America/Sao_Paulo"]},{value:"Argentina Standard Time",abbr:"AST",text:"Buenos Aires",utc:["America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Buenos_Aires","America/Catamarca","America/Cordoba","America/Jujuy","America/Mendoza"]},{value:"SA Eastern Standard Time",abbr:"SEST",text:"Cayenne, Fortaleza",utc:["America/Araguaina","America/Belem","America/Cayenne","America/Fortaleza","America/Maceio","America/Paramaribo","America/Recife","America/Santarem","Antarctica/Rothera","Atlantic/Stanley","Etc/GMT+3"]},{value:"Greenland Standard Time",abbr:"GDT",text:"Greenland",utc:["America/Godthab"]},{value:"Montevideo Standard Time",abbr:"MST",text:"Montevideo",utc:["America/Montevideo"]},{value:"Bahia Standard Time",abbr:"BST",text:"Salvador",utc:["America/Bahia"]},{value:"UTC-02",abbr:"U",text:"Coordinated Universal Time-02",utc:["America/Noronha","Atlantic/South_Georgia","Etc/GMT+2"]},{value:"Mid-Atlantic Standard Time",abbr:"MDT",text:"Mid-Atlantic - Old",utc:[]},{value:"Azores Standard Time",abbr:"ADT",text:"Azores",utc:["America/Scoresbysund","Atlantic/Azores"]},{value:"Cape Verde Standard Time",abbr:"CVST",text:"Cape Verde Is.",utc:["Atlantic/Cape_Verde","Etc/GMT+1"]},{value:"Morocco Standard Time",abbr:"MDT",text:"Casablanca",utc:["Africa/Casablanca","Africa/El_Aaiun"]},{value:"UTC",abbr:"UTC",text:"Coordinated Universal Time",utc:["America/Danmarkshavn","Etc/GMT"]},{value:"GMT Standard Time",abbr:"GMT",text:"Edinburgh, London",utc:["Europe/Isle_of_Man","Europe/Guernsey","Europe/Jersey","Europe/London"]},{value:"GMT Standard Time",abbr:"GDT",text:"Dublin, Lisbon",utc:["Atlantic/Canary","Atlantic/Faeroe","Atlantic/Madeira","Europe/Dublin","Europe/Lisbon"]},{value:"Greenwich Standard Time",abbr:"GST",text:"Monrovia, Reykjavik",utc:["Africa/Abidjan","Africa/Accra","Africa/Bamako","Africa/Banjul","Africa/Bissau","Africa/Conakry","Africa/Dakar","Africa/Freetown","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Africa/Sao_Tome","Atlantic/Reykjavik","Atlantic/St_Helena"]},{value:"W. Europe Standard Time",abbr:"WEDT",text:"Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",utc:["Arctic/Longyearbyen","Europe/Amsterdam","Europe/Andorra","Europe/Berlin","Europe/Busingen","Europe/Gibraltar","Europe/Luxembourg","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Rome","Europe/San_Marino","Europe/Stockholm","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Zurich"]},{value:"Central Europe Standard Time",abbr:"CEDT",text:"Belgrade, Bratislava, Budapest, Ljubljana, Prague",utc:["Europe/Belgrade","Europe/Bratislava","Europe/Budapest","Europe/Ljubljana","Europe/Podgorica","Europe/Prague","Europe/Tirane"]},{value:"Romance Standard Time",abbr:"RDT",text:"Brussels, Copenhagen, Madrid, Paris",utc:["Africa/Ceuta","Europe/Brussels","Europe/Copenhagen","Europe/Madrid","Europe/Paris"]},{value:"Central European Standard Time",abbr:"CEDT",text:"Sarajevo, Skopje, Warsaw, Zagreb",utc:["Europe/Sarajevo","Europe/Skopje","Europe/Warsaw","Europe/Zagreb"]},{value:"W. Central Africa Standard Time",abbr:"WCAST",text:"West Central Africa",utc:["Africa/Algiers","Africa/Bangui","Africa/Brazzaville","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Malabo","Africa/Ndjamena","Africa/Niamey","Africa/Porto-Novo","Africa/Tunis","Etc/GMT-1"]},{value:"Namibia Standard Time",abbr:"NST",text:"Windhoek",utc:["Africa/Windhoek"]},{value:"GTB Standard Time",abbr:"GDT",text:"Athens, Bucharest",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau"]},{value:"Middle East Standard Time",abbr:"MEDT",text:"Beirut",utc:["Asia/Beirut"]},{value:"Egypt Standard Time",abbr:"EST",text:"Cairo",utc:["Africa/Cairo"]},{value:"Syria Standard Time",abbr:"SDT",text:"Damascus",utc:["Asia/Damascus"]},{value:"E. Europe Standard Time",abbr:"EEDT",text:"E. Europe",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{value:"South Africa Standard Time",abbr:"SAST",text:"Harare, Pretoria",utc:["Africa/Blantyre","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Kigali","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Etc/GMT-2"]},{value:"FLE Standard Time",abbr:"FDT",text:"Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",utc:["Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{value:"Turkey Standard Time",abbr:"TDT",text:"Istanbul",utc:["Europe/Istanbul"]},{value:"Israel Standard Time",abbr:"JDT",text:"Jerusalem",utc:["Asia/Jerusalem"]},{value:"Libya Standard Time",abbr:"LST",text:"Tripoli",utc:["Africa/Tripoli"]},{value:"Jordan Standard Time",abbr:"JST",text:"Amman",utc:["Asia/Amman"]},{value:"Arabic Standard Time",abbr:"AST",text:"Baghdad",utc:["Asia/Baghdad"]},{value:"Kaliningrad Standard Time",abbr:"KST",text:"Kaliningrad",utc:["Europe/Kaliningrad"]},{value:"Arab Standard Time",abbr:"AST",text:"Kuwait, Riyadh",utc:["Asia/Aden","Asia/Bahrain","Asia/Kuwait","Asia/Qatar","Asia/Riyadh"]},{value:"E. Africa Standard Time",abbr:"EAST",text:"Nairobi",utc:["Africa/Addis_Ababa","Africa/Asmera","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Mogadishu","Africa/Nairobi","Antarctica/Syowa","Etc/GMT-3","Indian/Antananarivo","Indian/Comoro","Indian/Mayotte"]},{value:"Moscow Standard Time",abbr:"MSK",text:"Moscow, St. Petersburg, Volgograd, Minsk",utc:["Europe/Kirov","Europe/Moscow","Europe/Simferopol","Europe/Volgograd","Europe/Minsk"]},{value:"Samara Time",abbr:"SAMT",text:"Samara, Ulyanovsk, Saratov",utc:["Europe/Astrakhan","Europe/Samara","Europe/Ulyanovsk"]},{value:"Iran Standard Time",abbr:"IDT",text:"Tehran",utc:["Asia/Tehran"]},{value:"Arabian Standard Time",abbr:"AST",text:"Abu Dhabi, Muscat",utc:["Asia/Dubai","Asia/Muscat","Etc/GMT-4"]},{value:"Azerbaijan Standard Time",abbr:"ADT",text:"Baku",utc:["Asia/Baku"]},{value:"Mauritius Standard Time",abbr:"MST",text:"Port Louis",utc:["Indian/Mahe","Indian/Mauritius","Indian/Reunion"]},{value:"Georgian Standard Time",abbr:"GET",text:"Tbilisi",utc:["Asia/Tbilisi"]},{value:"Caucasus Standard Time",abbr:"CST",text:"Yerevan",utc:["Asia/Yerevan"]},{value:"Afghanistan Standard Time",abbr:"AST",text:"Kabul",utc:["Asia/Kabul"]},{value:"West Asia Standard Time",abbr:"WAST",text:"Ashgabat, Tashkent",utc:["Antarctica/Mawson","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Dushanbe","Asia/Oral","Asia/Samarkand","Asia/Tashkent","Etc/GMT-5","Indian/Kerguelen","Indian/Maldives"]},{value:"Yekaterinburg Time",abbr:"YEKT",text:"Yekaterinburg",utc:["Asia/Yekaterinburg"]},{value:"Pakistan Standard Time",abbr:"PKT",text:"Islamabad, Karachi",utc:["Asia/Karachi"]},{value:"India Standard Time",abbr:"IST",text:"Chennai, Kolkata, Mumbai, New Delhi",utc:["Asia/Kolkata"]},{value:"Sri Lanka Standard Time",abbr:"SLST",text:"Sri Jayawardenepura",utc:["Asia/Colombo"]},{value:"Nepal Standard Time",abbr:"NST",text:"Kathmandu",utc:["Asia/Kathmandu"]},{value:"Central Asia Standard Time",abbr:"CAST",text:"Nur-Sultan (Astana)",utc:["Antarctica/Vostok","Asia/Almaty","Asia/Bishkek","Asia/Qyzylorda","Asia/Urumqi","Etc/GMT-6","Indian/Chagos"]},{value:"Bangladesh Standard Time",abbr:"BST",text:"Dhaka",utc:["Asia/Dhaka","Asia/Thimphu"]},{value:"Myanmar Standard Time",abbr:"MST",text:"Yangon (Rangoon)",utc:["Asia/Rangoon","Indian/Cocos"]},{value:"SE Asia Standard Time",abbr:"SAST",text:"Bangkok, Hanoi, Jakarta",utc:["Antarctica/Davis","Asia/Bangkok","Asia/Hovd","Asia/Jakarta","Asia/Phnom_Penh","Asia/Pontianak","Asia/Saigon","Asia/Vientiane","Etc/GMT-7","Indian/Christmas"]},{value:"N. Central Asia Standard Time",abbr:"NCAST",text:"Novosibirsk",utc:["Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk"]},{value:"China Standard Time",abbr:"CST",text:"Beijing, Chongqing, Hong Kong, Urumqi",utc:["Asia/Hong_Kong","Asia/Macau","Asia/Shanghai"]},{value:"North Asia Standard Time",abbr:"NAST",text:"Krasnoyarsk",utc:["Asia/Krasnoyarsk"]},{value:"Singapore Standard Time",abbr:"MPST",text:"Kuala Lumpur, Singapore",utc:["Asia/Brunei","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Makassar","Asia/Manila","Asia/Singapore","Etc/GMT-8"]},{value:"W. Australia Standard Time",abbr:"WAST",text:"Perth",utc:["Antarctica/Casey","Australia/Perth"]},{value:"Taipei Standard Time",abbr:"TST",text:"Taipei",utc:["Asia/Taipei"]},{value:"Ulaanbaatar Standard Time",abbr:"UST",text:"Ulaanbaatar",utc:["Asia/Choibalsan","Asia/Ulaanbaatar"]},{value:"North Asia East Standard Time",abbr:"NAEST",text:"Irkutsk",utc:["Asia/Irkutsk"]},{value:"Japan Standard Time",abbr:"JST",text:"Osaka, Sapporo, Tokyo",utc:["Asia/Dili","Asia/Jayapura","Asia/Tokyo","Etc/GMT-9","Pacific/Palau"]},{value:"Korea Standard Time",abbr:"KST",text:"Seoul",utc:["Asia/Pyongyang","Asia/Seoul"]},{value:"Cen. Australia Standard Time",abbr:"CAST",text:"Adelaide",utc:["Australia/Adelaide","Australia/Broken_Hill"]},{value:"AUS Central Standard Time",abbr:"ACST",text:"Darwin",utc:["Australia/Darwin"]},{value:"E. Australia Standard Time",abbr:"EAST",text:"Brisbane",utc:["Australia/Brisbane","Australia/Lindeman"]},{value:"AUS Eastern Standard Time",abbr:"AEST",text:"Canberra, Melbourne, Sydney",utc:["Australia/Melbourne","Australia/Sydney"]},{value:"West Pacific Standard Time",abbr:"WPST",text:"Guam, Port Moresby",utc:["Antarctica/DumontDUrville","Etc/GMT-10","Pacific/Guam","Pacific/Port_Moresby","Pacific/Saipan","Pacific/Truk"]},{value:"Tasmania Standard Time",abbr:"TST",text:"Hobart",utc:["Australia/Currie","Australia/Hobart"]},{value:"Yakutsk Standard Time",abbr:"YST",text:"Yakutsk",utc:["Asia/Chita","Asia/Khandyga","Asia/Yakutsk"]},{value:"Central Pacific Standard Time",abbr:"CPST",text:"Solomon Is., New Caledonia",utc:["Antarctica/Macquarie","Etc/GMT-11","Pacific/Efate","Pacific/Guadalcanal","Pacific/Kosrae","Pacific/Noumea","Pacific/Ponape"]},{value:"Vladivostok Standard Time",abbr:"VST",text:"Vladivostok",utc:["Asia/Sakhalin","Asia/Ust-Nera","Asia/Vladivostok"]},{value:"New Zealand Standard Time",abbr:"NZST",text:"Auckland, Wellington",utc:["Antarctica/McMurdo","Pacific/Auckland"]},{value:"UTC+12",abbr:"U",text:"Coordinated Universal Time+12",utc:["Etc/GMT-12","Pacific/Funafuti","Pacific/Kwajalein","Pacific/Majuro","Pacific/Nauru","Pacific/Tarawa","Pacific/Wake","Pacific/Wallis"]},{value:"Fiji Standard Time",abbr:"FST",text:"Fiji",utc:["Pacific/Fiji"]},{value:"Magadan Standard Time",abbr:"MST",text:"Magadan",utc:["Asia/Anadyr","Asia/Kamchatka","Asia/Magadan","Asia/Srednekolymsk"]},{value:"Kamchatka Standard Time",abbr:"KDT",text:"Petropavlovsk-Kamchatsky - Old",utc:["Asia/Kamchatka"]},{value:"Tonga Standard Time",abbr:"TST",text:"Nuku'alofa",utc:["Etc/GMT-13","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Tongatapu"]},{value:"Samoa Standard Time",abbr:"SST",text:"Samoa",utc:["Pacific/Apia"]}],fl=new Date,gl=function(){return new Intl.DateTimeFormat("default",{}).resolvedOptions()},ml=function(){var e={};return pl.reduce((function(t,a){var n=a.utc;try{var r=new Intl.DateTimeFormat("fr",{timeZone:n[0],timeZoneName:"short"}).format(fl).match(/[\u2212+].+/)||[],o=function(e){return e?e.replace("\u2212","-"):""}(Object(A.a)(r,1)[0]);if(e[o])return t.concat(Object(g.a)({},a,{offset:e[o]}));var i=function(e){if(!e)return"+0";var t=e.split(":");return t.length>1?"".concat(t[0]).concat((t[1]/60).toString().substr(1)):t[0]}(o);return e[o]=i,t.concat(Object(g.a)({},a,{offset:i}))}catch(s){return t}}),[])}().sort((function(e,t){return e.offset-t.offset})),bl=ml.reduce((function(e,t){var a=t.utc,n=Object(gr.a)(t,["utc"]);return a.forEach((function(t){return e[t]=Object(g.a)({},n,{utc:t})})),e}),{}),vl=function(){var e=Object(n.useState)(""),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(En.a)(),s=Object(A.a)(i,2),l=s[0],c=s[1],u=Object(n.useRef)(),d=Object(n.useRef)(),h=window.urlOptions.updateUtcParam;Object(n.useEffect)((function(){d.current&&l&&d.current.focus()}),[l]);var p=Object(la.a)(),f=Object(la.b)(ue.M),g=Object(n.useMemo)((function(){var e=Object(Wt.b)().utc,t=void 0===e?"":e,a=function(e,t){var a=t||("default"===e?gl().timeZone:e);return bl[a in bl?a:gl().timeZone]||{}}(f,t),n=a.offset,r=void 0===n?"":n,o=a.utc,i=void 0===o?"":o;return t!==i&&h(i),f!==i&&p(Object(Ke.v)({key:"timezone",value:i})),p(Object(Ke.v)({key:"utcOffset",value:parseFloat(r)})),r}),[f]),m=Object(n.useMemo)((function(){return a?ml.filter((function(e){var t=e.text,n=e.offset;return t.toUpperCase().includes(a.toUpperCase())||n.includes(a)})):ml}),[a]),b=function(){c(!1),o("")},v=Object(n.useCallback)((function(e){h(e),p(Object(Ke.v)({key:"timezone",value:e})),b()}),[]),_=Object(n.useCallback)((function(e){return o(e.target.value)}),[]);return r.a.createElement(yi,{hasBorder:!0},r.a.createElement(Ys,{round:1,onClick:c,ref:u,Wrapper:dl},r.a.createElement(Z.j,{gap:1},r.a.createElement(Z.z,{color:"textLite",whiteSpace:"nowrap"},"UTC ",g)),r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"})),u.current&&l&&r.a.createElement(Z.h,{target:u.current,align:{top:"bottom",left:"left"},onEsc:b,onClickOutside:b,animation:!0},r.a.createElement(sl,null,r.a.createElement(cl,{value:a,onChange:_,ref:d}),r.a.createElement(ul,null,m.map((function(e){var t=e.text,a=e.offset,n=e.utc;return r.a.createElement(hl,{key:t,name:t,offset:a,utc:n[0],onSelect:v})}))))))},_l=a(78),yl=a(501),Ol=a(73),xl=a(124),wl=a(182),El=Object($.d)(Z.j).attrs({position:"absolute"}).withConfig({displayName:"iframe__IframeContainer",componentId:"sc-1tybwh7-0"})(["display:none;"]),Sl=function(e){var t=e.signedIn,a=Object(n.useState)(!1),o=Object(A.a)(a,2),i=o[0],s=o[1],l=Object(n.useRef)(),c=Object(n.useRef)(),u=Object(yl.a)(Xt),d=Object(A.a)(u,3),h=d[0],p=d[2],f=Object(la.b)(ue.f),g=Object(la.b)(ue.y),m=Object(la.a)(),v=window.location,_=v.origin,y=v.pathname,O=encodeURIComponent(g.hostname),x=encodeURIComponent(_+y),w=Object(Ve.c)(f,"sign-in?id=".concat(g.machineGuid,"&name=").concat(O,"&origin=").concat(x));Object(Ol.b)("hello-from-sign-in",(function(e){l.current=e})),Object(xl.a)();var E=Object(n.useCallback)((function(){s(!0),setTimeout((function(){return m(Object(b.c)({offline:void 0===l.current}))}),500)}),[]);return Object(n.useEffect)((function(){var e=function(e){(null===e||void 0===e?void 0:e.target)&&(e.target.src!==w||i||E())};return window.addEventListener("DOMFrameContentLoaded",e),function(){return window.removeEventListener("DOMFrameContentLoaded",e)}}),[w,i,E]),Object(n.useEffect)((function(){if(t&&c.current&&g.registryServer&&g.registryServer!==Ve.b&&h){p();var e=g.registryMachinesArray;e&&e.length>0&&Object(Ol.a)(c.current,{type:"synced-private-registry",payload:e})}}),[t,g,h]),r.a.createElement(El,{as:"iframe",id:wl.a,src:w,onLoad:E})},Cl=function(){var e=Object(s.d)(),t=Object(yl.a)("has-sign-in-history"),a=Object(A.a)(t,2),r=a[0],o=a[1],i=Object(n.useState)(r),l=Object(A.a)(i,2),c=l[0],u=l[1],d=Object(n.useCallback)((function(t){t&&(u(t),o(t)),e(Object(b.b)({isSignedIn:t}))}),[]),h=Object(Ol.b)("is-signed-in",d);return[Object(A.a)(h,1)[0],c]},Al=function(){var e=Cl(),t=Object(A.a)(e,1)[0];return Object(s.e)(ue.u)&&r.a.createElement(Ci,{content:"Sign in to Netdata to monitor all your nodes at once, have composite charts, custom dashboards, use intelligent features and more",align:"bottom",plain:!0},r.a.createElement("div",null,r.a.createElement(Sl,{signedIn:t}),!t&&r.a.createElement(_l.a,{utmParameters:{content:"topbar"}},(function(e){var t=e.isRegistry,a=e.link,n=e.offline,o=e.onSignIn;return r.a.createElement(Z.b,Object.assign({"data-testid":"header-signin",label:"Sign in",disabled:n},t?{as:"a",href:a}:{onClick:o}))}))))},kl=a(282),jl=Object($.d)(Z.j).attrs({as:"header",position:"relative",justifyContent:"between",background:"panel",zIndex:20,width:"100%",padding:[2,4,2,4]}).withConfig({displayName:"header__Wrapper",componentId:"c0wsrq-0"})(["pointer-events:all;"]),Tl=function(){return r.a.createElement(jl,null,r.a.createElement(Z.j,{alignItems:"center",gap:3},r.a.createElement(xi,null)),r.a.createElement(Z.j,{justifyContent:"end",alignItems:"center",gap:3},r.a.createElement(kl.CloudConnectionStatus,null),r.a.createElement(Ni,null),r.a.createElement(il,null),r.a.createElement(Ai,null),r.a.createElement(Mi,null),r.a.createElement(vl,null),r.a.createElement(el,null),r.a.createElement(ol,null),r.a.createElement(Al,null)))},Dl=Object($.d)(Z.b).withConfig({displayName:"expandButton__ExpandButton",componentId:"ebkdno-0"})(["&&{> .button-icon{width:6px;height:9px;}"]),Pl=a(140),Ml=function(e){var t=e.flavour,a=void 0===t?"default":t,n=Object(gr.a)(e,["flavour"]),o=Object(s.e)(ue.f);return r.a.createElement(Z.j,Object.assign({alignItems:"center",as:"iframe",src:"".concat(Object(Pl.a)(o,"sign-out"),"?type=").concat(a),border:{side:"all",size:"0px"},width:{max:"128px"},height:{max:"40px"}},n))},Ll=function(){return r.a.createElement(_l.a,{utmParameters:{content:"userSettings"}},(function(e){var t=e.isRegistry,a=e.link,n=e.onSignIn;return r.a.createElement(Z.z,{onClick:t?function(e){return function(e,t){e.stopPropagation(),window.location.href=t}(e,a)}:n},"Sign in")}))},Il=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return e.isSignedIn})),Nl=function(){var e=Object(En.a)(),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(la.b)(Il),s=Object(n.useMemo)((function(){return[].concat(Object(C.a)(i?[{children:"Operational Status",onClick:function(){return window.open("https://status.netdata.cloud","_blank","noopener,noreferrer")}}]:[]),Object(C.a)(i?[{separator:!0}]:[]),Object(C.a)(i?[{children:r.a.createElement(Ml,{"data-testid":"signout-button-sidebar",flavour:"borderless",height:{max:"18px"}})}]:[{children:r.a.createElement(Ll,null)}]))}),[i]);return r.a.createElement($.b,{theme:Z.e},r.a.createElement(Z.b,{"data-testid":"avatar-button-sidebar",flavour:"borderless",neutral:!0,icon:"user",title:"User settings",name:"userSettings",onClick:o}),a&&r.a.createElement(Z.p,{position:"bottom-left",onClickOutside:o,onEsc:o,backdrop:!1,margin:[5,18]},r.a.createElement(Z.j,{column:!0,width:52,background:"mainBackground",padding:[3],round:!0},s.map((function(e,t){return e.separator?r.a.createElement(Z.j,{height:"1px",background:"disabled",key:t}):r.a.createElement(Ys,Object.assign({key:t,padding:[2,4],round:1},e.onClick&&{onClick:e.onClick}),e.children)})))))},Rl=function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.j,{width:"40px",height:"40px",round:2,border:{side:"all",color:"border",size:"2px",type:"dotted"}}),r.a.createElement(Z.j,{height:"1px",background:"separator",width:"20px"}),r.a.createElement(Z.b,{icon:"plus",disabled:!0}))},Fl=function(){var e=Object(la.b)(ue.f);return r.a.createElement(Z.j,{as:"iframe",src:Object(Ve.c)(e,"space-bar"),title:"Space Bar",height:"100%",width:"100%",border:{side:"all",size:"0px"},overflow:"hidden"})},Bl=function(e){var t=e.isOpen,a=e.toggle,n=e.isSignedIn,o=Object(s.e)(ue.u);return r.a.createElement(Z.j,{column:!0,justifyContent:"between",background:"panel",padding:[3,0],width:"64px",alignItems:"center",gap:6,position:"relative",overflow:"hidden"},r.a.createElement(Z.j,{column:!0,gap:4,alignItems:"center",height:"100%",overflow:"hidden"},r.a.createElement(Z.o,{color:"success",name:"netdataPress",height:"32px",width:"32px"}),!t&&r.a.createElement(Dl,{icon:"chevron_right_s",onClick:a,small:!0,neutral:!0,flavour:"borderless",themeType:"dark"}),o&&n&&r.a.createElement(Fl,null),o&&!n&&r.a.createElement(Rl,null)),r.a.createElement(Z.j,{column:!0,gap:4,alignItems:"center"},r.a.createElement(Z.g,{app:"agent"},(function(e){return r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",icon:"question",onClick:e,title:"Need help?"})})),r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark",className:"btn","data-toggle":"modal","data-target":"#optionsModal",icon:"gear",title:"Settings"}),o&&r.a.createElement(Nl,null)))},Hl=function(e){for(var t,a,n=[],r=0,o=-1,i=0;t=(a=e.charAt(r++)).charCodeAt(0);){var s=t>=48&&t<=57;s!==i&&(n[++o]="",i=s),n[o]+=a}return n},zl=function(e,t){for(var a=Hl(e.toLowerCase()),n=Hl(t.toLowerCase()),r=0;a[r]&&n[r];r++)if(a[r]!==n[r]){var o=Number(a[r]),i=Number(n[r]);return o.toString()===a[r]&&i.toString()===n[r]?o-i:a[r]>n[r]?1:-1}return a.length-n.length},Ul=function(e,t){return"".concat(e,"/host/").concat(t,"/")},Gl=function(e,t,a){if(!e||!t)return{};var n=function(e){var t=document.location.origin.toString()+decodeURI(document.location.pathname.toString());return t.endsWith("/host/".concat(e,"/"))&&(t=t.substring(0,t.length-"/host/".concat(e,"/").toString().length)),t.endsWith("/")&&(t=t.substring(0,t.length-1)),t}(t);return{parentNode:{hostname:Object(A.a)(e,1)[0].hostname,url:"".concat(n,"/")},replicatedNodes:e.slice(1).map((function(e,t){var r=e.hostname;return{hostname:r,url:Ul(n,r),status:a[t+1].reachable}})).sort((function(e,t){return zl(e.hostname,t.hostname)}))}},Wl=Object($.d)(Z.j).attrs({as:"a",gap:2,alignItems:"center"}).withConfig({displayName:"anchor__Anchor",componentId:"sc-8wivg4-0"})(["&:hover{text-decoration:none;}"]),Vl=function(e){var t=e.hostname,a=e.url,n=e.status;return r.a.createElement(Wl,{href:a,justifyContent:"between",padding:[0,0,0,2]},r.a.createElement(Z.j,{alignItems:"center",gap:2},r.a.createElement(Z.o,{name:"node",color:"bright"}),r.a.createElement(Z.z,{color:"bright",truncate:!0},t)),r.a.createElement(nl,{background:n?"success":"border",color:"bright",round:10},n?"Live":"Off"))},Yl=Object($.d)(Z.A).withConfig({displayName:"replicatedNodes__Search",componentId:"sc-1bn9jso-0"})(["& > label{margin-bottom:0;}"]),Xl=Object($.d)(Z.o).withConfig({displayName:"replicatedNodes__StyledIcon",componentId:"sc-1bn9jso-1"})(["transform:",";"],(function(e){return e.right?"rotate(270deg)":"none"})),Kl=function(e){var t=e.parentNode,a=e.replicatedNodes,o=Object(n.useState)(!0),i=Object(A.a)(o,2),s=i[0],l=i[1],c=Object(n.useState)(""),u=Object(A.a)(c,2),d=u[0],h=u[1],p=Object(n.useCallback)((function(){return l((function(e){return!e}))}),[]),f=Object(n.useCallback)((function(e){return h(e.target.value)}),[]),g=Object(n.useMemo)((function(){return d?a.filter((function(e){return e.hostname.toLowerCase().includes(d.toLowerCase())})):a}),[a,d]);return r.a.createElement(Zs,{isOpen:s,toggleOpen:p,label:r.a.createElement(Z.j,{alignItems:"center",justifyContent:"between"},r.a.createElement(Z.z,{strong:!0,color:"border"},"Replicated nodes"),r.a.createElement(Xl,{right:!s,name:"chevron_down",size:"small",color:"text"}))},r.a.createElement(Z.j,{column:!0,gap:4,padding:[4,0,0]},r.a.createElement(Wl,{as:"a",href:t.url,justifyContent:"start"},r.a.createElement(Z.o,{name:"nodes",size:"small",color:"bright"}),r.a.createElement(Z.z,{color:"bright"},t.hostname)),g.length>=5&&r.a.createElement(Z.j,{padding:[0,0,0,2]},r.a.createElement(Yl,{value:d,onChange:f,iconLeft:r.a.createElement(Z.o,{name:"search_s",size:"small",color:"text"}),metaShrinked:!0})),r.a.createElement(Z.j,{column:!0,gap:2},g.map((function(e){var t=e.hostname,a=e.url,n=e.status;return r.a.createElement(Vl,{key:t,hostname:t,url:a,status:n})})))))},Zl=function(e){var t=e.parentNode,a=e.replicatedNodes,o=Object(la.b)(ue.f),i=Object(n.useRef)(),s=Object(Ol.b)("hello-from-space-panel"),l=Object(A.a)(s,1)[0];return Object(n.useEffect)((function(){l&&i.current&&Object(Ol.a)(i.current,{type:"streamed-hosts-data",payload:{parentNode:t,replicatedNodes:a}})}),[a,t,l]),r.a.createElement(Z.j,{ref:i,as:"iframe",src:Object(Pl.a)(o,"space-panel"),title:"space panel",width:"100%",height:"100%",border:{side:"all",size:"0px"}})},ql={signIn:{title:"Welcome back!",content:[r.a.createElement(Z.D,{key:"1",color:"bright"},"Sign in again to enjoy the benefits of Netdata Cloud"," ")]},signUp:{title:"Welcome to Netdata Cloud!",content:[r.a.createElement(Z.D,{key:"1",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"A single place")," ","for all your nodes."),r.a.createElement(Z.D,{key:"2",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Multi-node dashboards")," ","out of the box."),r.a.createElement(Z.D,{key:"3",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Custom dashboards")," ","for you to create, edit and share online."),r.a.createElement(Z.D,{key:"4",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Metric Correlations")," ","to find the root cause of anything."),r.a.createElement(Z.D,{key:"5",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Centrally dispatched notifications")," ","for all alarms of all your nodes."),r.a.createElement(Z.D,{key:"6",color:"bright"},"And... It is"," ",r.a.createElement(Z.D,{as:"a",href:"https://www.netdata.cloud/get-netdata/",target:"_blank",rel:"noopener noreferrer",strong:!0,color:"bright"},"free, forever!"))]}},$l=function(){return r.a.createElement(_l.a,{utmParameters:{content:"sidebar"}},(function(e){var t=e.isRegistry,a=e.link,n=e.onSignIn,o=e.offline,i=ql.signIn,s=i.title,l=i.content;return r.a.createElement(Z.j,{background:["neutral","regentgrey"],column:!0,gap:4,padding:[10],border:{side:"right",color:"panel"}},r.a.createElement(Z.z,{color:"bright",strong:!0},s),l.map((function(e){return e})),r.a.createElement(Z.b,Object.assign({width:"100%",label:"Sign in",disabled:o},t?{as:"a",href:a}:{onClick:n})))}))},Jl=function(){return r.a.createElement("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M48.875 6.375H19.125C16.7778 6.375 14.875 8.27779 14.875 10.625V40.375C14.875 42.7222 16.7778 44.625 19.125 44.625H48.875C51.2222 44.625 53.125 42.7222 53.125 40.375V10.625C53.125 8.27779 51.2222 6.375 48.875 6.375Z",fill:"white",stroke:"#AEB3B7"}),r.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M41.0834 38.25C41.8658 38.25 42.5 38.8843 42.5 39.6667V41.0833C44.0648 41.0833 45.3334 42.3519 45.3334 43.9167V58.0833C45.3334 59.6481 44.0648 60.9167 42.5 60.9167H38.25V65.1667H31.8278V60.9167H26.9167C25.3519 60.9167 24.0834 59.6481 24.0834 58.0833V43.9167C24.0834 42.3519 25.3519 41.0833 26.9167 41.0833V39.6667C26.9167 38.8843 27.551 38.25 28.3334 38.25H41.0834Z",fill:"#35414A"}),r.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.7954 12.75C40.5778 12.75 41.2121 13.3843 41.2121 14.1667L41.2108 16.7294L43.9166 16.7296C44.699 16.7296 45.3333 17.3639 45.3333 18.1463V34C45.3333 34.7824 44.699 35.4167 43.9166 35.4167L43.272 35.4152L43.2727 33.3403H41.2121L41.2108 35.4152H39.151L39.1515 33.3403H37.0909L37.0897 35.4152H35.0299L35.0303 33.3403H32.9697L32.9686 35.4152H30.9088L30.909 33.3403H28.8484L28.8475 35.4152H26.7877L26.7878 33.3403H24.7272L24.7265 35.4152L24.0833 35.4167C23.3009 35.4167 22.6666 34.7824 22.6666 34V18.1463C22.6666 17.3639 23.3009 16.7296 24.0833 16.7296L26.7877 16.7294L26.7878 14.1667C26.7878 13.3843 27.4221 12.75 28.2045 12.75H39.7954Z",fill:"#35414A"}))},Ql=function(){return r.a.createElement(Z.j,{alignItems:"center",background:["neutral","regentgrey"],column:!0,gap:1,padding:[10]},r.a.createElement(Z.D,{color:"bright",strong:!0,textAlign:"center"},"Can't connect to Netdata Cloud"),r.a.createElement(Jl,null),r.a.createElement(Z.C,{color:"bright",textAlign:"center",margin:[2,0,0]},"Maybe you are behind a firewall or you don\u2019t have connection to the internet"))},ec=Object(Ha.a)((function(e){return e.global.chartsMetadata.data||{}}),(function(e){return e.global.registry.fullInfoPayload.mirrored_hosts_status||{}}),(function(e,t){var a=e.hosts,n=e.hostname;return Gl(a,n,t)})),tc=Object(Ha.a)((function(e){return e.global.registry}),(function(e){return e.registryMachinesArray||[]})),ac=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return{isSignedIn:e.isSignedIn,offline:e.offline}})),nc=r.a.memo((function(e){var t=e.isOpen,a=e.toggle,o=Object(s.e)(ec),i=o.parentNode,l=void 0===i?{}:i,c=o.replicatedNodes,u=void 0===c?[]:c,d=Object(s.e)(tc),h=Object(s.e)(ue.v),p=Object(s.e)(ac),f=p.isSignedIn,g=p.offline,m=Object(s.e)(ue.u),b=Object(n.useCallback)((function(){return window.switchRegistryModalHandler()}),[]);return r.a.createElement(Z.d,{width:74,background:"panel",open:t,direction:"horizontal",persist:!0},r.a.createElement(Z.j,{flex:!0,column:!0,overflow:{vertical:"hidden"},margin:[3,0,0],border:{side:"left",color:"separator"},style:{pointerEvents:"all"}},r.a.createElement(Z.j,{overflow:{vertical:"auto"},flex:!0,column:!0,gap:4,padding:[4]},r.a.createElement(Z.j,{alignSelf:"end"},r.a.createElement(Z.b,{neutral:!0,flavour:"borderless",themeType:"dark",small:!0,icon:"chevron_left",onClick:a})),!f&&r.a.createElement(r.a.Fragment,null,!!u.length&&r.a.createElement(Kl,{parentNode:l,replicatedNodes:u}),!!d.length&&r.a.createElement(Z.z,{strong:!0,color:"border"},"VisitedNodes")),f&&r.a.createElement(Zl,{parentNode:l,replicatedNodes:u})),h&&r.a.createElement(Z.j,{border:{side:"top"},justifyContent:"center",alignItems:"center",padding:[6]},r.a.createElement(Z.D,{onClick:b},"Switch Identity")),!f&&m&&r.a.createElement($l,null),g&&m&&r.a.createElement(Ql,null)))})),rc=Object($.d)(Z.j).attrs({height:"100vh",zIndex:10}).withConfig({displayName:"sidebar__Wrapper",componentId:"v4d3v5-0"})(["pointer-events:all;"]),oc=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return e.isSignedIn})),ic=r.a.memo((function(){var e=Object(yl.a)("space-panel-state"),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(s.e)(ue.F),l=Object(s.e)(oc),c=Object(s.d)(),u=Object(n.useCallback)((function(){c(Object(Ke.w)({isActive:!i})),o(!i)}),[i]);return Object(n.useEffect)((function(){c(Object(Ke.w)({isActive:!!a&&l}))}),[l]),r.a.createElement(rc,null,r.a.createElement(Bl,{isOpen:i,toggle:u,isSignedIn:l}),r.a.createElement(nc,{isOpen:i,toggle:u,offline:!0}))})),sc=Object($.d)(Z.j).attrs({position:"fixed",justifyContent:"start",alignItems:"start",width:"100%",zIndex:10}).withConfig({displayName:"layout__Wrapper",componentId:"sc-1d05imu-0"})(["top:0;left:0;pointer-events:none;"]),lc=function(e){var t=e.children;return e.printMode?t:r.a.createElement(sc,null,r.a.createElement(ic,null),r.a.createElement(Tl,null),t)},cc=(a(487),function(e){return{slate:Z.e,white:Z.f}[e]||Z.e}),uc=a(216),dc=function(e){var t=e.migrationModalPromoInfo,a=e.setUserPrefrence,o=e.closeModal,i=e.savePromoRemindMeSelection,s=e.migrationModalPromo,l=e.requestRefreshOfAccess,c=Object(n.useState)(!1),u=Object(A.a)(c,2),d=u[0],h=u[1],p=Object(n.useCallback)((function(e){var n=e.link,r=e.toPath,s=t.CTA1;"NAVIGATE"===s.action?(d&&(a(s.userPreference),i(d)),"agent"!==r&&(window.location.href=n),o()):"REFRESH"===s.action&&l()}),[t,a,d,l,i,o]),f=Object(n.useCallback)((function(){var e=t.CTA2;d&&(a(e.userPreference),i(d)),"NAVIGATE"===e.action||"REFRESH"===e.action&&l(),o()}),[t,a,d,l,i,o]);return t?r.a.createElement(Z.q,null,r.a.createElement(Z.t,{width:180,background:"modalBackground"},r.a.createElement(Z.v,null,r.a.createElement(Z.k,{margin:[0]},t.title)),r.a.createElement(Z.r,null,r.a.createElement(Z.j,{padding:[0,0,4,0],column:!0,gap:3},"function"===typeof t.text.header?t.text.header({}):r.a.createElement(Z.z,null,t.text.header),t.text.bullets.length>0&&r.a.createElement(Z.j,{column:!0,gap:3},r.a.createElement(Z.j,{column:!0,gap:1,as:"ul"},t.text.bullets.map((function(e){return"function"===typeof e?r.a.createElement("li",{key:e},e()):r.a.createElement("li",{key:e},r.a.createElement(Z.z,null,e))})))),t.text.footer&&r.a.createElement(Z.z,{"data-testid":"body-footer"},t.text.footer))),r.a.createElement(Z.u,null,r.a.createElement(Z.a,{margin:[0,"auto",0,0]},r.a.createElement(Z.c,{"data-ga":"".concat(s,"::click-remind-me::ad"),"data-testid":"remind-me-checkbox",checked:d,onChange:function(e){h(e.currentTarget.checked)},label:t.tickBoxOption.text})),r.a.createElement(Z.a,{"data-testid":"cta1",margin:[0,2,0,0],width:{min:40}},r.a.createElement(_l.a,{utmParameters:{content:s,campaign:"agent_nudge_to_cloud"}},(function(e){var a=e.link;return r.a.createElement(Z.b,{"data-ga":"".concat(s,"::click-ct1::ad"),textTransform:"none","data-testid":"cta1-button",onClick:function(){return p({link:a,toPath:t.CTA1.toPath})},width:"100%",label:t.CTA1.text})}))),t.CTA2&&r.a.createElement(Z.a,{"data-ga":"".concat(s,"::click-ct2::ad"),onClick:f,height:10,className:"btn btn-default","data-testid":"cta2",width:{min:40}},r.a.createElement(Z.a,{as:Z.z,sx:{fontWeight:"500",lineHeight:"25px"}},t.CTA2.text))))):null},hc=a(132);!function(e){e.PROMO_SIGN_IN_CLOUD="PROMO_SIGN_IN_CLOUD",e.PROMO_SIGN_UP_CLOUD="PROMO_SIGN_UP_CLOUD",e.PROMO_IVNITED_TO_SPACE="PROMO_IVNITED_TO_SPACE",e.PROMO_CLAIM_NODE="PROMO_CLAIM_NODE",e.PROMO_TO_USE_NEW_DASHBAORD="PROMO_TO_USE_NEW_DASHBAORD",e.FALLBACK_TO_AGENT="FALLBACK_TO_AGENT",e.NO_INFO_FALLBACK_TO_AGENT="NO_INFO_FALLBACK_TO_AGENT"}(lo||(lo={}));var pc=function(e){return"".concat(Ve.g).concat(Object(ue.Q)({content:e,campaign:"agent_nudge_to_cloud"}))},fc=(io={},Object(u.a)(io,lo.PROMO_SIGN_UP_CLOUD,{title:"Learn about Netdata Cloud!",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:")},bullets:["Infrastructure level dashboards (each chart aggregates data from multiple nodes)","Central dispatch of alert notifications","Custom dashboards editor","Intelligence assisted troubleshooting, to help surface the root cause of issues"],footer:"Have a look, you will be surprised!"},tickBoxOption:{text:"Remember my choice",preferenceID:lo.PROMO_SIGN_UP_CLOUD},CTA1:{text:"Wow! Let\u2019s go to Netdata Cloud",toPath:"path/signup/cloud",action:"NAVIGATE",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the agent dashboard",action:"NAVIGATE",toPath:"path/agent-dashboard",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_SIGN_IN_CLOUD,{title:"Sign-in to Netdata Cloud or get an invitation!",text:{header:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.z,{strong:!0},"This node is connected to Netdata Cloud but you are not. If you have a Netdata Cloud account sign-in, if not ask for an invitation to it."),r.a.createElement(Z.z,null,"Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:"))},bullets:["Infrastructure level dashboards (each chart aggregates data from multiple nodes)","Central dispatch of alert notifications","Custom dashboards editor","Intelligence assisted troubleshooting, to help surface the root cause of issues"],footer:"Have a look, you will be surprised!"},tickBoxOption:{text:"Remember my choice",preferenceID:lo.PROMO_SIGN_IN_CLOUD},CTA1:{text:"Sign-in or get a Netdata Cloud account",action:"NAVIGATE",toPath:"path/signin/cloud",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the Agent dashboard",toPath:"path/agent-dashboard",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_IVNITED_TO_SPACE,{title:"Get an invitation to this Node\u2019s Space!",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"This node is connected to Netdata Cloud but it isnt available on one of your Spaces.")},bullets:[],footer:"Ask for an invitation to this Space!"},tickBoxOption:{text:"Don't remind me of this again",preferenceID:lo.PROMO_IVNITED_TO_SPACE},CTA1:{text:"Thanks, stay at Agent dashboard for now",toPath:"agent",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_CLAIM_NODE,{title:"This node isn\u2019t connected to Netdata Cloud",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"For you to be able to see this node on Netdata Cloud you will either need to:")},footer:"Have a look, you will be surprised!",bullets:[function(){return r.a.createElement(Z.z,null," ","Connect this node directly (documentation on"," ",r.a.createElement(hc.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim?".concat(pc(lo.PROMO_CLAIM_NODE).substring(1),"#how-to-connect-a-node")},"how to connect a node"),") , or")},function(){return r.a.createElement(Z.z,null,"\u0391ctivate streaming to a parent node that is already connected (documentation on"," ",r.a.createElement(hc.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/metrics-storage-management/enable-streaming?".concat(pc(lo.PROMO_CLAIM_NODE).substring(1))},"how to configure streaming"),")")}]},tickBoxOption:{text:"Remember my choice.",preferenceID:lo.PROMO_CLAIM_NODE},CTA1:{text:"Wow! Let\u2019s go to Netdata Cloud",action:"NAVIGATE",toPath:"path/node/cloud",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the Agent dashboard",action:"NAVIGATE",toPath:"path/agent-dashboard",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_TO_USE_NEW_DASHBAORD,{title:"Use the Old or the New dashboard?",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"This node is available in your Netdata Cloud account. So, you have full access to the NEW dashboards, charts, intelligence-assisted troubleshooting and many more!")},bullets:[]},tickBoxOption:{text:"Remember my choice",preferenceID:lo.PROMO_TO_USE_NEW_DASHBAORD},CTA1:{text:"Wow! Let\u2019s go to Netdata Cloud ",action:"NAVIGATE",toPath:"path/dashboard/cloud",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the Agent dashboard",action:"NAVIGATE",toPath:"path/agent-dashboard",userPreference:"AGENT"}}),Object(u.a)(io,lo.FALLBACK_TO_AGENT,{title:"Oops! This node has lost connection to Netdata Cloud!",text:{header:function(e){e.date;return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.z,{strong:!0},"Unfortunately, it seems that this node is not currently connected to Netdata Cloud. So, the old agent dashboard is the only option available."),r.a.createElement(Z.z,null,"To troubleshoot Netdata Cloud connection issues, please follow this"," ",r.a.createElement(hc.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim?".concat(pc(lo.FALLBACK_TO_AGENT).substring(1),"#troubleshooting")},"this guide.")))},bullets:[]},tickBoxOption:{text:"Don't show this again",preferenceID:lo.FALLBACK_TO_AGENT},CTA1:{text:"Check again please",action:"REFRESH",userPreference:void 0},CTA2:{text:"Thanks, stay at Agent dashboard",toPath:"path/agent",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(io,lo.NO_INFO_FALLBACK_TO_AGENT,{title:"Oops! We aren't able to get information of this node in regards to Netdata Cloud!",text:{header:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.z,{strong:!0},"Unfortunately, it seems we aren't able to get information on this node in regards to Netdata Cloud."),r.a.createElement(Z.z,null,"This could be from internet connectivity issues from your end or some temporary issue with our services. So, the old agent dashboard is the only option available."))},bullets:[]},tickBoxOption:{text:"Don't show this again",preferenceID:lo.NO_INFO_FALLBACK_TO_AGENT},CTA1:{text:"Check again please",action:"REFRESH",userPreference:void 0},CTA2:{text:"Thanks, stay at Agent dashboard",toPath:"path/agent-dashboard",action:"NAVIGATE",userPreference:"AGENT"}}),io),gc=(so={},Object(u.a)(so,lo.FALLBACK_TO_AGENT,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus,r=e.nodeLiveness,o=e.userNodeAccess;return"AGENT"!==t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"CLAIMED"===n&&"NOT_LIVE"===r&&"ACCESS_OK"===o})),Object(u.a)(so,lo.NO_INFO_FALLBACK_TO_AGENT,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus,r=e.nodeLiveness,o=e.userNodeAccess;return"CLOUD"===t&&!a&&!n&&!r&&!o})),Object(u.a)(so,lo.PROMO_TO_USE_NEW_DASHBAORD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeLiveness,r=e.userNodeAccess;return!t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"LIVE"===n&&"ACCESS_OK"===r})),Object(u.a)(so,lo.PROMO_CLAIM_NODE,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"NOT_CLAIMED"===n})),Object(u.a)(so,lo.PROMO_IVNITED_TO_SPACE,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus,r=e.userNodeAccess;return"AGENT"!==t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"CLAIMED"===n&&"NO_ACCESS"===r})),Object(u.a)(so,lo.PROMO_SIGN_IN_CLOUD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&"UNKNOWN"===a&&"CLAIMED"===n})),Object(u.a)(so,lo.PROMO_SIGN_UP_CLOUD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&"UNKNOWN"===a&&"NOT_CLAIMED"===n})),so),mc=function(e){var t=e.userStatus,a=e.nodeClaimedStatus,r=e.userNodeAccess,o=e.nodeLiveness,i=Object(yl.a)("USER_SAVED_PREFERENCE"),s=Object(A.a)(i,2),l=s[0],c=s[1],u=Object(n.useMemo)((function(){return Object.keys(gc).find((function(e){return gc[e]({userStatus:t,nodeClaimedStatus:a,userNodeAccess:r,userSavedPreference:l,nodeLiveness:o})}))}),[t,a,r,o,l]);return{migrationModalPromoInfo:fc[u],migrationModalPromo:u,setUserPrefrence:c,userSavedPreference:l}},bc=function(){var e=Object(s.e)(ue.u),t=Object(s.e)(ue.y),a=Object(s.e)((function(e){return Object(ue.C)({content:"agent-auto-redirect",term:t.machineGuid})(e)})),o=Object(n.useMemo)((function(){var e=window.location.href,t=encodeURIComponent(e);return"".concat(a,"&redirect_uri=").concat(t)}),[a]),i=Object(s.e)(ue.P),l=Object(n.useState)(!1),c=Object(A.a)(l,2),u=c[0],d=c[1],h=mc(Object(g.a)({},i)),p=h.migrationModalPromoInfo,f=h.setUserPrefrence,m=h.userSavedPreference,b=h.migrationModalPromo,v=(null===p||void 0===p?void 0:p.tickBoxOption.preferenceID)||"",_=Object(yl.a)(v),y=Object(A.a)(_,2)[1],O=localStorage.getItem(v),x=e&&p&&u&&(!O||"undefined"===O),w=Object(xl.b)();return Object(n.useEffect)((function(){var e=setTimeout((function(){return d(!0)}),4e3);return function(){clearTimeout(e)}}),[]),Object(n.useEffect)((function(){(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeLiveness,r=e.userNodeAccess;return"CLOUD"===t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"LIVE"===n&&"ACCESS_OK"===r})(Object(g.a)({userSavedPreference:m},i))&&(window.location.href=o)}),[o,i,m]),Object(n.useEffect)((function(){"AGENT"==={userSavedPreference:m}.userSavedPreference&&console.log("Lets go to Agent")}),[m]),Object(n.useEffect)((function(){document.documentElement.style.overflow=x?"hidden":"auto"}),[u,x]),x?r.a.createElement(dc,{savePromoRemindMeSelection:y,migrationModalPromoInfo:p,setUserPrefrence:f,closeModal:function(){d(!1)},migrationModalPromo:b,requestRefreshOfAccess:w}):null};window.Ps=na.a;var vc=function(){var e=Object(s.f)();Object(n.useEffect)((function(){window.NETDATA.alarms={},window.NETDATA.pause=function(e){e()},Object(uc.a)(e)}),[]);var t=Object(n.useState)(),a=Object(A.a)(t,2),o=a[0],i=a[1],l=void 0!==o,c=Object(n.useRef)((function(){i(Math.random())}));Object(n.useEffect)((function(){if(l){var e=document.getElementById("loadOverlay");e&&(e.style.display="none")}}),[l]);var u=Object(sa.b)(),d=u.localeDateString,p=u.localeTimeString;Object(n.useEffect)((function(){Object(uc.b)({localeDateString:d,localeTimeString:p})}),[d,p]),function(e){var t=Object(la.b)(ue.y),a=Object(la.a)();Object(n.useEffect)((function(){!e||t.isFetchingHello||t.hasFetchedHello||t.isHelloCallError||a(Ke.f.request({serverDefault:D.b}))}),[a,t,e])}(!0),function(e){var t=Object(la.b)(ue.r),a=Object(la.a)();Object(n.useEffect)((function(){e&&!t&&a(Object(Ke.A)({serverDefault:D.b}))}),[a,t,e])}(!0),function(e){var t=Object(la.b)(ue.y),a=(null===t||void 0===t?void 0:t.hasStartedInfo)||!1,r=Object(la.a)();Object(n.useEffect)((function(){e&&!a&&r(_e.f.request({poll:!1}))}),[r,a,e])}(!0);var f=Object(n.useState)(!1),g=Object(A.a)(f,2),m=g[0],b=g[1];Object(n.useLayoutEffect)((function(){Promise.all([ia(D.c+window.NETDATA.themes.current.bootstrap_css),ia(D.c+window.NETDATA.themes.current.dashboard_css)]).then((function(){b(!0)}))}),[]);var v=function(){var e=ti("".concat(D.b,"api/v1/charts"));return Object(A.a)(e,1)[0]}(),_=Object(la.b)(ue.f);window.NETDATA.parseDom=c.current;var y=Object(la.b)(ue.q),O=Object(la.b)(ue.L);return function(){var e=Object(la.a)();Object(dn.a)((function(){var t=Object(Wt.b)(),a=t.alarm_when;if(a){var n=Number(a),r=t.alarm_status,o=t.alarm_chart,i=t.alarm_value;if(!h.d.includes(r)||!o||!i)return;e(Object(Ke.n)({alarm:{chartId:o,status:r,value:i,when:n}}));e(Object(Ke.s)({after:1e3*n-3e5,before:1e3*n+3e5}))}}))}(),r.a.createElement($.b,{theme:cc(O)},m&&r.a.createElement(_i,null),v&&_&&y&&l&&r.a.createElement(lc,{printMode:ve},Ye.a?null:r.a.createElement(bc,null),m&&r.a.createElement(r.a.Fragment,null,r.a.createElement(ei,{key:o}),r.a.createElement(vi,null,r.a.createElement(bi,null)),ve&&r.a.createElement(ri,null))))};a(488);i.a.render(r.a.createElement(s.a,{store:ta},r.a.createElement(vc,null)),document.getElementById("root"))},51:function(e,t,a){var n;e.exports=function e(t,a,r){function o(s,l){if(!a[s]){if(!t[s]){if(!l&&"function"==typeof n&&n)return n(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=a[s]={exports:{}};t[s][0].call(u.exports,(function(e){return o(t[s][1][e]||e)}),u,u.exports,e,t,a,r)}return a[s].exports}for(var i="function"==typeof n&&n,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,a){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function i(){g&&p&&(g=!1,p.length?f=p.concat(f):m=-1,f.length&&s())}function s(){if(!g){var e=o(i);g=!0;for(var t=f.length;t;){for(p=f,f=[];++m<t;)p&&p[m].run();m=-1,t=f.length}p=null,g=!1,function(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var u,d,h=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(e){u=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(e){d=r}}();var p,f=[],g=!1,m=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)t[a-1]=arguments[a];f.push(new l(e,t)),1!==f.length||g||o(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],2:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./bars")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n,r,o,i=[],s=a.get("logscale"),l=0;l<e.length;l++)n=e[l][0],o=e[l][t],s&&null!==o&&(o[0]<=0||o[1]<=0||o[2]<=0)&&(o=null),null!==o?null===(r=o[1])||isNaN(r)?i.push([n,r,[r,r]]):i.push([n,r,[o[0],o[2]]]):i.push([n,null,[null,null]]);return i},r.prototype.rollingAverage=function(e,t,a){t=Math.min(t,e.length);var n,r,o,i,s,l,c,u=[];for(r=0,i=0,o=0,s=0,l=0;l<e.length;l++){if(n=e[l][1],c=e[l][2],u[l]=e[l],null===n||isNaN(n)||(r+=c[0],i+=n,o+=c[1],s+=1),l-t>=0){var d=e[l-t];null===d[1]||isNaN(d[1])||(r-=d[2][0],i-=d[1],o-=d[2][1],s-=1)}u[l]=s?[e[l][0],1*i/s,[1*r/s,1*o/s]]:[e[l][0],null,[null,null]]}return u},a.default=r,t.exports=a.default},{"./bars":5}],3:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./bars")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n,r,o,i,s=[],l=a.get("sigma"),c=a.get("logscale"),u=0;u<e.length;u++)n=e[u][0],i=e[u][t],c&&null!==i&&(i[0]<=0||i[0]-l*i[1]<=0)&&(i=null),null!==i?null===(r=i[0])||isNaN(r)?s.push([n,r,[r,r,r]]):(o=l*i[1],s.push([n,r,[r-o,r+o,i[1]]])):s.push([n,null,[null,null,null]]);return s},r.prototype.rollingAverage=function(e,t,a){t=Math.min(t,e.length);var n,r,o,i,s,l,c,u,d,h=[],p=a.get("sigma");for(n=0;n<e.length;n++){for(s=0,u=0,l=0,r=Math.max(0,n-t+1);r<n+1;r++)null===(o=e[r][1])||isNaN(o)||(l++,s+=o,u+=Math.pow(e[r][2][2],2));l?(c=Math.sqrt(u)/l,d=s/l,h[n]=[e[n][0],d,[d-p*c,d+p*c]]):(i=1==t?e[n][1]:null,h[n]=[e[n][0],i,[i,i]])}return h},a.default=r,t.exports=a.default},{"./bars":5}],4:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./bars")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n,r,o,i,s,l,c,u=[],d=a.get("sigma"),h=a.get("logscale"),p=0;p<e.length;p++)n=e[p][0],o=e[p][t],h&&null!==o&&(o[0]<=0||o[1]<=0)&&(o=null),null!==o?(i=o[0],s=o[1],null===i||isNaN(i)?u.push([n,i,[i,i,i,s]]):(l=s?i/s:0,c=100*(s?d*Math.sqrt(l*(1-l)/s):1),r=100*l,u.push([n,r,[r-c,r+c,i,s]]))):u.push([n,null,[null,null,null,null]]);return u},r.prototype.rollingAverage=function(e,t,a){t=Math.min(t,e.length);var n,r,o,i,s=[],l=a.get("sigma"),c=a.get("wilsonInterval"),u=0,d=0;for(o=0;o<e.length;o++){u+=e[o][2][2],d+=e[o][2][3],o-t>=0&&(u-=e[o-t][2][2],d-=e[o-t][2][3]);var h=e[o][0],p=d?u/d:0;if(c)if(d){var f=p<0?0:p,g=d,m=l*Math.sqrt(f*(1-f)/g+l*l/(4*g*g)),b=1+l*l/d;n=(f+l*l/(2*d)-m)/b,r=(f+l*l/(2*d)+m)/b,s[o]=[h,100*f,[100*n,100*r]]}else s[o]=[h,0,[0,0]];else i=d?l*Math.sqrt(p*(1-p)/d):1,s[o]=[h,100*p,[100*(p-i),100*(p+i)]]}return s},a.default=r,t.exports=a.default},{"./bars":5}],5:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var r=n(e("./datahandler")),o=n(e("../dygraph-layout")),i=function(){r.default.call(this)};(i.prototype=new r.default).extractSeries=function(e,t,a){},i.prototype.rollingAverage=function(e,t,a){},i.prototype.onPointsCreated_=function(e,t){for(var a=0;a<e.length;++a){var n=e[a],o=t[a];o.y_top=NaN,o.y_bottom=NaN,o.yval_minus=r.default.parseFloat(n[2][0]),o.yval_plus=r.default.parseFloat(n[2][1])}},i.prototype.getExtremeYValues=function(e,t,a){for(var n,r=null,o=null,i=e.length-1,s=0;s<=i;s++)if(null!==(n=e[s][1])&&!isNaN(n)){var l=e[s][2][0],c=e[s][2][1];l>n&&(l=n),c<n&&(c=n),(null===o||c>o)&&(o=c),(null===r||l<r)&&(r=l)}return[r,o]},i.prototype.onLineEvaluated=function(e,t,a){for(var n,r=0;r<e.length;r++)(n=e[r]).y_top=o.default.calcYNormal_(t,n.yval_minus,a),n.y_bottom=o.default.calcYNormal_(t,n.yval_plus,a)},a.default=i,t.exports=a.default},{"../dygraph-layout":13,"./datahandler":6}],6:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){},r=n;r.X=0,r.Y=1,r.EXTRAS=2,r.prototype.extractSeries=function(e,t,a){},r.prototype.seriesToPoints=function(e,t,a){for(var n=[],o=0;o<e.length;++o){var i=e[o],s=i[1],l=null===s?null:r.parseFloat(s),c={x:NaN,y:NaN,xval:r.parseFloat(i[0]),yval:l,name:t,idx:o+a,canvasx:NaN,canvasy:NaN};n.push(c)}return this.onPointsCreated_(e,n),n},r.prototype.onPointsCreated_=function(e,t){},r.prototype.rollingAverage=function(e,t,a){},r.prototype.getExtremeYValues=function(e,t,a){},r.prototype.onLineEvaluated=function(e,t,a){},r.parseFloat=function(e){return null===e?NaN:e},a.default=n,t.exports=a.default},{}],7:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var r=(n(e("./datahandler")),e("./default")),o=n(r),i=function(){};(i.prototype=new o.default).extractSeries=function(e,t,a){for(var n,r,o,i,s,l=[],c=a.get("logscale"),u=0;u<e.length;u++)n=e[u][0],o=e[u][t],c&&null!==o&&(o[0]<=0||o[1]<=0)&&(o=null),null!==o?(i=o[0],s=o[1],null===i||isNaN(i)?l.push([n,i,[i,s]]):(r=100*(s?i/s:0),l.push([n,r,[i,s]]))):l.push([n,null,[null,null]]);return l},i.prototype.rollingAverage=function(e,t,a){t=Math.min(t,e.length);var n,r=[],o=0,i=0;for(n=0;n<e.length;n++){o+=e[n][2][0],i+=e[n][2][1],n-t>=0&&(o-=e[n-t][2][0],i-=e[n-t][2][1]);var s=e[n][0],l=i?o/i:0;r[n]=[s,100*l]}return r},a.default=i,t.exports=a.default},{"./datahandler":6,"./default":8}],8:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./datahandler")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n=[],r=a.get("logscale"),o=0;o<e.length;o++){var i=e[o][0],s=e[o][t];r&&s<=0&&(s=null),n.push([i,s])}return n},r.prototype.rollingAverage=function(e,t,a){var n,r,o,i,s,l=[];if(1==(t=Math.min(t,e.length)))return e;for(n=0;n<e.length;n++){for(i=0,s=0,r=Math.max(0,n-t+1);r<n+1;r++)null===(o=e[r][1])||isNaN(o)||(s++,i+=e[r][1]);l[n]=s?[e[n][0],i/s]:[e[n][0],null]}return l},r.prototype.getExtremeYValues=function(e,t,a){for(var n,r=null,o=null,i=e.length-1,s=0;s<=i;s++)null===(n=e[s][1])||isNaN(n)||((null===o||n>o)&&(o=n),(null===r||n<r)&&(r=n));return[r,o]},a.default=r,t.exports=a.default},{"./datahandler":6}],9:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils")),r=function(e){return e&&e.__esModule?e:{default:e}}(e("./dygraph")),o=function(e,t,a,r){if(this.dygraph_=e,this.layout=r,this.element=t,this.elementContext=a,this.height=e.height_,this.width=e.width_,!n.isCanvasSupported(this.element))throw"Canvas is not supported.";this.area=r.getPlotArea();var o=this.dygraph_.canvas_ctx_;o.beginPath(),o.rect(this.area.x,this.area.y,this.area.w,this.area.h),o.clip(),(o=this.dygraph_.hidden_ctx_).beginPath(),o.rect(this.area.x,this.area.y,this.area.w,this.area.h),o.clip()};o.prototype.clear=function(){this.elementContext.clearRect(0,0,this.width,this.height)},o.prototype.render=function(){this._updatePoints(),this._renderLineChart()},o._getIteratorPredicate=function(e){return e?o._predicateThatSkipsEmptyPoints:null},o._predicateThatSkipsEmptyPoints=function(e,t){return null!==e[t].yval},o._drawStyledLine=function(e,t,a,r,i,s,l){var c=e.dygraph,u=c.getBooleanOption("stepPlot",e.setName);n.isArrayLike(r)||(r=null);var d=c.getBooleanOption("drawGapEdgePoints",e.setName),h=e.points,p=e.setName,f=n.createIterator(h,0,h.length,o._getIteratorPredicate(c.getBooleanOption("connectSeparatedPoints",p))),g=r&&r.length>=2,m=e.drawingContext;m.save(),g&&m.setLineDash&&m.setLineDash(r);var b=o._drawSeries(e,f,a,l,i,d,u,t);o._drawPointsOnLine(e,b,s,t,l),g&&m.setLineDash&&m.setLineDash([]),m.restore()},o._drawSeries=function(e,t,a,n,r,o,i,s){var l,c,u=null,d=null,h=null,p=[],f=!0,g=e.drawingContext;g.beginPath(),g.strokeStyle=s,g.lineWidth=a;for(var m=t.array_,b=t.end_,v=t.predicate_,_=t.start_;_<b;_++){if(c=m[_],v){for(;_<b&&!v(m,_);)_++;if(_==b)break;c=m[_]}if(null===c.canvasy||c.canvasy!=c.canvasy)i&&null!==u&&(g.moveTo(u,d),g.lineTo(c.canvasx,d)),u=d=null;else{if(l=!1,o||null===u){t.nextIdx_=_,t.next();var y=null===(h=t.hasNext?t.peek.canvasy:null)||h!=h;l=null===u&&y,o&&(!f&&null===u||t.hasNext&&y)&&(l=!0)}null!==u?a&&(i&&(g.moveTo(u,d),g.lineTo(c.canvasx,d)),g.lineTo(c.canvasx,c.canvasy)):g.moveTo(c.canvasx,c.canvasy),(r||l)&&p.push([c.canvasx,c.canvasy,c.idx]),u=c.canvasx,d=c.canvasy}f=!1}return g.stroke(),p},o._drawPointsOnLine=function(e,t,a,n,r){for(var o=e.drawingContext,i=0;i<t.length;i++){var s=t[i];o.save(),a.call(e.dygraph,e.dygraph,e.setName,o,s[0],s[1],n,r,s[2]),o.restore()}},o.prototype._updatePoints=function(){for(var e=this.layout.points,t=e.length;t--;)for(var a=e[t],n=a.length;n--;){var r=a[n];r.canvasx=this.area.w*r.x+this.area.x,r.canvasy=this.area.h*r.y+this.area.y}},o.prototype._renderLineChart=function(e,t){var a,r,o=t||this.elementContext,i=this.layout.points,s=this.layout.setNames;this.colors=this.dygraph_.colorsMap_;var l=this.dygraph_.getOption("plotter"),c=l;n.isArrayLike(c)||(c=[c]);var u={};for(a=0;a<s.length;a++){r=s[a];var d=this.dygraph_.getOption("plotter",r);d!=l&&(u[r]=d)}for(a=0;a<c.length;a++)for(var h=c[a],p=a==c.length-1,f=0;f<i.length;f++)if(r=s[f],!e||r==e){var g=i[f],m=h;if(r in u){if(!p)continue;m=u[r]}var b=this.colors[r],v=this.dygraph_.getOption("strokeWidth",r);o.save(),o.strokeStyle=b,o.lineWidth=v,m({points:g,setName:r,drawingContext:o,color:b,strokeWidth:v,dygraph:this.dygraph_,axis:this.dygraph_.axisPropertiesForSeries(r),plotArea:this.area,seriesIndex:f,seriesCount:i.length,singleSeriesName:e,allSeriesPoints:i}),o.restore()}},o._Plotters={linePlotter:function(e){o._linePlotter(e)},fillPlotter:function(e){o._fillPlotter(e)},errorPlotter:function(e){o._errorPlotter(e)}},o._linePlotter=function(e){var t=e.dygraph,a=e.setName,r=e.strokeWidth,i=t.getNumericOption("strokeBorderWidth",a),s=t.getOption("drawPointCallback",a)||n.Circles.DEFAULT,l=t.getOption("strokePattern",a),c=t.getBooleanOption("drawPoints",a),u=t.getNumericOption("pointSize",a);i&&r&&o._drawStyledLine(e,t.getOption("strokeBorderColor",a),r+2*i,l,c,s,u),o._drawStyledLine(e,e.color,r,l,c,s,u)},o._errorPlotter=function(e){var t=e.dygraph,a=e.setName;if(t.getBooleanOption("errorBars")||t.getBooleanOption("customBars")){t.getBooleanOption("fillGraph",a)&&console.warn("Can't use fillGraph option with error bars");var r,i=e.drawingContext,s=e.color,l=t.getNumericOption("fillAlpha",a),c=t.getBooleanOption("stepPlot",a),u=e.points,d=n.createIterator(u,0,u.length,o._getIteratorPredicate(t.getBooleanOption("connectSeparatedPoints",a))),h=NaN,p=NaN,f=[-1,-1],g=n.toRGB_(s),m="rgba("+g.r+","+g.g+","+g.b+","+l+")";i.fillStyle=m,i.beginPath();for(var b=function(e){return null===e||void 0===e||isNaN(e)};d.hasNext;){var v=d.next();!c&&b(v.y)||c&&!isNaN(p)&&b(p)?h=NaN:(r=[v.y_bottom,v.y_top],c&&(p=v.y),isNaN(r[0])&&(r[0]=v.y),isNaN(r[1])&&(r[1]=v.y),r[0]=e.plotArea.h*r[0]+e.plotArea.y,r[1]=e.plotArea.h*r[1]+e.plotArea.y,isNaN(h)||(c?(i.moveTo(h,f[0]),i.lineTo(v.canvasx,f[0]),i.lineTo(v.canvasx,f[1])):(i.moveTo(h,f[0]),i.lineTo(v.canvasx,r[0]),i.lineTo(v.canvasx,r[1])),i.lineTo(h,f[1]),i.closePath()),f=r,h=v.canvasx)}i.fill()}},o._fastCanvasProxy=function(e){var t=[],a=null,n=null,r=0,o=function(a){!function(e){if(!(t.length<=1)){for(var a=t.length-1;a>0;a--)if(2==(s=t[a])[0]){var n=t[a-1];n[1]==s[1]&&n[2]==s[2]&&t.splice(a,1)}for(a=0;a<t.length-1;)2==(s=t[a])[0]&&2==t[a+1][0]?t.splice(a,1):a++;if(t.length>2&&!e){var r=0;2==t[0][0]&&r++;var o=null,i=null;for(a=r;a<t.length;a++){var s;if(1==(s=t[a])[0])if(null===o&&null===i)o=a,i=a;else{var l=s[2];l<t[o][2]?o=a:l>t[i][2]&&(i=a)}}var c=t[o],u=t[i];t.splice(r,t.length-r),o<i?(t.push(c),t.push(u)):o>i?(t.push(u),t.push(c)):t.push(c)}}}(a);for(var o=0,i=t.length;o<i;o++){var s=t[o];1==s[0]?e.lineTo(s[1],s[2]):2==s[0]&&e.moveTo(s[1],s[2])}t.length&&(n=t[t.length-1][1]),r+=t.length,t=[]},i=function(e,r,i){var s=Math.round(r);null!==a&&s==a||(o(a-n>1||s-a>1),a=s),t.push([e,r,i])};return{moveTo:function(e,t){i(2,e,t)},lineTo:function(e,t){i(1,e,t)},stroke:function(){o(!0),e.stroke()},fill:function(){o(!0),e.fill()},beginPath:function(){o(!0),e.beginPath()},closePath:function(){o(!0),e.closePath()},_count:function(){return r}}},o._fillPlotter=function(e){if(!e.singleSeriesName&&0===e.seriesIndex){for(var t=e.dygraph,a=t.getLabels().slice(1),i=a.length;i>=0;i--)t.visibility()[i]||a.splice(i,1);if(function(){for(var e=0;e<a.length;e++)if(t.getBooleanOption("fillGraph",a[e]))return!0;return!1}())for(var s,l,c=e.plotArea,u=e.allSeriesPoints,d=u.length,h=t.getBooleanOption("stackedGraph"),p=t.getColors(),f={},g=function(e,t,a,n){if(e.lineTo(t,a),h)for(var r=n.length-1;r>=0;r--){var o=n[r];e.lineTo(o[0],o[1])}},m=d-1;m>=0;m--){var b=e.drawingContext,v=a[m];if(t.getBooleanOption("fillGraph",v)){var _=t.getNumericOption("fillAlpha",v),y=t.getBooleanOption("stepPlot",v),O=p[m],x=t.axisPropertiesForSeries(v),w=1+x.minyval*x.yscale;w<0?w=0:w>1&&(w=1),w=c.h*w+c.y;var E,S=u[m],C=n.createIterator(S,0,S.length,o._getIteratorPredicate(t.getBooleanOption("connectSeparatedPoints",v))),A=NaN,k=[-1,-1],j=n.toRGB_(O),T="rgba("+j.r+","+j.g+","+j.b+","+_+")";b.fillStyle=T,b.beginPath();var D,P=!0;(S.length>2*t.width_||r.default.FORCE_FAST_PROXY)&&(b=o._fastCanvasProxy(b));for(var M,L=[];C.hasNext;)if(M=C.next(),n.isOK(M.y)||y){if(h){if(!P&&D==M.xval)continue;var I;P=!1,D=M.xval,I=void 0===(s=f[M.canvasx])?w:l?s[0]:s,E=[M.canvasy,I],y?-1===k[0]?f[M.canvasx]=[M.canvasy,w]:f[M.canvasx]=[M.canvasy,k[0]]:f[M.canvasx]=M.canvasy}else E=isNaN(M.canvasy)&&y?[c.y+c.h,w]:[M.canvasy,w];isNaN(A)?(b.moveTo(M.canvasx,E[1]),b.lineTo(M.canvasx,E[0])):(y?(b.lineTo(M.canvasx,k[0]),b.lineTo(M.canvasx,E[0])):b.lineTo(M.canvasx,E[0]),h&&(L.push([A,k[1]]),l&&s?L.push([M.canvasx,s[1]]):L.push([M.canvasx,E[1]]))),k=E,A=M.canvasx}else g(b,A,k[1],L),L=[],A=NaN,null===M.y_stacked||isNaN(M.y_stacked)||(f[M.canvasx]=c.h*M.y_stacked+c.y);l=y,E&&M&&(g(b,M.canvasx,E[1],L),L=[]),b.fill()}}}},a.default=o,t.exports=a.default},{"./dygraph":18,"./dygraph-utils":17}],10:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}Object.defineProperty(a,"__esModule",{value:!0});var o=r(e("./dygraph-tickers")),i=n(e("./dygraph-interaction-model")),s=n(e("./dygraph-canvas")),l=r(e("./dygraph-utils")),c={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:.5,highlightSeriesBackgroundColor:"rgb(255, 255, 255)",labelsSeparateLines:!1,labelsShowZeroValues:!0,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:!0,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:"white",axisTickSize:3,axisLabelFontSize:14,rightGap:5,showRoller:!1,xValueParser:void 0,delimiter:",",sigma:2,errorBars:!1,fractions:!1,wilsonInterval:!0,customBars:!1,fillGraph:!1,fillAlpha:.15,connectSeparatedPoints:!1,stackedGraph:!1,stackedGraphNaNFill:"all",hideOverlayOnMouseOut:!0,legend:"onmouseover",stepPlot:!1,xRangePad:0,yRangePad:null,drawAxesAtZero:!1,titleHeight:28,xLabelHeight:18,yLabelWidth:18,axisLineColor:"black",axisLineWidth:.3,gridLineWidth:.3,axisLabelWidth:50,gridLineColor:"rgb(128,128,128)",interactionModel:i.default.defaultModel,animatedZooms:!1,showRangeSelector:!1,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:"#808FAB",rangeSelectorPlotFillGradientColor:"white",rangeSelectorPlotFillColor:"#A7B1C4",rangeSelectorBackgroundStrokeColor:"gray",rangeSelectorBackgroundLineWidth:1,rangeSelectorPlotLineWidth:1.5,rangeSelectorForegroundStrokeColor:"black",rangeSelectorForegroundLineWidth:1,rangeSelectorAlpha:.6,showInRangeSelector:null,plotter:[s.default._fillPlotter,s.default._errorPlotter,s.default._linePlotter],plugins:[],axes:{x:{pixelsPerLabel:70,axisLabelWidth:60,axisLabelFormatter:l.dateAxisLabelFormatter,valueFormatter:l.dateValueFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.dateTicker},y:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:l.numberValueFormatter,axisLabelFormatter:l.numberAxisLabelFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.numericTicks},y2:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:l.numberValueFormatter,axisLabelFormatter:l.numberAxisLabelFormatter,drawAxis:!0,drawGrid:!1,independentTicks:!1,ticker:o.numericTicks}}};a.default=c,t.exports=a.default},{"./dygraph-canvas":9,"./dygraph-interaction-model":12,"./dygraph-tickers":16,"./dygraph-utils":17}],11:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./dygraph")),r=function(e){this.container=e};r.prototype.draw=function(e,t){this.container.innerHTML="",void 0!==this.date_graph&&this.date_graph.destroy(),this.date_graph=new n.default(this.container,e,t)},r.prototype.setSelection=function(e){var t=!1;e.length&&(t=e[0].row),this.date_graph.setSelection(t)},r.prototype.getSelection=function(){var e=[],t=this.date_graph.getSelection();if(t<0)return e;for(var a=this.date_graph.layout_.points,n=0;n<a.length;++n)e.push({row:t,column:n+1});return e},a.default=r,t.exports=a.default},{"./dygraph":18}],12:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils")),r={maybeTreatMouseOpAsClick:function(e,t,a){a.dragEndX=n.dragGetX_(e,a),a.dragEndY=n.dragGetY_(e,a);var o=Math.abs(a.dragEndX-a.dragStartX),i=Math.abs(a.dragEndY-a.dragStartY);o<2&&i<2&&void 0!==t.lastx_&&-1!=t.lastx_&&r.treatMouseOpAsClick(t,e,a),a.regionWidth=o,a.regionHeight=i},startPan:function(e,t,a){var r,o;a.isPanning=!0;var i=t.xAxisRange();if(t.getOptionForAxis("logscale","x")?(a.initialLeftmostDate=n.log10(i[0]),a.dateRange=n.log10(i[1])-n.log10(i[0])):(a.initialLeftmostDate=i[0],a.dateRange=i[1]-i[0]),a.xUnitsPerPixel=a.dateRange/(t.plotter_.area.w-1),t.getNumericOption("panEdgeFraction")){var s=t.width_*t.getNumericOption("panEdgeFraction"),l=t.xAxisExtremes(),c=t.toDomXCoord(l[0])-s,u=t.toDomXCoord(l[1])+s,d=t.toDataXCoord(c),h=t.toDataXCoord(u);a.boundedDates=[d,h];var p=[],f=t.height_*t.getNumericOption("panEdgeFraction");for(r=0;r<t.axes_.length;r++){var g=(o=t.axes_[r]).extremeRange,m=t.toDomYCoord(g[0],r)+f,b=t.toDomYCoord(g[1],r)-f,v=t.toDataYCoord(m,r),_=t.toDataYCoord(b,r);p[r]=[v,_]}a.boundedValues=p}for(a.is2DPan=!1,a.axes=[],r=0;r<t.axes_.length;r++){o=t.axes_[r];var y={},O=t.yAxisRange(r);t.attributes_.getForAxis("logscale",r)?(y.initialTopValue=n.log10(O[1]),y.dragValueRange=n.log10(O[1])-n.log10(O[0])):(y.initialTopValue=O[1],y.dragValueRange=O[1]-O[0]),y.unitsPerPixel=y.dragValueRange/(t.plotter_.area.h-1),a.axes.push(y),o.valueRange&&(a.is2DPan=!0)}},movePan:function(e,t,a){a.dragEndX=n.dragGetX_(e,a),a.dragEndY=n.dragGetY_(e,a);var r=a.initialLeftmostDate-(a.dragEndX-a.dragStartX)*a.xUnitsPerPixel;a.boundedDates&&(r=Math.max(r,a.boundedDates[0]));var o=r+a.dateRange;if(a.boundedDates&&o>a.boundedDates[1]&&(o=(r-=o-a.boundedDates[1])+a.dateRange),t.getOptionForAxis("logscale","x")?t.dateWindow_=[Math.pow(n.LOG_SCALE,r),Math.pow(n.LOG_SCALE,o)]:t.dateWindow_=[r,o],a.is2DPan)for(var i=a.dragEndY-a.dragStartY,s=0;s<t.axes_.length;s++){var l=t.axes_[s],c=a.axes[s],u=i*c.unitsPerPixel,d=a.boundedValues?a.boundedValues[s]:null,h=c.initialTopValue+u;d&&(h=Math.min(h,d[1]));var p=h-c.dragValueRange;d&&p<d[0]&&(p=(h-=p-d[0])-c.dragValueRange),t.attributes_.getForAxis("logscale",s)?l.valueRange=[Math.pow(n.LOG_SCALE,p),Math.pow(n.LOG_SCALE,h)]:l.valueRange=[p,h]}t.drawGraph_(!1)}};r.endPan=r.maybeTreatMouseOpAsClick,r.startZoom=function(e,t,a){a.isZooming=!0,a.zoomMoved=!1},r.moveZoom=function(e,t,a){a.zoomMoved=!0,a.dragEndX=n.dragGetX_(e,a),a.dragEndY=n.dragGetY_(e,a);var r=Math.abs(a.dragStartX-a.dragEndX),o=Math.abs(a.dragStartY-a.dragEndY);a.dragDirection=r<o/2?n.VERTICAL:n.HORIZONTAL,t.drawZoomRect_(a.dragDirection,a.dragStartX,a.dragEndX,a.dragStartY,a.dragEndY,a.prevDragDirection,a.prevEndX,a.prevEndY),a.prevEndX=a.dragEndX,a.prevEndY=a.dragEndY,a.prevDragDirection=a.dragDirection},r.treatMouseOpAsClick=function(e,t,a){for(var n=e.getFunctionOption("clickCallback"),r=e.getFunctionOption("pointClickCallback"),o=null,i=-1,s=Number.MAX_VALUE,l=0;l<e.selPoints_.length;l++){var c=e.selPoints_[l],u=Math.pow(c.canvasx-a.dragEndX,2)+Math.pow(c.canvasy-a.dragEndY,2);!isNaN(u)&&(-1==i||u<s)&&(s=u,i=l)}var d=e.getNumericOption("highlightCircleSize")+2;if(s<=d*d&&(o=e.selPoints_[i]),o){var h={cancelable:!0,point:o,canvasx:a.dragEndX,canvasy:a.dragEndY};if(e.cascadeEvents_("pointClick",h))return;r&&r.call(e,t,o)}h={cancelable:!0,xval:e.lastx_,pts:e.selPoints_,canvasx:a.dragEndX,canvasy:a.dragEndY},e.cascadeEvents_("click",h)||n&&n.call(e,t,e.lastx_,e.selPoints_)},r.endZoom=function(e,t,a){t.clearZoomRect_(),a.isZooming=!1,r.maybeTreatMouseOpAsClick(e,t,a);var o=t.getArea();if(a.regionWidth>=10&&a.dragDirection==n.HORIZONTAL){var i=Math.min(a.dragStartX,a.dragEndX),s=Math.max(a.dragStartX,a.dragEndX);(i=Math.max(i,o.x))<(s=Math.min(s,o.x+o.w))&&t.doZoomX_(i,s),a.cancelNextDblclick=!0}else if(a.regionHeight>=10&&a.dragDirection==n.VERTICAL){var l=Math.min(a.dragStartY,a.dragEndY),c=Math.max(a.dragStartY,a.dragEndY);(l=Math.max(l,o.y))<(c=Math.min(c,o.y+o.h))&&t.doZoomY_(l,c),a.cancelNextDblclick=!0}a.dragStartX=null,a.dragStartY=null},r.startTouch=function(e,t,a){e.preventDefault(),e.touches.length>1&&(a.startTimeForDoubleTapMs=null);for(var n=[],r=0;r<e.touches.length;r++){var o=e.touches[r];n.push({pageX:o.pageX,pageY:o.pageY,dataX:t.toDataXCoord(o.pageX),dataY:t.toDataYCoord(o.pageY)})}if(a.initialTouches=n,1==n.length)a.initialPinchCenter=n[0],a.touchDirections={x:!0,y:!0};else if(n.length>=2){a.initialPinchCenter={pageX:.5*(n[0].pageX+n[1].pageX),pageY:.5*(n[0].pageY+n[1].pageY),dataX:.5*(n[0].dataX+n[1].dataX),dataY:.5*(n[0].dataY+n[1].dataY)};var i=180/Math.PI*Math.atan2(a.initialPinchCenter.pageY-n[0].pageY,n[0].pageX-a.initialPinchCenter.pageX);(i=Math.abs(i))>90&&(i=90-i),a.touchDirections={x:i<67.5,y:i>22.5}}a.initialRange={x:t.xAxisRange(),y:t.yAxisRange()}},r.moveTouch=function(e,t,a){a.startTimeForDoubleTapMs=null;var n,r=[];for(n=0;n<e.touches.length;n++){var o=e.touches[n];r.push({pageX:o.pageX,pageY:o.pageY})}var i,s,l,c=a.initialTouches,u=a.initialPinchCenter,d={pageX:(i=1==r.length?r[0]:{pageX:.5*(r[0].pageX+r[1].pageX),pageY:.5*(r[0].pageY+r[1].pageY)}).pageX-u.pageX,pageY:i.pageY-u.pageY},h=a.initialRange.x[1]-a.initialRange.x[0],p=a.initialRange.y[0]-a.initialRange.y[1];if(d.dataX=d.pageX/t.plotter_.area.w*h,d.dataY=d.pageY/t.plotter_.area.h*p,1==r.length)s=1,l=1;else if(r.length>=2){var f=c[1].pageX-u.pageX;s=(r[1].pageX-i.pageX)/f;var g=c[1].pageY-u.pageY;l=(r[1].pageY-i.pageY)/g}s=Math.min(8,Math.max(.125,s)),l=Math.min(8,Math.max(.125,l));var m=!1;if(a.touchDirections.x&&(t.dateWindow_=[u.dataX-d.dataX+(a.initialRange.x[0]-u.dataX)/s,u.dataX-d.dataX+(a.initialRange.x[1]-u.dataX)/s],m=!0),a.touchDirections.y)for(n=0;n<1;n++){var b=t.axes_[n];t.attributes_.getForAxis("logscale",n)||(b.valueRange=[u.dataY-d.dataY+(a.initialRange.y[0]-u.dataY)/l,u.dataY-d.dataY+(a.initialRange.y[1]-u.dataY)/l],m=!0)}if(t.drawGraph_(!1),m&&r.length>1&&t.getFunctionOption("zoomCallback")){var v=t.xAxisRange();t.getFunctionOption("zoomCallback").call(t,v[0],v[1],t.yAxisRanges())}},r.endTouch=function(e,t,a){if(0!==e.touches.length)r.startTouch(e,t,a);else if(1==e.changedTouches.length){var n=(new Date).getTime(),o=e.changedTouches[0];a.startTimeForDoubleTapMs&&n-a.startTimeForDoubleTapMs<500&&a.doubleTapX&&Math.abs(a.doubleTapX-o.screenX)<50&&a.doubleTapY&&Math.abs(a.doubleTapY-o.screenY)<50?t.resetZoom():(a.startTimeForDoubleTapMs=n,a.doubleTapX=o.screenX,a.doubleTapY=o.screenY)}};var o=function(e,t,a){return e<t?t-e:e>a?e-a:0},i=function(e,t){var a=n.findPos(t.canvas_),r={left:a.x,right:a.x+t.canvas_.offsetWidth,top:a.y,bottom:a.y+t.canvas_.offsetHeight},i={x:n.pageX(e),y:n.pageY(e)},s=o(i.x,r.left,r.right),l=o(i.y,r.top,r.bottom);return Math.max(s,l)};r.defaultModel={mousedown:function(e,t,a){if(!e.button||2!=e.button){a.initializeMouseDown(e,t,a),e.altKey||e.shiftKey?r.startPan(e,t,a):r.startZoom(e,t,a);var o=function(e){a.isZooming?i(e,t)<100?r.moveZoom(e,t,a):null!==a.dragEndX&&(a.dragEndX=null,a.dragEndY=null,t.clearZoomRect_()):a.isPanning&&r.movePan(e,t,a)};t.addAndTrackEvent(document,"mousemove",o),t.addAndTrackEvent(document,"mouseup",(function e(i){a.isZooming?null!==a.dragEndX?r.endZoom(i,t,a):r.maybeTreatMouseOpAsClick(i,t,a):a.isPanning&&r.endPan(i,t,a),n.removeEvent(document,"mousemove",o),n.removeEvent(document,"mouseup",e),a.destroy()}))}},willDestroyContextMyself:!0,touchstart:function(e,t,a){r.startTouch(e,t,a)},touchmove:function(e,t,a){r.moveTouch(e,t,a)},touchend:function(e,t,a){r.endTouch(e,t,a)},dblclick:function(e,t,a){if(a.cancelNextDblclick)a.cancelNextDblclick=!1;else{var n={canvasx:a.dragEndX,canvasy:a.dragEndY,cancelable:!0};t.cascadeEvents_("dblclick",n)||e.altKey||e.shiftKey||t.resetZoom()}}},r.nonInteractiveModel_={mousedown:function(e,t,a){a.initializeMouseDown(e,t,a)},mouseup:r.maybeTreatMouseOpAsClick},r.dragIsPanInteractionModel={mousedown:function(e,t,a){a.initializeMouseDown(e,t,a),r.startPan(e,t,a)},mousemove:function(e,t,a){a.isPanning&&r.movePan(e,t,a)},mouseup:function(e,t,a){a.isPanning&&r.endPan(e,t,a)}},a.default=r,t.exports=a.default},{"./dygraph-utils":17}],13:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils")),r=function(e){this.dygraph_=e,this.points=[],this.setNames=[],this.annotations=[],this.yAxes_=null,this.xTicks_=null,this.yTicks_=null};r.prototype.addDataset=function(e,t){this.points.push(t),this.setNames.push(e)},r.prototype.getPlotArea=function(){return this.area_},r.prototype.computePlotArea=function(){var e={x:0,y:0};e.w=this.dygraph_.width_-e.x-this.dygraph_.getOption("rightGap"),e.h=this.dygraph_.height_;var t={chart_div:this.dygraph_.graphDiv,reserveSpaceLeft:function(t){var a={x:e.x,y:e.y,w:t,h:e.h};return e.x+=t,e.w-=t,a},reserveSpaceRight:function(t){var a={x:e.x+e.w-t,y:e.y,w:t,h:e.h};return e.w-=t,a},reserveSpaceTop:function(t){var a={x:e.x,y:e.y,w:e.w,h:t};return e.y+=t,e.h-=t,a},reserveSpaceBottom:function(t){var a={x:e.x,y:e.y+e.h-t,w:e.w,h:t};return e.h-=t,a},chartRect:function(){return{x:e.x,y:e.y,w:e.w,h:e.h}}};this.dygraph_.cascadeEvents_("layout",t),this.area_=e},r.prototype.setAnnotations=function(e){this.annotations=[];for(var t=this.dygraph_.getOption("xValueParser")||function(e){return e},a=0;a<e.length;a++){var r={};if(!e[a].xval&&void 0===e[a].x)return void console.error("Annotations must have an 'x' property");if(e[a].icon&&(!e[a].hasOwnProperty("width")||!e[a].hasOwnProperty("height")))return void console.error("Must set width and height when setting annotation.icon property");n.update(r,e[a]),r.xval||(r.xval=t(r.x)),this.annotations.push(r)}},r.prototype.setXTicks=function(e){this.xTicks_=e},r.prototype.setYAxes=function(e){this.yAxes_=e},r.prototype.evaluate=function(){this._xAxis={},this._evaluateLimits(),this._evaluateLineCharts(),this._evaluateLineTicks(),this._evaluateAnnotations()},r.prototype._evaluateLimits=function(){var e=this.dygraph_.xAxisRange();this._xAxis.minval=e[0],this._xAxis.maxval=e[1];var t=e[1]-e[0];this._xAxis.scale=0!==t?1/t:1,this.dygraph_.getOptionForAxis("logscale","x")&&(this._xAxis.xlogrange=n.log10(this._xAxis.maxval)-n.log10(this._xAxis.minval),this._xAxis.xlogscale=0!==this._xAxis.xlogrange?1/this._xAxis.xlogrange:1);for(var a=0;a<this.yAxes_.length;a++){var r=this.yAxes_[a];r.minyval=r.computedValueRange[0],r.maxyval=r.computedValueRange[1],r.yrange=r.maxyval-r.minyval,r.yscale=0!==r.yrange?1/r.yrange:1,this.dygraph_.getOption("logscale")&&(r.ylogrange=n.log10(r.maxyval)-n.log10(r.minyval),r.ylogscale=0!==r.ylogrange?1/r.ylogrange:1,isFinite(r.ylogrange)&&!isNaN(r.ylogrange)||console.error("axis "+a+" of graph at "+r.g+" can't be displayed in log scale for range ["+r.minyval+" - "+r.maxyval+"]"))}},r.calcXNormal_=function(e,t,a){return a?(n.log10(e)-n.log10(t.minval))*t.xlogscale:(e-t.minval)*t.scale},r.calcYNormal_=function(e,t,a){if(a){var r=1-(n.log10(t)-n.log10(e.minyval))*e.ylogscale;return isFinite(r)?r:NaN}return 1-(t-e.minyval)*e.yscale},r.prototype._evaluateLineCharts=function(){for(var e=this.dygraph_.getOption("stackedGraph"),t=this.dygraph_.getOptionForAxis("logscale","x"),a=0;a<this.points.length;a++){for(var n=this.points[a],o=this.setNames[a],i=this.dygraph_.getOption("connectSeparatedPoints",o),s=this.dygraph_.axisPropertiesForSeries(o),l=this.dygraph_.attributes_.getForSeries("logscale",o),c=0;c<n.length;c++){var u=n[c];u.x=r.calcXNormal_(u.xval,this._xAxis,t);var d=u.yval;e&&(u.y_stacked=r.calcYNormal_(s,u.yval_stacked,l),null===d||isNaN(d)||(d=u.yval_stacked)),null===d&&(d=NaN,i||(u.yval=NaN)),u.y=r.calcYNormal_(s,d,l)}this.dygraph_.dataHandler_.onLineEvaluated(n,s,l)}},r.prototype._evaluateLineTicks=function(){var e,t,a,n,r,o;for(this.xticks=[],e=0;e<this.xTicks_.length;e++)a=(t=this.xTicks_[e]).label,r=(o=!("label_v"in t))?t.v:t.label_v,(n=this.dygraph_.toPercentXCoord(r))>=0&&n<1&&this.xticks.push({pos:n,label:a,has_tick:o});for(this.yticks=[],e=0;e<this.yAxes_.length;e++)for(var i=this.yAxes_[e],s=0;s<i.ticks.length;s++)a=(t=i.ticks[s]).label,r=(o=!("label_v"in t))?t.v:t.label_v,(n=this.dygraph_.toPercentYCoord(r,e))>0&&n<=1&&this.yticks.push({axis:e,pos:n,label:a,has_tick:o})},r.prototype._evaluateAnnotations=function(){var e,t={};for(e=0;e<this.annotations.length;e++){var a=this.annotations[e];t[a.xval+","+a.series]=a}if(this.annotated_points=[],this.annotations&&this.annotations.length)for(var n=0;n<this.points.length;n++){var r=this.points[n];for(e=0;e<r.length;e++){var o=r[e],i=o.xval+","+o.name;i in t&&(o.annotation=t[i],this.annotated_points.push(o))}}},r.prototype.removeAllDatasets=function(){delete this.points,delete this.setNames,delete this.setPointsLengths,delete this.setPointsOffsets,this.points=[],this.setNames=[],this.setPointsLengths=[],this.setPointsOffsets=[]},a.default=r,t.exports=a.default},{"./dygraph-utils":17}],14:[function(e,t,a){(function(e){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=null,t.exports=a.default}).call(this,e("_process"))},{_process:1}],15:[function(e,t,a){(function(n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils")),i=r(e("./dygraph-default-attrs")),s=(r(e("./dygraph-options-reference")),function(e){this.dygraph_=e,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get("highlightSeriesOpts")||{},this.reparseSeries()});s.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1},s.axisToIndex_=function(e){if("string"==typeof e){if(s.AXIS_STRING_MAPPINGS_.hasOwnProperty(e))return s.AXIS_STRING_MAPPINGS_[e];throw"Unknown axis : "+e}if("number"==typeof e){if(0===e||1===e)return e;throw"Dygraphs only supports two y-axes, indexed from 0-1."}if(e)throw"Unknown axis : "+e;return 0},s.prototype.reparseSeries=function(){var e=this.get("labels");if(e){this.labels_=e.slice(1),this.yAxes_=[{series:[],options:{}}],this.xAxis_={options:{}},this.series_={};for(var t=this.user_.series||{},a=0;a<this.labels_.length;a++){var n=this.labels_[a],r=t[n]||{},i=s.axisToIndex_(r.axis);this.series_[n]={idx:a,yAxis:i,options:r},this.yAxes_[i]?this.yAxes_[i].series.push(n):this.yAxes_[i]={series:[n],options:{}}}var l=this.user_.axes||{};o.update(this.yAxes_[0].options,l.y||{}),this.yAxes_.length>1&&o.update(this.yAxes_[1].options,l.y2||{}),o.update(this.xAxis_.options,l.x||{})}},s.prototype.get=function(e){var t=this.getGlobalUser_(e);return null!==t?t:this.getGlobalDefault_(e)},s.prototype.getGlobalUser_=function(e){return this.user_.hasOwnProperty(e)?this.user_[e]:null},s.prototype.getGlobalDefault_=function(e){return this.global_.hasOwnProperty(e)?this.global_[e]:i.default.hasOwnProperty(e)?i.default[e]:null},s.prototype.getForAxis=function(e,t){var a,n;if("number"==typeof t)n=0===(a=t)?"y":"y2";else{if("y1"==t&&(t="y"),"y"==t)a=0;else if("y2"==t)a=1;else{if("x"!=t)throw"Unknown axis "+t;a=-1}n=t}var r=-1==a?this.xAxis_:this.yAxes_[a];if(r){var o=r.options;if(o.hasOwnProperty(e))return o[e]}if("x"!==t||"logscale"!==e){var s=this.getGlobalUser_(e);if(null!==s)return s}var l=i.default.axes[n];return l.hasOwnProperty(e)?l[e]:this.getGlobalDefault_(e)},s.prototype.getForSeries=function(e,t){if(t===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(e))return this.highlightSeries_[e];if(!this.series_.hasOwnProperty(t))throw"Unknown series: "+t;var a=this.series_[t],n=a.options;return n.hasOwnProperty(e)?n[e]:this.getForAxis(e,a.yAxis)},s.prototype.numAxes=function(){return this.yAxes_.length},s.prototype.axisForSeries=function(e){return this.series_[e].yAxis},s.prototype.axisOptions=function(e){return this.yAxes_[e].options},s.prototype.seriesForAxis=function(e){return this.yAxes_[e].series},s.prototype.seriesNames=function(){return this.labels_},a.default=s,t.exports=a.default}).call(this,e("_process"))},{"./dygraph-default-attrs":10,"./dygraph-options-reference":14,"./dygraph-utils":17,_process:1}],16:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils"));a.numericLinearTicks=function(e,t,a,n,o,i){return r(e,t,a,(function(e){return"logscale"!==e&&n(e)}),o,i)};var r=function(e,t,a,r,o,i){var s,l,c,u,d=r("pixelsPerLabel"),h=[];if(i)for(s=0;s<i.length;s++)h.push({v:i[s]});else{if(r("logscale")){u=Math.floor(a/d);var p=n.binarySearch(e,g,1),f=n.binarySearch(t,g,-1);-1==p&&(p=0),-1==f&&(f=g.length-1);var m=null;if(f-p>=u/4){for(var b=f;b>=p;b--){var v=g[b],_=Math.log(v/e)/Math.log(t/e)*a,y={v:v};null===m?m={tickValue:v,pixel_coord:_}:Math.abs(_-m.pixel_coord)>=d?m={tickValue:v,pixel_coord:_}:y.label="",h.push(y)}h.reverse()}}if(0===h.length){var O,x;r("labelsKMG2")?(O=[1,2,4,8,16,32,64,128,256],x=16):(O=[1,2,5,10,20,50,100],x=10);var w,E,S,C=Math.ceil(a/d),A=Math.abs(t-e)/C,k=Math.floor(Math.log(A)/Math.log(x)),j=Math.pow(x,k);for(l=0;l<O.length&&(w=j*O[l],E=Math.floor(e/w)*w,S=Math.ceil(t/w)*w,!(a/(u=Math.abs(S-E)/w)>d));l++);for(E>S&&(w*=-1),s=0;s<=u;s++)c=E+s*w,h.push({v:c})}}var T=r("axisLabelFormatter");for(s=0;s<h.length;s++)void 0===h[s].label&&(h[s].label=T.call(o,h[s].v,0,r,o));return h};a.numericTicks=r,a.dateTicker=function(e,t,a,n,r,o){var i=m(e,t,a,n);return i>=0?v(e,t,i,n,r):[]};var o={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29};a.Granularity=o;var i=0,s=1,l=2,c=3,u=4,d=5,h=6,p=7,f=[];f[o.MILLISECONDLY]={datefield:h,step:1,spacing:1},f[o.TWO_MILLISECONDLY]={datefield:h,step:2,spacing:2},f[o.FIVE_MILLISECONDLY]={datefield:h,step:5,spacing:5},f[o.TEN_MILLISECONDLY]={datefield:h,step:10,spacing:10},f[o.FIFTY_MILLISECONDLY]={datefield:h,step:50,spacing:50},f[o.HUNDRED_MILLISECONDLY]={datefield:h,step:100,spacing:100},f[o.FIVE_HUNDRED_MILLISECONDLY]={datefield:h,step:500,spacing:500},f[o.SECONDLY]={datefield:d,step:1,spacing:1e3},f[o.TWO_SECONDLY]={datefield:d,step:2,spacing:2e3},f[o.FIVE_SECONDLY]={datefield:d,step:5,spacing:5e3},f[o.TEN_SECONDLY]={datefield:d,step:10,spacing:1e4},f[o.THIRTY_SECONDLY]={datefield:d,step:30,spacing:3e4},f[o.MINUTELY]={datefield:u,step:1,spacing:6e4},f[o.TWO_MINUTELY]={datefield:u,step:2,spacing:12e4},f[o.FIVE_MINUTELY]={datefield:u,step:5,spacing:3e5},f[o.TEN_MINUTELY]={datefield:u,step:10,spacing:6e5},f[o.THIRTY_MINUTELY]={datefield:u,step:30,spacing:18e5},f[o.HOURLY]={datefield:c,step:1,spacing:36e5},f[o.TWO_HOURLY]={datefield:c,step:2,spacing:72e5},f[o.SIX_HOURLY]={datefield:c,step:6,spacing:216e5},f[o.DAILY]={datefield:l,step:1,spacing:864e5},f[o.TWO_DAILY]={datefield:l,step:2,spacing:1728e5},f[o.WEEKLY]={datefield:l,step:7,spacing:6048e5},f[o.MONTHLY]={datefield:s,step:1,spacing:2629817280},f[o.QUARTERLY]={datefield:s,step:3,spacing:216e5*365.2524},f[o.BIANNUAL]={datefield:s,step:6,spacing:432e5*365.2524},f[o.ANNUAL]={datefield:i,step:1,spacing:864e5*365.2524},f[o.DECADAL]={datefield:i,step:10,spacing:315578073600},f[o.CENTENNIAL]={datefield:i,step:100,spacing:3155780736e3};var g=function(){for(var e=[],t=-39;t<=39;t++)for(var a=Math.pow(10,t),n=1;n<=9;n++){var r=a*n;e.push(r)}return e}(),m=function(e,t,a,n){for(var r=n("pixelsPerLabel"),i=0;i<o.NUM_GRANULARITIES;i++)if(a/b(e,t,i)>=r)return i;return-1},b=function(e,t,a){var n=f[a].spacing;return Math.round(1*(t-e)/n)},v=function(e,t,a,r,g){var m=r("axisLabelFormatter"),b=r("labelsUTC")?n.DateAccessorsUTC:n.DateAccessorsLocal,v=f[a].datefield,_=f[a].step,y=f[a].spacing,O=new Date(e),x=[];x[i]=b.getFullYear(O),x[s]=b.getMonth(O),x[l]=b.getDate(O),x[c]=b.getHours(O),x[u]=b.getMinutes(O),x[d]=b.getSeconds(O),x[h]=b.getMilliseconds(O);var w=x[v]%_;a==o.WEEKLY&&(w=b.getDay(O)),x[v]-=w;for(var E=v+1;E<p;E++)x[E]=E===l?1:0;var S=[],C=b.makeDate.apply(null,x),A=C.getTime();if(a<=o.HOURLY)for(A<e&&(A+=y,C=new Date(A));A<=t;)S.push({v:A,label:m.call(g,C,a,r,g)}),A+=y,C=new Date(A);else for(A<e&&(x[v]+=_,A=(C=b.makeDate.apply(null,x)).getTime());A<=t;)(a>=o.DAILY||b.getHours(C)%_==0)&&S.push({v:A,label:m.call(g,C,a,r,g)}),x[v]+=_,A=(C=b.makeDate.apply(null,x)).getTime();return S};a.getDateAxis=v},{"./dygraph-utils":17}],17:[function(e,t,a){"use strict";function n(e){return!e.pageX||e.pageX<0?0:e.pageX}function r(e){return!e.pageY||e.pageY<0?0:e.pageY}function o(e,t){var a=Math.min(Math.max(1,t||2),21);return Math.abs(e)<.001&&0!==e?e.toExponential(a-1):e.toPrecision(a)}function i(e){return e<10?"0"+e:""+e}function s(e,t,a,n){var r=i(e)+":"+i(t);if(a&&(r+=":"+i(a),n)){var o=""+n;r+="."+("000"+o).substring(o.length)}return r}function l(e,t){var a=t?y:_,n=new Date(e),r=a.getFullYear(n),o=a.getMonth(n),l=a.getDate(n),c=a.getHours(n),u=a.getMinutes(n),d=a.getSeconds(n),h=a.getMilliseconds(n),p=r+"/"+i(o+1)+"/"+i(l);return 3600*c+60*u+d+.001*h&&(p+=" "+s(c,u,d,h)),p}function c(e,t){var a=Math.pow(10,t);return Math.round(e*a)/a}function u(e){return new Date(e).getTime()}function d(e){var t=typeof e;return("object"==t||"function"==t&&"function"==typeof e.item)&&null!==e&&"number"==typeof e.length&&3!==e.nodeType}function h(e,t,a,n){t=t||0,a=a||e.length,this.hasNext=!0,this.peek=null,this.start_=t,this.array_=e,this.predicate_=n,this.end_=Math.min(e.length,t+a),this.nextIdx_=t-1,this.next()}function p(e,t){return t<0?1/Math.pow(e,-t):Math.pow(e,t)}function f(e){var t=E.exec(e);if(!t)return null;var a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[3],10);return t[4]?{r:a,g:n,b:r,a:parseFloat(t[4])}:{r:a,g:n,b:r}}function g(e,t){var a=t("sigFigs");if(null!==a)return o(e,a);var n,r=t("digitsAfterDecimal"),i=t("maxNumberWidth"),s=t("labelsKMB"),l=t("labelsKMG2");if(n=0!==e&&(Math.abs(e)>=Math.pow(10,i)||Math.abs(e)<Math.pow(10,-r))?e.toExponential(r):""+c(e,r),s||l){var u,d=[],h=[];s&&(u=1e3,d=S),l&&(s&&console.warn("Setting both labelsKMB and labelsKMG2. Pick one!"),u=1024,d=C,h=A);for(var f=Math.abs(e),g=p(u,d.length),m=d.length-1;m>=0;m--,g/=u)if(f>=g){n=c(e/g,r)+d[m];break}if(l){var b=String(e.toExponential()).split("e-");2===b.length&&b[1]>=3&&b[1]<=24&&(n=b[1]%3>0?c(b[0]/p(10,b[1]%3),r):Number(b[0]).toFixed(2),n+=h[Math.floor(b[1]/3)-1])}}return n}Object.defineProperty(a,"__esModule",{value:!0}),a.removeEvent=function(e,t,a){e.removeEventListener(t,a,!1)},a.cancelEvent=function(e){return(e=e||window.event).stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1},a.hsvToRGB=function(e,t,a){var n,r,o;if(0===t)n=a,r=a,o=a;else{var i=Math.floor(6*e),s=6*e-i,l=a*(1-t),c=a*(1-t*s),u=a*(1-t*(1-s));switch(i){case 1:n=c,r=a,o=l;break;case 2:n=l,r=a,o=u;break;case 3:n=l,r=c,o=a;break;case 4:n=u,r=l,o=a;break;case 5:n=a,r=l,o=c;break;case 6:case 0:n=a,r=u,o=l}}return"rgb("+(n=Math.floor(255*n+.5))+","+(r=Math.floor(255*r+.5))+","+(o=Math.floor(255*o+.5))+")"},a.findPos=function(e){var t=e.getBoundingClientRect(),a=window,n=document.documentElement;return{x:t.left+(a.pageXOffset||n.scrollLeft),y:t.top+(a.pageYOffset||n.scrollTop)}},a.pageX=n,a.pageY=r,a.dragGetX_=function(e,t){return n(e)-t.px},a.dragGetY_=function(e,t){return r(e)-t.py},a.isOK=function(e){return!!e&&!isNaN(e)},a.isValidPoint=function(e,t){return!!e&&null!==e.yval&&null!==e.x&&void 0!==e.x&&null!==e.y&&void 0!==e.y&&!(isNaN(e.x)||!t&&isNaN(e.y))},a.floatFormat=o,a.zeropad=i,a.hmsString_=s,a.dateString_=l,a.round_=c,a.binarySearch=function(e,t,a,n,r){for(var o=!0;o;){var i=e,s=t,l=a,c=n,u=r;if(o=!1,null!==c&&void 0!==c&&null!==u&&void 0!==u||(c=0,u=s.length-1),c>u)return-1;null!==l&&void 0!==l||(l=0);var d,h=function(e){return e>=0&&e<s.length},p=parseInt((c+u)/2,10),f=s[p];if(f==i)return p;if(f>i){if(l>0&&h(d=p-1)&&s[d]<i)return p;e=i,t=s,a=l,n=c,r=p-1,o=!0,h=p=f=d=void 0}else{if(!(f<i))return-1;if(l<0&&h(d=p+1)&&s[d]>i)return p;e=i,t=s,a=l,n=p+1,r=u,o=!0,h=p=f=d=void 0}}},a.dateParser=function(e){var t,a;if((-1==e.search("-")||-1!=e.search("T")||-1!=e.search("Z"))&&(a=u(e))&&!isNaN(a))return a;if(-1!=e.search("-")){for(t=e.replace("-","/","g");-1!=t.search("-");)t=t.replace("-","/");a=u(t)}else a=8==e.length?u(t=e.substr(0,4)+"/"+e.substr(4,2)+"/"+e.substr(6,2)):u(e);return a&&!isNaN(a)||console.error("Couldn't parse "+e+" as a date"),a},a.dateStrToMillis=u,a.update=function(e,t){if(void 0!==t&&null!==t)for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a]);return e},a.updateDeep=function e(t,a){if(void 0!==a&&null!==a)for(var n in a)a.hasOwnProperty(n)&&(null===a[n]?t[n]=null:d(a[n])?t[n]=a[n].slice():function(e){return"object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}(a[n])||"object"!=typeof a[n]?t[n]=a[n]:("object"==typeof t[n]&&null!==t[n]||(t[n]={}),e(t[n],a[n])));return t},a.isArrayLike=d,a.isDateLike=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime},a.clone=function e(t){for(var a=[],n=0;n<t.length;n++)d(t[n])?a.push(e(t[n])):a.push(t[n]);return a},a.createCanvas=function(){return document.createElement("canvas")},a.getContextPixelRatio=function(e){try{var t=window.devicePixelRatio,a=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return void 0!==t?t/a:1}catch(e){return 1}},a.Iterator=h,a.createIterator=function(e,t,a,n){return new h(e,t,a,n)},a.repeatAndCleanup=function(e,t,a,n){var r,o=0,i=(new Date).getTime();if(e(o),1!=t){var s=t-1;!function l(){o>=t||O.call(window,(function(){var t=(new Date).getTime()-i;r=o;var c=(o=Math.floor(t/a))-r;o+c>s||o>=s?(e(s),n()):(0!==c&&e(o),l())}))}()}else n()},a.isPixelChangingOptionList=function(e,t){var a={};if(e)for(var n=1;n<e.length;n++)a[e[n]]=!0;var r=function(e){for(var t in e)if(e.hasOwnProperty(t)&&!x[t])return!0;return!1};for(var o in t)if(t.hasOwnProperty(o))if("highlightSeriesOpts"==o||a[o]&&!t.series){if(r(t[o]))return!0}else if("series"==o||"axes"==o){var i=t[o];for(var s in i)if(i.hasOwnProperty(s)&&r(i[s]))return!0}else if(!x[o])return!0;return!1},a.detectLineDelimiter=function(e){for(var t=0;t<e.length;t++){var a=e.charAt(t);if("\r"===a)return t+1<e.length&&"\n"===e.charAt(t+1)?"\r\n":a;if("\n"===a)return t+1<e.length&&"\r"===e.charAt(t+1)?"\n\r":a}return null},a.isNodeContainedBy=function(e,t){if(null===t||null===e)return!1;for(var a=e;a&&a!==t;)a=a.parentNode;return a===t},a.pow=p,a.toRGB_=function(e){var t=f(e);if(t)return t;var a=document.createElement("div");a.style.backgroundColor=e,a.style.visibility="hidden",document.body.appendChild(a);var n=window.getComputedStyle(a,null).backgroundColor;return document.body.removeChild(a),f(n)},a.isCanvasSupported=function(e){try{(e||document.createElement("canvas")).getContext("2d")}catch(e){return!1}return!0},a.parseFloat_=function(e,t,a){var n=parseFloat(e);if(!isNaN(n))return n;if(/^ *$/.test(e))return null;if(/^ *nan *$/i.test(e))return NaN;var r="Unable to parse '"+e+"' as a number";return void 0!==a&&void 0!==t&&(r+=" on line "+(1+(t||0))+" ('"+a+"') of CSV."),console.error(r),null},a.numberValueFormatter=g,a.numberAxisLabelFormatter=function(e,t,a){return g.call(this,e,a)},a.dateAxisLabelFormatter=function(e,t,a){var n=a("labelsUTC")?y:_,r=n.getFullYear(e),o=n.getMonth(e),l=n.getDate(e),c=n.getHours(e),u=n.getMinutes(e),d=n.getSeconds(e),h=n.getMilliseconds(e);if(t>=m.Granularity.DECADAL)return""+r;if(t>=m.Granularity.MONTHLY)return k[o]+" "+r;if(0===3600*c+60*u+d+.001*h||t>=m.Granularity.DAILY)return i(l)+" "+k[o];if(t<m.Granularity.SECONDLY){var p=""+h;return i(d)+"."+("000"+p).substring(p.length)}return t>m.Granularity.MINUTELY?s(c,u,d,0):s(c,u,d,h)},a.dateValueFormatter=function(e,t){return l(e,t("labelsUTC"))};var m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-tickers"));a.LOG_SCALE=10;var b=Math.log(10);a.LN_TEN=b;var v=function(e){return Math.log(e)/b};a.log10=v,a.logRangeFraction=function(e,t,a){var n=v(e),r=n+a*(v(t)-n);return Math.pow(10,r)},a.DOTTED_LINE=[2,2],a.DASHED_LINE=[7,3],a.DOT_DASH_LINE=[7,2,2,2],a.HORIZONTAL=1,a.VERTICAL=2,a.getContext=function(e){return e.getContext("2d")},a.addEvent=function(e,t,a){e.addEventListener(t,a,!1)};var _={getFullYear:function(e){return e.getFullYear()},getMonth:function(e){return e.getMonth()},getDate:function(e){return e.getDate()},getHours:function(e){return e.getHours()},getMinutes:function(e){return e.getMinutes()},getSeconds:function(e){return e.getSeconds()},getMilliseconds:function(e){return e.getMilliseconds()},getDay:function(e){return e.getDay()},makeDate:function(e,t,a,n,r,o,i){return new Date(e,t,a,n,r,o,i)}};a.DateAccessorsLocal=_;var y={getFullYear:function(e){return e.getUTCFullYear()},getMonth:function(e){return e.getUTCMonth()},getDate:function(e){return e.getUTCDate()},getHours:function(e){return e.getUTCHours()},getMinutes:function(e){return e.getUTCMinutes()},getSeconds:function(e){return e.getUTCSeconds()},getMilliseconds:function(e){return e.getUTCMilliseconds()},getDay:function(e){return e.getUTCDay()},makeDate:function(e,t,a,n,r,o,i){return new Date(Date.UTC(e,t,a,n,r,o,i))}};a.DateAccessorsUTC=y,h.prototype.next=function(){if(!this.hasNext)return null;for(var e=this.peek,t=this.nextIdx_+1,a=!1;t<this.end_;){if(!this.predicate_||this.predicate_(this.array_,t)){this.peek=this.array_[t],a=!0;break}t++}return this.nextIdx_=t,a||(this.hasNext=!1,this.peek=null),e};var O=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)};a.requestAnimFrame=O;var x={annotationClickHandler:!0,annotationDblClickHandler:!0,annotationMouseOutHandler:!0,annotationMouseOverHandler:!0,axisLineColor:!0,axisLineWidth:!0,clickCallback:!0,drawCallback:!0,drawHighlightPointCallback:!0,drawPoints:!0,drawPointCallback:!0,drawGrid:!0,fillAlpha:!0,gridLineColor:!0,gridLineWidth:!0,hideOverlayOnMouseOut:!0,highlightCallback:!0,highlightCircleSize:!0,interactionModel:!0,labelsDiv:!0,labelsKMB:!0,labelsKMG2:!0,labelsSeparateLines:!0,labelsShowZeroValues:!0,legend:!0,panEdgeFraction:!0,pixelsPerYLabel:!0,pointClickCallback:!0,pointSize:!0,rangeSelectorPlotFillColor:!0,rangeSelectorPlotFillGradientColor:!0,rangeSelectorPlotStrokeColor:!0,rangeSelectorBackgroundStrokeColor:!0,rangeSelectorBackgroundLineWidth:!0,rangeSelectorPlotLineWidth:!0,rangeSelectorForegroundStrokeColor:!0,rangeSelectorForegroundLineWidth:!0,rangeSelectorAlpha:!0,showLabelsOnHighlight:!0,showRoller:!0,strokeWidth:!0,underlayCallback:!0,unhighlightCallback:!0,zoomCallback:!0},w={DEFAULT:function(e,t,a,n,r,o,i){a.beginPath(),a.fillStyle=o,a.arc(n,r,i,0,2*Math.PI,!1),a.fill()}};a.Circles=w;var E=/^rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(?:,\s*([01](?:\.\d+)?))?\)$/,S=["K","M","B","T","Q"],C=["k","M","G","T","P","E","Z","Y"],A=["m","u","n","p","f","a","z","y"],k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},{"./dygraph-tickers":16}],18:[function(e,t,a){(function(n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],n=!0,r=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(a.push(i.value),!t||a.length!==t);n=!0);}catch(e){r=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=o(e("./dygraph-layout")),l=o(e("./dygraph-canvas")),c=o(e("./dygraph-options")),u=o(e("./dygraph-interaction-model")),d=r(e("./dygraph-tickers")),h=r(e("./dygraph-utils")),p=o(e("./dygraph-default-attrs")),f=(o(e("./dygraph-options-reference")),e("./iframe-tarp")),g=o(f),m=o(e("./datahandler/default")),b=o(e("./datahandler/bars-error")),v=o(e("./datahandler/bars-custom")),_=o(e("./datahandler/default-fractions")),y=o(e("./datahandler/bars-fractions")),O=o(e("./datahandler/bars")),x=o(e("./plugins/annotations")),w=o(e("./plugins/axes")),E=o(e("./plugins/chart-labels")),S=o(e("./plugins/grid")),C=o(e("./plugins/legend")),A=o(e("./plugins/range-selector")),k=o(e("./dygraph-gviz")),j=function(e,t,a){this.__init__(e,t,a)};j.NAME="Dygraph",j.VERSION="2.1.0",j.DEFAULT_ROLL_PERIOD=1,j.DEFAULT_WIDTH=480,j.DEFAULT_HEIGHT=320,j.ANIMATION_STEPS=12,j.ANIMATION_DURATION=200,j.Plotters=l.default._Plotters,j.addedAnnotationCSS=!1,j.prototype.__init__=function(e,t,a){if(this.is_initial_draw_=!0,this.readyFns_=[],null!==a&&void 0!==a||(a={}),a=j.copyUserAttrs_(a),"string"==typeof e&&(e=document.getElementById(e)),!e)throw new Error("Constructing dygraph with a non-existent div!");this.maindiv_=e,this.file_=t,this.rollPeriod_=a.rollPeriod||j.DEFAULT_ROLL_PERIOD,this.previousVerticalX_=-1,this.fractions_=a.fractions||!1,this.dateWindow_=a.dateWindow||null,this.annotations_=[],e.innerHTML="",""===e.style.width&&a.width&&(e.style.width=a.width+"px"),""===e.style.height&&a.height&&(e.style.height=a.height+"px"),""===e.style.height&&0===e.clientHeight&&(e.style.height=j.DEFAULT_HEIGHT+"px",""===e.style.width&&(e.style.width=j.DEFAULT_WIDTH+"px")),this.width_=e.clientWidth||a.width||0,this.height_=e.clientHeight||a.height||0,a.stackedGraph&&(a.fillGraph=!0),this.user_attrs_={},h.update(this.user_attrs_,a),this.attrs_={},h.updateDeep(this.attrs_,p.default),this.boundaryIds_=[],this.setIndexByName_={},this.datasetIndex_=[],this.registeredEvents_=[],this.eventListeners_={},this.attributes_=new c.default(this),this.createInterface_(),this.plugins_=[];for(var n=j.PLUGINS.concat(this.getOption("plugins")),r=0;r<n.length;r++){var o,i=n[r],s={plugin:o=void 0!==i.activate?i:new i,events:{},options:{},pluginOptions:{}},l=o.activate(this);for(var u in l)l.hasOwnProperty(u)&&(s.events[u]=l[u]);this.plugins_.push(s)}for(r=0;r<this.plugins_.length;r++){var d=this.plugins_[r];for(var u in d.events)if(d.events.hasOwnProperty(u)){var f=d.events[u],g=[d.plugin,f];u in this.eventListeners_?this.eventListeners_[u].push(g):this.eventListeners_[u]=[g]}}this.createDragInterface_(),this.start_()},j.prototype.cascadeEvents_=function(e,t){if(!(e in this.eventListeners_))return!1;var a={dygraph:this,cancelable:!1,defaultPrevented:!1,preventDefault:function(){if(!a.cancelable)throw"Cannot call preventDefault on non-cancelable event.";a.defaultPrevented=!0},propagationStopped:!1,stopPropagation:function(){a.propagationStopped=!0}};h.update(a,t);var n=this.eventListeners_[e];if(n)for(var r=n.length-1;r>=0;r--){var o=n[r][0];if(n[r][1].call(o,a),a.propagationStopped)break}return a.defaultPrevented},j.prototype.getPluginInstance_=function(e){for(var t=0;t<this.plugins_.length;t++){var a=this.plugins_[t];if(a.plugin instanceof e)return a.plugin}return null},j.prototype.isZoomed=function(e){var t=!!this.dateWindow_;if("x"===e)return t;var a=this.axes_.map((function(e){return!!e.valueRange})).indexOf(!0)>=0;if(null===e||void 0===e)return t||a;if("y"===e)return a;throw new Error("axis parameter is ["+e+"] must be null, 'x' or 'y'.")},j.prototype.toString=function(){var e=this.maindiv_;return"[Dygraph "+(e&&e.id?e.id:e)+"]"},j.prototype.attr_=function(e,t){return t?this.attributes_.getForSeries(e,t):this.attributes_.get(e)},j.prototype.getOption=function(e,t){return this.attr_(e,t)},j.prototype.getNumericOption=function(e,t){return this.getOption(e,t)},j.prototype.getStringOption=function(e,t){return this.getOption(e,t)},j.prototype.getBooleanOption=function(e,t){return this.getOption(e,t)},j.prototype.getFunctionOption=function(e,t){return this.getOption(e,t)},j.prototype.getOptionForAxis=function(e,t){return this.attributes_.getForAxis(e,t)},j.prototype.optionsViewForAxis_=function(e){var t=this;return function(a){var n=t.user_attrs_.axes;return n&&n[e]&&n[e].hasOwnProperty(a)?n[e][a]:("x"!==e||"logscale"!==a)&&(void 0!==t.user_attrs_[a]?t.user_attrs_[a]:(n=t.attrs_.axes)&&n[e]&&n[e].hasOwnProperty(a)?n[e][a]:"y"==e&&t.axes_[0].hasOwnProperty(a)?t.axes_[0][a]:"y2"==e&&t.axes_[1].hasOwnProperty(a)?t.axes_[1][a]:t.attr_(a))}},j.prototype.rollPeriod=function(){return this.rollPeriod_},j.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},j.prototype.xAxisExtremes=function(){var e=this.getNumericOption("xRangePad")/this.plotter_.area.w;if(0===this.numRows())return[0-e,1+e];var t=this.rawData_[0][0],a=this.rawData_[this.rawData_.length-1][0];if(e){var n=a-t;t-=n*e,a+=n*e}return[t,a]},j.prototype.yAxisExtremes=function(){var e=this.gatherDatasets_(this.rolledSeries_,null).extremes,t=this.axes_;this.computeYAxisRanges_(e);var a=this.axes_;return this.axes_=t,a.map((function(e){return e.extremeRange}))},j.prototype.yAxisRange=function(e){if(void 0===e&&(e=0),e<0||e>=this.axes_.length)return null;var t=this.axes_[e];return[t.computedValueRange[0],t.computedValueRange[1]]},j.prototype.yAxisRanges=function(){for(var e=[],t=0;t<this.axes_.length;t++)e.push(this.yAxisRange(t));return e},j.prototype.toDomCoords=function(e,t,a){return[this.toDomXCoord(e),this.toDomYCoord(t,a)]},j.prototype.toDomXCoord=function(e){if(null===e)return null;var t=this.plotter_.area,a=this.xAxisRange();return t.x+(e-a[0])/(a[1]-a[0])*t.w},j.prototype.toDomYCoord=function(e,t){var a=this.toPercentYCoord(e,t);if(null===a)return null;var n=this.plotter_.area;return n.y+a*n.h},j.prototype.toDataCoords=function(e,t,a){return[this.toDataXCoord(e),this.toDataYCoord(t,a)]},j.prototype.toDataXCoord=function(e){if(null===e)return null;var t=this.plotter_.area,a=this.xAxisRange();if(this.attributes_.getForAxis("logscale","x")){var n=(e-t.x)/t.w;return h.logRangeFraction(a[0],a[1],n)}return a[0]+(e-t.x)/t.w*(a[1]-a[0])},j.prototype.toDataYCoord=function(e,t){if(null===e)return null;var a=this.plotter_.area,n=this.yAxisRange(t);if(void 0===t&&(t=0),this.attributes_.getForAxis("logscale",t)){var r=(e-a.y)/a.h;return h.logRangeFraction(n[1],n[0],r)}return n[0]+(a.y+a.h-e)/a.h*(n[1]-n[0])},j.prototype.toPercentYCoord=function(e,t){if(null===e)return null;void 0===t&&(t=0);var a,n=this.yAxisRange(t);if(this.attributes_.getForAxis("logscale",t)){var r=h.log10(n[0]),o=h.log10(n[1]);a=(o-h.log10(e))/(o-r)}else a=(n[1]-e)/(n[1]-n[0]);return a},j.prototype.toPercentXCoord=function(e){if(null===e)return null;var t,a=this.xAxisRange();if(!0===this.attributes_.getForAxis("logscale","x")){var n=h.log10(a[0]),r=h.log10(a[1]);t=(h.log10(e)-n)/(r-n)}else t=(e-a[0])/(a[1]-a[0]);return t},j.prototype.numColumns=function(){return this.rawData_?this.rawData_[0]?this.rawData_[0].length:this.attr_("labels").length:0},j.prototype.numRows=function(){return this.rawData_?this.rawData_.length:0},j.prototype.getValue=function(e,t){return e<0||e>this.rawData_.length?null:t<0||t>this.rawData_[e].length?null:this.rawData_[e][t]},j.prototype.createInterface_=function(){var e=this.maindiv_;this.graphDiv=document.createElement("div"),this.graphDiv.style.textAlign="left",this.graphDiv.style.position="relative",e.appendChild(this.graphDiv),this.canvas_=h.createCanvas(),this.canvas_.style.position="absolute",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=h.getContext(this.canvas_),this.hidden_ctx_=h.getContext(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new s.default(this);var t=this;this.mouseMoveHandler_=function(e){t.mouseMove_(e)},this.mouseOutHandler_=function(e){var a=e.target||e.fromElement,n=e.relatedTarget||e.toElement;h.isNodeContainedBy(a,t.graphDiv)&&!h.isNodeContainedBy(n,t.graphDiv)&&t.mouseOut_(e)},this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(e){t.resize()},this.addAndTrackEvent(window,"resize",this.resizeHandler_))},j.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px",this.graphDiv.style.height=this.height_+"px";var e=this.getNumericOption("pixelRatio"),t=e||h.getContextPixelRatio(this.canvas_ctx_);this.canvas_.width=this.width_*t,this.canvas_.height=this.height_*t,this.canvas_.style.width=this.width_+"px",this.canvas_.style.height=this.height_+"px",1!==t&&this.canvas_ctx_.scale(t,t);var a=e||h.getContextPixelRatio(this.hidden_ctx_);this.hidden_.width=this.width_*a,this.hidden_.height=this.height_*a,this.hidden_.style.width=this.width_+"px",this.hidden_.style.height=this.height_+"px",1!==a&&this.hidden_ctx_.scale(a,a)},j.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var e=this.plugins_.length-1;e>=0;e--){var t=this.plugins_.pop();t.plugin.destroy&&t.plugin.destroy()}this.removeTrackedEvents_(),h.removeEvent(window,"mouseout",this.mouseOutHandler_),h.removeEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),h.removeEvent(window,"resize",this.resizeHandler_),this.resizeHandler_=null,function e(t){for(;t.hasChildNodes();)e(t.firstChild),t.removeChild(t.firstChild)}(this.maindiv_);var a=function(e){for(var t in e)"object"==typeof e[t]&&(e[t]=null)};a(this.layout_),a(this.plotter_),a(this)},j.prototype.createPlotKitCanvas_=function(e){var t=h.createCanvas();return t.style.position="absolute",t.style.top=e.style.top,t.style.left=e.style.left,t.width=this.width_,t.height=this.height_,t.style.width=this.width_+"px",t.style.height=this.height_+"px",t},j.prototype.createMouseEventElement_=function(){return this.canvas_},j.prototype.setColors_=function(){var e=this.getLabels(),t=e.length-1;this.colors_=[],this.colorsMap_={};for(var a=this.getNumericOption("colorSaturation")||1,n=this.getNumericOption("colorValue")||.5,r=Math.ceil(t/2),o=this.getOption("colors"),i=this.visibility(),s=0;s<t;s++)if(i[s]){var l=e[s+1],c=this.attributes_.getForSeries("color",l);if(!c)if(o)c=o[s%o.length];else{var u=1*(s%2?r+(s+1)/2:Math.ceil((s+1)/2))/(1+t);c=h.hsvToRGB(u,a,n)}this.colors_.push(c),this.colorsMap_[l]=c}},j.prototype.getColors=function(){return this.colors_},j.prototype.getPropertiesForSeries=function(e){for(var t=-1,a=this.getLabels(),n=1;n<a.length;n++)if(a[n]==e){t=n;break}return-1==t?null:{name:e,column:t,visible:this.visibility()[t-1],color:this.colorsMap_[e],axis:1+this.attributes_.axisForSeries(e)}},j.prototype.createRollInterface_=function(){var e=this,t=this.roller_;t||(this.roller_=t=document.createElement("input"),t.type="text",t.style.display="none",t.className="dygraph-roller",this.graphDiv.appendChild(t));var a=this.getBooleanOption("showRoller")?"block":"none",n=this.getArea(),r={top:n.y+n.h-25+"px",left:n.x+1+"px",display:a};t.size="2",t.value=this.rollPeriod_,h.update(t.style,r),t.onchange=function(){return e.adjustRoll(t.value)}},j.prototype.createDragInterface_=function(){var e={isZooming:!1,isPanning:!1,is2DPan:!1,dragStartX:null,dragStartY:null,dragEndX:null,dragEndY:null,dragDirection:null,prevEndX:null,prevEndY:null,prevDragDirection:null,cancelNextDblclick:!1,initialLeftmostDate:null,xUnitsPerPixel:null,dateRange:null,px:0,py:0,boundedDates:null,boundedValues:null,tarp:new g.default,initializeMouseDown:function(e,t,a){e.preventDefault?e.preventDefault():(e.returnValue=!1,e.cancelBubble=!0);var n=h.findPos(t.canvas_);a.px=n.x,a.py=n.y,a.dragStartX=h.dragGetX_(e,a),a.dragStartY=h.dragGetY_(e,a),a.cancelNextDblclick=!1,a.tarp.cover()},destroy:function(){var e=this;if((e.isZooming||e.isPanning)&&(e.isZooming=!1,e.dragStartX=null,e.dragStartY=null),e.isPanning){e.isPanning=!1,e.draggingDate=null,e.dateRange=null;for(var t=0;t<a.axes_.length;t++)delete a.axes_[t].draggingValue,delete a.axes_[t].dragValueRange}e.tarp.uncover()}},t=this.getOption("interactionModel"),a=this;for(var n in t)t.hasOwnProperty(n)&&this.addAndTrackEvent(this.mouseEventElement_,n,function(t){return function(n){t(n,a,e)}}(t[n]));t.willDestroyContextMyself||this.addAndTrackEvent(document,"mouseup",(function(t){e.destroy()}))},j.prototype.drawZoomRect_=function(e,t,a,n,r,o,i,s){var l=this.canvas_ctx_;o==h.HORIZONTAL?l.clearRect(Math.min(t,i),this.layout_.getPlotArea().y,Math.abs(t-i),this.layout_.getPlotArea().h):o==h.VERTICAL&&l.clearRect(this.layout_.getPlotArea().x,Math.min(n,s),this.layout_.getPlotArea().w,Math.abs(n-s)),e==h.HORIZONTAL?a&&t&&(l.fillStyle="rgba(128,128,128,0.33)",l.fillRect(Math.min(t,a),this.layout_.getPlotArea().y,Math.abs(a-t),this.layout_.getPlotArea().h)):e==h.VERTICAL&&r&&n&&(l.fillStyle="rgba(128,128,128,0.33)",l.fillRect(this.layout_.getPlotArea().x,Math.min(n,r),this.layout_.getPlotArea().w,Math.abs(r-n)))},j.prototype.clearZoomRect_=function(){this.currentZoomRectArgs_=null,this.canvas_ctx_.clearRect(0,0,this.width_,this.height_)},j.prototype.doZoomX_=function(e,t){this.currentZoomRectArgs_=null;var a=this.toDataXCoord(e),n=this.toDataXCoord(t);this.doZoomXDates_(a,n)},j.prototype.doZoomXDates_=function(e,t){var a=this,n=this.xAxisRange(),r=[e,t],o=this.getFunctionOption("zoomCallback");this.doAnimatedZoom(n,r,null,null,(function(){o&&o.call(a,e,t,a.yAxisRanges())}))},j.prototype.doZoomY_=function(e,t){var a=this;this.currentZoomRectArgs_=null;for(var n=this.yAxisRanges(),r=[],o=0;o<this.axes_.length;o++){var s=this.toDataYCoord(e,o),l=this.toDataYCoord(t,o);r.push([l,s])}var c=this.getFunctionOption("zoomCallback");this.doAnimatedZoom(null,null,n,r,(function(){if(c){var e=a.xAxisRange(),t=i(e,2),n=t[0],r=t[1];c.call(a,n,r,a.yAxisRanges())}}))},j.zoomAnimationFunction=function(e,t){return(1-Math.pow(1.5,-e))/(1-Math.pow(1.5,-t))},j.prototype.resetZoom=function(){var e=this,t=this.isZoomed("x"),a=this.isZoomed("y"),n=t||a;if(this.clearSelection(),n){var r=this.xAxisExtremes(),o=i(r,2),s=o[0],l=o[1],c=this.getBooleanOption("animatedZooms"),u=this.getFunctionOption("zoomCallback");if(!c)return this.dateWindow_=null,this.axes_.forEach((function(e){e.valueRange&&delete e.valueRange})),this.drawGraph_(),void(u&&u.call(this,s,l,this.yAxisRanges()));var d=null,h=null,p=null,f=null;t&&(d=this.xAxisRange(),h=[s,l]),a&&(p=this.yAxisRanges(),f=this.yAxisExtremes()),this.doAnimatedZoom(d,h,p,f,(function(){e.dateWindow_=null,e.axes_.forEach((function(e){e.valueRange&&delete e.valueRange})),u&&u.call(e,s,l,e.yAxisRanges())}))}},j.prototype.doAnimatedZoom=function(e,t,a,n,r){var o,i,s=this,l=this.getBooleanOption("animatedZooms")?j.ANIMATION_STEPS:1,c=[],u=[];if(null!==e&&null!==t)for(o=1;o<=l;o++)i=j.zoomAnimationFunction(o,l),c[o-1]=[e[0]*(1-i)+i*t[0],e[1]*(1-i)+i*t[1]];if(null!==a&&null!==n)for(o=1;o<=l;o++){i=j.zoomAnimationFunction(o,l);for(var d=[],p=0;p<this.axes_.length;p++)d.push([a[p][0]*(1-i)+i*n[p][0],a[p][1]*(1-i)+i*n[p][1]]);u[o-1]=d}h.repeatAndCleanup((function(e){if(u.length)for(var t=0;t<s.axes_.length;t++){var a=u[e][t];s.axes_[t].valueRange=[a[0],a[1]]}c.length&&(s.dateWindow_=c[e]),s.drawGraph_()}),l,j.ANIMATION_DURATION/l,r)},j.prototype.getArea=function(){return this.plotter_.area},j.prototype.eventToDomCoords=function(e){if(e.offsetX&&e.offsetY)return[e.offsetX,e.offsetY];var t=h.findPos(this.mouseEventElement_);return[h.pageX(e)-t.x,h.pageY(e)-t.y]},j.prototype.findClosestRow=function(e){for(var t=1/0,a=-1,n=this.layout_.points,r=0;r<n.length;r++)for(var o=n[r],i=o.length,s=0;s<i;s++){var l=o[s];if(h.isValidPoint(l,!0)){var c=Math.abs(l.canvasx-e);c<t&&(t=c,a=l.idx)}}return a},j.prototype.findClosestPoint=function(e,t){for(var a,n,r,o,i,s,l,c=1/0,u=this.layout_.points.length-1;u>=0;--u)for(var d=this.layout_.points[u],p=0;p<d.length;++p)o=d[p],h.isValidPoint(o)&&(a=(n=o.canvasx-e)*n+(r=o.canvasy-t)*r)<c&&(c=a,i=o,s=u,l=o.idx);return{row:l,seriesName:this.layout_.setNames[s],point:i}},j.prototype.findStackedPoint=function(e,t){for(var a,n,r=this.findClosestRow(e),o=0;o<this.layout_.points.length;++o){var i=r-this.getLeftBoundary_(o),s=this.layout_.points[o];if(!(i>=s.length)){var l=s[i];if(h.isValidPoint(l)){var c=l.canvasy;if(e>l.canvasx&&i+1<s.length){var u=s[i+1];h.isValidPoint(u)&&(d=u.canvasx-l.canvasx)>0&&(c+=(e-l.canvasx)/d*(u.canvasy-l.canvasy))}else if(e<l.canvasx&&i>0){var d,p=s[i-1];h.isValidPoint(p)&&(d=l.canvasx-p.canvasx)>0&&(c+=(l.canvasx-e)/d*(p.canvasy-l.canvasy))}(0===o||c<t)&&(a=l,n=o)}}}return{row:r,seriesName:this.layout_.setNames[n],point:a}},j.prototype.mouseMove_=function(e){var t=this.layout_.points;if(void 0!==t&&null!==t){var a=this.eventToDomCoords(e),n=a[0],r=a[1],o=!1;if(this.getOption("highlightSeriesOpts")&&!this.isSeriesLocked()){var i;i=this.getBooleanOption("stackedGraph")?this.findStackedPoint(n,r):this.findClosestPoint(n,r),o=this.setSelection(i.row,i.seriesName)}else{var s=this.findClosestRow(n);o=this.setSelection(s)}var l=this.getFunctionOption("highlightCallback");l&&o&&l.call(this,e,this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}},j.prototype.getLeftBoundary_=function(e){if(this.boundaryIds_[e])return this.boundaryIds_[e][0];for(var t=0;t<this.boundaryIds_.length;t++)if(void 0!==this.boundaryIds_[t])return this.boundaryIds_[t][0];return 0},j.prototype.animateSelection_=function(e){void 0===this.fadeLevel&&(this.fadeLevel=0),void 0===this.animateId&&(this.animateId=0);var t=this.fadeLevel,a=e<0?t:10-t;if(a<=0)this.fadeLevel&&this.updateSelection_(1);else{var n=++this.animateId,r=this;h.repeatAndCleanup((function(t){r.animateId==n&&(r.fadeLevel+=e,0===r.fadeLevel?r.clearSelection():r.updateSelection_(r.fadeLevel/10))}),a,30,(function(){0!==r.fadeLevel&&e<0&&(r.fadeLevel=0,r.clearSelection())}))}},j.prototype.updateSelection_=function(e){this.cascadeEvents_("select",{selectedRow:-1===this.lastRow_?void 0:this.lastRow_,selectedX:-1===this.lastx_?void 0:this.lastx_,selectedPoints:this.selPoints_});var t,a=this.canvas_ctx_;if(this.getOption("highlightSeriesOpts")){a.clearRect(0,0,this.width_,this.height_);var n=1-this.getNumericOption("highlightSeriesBackgroundAlpha"),r=h.toRGB_(this.getOption("highlightSeriesBackgroundColor"));if(n){if(void 0===e)return void this.animateSelection_(1);n*=e,a.fillStyle="rgba("+r.r+","+r.g+","+r.b+","+n+")",a.fillRect(0,0,this.width_,this.height_)}this.plotter_._renderLineChart(this.highlightSet_,a)}else if(this.previousVerticalX_>=0){var o=0,i=this.attr_("labels");for(t=1;t<i.length;t++){var s=this.getNumericOption("highlightCircleSize",i[t]);s>o&&(o=s)}var l=this.previousVerticalX_;a.clearRect(l-o-1,0,2*o+2,this.height_)}if(this.selPoints_.length>0){var c=this.selPoints_[0].canvasx;for(a.save(),t=0;t<this.selPoints_.length;t++){var u=this.selPoints_[t];if(!isNaN(u.canvasy)){var d=this.getNumericOption("highlightCircleSize",u.name),p=this.getFunctionOption("drawHighlightPointCallback",u.name),f=this.plotter_.colors[u.name];p||(p=h.Circles.DEFAULT),a.lineWidth=this.getNumericOption("strokeWidth",u.name),a.strokeStyle=f,a.fillStyle=f,p.call(this,this,u.name,a,c,u.canvasy,f,d,u.idx)}}a.restore(),this.previousVerticalX_=c}},j.prototype.setSelection=function(e,t,a){this.selPoints_=[];var n=!1;if(!1!==e&&e>=0){e!=this.lastRow_&&(n=!0),this.lastRow_=e;for(var r=0;r<this.layout_.points.length;++r){var o=this.layout_.points[r],i=e-this.getLeftBoundary_(r);if(i>=0&&i<o.length&&o[i].idx==e)null!==(l=o[i]).yval&&this.selPoints_.push(l);else for(var s=0;s<o.length;++s){var l;if((l=o[s]).idx==e){null!==l.yval&&this.selPoints_.push(l);break}}}}else this.lastRow_>=0&&(n=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==t&&(this.highlightSet_!==t&&(n=!0),this.highlightSet_=t),void 0!==a&&(this.lockedSet_=a),n&&this.updateSelection_(void 0),n},j.prototype.mouseOut_=function(e){this.getFunctionOption("unhighlightCallback")&&this.getFunctionOption("unhighlightCallback").call(this,e),this.getBooleanOption("hideOverlayOnMouseOut")&&!this.lockedSet_&&this.clearSelection()},j.prototype.clearSelection=function(){this.cascadeEvents_("deselect",{}),this.lockedSet_=!1,this.fadeLevel?this.animateSelection_(-1):(this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,this.highlightSet_=null)},j.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var e=0;e<this.layout_.points.length;e++)for(var t=this.layout_.points[e],a=0;a<t.length;a++)if(t[a].x==this.selPoints_[0].x)return t[a].idx;return-1},j.prototype.getHighlightSeries=function(){return this.highlightSet_},j.prototype.isSeriesLocked=function(){return this.lockedSet_},j.prototype.loadedEvent_=function(e){this.rawData_=this.parseCSV_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_()},j.prototype.addXTicks_=function(){var e;e=this.dateWindow_?[this.dateWindow_[0],this.dateWindow_[1]]:this.xAxisExtremes();var t=this.optionsViewForAxis_("x"),a=t("ticker")(e[0],e[1],this.plotter_.area.w,t,this);this.layout_.setXTicks(a)},j.prototype.getHandlerClass_=function(){return this.attr_("dataHandler")?this.attr_("dataHandler"):this.fractions_?this.getBooleanOption("errorBars")?y.default:_.default:this.getBooleanOption("customBars")?v.default:this.getBooleanOption("errorBars")?b.default:m.default},j.prototype.predraw_=function(){var e=new Date;this.dataHandler_=new(this.getHandlerClass_()),this.layout_.computePlotArea(),this.computeYAxes_(),this.is_initial_draw_||(this.canvas_ctx_.restore(),this.hidden_ctx_.restore()),this.canvas_ctx_.save(),this.hidden_ctx_.save(),this.plotter_=new l.default(this,this.hidden_,this.hidden_ctx_,this.layout_),this.createRollInterface_(),this.cascadeEvents_("predraw"),this.rolledSeries_=[null];for(var t=1;t<this.numColumns();t++){var a=this.dataHandler_.extractSeries(this.rawData_,t,this.attributes_);this.rollPeriod_>1&&(a=this.dataHandler_.rollingAverage(a,this.rollPeriod_,this.attributes_)),this.rolledSeries_.push(a)}this.drawGraph_();var n=new Date;this.drawingTimeMs_=n-e},j.PointType=void 0,j.stackPoints_=function(e,t,a,n){for(var r=null,o=null,i=null,s=-1,l=0;l<e.length;++l){var c=e[l],u=c.xval;void 0===t[u]&&(t[u]=0);var d=c.yval;isNaN(d)||null===d?"none"==n?d=0:(function(t){if(!(s>=t))for(var a=t;a<e.length;++a)if(i=null,!isNaN(e[a].yval)&&null!==e[a].yval){s=a,i=e[a];break}}(l),d=o&&i&&"none"!=n?o.yval+(i.yval-o.yval)*((u-o.xval)/(i.xval-o.xval)):o&&"all"==n?o.yval:i&&"all"==n?i.yval:0):o=c;var h=t[u];r!=u&&(h+=d,t[u]=h),r=u,c.yval_stacked=h,h>a[1]&&(a[1]=h),h<a[0]&&(a[0]=h)}},j.prototype.gatherDatasets_=function(e,t){var a,n,r,o,i,s,l=[],c=[],u=[],d={};for(a=e.length-1;a>=1;a--)if(this.visibility()[a-1]){if(t){s=e[a];var h=t[0],p=t[1];for(r=null,o=null,n=0;n<s.length;n++)s[n][0]>=h&&null===r&&(r=n),s[n][0]<=p&&(o=n);null===r&&(r=0);for(var f=r,g=!0;g&&f>0;)g=null===s[--f][1];null===o&&(o=s.length-1);var m=o;for(g=!0;g&&m<s.length-1;)g=null===s[++m][1];f!==r&&(r=f),m!==o&&(o=m),l[a-1]=[r,o],s=s.slice(r,o+1)}else s=e[a],l[a-1]=[0,s.length-1];var b=this.attr_("labels")[a],v=this.dataHandler_.getExtremeYValues(s,t,this.getBooleanOption("stepPlot",b)),_=this.dataHandler_.seriesToPoints(s,b,l[a-1][0]);this.getBooleanOption("stackedGraph")&&(void 0===u[i=this.attributes_.axisForSeries(b)]&&(u[i]=[]),j.stackPoints_(_,u[i],v,this.getBooleanOption("stackedGraphNaNFill"))),d[b]=v,c[a]=_}return{points:c,extremes:d,boundaryIds:l}},j.prototype.drawGraph_=function(){var e=new Date,t=this.is_initial_draw_;this.is_initial_draw_=!1,this.layout_.removeAllDatasets(),this.setColors_(),this.attrs_.pointSize=.5*this.getNumericOption("highlightCircleSize");var a=this.gatherDatasets_(this.rolledSeries_,this.dateWindow_),n=a.points,r=a.extremes;this.boundaryIds_=a.boundaryIds,this.setIndexByName_={};for(var o=this.attr_("labels"),i=0,s=1;s<n.length;s++)this.visibility()[s-1]&&(this.layout_.addDataset(o[s],n[s]),this.datasetIndex_[s]=i++);for(s=0;s<o.length;s++)this.setIndexByName_[o[s]]=s;if(this.computeYAxisRanges_(r),this.layout_.setYAxes(this.axes_),this.addXTicks_(),this.layout_.evaluate(),this.renderGraph_(t),this.getStringOption("timingName")){var l=new Date;console.log(this.getStringOption("timingName")+" - drawGraph: "+(l-e)+"ms")}},j.prototype.renderGraph_=function(e){this.cascadeEvents_("clearChart"),this.plotter_.clear();var t=this.getFunctionOption("underlayCallback");t&&t.call(this,this.hidden_ctx_,this.layout_.getPlotArea(),this,this);var a={canvas:this.hidden_,drawingContext:this.hidden_ctx_};this.cascadeEvents_("willDrawChart",a),this.plotter_.render(),this.cascadeEvents_("didDrawChart",a),this.lastRow_=-1,this.canvas_.getContext("2d").clearRect(0,0,this.width_,this.height_);var n=this.getFunctionOption("drawCallback");if(null!==n&&n.call(this,this,e),e)for(this.readyFired_=!0;this.readyFns_.length>0;)this.readyFns_.pop()(this)},j.prototype.computeYAxes_=function(){var e,t,a;for(this.axes_=[],e=0;e<this.attributes_.numAxes();e++)t={g:this},h.update(t,this.attributes_.axisOptions(e)),this.axes_[e]=t;for(e=0;e<this.axes_.length;e++)if(0===e)(a=(t=this.optionsViewForAxis_("y"+(e?"2":"")))("valueRange"))&&(this.axes_[e].valueRange=a);else{var n=this.user_attrs_.axes;n&&n.y2&&(a=n.y2.valueRange)&&(this.axes_[e].valueRange=a)}},j.prototype.numAxes=function(){return this.attributes_.numAxes()},j.prototype.axisPropertiesForSeries=function(e){return this.axes_[this.attributes_.axisForSeries(e)]},j.prototype.computeYAxisRanges_=function(e){for(var t,a,n,r,o,i=function(e){return isNaN(parseFloat(e))},s=this.attributes_.numAxes(),l=0;l<s;l++){var c=this.axes_[l],u=this.attributes_.getForAxis("logscale",l),d=this.attributes_.getForAxis("includeZero",l),p=this.attributes_.getForAxis("independentTicks",l);n=this.attributes_.seriesForAxis(l),t=!0,r=.1;var f=this.getNumericOption("yRangePad");if(null!==f&&(t=!1,r=f/this.plotter_.area.h),0===n.length)c.extremeRange=[0,1];else{for(var g,m,b=1/0,v=-1/0,_=0;_<n.length;_++)e.hasOwnProperty(n[_])&&(null!==(g=e[n[_]][0])&&(b=Math.min(g,b)),null!==(m=e[n[_]][1])&&(v=Math.max(m,v)));d&&!u&&(b>0&&(b=0),v<0&&(v=0)),b==1/0&&(b=0),v==-1/0&&(v=1),0===(a=v-b)&&(0!==v?a=Math.abs(v):(v=1,a=1));var y=v,O=b;t&&(u?(y=v+r*a,O=b):((O=b-r*a)<0&&b>=0&&(O=0),(y=v+r*a)>0&&v<=0&&(y=0))),c.extremeRange=[O,y]}if(c.valueRange){var x=i(c.valueRange[0])?c.extremeRange[0]:c.valueRange[0],w=i(c.valueRange[1])?c.extremeRange[1]:c.valueRange[1];c.computedValueRange=[x,w]}else c.computedValueRange=c.extremeRange;if(!t)if((x=c.computedValueRange[0])===(w=c.computedValueRange[1])&&(x-=.5,w+=.5),u){var E=r/(2*r-1),S=(r-1)/(2*r-1);c.computedValueRange[0]=h.logRangeFraction(x,w,E),c.computedValueRange[1]=h.logRangeFraction(x,w,S)}else a=w-x,c.computedValueRange[0]=x-a*r,c.computedValueRange[1]=w+a*r;if(p){c.independentTicks=p;var C=(A=this.optionsViewForAxis_("y"+(l?"2":"")))("ticker");c.ticks=C(c.computedValueRange[0],c.computedValueRange[1],this.plotter_.area.h,A,this),o||(o=c)}}if(void 0===o)throw'Configuration Error: At least one axis has to have the "independentTicks" option activated.';for(l=0;l<s;l++)if(!(c=this.axes_[l]).independentTicks){C=(A=this.optionsViewForAxis_("y"+(l?"2":"")))("ticker");for(var A,k=o.ticks,j=o.computedValueRange[1]-o.computedValueRange[0],T=c.computedValueRange[1]-c.computedValueRange[0],D=[],P=0;P<k.length;P++){var M=(k[P].v-o.computedValueRange[0])/j,L=c.computedValueRange[0]+M*T;D.push(L)}c.ticks=C(c.computedValueRange[0],c.computedValueRange[1],this.plotter_.area.h,A,this,D)}},j.prototype.detectTypeFromString_=function(e){var t=!1,a=e.indexOf("-");a>0&&"e"!=e[a-1]&&"E"!=e[a-1]||e.indexOf("/")>=0||isNaN(parseFloat(e))?t=!0:8==e.length&&e>"19700101"&&e<"20371231"&&(t=!0),this.setXAxisOptions_(t)},j.prototype.setXAxisOptions_=function(e){e?(this.attrs_.xValueParser=h.dateParser,this.attrs_.axes.x.valueFormatter=h.dateValueFormatter,this.attrs_.axes.x.ticker=d.dateTicker,this.attrs_.axes.x.axisLabelFormatter=h.dateAxisLabelFormatter):(this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=d.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},j.prototype.parseCSV_=function(e){var t,a,n=[],r=h.detectLineDelimiter(e),o=e.split(r||"\n"),i=this.getStringOption("delimiter");-1==o[0].indexOf(i)&&o[0].indexOf("\t")>=0&&(i="\t");var s=0;"labels"in this.user_attrs_||(s=1,this.attrs_.labels=o[0].split(i),this.attributes_.reparseSeries());for(var l,c=!1,u=this.attr_("labels").length,d=!1,p=s;p<o.length;p++){var f=o[p];if(0!==f.length&&"#"!=f[0]){var g=f.split(i);if(!(g.length<2)){var m=[];if(c||(this.detectTypeFromString_(g[0]),l=this.getFunctionOption("xValueParser"),c=!0),m[0]=l(g[0],this),this.fractions_)for(a=1;a<g.length;a++)2!=(t=g[a].split("/")).length?(console.error('Expected fractional "num/den" values in CSV data but found a value \''+g[a]+"' on line "+(1+p)+" ('"+f+"') which is not of this form."),m[a]=[0,0]):m[a]=[h.parseFloat_(t[0],p,f),h.parseFloat_(t[1],p,f)];else if(this.getBooleanOption("errorBars"))for(g.length%2!=1&&console.error("Expected alternating (value, stdev.) pairs in CSV data but line "+(1+p)+" has an odd number of values ("+(g.length-1)+"): '"+f+"'"),a=1;a<g.length;a+=2)m[(a+1)/2]=[h.parseFloat_(g[a],p,f),h.parseFloat_(g[a+1],p,f)];else if(this.getBooleanOption("customBars"))for(a=1;a<g.length;a++){var b=g[a];/^ *$/.test(b)?m[a]=[null,null,null]:3==(t=b.split(";")).length?m[a]=[h.parseFloat_(t[0],p,f),h.parseFloat_(t[1],p,f),h.parseFloat_(t[2],p,f)]:console.warn('When using customBars, values must be either blank or "low;center;high" tuples (got "'+b+'" on line '+(1+p))}else for(a=1;a<g.length;a++)m[a]=h.parseFloat_(g[a],p,f);if(n.length>0&&m[0]<n[n.length-1][0]&&(d=!0),m.length!=u&&console.error("Number of columns in line "+p+" ("+m.length+") does not agree with number of labels ("+u+") "+f),0===p&&this.attr_("labels")){var v=!0;for(a=0;v&&a<m.length;a++)m[a]&&(v=!1);if(v){console.warn("The dygraphs 'labels' option is set, but the first row of CSV data ('"+f+"') appears to also contain labels. Will drop the CSV labels and use the option labels.");continue}}n.push(m)}}}return d&&(console.warn("CSV is out of order; order it correctly to speed loading."),n.sort((function(e,t){return e[0]-t[0]}))),n},j.prototype.parseArray_=function(e){if(0===e.length)return console.error("Can't plot empty data set"),null;if(0===e[0].length)return console.error("Data set cannot contain an empty row"),null;var t;if(function(e){var t=e[0],a=t[0];if("number"!=typeof a&&!h.isDateLike(a))throw new Error("Expected number or date but got "+typeof a+": "+a+".");for(var n=1;n<t.length;n++){var r=t[n];if(null!==r&&void 0!==r&&"number"!=typeof r&&!h.isArrayLike(r))throw new Error("Expected number or array but got "+typeof r+": "+r+".")}}(e),null===this.attr_("labels")){for(console.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter"),this.attrs_.labels=["X"],t=1;t<e[0].length;t++)this.attrs_.labels.push("Y"+t);this.attributes_.reparseSeries()}else{var a=this.attr_("labels");if(a.length!=e[0].length)return console.error("Mismatch between number of labels ("+a+") and number of columns in array ("+e[0].length+")"),null}if(h.isDateLike(e[0][0])){this.attrs_.axes.x.valueFormatter=h.dateValueFormatter,this.attrs_.axes.x.ticker=d.dateTicker,this.attrs_.axes.x.axisLabelFormatter=h.dateAxisLabelFormatter;var n=h.clone(e);for(t=0;t<e.length;t++){if(0===n[t].length)return console.error("Row "+(1+t)+" of data is empty"),null;if(null===n[t][0]||"function"!=typeof n[t][0].getTime||isNaN(n[t][0].getTime()))return console.error("x value in row "+(1+t)+" is not a Date"),null;n[t][0]=n[t][0].getTime()}return n}return this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=d.numericTicks,this.attrs_.axes.x.axisLabelFormatter=h.numberAxisLabelFormatter,e},j.prototype.parseDataTable_=function(e){var t=e.getNumberOfColumns(),a=e.getNumberOfRows(),n=e.getColumnType(0);if("date"==n||"datetime"==n)this.attrs_.xValueParser=h.dateParser,this.attrs_.axes.x.valueFormatter=h.dateValueFormatter,this.attrs_.axes.x.ticker=d.dateTicker,this.attrs_.axes.x.axisLabelFormatter=h.dateAxisLabelFormatter;else{if("number"!=n)throw new Error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+n+"')");this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=d.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var r,o,i=[],s={},l=!1;for(r=1;r<t;r++){var c=e.getColumnType(r);if("number"==c)i.push(r);else{if("string"!=c||!this.getBooleanOption("displayAnnotations"))throw new Error("Only 'number' is supported as a dependent type with Gviz. 'string' is only supported if displayAnnotations is true");var u=i[i.length-1];s.hasOwnProperty(u)?s[u].push(r):s[u]=[r],l=!0}}var p=[e.getColumnLabel(0)];for(r=0;r<i.length;r++)p.push(e.getColumnLabel(i[r])),this.getBooleanOption("errorBars")&&(r+=1);this.attrs_.labels=p,t=p.length;var f=[],g=!1,m=[];for(r=0;r<a;r++){var b=[];if(void 0!==e.getValue(r,0)&&null!==e.getValue(r,0)){if("date"==n||"datetime"==n?b.push(e.getValue(r,0).getTime()):b.push(e.getValue(r,0)),this.getBooleanOption("errorBars"))for(o=0;o<t-1;o++)b.push([e.getValue(r,1+2*o),e.getValue(r,2+2*o)]);else{for(o=0;o<i.length;o++){var v=i[o];if(b.push(e.getValue(r,v)),l&&s.hasOwnProperty(v)&&null!==e.getValue(r,s[v][0])){var _={};_.series=e.getColumnLabel(v),_.xval=b[0],_.shortText=function(e){var t=String.fromCharCode(65+e%26);for(e=Math.floor(e/26);e>0;)t=String.fromCharCode(65+(e-1)%26)+t.toLowerCase(),e=Math.floor((e-1)/26);return t}(m.length),_.text="";for(var y=0;y<s[v].length;y++)y&&(_.text+="\n"),_.text+=e.getValue(r,s[v][y]);m.push(_)}}for(o=0;o<b.length;o++)isFinite(b[o])||(b[o]=null)}f.length>0&&b[0]<f[f.length-1][0]&&(g=!0),f.push(b)}else console.warn("Ignoring row "+r+" of DataTable because of undefined or null first column.")}g&&(console.warn("DataTable is out of order; order it correctly to speed loading."),f.sort((function(e,t){return e[0]-t[0]}))),this.rawData_=f,m.length>0&&this.setAnnotations(m,!0),this.attributes_.reparseSeries()},j.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_("dataDidUpdate",{})},j.prototype.start_=function(){var e=this.file_;if("function"==typeof e&&(e=e()),h.isArrayLike(e))this.rawData_=this.parseArray_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("object"==typeof e&&"function"==typeof e.getColumnRange)this.parseDataTable_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("string"==typeof e)if(h.detectLineDelimiter(e))this.loadedEvent_(e);else{var t;t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var a=this;t.onreadystatechange=function(){4==t.readyState&&(200!==t.status&&0!==t.status||a.loadedEvent_(t.responseText))},t.open("GET",e,!0),t.send(null)}else console.error("Unknown data format: "+typeof e)},j.prototype.updateOptions=function(e,t){void 0===t&&(t=!1);var a=e.file,n=j.copyUserAttrs_(e);"rollPeriod"in n&&(this.rollPeriod_=n.rollPeriod),"dateWindow"in n&&(this.dateWindow_=n.dateWindow);var r=h.isPixelChangingOptionList(this.attr_("labels"),n);h.updateDeep(this.user_attrs_,n),this.attributes_.reparseSeries(),a?(this.cascadeEvents_("dataWillUpdate",{}),this.file_=a,t||this.start_()):t||(r?this.predraw_():this.renderGraph_(!1))},j.copyUserAttrs_=function(e){var t={};for(var a in e)e.hasOwnProperty(a)&&"file"!=a&&e.hasOwnProperty(a)&&(t[a]=e[a]);return t},j.prototype.resize=function(e,t){if(!this.resize_lock){this.resize_lock=!0,null===e!=(null===t)&&(console.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero."),e=t=null);var a=this.width_,n=this.height_;e?(this.maindiv_.style.width=e+"px",this.maindiv_.style.height=t+"px",this.width_=e,this.height_=t):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),a==this.width_&&n==this.height_||(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},j.prototype.adjustRoll=function(e){this.rollPeriod_=e,this.predraw_()},j.prototype.visibility=function(){for(this.getOption("visibility")||(this.attrs_.visibility=[]);this.getOption("visibility").length<this.numColumns()-1;)this.attrs_.visibility.push(!0);return this.getOption("visibility")},j.prototype.setVisibility=function(e,t){var a=this.visibility(),n=!1;if(Array.isArray(e)||(null!==e&&"object"==typeof e?n=!0:e=[e]),n)for(var r in e)e.hasOwnProperty(r)&&(r<0||r>=a.length?console.warn("Invalid series number in setVisibility: "+r):a[r]=e[r]);else for(r=0;r<e.length;r++)"boolean"==typeof e[r]?r>=a.length?console.warn("Invalid series number in setVisibility: "+r):a[r]=e[r]:e[r]<0||e[r]>=a.length?console.warn("Invalid series number in setVisibility: "+e[r]):a[e[r]]=t;this.predraw_()},j.prototype.size=function(){return{width:this.width_,height:this.height_}},j.prototype.setAnnotations=function(e,t){this.annotations_=e,this.layout_?(this.layout_.setAnnotations(this.annotations_),t||this.predraw_()):console.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html")},j.prototype.annotations=function(){return this.annotations_},j.prototype.getLabels=function(){var e=this.attr_("labels");return e?e.slice():null},j.prototype.indexFromSetName=function(e){return this.setIndexByName_[e]},j.prototype.getRowForX=function(e){for(var t=0,a=this.numRows()-1;t<=a;){var n=a+t>>1,r=this.getValue(n,0);if(r<e)t=n+1;else if(r>e)a=n-1;else{if(t==n)return n;a=n}}return null},j.prototype.ready=function(e){this.is_initial_draw_?this.readyFns_.push(e):e.call(this,this)},j.prototype.addAndTrackEvent=function(e,t,a){h.addEvent(e,t,a),this.registeredEvents_.push({elem:e,type:t,fn:a})},j.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var e=0;e<this.registeredEvents_.length;e++){var t=this.registeredEvents_[e];h.removeEvent(t.elem,t.type,t.fn)}this.registeredEvents_=[]},j.PLUGINS=[C.default,w.default,A.default,E.default,x.default,S.default],j.GVizChart=k.default,j.DASHED_LINE=h.DASHED_LINE,j.DOT_DASH_LINE=h.DOT_DASH_LINE,j.dateAxisLabelFormatter=h.dateAxisLabelFormatter,j.toRGB_=h.toRGB_,j.findPos=h.findPos,j.pageX=h.pageX,j.pageY=h.pageY,j.dateString_=h.dateString_,j.defaultInteractionModel=u.default.defaultModel,j.nonInteractiveModel=j.nonInteractiveModel_=u.default.nonInteractiveModel_,j.Circles=h.Circles,j.Plugins={Legend:C.default,Axes:w.default,Annotations:x.default,ChartLabels:E.default,Grid:S.default,RangeSelector:A.default},j.DataHandlers={DefaultHandler:m.default,BarsHandler:O.default,CustomBarsHandler:v.default,DefaultFractionHandler:_.default,ErrorBarsHandler:b.default,FractionsBarsHandler:y.default},j.startPan=u.default.startPan,j.startZoom=u.default.startZoom,j.movePan=u.default.movePan,j.moveZoom=u.default.moveZoom,j.endPan=u.default.endPan,j.endZoom=u.default.endZoom,j.numericLinearTicks=d.numericLinearTicks,j.numericTicks=d.numericTicks,j.dateTicker=d.dateTicker,j.Granularity=d.Granularity,j.getDateAxis=d.getDateAxis,j.floatFormat=h.floatFormat,a.default=j,t.exports=a.default}).call(this,e("_process"))},{"./datahandler/bars":5,"./datahandler/bars-custom":2,"./datahandler/bars-error":3,"./datahandler/bars-fractions":4,"./datahandler/default":8,"./datahandler/default-fractions":7,"./dygraph-canvas":9,"./dygraph-default-attrs":10,"./dygraph-gviz":11,"./dygraph-interaction-model":12,"./dygraph-layout":13,"./dygraph-options":15,"./dygraph-options-reference":14,"./dygraph-tickers":16,"./dygraph-utils":17,"./iframe-tarp":19,"./plugins/annotations":20,"./plugins/axes":21,"./plugins/chart-labels":22,"./plugins/grid":23,"./plugins/legend":24,"./plugins/range-selector":25,_process:1}],19:[function(e,t,a){"use strict";function n(){this.tarps=[]}Object.defineProperty(a,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils"));n.prototype.cover=function(){for(var e=document.getElementsByTagName("iframe"),t=0;t<e.length;t++){var a=e[t],n=r.findPos(a),o=n.x,i=n.y,s=a.offsetWidth,l=a.offsetHeight,c=document.createElement("div");c.style.position="absolute",c.style.left=o+"px",c.style.top=i+"px",c.style.width=s+"px",c.style.height=l+"px",c.style.zIndex=999,document.body.appendChild(c),this.tarps.push(c)}},n.prototype.uncover=function(){for(var e=0;e<this.tarps.length;e++)this.tarps[e].parentNode.removeChild(this.tarps[e]);this.tarps=[]},a.default=n,t.exports=a.default},{"./dygraph-utils":17}],20:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){this.annotations_=[]};n.prototype.toString=function(){return"Annotations Plugin"},n.prototype.activate=function(e){return{clearChart:this.clearChart,didDrawChart:this.didDrawChart}},n.prototype.detachLabels=function(){for(var e=0;e<this.annotations_.length;e++){var t=this.annotations_[e];t.parentNode&&t.parentNode.removeChild(t),this.annotations_[e]=null}this.annotations_=[]},n.prototype.clearChart=function(e){this.detachLabels()},n.prototype.didDrawChart=function(e){var t=e.dygraph,a=t.layout_.annotated_points;if(a&&0!==a.length)for(var n=e.canvas.parentNode,r=function(e,a,n){return function(r){var o=n.annotation;o.hasOwnProperty(e)?o[e](o,n,t,r):t.getOption(a)&&t.getOption(a)(o,n,t,r)}},o=e.dygraph.getArea(),i={},s=0;s<a.length;s++){var l=a[s];if(!(l.canvasx<o.x||l.canvasx>o.x+o.w||l.canvasy<o.y||l.canvasy>o.y+o.h)){var c=l.annotation,u=6;c.hasOwnProperty("tickHeight")&&(u=c.tickHeight);var d=document.createElement("div");d.style.fontSize=t.getOption("axisLabelFontSize")+"px";var h="dygraph-annotation";c.hasOwnProperty("icon")||(h+=" dygraphDefaultAnnotation dygraph-default-annotation"),c.hasOwnProperty("cssClass")&&(h+=" "+c.cssClass),d.className=h;var p=c.hasOwnProperty("width")?c.width:16,f=c.hasOwnProperty("height")?c.height:16;if(c.hasOwnProperty("icon")){var g=document.createElement("img");g.src=c.icon,g.width=p,g.height=f,d.appendChild(g)}else l.annotation.hasOwnProperty("shortText")&&d.appendChild(document.createTextNode(l.annotation.shortText));var m=l.canvasx-p/2;d.style.left=m+"px";var b=0;if(c.attachAtBottom){var v=o.y+o.h-f-u;i[m]?v-=i[m]:i[m]=0,i[m]+=u+f,b=v}else b=l.canvasy-f-u;d.style.top=b+"px",d.style.width=p+"px",d.style.height=f+"px",d.title=l.annotation.text,d.style.color=t.colorsMap_[l.name],d.style.borderColor=t.colorsMap_[l.name],c.div=d,t.addAndTrackEvent(d,"click",r("clickHandler","annotationClickHandler",l)),t.addAndTrackEvent(d,"mouseover",r("mouseOverHandler","annotationMouseOverHandler",l)),t.addAndTrackEvent(d,"mouseout",r("mouseOutHandler","annotationMouseOutHandler",l)),t.addAndTrackEvent(d,"dblclick",r("dblClickHandler","annotationDblClickHandler",l)),n.appendChild(d),this.annotations_.push(d);var _=e.drawingContext;_.save(),_.strokeStyle=c.hasOwnProperty("tickColor")?c.tickColor:t.colorsMap_[l.name],_.lineWidth=c.hasOwnProperty("tickWidth")?c.tickWidth:t.getOption("strokeWidth"),_.beginPath(),c.attachAtBottom?(v=b+f,_.moveTo(l.canvasx,v),_.lineTo(l.canvasx,v+u)):(_.moveTo(l.canvasx,l.canvasy),_.lineTo(l.canvasx,l.canvasy-2-u)),_.closePath(),_.stroke(),_.restore()}}},n.prototype.destroy=function(){this.detachLabels()},a.default=n,t.exports=a.default},{}],21:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("../dygraph-utils")),r=function(){this.xlabels_=[],this.ylabels_=[]};r.prototype.toString=function(){return"Axes Plugin"},r.prototype.activate=function(e){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}},r.prototype.layout=function(e){var t,a=e.dygraph;if(a.getOptionForAxis("drawAxis","y")){var n=a.getOptionForAxis("axisLabelWidth","y")+2*a.getOptionForAxis("axisTickSize","y");e.reserveSpaceLeft(n)}a.getOptionForAxis("drawAxis","x")&&(t=a.getOption("xAxisHeight")?a.getOption("xAxisHeight"):a.getOptionForAxis("axisLabelFontSize","x")+2*a.getOptionForAxis("axisTickSize","x"),e.reserveSpaceBottom(t)),2==a.numAxes()?a.getOptionForAxis("drawAxis","y2")&&(n=a.getOptionForAxis("axisLabelWidth","y2")+2*a.getOptionForAxis("axisTickSize","y2"),e.reserveSpaceRight(n)):a.numAxes()>2&&a.error("Only two y-axes are supported at this time. (Trying to use "+a.numAxes()+")")},r.prototype.detachLabels=function(){function e(e){for(var t=0;t<e.length;t++){var a=e[t];a.parentNode&&a.parentNode.removeChild(a)}}e(this.xlabels_),e(this.ylabels_),this.xlabels_=[],this.ylabels_=[]},r.prototype.clearChart=function(e){this.detachLabels()},r.prototype.willDrawChart=function(e){function t(e){return Math.round(e)+.5}function a(e){return Math.round(e)-.5}var r=this,o=e.dygraph;if(o.getOptionForAxis("drawAxis","x")||o.getOptionForAxis("drawAxis","y")||o.getOptionForAxis("drawAxis","y2")){var i,s,l,c=e.drawingContext,u=e.canvas.parentNode,d=o.width_,h=o.height_,p=function(e){return{position:"absolute",fontSize:o.getOptionForAxis("axisLabelFontSize",e)+"px",width:o.getOptionForAxis("axisLabelWidth",e)+"px"}},f={x:p("x"),y:p("y"),y2:p("y2")},g=function(e,t,a){var r=document.createElement("div"),o=f["y2"==a?"y2":t];n.update(r.style,o);var i=document.createElement("div");return i.className="dygraph-axis-label dygraph-axis-label-"+t+(a?" dygraph-axis-label-"+a:""),i.innerHTML=e,r.appendChild(i),r};c.save();var m=o.layout_,b=e.dygraph.plotter_.area,v=function(e){return function(t){return o.getOptionForAxis(t,e)}};if(o.getOptionForAxis("drawAxis","y")){if(m.yticks&&m.yticks.length>0){var _=o.numAxes(),y=[v("y"),v("y2")];m.yticks.forEach((function(e){if(void 0!==e.label){s=b.x;var t="y1",a=y[0];1==e.axis&&(s=b.x+b.w,t="y2",a=y[1]);var n=a("axisLabelFontSize");l=b.y+e.pos*b.h,i=g(e.label,"y",2==_?t:null);var o=l-n/2;o<0&&(o=0),o+n+3>h?i.style.bottom="0":i.style.top=o+"px",0===e.axis?(i.style.left=b.x-a("axisLabelWidth")-a("axisTickSize")+"px",i.style.textAlign="right"):1==e.axis&&(i.style.left=b.x+b.w+a("axisTickSize")+"px",i.style.textAlign="left"),i.style.width=a("axisLabelWidth")+"px",u.appendChild(i),r.ylabels_.push(i)}}));var O=this.ylabels_[0],x=o.getOptionForAxis("axisLabelFontSize","y");parseInt(O.style.top,10)+x>h-x&&(O.style.top=parseInt(O.style.top,10)-x/2+"px")}var w;o.getOption("drawAxesAtZero")?(((C=o.toPercentXCoord(0))>1||C<0||isNaN(C))&&(C=0),w=t(b.x+C*b.w)):w=t(b.x),c.strokeStyle=o.getOptionForAxis("axisLineColor","y"),c.lineWidth=o.getOptionForAxis("axisLineWidth","y"),c.beginPath(),c.moveTo(w,a(b.y)),c.lineTo(w,a(b.y+b.h)),c.closePath(),c.stroke(),2==o.numAxes()&&(c.strokeStyle=o.getOptionForAxis("axisLineColor","y2"),c.lineWidth=o.getOptionForAxis("axisLineWidth","y2"),c.beginPath(),c.moveTo(a(b.x+b.w),a(b.y)),c.lineTo(a(b.x+b.w),a(b.y+b.h)),c.closePath(),c.stroke())}if(o.getOptionForAxis("drawAxis","x")){if(m.xticks){var E=v("x");m.xticks.forEach((function(e){if(void 0!==e.label){s=b.x+e.pos*b.w,l=b.y+b.h,(i=g(e.label,"x")).style.textAlign="center",i.style.top=l+E("axisTickSize")+"px";var t=s-E("axisLabelWidth")/2;t+E("axisLabelWidth")>d&&(t=d-E("axisLabelWidth"),i.style.textAlign="right"),t<0&&(t=0,i.style.textAlign="left"),i.style.left=t+"px",i.style.width=E("axisLabelWidth")+"px",u.appendChild(i),r.xlabels_.push(i)}}))}var S,C;c.strokeStyle=o.getOptionForAxis("axisLineColor","x"),c.lineWidth=o.getOptionForAxis("axisLineWidth","x"),c.beginPath(),o.getOption("drawAxesAtZero")?(((C=o.toPercentYCoord(0,0))>1||C<0)&&(C=1),S=a(b.y+C*b.h)):S=a(b.y+b.h),c.moveTo(t(b.x),S),c.lineTo(t(b.x+b.w),S),c.closePath(),c.stroke()}c.restore()}},a.default=r,t.exports=a.default},{"../dygraph-utils":17}],22:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};n.prototype.toString=function(){return"ChartLabels Plugin"},n.prototype.activate=function(e){return{layout:this.layout,didDrawChart:this.didDrawChart}};var r=function(e){var t=document.createElement("div");return t.style.position="absolute",t.style.left=e.x+"px",t.style.top=e.y+"px",t.style.width=e.w+"px",t.style.height=e.h+"px",t};n.prototype.detachLabels_=function(){for(var e=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],t=0;t<e.length;t++){var a=e[t];a&&a.parentNode&&a.parentNode.removeChild(a)}this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};var o=function(e,t,a,n,r){var o=document.createElement("div");o.style.position="absolute",o.style.left=1==a?"0px":t.x+"px",o.style.top=t.y+"px",o.style.width=t.w+"px",o.style.height=t.h+"px",o.style.fontSize=e.getOption("yLabelWidth")-2+"px";var i=document.createElement("div");i.style.position="absolute",i.style.width=t.h+"px",i.style.height=t.w+"px",i.style.top=t.h/2-t.w/2+"px",i.style.left=t.w/2-t.h/2+"px",i.className="dygraph-label-rotate-"+(1==a?"right":"left");var s=document.createElement("div");return s.className=n,s.innerHTML=r,i.appendChild(s),o.appendChild(i),o};n.prototype.layout=function(e){this.detachLabels_();var t=e.dygraph,a=e.chart_div;if(t.getOption("title")){var n=e.reserveSpaceTop(t.getOption("titleHeight"));this.title_div_=r(n),this.title_div_.style.fontSize=t.getOption("titleHeight")-8+"px",(i=document.createElement("div")).className="dygraph-label dygraph-title",i.innerHTML=t.getOption("title"),this.title_div_.appendChild(i),a.appendChild(this.title_div_)}if(t.getOption("xlabel")){var i,s=e.reserveSpaceBottom(t.getOption("xLabelHeight"));this.xlabel_div_=r(s),this.xlabel_div_.style.fontSize=t.getOption("xLabelHeight")-2+"px",(i=document.createElement("div")).className="dygraph-label dygraph-xlabel",i.innerHTML=t.getOption("xlabel"),this.xlabel_div_.appendChild(i),a.appendChild(this.xlabel_div_)}if(t.getOption("ylabel")){var l=e.reserveSpaceLeft(0);this.ylabel_div_=o(t,l,1,"dygraph-label dygraph-ylabel",t.getOption("ylabel")),a.appendChild(this.ylabel_div_)}if(t.getOption("y2label")&&2==t.numAxes()){var c=e.reserveSpaceRight(0);this.y2label_div_=o(t,c,2,"dygraph-label dygraph-y2label",t.getOption("y2label")),a.appendChild(this.y2label_div_)}},n.prototype.didDrawChart=function(e){var t=e.dygraph;this.title_div_&&(this.title_div_.children[0].innerHTML=t.getOption("title")),this.xlabel_div_&&(this.xlabel_div_.children[0].innerHTML=t.getOption("xlabel")),this.ylabel_div_&&(this.ylabel_div_.children[0].children[0].innerHTML=t.getOption("ylabel")),this.y2label_div_&&(this.y2label_div_.children[0].children[0].innerHTML=t.getOption("y2label"))},n.prototype.clearChart=function(){},n.prototype.destroy=function(){this.detachLabels_()},a.default=n,t.exports=a.default},{}],23:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){};n.prototype.toString=function(){return"Gridline Plugin"},n.prototype.activate=function(e){return{willDrawChart:this.willDrawChart}},n.prototype.willDrawChart=function(e){function t(e){return Math.round(e)+.5}function a(e){return Math.round(e)-.5}var n,r,o,i=e.dygraph,s=e.drawingContext,l=i.layout_,c=e.dygraph.plotter_.area;if(i.getOptionForAxis("drawGrid","y")){for(var u=["y","y2"],d=[],h=[],p=[],f=[],g=[],m=0;m<u.length;m++)p[m]=i.getOptionForAxis("drawGrid",u[m]),p[m]&&(d[m]=i.getOptionForAxis("gridLineColor",u[m]),h[m]=i.getOptionForAxis("gridLineWidth",u[m]),g[m]=i.getOptionForAxis("gridLinePattern",u[m]),f[m]=g[m]&&g[m].length>=2);o=l.yticks,s.save(),o.forEach((function(e){if(e.has_tick){var o=e.axis;p[o]&&(s.save(),f[o]&&s.setLineDash&&s.setLineDash(g[o]),s.strokeStyle=d[o],s.lineWidth=h[o],n=t(c.x),r=a(c.y+e.pos*c.h),s.beginPath(),s.moveTo(n,r),s.lineTo(n+c.w,r),s.stroke(),s.restore())}})),s.restore()}i.getOptionForAxis("drawGrid","x")&&(o=l.xticks,s.save(),g=i.getOptionForAxis("gridLinePattern","x"),(f=g&&g.length>=2)&&s.setLineDash&&s.setLineDash(g),s.strokeStyle=i.getOptionForAxis("gridLineColor","x"),s.lineWidth=i.getOptionForAxis("gridLineWidth","x"),o.forEach((function(e){e.has_tick&&(n=t(c.x+e.pos*c.w),r=a(c.y+c.h),s.beginPath(),s.moveTo(n,r),s.lineTo(n,c.y),s.closePath(),s.stroke())})),f&&s.setLineDash&&s.setLineDash([]),s.restore())},n.prototype.destroy=function(){},a.default=n,t.exports=a.default},{}],24:[function(e,t,a){"use strict";function n(e,t,a){if(!e||e.length<=1)return'<div class="dygraph-legend-line" style="border-bottom-color: '+t+';"></div>';var n,r,o,i,s=0,l=0,c=[];for(n=0;n<=e.length;n++)s+=e[n%e.length];if((i=Math.floor(a/(s-e[0])))>1){for(n=0;n<e.length;n++)c[n]=e[n]/a;l=c.length}else{for(i=1,n=0;n<e.length;n++)c[n]=e[n]/s;l=c.length+1}var u="";for(r=0;r<i;r++)for(n=0;n<l;n+=2)o=c[n%c.length],u+='<div class="dygraph-legend-dash" style="margin-right: '+(n<e.length?c[(n+1)%c.length]:0)+"em; padding-left: "+o+'em;"></div>';return u}Object.defineProperty(a,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("../dygraph-utils")),o=function(){this.legend_div_=null,this.is_generated_div_=!1};o.prototype.toString=function(){return"Legend Plugin"},o.prototype.activate=function(e){var t,a=e.getOption("labelsDiv");return a&&null!==a?t="string"==typeof a||a instanceof String?document.getElementById(a):a:((t=document.createElement("div")).className="dygraph-legend",e.graphDiv.appendChild(t),this.is_generated_div_=!0),this.legend_div_=t,this.one_em_width_=10,{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};var i=function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")};o.prototype.select=function(e){var t=e.selectedX,a=e.selectedPoints,n=e.selectedRow,r=e.dygraph.getOption("legend");if("never"!==r){if("follow"===r){var i=e.dygraph.plotter_.area,s=this.legend_div_.offsetWidth,l=e.dygraph.getOptionForAxis("axisLabelWidth","y"),c=a[0].x*i.w+50,u=a[0].y*i.h-50;c+s+1>i.w&&(c=c-100-s-(l-i.x)),e.dygraph.graphDiv.appendChild(this.legend_div_),this.legend_div_.style.left=l+c+"px",this.legend_div_.style.top=u+"px"}var d=o.generateLegendHTML(e.dygraph,t,a,this.one_em_width_,n);this.legend_div_.innerHTML=d,this.legend_div_.style.display=""}else this.legend_div_.style.display="none"},o.prototype.deselect=function(e){"always"!==e.dygraph.getOption("legend")&&(this.legend_div_.style.display="none");var t=function(e){var t=document.createElement("span");t.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;"),e.appendChild(t);var a=t.offsetWidth;return e.removeChild(t),a}(this.legend_div_);this.one_em_width_=t;var a=o.generateLegendHTML(e.dygraph,void 0,void 0,t,null);this.legend_div_.innerHTML=a},o.prototype.didDrawChart=function(e){this.deselect(e)},o.prototype.predraw=function(e){if(this.is_generated_div_){e.dygraph.graphDiv.appendChild(this.legend_div_);var t=e.dygraph.getArea(),a=this.legend_div_.offsetWidth;this.legend_div_.style.left=t.x+t.w-a-1+"px",this.legend_div_.style.top=t.y+"px"}},o.prototype.destroy=function(){this.legend_div_=null},o.generateLegendHTML=function(e,t,a,s,l){var c={dygraph:e,x:t,series:[]},u={},d=e.getLabels();if(d)for(var h=1;h<d.length;h++){var p=e.getPropertiesForSeries(d[h]),f={dashHTML:n(e.getOption("strokePattern",d[h]),p.color,s),label:d[h],labelHTML:i(d[h]),isVisible:p.visible,color:p.color};c.series.push(f),u[d[h]]=f}if(void 0!==t){var g=e.optionsViewForAxis_("x"),m=g("valueFormatter");c.xHTML=m.call(e,t,g,d[0],e,l,0);var b=[],v=e.numAxes();for(h=0;h<v;h++)b[h]=e.optionsViewForAxis_("y"+(h?1+h:""));var _=e.getOption("labelsShowZeroValues"),y=e.getHighlightSeries();for(h=0;h<a.length;h++){var O=a[h];if((f=u[O.name]).y=O.yval,0===O.yval&&!_||isNaN(O.canvasy))f.isVisible=!1;else{var x=b[(p=e.getPropertiesForSeries(O.name)).axis-1],w=x("valueFormatter").call(e,O.yval,x,O.name,e,l,d.indexOf(O.name));r.update(f,{yHTML:w}),O.name==y&&(f.isHighlighted=!0)}}}return(e.getOption("legendFormatter")||o.defaultFormatter).call(e,c)},o.defaultFormatter=function(e){var t=e.dygraph;if(!0!==t.getOption("showLabelsOnHighlight"))return"";var a,n=t.getOption("labelsSeparateLines");if(void 0===e.x){if("always"!=t.getOption("legend"))return"";a="";for(var r=0;r<e.series.length;r++)(o=e.series[r]).isVisible&&(""!==a&&(a+=n?"<br/>":" "),a+="<span style='font-weight: bold; color: "+o.color+";'>"+o.dashHTML+" "+o.labelHTML+"</span>");return a}for(a=e.xHTML+":",r=0;r<e.series.length;r++){var o;(o=e.series[r]).isVisible&&(n&&(a+="<br>"),a+="<span"+(o.isHighlighted?' class="highlight"':"")+"> <b><span style='color: "+o.color+";'>"+o.labelHTML+"</span></b>: "+o.yHTML+"</span>")}return a},a.default=o,t.exports=a.default},{"../dygraph-utils":17}],25:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("../dygraph-utils")),o=n(e("../dygraph-interaction-model")),i=n(e("../iframe-tarp")),s=function(){this.hasTouchInterface_="undefined"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};s.prototype.toString=function(){return"RangeSelector Plugin"},s.prototype.activate=function(e){return this.dygraph_=e,this.getOption_("showRangeSelector")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},s.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},s.prototype.getOption_=function(e,t){return this.dygraph_.getOption(e,t)},s.prototype.setDefaultOption_=function(e,t){this.dygraph_.attrs_[e]=t},s.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_("animatedZooms")&&(console.warn("Animated zooms and range selector are not compatible; disabling animatedZooms."),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},s.prototype.addToGraph_=function(){var e=this.graphDiv_=this.dygraph_.graphDiv;e.appendChild(this.bgcanvas_),e.appendChild(this.fgcanvas_),e.appendChild(this.leftZoomHandle_),e.appendChild(this.rightZoomHandle_)},s.prototype.removeFromGraph_=function(){var e=this.graphDiv_;e.removeChild(this.bgcanvas_),e.removeChild(this.fgcanvas_),e.removeChild(this.leftZoomHandle_),e.removeChild(this.rightZoomHandle_),this.graphDiv_=null},s.prototype.reserveSpace_=function(e){this.getOption_("showRangeSelector")&&e.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)},s.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},s.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},s.prototype.updateVisibility_=function(){var e=this.getOption_("showRangeSelector");if(e)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var t=this.dygraph_;setTimeout((function(){t.width_=0,t.resize()}),1)}return e},s.prototype.resize_=function(){function e(e,t,a,n){var o=n||r.getContextPixelRatio(t);e.style.top=a.y+"px",e.style.left=a.x+"px",e.width=a.w*o,e.height=a.h*o,e.style.width=a.w+"px",e.style.height=a.h+"px",1!=o&&t.scale(o,o)}var t=this.dygraph_.layout_.getPlotArea(),a=0;this.dygraph_.getOptionForAxis("drawAxis","x")&&(a=this.getOption_("xAxisHeight")||this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize")),this.canvasRect_={x:t.x,y:t.y+t.h+a+4,w:t.w,h:this.getOption_("rangeSelectorHeight")};var n=this.dygraph_.getNumericOption("pixelRatio");e(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,n),e(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,n)},s.prototype.createCanvases_=function(){this.bgcanvas_=r.createCanvas(),this.bgcanvas_.className="dygraph-rangesel-bgcanvas",this.bgcanvas_.style.position="absolute",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.getContext(this.bgcanvas_),this.fgcanvas_=r.createCanvas(),this.fgcanvas_.className="dygraph-rangesel-fgcanvas",this.fgcanvas_.style.position="absolute",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor="default",this.fgcanvas_ctx_=r.getContext(this.fgcanvas_)},s.prototype.createZoomHandles_=function(){var e=new Image;e.className="dygraph-rangesel-zoomhandle",e.style.position="absolute",e.style.zIndex=10,e.style.visibility="hidden",e.style.cursor="col-resize",e.width=9,e.height=16,e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=",this.isMobileDevice_&&(e.width*=2,e.height*=2),this.leftZoomHandle_=e,this.rightZoomHandle_=e.cloneNode(!1)},s.prototype.initInteraction_=function(){var e,t,a,n,s,l,c,u,d,h,p,f,g,m,b=this,v=document,_=0,y=null,O=!1,x=!1,w=!this.isMobileDevice_,E=new i.default;e=function(e){var t=b.dygraph_.xAxisExtremes(),a=(t[1]-t[0])/b.canvasRect_.w;return[t[0]+(e.leftHandlePos-b.canvasRect_.x)*a,t[0]+(e.rightHandlePos-b.canvasRect_.x)*a]},t=function(e){return r.cancelEvent(e),O=!0,_=e.clientX,y=e.target?e.target:e.srcElement,"mousedown"!==e.type&&"dragstart"!==e.type||(r.addEvent(v,"mousemove",a),r.addEvent(v,"mouseup",n)),b.fgcanvas_.style.cursor="col-resize",E.cover(),!0},a=function(e){if(!O)return!1;r.cancelEvent(e);var t=e.clientX-_;if(Math.abs(t)<4)return!0;_=e.clientX;var a,n=b.getZoomHandleStatus_();y==b.leftZoomHandle_?(a=n.leftHandlePos+t,a=Math.min(a,n.rightHandlePos-y.width-3),a=Math.max(a,b.canvasRect_.x)):(a=n.rightHandlePos+t,a=Math.min(a,b.canvasRect_.x+b.canvasRect_.w),a=Math.max(a,n.leftHandlePos+y.width+3));var o=y.width/2;return y.style.left=a-o+"px",b.drawInteractiveLayer_(),w&&s(),!0},n=function(e){return!!O&&(O=!1,E.uncover(),r.removeEvent(v,"mousemove",a),r.removeEvent(v,"mouseup",n),b.fgcanvas_.style.cursor="default",w||s(),!0)},s=function(){try{var t=b.getZoomHandleStatus_();if(b.isChangingRange_=!0,t.isZoomed){var a=e(t);b.dygraph_.doZoomXDates_(a[0],a[1])}else b.dygraph_.resetZoom()}finally{b.isChangingRange_=!1}},l=function(e){var t=b.leftZoomHandle_.getBoundingClientRect(),a=t.left+t.width/2,n=(t=b.rightZoomHandle_.getBoundingClientRect()).left+t.width/2;return e.clientX>a&&e.clientX<n},c=function(e){return!(x||!l(e)||!b.getZoomHandleStatus_().isZoomed)&&(r.cancelEvent(e),x=!0,_=e.clientX,"mousedown"===e.type&&(r.addEvent(v,"mousemove",u),r.addEvent(v,"mouseup",d)),!0)},u=function(e){if(!x)return!1;r.cancelEvent(e);var t=e.clientX-_;if(Math.abs(t)<4)return!0;_=e.clientX;var a=b.getZoomHandleStatus_(),n=a.leftHandlePos,o=a.rightHandlePos,i=o-n;n+t<=b.canvasRect_.x?o=(n=b.canvasRect_.x)+i:o+t>=b.canvasRect_.x+b.canvasRect_.w?n=(o=b.canvasRect_.x+b.canvasRect_.w)-i:(n+=t,o+=t);var s=b.leftZoomHandle_.width/2;return b.leftZoomHandle_.style.left=n-s+"px",b.rightZoomHandle_.style.left=o-s+"px",b.drawInteractiveLayer_(),w&&h(),!0},d=function(e){return!!x&&(x=!1,r.removeEvent(v,"mousemove",u),r.removeEvent(v,"mouseup",d),w||h(),!0)},h=function(){try{b.isChangingRange_=!0,b.dygraph_.dateWindow_=e(b.getZoomHandleStatus_()),b.dygraph_.drawGraph_(!1)}finally{b.isChangingRange_=!1}},p=function(e){if(!O&&!x){var t=l(e)?"move":"default";t!=b.fgcanvas_.style.cursor&&(b.fgcanvas_.style.cursor=t)}},f=function(e){"touchstart"==e.type&&1==e.targetTouches.length?t(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?a(e.targetTouches[0])&&r.cancelEvent(e):n(e)},g=function(e){"touchstart"==e.type&&1==e.targetTouches.length?c(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?u(e.targetTouches[0])&&r.cancelEvent(e):d(e)},m=function(e,t){for(var a=["touchstart","touchend","touchmove","touchcancel"],n=0;n<a.length;n++)b.dygraph_.addAndTrackEvent(e,a[n],t)},this.setDefaultOption_("interactionModel",o.default.dragIsPanInteractionModel),this.setDefaultOption_("panEdgeFraction",1e-4);var S=window.opera?"mousedown":"dragstart";this.dygraph_.addAndTrackEvent(this.leftZoomHandle_,S,t),this.dygraph_.addAndTrackEvent(this.rightZoomHandle_,S,t),this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousedown",c),this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousemove",p),this.hasTouchInterface_&&(m(this.leftZoomHandle_,f),m(this.rightZoomHandle_,f),m(this.fgcanvas_,g))},s.prototype.drawStaticLayer_=function(){var e=this.bgcanvas_ctx_;e.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);try{this.drawMiniPlot_()}catch(e){console.warn(e)}this.bgcanvas_ctx_.lineWidth=this.getOption_("rangeSelectorBackgroundLineWidth"),e.strokeStyle=this.getOption_("rangeSelectorBackgroundStrokeColor"),e.beginPath(),e.moveTo(.5,.5),e.lineTo(.5,this.canvasRect_.h-.5),e.lineTo(this.canvasRect_.w-.5,this.canvasRect_.h-.5),e.lineTo(this.canvasRect_.w-.5,.5),e.stroke()},s.prototype.drawMiniPlot_=function(){var e=this.getOption_("rangeSelectorPlotFillColor"),t=this.getOption_("rangeSelectorPlotFillGradientColor"),a=this.getOption_("rangeSelectorPlotStrokeColor");if(e||a){var n=this.getOption_("stepPlot"),r=this.computeCombinedSeriesAndLimits_(),o=r.yMax-r.yMin,i=this.bgcanvas_ctx_,s=this.dygraph_.xAxisExtremes(),l=Math.max(s[1]-s[0],1e-30),c=(this.canvasRect_.w-.5)/l,u=(this.canvasRect_.h-.5)/o,d=this.canvasRect_.w-.5,h=this.canvasRect_.h-.5,p=null,f=null;i.beginPath(),i.moveTo(.5,h);for(var g=0;g<r.data.length;g++){var m=r.data[g],b=null!==m[0]?(m[0]-s[0])*c:NaN,v=null!==m[1]?h-(m[1]-r.yMin)*u:NaN;(n||null===p||Math.round(b)!=Math.round(p))&&(isFinite(b)&&isFinite(v)?(null===p?i.lineTo(b,h):n&&i.lineTo(b,f),i.lineTo(b,v),p=b,f=v):(null!==p&&(n?(i.lineTo(b,f),i.lineTo(b,h)):i.lineTo(p,h)),p=f=null))}if(i.lineTo(d,h),i.closePath(),e){var _=this.bgcanvas_ctx_.createLinearGradient(0,0,0,h);t&&_.addColorStop(0,t),_.addColorStop(1,e),this.bgcanvas_ctx_.fillStyle=_,i.fill()}a&&(this.bgcanvas_ctx_.strokeStyle=a,this.bgcanvas_ctx_.lineWidth=this.getOption_("rangeSelectorPlotLineWidth"),i.stroke())}},s.prototype.computeCombinedSeriesAndLimits_=function(){var e,t=this.dygraph_,a=this.getOption_("logscale"),n=t.numColumns(),o=t.getLabels(),i=new Array(n),s=!1,l=t.visibility(),c=[];for(e=1;e<n;e++){var u=this.getOption_("showInRangeSelector",o[e]);c.push(u),null!==u&&(s=!0)}if(s)for(e=1;e<n;e++)i[e]=c[e-1];else for(e=1;e<n;e++)i[e]=l[e-1];var d=[],h=t.dataHandler_,p=t.attributes_;for(e=1;e<t.numColumns();e++)if(i[e]){var f=h.extractSeries(t.rawData_,e,p);t.rollPeriod()>1&&(f=h.rollingAverage(f,t.rollPeriod(),p)),d.push(f)}var g=[];for(e=0;e<d[0].length;e++){for(var m=0,b=0,v=0;v<d.length;v++){var _=d[v][e][1];null===_||isNaN(_)||(b++,m+=_)}g.push([d[0][e][0],m/b])}var y=Number.MAX_VALUE,O=-Number.MAX_VALUE;for(e=0;e<g.length;e++){var x=g[e][1];null!==x&&isFinite(x)&&(!a||x>0)&&(y=Math.min(y,x),O=Math.max(O,x))}if(a)for(O=r.log10(O),O+=.25*O,y=r.log10(y),e=0;e<g.length;e++)g[e][1]=r.log10(g[e][1]);else{var w,E=O-y;O+=w=E<=Number.MIN_VALUE?.25*O:.25*E,y-=w}return{data:g,yMin:y,yMax:O}},s.prototype.placeZoomHandles_=function(){var e=this.dygraph_.xAxisExtremes(),t=this.dygraph_.xAxisRange(),a=e[1]-e[0],n=Math.max(0,(t[0]-e[0])/a),r=Math.max(0,(e[1]-t[1])/a),o=this.canvasRect_.x+this.canvasRect_.w*n,i=this.canvasRect_.x+this.canvasRect_.w*(1-r),s=Math.max(this.canvasRect_.y,this.canvasRect_.y+(this.canvasRect_.h-this.leftZoomHandle_.height)/2),l=this.leftZoomHandle_.width/2;this.leftZoomHandle_.style.left=o-l+"px",this.leftZoomHandle_.style.top=s+"px",this.rightZoomHandle_.style.left=i-l+"px",this.rightZoomHandle_.style.top=this.leftZoomHandle_.style.top,this.leftZoomHandle_.style.visibility="visible",this.rightZoomHandle_.style.visibility="visible"},s.prototype.drawInteractiveLayer_=function(){var e=this.fgcanvas_ctx_;e.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);var t=this.canvasRect_.w-1,a=this.canvasRect_.h-1,n=this.getZoomHandleStatus_();if(e.strokeStyle=this.getOption_("rangeSelectorForegroundStrokeColor"),e.lineWidth=this.getOption_("rangeSelectorForegroundLineWidth"),n.isZoomed){var r=Math.max(1,n.leftHandlePos-this.canvasRect_.x),o=Math.min(t,n.rightHandlePos-this.canvasRect_.x);e.fillStyle="rgba(240, 240, 240, "+this.getOption_("rangeSelectorAlpha").toString()+")",e.fillRect(0,0,r,this.canvasRect_.h),e.fillRect(o,0,this.canvasRect_.w-o,this.canvasRect_.h),e.beginPath(),e.moveTo(1,1),e.lineTo(r,1),e.lineTo(r,a),e.lineTo(o,a),e.lineTo(o,1),e.lineTo(t,1),e.stroke()}else e.beginPath(),e.moveTo(1,1),e.lineTo(1,a),e.lineTo(t,a),e.lineTo(t,1),e.stroke()},s.prototype.getZoomHandleStatus_=function(){var e=this.leftZoomHandle_.width/2,t=parseFloat(this.leftZoomHandle_.style.left)+e,a=parseFloat(this.rightZoomHandle_.style.left)+e;return{leftHandlePos:t,rightHandlePos:a,isZoomed:t-1>this.canvasRect_.x||a+1<this.canvasRect_.x+this.canvasRect_.w}},a.default=s,t.exports=a.default},{"../dygraph-interaction-model":12,"../dygraph-utils":17,"../iframe-tarp":19}]},{},[18])(18)},55:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"c",(function(){return o})),a.d(t,"d",(function(){return i})),a.d(t,"b",(function(){return s}));var n=a(46),r=80,o=function(e,t){var a=" ",n="";return e&&"string"===typeof t.context&&(n=t.context),"string"===typeof t.plugin&&""!==t.plugin?((a=t.plugin).endsWith(".plugin")&&(a=a.substring(0,a.length-7)),"string"===typeof t.module&&""!==t.module&&(a+=":".concat(t.module)),e&&""!==n&&(a+=", ".concat(n))):e&&""!==n&&(a=n),a},i=function(e,t){var a=t.update_every,r=e.view_update_every;return a===r?"resolution ".concat(Object(n.a)(a)):"resolution ".concat(Object(n.a)(r),", collected every ").concat(Object(n.a)(a))},s=function(e){var t,a=e.allDimensions,n=e.selectedDimensions,r=e.clickedDimensionName,o=e.isModifierKeyPressed,i=0===n.length?a:n,s=i.includes(r);return(t=o||!(s&&i.length>1)&&s?s?i.filter((function(e){return e!==r})):i.concat(r):[r]).length===a.length?[]:t}},56:function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"e",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return h})),a.d(t,"d",(function(){return p}));var n=a(5),r=a(286),o=a(288),i=a(502),s=/[&;]/,l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:decodeURIComponent(window.location.hash.substr(1));if(0===e.length)return{};var t=e.split(s),a=t.reduce((function(e,t){var a=t.split("="),r=Object(n.a)(a,2),o=r[0],i=r[1];return e[o]=i,e}),{});return a},c=function(e){var t=Object.entries(e);return 0===t.length?"":t.map((function(e){var t=Object(n.a)(e,2),a=t[0],r=t[1];return"".concat(a,"=").concat(encodeURIComponent(r))})).join(";")},u=(Object(o.a)(l,c),function(e){var t=l(),a=Object(i.a)(e,t);window.history.replaceState(window.history.state,"","#".concat(c(a)))}),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1));return l(t)[e]},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1));return void 0!==l(t)[e]},p=function(e){window.history.replaceState(window.history.state,"","#".concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1)),a=Object(r.a)(e,l(t));return c(a)}(e)))}},73:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return i}));var n=a(5),r=a(0),o=function(e,t){var a="string"===typeof e?document.getElementById(e):e;a.contentWindow&&a.contentWindow.postMessage(t,"*")},i=function(e,t,a){var o=Object(r.useState)(a),i=Object(n.a)(o,2),s=i[0],l=i[1],c=Object(r.useCallback)((function(a){var n=a.data;n.type===e&&(l(n.payload),t&&t(n.payload))}),[t,e]),u=Object(r.useCallback)((function(){l(a)}),[a]);return Object(r.useEffect)((function(){return window.addEventListener("message",c),function(){window.removeEventListener("message",c)}}),[c,e]),[s,u]}},74:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){return o}));var n="true",r=!1,o=!1},75:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n="dashboard"},78:function(e,t,a){"use strict";var n=a(5),r=a(0),o=a(27),i=a(17),s=a(501),l=a(44),c=a(9),u=a(28),d=Object(i.a)(c.y,(function(e){return e.registryServer===u.b})),h=Object(i.a)((function(e){return e.dashboard}),(function(e){return e.offline}));t.a=function(e){var t=e.children,a=e.utmParameters,i=Object(s.a)("has-sign-in-history"),u=Object(n.a)(i,1)[0],p=Object(o.e)((function(e){return Object(c.C)(a)(e)})),f=Object(o.e)(d),g=Object(o.e)(h),m=Object(o.d)(),b=Object(r.useMemo)((function(){var e=window.location.href,t=encodeURIComponent(e);return"".concat(p,"&redirect_uri=").concat(t)}),[p]),v=Object(r.useCallback)((function(){return m(Object(l.d)({signInLinkHref:b}))}),[b]);return Object(r.useMemo)((function(){return"function"===typeof t?t({isRegistry:f,link:b,onSignIn:v,offline:g,hasSignedInBefore:u}):t}),[t,f,b,v,g,u])}},8:function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return o}));a(0);var n=a(27),r=n.e,o=n.d},83:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=window.location.hash.split(";").includes("help=true"),r=function(){if(n)return!1;var e=document.location.hostname;return e.endsWith(".my-netdata.io")||e.endsWith(".mynetdata.io")||e.endsWith(".netdata.rocks")||e.endsWith(".netdata.ai")||e.endsWith(".netdata.live")||e.endsWith(".firehol.org")||e.endsWith(".netdata.online")||e.endsWith(".netdata.cloud")}()},9:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"h",(function(){return h})),a.d(t,"g",(function(){return p})),a.d(t,"o",(function(){return f})),a.d(t,"p",(function(){return g})),a.d(t,"m",(function(){return m})),a.d(t,"i",(function(){return b})),a.d(t,"l",(function(){return v})),a.d(t,"s",(function(){return _})),a.d(t,"n",(function(){return y})),a.d(t,"E",(function(){return O})),a.d(t,"y",(function(){return x})),a.d(t,"f",(function(){return w})),a.d(t,"Q",(function(){return E})),a.d(t,"C",(function(){return S})),a.d(t,"v",(function(){return C})),a.d(t,"u",(function(){return A})),a.d(t,"q",(function(){return k})),a.d(t,"k",(function(){return j})),a.d(t,"w",(function(){return T})),a.d(t,"r",(function(){return D})),a.d(t,"c",(function(){return P})),a.d(t,"d",(function(){return M})),a.d(t,"F",(function(){return L})),a.d(t,"G",(function(){return I})),a.d(t,"b",(function(){return R})),a.d(t,"j",(function(){return F})),a.d(t,"H",(function(){return B})),a.d(t,"A",(function(){return H})),a.d(t,"t",(function(){return z})),a.d(t,"J",(function(){return U})),a.d(t,"I",(function(){return G})),a.d(t,"L",(function(){return W})),a.d(t,"B",(function(){return V})),a.d(t,"x",(function(){return Y})),a.d(t,"D",(function(){return X})),a.d(t,"O",(function(){return K})),a.d(t,"K",(function(){return Z})),a.d(t,"z",(function(){return q})),a.d(t,"M",(function(){return $})),a.d(t,"N",(function(){return J})),a.d(t,"e",(function(){return ee})),a.d(t,"P",(function(){return te}));var n=a(49),r=a(212),o=a(17),i=a(28),s=a(36),l=a(155),c=a(26),u=function(e){return function(t){var a=Object(l.a)(e),n=t[c.e].commonColorsKeys[a];return n&&n.assigned}},d=function(e){return e.global},h=Object(o.a)(d,(function(e,t){return t}),(function(e,t){return e.commonMin[t]})),p=Object(o.a)(d,(function(e,t){return t}),(function(e,t){return e.commonMax[t]})),f=Object(o.a)(d,Object(n.a)("hoveredX")),g=Object(o.a)(d,Object(n.a)("currentSelectionMasterId")),m=Object(o.a)(d,Object(n.a)("globalPanAndZoom")),b=Object(o.a)(d,Object(n.a)("defaultAfter")),v=Object(o.a)(d,Object(n.a)("globalChartUnderlay")),_=Object(o.a)(d,Object(n.a)("hasWindowFocus")),y=Object(o.a)(d,Object(n.a)("globalPause")),O=Object(o.a)(d,Object(n.a)("snapshot")),x=Object(o.a)(d,Object(n.a)("registry")),w=Object(o.a)(x,Object(n.a)("cloudBaseURL")),E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,a){return t+"&utm_".concat(a,"=").concat(e[a])}),"")},S=function(e){return Object(o.a)(x,w,(function(t,a){var n=encodeURIComponent(t.hostname),r=encodeURIComponent(Object(s.a)(window.location.origin+window.location.pathname));return"".concat(a,"/sign-in?id=").concat(t.machineGuid,"&name=").concat(n,"&origin=").concat(r).concat(i.g).concat(E(e))}))},C=(Object(o.a)(x,Object(n.a)("isFetchingHello")),Object(o.a)(x,(function(e){var t=e.registryServer;return t&&"https://registry.my-netdata.io"!==t}))),A=Object(o.a)(x,(function(e){return e.isCloudEnabled&&!e.isHelloCallError})),k=Object(o.a)(x,Object(n.a)("hasFetchedInfo")),j=Object(o.a)(x,Object(n.a)("fullInfoPayload")),T=Object(o.a)(j,(function(e){return e["agent-claimed"]&&!e["aclk-ng-new-cloud-protocol"]})),D=Object(o.a)(d,Object(r.a)(["alarms","hasStartedAlarms"])),P=Object(o.a)(d,(function(e){return e.alarms.activeAlarms})),M=Object(o.a)(d,(function(e){return e.alarm})),L=Object(o.a)(d,Object(n.a)("spacePanelIsActive")),I=Object(o.a)(d,Object(n.a)("spacePanelTransitionEndIsActive")),N=Object(o.a)(d,(function(e){return e.options})),R=function(e){return Object(o.a)(N,(function(t){return t[e]}))},F=R("destroy_on_hide"),B=R("stop_updates_when_focus_is_lost"),H=R("eliminate_zero_dimensions"),z=R("async_on_scroll"),U=(R("parallel_refresher"),R("concurrent_refreshes"),R("sync_selection")),G=R("sync_pan_and_zoom"),W=R("theme"),V=R("show_help"),Y=R("pan_and_zoom_data_padding"),X=R("smooth_plot"),K=R("units"),Z=R("temperature"),q=R("seconds_as_time"),$=R("timezone"),J=R("utcOffset"),Q=(R("user_set_server_timezone"),Object(o.a)(d,(function(e){return e.chartsMetadata.data}))),ee=Object(o.a)(Q,(function(e,t){return t.chartId}),(function(e,t){return null===e||void 0===e?void 0:e.charts[t]})),te=Object(o.a)(d,(function(e){return e.userNodeAccess}))},90:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(7),r=a(22),o=function(e){var t=Object(r.createAction)(e.toUpperCase());return Object.assign(t,{request:t,success:Object(r.createAction)("".concat(e.toUpperCase(),"_SUCCESS"),(function(e){return e}),(function(e){return e})),failure:Object(r.createAction)("".concat(e.toUpperCase(),"_FAILURE"),(function(e){return e}),(function(e){return Object(n.a)({},e,{error:!0})}))})}},98:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"c",(function(){return u})),a.d(t,"e",(function(){return d})),a.d(t,"d",(function(){return h})),a.d(t,"b",(function(){return p}));var n,r=a(14),o=a(218),i=a(495),s=a(104),l="sync_pan_and_zoom",c=(n={},Object(r.a)(n,"stop_updates_when_focus_is_lost",!0),Object(r.a)(n,"eliminate_zero_dimensions",!0),Object(r.a)(n,"destroy_on_hide",!1),Object(r.a)(n,"async_on_scroll",!1),Object(r.a)(n,"parallel_refresher",!0),Object(r.a)(n,"concurrent_refreshes",!0),Object(r.a)(n,"sync_selection",!0),Object(r.a)(n,l,!0),Object(r.a)(n,"legend_right",!1),Object(r.a)(n,"theme","slate"),Object(r.a)(n,"show_help",Boolean(window.netdataShowHelp)&&!window.netdataNoBootstrap),Object(r.a)(n,"pan_and_zoom_data_padding",!0),Object(r.a)(n,"smooth_plot",!0),Object(r.a)(n,"units","auto"),Object(r.a)(n,"temperature","celsius"),Object(r.a)(n,"seconds_as_time",!0),Object(r.a)(n,"timezone","default"),Object(r.a)(n,"user_set_server_timezone","default"),Object(r.a)(n,"utcOffset",0),n),u=function(){var e=Object.keys(localStorage).filter((function(e){return e.startsWith("options.")||"netdataTheme"===e})).map((function(e){return Object(r.a)({},function(e){return e.replace(/^options\./,"").replace("netdataTheme","theme")}(e),function(e){var t,a=localStorage.getItem(e);if(null===a||"undefined"===a)return localStorage.removeItem(e),null;try{t=JSON.parse(a)}catch(n){return"netdataTheme"===e&&a?a:(console.log('localStorage: failed to read "'.concat(e,'", using default')),localStorage.removeItem(e),null)}return t}(e))})).filter((function(e){return null!==Object.values(e)[0]})),t=Object(o.a)(e);return Object(i.a)(c,t)},d=u(),h=d.legend_right,p=function(){Object.keys(localStorage).forEach((function(e){(e.startsWith(s.a)||e.startsWith("options."))&&localStorage.removeItem(e)}))}}},[[300,1,2]]]); +//# sourceMappingURL=main.2d23101e.chunk.js.map
\ No newline at end of file diff --git a/web/gui/dashboard/static/js/main.485cc284.chunk.js.LICENSE b/web/gui/dashboard/static/js/main.2d23101e.chunk.js.LICENSE index bf657eca5..bf657eca5 100644 --- a/web/gui/dashboard/static/js/main.485cc284.chunk.js.LICENSE +++ b/web/gui/dashboard/static/js/main.2d23101e.chunk.js.LICENSE diff --git a/web/gui/dashboard/static/js/main.2d23101e.chunk.js.map b/web/gui/dashboard/static/js/main.2d23101e.chunk.js.map new file mode 100644 index 000000000..26e937005 --- /dev/null +++ b/web/gui/dashboard/static/js/main.2d23101e.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["utils/units-conversion.ts","domains/chart/components/resize-handler.tsx","components/button/button.tsx","domains/chart/components/toolbox-button.tsx","domains/global/actions.ts","hooks/use-user-node-access.ts","components/anchor/index.tsx","utils/index.ts","utils/name-2-id.ts","domains/global/reducer.ts","components/icon.tsx","domains/chart/reducer.ts","domains/chart/utils/transformDataAttributes.ts","domains/chart/actions.ts","components/header/constants.js","main.js","components/header/ACLK/use-cloud-connection-status.tsx","components/header/ACLK/cloud-connection-status-modal.tsx","components/header/ACLK/cloud-connection-status.tsx","domains/global/constants.ts","vendor/d3pie-0.2.1-netdata-3.js","utils/utils.ts","components/header/ACLK/index.ts","utils/server-detection.ts","domains/chart/selectors.ts","utils/date-time.js","domains/dashboard/actions.ts","domains/chart/constants.ts","domains/chart/utils/seconds4human.ts","domains/dashboard/reducer.ts","store/root-reducer.ts","utils/api.ts","utils/netdata-sdk/axios-instance.ts","utils/netdata-sdk/metrics-stream.ts","utils/fill-missing-data.ts","components/ui-notification/styled.ts","components/ui-notification/ui-notification.tsx","components/notifications/styled.tsx","components/notifications/notifications.tsx","domains/dashboard/utils/parse-url.ts","domains/chart/sagas.ts","components/space-panel/settings.ts","domains/global/alarms-sagas.ts","domains/global/utils.ts","domains/global/sagas.ts","domains/dashboard/sagas.ts","store/root-saga.ts","store/store.ts","domains/chart/utils/jquery-loader.ts","utils/css-loader.ts","domains/chart/utils/chartLibrariesSettings.ts","domains/chart/utils/get-chart-url-options.ts","utils/biggest-interval-number.ts","domains/chart/components/loader.tsx","domains/chart/utils/get-pan-and-zoom-step.ts","utils/safe-equal-check.ts","domains/chart/utils/formatters.ts","utils/color-hex-2-rgb.ts","domains/chart/components/chart-legend-bottom.styled.ts","domains/chart/components/legendText.js","domains/chart/components/chart-legend-right.tsx","domains/chart/components/chart-legend-bottom.tsx","domains/chart/components/chart-legend.tsx","domains/chart/components/legend-toolbox.tsx","domains/chart/components/lib-charts/dygraph/utils.ts","domains/chart/hooks/use-proceeded-chart.ts","domains/chart/hooks/useDygraphBadge.js","domains/chart/components/lib-charts/proceeded-chart-disclaimer.tsx","domains/chart/components/lib-charts/alarmBadge.js","domains/chart/components/lib-charts/neutralPill.js","domains/chart/components/lib-charts/dygraph-chart.tsx","utils/debounce.ts","domains/chart/components/lib-charts/easy-pie-chart.tsx","domains/chart/components/lib-charts/gauge-chart.tsx","domains/chart/utils/color-luminance.ts","domains/chart/components/lib-charts/sparkline-chart.tsx","domains/chart/utils/d3-loader.ts","domains/chart/utils/google-visualization-loader.ts","domains/chart/components/lib-charts/d3pie-chart.tsx","domains/chart/components/lib-charts/peity-chart.tsx","domains/chart/components/lib-charts/google-chart.tsx","domains/chart/components/lib-charts/text-only.tsx","domains/chart/components/lib-charts/group-box-chart/utilities.ts","domains/chart/components/lib-charts/group-box-chart/events.ts","domains/chart/components/lib-charts/group-box-chart/drawBoxes.ts","domains/chart/components/lib-charts/group-box-chart/getAlign.ts","domains/chart/components/lib-charts/group-box-chart/groupBox.tsx","domains/chart/components/lib-charts/group-box-chart/groupBoxes.tsx","domains/chart/components/lib-charts/group-box-chart/legend.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/getLabel.ts","domains/chart/components/lib-charts/group-box-chart/kubernetes/separator.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/header.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/tabs.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/section.tsx","domains/chart/utils/get-portal-node-styles.ts","hooks/use-common-intersection.ts","domains/chart/components/invisible-searchable-text.tsx","domains/chart/components/disable-out-of-view.tsx","domains/chart/components/chart-container/chart-container.tsx","domains/dashboard/utils/netdata-dashboard.ts","domains/chart/components/lib-charts/group-box-chart/kubernetes/chartOverview.tsx","domains/dashboard/components/migration-modal/use-migration-modal.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/chart.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/item.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/dateSection.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/metrics.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/context.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/list.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/popover.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/index.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/transform.ts","domains/chart/components/abstract-chart.tsx","hooks/use-show-value-outside.ts","domains/chart/components/chart.tsx","domains/chart/components/chart-dropdown/styled.ts","domains/chart/components/chart-dropdown/chart-dropdown.tsx","domains/chart/components/chart-spinner/styled.ts","domains/chart/components/chart-spinner/chart-spinner.tsx","domains/chart/components/chart-with-loader/styled.ts","styles/z-index.js","domains/chart/components/chart-with-loader/chart-with-loader.tsx","domains/chart/hooks/use-fetch-new-data-clock.ts","domains/chart/utils/get-chart-pixels-per-point.ts","domains/dashboard/selectors.ts","domains/chart/components/snapshot-loader.tsx","domains/chart/components/portals.tsx","hooks/use-http.ts","domains/dashboard/components/modal-portal.tsx","domains/dashboard/components/print-modal/print-modal.tsx","domains/dashboard/components/sidebar-social-media/styled.ts","domains/dashboard/components/sidebar-social-media/sidebar-social-media.tsx","domains/dashboard/components/sidebar-social-media-portal/sidebar-social-media-portal.tsx","components/notifications-container/notifications-container.tsx","components/header/item.js","components/header/node/index.js","components/tooltips/customTooltip.js","components/tooltips/getContent.js","components/tooltips/index.js","components/header/options/index.js","components/header/protoBuf/dropdown.js","components/header/protoBuf/index.js","components/app-header/components/versionControl/index.js","components/header/version.js","hooks/useToggle/index.js","hooks/useLocalStorage/index.js","components/mdx-components/dropdown/styled.js","components/date-picker/styled.js","components/mdx-components/dropdown/dropdown.js","components/date-picker/timePeriod.js","components/date-picker/utils.js","components/date-picker/timePeriods.js","components/date-picker/customTimePeriod.js","components/datePicker/datePickerLib.js","components/datePicker/styled.js","components/date-picker/datePickerInput.js","components/date-picker/useLocaleDate.js","components/date-picker/useConvertedDate.js","components/date-picker/datePickerWrapper.js","components/date-picker/periodIndication.js","components/date-picker/accessorElement/utils.js","components/date-picker/accessorElement/container.js","components/date-picker/accessorElement/dateBox.js","components/date-picker/accessorElement/durationBox.js","components/date-picker/accessorElement/index.js","components/date-picker/datePickerDrop.js","components/date-picker/reduxDatePickerContainer.js","components/header/globalControls/container.js","components/header/globalControls/playPausePill/styledPill.js","components/header/globalControls/playPausePill/index.js","components/menus/item.js","components/menus/list.js","components/header/globalControls/playOptions/playOptionsTooltip.js","components/menus/styled.js","components/header/globalControls/playOptions/index.js","components/header/globalControls/index.js","components/header/pill/styled.js","components/header/pill/index.js","components/header/alarms.js","components/header/news/index.js","components/header/timezone/dropdown.js","components/header/timezone/search/searchInput.js","components/header/timezone/search/index.js","components/header/timezone/container.js","components/header/timezone/wrapper.js","components/header/timezone/offsetItem.js","components/header/timezone/timezones.js","components/header/timezone/utils.js","components/header/timezone/index.js","components/auth/signIn/iframe.js","components/auth/signIn/useCheckSignInStatus.js","components/header/signIn/index.js","components/header/index.js","components/sidebar/spaces/expandButton.js","components/auth/signOut/index.js","components/sidebar/spaces/userSettings.js","components/sidebar/spaces/spacesSkeleton.js","components/sidebar/spaces/spacesIframe.js","components/sidebar/spaces/index.js","domains/dashboard/utils/sorting.ts","components/sidebar/space/nodes.js","components/sidebar/space/replicatedNodes/anchor.js","components/sidebar/space/replicatedNodes/node.js","components/sidebar/space/replicatedNodes/index.js","components/sidebar/space/spacePanelIframe.js","components/sidebar/space/prompts/signIn/promptContent.js","components/sidebar/space/prompts/signIn/index.js","components/sidebar/space/prompts/offline/noNetwork.js","components/sidebar/space/prompts/offline/index.js","components/sidebar/space/index.js","components/sidebar/index.js","components/layout/index.js","utils/map-theme.ts","domains/dashboard/components/migration-modal/migration-modal.js","domains/dashboard/components/migration-manager/migration-manager.tsx","App.tsx","hooks/use-registry.ts","hooks/use-alarms.ts","hooks/use-info.ts","domains/dashboard/hooks/use-charts-metadata.ts","domains/dashboard/hooks/useAlarmFromUrl.js","index.tsx","../public/lib/dygraph-c91c859.min.js","domains/chart/utils/legend-utils.ts","utils/hash-utils.ts","utils/post-message.ts","utils/env.ts","domains/dashboard/constants.ts","components/auth/signIn/index.js","store/redux-separate-context.ts","utils/is-demo.ts","domains/global/selectors.ts","utils/createRequestAction.ts","domains/global/options.ts"],"names":["currentTemperatureSetting","currentSecondsAsTimeSetting","zeropad","x","seconds2time","seconds","maxTimeUnit","secondsReturn","Math","abs","days","floor","hours","minutes","daysString","hoursString","minutesString","secondsString","toFixed","scalableUnits","pps","Kpps","Mpps","bytes","kilobytes","megabytes","gigabytes","terabytes","Hz","kHz","MHz","GHz","THz","PHz","EHz","ZHz","B","KiB","MiB","GiB","TiB","PiB","KB","MB","GB","TB","PB","EB","EiB","twoFixed","multiplier","value","convertibleUnits","Celsius","Fahrenheit","check","convert","celsius","fahrenheit","milliseconds","microseconds","max","identity","unitsConversionCreator","keys","latest","globalReset","this","get","uuid","min","units","desiredUnits","commonUnitsName","switchUnitsCallback","temperatureSetting","secondsAsTimeSetting","undefined","newConvertFunction","tunits","tdivider","scalableUnitsGroup","Object","forEach","unit","unitDivider","commonUnitsKey","t","divider","commonUnits","console","log","toString","LOCALSTORAGE_HEIGHT_KEY_PREFIX_OLD","LOCALSTORAGE_HEIGHT_KEY_PREFIX","ResizeHandler","chartContainerElement","chartUuid","heightId","isLegendOnBottom","useState","clientHeight","resizeHeight","setResizeHeight","dispatch","useDispatch","useEffect","setResizeHeightAction","id","handleResize","useCallback","event","preventDefault","intialHeight","eventStartHeight","type","touches","clientY","setHeight","currentHeight","nextHeight","style","height","heightForPersistance","LEGEND_BOTTOM_SINGLE_LINE_HEIGHT","localStorage","setItem","onMouseMove","e","onTouchMove","document","addEventListener","onTouchEnd","removeEventListener","onMouseEnd","className","onDoubleClick","stopPropagation","onMouseDown","onTouchStart","iconType","popoverTitle","popoverContent","Button","React","ref","children","rest","classNames","ToolboxButton","onClick","buttonRef","useRef","showHelp","useSelector","selectShowHelp","current","window","$","popover","container","animation","html","trigger","placement","delay","show","NETDATA","options","show_help_delay_show_ms","hide","show_help_delay_hide_ms","title","content","requestCommonColorsAction","createAction","storeKey","setCommonMinAction","setCommonMaxAction","setGlobalSelectionAction","setGlobalPanAndZoomAction","resetGlobalPanAndZoomAction","setDefaultAfterAction","resetDefaultAfterAction","setGlobalChartUnderlayAction","centerAroundHighlightAction","clearHighlightAction","windowFocusChangeAction","fetchHelloAction","createRequestAction","updatePersonUrlsAction","accessRegistrySuccessAction","startAlarmsAction","fetchAllAlarmsAction","updateActiveAlarmsAction","setOptionAction","resetOptionsAction","loadSnapshotAction","chartsMetadataRequestSuccess","setSpacePanelStatusAction","setSpacePanelTransitionEndAction","setAlarmAction","resetRegistry","setGlobalPauseAction","resetGlobalPauseAction","setUTCOffset","setUserNodeAccess","useRequestRefreshOfAccessMessage","sendToChildIframe","SIGN_IN_IFRAME_ID","payload","useUserNodeAccessMessage","useListenToPostMessage","message","BaseAnchor","styled","getColor","Anchor","Component","Text","as","name2id","s","replace","initialState","commonColorsKeys","commonMin","commonMax","currentSelectionMasterId","globalPanAndZoom","defaultAfter","isMainJs","getInitialAfterFromWindow","globalChartUnderlay","hoveredX","hasWindowFocus","hasFocus","globalPause","spacePanelIsActive","spacePanelTransitionEndIsActive","registry","cloudBaseURL","hasFetchedInfo","hasFetchedHello","isHelloCallError","hostname","isCloudEnabled","isCloudAvailable","isAgentClaimed","isACLKAvailable","hasStartedInfo","isFetchingHello","fullInfoPayload","machineGuid","personGuid","registryMachines","registryMachinesArray","registryServer","snapshot","alarms","activeAlarms","hasStartedAlarms","alarm","chartsMetadata","isFetching","isFetchingError","data","optionsMergedWithLocalStorage","userNodeAccess","globalReducer","createReducer","getKeyForCommonColorsState","colorsAttribute","commonColorsAttribute","chartContext","hasCustomColors","length","hasLastOnly","array","last","createCommonColorsKeysSubstate","custom","split","init","shouldCopyTheme","assigned","available","themes","colors","on","state","dimensionNames","keyName","subState","currentlyAssignedNr","requestedDimensionsAssigned","mergeAll","filter","dimensionName","map","i","commonMinKey","charts","currentExtreme","values","commonMaxKey","isActive","after","before","masterID","warn","highlightMargin","resetPanAndZoom","hasFocusNow","forcePlay","stop_updates_when_focus_is_lost","utcOffset","request","success","failure","CLOUD_BASE_URL_DISABLED","fetchInfoAction","key","clearLocalStorage","getOptionsMergedWithLocalStorage","parsedData","dataKey","uncompressed","uncompress","JSON","parse","reduce","acc","obj","typeToClassName","left","reset","right","zoomIn","zoomOut","resize","lineChart","areaChart","noChart","loading","noData","Icon","initialSingleState","chartData","chartId","chartMetadata","chartPanAndZoom","fetchDataParams","isRemotelyControlled","viewRange","isFetchingData","isFetchDataFailure","isFetchDetailsFailure","isFetchingDetails","snapshotDataIsFetching","snapshotDataIsError","snapshotData","chartReducer","getSubstate","fetchDataAction","chart","fetchDataCancelAction","substate","useNewKeysOnlyIfDifferent","fetchDataForSnapshotAction","snapshotExportResetAction","pick","fetchChartAction","setChartPanAndZoomAction","shouldForceTimeRange","resetChartPanAndZoomAction","SYNC_PAN_AND_ZOOM","assoc","clearChartStateAction","omit","getDataAttribute","element","defaultValue","hasAttribute","getAttribute","test","getAttributesStatic","node","mapObjIndexed","attribute","getDataAttributeBoolean","host","httpMethod","chartLibrary","chartDefaults","library","width","legend","legendPosition","unitsCommon","unitsDesired","aggrMethod","labels","postGroupBy","postAggregationMethod","dimensionsAggrMethod","aggrGroups","selectedChart","filteredRows","groupBy","nodeIDs","commonColors","decimalDigits","dimensions","selectedDimensions","forceTimeWindow","appendOptions","gtime","method","overrideOptions","pixelsPerPoint","points","hideResizeHandler","detectResize","dygraphType","dygraphValueRange","dygraphTheme","dygraphSmooth","dygraphColors","dygraphRightGap","dygraphShowRangeSelector","dygraphShowRoller","dygraphTitle","dygraphTitleHeight","dygraphLegend","dygraphLabelsDiv","dygraphLabelsSeparateLine","dygraphIncludeZero","dygraphShowZeroValues","dygraphShowLabelsOnHighLight","dygraphHideOverlayOnMouseOut","dygraphXRangePad","dygraphYRangePad","dygraphYLabelWidth","dygraphStrokeWidth","dygraphStrokePattern","dygraphDrawPoints","dygraphDrawGapEdgePoints","dygraphConnectSeparatedPoints","dygraphPointSize","dygraphStepPlot","dygraphStrokeBorderColor","dygraphStrokeBorderWidth","dygraphFillGraph","dygraphFillAlpha","dygraphStackedGraph","dygraphStackedGraphNanFill","dygraphAxisLabelFontSize","dygraphAxisLineColor","dygraphAxisLineWidth","dygraphDrawGrid","dygraphGridLinePattern","dygraphGridLineWidth","dygraphGridLineColor","dygraphMaxNumberWidth","dygraphSigFigs","dygraphDigitsAfterDecimal","dygraphHighlighCircleSize","dygraphHighlightSeriesOpts","dygraphHighlightSeriesBackgroundAlpha","dygraphXPixelsPerLabel","dygraphXAxisLabelWidth","dygraphDrawXAxis","dygraphYPixelsPerLabel","dygraphYAxisLabelWidth","dygraphDrawYAxis","dygraphDrawAxis","easyPieChartMinValue","easyPieChartMaxValue","easyPieChartBarColor","easyPieChartTrackColor","easyPieChartScaleColor","easyPieChartScaleLength","easyPieChartLineCap","easyPieChartLineWidth","easyPieChartTrackWidth","easyPieChartSize","easyPieChartRotate","easyPieChartAnimate","easyPieChartEasing","gaugeMinValue","gaugeMaxValue","gaugePointerColor","gaugeStrokeColor","gaugeStartColor","gaugeStopColor","gaugeGenerateGradient","sparklineType","sparklineLineColor","sparklineFillColor","sparklineChartRangeMin","sparklineChartRangeMax","sparklineComposite","sparklineEnableTagOptions","sparklineTagOptionPrefix","sparklineTagValuesAttribute","sparklineDisableHiddenCheck","sparklineDefaultPixelsPerValue","sparklineSpotColor","sparklineMinSpotColor","sparklineMaxSpotColor","sparklineSpotRadius","sparklineValueSpots","sparklineHighlightSpotColor","sparklineHighlightLineColor","sparklineLineWidth","sparklineNormalRangeMin","sparklineNormalRangeMax","sparklineDrawNormalOnTop","sparklineXvalues","sparklineChartRangeClip","sparklineChartRangeMinX","sparklineChartRangeMaxX","sparklineDisableInteraction","sparklineDisableTooltips","sparklineOnHover","sparklineDisableHighlight","sparklineHighlightLighten","sparklineHighlightColor","sparklineTooltipContainer","sparklineTooltipClassname","sparklineTooltipFormat","sparklineTooltipPrefix","sparklineTooltipSuffix","sparklineTooltipSkipNull","sparklineTooltipValueLookups","sparklineTooltipFormatFieldlist","sparklineTooltipFormatFieldlistKey","sparklineNumberFormatter","sparklineNumberDigitGroupSep","sparklineNumberDecimalMark","sparklineNumberDigitGroupCount","sparklineAnimatedZooms","d3pieTitle","d3pieSubtitle","d3pieFooter","d3pieTitleColor","d3pieTitleFontsize","d3pieTitleFontweight","d3pieTitleFont","d3PieSubtitleColor","d3PieSubtitleFontsize","d3PieSubtitleFontweight","d3PieSubtitleFont","d3PieFooterColor","d3PieFooterFontsize","d3PieFooterFontweight","d3PieFooterFont","d3PieFooterLocation","d3PiePieinnerradius","d3PiePieouterradius","d3PieSortorder","d3PieSmallsegmentgroupingEnabled","d3PieSmallsegmentgroupingValue","d3PieSmallsegmentgroupingValuetype","d3PieSmallsegmentgroupingLabel","d3PieSmallsegmentgroupingColor","d3PieLabelsOuterFormat","d3PieLabelsOuterHidewhenlessthanpercentage","d3PieLabelsOuterPiedistance","d3PieLabelsInnerFormat","d3PieLabelsInnerHidewhenlessthanpercentage","d3PieLabelsMainLabelColor","d3PieLabelsMainLabelFont","d3PieLabelsMainLabelFontsize","d3PieLabelsMainLabelFontweight","d3PieLabelsPercentageColor","d3PieLabelsPercentageFont","d3PieLabelsPercentageFontsize","d3PieLabelsPercentageFontweight","d3PieLabelsValueColor","d3PieLabelsValueFont","d3PieLabelsValueFontsize","d3PieLabelsValueFontweight","d3PieLabelsLinesEnabled","d3PieLabelsLinesStyle","d3PieLabelsLinesColor","d3PieLabelsTruncationEnabled","d3PieLabelsTruncationTruncatelength","d3PieMiscColorsSegmentstroke","d3PieMiscGradientEnabled","d3PieMiscColorsPercentage","d3PieMiscGradientColor","d3PieCssprefix","peityStrokeWidth","textOnlyDecimalPlaces","textOnlyPrefix","textOnlySuffix","getAttributes","attributesStatic","showValueOf","showValueOfAttribues","Array","from","attributes","name","startsWith","merged","isEmpty","getAttributesDynamic","defaultAttributes","initialLegendRight","localeDateString","localeTimeString","updateLocaleFunctions","newLocaleDateString","newLocaleTimeString","netdataShowAlarms","netdataRegistry","netdataServer","netdataServerStatic","netdataCheckXSS","reduxStore","escapeUserInputHTML","setOption","getFromRegistry","prop","selectRegistry","getState","verifyURL","urlOptions","hash","theme","help","mode","update_always","pan_and_zoom","server","getHashParam","highlight","highlight_after","highlight_before","nowelcome","show_alarms","family","utc","hasProperty","property","genHash","forReload","parseHash","variables","location","len","p","decodeURIComponent","booleans","numeric","parseInt","origin","pathname","welcome","Date","now","hashUpdate","history","replaceState","netdataPanAndZoomCallback","status","netdataSnapshotData","updateUtcParam","netdataHighlightCallback","round","d1","d2","getElementById","innerHTML","seconds4human","tooltip","clearHighlight","showHighlight","localStorageTested","localStorageTest","Storage","removeItem","loadLocalStorage","ret","getItem","error","saveLocalStorage","getTheme","def","setTheme","netdataTheme","updateTheme","netdataShowHelp","naturalSortChunkify","j","tz","y","n","charAt","charCodeAt","m","naturalSortCompare","a","b","aa","toLowerCase","bb","c","Number","d","saveTextToClient","filename","blob","Blob","url","URL","createObjectURL","link","createElement","setAttribute","el","appendChild","setTimeout","removeChild","revokeObjectURL","click","saveObjectToClient","stringify","netdataURL","indexOf","substring","netdataReload","reload","gotoHostedModalHandler","gotoServerValidateRemaining","gotoServerMiddleClick","gotoServerStop","gotoServerValidateUrl","guid","penalty","finalURL","registryHello","machine_guid","open","modal","gotoServerModalHandler","checked","alternateUrls","count","registrySearch","urls","switchRegistryModalHandler","notifyForSwitchRegistry","newPersonGuid","ajax","encodeURIComponent","serverDefault","async","cache","headers","xhrFields","withCredentials","done","xss","checkAlways","fail","deleteRegistryGuid","deleteRegistryUrl","deleteRegistryModalHandler","notifyForDeleteRegistry","responseEl","registryDelete","result","menus","submenu_names","version","release_channel","hosts","duration","update_every","chartsPerRow","chartsHeight","total","prioritySort","priority","sortObjectByPriority","object","idx","sorted","hasOwnProperty","push","sort","scrollToId","offset","animate","scrollTop","top","customDashboard","menu","submenu","context","netdataDashboard","sparklines_registry","os","sparkline","prefix","dimension","suffix","gaugeChart","anyAttribute","attr","menuTitle","menu_pattern","slice","menuIcon","menuInfo","menuHeight","submenuTitle","submenuInfo","submenuHeight","relative","contextInfo","contextValueRange","valueRange","contextHeight","contextDecimalDigits","enrichChartData","parts","tmp","match","endsWith","lastIndexOf","headMain","head","generateHeadCharts","hcharts","hi","hlen","renderPage","div","pcent_width","sidebar","mainhead","main","hasChartsOnBottom","chartAdditionalHeight","menuid","icon","info","shtml","mhead","sub","submenus","si","slen","submenuid","chtml","ci","clen","chartHeight","chartCommonMax","isMemoryModeDbEngine","memory_mode","dimensions_count","toLocaleString","charts_count","alarms_count","printPage","finalizePage","renderChartsAndMenu","menu_key","handleLoadJs","promise","callback","catch","alert","then","loadClipboard","clipboard","loadBootstrapTable","Promise","all","loadBootstrapSlider","slider","default","Slider","loadLzString","loadPako","pako","alarmsUpdateModal","active","footer","alarm_families","count_active","count_all","families","families_sort","charts_by_name","arr","unshift","families_sorted","fc","active_family_added","alarm_to_html","enableTooltipsAndPopovers","alarm_family_show","$accordion","target","bootstrapTable","pagination","pageSize","showPaginationSwitch","search","searchTimeOut","searchAlign","showColumns","showExport","exportDataType","exportOptions","fileName","onClickRow","row","scrollToChartAfterHidingModal","when","rowStyle","classes","showFooter","showHeader","showRefresh","showToggle","sortable","silentSort","columns","field","valign","titleTooltip","formatter","index","timestamp4human","align","switchable","visible","alarmid4human","negative_suffix","space","timestamp","toLocaleDateString","toLocaleTimeString","full","has_alarm","crit","badge_url","action_buttons","recipient","last_status_change","lookup_after","lookup_dimensions","lookup_method","lookup_before","lookup_options","alarm_lookup_explain","calc","green","red","warn_repeat_every","crit_repeat_every","delay_up_duration","delay_down_duration","delay_multiplier","delay_max_duration","exec","source","initializeDynamicDashboardWithData","timezone","clipboardCopy","text","writeText","clipboardCopyBadgeEmbed","initializeConfig","custom_info","loadDashboardInfo","memoizeWith","dataType","loadCustomDashboardInfo","always","extend","initializeChartsAndCustomInfo","chartRegistry","downloadAll","initializeDynamicDashboard","newReduxStore","netdataPrepCallback","innerText","versionLog","msg","versionsMatch","v1","v2","s1","s2","n1","n2","getGithubLatestVersion","tag_name","getGCSLatestVersion","response","mediaLink","xhr","textStatus","errorThrown","checkForUpdateByVersion","force","sha2","showPageFooter","display","parseDom","jsonStringifyFn","jsonParseFn","str","eval","xssModalDisableXss","enabled","enabled_for_data","xssModalKeepXss","notifyForUpdate","sha1","save","printPreflight","screen","snapshotOptions","bytes_per_chart","compressionDefault","compressions","bytes_per_point_memory","bytes_per_point_disk","compress","compressed_length","btoa","deflate","to","inflate","atob","LZString","compressToUTF16","decompressFromUTF16","compressToBase64","decompressFromBase64","compressToEncodedURIComponent","decompressFromEncodedURIComponent","loadSnapshotModalLog","tmpSnapshotData","loadSnapshotPreflightFile","file","string","fr","FileReader","onload","date_after","after_ms","date_before","before_ms","charts_ok","charts_failed","compression","data_size","netdata_version","data_points","duration_ms","snapshot_version","comments","removeClass","addClass","readAsText","loadSnapshotPreflightEmpty","loadSnapshot","highlight_after_ms","highlight_before_ms","loadSnapshotDragAndDropInitialized","loadSnapshotDragAndDropSetup","originalEvent","dataTransfer","files","item","loadSnapshotPreflight","saveSnapshotStop","saveSnapshotCancel","stopSnapshotModeAction","saveSnapshotModalInitialized","saveSnapshotModalSetup","saveSnapshotModalInit","find","focus","saveSnapshotModalLog","saveSnapshotModalShowExpectedSize","saveSnapshotViewDuration","saveSnapshotSelectedSecondsPerPoint","sizemb","saveSnapshotCompression","memmb","saveSnapshotSetCompression","saveSnapshotSlider","browser_timezone","reduxState","selectDefaultAfter","start_ms","selectGlobalPanAndZoom","Boolean","start_date","yyyymmddhhssmm","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","view","destroy","ticks","step","scale","saveSnapshot","eltxt","saveData","update_every_ms","pack_api1_v1_chart_data","chartDataUniqueID","cstr","clearPanAndZoom","startSnapshotModeAction","dataPoints","saveSnapshotRestore","css","size","chartUpdated","chartsCount","selectAmountOfCharts","chartsOk","selectAmountOfSnapshotsFetched","chartsFailed","selectAmountOfSnapshotsFailed","pcent","Intl","DateTimeFormat","resolvedOptions","timeZone","getOption","option","createSelectOption","dashboardSettingsSetup","update_options_modal","sync_option","self","bootstrapToggle","units_sync_option","temp_sync_option","change","CHART_DIV_ID_PREFIX","CHART_DIV_OFFSET","scrollDashboardTo","chartElement","offsetTop","querySelector","modalHiddenCallback","animated","alarmDate","alarmStatus","includes","runOnceOnDashboardLastRun","runOnceOnDashboardWithjQuery","body","scrollspy","scrollPos","modal_depth","modal_shown","netdata_paused_on_modal","scrollspyOffset","scrollY","overflow","position","pauseCallback","pause","unpause","affix","bottom","removeAttr","Ps","initialize","wheelSpeed","wheelPropagation","swipePropagation","minScrollbarLength","maxScrollbarLength","useBothWheelAxes","suppressScrollX","suppressScrollY","scrollXMarginOffset","scrollYMarginOffset","fn","shorten","settings","config","showChars","minHideChars","ellipsesText","moreText","lessText","onLess","onscroll","onMore","errMsg","off","$this","hasClass","parent","prev","each","substr","inTag","bag","countChars","openTags","tagName","r","shift","isDemo","retries_on_data_failures","o","q","arguments","l","getElementsByTagName","src","parentNode","insertBefore","ga","onresizeCallback","update","resetDashboardOptions","selected_server_timezone","isProperTimezone","userSetServerTimezone","timezoneOption","netdataCallback","showSignInModal","explicitlySignIn","explicitlySignInAction","useCloudConnectionStatus","userStatus","nodeStatus","date","useMemo","header","strong","bullets","rel","href","CTA1","makeCloudConnectionStatusInfo","CloudConnectionStatusModal","closeModal","onRefresh","isCTA1Disabled","handleClickedCTA1","background","margin","onClose","padding","column","gap","bullet","data-testid","utmParameters","campaign","data-ga","disabled","textTransform","label","sx","fontWeight","lineHeight","CloudConnectionStatus","selectUserNodeAccess","cloudEnabled","selectIsCloudEnabled","isModalOpen","setModalOpen","cloudConnectionStatusInfo","nodeLiveness","documentElement","openModal","flavour","MASKED_DATA","INFO_POLLING_FREQUENCY","alarmStatuses","define","_uniqueIDCounter","defaultSettings","color","fontSize","font","subtitle","titleSubtitlePadding","canvasHeight","canvasWidth","pieInnerRadius","pieOuterRadius","sortOrder","ignoreSmallSegments","valueType","smallSegmentGrouping","outer","format","hideWhenLessThanPercentage","pieDistance","inner","mainLabel","percentage","decimalPlaces","lines","truncation","truncateLength","effects","load","effect","speed","pullOutSegmentOnClick","highlightSegmentOnMouseover","highlightLuminosity","tooltips","placeholderParser","styles","fadeInSpeed","backgroundColor","backgroundOpacity","borderRadius","misc","segments","segmentStroke","gradient","canvasPadding","pieCenterOffset","cssPrefix","callbacks","onMouseoverSegment","onMouseoutSegment","onClickSegment","validate","pie","d3","HTMLElement","SVGElement","helpers","isArray","isNaN","addSVGSpace","svg","select","append","shuffleArray","tmpVal","randomIndex","currentIndex","random","processObj","is","getDimensions","w","h","getBBox","rectIntersect","r1","r2","getColorShade","hex","lum","String","newHex","initSegmentColors","finalColors","applySmallSegmentGrouping","totalSize","math","getTotalPieSize","newData","groupedData","totalGroupedData","isGrouped","showPoint","isFunction","functionToCheck","call","prototype","copy","copyIsArray","clone","deep","hasOwn","class2type","jQuery","isWindow","isNumeric","parseFloat","isFinite","isPlainObject","nodeType","constructor","toRadians","degrees","PI","toDegrees","radians","computePieRadius","textComponents","headerHeight","exists","innerRadius","percent","outerRadius","smallestDimension","pieDistanceSpace","sortPieData","getPieTranslateCenter","pieCenter","calculatePieCenter","hasTopTitle","hasTopSubtitle","headerOffset","footerOffset","rotate","xm","ym","cos","sin","translate","rads","pointIsInArc","pt","ptData","d3Arc","theta1","startAngle","theta2","endAngle","dist","angle","atan2","add","section","sectionDisplayType","include","getIncludes","outerLabel","insert","labelGroup","__labels","selectAll","enter","formatterContext","part","positionLabelElements","dims","computeLabelLinePositions","lineCoordGroups","computeLinePosition","x2","y2","x3","y3","getSegmentAngle","midpoint","originCoords","heightOffset","outerLabelGroupData","quarter","startOfLabelX","startOfLabel","addLabelLines","lineGroup","lineFunction","line","curve","curveBasis","positionLabelGroups","pieCenterCopy","newCoords","xOffset","yOffset","val","addMainLabel","addValue","addPercentage","computeOuterLabelCoords","getIdealOuterLabelPositions","resolveOuterLabelCollisions","checkConflict","currIndex","direction","curr","currIndexHemisphere","hs","nextIndex","currLabelGroup","examinedLabelGroup","labelHeights","center","lineLength","heightChange","isLabelHidden","adjustLabelPos","lastCorrectlyPositionedLabel","xDiff","yDiff","newXPos","newYPos","sqrt","labelGroupNode","labelGroupDims","originalX","originalY","hemisphere","effectMap","easeLinear","easeBounce","easeSin","easeElastic","easeBack","easeQuad","easeCircle","easeExp","create","pieChartElement","arc","addGradients","grads","addSegmentEventHandlers","merge","segment","currentEl","isExpanded","onSegmentEvent","closeSegment","openSegment","segColor","tt","showTooltip","moveTooltip","hideTooltip","func","expanded","isOpeningSegment","maybeCloseOpenSegment","transition","ease","centroid","pullOutSize","currentlyOpenSegment","getCentroid","bbox","opts","fullValue","compounded","currValue","offscreenCoord","addTitle","__title","positionTitle","headerLocation","addSubtitle","__subtitle","positionSubtitle","getHeaderHeight","addFooter","__footer","positionFooter","footerLocation","footerWidth","totalTitleHeight","footerPlusPadding","addTooltips","caption","replacePlaceholders","currentTooltip","mouseCoords","mouse","replacements","placeholder","d3pie","_setupData","_init","recreate","redraw","getOpenSegment","updateProp","propKey","oldVal","oldValue","dp","_getPercentage","totalPercentage","relativeAmount","isTimestamp","NETDATA_REGISTRY_SERVER","MS_IN_SECOND","getIframeSrc","path","utmUrlSuffix","getBoundingClientRect","obj1","obj2","equals","currentScript","isTestingEnv","getDefaultServer","isDevelopmentEnv","RegExp","getPathFromScriptSource","cond","T","alwaysEndWithSlash","pipe","concat","serverStatic","selectChartsState","selectSingleChartState","createSelector","_","chartsState","selectChartData","chartState","selectChartMetadataFromExplicitCall","selectChartMetadata","selectChartMetadataFromChartsCall","metadataFromAll","metadataFromSingleCall","selectIsFetchingDetails","makeSelectChartMetadataRequest","selectChartViewRange","selectChartIsFetchingData","selectChartFetchDataParams","selectResizeHeight","selectChartPanAndZoom","selectAmountOfFetchedCharts","some","hasCompletedFetching","selectNameOfAnyFetchingChart","isSupportingDateTimeFormat","navigator","language","narrowToDate","localeDateStringNative","localeTimeStringNative","xAxisTimeStringNative","localeMatcher","formatMatcher","weekday","year","month","day","dateFormat","locale","long","isTime","secs","hourCycle","dateStyle","timeStyle","getOptions","getTimezone","useDateTime","selectTimezoneSetting","selectUTCOffsetSetting","xAxisTimeString","xAxisDateString","showSignInModalAction","isSignedInAction","setOfflineAction","fallbackUpdateTimeInterval","panAndZoomDelay","totalSeconds","defaultOptions","hour","minute","second","and","strings","pop","join","isSnapshotMode","snapshotCharts","snapshotDataPoints","isSignedIn","offline","dashboardReducer","combineReducers","globalKey","chartKey","dashboardKey","axiosInstance","axios","Pragma","getFetchStream","concurrentCallsLimit","fetch$","Subject","resetFetch$","handler","mergeMap","params","onErrorCallback","onSuccessCallback","cancelTokenSource","timeout","cancelToken","token","tap","responseData","catchError","empty","startWith","switchMap","subscribe","fillMissingData","nrOfPointsToFill","viewUpdateEvery","view_update_every","firstAddedTimestamp","emptyPoint","tail","nulls","fill","addPointsDygraph","emptyArray","transformResults","shouldRevertFlip","dataResult","reverse","pointData","sum","Container","getSizeBy","SideContent","ContentContainer","HeaderText","ContentText","TextSmall","UINotification","props","leftContent","rightContent","renderContent","createUINotification","NodeIconContainer","NotificationLink","toastOptions","toast","POSITION","BOTTOM_RIGHT","autoClose","pauseOnFocusLoss","showCloudInstallationProblemNotification","notificationComponent","showCloudConnectionProblemNotification","uiNotification","defaultUrlOptions","alarm_unique_id","alarm_id","alarm_event_id","alarm_when","parseQueryPair","isInvalidPair","isPrintMode","mapIndexed","mergeRight","parseUrl","watchFetchDataResponseChannel","fetchDataSaga","fetchChartSaga","fetchInfoSaga","chartSagas","CONCURRENT_CALLS_LIMIT_METRICS","fetchDataResponseChannel","channel","take","action","start","end","put","constructCompatibleKey","IS_FLIP_RESPECTED_IN_COMPOSITE_CHARTS","getGroupByValues","fetchMetrics$","group","selectSnapshot","dimensionsWithUrlOptions","matchingKey","snapshotKey","agentOptionsOriginal","hasFlip","agentOptions","shouldAddFakeFlip","groupValues","axiosOptions","agent_options","post_aggregation_methods","aggregations","valueOf","fillMissingPoints","transformedResults","postAggregated","post_aggregated_data","next","fetchForSnapshot$","resetFetchForSnapshot$","fetchDataForSnapshotSaga","aggr_method","node_ids","stopSnapshotModeSaga","poll","wasCloudAvailable","wasACLKAvailable","takeEvery","spawn","sidePanelTransitionTimeInSeconds","getLog","notifyAll","alarmsLoop","startAlarms","fetchAllAlarmsSaga","alarmsSagas","ALARMS_INITIALIZATION_DELAY","ALARMS_UPDATE_EVERY","ALARMS_MS_BETWEEN_NOTIFICATIONS","areNotificationsAvailable","notificationCallback","netdataAlarmsNotifCallback","firstNotificationId","lastNotificationId","scrollToAlarm","chartID","scrollToChart","requestPermissions","Notification","permission","requestPermission","hasGivenNotificationPermissions","lastNotificationIdArg","getNotification","entry","firstNotificationIdArg","updated","valueString","value_string","tag","interaction","unique_id","old_status","no_clear_notification","notificationTitle","notificationOptions","requireInteraction","notificationHandler","alarmLogs","logsSorted","sortBy","newLogs","notifications","onclick","netdataAlarmsRemember","what","latest_alarm_log_unique_id","allAlarms","allowedReferrerDomains","isAllowedReferrer","referrer","watchWindowFocusChannel","waitForFullInfoPayload","injectPosthog","fetchHelloSaga","spacePanelSaga","globalSagas","windowFocusChannel","listenToWindowFocus","posthog","selectFullInfoPayload","__SV","_i","g","api_host","u","people","loaded","identify","shouldMaskReferrer","register","$ip","$current_url","$pathname","$host","$initial_referring_domain","$initial_referrer","$referring_domain","$referrer","event_source","netdata_machine_guid","netdata_person_id","netdata_buildinfo","netdata_release_channel","mirrored_host_count","mirrored_hosts","alarms_normal","normal","alarms_warning","warning","alarms_critical","critical","host_os_name","os_name","host_os_id","os_id","host_os_id_like","os_id_like","host_os_version","os_version","host_os_version_id","os_version_id","host_os_detection","os_detection","system_cores_total","cores_total","system_total_disk_space","total_disk_space","system_cpu_freq","cpu_freq","system_ram_total","ram_total","system_kernel_name","kernel_name","system_kernel_version","kernel_version","system_architecture","architecture","system_virtualization","virtualization","system_virt_detection","virt_detection","system_container","system_container_detection","container_detection","container_os_name","container_os_id","container_os_id_like","container_os_version","container_os_version_id","host_collectors_count","collectors","host_cloud_enabled","host_cloud_available","host_agent_claimed","host_aclk_available","host_aclk_implementation","host_allmetrics_json_used","host_allmetrics_prometheus_used","host_allmetrics_shell_used","host_charts_count","host_dashboard_used","host_metrics_count","host_notification_methods","config_memory_mode","config_exporting_enabled","config_exporting_connectors","config_hosts_available","config_https_enabled","config_multidb_disk_quota","config_page_cache_size","config_stream_enabled","config_web_enabled","host_is_parent","host_labels","_is_parent","mirrored_hosts_reachable","mirrored_hosts_status","reachable","mirrored_hosts_unreachable","host_collectors","host_is_k8s_node","is_k8s_node","accessRegistry","maxRedirects","machine","isRedirect","returnData","person_guid","parsePersonUrls","personUrls","lastTimestamp","accesses","existingObj","isNewer","extended","uniq","helloCallUrl","cloud_base_url","isUsingGlobalRegistry","accessRegistryResponse","anonymous_statistics","constructOptionStorageKey","setOptionSaga","showSignInSaga","mainJsSagas","LOCAL_STORAGE_NEEDS_SYNC","setGlobalChartUnderlaySaga","hashParams","getHashParams","setHashParams","clearHighlightSaga","removeHashParams","signInLinkHref","rootSaga","sagaMiddleware","createSagaMiddleware","store","createStore","rootReducer","compose","applyMiddleware","run","configureStore","loadCss","resolve","reject","fileRef","onerror","Error","isDygraphSparkline","chartLibrariesSettings","dygraph","hasToolboxPanAndZoom","xssRegexIgnore","isLogScale","hasLegend","trackColors","containerClass","peity","google","easypiechart","aspectRatio","gauge","textonly","groupbox","getChartURLOptions","shouldEliminateZeroDimensions","BIGGEST_INTERVAL_NUMBER","Loader","containerNode","hasEmptyData","screenHeight","lost","paddingTop","clientWidth","getPanAndZoomStep","ctrlKey","pan_and_zoom_factor","pan_and_zoom_factor_multiplier_control","shiftKey","pan_and_zoom_factor_multiplier_shift","altKey","pan_and_zoom_factor_multiplier_alt","safeEqualCheck","formattersFixed","formattersZeroBased","fastNumberFormat","NumberFormat","useGrouping","minimumFractionDigits","maximumFractionDigits","getLegendFormatValue","convertUnits","intlNumberFormat","valueDecimalDetail","dmin","dmax","convertedValue","useFormatters","selectTemperatureSetting","selectSecondsAsTimeSetting","setConvertUnits","setMin","setMax","unitsCurrent","setUnitsCurrent","decimals","setDecimals","setIntlNumberFormat","legendFormatValue","legendFormatValueRef","updateLegendFormatValueRef","newConvertUnits","newIntlNumberFormat","newDecimalDigits","legendFormatValueDecimalsFromMinMax","newMin","newMax","switchedUnits","newDecimals","convertedMin","convertedMax","delta","defaultColor","LegendContainer","LegendFirstRow","LegendSecondRow","LegendUnit","DateTimeSeparator","span","LegendItems","DimensionItem","isDisabled","DimensionItemToolboxPlaceholder","DimensionIcon","DimensionLabel","DimensionValue","ToolboxContainer","emptyObject","selector","dimension_names","LegendText","ChartLegendRight","hoveredRow","onDimensionClick","showLatestOnBlur","viewBefore","dimensionIds","dimension_ids","showUndefined","legendDate","colorFillOpacity","chart_type","scrollbarRef","legendPluginModuleString","legendResolutionTooltip","dimensionId","rgb","hexFull","colorHex2Rgb","isSelected","hoveredValueArray","view_latest_values","role","tabIndex","ChartTimeframe","ChartLegendBottom","legendToolbox","resizeHandler","ChartLegend","setSelectedDimensions","clickedDimensionName","isModifierKeyPressed","newSelectedDimensions","getNewSelectedDimensions","allDimensions","LegendToolbox","onToolboxLeftClick","onToolboxRightClick","onToolboxZoomInClick","onToolboxZoomOutClick","getDataForFakeStacked","dimensionsVisibility","point","currentMin","currentMax","isVisible","getDygraphChartType","chartSettings","dygraphRequestedType","dygraphChartType","getBackgroundColor","Color","transformColors","mix","getDygraphFillAlpha","isFakeStacked","color_fill_opacity_fake_stacked","color_fill_opacity_stacked","color_fill_opacity_area","useProceededChart","chartRef","propsRef","useToggle","proceeded","toggleProceeded","updatePosition","getArea","distance","toDomXCoord","first_entry","hasProceeded","defaultPositionTo","topMargin","isRendered","toggleIsRendered","positionTo","ProceededChartDisclaimer","forwardRef","backgroundColorMap","WARNING","CRITICAL","CLEAR","borderColorMap","getBorderColor","textColorMap","Badge","border","NeutralPill","getMissingTime","getInitialDygraphOptions","hiddenLabelsElementId","orderedColors","setMinMax","shouldSmoothPlot","isSparkline","highlightCircleSize","axis","grid","rightGap","showRangeSelector","showRoller","titleHeight","labelsDiv","labelsSeparateLines","labelsShowZeroValues","labelsKMB","labelsKMG2","showLabelsOnHighlight","hideOverlayOnMouseOut","includeZero","xRangePad","yRangePad","ylabel","yLabelWidth","plotter","smoothPlotter","strokeWidth","strokePattern","drawPoints","drawGapEdgePoints","connectSeparatedPoints","pointSize","stepPlot","strokeBorderColor","strokeBorderWidth","fillGraph","fillAlpha","stackedGraph","stackedGraphNaNFill","drawAxis","axisLabelFontSize","axisLineColor","axisLineWidth","drawGrid","gridLinePattern","gridLineWidth","gridLineColor","maxNumberWidth","sigFigs","digitsAfterDecimal","highlightSeriesOpts","highlightSeriesBackgroundAlpha","visibility","logscale","axes","pixelsPerLabel","ticker","Dygraph","dateTicker","axisLabelWidth","axisLabelFormatter","toTimeString","axes_","extremeRange","DygraphChart","chartElementClassName","chartElementId","onUpdateChartPanAndZoom","immediatelyDispatchPanAndZoom","setGlobalChartUnderlay","setHoveredX","viewAfter","selectGlobalChartUnderlay","selectedAlarm","selectAlarm","updateChartPanOrZoom","shouldNotExceedAvailableRange","dygraphInstance","latestIsUserAction","isMouseDown","dygraphHighlightAfter","dygraphLastTouchMove","dygraphLastTouchPageX","dygraphLastTouchEnd","isSyncPanAndZoom","selectSyncPanAndZoom","resetGlobalPanAndZoom","updateOptions","dateWindow","useDygraphBadge","isAlarmBadgeVisible","alarmBadgeRef","updateAlarmBadge","isHighlightBadgeVisible","highlightBadgeRef","updateHighlightBadge","isProceeded","precededChartRef","updatePrecededPosition","useLayoutEffect","localHighlight","setLocalHighlight","selectSmoothPlot","dygraphOptionsStatic","dygraphOptions","highlightCallback","xval","newHoveredX","unhighlightCallback","drawCallback","xRange","xAxisRange","last_entry","isInRangeOfAvailableData","zoomCallback","minDate","maxDate","underlayCallback","canvas","area","currentAlarm","alarmPosition","fillColor","requestAnimationFrame","fillStyle","globalAlphaCache","globalAlpha","fillRect","hasHashParam","pillRef","pillX","pillPosition","bottomLeft","toDomCoords","topRight","interactionModel","mousedown","button","initializeMouseDown","tarp","tarps","isOutsideReasonableViewport","startPan","metaKey","toDataXCoord","offsetX","startZoom","mousemove","moveZoom","isPanning","is2DPan","movePan","isZooming","mouseup","sortedRange","clearZoomRect_","drawGraph_","endPan","endZoom","wheel","adjustAxis","zoomInPercentage","bias","increment","foo","normalDef","wheelDelta","deltaY","detail","percentages","offsetY","yar0","yAxisRange","toDomYCoord","offsetToPercentage","xPct","yPct","xBias","yBias","yAxes","yAxisRanges","newYAxes","zoomRange","updatedAfter","updatedBefore","dblclick","touchstart","defaultInteractionModel","touchDirections","pageX","touchmove","touchend","dygraphPlotter","plotter_","pct","double_click_speed","instance","useUpdateEffect","selectSpacePanelTransitionEndIsActive","forceDateWindow","hasChangedDuration","hasScrolledToTheFutureDuringPlayMode","optionsDateWindow","selectGlobalSelectionMaster","getSelection","clearSelection","setSelection","commonMinState","selectCommonMin","commonMaxState","selectCommonMax","extremes","yAxisExtremes","shouldUseCommonMin","shouldUseCommonMax","shouldUpdate","newExtremes","useUnmount","resizeObserver","useMount","hasOmitedFirstCallback","callbackDebounced","waitFor","args","clearTimeout","debounce","ResizeObserver","observe","disconnect","EasyPieChart","chartWidth","chartInstance","setChartInstance","valueIndex","safeMinMax","_min","_max","isMinOverride","isMaxOverride","getPercentFromValueMinMax","stroke","v","easypiechart_track","easypiechart_scale","newChartInstance","EasyPie","barColor","trackColor","scaleColor","scaleLength","lineCap","lineWidth","trackWidth","easing","shouldUseAnimation","enableAnimation","disableAnimation","valueFontSize","valuetop","titleFontSize","titletop","unitFontSize","unitTop","isSetByUser","GaugeChart","chartCanvasElement","minAttribute","maxAttribute","safeMin","safeMax","_pcent","gauge_pointer","gauge_stroke","radiusScale","pointer","limitMax","limitMin","colorStart","colorStop","strokeColor","generateGradient","gradientType","highDpiSupport","Gauge","setOptions","minValue","maxValue","animationSpeed","set","valueTop","minMaxFontSize","normalizeHex","colorLuminance","hexNormalized","splitEvery","nr","convertToTimestamp","number","SparklineChart","viewAfterForCurrentData","viewBeforeForCurrentData","$chartElement","set$chartElement","sparklineOptions","requestedAfter","requestedBefore","currentDuration","requestedDuration","widthRatio","paddingLeftPercentage","getForceTimeWindowCorrection","defaultFillColor","fill_luminance","chartTitle","emptyStringIfDisable","sparklineInitOptions","lineColor","chartRangeMin","chartRangeMax","composite","enableTagOptions","tagOptionPrefix","tagValuesAttribute","disableHiddenCheck","defaultPixelsPerValue","spotColor","minSpotColor","maxSpotColor","spotRadius","valueSpots","highlightSpotColor","highlightLineColor","normalRangeMin","normalRangeMax","drawNormalOnTop","xvalues","chartRangeClip","chartRangeMinX","chartRangeMaxX","disableInteraction","disableTooltips","disableHighlight","highlightLighten","highlightColor","tooltipContainer","tooltipClassname","tooltipChartTitle","tooltipFormat","tooltipPrefix","tooltipSuffix","tooltipSkipNull","tooltipValueLookups","tooltipFormatFieldlist","tooltipFormatFieldlistKey","numberFormatter","numberDigitGroupSep","numberDecimalMark","numberDigitGroupCount","animatedZooms","onLeave","onChange","sparklines","getCurrentRegionFields","bind","unbind","textAlign","paddingLeft","fetchPromise","emptyContent","getDateRange","dt","dtString","time","t1","t2","D3pieChart","d3pieInstance","setD3pieInstance","d3pieOptions","safeContent","defaultTitle","dateRange","other","mainlabel","segment_stroke","gradient_color","initialD3pieOptions","tooltip_bg","tooltip_fg","newD3pieInstance","isHoveredButNoData","slot","PeityChart","peityOptions","$element","peityInitOptions","foreground","updatedOptions","GoogleChart","googleChartInstance","hasApiBeenLoaded","setHasApiBeenLoaded","script","firstScript","packages","googleOptions","dataTable","visualization","DataTable","draw","chartType","areaOpacity","Map","initialGoogleOptions","hAxis","viewWindowMode","slantedText","textStyle","gridlines","vAxis","chartArea","focusTarget","annotation","1","pointsVisible","titlePosition","titleTextStyle","isHtml","ignoreBounds","curveType","isStacked","googleInstance","AreaChart","LineChart","TextOnly","precision","textContent","defaultAspectRatio","getCellBoxSize","cellSize","getRows","getColumns","rows","getXPosition","getYPosition","getFullWidth","ceil","getFullHeight","getOffsetPosition","onMouseenter","onMouseout","cellPadding","hoveredIndex","getEvent","rect","cellBoxSize","mouseout","nextHoveredIndex","getWidth","getCanvasAttributes","defaultColorRange","makeGetColor","colorRange","scaleLinear","domain","extent","range","innerHeight","aligns","GroupBox","renderTooltip","dataRef","canvasRef","boxesRef","hover","setHover","dropHoverRef","boxHoverRef","timeoutId","close","deactivateBox","closeDrop","currentHover","cellStroke","getContext","activeBox","activateBox","clearEvents","clear","clearRect","beginPath","drawBox","registerEvents","strokeStyle","strokeRect","drawBoxes","onMouseEnter","onMouseLeave","getAlign","Title","Label","Flex","attrs","TextMicro","GroupBoxWrapper","groupIndex","renderGroupPopover","renderBoxPopover","maxWidth","boxPopover","boxAlign","groupPopover","alignItems","plain","isOpen","popoverRef","GroupBoxes","flexWrap","vertical","flex","LinearColorScaleBar","Legend","k8s_cluster_id","k8s_node_name","k8s_namespace","k8s_controller_kind","k8s_controller_name","k8s_pod_name","k8s_container_name","labelIds","word","toUpperCase","Separator","Header","wordBreak","TabButton","neutral","themeType","Tabs","ExpandButton","makeFlex","Section","onExpand","noBorder","side","justifyContent","oldDefaultHeights","getPortalNodeStyles","shouldAddSpecialHeight","heightFromLocalStorage","heightID","persitedHeight","persistedHeightOld","getHeightFromLocalStorage","heightOverriden","chartDefaultsMinWidth","min_width","minWidth","globalIntersectionOptions","root","rootMargin","threshold","globalIntersectionObserver","listeners","globalObserver","IntersectionObserver","entries","isIntersecting","unsubscribe","elementToUnsubscribe","createGlobalIntersectionObserver","InvisibleSearchableText","opacity","shouldCleanChartStateAlways","DisableOutOfView","portalNode","hasPortalNodeBeenStyled","setHasPortalNodeBeenStyled","isShowingAlarmOnChart","forEachObjIndexed","styleName","setProperty","destroyOnHide","selectDestroyOnHide","clonedChildrenRef","isVisibleIntersection","setIsVisible","isVisibleRef","newIsVisible","useCommonIntersection","debounceTime","selectIsAsyncOnScroll","shouldHideDebounced","setShouldHideDebounced","useDebounce","shouldHide","previousIsVisibleIntersection","newClonedChildren","child","cloned","cloneNode","clonedCanvases","querySelectorAll","oldCanvas","newCanvas","drawImage","cloneWithCanvas","clonedChildrenContainer","nodeElement","ChartContainer","dropdownMenu","renderCustomElementForDygraph","onAttributesChange","externalChartMetadata","sectionTitle","MigrationModalPromos","aggrMethods","avg","ChartValueContainer","memo","displayedIndex","aggregation","getAggregation","ChartValue","dangerouslySetInnerHTML","__html","groupLabel","postGroupLabel","relatedIndex","useContext","ThemeContext","chartContainerRef","setDisplayedIndex","setDisplayedIndexThrottled","throttle","repaint","relatedCharts","relatedChartAttributes","chartAttributes","chartLabels","ExternalButton","alignSelf","Item","secondary","DateItem","DateSection","Metrics","LabelsSection","labelId","items","onItemClick","getLabel","sliced","expandable","onNodeClick","ids","predefinedLabelIds","getLabelIds","StyledButton","List","onBack","horizontal","TabsContainer","Popover","setView","isLabelView","Kubernetes","labelValues","postGroupValues","postGroupData","groupValue","indexes","boxes","labelsAcc","groupData","groupChartLabels","groupLabels","Set","accChartLabels","transform","groupBoxData","groupedBoxesData","groupedBox","AbstractChart","showValueAttributesNodes","userElementId","chartSettingCallOptions","isFlipped","dimensionIndex","useShowValueOutside","Chart","viewRangeForCurrentData","themeContext","unitsScalingMethod","selectUnitsScalingMethod","shouldDisplayToolbox","legend_toolbox","shouldDisplayResizeHandler","resize_charts","allDimensionNames","dimensionNamesFromMetadata","additionalDimensionNamesFromData","localHoveredX","setLocalHoveredX","isSyncSelection","selectSyncSelection","handleSetHoveredX","noMaster","globalHoveredX","selectGlobalSelection","netdataFirst","netdataLast","fixedMinDuration","setGlobalPanAndZoomDebounced","useDebouncedCallback","newGlobalPanAndZoom","flush","handleUpdateChartPanAndZoom","shouldFlushImmediately","minDuration","currentDuraton","afterForced","beforeForced","first","wantedDuration","doCallback","tolerance","movement","handleToolBoxPanAndZoom","newAfter","newBefore","handleToolboxLeftClick","handleToolboxRightClick","timeWindow","handleToolboxZoomInClick","panAndZoomStep","handleToolboxZoomOutClick","selectAssignedColors","createSelectAssignedColors","__","isTimeVisible","DropdownItem","DropdownItemLabel","DotsBtn","ChartDropdown","setIsOpen","handleClose","circleAnimation","keyframes","SpinnerContainer","Circle","Circle2","Circle3","ChartSpinner","spaceBetween","ChartDropdownContainer","dimensionsAggrMethodMap","ChartWithLoader","selectChartMetadataRequest","actualChartMetadata","panAndZoom","isPanAndZoomMaster","areCriteriaMet","preferedIntervalTime","selectHasWindowFocus","stopUpdatesWhenFocusIsLost","selectStopUpdatesWhenFocusIsLost","selectGlobalPause","shouldBeUpdating","shouldFetch","setShouldFetch","shouldFetchImmediatelyAfterFocus","setShouldFetchImmediatelyAfterFocus","intervalTime","useInterval","useFetchNewDataClock","panAndZoomThrottled","useThrottle","initialBefore","liveModeAfter","boundingClientRect","isShowingSnapshot","selectShouldEliminateZeroDimensions","shouldUsePanAndZoomPadding","selectPanAndZoomDataPadding","CancelToken","cancel","shouldShowSpinnerDebounced","setShouldShowSpinnerDebounced","shouldShowSpinner","newViewRange","forceDataPoints","force_data_points","pointsMultiplier","requestedPadding","pixelsPerPointAttribute","pixelsPerPointSetting","pixels_per_point","px","getChartPixelsPerPoint","correctedPoints","firstEntry","nowInSeconds","afterAbsolute","beforeAbsolute","requestedRange","availableRange","getCorrectedPoints","externalSelectedDimensions","customElementForDygraph","selectDashboardDomain","selectIsSnapshotMode","selectSnapshotOptions","SnapshotLoader","SnapshotLoaderContainer","Portals","nodes","attributesMapped","createPortal","useHttp","shouldMakeCall","isExternal","setIsFetching","isError","setIsError","setData","modalRoot","ModalPortal","PrintModal","printModalElement","amountOfCharts","amountOfFetchedCharts","nameOfAnyFetchingChart","print","progressBarText","aria-labelledby","data-keyboard","data-backdrop","data-dismiss","aria-label","aria-hidden","aria-valuenow","aria-valuemin","aria-valuemax","SocialMediaContainer","FirstRow","GithubCopy","GithubCopyLine","SocialMediaLink","GithubStarQuestion","GithubIcon","TwitterIcon","FacebookIcon","SecondRow","SecondRowText","SidebarSocialMedia","SidebarSocialMediaPortal","NotificationsContainer","closeButton","hasBorder","hostNameSelector","global","Node","truncate","tooltipBackground","CustomTooltip","isBasic","getContent","contentNode","Tooltip","getTooltipContent","Options","data-toggle","data-target","Dropdown","PillContainer","Link","ProtoBuf","toggle","lacksProtoBufSupport","selectLacksProtoBufSupport","isLargeEnough","useMedia","onEsc","onClickOutside","VersionControl","currentVersion","isStableReleaseChannel","releaseChannel","githubVersion","gcsVersionResponse","mediaLinkResponse","latestVersion","transformGcsVersionResponse","isNewVersionAvailable","small","versionSelector","Version","initialValue","setToggle","toggleOn","toggleOff","getValueFromStorage","useLocalStorage","setValue","RootContainer","DropdownContainer","Menu","ListContainer","OpenerIcon","noMargin","PickerBox","StyledTimePeriod","StyledCustomTimePeriod","StyledDropdown","renderTitle","onMenuToggle","anchorCorner","renderOpener","maxHeight","DropdownIcon","CustomInput","input","StyledDrop","Drop","StyledHR","hr","period","resolution","setTimeRange","tagging","dateResolutions","resolutionsMapping","MINUTE","HOUR","months","getCustomTimePeriod","parseInputPeriod","timeCorrection","customRange","getUnixTime","focusTaggingMap","startDate","endDate","timePeriods","getDateWithOffset","formattedDate","isMatch","splitOffset","mathSign","absoluteNumber","firstPart","padStart","padEnd","formatOffset","TimePeriods","handleTimePeriodChange","selectedDate","CustomTimePeriod","getInputValue","inputValue","setInputValue","isDropdownOpen","toggleDropdown","onBlur","currentValue","currentTarget","isValidInput","isInteger","timePeriod","isValid","onChangeResolution","newResolution","dateResolution","DatePicker","selected","selectsStart","selectsEnd","startOpen","inline","selectsRange","monthsShown","showPopperArrow","calendarContainer","StyledDateInput","StyledCalendar","getRgbColor","DatePickerInput","onDatesChange","onFocus","placeholderText","setFormattedValue","parsedDate","getTime","useLocaleDate","convertTimestampToDate","getLocaleDate","toDate","useConvertedDates","DatePickerWrapper","setStartDate","setEndDate","onInputFocus","convertedStartDate","convertedEndDate","setValidStartDate","setPreviousValue","isBefore","setValidEndDate","dates","startDateWithOffset","endDateWithOffset","startDateTimestamp","endDateTimestamp","grow","PeriodIndication","convertedStart","convertedEnd","formattedStartDate","formattedEndDate","formatDates","formatDistanceStrict","getTimePeriod","whiteSpace","resolutionMap","SECONDS","getDuration","moment","diff","getGranularDuration","showSeconds","getResolution","DateBox","isPlaying","isSameDate","DurationBox","PickerAccessorElement","isPickerOpen","setRangeValues","timeframe","setTimeframe","getStartDate","getEndDate","useDashboardSelector","isSame","getIsSameDate","DatePickerDrop","initialStartDate","initialEndDate","setResolution","focusedInput","setFocusedInput","setDates","clearChanges","togglePicker","focusTagging","getFocusTagging","isValidTimePeriod","isApplyDisabled","consistentDefaultValue","isClearDisabled","pickerDrop","canHideTarget","eventCategory","eventAction","eventLabel","eventValue","dataLayer","eventData","reportEvent","ReduxDatePickerContainer","dashboardDispatch","useDashboardDispatch","isGlobalPanAndZoom","pickedValues","getHoverColor","StyledPill","Pill","PlayPausePill","isForcePlaying","getIcon","PanelRowContainer","MenuItem","Wrapper","testid","actions","basis","DefaultListHeader","H4","SectionHandle","toggleOpen","ItemsList","PlayOptionsTooltip","bacgkround","MenuButton","MemoizedPlayOptions","GlobalControls","hollowColors","hollow","pillProps","Alarms","selectActiveAlarms","News","app","upToDate","SearchInput","TextInput","Search","inputRef","metaShrinked","OffsetItem","onSelect","timezones","abbr","getDefaultTimezone","memoized","timeZoneName","normalizedOffset","parsedOffset","normalizeOffset","digitizedOffset","digitizeOffset","timezoneList","byId","Timezone","selectedTimezone","selectedOffset","timezoneHash","zones","IframeContainer","Iframe","signedIn","rendered","setRendered","signInMsg","lsValue","removeLsValue","selectCloudBaseUrl","nameParam","originParam","signInIframeUrl","onLoad","useCheckSignInStatus","hasSignedInBefore","setHasSignedInBefore","onMessage","isNew","SignIn","isRegistry","onSignIn","zIndex","SignOut","SignInItem","isSignedInSelector","dashboard","UserSettings","menuItems","separator","DarkTheme","backdrop","SpacesSkeleton","Fragment","SpacesIframe","Spaces","getNodeUrl","baseUrl","getNodes","hostsStatus","base","decodeURI","getBaseUrl","replicatedNodes","StyledIcon","ReplicatedNodes","listOpen","setListOpen","toggleListOpen","iconLeft","SpacePanelIframe","spacePanelMessage","promptContent","signIn","signUp","SignInPrompt","NoNetwork","viewBox","xmlns","fillRule","clipRule","OfflinePrompt","replicatedNodesSelector","visitedNodesSelector","visitedNodes","globalRegistry","selectIsUsingGlobalRegistry","switchIdentity","persist","pointerEvents","setLsValue","selectSpacePanelIsActive","Layout","printMode","mapTheme","slate","white","DefaultTheme","MigrationModal","migrationModalPromoInfo","setUserPrefrence","savePromoRemindMeSelection","migrationModalPromo","requestRefreshOfAccess","isRememberChoiceChecked","setIsRememberChoiceChecked","toPath","userPreference","handleClickedCTA2","CTA2","tickBoxOption","makeUTMParameters","modalPromo","utmParametersToString","migrationmodalInfo","PROMO_SIGN_UP_CLOUD","preferenceID","PROMO_SIGN_IN_CLOUD","PROMO_IVNITED_TO_SPACE","PROMO_CLAIM_NODE","PROMO_TO_USE_NEW_DASHBAORD","FALLBACK_TO_AGENT","NO_INFO_FALLBACK_TO_AGENT","modalStatusWithPromoFunctions","userSavedPreference","nodeClaimedStatus","useMigrationModal","modalStatus","MigrationManager","cloudUrl","selectSignInUrl","term","linkToCoud","redirectURI","hasPromoSelectionSaved","isPromoEligibleForShow","showModalTimer","goToCloud","App","useStore","refreshHelper","setRefreshHelper","haveDOMReadyForParsing","loadOverlay","shouldUseRegistry","useRegistry","shouldUseAlarms","selectHasStartedAlarms","useAlarms","shouldUseInfo","useInfo","hasFetchDependencies","setHasFetchDependencies","bootstrap_css","dashboard_css","useChartsMetadata","selectHasFetchedInfo","selectTheme","alarmWhen","alarmTime","alarmChart","alarmValue","useAlarmFromUrl","ReactDOM","render","module","exports","require","code","f","fun","nextTick","apply","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","binding","cwd","chdir","umask","2","defineProperty","__esModule","extractSeries","rollingAverage","3","pow","4","5","onPointsCreated_","y_top","NaN","y_bottom","yval_minus","yval_plus","getExtremeYValues","onLineEvaluated","calcYNormal_","6","X","Y","EXTRAS","seriesToPoints","yval","canvasx","canvasy","7","8","9","dygraph_","layout","elementContext","height_","width_","isCanvasSupported","getPlotArea","canvas_ctx_","clip","hidden_ctx_","_updatePoints","_renderLineChart","_getIteratorPredicate","_predicateThatSkipsEmptyPoints","_drawStyledLine","getBooleanOption","setName","isArrayLike","createIterator","drawingContext","setLineDash","_drawSeries","_drawPointsOnLine","restore","array_","end_","predicate_","start_","moveTo","lineTo","nextIdx_","hasNext","peek","setNames","colorsMap_","axisPropertiesForSeries","plotArea","seriesIndex","seriesCount","singleSeriesName","allSeriesPoints","_Plotters","linePlotter","_linePlotter","fillPlotter","_fillPlotter","errorPlotter","_errorPlotter","getNumericOption","Circles","DEFAULT","toRGB_","closePath","_fastCanvasProxy","splice","_count","getLabels","getColors","A","minyval","yscale","O","D","E","L","S","P","C","M","FORCE_FAST_PROXY","N","F","isOK","k","y_stacked","10","highlightSeriesBackgroundColor","axisTickSize","xValueParser","delimiter","sigma","errorBars","fractions","wilsonInterval","customBars","drawAxesAtZero","xLabelHeight","defaultModel","rangeSelectorHeight","rangeSelectorPlotStrokeColor","rangeSelectorPlotFillGradientColor","rangeSelectorPlotFillColor","rangeSelectorBackgroundStrokeColor","rangeSelectorBackgroundLineWidth","rangeSelectorPlotLineWidth","rangeSelectorForegroundStrokeColor","rangeSelectorForegroundLineWidth","rangeSelectorAlpha","showInRangeSelector","plugins","dateAxisLabelFormatter","valueFormatter","dateValueFormatter","independentTicks","numberValueFormatter","numberAxisLabelFormatter","numericTicks","11","date_graph","layout_","12","dragEndX","dragGetX_","dragEndY","dragGetY_","dragStartX","dragStartY","lastx_","treatMouseOpAsClick","regionWidth","regionHeight","getOptionForAxis","initialLeftmostDate","log10","xUnitsPerPixel","xAxisExtremes","boundedDates","toDataYCoord","boundedValues","attributes_","getForAxis","initialTopValue","dragValueRange","unitsPerPixel","dateWindow_","LOG_SCALE","maybeTreatMouseOpAsClick","zoomMoved","dragDirection","VERTICAL","HORIZONTAL","drawZoomRect_","prevDragDirection","prevEndX","prevEndY","getFunctionOption","MAX_VALUE","selPoints_","cancelable","cascadeEvents_","pts","doZoomX_","cancelNextDblclick","doZoomY_","startTouch","startTimeForDoubleTapMs","pageY","dataX","dataY","initialTouches","initialPinchCenter","initialRange","moveTouch","endTouch","changedTouches","doubleTapX","screenX","doubleTapY","screenY","resetZoom","findPos","canvas_","offsetWidth","offsetHeight","addAndTrackEvent","removeEvent","willDestroyContextMyself","nonInteractiveModel_","dragIsPanInteractionModel","13","annotations","yAxes_","xTicks_","yTicks_","addDataset","area_","computePlotArea","chart_div","graphDiv","reserveSpaceLeft","reserveSpaceRight","reserveSpaceTop","reserveSpaceBottom","chartRect","setAnnotations","setXTicks","setYAxes","evaluate","_xAxis","_evaluateLimits","_evaluateLineCharts","_evaluateLineTicks","_evaluateAnnotations","minval","maxval","xlogrange","xlogscale","computedValueRange","maxyval","yrange","ylogrange","ylogscale","calcXNormal_","getForSeries","yval_stacked","dataHandler_","xticks","label_v","toPercentXCoord","pos","has_tick","yticks","toPercentYCoord","series","annotated_points","removeAllDatasets","setPointsLengths","setPointsOffsets","14","_process","15","xAxis_","series_","global_","attrs_","user_","user_attrs_","labels_","highlightSeries_","reparseSeries","AXIS_STRING_MAPPINGS_","y1","Y1","Y2","axisToIndex_","yAxis","getGlobalUser_","getGlobalDefault_","getHighlightSeries","numAxes","axisForSeries","axisOptions","seriesForAxis","seriesNames","16","numericLinearTicks","binarySearch","tickValue","pixel_coord","MILLISECONDLY","TWO_MILLISECONDLY","FIVE_MILLISECONDLY","TEN_MILLISECONDLY","FIFTY_MILLISECONDLY","HUNDRED_MILLISECONDLY","FIVE_HUNDRED_MILLISECONDLY","SECONDLY","TWO_SECONDLY","FIVE_SECONDLY","TEN_SECONDLY","THIRTY_SECONDLY","MINUTELY","TWO_MINUTELY","FIVE_MINUTELY","TEN_MINUTELY","THIRTY_MINUTELY","HOURLY","TWO_HOURLY","SIX_HOURLY","DAILY","TWO_DAILY","WEEKLY","MONTHLY","QUARTERLY","BIANNUAL","ANNUAL","DECADAL","CENTENNIAL","NUM_GRANULARITIES","Granularity","datefield","spacing","DateAccessorsUTC","DateAccessorsLocal","getMilliseconds","getDay","makeDate","getDateAxis","17","toExponential","toPrecision","nt","rt","ot","st","cancelEvent","cancelBubble","returnValue","hsvToRGB","pageXOffset","scrollLeft","pageYOffset","py","isValidPoint","floatFormat","hmsString_","dateString_","round_","dateParser","dateStrToMillis","updateDeep","nodeName","isDateLike","createCanvas","getContextPixelRatio","devicePixelRatio","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","Iterator","repeatAndCleanup","et","isPixelChangingOptionList","at","detectLineDelimiter","isNodeContainedBy","getComputedStyle","parseFloat_","G","lt","W","LN_TEN","U","logRangeFraction","DOTTED_LINE","DASHED_LINE","DOT_DASH_LINE","addEvent","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","getUTCDay","UTC","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","requestAnimFrame","annotationClickHandler","annotationDblClickHandler","annotationMouseOutHandler","annotationMouseOverHandler","clickCallback","drawHighlightPointCallback","drawPointCallback","panEdgeFraction","pixelsPerYLabel","pointClickCallback","it","18","Symbol","iterator","return","TypeError","R","H","Z","Q","__init__","NAME","VERSION","DEFAULT_ROLL_PERIOD","DEFAULT_WIDTH","DEFAULT_HEIGHT","ANIMATION_STEPS","ANIMATION_DURATION","Plotters","addedAnnotationCSS","is_initial_draw_","readyFns_","copyUserAttrs_","maindiv_","file_","rollPeriod_","rollPeriod","previousVerticalX_","fractions_","annotations_","boundaryIds_","setIndexByName_","datasetIndex_","registeredEvents_","eventListeners_","createInterface_","plugins_","PLUGINS","plugin","activate","events","pluginOptions","createDragInterface_","defaultPrevented","propagationStopped","getPluginInstance_","isZoomed","attr_","getStringOption","optionsViewForAxis_","numRows","rawData_","gatherDatasets_","rolledSeries_","computeYAxisRanges_","toDataCoords","numColumns","getValue","hidden_","createPlotKitCanvas_","resizeElements_","mouseEventElement_","createMouseEventElement_","mouseMoveHandler_","mouseMove_","mouseOutHandler_","fromElement","relatedTarget","toElement","mouseOut_","resizeHandler_","removeTrackedEvents_","hasChildNodes","firstChild","setColors_","colors_","getPropertiesForSeries","createRollInterface_","roller_","onchange","adjustRoll","cover","draggingDate","draggingValue","uncover","currentZoomRectArgs_","doZoomXDates_","doAnimatedZoom","zoomAnimationFunction","eventToDomCoords","findClosestRow","findClosestPoint","seriesName","findStackedPoint","getLeftBoundary_","isSeriesLocked","lastRow_","highlightSet_","animateSelection_","fadeLevel","animateId","updateSelection_","selectedRow","selectedX","selectedPoints","lockedSet_","loadedEvent_","parseCSV_","cascadeDataDidUpdateEvent_","predraw_","addXTicks_","getHandlerClass_","computeYAxes_","drawingTimeMs_","PointType","stackPoints_","boundaryIds","renderGraph_","readyFired_","detectTypeFromString_","setXAxisOptions_","parseArray_","parseDataTable_","getNumberOfColumns","getNumberOfRows","getColumnType","getColumnLabel","shortText","fromCharCode","getColumnRange","XMLHttpRequest","ActiveXObject","onreadystatechange","readyState","responseText","send","resize_lock","setVisibility","indexFromSetName","getRowForX","ready","elem","GVizChart","nonInteractiveModel","Plugins","Axes","Annotations","ChartLabels","Grid","RangeSelector","DataHandlers","DefaultHandler","BarsHandler","CustomBarsHandler","DefaultFractionHandler","ErrorBarsHandler","FractionsBarsHandler","19","20","clearChart","didDrawChart","detachLabels","tickHeight","cssClass","createTextNode","attachAtBottom","borderColor","tickColor","tickWidth","21","xlabels_","ylabels_","willDrawChart","22","title_div_","xlabel_div_","ylabel_div_","y2label_div_","detachLabels_","23","24","legend_div_","is_generated_div_","one_em_width_","deselect","predraw","generateLegendHTML","dashHTML","labelHTML","xHTML","yHTML","isHighlighted","defaultFormatter","25","hasTouchInterface_","TouchEvent","isMobileDevice_","appVersion","interfaceCreated_","getOption_","reserveSpace_","renderStaticLayer_","renderInteractiveLayer_","bgcanvas_","fgcanvas_","leftZoomHandle_","rightZoomHandle_","setDefaultOption_","createCanvases_","createZoomHandles_","initInteraction_","addToGraph_","graphDiv_","removeFromGraph_","updateVisibility_","resize_","drawStaticLayer_","isChangingRange_","placeZoomHandles_","drawInteractiveLayer_","canvasRect_","bgcanvas_ctx_","fgcanvas_ctx_","cursor","Image","leftHandlePos","rightHandlePos","clientX","srcElement","getZoomHandleStatus_","targetTouches","opera","drawMiniPlot_","computeCombinedSeriesAndLimits_","yMax","yMin","createLinearGradient","addColorStop","MIN_VALUE","withContext","collected","viewed","enabledDimensions","isCurrentlySelected","fragmentParamsSeparatorRegEx","param","makeHashFromObject","allParams","allParamsResult","mergeDeepLeft","excludedParams","filteredParams","getFilteredHash","htmlIframeElement","iframeElement","contentWindow","postMessage","messageType","defaultState","lastMessage","setLastMessage","handleMessage","resetMesssage","process","isRegistrySelector","offlineSelector","signInUrl","useSelectorOriginal","useDispatchOriginal","getIsDemo","selectGlobal","globalState","selectOptions","optionName","selectChartsMetadata","allMetadata","assign","meta","INITIAL_OPTIONS","netdataNoBootstrap","optionsFromLocalStorage","localStorageKeyToOption","parsed","getItemFromLocalStorage","overridenOptions"],"mappings":";gIAAA,oEAAO,IA4LHA,EACAC,EA7LSC,EAAU,SAACC,GACtB,OAAIA,GAAK,IAAMA,EAAI,GACX,IAAN,OAAWA,GAEP,GAAN,OAAUA,IAuBNC,EAAe,SAACC,EAAiBC,GACrC,IAAIC,EAAgBC,KAAKC,IAAIJ,GAEvBK,EAAuB,SAAhBJ,EAAyBE,KAAKG,MAAMJ,EAAgB,OAAS,EAC1EA,GAAwB,MAAPG,EAEjB,IAAME,EACY,SAAhBN,GAA0C,UAAhBA,EAA0BE,KAAKG,MAAMJ,EAAgB,MAAQ,EACzFA,GAAyB,KAARK,EAEjB,IAAMC,EAAUL,KAAKG,MAAMJ,EAAgB,IAC3CA,GAA2B,GAAVM,EAEjB,IAAMC,EAA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AAW,UAAlC,OACO74E,KCZAs+E,GAAY,CACvB,CACE/sG,MAAO,yBACPgtG,KAAM,MACNjzE,KAAM,+BACN7U,IAAK,CAAC,eAER,CACEllB,MAAO,SACPgtG,KAAM,IACNjzE,KAAM,gCACN7U,IAAK,CAAC,aAAc,iBAAkB,eAAgB,sBAExD,CACEllB,MAAO,yBACPgtG,KAAM,MACNjzE,KAAM,SACN7U,IAAK,CACH,aACA,mBACA,mBACA,oBACA,mBAGJ,CACEllB,MAAO,wBACPgtG,KAAM,OACNjzE,KAAM,SACN7U,IAAK,CACH,oBACA,iBACA,eACA,gBACA,oBAGJ,CACEllB,MAAO,iCACPgtG,KAAM,MACNjzE,KAAM,kBACN7U,IAAK,CAAC,yBAER,CACEllB,MAAO,wBACPgtG,KAAM,MACNjzE,KAAM,6BACN7U,IAAK,CACH,iBACA,sBACA,kBACA,oBACA,qBACA,YAGJ,CACEllB,MAAO,4BACPgtG,KAAM,OACNjzE,KAAM,UACN7U,IAAK,CACH,kBACA,uBACA,qBACA,kBACA,cAGJ,CACEllB,MAAO,kCACPgtG,KAAM,MACNjzE,KAAM,8BACN7U,IAAK,CAAC,oBAAqB,qBAE7B,CACEllB,MAAO,yBACPgtG,KAAM,MACNjzE,KAAM,8BACN7U,IAAK,CACH,gBACA,wBACA,iBACA,mBACA,iBACA,kBACA,sBACA,YAGJ,CACEllB,MAAO,gCACPgtG,KAAM,OACNjzE,KAAM,kBACN7U,IAAK,CACH,iBACA,qBACA,sBACA,oBACA,kBACA,sBACA,YACA,sBAGJ,CACEllB,MAAO,wBACPgtG,KAAM,MACNjzE,KAAM,6BACN7U,IAAK,CACH,kBACA,uBACA,4BACA,oBACA,oBACA,8BACA,8BACA,iCACA,sBACA,uBACA,mBACA,mBACA,YAGJ,CACEllB,MAAO,iCACPgtG,KAAM,MACNjzE,KAAM,sCACN7U,IAAK,CACH,yBACA,iBACA,iBACA,sBACA,sBAGJ,CACEllB,MAAO,+BACPgtG,KAAM,OACNjzE,KAAM,eACN7U,IAAK,CAAC,iBAAkB,0BAE1B,CACEllB,MAAO,2BACPgtG,KAAM,OACNjzE,KAAM,sBACN7U,IAAK,CACH,iBACA,iBACA,wBACA,mBACA,oBACA,kBACA,eACA,iBACA,qBACA,cAGJ,CACEllB,MAAO,wBACPgtG,KAAM,MACNjzE,KAAM,6BACN7U,IAAK,CACH,kBACA,iBACA,6BACA,4BACA,0BACA,kBACA,8BACA,qBACA,mBACA,iBACA,mBACA,kBACA,sBACA,yBACA,sBACA,kBACA,YAGJ,CACEllB,MAAO,2BACPgtG,KAAM,OACNjzE,KAAM,iBACN7U,IAAK,CAAC,0BAA2B,wBAAyB,yBAE5D,CACEllB,MAAO,0BACPgtG,KAAM,MACNjzE,KAAM,UACN7U,IAAK,CAAC,oBAER,CACEllB,MAAO,yBACPgtG,KAAM,MACNjzE,KAAM,WACN7U,IAAK,CAAC,qBAER,CACEllB,MAAO,yBACPgtG,KAAM,MACNjzE,KAAM,yBACN7U,IAAK,CACH,oBACA,oBACA,kBACA,kBACA,gBACA,qBAGJ,CACEllB,MAAO,kCACPgtG,KAAM,OACNjzE,KAAM,SACN7U,IAAK,CAAC,uBAAwB,mBAEhC,CACEllB,MAAO,2BACPgtG,KAAM,OACNjzE,KAAM,uCACN7U,IAAK,CACH,mBACA,kBACA,gBACA,mBACA,uBACA,oBACA,kBACA,mBACA,qBACA,kBACA,qBACA,iBACA,qBACA,iBACA,wBACA,iBACA,kBACA,qBACA,qBACA,wBACA,sBACA,sBACA,wBACA,wBACA,mBACA,mBACA,oBACA,qBACA,kBACA,cAGJ,CACEllB,MAAO,2BACPgtG,KAAM,OACNjzE,KAAM,WACN7U,IAAK,CAAC,mBAAoB,sBAE5B,CACEllB,MAAO,6BACPgtG,KAAM,MACNjzE,KAAM,eACN7U,IAAK,CAAC,qBAER,CACEllB,MAAO,iCACPgtG,KAAM,QACNjzE,KAAM,WACN7U,IAAK,CAAC,sBAER,CACEllB,MAAO,0BACPgtG,KAAM,MACNjzE,KAAM,eACN7U,IAAK,CACH,6BACA,iCACA,0BACA,6BACA,6BACA,4BACA,4BACA,uBACA,oBACA,kBACA,gBACA,oBAGJ,CACEllB,MAAO,2BACPgtG,KAAM,OACNjzE,KAAM,qBACN7U,IAAK,CACH,oBACA,gBACA,kBACA,oBACA,iBACA,qBACA,iBACA,mBACA,qBACA,mBACA,cAGJ,CACEllB,MAAO,0BACPgtG,KAAM,MACNjzE,KAAM,YACN7U,IAAK,CAAC,oBAER,CACEllB,MAAO,2BACPgtG,KAAM,MACNjzE,KAAM,aACN7U,IAAK,CAAC,uBAER,CACEllB,MAAO,sBACPgtG,KAAM,MACNjzE,KAAM,WACN7U,IAAK,CAAC,kBAER,CACEllB,MAAO,SACPgtG,KAAM,IACNjzE,KAAM,gCACN7U,IAAK,CAAC,kBAAmB,yBAA0B,cAErD,CACEllB,MAAO,6BACPgtG,KAAM,MACNjzE,KAAM,qBACN7U,IAAK,IAEP,CACEllB,MAAO,uBACPgtG,KAAM,MACNjzE,KAAM,SACN7U,IAAK,CAAC,uBAAwB,oBAEhC,CACEllB,MAAO,2BACPgtG,KAAM,OACNjzE,KAAM,iBACN7U,IAAK,CAAC,sBAAuB,cAE/B,CACEllB,MAAO,wBACPgtG,KAAM,MACNjzE,KAAM,aACN7U,IAAK,CAAC,oBAAqB,oBAE7B,CACEllB,MAAO,MACPgtG,KAAM,MACNjzE,KAAM,6BACN7U,IAAK,CAAC,uBAAwB,YAEhC,CACEllB,MAAO,oBACPgtG,KAAM,MACNjzE,KAAM,oBACN7U,IAAK,CAAC,qBAAsB,kBAAmB,gBAAiB,kBAElE,CACEllB,MAAO,oBACPgtG,KAAM,MACNjzE,KAAM,iBACN7U,IAAK,CACH,kBACA,kBACA,mBACA,gBACA,kBAGJ,CACEllB,MAAO,0BACPgtG,KAAM,MACNjzE,KAAM,sBACN7U,IAAK,CACH,iBACA,eACA,gBACA,gBACA,gBACA,iBACA,eACA,kBACA,cACA,kBACA,oBACA,qBACA,kBACA,qBACA,uBAGJ,CACEllB,MAAO,0BACPgtG,KAAM,OACNjzE,KAAM,mDACN7U,IAAK,CACH,sBACA,mBACA,iBACA,gBACA,kBACA,mBACA,oBACA,eACA,gBACA,cACA,cACA,oBACA,mBACA,eACA,iBACA,gBACA,kBAGJ,CACEllB,MAAO,+BACPgtG,KAAM,OACNjzE,KAAM,oDACN7U,IAAK,CACH,kBACA,oBACA,kBACA,mBACA,mBACA,gBACA,kBAGJ,CACEllB,MAAO,wBACPgtG,KAAM,MACNjzE,KAAM,sCACN7U,IAAK,CAAC,eAAgB,kBAAmB,oBAAqB,gBAAiB,iBAEjF,CACEllB,MAAO,iCACPgtG,KAAM,OACNjzE,KAAM,mCACN7U,IAAK,CAAC,kBAAmB,gBAAiB,gBAAiB,kBAE7D,CACEllB,MAAO,kCACPgtG,KAAM,QACNjzE,KAAM,sBACN7U,IAAK,CACH,iBACA,gBACA,qBACA,gBACA,kBACA,eACA,oBACA,gBACA,gBACA,kBACA,gBACA,oBACA,eACA,cAGJ,CACEllB,MAAO,wBACPgtG,KAAM,MACNjzE,KAAM,WACN7U,IAAK,CAAC,oBAER,CACEllB,MAAO,oBACPgtG,KAAM,MACNjzE,KAAM,oBACN7U,IAAK,CAAC,eAAgB,gBAAiB,mBAAoB,oBAE7D,CACEllB,MAAO,4BACPgtG,KAAM,OACNjzE,KAAM,SACN7U,IAAK,CAAC,gBAER,CACEllB,MAAO,sBACPgtG,KAAM,MACNjzE,KAAM,QACN7U,IAAK,CAAC,iBAER,CACEllB,MAAO,sBACPgtG,KAAM,MACNjzE,KAAM,WACN7U,IAAK,CAAC,kBAER,CACEllB,MAAO,0BACPgtG,KAAM,OACNjzE,KAAM,YACN7U,IAAK,CACH,eACA,gBACA,mBACA,kBACA,kBACA,cACA,mBACA,iBACA,cACA,eACA,iBACA,kBACA,iBACA,sBAGJ,CACEllB,MAAO,6BACPgtG,KAAM,OACNjzE,KAAM,mBACN7U,IAAK,CACH,kBACA,mBACA,kBACA,gBACA,sBACA,gBACA,oBACA,gBACA,gBACA,gBACA,iBACA,cAGJ,CACEllB,MAAO,oBACPgtG,KAAM,MACNjzE,KAAM,gDACN7U,IAAK,CACH,kBACA,cACA,mBACA,cACA,eACA,iBACA,kBACA,iBACA,sBAGJ,CACEllB,MAAO,uBACPgtG,KAAM,MACNjzE,KAAM,WACN7U,IAAK,CAAC,oBAER,CACEllB,MAAO,uBACPgtG,KAAM,MACNjzE,KAAM,YACN7U,IAAK,CAAC,mBAER,CACEllB,MAAO,sBACPgtG,KAAM,MACNjzE,KAAM,UACN7U,IAAK,CAAC,mBAER,CACEllB,MAAO,uBACPgtG,KAAM,MACNjzE,KAAM,QACN7U,IAAK,CAAC,eAER,CACEllB,MAAO,uBACPgtG,KAAM,MACNjzE,KAAM,UACN7U,IAAK,CAAC,iBAER,CACEllB,MAAO,4BACPgtG,KAAM,MACNjzE,KAAM,cACN7U,IAAK,CAAC,uBAER,CACEllB,MAAO,qBACPgtG,KAAM,MACNjzE,KAAM,iBACN7U,IAAK,CAAC,YAAa,eAAgB,cAAe,aAAc,gBAElE,CACEllB,MAAO,0BACPgtG,KAAM,OACNjzE,KAAM,UACN7U,IAAK,CACH,qBACA,gBACA,uBACA,kBACA,cACA,iBACA,kBACA,mBACA,iBACA,mBACA,YACA,sBACA,gBACA,mBAGJ,CACEllB,MAAO,uBACPgtG,KAAM,MACNjzE,KAAM,2CACN7U,IAAK,CAAC,eAAgB,gBAAiB,oBAAqB,mBAAoB,iBAElF,CACEllB,MAAO,cACPgtG,KAAM,OACNjzE,KAAM,6BACN7U,IAAK,CAAC,mBAAoB,gBAAiB,qBAE7C,CACEllB,MAAO,qBACPgtG,KAAM,MACNjzE,KAAM,SACN7U,IAAK,CAAC,gBAER,CACEllB,MAAO,wBACPgtG,KAAM,MACNjzE,KAAM,oBACN7U,IAAK,CAAC,aAAc,cAAe,cAErC,CACEllB,MAAO,2BACPgtG,KAAM,MACNjzE,KAAM,OACN7U,IAAK,CAAC,cAER,CACEllB,MAAO,0BACPgtG,KAAM,MACNjzE,KAAM,aACN7U,IAAK,CAAC,cAAe,mBAAoB,mBAE3C,CACEllB,MAAO,yBACPgtG,KAAM,MACNjzE,KAAM,UACN7U,IAAK,CAAC,iBAER,CACEllB,MAAO,yBACPgtG,KAAM,MACNjzE,KAAM,UACN7U,IAAK,CAAC,iBAER,CACEllB,MAAO,4BACPgtG,KAAM,MACNjzE,KAAM,QACN7U,IAAK,CAAC,eAER,CACEllB,MAAO,0BACPgtG,KAAM,OACNjzE,KAAM,qBACN7U,IAAK,CACH,oBACA,aACA,cACA,gBACA,gBACA,YACA,iBACA,gBACA,YACA,mBACA,oBAGJ,CACEllB,MAAO,qBACPgtG,KAAM,OACNjzE,KAAM,gBACN7U,IAAK,CAAC,uBAER,CACEllB,MAAO,yBACPgtG,KAAM,MACNjzE,KAAM,qBACN7U,IAAK,CAAC,iBAER,CACEllB,MAAO,sBACPgtG,KAAM,MACNjzE,KAAM,sCACN7U,IAAK,CAAC,iBAER,CACEllB,MAAO,0BACPgtG,KAAM,OACNjzE,KAAM,sBACN7U,IAAK,CAAC,iBAER,CACEllB,MAAO,sBACPgtG,KAAM,MACNjzE,KAAM,YACN7U,IAAK,CAAC,mBAER,CACEllB,MAAO,6BACPgtG,KAAM,OACNjzE,KAAM,sBACN7U,IAAK,CACH,oBACA,cACA,eACA,iBACA,cACA,YACA,kBAGJ,CACEllB,MAAO,2BACPgtG,KAAM,MACNjzE,KAAM,QACN7U,IAAK,CAAC,aAAc,iBAEtB,CACEllB,MAAO,wBACPgtG,KAAM,MACNjzE,KAAM,mBACN7U,IAAK,CAAC,eAAgB,iBAExB,CACEllB,MAAO,wBACPgtG,KAAM,OACNjzE,KAAM,0BACN7U,IAAK,CACH,mBACA,eACA,YACA,eACA,kBACA,iBACA,cACA,iBACA,YACA,qBAGJ,CACEllB,MAAO,gCACPgtG,KAAM,QACNjzE,KAAM,cACN7U,IAAK,CAAC,oBAAqB,mBAAoB,cAEjD,CACEllB,MAAO,s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B,GAtCwB,GAsExBhyH,EAAmC,WAC9C,IAAMiyH,EAA0BnhI,OAAOlB,KAAK6D,cACzC4K,QAAO,SAAAyB,GAAG,OAAIA,EAAI4R,WAAW,aA7GE,iBA6Ga5R,KAC5CvB,KAAI,SAAAuB,GAAG,sBAhCoB,SAAmBA,GAAnB,OAC9BA,EAAInG,QAAQ,aAAc,IAAIA,QA/EI,eAHf,SAkHdu4H,CAAwBpyH,GA9BC,SAAmBA,GACjD,IAOIqyH,EAPEpjI,EAAQ0E,aAAakjB,QAAQ7W,GAGnC,GAAc,OAAV/Q,GAA4B,cAAVA,EAEpB,OADA0E,aAAa+iB,WAAW1W,GACjB,KAGT,IACEqyH,EAAS9xH,KAAKC,MAAMvR,GACpB,MAAO6E,GAGP,MA/FgC,iBA+F5BkM,GAAgC/Q,EAC3BA,GAGTuC,QAAQC,IAAR,wCAA6CuO,EAA7C,qBAEArM,aAAa+iB,WAAW1W,GACjB,MAET,OAAOqyH,EAO6BC,CAAwBtyH,OAEzDzB,QAAO,SAAAo6B,GAAC,OAA4B,OAAxB3nC,OAAO8N,OAAO65B,GAAG,MAE1B45F,EAAmBj0H,YAAS6zH,GAClC,OAAOt3E,YAAWo3E,EAAiBM,IAGxB91H,EAAgCyD,IAChC+R,EAAqBxV,EAA6B,aAElDwD,EAAoB,WACNjP,OAAOlB,KAAK6D,cACpB1C,SAAQ,SAAA+O,IACnBA,EAAI4R,WAAWhgB,MAAmCoO,EAAI4R,WAAW,cACnEje,aAAa+iB,WAAW1W,S","file":"static/js/main.2d23101e.chunk.js","sourcesContent":["export const zeropad = (x: string | number) => {\n if (x > -10 && x < 10) {\n return `0${x}`\n }\n return `${x}`\n}\n\ninterface ScalableUnits {\n [unitGroupName: string]: {\n [unitName: string]: number\n }\n}\n\nexport const leaveAtLeast1Decimal = (number: number) => {\n const decimalPortion = `${number}`.split(\".\")[1]\n if (decimalPortion && decimalPortion.length > 1) {\n return `${number}`\n }\n\n let tms = number * 10\n const integer = Math.floor(tms / 10)\n\n tms -= integer * 10\n return `${integer}.${tms}`\n}\n\ntype TimeUnit = \"MINUTES\" | \"HOURS\" | \"DAYS\"\nconst seconds2time = (seconds: number, maxTimeUnit: TimeUnit) => {\n let secondsReturn = Math.abs(seconds)\n\n const days = maxTimeUnit === \"DAYS\" ? Math.floor(secondsReturn / 86400) : 0\n secondsReturn -= days * 86400\n\n const hours =\n maxTimeUnit === \"DAYS\" || maxTimeUnit === \"HOURS\" ? Math.floor(secondsReturn / 3600) : 0\n secondsReturn -= hours * 3600\n\n const minutes = Math.floor(secondsReturn / 60)\n secondsReturn -= minutes * 60\n\n const daysString = maxTimeUnit === \"DAYS\" ? `${days}d:` : \"\"\n const hoursString = maxTimeUnit === \"DAYS\" || maxTimeUnit === \"HOURS\" ? `${zeropad(hours)}:` : \"\"\n const minutesString = `${zeropad(minutes)}:`\n let secondsString = zeropad(secondsReturn.toFixed(2))\n\n return `${daysString}${hoursString}${minutesString}${secondsString}`\n}\n\nconst scalableUnits: ScalableUnits = {\n \"packets/s\": {\n pps: 1,\n Kpps: 1000,\n Mpps: 1000000,\n },\n pps: {\n pps: 1,\n Kpps: 1000,\n Mpps: 1000000,\n },\n \"kilobits/s\": {\n \"bits/s\": 1 / 1000,\n \"kilobits/s\": 1,\n \"megabits/s\": 1000,\n \"gigabits/s\": 1000000,\n \"terabits/s\": 1000000000,\n },\n \"bytes/s\": {\n \"bytes/s\": 1,\n \"kilobytes/s\": 1024,\n \"megabytes/s\": 1024 * 1024,\n \"gigabytes/s\": 1024 * 1024 * 1024,\n \"terabytes/s\": 1024 * 1024 * 1024 * 1024,\n },\n \"kilobytes/s\": {\n \"bytes/s\": 1 / 1024,\n \"kilobytes/s\": 1,\n \"megabytes/s\": 1024,\n \"gigabytes/s\": 1024 * 1024,\n \"terabytes/s\": 1024 * 1024 * 1024,\n },\n \"B/s\": {\n \"B/s\": 1,\n \"KiB/s\": 1024,\n \"MiB/s\": 1024 * 1024,\n \"GiB/s\": 1024 * 1024 * 1024,\n \"TiB/s\": 1024 * 1024 * 1024 * 1024,\n },\n \"KB/s\": {\n \"B/s\": 1 / 1024,\n \"KB/s\": 1,\n \"MB/s\": 1024,\n \"GB/s\": 1024 * 1024,\n \"TB/s\": 1024 * 1024 * 1024,\n },\n \"KiB/s\": {\n \"B/s\": 1 / 1024,\n \"KiB/s\": 1,\n \"MiB/s\": 1024,\n \"GiB/s\": 1024 * 1024,\n \"TiB/s\": 1024 * 1024 * 1024,\n },\n bytes: {\n bytes: 1,\n kilobytes: 1024,\n megabytes: 1024 * 1024,\n gigabytes: 1024 * 1024 * 1024,\n terabytes: 1024 * 1024 * 1024 * 1024,\n },\n Hz: {\n Hz: 1,\n kHz: 10 ** 3,\n MHz: 10 ** 6,\n GHz: 10 ** 9,\n THz: 10 ** 12,\n PHz: 10 ** 15,\n EHz: 10 ** 18,\n ZHz: 10 ** 21,\n },\n B: {\n B: 1,\n KiB: 1024,\n MiB: 1024 * 1024,\n GiB: 1024 * 1024 * 1024,\n TiB: 1024 * 1024 * 1024 * 1024,\n PiB: 1024 * 1024 * 1024 * 1024 * 1024,\n },\n KB: {\n B: 1 / 1024,\n KB: 1,\n MB: 1024,\n GB: 1024 * 1024,\n TB: 1024 * 1024 * 1024,\n },\n KiB: {\n B: 1 / 1024,\n KiB: 1,\n MiB: 1024,\n GiB: 1024 * 1024,\n TiB: 1024 * 1024 * 1024,\n },\n MB: {\n B: 1 / (1024 * 1024),\n KB: 1 / 1024,\n MB: 1,\n GB: 1024,\n TB: 1024 * 1024,\n PB: 1024 * 1024 * 1024,\n },\n MiB: {\n B: 1 / (1024 * 1024),\n KiB: 1 / 1024,\n MiB: 1,\n GiB: 1024,\n TiB: 1024 * 1024,\n PiB: 1024 * 1024 * 1024,\n },\n GB: {\n B: 1 / (1024 * 1024 * 1024),\n KB: 1 / (1024 * 1024),\n MB: 1 / 1024,\n GB: 1,\n TB: 1024,\n PB: 1024 * 1024,\n EB: 1024 * 1024 * 1024,\n },\n GiB: {\n B: 1 / (1024 * 1024 * 1024),\n KiB: 1 / (1024 * 1024),\n MiB: 1 / 1024,\n GiB: 1,\n TiB: 1024,\n PiB: 1024 * 1024,\n EiB: 1024 * 1024 * 1024,\n },\n /*\n 'milliseconds': {\n 'seconds': 1000\n },\n 'seconds': {\n 'milliseconds': 0.001,\n 'seconds': 1,\n 'minutes': 60,\n 'hours': 3600,\n 'days': 86400\n }\n */\n}\n\nlet currentTemperatureSetting: \"celsius\" | \"fahrenheit\"\nlet currentSecondsAsTimeSetting: boolean\ninterface ConvertibleUnits {\n [unitIn: string]: {\n [unitOut: string]: {\n check: ((number: number) => boolean) | (() => boolean)\n convert: (number: number) => number | string\n }\n }\n}\n\nconst twoFixed =\n (multiplier: number = 1) =>\n (value: number) =>\n (value * multiplier).toFixed(2)\n\nconst convertibleUnits: ConvertibleUnits = {\n Celsius: {\n Fahrenheit: {\n check() {\n return currentTemperatureSetting === \"fahrenheit\"\n },\n convert(value: number) {\n return (value * 9) / 5 + 32\n },\n },\n },\n celsius: {\n fahrenheit: {\n check() {\n return currentTemperatureSetting === \"fahrenheit\"\n },\n convert(value: number) {\n return (value * 9) / 5 + 32\n },\n },\n },\n milliseconds: {\n microseconds: {\n check: (max: number) => max < 1,\n convert: twoFixed(1000),\n },\n milliseconds: {\n check: (max: number) => max >= 1 && max < 1000,\n convert: twoFixed(),\n },\n seconds: {\n check: (max: number) => max >= 1000 && max < 60000,\n convert: twoFixed(0.001),\n },\n \"MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 60000 && max < 3600_000,\n convert: (value: number) => seconds2time(value / 1000, \"MINUTES\"),\n },\n \"HH:MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 3600_000 && max < 86_400_000,\n convert: (value: number) => seconds2time(value / 1000, \"HOURS\"),\n },\n \"dHH:MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 86_400_000,\n convert: (value: number) => seconds2time(value / 1000, \"DAYS\"),\n },\n },\n\n seconds: {\n microseconds: {\n check: (max: number) => max < 0.001,\n convert: twoFixed(1000_000),\n },\n milliseconds: {\n check: (max: number) => max >= 0.001 && max < 1,\n convert: twoFixed(1000),\n },\n seconds: {\n check: (max: number) => max >= 1 && max < 60,\n convert: twoFixed(1),\n },\n \"MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 60 && max < 3600,\n convert: (value: number) => seconds2time(value, \"MINUTES\"),\n },\n \"HH:MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 3600 && max < 86_400,\n convert: (value: number) => seconds2time(value, \"HOURS\"),\n },\n \"dHH:MM:SS.ms\": {\n check: (max: number) => currentSecondsAsTimeSetting && max >= 86_400,\n convert: (value: number) => seconds2time(value, \"DAYS\"),\n },\n },\n}\n\nconst identity = (value: number) => value\n\ninterface Keys {\n [commonUnitsKey: string]: {\n [uuid: string]: {\n divider: number\n units: string\n }\n }\n}\ninterface Latest {\n [commonUnitsKey: string]: {\n divider: number\n units: string\n }\n}\nexport const unitsConversionCreator = {\n // todo lift the state\n keys: {} as Keys, // keys for data-common-units\n latest: {} as Latest, // latest selected units for data-common-units\n\n globalReset() {\n this.keys = {}\n this.latest = {}\n },\n\n // get a function that converts the units\n // + every time units are switched call the callback\n get(\n uuid: string,\n min: number,\n max: number,\n units: string | undefined,\n desiredUnits: undefined | null | string,\n commonUnitsName: string | null | undefined,\n switchUnitsCallback: (units: string) => void,\n temperatureSetting: \"celsius\" | \"fahrenheit\",\n secondsAsTimeSetting: boolean\n ) {\n // validate the parameters\n if (typeof units === \"undefined\") {\n // eslint-disable-next-line no-param-reassign\n units = \"undefined\"\n }\n\n // it will be removed when we'll lift the state to redux\n currentTemperatureSetting = temperatureSetting\n currentSecondsAsTimeSetting = secondsAsTimeSetting\n\n // check if we support units conversion\n if (typeof scalableUnits[units] === \"undefined\"\n && typeof convertibleUnits[units] === \"undefined\"\n ) {\n // we can't convert these units\n // console.log('DEBUG: ' + uuid.toString() + ' can\\'t convert units: ' + units.toString());\n return (value: number) => value\n }\n\n // check if the caller wants the original units\n if (desiredUnits === undefined || desiredUnits === null || desiredUnits === \"original\"\n || desiredUnits === units\n ) {\n // console.log('DEBUG: ' + uuid.toString() + ' original units wanted');\n switchUnitsCallback(units)\n return identity\n }\n\n // now we know we can convert the units\n // and the caller wants some kind of conversion\n\n let tunits = null\n let tdivider = 0\n\n if (typeof scalableUnits[units] !== \"undefined\") {\n // units that can be scaled\n // we decide a divider\n\n if (desiredUnits === \"auto\") {\n // the caller wants to auto-scale the units\n\n // find the absolute maximum value that is rendered on the chart\n // based on this we decide the scale\n /* eslint-disable no-param-reassign */\n min = Math.abs(min)\n max = Math.abs(max)\n if (min > max) {\n max = min\n }\n /* eslint-enable no-param-reassign */\n\n const scalableUnitsGroup = scalableUnits[units]\n Object.keys(scalableUnitsGroup).forEach((unit) => {\n const unitDivider = scalableUnitsGroup[unit]\n if (unitDivider <= max && unitDivider > tdivider) {\n tunits = unit\n tdivider = unitDivider\n }\n })\n\n if (tunits === null || tdivider <= 0) {\n // we couldn't find auto-scaling candidate for unit\n switchUnitsCallback(units)\n return identity\n }\n\n if (typeof commonUnitsName === \"string\") {\n // the caller wants several charts to have the same units\n // data-common-units\n\n const commonUnitsKey = `${commonUnitsName}-${units}`\n\n // add our divider into the list of keys\n let t = this.keys[commonUnitsKey]\n if (typeof t === \"undefined\") {\n this.keys[commonUnitsKey] = {}\n t = this.keys[commonUnitsKey]\n }\n t[uuid] = {\n units: tunits,\n divider: tdivider,\n }\n\n // find the max divider of all charts\n let commonUnits = t[uuid]\n // todo remove imperative forEach\n Object.keys(t).forEach((x) => {\n if (t[x].divider > commonUnits.divider) {\n commonUnits = t[x]\n }\n })\n\n // save our common_max to the latest keys\n const latest = {\n units: commonUnits.units,\n divider: commonUnits.divider,\n }\n this.latest[commonUnitsKey] = latest\n\n tunits = latest.units\n tdivider = latest.divider\n\n // apply it to this chart\n switchUnitsCallback(tunits)\n return (value: number) => {\n if (tdivider !== latest.divider) {\n // another chart switched our common units\n // we should switch them too\n tunits = latest.units\n tdivider = latest.divider\n switchUnitsCallback(tunits)\n }\n\n return value / tdivider\n }\n }\n // the caller did not give data-common-units\n // this chart auto-scales independently of all others\n\n switchUnitsCallback(tunits)\n return (value: number) => value / tdivider\n }\n // the caller wants specific units\n\n if (typeof scalableUnits[units][desiredUnits] !== \"undefined\") {\n // all good, set the new units\n tdivider = scalableUnits[units][desiredUnits]\n switchUnitsCallback(desiredUnits)\n return (value: number) => value / tdivider\n }\n // oops! switch back to original units\n // eslint-disable-next-line no-console\n console.log(`Units conversion from ${units.toString()} to ${desiredUnits.toString()}\n is not supported.`)\n\n switchUnitsCallback(units)\n return identity\n } if (typeof convertibleUnits[units] !== \"undefined\") {\n // units that can be converted\n if (desiredUnits === \"auto\") {\n let newConvertFunction: ((number: number) => number | string) | undefined\n Object.keys(convertibleUnits[units]).forEach((x) => {\n if (newConvertFunction) { return }\n if (convertibleUnits[(units as string)][x].check(max)) {\n // converting\n switchUnitsCallback(x)\n newConvertFunction = convertibleUnits[(units as string)][x].convert\n }\n })\n if (newConvertFunction) {\n return newConvertFunction\n }\n\n // none checked ok (no conversion available)\n switchUnitsCallback(units)\n return identity\n } if (typeof convertibleUnits[units][desiredUnits] !== \"undefined\") {\n switchUnitsCallback(desiredUnits)\n return convertibleUnits[units][desiredUnits].convert\n }\n // eslint-disable-next-line no-console\n console.log(`Units conversion from ${units.toString()} to ${desiredUnits.toString()}\n is not supported.`)\n switchUnitsCallback(units)\n return identity\n }\n // hm... did we forget to implement the new type?\n // eslint-disable-next-line no-console\n console.log(`Unmatched unit conversion method for units ${units.toString()}`)\n switchUnitsCallback(units)\n return identity\n },\n}\n","import React, { useState, useCallback, useEffect } from \"react\"\nimport { ToolboxButton } from \"domains/chart/components/toolbox-button\"\nimport { setResizeHeightAction } from \"domains/chart/actions\"\nimport { LEGEND_BOTTOM_SINGLE_LINE_HEIGHT } from \"domains/chart/utils/legend-utils\"\nimport { useDispatch } from \"store/redux-separate-context\"\n\nexport const LOCALSTORAGE_HEIGHT_KEY_PREFIX_OLD = \"chart_heights.\"\nexport const LOCALSTORAGE_HEIGHT_KEY_PREFIX = \"chart_height.\"\n\ninterface Props {\n chartContainerElement: HTMLElement\n chartUuid: string\n heightId: string | undefined\n isLegendOnBottom: boolean\n}\n\nexport const ResizeHandler = ({\n chartContainerElement, chartUuid, heightId, isLegendOnBottom,\n}: Props) => {\n const [resizeHeight, setResizeHeight] = useState(() => chartContainerElement.clientHeight)\n const dispatch = useDispatch()\n\n useEffect(() => {\n // todo when attributes.id are present, hook height to localStorage\n if (resizeHeight >= 70) {\n dispatch(\n setResizeHeightAction({\n id: chartUuid,\n resizeHeight,\n }),\n )\n }\n }, [resizeHeight, chartUuid, heightId, dispatch])\n\n const handleResize = useCallback(\n (event) => {\n event.preventDefault()\n const intialHeight = chartContainerElement.clientHeight\n const eventStartHeight = event.type === \"touchstart\"\n ? event.touches[0].clientY\n : event.clientY\n\n const setHeight = (currentHeight: number) => {\n const nextHeight = intialHeight + currentHeight - eventStartHeight\n // eslint-disable-next-line no-param-reassign\n chartContainerElement.style.height = `${nextHeight.toString()}px`\n setResizeHeight(nextHeight)\n if (heightId) {\n const heightForPersistance = isLegendOnBottom\n ? (nextHeight - LEGEND_BOTTOM_SINGLE_LINE_HEIGHT)\n : nextHeight\n localStorage.setItem(\n `${LOCALSTORAGE_HEIGHT_KEY_PREFIX}${heightId}`,\n `${heightForPersistance}`,\n )\n }\n }\n\n const onMouseMove = (e: MouseEvent) => setHeight(e.clientY)\n const onTouchMove = (e: TouchEvent) => setHeight(e.touches[0].clientY)\n\n const onMouseEnd = () => {\n document.removeEventListener(\"mousemove\", onMouseMove)\n document.removeEventListener(\"mouseup\", onMouseEnd)\n }\n\n const onTouchEnd = () => {\n document.removeEventListener(\"touchmove\", onTouchMove)\n document.removeEventListener(\"touchend\", onTouchEnd)\n }\n\n if (event.type === \"touchstart\") {\n document.addEventListener(\"touchmove\", onTouchMove)\n document.addEventListener(\"touchend\", onTouchEnd)\n } else {\n document.addEventListener(\"mousemove\", onMouseMove)\n document.addEventListener(\"mouseup\", onMouseEnd)\n }\n },\n [chartContainerElement.clientHeight, chartContainerElement.style.height, heightId,\n isLegendOnBottom],\n )\n\n return (\n <ToolboxButton\n className=\"netdata-legend-resize-handler\"\n onDoubleClick={(event: React.MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n onMouseDown={handleResize}\n onTouchStart={handleResize}\n iconType=\"resize\"\n popoverTitle=\"Chart Resize\"\n popoverContent=\"Drag this point with your mouse or your finger (on touch devices), to resize\n the chart vertically. You can also <b>double click it</b> or <b>double tap it</b> to reset\n between 2 states: the default and the one that fits all the values.<br/><small>Help\n can be disabled from the settings.</small>\"\n />\n )\n}\n","import * as React from \"react\"\nimport classNames from \"classnames\"\n\nimport \"./button.css\"\n\ntype Props = React.ButtonHTMLAttributes<HTMLButtonElement>\nexport const Button = React.forwardRef(({\n children,\n className,\n ...rest\n}: Props, ref: React.Ref<HTMLButtonElement>) => (\n <button\n {...rest} // eslint-disable-line react/jsx-props-no-spreading\n type=\"button\"\n className={classNames(\"netdata-reset-button\", className)}\n ref={ref}\n >\n {children}\n </button>\n))\n","import React, { useRef, useEffect } from \"react\"\nimport classNames from \"classnames\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectShowHelp } from \"domains/global/selectors\"\nimport { Icon, IconType } from \"components/icon\"\nimport { Button } from \"components/button\"\n\ntype ClickCallback = (event: React.MouseEvent) => void\ninterface ToolboxButtonProps {\n className?: string\n iconType: IconType\n onClick?: ClickCallback\n onDoubleClick?: (event: React.MouseEvent) => void\n onMouseDown?: (event: React.MouseEvent) => void\n onTouchStart?: (event: React.TouchEvent) => void\n popoverContent: string\n popoverTitle: string\n}\nexport const ToolboxButton = ({\n className,\n iconType,\n onClick,\n onDoubleClick,\n onMouseDown,\n onTouchStart,\n popoverContent,\n popoverTitle,\n}: ToolboxButtonProps) => {\n const buttonRef = useRef(null)\n const showHelp = useSelector(selectShowHelp)\n useEffect(() => {\n if (buttonRef.current && showHelp) {\n window.$(buttonRef.current).popover({\n container: \"body\",\n animation: false,\n html: true,\n trigger: \"hover\",\n placement: \"bottom\",\n delay: {\n show: window.NETDATA.options.current.show_help_delay_show_ms,\n hide: window.NETDATA.options.current.show_help_delay_hide_ms,\n },\n title: popoverTitle,\n content: popoverContent,\n })\n }\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n return (\n <Button\n className={classNames(className)}\n onClick={onClick}\n onDoubleClick={onDoubleClick}\n onMouseDown={onMouseDown}\n onTouchStart={onTouchStart}\n ref={buttonRef}\n >\n <Icon iconType={iconType} />\n </Button>\n )\n}\n","import { createAction } from \"redux-act\"\n\nimport { createRequestAction } from \"utils/createRequestAction\"\nimport { RegistryMachine } from \"domains/global/sagas\"\nimport { storeKey } from \"./constants\"\nimport { ActiveAlarms, ChartsMetadata, Snapshot, Alarm, UserNodeAccessMessage } from \"./types\"\n\ninterface RequestCommonColors {\n chartContext: string\n chartUuid: string\n colorsAttribute: string | undefined\n commonColorsAttribute: string | undefined\n dimensionNames: string[]\n}\nexport const requestCommonColorsAction = createAction<RequestCommonColors>(\n `${storeKey}/globalRequestCommonColors`\n)\n\ninterface SetCommonMinAction {\n chartUuid: string\n commonMinKey: string\n value: number\n}\nexport const setCommonMinAction = createAction<SetCommonMinAction>(`${storeKey}/setCommonMin`)\n\ninterface SetCommonMaxAction {\n chartUuid: string\n commonMaxKey: string\n value: number\n}\nexport const setCommonMaxAction = createAction<SetCommonMaxAction>(`${storeKey}/setCommonMax`)\n\ninterface SetGlobalSelectionAction {\n chartUuid: string | null\n hoveredX: number\n}\nexport const setGlobalSelectionAction = createAction<SetGlobalSelectionAction>(\n `${storeKey}/setGlobalSelection`\n)\n\nexport interface SetGlobalPanAndZoomAction {\n after: number\n before: number\n masterID?: string\n shouldForceTimeRange?: boolean\n}\nexport const setGlobalPanAndZoomAction = createAction<SetGlobalPanAndZoomAction>(\n `${storeKey}/setGlobalPanAndZoom`\n)\n\nexport const resetGlobalPanAndZoomAction = createAction(`${storeKey}/resetGlobalPanAndZoomAction`)\n\nexport interface SetDefaultAfterAction {\n after: number\n}\nexport const setDefaultAfterAction = createAction<SetDefaultAfterAction>(\n `${storeKey}/setDefaultAfterAction`\n)\n\nexport const resetDefaultAfterAction = createAction(`${storeKey}/resetDefaultAfterAction`)\n\nexport interface SetGlobalChartUnderlayAction {\n after: number\n before: number\n masterID: string\n}\nexport const setGlobalChartUnderlayAction = createAction<SetGlobalChartUnderlayAction>(\n `${storeKey}/setGlobalChartUnderlay`\n)\n\nexport const centerAroundHighlightAction = createAction(`${storeKey}/centerAroundHighlightAction`)\nexport const clearHighlightAction = createAction(`${storeKey}/clearHighlightAction`)\n\ninterface WindowFocusChangeAction {\n hasWindowFocus: boolean\n}\nexport const windowFocusChangeAction = createAction<WindowFocusChangeAction>(\n `${storeKey}/windowFocusChangeAction`\n)\n\nexport interface FetchHelloPayload {\n serverDefault: string\n}\n/* eslint-disable camelcase */\nexport interface HelloResponse {\n action: \"hello\"\n anonymous_statistics: boolean\n cloud_base_url: string\n hostname: string\n machine_guid: string\n registry: string\n status: string\n}\n/* eslint-enable camelcase */\n\nexport const fetchHelloAction = createRequestAction<\n FetchHelloPayload,\n { cloudBaseURL: string; hostname: string; isCloudEnabled: boolean; machineGuid: string }\n>(`${storeKey}/fetchHelloAction`)\n\ninterface UpdatePersonUrlsAction {\n personGuid: string\n registryMachines: { [key: string]: RegistryMachine }\n registryMachinesArray: RegistryMachine[]\n}\nexport const updatePersonUrlsAction = createAction<UpdatePersonUrlsAction>(\n `${storeKey}/updatePersonUrlsAction`\n)\n\nexport interface AccessRegistrySuccessAction {\n registryServer: string\n}\nexport const accessRegistrySuccessAction = createAction<AccessRegistrySuccessAction>(\n `${storeKey}/accessRegistrySuccessAction`\n)\n\nexport interface StartAlarmsPayload {\n serverDefault: string\n}\nexport const startAlarmsAction = createAction<StartAlarmsPayload>(`${storeKey}/startAlarmsAction`)\n\nexport const fetchAllAlarmsAction = createRequestAction(`${storeKey}/fetchAllAlarmsAction`)\n\nexport interface UpdateActiveAlarmAction {\n activeAlarms: ActiveAlarms\n}\nexport const updateActiveAlarmsAction = createAction<UpdateActiveAlarmAction>(\n `${storeKey}/updateActiveAlarmsAction`\n)\n\nexport interface SetOptionAction {\n key: string\n value: unknown\n}\nexport const setOptionAction = createAction<SetOptionAction>(`${storeKey}/setOptionAction`)\n\nexport const resetOptionsAction = createAction(`${storeKey}/resetOptions`)\n\nexport const loadSnapshotAction = createAction<{ snapshot: Snapshot }>(\n `${storeKey}/loadSnapshotAction`\n)\n\nexport const chartsMetadataRequestSuccess = createAction<{ data: ChartsMetadata }>(\n `${storeKey}/chartsMetadataRequestSuccess`\n)\n\nexport interface SetSpacePanelStatusActionPayload {\n isActive: boolean\n}\nexport const setSpacePanelStatusAction = createAction<SetSpacePanelStatusActionPayload>(\n `${storeKey}/setSpacePanelStatusAction`\n)\n\nexport interface SetSpacePanelTransitionEndPayload {\n isActive: boolean\n}\nexport const setSpacePanelTransitionEndAction = createAction<SetSpacePanelTransitionEndPayload>(\n `${storeKey}/setSpacePanelStatusAction`\n)\n\nexport const setAlarmAction = createAction<{ alarm: Alarm }>(`${storeKey}/setAlarmAction`)\n\nexport const resetRegistry = createAction(`${storeKey}/resetRegistry`)\n\nexport const setGlobalPauseAction = createAction(`${storeKey}/setGlobalPauseAction`)\nexport const resetGlobalPauseAction = createAction<{ forcePlay?: boolean }>(\n `${storeKey}/resetGlobalPauseAction`\n)\nexport const setUTCOffset = createAction<{ utcOffset?: number | string }>(\n `${storeKey}/setUTCOffset`\n)\n\nexport const setUserNodeAccess = createAction<{ message: UserNodeAccessMessage }>(\n `${storeKey}/setUserNodeAccess`\n)\n","import { useCallback } from \"react\"\nimport { useDispatch } from \"react-redux\"\nimport { sendToChildIframe, useListenToPostMessage } from \"utils/post-message\"\nimport { setUserNodeAccess } from \"domains/global/actions\"\nimport { UserNodeAccessMessage } from \"domains/global/types\"\nimport { SIGN_IN_IFRAME_ID } from \"components/header/constants\"\n\nconst useUserNodeAccessMessage = () => {\n const dispatch = useDispatch()\n useListenToPostMessage<UserNodeAccessMessage>(\"user-node-access\", message => {\n dispatch(setUserNodeAccess({ message }))\n })\n}\n\nexport const useRequestRefreshOfAccessMessage = () => {\n return useCallback(() => {\n sendToChildIframe(SIGN_IN_IFRAME_ID, { type: \"request-refresh-access\", payload: true })\n }, [])\n}\n\nexport default useUserNodeAccessMessage\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Text, getColor } from \"@netdata/netdata-ui\"\n\nconst BaseAnchor = styled(\"a\")`\n && {\n color: ${getColor(\"primary\")};\n\n :hover {\n color: ${getColor(\"primary\")};\n }\n\n :visited {\n color: ${getColor(\"accent\")};\n }\n }\n`\n\ntype AnchorProps = React.ComponentPropsWithRef<\"a\"> & {\n Component?: React.ElementType\n}\n\nconst Anchor = ({ Component = Text, ...rest }: AnchorProps): any => (\n <Component as={BaseAnchor} {...rest} />\n)\n\nexport default Anchor\n","export * from \"./utils\"\n","export const name2id = (s: string) => s\n .replace(/ /g, \"_\")\n .replace(/:/g, \"_\")\n .replace(/\\(/g, \"_\")\n .replace(/\\)/g, \"_\")\n .replace(/\\./g, \"_\")\n .replace(/\\//g, \"_\")\n","import { init, last, mergeAll } from \"ramda\"\nimport { createReducer } from \"redux-act\"\n\nimport { getInitialAfterFromWindow } from \"utils/utils\"\nimport { isMainJs } from \"utils/env\"\nimport { RegistryMachine } from \"domains/global/sagas\"\nimport { Alarm, ActiveAlarms, Snapshot, ChartsMetadata } from \"domains/global/types\"\nimport { fetchInfoAction } from \"domains/chart/actions\"\nimport { InfoPayload } from \"./__mocks__/info-mock\"\nimport {\n requestCommonColorsAction,\n setGlobalChartUnderlayAction,\n setGlobalSelectionAction,\n setGlobalPanAndZoomAction,\n centerAroundHighlightAction,\n clearHighlightAction,\n resetGlobalPanAndZoomAction,\n setDefaultAfterAction,\n windowFocusChangeAction,\n fetchHelloAction,\n updatePersonUrlsAction,\n startAlarmsAction,\n updateActiveAlarmsAction,\n setOptionAction,\n loadSnapshotAction,\n chartsMetadataRequestSuccess,\n setCommonMaxAction,\n setCommonMinAction,\n resetOptionsAction,\n setSpacePanelStatusAction,\n setSpacePanelTransitionEndAction,\n resetRegistry,\n accessRegistrySuccessAction,\n resetDefaultAfterAction,\n setAlarmAction,\n setGlobalPauseAction,\n resetGlobalPauseAction,\n setUTCOffset,\n setUserNodeAccess,\n} from \"./actions\"\nimport {\n Options,\n optionsMergedWithLocalStorage,\n getOptionsMergedWithLocalStorage,\n clearLocalStorage,\n} from \"./options\"\nimport { CLOUD_BASE_URL_DISABLED } from \"./constants\"\nimport { UserNodeAccessMessage } from \"./types\"\n\ninterface CommonMinMax {\n [commonKey: string]: {\n charts: {\n [chartUuid: string]: number\n }\n currentExtreme: number\n }\n}\n\nexport type StateT = {\n commonColorsKeys: {\n [key: string]: {\n // key can be uuid, chart's context or commonColors attribute\n assigned: {\n // name-value of dimensions and their colors\n [dimensionName: string]: string\n }\n available: string[] // an array of colors available to be used\n custom: string[] // the array of colors defined by the user\n charts: {} // the charts linked to this todo remove\n copyTheme: boolean\n }\n }\n commonMin: CommonMinMax\n commonMax: CommonMinMax\n currentSelectionMasterId: string | null\n globalPanAndZoom: null | {\n after: number // timestamp in ms\n before: number // timestamp in ms\n masterID?: string\n shouldForceTimeRange?: boolean\n }\n defaultAfter: number\n globalChartUnderlay: null | {\n after: number\n before: number\n masterID: string\n }\n hoveredX: number | null\n hasWindowFocus: boolean\n globalPause: boolean\n\n spacePanelIsActive: boolean\n spacePanelTransitionEndIsActive: boolean\n\n registry: {\n cloudBaseURL: string | null\n hasFetchedHello: boolean\n isHelloCallError: boolean | null\n hasFetchedInfo: boolean\n hostname: string\n isCloudEnabled: boolean | null\n isCloudAvailable: boolean | null\n isAgentClaimed: boolean | null\n isACLKAvailable: boolean | null\n hasStartedInfo: boolean\n fullInfoPayload: InfoPayload | null\n isFetchingHello: boolean\n machineGuid: string | null\n personGuid: string | null\n registryMachines: { [key: string]: RegistryMachine } | null\n registryMachinesArray: RegistryMachine[] | null\n registryServer: string | null\n }\n\n chartsMetadata: {\n isFetching: boolean\n isFetchingError: boolean\n data: null | ChartsMetadata\n }\n\n alarms: {\n activeAlarms: null | ActiveAlarms\n hasStartedAlarms: boolean\n }\n alarm: null | Alarm\n\n snapshot: Snapshot | null\n options: Options\n userNodeAccess: UserNodeAccessMessage\n}\n\nexport const initialDefaultAfter = isMainJs ? getInitialAfterFromWindow() : -900\n\nexport const initialState: StateT = {\n commonColorsKeys: {},\n commonMin: {},\n commonMax: {},\n currentSelectionMasterId: null,\n globalPanAndZoom: null,\n // todo for dashboard calculate it based on width and window.NETDATA.chartDefaults.after\n defaultAfter: initialDefaultAfter,\n globalChartUnderlay: null,\n hoveredX: null,\n hasWindowFocus: document.hasFocus(),\n globalPause: false,\n spacePanelIsActive: false, // set to true only for testing layout\n // the same as property above, just updated after transition ends\n spacePanelTransitionEndIsActive: false,\n\n registry: {\n cloudBaseURL: null,\n hasFetchedInfo: false,\n hasFetchedHello: false,\n isHelloCallError: null,\n hostname: \"unknown\",\n isCloudEnabled: null,\n isCloudAvailable: null,\n isAgentClaimed: null,\n isACLKAvailable: null,\n hasStartedInfo: false,\n isFetchingHello: false,\n fullInfoPayload: null,\n machineGuid: null,\n personGuid: null,\n registryMachines: null,\n registryMachinesArray: null,\n registryServer: null,\n },\n\n snapshot: null,\n alarms: {\n activeAlarms: null,\n hasStartedAlarms: false,\n },\n alarm: null,\n\n chartsMetadata: {\n isFetching: false,\n isFetchingError: false,\n data: null,\n },\n\n options: optionsMergedWithLocalStorage,\n userNodeAccess: null,\n}\n\nexport const globalReducer = createReducer<StateT>({}, initialState)\n\nexport interface GetKeyArguments {\n colorsAttribute: string | undefined\n commonColorsAttribute: string | undefined\n chartUuid: string\n chartContext: string\n}\nexport const getKeyForCommonColorsState = ({\n colorsAttribute,\n commonColorsAttribute,\n chartUuid,\n chartContext,\n}: GetKeyArguments) => {\n const hasCustomColors = typeof colorsAttribute === \"string\" && colorsAttribute.length > 0\n\n // when there's commonColors attribute, share the state between all charts with that attribute\n // if not, when there are custom colors, make each chart independent\n // if not, share the same state between charts with the same context\n return commonColorsAttribute || (hasCustomColors ? chartUuid : chartContext)\n}\n\nconst hasLastOnly = (array: string[]) => last(array) === \"ONLY\"\nconst removeLastOnly = (array: string[]) => (hasLastOnly(array) ? init(array) : array)\nconst createCommonColorsKeysSubstate = (\n colorsAttribute: string | undefined,\n hasCustomColors: boolean\n) => {\n const custom = hasCustomColors ? removeLastOnly((colorsAttribute as string).split(\" \")) : []\n const shouldCopyTheme = hasCustomColors\n ? // disable copyTheme when there's \"ONLY\" keyword in \"data-colors\" attribute\n !hasLastOnly((colorsAttribute as string).split(\" \"))\n : true\n const available = [\n ...custom,\n ...(shouldCopyTheme || custom.length === 0 ? window.NETDATA.themes.current.colors : []),\n ]\n return {\n assigned: {},\n available,\n custom,\n }\n}\n\nglobalReducer.on(\n requestCommonColorsAction,\n //@ts-ignore\n (state, { chartContext, chartUuid, colorsAttribute, commonColorsAttribute, dimensionNames }) => {\n const keyName = getKeyForCommonColorsState({\n colorsAttribute,\n commonColorsAttribute,\n chartUuid,\n chartContext,\n })\n\n const hasCustomColors = typeof colorsAttribute === \"string\" && colorsAttribute.length > 0\n const subState =\n state.commonColorsKeys[keyName] ||\n createCommonColorsKeysSubstate(colorsAttribute, hasCustomColors)\n\n const currentlyAssignedNr = Object.keys(subState.assigned).length\n const requestedDimensionsAssigned = mergeAll(\n dimensionNames\n // dont assign already assigned dimensions\n .filter(dimensionName => !subState.assigned[dimensionName])\n .map((dimensionName, i) => ({\n [dimensionName]:\n subState.available[(i + currentlyAssignedNr) % subState.available.length],\n }))\n )\n const assigned = {\n ...subState.assigned,\n ...requestedDimensionsAssigned,\n }\n\n return {\n ...state,\n commonColorsKeys: {\n ...state.commonColorsKeys,\n [keyName]: {\n ...subState,\n assigned,\n },\n },\n }\n }\n)\n\nglobalReducer.on(setCommonMinAction, (state, { chartUuid, commonMinKey, value }) => {\n const charts = {\n ...state.commonMin[commonMinKey]?.charts,\n [chartUuid]: value,\n }\n const currentExtreme = Math.min(...Object.values(charts))\n\n return {\n ...state,\n commonMin: {\n ...state.commonMin,\n [commonMinKey]: {\n charts,\n currentExtreme,\n },\n },\n }\n})\n\nglobalReducer.on(setCommonMaxAction, (state, { chartUuid, commonMaxKey, value }) => {\n const charts = {\n ...state.commonMax[commonMaxKey]?.charts,\n [chartUuid]: value,\n }\n const currentExtreme = Math.max(...Object.values(charts))\n\n return {\n ...state,\n commonMax: {\n ...state.commonMax,\n [commonMaxKey]: {\n charts,\n currentExtreme,\n },\n },\n }\n})\n\nglobalReducer.on(setSpacePanelStatusAction, (state, { isActive }) => ({\n ...state,\n spacePanelIsActive: isActive,\n}))\n\nglobalReducer.on(setSpacePanelTransitionEndAction, (state, { isActive }) => ({\n ...state,\n spacePanelTransitionEndIsActive: isActive,\n}))\n\nglobalReducer.on(setGlobalSelectionAction, (state, { chartUuid, hoveredX }) => ({\n ...state,\n hoveredX,\n currentSelectionMasterId: chartUuid,\n}))\n\nglobalReducer.on(setGlobalPanAndZoomAction, (state, payload) => ({\n ...state,\n globalPanAndZoom: payload,\n}))\n\nglobalReducer.on(resetGlobalPanAndZoomAction, state => ({\n ...state,\n globalPanAndZoom: initialState.globalPanAndZoom,\n hoveredX: initialState.hoveredX, // need to reset this also on mobile\n}))\n\nglobalReducer.on(setDefaultAfterAction, (state, { after }) => ({\n ...state,\n defaultAfter: after,\n}))\n\nglobalReducer.on(resetDefaultAfterAction, state => ({\n ...state,\n defaultAfter: initialState.defaultAfter,\n}))\n\nglobalReducer.on(setGlobalChartUnderlayAction, (state, { after, before, masterID }) => ({\n ...state,\n globalChartUnderlay: {\n after,\n before,\n masterID,\n },\n}))\n\nglobalReducer.on(centerAroundHighlightAction, state => {\n if (!state.globalChartUnderlay) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot center around empty selection\")\n return state\n }\n const { after, before } = state.globalChartUnderlay\n const highlightMargin = (before - after) / 2\n return {\n ...state,\n globalPanAndZoom: {\n after: after - highlightMargin,\n before: before + highlightMargin,\n },\n }\n})\n\nglobalReducer.on(\n clearHighlightAction,\n (state, { resetPanAndZoom = true }: { resetPanAndZoom?: boolean } = {}) => ({\n ...state,\n globalChartUnderlay: initialState.globalChartUnderlay,\n ...(resetPanAndZoom ? { globalPanAndZoom: initialState.globalPanAndZoom } : {}),\n })\n)\n\nglobalReducer.on(windowFocusChangeAction, (state, { hasWindowFocus }) => {\n // make additional check, because it's possible to get hasWindowFocus === false\n // message from iframe, after main window makes the state change (race condition)\n const hasFocusNow = document.hasFocus()\n return {\n ...state,\n hasWindowFocus: hasFocusNow || hasWindowFocus,\n }\n})\n\nglobalReducer.on(setGlobalPauseAction, state => ({ ...state, globalPause: true }))\nglobalReducer.on(resetGlobalPauseAction, (state, { forcePlay }) => ({\n ...state,\n globalPause: initialState.globalPause,\n globalPanAndZoom: initialState.globalPanAndZoom,\n hoveredX: initialState.hoveredX,\n options: { ...state.options, stop_updates_when_focus_is_lost: !forcePlay },\n}))\n\nglobalReducer.on(setUTCOffset, (state, { utcOffset }) => ({\n ...state,\n options: { ...state.options, utcOffset },\n}))\n\nglobalReducer.on(fetchHelloAction.request, state => ({\n ...state,\n registry: {\n ...state.registry,\n isFetchingHello: true,\n },\n}))\n\nglobalReducer.on(fetchHelloAction.success, (state, { cloudBaseURL, hostname, machineGuid }) => ({\n ...state,\n registry: {\n ...state.registry,\n cloudBaseURL,\n isFetchingHello: false,\n hasFetchedHello: true,\n hostname,\n machineGuid,\n },\n}))\nglobalReducer.on(fetchHelloAction.failure, state => ({\n ...state,\n registry: {\n ...state.registry,\n cloudBaseURL: CLOUD_BASE_URL_DISABLED,\n isFetchingHello: false,\n isHelloCallError: true,\n },\n}))\nglobalReducer.on(accessRegistrySuccessAction, (state, { registryServer }) => ({\n ...state,\n registry: {\n ...state.registry,\n registryServer,\n },\n}))\n\nglobalReducer.on(resetRegistry, state => ({\n ...state,\n registry: {\n ...state.registry,\n hasFetchedHello: initialState.registry.hasFetchedHello,\n },\n}))\n\nglobalReducer.on(fetchInfoAction, state => ({\n ...state,\n registry: {\n ...state.registry,\n hasStartedInfo: true,\n },\n}))\nglobalReducer.on(\n fetchInfoAction.success,\n (\n state,\n { isCloudAvailable, isCloudEnabled, isAgentClaimed, isACLKAvailable, fullInfoPayload }\n ) => ({\n ...state,\n registry: {\n ...state.registry,\n hasFetchedInfo: true,\n isCloudAvailable,\n isCloudEnabled,\n isAgentClaimed,\n isACLKAvailable,\n fullInfoPayload,\n },\n })\n)\n\nglobalReducer.on(fetchInfoAction.failure, state => ({\n ...state,\n registry: {\n ...state.registry,\n isCloudAvailable: false,\n isCloudEnabled: false,\n isAgentClaimed: false,\n isACLKAvailable: false,\n },\n}))\n\nglobalReducer.on(\n updatePersonUrlsAction,\n (state, { personGuid, registryMachines, registryMachinesArray }) => ({\n ...state,\n registry: {\n ...state.registry,\n personGuid,\n registryMachines,\n registryMachinesArray,\n },\n })\n)\n\nglobalReducer.on(startAlarmsAction, state => ({\n ...state,\n alarms: {\n ...state.alarms,\n hasStartedAlarms: true,\n },\n}))\n\nglobalReducer.on(updateActiveAlarmsAction, (state, { activeAlarms }) => ({\n ...state,\n alarms: {\n ...state.alarms,\n activeAlarms,\n },\n}))\n\nglobalReducer.on(setOptionAction, (state, { key, value }) => ({\n ...state,\n options: {\n ...state.options,\n [key]: value,\n },\n}))\n\nglobalReducer.on(resetOptionsAction, state => {\n clearLocalStorage()\n return {\n ...state,\n options: getOptionsMergedWithLocalStorage(),\n }\n})\n\nglobalReducer.on(loadSnapshotAction, (state, { snapshot }) => {\n const parsedData = Object.keys(snapshot.data)\n .map(dataKey => {\n let uncompressed\n try {\n // @ts-ignore\n uncompressed = snapshot.uncompress(snapshot.data[dataKey])\n\n // repeat old logging\n if (uncompressed === null) {\n // eslint-disable-next-line no-console\n console.warn(`uncompressed snapshot data for key ${dataKey} is null`)\n return null\n }\n\n if (typeof uncompressed === \"undefined\") {\n // eslint-disable-next-line no-console\n console.warn(`uncompressed snapshot data for key ${dataKey} is undefined`)\n return null\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(`decompression of snapshot data for key ${dataKey} failed`, e)\n uncompressed = null\n }\n\n if (typeof uncompressed !== \"string\") {\n // eslint-disable-next-line no-console\n console.warn(`uncompressed snapshot data for key ${dataKey} is not string`)\n return {}\n }\n\n let data\n try {\n data = JSON.parse(uncompressed)\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(`parsing snapshot data for key ${dataKey} failed`)\n return {}\n }\n\n return { [dataKey]: data }\n })\n .reduce((acc, obj) => ({ ...acc, ...obj }), {})\n\n return {\n ...state,\n snapshot: {\n ...snapshot,\n data: parsedData as { [key: string]: unknown },\n },\n }\n})\n\nglobalReducer.on(setAlarmAction, (state, { alarm }) => ({\n ...state,\n alarm,\n}))\n\nglobalReducer.on(chartsMetadataRequestSuccess, (state, { data }) => ({\n ...state,\n chartsMetadata: {\n ...state.chartsMetadata,\n data,\n },\n}))\n\nglobalReducer.on(setUserNodeAccess, (state, { message }) => ({ ...state, userNodeAccess: message }))\n","import React from \"react\"\nimport classNames from \"classnames\"\n\n// todo add supoort for window.netdataIcons\nexport type IconType = \"left\" | \"reset\" | \"right\" | \"zoomIn\" | \"zoomOut\" | \"resize\" | \"lineChart\"\n | \"areaChart\" | \"noChart\" | \"loading\" | \"noData\"\nconst typeToClassName = (iconType: IconType) => ({\n left: \"fa-backward\",\n reset: \"fa-play\",\n right: \"fa-forward\",\n zoomIn: \"fa-plus\",\n zoomOut: \"fa-minus\",\n resize: \"fa-sort\",\n lineChart: \"fa-chart-line\",\n areaChart: \"fa-chart-area\",\n noChart: \"fa-chart-area\",\n loading: \"fa-sync-alt\",\n noData: \"fa-exclamation-triangle\",\n} as {[key in IconType]: string})[iconType]\n\ninterface Props {\n iconType: IconType\n}\nexport const Icon = ({ iconType }: Props) => (\n <i className={classNames(\"fas\", typeToClassName(iconType))} />\n)\n","import {\n map, omit, assoc, pick,\n} from \"ramda\"\nimport { createReducer } from \"redux-act\"\n\nimport { setOptionAction } from \"domains/global/actions\"\nimport { SYNC_PAN_AND_ZOOM } from \"domains/global/options\"\nimport { useNewKeysOnlyIfDifferent } from \"utils/utils\"\n\nimport {\n fetchDataAction,\n fetchChartAction,\n setResizeHeightAction,\n clearChartStateAction,\n fetchDataForSnapshotAction,\n snapshotExportResetAction,\n setChartPanAndZoomAction,\n resetChartPanAndZoomAction,\n fetchDataCancelAction,\n} from \"./actions\"\nimport { ChartState } from \"./chart-types\"\n\nexport type StateT = {\n [chartID: string]: ChartState\n}\n\nexport const initialState = {\n}\nexport const initialSingleState = {\n chartData: null,\n chartId: null,\n chartMetadata: null,\n chartPanAndZoom: null,\n fetchDataParams: {\n isRemotelyControlled: false,\n viewRange: null,\n },\n isFetchingData: false,\n isFetchDataFailure: false,\n isFetchDetailsFailure: false,\n isFetchingDetails: false,\n resizeHeight: null,\n\n snapshotDataIsFetching: false,\n snapshotDataIsError: false,\n snapshotData: null,\n viewRange: null,\n}\n\nexport const chartReducer = createReducer<StateT>(\n {},\n initialState,\n)\n\nexport const getSubstate = (state: StateT, id: string) => state[id] || initialSingleState\n\nchartReducer.on(fetchDataAction.request, (state, { chart, fetchDataParams, id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartId: chart,\n isFetchingData: true,\n viewRange: fetchDataParams.viewRange,\n },\n}))\n\nchartReducer.on(fetchDataCancelAction, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchingData: false,\n },\n}))\n\nchartReducer.on(fetchDataAction.failure, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchingData: false,\n isFetchDataFailure: true,\n },\n}))\n\nchartReducer.on(fetchDataAction.success, (state, { id, chartData, fetchDataParams }) => {\n const substate = getSubstate(state, id)\n return {\n ...state,\n [id]: {\n ...substate,\n chartData: useNewKeysOnlyIfDifferent([\"dimension_names\"], substate.chartData, chartData!),\n fetchDataParams,\n isFetchingData: false,\n isFetchDataFailure: false,\n viewRange: fetchDataParams.viewRange,\n },\n }\n})\n\n\nchartReducer.on(fetchDataForSnapshotAction.request, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n snapshotDataIsFetching: true,\n },\n}))\n\nchartReducer.on(fetchDataForSnapshotAction.failure, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n snapshotDataIsFetching: false,\n snapshotDataIsError: true,\n },\n}))\n\nchartReducer.on(fetchDataForSnapshotAction.success, (state, { id, snapshotData }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n snapshotDataIsFetching: false,\n snapshotDataIsError: false,\n snapshotData,\n },\n}))\n\nchartReducer.on(snapshotExportResetAction, (state) => map((substate) => ({\n ...substate,\n ...pick([\"snapshotDataIsFetching\", \"snapshotDataIsError\", \"snapshotData\"], initialSingleState),\n}), state))\n\n\nchartReducer.on(fetchChartAction.request, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchingDetails: true,\n },\n}))\n\nchartReducer.on(fetchChartAction.failure, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchDetailsFailure: true,\n },\n}))\n\nchartReducer.on(fetchChartAction.success, (state, { id, chartMetadata }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartMetadata,\n isFetchingDetails: false,\n isFetchDetailsFailure: false,\n },\n}))\n\n// todo handle errors without creating a loop\n// chartReducer.on(fetchChartAction.failure, (state, { id }) => ({\n// ...state,\n// [id]: {\n// ...getSubstate(state, id),\n// isFetchingDetails: false,\n// },\n// }))\n\nchartReducer.on(setResizeHeightAction, (state, { id, resizeHeight }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n resizeHeight,\n },\n}))\n\nchartReducer.on(setChartPanAndZoomAction, (state, {\n after, before, id, shouldForceTimeRange,\n}) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartPanAndZoom: { after, before, shouldForceTimeRange },\n },\n}))\n\nchartReducer.on(resetChartPanAndZoomAction, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartPanAndZoom: initialSingleState.chartPanAndZoom,\n },\n}))\n\nchartReducer.on(setOptionAction, (state, { key, value }) => {\n // clear chartPanAndZoom, when SYNC_PAN_AND_ZOOM flag is turned on\n if (key === SYNC_PAN_AND_ZOOM && value === true) {\n return map(\n assoc(\"chartPanAndZoom\", initialSingleState.chartPanAndZoom),\n state,\n )\n }\n return state\n})\n\nchartReducer.on(clearChartStateAction, (state, { id }) => omit([id], state))\n","import { mapObjIndexed, mergeAll, isEmpty } from \"ramda\"\nimport { Method } from \"axios\"\nimport { initialLegendRight } from \"domains/global/options\"\nimport { ChartLibraryName } from \"./chartLibrariesSettings\"\n\ntype OutputValue = string | boolean | number | null | undefined | any[]\n// almost the same as in old dashboard to ensure readers that it works the same way\nconst getDataAttribute = (element: Element, key: string, defaultValue?: OutputValue) => {\n const dataKey = `data-${key}`\n if (element.hasAttribute(dataKey)) {\n // we know it's not null because of hasAttribute()\n const data = element.getAttribute(dataKey) as string\n\n if (data === \"true\") {\n return true\n }\n if (data === \"false\") {\n return false\n }\n if (data === \"null\") {\n return null\n }\n\n // Only convert to a number if it doesn't change the string\n if (data === `${+data}`) {\n return +data\n }\n\n if (/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/.test(data)) {\n return JSON.parse(data)\n }\n\n return data\n }\n // if no default is passed, then it's undefined and can be replaced with default value later\n // it is recommended to do it in props destructuring assignment phase, ie.:\n // const Chart = ({ dygraphPointsize = 1 }) => ....\n return defaultValue\n}\n\nconst getDataAttributeBoolean = (element: Element, key: string, defaultValue?: boolean) => {\n const value = getDataAttribute(element, key, defaultValue)\n\n if (value === true || value === false) { // gmosx: Love this :)\n return value\n }\n\n if (typeof (value) === \"string\") {\n if (value === \"yes\" || value === \"on\") {\n return true\n }\n\n if (value === \"\" || value === \"no\" || value === \"off\" || value === \"null\") {\n return false\n }\n\n return defaultValue\n }\n\n if (typeof (value) === \"number\") {\n return value !== 0\n }\n\n return defaultValue\n}\n\ninterface BaseAttributeConfig {\n key: string\n defaultValue?: OutputValue\n}\ninterface BooleanAttributeConfig extends BaseAttributeConfig {\n type: \"boolean\"\n defaultValue?: boolean\n}\ntype AttributeConfig = BaseAttributeConfig | BooleanAttributeConfig\n\nexport interface StaticAttributes {\n id: string\n host?: string | undefined\n httpMethod?: Method\n title?: string\n chartLibrary: ChartLibraryName\n width: number | string | null\n height?: number | string | null\n after?: number\n before?: number\n legend?: boolean\n legendPosition?: \"bottom\" | \"right\"\n units?: string\n unitsCommon?: string\n unitsDesired?: string\n aggrMethod?: string\n labels?: {[key: string]: string}\n postGroupBy?: string\n dimensionsAggrMethod?: string\n postAggregationMethod?: string\n aggrGroups?: string[]\n selectedChart?: string\n filteredRows?: string[] | null\n groupBy?: string\n nodeIDs?: string[]\n colors?: string\n commonColors?: string\n decimalDigits?: number\n dimensions?: string\n selectedDimensions?: string[]\n forceTimeWindow?: boolean\n\n appendOptions?: string | undefined\n gtime?: number\n method?: string\n overrideOptions?: string\n pixelsPerPoint?: number\n points?: number\n heightId?: string\n hideResizeHandler?: boolean\n detectResize?: boolean\n commonMin?: string\n commonMax?: string\n\n dygraphType?: string\n dygraphValueRange?: any[]\n dygraphTheme?: string\n dygraphSmooth?: boolean\n dygraphColors?: string[]\n dygraphRightGap?: number\n dygraphShowRangeSelector?: boolean\n dygraphShowRoller?: boolean\n dygraphTitle?: string\n dygraphTitleHeight?: number\n dygraphLegend?: \"always\" | \"follow\" | \"onmouseover\" | \"never\"\n dygraphLabelsDiv?: string\n dygraphLabelsSeparateLine?: boolean\n dygraphIncludeZero?: boolean\n dygraphShowZeroValues?: boolean\n dygraphShowLabelsOnHighLight?: boolean\n dygraphHideOverlayOnMouseOut?: boolean\n dygraphXRangePad?: number\n dygraphYRangePad?: number\n dygraphYLabelWidth?: number\n dygraphStrokeWidth?: number\n dygraphStrokePattern?: number[]\n dygraphDrawPoints?: boolean\n dygraphDrawGapEdgePoints?: boolean\n dygraphConnectSeparatedPoints?: boolean\n dygraphPointSize?: number\n dygraphStepPlot?: boolean\n dygraphStrokeBorderColor?: string\n dygraphStrokeBorderWidth?: number\n dygraphFillGraph?: boolean\n dygraphFillAlpha?: number\n dygraphStackedGraph?: boolean\n dygraphStackedGraphNanFill?: string\n dygraphAxisLabelFontSize?: number\n dygraphAxisLineColor?: string\n dygraphAxisLineWidth?: number\n dygraphDrawGrid?: boolean\n dygraphGridLinePattern?: number[]\n dygraphGridLineWidth?: number\n dygraphGridLineColor?: string\n dygraphMaxNumberWidth?: number\n dygraphSigFigs?: number\n dygraphDigitsAfterDecimal?: number\n dygraphHighlighCircleSize?: number\n dygraphHighlightSeriesOpts?: {[options: string]: number}\n dygraphHighlightSeriesBackgroundAlpha?: number\n dygraphXPixelsPerLabel?: number\n dygraphXAxisLabelWidth?: number\n dygraphDrawXAxis?: boolean\n dygraphYPixelsPerLabel?: number\n dygraphYAxisLabelWidth?: number\n dygraphDrawYAxis?: boolean\n dygraphDrawAxis?: boolean\n\n easyPieChartMinValue?: number\n easyPieChartMaxValue?: number\n easyPieChartBarColor?: string\n easyPieChartTrackColor?: string\n easyPieChartScaleColor?: string,\n easyPieChartScaleLength?: number,\n easyPieChartLineCap?: string,\n easyPieChartLineWidth?: string,\n easyPieChartTrackWidth?: string,\n easyPieChartSize?: string,\n easyPieChartRotate?: number,\n easyPieChartAnimate?: string,\n easyPieChartEasing?: string,\n\n gaugeMinValue?: number,\n gaugeMaxValue?: number,\n gaugePointerColor?: string,\n gaugeStrokeColor?: string,\n gaugeStartColor?: string,\n gaugeStopColor?: string,\n gaugeGenerateGradient?: boolean | string[],\n\n sparklineType?: string,\n sparklineLineColor?: string,\n sparklineFillColor?: string,\n sparklineChartRangeMin?: string,\n sparklineChartRangeMax?: string,\n sparklineComposite?: string,\n sparklineEnableTagOptions?: string,\n sparklineTagOptionPrefix?: string,\n sparklineTagValuesAttribute?: string,\n sparklineDisableHiddenCheck?: string,\n sparklineDefaultPixelsPerValue?: string,\n sparklineSpotColor?: string,\n sparklineMinSpotColor?: string,\n sparklineMaxSpotColor?: string,\n sparklineSpotRadius?: string,\n sparklineValueSpots?: string,\n sparklineHighlightSpotColor?: string,\n sparklineHighlightLineColor?: string,\n sparklineLineWidth?: string,\n sparklineNormalRangeMin?: string,\n sparklineNormalRangeMax?: string,\n sparklineDrawNormalOnTop?: string,\n sparklineXvalues?: string,\n sparklineChartRangeClip?: string,\n sparklineChartRangeMinX?: string,\n sparklineChartRangeMaxX?: string,\n sparklineDisableInteraction?: boolean,\n sparklineDisableTooltips?: boolean,\n sparklineOnHover?: Function,\n sparklineDisableHighlight?: boolean,\n sparklineHighlightLighten?: string,\n sparklineHighlightColor?: string,\n sparklineTooltipContainer?: string,\n sparklineTooltipClassname?: string,\n sparklineTooltipFormat?: string,\n sparklineTooltipPrefix?: string,\n sparklineTooltipSuffix?: string,\n sparklineTooltipSkipNull?: boolean,\n sparklineTooltipValueLookups?: string,\n sparklineTooltipFormatFieldlist?: string,\n sparklineTooltipFormatFieldlistKey?: string,\n sparklineNumberFormatter?: (d: number) => string,\n sparklineNumberDigitGroupSep?: string,\n sparklineNumberDecimalMark?: string,\n sparklineNumberDigitGroupCount?: string,\n sparklineAnimatedZooms?: boolean,\n\n\n d3pieTitle?: string,\n d3pieSubtitle?: string,\n d3pieFooter?: string,\n d3pieTitleColor?: string,\n d3pieTitleFontsize?: string,\n d3pieTitleFontweight?: string,\n d3pieTitleFont?: string,\n d3PieSubtitleColor?: string,\n d3PieSubtitleFontsize?: string,\n d3PieSubtitleFontweight?: string,\n d3PieSubtitleFont?: string,\n d3PieFooterColor?: string,\n d3PieFooterFontsize?: string,\n d3PieFooterFontweight?: string,\n d3PieFooterFont?: string,\n d3PieFooterLocation?: string,\n d3PiePieinnerradius?: string,\n d3PiePieouterradius?: string,\n d3PieSortorder?: string,\n d3PieSmallsegmentgroupingEnabled?: boolean,\n d3PieSmallsegmentgroupingValue?: string,\n d3PieSmallsegmentgroupingValuetype?: string,\n d3PieSmallsegmentgroupingLabel?: string,\n d3PieSmallsegmentgroupingColor?: string,\n d3PieLabelsOuterFormat?: string,\n d3PieLabelsOuterHidewhenlessthanpercentage?: string,\n d3PieLabelsOuterPiedistance?: string,\n d3PieLabelsInnerFormat?: string,\n d3PieLabelsInnerHidewhenlessthanpercentage?: string,\n d3PieLabelsMainLabelColor?: string,\n d3PieLabelsMainLabelFont?: string,\n d3PieLabelsMainLabelFontsize?: string,\n d3PieLabelsMainLabelFontweight?: string,\n d3PieLabelsPercentageColor?: string,\n d3PieLabelsPercentageFont?: string,\n d3PieLabelsPercentageFontsize?: string,\n d3PieLabelsPercentageFontweight?: string,\n d3PieLabelsValueColor?: string,\n d3PieLabelsValueFont?: string,\n d3PieLabelsValueFontsize?: string,\n d3PieLabelsValueFontweight?: string,\n d3PieLabelsLinesEnabled?: boolean,\n d3PieLabelsLinesStyle?: string,\n d3PieLabelsLinesColor?: string,\n d3PieLabelsTruncationEnabled?: boolean,\n d3PieLabelsTruncationTruncatelength?: string,\n d3PieMiscColorsSegmentstroke?: string,\n d3PieMiscGradientEnabled?: boolean,\n d3PieMiscColorsPercentage?: string,\n d3PieMiscGradientColor?: string,\n d3PieCssprefix?: string,\n\n peityStrokeWidth?: number,\n\n textOnlyDecimalPlaces?: number,\n textOnlyPrefix?: string,\n textOnlySuffix?: string,\n}\n\nexport interface Attributes extends StaticAttributes {\n // changed structure compared to original dashboard.js (not flat list, but dynamic objects stored\n // in \"showValueOf\" property\n showValueOf?: { [key: string]: string }\n}\n\nexport interface ChartsAttributes {\n [chartID:string]: Attributes\n}\n\nexport type AttributePropKeys = keyof StaticAttributes\n\ntype AttributesMap = {\n [key in AttributePropKeys]: AttributeConfig\n}\n\n// needs to be a getter so all window.NETDATA settings are set\nconst getAttributesMap = (): AttributesMap => ({\n // all properties that don't have `defaultValue` should be \"| undefined\" in Attributes interface\n // todo try to write above rule in TS\n id: { key: \"netdata\" },\n host: { key: \"host\" },\n httpMethod: { key: \"http-method\" },\n title: { key: \"title\" },\n chartLibrary: { key: \"chart-library\", defaultValue: window.NETDATA.chartDefaults.library },\n width: { key: \"width\", defaultValue: window.NETDATA.chartDefaults.width },\n height: { key: \"height\", defaultValue: window.NETDATA.chartDefaults.height },\n // todo use chartDefaults for static custom dashboards\n // after: { key: \"after\", defaultValue: window.NETDATA.chartDefaults.after },\n after: { key: \"after\" },\n before: { key: \"before\", defaultValue: window.NETDATA.chartDefaults.before },\n legend: { key: \"legend\", type: \"boolean\", defaultValue: true },\n legendPosition: { key: \"legend-position\" },\n units: { key: \"units\" },\n unitsCommon: { key: \"common-units\" },\n unitsDesired: { key: \"desired-units\" },\n aggrMethod: { key: \"aggr-method\" },\n labels: { key: \"labels\" },\n postGroupBy: { key: \"post-group-by\" },\n postAggregationMethod: { key: \"post-aggregation-method\" },\n dimensionsAggrMethod: { key: \"dimensions-aggr-method\" },\n aggrGroups: { key: \"aggrGroups\" },\n selectedChart: { key: \"selected-chart\" },\n filteredRows: { key: \"filtered-rows\" },\n groupBy: { key: \"group-by\" },\n nodeIDs: { key: \"node-ids\" },\n colors: { key: \"colors\" },\n commonColors: { key: \"common-colors\" },\n decimalDigits: { key: \"decimal-digits\" },\n dimensions: { key: \"dimensions\" },\n selectedDimensions: { key: \"selected-dimensions\" },\n forceTimeWindow: { key: \"force-time-window\" },\n\n appendOptions: { key: \"append-options\" },\n gtime: { key: \"gtime\" },\n method: { key: \"method\" },\n overrideOptions: { key: \"override-options\" },\n pixelsPerPoint: { key: \"pixels-per-point\" },\n points: { key: \"points\" },\n heightId: { key: \"id\" },\n hideResizeHandler: { key: \"hide-resize-handler\" },\n detectResize: { key: \"detect-resize\" },\n commonMin: { key: \"common-min\" },\n commonMax: { key: \"common-max\" },\n\n // let's not put the default values here, because they will also be needed by the main Agent page\n // and the Cloud App\n dygraphType: { key: \"dygraph-type\" },\n dygraphValueRange: { key: \"dygraph-valuerange\" },\n dygraphTheme: { key: \"dygraph-theme\" },\n dygraphSmooth: { key: \"dygraph-smooth\", type: \"boolean\" },\n dygraphColors: { key: \"dygraph-colors\" }, // not working in original dashboard\n dygraphRightGap: { key: \"dygraph-rightgap\" },\n dygraphShowRangeSelector: { key: \"dygraph-showrangeselector\", type: \"boolean\" },\n dygraphShowRoller: { key: \"dygraph-showroller\", type: \"boolean\" },\n dygraphTitle: { key: \"dygraph-title\" },\n dygraphTitleHeight: { key: \"dygraph-titleheight\" },\n dygraphLegend: { key: \"dygraph-legend\" },\n dygraphLabelsDiv: { key: \"dygraph-labelsdiv\" },\n dygraphLabelsSeparateLine: { key: \"dygraph-labelsseparatelines\", type: \"boolean\" },\n dygraphIncludeZero: { key: \"dygraph-includezero\", type: \"boolean\" },\n dygraphShowZeroValues: { key: \"dygraph-labelsshowzerovalues\", type: \"boolean\" },\n dygraphShowLabelsOnHighLight: { key: \"dygraph-showlabelsonhighlight\", type: \"boolean\" },\n dygraphHideOverlayOnMouseOut: { key: \"dygraph-hideoverlayonmouseout\", type: \"boolean\" },\n dygraphXRangePad: { key: \"dygraph-xrangepad\" },\n dygraphYRangePad: { key: \"dygraph-yrangepad\" },\n dygraphYLabelWidth: { key: \"dygraph-ylabelwidth\" },\n dygraphStrokeWidth: { key: \"dygraph-strokewidth\" },\n dygraphStrokePattern: { key: \"dygraph-strokepattern\" },\n dygraphDrawPoints: { key: \"dygraph-drawpoints\", type: \"boolean\" },\n dygraphDrawGapEdgePoints: { key: \"dygraph-drawgapedgepoints\", type: \"boolean\" },\n dygraphConnectSeparatedPoints: { key: \"dygraph-connectseparatedpoints\", type: \"boolean\" },\n dygraphPointSize: { key: \"dygraph-pointsize\" },\n dygraphStepPlot: { key: \"dygraph-stepplot\", type: \"boolean\" },\n dygraphStrokeBorderColor: { key: \"dygraph-strokebordercolor\" },\n dygraphStrokeBorderWidth: { key: \"dygraph-strokeborderwidth\" },\n // it was not boolean in the old app, but that was most likely a bug\n dygraphFillGraph: { key: \"dygraph-fillgraph\", type: \"boolean\" },\n dygraphFillAlpha: { key: \"dygraph-fillalpha\" },\n // also originally not set as boolean\n dygraphStackedGraph: { key: \"dygraph-stackedgraph\", type: \"boolean\" },\n dygraphStackedGraphNanFill: { key: \"dygraph-stackedgraphnanfill\" },\n dygraphAxisLabelFontSize: { key: \"dygraph-axislabelfontsize\" },\n dygraphAxisLineColor: { key: \"dygraph-axislinecolor\" },\n dygraphAxisLineWidth: { key: \"dygraph-axislinewidth\" },\n dygraphDrawGrid: { key: \"dygraph-drawgrid\", type: \"boolean\" },\n dygraphGridLinePattern: { key: \"dygraph-gridlinepattern\" },\n dygraphGridLineWidth: { key: \"dygraph-gridlinewidth\" },\n dygraphGridLineColor: { key: \"dygraph-gridlinecolor\" },\n dygraphMaxNumberWidth: { key: \"dygraph-maxnumberwidth\" },\n dygraphSigFigs: { key: \"dygraph-sigfigs\" },\n dygraphDigitsAfterDecimal: { key: \"dygraph-digitsafterdecimal\" },\n // dygraphValueFormatter: { key: \"dygraph-valueformatter\" },\n dygraphHighlighCircleSize: { key: \"dygraph-highlightcirclesize\" },\n dygraphHighlightSeriesOpts: { key: \"dygraph-highlightseriesopts\" },\n dygraphHighlightSeriesBackgroundAlpha: { key: \"dygraph-highlightseriesbackgroundalpha\" },\n // dygraphPointClickCallback: { key: \"dygraph-pointclickcallback\" },\n dygraphXPixelsPerLabel: { key: \"dygraph-xpixelsperlabel\" },\n dygraphXAxisLabelWidth: { key: \"dygraph-xaxislabelwidth\" },\n dygraphDrawXAxis: { key: \"dygraph-drawxaxis\", type: \"boolean\" },\n dygraphYPixelsPerLabel: { key: \"dygraph-ypixelsperlabel\" },\n dygraphYAxisLabelWidth: { key: \"dygraph-yaxislabelwidth\" },\n dygraphDrawYAxis: { key: \"dygraph-drawyaxis\", type: \"boolean\" },\n dygraphDrawAxis: { key: \"dygraph-drawaxis\", type: \"boolean\" },\n\n easyPieChartMinValue: { key: \"easypiechart-min-value\" },\n easyPieChartMaxValue: { key: \"easypiechart-max-value\" },\n easyPieChartBarColor: { key: \"easypiechart-barcolor\" },\n easyPieChartTrackColor: { key: \"easypiechart-trackcolor\" },\n easyPieChartScaleColor: { key: \"easypiechart-scalecolor\" },\n easyPieChartScaleLength: { key: \"easypiechart-scalelength\" },\n easyPieChartLineCap: { key: \"easypiechart-linecap\" },\n easyPieChartLineWidth: { key: \"easypiechart-linewidth\" },\n easyPieChartTrackWidth: { key: \"easypiechart-trackwidth\" },\n easyPieChartSize: { key: \"easypiechart-size\" },\n easyPieChartRotate: { key: \"easypiechart-rotate\" },\n easyPieChartAnimate: { key: \"easypiechart-animate\" },\n easyPieChartEasing: { key: \"easypiechart-easing\" },\n\n gaugeMinValue: { key: \"gauge-min-value\" },\n gaugeMaxValue: { key: \"gauge-max-value\" },\n gaugePointerColor: { key: \"gauge-pointer-color\" },\n gaugeStrokeColor: { key: \"gauge-stroke-color\" },\n gaugeStartColor: { key: \"gauge-start-color\" },\n gaugeStopColor: { key: \"gauge-stop-color\" },\n gaugeGenerateGradient: { key: \"gauge-generate-gradient\" },\n\n sparklineType: { key: \"sparkline-type\" },\n sparklineLineColor: { key: \"sparkline-linecolor\" },\n sparklineFillColor: { key: \"sparkline-fillcolor\" },\n sparklineChartRangeMin: { key: \"sparkline-chartrangemin\" },\n sparklineChartRangeMax: { key: \"sparkline-chartrangemax\" },\n sparklineComposite: { key: \"sparkline-composite\" },\n sparklineEnableTagOptions: { key: \"sparkline-enabletagoptions\" },\n sparklineTagOptionPrefix: { key: \"sparkline-tagoptionprefix\" },\n sparklineTagValuesAttribute: { key: \"sparkline-tagvaluesattribute\" },\n sparklineDisableHiddenCheck: { key: \"sparkline-disablehiddencheck\" },\n sparklineDefaultPixelsPerValue: { key: \"sparkline-defaultpixelspervalue\" },\n sparklineSpotColor: { key: \"sparkline-spotcolor\" },\n sparklineMinSpotColor: { key: \"sparkline-minspotcolor\" },\n sparklineMaxSpotColor: { key: \"sparkline-maxspotcolor\" },\n sparklineSpotRadius: { key: \"sparkline-spotradius\" },\n sparklineValueSpots: { key: \"sparkline-valuespots\" },\n sparklineHighlightSpotColor: { key: \"sparkline-highlightspotcolor\" },\n sparklineHighlightLineColor: { key: \"sparkline-highlightlinecolor\" },\n sparklineLineWidth: { key: \"sparkline-linewidth\" },\n sparklineNormalRangeMin: { key: \"sparkline-normalrangemin\" },\n sparklineNormalRangeMax: { key: \"sparkline-normalrangemax\" },\n sparklineDrawNormalOnTop: { key: \"sparkline-drawnormalontop\" },\n sparklineXvalues: { key: \"sparkline-xvalues\" },\n sparklineChartRangeClip: { key: \"sparkline-chartrangeclip\" },\n sparklineChartRangeMinX: { key: \"sparkline-chartrangeminx\" },\n sparklineChartRangeMaxX: { key: \"sparkline-chartrangemaxx\" },\n sparklineDisableInteraction: { key: \"sparkline-disableinteraction\", type: \"boolean\" },\n sparklineDisableTooltips: { key: \"sparkline-disabletooltips\", type: \"boolean\" },\n sparklineOnHover: { key: \"sparkline-on-hover\" },\n sparklineDisableHighlight: { key: \"sparkline-disablehighlight\", type: \"boolean\" },\n sparklineHighlightLighten: { key: \"sparkline-highlightlighten\" },\n sparklineHighlightColor: { key: \"sparkline-highlightcolor\" },\n sparklineTooltipContainer: { key: \"sparkline-tooltipcontainer\" },\n sparklineTooltipClassname: { key: \"sparkline-tooltipclassname\" },\n sparklineTooltipFormat: { key: \"sparkline-tooltipformat\" },\n sparklineTooltipPrefix: { key: \"sparkline-tooltipprefix\" },\n sparklineTooltipSuffix: { key: \"sparkline-tooltipsuffix\" },\n sparklineTooltipSkipNull: { key: \"sparkline-tooltipskipnull\", type: \"boolean\" },\n sparklineTooltipValueLookups: { key: \"sparkline-tooltipvaluelookups\" },\n sparklineTooltipFormatFieldlist: { key: \"sparkline-tooltipformatfieldlist\" },\n sparklineTooltipFormatFieldlistKey: { key: \"sparkline-tooltipformatfieldlistkey\" },\n sparklineNumberFormatter: { key: \"sparkline-numberformatter\" },\n sparklineNumberDigitGroupSep: { key: \"sparkline-numberdigitgroupsep\" },\n sparklineNumberDecimalMark: { key: \"sparkline-numberdecimalmark\" },\n sparklineNumberDigitGroupCount: { key: \"sparkline-numberdigitgroupcount\" },\n sparklineAnimatedZooms: { key: \"sparkline-animatedzooms\", type: \"boolean\" },\n\n d3pieTitle: { key: \"d3pie-title\" },\n d3pieSubtitle: { key: \"d3pie-subtitle\" },\n d3pieFooter: { key: \"d3pie-footer\" },\n d3pieTitleColor: { key: \"d3pie-title-color\" },\n d3pieTitleFontsize: { key: \"d3pie-title-fontsize\" },\n d3pieTitleFontweight: { key: \"d3pie-title-fontweight\" },\n d3pieTitleFont: { key: \"d3pie-title-font\" },\n d3PieSubtitleColor: { key: \"d3pie-subtitle-color\" },\n d3PieSubtitleFontsize: { key: \"d3pie-subtitle-fontsize\" },\n d3PieSubtitleFontweight: { key: \"d3pie-subtitle-fontweight\" },\n d3PieSubtitleFont: { key: \"d3pie-subtitle-font\" },\n d3PieFooterColor: { key: \"d3pie-footer-color\" },\n d3PieFooterFontsize: { key: \"d3pie-footer-fontsize\" },\n d3PieFooterFontweight: { key: \"d3pie-footer-fontweight\" },\n d3PieFooterFont: { key: \"d3pie-footer-font\" },\n d3PieFooterLocation: { key: \"d3pie-footer-location\" },\n d3PiePieinnerradius: { key: \"d3pie-pieinnerradius\" },\n d3PiePieouterradius: { key: \"d3pie-pieouterradius\" },\n d3PieSortorder: { key: \"d3pie-sortorder\" },\n d3PieSmallsegmentgroupingEnabled: { key: \"d3pie-smallsegmentgrouping-enabled\", type: \"boolean\" },\n d3PieSmallsegmentgroupingValue: { key: \"d3pie-smallsegmentgrouping-value\" },\n d3PieSmallsegmentgroupingValuetype: { key: \"d3pie-smallsegmentgrouping-valuetype\" },\n d3PieSmallsegmentgroupingLabel: { key: \"d3pie-smallsegmentgrouping-label\" },\n d3PieSmallsegmentgroupingColor: { key: \"d3pie-smallsegmentgrouping-color\" },\n d3PieLabelsOuterFormat: { key: \"d3pie-labels-outer-format\" },\n d3PieLabelsOuterHidewhenlessthanpercentage: {\n key: \"d3pie-labels-outer-hidewhenlessthanpercentage\",\n },\n d3PieLabelsOuterPiedistance: { key: \"d3pie-labels-outer-piedistance\" },\n d3PieLabelsInnerFormat: { key: \"d3pie-labels-inner-format\" },\n d3PieLabelsInnerHidewhenlessthanpercentage: {\n key: \"d3pie-labels-inner-hidewhenlessthanpercentage\",\n },\n d3PieLabelsMainLabelColor: { key: \"d3pie-labels-mainLabel-color\" },\n d3PieLabelsMainLabelFont: { key: \"d3pie-labels-mainLabel-font\" },\n d3PieLabelsMainLabelFontsize: { key: \"d3pie-labels-mainLabel-fontsize\" },\n d3PieLabelsMainLabelFontweight: { key: \"d3pie-labels-mainLabel-fontweight\" },\n d3PieLabelsPercentageColor: { key: \"d3pie-labels-percentage-color\" },\n d3PieLabelsPercentageFont: { key: \"d3pie-labels-percentage-font\" },\n d3PieLabelsPercentageFontsize: { key: \"d3pie-labels-percentage-fontsize\" },\n d3PieLabelsPercentageFontweight: { key: \"d3pie-labels-percentage-fontweight\" },\n d3PieLabelsValueColor: { key: \"d3pie-labels-value-color\" },\n d3PieLabelsValueFont: { key: \"d3pie-labels-value-font\" },\n d3PieLabelsValueFontsize: { key: \"d3pie-labels-value-fontsize\" },\n d3PieLabelsValueFontweight: { key: \"d3pie-labels-value-fontweight\" },\n d3PieLabelsLinesEnabled: { key: \"d3pie-labels-lines-enabled\", type: \"boolean\" },\n d3PieLabelsLinesStyle: { key: \"d3pie-labels-lines-style\" },\n d3PieLabelsLinesColor: { key: \"d3pie-labels-lines-color\" },\n d3PieLabelsTruncationEnabled: { key: \"d3pie-labels-truncation-enabled\", type: \"boolean\" },\n d3PieLabelsTruncationTruncatelength: { key: \"d3pie-labels-truncation-truncatelength\" },\n d3PieMiscColorsSegmentstroke: { key: \"d3pie-misc-colors-segmentstroke\" },\n d3PieMiscGradientEnabled: { key: \"d3pie-misc-gradient-enabled\", type: \"boolean\" },\n d3PieMiscColorsPercentage: { key: \"d3pie-misc-colors-percentage\" },\n d3PieMiscGradientColor: { key: \"d3pie-misc-gradient-color\" },\n d3PieCssprefix: { key: \"d3pie-cssprefix\" },\n\n peityStrokeWidth: { key: \"peity-strokewidth\" },\n\n textOnlyDecimalPlaces: { key: \"textonly-decimal-places\" },\n textOnlyPrefix: { key: \"textonly-prefix\" },\n textOnlySuffix: { key: \"textonly-suffix\" },\n})\n\nexport const getAttributesStatic = (node: Element): Attributes => mapObjIndexed(\n (attribute: AttributeConfig) => (\n (attribute as BooleanAttributeConfig).type === \"boolean\"\n ? getDataAttributeBoolean(\n node,\n attribute.key,\n attribute.defaultValue as BooleanAttributeConfig[\"defaultValue\"],\n ) : getDataAttribute(node, attribute.key, attribute.defaultValue)\n ),\n getAttributesMap(),\n) as Attributes // need to override because of broken Ramda typings\n\nexport const getAttributesDynamic = (node: Element) => {\n const showValueOfAttribues = Array.from(node.attributes)\n .filter((attribute) => attribute.name.startsWith(\"data-show-value-of\"))\n .map((attribute) => ({\n [attribute.name.replace(\"data-\", \"\")]: attribute.value,\n }))\n const merged = mergeAll(showValueOfAttribues)\n return isEmpty(merged) ? undefined : merged\n}\n\nexport const getAttributes = (node: Element): Attributes => {\n const attributesStatic = getAttributesStatic(node)\n const showValueOf = getAttributesDynamic(node)\n return { ...attributesStatic, showValueOf }\n}\n\nexport const defaultAttributes: Partial<Attributes> = {\n legendPosition: initialLegendRight ? \"right\" : \"bottom\",\n}\n","import { createAction } from \"redux-act\"\nimport { CancelTokenSource, Method } from \"axios\"\n\nimport { createRequestAction } from \"utils/createRequestAction\"\nimport { InfoPayload } from \"domains/global/__mocks__/info-mock\"\n\nimport { storeKey } from \"./constants\"\nimport { ChartData, ChartMetadata } from \"./chart-types\"\n\nexport interface UpdateChartDataAction {\n chartData: ChartData\n id: string\n}\nexport const updateChartDataAction = createAction<UpdateChartDataAction>(\n `${storeKey}/updateChartData`,\n)\n\nexport interface UpdateChartMetadataAction {\n chartMetadata: ChartMetadata\n id: string\n}\nexport const updateChartMetadataAction = createAction<UpdateChartMetadataAction>(\n `${storeKey}/updateChartMetadata`,\n)\n\nexport interface FetchDataParams {\n fillMissingPoints?: number\n isRemotelyControlled: boolean\n viewRange: [number, number]\n}\nexport interface FetchDataUrlParams {\n host: string\n chart: string\n context: string\n format: string\n points: number\n group: string\n gtime: number\n options: string\n after: number | null\n before?: number | null\n dimensions?: string\n labels?: {[key: string]: string}\n postGroupBy?: string\n postAggregationMethod?: string\n aggrMethod?: string\n aggrGroups?: string[]\n dimensionsAggrMethod?: string\n nodeIDs?: string[]\n httpMethod?: Method\n groupBy?: string\n}\nexport interface FetchDataPayload extends FetchDataUrlParams {\n id: string,\n fetchDataParams: FetchDataParams\n cancelTokenSource: CancelTokenSource\n}\n\nexport const fetchDataAction = createRequestAction<\n FetchDataPayload,\n { id: string, chartData: ChartData, fetchDataParams: FetchDataParams }\n>(`${storeKey}/fetchDataAction`)\n\n\nexport interface FetchDataCancelAction { id: string }\nexport const fetchDataCancelAction = createAction<FetchDataCancelAction>(\n `${storeKey}/fetchDataCancelAction`,\n)\n\nexport interface FetchDataForSnapshotPayload extends FetchDataUrlParams {\n chartLibrary: string\n id: string\n}\nexport const fetchDataForSnapshotAction = createRequestAction<\n FetchDataForSnapshotPayload,\n { id: string, snapshotData: ChartData }\n>(`${storeKey}/fetchDataForSnapshotAction`)\n\nexport const snapshotExportResetAction = createRequestAction(\n `${storeKey}/snapshotExportResetAction`,\n)\n\nexport interface FetchChartPayload {\n chart: string\n id: string\n host: string\n nodeIDs?: string[]\n}\n\nexport const fetchChartAction = createRequestAction<\n FetchChartPayload,\n { chartMetadata: ChartMetadata, id: string }\n>(`${storeKey}/fetchChartAction`)\n\n\nexport interface SetResizeHeightAction {\n id: string\n resizeHeight: number\n}\nexport const setResizeHeightAction = createAction<SetResizeHeightAction>(\n `${storeKey}/setResizeHeight`,\n)\n\nexport interface SetChartPanAndZoomAction {\n id: string\n after: number\n before: number\n shouldForceTimeRange?: boolean\n}\nexport const setChartPanAndZoomAction = createAction<SetChartPanAndZoomAction>(\n `${storeKey}/setChartPanAndZoom`,\n)\n\nexport const resetChartPanAndZoomAction = createAction<{ id: string }>(\n `${storeKey}/resetChartPanAndZoomAction`,\n)\n\nexport const clearChartStateAction = createAction<{ id: string }>(\n `${storeKey}/clearChartStateAction`,\n)\n\nexport interface FetchInfoPayload {\n poll?: boolean\n}\nexport interface FetchInfoSuccessPayload {\n isCloudAvailable: boolean\n isCloudEnabled: boolean\n isAgentClaimed: boolean\n isACLKAvailable: boolean\n fullInfoPayload: InfoPayload\n}\nexport const fetchInfoAction = createRequestAction<\n FetchInfoPayload,\n FetchInfoSuccessPayload\n>(`${storeKey}/fetchInfoAction`)\n","export const SIGN_IN_IFRAME_ID = \"sign_in_iframe\"\n","/* eslint-disable */\n// Main JavaScript file for the Netdata GUI.\n\n// Codacy declarations\n/* global NETDATA */\n\nimport { identity, memoizeWith } from \"ramda\"\nimport {\n centerAroundHighlightAction,\n chartsMetadataRequestSuccess,\n clearHighlightAction,\n fetchAllAlarmsAction,\n loadSnapshotAction,\n resetGlobalPanAndZoomAction,\n resetOptionsAction,\n resetRegistry,\n setDefaultAfterAction,\n setGlobalChartUnderlayAction,\n setGlobalPanAndZoomAction,\n setOptionAction,\n} from './domains/global/actions';\nimport {\n createSelectOption,\n selectDefaultAfter,\n selectGlobalPanAndZoom,\n selectRegistry,\n} from \"./domains/global/selectors\"\nimport { seconds4human } from './domains/chart/utils/seconds4human';\nimport { zeropad } from './utils/units-conversion';\nimport {\n explicitlySignInAction,\n startSnapshotModeAction,\n stopSnapshotModeAction,\n} from './domains/dashboard/actions';\nimport { snapshotExportResetAction } from './domains/chart/actions';\nimport {\n selectAmountOfCharts,\n selectAmountOfSnapshotsFailed,\n selectAmountOfSnapshotsFetched,\n} from './domains/chart/selectors';\nimport { serverDefault } from './utils/server-detection';\nimport { name2id } from './utils/name-2-id';\nimport { isProperTimezone } from './utils/date-time';\nimport { NETDATA_REGISTRY_SERVER } from './utils';\nimport { getHashParam } from 'utils/hash-utils';\nimport { isDemo } from \"./utils/is-demo\"\nimport { LEGEND_BOTTOM_SINGLE_LINE_HEIGHT } from './domains/chart/utils/legend-utils';\nimport { defaultAttributes } from './domains/chart/utils/transformDataAttributes';\n\n// this is temporary, hook will be used after the full main.js refactor\nlet localeDateString, localeTimeString\nexport const updateLocaleFunctions = ({\n localeDateString: newLocaleDateString,\n localeTimeString: newLocaleTimeString,\n}) => {\n localeDateString = newLocaleDateString\n localeTimeString = newLocaleTimeString\n}\n\n// enable alarms checking and notifications\nvar netdataShowAlarms = true;\n\n// enable registry updates\nvar netdataRegistry = true;\n\n// forward definition only - not used here\nvar netdataServer = undefined;\nvar netdataServerStatic = undefined;\nvar netdataCheckXSS = undefined;\n\nlet reduxStore\n\nfunction escapeUserInputHTML(s) {\n return s.toString()\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/#/g, '#')\n .replace(/'/g, ''')\n .replace(/\\(/g, '(')\n .replace(/\\)/g, ')')\n .replace(/\\//g, '/');\n}\n\nconst setOption = (key, value) => {\n reduxStore.dispatch(setOptionAction({\n key,\n value,\n }))\n}\n\n// temporary function that will be removed after full main.js migration to react\nconst getFromRegistry = (prop) => {\n const registry = selectRegistry(reduxStore.getState())\n return registry?.[prop]\n}\n\nfunction verifyURL(s) {\n if (typeof (s) === 'string' && (s.startsWith('http://') || s.startsWith('https://'))) {\n return s\n .replace(/'/g, '%22')\n .replace(/\"/g, '%27')\n .replace(/\\)/g, '%28')\n .replace(/\\(/g, '%29');\n }\n\n console.log('invalid URL detected:');\n console.log(s);\n return 'javascript:alert(\"invalid url\");';\n}\n\n// --------------------------------------------------------------------\n// urlOptions\n\nwindow.urlOptions = {\n hash: '#',\n theme: null,\n help: null,\n mode: 'live', // 'live', 'print'\n update_always: false,\n pan_and_zoom: false,\n server: null,\n after: getHashParam('after') ?? 0,\n before: getHashParam('before') ?? 0,\n highlight: false,\n highlight_after: 0,\n highlight_before: 0,\n nowelcome: false,\n show_alarms: false,\n chart: null,\n family: null,\n alarm: null,\n utc: null,\n\n hasProperty: function (property) {\n // console.log('checking property ' + property + ' of type ' + typeof(this[property]));\n return typeof this[property] !== 'undefined';\n },\n\n genHash: function (forReload) {\n var hash = urlOptions.hash;\n\n hash += ';after=' + urlOptions.after.toString() +\n ';before=' + urlOptions.before.toString();\n\n if (urlOptions.highlight === true) {\n hash += ';highlight_after=' + urlOptions.highlight_after.toString() +\n ';highlight_before=' + urlOptions.highlight_before.toString();\n }\n\n if (urlOptions.theme !== null) {\n hash += ';theme=' + urlOptions.theme.toString();\n }\n\n if (urlOptions.help !== null) {\n hash += ';help=' + urlOptions.help.toString();\n }\n\n if (urlOptions.update_always === true) {\n hash += ';update_always=true';\n }\n\n if (forReload === true && urlOptions.server !== null) {\n hash += ';server=' + urlOptions.server.toString();\n }\n\n if (urlOptions.mode !== 'live') {\n hash += ';mode=' + urlOptions.mode;\n }\n\n if (urlOptions.utc !== null) {\n hash += ';utc=' + urlOptions.utc;\n }\n\n return hash;\n },\n\n parseHash: function () {\n var variables = document.location.hash.split(';');\n var len = variables.length;\n while (len--) {\n if (len !== 0) {\n var p = variables[len].split('=');\n if (urlOptions.hasProperty(p[0]) && typeof p[1] !== 'undefined') {\n urlOptions[p[0]] = decodeURIComponent(p[1]);\n }\n } else {\n if (variables[len].length > 0) {\n urlOptions.hash = variables[len];\n }\n }\n }\n\n var booleans = ['nowelcome', 'show_alarms', 'update_always'];\n len = booleans.length;\n while (len--) {\n if (urlOptions[booleans[len]] === 'true' || urlOptions[booleans[len]] === true || urlOptions[booleans[len]] === '1' || urlOptions[booleans[len]] === 1) {\n urlOptions[booleans[len]] = true;\n } else {\n urlOptions[booleans[len]] = false;\n }\n }\n\n var numeric = ['after', 'before', 'highlight_after', 'highlight_before'];\n len = numeric.length;\n while (len--) {\n if (typeof urlOptions[numeric[len]] === 'string') {\n try {\n urlOptions[numeric[len]] = parseInt(urlOptions[numeric[len]]);\n }\n catch (e) {\n console.log('failed to parse URL hash parameter ' + numeric[len]);\n urlOptions[numeric[len]] = 0;\n }\n }\n }\n\n if (urlOptions.server !== null && urlOptions.server !== '') {\n netdataServerStatic = document.location.origin.toString() + document.location.pathname.toString();\n netdataServer = urlOptions.server;\n netdataCheckXSS = true;\n } else {\n urlOptions.server = null;\n }\n\n if (urlOptions.before > 0 && urlOptions.after > 0) {\n urlOptions.pan_and_zoom = true;\n urlOptions.nowelcome = true;\n } else {\n urlOptions.pan_and_zoom = false;\n }\n\n if (urlOptions.highlight_before > 0 && urlOptions.highlight_after > 0) {\n urlOptions.highlight = true;\n } else {\n urlOptions.highlight = false;\n }\n\n switch (urlOptions.mode) {\n case 'print':\n urlOptions.theme = 'white';\n urlOptions.welcome = false;\n urlOptions.help = false;\n urlOptions.show_alarms = false;\n\n if (urlOptions.pan_and_zoom === false) {\n urlOptions.pan_and_zoom = true;\n urlOptions.before = Date.now();\n urlOptions.after = urlOptions.before - 600000;\n }\n\n netdataShowAlarms = false;\n netdataRegistry = false;\n break;\n\n case 'live':\n default:\n urlOptions.mode = 'live';\n break;\n }\n\n // console.log(urlOptions);\n },\n\n hashUpdate: function () {\n history.replaceState(null, '', urlOptions.genHash(true));\n },\n\n netdataPanAndZoomCallback: function (status, after, before) {\n //console.log(1);\n //console.log(new Error().stack);\n\n if (netdataSnapshotData === null) {\n urlOptions.pan_and_zoom = status;\n urlOptions.after = after;\n urlOptions.before = before;\n urlOptions.hashUpdate();\n }\n },\n\n updateUtcParam: function (utc) {\n if (!utc) return\n urlOptions.utc = utc\n urlOptions.hashUpdate();\n },\n\n netdataHighlightCallback: function (status, after, before) {\n if (status === true && (after === null || before === null || after <= 0 || before <= 0 || after >= before)) {\n status = false;\n after = 0;\n before = 0;\n }\n\n if (window.netdataSnapshotData === null) {\n urlOptions.highlight = status;\n } else {\n urlOptions.highlight = false;\n }\n\n urlOptions.highlight_after = Math.round(after);\n urlOptions.highlight_before = Math.round(before);\n urlOptions.hashUpdate();\n\n if (status === true && after > 0 && before > 0 && after < before) {\n var d1 = localeDateString(after);\n var d2 = localeDateString(before);\n if (d1 === d2) {\n d2 = '';\n }\n document.getElementById('navbar-highlight-content').innerHTML =\n '<span class=\"navbar-highlight-bar highlight-tooltip\" onclick=\"urlOptions.showHighlight();\" title=\"restore the highlighted view\" data-toggle=\"tooltip\" data-placement=\"bottom\">'\n + 'highlighted time-frame'\n + ' <b>' + d1 + ' <code>' + localeTimeString(after) + '</code></b> to '\n + ' <b>' + d2 + ' <code>' + localeTimeString(before) + '</code></b>, '\n + 'duration <b>' + seconds4human(Math.round((before - after) / 1000)) + '</b>'\n + '</span>'\n + '<span class=\"navbar-highlight-button-right highlight-tooltip\" onclick=\"urlOptions.clearHighlight();\" title=\"clear the highlighted time-frame\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fas fa-times\"></i></span>';\n\n $('.navbar-highlight').show();\n $('.navbar-highlight').width(\"80%\");\n $('.highlight-tooltip').tooltip({\n html: true,\n delay: { show: 500, hide: 0 },\n container: 'body'\n });\n } else {\n $('.navbar-highlight').hide();\n $('.navbar-highlight').width(\"100%\");\n }\n },\n\n clearHighlight: function () {\n reduxStore.dispatch(clearHighlightAction())\n },\n\n showHighlight: function () {\n reduxStore.dispatch(centerAroundHighlightAction())\n }\n};\n\nurlOptions.parseHash();\n\n// --------------------------------------------------------------------\n// check options that should be processed before loading netdata.js\n\nvar localStorageTested = -1;\n\nfunction localStorageTest() {\n if (localStorageTested !== -1) {\n return localStorageTested;\n }\n\n if (typeof Storage !== \"undefined\" && typeof localStorage === 'object') {\n var test = 'test';\n try {\n localStorage.setItem(test, test);\n localStorage.removeItem(test);\n localStorageTested = true;\n }\n catch (e) {\n console.log(e);\n localStorageTested = false;\n }\n } else {\n localStorageTested = false;\n }\n\n return localStorageTested;\n}\n\nfunction loadLocalStorage(name) {\n var ret = null;\n\n try {\n if (localStorageTest() === true) {\n ret = localStorage.getItem(name);\n } else {\n console.log('localStorage is not available');\n }\n }\n catch (error) {\n console.log(error);\n return null;\n }\n\n if (typeof ret === 'undefined' || ret === null) {\n return null;\n }\n\n // console.log('loaded: ' + name.toString() + ' = ' + ret.toString());\n\n return ret;\n}\n\nfunction saveLocalStorage(name, value) {\n // console.log('saving: ' + name.toString() + ' = ' + value.toString());\n try {\n if (localStorageTest() === true) {\n localStorage.setItem(name, value.toString());\n return true;\n }\n }\n catch (error) {\n console.log(error);\n }\n\n return false;\n}\n\nfunction getTheme(def) {\n if (urlOptions.mode === 'print') {\n return 'white';\n }\n\n var ret = loadLocalStorage('netdataTheme');\n if (typeof ret === 'undefined' || ret === null || ret === 'undefined') {\n return def;\n } else {\n return ret;\n }\n}\n\nfunction setTheme(theme) {\n if (urlOptions.mode === 'print') {\n return false;\n }\n\n if (theme === netdataTheme) {\n return false;\n }\n return saveLocalStorage('netdataTheme', theme);\n}\n\nwindow.netdataTheme = getTheme('slate');\n// this is of course temporary, will be fixed during complete main.js rewrite\nNETDATA.updateTheme()\nvar netdataShowHelp = true;\n\nif (urlOptions.theme !== null) {\n setTheme(urlOptions.theme);\n netdataTheme = urlOptions.theme;\n window.NETDATA.updateTheme()\n} else {\n urlOptions.theme = netdataTheme;\n}\n\nif (urlOptions.help !== null) {\n saveLocalStorage('options.show_help', urlOptions.help);\n netdataShowHelp = urlOptions.help;\n} else {\n urlOptions.help = loadLocalStorage('options.show_help');\n}\n\n// --------------------------------------------------------------------\n// natural sorting\n// http://www.davekoelle.com/files/alphanum.js - LGPL\n\nfunction naturalSortChunkify(t) {\n var tz = [];\n var x = 0, y = -1, n = 0, i, j;\n\n while (i = (j = t.charAt(x++)).charCodeAt(0)) {\n var m = (i >= 48 && i <= 57);\n if (m !== n) {\n tz[++y] = \"\";\n n = m;\n }\n tz[y] += j;\n }\n\n return tz;\n}\n\nfunction naturalSortCompare(a, b) {\n var aa = naturalSortChunkify(a.toLowerCase());\n var bb = naturalSortChunkify(b.toLowerCase());\n\n for (var x = 0; aa[x] && bb[x]; x++) {\n if (aa[x] !== bb[x]) {\n var c = Number(aa[x]), d = Number(bb[x]);\n if (c.toString() === aa[x] && d.toString() === bb[x]) {\n return c - d;\n } else {\n return (aa[x] > bb[x]) ? 1 : -1;\n }\n }\n }\n\n return aa.length - bb.length;\n}\n\n// --------------------------------------------------------------------\n// saving files to client\n\nfunction saveTextToClient(data, filename) {\n var blob = new Blob([data], {\n type: 'application/octet-stream'\n });\n\n var url = URL.createObjectURL(blob);\n var link = document.createElement('a');\n link.setAttribute('href', url);\n link.setAttribute('download', filename);\n\n var el = document.getElementById('hiddenDownloadLinks');\n el.innerHTML = '';\n el.appendChild(link);\n\n setTimeout(function () {\n el.removeChild(link);\n URL.revokeObjectURL(url);\n }, 60);\n\n link.click();\n}\n\nfunction saveObjectToClient(data, filename) {\n saveTextToClient(JSON.stringify(data), filename);\n}\n\nfunction netdataURL(url, forReload) {\n if (typeof url === 'undefined')\n // url = document.location.toString();\n {\n url = '';\n }\n\n if (url.indexOf('#') !== -1) {\n url = url.substring(0, url.indexOf('#'));\n }\n\n var hash = urlOptions.genHash(forReload);\n\n // console.log('netdataURL: ' + url + hash);\n\n return url + hash;\n}\n\nfunction netdataReload(url) {\n document.location = verifyURL(netdataURL(url, true));\n\n // since we play with hash\n // this is needed to reload the page\n location.reload();\n}\n\nwindow.gotoHostedModalHandler = (url) => {\n document.location = verifyURL(url + urlOptions.genHash());\n return false;\n}\n\nvar gotoServerValidateRemaining = 0;\nvar gotoServerMiddleClick = false;\nvar gotoServerStop = false;\n\nfunction gotoServerValidateUrl(id, guid, url) {\n var penalty = 0;\n var error = 'failed';\n\n if (document.location.toString().startsWith('http://') && url.toString().startsWith('https://'))\n // we penalize https only if the current url is http\n // to allow the user walk through all its servers.\n {\n penalty = 500;\n } else if (document.location.toString().startsWith('https://') && url.toString().startsWith('http://')) {\n error = 'can\\'t check';\n }\n\n var finalURL = netdataURL(url);\n\n setTimeout(function () {\n document.getElementById('gotoServerList').innerHTML += '<tr><td style=\"padding-left: 20px;\"><a href=\"' + verifyURL(finalURL) + '\" target=\"_blank\">' + escapeUserInputHTML(url) + '</a></td><td style=\"padding-left: 30px;\"><code id=\"' + guid + '-' + id + '-status\">checking...</code></td></tr>';\n\n NETDATA.registryHello(url, function (data) {\n if (typeof data !== 'undefined' && data !== null && typeof data.machine_guid === 'string' && data.machine_guid === guid) {\n // console.log('OK ' + id + ' URL: ' + url);\n document.getElementById(guid + '-' + id + '-status').innerHTML = \"OK\";\n\n if (!gotoServerStop) {\n gotoServerStop = true;\n\n if (gotoServerMiddleClick) {\n window.open(verifyURL(finalURL), '_blank');\n gotoServerMiddleClick = false;\n const registryMachines = getFromRegistry(\"registryMachines\");\n document.getElementById('gotoServerResponse').innerHTML = '<b>Opening new window to ' + registryMachines[guid].name + '<br/><a href=\"' + verifyURL(finalURL) + '\">' + escapeUserInputHTML(url) + '</a></b><br/>(check your pop-up blocker if it fails)';\n } else {\n document.getElementById('gotoServerResponse').innerHTML += 'found it! It is at:<br/><small>' + escapeUserInputHTML(url) + '</small>';\n document.location = verifyURL(finalURL);\n $('#gotoServerModal').modal('hide');\n }\n }\n } else {\n if (typeof data !== 'undefined' && data !== null && typeof data.machine_guid === 'string' && data.machine_guid !== guid) {\n error = 'wrong machine';\n }\n\n document.getElementById(guid + '-' + id + '-status').innerHTML = error;\n gotoServerValidateRemaining--;\n if (gotoServerValidateRemaining <= 0) {\n gotoServerMiddleClick = false;\n document.getElementById('gotoServerResponse').innerHTML = '<b>Sorry! I cannot find any operational URL for this server</b>';\n }\n }\n });\n }, (id * 50) + penalty);\n}\n\nwindow.gotoServerModalHandler = function gotoServerModalHandler(guid) {\n // console.log('goto server: ' + guid);\n\n gotoServerStop = false;\n var checked = {};\n const registryMachines = getFromRegistry(\"registryMachines\");\n var len = registryMachines[guid].alternateUrls.length;\n var count = 0;\n\n document.getElementById('gotoServerResponse').innerHTML = '';\n document.getElementById('gotoServerList').innerHTML = '';\n document.getElementById('gotoServerName').innerHTML = registryMachines[guid].name;\n $('#gotoServerModal').modal('show');\n\n gotoServerValidateRemaining = len;\n while (len--) {\n var url = registryMachines[guid].alternateUrls[len];\n checked[url] = true;\n gotoServerValidateUrl(count++, guid, url);\n }\n\n // When the registry is enabled, if the user's known URLs are not working\n // we consult the registry to get additional URLs.\n setTimeout(function () {\n if (gotoServerStop === false) {\n document.getElementById('gotoServerResponse').innerHTML = '<b>Added all the known URLs for this machine.</b>';\n NETDATA.registrySearch(guid, getFromRegistry, function (data) {\n // console.log(data);\n len = data.urls.length;\n while (len--) {\n var url = data.urls[len][1];\n // console.log(url);\n if (typeof checked[url] === 'undefined') {\n gotoServerValidateRemaining++;\n checked[url] = true;\n gotoServerValidateUrl(count++, guid, url);\n }\n }\n });\n }\n }, 2000);\n\n return false;\n}\n\nwindow.switchRegistryModalHandler = () => {\n document.getElementById('switchRegistryPersonGUID').value = getFromRegistry(\"personGuid\");\n document.getElementById('switchRegistryURL').innerHTML = getFromRegistry(\"registryServer\");\n document.getElementById('switchRegistryResponse').innerHTML = '';\n $('#switchRegistryModal').modal('show');\n};\n\nwindow.notifyForSwitchRegistry = () => {\n // it's just old code, with minimal changes\n const newPersonGuid = document.getElementById('switchRegistryPersonGUID').value;\n\n if (newPersonGuid !== '' && newPersonGuid.length === 36) {\n\n $.ajax({\n url: getFromRegistry(\"registryServer\") + '/api/v1/registry?action=switch&machine='\n + getFromRegistry(\"machineGuid\") + '&name='\n + encodeURIComponent(getFromRegistry(\"hostname\")) + '&url='\n + encodeURIComponent(serverDefault) + '&to=' + newPersonGuid,\n async: true,\n cache: false,\n headers: {\n 'Cache-Control': 'no-cache, no-store',\n 'Pragma': 'no-cache'\n },\n xhrFields: {withCredentials: true} // required for the cookie\n })\n .done(function (data) {\n data = NETDATA.xss.checkAlways('/api/v1/registry?action=switch', data);\n\n if (typeof data.status !== 'string' || data.status !== 'ok') {\n // NETDATA.error(413, NETDATA.registry.server + ' responded with: ' + JSON.stringify(data));\n console.warn(\"Netdata registry server send invalid response to SWITCH\", data)\n data = null;\n }\n\n $('#switchRegistryModal').modal('hide');\n })\n .fail(function () {\n // NETDATA.error(414, NETDATA.registry.server);\n console.warn(\"Netdata registry SWITCH failed\")\n document.getElementById('switchRegistryResponse').innerHTML = \"<b>Sorry! The registry rejected your request.</b>\";\n });\n } else {\n document.getElementById('switchRegistryResponse').innerHTML = \"<b>The ID you have entered is not a GUID.</b>\";\n }\n};\n\nvar deleteRegistryGuid = null;\nvar deleteRegistryUrl = null;\n\nwindow.deleteRegistryModalHandler = (guid, name, url) => {\n deleteRegistryGuid = guid;\n deleteRegistryUrl = url;\n\n document.getElementById('deleteRegistryServerName').innerHTML = name;\n document.getElementById('deleteRegistryServerName2').innerHTML = name;\n document.getElementById('deleteRegistryServerURL').innerHTML = url;\n document.getElementById('deleteRegistryResponse').innerHTML = '';\n\n $('#deleteRegistryModal').modal('show');\n}\n\nwindow.notifyForDeleteRegistry = () => {\n const responseEl = document.getElementById('deleteRegistryResponse');\n\n if (deleteRegistryUrl) {\n NETDATA.registryDelete(getFromRegistry, serverDefault, deleteRegistryUrl, function (result) {\n if (result !== null) {\n deleteRegistryUrl = null;\n $('#deleteRegistryModal').modal('hide');\n reduxStore.dispatch(resetRegistry())\n } else {\n responseEl.innerHTML = \"<b>Sorry, this command was rejected by the registry server!</b>\";\n }\n });\n }\n}\n\nvar options = {\n menus: {},\n submenu_names: {},\n data: null,\n hostname: 'netdata_server', // will be overwritten by the netdata server\n version: 'unknown',\n release_channel: 'unknown',\n hosts: [],\n\n duration: 0, // the default duration of the charts\n update_every: 1,\n\n chartsPerRow: 0,\n // chartsMinWidth: 1450,\n chartsHeight: 180,\n};\n\nfunction chartsPerRow(total) {\n void (total);\n\n if (options.chartsPerRow === 0) {\n return 1;\n //var width = Math.floor(total / options.chartsMinWidth);\n //if(width === 0) width = 1;\n //return width;\n } else {\n return options.chartsPerRow;\n }\n}\n\nfunction prioritySort(a, b) {\n if (a.priority < b.priority) {\n return -1;\n }\n if (a.priority > b.priority) {\n return 1;\n }\n return naturalSortCompare(a.name, b.name);\n}\n\nfunction sortObjectByPriority(object) {\n var idx = {};\n var sorted = [];\n\n for (var i in object) {\n if (!object.hasOwnProperty(i)) {\n continue;\n }\n\n if (typeof idx[i] === 'undefined') {\n idx[i] = object[i];\n sorted.push(i);\n }\n }\n\n sorted.sort(function (a, b) {\n if (idx[a].priority < idx[b].priority) {\n return -1;\n }\n if (idx[a].priority > idx[b].priority) {\n return 1;\n }\n return naturalSortCompare(a, b);\n });\n\n return sorted;\n}\n\n// ----------------------------------------------------------------------------\n// scroll to a section, without changing the browser history\n\nwindow.scrollToId = (hash) => {\n if (hash && hash !== '' && document.getElementById(hash) !== null) {\n var offset = $('#' + hash).offset();\n if (typeof offset !== 'undefined') {\n //console.log('scrolling to ' + hash + ' at ' + offset.top.toString());\n $('html, body').animate({ scrollTop: offset.top - 30 }, 0);\n }\n }\n\n // we must return false to prevent the default action\n return false;\n}\n\n// ----------------------------------------------------------------------------\n\n// user editable information\nwindow.customDashboard = {\n menu: {},\n submenu: {},\n context: {}\n};\n\n// netdata standard information\nconst netdataDashboard = {\n sparklines_registry: {},\n os: 'unknown',\n\n menu: {},\n submenu: {},\n context: {},\n\n // generate a sparkline\n // used in the documentation\n sparkline: function (prefix, chart, dimension, units, suffix) {\n if (options.data === null || typeof options.data.charts === 'undefined') {\n return '';\n }\n\n if (typeof options.data.charts[chart] === 'undefined') {\n return '';\n }\n\n if (typeof options.data.charts[chart].dimensions === 'undefined') {\n return '';\n }\n\n if (typeof options.data.charts[chart].dimensions[dimension] === 'undefined') {\n return '';\n }\n\n var key = chart + '.' + dimension;\n\n if (typeof units === 'undefined') {\n units = '';\n }\n\n if (typeof this.sparklines_registry[key] === 'undefined') {\n this.sparklines_registry[key] = { count: 1 };\n } else {\n this.sparklines_registry[key].count++;\n }\n\n key = key + '.' + this.sparklines_registry[key].count;\n\n return prefix + '<div class=\"netdata-container\" data-netdata=\"' + chart + '\" data-width=\"25%\" data-height=\"15px\" data-chart-library=\"dygraph\" data-dygraph-theme=\"sparkline\" data-dimensions=\"' + dimension + '\" data-show-value-of-' + dimension + '-at=\"' + key + '\"></div> (<span id=\"' + key + '\" style=\"display: inline-block; min-width: 50px; text-align: right;\">X</span>' + units + ')' + suffix;\n },\n\n gaugeChart: function (title, width, dimensions, colors) {\n if (typeof colors === 'undefined') {\n colors = '';\n }\n\n if (typeof dimensions === 'undefined') {\n dimensions = '';\n }\n\n return '<div class=\"netdata-container\" data-netdata=\"CHART_UNIQUE_ID\"'\n + ' data-dimensions=\"' + dimensions + '\"'\n + ' data-chart-library=\"gauge\"'\n + ' data-gauge-adjust=\"width\"'\n + ' data-title=\"' + title + '\"'\n + ' data-width=\"' + width + '\"'\n + ' data-points=\"CHART_DURATION\"'\n + ' data-colors=\"' + colors + '\"'\n + ' role=\"application\"></div>';\n },\n\n anyAttribute: function (obj, attr, key, def) {\n if (typeof (obj[key]) !== 'undefined') {\n var x = obj[key][attr];\n\n if (typeof (x) === 'undefined') {\n return def;\n }\n\n if (typeof (x) === 'function') {\n return x(netdataDashboard.os);\n }\n\n return x;\n }\n\n return def;\n },\n\n menuTitle: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return (this.anyAttribute(this.menu, 'title', chart.menu_pattern, chart.menu_pattern).toString()\n + ' ' + chart.type.slice(-(chart.type.length - chart.menu_pattern.length - 1)).toString()).replace(/_/g, ' ');\n }\n\n return (this.anyAttribute(this.menu, 'title', chart.menu, chart.menu)).toString().replace(/_/g, ' ');\n },\n\n menuIcon: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return this.anyAttribute(this.menu, 'icon', chart.menu_pattern, '<i class=\"fas fa-puzzle-piece\"></i>').toString();\n }\n\n return this.anyAttribute(this.menu, 'icon', chart.menu, '<i class=\"fas fa-puzzle-piece\"></i>');\n },\n\n menuInfo: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return this.anyAttribute(this.menu, 'info', chart.menu_pattern, null);\n }\n\n return this.anyAttribute(this.menu, 'info', chart.menu, null);\n },\n\n menuHeight: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return this.anyAttribute(this.menu, 'height', chart.menu_pattern, 1.0);\n }\n\n return this.anyAttribute(this.menu, 'height', chart.menu, 1.0);\n },\n\n submenuTitle: function (menu, submenu) {\n var key = menu + '.' + submenu;\n // console.log(key);\n var title = this.anyAttribute(this.submenu, 'title', key, submenu).toString().replace(/_/g, ' ');\n if (title.length > 28) {\n var a = title.substring(0, 13);\n var b = title.substring(title.length - 12, title.length);\n return a + '...' + b;\n }\n return title;\n },\n\n submenuInfo: function (menu, submenu) {\n var key = menu + '.' + submenu;\n return this.anyAttribute(this.submenu, 'info', key, null);\n },\n\n submenuHeight: function (menu, submenu, relative) {\n var key = menu + '.' + submenu;\n return this.anyAttribute(this.submenu, 'height', key, 1.0) * relative;\n },\n\n contextInfo: function (id) {\n var x = this.anyAttribute(this.context, 'info', id, null);\n\n if (x !== null) {\n return '<div class=\"shorten dashboard-context-info netdata-chart-alignment\" role=\"document\">' + x + '</div>';\n } else {\n return '';\n }\n },\n\n contextValueRange: function (id) {\n if (typeof this.context[id] !== 'undefined' && typeof this.context[id].valueRange !== 'undefined') {\n return this.context[id].valueRange;\n } else {\n return '[null, null]';\n }\n },\n\n contextHeight: function (id, def) {\n if (typeof this.context[id] !== 'undefined' && typeof this.context[id].height !== 'undefined') {\n return def * this.context[id].height;\n } else {\n return def;\n }\n },\n\n contextDecimalDigits: function (id, def) {\n if (typeof this.context[id] !== 'undefined' && typeof this.context[id].decimalDigits !== 'undefined') {\n return this.context[id].decimalDigits;\n } else {\n return def;\n }\n }\n};\nwindow.netdataDashboard = netdataDashboard // share with dashboard_info.js :/\n\n// ----------------------------------------------------------------------------\n\n// enrich the data structure returned by netdata\n// to reflect our menu system and content\n// TODO: this is a shame - we should fix charts naming (issue #807)\nfunction enrichChartData(chart) {\n var parts = chart.type.split('_');\n var tmp = parts[0];\n\n switch (tmp) {\n case 'ap':\n case 'net':\n case 'disk':\n case 'powersupply':\n chart.menu = tmp;\n break;\n\n case 'apache':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'cache') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'bind':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'rndc') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'cgroup':\n chart.menu = chart.type;\n if (chart.id.match(/.*[\\._\\/-:]qemu[\\._\\/-:]*/) || chart.id.match(/.*[\\._\\/-:]kvm[\\._\\/-:]*/)) {\n chart.menu_pattern = 'cgqemu';\n } else {\n chart.menu_pattern = 'cgroup';\n }\n break;\n\n case 'go':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'expvar') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'mount':\n if (parts.length > 2) {\n chart.menu = tmp + '_' + parts[1];\n }\n else {\n chart.menu = tmp;\n }\n break;\n\n case 'isc':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'dhcpd') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'ovpn':\n chart.menu = chart.type;\n if (parts.length > 3 && parts[1] === 'status' && parts[2] === 'log') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'smartd':\n case 'web':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'log') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'anomaly':\n if (parts.length >= 2 && parts[1].startsWith('detection')) {\n chart.menu = tmp + '_detection';\n }\n break;\n\n case 'tc':\n chart.menu = tmp;\n\n // find a name for this device from fireqos info\n // we strip '_(in|out)' or '(in|out)_'\n if (chart.context === 'tc.qos' && (typeof options.submenu_names[chart.family] === 'undefined' || options.submenu_names[chart.family] === chart.family)) {\n var n = chart.name.split('.')[1];\n if (n.endsWith('_in')) {\n options.submenu_names[chart.family] = n.slice(0, n.lastIndexOf('_in'));\n } else if (n.endsWith('_out')) {\n options.submenu_names[chart.family] = n.slice(0, n.lastIndexOf('_out'));\n } else if (n.startsWith('in_')) {\n options.submenu_names[chart.family] = n.slice(3, n.length);\n } else if (n.startsWith('out_')) {\n options.submenu_names[chart.family] = n.slice(4, n.length);\n } else {\n options.submenu_names[chart.family] = n;\n }\n }\n\n // increase the priority of IFB devices\n // to have inbound appear before outbound\n if (chart.id.match(/.*-ifb$/)) {\n chart.priority--;\n }\n\n break;\n\n default:\n chart.menu = chart.type;\n if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n }\n\n chart.submenu = chart.family;\n}\n\n// ----------------------------------------------------------------------------\n\nfunction headMain(os, charts, duration) {\n void (os);\n\n if (urlOptions.mode === 'print') {\n return '';\n }\n\n var head = '';\n\n if (typeof charts['system.swap'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.swap\"'\n + ' data-dimensions=\"used\"'\n + ' data-append-options=\"percentage\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Used Swap\"'\n + ' data-units=\"%\"'\n + ' data-easypiechart-max-value=\"100\"'\n + ' data-width=\"9%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-colors=\"#DD4400\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.io'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.io\"'\n + ' data-dimensions=\"in\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Read\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.io.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.io\"'\n + ' data-dimensions=\"out\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Write\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.io.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.pgpgio'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.pgpgio\"'\n + ' data-dimensions=\"in\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Read\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.pgpgio.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.pgpgio\"'\n + ' data-dimensions=\"out\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Write\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.pgpgio.mainhead\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.cpu'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.cpu\"'\n + ' data-chart-library=\"gauge\"'\n + ' data-title=\"CPU\"'\n + ' data-units=\"%\"'\n + ' data-gauge-max-value=\"100\"'\n + ' data-width=\"20%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-colors=\"' + NETDATA.colors[12] + '\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.net'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.net\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Net Inbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.net.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.net\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Net Outbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.net.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.ip'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ip\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IP Inbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ip.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ip\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IP Outbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ip.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.ipv4'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv4\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv4 Inbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv4.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv4\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv4 Outbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv4.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.ipv6'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv6\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv6 Inbound\"'\n + ' data-units=\"kbps\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv6.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv6\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv6 Outbound\"'\n + ' data-units=\"kbps\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv6.mainhead\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.ram'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ram\"'\n + ' data-dimensions=\"used|buffers|active|wired\"' // active and wired are FreeBSD stats\n + ' data-append-options=\"percentage\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Used RAM\"'\n + ' data-units=\"%\"'\n + ' data-easypiechart-max-value=\"100\"'\n + ' data-width=\"9%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-colors=\"' + NETDATA.colors[7] + '\"'\n + ' role=\"application\"></div>';\n }\n\n return head;\n}\n\nfunction generateHeadCharts(type, chart, duration) {\n if (urlOptions.mode === 'print') {\n return '';\n }\n\n var head = '';\n var hcharts = netdataDashboard.anyAttribute(netdataDashboard.context, type, chart.context, []);\n if (hcharts.length > 0) {\n var hi = 0, hlen = hcharts.length;\n while (hi < hlen) {\n if (typeof hcharts[hi] === 'function') {\n head += hcharts[hi](netdataDashboard.os, chart.id).replace(/CHART_DURATION/g, duration.toString()).replace(/CHART_UNIQUE_ID/g, chart.id);\n } else {\n head += hcharts[hi].replace(/CHART_DURATION/g, duration.toString()).replace(/CHART_UNIQUE_ID/g, chart.id);\n }\n hi++;\n }\n }\n return head;\n}\n\nfunction renderPage(menus, data) {\n var div = document.getElementById('charts_div');\n var pcent_width = Math.floor(100 / chartsPerRow($(div).width()));\n\n // find the proper duration for per-second updates\n var duration = Math.round(($(div).width() * pcent_width / 100 * data.update_every / 3) / 60) * 60;\n options.duration = duration; // probably obsolete/not needed\n options.update_every = data.update_every;\n\n var html = '';\n var sidebar = '<ul class=\"nav dashboard-sidenav\" data-spy=\"affix\" id=\"sidebar_ul\">';\n var mainhead = headMain(netdataDashboard.os, data.charts, duration);\n\n // sort the menus\n var main = sortObjectByPriority(menus);\n var i = 0, len = main.length;\n\n // todo hook to options\n const hasChartsOnBottom = defaultAttributes.legendPosition === \"bottom\"\n const chartAdditionalHeight = hasChartsOnBottom ? LEGEND_BOTTOM_SINGLE_LINE_HEIGHT : 0\n while (i < len) {\n var menu = main[i++];\n\n // generate an entry at the main menu\n\n var menuid = NETDATA.name2id('menu_' + menu);\n sidebar += '<li class=\"\"><a href=\"#' + menuid + '\" onClick=\"return scrollToId(\\'' + menuid + '\\');\">' + menus[menu].icon + ' ' + menus[menu].title + '</a><ul class=\"nav\">';\n html += '<div role=\"section\" class=\"dashboard-section\"><div role=\"sectionhead\"><h1 id=\"' + menuid + '\" role=\"heading\">' + menus[menu].icon + ' ' + menus[menu].title + '</h1></div><div role=\"section\" class=\"dashboard-subsection\">';\n\n if (menus[menu].info !== null) {\n html += menus[menu].info;\n }\n\n // console.log(' >> ' + menu + ' (' + menus[menu].priority + '): ' + menus[menu].title);\n\n var shtml = '';\n var mhead = '<div class=\"netdata-chart-row\">' + mainhead;\n mainhead = '';\n\n // sort the submenus of this menu\n var sub = sortObjectByPriority(menus[menu].submenus);\n var si = 0, slen = sub.length;\n while (si < slen) {\n var submenu = sub[si++];\n\n // generate an entry at the submenu\n var submenuid = NETDATA.name2id('menu_' + menu + '_submenu_' + submenu);\n sidebar += '<li class><a href=\"#' + submenuid + '\" onClick=\"return scrollToId(\\'' + submenuid + '\\');\">' + menus[menu].submenus[submenu].title + '</a></li>';\n shtml += '<div role=\"section\" class=\"dashboard-section-container\" id=\"' + submenuid + '\"><h2 id=\"' + submenuid + '\" class=\"netdata-chart-alignment\" role=\"heading\">' + menus[menu].submenus[submenu].title + '</h2>';\n\n if (menus[menu].submenus[submenu].info !== null) {\n shtml += '<div class=\"dashboard-submenu-info netdata-chart-alignment\" role=\"document\">' + menus[menu].submenus[submenu].info + '</div>';\n }\n\n var head = '<div class=\"netdata-chart-row\">';\n var chtml = '';\n\n // console.log(' \\------- ' + submenu + ' (' + menus[menu].submenus[submenu].priority + '): ' + menus[menu].submenus[submenu].title);\n\n // sort the charts in this submenu of this menu\n menus[menu].submenus[submenu].charts.sort(prioritySort);\n var ci = 0, clen = menus[menu].submenus[submenu].charts.length;\n while (ci < clen) {\n var chart = menus[menu].submenus[submenu].charts[ci++];\n\n // generate the submenu heading charts\n mhead += generateHeadCharts('mainheads', chart, duration);\n head += generateHeadCharts('heads', chart, duration);\n\n function chartCommonMin(family, context, units) {\n var x = netdataDashboard.anyAttribute(netdataDashboard.context, 'commonMin', context, undefined);\n if (typeof x !== 'undefined') {\n return ' data-common-min=\"' + family + '/' + context + '/' + units + '\"';\n } else {\n return '';\n }\n }\n\n function chartCommonMax(family, context, units) {\n var x = netdataDashboard.anyAttribute(netdataDashboard.context, 'commonMax', context, undefined);\n if (typeof x !== 'undefined') {\n return ' data-common-max=\"' + family + '/' + context + '/' + units + '\"';\n } else {\n return '';\n }\n }\n\n // generate the chart\n if (urlOptions.mode === 'print') {\n chtml += '<div role=\"row\" class=\"dashboard-print-row\">';\n }\n\n const chartHeight = netdataDashboard.contextHeight(chart.context, options.chartsHeight)\n + chartAdditionalHeight;\n\n chtml += '<div class=\"netdata-chartblock-container\" style=\"width: ' + pcent_width.toString() + '%;\">' + netdataDashboard.contextInfo(chart.context) + '<div class=\"netdata-container\" id=\"chart_' + NETDATA.name2id(chart.id) + '\" data-netdata=\"' + chart.id + '\"'\n + ' data-width=\"100%\"'\n + ' data-height=\"' + chartHeight.toString() + 'px\"'\n + ' data-dygraph-valuerange=\"' + netdataDashboard.contextValueRange(chart.context) + '\"'\n + ' data-id=\"' + NETDATA.name2id(options.hostname + '/' + chart.id) + '\"'\n + ' data-colors=\"' + netdataDashboard.anyAttribute(netdataDashboard.context, 'colors', chart.context, '') + '\"'\n + ' data-decimal-digits=\"' + netdataDashboard.contextDecimalDigits(chart.context, -1) + '\"'\n + (hasChartsOnBottom ? ' data-legend-position=\"bottom\"' : '')\n + chartCommonMin(chart.family, chart.context, chart.units)\n + chartCommonMax(chart.family, chart.context, chart.units)\n + ' role=\"application\"></div></div>';\n\n if (urlOptions.mode === 'print') {\n chtml += '</div>';\n }\n }\n\n head += '</div>';\n shtml += head + chtml + '</div>';\n }\n\n mhead += '</div>';\n sidebar += '</ul></li>';\n html += mhead + shtml + '</div></div><hr role=\"separator\"/>';\n }\n\n const isMemoryModeDbEngine = data.memory_mode === \"dbengine\";\n\n sidebar += '<li class=\"\" style=\"padding-top:15px;\"><a href=\"https://learn.netdata.cloud/docs/agent/collectors/quickstart/\" target=\"_blank\"><i class=\"fas fa-plus\"></i> Add more charts</a></li>';\n sidebar += '<li class=\"\"><a href=\"https://learn.netdata.cloud/docs/agent/health/quickstart/\" target=\"_blank\"><i class=\"fas fa-plus\"></i> Add more alarms</a></li>';\n sidebar += '<li class=\"\" style=\"margin:20px;color:#666;\"><small>Every ' +\n ((data.update_every === 1) ? 'second' : data.update_every.toString() + ' seconds') + ', ' +\n 'Netdata collects <strong>' + data.dimensions_count.toLocaleString() + '</strong> metrics on ' +\n data.hostname.toString() + ', presents them in <strong>' +\n data.charts_count.toLocaleString() + '</strong> charts' +\n (isMemoryModeDbEngine ? '' : ',') + // oxford comma\n ' and monitors them with <strong>' +\n data.alarms_count.toLocaleString() + '</strong> alarms.';\n\n if (!isMemoryModeDbEngine) {\n sidebar += '<br /> <br />Get more history by ' +\n '<a href=\"https://learn.netdata.cloud/guides/longer-metrics-storage#using-the-round-robin-database\" target=_blank>configuring Netdata\\'s <strong>history</strong></a> or switching to the <a href=\"https://learn.netdata.cloud/docs/agent/database/engine\" target=_blank>database engine.</a>';\n }\n\n sidebar += '<br/> <br/><strong>netdata</strong><br/>' + data.version.toString() + '</small>';\n\n sidebar += '</li>'\n\n sidebar += '<li id=\"sidebar-end-portal-container\"></li>'\n\n\n sidebar += '</ul>';\n div.innerHTML = html;\n document.getElementById('sidebar').innerHTML = sidebar;\n\n if (urlOptions.highlight === true) {\n reduxStore.dispatch(setGlobalChartUnderlayAction({\n after: urlOptions.highlight_after,\n before: urlOptions.highlight_before,\n }))\n }\n\n if (urlOptions.mode === 'print') {\n printPage();\n } else {\n finalizePage();\n }\n}\n\nfunction renderChartsAndMenu(data) {\n options.menus = {};\n options.submenu_names = {};\n\n var menus = options.menus;\n var charts = data.charts;\n var m, menu_key;\n\n for (var c in charts) {\n if (!charts.hasOwnProperty(c)) {\n continue;\n }\n\n var chart = charts[c];\n enrichChartData(chart);\n m = chart.menu;\n\n // create the menu\n if (typeof menus[m] === 'undefined') {\n menus[m] = {\n menu_pattern: chart.menu_pattern,\n priority: chart.priority,\n submenus: {},\n title: netdataDashboard.menuTitle(chart),\n icon: netdataDashboard.menuIcon(chart),\n info: netdataDashboard.menuInfo(chart),\n height: netdataDashboard.menuHeight(chart) * options.chartsHeight\n };\n } else {\n if (typeof (menus[m].menu_pattern) === 'undefined') {\n menus[m].menu_pattern = chart.menu_pattern;\n }\n\n if (chart.priority < menus[m].priority) {\n menus[m].priority = chart.priority;\n }\n }\n\n menu_key = (typeof (menus[m].menu_pattern) !== 'undefined') ? menus[m].menu_pattern : m;\n\n // create the submenu\n if (typeof menus[m].submenus[chart.submenu] === 'undefined') {\n menus[m].submenus[chart.submenu] = {\n priority: chart.priority,\n charts: [],\n title: null,\n info: netdataDashboard.submenuInfo(menu_key, chart.submenu),\n height: netdataDashboard.submenuHeight(menu_key, chart.submenu, menus[m].height)\n };\n } else {\n if (chart.priority < menus[m].submenus[chart.submenu].priority) {\n menus[m].submenus[chart.submenu].priority = chart.priority;\n }\n }\n\n // index the chart in the menu/submenu\n menus[m].submenus[chart.submenu].charts.push(chart);\n }\n\n // propagate the descriptive subname given to QoS\n // to all the other submenus with the same name\n for (var m in menus) {\n if (!menus.hasOwnProperty(m)) {\n continue;\n }\n\n for (var s in menus[m].submenus) {\n if (!menus[m].submenus.hasOwnProperty(s)) {\n continue;\n }\n\n // set the family using a name\n if (typeof options.submenu_names[s] !== 'undefined') {\n menus[m].submenus[s].title = s + ' (' + options.submenu_names[s] + ')';\n } else {\n menu_key = (typeof (menus[m].menu_pattern) !== 'undefined') ? menus[m].menu_pattern : m;\n menus[m].submenus[s].title = netdataDashboard.submenuTitle(menu_key, s);\n }\n }\n }\n\n renderPage(menus, data);\n}\n\n// ----------------------------------------------------------------------------\n\nexport const handleLoadJs = (promise, library, callback) => promise\n .catch((e) => {\n console.warn('error', e);\n alert(`Cannot load required JS library: ${library}`)\n })\n .then(() => {\n callback()\n })\n\n\nfunction loadClipboard(callback) {\n handleLoadJs(\n import(\"clipboard-polyfill\").then((clipboard) => {\n window.clipboard = clipboard\n }),\n \"clipboard-polyfill\",\n callback,\n )\n}\n\nfunction loadBootstrapTable(callback) {\n handleLoadJs(\n Promise.all([\n import(\"bootstrap-table\").then(() => (\n import('bootstrap-table/dist/extensions/export/bootstrap-table-export.min')\n )),\n import(\"tableexport.jquery.plugin\")\n ]),\n \"bootstrap-table\",\n callback,\n )\n}\n\nfunction loadBootstrapSlider(callback) {\n handleLoadJs(\n Promise.all([\n import(\"bootstrap-slider\").then(({ default: slider }) => {\n window.Slider = slider\n }),\n import(\"bootstrap-slider/dist/css/bootstrap-slider.min.css\"),\n ]),\n \"bootstrap-slider\",\n callback,\n )\n}\n\nfunction loadLzString(callback) {\n handleLoadJs(import(\"lz-string\"), \"lz-string\", callback)\n}\n\nfunction loadPako(callback) {\n handleLoadJs(\n import(\"pako\").then(({ default: pako }) => {\n window.pako = pako\n }),\n \"pako\",\n callback,\n )\n}\n\n// ----------------------------------------------------------------------------\n\nwindow.clipboardCopy = text => {\n clipboard.writeText(text);\n};\n\nwindow.clipboardCopyBadgeEmbed = url => {\n clipboard.writeText('<embed src=\"' + url + '\" type=\"image/svg+xml\" height=\"20\"/>');\n};\n\n// ----------------------------------------------------------------------------\n\nfunction alarmsUpdateModal() {\n var active = '<h3>Raised Alarms</h3><table class=\"table\">';\n var all = '<h3>All Running Alarms</h3><div class=\"panel-group\" id=\"alarms_all_accordion\" role=\"tablist\" aria-multiselectable=\"true\">';\n var footer = '<hr/><a href=\"https://github.com/netdata/netdata/tree/master/web/api/badges#netdata-badges\" target=\"_blank\">netdata badges</a> refresh automatically. Their color indicates the state of the alarm: <span style=\"color: #e05d44\"><b> red </b></span> is critical, <span style=\"color:#fe7d37\"><b> orange </b></span> is warning, <span style=\"color: #4c1\"><b> bright green </b></span> is ok, <span style=\"color: #9f9f9f\"><b> light grey </b></span> is undefined (i.e. no data or no status), <span style=\"color: #000\"><b> black </b></span> is not initialized. You can copy and paste their URLs to embed them in any web page.<br/>netdata can send notifications for these alarms. Check <a href=\"https://github.com/netdata/netdata/blob/master/health/notifications/health_alarm_notify.conf\" target=\"_blank\">this configuration file</a> for more information.';\n\n loadClipboard(function () {\n });\n\n\n const callback = (data) => {\n options.alarm_families = [];\n\n if (data === null) {\n document.getElementById('alarms_active').innerHTML =\n document.getElementById('alarms_all').innerHTML =\n document.getElementById('alarms_log').innerHTML =\n 'failed to load alarm data!';\n return;\n }\n\n function alarmid4human(id) {\n if (id === 0) {\n return '-';\n }\n\n return id.toString();\n }\n\n function timestamp4human(timestamp, space) {\n if (timestamp === 0) {\n return '-';\n }\n\n if (typeof space === 'undefined') {\n space = ' ';\n }\n\n var t = new Date(timestamp * 1000);\n\n // commented out to always have date+time, to have consistent exports\n // var now = new Date();\n\n // if (t.toDateString() === now.toDateString()) {\n // return t.toLocaleTimeString();\n // }\n\n return t.toLocaleDateString() + space + t.toLocaleTimeString();\n }\n\n function alarm_lookup_explain(alarm, chart) {\n var dimensions = ' of all values ';\n\n if (chart.dimensions.length > 1) {\n dimensions = ' of the sum of all dimensions ';\n }\n\n if (typeof alarm.lookup_dimensions !== 'undefined') {\n var d = alarm.lookup_dimensions.replace(/|/g, ',');\n var x = d.split(',');\n if (x.length > 1) {\n dimensions = 'of the sum of dimensions <code>' + alarm.lookup_dimensions + '</code> ';\n } else {\n dimensions = 'of all values of dimension <code>' + alarm.lookup_dimensions + '</code> ';\n }\n }\n\n return '<code>' + alarm.lookup_method + '</code> '\n + dimensions + ', of chart <code>' + alarm.chart + '</code>'\n + ', starting <code>' + seconds4human(alarm.lookup_after + alarm.lookup_before, { space: ' ' }) + '</code> and up to <code>' + seconds4human(alarm.lookup_before, { space: ' ' }) + '</code>'\n + ((alarm.lookup_options) ? (', with options <code>' + alarm.lookup_options.replace(/ /g, ', ') + '</code>') : '')\n + '.';\n }\n\n function alarm_to_html(alarm, full) {\n var chart = options.data.charts[alarm.chart];\n if (typeof (chart) === 'undefined') {\n chart = options.data.charts_by_name[alarm.chart];\n if (typeof (chart) === 'undefined') {\n // this means the charts loaded are incomplete\n // probably netdata was restarted and more alarms\n // are now available.\n console.log('Cannot find chart ' + alarm.chart + ', you probably need to refresh the page.');\n return '';\n }\n }\n\n var has_alarm = (typeof alarm.warn !== 'undefined' || typeof alarm.crit !== 'undefined');\n var badge_url = `${serverDefault}/api/v1/badge.svg?chart=${alarm.chart}&alarm=${alarm.name}&refresh=auto`;\n\n var action_buttons = '<br/> <br/>role: <b>' + alarm.recipient + '</b><br/> <br/>'\n + '<div class=\"action-button ripple\" title=\"click to scroll the dashboard to the chart of this alarm\" data-toggle=\"tooltip\" data-placement=\"bottom\" onClick=\"scrollToChartAfterHidingModal(\\'' + alarm.chart + '\\', ' + alarm.last_status_change * 1000 + ', \\'' + alarm.status + '\\'); $(\\'#alarmsModal\\').modal(\\'hide\\'); return false;\"><i class=\"fab fa-periscope\"></i></div>'\n + '<div class=\"action-button ripple\" title=\"click to copy to the clipboard the URL of this badge\" data-toggle=\"tooltip\" data-placement=\"bottom\" onClick=\"clipboardCopy(\\'' + badge_url + '\\'); return false;\"><i class=\"far fa-copy\"></i></div>'\n + '<div class=\"action-button ripple\" title=\"click to copy to the clipboard an auto-refreshing <code>embed</code> html element for this badge\" data-toggle=\"tooltip\" data-placement=\"bottom\" onClick=\"clipboardCopyBadgeEmbed(\\'' + badge_url + '\\'); return false;\"><i class=\"fas fa-copy\"></i></div>';\n\n var html = '<tr><td class=\"text-center\" style=\"vertical-align: middle; word-break: break-word;\" width=\"40%\"><b>' + alarm.chart + '</b><br/> <br/><embed src=\"' + badge_url + '\" type=\"image/svg+xml\" height=\"20\"/><br/> <br/><span style=\"font-size: 18px;\">' + alarm.info + '</span>' + action_buttons + '</td>'\n + '<td><table class=\"table\">'\n + ((typeof alarm.warn !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">warning when</td><td><span style=\"font-family: monospace; color:#fe7d37; font-weight: bold;\">' + alarm.warn + '</span></td></tr>') : '')\n + ((typeof alarm.crit !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">critical when</td><td><span style=\"font-family: monospace; color: #e05d44; font-weight: bold;\">' + alarm.crit + '</span></td></tr>') : '');\n\n if (full === true) {\n var units = chart.units;\n if (units === '%') {\n units = '%';\n }\n\n html += ((typeof alarm.lookup_after !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">db lookup</td><td>' + alarm_lookup_explain(alarm, chart) + '</td></tr>') : '')\n + ((typeof alarm.calc !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">calculation</td><td><span style=\"font-family: monospace;\">' + alarm.calc + '</span></td></tr>') : '')\n + ((chart.green !== null) ? ('<tr><td width=\"10%\" style=\"text-align:right\">green threshold</td><td><code>' + chart.green + ' ' + units + '</code></td></tr>') : '')\n + ((chart.red !== null) ? ('<tr><td width=\"10%\" style=\"text-align:right\">red threshold</td><td><code>' + chart.red + ' ' + units + '</code></td></tr>') : '');\n }\n\n if (alarm.warn_repeat_every > 0) {\n html += '<tr><td width=\"10%\" style=\"text-align:right\">repeat warning</td><td>' + seconds4human(alarm.warn_repeat_every) + '</td></tr>';\n }\n\n if (alarm.crit_repeat_every > 0) {\n html += '<tr><td width=\"10%\" style=\"text-align:right\">repeat critical</td><td>' + seconds4human(alarm.crit_repeat_every) + '</td></tr>';\n }\n\n var delay = '';\n if ((alarm.delay_up_duration > 0 || alarm.delay_down_duration > 0) && alarm.delay_multiplier !== 0 && alarm.delay_max_duration > 0) {\n if (alarm.delay_up_duration === alarm.delay_down_duration) {\n delay += '<small><br/>hysteresis ' + seconds4human(alarm.delay_up_duration, {\n space: ' ',\n negative_suffix: ''\n });\n } else {\n delay = '<small><br/>hysteresis ';\n if (alarm.delay_up_duration > 0) {\n delay += 'on escalation <code>' + seconds4human(alarm.delay_up_duration, {\n space: ' ',\n negative_suffix: ''\n }) + '</code>, ';\n }\n if (alarm.delay_down_duration > 0) {\n delay += 'on recovery <code>' + seconds4human(alarm.delay_down_duration, {\n space: ' ',\n negative_suffix: ''\n }) + '</code>, ';\n }\n }\n if (alarm.delay_multiplier !== 1.0) {\n delay += 'multiplied by <code>' + alarm.delay_multiplier.toString() + '</code>';\n delay += ', up to <code>' + seconds4human(alarm.delay_max_duration, {\n space: ' ',\n negative_suffix: ''\n }) + '</code>';\n }\n delay += '</small>';\n }\n\n html += '<tr><td width=\"10%\" style=\"text-align:right\">check every</td><td>' + seconds4human(alarm.update_every, {\n space: ' ',\n negative_suffix: ''\n }) + '</td></tr>'\n + ((has_alarm === true) ? ('<tr><td width=\"10%\" style=\"text-align:right\">execute</td><td><span style=\"font-family: monospace;\">' + alarm.exec + '</span>' + delay + '</td></tr>') : '')\n + '<tr><td width=\"10%\" style=\"text-align:right\">source</td><td><span style=\"font-family: monospace; word-break: break-word;\">' + alarm.source + '</span></td></tr>'\n + '</table></td></tr>';\n\n return html;\n }\n\n function alarm_family_show(id) {\n var html = '<table class=\"table\">';\n var family = options.alarm_families[id];\n var len = family.arr.length;\n while (len--) {\n var alarm = family.arr[len];\n html += alarm_to_html(alarm, true);\n }\n html += '</table>';\n\n $('#alarm_all_' + id.toString()).html(html);\n enableTooltipsAndPopovers();\n }\n\n // find the proper family of each alarm\n var x, family, alarm;\n var count_active = 0;\n var count_all = 0;\n var families = {};\n var families_sort = [];\n for (x in data.alarms) {\n if (!data.alarms.hasOwnProperty(x)) {\n continue;\n }\n\n alarm = data.alarms[x];\n family = alarm.family;\n\n // find the chart\n var chart = options.data.charts[alarm.chart];\n if (typeof chart === 'undefined') {\n chart = options.data.charts_by_name[alarm.chart];\n }\n\n // not found - this should never happen!\n if (typeof chart === 'undefined') {\n console.log('WARNING: alarm ' + x + ' is linked to chart ' + alarm.chart + ', which is not found in the list of chart got from the server.');\n chart = { priority: 9999999 };\n }\n else if (typeof chart.menu !== 'undefined' && typeof chart.submenu !== 'undefined')\n // the family based on the chart\n {\n family = chart.menu + ' - ' + chart.submenu;\n }\n\n if (typeof families[family] === 'undefined') {\n families[family] = {\n name: family,\n arr: [],\n priority: chart.priority\n };\n\n families_sort.push(families[family]);\n }\n\n if (chart.priority < families[family].priority) {\n families[family].priority = chart.priority;\n }\n\n families[family].arr.unshift(alarm);\n }\n\n // sort the families, like the dashboard menu does\n var families_sorted = families_sort.sort(function (a, b) {\n if (a.priority < b.priority) {\n return -1;\n }\n if (a.priority > b.priority) {\n return 1;\n }\n return naturalSortCompare(a.name, b.name);\n });\n\n var i = 0;\n var fc = 0;\n var len = families_sorted.length;\n while (len--) {\n family = families_sorted[i++].name;\n var active_family_added = false;\n\n var expanded = 'false';\n var collapsed = 'class=\"collapsed\"';\n var cin = '';\n\n // uncomment if first family needs to be expanded by default\n // var expanded = 'true';\n // var collapsed = '';\n // var cin = 'in';\n\n if (fc !== 0) {\n all += \"</table></div></div></div>\";\n\n // uncomment if first family needs to be expanded by default\n // expanded = 'false';\n // collapsed = 'class=\"collapsed\"';\n // cin = '';\n }\n\n all += '<div class=\"panel panel-default\"><div class=\"panel-heading\" role=\"tab\" id=\"alarm_all_heading_' + fc.toString() + '\"><h4 class=\"panel-title\"><a ' + collapsed + ' role=\"button\" data-toggle=\"collapse\" data-parent=\"#alarms_all_accordion\" href=\"#alarm_all_' + fc.toString() + '\" aria-expanded=\"' + expanded + '\" aria-controls=\"alarm_all_' + fc.toString() + '\">' + family.toString() + '</a></h4></div><div id=\"alarm_all_' + fc.toString() + '\" class=\"panel-collapse collapse ' + cin + '\" role=\"tabpanel\" aria-labelledby=\"alarm_all_heading_' + fc.toString() + '\" data-alarm-id=\"' + fc.toString() + '\"><div class=\"panel-body\" id=\"alarm_all_body_' + fc.toString() + '\">';\n\n options.alarm_families[fc] = families[family];\n\n fc++;\n\n var arr = families[family].arr;\n var c = arr.length;\n while (c--) {\n alarm = arr[c];\n if (alarm.status === 'WARNING' || alarm.status === 'CRITICAL') {\n if (!active_family_added) {\n active_family_added = true;\n active += '<tr><th class=\"text-center\" colspan=\"2\"><h4>' + family + '</h4></th></tr>';\n }\n count_active++;\n active += alarm_to_html(alarm, true);\n }\n\n count_all++;\n }\n }\n active += \"</table>\";\n if (families_sorted.length > 0) {\n all += \"</div></div></div>\";\n }\n all += \"</div>\";\n\n if (!count_active) {\n active += '<div style=\"width:100%; height: 100px; text-align: center;\"><span style=\"font-size: 50px;\"><i class=\"fas fa-thumbs-up\"></i></span><br/>Everything is normal. No raised alarms.</div>';\n } else {\n active += footer;\n }\n\n if (!count_all) {\n all += \"<h4>No alarms are running in this system.</h4>\";\n } else {\n all += footer;\n }\n\n document.getElementById('alarms_active').innerHTML = active;\n document.getElementById('alarms_all').innerHTML = all;\n enableTooltipsAndPopovers();\n\n if (families_sorted.length > 0) {\n alarm_family_show(0);\n }\n\n // register bootstrap events\n var $accordion = $('#alarms_all_accordion');\n $accordion.on('show.bs.collapse', function (d) {\n var target = $(d.target);\n var id = $(target).data('alarm-id');\n alarm_family_show(id);\n });\n $accordion.on('hidden.bs.collapse', function (d) {\n var target = $(d.target);\n var id = $(target).data('alarm-id');\n $('#alarm_all_' + id.toString()).html('');\n });\n\n document.getElementById('alarms_log').innerHTML = '<h3>Alarm Log</h3><table id=\"alarms_log_table\"></table>';\n\n loadBootstrapTable(function () {\n $('#alarms_log_table').bootstrapTable({\n url: `${serverDefault}/api/v1/alarm_log?all`,\n cache: false,\n pagination: true,\n pageSize: 10,\n showPaginationSwitch: false,\n search: true,\n searchTimeOut: 300,\n searchAlign: 'left',\n showColumns: true,\n showExport: true,\n exportDataType: 'all',\n exportOptions: {\n fileName: 'netdata_alarm_log'\n },\n onClickRow: function (row) {\n scrollToChartAfterHidingModal(row.chart, row.when * 1000, row.status);\n $('#alarmsModal').modal('hide');\n return false;\n },\n rowStyle: function (row) {\n switch (row.status) {\n case 'CRITICAL':\n return { classes: 'danger' };\n break;\n case 'WARNING':\n return { classes: 'warning' };\n break;\n case 'UNDEFINED':\n return { classes: 'info' };\n break;\n case 'CLEAR':\n return { classes: 'success' };\n break;\n }\n return {};\n },\n showFooter: false,\n showHeader: true,\n showRefresh: true,\n showToggle: false,\n sortable: true,\n silentSort: false,\n columns: [\n {\n field: 'when',\n title: 'Event Date',\n valign: 'middle',\n titleTooltip: 'The date and time the even took place',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return timestamp4human(value, ' ');\n },\n align: 'center',\n switchable: false,\n sortable: true\n },\n {\n field: 'hostname',\n title: 'Host',\n valign: 'middle',\n titleTooltip: 'The host that generated this event',\n align: 'center',\n visible: false,\n sortable: true\n },\n {\n field: 'unique_id',\n title: 'Unique ID',\n titleTooltip: 'The host unique ID for this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'alarm_id',\n title: 'Alarm ID',\n titleTooltip: 'The ID of the alarm that generated this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'alarm_event_id',\n title: 'Alarm Event ID',\n titleTooltip: 'The incremental ID of this event for the given alarm',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'chart',\n title: 'Chart',\n titleTooltip: 'The chart the alarm is attached to',\n align: 'center',\n valign: 'middle',\n switchable: false,\n sortable: true\n },\n {\n field: 'family',\n title: 'Family',\n titleTooltip: 'The family of the chart the alarm is attached to',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'name',\n title: 'Alarm',\n titleTooltip: 'The alarm name that generated this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return value.toString().replace(/_/g, ' ');\n },\n align: 'center',\n valign: 'middle',\n switchable: false,\n sortable: true\n },\n {\n field: 'value_string',\n title: 'Friendly Value',\n titleTooltip: 'The value of the alarm, that triggered this event',\n align: 'right',\n valign: 'middle',\n sortable: true\n },\n {\n field: 'old_value_string',\n title: 'Friendly Old Value',\n titleTooltip: 'The value of the alarm, just before this event',\n align: 'right',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'old_value',\n title: 'Old Value',\n titleTooltip: 'The value of the alarm, just before this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return ((value !== null) ? Math.round(value * 100) / 100 : 'NaN').toString();\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'value',\n title: 'Value',\n titleTooltip: 'The value of the alarm, that triggered this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return ((value !== null) ? Math.round(value * 100) / 100 : 'NaN').toString();\n },\n align: 'right',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'units',\n title: 'Units',\n titleTooltip: 'The units of the value of the alarm',\n align: 'left',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'old_status',\n title: 'Old Status',\n titleTooltip: 'The status of the alarm, just before this event',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'status',\n title: 'Status',\n titleTooltip: 'The status of the alarm, that was set due to this event',\n align: 'center',\n valign: 'middle',\n switchable: false,\n sortable: true\n },\n {\n field: 'duration',\n title: 'Last Duration',\n titleTooltip: 'The duration the alarm was at its previous state, just before this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'non_clear_duration',\n title: 'Raised Duration',\n titleTooltip: 'The duration the alarm was raised, just before this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'recipient',\n title: 'Recipient',\n titleTooltip: 'The recipient of this event',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'processed',\n title: 'Processed Status',\n titleTooltip: 'True when this event is processed',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n if (value === true) {\n return 'DONE';\n } else {\n return 'PENDING';\n }\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'updated',\n title: 'Updated Status',\n titleTooltip: 'True when this event has been updated by another event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n if (value === true) {\n return 'UPDATED';\n } else {\n return 'CURRENT';\n }\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'updated_by_id',\n title: 'Updated By ID',\n titleTooltip: 'The unique ID of the event that obsoleted this one',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'updates_id',\n title: 'Updates ID',\n titleTooltip: 'The unique ID of the event obsoleted because of this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'exec',\n title: 'Script',\n titleTooltip: 'The script to handle the event notification',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'exec_run',\n title: 'Script Run At',\n titleTooltip: 'The date and time the script has been ran',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return timestamp4human(value, ' ');\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'exec_code',\n title: 'Script Return Value',\n titleTooltip: 'The return code of the script',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n if (value === 0) {\n return 'OK (returned 0)';\n } else {\n return 'FAILED (with code ' + value.toString() + ')';\n }\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'delay',\n title: 'Script Delay',\n titleTooltip: 'The hysteresis of the notification',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'delay_up_to_timestamp',\n title: 'Script Delay Run At',\n titleTooltip: 'The date and time the script should be run, after hysteresis',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return timestamp4human(value, ' ');\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'info',\n title: 'Description',\n titleTooltip: 'A short description of the alarm',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'source',\n title: 'Alarm Source',\n titleTooltip: 'The source of configuration of the alarm',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n }\n ]\n });\n // console.log($('#alarms_log_table').bootstrapTable('getOptions'));\n });\n }\n\n reduxStore.dispatch(fetchAllAlarmsAction.request({\n callback,\n serverDefault,\n }))\n}\n\nfunction initializeDynamicDashboardWithData(data) {\n if (data !== null) {\n options.hostname = data.hostname;\n options.data = data;\n options.version = data.version;\n options.release_channel = data.release_channel;\n options.timezone = data.timezone;\n netdataDashboard.os = data.os;\n\n if (typeof data.hosts !== 'undefined') {\n options.hosts = data.hosts;\n }\n\n // update the dashboard hostname\n document.getElementById('netdataVersion').innerHTML = options.version;\n\n // update the dashboard title\n document.title = options.hostname + ' netdata dashboard';\n\n // create a chart_by_name index\n data.charts_by_name = {};\n var charts = data.charts;\n var x;\n for (x in charts) {\n if (!charts.hasOwnProperty(x)) {\n continue;\n }\n\n var chart = charts[x];\n data.charts_by_name[chart.name] = chart;\n }\n\n // render all charts\n renderChartsAndMenu(data);\n }\n}\n\n// an object to keep initilization configuration\n// needed due to the async nature of the XSS modal\nvar initializeConfig = {\n url: null,\n custom_info: true,\n};\n\n// will be removed when we'll transform dashboard_info.js into DSL\n// memoize so it's fetched only once\nconst loadDashboardInfo = memoizeWith(identity, () => (\n $.ajax({\n url: `${serverDefault}dashboard_info.js`,\n cache: true,\n dataType: 'script',\n xhrFields: { withCredentials: true }, // required for the cookie\n })\n .fail(function () {\n alert(`Cannot load required JS library: dashboard_info.js`);\n })\n))\n\nfunction loadCustomDashboardInfo(url, callback) {\n $.ajax({\n url,\n cache: true,\n dataType: \"script\",\n xhrFields: { withCredentials: true } // required for the cookie\n })\n .fail(function () {\n alert(`Cannot load required JS library: ${url}`);\n })\n .always(function () {\n $.extend(true, netdataDashboard, customDashboard);\n callback();\n })\n}\n\nfunction initializeChartsAndCustomInfo() {\n loadDashboardInfo().then(() => {\n // download all the charts the server knows\n NETDATA.chartRegistry.downloadAll(initializeConfig.url, function (data) {\n if (data !== null) {\n reduxStore.dispatch(chartsMetadataRequestSuccess({ data }))\n if (initializeConfig.custom_info === true && typeof data.custom_info !== 'undefined' && data.custom_info !== \"\" && window.netdataSnapshotData === null) {\n //console.log('loading custom dashboard decorations from server ' + initializeConfig.url);\n loadCustomDashboardInfo(serverDefault + data.custom_info, function () {\n initializeDynamicDashboardWithData(data);\n });\n } else {\n //console.log('not loading custom dashboard decorations from server ' + initializeConfig.url);\n initializeDynamicDashboardWithData(data);\n }\n }\n });\n })\n}\n\nwindow.xssModalDisableXss = () => {\n //console.log('disabling xss checks');\n NETDATA.xss.enabled = false;\n NETDATA.xss.enabled_for_data = false;\n initializeConfig.custom_info = true;\n initializeChartsAndCustomInfo();\n return false;\n};\n\n\nwindow.xssModalKeepXss = () => {\n //console.log('keeping xss checks');\n NETDATA.xss.enabled = true;\n NETDATA.xss.enabled_for_data = true;\n initializeConfig.custom_info = false;\n initializeChartsAndCustomInfo();\n return false;\n};\n\nfunction initializeDynamicDashboard(newReduxStore) {\n if (newReduxStore) {\n reduxStore = newReduxStore\n\n netdataPrepCallback()\n\n initializeConfig.url = serverDefault;\n }\n\n if (typeof netdataCheckXSS !== 'undefined' && netdataCheckXSS === true) {\n //$(\"#loadOverlay\").css(\"display\",\"none\");\n document.getElementById('netdataXssModalServer').innerText = initializeConfig.url;\n $('#xssModal').modal('show');\n } else {\n initializeChartsAndCustomInfo();\n }\n}\n\n// ----------------------------------------------------------------------------\n\nfunction versionLog(msg) {\n document.getElementById('versionCheckLog').innerHTML = msg;\n}\n\n// New way of checking for updates, based only on versions\n\nfunction versionsMatch(v1, v2) {\n if (v1 == v2) {\n return true;\n } else {\n let s1 = v1.split('.');\n let s2 = v2.split('.');\n // Check major version\n let n1 = parseInt(s1[0].substring(1, 2), 10);\n let n2 = parseInt(s2[0].substring(1, 2), 10);\n if (n1 < n2) return false;\n else if (n1 > n2) return true;\n\n // Check minor version\n n1 = parseInt(s1[1], 10);\n n2 = parseInt(s2[1], 10);\n if (n1 < n2) return false;\n else if (n1 > n2) return true;\n\n // Split patch: format could be e.g. 0-22-nightly\n s1 = s1[2].split('-');\n s2 = s2[2].split('-');\n\n n1 = parseInt(s1[0], 10);\n n2 = parseInt(s2[0], 10);\n if (n1 < n2) return false;\n else if (n1 > n2) return true;\n\n n1 = (s1.length > 1) ? parseInt(s1[1], 10) : 0;\n n2 = (s2.length > 1) ? parseInt(s2[1], 10) : 0;\n if (n1 < n2) return false;\n else return true;\n }\n}\n\nfunction getGithubLatestVersion(callback) {\n versionLog('Downloading latest version id from github...');\n\n $.ajax({\n url: 'https://api.github.com/repos/netdata/netdata/releases/latest',\n async: true,\n cache: false\n })\n .done(function (data) {\n data = data.tag_name.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\");\n versionLog('Latest stable version from github is ' + data);\n callback(data);\n })\n .fail(function () {\n versionLog('Failed to download the latest stable version id from github!');\n callback(null);\n });\n}\n\nfunction getGCSLatestVersion(callback) {\n versionLog('Downloading latest version id from GCS...');\n $.ajax({\n url: \"https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt\",\n async: true,\n cache: false\n })\n .done(function (response) {\n $.ajax({\n url: response.mediaLink,\n async: true,\n cache: false\n })\n .done(function (data) {\n data = data.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\");\n versionLog('Latest nightly version from GCS is ' + data);\n callback(data);\n })\n .fail(function (xhr, textStatus, errorThrown) {\n versionLog('Failed to download the latest nightly version id from GCS!');\n callback(null);\n });\n })\n .fail(function (xhr, textStatus, errorThrown) {\n versionLog('Failed to download the latest nightly version from GCS!');\n callback(null);\n });\n}\n\n\nfunction checkForUpdateByVersion(force, callback) {\n if (options.release_channel === 'stable') {\n getGithubLatestVersion(function (sha2) {\n callback(options.version, sha2);\n });\n } else {\n getGCSLatestVersion(function (sha2) {\n callback(options.version, sha2);\n });\n }\n return null;\n}\n\nwindow.notifyForUpdate = (force) => {\n versionLog('<p>checking for updates...</p>');\n\n var now = Date.now();\n\n if (typeof force === 'undefined' || force !== true) {\n var last = loadLocalStorage('last_update_check');\n\n if (typeof last === 'string') {\n last = parseInt(last);\n } else {\n last = 0;\n }\n\n if (now - last < 3600000 * 8) {\n // no need to check it - too soon\n return;\n }\n }\n\n checkForUpdateByVersion(force, function (sha1, sha2) {\n var save = false;\n\n if (sha1 === null) {\n save = false;\n versionLog('<p><big>Failed to get your netdata version!</big></p><p>You can always get the latest netdata from <a href=\"https://github.com/netdata/netdata\" target=\"_blank\">its github page</a>.</p>');\n } else if (sha2 === null) {\n save = false;\n versionLog('<p><big>Failed to get the latest netdata version.</big></p><p>You can always get the latest netdata from <a href=\"https://github.com/netdata/netdata\" target=\"_blank\">its github page</a>.</p>');\n } else if (versionsMatch(sha1, sha2)) {\n save = true;\n versionLog('<p><big>You already have the latest netdata!</big></p><p>No update yet?<br/>We probably need some motivation to keep going on!</p><p>If you haven\\'t already, <a href=\"https://github.com/netdata/netdata\" target=\"_blank\">give netdata a <b><i class=\"fas fa-star\"></i></b> at its github page</a>.</p>');\n } else {\n save = true;\n var compare = 'https://learn.netdata.cloud/docs/agent/changelog/';\n versionLog('<p><big><strong>New version of netdata available!</strong></big></p><p>Latest version: <b><code>' + sha2 + '</code></b></p><p><a href=\"' + compare + '\" target=\"_blank\">Click here for the changes log</a> and<br/><a href=\"https://github.com/netdata/netdata/tree/master/packaging/installer/UPDATE.md\" target=\"_blank\">click here for directions on updating</a> your netdata installation.</p><p>We suggest to review the changes log for new features you may be interested, or important bug fixes you may need.<br/>Keeping your netdata updated is generally a good idea.</p>');\n }\n\n if (save) {\n saveLocalStorage('last_update_check', now.toString());\n }\n });\n}\n\n// ----------------------------------------------------------------------------\n// printing dashboards\n\nfunction showPageFooter() {\n document.getElementById('footer').style.display = 'block';\n}\n\nwindow.printPreflight = () => {\n var url = document.location.origin.toString() + document.location.pathname.toString() + document.location.search.toString() + urlOptions.genHash() + ';mode=print';\n var width = 990;\n var height = screen.height * 90 / 100;\n //console.log(url);\n //console.log(document.location);\n window.open(url, '', 'width=' + width.toString() + ',height=' + height.toString() + ',menubar=no,toolbar=no,personalbar=no,location=no,resizable=no,scrollbars=yes,status=no,chrome=yes,centerscreen=yes,attention=yes,dialog=yes');\n $('#printPreflightModal').modal('hide');\n}\n\nfunction printPage() {\n window.NETDATA.parseDom();\n if (urlOptions.pan_and_zoom === true) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: urlOptions.after,\n before: urlOptions.before,\n }))\n }\n showPageFooter(); // todo after full rewrite the footer should show when charts are loaded\n}\n\n// --------------------------------------------------------------------\n\nfunction jsonStringifyFn(obj) {\n return JSON.stringify(obj, function (key, value) {\n return (typeof value === 'function') ? value.toString() : value;\n });\n}\n\nfunction jsonParseFn(str) {\n return JSON.parse(str, function (key, value) {\n if (typeof value != 'string') {\n return value;\n }\n return (value.substring(0, 8) == 'function') ? eval('(' + value + ')') : value;\n });\n}\n\n// --------------------------------------------------------------------\n\nvar snapshotOptions = {\n bytes_per_chart: 2048,\n compressionDefault: 'pako.deflate.base64',\n\n compressions: {\n 'none': {\n bytes_per_point_memory: 5.2,\n bytes_per_point_disk: 5.6,\n\n compress: function (s) {\n return s;\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return s;\n }\n },\n\n 'pako.deflate.base64': {\n bytes_per_point_memory: 1.8,\n bytes_per_point_disk: 1.9,\n\n compress: function (s) {\n return btoa(pako.deflate(s, { to: 'string' }));\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return pako.inflate(atob(s), { to: 'string' });\n }\n },\n\n 'pako.deflate': {\n bytes_per_point_memory: 1.4,\n bytes_per_point_disk: 3.2,\n\n compress: function (s) {\n return pako.deflate(s, { to: 'string' });\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return pako.inflate(s, { to: 'string' });\n }\n },\n\n 'lzstring.utf16': {\n bytes_per_point_memory: 1.7,\n bytes_per_point_disk: 2.6,\n\n compress: function (s) {\n return LZString.compressToUTF16(s);\n },\n\n compressed_length: function (s) {\n return s.length * 2;\n },\n\n uncompress: function (s) {\n return LZString.decompressFromUTF16(s);\n }\n },\n\n 'lzstring.base64': {\n bytes_per_point_memory: 2.1,\n bytes_per_point_disk: 2.3,\n\n compress: function (s) {\n return LZString.compressToBase64(s);\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return LZString.decompressFromBase64(s);\n }\n },\n\n 'lzstring.uri': {\n bytes_per_point_memory: 2.1,\n bytes_per_point_disk: 2.3,\n\n compress: function (s) {\n return LZString.compressToEncodedURIComponent(s);\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return LZString.decompressFromEncodedURIComponent(s);\n }\n }\n }\n};\n\n// --------------------------------------------------------------------\n// loading snapshots\n\nfunction loadSnapshotModalLog(priority, msg) {\n document.getElementById('loadSnapshotStatus').className = \"alert alert-\" + priority;\n document.getElementById('loadSnapshotStatus').innerHTML = msg;\n}\n\nvar tmpSnapshotData = null;\n\nwindow.loadSnapshot = () => {\n $('#loadSnapshotImport').addClass('disabled');\n\n if (tmpSnapshotData === null) {\n loadSnapshotPreflightEmpty();\n loadSnapshotModalLog('danger', 'no data have been loaded');\n return;\n }\n\n loadPako(function () {\n loadLzString(function () {\n loadSnapshotModalLog('info', 'Please wait, activating snapshot...');\n $('#loadSnapshotModal').modal('hide');\n\n netdataShowAlarms = false;\n netdataRegistry = false;\n netdataServer = tmpSnapshotData.server;\n\n document.getElementById('charts_div').innerHTML = '';\n document.getElementById('sidebar').innerHTML = '';\n\n if (typeof tmpSnapshotData.hash !== 'undefined') {\n urlOptions.hash = tmpSnapshotData.hash;\n } else {\n urlOptions.hash = '#';\n }\n\n if (typeof tmpSnapshotData.info !== 'undefined') {\n var info = jsonParseFn(tmpSnapshotData.info);\n if (typeof info.menu !== 'undefined') {\n netdataDashboard.menu = info.menu;\n }\n\n if (typeof info.submenu !== 'undefined') {\n netdataDashboard.submenu = info.submenu;\n }\n\n if (typeof info.context !== 'undefined') {\n netdataDashboard.context = info.context;\n }\n }\n\n if (typeof tmpSnapshotData.compression !== 'string') {\n tmpSnapshotData.compression = 'none';\n }\n\n if (typeof snapshotOptions.compressions[tmpSnapshotData.compression] === 'undefined') {\n alert('unknown compression method: ' + tmpSnapshotData.compression);\n tmpSnapshotData.compression = 'none';\n }\n\n tmpSnapshotData.uncompress = snapshotOptions.compressions[tmpSnapshotData.compression].uncompress;\n\n window.NETDATA.parseDom()\n reduxStore.dispatch(loadSnapshotAction({\n snapshot: tmpSnapshotData,\n }))\n\n window.netdataSnapshotData = tmpSnapshotData;\n\n urlOptions.after = tmpSnapshotData.after_ms;\n urlOptions.before = tmpSnapshotData.before_ms;\n\n if (typeof tmpSnapshotData.highlight_after_ms !== 'undefined'\n && tmpSnapshotData.highlight_after_ms !== null\n && tmpSnapshotData.highlight_after_ms > 0\n && typeof tmpSnapshotData.highlight_before_ms !== 'undefined'\n && tmpSnapshotData.highlight_before_ms !== null\n && tmpSnapshotData.highlight_before_ms > 0\n ) {\n urlOptions.highlight_after = tmpSnapshotData.highlight_after_ms;\n urlOptions.highlight_before = tmpSnapshotData.highlight_before_ms;\n urlOptions.highlight = true;\n } else {\n urlOptions.highlight_after = 0;\n urlOptions.highlight_before = 0;\n urlOptions.highlight = false;\n }\n\n netdataCheckXSS = false; // disable the modal - this does not affect XSS checks, since dashboard.js is already loaded\n NETDATA.xss.enabled = true; // we should not do any remote requests, but if we do, check them\n NETDATA.xss.enabled_for_data = true; // check also snapshot data - that have been excluded from the initial check, due to compression\n loadSnapshotPreflightEmpty();\n initializeDynamicDashboard();\n });\n });\n};\n\nfunction loadSnapshotPreflightFile(file) {\n var filename = NETDATA.xss.string(file.name);\n var fr = new FileReader();\n fr.onload = function (e) {\n document.getElementById('loadSnapshotFilename').innerHTML = filename;\n var result = null;\n try {\n result = NETDATA.xss.checkAlways('snapshot', JSON.parse(e.target.result), /^(snapshot\\.info|snapshot\\.data)$/);\n\n //console.log(result);\n var date_after = new Date(result.after_ms);\n var date_before = new Date(result.before_ms);\n\n if (typeof result.charts_ok === 'undefined') {\n result.charts_ok = 'unknown';\n }\n\n if (typeof result.charts_failed === 'undefined') {\n result.charts_failed = 0;\n }\n\n if (typeof result.compression === 'undefined') {\n result.compression = 'none';\n }\n\n if (typeof result.data_size === 'undefined') {\n result.data_size = 0;\n }\n\n document.getElementById('loadSnapshotFilename').innerHTML = '<code>' + filename + '</code>';\n document.getElementById('loadSnapshotHostname').innerHTML = '<b>' + result.hostname + '</b>, netdata version: <b>' + result.netdata_version.toString() + '</b>';\n document.getElementById('loadSnapshotURL').innerHTML = result.url;\n document.getElementById('loadSnapshotCharts').innerHTML = result.charts.charts_count.toString() + ' charts, ' + result.charts.dimensions_count.toString() + ' dimensions, ' + result.data_points.toString() + ' points per dimension, ' + Math.round(result.duration_ms / result.data_points).toString() + ' ms per point';\n document.getElementById('loadSnapshotInfo').innerHTML = 'version: <b>' + result.snapshot_version.toString() + '</b>, includes <b>' + result.charts_ok.toString() + '</b> unique chart data queries ' + ((result.charts_failed > 0) ? ('<b>' + result.charts_failed.toString() + '</b> failed') : '').toString() + ', compressed with <code>' + result.compression.toString() + '</code>, data size ' + (Math.round(result.data_size * 100 / 1024 / 1024) / 100).toString() + ' MB';\n document.getElementById('loadSnapshotTimeRange').innerHTML = '<b>' + localeDateString(date_after) + ' ' + localeTimeString(date_after) + '</b> to <b>' + localeDateString(date_before) + ' ' + localeTimeString(date_before) + '</b>';\n document.getElementById('loadSnapshotComments').innerHTML = ((result.comments) ? result.comments : '').toString();\n loadSnapshotModalLog('success', 'File loaded, click <b>Import</b> to render it!');\n $('#loadSnapshotImport').removeClass('disabled');\n\n tmpSnapshotData = result;\n }\n catch (e) {\n console.log(e);\n document.getElementById('loadSnapshotStatus').className = \"alert alert-danger\";\n document.getElementById('loadSnapshotStatus').innerHTML = \"Failed to parse this file!\";\n $('#loadSnapshotImport').addClass('disabled');\n }\n }\n\n //console.log(file);\n fr.readAsText(file);\n};\n\nfunction loadSnapshotPreflightEmpty() {\n document.getElementById('loadSnapshotFilename').innerHTML = '';\n document.getElementById('loadSnapshotHostname').innerHTML = '';\n document.getElementById('loadSnapshotURL').innerHTML = '';\n document.getElementById('loadSnapshotCharts').innerHTML = '';\n document.getElementById('loadSnapshotInfo').innerHTML = '';\n document.getElementById('loadSnapshotTimeRange').innerHTML = '';\n document.getElementById('loadSnapshotComments').innerHTML = '';\n loadSnapshotModalLog('success', 'Browse for a snapshot file (or drag it and drop it here), then click <b>Import</b> to render it.');\n $('#loadSnapshotImport').addClass('disabled');\n};\n\nvar loadSnapshotDragAndDropInitialized = false;\n\nfunction loadSnapshotDragAndDropSetup() {\n if (loadSnapshotDragAndDropInitialized === false) {\n loadSnapshotDragAndDropInitialized = true;\n $('#loadSnapshotDragAndDrop')\n .on('drag dragstart dragend dragover dragenter dragleave drop', function (e) {\n e.preventDefault();\n e.stopPropagation();\n })\n .on('drop', function (e) {\n if (e.originalEvent.dataTransfer.files.length) {\n loadSnapshotPreflightFile(e.originalEvent.dataTransfer.files.item(0));\n } else {\n loadSnapshotPreflightEmpty();\n loadSnapshotModalLog('danger', 'No file selected');\n }\n });\n }\n};\n\nwindow.loadSnapshotPreflight = () => {\n var files = document.getElementById('loadSnapshotSelectFiles').files;\n if (!files.length) {\n loadSnapshotPreflightEmpty();\n loadSnapshotModalLog('danger', 'No file selected');\n return;\n }\n\n loadSnapshotModalLog('info', 'Loading file...');\n\n loadSnapshotPreflightFile(files.item(0));\n}\n\n// --------------------------------------------------------------------\n// saving snapshots\n\nvar saveSnapshotStop = false;\n\nfunction saveSnapshotCancel() {\n reduxStore.dispatch(stopSnapshotModeAction())\n saveSnapshotStop = true;\n}\n\nvar saveSnapshotModalInitialized = false;\n\nfunction saveSnapshotModalSetup() {\n if (saveSnapshotModalInitialized === false) {\n saveSnapshotModalInitialized = true;\n $('#saveSnapshotModal')\n .on('hide.bs.modal', saveSnapshotCancel)\n .on('show.bs.modal', saveSnapshotModalInit)\n .on('shown.bs.modal', function () {\n $('#saveSnapshotResolutionSlider').find(\".slider-handle:first\").attr(\"tabindex\", 1);\n document.getElementById('saveSnapshotComments').focus();\n });\n }\n};\n\nfunction saveSnapshotModalLog(priority, msg) {\n document.getElementById('saveSnapshotStatus').className = \"alert alert-\" + priority;\n document.getElementById('saveSnapshotStatus').innerHTML = msg;\n}\n\nfunction saveSnapshotModalShowExpectedSize() {\n var points = Math.round(saveSnapshotViewDuration / saveSnapshotSelectedSecondsPerPoint);\n var priority = 'info';\n var msg = 'A moderate snapshot.';\n\n var sizemb = Math.round(\n (options.data.charts_count * snapshotOptions.bytes_per_chart\n + options.data.dimensions_count * points * snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_disk)\n * 10 / 1024 / 1024) / 10;\n\n var memmb = Math.round(\n (options.data.charts_count * snapshotOptions.bytes_per_chart\n + options.data.dimensions_count * points * snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_memory)\n * 10 / 1024 / 1024) / 10;\n\n if (sizemb < 10) {\n priority = 'success';\n msg = 'A nice small snapshot!';\n }\n if (sizemb > 50) {\n priority = 'warning';\n msg = 'Will stress your browser...';\n }\n if (sizemb > 100) {\n priority = 'danger';\n msg = 'Hm... good luck...';\n }\n\n saveSnapshotModalLog(priority, 'The snapshot will have ' + points.toString() + ' points per dimension. Expected size on disk ' + sizemb + ' MB, at browser memory ' + memmb + ' MB.<br/>' + msg);\n}\n\nvar saveSnapshotCompression = snapshotOptions.compressionDefault;\n\nfunction saveSnapshotSetCompression(name) {\n saveSnapshotCompression = name;\n document.getElementById('saveSnapshotCompressionName').innerHTML = saveSnapshotCompression;\n saveSnapshotModalShowExpectedSize();\n}\n\nvar saveSnapshotSlider = null;\nvar saveSnapshotSelectedSecondsPerPoint = 1;\nvar saveSnapshotViewDuration = 1;\n\nfunction saveSnapshotModalInit() {\n $('#saveSnapshotModalProgressSection').hide();\n $('#saveSnapshotResolutionRadio').show();\n saveSnapshotModalLog('info', 'Select resolution and click <b>Save</b>');\n $('#saveSnapshotExport').removeClass('disabled');\n\n loadBootstrapSlider(function () {\n const reduxState = reduxStore.getState()\n saveSnapshotViewDuration = - selectDefaultAfter(reduxState)\n var start_ms = Math.round(Date.now() - saveSnapshotViewDuration * 1000);\n const globalPanAndZoom = selectGlobalPanAndZoom(reduxState)\n\n if (Boolean(globalPanAndZoom)) {\n saveSnapshotViewDuration = Math.round((globalPanAndZoom.before - globalPanAndZoom.after) / 1000);\n start_ms = globalPanAndZoom.after;\n }\n\n var start_date = new Date(start_ms);\n var yyyymmddhhssmm = start_date.getFullYear() + zeropad(start_date.getMonth() + 1) + zeropad(start_date.getDate()) + '-' + zeropad(start_date.getHours()) + zeropad(start_date.getMinutes()) + zeropad(start_date.getSeconds());\n\n document.getElementById('saveSnapshotFilename').value = 'netdata-' + options.hostname.toString() + '-' + yyyymmddhhssmm.toString() + '-' + saveSnapshotViewDuration.toString() + '.snapshot';\n saveSnapshotSetCompression(saveSnapshotCompression);\n\n var min = options.update_every;\n var max = Math.round(saveSnapshotViewDuration / 100);\n\n if (Boolean(globalPanAndZoom)) {\n max = Math.round(saveSnapshotViewDuration / 50);\n }\n\n var view = Math.round(saveSnapshotViewDuration / Math.round($(document.getElementById('charts_div')).width() / 2));\n\n if (max < 10) {\n max = 10;\n }\n if (max < min) {\n max = min;\n }\n if (view < min) {\n view = min;\n }\n if (view > max) {\n view = max;\n }\n\n if (saveSnapshotSlider !== null) {\n saveSnapshotSlider.destroy();\n }\n\n saveSnapshotSlider = new Slider('#saveSnapshotResolutionSlider', {\n ticks: [min, view, max],\n min: min,\n max: max,\n step: options.update_every,\n value: view,\n scale: (max > 100) ? 'logarithmic' : 'linear',\n tooltip: 'always',\n formatter: function (value) {\n if (value < 1) {\n value = 1;\n }\n\n if (value < options.data.update_every) {\n value = options.data.update_every;\n }\n\n saveSnapshotSelectedSecondsPerPoint = value;\n saveSnapshotModalShowExpectedSize();\n\n var seconds = ' seconds ';\n if (value === 1) {\n seconds = ' second ';\n }\n\n return value + seconds + 'per point' + ((value === options.data.update_every) ? ', server default' : '').toString();\n }\n });\n });\n}\n\nwindow.saveSnapshot = () => {\n loadPako(function () {\n loadLzString(function () {\n saveSnapshotStop = false;\n $('#saveSnapshotModalProgressSection').show();\n $('#saveSnapshotResolutionRadio').hide();\n $('#saveSnapshotExport').addClass('disabled');\n\n var filename = document.getElementById('saveSnapshotFilename').value;\n // console.log(filename);\n saveSnapshotModalLog('info', 'Generating snapshot as <code>' + filename.toString() + '</code>');\n\n\n var el = document.getElementById('saveSnapshotModalProgressBar');\n var eltxt = document.getElementById('saveSnapshotModalProgressBarText');\n\n options.data.charts_by_name = null;\n const reduxState = reduxStore.getState()\n const defaultAfter = selectDefaultAfter(reduxState)\n\n var saveData = {\n hostname: options.hostname,\n server: serverDefault,\n netdata_version: options.data.version,\n snapshot_version: 1,\n after_ms: Date.now() + defaultAfter * 1000,\n before_ms: Date.now(),\n highlight_after_ms: urlOptions.highlight_after,\n highlight_before_ms: urlOptions.highlight_before,\n duration_ms: options.duration * 1000,\n update_every_ms: options.update_every * 1000,\n data_points: 0,\n url: ((urlOptions.server !== null) ? urlOptions.server : document.location.origin.toString() + document.location.pathname.toString() + document.location.search.toString()).toString(),\n comments: document.getElementById('saveSnapshotComments').value.toString(),\n hash: urlOptions.hash,\n charts: options.data,\n info: jsonStringifyFn({\n menu: netdataDashboard.menu,\n submenu: netdataDashboard.submenu,\n context: netdataDashboard.context\n }),\n charts_ok: 0,\n charts_failed: 0,\n compression: saveSnapshotCompression,\n data_size: 0,\n data: {}\n };\n\n if (typeof snapshotOptions.compressions[saveData.compression] === 'undefined') {\n alert('unknown compression method: ' + saveData.compression);\n saveData.compression = 'none';\n }\n\n var compress = snapshotOptions.compressions[saveData.compression].compress;\n var compressed_length = snapshotOptions.compressions[saveData.compression].compressed_length;\n\n function pack_api1_v1_chart_data({ data, chartDataUniqueID }) {\n if (data === null) {\n return 0\n }\n\n var str = JSON.stringify(data);\n\n var cstr = compress(str);\n saveData.data[chartDataUniqueID] = cstr;\n return compressed_length(cstr);\n }\n\n const globalPanAndZoom = selectGlobalPanAndZoom(reduxState)\n var clearPanAndZoom = false;\n if (!globalPanAndZoom) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: saveData.after_ms,\n before: saveData.before_ms,\n }))\n clearPanAndZoom = true;\n } else {\n saveData.after_ms = globalPanAndZoom.after\n saveData.before_ms = globalPanAndZoom.before\n }\n\n\n saveData.duration_ms = saveData.before_ms - saveData.after_ms;\n saveData.data_points = Math.round((saveData.before_ms - saveData.after_ms) / (saveSnapshotSelectedSecondsPerPoint * 1000));\n saveSnapshotModalLog('info', 'Generating snapshot with ' + saveData.data_points.toString() + ' data points per dimension...');\n\n reduxStore.dispatch(startSnapshotModeAction({\n charts: saveData.charts,\n dataPoints: saveData.data_points,\n }))\n\n\n window.saveSnapshotRestore = () => {\n $('#saveSnapshotModal').modal('hide');\n\n $(el).css('width', '0%').attr('aria-valuenow', 0);\n eltxt.innerText = '0%';\n\n reduxStore.dispatch(stopSnapshotModeAction())\n reduxStore.dispatch(snapshotExportResetAction())\n if (clearPanAndZoom) {\n // clear that afterwards\n reduxStore.dispatch(resetGlobalPanAndZoomAction())\n }\n\n $('#saveSnapshotExport').removeClass('disabled');\n }\n\n var size = 0;\n var info = ' Resolution: <b>' + saveSnapshotSelectedSecondsPerPoint.toString() + ((saveSnapshotSelectedSecondsPerPoint === 1) ? ' second ' : ' seconds ').toString() + 'per point</b>.';\n\n window.chartUpdated = ({ chart, chartDataUniqueID, data }) => {\n if (saveSnapshotStop === true) {\n saveSnapshotModalLog('info', 'Cancelled!');\n saveSnapshotRestore()\n }\n const state = reduxStore.getState()\n const chartsCount = selectAmountOfCharts(state)\n const chartsOk = selectAmountOfSnapshotsFetched(state) // hook\n const chartsFailed = selectAmountOfSnapshotsFailed(state)\n\n const pcent = ((chartsOk + chartsFailed) / chartsCount) * 100\n $(el).css('width', pcent + '%').attr('aria-valuenow', pcent);\n eltxt.innerText = Math.round(pcent).toString() + '%, ' + (chart || data.id)\n\n size += pack_api1_v1_chart_data({ data, chartDataUniqueID })\n\n saveSnapshotModalLog((chartsFailed) ? 'danger' : 'info', 'Generated snapshot data size <b>' + (Math.round(size * 100 / 1024 / 1024) / 100).toString() + ' MB</b>. ' + ((chartsFailed) ? (chartsFailed.toString() + ' charts have failed to be downloaded') : '').toString() + info);\n\n window.saveData = saveData\n // better not to use equality against pcent in case of floating point errors\n if (chartsOk + chartsFailed === chartsCount) {\n saveData.charts_ok = chartsOk\n saveData.charts_failed = chartsFailed\n saveData.data_size = size\n\n saveObjectToClient(saveData, filename)\n if (chartsFailed > 0) {\n alert(`${chartsFailed} failed to be downloaded`);\n }\n saveSnapshotRestore()\n saveData = null\n }\n }\n\n // called for every chart\n function update_chart(idx) {\n if (saveSnapshotStop === true) {\n saveSnapshotModalLog('info', 'Cancelled!');\n saveSnapshotRestore();\n return;\n }\n\n var state = NETDATA.options.targets[--idx];\n\n var pcent = (NETDATA.options.targets.length - idx) * 100 / NETDATA.options.targets.length;\n $(el).css('width', pcent + '%').attr('aria-valuenow', pcent);\n eltxt.innerText = Math.round(pcent).toString() + '%, ' + state.id;\n\n setTimeout(function () {\n charts_count++;\n state.isVisible(true);\n state.current.force_after_ms = saveData.after_ms;\n state.current.force_before_ms = saveData.before_ms;\n\n state.updateChart(function (status, reason) {\n state.current.force_after_ms = null;\n state.current.force_before_ms = null;\n\n if (status === true) {\n charts_ok++;\n // state.log('ok');\n size += pack_api1_v1_chart_data(state);\n } else {\n charts_failed++;\n state.log('failed to be updated: ' + reason);\n }\n\n saveSnapshotModalLog((charts_failed) ? 'danger' : 'info', 'Generated snapshot data size <b>' + (Math.round(size * 100 / 1024 / 1024) / 100).toString() + ' MB</b>. ' + ((charts_failed) ? (charts_failed.toString() + ' charts have failed to be downloaded') : '').toString() + info);\n\n if (idx > 0) {\n update_chart(idx);\n } else {\n saveData.charts_ok = charts_ok;\n saveData.charts_failed = charts_failed;\n saveData.data_size = size;\n // console.log(saveData.compression + ': ' + (size / (options.data.dimensions_count * Math.round(saveSnapshotViewDuration / saveSnapshotSelectedSecondsPerPoint))).toString());\n\n // save it\n // console.log(saveData);\n saveObjectToClient(saveData, filename);\n\n if (charts_failed > 0) {\n alert(charts_failed.toString() + ' failed to be downloaded');\n }\n\n saveSnapshotRestore();\n saveData = null;\n }\n })\n }, 0);\n }\n\n });\n });\n}\n\n// --------------------------------------------------------------------\n// activate netdata on the page\nlet browser_timezone\ntry {\n browser_timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n} catch (e) {\n console.log('failed to detect browser timezone: ' + e.toString());\n browser_timezone = 'cannot-detect-it';\n}\n\nconst getOption = (option) => {\n const state = reduxStore.getState()\n return createSelectOption(option)(state)\n}\n\n\nfunction dashboardSettingsSetup() {\n var update_options_modal = function () {\n var sync_option = function (option) {\n var self = $('#' + option);\n\n if (self.prop('checked') !== getOption(option)) {\n // console.log('switching ' + option.toString());\n self.bootstrapToggle(getOption(option) ? 'on' : 'off');\n }\n };\n\n var theme_sync_option = function (option) {\n var self = $('#' + option);\n\n self.bootstrapToggle(netdataTheme === 'slate' ? 'on' : 'off');\n };\n var units_sync_option = function (option) {\n var self = $('#' + option);\n\n if (self.prop('checked') !== (getOption('units') === 'auto')) {\n self.bootstrapToggle(getOption('units') === 'auto' ? 'on' : 'off');\n }\n\n if (self.prop('checked') === true) {\n $('#settingsLocaleTempRow').show();\n $('#settingsLocaleTimeRow').show();\n } else {\n $('#settingsLocaleTempRow').hide();\n $('#settingsLocaleTimeRow').hide();\n }\n };\n var temp_sync_option = function (option) {\n var self = $('#' + option);\n\n if (self.prop('checked') !== (getOption('temperature') === 'celsius')) {\n self.bootstrapToggle(getOption('temperature') === 'celsius' ? 'on' : 'off');\n }\n };\n\n sync_option('stop_updates_when_focus_is_lost');\n sync_option('eliminate_zero_dimensions');\n sync_option('destroy_on_hide');\n sync_option('async_on_scroll');\n\n sync_option('parallel_refresher');\n sync_option('concurrent_refreshes');\n sync_option('sync_selection');\n\n sync_option('legend_right');\n theme_sync_option('netdata_theme_control');\n sync_option('show_help');\n sync_option('pan_and_zoom_data_padding');\n sync_option('smooth_plot');\n\n units_sync_option('units_conversion');\n temp_sync_option('units_temp');\n sync_option('seconds_as_time');\n\n if (getOption('parallel_refresher') === false) {\n $('#concurrent_refreshes_row').hide();\n } else {\n $('#concurrent_refreshes_row').show();\n }\n };\n\n update_options_modal();\n\n // handle options changes\n $('#eliminate_zero_dimensions').change(function () {\n setOption('eliminate_zero_dimensions', $(this).prop('checked'));\n });\n $('#destroy_on_hide').change(function () {\n setOption('destroy_on_hide', $(this).prop('checked'));\n });\n $('#async_on_scroll').change(function () {\n setOption('async_on_scroll', $(this).prop('checked'));\n });\n $('#parallel_refresher').change(function () {\n setOption('parallel_refresher', $(this).prop('checked'));\n });\n $('#concurrent_refreshes').change(function () {\n setOption('concurrent_refreshes', $(this).prop('checked'));\n });\n $('#sync_selection').change(function () {\n setOption('sync_selection', $(this).prop('checked'));\n netdataReload();\n });\n $('#stop_updates_when_focus_is_lost').change(function () {\n urlOptions.update_always = !$(this).prop('checked');\n urlOptions.hashUpdate();\n\n setOption('stop_updates_when_focus_is_lost', !urlOptions.update_always);\n });\n $('#smooth_plot').change(function () {\n setOption('smooth_plot', $(this).prop('checked'));\n });\n $('#pan_and_zoom_data_padding').change(function () {\n setOption('pan_and_zoom_data_padding', $(this).prop('checked'));\n });\n $('#seconds_as_time').change(function () {\n setOption('seconds_as_time', $(this).prop('checked'));\n });\n\n $('#units_conversion').change(function () {\n setOption('units', $(this).prop('checked') ? 'auto' : 'original');\n update_options_modal()\n });\n $('#units_temp').change(function () {\n setOption('temperature', $(this).prop('checked') ? 'celsius' : 'fahrenheit');\n });\n\n $('#legend_right').change(function () {\n setOption('legend_right', $(this).prop('checked'));\n // reloading for now, it's much easier than rebuilding charts bootstraping in main.js\n netdataReload();\n });\n\n $('#show_help').change(function () {\n urlOptions.help = $(this).prop('checked');\n urlOptions.hashUpdate();\n\n setOption('show_help', urlOptions.help);\n netdataReload();\n });\n\n // this has to be the last\n // it reloads the page\n $('#netdata_theme_control').change(function () {\n urlOptions.theme = $(this).prop('checked') ? 'slate' : 'white';\n urlOptions.hashUpdate();\n\n if (setTheme(urlOptions.theme)) {\n netdataReload();\n }\n });\n}\n\nconst CHART_DIV_ID_PREFIX = 'chart_'\nconst CHART_DIV_OFFSET = -50\n\nfunction scrollDashboardTo() {\n if (window.netdataSnapshotData !== null && typeof window.netdataSnapshotData.hash !== 'undefined') {\n scrollToId(window.netdataSnapshotData.hash.replace('#', ''));\n } else {\n // check if we have to jump to a specific section\n scrollToId(urlOptions.hash.replace('#', ''));\n if (urlOptions.chart !== null) {\n const chartElement = document.getElementById(`${CHART_DIV_ID_PREFIX}${name2id(urlOptions.chart)}`)\n if (chartElement) {\n const offset = chartElement.offsetTop + CHART_DIV_OFFSET;\n document.querySelector(\"html\").scrollTop = offset\n }\n }\n }\n}\n\nvar modalHiddenCallback = null;\n\nwindow.scrollToChartAfterHidingModal = (chart, alarmDate, alarmStatus) => {\n modalHiddenCallback = function () {\n\n if (typeof chart === 'string') {\n const chartElement = document.getElementById(`${CHART_DIV_ID_PREFIX}${name2id(chart)}`)\n if (chartElement) {\n const offset = chartElement.offsetTop + CHART_DIV_OFFSET;\n document.querySelector(\"html\").scrollTop = offset\n }\n }\n\n if (['WARNING', 'CRITICAL'].includes(alarmStatus)) {\n const twoMinutes = 2 * 60 * 1000\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: alarmDate - twoMinutes,\n before: alarmDate + twoMinutes,\n }))\n }\n };\n}\n\n// ----------------------------------------------------------------------------\n\nfunction enableTooltipsAndPopovers() {\n $('[data-toggle=\"tooltip\"]').tooltip({\n animated: 'fade',\n trigger: 'hover',\n html: true,\n delay: { show: 500, hide: 0 },\n container: 'body'\n });\n $('[data-toggle=\"popover\"]').popover();\n}\n\n// ----------------------------------------------------------------------------\n\nvar runOnceOnDashboardLastRun = 0;\n\nfunction runOnceOnDashboardWithjQuery() {\n if (runOnceOnDashboardLastRun !== 0) {\n scrollDashboardTo();\n\n // restore the scrollspy at the proper position\n $(document.body).scrollspy('refresh');\n $(document.body).scrollspy('process');\n\n return;\n }\n\n runOnceOnDashboardLastRun = Date.now();\n\n // ------------------------------------------------------------------------\n // bootstrap modals\n\n // prevent bootstrap modals from scrolling the page\n // maintains the current scroll position\n // https://stackoverflow.com/a/34754029/4525767\n\n var scrollPos = 0;\n var modal_depth = 0; // how many modals are currently open\n var modal_shown = false; // set to true, if a modal is shown\n var netdata_paused_on_modal = false; // set to true, if the modal paused netdata\n var scrollspyOffset = $(window).height() / 3; // will be updated below - the offset of scrollspy to select an item\n\n $('.modal')\n .on('show.bs.modal', function () {\n if (modal_depth === 0) {\n scrollPos = window.scrollY;\n\n $('body').css({\n overflow: 'hidden',\n position: 'fixed',\n top: -scrollPos\n });\n\n modal_shown = true;\n\n if (NETDATA.options.pauseCallback === null) {\n NETDATA.pause(function () {\n });\n netdata_paused_on_modal = true;\n } else {\n netdata_paused_on_modal = false;\n }\n }\n\n modal_depth++;\n //console.log(urlOptions.after);\n\n })\n .on('hide.bs.modal', function () {\n\n modal_depth--;\n\n if (modal_depth <= 0) {\n modal_depth = 0;\n\n $('body')\n .css({\n overflow: '',\n position: '',\n top: ''\n });\n\n // scroll to the position we had open before the modal\n $('html, body')\n .animate({ scrollTop: scrollPos }, 0);\n\n // unpause netdata, if we paused it\n if (netdata_paused_on_modal === true) {\n NETDATA.unpause();\n netdata_paused_on_modal = false;\n }\n\n // restore the scrollspy at the proper position\n $(document.body).scrollspy('process');\n }\n //console.log(urlOptions.after);\n })\n .on('hidden.bs.modal', function () {\n if (modal_depth === 0) {\n modal_shown = false;\n }\n\n if (typeof modalHiddenCallback === 'function') {\n modalHiddenCallback();\n }\n\n modalHiddenCallback = null;\n //console.log(urlOptions.after);\n });\n\n // ------------------------------------------------------------------------\n // sidebar / affix\n\n $('#sidebar')\n .affix({\n offset: {\n top: 0,\n bottom: 0\n }\n })\n .on('affixed.bs.affix', function () {\n // fix scrolling of very long affix lists\n // http://stackoverflow.com/questions/21691585/bootstrap-3-1-0-affix-too-long\n\n $(this).removeAttr('style');\n })\n .on('affix-top.bs.affix', function () {\n // fix bootstrap affix click bug\n // https://stackoverflow.com/a/37847981/4525767\n\n if (modal_shown) {\n return false;\n }\n })\n .on('activate.bs.scrollspy', function (e) {\n // change the URL based on the current position of the screen\n\n if (modal_shown === false) {\n var el = $(e.target);\n var hash = el.find('a').attr('href');\n if (typeof hash === 'string' && hash.substring(0, 1) === '#' && urlOptions.hash.startsWith(hash + '_submenu_') === false) {\n urlOptions.hash = hash;\n urlOptions.hashUpdate();\n }\n }\n });\n\n Ps.initialize(document.getElementById('sidebar'), {\n wheelSpeed: 0.5,\n wheelPropagation: true,\n swipePropagation: true,\n minScrollbarLength: null,\n maxScrollbarLength: null,\n useBothWheelAxes: false,\n suppressScrollX: true,\n suppressScrollY: false,\n scrollXMarginOffset: 0,\n scrollYMarginOffset: 0,\n theme: 'default'\n });\n\n // ------------------------------------------------------------------------\n // scrollspy\n\n if (scrollspyOffset > 250) {\n scrollspyOffset = 250;\n }\n if (scrollspyOffset < 75) {\n scrollspyOffset = 75;\n }\n document.body.setAttribute('data-offset', scrollspyOffset);\n\n // scroll the dashboard, before activating the scrollspy, so that our\n // hash will not be updated before we got the chance to scroll to it\n scrollDashboardTo();\n\n $(document.body).scrollspy({\n target: '#sidebar',\n offset: scrollspyOffset // controls the diff of the <hX> element to the top, to select it\n });\n\n // ------------------------------------------------------------------------\n // my-netdata menu\n\n $('#deleteRegistryModal')\n .on('hidden.bs.modal', function () {\n deleteRegistryGuid = null;\n });\n\n // ------------------------------------------------------------------------\n // update modal\n\n $('#updateModal')\n .on('show.bs.modal', function () {\n versionLog('checking, please wait...');\n })\n .on('shown.bs.modal', function () {\n notifyForUpdate(true);\n });\n\n // ------------------------------------------------------------------------\n // alarms modal\n\n $('#alarmsModal')\n .on('shown.bs.modal', function () {\n alarmsUpdateModal();\n })\n .on('hidden.bs.modal', function () {\n document.getElementById('alarms_active').innerHTML =\n document.getElementById('alarms_all').innerHTML =\n document.getElementById('alarms_log').innerHTML =\n 'loading...';\n });\n\n // ------------------------------------------------------------------------\n\n dashboardSettingsSetup();\n loadSnapshotDragAndDropSetup();\n saveSnapshotModalSetup();\n showPageFooter();\n\n // ------------------------------------------------------------------------\n // https://github.com/viralpatel/jquery.shorten/blob/master/src/jquery.shorten.js\n\n $.fn.shorten = function (settings) {\n \"use strict\";\n\n var config = {\n showChars: 750,\n minHideChars: 10,\n ellipsesText: \"...\",\n moreText: '<i class=\"fas fa-expand\"></i> show more information',\n lessText: '<i class=\"fas fa-compress\"></i> show less information',\n onLess: function () {\n NETDATA.onscroll();\n },\n onMore: function () {\n NETDATA.onscroll();\n },\n errMsg: null,\n force: false\n };\n\n if (settings) {\n $.extend(config, settings);\n }\n\n if ($(this).data('jquery.shorten') && !config.force) {\n return false;\n }\n $(this).data('jquery.shorten', true);\n\n $(document).off(\"click\", '.morelink');\n\n $(document).on({\n click: function () {\n\n var $this = $(this);\n if ($this.hasClass('less')) {\n $this.removeClass('less');\n $this.html(config.moreText);\n $this.parent().prev().animate({ 'height': '0' + '%' }, 0, function () {\n $this.parent().prev().prev().show();\n }).hide(0, function () {\n config.onLess();\n });\n } else {\n $this.addClass('less');\n $this.html(config.lessText);\n $this.parent().prev().animate({ 'height': '100' + '%' }, 0, function () {\n $this.parent().prev().prev().hide();\n }).show(0, function () {\n config.onMore();\n });\n }\n return false;\n }\n }, '.morelink');\n\n return this.each(function () {\n var $this = $(this);\n\n var content = $this.html();\n var contentlen = $this.text().length;\n if (contentlen > config.showChars + config.minHideChars) {\n var c = content.substr(0, config.showChars);\n if (c.indexOf('<') >= 0) // If there's HTML don't want to cut it\n {\n var inTag = false; // I'm in a tag?\n var bag = ''; // Put the characters to be shown here\n var countChars = 0; // Current bag size\n var openTags = []; // Stack for opened tags, so I can close them later\n var tagName = null;\n\n for (var i = 0, r = 0; r <= config.showChars; i++) {\n if (content[i] === '<' && !inTag) {\n inTag = true;\n\n // This could be \"tag\" or \"/tag\"\n tagName = content.substring(i + 1, content.indexOf('>', i));\n\n // If its a closing tag\n if (tagName[0] === '/') {\n\n if (tagName !== ('/' + openTags[0])) {\n config.errMsg = 'ERROR en HTML: the top of the stack should be the tag that closes';\n } else {\n openTags.shift(); // Pops the last tag from the open tag stack (the tag is closed in the retult HTML!)\n }\n\n } else {\n // There are some nasty tags that don't have a close tag like <br/>\n if (tagName.toLowerCase() !== 'br') {\n openTags.unshift(tagName); // Add to start the name of the tag that opens\n }\n }\n }\n\n if (inTag && content[i] === '>') {\n inTag = false;\n }\n\n if (inTag) {\n bag += content.charAt(i);\n } else {\n // Add tag name chars to the result\n r++;\n if (countChars <= config.showChars) {\n bag += content.charAt(i); // Fix to ie 7 not allowing you to reference string characters using the []\n countChars++;\n } else {\n // Now I have the characters needed\n if (openTags.length > 0) {\n // I have unclosed tags\n\n for (var j = 0; j < openTags.length; j++) {\n bag += '</' + openTags[j] + '>'; // Close all tags that were opened\n\n // You could shift the tag from the stack to check if you end with an empty stack, that means you have closed all open tags\n }\n break;\n }\n }\n }\n }\n c = $('<div/>').html(bag + '<span class=\"ellip\">' + config.ellipsesText + '</span>').html();\n } else {\n c += config.ellipsesText;\n }\n\n var html = '<div class=\"shortcontent\">' + c +\n '</div><div class=\"allcontent\">' + content +\n '</div><span><a href=\"javascript://nop/\" class=\"morelink\">' + config.moreText + '</a></span>';\n\n $this.html(html);\n $this.find(\".allcontent\").hide(); // Hide all text\n $('.shortcontent p:last', $this).css('margin-bottom', 0); //Remove bottom margin on last paragraph as it's likely shortened\n }\n });\n };\n}\n\nfunction finalizePage() {\n if (urlOptions.after < 0) {\n reduxStore.dispatch(setDefaultAfterAction({ after: urlOptions.after }))\n } else if (urlOptions.pan_and_zoom === true) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: urlOptions.after,\n before: urlOptions.before,\n }))\n }\n\n // resize all charts - without starting the background thread\n // this has to be done while NETDATA is paused\n // if we ommit this, the affix menu will be wrong, since all\n // the Dom elements are initially zero-sized\n NETDATA.parseDom();\n\n // let it run (update the charts)\n NETDATA.unpause();\n\n runOnceOnDashboardWithjQuery();\n $(\".shorten\").shorten();\n enableTooltipsAndPopovers();\n\n if (isDemo) {\n // do not to give errors on netdata demo servers for 60 seconds\n NETDATA.options.current.retries_on_data_failures = 60;\n\n // google analytics when this is used for the home page of the demo sites\n // this does not run on user's installations\n setTimeout(function () {\n (function (i, s, o, g, r, a, m) {\n i['GoogleAnalyticsObject'] = r;\n i[r] = i[r] || function () {\n (i[r].q = i[r].q || []).push(arguments)\n }, i[r].l = 1 * new Date();\n a = s.createElement(o),\n m = s.getElementsByTagName(o)[0];\n a.async = 1;\n a.src = g;\n m.parentNode.insertBefore(a, m)\n })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');\n\n ga('create', 'UA-64295674-3', 'auto');\n ga('send', 'pageview', '/demosite/' + window.location.host);\n }, 2000);\n } else {\n notifyForUpdate();\n }\n\n if (urlOptions.show_alarms === true) {\n setTimeout(function () {\n $('#alarmsModal').modal('show');\n }, 1000);\n }\n\n NETDATA.onresizeCallback = function () {\n Ps.update(document.getElementById('sidebar'));\n };\n NETDATA.onresizeCallback();\n\n if (window.netdataSnapshotData !== null) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: window.netdataSnapshotData.after_ms,\n before: window.netdataSnapshotData.before_ms,\n }))\n }\n}\n\nwindow.resetDashboardOptions = () => {\n reduxStore.dispatch(resetOptionsAction())\n\n // it's dirty, but this will be rewritten anyway\n urlOptions.update_always = false;\n urlOptions.help = false;\n urlOptions.theme = \"slate\";\n urlOptions.hashUpdate();\n\n netdataReload()\n}\n\n// callback to add the dashboard info to the\n// parallel javascript downloader in netdata\nexport const netdataPrepCallback = () => {\n if (isDemo) {\n document.getElementById('masthead').style.display = 'block';\n } else {\n if (urlOptions.update_always === true) {\n setOption('stop_updates_when_focus_is_lost', !urlOptions.update_always);\n }\n }\n};\n\nwindow.selected_server_timezone = function (timezone, status) {\n // clear the error\n document.getElementById('timezone_error_message').innerHTML = '';\n\n if (typeof status === 'undefined') {\n // the user selected a timezone from the menu\n\n setOption('user_set_server_timezone', timezone);\n\n if (!isProperTimezone(timezone)) {\n setOption(\"timezone\", \"default\")\n\n if (!$('#local_timezone').prop('checked')) {\n $('#local_timezone').bootstrapToggle('on');\n }\n\n document.getElementById('timezone_error_message').innerHTML = 'Ooops! That timezone was not accepted by your browser. Please open a github issue to help us fix it.';\n setOption('user_set_server_timezone', options.timezone);\n } else {\n if ($('#local_timezone').prop('checked')) {\n $('#local_timezone').bootstrapToggle('off');\n }\n setOption(\"timezone\", timezone)\n }\n } else if (status === true) {\n // the user wants the browser default timezone to be activated\n setOption(\"timezone\", \"default\")\n } else {\n // the user wants the server default timezone to be activated\n\n let userSetServerTimezone = getOption(\"user_set_server_timezone\")\n if (userSetServerTimezone === 'default') {\n setOption(\"user_set_server_timezone\", options.timezone) // timezone from /charts endpoint\n userSetServerTimezone = options.timezone\n }\n\n if (!isProperTimezone(userSetServerTimezone)) {\n setOption(\"timezone\", \"default\");\n\n if (!$('#local_timezone').prop('checked')) {\n $('#local_timezone').bootstrapToggle('on');\n }\n\n document.getElementById('timezone_error_message').innerHTML = 'Sorry. The timezone \"' + timezone.toString() + '\" is not accepted by your browser. Please select one from the list.';\n setOption('user_set_server_timezone', options.timezone);\n } else {\n setOption(\"timezone\", userSetServerTimezone)\n }\n }\n\n const timezoneOption = getOption(\"timezone\")\n document.getElementById('current_timezone').innerText = (timezoneOption === 'default') ? 'unset, using browser default' : timezoneOption;\n return false;\n};\n\nexport var netdataCallback = initializeDynamicDashboard;\n\nwindow.showSignInModal = function() {\n document.getElementById(\"sim-registry\").innerHTML = getFromRegistry(\"registryServer\");\n $(\"#signInModal\").modal(\"show\");\n}\n\nwindow.explicitlySignIn = () => {\n $(\"#signInModal\").modal(\"hide\");\n reduxStore.dispatch(explicitlySignInAction())\n};\n","import React, { useMemo } from \"react\"\nimport { CloudConnectionProps, ConnectionModalStatusContent } from \"./types\"\nimport Anchor from \"@/src/components/anchor\"\n\nimport { Text } from \"@netdata/netdata-ui\"\n\nexport const makeCloudConnectionStatusInfo = ({\n nodeStatus,\n userStatus,\n date,\n}: CloudConnectionProps): ConnectionModalStatusContent => ({\n title: \"Netdata Cloud connection status\",\n text: {\n header: () => {\n return (\n <Text>\n This node is currently{\" \"}\n <Text strong>{nodeStatus === \"LIVE\" ? \"Connected\" : \"Not Connected\"}</Text> to Netdata\n Cloud\n </Text>\n )\n },\n bullets:\n nodeStatus === \"NOT_LIVE\"\n ? [\n // `The node lost its Netdata Cloud connection at ${date}`,\n () => (\n <Text>\n To troubleshoot Netdata Cloud connection issues, please follow{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href=\"https://learn.netdata.cloud/docs/agent/claim#troubleshooting\"\n >\n this guide\n </Anchor>\n .\n </Text>\n ),\n ]\n : [],\n footer: () => (\n <Text>\n You are{\" \"}\n <Text strong>\n {userStatus === \"LOGGED_IN\"\n ? \"Logged In\"\n : userStatus === \"EXPIRED_LOGIN\"\n ? \"Logged out\"\n : \"Not signed-up\"}\n </Text>{\" \"}\n to Netdata Cloud\n </Text>\n ),\n },\n CTA1: {\n text: \"Take me to Netdata Cloud\",\n },\n})\n\nconst useCloudConnectionStatus = ({ userStatus, nodeStatus, date }: CloudConnectionProps) => {\n const cloudConnectionStatusInfo = useMemo<ConnectionModalStatusContent>(() => {\n return makeCloudConnectionStatusInfo({ userStatus, nodeStatus, date })\n }, [userStatus, nodeStatus, date])\n\n return cloudConnectionStatusInfo\n}\n\nexport default useCloudConnectionStatus\n","import React, { useCallback } from \"react\"\nimport GoToCloud from \"components/auth/signIn\"\n\nimport {\n Modal,\n ModalContent,\n ModalBody,\n ModalFooter,\n ModalHeader,\n Text,\n Flex,\n H3,\n Button,\n Box,\n ModalCloseButton,\n} from \"@netdata/netdata-ui\"\n\nimport { ConnectionModalStatusContent } from \"./types\"\n\nconst campaign = \"agent_nudge_to_cloud\"\n\nexport type CloudConnectionStatusModalProps = ConnectionModalStatusContent & {\n closeModal: () => void\n onRefresh?: () => void\n isCTA1Disabled: boolean\n}\n\nconst CloudConnectionStatusModal = ({\n title,\n text,\n CTA1,\n closeModal,\n onRefresh,\n isCTA1Disabled,\n}: CloudConnectionStatusModalProps) => {\n const handleClickedCTA1 = useCallback(\n ({ link }: { link: string }) => {\n closeModal()\n window.location.href = link\n },\n [closeModal]\n )\n\n return (\n <Modal>\n <ModalContent width={180} background=\"modalBackground\">\n <ModalHeader>\n <H3 margin={[0]}>{title}</H3>\n <ModalCloseButton onClose={closeModal} />\n </ModalHeader>\n <ModalBody>\n <Flex padding={[0, 0, 4, 0]} column gap={3}>\n {text.header({})}\n {text.bullets.length > 0 && (\n <Flex column gap={3}>\n <Flex column gap={1} as={\"ul\"}>\n {text.bullets.map((bullet, index) => {\n if (typeof bullet === \"function\") {\n return <li key={index}> {bullet()}</li>\n }\n return (\n <li key={bullet}>\n <Text>{bullet}</Text>\n </li>\n )\n })}\n </Flex>\n </Flex>\n )}\n {text.footer()}\n </Flex>\n </ModalBody>\n <ModalFooter>\n <Box data-testid=\"cta1\" margin={[0, 2, 0, 0]} width={{ min: 40 }}>\n <GoToCloud utmParameters={{ content: \"connection_to_cloud\", campaign }}>\n {({ link }) => (\n <Button\n data-ga={`connection-to-cloud::click-ct1::ad`}\n disabled={isCTA1Disabled}\n textTransform=\"none\"\n data-testid=\"cta1-button\"\n onClick={() => handleClickedCTA1({ link })}\n width=\"100%\"\n label={CTA1.text}\n />\n )}\n </GoToCloud>\n </Box>\n <Box\n data-ga={`connection-to-cloud::click-check-now::ad`}\n onClick={onRefresh}\n height={10}\n className=\"btn btn-default\"\n data-testid=\"cta2-button\"\n width={{ min: 40 }}\n >\n <Box as={Text} sx={{ fontWeight: \"500\", lineHeight: \"25px\" }}>\n Check Now\n </Box>\n </Box>\n </ModalFooter>\n </ModalContent>\n </Modal>\n )\n}\n\nexport default CloudConnectionStatusModal\n","import React, { useState, useCallback, useEffect } from \"react\"\nimport useCloudConnectionStatus from \"./use-cloud-connection-status\"\nimport CloudConnectionStatusModal from \"./cloud-connection-status-modal\"\n\nimport { Pill, Flex } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"react-redux\"\nimport { useRequestRefreshOfAccessMessage } from \"hooks/use-user-node-access\"\nimport { selectUserNodeAccess } from \"domains/global/selectors\"\nimport { PromoProps } from \"@/src/domains/dashboard/components/migration-modal\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\n\nconst CloudConnectionStatus = () => {\n const userNodeAccess = useSelector(selectUserNodeAccess) as PromoProps\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n const [isModalOpen, setModalOpen] = useState(false)\n const cloudConnectionStatusInfo = useCloudConnectionStatus({\n userStatus: userNodeAccess?.userStatus || \"UNKNOWN\",\n nodeStatus: userNodeAccess?.nodeLiveness || \"NOT_LIVE\",\n date: \"\",\n })\n\n useEffect(() => {\n if (isModalOpen) {\n document.documentElement.style.overflow = \"hidden\"\n } else {\n document.documentElement.style.overflow = \"auto\"\n }\n }, [isModalOpen])\n\n const openModal = useCallback(() => {\n setModalOpen(true)\n }, [])\n\n const closeModal = useCallback(() => {\n setModalOpen(false)\n }, [])\n\n const onRefresh = useRequestRefreshOfAccessMessage()\n\n if (!cloudEnabled) return null\n\n return (\n <Flex column>\n <Pill\n data-ga={`connection-to-cloud::click-pill::ad`}\n data-testid=\"header-connection-to-cloud-button\"\n onClick={openModal}\n flavour=\"neutral\"\n >\n Connection to Cloud\n </Pill>\n {isModalOpen && (\n <CloudConnectionStatusModal\n {...cloudConnectionStatusInfo}\n isCTA1Disabled={userNodeAccess?.nodeLiveness !== \"LIVE\"}\n closeModal={closeModal}\n onRefresh={onRefresh}\n />\n )}\n </Flex>\n )\n}\n\nexport default CloudConnectionStatus\n","import { AlarmStatus } from \"domains/global/types\"\n\nexport const storeKey = \"global\"\n\nexport const TEMPORARY_MAIN_JS_TIMEOUT = 1000\n\nexport const MASKED_DATA = \"***\"\n\nexport const NOTIFICATIONS_TIMEOUT = 5000\n\nexport const INFO_POLLING_FREQUENCY = 5000\n\nexport const CLOUD_BASE_URL_DISABLED = \"CLOUD_BASE_URL_DISABLED\"\n\nexport const alarmStatuses: AlarmStatus[] = [\"WARNING\", \"ERROR\", \"REMOVED\", \"UNDEFINED\", \"UNINITIALIZED\", \"CLEAR\", \"CRITICAL\"]\n","/* eslint-disable */\n/*!\n * d3pie\n * @author Ben Keen\n * @version 0.1.9\n * @date June 17th, 2015\n * @repo http://github.com/benkeen/d3pie\n * SPDX-License-Identifier: MIT\n */\n\n// UMD pattern from https://github.com/umdjs/umd/blob/master/returnExports.js\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module\n define([], factory);\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but only CommonJS-like environments that support module.exports,\n // like Node\n module.exports = factory();\n } else {\n // browser globals (root is window)\n root.d3pie = factory(root);\n }\n}(this, function() {\n\n var _scriptName = \"d3pie\";\n var _version = \"0.2.1\";\n\n // used to uniquely generate IDs and classes, ensuring no conflict between multiple pies on the same page\n var _uniqueIDCounter = 0;\n\n\n // this section includes all helper libs on the d3pie object. They're populated via grunt-template. Note: to keep\n // the syntax highlighting from getting all messed up, I commented out each line. That REQUIRES each of the files\n // to have an empty first line. Crumby, yes, but acceptable.\n //// --------- _default-settings.js -----------/**\n/**\n * Contains the out-the-box settings for the script. Any of these settings that aren't explicitly overridden for the\n * d3pie instance will inherit from these. This is also included on the main website for use in the generation script.\n */\nvar defaultSettings = {\n header: {\n title: {\n text: \"\",\n color: \"#333333\",\n fontSize: 18,\n fontWeight: \"bold\",\n font: \"arial\"\n },\n subtitle: {\n text: \"\",\n color: \"#666666\",\n fontSize: 14,\n fontWeight: \"bold\",\n font: \"arial\"\n },\n location: \"top-center\",\n titleSubtitlePadding: 8\n },\n footer: {\n text: \t \"\",\n color: \"#666666\",\n fontSize: 14,\n fontWeight: \"bold\",\n font: \"arial\",\n location: \"left\"\n },\n size: {\n canvasHeight: 500,\n canvasWidth: 500,\n pieInnerRadius: \"0%\",\n pieOuterRadius: null\n },\n data: {\n sortOrder: \"none\",\n ignoreSmallSegments: {\n enabled: false,\n valueType: \"percentage\",\n value: null\n },\n smallSegmentGrouping: {\n enabled: false,\n value: 1,\n valueType: \"percentage\",\n label: \"Other\",\n color: \"#cccccc\"\n },\n content: []\n },\n labels: {\n outer: {\n format: \"label\",\n hideWhenLessThanPercentage: null,\n pieDistance: 30\n },\n inner: {\n format: \"percentage\",\n hideWhenLessThanPercentage: null\n },\n mainLabel: {\n color: \"#333333\",\n font: \"arial\",\n fontWeight: \"normal\",\n fontSize: 10\n },\n percentage: {\n color: \"#dddddd\",\n font: \"arial\",\n fontWeight: \"bold\",\n fontSize: 10,\n decimalPlaces: 0\n },\n value: {\n color: \"#cccc44\",\n fontWeight: \"bold\",\n font: \"arial\",\n fontSize: 10\n },\n lines: {\n enabled: true,\n style: \"curved\",\n color: \"segment\"\n },\n truncation: {\n enabled: false,\n truncateLength: 30\n },\n formatter: null\n },\n effects: {\n load: {\n effect: \"none\", // \"default\", commented in the code\n speed: 1000\n },\n pullOutSegmentOnClick: {\n effect: \"none\", // \"bounce\", commented in the code\n speed: 300,\n size: 10\n },\n highlightSegmentOnMouseover: false,\n highlightLuminosity: -0.2\n },\n tooltips: {\n enabled: false,\n type: \"placeholder\", // caption|placeholder\n string: \"\",\n placeholderParser: null,\n styles: {\n fadeInSpeed: 250,\n backgroundColor: \"#000000\",\n backgroundOpacity: 0.5,\n color: \"#efefef\",\n borderRadius: 2,\n font: \"arial\",\n fontWeight: \"bold\",\n fontSize: 10,\n padding: 4\n }\n },\n misc: {\n colors: {\n background: null,\n segments: [\n \"#2484c1\", \"#65a620\", \"#7b6888\", \"#a05d56\", \"#961a1a\", \"#d8d23a\", \"#e98125\", \"#d0743c\", \"#635222\", \"#6ada6a\",\n \"#0c6197\", \"#7d9058\", \"#207f33\", \"#44b9b0\", \"#bca44a\", \"#e4a14b\", \"#a3acb2\", \"#8cc3e9\", \"#69a6f9\", \"#5b388f\",\n \"#546e91\", \"#8bde95\", \"#d2ab58\", \"#273c71\", \"#98bf6e\", \"#4daa4b\", \"#98abc5\", \"#cc1010\", \"#31383b\", \"#006391\",\n \"#c2643f\", \"#b0a474\", \"#a5a39c\", \"#a9c2bc\", \"#22af8c\", \"#7fcecf\", \"#987ac6\", \"#3d3b87\", \"#b77b1c\", \"#c9c2b6\",\n \"#807ece\", \"#8db27c\", \"#be66a2\", \"#9ed3c6\", \"#00644b\", \"#005064\", \"#77979f\", \"#77e079\", \"#9c73ab\", \"#1f79a7\"\n ],\n segmentStroke: \"#ffffff\"\n },\n gradient: {\n enabled: false,\n percentage: 95,\n color: \"#000000\"\n },\n canvasPadding: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n pieCenterOffset: {\n x: 0,\n y: 0\n },\n cssPrefix: null\n },\n callbacks: {\n onload: null,\n onMouseoverSegment: null,\n onMouseoutSegment: null,\n onClickSegment: null\n }\n};\n\n //// --------- validate.js -----------\nvar validate = {\n\n // called whenever a new pie chart is created\n initialCheck: function(pie) {\n var cssPrefix = pie.cssPrefix;\n var element = pie.element;\n var options = pie.options;\n\n // confirm d3 is available [check minimum version]\n if (!window.d3 || !window.d3.hasOwnProperty(\"version\")) {\n console.error(\"d3pie error: d3 is not available\");\n return false;\n }\n\n // confirm element is either a DOM element or a valid string for a DOM element\n if (!(element instanceof HTMLElement || element instanceof SVGElement)) {\n console.error(\"d3pie error: the first d3pie() param must be a valid DOM element (not jQuery) or a ID string.\");\n return false;\n }\n\n // confirm the CSS prefix is valid. It has to start with a-Z and contain nothing but a-Z0-9_-\n if (!(/[a-zA-Z][a-zA-Z0-9_-]*$/.test(cssPrefix))) {\n console.error(\"d3pie error: invalid options.misc.cssPrefix\");\n return false;\n }\n\n // confirm some data has been supplied\n if (!helpers.isArray(options.data.content)) {\n console.error(\"d3pie error: invalid config structure: missing data.content property.\");\n return false;\n }\n if (options.data.content.length === 0) {\n console.error(\"d3pie error: no data supplied.\");\n return false;\n }\n\n // clear out any invalid data. Each data row needs a valid positive number and a label\n var data = [];\n for (var i=0; i<options.data.content.length; i++) {\n if (typeof options.data.content[i].value !== \"number\" || isNaN(options.data.content[i].value)) {\n console.log(\"not valid: \", options.data.content[i]);\n continue;\n }\n if (options.data.content[i].value <= 0) {\n console.log(\"not valid - should have positive value: \", options.data.content[i]);\n continue;\n }\n data.push(options.data.content[i]);\n }\n pie.options.data.content = data;\n\n // labels.outer.hideWhenLessThanPercentage - 1-100\n // labels.inner.hideWhenLessThanPercentage - 1-100\n\n return true;\n }\n};\n\n //// --------- helpers.js -----------\nvar helpers = {\n\n // creates the SVG element\n addSVGSpace: function(pie) {\n var element = pie.element;\n var canvasWidth = pie.options.size.canvasWidth;\n var canvasHeight = pie.options.size.canvasHeight;\n var backgroundColor = pie.options.misc.colors.background;\n\n var svg = d3.select(element).append(\"svg:svg\")\n .attr(\"width\", canvasWidth)\n .attr(\"height\", canvasHeight);\n\n if (backgroundColor !== \"transparent\") {\n svg.style(\"background-color\", function() { return backgroundColor; });\n }\n\n return svg;\n },\n\n shuffleArray: function(array) {\n var currentIndex = array.length, tmpVal, randomIndex;\n\n while (0 !== currentIndex) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n\n // and swap it with the current element\n tmpVal = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = tmpVal;\n }\n return array;\n },\n\n processObj: function(obj, is, value) {\n if (typeof is === 'string') {\n return helpers.processObj(obj, is.split('.'), value);\n } else if (is.length === 1 && value !== undefined) {\n obj[is[0]] = value;\n return obj[is[0]];\n } else if (is.length === 0) {\n return obj;\n } else {\n return helpers.processObj(obj[is[0]], is.slice(1), value);\n }\n },\n\n getDimensions: function(el) {\n if(typeof el === 'string')\n el = document.getElementById(el);\n\n var w = 0, h = 0;\n if (el) {\n var dimensions = el.getBBox();\n w = dimensions.width;\n h = dimensions.height;\n }\n else {\n console.log(\"error: getDimensions() \" + id + \" not found.\");\n }\n\n return { w: w, h: h };\n },\n\n /**\n * This is based on the SVG coordinate system, where top-left is 0,0 and bottom right is n-n.\n * @param r1\n * @param r2\n * @returns {boolean}\n */\n rectIntersect: function(r1, r2) {\n var returnVal = (\n // r2.left > r1.right\n (r2.x > (r1.x + r1.w)) ||\n\n // r2.right < r1.left\n ((r2.x + r2.w) < r1.x) ||\n\n // r2.top < r1.bottom\n ((r2.y + r2.h) < r1.y) ||\n\n // r2.bottom > r1.top\n (r2.y > (r1.y + r1.h))\n );\n\n return !returnVal;\n },\n\n /**\n * Returns a lighter/darker shade of a hex value, based on a luminance value passed.\n * @param hex a hex color value such as “#abc” or “#123456″ (the hash is optional)\n * @param lum the luminosity factor: -0.1 is 10% darker, 0.2 is 20% lighter, etc.\n * @returns {string}\n */\n getColorShade: function(hex, lum) {\n\n // validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n lum = lum || 0;\n\n // convert to decimal and change luminosity\n var newHex = \"#\";\n for (var i=0; i<3; i++) {\n var c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n newHex += (\"00\" + c).substr(c.length);\n }\n\n return newHex;\n },\n\n /**\n * Users can choose to specify segment colors in three ways (in order of precedence):\n * \t1. include a \"color\" attribute for each row in data.content\n * \t2. include a misc.colors.segments property which contains an array of hex codes\n * \t3. specify nothing at all and rely on this lib provide some reasonable defaults\n *\n * This function sees what's included and populates this.options.colors with whatever's required\n * for this pie chart.\n * @param data\n */\n initSegmentColors: function(pie) {\n var data = pie.options.data.content;\n var colors = pie.options.misc.colors.segments;\n\n // TODO this needs a ton of error handling\n\n var finalColors = [];\n for (var i=0; i<data.length; i++) {\n if (data[i].hasOwnProperty(\"color\")) {\n finalColors.push(data[i].color);\n } else {\n finalColors.push(colors[i]);\n }\n }\n\n return finalColors;\n },\n\n applySmallSegmentGrouping: function(data, smallSegmentGrouping) {\n var totalSize;\n if (smallSegmentGrouping.valueType === \"percentage\") {\n totalSize = math.getTotalPieSize(data);\n }\n\n // loop through each data item\n var newData = [];\n var groupedData = [];\n var totalGroupedData = 0;\n for (var i=0; i<data.length; i++) {\n if (smallSegmentGrouping.valueType === \"percentage\") {\n var dataPercent = (data[i].value / totalSize) * 100;\n if (dataPercent <= smallSegmentGrouping.value) {\n groupedData.push(data[i]);\n totalGroupedData += data[i].value;\n continue;\n }\n data[i].isGrouped = false;\n newData.push(data[i]);\n } else {\n if (data[i].value <= smallSegmentGrouping.value) {\n groupedData.push(data[i]);\n totalGroupedData += data[i].value;\n continue;\n }\n data[i].isGrouped = false;\n newData.push(data[i]);\n }\n }\n\n // we're done! See if there's any small segment groups to add\n if (groupedData.length) {\n newData.push({\n color: smallSegmentGrouping.color,\n label: smallSegmentGrouping.label,\n value: totalGroupedData,\n isGrouped: true,\n groupedData: groupedData\n });\n }\n\n return newData;\n },\n\n // for debugging\n showPoint: function(svg, x, y) {\n svg.append(\"circle\").attr(\"cx\", x).attr(\"cy\", y).attr(\"r\", 2).style(\"fill\", \"black\");\n },\n\n isFunction: function(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n },\n\n isArray: function(o) {\n return Object.prototype.toString.call(o) === '[object Array]';\n }\n};\n\n\n// taken from jQuery\nvar extend = function() {\n var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false,\n toString = Object.prototype.toString,\n hasOwn = Object.prototype.hasOwnProperty,\n class2type = {\n \"[object Boolean]\": \"boolean\",\n \"[object Number]\": \"number\",\n \"[object String]\": \"string\",\n \"[object Function]\": \"function\",\n \"[object Array]\": \"array\",\n \"[object Date]\": \"date\",\n \"[object RegExp]\": \"regexp\",\n \"[object Object]\": \"object\"\n },\n\n jQuery = {\n isFunction: function (obj) {\n return jQuery.type(obj) === \"function\";\n },\n isArray: Array.isArray ||\n function (obj) {\n return jQuery.type(obj) === \"array\";\n },\n isWindow: function (obj) {\n return obj !== null && obj === obj.window;\n },\n isNumeric: function (obj) {\n return !isNaN(parseFloat(obj)) && isFinite(obj);\n },\n type: function (obj) {\n return obj === null ? String(obj) : class2type[toString.call(obj)] || \"object\";\n },\n isPlainObject: function (obj) {\n if (!obj || jQuery.type(obj) !== \"object\" || obj.nodeType) {\n return false;\n }\n try {\n if (obj.constructor && !hasOwn.call(obj, \"constructor\") && !hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\")) {\n return false;\n }\n } catch (e) {\n return false;\n }\n var key;\n for (key in obj) {}\n return key === undefined || hasOwn.call(obj, key);\n }\n };\n if (typeof target === \"boolean\") {\n deep = target;\n target = arguments[1] || {};\n i = 2;\n }\n if (typeof target !== \"object\" && !jQuery.isFunction(target)) {\n target = {};\n }\n if (length === i) {\n target = this;\n --i;\n }\n for (i; i < length; i++) {\n if ((options = arguments[i]) !== null) {\n for (name in options) {\n src = target[name];\n copy = options[name];\n if (target === copy) {\n continue;\n }\n if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {\n if (copyIsArray) {\n copyIsArray = false;\n clone = src && jQuery.isArray(src) ? src : [];\n } else {\n clone = src && jQuery.isPlainObject(src) ? src : {};\n }\n // WARNING: RECURSION\n target[name] = extend(deep, clone, copy);\n } else if (copy !== undefined) {\n target[name] = copy;\n }\n }\n }\n }\n return target;\n};\n //// --------- math.js -----------\nvar math = {\n\n toRadians: function(degrees) {\n return degrees * (Math.PI / 180);\n },\n\n toDegrees: function(radians) {\n return radians * (180 / Math.PI);\n },\n\n computePieRadius: function(pie) {\n var size = pie.options.size;\n var canvasPadding = pie.options.misc.canvasPadding;\n\n // outer radius is either specified (e.g. through the generator), or omitted altogether\n // and calculated based on the canvas dimensions. Right now the estimated version isn't great - it should\n // be possible to calculate it to precisely generate the maximum sized pie, but it's fussy as heck. Something\n // for the next release.\n\n // first, calculate the default _outerRadius\n var w = size.canvasWidth - canvasPadding.left - canvasPadding.right;\n var h = size.canvasHeight - canvasPadding.top - canvasPadding.bottom;\n\n // now factor in the footer, title & subtitle\n if (pie.options.header.location !== \"pie-center\") {\n h -= pie.textComponents.headerHeight;\n }\n\n if (pie.textComponents.footer.exists) {\n h -= pie.textComponents.footer.h;\n }\n\n // for really teeny pies, h may be < 0. Adjust it back\n h = (h < 0) ? 0 : h;\n\n var outerRadius = ((w < h) ? w : h) / 3;\n var innerRadius, percent;\n\n // if the user specified something, use that instead\n if (size.pieOuterRadius !== null) {\n if (/%/.test(size.pieOuterRadius)) {\n percent = parseInt(size.pieOuterRadius.replace(/[\\D]/, \"\"), 10);\n percent = (percent > 99) ? 99 : percent;\n percent = (percent < 0) ? 0 : percent;\n\n var smallestDimension = (w < h) ? w : h;\n\n // now factor in the label line size\n if (pie.options.labels.outer.format !== \"none\") {\n var pieDistanceSpace = parseInt(pie.options.labels.outer.pieDistance, 10) * 2;\n if (smallestDimension - pieDistanceSpace > 0) {\n smallestDimension -= pieDistanceSpace;\n }\n }\n\n outerRadius = Math.floor((smallestDimension / 100) * percent) / 2;\n } else {\n outerRadius = parseInt(size.pieOuterRadius, 10);\n }\n }\n\n // inner radius\n if (/%/.test(size.pieInnerRadius)) {\n percent = parseInt(size.pieInnerRadius.replace(/[\\D]/, \"\"), 10);\n percent = (percent > 99) ? 99 : percent;\n percent = (percent < 0) ? 0 : percent;\n innerRadius = Math.floor((outerRadius / 100) * percent);\n } else {\n innerRadius = parseInt(size.pieInnerRadius, 10);\n }\n\n pie.innerRadius = innerRadius;\n pie.outerRadius = outerRadius;\n },\n\n getTotalPieSize: function(data) {\n var totalSize = 0;\n for (var i=0; i<data.length; i++) {\n totalSize += data[i].value;\n }\n return totalSize;\n },\n\n sortPieData: function(pie) {\n var data = pie.options.data.content;\n var sortOrder = pie.options.data.sortOrder;\n\n switch (sortOrder) {\n case \"none\":\n // do nothing\n break;\n case \"random\":\n data = helpers.shuffleArray(data);\n break;\n case \"value-asc\":\n data.sort(function(a, b) { return (a.value < b.value) ? -1 : 1; });\n break;\n case \"value-desc\":\n data.sort(function(a, b) { return (a.value < b.value) ? 1 : -1; });\n break;\n case \"label-asc\":\n data.sort(function(a, b) { return (a.label.toLowerCase() > b.label.toLowerCase()) ? 1 : -1; });\n break;\n case \"label-desc\":\n data.sort(function(a, b) { return (a.label.toLowerCase() < b.label.toLowerCase()) ? 1 : -1; });\n break;\n }\n\n return data;\n },\n\n // var pieCenter = math.getPieCenter();\n getPieTranslateCenter: function(pieCenter) {\n return \"translate(\" + pieCenter.x + \",\" + pieCenter.y + \")\";\n },\n\n /**\n * Used to determine where on the canvas the center of the pie chart should be. It takes into account the\n * height and position of the title, subtitle and footer, and the various paddings.\n * @private\n */\n calculatePieCenter: function(pie) {\n var pieCenterOffset = pie.options.misc.pieCenterOffset;\n var hasTopTitle = (pie.textComponents.title.exists && pie.options.header.location !== \"pie-center\");\n var hasTopSubtitle = (pie.textComponents.subtitle.exists && pie.options.header.location !== \"pie-center\");\n\n var headerOffset = pie.options.misc.canvasPadding.top;\n if (hasTopTitle && hasTopSubtitle) {\n headerOffset += pie.textComponents.title.h + pie.options.header.titleSubtitlePadding + pie.textComponents.subtitle.h;\n } else if (hasTopTitle) {\n headerOffset += pie.textComponents.title.h;\n } else if (hasTopSubtitle) {\n headerOffset += pie.textComponents.subtitle.h;\n }\n\n var footerOffset = 0;\n if (pie.textComponents.footer.exists) {\n footerOffset = pie.textComponents.footer.h + pie.options.misc.canvasPadding.bottom;\n }\n\n var x = ((pie.options.size.canvasWidth - pie.options.misc.canvasPadding.left - pie.options.misc.canvasPadding.right) / 2) + pie.options.misc.canvasPadding.left;\n var y = ((pie.options.size.canvasHeight - footerOffset - headerOffset) / 2) + headerOffset;\n\n x += pieCenterOffset.x;\n y += pieCenterOffset.y;\n\n pie.pieCenter = { x: x, y: y };\n },\n\n\n /**\n * Rotates a point (x, y) around an axis (xm, ym) by degrees (a).\n * @param x\n * @param y\n * @param xm\n * @param ym\n * @param a angle in degrees\n * @returns {Array}\n */\n rotate: function(x, y, xm, ym, a) {\n\n a = a * Math.PI / 180; // convert to radians\n\n var cos = Math.cos,\n sin = Math.sin,\n // subtract midpoints, so that midpoint is translated to origin and add it in the end again\n xr = (x - xm) * cos(a) - (y - ym) * sin(a) + xm,\n yr = (x - xm) * sin(a) + (y - ym) * cos(a) + ym;\n\n return { x: xr, y: yr };\n },\n\n /**\n * Translates a point x, y by distance d, and by angle a.\n * @param x\n * @param y\n * @param dist\n * @param a angle in degrees\n */\n translate: function(x, y, d, a) {\n var rads = math.toRadians(a);\n return {\n x: x + d * Math.sin(rads),\n y: y - d * Math.cos(rads)\n };\n },\n\n // from: http://stackoverflow.com/questions/19792552/d3-put-arc-labels-in-a-pie-chart-if-there-is-enough-space\n pointIsInArc: function(pt, ptData, d3Arc) {\n // Center of the arc is assumed to be 0,0\n // (pt.x, pt.y) are assumed to be relative to the center\n var r1 = d3Arc.innerRadius()(ptData), // Note: Using the innerRadius\n r2 = d3Arc.outerRadius()(ptData),\n theta1 = d3Arc.startAngle()(ptData),\n theta2 = d3Arc.endAngle()(ptData);\n\n var dist = pt.x * pt.x + pt.y * pt.y,\n angle = Math.atan2(pt.x, -pt.y); // Note: different coordinate system\n\n angle = (angle < 0) ? (angle + Math.PI * 2) : angle;\n\n return (r1 * r1 <= dist) && (dist <= r2 * r2) &&\n (theta1 <= angle) && (angle <= theta2);\n }\n};\n\n //// --------- labels.js -----------\nvar labels = {\n\n /**\n * Adds the labels to the pie chart, but doesn't position them. There are two locations for the\n * labels: inside (center) of the segments, or outside the segments on the edge.\n * @param section \"inner\" or \"outer\"\n * @param sectionDisplayType \"percentage\", \"value\", \"label\", \"label-value1\", etc.\n * @param pie\n */\n add: function(pie, section, sectionDisplayType) {\n var include = labels.getIncludes(sectionDisplayType);\n var settings = pie.options.labels;\n\n // group the label groups (label, percentage, value) into a single element for simpler positioning\n var outerLabel = pie.svg.insert(\"g\", \".\" + pie.cssPrefix + \"labels-\" + section)\n .attr(\"class\", pie.cssPrefix + \"labels-\" + section);\n\n var labelGroup = pie.__labels[section] = outerLabel.selectAll(\".\" + pie.cssPrefix + \"labelGroup-\" + section)\n .data(pie.options.data.content)\n .enter()\n .append(\"g\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"labelGroup\" + i + \"-\" + section; })\n .attr(\"data-index\", function(d, i) { return i; })\n .attr(\"class\", pie.cssPrefix + \"labelGroup-\" + section)\n .style(\"opacity\", 0);\n\n var formatterContext = { section: section, sectionDisplayType: sectionDisplayType };\n\n // 1. Add the main label\n if (include.mainLabel) {\n labelGroup.append(\"text\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segmentMainLabel\" + i + \"-\" + section; })\n .attr(\"class\", pie.cssPrefix + \"segmentMainLabel-\" + section)\n .text(function(d, i) {\n var str = d.label;\n\n // if a custom formatter has been defined, pass it the raw label string - it can do whatever it wants with it.\n // we only apply truncation if it's not defined\n if (settings.formatter) {\n formatterContext.index = i;\n formatterContext.part = 'mainLabel';\n formatterContext.value = d.value;\n formatterContext.label = str;\n str = settings.formatter(formatterContext);\n } else if (settings.truncation.enabled && d.label.length > settings.truncation.truncateLength) {\n str = d.label.substring(0, settings.truncation.truncateLength) + \"...\";\n }\n return str;\n })\n .style(\"font-size\", settings.mainLabel.fontSize + \"px\")\n .style(\"font-family\", settings.mainLabel.font)\n .style(\"font-weight\", settings.mainLabel.fontWeight)\n .style(\"fill\", function(d, i) {\n return (settings.mainLabel.color === \"segment\") ? pie.options.colors[i] : settings.mainLabel.color;\n });\n }\n\n // 2. Add the percentage label\n if (include.percentage) {\n labelGroup.append(\"text\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segmentPercentage\" + i + \"-\" + section; })\n .attr(\"class\", pie.cssPrefix + \"segmentPercentage-\" + section)\n .text(function(d, i) {\n var percentage = d.percentage;\n if (settings.formatter) {\n formatterContext.index = i;\n formatterContext.part = \"percentage\";\n formatterContext.value = d.value;\n formatterContext.label = d.percentage;\n percentage = settings.formatter(formatterContext);\n } else {\n percentage += \"%\";\n }\n return percentage;\n })\n .style(\"font-size\", settings.percentage.fontSize + \"px\")\n .style(\"font-family\", settings.percentage.font)\n .style(\"font-weight\", settings.percentage.fontWeight)\n .style(\"fill\", settings.percentage.color);\n }\n\n // 3. Add the value label\n if (include.value) {\n labelGroup.append(\"text\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segmentValue\" + i + \"-\" + section; })\n .attr(\"class\", pie.cssPrefix + \"segmentValue-\" + section)\n .text(function(d, i) {\n formatterContext.index = i;\n formatterContext.part = \"value\";\n formatterContext.value = d.value;\n formatterContext.label = d.value;\n return settings.formatter ? settings.formatter(formatterContext, d.value) : d.value;\n })\n .style(\"font-size\", settings.value.fontSize + \"px\")\n .style(\"font-family\", settings.value.font)\n .style(\"font-weight\", settings.value.fontWeight)\n .style(\"fill\", settings.value.color);\n }\n },\n\n /**\n * @param section \"inner\" / \"outer\"\n */\n positionLabelElements: function(pie, section, sectionDisplayType) {\n labels[\"dimensions-\" + section] = [];\n\n // get the latest widths, heights\n var labelGroups = pie.__labels[section];\n labelGroups.each(function(d, i) {\n var mainLabel = d3.select(this).selectAll(\".\" + pie.cssPrefix + \"segmentMainLabel-\" + section);\n var percentage = d3.select(this).selectAll(\".\" + pie.cssPrefix + \"segmentPercentage-\" + section);\n var value = d3.select(this).selectAll(\".\" + pie.cssPrefix + \"segmentValue-\" + section);\n\n labels[\"dimensions-\" + section].push({\n mainLabel: (mainLabel.node() !== null) ? mainLabel.node().getBBox() : null,\n percentage: (percentage.node() !== null) ? percentage.node().getBBox() : null,\n value: (value.node() !== null) ? value.node().getBBox() : null\n });\n });\n\n var singleLinePad = 5;\n var dims = labels[\"dimensions-\" + section];\n switch (sectionDisplayType) {\n case \"label-value1\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentValue-\" + section)\n .attr(\"dx\", function(d, i) { return dims[i].mainLabel.width + singleLinePad; });\n break;\n case \"label-value2\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentValue-\" + section)\n .attr(\"dy\", function(d, i) { return dims[i].mainLabel.height; });\n break;\n case \"label-percentage1\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentPercentage-\" + section)\n .attr(\"dx\", function(d, i) { return dims[i].mainLabel.width + singleLinePad; });\n break;\n case \"label-percentage2\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentPercentage-\" + section)\n .attr(\"dx\", function(d, i) { return (dims[i].mainLabel.width / 2) - (dims[i].percentage.width / 2); })\n .attr(\"dy\", function(d, i) { return dims[i].mainLabel.height; });\n break;\n }\n },\n\n computeLabelLinePositions: function(pie) {\n pie.lineCoordGroups = [];\n pie.__labels.outer\n .each(function(d, i) { return labels.computeLinePosition(pie, i); });\n },\n\n computeLinePosition: function(pie, i) {\n var angle = segments.getSegmentAngle(i, pie.options.data.content, pie.totalSize, { midpoint: true });\n var originCoords = math.rotate(pie.pieCenter.x, pie.pieCenter.y - pie.outerRadius, pie.pieCenter.x, pie.pieCenter.y, angle);\n var heightOffset = pie.outerLabelGroupData[i].h / 5; // TODO check\n var labelXMargin = 6; // the x-distance of the label from the end of the line [TODO configurable]\n\n var quarter = Math.floor(angle / 90);\n var midPoint = 4;\n var x2, y2, x3, y3;\n\n // this resolves an issue when the\n if (quarter === 2 && angle === 180) {\n quarter = 1;\n }\n\n switch (quarter) {\n case 0:\n x2 = pie.outerLabelGroupData[i].x - labelXMargin - ((pie.outerLabelGroupData[i].x - labelXMargin - originCoords.x) / 2);\n y2 = pie.outerLabelGroupData[i].y + ((originCoords.y - pie.outerLabelGroupData[i].y) / midPoint);\n x3 = pie.outerLabelGroupData[i].x - labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n case 1:\n x2 = originCoords.x + (pie.outerLabelGroupData[i].x - originCoords.x) / midPoint;\n y2 = originCoords.y + (pie.outerLabelGroupData[i].y - originCoords.y) / midPoint;\n x3 = pie.outerLabelGroupData[i].x - labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n case 2:\n var startOfLabelX = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n x2 = originCoords.x - (originCoords.x - startOfLabelX) / midPoint;\n y2 = originCoords.y + (pie.outerLabelGroupData[i].y - originCoords.y) / midPoint;\n x3 = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n case 3:\n var startOfLabel = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n x2 = startOfLabel + ((originCoords.x - startOfLabel) / midPoint);\n y2 = pie.outerLabelGroupData[i].y + (originCoords.y - pie.outerLabelGroupData[i].y) / midPoint;\n x3 = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n }\n\n /*\n * x1 / y1: the x/y coords of the start of the line, at the mid point of the segments arc on the pie circumference\n * x2 / y2: if \"curved\" line style is being used, this is the midpoint of the line. Other\n * x3 / y3: the end of the line; closest point to the label\n */\n if (pie.options.labels.lines.style === \"straight\") {\n pie.lineCoordGroups[i] = [\n { x: originCoords.x, y: originCoords.y },\n { x: x3, y: y3 }\n ];\n } else {\n pie.lineCoordGroups[i] = [\n { x: originCoords.x, y: originCoords.y },\n { x: x2, y: y2 },\n { x: x3, y: y3 }\n ];\n }\n },\n\n addLabelLines: function(pie) {\n var lineGroups = pie.svg.insert(\"g\", \".\" + pie.cssPrefix + \"pieChart\") // meaning, BEFORE .pieChart\n .attr(\"class\", pie.cssPrefix + \"lineGroups\")\n .style(\"opacity\", 1);\n\n var lineGroup = lineGroups.selectAll(\".\" + pie.cssPrefix + \"lineGroup\")\n .data(pie.lineCoordGroups)\n .enter()\n .append(\"g\")\n .attr(\"class\", pie.cssPrefix + \"lineGroup\");\n\n var lineFunction = d3.line()\n .curve(d3.curveBasis)\n .x(function(d) { return d.x; })\n .y(function(d) { return d.y; });\n\n lineGroup.append(\"path\")\n .attr(\"d\", lineFunction)\n .attr(\"stroke\", function(d, i) {\n return (pie.options.labels.lines.color === \"segment\") ? pie.options.colors[i] : pie.options.labels.lines.color;\n })\n .attr(\"stroke-width\", 1)\n .attr(\"fill\", \"none\")\n .style(\"opacity\", function(d, i) {\n var percentage = pie.options.labels.outer.hideWhenLessThanPercentage;\n var isHidden = (percentage !== null && d.percentage < percentage) || pie.options.data.content[i].label === \"\";\n return isHidden ? 0 : 1;\n });\n },\n\n positionLabelGroups: function(pie, section) {\n if (pie.options.labels[section].format === \"none\")\n return;\n\n pie.__labels[section]\n .style(\"opacity\", function(d, i) {\n var percentage = pie.options.labels[section].hideWhenLessThanPercentage;\n return (percentage !== null && d.percentage < percentage) ? 0 : 1;\n })\n .attr(\"transform\", function(d, i) {\n var x, y;\n if (section === \"outer\") {\n x = pie.outerLabelGroupData[i].x;\n y = pie.outerLabelGroupData[i].y;\n } else {\n var pieCenterCopy = extend(true, {}, pie.pieCenter);\n\n // now recompute the \"center\" based on the current _innerRadius\n if (pie.innerRadius > 0) {\n var angle = segments.getSegmentAngle(i, pie.options.data.content, pie.totalSize, { midpoint: true });\n var newCoords = math.translate(pie.pieCenter.x, pie.pieCenter.y, pie.innerRadius, angle);\n pieCenterCopy.x = newCoords.x;\n pieCenterCopy.y = newCoords.y;\n }\n\n var dims = helpers.getDimensions(pie.cssPrefix + \"labelGroup\" + i + \"-inner\");\n var xOffset = dims.w / 2;\n var yOffset = dims.h / 4; // confusing! Why 4? should be 2, but it doesn't look right\n\n x = pieCenterCopy.x + (pie.lineCoordGroups[i][0].x - pieCenterCopy.x) / 1.8;\n y = pieCenterCopy.y + (pie.lineCoordGroups[i][0].y - pieCenterCopy.y) / 1.8;\n\n x = x - xOffset;\n y = y + yOffset;\n }\n\n return \"translate(\" + x + \",\" + y + \")\";\n });\n },\n\n\n getIncludes: function(val) {\n var addMainLabel = false;\n var addValue = false;\n var addPercentage = false;\n\n switch (val) {\n case \"label\":\n addMainLabel = true;\n break;\n case \"value\":\n addValue = true;\n break;\n case \"percentage\":\n addPercentage = true;\n break;\n case \"label-value1\":\n case \"label-value2\":\n addMainLabel = true;\n addValue = true;\n break;\n case \"label-percentage1\":\n case \"label-percentage2\":\n addMainLabel = true;\n addPercentage = true;\n break;\n }\n return {\n mainLabel: addMainLabel,\n value: addValue,\n percentage: addPercentage\n };\n },\n\n\n /**\n * This does the heavy-lifting to compute the actual coordinates for the outer label groups. It does two things:\n * 1. Make a first pass and position them in the ideal positions, based on the pie sizes\n * 2. Do some basic collision avoidance.\n */\n computeOuterLabelCoords: function(pie) {\n\n // 1. figure out the ideal positions for the outer labels\n pie.__labels.outer\n .each(function(d, i) {\n return labels.getIdealOuterLabelPositions(pie, i);\n });\n\n // 2. now adjust those positions to try to accommodate conflicts\n labels.resolveOuterLabelCollisions(pie);\n },\n\n /**\n * This attempts to resolve label positioning collisions.\n */\n resolveOuterLabelCollisions: function(pie) {\n if (pie.options.labels.outer.format === \"none\") {\n return;\n }\n\n var size = pie.options.data.content.length;\n labels.checkConflict(pie, 0, \"clockwise\", size);\n labels.checkConflict(pie, size-1, \"anticlockwise\", size);\n },\n\n checkConflict: function(pie, currIndex, direction, size) {\n var i, curr;\n\n if (size <= 1) {\n return;\n }\n\n var currIndexHemisphere = pie.outerLabelGroupData[currIndex].hs;\n if (direction === \"clockwise\" && currIndexHemisphere !== \"right\") {\n return;\n }\n if (direction === \"anticlockwise\" && currIndexHemisphere !== \"left\") {\n return;\n }\n var nextIndex = (direction === \"clockwise\") ? currIndex+1 : currIndex-1;\n\n // this is the current label group being looked at. We KNOW it's positioned properly (the first item\n // is always correct)\n var currLabelGroup = pie.outerLabelGroupData[currIndex];\n\n // this one we don't know about. That's the one we're going to look at and move if necessary\n var examinedLabelGroup = pie.outerLabelGroupData[nextIndex];\n\n var info = {\n labelHeights: pie.outerLabelGroupData[0].h,\n center: pie.pieCenter,\n lineLength: (pie.outerRadius + pie.options.labels.outer.pieDistance),\n heightChange: pie.outerLabelGroupData[0].h + 1 // 1 = padding\n };\n\n // loop through *ALL* label groups examined so far to check for conflicts. This is because when they're\n // very tightly fitted, a later label group may still appear high up on the page\n if (direction === \"clockwise\") {\n i = 0;\n for (; i<=currIndex; i++) {\n curr = pie.outerLabelGroupData[i];\n\n // if there's a conflict with this label group, shift the label to be AFTER the last known\n // one that's been properly placed\n if (!labels.isLabelHidden(pie, i) && helpers.rectIntersect(curr, examinedLabelGroup)) {\n labels.adjustLabelPos(pie, nextIndex, currLabelGroup, info);\n break;\n }\n }\n } else {\n i = size - 1;\n for (; i >= currIndex; i--) {\n curr = pie.outerLabelGroupData[i];\n\n // if there's a conflict with this label group, shift the label to be AFTER the last known\n // one that's been properly placed\n if (!labels.isLabelHidden(pie, i) && helpers.rectIntersect(curr, examinedLabelGroup)) {\n labels.adjustLabelPos(pie, nextIndex, currLabelGroup, info);\n break;\n }\n }\n }\n labels.checkConflict(pie, nextIndex, direction, size);\n },\n\n isLabelHidden: function(pie, index) {\n var percentage = pie.options.labels.outer.hideWhenLessThanPercentage;\n return (percentage !== null && d.percentage < percentage) || pie.options.data.content[index].label === \"\";\n },\n\n // does a little math to shift a label into a new position based on the last properly placed one\n adjustLabelPos: function(pie, nextIndex, lastCorrectlyPositionedLabel, info) {\n var xDiff, yDiff, newXPos, newYPos;\n newYPos = lastCorrectlyPositionedLabel.y + info.heightChange;\n yDiff = info.center.y - newYPos;\n\n if (Math.abs(info.lineLength) > Math.abs(yDiff)) {\n xDiff = Math.sqrt((info.lineLength * info.lineLength) - (yDiff * yDiff));\n } else {\n xDiff = Math.sqrt((yDiff * yDiff) - (info.lineLength * info.lineLength));\n }\n\n if (lastCorrectlyPositionedLabel.hs === \"right\") {\n newXPos = info.center.x + xDiff;\n } else {\n newXPos = info.center.x - xDiff - pie.outerLabelGroupData[nextIndex].w;\n }\n\n pie.outerLabelGroupData[nextIndex].x = newXPos;\n pie.outerLabelGroupData[nextIndex].y = newYPos;\n },\n\n /**\n * @param i 0-N where N is the dataset size - 1.\n */\n getIdealOuterLabelPositions: function(pie, i) {\n var labelGroupNode = pie.svg.select(\"#\" + pie.cssPrefix + \"labelGroup\" + i + \"-outer\").node();\n if (!labelGroupNode) return;\n\n var labelGroupDims = labelGroupNode.getBBox();\n var angle = segments.getSegmentAngle(i, pie.options.data.content, pie.totalSize, { midpoint: true });\n\n var originalX = pie.pieCenter.x;\n var originalY = pie.pieCenter.y - (pie.outerRadius + pie.options.labels.outer.pieDistance);\n var newCoords = math.rotate(originalX, originalY, pie.pieCenter.x, pie.pieCenter.y, angle);\n\n // if the label is on the left half of the pie, adjust the values\n var hemisphere = \"right\"; // hemisphere\n if (angle > 180) {\n newCoords.x -= (labelGroupDims.width + 8);\n hemisphere = \"left\";\n } else {\n newCoords.x += 8;\n }\n\n pie.outerLabelGroupData[i] = {\n x: newCoords.x,\n y: newCoords.y,\n w: labelGroupDims.width,\n h: labelGroupDims.height,\n hs: hemisphere\n };\n }\n};\n\n //// --------- segments.js -----------\nvar segments = {\n\n effectMap: {\n \"none\": d3.easeLinear,\n \"bounce\": d3.easeBounce,\n \"linear\": d3.easeLinear,\n \"sin\": d3.easeSin,\n \"elastic\": d3.easeElastic,\n \"back\": d3.easeBack,\n \"quad\": d3.easeQuad,\n \"circle\": d3.easeCircle,\n \"exp\": d3.easeExp\n },\n\n /**\n * Creates the pie chart segments and displays them according to the desired load effect.\n * @private\n */\n create: function(pie) {\n var pieCenter = pie.pieCenter;\n var colors = pie.options.colors;\n var loadEffects = pie.options.effects.load;\n var segmentStroke = pie.options.misc.colors.segmentStroke;\n\n // we insert the pie chart BEFORE the title, to ensure the title overlaps the pie\n var pieChartElement = pie.svg.insert(\"g\", \"#\" + pie.cssPrefix + \"title\")\n .attr(\"transform\", function() { return math.getPieTranslateCenter(pieCenter); })\n .attr(\"class\", pie.cssPrefix + \"pieChart\");\n\n var arc = d3.arc()\n .innerRadius(pie.innerRadius)\n .outerRadius(pie.outerRadius)\n .startAngle(0)\n .endAngle(function(d) {\n return (d.value / pie.totalSize) * 2 * Math.PI;\n });\n\n var g = pieChartElement.selectAll(\".\" + pie.cssPrefix + \"arc\")\n .data(pie.options.data.content)\n .enter()\n .append(\"g\")\n .attr(\"class\", pie.cssPrefix + \"arc\");\n\n // if we're not fading in the pie, just set the load speed to 0\n //var loadSpeed = loadEffects.speed;\n //if (loadEffects.effect === \"none\") {\n //\tloadSpeed = 0;\n //}\n\n g.append(\"path\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segment\" + i; })\n .attr(\"fill\", function(d, i) {\n var color = colors[i];\n if (pie.options.misc.gradient.enabled) {\n color = \"url(#\" + pie.cssPrefix + \"grad\" + i + \")\";\n }\n return color;\n })\n .style(\"stroke\", segmentStroke)\n .style(\"stroke-width\", 1)\n //.transition()\n //.ease(d3.easeCubicInOut)\n //.duration(loadSpeed)\n .attr(\"data-index\", function(d, i) { return i; })\n .attr(\"d\", arc);\n/*\n .attrTween(\"d\", function(b) {\n var i = d3.interpolate({ value: 0 }, b);\n return function(t) {\n var ret = pie.arc(i(t));\n console.log(ret);\n return ret;\n };\n });\n*/\n pie.svg.selectAll(\"g.\" + pie.cssPrefix + \"arc\")\n .attr(\"transform\",\n function(d, i) {\n var angle = 0;\n if (i > 0) {\n angle = segments.getSegmentAngle(i-1, pie.options.data.content, pie.totalSize);\n }\n return \"rotate(\" + angle + \")\";\n }\n );\n pie.arc = arc;\n },\n\n addGradients: function(pie) {\n var grads = pie.svg.append(\"defs\")\n .selectAll(\"radialGradient\")\n .data(pie.options.data.content)\n .enter().append(\"radialGradient\")\n .attr(\"gradientUnits\", \"userSpaceOnUse\")\n .attr(\"cx\", 0)\n .attr(\"cy\", 0)\n .attr(\"r\", \"120%\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"grad\" + i; });\n\n grads.append(\"stop\").attr(\"offset\", \"0%\").style(\"stop-color\", function(d, i) { return pie.options.colors[i]; });\n grads.append(\"stop\").attr(\"offset\", pie.options.misc.gradient.percentage + \"%\").style(\"stop-color\", pie.options.misc.gradient.color);\n },\n\n addSegmentEventHandlers: function(pie) {\n var arc = pie.svg.selectAll(\".\" + pie.cssPrefix + \"arc\");\n arc = arc.merge(pie.__labels.inner.merge(pie.__labels.outer));\n\n arc.on(\"click\", function() {\n var currentEl = d3.select(this);\n var segment;\n\n // mouseover works on both the segments AND the segment labels, hence the following\n if (currentEl.attr(\"class\") === pie.cssPrefix + \"arc\") {\n segment = currentEl.select(\"path\");\n } else {\n var index = currentEl.attr(\"data-index\");\n segment = d3.select(\"#\" + pie.cssPrefix + \"segment\" + index);\n }\n\n var isExpanded = segment.attr(\"class\") === pie.cssPrefix + \"expanded\";\n segments.onSegmentEvent(pie, pie.options.callbacks.onClickSegment, segment, isExpanded);\n if (pie.options.effects.pullOutSegmentOnClick.effect !== \"none\") {\n if (isExpanded) {\n segments.closeSegment(pie, segment.node());\n } else {\n segments.openSegment(pie, segment.node());\n }\n }\n });\n\n arc.on(\"mouseover\", function() {\n var currentEl = d3.select(this);\n var segment, index;\n\n if (currentEl.attr(\"class\") === pie.cssPrefix + \"arc\") {\n segment = currentEl.select(\"path\");\n } else {\n index = currentEl.attr(\"data-index\");\n segment = d3.select(\"#\" + pie.cssPrefix + \"segment\" + index);\n }\n\n if (pie.options.effects.highlightSegmentOnMouseover) {\n index = segment.attr(\"data-index\");\n var segColor = pie.options.colors[index];\n segment.style(\"fill\", helpers.getColorShade(segColor, pie.options.effects.highlightLuminosity));\n }\n\n if (pie.options.tooltips.enabled) {\n index = segment.attr(\"data-index\");\n tt.showTooltip(pie, index);\n }\n\n var isExpanded = segment.attr(\"class\") === pie.cssPrefix + \"expanded\";\n segments.onSegmentEvent(pie, pie.options.callbacks.onMouseoverSegment, segment, isExpanded);\n });\n\n arc.on(\"mousemove\", function() {\n tt.moveTooltip(pie);\n });\n\n arc.on(\"mouseout\", function() {\n var currentEl = d3.select(this);\n var segment, index;\n\n if (currentEl.attr(\"class\") === pie.cssPrefix + \"arc\") {\n segment = currentEl.select(\"path\");\n } else {\n index = currentEl.attr(\"data-index\");\n segment = d3.select(\"#\" + pie.cssPrefix + \"segment\" + index);\n }\n\n if (pie.options.effects.highlightSegmentOnMouseover) {\n index = segment.attr(\"data-index\");\n var color = pie.options.colors[index];\n if (pie.options.misc.gradient.enabled) {\n color = \"url(#\" + pie.cssPrefix + \"grad\" + index + \")\";\n }\n segment.style(\"fill\", color);\n }\n\n if (pie.options.tooltips.enabled) {\n index = segment.attr(\"data-index\");\n tt.hideTooltip(pie, index);\n }\n\n var isExpanded = segment.attr(\"class\") === pie.cssPrefix + \"expanded\";\n segments.onSegmentEvent(pie, pie.options.callbacks.onMouseoutSegment, segment, isExpanded);\n });\n },\n\n // helper function used to call the click, mouseover, mouseout segment callback functions\n onSegmentEvent: function(pie, func, segment, isExpanded) {\n if (!helpers.isFunction(func)) {\n return;\n }\n var index = parseInt(segment.attr(\"data-index\"), 10);\n func({\n segment: segment.node(),\n index: index,\n expanded: isExpanded,\n data: pie.options.data.content[index]\n });\n },\n\n openSegment: function(pie, segment) {\n if (pie.isOpeningSegment) {\n return;\n }\n pie.isOpeningSegment = true;\n\n segments.maybeCloseOpenSegment(pie);\n\n d3.select(segment)\n .transition()\n .ease(segments.effectMap[pie.options.effects.pullOutSegmentOnClick.effect])\n .duration(pie.options.effects.pullOutSegmentOnClick.speed)\n .attr(\"transform\", function(d, i) {\n var c = pie.arc.centroid(d),\n x = c[0],\n y = c[1],\n h = Math.sqrt(x*x + y*y),\n pullOutSize = parseInt(pie.options.effects.pullOutSegmentOnClick.size, 10);\n\n return \"translate(\" + ((x/h) * pullOutSize) + ',' + ((y/h) * pullOutSize) + \")\";\n })\n .on(\"end\", function(d, i) {\n pie.currentlyOpenSegment = segment;\n pie.isOpeningSegment = false;\n d3.select(segment).attr(\"class\", pie.cssPrefix + \"expanded\");\n });\n },\n\n maybeCloseOpenSegment: function(pie) {\n if (typeof pie !== 'undefined' && pie.svg.selectAll(\".\" + pie.cssPrefix + \"expanded\").size() > 0) {\n segments.closeSegment(pie, pie.svg.select(\".\" + pie.cssPrefix + \"expanded\").node());\n }\n },\n\n closeSegment: function(pie, segment) {\n d3.select(segment)\n .transition()\n .duration(400)\n .attr(\"transform\", \"translate(0,0)\")\n .on(\"end\", function(d, i) {\n d3.select(segment).attr(\"class\", \"\");\n pie.currentlyOpenSegment = null;\n });\n },\n\n getCentroid: function(el) {\n var bbox = el.getBBox();\n return {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n },\n\n /**\n * General helper function to return a segment's angle, in various different ways.\n * @param index\n * @param opts optional object for fine-tuning exactly what you want.\n */\n getSegmentAngle: function(index, data, totalSize, opts) {\n var options = extend({\n // if true, this returns the full angle from the origin. Otherwise it returns the single segment angle\n compounded: true,\n\n // optionally returns the midpoint of the angle instead of the full angle\n midpoint: false\n }, opts);\n\n var currValue = data[index].value;\n var fullValue;\n if (options.compounded) {\n fullValue = 0;\n\n // get all values up to and including the specified index\n for (var i=0; i<=index; i++) {\n fullValue += data[i].value;\n }\n }\n\n if (typeof fullValue === 'undefined') {\n fullValue = currValue;\n }\n\n // now convert the full value to an angle\n var angle = (fullValue / totalSize) * 360;\n\n // lastly, if we want the midpoint, factor that sucker in\n if (options.midpoint) {\n var currAngle = (currValue / totalSize) * 360;\n angle -= (currAngle / 2);\n }\n\n return angle;\n }\n\n};\n\n //// --------- text.js -----------\nvar text = {\n offscreenCoord: -10000,\n\n addTitle: function(pie) {\n pie.__title = pie.svg.selectAll(\".\" + pie.cssPrefix + \"title\")\n .data([pie.options.header.title])\n .enter()\n .append(\"text\")\n .text(function(d) { return d.text; })\n .attr(\"id\", pie.cssPrefix + \"title\")\n .attr(\"class\", pie.cssPrefix + \"title\")\n .attr(\"x\", text.offscreenCoord)\n .attr(\"y\", text.offscreenCoord)\n .attr(\"text-anchor\", function() {\n var location;\n if (pie.options.header.location === \"top-center\" || pie.options.header.location === \"pie-center\") {\n location = \"middle\";\n } else {\n location = \"left\";\n }\n return location;\n })\n .attr(\"fill\", function(d) { return d.color; })\n .style(\"font-size\", function(d) { return d.fontSize + \"px\"; })\n .style(\"font-weight\", function(d) { return d.fontWeight; })\n .style(\"font-family\", function(d) { return d.font; });\n },\n\n positionTitle: function(pie) {\n var textComponents = pie.textComponents;\n var headerLocation = pie.options.header.location;\n var canvasPadding = pie.options.misc.canvasPadding;\n var canvasWidth = pie.options.size.canvasWidth;\n var titleSubtitlePadding = pie.options.header.titleSubtitlePadding;\n\n var x;\n if (headerLocation === \"top-left\") {\n x = canvasPadding.left;\n } else {\n x = ((canvasWidth - canvasPadding.right) / 2) + canvasPadding.left;\n }\n\n // add whatever offset has been added by user\n x += pie.options.misc.pieCenterOffset.x;\n\n var y = canvasPadding.top + textComponents.title.h;\n\n if (headerLocation === \"pie-center\") {\n y = pie.pieCenter.y;\n\n // still not fully correct\n if (textComponents.subtitle.exists) {\n var totalTitleHeight = textComponents.title.h + titleSubtitlePadding + textComponents.subtitle.h;\n y = y - (totalTitleHeight / 2) + textComponents.title.h;\n } else {\n y += (textComponents.title.h / 4);\n }\n }\n\n pie.__title\n .attr(\"x\", x)\n .attr(\"y\", y);\n },\n\n addSubtitle: function(pie) {\n var headerLocation = pie.options.header.location;\n\n pie.__subtitle = pie.svg.selectAll(\".\" + pie.cssPrefix + \"subtitle\")\n .data([pie.options.header.subtitle])\n .enter()\n .append(\"text\")\n .text(function(d) { return d.text; })\n .attr(\"x\", text.offscreenCoord)\n .attr(\"y\", text.offscreenCoord)\n .attr(\"id\", pie.cssPrefix + \"subtitle\")\n .attr(\"class\", pie.cssPrefix + \"subtitle\")\n .attr(\"text-anchor\", function() {\n var location;\n if (headerLocation === \"top-center\" || headerLocation === \"pie-center\") {\n location = \"middle\";\n } else {\n location = \"left\";\n }\n return location;\n })\n .attr(\"fill\", function(d) { return d.color; })\n .style(\"font-size\", function(d) { return d.fontSize + \"px\"; })\n .style(\"font-weight\", function(d) { return d.fontWeight; })\n .style(\"font-family\", function(d) { return d.font; });\n },\n\n positionSubtitle: function(pie) {\n var canvasPadding = pie.options.misc.canvasPadding;\n var canvasWidth = pie.options.size.canvasWidth;\n\n var x;\n if (pie.options.header.location === \"top-left\") {\n x = canvasPadding.left;\n } else {\n x = ((canvasWidth - canvasPadding.right) / 2) + canvasPadding.left;\n }\n\n // add whatever offset has been added by user\n x += pie.options.misc.pieCenterOffset.x;\n\n var y = text.getHeaderHeight(pie);\n\n pie.__subtitle\n .attr(\"x\", x)\n .attr(\"y\", y);\n },\n\n addFooter: function(pie) {\n pie.__footer = pie.svg.selectAll(\".\" + pie.cssPrefix + \"footer\")\n .data([pie.options.footer])\n .enter()\n .append(\"text\")\n .text(function(d) { return d.text; })\n .attr(\"x\", text.offscreenCoord)\n .attr(\"y\", text.offscreenCoord)\n .attr(\"id\", pie.cssPrefix + \"footer\")\n .attr(\"class\", pie.cssPrefix + \"footer\")\n .attr(\"text-anchor\", function() {\n var location = \"left\";\n if (pie.options.footer.location === \"bottom-center\") {\n location = \"middle\";\n } else if (pie.options.footer.location === \"bottom-right\") {\n location = \"left\"; // on purpose. We have to change the x-coord to make it properly right-aligned\n }\n return location;\n })\n .attr(\"fill\", function(d) { return d.color; })\n .style(\"font-size\", function(d) { return d.fontSize + \"px\"; })\n .style(\"font-weight\", function(d) { return d.fontWeight; })\n .style(\"font-family\", function(d) { return d.font; });\n },\n\n positionFooter: function(pie) {\n var footerLocation = pie.options.footer.location;\n var footerWidth = pie.textComponents.footer.w;\n var canvasWidth = pie.options.size.canvasWidth;\n var canvasHeight = pie.options.size.canvasHeight;\n var canvasPadding = pie.options.misc.canvasPadding;\n\n var x;\n if (footerLocation === \"bottom-left\") {\n x = canvasPadding.left;\n } else if (footerLocation === \"bottom-right\") {\n x = canvasWidth - footerWidth - canvasPadding.right;\n } else {\n x = canvasWidth / 2; // TODO - shouldn't this also take into account padding?\n }\n\n pie.__footer\n .attr(\"x\", x)\n .attr(\"y\", canvasHeight - canvasPadding.bottom);\n },\n\n getHeaderHeight: function(pie) {\n var h;\n if (pie.textComponents.title.exists) {\n\n // if the subtitle isn't defined, it'll be set to 0\n var totalTitleHeight = pie.textComponents.title.h + pie.options.header.titleSubtitlePadding + pie.textComponents.subtitle.h;\n if (pie.options.header.location === \"pie-center\") {\n h = pie.pieCenter.y - (totalTitleHeight / 2) + totalTitleHeight;\n } else {\n h = totalTitleHeight + pie.options.misc.canvasPadding.top;\n }\n } else {\n if (pie.options.header.location === \"pie-center\") {\n var footerPlusPadding = pie.options.misc.canvasPadding.bottom + pie.textComponents.footer.h;\n h = ((pie.options.size.canvasHeight - footerPlusPadding) / 2) + pie.options.misc.canvasPadding.top + (pie.textComponents.subtitle.h / 2);\n } else {\n h = pie.options.misc.canvasPadding.top + pie.textComponents.subtitle.h;\n }\n }\n return h;\n }\n};\n\n //// --------- validate.js -----------\nvar tt = {\n addTooltips: function(pie) {\n\n // group the label groups (label, percentage, value) into a single element for simpler positioning\n var tooltips = pie.svg.insert(\"g\")\n .attr(\"class\", pie.cssPrefix + \"tooltips\");\n\n tooltips.selectAll(\".\" + pie.cssPrefix + \"tooltip\")\n .data(pie.options.data.content)\n .enter()\n .append(\"g\")\n .attr(\"class\", pie.cssPrefix + \"tooltip\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"tooltip\" + i; })\n .style(\"opacity\", 0)\n .append(\"rect\")\n .attr(\"rx\", pie.options.tooltips.styles.borderRadius)\n .attr(\"ry\", pie.options.tooltips.styles.borderRadius)\n .attr(\"x\", -pie.options.tooltips.styles.padding)\n .attr(\"opacity\", pie.options.tooltips.styles.backgroundOpacity)\n .style(\"fill\", pie.options.tooltips.styles.backgroundColor);\n\n tooltips.selectAll(\".\" + pie.cssPrefix + \"tooltip\")\n .data(pie.options.data.content)\n .append(\"text\")\n .attr(\"fill\", function(d) { return pie.options.tooltips.styles.color; })\n .style(\"font-size\", function(d) { return pie.options.tooltips.styles.fontSize; })\n .style(\"font-weight\", function(d) { return pie.options.tooltips.styles.fontWeight; })\n .style(\"font-family\", function(d) { return pie.options.tooltips.styles.font; })\n .text(function(d, i) {\n var caption = pie.options.tooltips.string;\n if (pie.options.tooltips.type === \"caption\") {\n caption = d.caption;\n }\n return tt.replacePlaceholders(pie, caption, i, {\n label: d.label,\n value: d.value,\n percentage: d.percentage\n });\n });\n\n tooltips.selectAll(\".\" + pie.cssPrefix + \"tooltip rect\")\n .attr(\"width\", function (d, i) {\n var dims = helpers.getDimensions(pie.cssPrefix + \"tooltip\" + i);\n return dims.w + (2 * pie.options.tooltips.styles.padding);\n })\n .attr(\"height\", function (d, i) {\n var dims = helpers.getDimensions(pie.cssPrefix + \"tooltip\" + i);\n return dims.h + (2 * pie.options.tooltips.styles.padding);\n })\n .attr(\"y\", function (d, i) {\n var dims = helpers.getDimensions(pie.cssPrefix + \"tooltip\" + i);\n return -(dims.h / 2) + 1;\n });\n },\n\n showTooltip: function(pie, index) {\n var fadeInSpeed = pie.options.tooltips.styles.fadeInSpeed;\n if (tt.currentTooltip === index) {\n fadeInSpeed = 1;\n }\n\n tt.currentTooltip = index;\n d3.select(\"#\" + pie.cssPrefix + \"tooltip\" + index)\n .transition()\n .duration(fadeInSpeed)\n .style(\"opacity\", function() { return 1; });\n\n tt.moveTooltip(pie);\n },\n\n moveTooltip: function(pie) {\n d3.selectAll(\"#\" + pie.cssPrefix + \"tooltip\" + tt.currentTooltip)\n .attr(\"transform\", function(d) {\n var mouseCoords = d3.mouse(this.parentNode);\n var x = mouseCoords[0] + pie.options.tooltips.styles.padding + 2;\n var y = mouseCoords[1] - (2 * pie.options.tooltips.styles.padding) - 2;\n return \"translate(\" + x + \",\" + y + \")\";\n });\n },\n\n hideTooltip: function(pie, index) {\n d3.select(\"#\" + pie.cssPrefix + \"tooltip\" + index)\n .style(\"opacity\", function() { return 0; });\n\n // move the tooltip offscreen. This ensures that when the user next mouseovers the segment the hidden\n // element won't interfere\n d3.select(\"#\" + pie.cssPrefix + \"tooltip\" + tt.currentTooltip)\n .attr(\"transform\", function(d, i) {\n // klutzy, but it accounts for tooltip padding which could push it onscreen\n var x = pie.options.size.canvasWidth + 1000;\n var y = pie.options.size.canvasHeight + 1000;\n return \"translate(\" + x + \",\" + y + \")\";\n });\n },\n\n replacePlaceholders: function(pie, str, index, replacements) {\n\n // if the user has defined a placeholderParser function, call it before doing the replacements\n if (helpers.isFunction(pie.options.tooltips.placeholderParser)) {\n pie.options.tooltips.placeholderParser(index, replacements);\n }\n\n var replacer = function() {\n return function(match) {\n var placeholder = arguments[1];\n if (replacements.hasOwnProperty(placeholder)) {\n return replacements[arguments[1]];\n } else {\n return arguments[0];\n }\n };\n };\n return str.replace(/\\{(\\w+)\\}/g, replacer(replacements));\n }\n};\n\n\n // --------------------------------------------------------------------------------------------\n\n // our constructor\n var d3pie = function(element, options) {\n\n // element can be an ID or DOM element\n this.element = element;\n if (typeof element === \"string\") {\n var el = element.replace(/^#/, \"\"); // replace any jQuery-like ID hash char\n this.element = document.getElementById(el);\n }\n\n var opts = {};\n extend(true, opts, defaultSettings, options);\n this.options = opts;\n\n // if the user specified a custom CSS element prefix (ID, class), use it\n if (this.options.misc.cssPrefix !== null) {\n this.cssPrefix = this.options.misc.cssPrefix;\n } else {\n this.cssPrefix = \"p\" + _uniqueIDCounter + \"_\";\n _uniqueIDCounter++;\n }\n\n\n // now run some validation on the user-defined info\n if (!validate.initialCheck(this)) {\n return;\n }\n\n // add a data-role to the DOM node to let anyone know that it contains a d3pie instance, and the d3pie version\n d3.select(this.element).attr(_scriptName, _version);\n\n // things that are done once\n _setupData.call(this);\n _init.call(this);\n };\n\n d3pie.prototype.recreate = function() {\n // now run some validation on the user-defined info\n if (!validate.initialCheck(this)) {\n return;\n }\n\n _setupData.call(this);\n _init.call(this);\n };\n\n d3pie.prototype.redraw = function() {\n this.element.innerHTML = \"\";\n _init.call(this);\n };\n\n d3pie.prototype.destroy = function() {\n this.element.innerHTML = \"\"; // clear out the SVG\n d3.select(this.element).attr(_scriptName, null); // remove the data attr\n };\n\n /**\n * Returns all pertinent info about the current open info. Returns null if nothing's open, or if one is, an object of\n * the following form:\n * \t{\n * \t element: DOM NODE,\n * \t index: N,\n * \t data: {}\n * \t}\n */\n d3pie.prototype.getOpenSegment = function() {\n var segment = this.currentlyOpenSegment;\n if (segment !== null && typeof segment !== \"undefined\") {\n var index = parseInt(d3.select(segment).attr(\"data-index\"), 10);\n return {\n element: segment,\n index: index,\n data: this.options.data.content[index]\n };\n } else {\n return null;\n }\n };\n\n d3pie.prototype.openSegment = function(index) {\n index = parseInt(index, 10);\n if (index < 0 || index > this.options.data.content.length-1) {\n return;\n }\n segments.openSegment(this, d3.select(\"#\" + this.cssPrefix + \"segment\" + index).node());\n };\n\n d3pie.prototype.closeSegment = function() {\n segments.maybeCloseOpenSegment(this);\n };\n\n // this let's the user dynamically update aspects of the pie chart without causing a complete redraw. It\n // intelligently re-renders only the part of the pie that the user specifies. Some things cause a repaint, others\n // just redraw the single element\n d3pie.prototype.updateProp = function(propKey, value) {\n switch (propKey) {\n case \"header.title.text\":\n var oldVal = helpers.processObj(this.options, propKey);\n helpers.processObj(this.options, propKey, value);\n d3.select(\"#\" + this.cssPrefix + \"title\").html(value);\n if ((oldVal === \"\" && value !== \"\") || (oldVal !== \"\" && value === \"\")) {\n this.redraw();\n }\n break;\n\n case \"header.subtitle.text\":\n var oldValue = helpers.processObj(this.options, propKey);\n helpers.processObj(this.options, propKey, value);\n d3.select(\"#\" + this.cssPrefix + \"subtitle\").html(value);\n if ((oldValue === \"\" && value !== \"\") || (oldValue !== \"\" && value === \"\")) {\n this.redraw();\n }\n break;\n\n case \"callbacks.onload\":\n case \"callbacks.onMouseoverSegment\":\n case \"callbacks.onMouseoutSegment\":\n case \"callbacks.onClickSegment\":\n case \"effects.pullOutSegmentOnClick.effect\":\n case \"effects.pullOutSegmentOnClick.speed\":\n case \"effects.pullOutSegmentOnClick.size\":\n case \"effects.highlightSegmentOnMouseover\":\n case \"effects.highlightLuminosity\":\n helpers.processObj(this.options, propKey, value);\n break;\n\n // everything else, attempt to update it & do a repaint\n default:\n helpers.processObj(this.options, propKey, value);\n\n this.destroy();\n this.recreate();\n break;\n }\n };\n\n\n // ------------------------------------------------------------------------------------------------\n\n var _setupData = function () {\n this.options.data.content = math.sortPieData(this);\n if (this.options.data.smallSegmentGrouping.enabled) {\n this.options.data.content = helpers.applySmallSegmentGrouping(this.options.data.content, this.options.data.smallSegmentGrouping);\n }\n\n\n this.options.colors = helpers.initSegmentColors(this);\n this.totalSize = math.getTotalPieSize(this.options.data.content);\n\n var dp = this.options.labels.percentage.decimalPlaces;\n\n // add in percentage data to content\n for (var i=0; i<this.options.data.content.length; i++) {\n this.options.data.content[i].percentage = _getPercentage(this.options.data.content[i].value, this.totalSize, dp);\n }\n\n // adjust the final item to ensure the percentage always adds up to precisely 100%. This is necessary\n var totalPercentage = 0;\n for (var j=0; j<this.options.data.content.length; j++) {\n if (j === this.options.data.content.length - 1) {\n this.options.data.content[j].percentage = (100 - totalPercentage).toFixed(dp);\n }\n totalPercentage += parseFloat(this.options.data.content[j].percentage);\n }\n };\n\n var _init = function() {\n\n // prep-work\n this.svg = helpers.addSVGSpace(this);\n\n // store info about the main text components as part of the d3pie object instance\n this.textComponents = {\n headerHeight: 0,\n title: {\n exists: this.options.header.title.text !== \"\",\n h: 0,\n w: 0\n },\n subtitle: {\n exists: this.options.header.subtitle.text !== \"\",\n h: 0,\n w: 0\n },\n footer: {\n exists: this.options.footer.text !== \"\",\n h: 0,\n w: 0\n }\n };\n\n this.outerLabelGroupData = [];\n\n // add the key text components offscreen (title, subtitle, footer). We need to know their widths/heights for later computation\n if (this.textComponents.title.exists) text.addTitle(this);\n if (this.textComponents.subtitle.exists) text.addSubtitle(this);\n text.addFooter(this);\n\n // console.log(this);\n\n // the footer never moves. Put it in place now\n var self = this;\n text.positionFooter(self);\n var d3 = helpers.getDimensions(self.__footer.node());\n self.textComponents.footer.h = d3.h;\n self.textComponents.footer.w = d3.w;\n\n if (self.textComponents.title.exists) {\n var d1 = helpers.getDimensions(self.__title.node());\n self.textComponents.title.h = d1.h;\n self.textComponents.title.w = d1.w;\n }\n\n if (self.textComponents.subtitle.exists) {\n var d2 = helpers.getDimensions(self.__subtitle.node());\n self.textComponents.subtitle.h = d2.h;\n self.textComponents.subtitle.w = d2.w;\n }\n\n // now compute the full header height\n if (self.textComponents.title.exists || self.textComponents.subtitle.exists) {\n var headerHeight = 0;\n if (self.textComponents.title.exists) {\n headerHeight += self.textComponents.title.h;\n if (self.textComponents.subtitle.exists) {\n headerHeight += self.options.header.titleSubtitlePadding;\n }\n }\n if (self.textComponents.subtitle.exists) {\n headerHeight += self.textComponents.subtitle.h;\n }\n self.textComponents.headerHeight = headerHeight;\n }\n\n // at this point, all main text component dimensions have been calculated\n math.computePieRadius(self);\n\n // this value is used all over the place for placing things and calculating locations. We figure it out ONCE\n // and store it as part of the object\n math.calculatePieCenter(self);\n\n // position the title and subtitle\n text.positionTitle(self);\n text.positionSubtitle(self);\n\n // now create the pie chart segments, and gradients if the user desired\n if (self.options.misc.gradient.enabled) {\n segments.addGradients(self);\n }\n segments.create(self); // also creates this.arc\n\n self.__labels = {};\n labels.add(self, \"inner\", self.options.labels.inner.format);\n labels.add(self, \"outer\", self.options.labels.outer.format);\n\n // position the label elements relatively within their individual group (label, percentage, value)\n labels.positionLabelElements(self, \"inner\", self.options.labels.inner.format);\n labels.positionLabelElements(self, \"outer\", self.options.labels.outer.format);\n labels.computeOuterLabelCoords(self);\n\n // this is (and should be) dumb. It just places the outer groups at their calculated, collision-free positions\n labels.positionLabelGroups(self, \"outer\");\n\n // we use the label line positions for many other calculations, so ALWAYS compute them\n labels.computeLabelLinePositions(self);\n\n // only add them if they're actually enabled\n if (self.options.labels.lines.enabled && self.options.labels.outer.format !== \"none\") {\n labels.addLabelLines(self);\n }\n\n labels.positionLabelGroups(self, \"inner\");\n\n if (helpers.isFunction(self.options.callbacks.onload)) {\n try {\n self.options.callbacks.onload();\n } catch (e) { }\n }\n\n // add and position the tooltips\n if (self.options.tooltips.enabled) {\n tt.addTooltips(self);\n }\n\n segments.addSegmentEventHandlers(self);\n };\n\n var _getPercentage = function(value, total, decimalPlaces) {\n var relativeAmount = value / total;\n if (decimalPlaces <= 0) {\n return Math.round(relativeAmount * 100);\n } else {\n return (relativeAmount * 100).toFixed(decimalPlaces);\n }\n };\n\n return d3pie;\n}));\n","import { equals } from \"ramda\"\n\n// we use numbers to specify time. it can be either a timestamp (ms), or a relative value in seconds\n// which is always 0 or less (0 is now, -300 is -5 minutes)\n\nexport const isTimestamp = (x: number) => x > 0\n\nexport const NETDATA_REGISTRY_SERVER = \"https://registry.my-netdata.io\"\n\nexport const MS_IN_SECOND = 1000\nexport const NODE_VIEW_DYGRAPH_TITLE_HEIGHT = 30\nexport const DEFAULT_DASHBOARD_DURATION = 5 * 60\n\nexport const getIframeSrc = (cloudBaseURL: string, path: string) => `${cloudBaseURL}/sso/v2/${path}`\nexport const utmUrlSuffix = \"&utm_source=agent&utm_medium=web\"\n\nexport const getInitialAfterFromWindow = () => {\n const div = document.getElementById(\"charts_div\")\n if (!div) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't find '.charts_div' element to calculate width\")\n return -900\n }\n // based on https://github.com/netdata/dashboard/blob/7a7b538b00f1c5a4e1550f69cb5333212bb68f95/src/main.js#L1753\n // eslint-disable-next-line max-len\n // var duration = Math.round(($(div).width() * pcent_width / 100 * data.update_every / 3) / 60) * 60;\n return -Math.round((div.getBoundingClientRect().width / 3) / 60) * 60\n}\n\nexport const SPACE_PANEL_STATE = \"space-panel-state\"\n\nexport const useNewKeysOnlyIfDifferent = <T extends {}>(\n keys: (keyof T)[], obj1: T | null, obj2: T,\n): T => {\n if (!obj1) {\n return obj2\n }\n return keys.reduce<T>((acc, key) => ({\n ...acc,\n [key]: equals(obj1[key], obj2![key]) ? obj1[key] : obj2[key],\n }), obj2)\n}\n","export * from \"./types\"\n\nexport { default as CloudConnectionStatus } from \"./cloud-connection-status\"\n","import {\n concat, cond, equals, identity, last, pipe, T,\n} from \"ramda\"\n\nimport { isDevelopmentEnv, isMainJs, isTestingEnv } from \"utils/env\"\n\n\n// this part needs to be static and should run immediately because otherwise document.currentScript\n// will be null\nconst currentScript = isTestingEnv\n ? { src: \"http://localhost:3000/some-script.js\" } // test env doesnt have document.currentScript\n : document.currentScript\n\nconst getScriptSource = () => {\n // logic based on old dashboard\n\n // http://stackoverflow.com/questions/984510/what-is-my-script-src-url\n // http://stackoverflow.com/questions/6941533/get-protocol-domain-and-port-from-url\n const script = cond([\n [Boolean, identity],\n // \"last\" typings don't work well with HTMLScriptElement\n // if document.currentScript is not available\n [T, () => last(document.getElementsByTagName(\"script\") as unknown as [HTMLScriptElement])],\n ])(currentScript)\n\n return script.src\n}\n\nexport const getPathFromScriptSource = (source: string) => {\n // match strings not containing slash, ending with `.js`, with optional suffix started by `?`\n const jsFilenameRegex = \"[^\\\\/]*\\\\.js(\\\\/?.*)?$\"\n const staticJsPath = \"/static/js\"\n return source.replace(new RegExp(jsFilenameRegex), \"\")\n .replace(staticJsPath, \"\")\n}\n\nconst getDefaultServer = () => {\n if (isDevelopmentEnv) {\n return \"http://localhost:19999\"\n }\n\n // Agent Dashboard does not need sophisticated server-detection, which is causing problems\n // when navigating through streamed nodes. Let's overwrite that setting\n if (isMainJs) {\n const pathname = window.location.pathname\n .replace(\"index.html\", \"\")\n // todo consider .replace(/[^\\/]*\\.html/, \"\") (every .html file in the url)\n .replace(\"default.html\", \"\") // for netdata demo servers\n return window.location.origin + pathname\n }\n\n const source = getScriptSource()\n return getPathFromScriptSource(source)\n}\n\n// append \"/\" at the end, if it's not already there\nexport const alwaysEndWithSlash = cond([\n [pipe(last, equals(\"/\")), identity],\n [T, (x: string) => concat(x, \"/\")], // R.__ typings don't work well\n])\n\nexport const serverDefault: string = alwaysEndWithSlash(\n window.netdataServer || getDefaultServer(),\n)\n\nexport const serverStatic: string = isDevelopmentEnv\n ? \"/\" // for localhost:3000/css/...\n : alwaysEndWithSlash(getDefaultServer()) // by default, load from netdata server\n","import { prop } from \"ramda\"\nimport { createSelector } from \"reselect\"\n\nimport { AppStateT } from \"store/app-state\"\nimport { selectChartMetadataFromChartsCall } from \"domains/global/selectors\"\n\nimport { ChartState } from \"./chart-types\"\nimport { initialSingleState } from \"./reducer\"\nimport { storeKey } from \"./constants\"\n\nexport const selectChartsState = (state: AppStateT) => state[storeKey]\nexport const selectSingleChartState = createSelector(\n selectChartsState,\n (_: unknown, { id }: { chartId?: string, id: string }) => id,\n (chartsState, id) => chartsState[id] || initialSingleState,\n)\n\nexport const selectChartData = createSelector(\n selectSingleChartState,\n (chartState) => chartState.chartData,\n)\n\nconst selectChartMetadataFromExplicitCall = createSelector(\n selectSingleChartState, prop(\"chartMetadata\"),\n)\n// dashboard.js normally fetches metadata for every individual charts, but we can prevent it\n// if metadata for ALL charts will be present in state.global (from single call)\nconst selectChartMetadata = createSelector(\n selectChartMetadataFromChartsCall,\n selectChartMetadataFromExplicitCall,\n (metadataFromAll, metadataFromSingleCall) => metadataFromAll || metadataFromSingleCall,\n)\nconst selectIsFetchingDetails = createSelector(selectSingleChartState, prop(\"isFetchingDetails\"))\n\nexport const makeSelectChartMetadataRequest = () => createSelector(\n selectChartMetadata,\n selectIsFetchingDetails,\n (chartMetadata, isFetchingDetails) => ({ chartMetadata, isFetchingDetails }),\n)\n\nexport const selectChartViewRange = createSelector(\n selectSingleChartState,\n (chartState) => chartState.viewRange,\n)\n\nexport const selectChartIsFetchingData = createSelector(\n selectSingleChartState,\n (chartState) => chartState.isFetchingData,\n)\n\nexport const selectChartFetchDataParams = createSelector(\n selectSingleChartState,\n (chartState) => chartState.fetchDataParams,\n)\n\nexport const selectResizeHeight = createSelector(\n selectSingleChartState,\n (chartState) => chartState.resizeHeight,\n)\n\nexport const selectChartPanAndZoom = createSelector(selectSingleChartState, prop(\"chartPanAndZoom\"))\n\n// count the nr of \"success\" or \"failure\" charts\nconst hasCompletedFetching = (chartState: ChartState) => chartState.isFetchDataFailure\n || Boolean(chartState.chartData) || chartState.isFetchDetailsFailure\n\nexport const selectChartsAreFetching = createSelector(selectChartsState, chartsState =>\n Object.values(chartsState).some(({ isFetchingData }) => isFetchingData)\n)\n\nexport const selectAmountOfFetchedCharts = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .reduce((acc, chartState) => acc + (hasCompletedFetching(chartState) ? 1 : 0), 0),\n)\n\nexport const selectAmountOfCharts = createSelector(\n selectChartsState,\n (chartsState) => Object.keys(chartsState).length,\n)\n\nexport const selectNameOfAnyFetchingChart = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .find((chartState) => chartState.isFetchingData)?.chartId,\n)\n\nexport const selectAmountOfSnapshotsFetched = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .reduce((acc, chartState) => acc + (chartState.snapshotData ? 1 : 0), 0),\n)\n\nexport const selectAmountOfSnapshotsFailed = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .reduce((acc, chartState) => acc + (chartState.snapshotDataIsError ? 1 : 0), 0),\n)\n","import { useMemo } from \"react\"\nimport moment from \"moment\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectTimezoneSetting, selectUTCOffsetSetting } from \"domains/global/selectors\"\n\nconst zeropad = x => {\n if (x > -10 && x < 10) {\n return `0${x.toString()}`\n }\n return x.toString()\n}\n\nexport const isSupportingDateTimeFormat = !!(Intl && Intl.DateTimeFormat && navigator.language)\n\nconst narrowToDate = d => (typeof d === \"number\" ? new Date(d) : d)\n// these are the old netdata functions\n// we fallback to these, if the new ones fail\nexport const localeDateStringNative = d => narrowToDate(d).toLocaleDateString()\nexport const localeTimeStringNative = d => narrowToDate(d).toLocaleTimeString()\nexport const xAxisTimeStringNative = d => {\n const date = narrowToDate(d)\n return `${zeropad(date.getHours())}:${zeropad(date.getMinutes())}:${zeropad(date.getSeconds())}`\n}\n\nexport const isProperTimezone = timeZone => {\n try {\n Intl.DateTimeFormat(navigator.language, {\n localeMatcher: \"best fit\",\n formatMatcher: \"best fit\",\n weekday: \"short\",\n year: \"numeric\",\n month: \"short\",\n day: \"2-digit\",\n timeZone,\n })\n } catch (e) {\n return false\n }\n return true\n}\n\nexport const getDateWithOffset = (date, offset) => moment(date).utcOffset(offset)\n\nconst getOptions = ({ long, isTime, secs, timezone }) => ({\n hourCycle: \"h23\",\n ...(isTime\n ? {}\n : long\n ? { weekday: \"short\", year: \"numeric\", month: \"short\", day: \"2-digit\" }\n : { dateStyle: \"short\" }),\n ...(isTime && {\n timeStyle: secs ? \"medium\" : \"short\",\n }),\n timeZone: timezone,\n})\n\nconst dateFormat = (date, { locale, ...options }) =>\n new Intl.DateTimeFormat(locale ?? navigator.language, getOptions(options)).format(date)\n\nconst getTimezone = timezone => (timezone !== \"\" && timezone !== \"default\" ? timezone : undefined)\n\nexport const useDateTime = () => {\n const timezone = useSelector(selectTimezoneSetting)\n const utcOffset = useSelector(selectUTCOffsetSetting)\n\n const localeDateString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? (date, options) =>\n dateFormat(date, { long: true, timezone: getTimezone(timezone), ...options })\n : localeDateStringNative\n }, [timezone])\n\n const localeTimeString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? (date, options) =>\n dateFormat(date, {\n secs: true,\n isTime: true,\n timezone: getTimezone(timezone),\n ...options,\n })\n : localeTimeStringNative\n }, [timezone])\n\n const xAxisTimeString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? date => dateFormat(date, { secs: true, isTime: true, timezone: getTimezone(timezone) })\n : xAxisTimeStringNative\n }, [timezone])\n\n const xAxisDateString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? date => dateFormat(date, { long: true, timezone: getTimezone(timezone) })\n : xAxisTimeStringNative\n }, [timezone])\n\n return {\n localeDateString,\n localeTimeString,\n xAxisDateString,\n xAxisTimeString,\n utcOffset,\n }\n}\n","import { createAction } from \"redux-act\"\nimport { ChartsMetadata } from \"domains/global/types\"\n\nimport { storeKey } from \"./constants\"\n\nexport interface startSnapshotModeAction {\n charts: ChartsMetadata\n dataPoints: number\n}\nexport const startSnapshotModeAction = createAction<startSnapshotModeAction>(\n `${storeKey}/isSnapshotModeAction`,\n)\n\nexport const stopSnapshotModeAction = createAction(`${storeKey}/stopSnapshotModeAction`)\n\nexport interface ShowSignInModalAction { signInLinkHref: string }\nexport const showSignInModalAction = createAction<ShowSignInModalAction>(\n `${storeKey}/showSignInModal`,\n)\n\nexport const explicitlySignInAction = createAction(`${storeKey}/explicitlySignIn`)\n\nexport interface IsSignedInAction { isSignedIn: boolean }\nexport const isSignedInAction = createAction<IsSignedInAction>(`${storeKey}/isSignedInAction`)\n\nexport interface SetOfflineAction { offline: boolean }\nexport const setOfflineAction = createAction<SetOfflineAction>(`${storeKey}/setOfflineAction`)\n","export const storeKey = \"chart\"\n\nexport const fallbackUpdateTimeInterval = 2000\n\n// corresponds to force_update_at in old dashboard\n// throttle time between use globalPanAndZoom change actions - and requests sent to server\nexport const panAndZoomDelay = 300\n","export const seconds4human = (\n totalSeconds: number | string, overrideOptions?: {[key: string]: string},\n) => {\n const defaultOptions: {[key: string]: string} = {\n now: \"now\",\n space: \" \",\n negative_suffix: \"ago\",\n day: \"day\",\n days: \"days\",\n hour: \"hour\",\n hours: \"hours\",\n minute: \"min\",\n minutes: \"mins\",\n second: \"sec\",\n seconds: \"secs\",\n and: \"and\",\n }\n\n const options = typeof overrideOptions === \"object\"\n ? { ...defaultOptions, ...overrideOptions }\n : defaultOptions\n\n let seconds = typeof totalSeconds === \"string\"\n ? parseInt(totalSeconds, 10)\n : totalSeconds\n\n if (seconds === 0) {\n return options.now\n }\n\n let suffix = \"\"\n if (seconds < 0) {\n seconds = -seconds\n if (options.negative_suffix !== \"\") {\n suffix = options.space + options.negative_suffix\n }\n }\n\n const days = Math.floor(seconds / 86400)\n seconds -= (days * 86400)\n\n const hours = Math.floor(seconds / 3600)\n seconds -= (hours * 3600)\n\n const minutes = Math.floor(seconds / 60)\n seconds -= (minutes * 60)\n\n const strings = []\n\n if (days > 1) {\n strings.push(days.toString() + options.space + options.days)\n } else if (days === 1) {\n strings.push(days.toString() + options.space + options.day)\n }\n\n if (hours > 1) {\n strings.push(hours.toString() + options.space + options.hours)\n } else if (hours === 1) {\n strings.push(hours.toString() + options.space + options.hour)\n }\n\n if (minutes > 1) {\n strings.push(minutes.toString() + options.space + options.minutes)\n } else if (minutes === 1) {\n strings.push(minutes.toString() + options.space + options.minute)\n }\n\n if (seconds > 1) {\n strings.push(Math.floor(seconds).toString() + options.space + options.seconds)\n } else if (seconds === 1) {\n strings.push(Math.floor(seconds).toString() + options.space + options.second)\n }\n\n if (strings.length === 1) {\n return strings.pop() + suffix\n }\n\n const last = strings.pop()\n return `${strings.join(\", \")} ${options.and} ${last}${suffix}`\n}\n","import { createReducer } from \"redux-act\"\n\nimport { ChartsMetadata } from \"domains/global/types\"\n\nimport { startSnapshotModeAction, stopSnapshotModeAction, isSignedInAction, setOfflineAction } from \"./actions\"\n\nexport type StateT = {\n isSnapshotMode: boolean\n snapshotCharts: ChartsMetadata | null\n snapshotDataPoints: number | null\n isSignedIn: boolean\n offline: boolean\n}\n\nexport const initialState: StateT = {\n isSnapshotMode: false,\n snapshotCharts: null,\n snapshotDataPoints: null,\n isSignedIn: false,\n offline: false\n}\n\nexport const dashboardReducer = createReducer<StateT>({}, initialState)\n\ndashboardReducer.on(startSnapshotModeAction, (state, { charts, dataPoints }) => ({\n ...state,\n snapshotCharts: charts, // todo integrate with /charts result\n snapshotDataPoints: dataPoints,\n isSnapshotMode: true,\n}))\n\ndashboardReducer.on(stopSnapshotModeAction, (state) => ({\n ...state,\n isSnapshotMode: initialState.isSnapshotMode,\n snapshotCharts: initialState.snapshotCharts,\n snapshotDataPoints: initialState.snapshotDataPoints,\n}))\n\ndashboardReducer.on(isSignedInAction, (state, { isSignedIn }) => ({\n ...state,\n isSignedIn\n}))\n\ndashboardReducer.on(setOfflineAction, (state, { offline }) => ({\n ...state,\n offline\n}))\n","import { combineReducers } from \"redux\"\n\nimport { globalReducer } from \"domains/global/reducer\"\nimport { storeKey as globalKey } from \"domains/global/constants\"\n\nimport { chartReducer } from \"domains/chart/reducer\"\nimport { storeKey as chartKey } from \"domains/chart/constants\"\n\nimport { dashboardReducer } from \"domains/dashboard/reducer\"\nimport { storeKey as dashboardKey } from \"domains/dashboard/constants\"\n\nexport default combineReducers({\n [globalKey]: globalReducer,\n [chartKey]: chartReducer,\n\n // todo lazy-load and inject those reducers, when they are not needed (dashboard.js, cloud)\n [dashboardKey]: dashboardReducer,\n})\n","import axios from \"axios\"\n\nexport const axiosInstance = axios.create({\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n withCredentials: true,\n})\n","import axios from \"axios\"\n\nexport const axiosInstance = axios.create({\n // timeout: 30 * 1000, // todo\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n withCredentials: true,\n})\n","import {\n Subject, from, empty,\n} from \"rxjs\"\nimport {\n mergeMap, tap, catchError, startWith, switchMap,\n} from \"rxjs/operators\"\nimport { CancelTokenSource, Method } from \"axios\"\n\nimport { UnknownStringKeyT } from \"types/common\"\n\nimport { axiosInstance } from \"./axios-instance\"\n\nexport const CHART_UNMOUNTED = \"Chart scrolled out of view\"\n\ninterface FetchInputEvent {\n url: string\n method?: Method\n params?: UnknownStringKeyT\n data?: UnknownStringKeyT\n onErrorCallback: (error: Error) => void\n onSuccessCallback: (data: { [key: string]: unknown }) => void\n cancelTokenSource?: CancelTokenSource\n}\n\nconst METRICS_TIMEOUT = 15_000\n\nexport const getFetchStream = (concurrentCallsLimit: number) => {\n const fetch$ = new Subject<FetchInputEvent>()\n const resetFetch$ = new Subject()\n\n const handler = mergeMap(({\n url, method = \"GET\", params = {}, data, onErrorCallback, onSuccessCallback, cancelTokenSource,\n }: FetchInputEvent) => (\n from(axiosInstance.request({\n url,\n method,\n params,\n data,\n timeout: METRICS_TIMEOUT,\n cancelToken: cancelTokenSource?.token,\n })).pipe(\n tap(({ data: responseData }) => { onSuccessCallback(responseData) }),\n catchError((error: Error) => {\n // todo implement error handling to support NETDATA.options.current.retries_on_data_failures\n if (error?.message !== CHART_UNMOUNTED) {\n console.warn(\"fetch error\", url) // eslint-disable-line no-console\n }\n onErrorCallback(error)\n return empty()\n }),\n )\n ), concurrentCallsLimit)\n\n const output = resetFetch$.pipe(\n startWith(null),\n switchMap(() => fetch$.pipe(handler)),\n )\n\n output.subscribe()\n return [fetch$, resetFetch$]\n}\n","import { tail, sum, reverse } from \"ramda\"\nimport { ChartData, DygraphData } from \"domains/chart/chart-types\"\n\n/*\nwhen requesting for bigger time interval than available history in the agent,\nwe get only the available range. Dashboard was first designed to not allow zooming-out too much.\nBut we want to show the requested time-range, so to do it consistently, we return nr of points\nwhen making the request, and after getting result, we add `null`s at the beginning\n */\n\ninterface GetCorrectedPointsArg {\n after: number\n before: number\n firstEntry: number\n points: number\n}\nexport const getCorrectedPoints = ({\n after,\n before,\n firstEntry,\n points,\n}: GetCorrectedPointsArg) => {\n const nowInSeconds = Math.round(new Date().valueOf() / 1000)\n const afterAbsolute = after > 0 ? after : nowInSeconds + after\n const beforeAbsolute = before > 0 ? before : nowInSeconds + before\n\n if (afterAbsolute < firstEntry) {\n // take into account first_entry\n const realAfter = Math.max(afterAbsolute, firstEntry)\n const requestedRange = beforeAbsolute - afterAbsolute\n const availableRange = beforeAbsolute - realAfter\n\n return Math.round((points * availableRange) / requestedRange)\n }\n return null\n}\n\nexport const addPointsDygraph = (data: DygraphData, nrOfPointsToFill: number) => {\n const viewUpdateEvery = data.view_update_every\n if (!data.result.data.length) {\n return data\n }\n const firstAddedTimestamp = data.result.data[0][0] - nrOfPointsToFill * viewUpdateEvery\n const emptyPoint = tail(data.result.labels).map(() => null)\n const nulls = new Array(nrOfPointsToFill)\n .fill(null)\n .map((_, i) => [firstAddedTimestamp + i * viewUpdateEvery, ...emptyPoint])\n return {\n ...data,\n after: data.after - viewUpdateEvery * nrOfPointsToFill,\n result: {\n ...data.result,\n data: nulls.concat(data.result.data),\n },\n }\n}\n\nexport const fillMissingData = (data: ChartData, nrOfPointsToFill: number) => {\n if (data.format === \"json\") {\n return addPointsDygraph(data as DygraphData, nrOfPointsToFill)\n }\n return data\n}\n\nconst emptyArray: number[] = []\nexport const transformResults = (data: ChartData, format: string, shouldRevertFlip: boolean) => {\n if (format === \"array\" && data.format === \"json\") {\n if (Array.isArray(data.result)) return data\n\n const dataResult = shouldRevertFlip\n ? reverse((data as DygraphData).result.data)\n : (data as DygraphData).result.data\n return {\n ...data,\n // set proper output type so other functions like fillMissingData work properly\n format: \"array\",\n result: dataResult.reduce((acc: number[], pointData: number[]) => {\n pointData.shift()\n return [...acc, sum(pointData)]\n }, emptyArray),\n }\n }\n return data\n}\n\nexport const mapDefaultAggrMethod = (unit: string): string => {\n if (unit.length === 0) {\n return \"sum\"\n }\n const avgUnits: any = {\n percentage: true,\n percent: true,\n \"rotations/min\": true,\n ratio: true,\n seconds: true,\n \"seconds ago\": true,\n milliseconds: true,\n millisec: true,\n ms: true,\n \"log2 s\": true,\n minutes: true,\n hours: true,\n interval: true,\n ticks: true,\n celsius: true,\n c: true,\n mhz: true,\n hz: true,\n volts: true,\n kwh: true,\n ampere: true,\n amps: true,\n dbm: true,\n value: true,\n stratum: true,\n units: true,\n watt: true,\n temperature: true,\n \"random number\": true,\n rpm: true,\n quadro: true,\n \"adv/item\": true,\n multiplier: true,\n geforce: true,\n }\n if (avgUnits[unit.toLowerCase()]) {\n return \"avg\"\n }\n const avgUnitsRegExes: any = [\".*%.*\", \".*/operation\", \".*/run\", \".*/ run\", \".*/request\"]\n if (\n avgUnitsRegExes.some((regEx: string) => {\n const regExpression = RegExp(regEx, \"i\")\n return regExpression.test(unit.toLowerCase())\n })\n ) {\n return \"avg\"\n }\n return \"sum\"\n}\n","import styled from \"styled-components\"\nimport {\n getSizeBy, Text, TextSmall, getColor,\n} from \"@netdata/netdata-ui\"\n\nexport const Container = styled.div`\n width: 100%;\n height: 100%;\n min-height: ${getSizeBy(10)};\n display: flex;\n flex-flow: row nowrap;\n padding: ${getSizeBy(2)} ${getSizeBy(2)} ${getSizeBy(2)} ${getSizeBy(2)};\n`\n\nexport const SideContent = styled.div<{ right?: boolean }>`\n flex-grow: 0;\n flex-shrink: 0;\n height: 100%;\n align-self: stretch;\n`\n\nexport const ContentContainer = styled.div``\n\nexport const HeaderText = styled(Text)<{ error?: boolean; success?: boolean }>`\n color: ${({ error, success }) => (success && getColor(\"success\"))\n || (error && getColor(\"error\"))};\n font-weight: bold;\n display: block;\n margin-bottom: ${getSizeBy()};\n`\n\nexport const ContentText = styled(TextSmall)<{ error?: boolean; success?: boolean }>`\n display: block;\n color: ${({ error }) => (error && getColor(\"error\")) || getColor(\"border\")};\n`\n","import React from \"react\"\nimport {\n Container, SideContent, ContentContainer, HeaderText, ContentText,\n} from \"./styled\"\n\ninterface NotificationProps {\n header?: string\n leftContent?: React.ReactNode\n rightContent?: React.ReactNode\n text?: React.ReactNode\n className?: string\n renderContent?: (props: NotificationProps) => React.ReactNode | React.ReactNodeArray | null\n success?: boolean\n error?: boolean\n}\n\nexport const UINotification = (props: NotificationProps) => {\n const {\n header, text, leftContent, rightContent, renderContent, success, error,\n } = props\n return (\n <Container>\n {leftContent && <SideContent>{leftContent}</SideContent>}\n <ContentContainer>\n {header && (\n <HeaderText success={success} error={error}>\n {header}\n </HeaderText>\n )}\n {text && (\n <ContentText success={success} error={error}>\n {text}\n </ContentText>\n )}\n {renderContent && renderContent(props)}\n </ContentContainer>\n {rightContent && <SideContent right>{rightContent}</SideContent>}\n </Container>\n )\n}\n\n// for usage in non-jsx contexts\n// eslint-disable-next-line react/jsx-props-no-spreading\nexport const createUINotification = (props: NotificationProps) => <UINotification {...props} />\n","import styled from \"styled-components\"\nimport { getSizeBy } from \"@netdata/netdata-ui\"\n\nexport const NodeIconContainer = styled.div`\n width: ${getSizeBy(5)};\n height: ${getSizeBy(5)};\n margin-right: ${getSizeBy(2)};\n display: flex;\n justify-content: center;\n align-items: center;\n`\n\nexport const NotificationLink = styled.a`\n &,\n &:hover {\n text-decoration: underline;\n color: inherit;\n }\n`\n","import React from \"react\"\nimport { Icon } from \"@netdata/netdata-ui\"\nimport { toast } from \"react-toastify\"\n\nimport { createUINotification } from \"components/ui-notification\"\n\nimport * as S from \"./styled\"\n\nexport const toastOptions = {\n position: toast.POSITION.BOTTOM_RIGHT,\n autoClose: 10000,\n pauseOnFocusLoss: false,\n}\n\nexport const showCloudInstallationProblemNotification = () => {\n const uiNotification = {\n header: \"Installation error\",\n text: \"The installer could not prepare the required dependencies to enable Netdata Cloud\"\n + \" functionality\",\n }\n const notificationComponent = createUINotification({\n ...uiNotification,\n error: true,\n leftContent: (\n <S.NodeIconContainer>\n <Icon name=\"gear\" size=\"large\" color=\"error\" />\n </S.NodeIconContainer>\n ),\n })\n toast.error(notificationComponent, toastOptions)\n}\n\nexport const showCloudConnectionProblemNotification = () => {\n const uiNotification = {\n header: \"Connection Problem\",\n text: (\n <S.NotificationLink\n href=\"https://learn.netdata.cloud/docs/agent/packaging/installer#automatic-one-line-installation-script\"\n target=\"_blank\"\n >\n To access Cloud install again your agent via the kickstart script\n </S.NotificationLink>\n ),\n }\n const notificationComponent = createUINotification({\n ...uiNotification,\n error: true,\n leftContent: (\n <S.NodeIconContainer>\n <Icon name=\"gear\" size=\"large\" color=\"error\" />\n </S.NodeIconContainer>\n ),\n })\n toast.error(notificationComponent, toastOptions)\n}\n","import {\n mergeAll, pipe, split, mergeRight,\n} from \"ramda\"\nimport { mapIndexed } from \"ramda-adjunct\"\n\nconst defaultUrlOptions = {\n hash: \"#\",\n theme: null,\n help: null,\n mode: \"live\", // 'live', 'print'\n update_always: false,\n pan_and_zoom: false,\n server: null,\n after: 0,\n before: 0,\n highlight: false,\n highlight_after: 0,\n highlight_before: 0,\n nowelcome: false,\n show_alarms: false,\n chart: null,\n family: null,\n alarm: null,\n alarm_unique_id: 0,\n alarm_id: 0,\n alarm_event_id: 0,\n alarm_when: 0,\n} as {[key: string]: unknown}\n\nconst isInvalidPair = ([key, value]: [string, string]) => (\n defaultUrlOptions[key] === undefined || value === undefined\n)\n\nconst parseQueryPair = ([key, value]: [string, string]): {[key: string] : unknown} => {\n if (isInvalidPair([key, value])) {\n return {}\n }\n return {\n [key]: decodeURIComponent(value),\n }\n}\n\nexport const parseUrl = pipe(\n split(\";\"),\n mapIndexed((value, index) => (\n (index === 0) ? { hash: value } : parseQueryPair((value.split(\"=\") as [string, string]))\n )),\n mergeAll,\n mergeRight(defaultUrlOptions),\n)\n\nconst urlParsed = parseUrl(document.location.hash)\n\nexport const isPrintMode = urlParsed.mode === \"print\"\n","import {\n call,\n put,\n takeEvery,\n select,\n spawn,\n take,\n delay,\n} from \"redux-saga/effects\"\nimport { channel } from \"redux-saga\"\nimport { Action } from \"redux-act\"\n\nimport { axiosInstance } from \"utils/api\"\nimport { alwaysEndWithSlash, serverDefault } from \"utils/server-detection\"\nimport { getFetchStream } from \"utils/netdata-sdk\"\nimport { isMainJs } from \"utils/env\"\nimport { fillMissingData, transformResults } from \"utils/fill-missing-data\"\nimport {\n showCloudInstallationProblemNotification, showCloudConnectionProblemNotification,\n} from \"components/notifications\"\nimport { selectGlobalPanAndZoom, selectSnapshot, selectRegistry } from \"domains/global/selectors\"\nimport { StateT as GlobalStateT } from \"domains/global/reducer\"\nimport { stopSnapshotModeAction } from \"domains/dashboard/actions\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\nimport { INFO_POLLING_FREQUENCY } from \"domains/global/constants\"\n\nimport {\n fetchDataAction,\n FetchDataPayload,\n fetchChartAction,\n FetchChartPayload,\n fetchDataForSnapshotAction,\n FetchDataForSnapshotPayload,\n fetchInfoAction,\n FetchInfoPayload,\n fetchDataCancelAction,\n} from \"./actions\"\nimport { ChartData } from \"./chart-types\"\n\nconst CONCURRENT_CALLS_LIMIT_METRICS = isMainJs ? 30 : 60\nconst CONCURRENT_CALLS_LIMIT_PRINT = 2\nconst CONCURRENT_CALLS_LIMIT_SNAPSHOTS = 1\n\nconst fetchDataResponseChannel = channel()\n\nexport function* watchFetchDataResponseChannel() {\n while (true) {\n const action = (yield take(fetchDataResponseChannel))\n\n // special case - if requested relative timeRange, and during request the mode has been changed\n // to absolute global-pan-and-zoom, cancel the store update\n // todo do xss check of data\n if (action.type === fetchDataAction.success.toString()) {\n const payload = (action.payload as FetchDataPayload)\n const { viewRange } = payload.fetchDataParams\n const [start, end] = viewRange\n const globalPanAndZoom = (yield select(\n selectGlobalPanAndZoom,\n )) as GlobalStateT[\"globalPanAndZoom\"]\n\n if (globalPanAndZoom\n && (start <= 0 || end <= 0) // check if they are not timestamps\n ) {\n yield put(fetchDataCancelAction({\n id: payload.id,\n }))\n // eslint-disable-next-line no-continue\n continue\n }\n }\n\n yield put(action)\n }\n}\n\n// todo construct a new version of key that will be safer to be used in future\n// (while keeping old key supported for some time)\n// perhaps the key could be passed as attribute to the chart, to avoid matching\nconst constructCompatibleKey = (dimensions: undefined | string, options: string) => (\n // strange transformations for backwards compatibility. old snapshot keys were encoded this way\n // that empty dimensions were actually \"null\" string\n `${dimensions === undefined\n ? \"null\"\n : encodeURIComponent(dimensions)\n },${encodeURIComponent(options)}`\n)\n\n// currently BE always transforms data as if `flip` was there\nconst IS_FLIP_RESPECTED_IN_COMPOSITE_CHARTS = false\n\nconst getGroupByValues = (groupBy) => {\n if (groupBy === \"chart\") return \"node\"\n if (groupBy === \"node\" || groupBy === \"dimension\") return groupBy\n return `label=${groupBy}`\n}\n\nconst [fetchMetrics$] = getFetchStream(\n isPrintMode ? CONCURRENT_CALLS_LIMIT_PRINT : CONCURRENT_CALLS_LIMIT_METRICS,\n)\nfunction* fetchDataSaga({ payload }: Action<FetchDataPayload>) {\n const {\n // props for api\n host, context, chart, format, points, group, gtime, options,\n after, before, dimensions, labels, postGroupBy, postAggregationMethod,\n aggrMethod, dimensionsAggrMethod, nodeIDs, httpMethod,\n groupBy = \"dimension\", // group by node, dimension, or label keys\n aggrGroups = [],\n // props for the store\n fetchDataParams, id, cancelTokenSource,\n } = payload\n\n const snapshot = yield select(selectSnapshot)\n if (snapshot) {\n // if reading snapshot\n const dimensionsWithUrlOptions = constructCompatibleKey(dimensions, options)\n const matchingKey = Object.keys(snapshot.data).find((snapshotKey) => (\n snapshotKey.startsWith(chart) && snapshotKey.includes(dimensionsWithUrlOptions)\n ))\n if (!matchingKey) {\n // eslint-disable-next-line no-console\n console.warn(`Could not find snapshot key for chart: ${chart} and id ${id}`)\n return\n }\n const data = snapshot.data[matchingKey]\n yield put(fetchDataAction.success({\n chartData: data,\n fetchDataParams,\n id,\n }))\n return\n }\n\n const url = isMainJs\n ? `${alwaysEndWithSlash(host)}api/v1/data`\n : host\n\n const agentOptionsOriginal = options.split(\"|\")\n const hasFlip = agentOptionsOriginal.includes(\"flip\")\n const shouldAddFakeFlip = !IS_FLIP_RESPECTED_IN_COMPOSITE_CHARTS && !hasFlip\n // if flip is not respected in composite-charts, send it always (like dygraph charts normally do)\n const agentOptions = shouldAddFakeFlip\n ? agentOptionsOriginal.concat(\"flip\") : agentOptionsOriginal\n\n const groupValues = [\n getGroupByValues(groupBy),\n postGroupBy && `label=${postGroupBy}`,\n ].filter(Boolean)\n\n const axiosOptions = httpMethod === \"POST\" ? {\n // used by cloud's room-overview\n data: {\n filter: {\n nodeIDs,\n context,\n dimensions: dimensions ? dimensions.split(/['|]/) : undefined,\n labels,\n },\n after,\n before,\n points,\n group,\n gtime,\n agent_options: agentOptions,\n ...(postAggregationMethod && { post_aggregation_methods: [postAggregationMethod] }),\n aggregations: [groupBy !== \"dimension\" && {\n method: dimensionsAggrMethod || \"sum\",\n groupBy: [\"chart\", ...groupValues],\n },\n groupBy !== \"chart\" && {\n method: aggrMethod,\n groupBy: groupValues,\n ...(aggrGroups.length && { labels: aggrGroups }),\n }].filter(Boolean),\n },\n } : {\n params: {\n chart,\n _: new Date().valueOf(),\n format,\n points,\n group,\n gtime,\n options,\n after,\n before,\n dimensions,\n },\n }\n\n const onSuccessCallback = (data: { [id: string]: unknown}) => {\n if (!data?.result) {\n fetchDataResponseChannel.put(fetchDataAction.failure({ id }))\n } else {\n const { fillMissingPoints } = fetchDataParams\n\n const transformedResults = transformResults(\n (data as unknown) as ChartData,\n format,\n shouldAddFakeFlip,\n )\n\n const chartData = {\n ...transformedResults,\n // @ts-ignore\n ...((\"post_aggregated_data\" in data.result) && {\n postAggregationMethod,\n groupBy,\n postGroupBy,\n aggrGroups,\n // @ts-ignore\n postAggregated: data.result.post_aggregated_data[postAggregationMethod],\n }),\n }\n\n fetchDataResponseChannel.put(fetchDataAction.success({\n chartData: fillMissingPoints\n ? fillMissingData(chartData as ChartData, fillMissingPoints)\n : chartData,\n fetchDataParams,\n id,\n }))\n }\n }\n\n const onErrorCallback = (error: Error) => {\n console.warn(\"fetch chart data failure\", error) // eslint-disable-line no-console\n fetchDataResponseChannel.put(fetchDataAction.failure({ id }))\n }\n\n fetchMetrics$.next({\n ...axiosOptions,\n method: httpMethod || \"GET\",\n url,\n onErrorCallback,\n onSuccessCallback,\n cancelTokenSource,\n })\n}\n\nconst [fetchForSnapshot$, resetFetchForSnapshot$] = getFetchStream(CONCURRENT_CALLS_LIMIT_SNAPSHOTS)\nfunction fetchDataForSnapshotSaga({ payload }: Action<FetchDataForSnapshotPayload>) {\n const {\n host, chart, format, points, group, gtime, options,\n after, before, dimensions, aggrMethod,\n groupBy,\n nodeIDs,\n chartLibrary, id,\n } = payload\n\n // backwards-compatibility, the keys look like this:\n // net_errors.stf0,dygraph,null,ms%7Cflip%7Cjsonwrap%7Cnonzero\n const chartDataUniqueID = `${chart},${chartLibrary},${constructCompatibleKey(\n dimensions,\n options,\n )}`\n\n const url = `${alwaysEndWithSlash(host)}api/v1/data`\n const params = {\n chart,\n _: new Date().valueOf(),\n format,\n points,\n group,\n gtime,\n options,\n after,\n before,\n dimensions,\n ...(aggrMethod && { aggr_method: aggrMethod }),\n ...(nodeIDs && { node_ids: nodeIDs.join(\",\") }),\n ...(groupBy && { groupBy }),\n }\n\n const onSuccessCallback = (data: unknown) => {\n fetchDataResponseChannel.put(fetchDataForSnapshotAction.success({\n snapshotData: data,\n id,\n }))\n // temporarly, until main.js finished rewrite\n // @ts-ignore\n window.chartUpdated({\n chartDataUniqueID,\n data,\n })\n }\n\n const onErrorCallback = () => {\n fetchDataResponseChannel.put(fetchDataForSnapshotAction.failure({ id }))\n // @ts-ignore\n window.chartUpdated({\n chartDataUniqueID,\n chart,\n data: null,\n })\n }\n\n fetchForSnapshot$.next({\n url,\n params,\n onErrorCallback,\n onSuccessCallback,\n })\n}\n\nfunction stopSnapshotModeSaga() {\n // any calls in the queue should stop when save-snapshot modal is closed\n resetFetchForSnapshot$.next()\n}\n\nfunction* fetchChartSaga({ payload }: Action<FetchChartPayload>) {\n const { chart, id, host } = payload\n\n const snapshot = yield select(selectSnapshot)\n if (snapshot) {\n yield put(fetchChartAction.success({\n chartMetadata: snapshot.charts.charts[chart],\n id,\n }))\n return\n }\n\n let response\n const url = isMainJs\n ? `${alwaysEndWithSlash(host)}api/v1/chart`\n : host.replace(\"/data\", \"/chart\")\n try {\n response = yield call(axiosInstance.get, url, {\n params: {\n chart,\n },\n })\n } catch (e) {\n console.warn(\"fetch chart details failure\") // eslint-disable-line no-console\n yield put(fetchChartAction.failure({ id }))\n return\n }\n yield put(fetchChartAction.success({\n chartMetadata: response.data,\n id,\n }))\n}\n\nfunction* fetchInfoSaga({ payload }: Action<FetchInfoPayload>) {\n const { poll } = payload\n let isCloudEnabled = false\n let isAgentClaimed = false\n let isCloudAvailable = false\n let isACLKAvailable = false\n\n try {\n const registry: GlobalStateT[\"registry\"] = yield select(selectRegistry)\n const wasCloudAvailable = registry?.isCloudAvailable\n const wasACLKAvailable = registry?.isACLKAvailable\n\n const { data } = yield call(axiosInstance.get, `${serverDefault}/api/v1/info`)\n isCloudAvailable = data?.[\"cloud-available\"] || false\n isCloudEnabled = data?.[\"cloud-enabled\"] || false\n isAgentClaimed = data?.[\"agent-claimed\"] || false\n isACLKAvailable = data?.[\"aclk-available\"] || false\n\n yield put(fetchInfoAction.success({\n isCloudAvailable, isCloudEnabled, isAgentClaimed, isACLKAvailable, fullInfoPayload: data,\n }))\n\n if (isCloudEnabled && (wasCloudAvailable === null) && !isCloudAvailable) {\n // show only once per session\n showCloudInstallationProblemNotification()\n }\n if (isCloudAvailable && isAgentClaimed && (wasACLKAvailable !== false) && !isACLKAvailable) {\n // show at session-init and if we see a change of isACLKAvailable from true to false\n showCloudConnectionProblemNotification()\n }\n // TODO: No success notification spec`ed?\n // else if (!wasACLKAvailable && isACLKAvailable) {\n // toast.success(\"Connected to the Cloud!\", {\n // position: \"bottom-right\",\n // type: toast.TYPE.SUCCESS,\n // autoClose: NOTIFICATIONS_TIMEOUT,\n // })\n // }\n } catch (e) {\n console.warn(\"fetch agent info failure\") // eslint-disable-line no-console\n yield put(fetchInfoAction.failure())\n }\n\n if (poll && isCloudEnabled && isAgentClaimed) {\n yield delay(INFO_POLLING_FREQUENCY)\n yield put(fetchInfoAction({ poll: true }))\n }\n}\n\n\nexport function* chartSagas() {\n yield takeEvery(fetchDataAction.request, fetchDataSaga)\n yield takeEvery(fetchChartAction.request, fetchChartSaga)\n yield takeEvery(fetchDataForSnapshotAction.request, fetchDataForSnapshotSaga)\n yield takeEvery(stopSnapshotModeAction, stopSnapshotModeSaga)\n yield takeEvery(fetchInfoAction.request, fetchInfoSaga)\n yield spawn(watchFetchDataResponseChannel)\n}\n","export const sidePanelTransitionTimeInSeconds = 0.2\n","import { sortBy, prop, last } from \"ramda\"\nimport { Action } from \"redux-act\"\nimport {\n call, delay, spawn, take, takeEvery, put,\n} from \"redux-saga/effects\"\n\nimport { axiosInstance } from \"utils/api\"\nimport { serverStatic } from \"utils/server-detection\"\nimport { name2id } from \"utils/name-2-id\"\n\nimport {\n startAlarmsAction, StartAlarmsPayload, fetchAllAlarmsAction, updateActiveAlarmsAction,\n} from \"./actions\"\nimport { AlarmLogs, AlarmLog, ActiveAlarms } from \"./types\"\n\nconst ALARMS_INITIALIZATION_DELAY = 1000\nconst ALARMS_UPDATE_EVERY = 10000 // the time in ms between alarm checks\nconst CHART_DIV_OFFSET = -50\n\n// firefox moves the alarms off-screen (above, outside the top of the screen)\n// if alarms are shown faster than: one per 500ms\nconst ALARMS_MS_BETWEEN_NOTIFICATIONS = 500\n\n// equal to old NETDATA.alarms.notifications\nconst areNotificationsAvailable = \"Notification\" in window\n\nconst notificationCallback = window.netdataAlarmsNotifCallback\n\n\n// todo this doesnt change in the session, but should be moved to the redux state anyway\nlet firstNotificationId = 0\nlet lastNotificationId = 0\n\n\nconst scrollToChart = (chartID: unknown): boolean => {\n if (typeof chartID === \"string\") {\n const chartElement = document.querySelector(`#chart_${name2id(chartID)}`)\n if (chartElement) {\n const offset = (chartElement as HTMLDivElement).offsetTop + CHART_DIV_OFFSET;\n (document.querySelector(\"html\") as HTMLElement).scrollTop = offset\n return true\n }\n }\n return false\n}\n\n// perhaps sagas are not the best place for this\nconst scrollToAlarm = (alarm: AlarmLog) => {\n if (typeof alarm === \"object\") {\n const hasFoundChart = scrollToChart(alarm.chart)\n if (hasFoundChart) {\n window.focus()\n }\n }\n}\n\nconst requestPermissions = () => {\n if (areNotificationsAvailable) {\n if (Notification.permission === \"default\") {\n Notification.requestPermission()\n }\n }\n}\n\nconst hasGivenNotificationPermissions = () => (areNotificationsAvailable\n && Notification.permission === \"granted\"\n)\n\nfunction* getLog(lastNotificationIdArg: number, serverDefault: string) {\n try {\n const { data } = yield call(\n axiosInstance.get,\n `${serverDefault}/api/v1/alarm_log?after=${lastNotificationIdArg}`,\n )\n // todo xss check\n return data\n } catch (error) {\n console.warn(\"Error fetching alarms log\", error) // eslint-disable-line no-console\n return null\n }\n}\n\ninterface NotificationConfig {\n notificationTitle: string\n notificationOptions: NotificationOptions\n notificationHandler: (event: Event) => void\n}\n// called \"notify\" in old codebase\nconst getNotification = (\n entry: AlarmLog, activeAlarms: ActiveAlarms, firstNotificationIdArg: number,\n): NotificationConfig | undefined => {\n if (entry.updated) {\n // has been updated by another alarm\n return\n }\n\n let valueString = entry.value_string\n const t = activeAlarms.alarms[`${entry.chart}.${entry.name}`]\n if (typeof t !== \"undefined\"\n && entry.status === t.status\n && typeof t.value_string !== \"undefined\"\n ) {\n valueString = t.value_string\n }\n\n const name = entry.name.replace(/_/g, \" \")\n let status = entry.status.toLowerCase()\n let title = `${name} = ${valueString}`\n const tag = entry.alarm_id\n let icon = \"images/banner-icon-144x144.png\"\n let interaction = false\n let show = true\n\n // switch/case left here to simplify refractor (it's very similar to old code)\n switch (entry.status) {\n case \"REMOVED\":\n show = false\n break\n\n case \"UNDEFINED\":\n return\n\n case \"UNINITIALIZED\":\n return\n\n case \"CLEAR\":\n if (entry.unique_id < firstNotificationIdArg) {\n // alarm is not current\n return\n }\n if (entry.old_status === \"UNINITIALIZED\" || entry.old_status === \"UNDEFINED\") {\n // alarm switch to CLEAR from old_status\n return\n }\n if (entry.no_clear_notification) {\n // alarm is CLEAR but has no_clear_notification flag\n return\n }\n title = `${name} back to normal (${valueString})`\n icon = \"images/check-mark-2-128-green.png\"\n interaction = false\n break\n\n case \"WARNING\":\n if (entry.old_status === \"CRITICAL\") {\n status = `demoted to ${entry.status.toLowerCase()}`\n }\n\n icon = \"images/alert-128-orange.png\"\n interaction = false\n break\n\n case \"CRITICAL\":\n if (entry.old_status === \"WARNING\") {\n status = `escalated to ${entry.status.toLowerCase()}`\n }\n\n icon = \"images/alert-128-red.png\"\n interaction = true\n break\n\n default:\n console.warn(`invalid alarm status ${entry.status}`) // eslint-disable-line no-console\n return\n }\n\n // filter recipients\n // if (show) {\n // show = NETDATA.alarms.recipientMatches(entry.recipient, NETDATA.alarms.recipients)\n // }\n\n\n if (show) {\n if (typeof notificationCallback === \"function\") {\n show = notificationCallback(entry)\n }\n\n if (show) {\n // show this notification\n // eslint-disable-next-line consistent-return\n return {\n notificationTitle: title,\n notificationOptions: {\n body: `${entry.hostname} - ${entry.chart} (${entry.family}) - ${status}: ${entry.info}`,\n tag: `${tag}`,\n requireInteraction: interaction,\n icon: serverStatic + icon,\n data: entry,\n },\n notificationHandler: (event: Event) => {\n event.preventDefault()\n if (event.target) {\n const { data } = event.target as Notification\n scrollToAlarm(data)\n }\n },\n }\n }\n }\n}\n\nfunction* notifyAll(serverDefault: string, activeAlarms: ActiveAlarms) {\n const alarmLogs: AlarmLogs = yield call(getLog, lastNotificationId, serverDefault)\n if (alarmLogs === null || typeof alarmLogs !== \"object\") {\n console.warn(\"invalid alarms log response\") // eslint-disable-line no-console\n return\n }\n\n if (alarmLogs.length === 0) {\n console.log(\"received empty alarm log\") // eslint-disable-line no-console\n return\n }\n\n const logsSorted = sortBy(prop(\"unique_id\"), alarmLogs)\n\n // eslint-disable-next-line camelcase\n const newLogs = logsSorted.filter(({ unique_id }) => unique_id > lastNotificationId)\n const notifications = newLogs\n .map((entry) => (getNotification(entry, activeAlarms, firstNotificationId)))\n .filter((x) => x !== undefined) as NotificationConfig[]\n\n for (let i = 0; i < notifications.length; i += 1) {\n const {\n notificationTitle, notificationOptions, notificationHandler,\n } = notifications[i]\n const notification = new Notification(\n notificationTitle,\n notificationOptions,\n )\n notification.onclick = notificationHandler\n\n yield delay(ALARMS_MS_BETWEEN_NOTIFICATIONS)\n }\n\n // todo put to redux store\n lastNotificationId = (last(logsSorted) as AlarmLog).unique_id\n\n if (typeof window.netdataAlarmsRemember === \"undefined\" || window.netdataAlarmsRemember) {\n localStorage.setItem(\"last_notification_id\", `${lastNotificationId}`)\n }\n}\n\n\nfunction* get(what: string, serverDefault: string) {\n const { data } = yield call(axiosInstance.get, `${serverDefault}/api/v1/alarms?${what}`)\n if (firstNotificationId === 0 && typeof data.latest_alarm_log_unique_id === \"number\") {\n firstNotificationId = data.latest_alarm_log_unique_id\n }\n return data\n}\n\nfunction* alarmsLoop(serverDefault: string) {\n while (true) {\n const activeAlarms = (yield call(get, \"active\", serverDefault)) as ActiveAlarms\n if (activeAlarms) {\n yield put(updateActiveAlarmsAction({ activeAlarms }))\n if (\n hasGivenNotificationPermissions()\n // timestamps in seconds\n && (activeAlarms.latest_alarm_log_unique_id > lastNotificationId)\n ) {\n yield call(notifyAll, serverDefault, activeAlarms)\n\n if (activeAlarms.status === false) {\n // Health monitoring is disabled on this netdata\n break\n }\n }\n }\n yield delay(ALARMS_UPDATE_EVERY)\n }\n}\n\nfunction* startAlarms() {\n // make sure we handle that action only once, we don't want multiple intervals/loops\n const { payload }: { payload: StartAlarmsPayload } = yield take(startAlarmsAction)\n const { serverDefault } = payload\n\n yield delay(ALARMS_INITIALIZATION_DELAY)\n\n lastNotificationId = +(localStorage.getItem(\"last_notification_id\") || lastNotificationId)\n requestPermissions()\n yield call(alarmsLoop, serverDefault)\n}\n\ntype FetchAllAlarmsPayload = {\n callback: (x: unknown) => void,\n serverDefault: string,\n}\nfunction* fetchAllAlarmsSaga({ payload }: Action<FetchAllAlarmsPayload>) {\n const { callback, serverDefault } = payload\n const allAlarms = yield call(get, \"all\", serverDefault)\n callback(allAlarms)\n}\n\nexport function* alarmsSagas() {\n yield spawn(startAlarms)\n yield takeEvery(fetchAllAlarmsAction.request, fetchAllAlarmsSaga)\n}\n","const allowedReferrerDomains = [\n \"\",\n \"https://www.google.com/\",\n \"https://duckduckgo.com/\",\n \"https://www.reddit.com/\",\n]\n\nexport const isAllowedReferrer = (referrer: string) => allowedReferrerDomains.includes(referrer)\n || referrer.endsWith(\".my-netdata.io/\")\n || referrer.startsWith(\"https://github.com/\")\n || referrer.endsWith(\"netdata.cloud/\")\n || referrer.startsWith(\"https://app.netdata.cloud/\")\n","import { uniq, filter } from \"ramda\"\nimport {\n spawn, take, put, takeEvery, call, delay, select,\n} from \"redux-saga/effects\"\nimport { channel } from \"redux-saga\"\nimport { AxiosResponse } from \"axios\"\nimport { Action } from \"redux-act\"\n\nimport { NETDATA_REGISTRY_SERVER } from \"utils/utils\"\nimport { axiosInstance } from \"utils/api\"\nimport { isDemo } from \"utils/is-demo\"\nimport { sidePanelTransitionTimeInSeconds } from \"components/space-panel/settings\"\nimport { fetchInfoAction } from \"domains/chart/actions\"\n\nimport {\n fetchHelloAction,\n FetchHelloPayload,\n windowFocusChangeAction,\n updatePersonUrlsAction,\n SetOptionAction,\n setOptionAction,\n setSpacePanelStatusAction,\n SetSpacePanelStatusActionPayload,\n setSpacePanelTransitionEndAction,\n HelloResponse,\n accessRegistrySuccessAction,\n} from \"./actions\"\nimport { alarmsSagas } from \"./alarms-sagas\"\nimport { MASKED_DATA } from \"./constants\"\nimport { selectFullInfoPayload } from \"./selectors\"\nimport { isAllowedReferrer } from \"./utils\"\nimport { InfoPayload } from \"./__mocks__/info-mock\"\n\nconst windowFocusChannel = channel()\n\nexport function listenToWindowFocus() {\n window.addEventListener(\"focus\", () => {\n windowFocusChannel.put(windowFocusChangeAction({ hasWindowFocus: true }))\n })\n window.addEventListener(\"blur\", () => {\n windowFocusChannel.put(windowFocusChangeAction({ hasWindowFocus: false }))\n })\n}\n\nexport function* watchWindowFocusChannel() {\n while (true) {\n const action = yield take(windowFocusChannel)\n yield put(action)\n }\n}\n\nfunction* waitForFullInfoPayload() {\n return (yield take(fetchInfoAction.success)).payload.fullInfoPayload\n}\n\nfunction* injectPosthog(machineGuid: string, personGuid?: string) {\n if (window.posthog) {\n return\n }\n const info: InfoPayload = (yield select(selectFullInfoPayload))\n || (yield call(waitForFullInfoPayload))\n || {}\n\n /* eslint-disable */\n // @ts-ignore\n !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(\".\");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement(\"script\")).type=\"text/javascript\",p.async=!0,p.src=s.api_host+\"/static/array.js\",(r=t.getElementsByTagName(\"script\")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a=\"posthog\",u.people=u.people||[],u.toString=function(t){var e=\"posthog\";return\"posthog\"!==a&&(e+=\".\"+a),t||(e+=\" (stub)\"),e},u.people.toString=function(){return u.toString(1)+\".people (stub)\"},o=\"capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags\".split(\" \"),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);\n /* eslint-enable */\n window.posthog.init(\"mqkwGT0JNFqO-zX2t0mW6Tec9yooaVu7xCBlXtHnt5Y\", {\n api_host: \"https://posthog.netdata.cloud\",\n loaded: (posthog: any) => {\n if (personGuid) {\n posthog.identify(personGuid)\n }\n },\n })\n const shouldMaskReferrer = !isDemo && !isAllowedReferrer(document.referrer)\n const MASKED = \"masked\"\n window.posthog.register(\n // remove properties with unavailable values\n filter((value) => value !== undefined && value !== null,\n {\n $ip: \"127.0.0.1\",\n $current_url: isDemo ? null : \"agent dashboard\",\n $pathname: isDemo ? null : \"netdata-dashboard\",\n $host: isDemo ? null : \"dashboard.netdata.io\",\n\n $initial_referring_domain: shouldMaskReferrer ? MASKED : null,\n $initial_referrer: shouldMaskReferrer ? MASKED : null,\n $referring_domain: shouldMaskReferrer ? MASKED : null,\n $referrer: shouldMaskReferrer ? MASKED : null,\n\n event_source: \"agent dashboard\",\n\n netdata_version: info.version,\n netdata_machine_guid: machineGuid,\n netdata_person_id: personGuid || \"Unavailable\",\n netdata_buildinfo: info[\"buildinfo\"],\n netdata_release_channel: info[\"release-channel\"],\n mirrored_host_count: info.mirrored_hosts?.length,\n alarms_normal: info.alarms?.normal,\n alarms_warning: info.alarms?.warning,\n alarms_critical: info.alarms.critical,\n host_os_name: info.os_name,\n host_os_id: info.os_id,\n host_os_id_like: info.os_id_like,\n host_os_version: info.os_version,\n host_os_version_id: info.os_version_id,\n host_os_detection: info.os_detection,\n system_cores_total: info.cores_total,\n system_total_disk_space: info.total_disk_space,\n system_cpu_freq: info.cpu_freq,\n system_ram_total: info.ram_total,\n system_kernel_name: info.kernel_name,\n system_kernel_version: info.kernel_version,\n system_architecture: info.architecture,\n system_virtualization: info.virtualization,\n system_virt_detection: info.virt_detection,\n system_container: info.container,\n system_container_detection: info.container_detection,\n container_os_name: info.container_os_name,\n container_os_id: info.container_os_id,\n container_os_id_like: info.container_os_id_like,\n container_os_version: info.container_os_version,\n container_os_version_id: info.container_os_version_id,\n host_collectors_count: info.collectors.length,\n host_cloud_enabled: info[\"cloud-enabled\"],\n host_cloud_available: info[\"cloud-available\"],\n host_agent_claimed: info[\"agent-claimed\"],\n host_aclk_available: info[\"aclk-available\"],\n host_aclk_implementation: info[\"aclk-implementation\"],\n host_allmetrics_json_used: info[\"allmetrics-json-used\"],\n host_allmetrics_prometheus_used: info[\"allmetrics-prometheus-used\"],\n host_allmetrics_shell_used: info[\"allmetrics-shell-used\"],\n host_charts_count: info[\"charts-count\"],\n host_dashboard_used: info[\"dashboard-used\"],\n host_metrics_count: info[\"metrics-count\"],\n host_notification_methods: info[\"notification-methods\"],\n config_memory_mode: info[\"memory-mode\"],\n config_exporting_enabled: info[\"exporting-enabled\"],\n config_exporting_connectors: info[\"exporting-connectors\"],\n config_hosts_available: info[\"hosts-available\"],\n config_https_enabled: info[\"https-enabled\"],\n config_multidb_disk_quota: info[\"multidb-disk-quota\"],\n config_page_cache_size: info[\"page-cache-size\"],\n config_stream_enabled: info[\"stream-enabled\"],\n config_web_enabled: info[\"web-enabled\"],\n // eslint-disable-next-line camelcase\n host_is_parent: info.host_labels?._is_parent,\n mirrored_hosts_reachable: info.mirrored_hosts_status\n .filter(({ reachable }) => reachable).length,\n mirrored_hosts_unreachable: info.mirrored_hosts_status\n .filter(({ reachable }) => !reachable).length,\n host_collectors: info.collectors,\n host_is_k8s_node: info.is_k8s_node,\n }),\n )\n}\n\nexport type PersonUrl = [\n string, // guid\n string, // url\n number, // last timestamp (ms)\n number, // accesses\n string // name\n]\n\ntype AccessRegistryResponse = null | {\n personGuid?: string\n registryServer: string\n urls?: PersonUrl[]\n}\n\ntype AccessRegistry = (args: {\n machineGuid: string\n maxRedirects: number\n name: string\n registryServer: string\n url: string\n}) => Promise<AccessRegistryResponse>\nconst accessRegistry: AccessRegistry = ({\n machineGuid, maxRedirects, name, registryServer, url,\n}) => axiosInstance.get(`${registryServer}/api/v1/registry`, {\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n params: {\n action: \"access\",\n machine: machineGuid,\n name,\n url,\n },\n withCredentials: true, // required for the cookie\n}).then(({ data }) => {\n // todo xss check\n const isRedirect = typeof data.registry === \"string\"\n\n let returnData = data\n if (typeof data.status !== \"string\" || data.status !== \"ok\") {\n // todo throw error (409 in old dashboard)\n returnData = null\n }\n\n if (returnData === null) {\n if (isRedirect && maxRedirects > 0) {\n return accessRegistry({\n maxRedirects: maxRedirects - 1,\n machineGuid,\n name,\n registryServer: data.registry,\n url,\n })\n }\n return { registryServer }\n }\n const urls = data.urls.filter((u: [string, string]) => u[1] !== MASKED_DATA)\n return {\n personGuid: data.person_guid || null,\n registryServer,\n urls,\n }\n}).catch(() => {\n // todo handle error in better way (410 in old dashboard)\n console.warn(\"error calling registry:\", registryServer) // eslint-disable-line no-console\n return null\n})\n\nexport interface RegistryMachine {\n guid: string\n url: string\n lastTimestamp: number\n accesses: number\n name: string\n alternateUrls: string[]\n}\n\ntype ParsePersonUrls = (\n personUrls: PersonUrl[]\n) => {\n registryMachines: { [key: string]: RegistryMachine }\n registryMachinesArray: RegistryMachine[]\n}\nexport const parsePersonUrls: ParsePersonUrls = (personUrls) => {\n // todo main.js is using registryMachines, but should use only the array\n const registryMachines: { [key: string]: RegistryMachine } = {}\n\n personUrls\n .slice()\n .reverse()\n .forEach(([guid, url, lastTimestamp, accesses, name]: PersonUrl) => {\n const existingObj = registryMachines[guid] || {\n lastTimestamp: 0,\n accesses: 0,\n alternateUrls: [],\n guid: \"\",\n url: \"\",\n name: \"\"\n }\n const isNewer = existingObj.lastTimestamp < lastTimestamp\n const extended: RegistryMachine = {\n guid: existingObj.guid || guid,\n url: isNewer ? url : existingObj.url,\n lastTimestamp: isNewer ? lastTimestamp : existingObj.lastTimestamp,\n accesses: existingObj.accesses + accesses,\n name: isNewer ? name : existingObj.name,\n alternateUrls: existingObj.alternateUrls.concat(url),\n }\n registryMachines[guid] = extended\n })\n\n const registryMachinesArray = uniq(\n // not sure if reverse is needed, but it was in old dashboard\n personUrls\n .slice()\n .reverse()\n .map(([guid]: PersonUrl) => guid),\n ).map((guid) => registryMachines[guid])\n return {\n registryMachines,\n registryMachinesArray,\n }\n}\n\nfunction* fetchHelloSaga({ payload }: Action<FetchHelloPayload>) {\n const { serverDefault } = payload\n const helloCallUrl = `${serverDefault}api/v1/registry?action=hello`\n let response: AxiosResponse<HelloResponse>\n try {\n response = yield call(axiosInstance.get, helloCallUrl, {\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n withCredentials: true,\n })\n } catch (error) {\n console.warn(\"error accessing registry or Do-Not-Track is enabled\") // eslint-disable-line\n yield put(fetchHelloAction.failure())\n return\n }\n const cloudBaseURL = response.data.cloud_base_url\n const { hostname } = response.data\n const machineGuid = response.data.machine_guid\n const registryServer = response.data.registry\n const isUsingGlobalRegistry = registryServer === NETDATA_REGISTRY_SERVER\n\n yield put(fetchHelloAction.success({\n cloudBaseURL,\n hostname,\n isUsingGlobalRegistry,\n machineGuid,\n }))\n\n const name = isUsingGlobalRegistry ? MASKED_DATA : hostname\n const url = isUsingGlobalRegistry ? MASKED_DATA : serverDefault\n\n // now make access call - max_redirects, callback, etc...\n const accessRegistryResponse: AccessRegistryResponse = yield call(accessRegistry, {\n machineGuid,\n maxRedirects: 2,\n name,\n registryServer,\n url,\n })\n\n if (response.data.anonymous_statistics) {\n yield spawn(injectPosthog, response.data.machine_guid, accessRegistryResponse?.personGuid)\n }\n\n if (accessRegistryResponse?.urls && accessRegistryResponse?.personGuid) {\n const personUrls = parsePersonUrls(accessRegistryResponse.urls)\n const { registryMachines, registryMachinesArray } = personUrls\n yield put(updatePersonUrlsAction({\n personGuid: accessRegistryResponse.personGuid,\n registryMachines,\n registryMachinesArray,\n }))\n }\n\n yield put(accessRegistrySuccessAction({\n registryServer: accessRegistryResponse?.registryServer || registryServer,\n }))\n}\n\nconst constructOptionStorageKey = (key: string) => `options.${key}`\nfunction setOptionSaga({ payload }: Action<SetOptionAction>) {\n const { key, value } = payload\n if (key === \"stop_updates_when_focus_is_lost\") {\n // old dashboard was saving that property to localStorage, but was always ommiting it when\n // reading. it was only possible to persist this setting via url (update_always hash param)\n return\n }\n localStorage.setItem(constructOptionStorageKey(key), JSON.stringify(value))\n}\n\nfunction* spacePanelSaga({ payload }: Action<SetSpacePanelStatusActionPayload>) {\n if (payload.isActive) {\n document.body.className = \"with-panel\"\n } else {\n document.body.className = \"\"\n }\n yield delay(sidePanelTransitionTimeInSeconds * 1000)\n yield put(setSpacePanelTransitionEndAction({ isActive: payload.isActive }))\n}\n\nexport function* globalSagas() {\n yield spawn(listenToWindowFocus)\n yield spawn(watchWindowFocusChannel)\n yield takeEvery(fetchHelloAction.request, fetchHelloSaga)\n yield spawn(alarmsSagas)\n yield takeEvery(setOptionAction, setOptionSaga)\n yield takeEvery(setSpacePanelStatusAction, spacePanelSaga)\n}\n","/* eslint-disable camelcase */\n/* eslint-disable operator-linebreak */\nimport { take, takeEvery } from \"redux-saga/effects\"\nimport { Action } from \"redux-act\"\n\nimport {\n clearHighlightAction,\n SetGlobalChartUnderlayAction,\n setGlobalChartUnderlayAction,\n} from \"domains/global/actions\"\nimport {\n explicitlySignInAction,\n showSignInModalAction,\n ShowSignInModalAction,\n} from \"domains/dashboard/actions\"\nimport { setHashParams, getHashParams, removeHashParams } from \"utils/hash-utils\"\n\nexport const LOCAL_STORAGE_NEEDS_SYNC = \"LOCAL-STORAGE-NEEDS-SYNC\"\n\nfunction setGlobalChartUnderlaySaga({ payload }: Action<SetGlobalChartUnderlayAction>) {\n const { after, before } = payload\n if (window.urlOptions) {\n // additional check to prevent loop, after setting initial state from url\n if (window.urlOptions.after !== after || window.urlOptions.before !== before) {\n window.urlOptions.netdataHighlightCallback(true, after, before)\n }\n } else {\n // TODO: Consider a setting to control wether the component sets these hash params\n const hashParams = getHashParams()\n const highlight_after = Math.round(after).toString()\n const highlight_before = Math.round(before).toString()\n if (\n hashParams.highlight_after !== highlight_after ||\n hashParams.highlight_before !== highlight_before\n ) {\n setHashParams({ highlight_after, highlight_before })\n }\n }\n}\n\nfunction clearHighlightSaga() {\n if (window.urlOptions) {\n window.urlOptions.netdataHighlightCallback(false, 0, 0)\n } else {\n removeHashParams([\"highlight_after\", \"highlight_before\"])\n }\n}\n\nfunction* showSignInSaga({ payload }: Action<ShowSignInModalAction>) {\n if (window.showSignInModal) {\n window.showSignInModal()\n\n yield take(explicitlySignInAction)\n const { signInLinkHref } = payload\n window.localStorage.setItem(LOCAL_STORAGE_NEEDS_SYNC, \"true\")\n window.location.href = signInLinkHref\n }\n}\n\nexport function* mainJsSagas() {\n yield takeEvery(setGlobalChartUnderlayAction, setGlobalChartUnderlaySaga)\n yield takeEvery(clearHighlightAction, clearHighlightSaga)\n yield takeEvery(showSignInModalAction, showSignInSaga)\n}\n","import { spawn } from \"redux-saga/effects\"\n\nimport { chartSagas } from \"domains/chart/sagas\"\nimport { globalSagas } from \"domains/global/sagas\"\nimport { mainJsSagas } from \"domains/dashboard/sagas\"\n\nexport function* rootSaga() {\n yield spawn(globalSagas)\n yield spawn(chartSagas)\n yield spawn(mainJsSagas)\n}\n","import { compose, applyMiddleware, createStore } from \"redux\"\nimport createSagaMiddleware from \"redux-saga\"\nimport rootReducer from \"./root-reducer\"\nimport { rootSaga } from \"./root-saga\"\n\nconst sagaMiddleware = createSagaMiddleware()\n\nconst reduxDevTools = process.env.NODE_ENV === \"development\"\n && window.__REDUX_DEVTOOLS_EXTENSION__\n // @ts-ignore\n && window.__REDUX_DEVTOOLS_EXTENSION__({ name: \"Dashboard Charts\" })\n\nconst composeMiddlewaresWithDevTools = () => (reduxDevTools\n ? compose(applyMiddleware(sagaMiddleware), reduxDevTools)\n : compose(applyMiddleware(sagaMiddleware)))\n\nexport const configureStore = () => {\n const store = createStore(\n rootReducer,\n composeMiddlewaresWithDevTools(),\n )\n sagaMiddleware.run(rootSaga)\n return store\n}\n\nexport const store = configureStore()\n","import $ from \"jquery\"\n\nwindow.$ = $\nwindow.jQuery = $\n","let loadCssPromise: Promise<void>\n\ntype LoadCss = (href: string) => Promise<void>\nexport const loadCss: LoadCss = (href) => {\n if (loadCssPromise) {\n return loadCssPromise\n }\n return new Promise((resolve, reject) => {\n const fileRef = document.createElement(\"link\")\n fileRef.setAttribute(\"rel\", \"stylesheet\")\n fileRef.setAttribute(\"type\", \"text/css\")\n fileRef.setAttribute(\"href\", href)\n\n fileRef.onload = () => {\n resolve()\n }\n\n fileRef.onerror = () => {\n reject(Error(`Error loading css: ${href}`))\n }\n\n document.getElementsByTagName(\"head\")[0].appendChild(fileRef)\n })\n}\n","import classNames from \"classnames\"\nimport { Attributes } from \"./transformDataAttributes\"\n\nexport type ChartLibraryName =\n | \"dygraph\"\n | \"sparkline\"\n | \"peity\"\n | \"google\"\n // | \"d3\"\n | \"d3pie\"\n | \"easypiechart\"\n | \"gauge\"\n | \"textonly\"\n | \"groupbox\"\nexport interface ChartLibraryConfig {\n aspectRatio?: number\n format: string\n hasLegend: (attributes: Attributes) => boolean\n hasToolboxPanAndZoom?: boolean\n isLogScale?: (attributes: Attributes) => boolean\n options: (attributes: Attributes) => string\n trackColors: boolean\n pixelsPerPoint: (attributes: Attributes) => number\n xssRegexIgnore: RegExp\n containerClass: (attributes: Attributes) => string\n}\nexport type ChartLibrariesSettings = {\n [key in ChartLibraryName]: ChartLibraryConfig\n}\n\ntype IsDygraphSparkline = (attributes: Attributes) => boolean\nconst isDygraphSparkline: IsDygraphSparkline = (attributes) => (\n attributes.dygraphTheme === \"sparkline\"\n)\n\nexport const chartLibrariesSettings: ChartLibrariesSettings = {\n dygraph: {\n // initialize: window.NETDATA.dygraphInitialize,\n // create: window.NETDATA.dygraphChartCreate,\n // update: window.NETDATA.dygraphChartUpdate,\n // resize(state) {\n // if (typeof state.tmp.dygraph_instance !== \"undefined\"\n // && typeof state.tmp.dygraph_instance.resize === \"function\") {\n // state.tmp.dygraph_instance.resize()\n // }\n // },\n // setSelection: window.NETDATA.dygraphSetSelection,\n // clearSelection: window.NETDATA.dygraphClearSelection,\n hasToolboxPanAndZoom: true,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result.data$\"),\n format: \"json\",\n options(attributes: Attributes) {\n if (typeof this.isLogScale === \"function\") {\n // flip - in proper order (from oldest to newest)\n return `ms|flip${this.isLogScale(attributes) ? \"|abs\" : \"\"}`\n }\n return \"\"\n },\n hasLegend(attributes: Attributes) {\n // not using __hasLegendCache__ as in old-dashboard, because performance tweaks like this\n // probably won't be needed in react app\n const { legend = true } = attributes\n return !isDygraphSparkline(attributes) && Boolean(legend)\n },\n // autoresize(state) {\n // void (state)\n // return true\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: true,\n pixelsPerPoint: ((attributes: Attributes) => (isDygraphSparkline(attributes) ? 2 : 3)),\n // pixels_per_point(state) {\n // return (this.isSparkline(state) === false) ? 3 : 2\n // },\n isLogScale(attributes: Attributes) {\n return attributes.dygraphTheme === \"logscale\"\n },\n containerClass(attributes: Attributes) {\n return this.hasLegend(attributes)\n ? classNames(\n \"netdata-container-with-legend\",\n attributes.legendPosition === \"bottom\" && \"netdata-container-with-legend--bottom\",\n )\n : \"netdata-container\"\n },\n // container_class(state) {\n // if (this.legend(state) !== null) {\n // return \"netdata-container-with-legend\"\n // }\n // return \"netdata-container\"\n // },\n },\n sparkline: {\n // initialize: window.NETDATA.sparklineInitialize,\n // create: window.NETDATA.sparklineChartCreate,\n // update: window.NETDATA.sparklineChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"array\",\n options: () => \"flip|abs\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: false,\n pixelsPerPoint: () => 3,\n containerClass: () => \"netdata-container\",\n },\n peity: {\n // initialize: window.NETDATA.peityInitialize,\n // create: window.NETDATA.peityChartCreate,\n // update: window.NETDATA.peityChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"ssvcomma\",\n options: () => \"null2zero|flip|abs\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: false,\n pixelsPerPoint: () => 3,\n containerClass: () => \"netdata-container\",\n },\n google: {\n // initialize: window.NETDATA.googleInitialize,\n // create: window.NETDATA.googleChartCreate,\n // update: window.NETDATA.googleChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result.rows$\"),\n format: \"datatable\",\n options: () => \"\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 300\n // },\n trackColors: false,\n pixelsPerPoint: () => 4,\n containerClass: () => \"netdata-container\",\n },\n d3pie: {\n // initialize: window.NETDATA.d3pieInitialize,\n // create: window.NETDATA.d3pieChartCreate,\n // update: window.NETDATA.d3pieChartUpdate,\n // resize: null,\n // setSelection: window.NETDATA.d3pieSetSelection,\n // clearSelection: window.NETDATA.d3pieClearSelection,\n hasToolboxPanAndZoom: false,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result.data$\"),\n format: \"json\",\n hasLegend: () => false,\n options: () => \"objectrows|ms\",\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: false,\n pixelsPerPoint: () => 15,\n containerClass: () => \"netdata-container\",\n },\n // d3: {\n // initialize: window.NETDATA.d3Initialize,\n // create: window.NETDATA.d3ChartCreate,\n // update: window.NETDATA.d3ChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n // toolboxPanAndZoom: null,\n // initialized: false,\n // enabled: true,\n // xssRegexIgnore: new RegExp(\"^/api/v1/data\\.result.data$\"),\n // format(state) {\n // void (state)\n // return \"json\"\n // },\n // options(state) {\n // void (state)\n // return \"\"\n // },\n // legend(state) {\n // void (state)\n // return null\n // },\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n // track_colors(state) {\n // void (state)\n // return false\n // },\n // pixels_per_point(state) {\n // void (state)\n // return 3\n // },\n // container_class(state) {\n // void (state)\n // return \"netdata-container\"\n // },\n // },\n easypiechart: {\n // initialize: window.NETDATA.easypiechartInitialize,\n // create: window.NETDATA.easypiechartChartCreate,\n // update: window.NETDATA.easypiechartChartUpdate,\n // resize: null,\n // setSelection: window.NETDATA.easypiechartSetSelection,\n // clearSelection: window.NETDATA.easypiechartClearSelection,\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"array\",\n options() {\n return \"absolute\"\n },\n hasLegend() {\n return false\n },\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: true,\n pixelsPerPoint: () => 3,\n aspectRatio: 100,\n containerClass: () => \"netdata-container-easypiechart\",\n },\n gauge: {\n // initialize: window.NETDATA.gaugeInitialize,\n // create: window.NETDATA.gaugeChartCreate,\n // update: window.NETDATA.gaugeChartUpdate,\n // resize: null,\n // setSelection: window.NETDATA.gaugeSetSelection,\n // clearSelection: window.NETDATA.gaugeClearSelection,\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"array\",\n options: () => \"absolute\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: true,\n pixelsPerPoint: () => 3,\n aspectRatio: 60,\n containerClass: () => \"netdata-container-gauge\",\n },\n textonly: {\n // autoresize(state) {\n // void (state)\n // return false\n // },\n containerClass: () => \"netdata-container\",\n // create: window.NETDATA.textOnlyCreate,\n // enabled: true,\n format: \"array\",\n // initialized: true,\n // initialize(callback) {\n // callback()\n // },\n hasLegend: () => false,\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n options: () => \"absolute\",\n pixelsPerPoint: () => 3,\n trackColors: false,\n // update: window.NETDATA.textOnlyUpdate,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n },\n groupbox: {\n containerClass: () => \"netdata-container\",\n hasLegend: () => false,\n options: () => \"absolute\",\n format: \"json\",\n trackColors: false,\n pixelsPerPoint: () => 3,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n },\n}\n","import { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { chartLibrariesSettings } from \"domains/chart/utils/chartLibrariesSettings\"\n\nexport const getChartURLOptions = (\n attributes: Attributes, shouldEliminateZeroDimensions: boolean,\n) => {\n const {\n appendOptions,\n overrideOptions,\n } = attributes\n let ret = \"\"\n\n ret += overrideOptions\n ? overrideOptions.toString()\n : chartLibrariesSettings[attributes.chartLibrary].options(attributes)\n\n if (typeof appendOptions === \"string\") {\n ret += `|${encodeURIComponent(appendOptions)}`\n }\n\n ret += \"|jsonwrap\"\n\n if (shouldEliminateZeroDimensions) {\n ret += \"|nonzero\"\n }\n\n if (attributes.dimensionsAggrMethod === \"sum-of-abs\"\n || (!attributes.dimensionsAggrMethod && attributes.groupBy && attributes.groupBy !== \"dimension\")\n ) {\n ret += \"|absolute\"\n }\n\n return ret\n}\n","export const BIGGEST_INTERVAL_NUMBER = 2 ** 31 - 1\n","import React from \"react\"\n\nimport { Icon } from \"components/icon\"\n\ninterface Props {\n containerNode: HTMLElement\n hasEmptyData: boolean\n}\n\nexport const Loader = ({\n containerNode,\n hasEmptyData,\n}: Props) => {\n // below is 90% of original logic.\n // since it rerenders when IntersectionObserver turns the chart back on,\n // it's not that important to detect screen height and container sizes changes\n const screenHeight = window.screen.height\n\n // normally we want a font size, as tall as the element\n let h = containerNode.clientHeight\n\n // but give it some air, 20% let's say, or 5 pixels min\n const lost = Math.max(h * 0.2, 5)\n h -= lost\n\n // center the text, vertically\n let paddingTop = (lost - 5) / 2\n\n // but check the width too\n // it should fit 10 characters in it\n const w = containerNode.clientWidth / 10\n if (h > w) {\n paddingTop += (h - w) / 2\n h = w\n }\n\n // and don't make it too huge\n // 5% of the screen size is good\n if (h > screenHeight / 20) {\n paddingTop += (h - (screenHeight / 20)) / 2\n h = screenHeight / 20\n }\n\n const label = hasEmptyData ? \" empty\" : \" netdata\"\n const iconType = hasEmptyData ? \"noData\" : \"loading\"\n\n return (\n <div\n className=\"netdata-message icon\"\n style={{\n fontSize: h,\n paddingTop,\n }}\n >\n <Icon iconType={iconType} />\n {label}\n </div>\n )\n}\n","type GetPanAndZoomStep = (event: React.MouseEvent) => number\nexport const getPanAndZoomStep: GetPanAndZoomStep = (event) => {\n if (event.ctrlKey) {\n return window.NETDATA.options.current.pan_and_zoom_factor\n * window.NETDATA.options.current.pan_and_zoom_factor_multiplier_control\n } if (event.shiftKey) {\n return window.NETDATA.options.current.pan_and_zoom_factor\n * window.NETDATA.options.current.pan_and_zoom_factor_multiplier_shift\n } if (event.altKey) {\n return window.NETDATA.options.current.pan_and_zoom_factor\n * window.NETDATA.options.current.pan_and_zoom_factor_multiplier_alt\n }\n return window.NETDATA.options.current.pan_and_zoom_factor\n}\n","export const safeEqualCheck = (a: unknown, b: unknown) => {\n if (a === b) {\n return true\n }\n return Number.isNaN(a as number) && Number.isNaN(b as number)\n}\n","import { identity } from \"ramda\"\nimport { useCallback, useState, useMemo, useRef } from \"react\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectTemperatureSetting, selectSecondsAsTimeSetting } from \"domains/global/selectors\"\nimport { unitsConversionCreator } from \"utils/units-conversion\"\nimport { safeEqualCheck } from \"utils/safe-equal-check\"\n\nimport { ChartData } from \"../chart-types\"\nimport { Attributes } from \"./transformDataAttributes\"\n\ntype Converter = (v: number) => number | string\n// only time units are converted into strings, the rest are numbers\n\n// todo - memoization similar to the one as in old dashboard, but probably not needed\nconst formattersFixed: any[] = []\nconst formattersZeroBased: any[] = []\nconst fastNumberFormat = (min: number, max: number) => {\n const key = max\n if (min === max) {\n if (typeof formattersFixed[key] === \"undefined\") {\n formattersFixed[key] = new Intl.NumberFormat(undefined, {\n useGrouping: true,\n minimumFractionDigits: min,\n maximumFractionDigits: max,\n })\n }\n\n return formattersFixed[key]\n }\n if (min === 0) {\n if (typeof formattersZeroBased[key] === \"undefined\") {\n formattersZeroBased[key] = new Intl.NumberFormat(undefined, {\n useGrouping: true,\n minimumFractionDigits: min,\n maximumFractionDigits: max,\n })\n }\n\n return formattersZeroBased[key]\n }\n // (old dashboard comment)\n // this is never used\n // it is added just for completeness\n return new Intl.NumberFormat(undefined, {\n useGrouping: true,\n minimumFractionDigits: min,\n maximumFractionDigits: max,\n })\n}\n\nconst getLegendFormatValue =\n (\n convertUnits: Converter,\n intlNumberFormat: Intl.NumberFormat | null,\n valueDecimalDetail: number\n ) =>\n (value: number | string | null) => {\n if (typeof value !== \"number\") {\n return \"-\"\n }\n\n const convertedValue = convertUnits(value)\n if (typeof convertedValue !== \"number\") {\n return convertedValue\n }\n\n if (intlNumberFormat !== null) {\n return intlNumberFormat.format(convertedValue)\n }\n\n let dmin\n let dmax\n if (valueDecimalDetail !== -1) {\n dmin = valueDecimalDetail\n dmax = valueDecimalDetail\n } else {\n dmin = 0\n const abs = convertedValue < 0 ? -convertedValue : convertedValue\n if (abs > 1000) {\n dmax = 0\n } else if (abs > 10) {\n dmax = 1\n } else if (abs > 1) {\n dmax = 2\n } else if (abs > 0.1) {\n dmax = 2\n } else if (abs > 0.01) {\n dmax = 4\n } else if (abs > 0.001) {\n dmax = 5\n } else if (abs > 0.0001) {\n dmax = 6\n } else {\n dmax = 7\n }\n }\n\n return fastNumberFormat(dmin, dmax).format(convertedValue)\n }\n\ntype LegendFormatValue = (value: string | number | null) => string | number\n\ninterface Arguments {\n attributes: Attributes\n data: ChartData\n units: string\n unitsCommon: string | undefined\n unitsDesired: string\n uuid: string\n}\nexport const useFormatters = ({\n attributes,\n data,\n units,\n unitsCommon,\n unitsDesired,\n uuid,\n}: Arguments) => {\n const temperatureSetting = useSelector(selectTemperatureSetting)\n const secondsAsTimeSetting = useSelector(selectSecondsAsTimeSetting)\n\n // previously _unitsConversion\n const [convertUnits, setConvertUnits] = useState<Converter>(() => identity)\n\n // probably can also be removed\n const [min, setMin] = useState<number>()\n const [max, setMax] = useState<number>()\n\n // todo most of this state is not needed, that hook can be refractored\n const [unitsCurrent, setUnitsCurrent] = useState<string>(units)\n\n const [decimals, setDecimals] = useState<number>(-1)\n const [intlNumberFormat, setIntlNumberFormat] = useState<Intl.NumberFormat | null>(null)\n\n const {\n // \"valueDecimalDetail\" in old app\n decimalDigits = -1,\n } = attributes\n\n const legendFormatValue: LegendFormatValue = useMemo(\n () => getLegendFormatValue(convertUnits, intlNumberFormat, decimalDigits),\n [convertUnits, decimalDigits, intlNumberFormat]\n )\n\n const legendFormatValueRef = useRef(legendFormatValue)\n const updateLegendFormatValueRef = (\n newConvertUnits: Converter,\n newIntlNumberFormat: any,\n newDecimalDigits: any\n ) => {\n legendFormatValueRef.current = getLegendFormatValue(\n newConvertUnits,\n newIntlNumberFormat,\n newDecimalDigits\n )\n }\n\n const legendFormatValueDecimalsFromMinMax = useCallback(\n (newMin: number, newMax: number) => {\n if (safeEqualCheck(min, newMin) && safeEqualCheck(max, newMax)) {\n return legendFormatValueRef.current\n }\n // we should call the convertUnits-creation only when original app was doing this\n // so we don't get new updates in improper places\n setMin(newMin)\n setMax(newMax)\n\n const newConvertUnits = unitsConversionCreator.get(\n uuid,\n newMin,\n newMax,\n units,\n unitsDesired,\n unitsCommon,\n switchedUnits => {\n setUnitsCurrent(switchedUnits)\n // that.legendSetUnitsString(that.units_current);\n // that.legendSetUnitsString just populates some DOM with unitsCurrent\n // on all occurences just take the unitsCurrent from this state\n },\n temperatureSetting,\n secondsAsTimeSetting\n )\n\n // as function, so useState() interpretes it properly\n setConvertUnits(() => newConvertUnits)\n\n const convertedMin = newConvertUnits(newMin)\n const convertedMax = newConvertUnits(newMax)\n\n // if number is returned, we format it!!!!\n if (typeof convertedMin !== \"number\" || typeof convertedMax !== \"number\") {\n updateLegendFormatValueRef(newConvertUnits, intlNumberFormat, decimalDigits)\n return legendFormatValueRef.current\n }\n\n let newDecimals\n\n if (data.min === data.max) {\n // it is a fixed number, let the visualizer decide based on the value\n newDecimals = -1\n } else if (decimalDigits !== -1) {\n // there is an override\n newDecimals = decimalDigits\n } else {\n // ok, let's calculate the proper number of decimal points\n let delta\n\n if (convertedMin === convertedMax) {\n delta = Math.abs(convertedMin)\n } else {\n delta = Math.abs(convertedMax - convertedMin)\n }\n\n if (delta > 1000) {\n newDecimals = 0\n } else if (delta > 10) {\n newDecimals = 1\n } else if (delta > 1) {\n newDecimals = 2\n } else if (delta > 0.1) {\n newDecimals = 2\n } else if (delta > 0.01) {\n newDecimals = 4\n } else if (delta > 0.001) {\n newDecimals = 5\n } else if (delta > 0.0001) {\n newDecimals = 6\n } else {\n newDecimals = 7\n }\n }\n\n let newIntlNumberFormat = intlNumberFormat\n\n if (newDecimals !== decimals) {\n if (newDecimals < 0) {\n newIntlNumberFormat = null\n } else {\n newIntlNumberFormat = fastNumberFormat(newDecimals, newDecimals)\n }\n setIntlNumberFormat(() => newIntlNumberFormat)\n setDecimals(newDecimals)\n }\n updateLegendFormatValueRef(newConvertUnits, newIntlNumberFormat, newDecimals)\n return legendFormatValueRef.current\n },\n [\n decimals,\n decimalDigits,\n min,\n max,\n uuid,\n temperatureSetting,\n units,\n unitsDesired,\n unitsCommon,\n secondsAsTimeSetting,\n data.min,\n data.max,\n intlNumberFormat,\n ]\n )\n\n return {\n legendFormatValue,\n legendFormatValueDecimalsFromMinMax,\n unitsCurrent,\n }\n}\n","const defaultColor = {\n r: 255,\n g: 0,\n b: 0,\n}\n\ntype ColorHex2Rgb = (hex: string) => {\n r: number,\n g: number,\n b: number\n}\nexport const colorHex2Rgb: ColorHex2Rgb = (hex) => {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i\n if (!hex) {\n return defaultColor\n }\n const hexFull = hex.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b)\n\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hexFull)\n if (!result) {\n console.warn(\"wrong color format:\", hex) // eslint-disable-line no-console\n }\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n } : defaultColor\n}\n","import styled from \"styled-components\"\nimport { getSizeBy } from \"@netdata/netdata-ui\"\n\nexport const LegendContainer = styled.div`\n margin-bottom: ${getSizeBy(3)};\n padding-left: 35px;\n`\n\nexport const LegendFirstRow = styled.div`\n margin-top: 4px;\n display: flex;\n justify-content: space-between;\n`\n\nexport const LegendSecondRow = styled.div`\n margin-top: 4px;\n display: flex;\n justify-content: space-between;\n`\n\nexport const LegendUnit = styled.div`\n`\n\nexport const DateTimeSeparator = styled.span`\n margin: 0 3px;\n`\n\nexport const LegendItems = styled.div`\n display: flex;\n flex-wrap: wrap;\n overflow: auto;\n max-height: 80px;\n`\n\nexport const DimensionItem = styled.div<{ color: string, isDisabled: boolean }>`\n display: flex;\n align-items: center;\n color: ${({ color }) => color};\n margin-right: 12px;\n cursor: pointer;\n opacity: ${({ isDisabled }) => (isDisabled ? 0.3 : null)};\n user-select: none;\n font-size: 11px;\n &:focus {\n outline: none;\n }\n`\n\n// toolbox is based on \"absolute\", so to make sure it's not put on top of dimension-item\n// let's put a transparent block as last in dimension-items container. Toolbox will soon be moved\n// to other place so it's temporary\nexport const DimensionItemToolboxPlaceholder = styled.div`\n width: 140px;\n height: 20px;\n`\n\nexport const DimensionIcon = styled.div<{ color: string }>`\n width: 14px;\n height: 7px;\n border-radius: 4px;\n overflow: hidden;\n background-color: ${({ color }) => color};\n`\n\nexport const DimensionLabel = styled.span`\n margin-left: 3px;\n`\n\nexport const DimensionValue = styled.span`\n margin-left: 5px;\n min-width: 30px;\n`\n\nexport const ToolboxContainer = styled.div`\n position: relative;\n touch-action: none;\n`\n","import React, { useCallback } from \"react\"\nimport { createSelector } from \"reselect\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\nimport { DimensionLabel } from \"./chart-legend-bottom.styled\"\n\nconst emptyObject = {}\n\nconst selector = createSelector(\n selectChartData,\n ({ dimension_names: dimensionNames, keys = emptyObject }) => ({\n dimensionNames,\n keys,\n })\n)\n\nconst LegendText = ({ id, index }) => {\n const { dimensionNames, keys } = useSelector(useCallback(state => selector(state, { id }), [id]))\n const { chart, node } = keys\n\n if (chart && node && Object.keys(keys).length === 2) {\n return (\n <DimensionLabel>\n {chart[index]}@{node[index]}\n </DimensionLabel>\n )\n }\n\n const name = dimensionNames[index]\n\n return <DimensionLabel>{name}</DimensionLabel>\n}\n\nexport default LegendText\n","import React, { Fragment, useRef, useEffect, useCallback } from \"react\"\nimport classNames from \"classnames\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\n\nimport { colorHex2Rgb } from \"utils/color-hex-2-rgb\"\nimport { useDateTime } from \"utils/date-time\"\n\nimport { legendResolutionTooltip, legendPluginModuleString } from \"../utils/legend-utils\"\n\nimport { ChartMetadata } from \"../chart-types\"\nimport LegendText from \"./legendText\"\n\ninterface Props {\n chartUuid: string\n chartMetadata: ChartMetadata\n chartLibrary: string\n colors: {\n [key: string]: string\n }\n hoveredRow: number\n hoveredX: number | null\n legendFormatValue: (value: number | string | null) => (number | string)\n onDimensionClick: (clickedDimensionName: string, event: React.MouseEvent) => void\n selectedDimensions: string[]\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewBefore: number\n}\n\nexport const ChartLegendRight = ({\n chartUuid,\n chartMetadata,\n chartLibrary,\n colors,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n onDimensionClick,\n selectedDimensions,\n showLatestOnBlur,\n unitsCurrent,\n viewBefore,\n}: Props) => {\n const chartData = useSelector(\n useCallback((state: any) => selectChartData(state, { id: chartUuid }), [chartUuid])\n )\n const { dimension_names: dimensionNames, dimension_ids: dimensionIds } = chartData\n\n // todo handle also this case:\n // const netdataLast = chartData.last_entry * 1000\n // const dataUpdateEvery = chartData.view_update_every * 1000\n // showUndefined = Math.abs(netdataLast - viewBefore) > dataUpdateEvery\n // (showUndefined also when difference between last and before is bigger than granularity)\n const showUndefined = hoveredRow === -1 && !showLatestOnBlur\n\n // todo support timezone\n const legendDate = new Date(hoveredX || viewBefore)\n\n // todo make a possibility to add chartLegened when there's not chartData\n // (if this situation is possible)\n\n // @ts-ignore ignoring because options.current has inconsistent structure\n const colorFillOpacity = window.NETDATA.options.current[\n `color_fill_opacity_${chartMetadata.chart_type}`\n ]\n\n const { localeDateString, localeTimeString } = useDateTime()\n\n const scrollbarRef = useRef(null)\n useEffect(() => {\n if (scrollbarRef.current) {\n window.Ps.initialize(scrollbarRef.current, {\n wheelSpeed: 0.2,\n wheelPropagation: true,\n swipePropagation: true,\n minScrollbarLength: null,\n maxScrollbarLength: null,\n useBothWheelAxes: false,\n suppressScrollX: true,\n suppressScrollY: false,\n scrollXMarginOffset: 0,\n scrollYMarginOffset: 0,\n theme: \"default\",\n })\n }\n }, [scrollbarRef])\n\n return (\n <div className={classNames(\n \"netdata-chart-legend\",\n `netdata-${chartLibrary}-legend`,\n )}\n >\n <span\n className=\"netdata-legend-title-date\"\n title={legendPluginModuleString(true, chartMetadata)}\n >\n {showUndefined\n ? legendPluginModuleString(false, chartMetadata)\n : localeDateString(legendDate)}\n </span>\n <br />\n <span\n className=\"netdata-legend-title-time\"\n title={legendResolutionTooltip(chartData, chartMetadata)}\n >\n {showUndefined\n ? chartMetadata.context.toString()\n : localeTimeString(legendDate)}\n </span>\n <br />\n <span className=\"netdata-legend-title-units\">{unitsCurrent}</span>\n <br />\n <div className=\"netdata-legend-series\" ref={scrollbarRef}>\n <div className=\"netdata-legend-series-content\">\n {dimensionIds.map((dimensionId, i) => {\n const dimensionName = dimensionNames[i]\n // todo dimension could be a separate component\n const color = colors[dimensionName]\n const rgb = colorHex2Rgb(color)\n\n const isSelected = selectedDimensions.length === 0\n || selectedDimensions.includes(dimensionName)\n\n let value\n if (showUndefined) {\n value = null\n } else if (hoveredRow !== -1) {\n const hoveredValueArray = chartData.result.data[hoveredRow]\n // [timestamp, valueDim1, valueDim2, ...]\n value = hoveredValueArray ? hoveredValueArray[i + 1] : null\n } else {\n value = chartData.view_latest_values[i]\n }\n\n return (\n <Fragment key={dimensionId}>\n {i !== 0 && <br />}\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <span\n title={dimensionName}\n className={classNames(\n \"netdata-legend-name\",\n isSelected ? \"selected\" : \"not-selected\",\n )}\n onClick={(event) => {\n onDimensionClick(dimensionName, event)\n }}\n role=\"button\"\n style={{ color }}\n tabIndex={0}\n >\n <table\n className={`netdata-legend-name-table-${chartMetadata.chart_type}`}\n style={{\n backgroundColor: `rgba(${rgb.r},${rgb.g},${rgb.b},${colorFillOpacity})`,\n }}\n >\n <tbody>\n <tr className=\"netdata-legend-name-tr\">\n <td className=\"netdata-legend-name-td\" />\n </tr>\n </tbody>\n </table>\n {\" \"}\n <LegendText id={chartUuid} index={i} />\n </span>\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <span\n title={dimensionName}\n className={classNames(\n \"netdata-legend-value\",\n !isSelected && \"hidden\",\n )}\n onClick={(event) => {\n onDimensionClick(dimensionName, event)\n }}\n role=\"button\"\n style={{ color }} // omitted !important during refractor, react doesn't support it\n tabIndex={0}\n >\n {legendFormatValue(\n value,\n )}\n </span>\n </Fragment>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n","import React, { useCallback } from \"react\"\nimport { useDateTime } from \"utils/date-time\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\nimport { legendPluginModuleString, legendResolutionTooltip } from \"domains/chart/utils/legend-utils\"\nimport { ChartMetadata } from \"../chart-types\"\nimport LegendText from \"./legendText\"\nimport * as S from \"./chart-legend-bottom.styled\"\ninterface Props {\n chartUuid: string\n chartMetadata: ChartMetadata\n chartLibrary: string\n colors: {\n [key: string]: string\n }\n hoveredRow: number\n hoveredX: number | null\n legendFormatValue: (value: number | string | null) => number | string\n onDimensionClick: (clickedDimensionName: string, event: React.MouseEvent) => void\n selectedDimensions: string[]\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewBefore: number\n legendToolbox: JSX.Element\n resizeHandler: React.ReactNode\n}\n\nexport const ChartTimeframe = ({\n chartMetadata,\n showUndefined,\n hoveredX,\n viewBefore,\n chartData,\n}: any) => {\n const { localeDateString, localeTimeString } = useDateTime()\n\n const legendDate = new Date(hoveredX || viewBefore)\n\n return (\n <div>\n <span title={legendPluginModuleString(true, chartMetadata)}>\n {showUndefined\n ? legendPluginModuleString(false, chartMetadata)\n : localeDateString(legendDate)}\n </span>\n <S.DateTimeSeparator>|</S.DateTimeSeparator>\n <span title={legendResolutionTooltip(chartData, chartMetadata)}>\n {showUndefined ? chartMetadata.context.toString() : localeTimeString(legendDate)}\n </span>\n </div>\n )\n}\n\nexport const ChartLegendBottom = ({\n chartUuid,\n chartMetadata,\n colors,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n onDimensionClick,\n selectedDimensions,\n showLatestOnBlur,\n unitsCurrent,\n viewBefore,\n legendToolbox,\n resizeHandler,\n}: Props) => {\n const showUndefined = hoveredRow === -1 && !showLatestOnBlur\n const chartData = useSelector(\n useCallback((state: any) => selectChartData(state, { id: chartUuid }), [chartUuid])\n )\n const { dimension_names: dimensionNames, dimension_ids: dimensionIds } = chartData\n\n return (\n <S.LegendContainer>\n <S.LegendFirstRow>\n <S.LegendUnit>{unitsCurrent}</S.LegendUnit>\n <ChartTimeframe\n chartMetadata={chartMetadata}\n showUndefined={showUndefined}\n hoveredX={hoveredX}\n viewBefore={viewBefore}\n chartData={chartData}\n />\n </S.LegendFirstRow>\n <S.LegendSecondRow>\n <S.LegendItems>\n {dimensionIds.map((dimensionId, i) => {\n const dimensionName = dimensionNames[i]\n const color = colors[dimensionName]\n\n const isSelected =\n selectedDimensions.length === 0 || selectedDimensions.includes(dimensionName)\n\n let value\n if (showUndefined) {\n value = null\n } else if (hoveredRow !== -1) {\n const hoveredValueArray = chartData.result.data[hoveredRow]\n // [timestamp, valueDim1, valueDim2, ...]\n value = hoveredValueArray ? hoveredValueArray[i + 1] : null\n } else {\n value = chartData.view_latest_values[i]\n }\n return (\n <S.DimensionItem\n color={color}\n onClick={event => {\n onDimensionClick(dimensionName, event)\n }}\n role=\"button\"\n tabIndex={0}\n isDisabled={!isSelected}\n key={dimensionId}\n >\n <S.DimensionIcon title={dimensionName} color={color} />\n <LegendText id={chartUuid} index={i} />\n <S.DimensionValue>{isSelected && legendFormatValue(value)}</S.DimensionValue>\n </S.DimensionItem>\n )\n })}\n <S.DimensionItemToolboxPlaceholder />\n </S.LegendItems>\n <S.ToolboxContainer>\n {legendToolbox}\n {resizeHandler}\n </S.ToolboxContainer>\n </S.LegendSecondRow>\n </S.LegendContainer>\n )\n}\n","import React, { useCallback } from \"react\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\nimport { getNewSelectedDimensions } from \"domains/chart/utils/legend-utils\"\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport { ChartMetadata } from \"../chart-types\"\n\nimport { ChartLegendRight } from \"./chart-legend-right\"\nimport { ChartLegendBottom } from \"./chart-legend-bottom\"\n\ninterface Props {\n attributes: Attributes\n chartUuid: string\n chartMetadata: ChartMetadata\n chartLibrary: string\n colors: {\n [key: string]: string\n }\n hoveredRow: number\n hoveredX: number | null\n legendFormatValue: (value: number | string | null) => number | string\n selectedDimensions: string[]\n setSelectedDimensions: (selectedDimensions: string[]) => void\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewBefore: number\n legendToolbox: JSX.Element\n resizeHandler: React.ReactNode\n}\n\nexport const ChartLegend = ({\n attributes,\n chartUuid,\n chartMetadata,\n chartLibrary,\n colors,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n selectedDimensions,\n setSelectedDimensions,\n showLatestOnBlur,\n unitsCurrent,\n viewBefore,\n legendToolbox,\n resizeHandler,\n}: Props) => {\n const dimension_names = useSelector(\n useCallback((state: any) => selectChartData(state, { id: chartUuid }).dimension_names, [\n chartUuid,\n ])\n )\n\n const onDimensionClick = (clickedDimensionName: string, event: React.MouseEvent) => {\n event.preventDefault()\n const isModifierKeyPressed = event.shiftKey || event.ctrlKey\n const newSelectedDimensions = getNewSelectedDimensions({\n allDimensions: dimension_names,\n selectedDimensions,\n clickedDimensionName,\n isModifierKeyPressed,\n })\n setSelectedDimensions(newSelectedDimensions)\n }\n\n if (attributes.legendPosition === \"bottom\") {\n return (\n <ChartLegendBottom\n chartUuid={chartUuid}\n chartLibrary={chartLibrary}\n chartMetadata={chartMetadata}\n colors={colors}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n legendFormatValue={legendFormatValue}\n onDimensionClick={onDimensionClick}\n selectedDimensions={selectedDimensions}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewBefore={viewBefore}\n legendToolbox={legendToolbox}\n resizeHandler={resizeHandler}\n />\n )\n }\n\n return (\n <ChartLegendRight\n chartUuid={chartUuid}\n chartLibrary={chartLibrary}\n chartMetadata={chartMetadata}\n colors={colors}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n legendFormatValue={legendFormatValue}\n onDimensionClick={onDimensionClick}\n selectedDimensions={selectedDimensions}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewBefore={viewBefore}\n />\n )\n}\n","import React from \"react\"\n\nimport { ToolboxButton } from \"./toolbox-button\"\n\ntype ClickCallback = (event: React.MouseEvent) => void\ninterface Props {\n onToolboxLeftClick: ClickCallback\n onToolboxRightClick: ClickCallback\n onToolboxZoomInClick: ClickCallback\n onToolboxZoomOutClick: ClickCallback\n}\nexport const LegendToolbox = ({\n onToolboxLeftClick,\n onToolboxRightClick,\n onToolboxZoomInClick,\n onToolboxZoomOutClick,\n}: Props) => (\n <div className=\"netdata-legend-toolbox\">\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxLeftClick}\n iconType=\"left\"\n popoverTitle=\"Pan Left\"\n popoverContent=\"Pan the chart to the left. You can also <b>drag it</b> with your mouse or your\n finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>\"\n />\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxRightClick}\n iconType=\"right\"\n popoverTitle=\"Pan Right\"\n popoverContent=\"Pan the chart to the right. You can also <b>drag it</b> with your mouse or\n your finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>\"\n />\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxZoomInClick}\n iconType=\"zoomIn\"\n popoverTitle=\"Chart Zoom In\"\n popoverContent=\"Zoom in the chart. You can also press SHIFT and select an area of the chart,\n or press SHIFT or ALT and use the mouse wheel or 2-finger touchpad scroll to zoom in or out.\n <br/><small>Help can be disabled from the settings.</small>\"\n />\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxZoomOutClick}\n iconType=\"zoomOut\"\n popoverTitle=\"Chart Zoom Out\"\n popoverContent=\"Zoom out the chart. You can also press SHIFT or ALT and use the mouse wheel,\n or 2-finger touchpad scroll to zoom in or out.<br/><small>Help can be disabled from the\n settings.</small>\"\n />\n </div>\n)\n","/* eslint-disable no-nested-ternary */\nimport { always, memoizeWith } from \"ramda\"\nimport Color from \"color\"\n\nimport { ChartMetadata, DygraphData } from \"domains/chart/chart-types\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartLibraryConfig } from \"domains/chart/utils/chartLibrariesSettings\"\n\nexport const getDataForFakeStacked = (\n data: number[][],\n dimensionsVisibility: boolean[],\n): number[][] => data.map((point) => {\n const [timestamp, ...values] = point\n const rest: number[] = []\n let currentMin = 0\n let currentMax = 0\n values\n .map((value, i) => ({ isVisible: dimensionsVisibility[i], value }))\n // reverse because first dimensions should be \"on top\" (at least positive ones)\n .slice().reverse()\n .forEach(({ isVisible, value }) => {\n if (!isVisible) {\n rest.push(0) // push with value '0'. it won't be visible but needs to be present in array\n return\n }\n if (value >= 0) {\n currentMax += value\n rest.push(currentMax)\n } else {\n currentMin += value\n rest.push(currentMin)\n }\n })\n return [\n timestamp,\n ...rest,\n ]\n})\n\nconst isPercentage = (unit: string) => unit === \"percentage\"\n || unit === \"percent\"\n || unit.indexOf(\"%\") !== -1\n\nexport const getDygraphChartType = (\n attributes: Attributes, chartData: DygraphData, chartMetadata: ChartMetadata,\n chartSettings: ChartLibraryConfig,\n) => {\n const isLogScale = (chartSettings.isLogScale as ((a: Attributes) => boolean))(attributes)\n const {\n dygraphType: dygraphRequestedType = chartMetadata.chart_type,\n groupBy,\n } = attributes\n\n if (groupBy && groupBy !== \"dimension\" && isPercentage(chartMetadata.units)) {\n return \"line\"\n }\n\n // corresponds to state.tmp.dygraph_chart_type in old app\n let dygraphChartType = dygraphRequestedType\n if (dygraphChartType === \"stacked\" && chartData.dimensions === 1) {\n dygraphChartType = \"area\"\n }\n if (dygraphChartType === \"stacked\" && isLogScale) {\n dygraphChartType = \"area\"\n }\n return dygraphChartType\n}\n\nconst getBackgroundColor = memoizeWith(\n always(\"true\"),\n () => Color(window.NETDATA.themes.current.background),\n)\n// when in \"fakeStacked\" mode, we cannot use opacity for fill in charts, because the areas would\n// be visible under each other. So the darkening / whitening needs to be added directly to colors\n// (the colors are too saturated for areas and in stacked mode they were with 0.8 opacity)\nexport const transformColors = (colors: string[]) => (\n colors.map((color) => Color(color).mix(getBackgroundColor(), 0.2).hex())\n)\n\nexport const getDygraphFillAlpha = (\n isFakeStacked: boolean, dygraphChartType: string,\n) => (isFakeStacked\n ? window.NETDATA.options.current.color_fill_opacity_fake_stacked\n : dygraphChartType === \"stacked\"\n ? window.NETDATA.options.current.color_fill_opacity_stacked\n : window.NETDATA.options.current.color_fill_opacity_area)\n\n\n// https://github.com/danvk/dygraphs/blob/master/src/iframe-tarp.js#L1-L23\n// On mouseUp dygraphs put rectangles above all iframes so mouseUp can be properly intercepted.\n// this causes a problem with some analytics iframes that place themselves in regions where they\n// aren't visible anyway (for example hubspot iframe on Cloud), and this creates a problematic\n// horizontal scrollbar to appear. This function filters those \"rectangles\" (tarps) to omit\n// elements with unreachable \"left\" styles\nexport const hackDygraphIFrameTarps = (tarps: HTMLDivElement[]): HTMLDivElement[] => (\n tarps.filter((element: HTMLDivElement) => {\n const isOutsideReasonableViewport = Number(element.style.left.replace(\"px\", \"\")) > 10000\n if (isOutsideReasonableViewport) {\n element.parentNode!.removeChild(element)\n }\n return !isOutsideReasonableViewport\n })\n)\n","/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable function-paren-newline */\n/* eslint-disable comma-dangle */\nimport React, { useRef, useCallback } from \"react\"\nimport { useToggle } from \"react-use\"\n\nconst useProceededChart = (\n chartRef: any,\n propsRef: any\n): [boolean, React.Ref<HTMLElement>, (g: Dygraph) => void] => {\n const [proceeded, toggleProceeded] = useToggle(false)\n\n const ref = useRef<HTMLElement>(null)\n\n const updatePosition = useCallback((g: Dygraph) => {\n const { x } = g.getArea()\n const distance = g.toDomXCoord(propsRef.current.chartData.first_entry * 1000)\n const hasProceeded = distance > x\n toggleProceeded(hasProceeded)\n\n if (hasProceeded && ref.current) {\n const { height } = chartRef.current.getBoundingClientRect()\n ref.current.style.left = `${x}px`\n ref.current.style.right = `calc(100% - ${distance}px)`\n ref.current.style.top = `${height / 2}px`\n }\n }, [])\n\n return [proceeded, ref, updatePosition]\n}\n\nexport default useProceededChart\n","import { useRef } from \"react\"\nimport { useToggle } from \"react-use\"\n\nconst badgeTopMargin = \"40px\"\n\nconst defaultPositionTo = (ref, x, position, topMargin) => {\n ref.current.style.left = `${x}px`\n ref.current.style.right = `calc(100% - ${position}px)`\n ref.current.style.top = topMargin\n}\n\nexport default () => {\n const [isRendered, toggleIsRendered] = useToggle(false)\n\n const ref = useRef(null)\n\n const updatePosition = (isVisible, g, position, positionTo = defaultPositionTo) => {\n if (!isVisible) {\n toggleIsRendered(false)\n return\n }\n\n if (ref.current) {\n toggleIsRendered(true)\n const { x } = g.getArea()\n\n positionTo(ref, x, position, badgeTopMargin)\n }\n }\n\n return [isRendered, ref, updatePosition]\n}\n","import React, { forwardRef } from \"react\"\nimport styled from \"styled-components\"\n\nconst Container = styled.div`\n display: block;\n`\n\nconst ProceededChartDisclaimer = forwardRef((\n props: React.HTMLAttributes<HTMLElement>,\n ref: React.Ref<HTMLDivElement>,\n) => (\n <Container ref={ref} className=\"dygraph__history-tip\" data-testid=\"proceededChartDisclaimer\">\n <span className=\"dygraph__history-tip-content\">\n Want to extend your history of real-time metrics?\n <br />\n <a href=\"https://learn.netdata.cloud/guides/longer-metrics-storage/\" target=\"_blank\" rel=\"noopener noreferrer\" data-testid=\"proceededChartDisclaimer-configure\">\n Configure Netdata's \n <b>history</b>\n </a>\n or use the \n <a href=\"https://learn.netdata.cloud/docs/agent/database/engine/\" target=\"_blank\" rel=\"noopener noreferrer\" data-testid=\"proceededChartDisclaimer-engine\">DB engine</a>\n .\n </span>\n </Container>\n))\n\nexport default ProceededChartDisclaimer\n","import React, { forwardRef } from \"react\"\nimport styled from \"styled-components\"\n\nconst backgroundColorMap = {\n WARNING: \"#FFF8E1\",\n CRITICAL: \"#FFEBEF\",\n CLEAR: \"#E5F5E8\",\n}\nexport const getBackgroundColor = (status) => backgroundColorMap[status] || null\n\nconst borderColorMap = {\n WARNING: \"#FFC300\",\n CRITICAL: \"#F59B9B\",\n CLEAR: \"#68C47D\",\n}\nexport const getBorderColor = (status) => borderColorMap[status] || null\n\nconst textColorMap = {\n WARNING: \"#536775\",\n CRITICAL: \"#FF4136\",\n CLEAR: \"#00AB44\",\n}\nexport const getColor = (status) => textColorMap[status] || null\n\nconst Container = styled.div`\n position: absolute;\n margin-right: 10px;\n overflow: hidden;\n pointer-events: none;\n direction: rtl;\n z-index: 10; // higher than chart\n`\n\nconst Badge = styled.div`\n display: inline-block;\n border-radius: 36px;\n padding: 2px 12px;\n background: ${({ background }) => background};\n border: 1px solid ${({ border }) => border};\n color: ${({ color }) => color};\n font-size: 12px;\n font-weight: 700;\n direction: ltr;\n white-space: nowrap;\n`\n\nexport default forwardRef((\n { isVisible, status, label },\n ref,\n) => (\n <Container ref={ref}>\n {isVisible && (\n <Badge\n background={getBackgroundColor(status)}\n border={getBorderColor(status)}\n color={getColor(status)}\n >\n {label}\n </Badge>\n )}\n </Container>\n))\n","import React, { forwardRef } from \"react\"\nimport styled from \"styled-components\"\nimport { getColor } from \"@netdata/netdata-ui\"\n\nconst Container = styled.div`\n position: absolute;\n margin-right: 10px;\n overflow: hidden;\n pointer-events: none;\n direction: rtl;\n z-index: 10;\n`\n\nconst Badge = styled.div`\n display: inline-block;\n border-radius: 36px;\n padding: 2px 12px;\n background: ${getColor(\"mainBackground\")};\n border: 1px solid ${getColor(\"border\")};\n color: ${getColor(\"text\")};\n font-size: 12px;\n font-weight: 700;\n direction: ltr;\n white-space: nowrap;\n`\n\nconst minTimeframe = 15\nconst maxTimeframe = 180\n\nconst getMissingTime = total => {\n if (total < minTimeframe) return \" (Select at least 15 sec)\"\n if (total > maxTimeframe) return \" (Select up to 180 sec)\"\n return \"\"\n}\n\nconst NeutralPill = forwardRef((\n { isVisible, before, after },\n ref,\n) => {\n const total = (before - after) / 1000\n return (\n <Container ref={ref}>\n {isVisible && (\n <Badge>\n {Math.round(total)} sec.{getMissingTime(total)}\n </Badge>\n )}\n </Container>\n )\n})\n\nexport default NeutralPill\n","//@ts-nocheck\nimport { sortBy, reverse } from \"ramda\"\nimport React, {\n useLayoutEffect, useRef, useCallback, useState,\n} from \"react\"\nimport classNames from \"classnames\"\nimport { useUpdateEffect, useUnmount, useMount } from \"react-use\"\n// this version is needed because it contains a fix for handling constant value in the chart\n// ie. https://github.com/danvk/dygraphs/pull/909\nimport Dygraph from \"vendor/dygraph-c91c859.min\"\nimport \"dygraphs/src-es5/extras/smooth-plotter\"\nimport ResizeObserver from \"resize-observer-polyfill\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { AppStateT } from \"store/app-state\"\nimport { DygraphArea, NetdataDygraph } from \"types/vendor-overrides\"\nimport { TimeRange } from \"types/common\"\nimport { useDateTime } from \"utils/date-time\"\nimport { debounce } from \"utils/debounce\"\nimport { hasHashParam } from \"utils/hash-utils\"\n\nimport {\n selectCommonMin,\n selectCommonMax,\n selectGlobalChartUnderlay,\n selectGlobalSelectionMaster,\n selectSmoothPlot,\n selectSyncPanAndZoom,\n selectSpacePanelTransitionEndIsActive,\n selectAlarm,\n selectTimezoneSetting\n} from \"domains/global/selectors\"\nimport {\n resetGlobalPanAndZoomAction, setCommonMaxAction, setCommonMinAction,\n setGlobalPauseAction, resetGlobalPauseAction\n} from \"domains/global/actions\"\n\nimport { resetChartPanAndZoomAction } from \"domains/chart/actions\"\n\nimport { Attributes } from \"../../utils/transformDataAttributes\"\nimport {\n chartLibrariesSettings,\n ChartLibraryConfig,\n ChartLibraryName,\n} from \"../../utils/chartLibrariesSettings\"\nimport { ChartMetadata, DygraphData } from \"../../chart-types\"\nimport { selectResizeHeight } from \"../../selectors\"\n\nimport {\n getDygraphChartType, getDataForFakeStacked, transformColors, getDygraphFillAlpha,\n hackDygraphIFrameTarps,\n} from \"./dygraph/utils\"\nimport \"./dygraph-chart.css\"\n\nimport useProceededChart from \"../../hooks/use-proceeded-chart\"\nimport useDygraphBadge from \"../../hooks/useDygraphBadge\"\nimport ProceededChartDisclaimer from \"./proceeded-chart-disclaimer\"\nimport AlarmBadge, { getBorderColor } from \"./alarmBadge\"\nimport NeutralPill from \"./neutralPill\"\n\n// This is the threshold above which we assume chart shown duration has changed\nconst timeframeThreshold = 5000\nconst dygraphResizeDebounceTime = 500\n\ntype IsInRangeOfAvailableData = (props: {\n after: number, before: number, chartData: DygraphData,\n}) => boolean\nconst isInRangeOfAvailableData: IsInRangeOfAvailableData = ({ after, before, chartData }) => (\n after >= (chartData.first_entry * 1000) && before <= (chartData.last_entry * 1000)\n)\n\ninterface GetInitialDygraphOptions {\n attributes: Attributes,\n chartData: DygraphData,\n chartMetadata: ChartMetadata,\n chartSettings: ChartLibraryConfig,\n dimensionsVisibility: boolean[]\n hiddenLabelsElementId: string,\n isFakeStacked: boolean,\n orderedColors: string[],\n setMinMax: (minMax: TimeRange) => void\n shouldSmoothPlot: boolean,\n unitsCurrent: string,\n xAxisDateString: (d: Date) => string,\n xAxisTimeString: (d: Date) => string,\n}\nconst getInitialDygraphOptions = ({\n attributes,\n chartData,\n chartMetadata,\n chartSettings,\n dimensionsVisibility,\n hiddenLabelsElementId,\n isFakeStacked,\n orderedColors,\n setMinMax,\n shouldSmoothPlot,\n unitsCurrent,\n xAxisDateString,\n xAxisTimeString,\n}: GetInitialDygraphOptions) => {\n const isSparkline = attributes.dygraphTheme === \"sparkline\"\n const highlightCircleSize = isSparkline ? 3 : 4\n\n const isLogScale = (chartSettings.isLogScale as ((a: Attributes) => boolean))(attributes)\n const dygraphChartType = getDygraphChartType(attributes, chartData, chartMetadata, chartSettings)\n const {\n dygraphSmooth = dygraphChartType === \"line\"\n && !isSparkline,\n dygraphDrawAxis = true,\n legendPosition,\n } = attributes\n const isLegendOnBottom = legendPosition === \"bottom\"\n const {\n // destructuring with default values\n dygraphColors = orderedColors,\n dygraphRightGap = 5,\n dygraphShowRangeSelector = false,\n dygraphShowRoller = false,\n dygraphTitle = attributes.title || chartMetadata.title,\n dygraphTitleHeight = 19,\n dygraphLegend = \"always\",\n dygraphLabelsDiv = hiddenLabelsElementId,\n dygraphLabelsSeparateLine = true,\n dygraphIncludeZero = dygraphChartType === \"stacked\",\n dygraphShowZeroValues = true,\n dygraphShowLabelsOnHighLight = true,\n dygraphHideOverlayOnMouseOut = true,\n dygraphXRangePad = 0,\n dygraphYRangePad = 1,\n dygraphValueRange = [null, null],\n dygraphYLabelWidth = 12,\n // eslint-disable-next-line no-nested-ternary\n dygraphStrokeWidth = dygraphChartType === \"stacked\"\n ? 0.1\n : (dygraphSmooth === true\n ? 1.5\n : 0.7),\n\n dygraphStrokePattern,\n dygraphDrawPoints = false,\n dygraphDrawGapEdgePoints = true,\n dygraphConnectSeparatedPoints = false,\n dygraphPointSize = 1,\n dygraphStepPlot = false,\n dygraphStrokeBorderColor = window.NETDATA.themes.current.background,\n dygraphStrokeBorderWidth = 0,\n dygraphFillGraph = (dygraphChartType === \"area\" || dygraphChartType === \"stacked\"),\n dygraphFillAlpha = getDygraphFillAlpha(isFakeStacked, dygraphChartType),\n dygraphStackedGraph = dygraphChartType === \"stacked\" && !isFakeStacked,\n dygraphStackedGraphNanFill = \"none\",\n dygraphAxisLabelFontSize = 10,\n dygraphAxisLineColor = window.NETDATA.themes.current.axis,\n dygraphAxisLineWidth = 1.0,\n dygraphDrawGrid = true,\n dygraphGridLinePattern,\n dygraphGridLineWidth = 1.0,\n dygraphGridLineColor = window.NETDATA.themes.current.grid,\n dygraphMaxNumberWidth = 8,\n dygraphSigFigs,\n dygraphDigitsAfterDecimal = 2,\n dygraphHighlighCircleSize = highlightCircleSize,\n dygraphHighlightSeriesOpts,\n dygraphHighlightSeriesBackgroundAlpha,\n\n dygraphXPixelsPerLabel = 50,\n dygraphXAxisLabelWidth = 60,\n dygraphDrawXAxis = dygraphDrawAxis,\n dygraphYPixelsPerLabel = 15,\n dygraphYAxisLabelWidth = isLegendOnBottom ? 30 : 50,\n dygraphDrawYAxis = dygraphDrawAxis,\n } = attributes\n return {\n colors: isFakeStacked ? transformColors(reverse(dygraphColors)) : dygraphColors,\n\n // leave a few pixels empty on the right of the chart\n rightGap: isSparkline ? 0 : dygraphRightGap,\n showRangeSelector: dygraphShowRangeSelector,\n showRoller: dygraphShowRoller,\n title: isSparkline ? undefined : dygraphTitle,\n titleHeight: dygraphTitleHeight,\n legend: dygraphLegend, // we need this to get selection events\n labels: chartData.result.labels,\n labelsDiv: dygraphLabelsDiv,\n\n labelsSeparateLines: isSparkline ? true : dygraphLabelsSeparateLine,\n labelsShowZeroValues: isLogScale ? false : dygraphShowZeroValues,\n labelsKMB: false,\n labelsKMG2: false,\n showLabelsOnHighlight: dygraphShowLabelsOnHighLight,\n hideOverlayOnMouseOut: dygraphHideOverlayOnMouseOut,\n includeZero: dygraphIncludeZero,\n xRangePad: dygraphXRangePad,\n yRangePad: isSparkline ? 1 : dygraphYRangePad,\n valueRange: dygraphValueRange,\n ylabel: (isSparkline || isLegendOnBottom) ? undefined : unitsCurrent,\n yLabelWidth: (isSparkline || isLegendOnBottom) ? 0 : dygraphYLabelWidth,\n\n // the function to plot the chart\n plotter: (dygraphSmooth && shouldSmoothPlot) ? window.smoothPlotter : null,\n\n // The width of the lines connecting data points.\n // This can be used to increase the contrast or some graphs.\n strokeWidth: dygraphStrokeWidth,\n strokePattern: dygraphStrokePattern,\n\n // The size of the dot to draw on each point in pixels (see drawPoints).\n // A dot is always drawn when a point is \"isolated\",\n // i.e. there is a missing point on either side of it.\n // This also controls the size of those dots.\n drawPoints: dygraphDrawPoints,\n\n // Draw points at the edges of gaps in the data.\n // This improves visibility of small data segments or other data irregularities.\n drawGapEdgePoints: dygraphDrawGapEdgePoints,\n connectSeparatedPoints: isLogScale ? false : dygraphConnectSeparatedPoints,\n pointSize: dygraphPointSize,\n\n // enabling this makes the chart with little square lines\n stepPlot: dygraphStepPlot,\n\n // Draw a border around graph lines to make crossing lines more easily\n // distinguishable. Useful for graphs with many lines.\n strokeBorderColor: dygraphStrokeBorderColor,\n strokeBorderWidth: dygraphStrokeBorderWidth,\n fillGraph: dygraphFillGraph,\n fillAlpha: dygraphFillAlpha,\n stackedGraph: dygraphStackedGraph,\n stackedGraphNaNFill: dygraphStackedGraphNanFill,\n drawAxis: isSparkline ? false : dygraphDrawAxis,\n axisLabelFontSize: dygraphAxisLabelFontSize,\n axisLineColor: dygraphAxisLineColor,\n axisLineWidth: dygraphAxisLineWidth,\n drawGrid: isSparkline ? false : dygraphDrawGrid,\n gridLinePattern: dygraphGridLinePattern,\n gridLineWidth: dygraphGridLineWidth,\n gridLineColor: dygraphGridLineColor,\n maxNumberWidth: dygraphMaxNumberWidth,\n sigFigs: dygraphSigFigs,\n digitsAfterDecimal: dygraphDigitsAfterDecimal,\n highlightCircleSize: dygraphHighlighCircleSize,\n highlightSeriesOpts: dygraphHighlightSeriesOpts, // TOO SLOW: { strokeWidth: 1.5 },\n // TOO SLOW: (state.tmp.dygraph_chart_type === 'stacked')?0.7:0.5,\n highlightSeriesBackgroundAlpha: dygraphHighlightSeriesBackgroundAlpha,\n visibility: dimensionsVisibility,\n logscale: isLogScale,\n\n axes: {\n x: {\n pixelsPerLabel: dygraphXPixelsPerLabel,\n // unsufficient typings for Dygraph\n // @ts-ignore\n ticker: Dygraph.dateTicker,\n axisLabelWidth: dygraphXAxisLabelWidth,\n drawAxis: isSparkline ? false : dygraphDrawXAxis,\n axisLabelFormatter: (d: Date | number) => ((d as Date).toTimeString().startsWith(\"00:00:00\")\n ? xAxisDateString(d as Date)\n : xAxisTimeString(d as Date)\n ),\n },\n y: {\n logscale: isLogScale,\n pixelsPerLabel: dygraphYPixelsPerLabel,\n axisLabelWidth: dygraphYAxisLabelWidth,\n drawAxis: isSparkline ? false : dygraphDrawYAxis,\n // axisLabelFormatter is added on the updates\n axisLabelFormatter(y: Date | number) {\n const formatter = setMinMax([\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n this.axes_[0].extremeRange[0],\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n this.axes_[0].extremeRange[1],\n ]) as unknown as ((value: Date | number) => string)\n return formatter(y as number)\n },\n },\n },\n }\n}\n\ninterface Props {\n attributes: Attributes\n chartData: DygraphData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n chartLibrary: ChartLibraryName\n chartUuid: string\n colors: {\n [key: string]: string\n }\n dimensionsVisibility: boolean[]\n hasEmptyData: boolean\n hasLegend: boolean\n isRemotelyControlled: boolean\n onUpdateChartPanAndZoom: (arg: {\n after: number, before: number,\n callback: (after: number, before: number) => void,\n masterID: string,\n shouldNotExceedAvailableRange: boolean,\n }) => void\n orderedColors: string[]\n immediatelyDispatchPanAndZoom: () => void\n\n hoveredRow: number\n hoveredX: number | null\n setGlobalChartUnderlay: (arg: { after: number, before: number, masterID: string }) => void\n setHoveredX: (hoveredX: number | null, noMaster?: boolean) => void\n setMinMax: (minMax: TimeRange) => void\n unitsCurrent: string\n viewAfter: number\n viewBefore: number\n}\nexport const DygraphChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n chartLibrary,\n // colors,\n chartUuid,\n dimensionsVisibility,\n hasEmptyData,\n hasLegend,\n isRemotelyControlled,\n onUpdateChartPanAndZoom,\n orderedColors,\n immediatelyDispatchPanAndZoom,\n\n hoveredRow,\n hoveredX,\n setGlobalChartUnderlay,\n setHoveredX,\n setMinMax,\n unitsCurrent,\n viewAfter,\n viewBefore,\n}: Props) => {\n const globalChartUnderlay = useSelector(selectGlobalChartUnderlay)\n const selectedAlarm = useSelector(selectAlarm)\n const alarm = selectedAlarm?.chartId === chartData.id ? selectedAlarm : null\n\n const timezone = useSelector(selectTimezoneSetting)\n\n const { xAxisDateString, xAxisTimeString } = useDateTime()\n const chartSettings = chartLibrariesSettings[chartLibrary]\n const hiddenLabelsElementId = `${chartUuid}-hidden-labels-id`\n\n const dygraphChartType = getDygraphChartType(attributes, chartData, chartMetadata, chartSettings)\n // isFakeStacked - is a special mode for displaying stacked charts with both positive and negative\n // values. Dygraph.js doesn't support it so in this case we need to sum the values manually\n // and display the chart as \"area\" type, but with keeping all styling (fill etc.) properties\n // as in \"stacked\" type\n // because first values need to be \"on top\" (at least for positive values), the dimension order\n // needs to be reversed (in getDataForFakeStacked function and when assigning dimension colors)\n const isFakeStacked = chartData.min < 0 && dygraphChartType === \"stacked\"\n const dygraphFillAlpha = getDygraphFillAlpha(isFakeStacked, dygraphChartType)\n\n const chartElement = useRef<HTMLDivElement>(null)\n\n const updateChartPanOrZoom = useCallback(({\n after, before,\n callback,\n shouldNotExceedAvailableRange,\n }) => {\n onUpdateChartPanAndZoom({\n after,\n before,\n callback,\n masterID: chartUuid,\n shouldNotExceedAvailableRange,\n })\n }, [chartUuid, onUpdateChartPanAndZoom])\n\n // keep in ref to prevent additional updates\n const dygraphInstance = useRef<Dygraph | null>()\n // state.tmp.dygraph_user_action in old dashboard\n const latestIsUserAction = useRef(false)\n // state.tmp.dygraph_mouse_down in old dashboard\n const isMouseDown = useRef(false)\n // state.tmp.dygraph_highlight_after in old dashboard\n const dygraphHighlightAfter = useRef<null | number>(null)\n // state.dygraph_last_touch_move in old dashboard\n const dygraphLastTouchMove = useRef(0)\n // state.dygraph_last_touch_page_x in old dashboard\n const dygraphLastTouchPageX = useRef(0)\n // state.dygraph_last_touch_end in old dashboard\n const dygraphLastTouchEnd = useRef<undefined | number>()\n\n const dispatch = useDispatch()\n const isSyncPanAndZoom = useSelector(selectSyncPanAndZoom)\n\n const resetGlobalPanAndZoom = useCallback(() => {\n latestIsUserAction.current = false // prevent starting panAndZoom\n if (dygraphInstance.current) {\n // todo on toolbox reset click, do updateOptions({ dateWindow: null })\n // (issue existed also before rewrite)\n dygraphInstance.current.updateOptions({\n // reset dateWindow to the current\n // @ts-ignore external typings dont support null\n dateWindow: null,\n })\n }\n\n if (isSyncPanAndZoom) {\n dispatch(resetGlobalPanAndZoomAction())\n } else {\n dispatch(resetChartPanAndZoomAction({ id: chartUuid }))\n }\n }, [chartUuid, dispatch, isSyncPanAndZoom])\n\n const [isAlarmBadgeVisible, alarmBadgeRef, updateAlarmBadge] = useDygraphBadge() as any\n const [isHighlightBadgeVisible, highlightBadgeRef, updateHighlightBadge] = useDygraphBadge() as any\n\n // setGlobalChartUnderlay is using state from closure (chartData.after), so we need to have always\n // the newest callback. Unfortunately we cannot use Dygraph.updateOptions() (library restriction)\n // for interactionModel callbacks so we need to keep the callback in mutable ref\n const propsRef = useRef({\n alarm,\n chartData,\n globalChartUnderlay,\n hoveredX,\n immediatelyDispatchPanAndZoom,\n // put it to ref to prevent additional updateOptions() after creating dygraph\n resetGlobalPanAndZoom,\n setGlobalChartUnderlay,\n updateAlarmBadge,\n updateHighlightBadge,\n updateChartPanOrZoom,\n viewAfter,\n viewBefore,\n })\n\n const [\n isProceeded, precededChartRef, updatePrecededPosition,\n ] = useProceededChart(chartElement, propsRef)\n\n useLayoutEffect(() => {\n propsRef.current.alarm = alarm\n propsRef.current.chartData = chartData\n propsRef.current.hoveredX = hoveredX\n propsRef.current.immediatelyDispatchPanAndZoom = immediatelyDispatchPanAndZoom\n propsRef.current.globalChartUnderlay = globalChartUnderlay\n propsRef.current.resetGlobalPanAndZoom = resetGlobalPanAndZoom\n propsRef.current.setGlobalChartUnderlay = setGlobalChartUnderlay\n propsRef.current.updateAlarmBadge = updateAlarmBadge\n propsRef.current.updateHighlightBadge = updateHighlightBadge\n propsRef.current.updateChartPanOrZoom = updateChartPanOrZoom\n propsRef.current.viewAfter = viewAfter\n propsRef.current.viewBefore = viewBefore\n }, [alarm, chartData, globalChartUnderlay, hoveredX, immediatelyDispatchPanAndZoom,\n resetGlobalPanAndZoom, setGlobalChartUnderlay, updateAlarmBadge, updateHighlightBadge, updateChartPanOrZoom, viewAfter, viewBefore])\n\n const [localHighlight, setLocalHighlight] = useState<{before?: number, after?: number} | null>(null)\n\n const shouldSmoothPlot = useSelector(selectSmoothPlot)\n useLayoutEffect(() => {\n if (chartElement && chartElement.current && !dygraphInstance.current && !hasEmptyData) {\n const dygraphOptionsStatic = getInitialDygraphOptions({\n attributes,\n chartData,\n chartMetadata,\n chartSettings,\n dimensionsVisibility,\n hiddenLabelsElementId,\n isFakeStacked,\n orderedColors,\n setMinMax,\n shouldSmoothPlot,\n unitsCurrent,\n xAxisDateString,\n xAxisTimeString,\n })\n\n latestIsUserAction.current = false\n\n const dygraphOptions = {\n ...dygraphOptionsStatic,\n // set dateWindow on init - this is needed when chart is globalPanAndZoom-master\n // and user scrolls down/up so the chart hides and then unhides. This causes the chart\n // to re-create, but the data has additional padding which should be outside of\n // visible range\n dateWindow: [propsRef.current.viewAfter, propsRef.current.viewBefore],\n\n highlightCallback(\n event: MouseEvent, xval: number,\n ) {\n // todo\n // state.pauseChart()\n\n const newHoveredX = isMouseDown.current\n ? null\n : xval\n\n const currentHoveredX = propsRef.current.hoveredX\n if (newHoveredX !== currentHoveredX) {\n setHoveredX(newHoveredX)\n }\n },\n\n unhighlightCallback() {\n // todo\n // state.unpauseChart();\n if (propsRef.current.hoveredX !== null) {\n setHoveredX(null)\n }\n },\n drawCallback(dygraph: Dygraph) {\n // the user has panned the chart and this is called to re-draw the chart\n // 1. refresh this chart by adding data to it\n // 2. notify all the other charts about the update they need\n\n // to prevent an infinite loop (feedback), we use\n // state.tmp.dygraph_user_action\n // - when true, this is initiated by a user\n // - when false, this is feedback\n\n if (latestIsUserAction.current) {\n latestIsUserAction.current = false\n const xRange = dygraph.xAxisRange()\n const after = Math.round(xRange[0])\n const before = Math.round(xRange[1])\n\n if (isInRangeOfAvailableData({\n after, before, chartData: propsRef.current.chartData,\n })) {\n propsRef.current.updateChartPanOrZoom({ after, before })\n }\n }\n },\n zoomCallback: (minDate: number, maxDate: number) => {\n latestIsUserAction.current = true\n propsRef.current.updateChartPanOrZoom({ after: minDate, before: maxDate })\n },\n\n underlayCallback(canvas: CanvasRenderingContext2D, area: DygraphArea, g: Dygraph) {\n updatePrecededPosition(g)\n\n if (propsRef.current.alarm) {\n const { alarm: currentAlarm } = propsRef.current\n\n const alarmPosition = g.toDomXCoord(currentAlarm.when * 1000)\n const fillColor = getBorderColor(currentAlarm.status)\n const horizontalPadding = 3\n // use RAF, because dygraph doesn't provide any callback called after drawing the chart\n requestAnimationFrame(() => {\n canvas.fillStyle = fillColor\n const globalAlphaCache = canvas.globalAlpha\n canvas.globalAlpha = 0.7\n canvas.fillRect(alarmPosition - horizontalPadding, area.y, 2 * horizontalPadding, area.h)\n canvas.globalAlpha = globalAlphaCache\n })\n\n propsRef.current.updateAlarmBadge(\n propsRef.current.alarm,\n g,\n alarmPosition - horizontalPadding,\n )\n }\n\n const onMetricsCorralation = hasHashParam(\"metrics_correlation\")\n if (onMetricsCorralation && propsRef.current.globalChartUnderlay) {\n const { before, masterID } = propsRef.current.globalChartUnderlay\n\n if (masterID && masterID !== propsRef.current.chartData.id) {\n propsRef.current.updateHighlightBadge(false)\n } else {\n const horizontalPadding = 3\n\n propsRef.current.updateHighlightBadge(\n true,\n g,\n g.toDomXCoord(before),\n (pillRef, pillX, pillPosition, topMargin) => {\n pillRef.current.style.left = `${pillPosition + horizontalPadding}px`\n pillRef.current.style.top = topMargin\n }\n )\n }\n } else {\n propsRef.current.updateHighlightBadge(false)\n }\n\n // the chart is about to be drawn\n // this function renders global highlighted time-frame\n\n if (propsRef.current.globalChartUnderlay) {\n const { after, before } = propsRef.current.globalChartUnderlay\n\n if (after < before) {\n const HIGHLIGHT_HORIZONTAL_PADDING = 20\n const bottomLeft = g.toDomCoords(after, -HIGHLIGHT_HORIZONTAL_PADDING)\n const topRight = g.toDomCoords(before, HIGHLIGHT_HORIZONTAL_PADDING)\n\n const left = bottomLeft[0]\n const right = topRight[0]\n\n // eslint-disable-next-line no-param-reassign\n canvas.fillStyle = window.NETDATA.themes.current.highlight\n canvas.fillRect(left, area.y, right - left, area.h)\n }\n }\n },\n\n // interactionModel cannot be replaced with updateOptions(). we need to keep all changing\n // values and callbacks in mutable ref,\n interactionModel: {\n mousedown(event: MouseEvent, dygraph: Dygraph, context: any) {\n // Right-click should not initiate anything.\n if (event.button && event.button === 2) {\n return\n }\n\n latestIsUserAction.current = true\n isMouseDown.current = true\n context.initializeMouseDown(event, dygraph, context)\n\n // limit problematic dygraph's feature, more info above the function\n // eslint-disable-next-line no-param-reassign\n context.tarp.tarps = hackDygraphIFrameTarps(context.tarp.tarps)\n\n dispatch(setGlobalPauseAction())\n\n if (event.button && event.button === 1) {\n // middle mouse button\n\n if (event.shiftKey) {\n // panning\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startPan(event, dygraph, context)\n } else if (event.altKey || event.ctrlKey || event.metaKey) {\n // middle mouse button highlight\n dygraphHighlightAfter.current = dygraph.toDataXCoord(event.offsetX)\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n } else {\n // middle mouse button selection for zoom\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n }\n } else if (event.shiftKey) {\n // left mouse button selection for zoom (ZOOM)\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n } else if (event.altKey || event.ctrlKey || event.metaKey) {\n // left mouse button highlight\n dygraphHighlightAfter.current = dygraph.toDataXCoord(event.offsetX)\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n } else {\n // left mouse button dragging (PAN)\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startPan(event, dygraph, context)\n }\n },\n\n mousemove(event: MouseEvent, dygraph: Dygraph, context: any) {\n // if (state.tmp.dygraph_highlight_after !== null) {\n // else if (\n if (dygraphHighlightAfter.current !== null) {\n // highlight selection\n latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.moveZoom(event, dygraph, context)\n\n const onMetricsCorralation = hasHashParam(\"metrics_correlation\")\n if (onMetricsCorralation) {\n const before = dygraph.toDataXCoord(event.offsetX)\n const after = dygraphHighlightAfter.current\n if (before - after > 1000) { // more than a sec\n setLocalHighlight({\n after,\n before,\n })\n propsRef.current.updateHighlightBadge(\n true,\n dygraph,\n dygraph.toDomXCoord(before),\n (pillRef, pillX, pillPosition, topMargin) => {\n pillRef.current.style.left = `${pillPosition}px`\n pillRef.current.style.top = topMargin\n }\n )\n }\n }\n\n event.preventDefault()\n } else if (context.isPanning) {\n latestIsUserAction.current = true\n // eslint-disable-next-line no-param-reassign\n context.is2DPan = false\n // @ts-ignore\n Dygraph.movePan(event, dygraph, context)\n } else if (context.isZooming) {\n // @ts-ignore\n Dygraph.moveZoom(event, dygraph, context)\n }\n },\n\n mouseup(event: MouseEvent, dygraph: Dygraph, context: any) {\n isMouseDown.current = false\n if (dygraphHighlightAfter.current !== null) {\n const sortedRange = sortBy((x) => +x, [\n dygraphHighlightAfter.current,\n dygraph.toDataXCoord(event.offsetX),\n ])\n\n propsRef.current.setGlobalChartUnderlay({\n after: sortedRange[0],\n before: sortedRange[1],\n masterID: chartData.id,\n })\n dygraphHighlightAfter.current = null\n setLocalHighlight(null)\n // eslint-disable-next-line no-param-reassign\n context.isZooming = false\n\n // old dashboard code\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n dygraph.clearZoomRect_()\n // this call probably fixes the broken selection circle during highlighting\n // and forces underlayCallback to fire (and draw highlight-rect\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n dygraph.drawGraph_(false)\n } else if (context.isPanning) {\n\n latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.endPan(event, dygraph, context)\n propsRef.current.immediatelyDispatchPanAndZoom()\n } else if (context.isZooming) {\n\n latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.endZoom(event, dygraph, context)\n propsRef.current.immediatelyDispatchPanAndZoom()\n }\n },\n\n wheel(event: WheelEvent, dygraph: Dygraph) {\n // Take the offset of a mouse event on the dygraph canvas and\n // convert it to a pair of percentages from the bottom left.\n // (Not top left, bottom is where the lower value is.)\n function offsetToPercentage(g: Dygraph, offsetX: number, offsetY: number) {\n // This is calculating the pixel offset of the leftmost date.\n const xOffset = g.toDomXCoord(g.xAxisRange()[0])\n const yar0 = g.yAxisRange(0)\n\n // This is calculating the pixel of the highest value. (Top pixel)\n const yOffset = g.toDomYCoord(yar0[1])\n\n // x y w and h are relative to the corner of the drawing area,\n // so that the upper corner of the drawing area is (0, 0).\n const x = offsetX - xOffset\n const y = offsetY - yOffset\n\n // This is computing the rightmost pixel, effectively defining the\n // width.\n // const w = g.toDomCoords(g.xAxisRange()[1], null)[0] - xOffset\n const w = g.toDomXCoord(g.xAxisRange()[1]) - xOffset\n\n // This is computing the lowest pixel, effectively defining the height.\n // const h = g.toDomCoords(null, yar0[0])[1] - yOffset\n const h = g.toDomYCoord(yar0[0]) - yOffset\n\n // Percentage from the left.\n const xPct = w === 0 ? 0 : (x / w)\n // Percentage from the top.\n const yPct = h === 0 ? 0 : (y / h)\n\n // The (1-) part below changes it from \"% distance down from the top\"\n // to \"% distance up from the bottom\".\n return [xPct, (1 - yPct)]\n }\n\n function adjustAxis(axis: [number, number], zoomInPercentage: number, bias: number) {\n const delta = axis[1] - axis[0]\n const increment = delta * zoomInPercentage\n const foo = [increment * bias, increment * (1 - bias)]\n\n return [axis[0] + foo[0], axis[1] - foo[1]]\n }\n\n // Adjusts [x, y] toward each other by zoomInPercentage%\n // Split it so the left/bottom axis gets xBias/yBias of that change and\n // tight/top gets (1-xBias)/(1-yBias) of that change.\n //\n // If a bias is missing it splits it down the middle.\n function zoomRange(g: Dygraph, zoomInPercentage: number, xBias: number, yBias: number) {\n const yAxes = g.yAxisRanges()\n const newYAxes = []\n for (let i = 0; i < yAxes.length; i += 1) {\n newYAxes[i] = adjustAxis(yAxes[i], zoomInPercentage, (yBias || 0.5))\n }\n\n return adjustAxis(g.xAxisRange(), zoomInPercentage, (xBias || 0.5))\n }\n\n if (event.altKey || event.shiftKey) {\n latestIsUserAction.current = true\n\n // http://dygraphs.com/gallery/interaction-api.js\n let normalDef\n // @ts-ignore\n if (typeof event.wheelDelta === \"number\" && !Number.isNaN(event.wheelDelta)) {\n // chrome\n // @ts-ignore\n normalDef = event.wheelDelta / 40\n } else {\n // firefox\n normalDef = event.deltaY * -1.2\n }\n\n const normal = (event.detail) ? event.detail * -1 : normalDef\n const percentage = normal / 50\n\n const percentages = offsetToPercentage(dygraph, event.offsetX, event.offsetY)\n const xPct = percentages[0]\n const yPct = percentages[1]\n\n const [after, before] = zoomRange(dygraph, percentage, xPct, yPct)\n\n propsRef.current.updateChartPanOrZoom({\n after,\n before,\n shouldNotExceedAvailableRange: true,\n callback: (updatedAfter: number, updatedBefore: number) => {\n dygraph.updateOptions({\n dateWindow: [updatedAfter, updatedBefore],\n })\n },\n })\n\n event.preventDefault()\n }\n },\n\n click(event: MouseEvent) {\n event.preventDefault()\n },\n\n dblclick() {\n dispatch(resetGlobalPauseAction({ forcePlay: false }))\n propsRef.current.resetGlobalPanAndZoom()\n },\n\n touchstart(event: TouchEvent, dygraph: Dygraph, context: any) {\n isMouseDown.current = true\n latestIsUserAction.current = true\n\n // todo\n // state.pauseChart()\n\n Dygraph.defaultInteractionModel.touchstart(event, dygraph, context)\n\n // we overwrite the touch directions at the end, to overwrite\n // the internal default of dygraph\n // eslint-disable-next-line no-param-reassign\n context.touchDirections = { x: true, y: false }\n\n dygraphLastTouchMove.current = 0\n\n if (typeof event.touches[0].pageX === \"number\") {\n dygraphLastTouchPageX.current = event.touches[0].pageX\n } else {\n dygraphLastTouchPageX.current = 0\n }\n },\n touchmove(event: TouchEvent, dygraph: Dygraph, context: any) {\n latestIsUserAction.current = true\n Dygraph.defaultInteractionModel.touchmove(event, dygraph, context)\n\n dygraphLastTouchMove.current = Date.now()\n },\n\n touchend(event: TouchEvent, dygraph: Dygraph, context: any) {\n isMouseDown.current = false\n latestIsUserAction.current = true\n Dygraph.defaultInteractionModel.touchend(event, dygraph, context)\n\n // if it didn't move, it is a selection\n if (dygraphLastTouchMove.current === 0 && dygraphLastTouchPageX.current !== 0\n && chartElement.current // this is just for TS\n ) {\n latestIsUserAction.current = false // prevent updating pan-and-zoom\n // internal api of dygraph\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n const dygraphPlotter = dygraph.plotter_\n const pct = (dygraphLastTouchPageX.current - (\n dygraphPlotter.area.x + chartElement.current.getBoundingClientRect().left\n )) / dygraphPlotter.area.w\n\n const { current } = propsRef\n const t = Math.round(current.viewAfter\n + (current.viewBefore - current.viewAfter) * pct)\n // dont set \"master\" so the highlight is recalculated (to match existing row)\n setHoveredX(t, true)\n }\n\n // if it was double tap within double click time, reset the charts\n const now = Date.now()\n if (typeof dygraphLastTouchEnd.current !== \"undefined\") {\n if (dygraphLastTouchMove.current === 0) {\n const dt = now - dygraphLastTouchEnd.current\n if (dt <= window.NETDATA.options.current.double_click_speed) {\n propsRef.current.resetGlobalPanAndZoom()\n }\n }\n }\n\n // remember the timestamp of the last touch end\n dygraphLastTouchEnd.current = now\n propsRef.current.immediatelyDispatchPanAndZoom()\n },\n },\n }\n\n const data = isFakeStacked\n ? getDataForFakeStacked(chartData.result.data, dimensionsVisibility)\n : chartData.result.data\n const instance = new Dygraph((chartElement.current), data, dygraphOptions)\n dygraphInstance.current = instance\n }\n }, [attributes, chartData, chartMetadata, chartSettings, chartUuid, dimensionsVisibility,\n hasEmptyData, hiddenLabelsElementId, isFakeStacked,\n orderedColors, setHoveredX, setMinMax, shouldSmoothPlot, unitsCurrent,\n xAxisDateString, xAxisTimeString, updatePrecededPosition, dispatch])\n\n useUpdateEffect(() => {\n if (dygraphInstance.current) {\n const isSparkline = attributes.dygraphTheme === \"sparkline\"\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n dygraphInstance.current.updateOptions({\n ylabel: (isSparkline || isLegendOnBottom) ? undefined : unitsCurrent,\n })\n }\n }, [attributes, unitsCurrent])\n\n\n // immediately update when changing global chart underlay or currently showed alarm\n useUpdateEffect(() => {\n if (dygraphInstance.current) {\n dygraphInstance.current.updateOptions({})\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alarm, globalChartUnderlay])\n\n const spacePanelTransitionEndIsActive = useSelector(selectSpacePanelTransitionEndIsActive)\n useUpdateEffect(() => {\n if (dygraphInstance.current) {\n // dygraph always resizes on browser width change, but doesn't resize when the container\n // has different width.\n window.requestAnimationFrame(() => {\n if (dygraphInstance.current) {\n (dygraphInstance.current as NetdataDygraph).resize()\n }\n })\n }\n }, [spacePanelTransitionEndIsActive])\n\n // update data of the chart\n // first effect should only be made by new DygraphInstance()\n useUpdateEffect(() => {\n // dont update when there is no data - in this case we should still show old chart\n if (dygraphInstance.current && !hasEmptyData) {\n // todo support state.tmp.dygraph_force_zoom\n const forceDateWindow = [viewAfter, viewBefore]\n\n // in old dashboard, when chart needed to reset internal dateWindow state,\n // dateWindow was set to null, and new dygraph got the new dateWindow from results.\n // this caused small unsync between dateWindow of parent (master) and child charts\n // i also detected that forceDateWindow timestamps have slightly better performance (10%)\n // so if the chart needs to change local dateWindow, we'll always use timestamps instead of\n // null.\n\n const xAxisRange = dygraphInstance.current.xAxisRange()\n // eslint-disable-next-line max-len\n const hasChangedDuration = Math.abs((viewBefore - viewAfter) - (xAxisRange[1] - xAxisRange[0])) > timeframeThreshold\n\n // check if the time is relative\n const hasScrolledToTheFutureDuringPlayMode = viewBefore <= 0\n && (xAxisRange[1] > viewBefore)\n // if viewAfter is bigger than current dateWindow start, just reset dateWindow\n && (xAxisRange[0] > viewAfter)\n && !hasChangedDuration\n\n const optionsDateWindow = (isRemotelyControlled && !hasScrolledToTheFutureDuringPlayMode)\n ? { dateWindow: forceDateWindow }\n : {}\n\n const { dygraphColors = orderedColors } = attributes\n const file = isFakeStacked\n ? getDataForFakeStacked(chartData.result.data, dimensionsVisibility)\n : chartData.result.data\n\n const includeZero = dimensionsVisibility.length === 1 ||\n dimensionsVisibility.filter(x => x === true).length > 1\n\n dygraphInstance.current.updateOptions({\n ...optionsDateWindow,\n colors: isFakeStacked ? transformColors(reverse(dygraphColors)) : dygraphColors,\n file,\n labels: chartData.result.labels,\n fillAlpha: dygraphFillAlpha,\n ...(dygraphChartType === \"stacked\" ? { includeZero } : {}),\n stackedGraph: dygraphChartType === \"stacked\" && !isFakeStacked,\n // see explanation about reversing before isFakeStacked assignment\n visibility: isFakeStacked ? reverse(dimensionsVisibility) : dimensionsVisibility,\n })\n }\n }, [attributes, chartData.result, chartUuid, dimensionsVisibility, dygraphChartType,\n dygraphFillAlpha, hasEmptyData, isFakeStacked, isRemotelyControlled, orderedColors,\n viewAfter, viewBefore])\n\n useUpdateEffect(() => {\n if (!dygraphInstance.current) {\n return\n }\n\n const dygraphOptionsStatic = getInitialDygraphOptions({\n attributes,\n chartData,\n chartMetadata,\n chartSettings,\n dimensionsVisibility,\n hiddenLabelsElementId,\n isFakeStacked,\n orderedColors,\n setMinMax,\n shouldSmoothPlot,\n unitsCurrent,\n xAxisDateString,\n xAxisTimeString,\n })\n if (!hasEmptyData) dygraphInstance.current.updateOptions(dygraphOptionsStatic)\n }, [dygraphChartType, timezone])\n\n // set selection\n const currentSelectionMasterId = useSelector(selectGlobalSelectionMaster)\n useLayoutEffect(() => {\n if (dygraphInstance.current && currentSelectionMasterId !== chartUuid) {\n if (hoveredRow === -1) {\n // getSelection is 100 times faster that clearSelection\n if (dygraphInstance.current.getSelection() !== -1) {\n dygraphInstance.current.clearSelection()\n }\n return\n }\n dygraphInstance.current.setSelection(hoveredRow)\n }\n }, [chartData, chartUuid, currentSelectionMasterId, hoveredRow,\n viewAfter, viewBefore])\n\n\n // handle resizeHeight change\n const resizeHeight = useSelector(\n (state: AppStateT) => selectResizeHeight(state, { id: chartUuid }),\n )\n useLayoutEffect(() => {\n if (dygraphInstance.current) {\n (dygraphInstance.current as NetdataDygraph).resize()\n }\n }, [resizeHeight, chartData.dimension_names.length])\n\n\n const commonMinState = useSelector((state: AppStateT) => (\n attributes.commonMin\n ? selectCommonMin(state, attributes.commonMin)\n : undefined\n ))\n const commonMaxState = useSelector((state: AppStateT) => (\n attributes.commonMax\n ? selectCommonMax(state, attributes.commonMax)\n : undefined\n ))\n\n useLayoutEffect(() => {\n const { commonMin: commonMinKey, commonMax: commonMaxKey } = attributes\n\n if (\n dygraphInstance.current\n && (commonMinKey || commonMaxKey)\n ) {\n const extremes = (dygraphInstance.current as NetdataDygraph).yAxisExtremes()[0]\n const [currentMin, currentMax] = extremes\n\n const {\n dygraphValueRange = [null, null],\n } = attributes\n // if the user gave a valueRange, respect it\n const shouldUseCommonMin = dygraphValueRange[0] === null\n const shouldUseCommonMax = dygraphValueRange[1] === null\n\n\n let shouldUpdate = false\n let valueRange: number[] = [...extremes]\n\n // check if current extreme (painted by dygraph) is not more extreme than commonMin/Max\n // if yes - update the chart\n if (commonMinKey && shouldUseCommonMin) {\n if (commonMinState && commonMinState.currentExtreme < currentMin) {\n valueRange[0] = commonMinState.currentExtreme\n shouldUpdate = true\n }\n }\n if (commonMaxKey && shouldUseCommonMax) {\n if (commonMaxState && commonMaxState.currentExtreme > currentMax) {\n valueRange[1] = commonMaxState.currentExtreme\n shouldUpdate = true\n }\n }\n\n if (shouldUpdate) {\n dygraphInstance.current.updateOptions({ valueRange })\n const newExtremes = (dygraphInstance.current as NetdataDygraph).yAxisExtremes()[0]\n // get updated valueRange (rounded by dygraph)\n valueRange = [...newExtremes]\n }\n\n // if the value is different than the one stored in state, update redux state\n if (commonMinKey && shouldUseCommonMin\n && (valueRange[0] !== commonMinState?.charts[chartUuid])\n ) {\n dispatch(setCommonMinAction({ chartUuid, commonMinKey, value: valueRange[0] }))\n }\n if (commonMaxKey && shouldUseCommonMax\n && (valueRange[1] !== commonMaxState?.charts[chartUuid])\n ) {\n dispatch(setCommonMaxAction({ chartUuid, commonMaxKey, value: valueRange[1] }))\n }\n }\n }, [attributes, chartData.result, chartUuid, commonMinState, commonMaxState, dispatch])\n\n useLayoutEffect(() => {\n if (isProceeded && dygraphInstance.current) {\n updatePrecededPosition(dygraphInstance.current)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isProceeded])\n\n useUnmount(() => {\n if (dygraphInstance.current) {\n dygraphInstance.current.destroy()\n }\n })\n\n /**\n * resize with ResizeObserver\n */\n const resizeObserver = useRef<ResizeObserver>()\n useMount(() => {\n if (!attributes.detectResize) {\n return\n }\n // flag used to prevent first callback (and resize) on dygraph initial draw\n let hasOmitedFirstCallback = false\n const callbackDebounced = debounce(() => {\n if (!hasOmitedFirstCallback) {\n hasOmitedFirstCallback = true\n return\n }\n\n if (dygraphInstance.current) {\n (dygraphInstance.current as NetdataDygraph).resize()\n }\n }, dygraphResizeDebounceTime)\n\n resizeObserver.current = new ResizeObserver(() => {\n callbackDebounced()\n })\n resizeObserver.current.observe(chartElement.current as HTMLDivElement)\n })\n\n useUnmount(() => {\n dygraphInstance.current = null // clear it for debounce purposes\n if (resizeObserver.current) {\n resizeObserver.current.disconnect()\n }\n })\n\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n\n return (\n <>\n <div\n ref={chartElement}\n id={chartElementId}\n className={classNames(\n chartElementClassName,\n { \"dygraph-chart--legend-bottom\": isLegendOnBottom },\n )}\n />\n {isProceeded && hasLegend && (\n <ProceededChartDisclaimer ref={precededChartRef as React.Ref<HTMLDivElement>} />\n )}\n {alarm?.value && hasLegend && (\n // @ts-ignore\n <AlarmBadge isVisible={isAlarmBadgeVisible} ref={alarmBadgeRef} status={alarm.status} label={alarm.value} />\n )}\n {hasLegend && (\n // @ts-ignore\n <NeutralPill isVisible={isHighlightBadgeVisible} ref={highlightBadgeRef} {...globalChartUnderlay} {...localHighlight} />\n )}\n <div className=\"dygraph-chart__labels-hidden\" id={hiddenLabelsElementId} />\n </>\n )\n}\n","// https://gist.github.com/ca0v/73a31f57b397606c9813472f7493a940\n\nexport const debounce = <F extends (...args: any[]) => any>(func: F, waitFor: number) => {\n let timeout: ReturnType<typeof setTimeout> | null = null\n\n const debounced = (...args: Parameters<F>) => {\n if (timeout !== null) {\n clearTimeout(timeout)\n timeout = null\n }\n timeout = setTimeout(() => func(...args), waitFor)\n }\n\n return debounced as (...args: Parameters<F>) => ReturnType<F>\n}\n","import React, { useRef, useEffect, useState } from \"react\"\n// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport EasyPie from \"easy-pie-chart\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { ChartLibraryName } from \"domains/chart/utils/chartLibrariesSettings\"\nimport {\n always, cond, identity, T, sortBy, map, pipe,\n} from \"ramda\"\n\ntype GetPercentFromValueMinMax = (arg: {\n value: number | undefined\n min: number | undefined\n max: number | undefined\n isMinOverride: boolean\n isMaxOverride: boolean\n}) => number\nconst getPercentFromValueMinMax: GetPercentFromValueMinMax = ({\n value = 0, min = 0, max = 0,\n isMinOverride,\n isMaxOverride,\n}) => {\n /* eslint-disable no-param-reassign */\n // todo refractor old logic to readable functions\n // if no easyPiechart-min-value attribute\n if (!isMinOverride && min > 0) {\n min = 0\n }\n if (!isMaxOverride && max < 0) {\n max = 0\n }\n\n let pcent\n\n if (min < 0 && max > 0) {\n // it is both positive and negative\n // zero at the top center of the chart\n max = (-min > max) ? -min : max\n pcent = Math.round((value * 100) / max)\n } else if (value >= 0 && min >= 0 && max >= 0) {\n // clockwise\n pcent = Math.round(((value - min) * 100) / (max - min))\n if (pcent === 0) {\n pcent = 0.1\n }\n } else {\n // counter clockwise\n pcent = Math.round(((value - max) * 100) / (max - min))\n if (pcent === 0) {\n pcent = -0.1\n }\n }\n /* eslint-enable no-param-reassign */\n return pcent\n}\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n chartLibrary: ChartLibraryName\n chartUuid: string\n colors: {\n [key: string]: string\n }\n chartWidth: number\n dimensionsVisibility: boolean[]\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n onUpdateChartPanAndZoom: (arg: {\n after: number, before: number,\n callback: (after: number, before: number) => void,\n masterID: string,\n shouldNotExceedAvailableRange: boolean,\n }) => void\n orderedColors: string[]\n\n hoveredRow: number\n setGlobalChartUnderlay: (arg: { after: number, before: number, masterID: string }) => void\n setMinMax: (minMax: [number, number]) => void\n showUndefined: boolean\n unitsCurrent: string\n viewAfter: number\n viewBefore: number\n}\nexport const EasyPieChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n chartWidth,\n hoveredRow,\n legendFormatValue,\n orderedColors,\n setMinMax,\n showUndefined,\n unitsCurrent,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n const [chartInstance, setChartInstance] = useState()\n\n const valueIndex = hoveredRow === -1\n ? 0\n : (chartData.result.length - 1 - hoveredRow) // because data for easy-pie-chart are flipped\n const value = showUndefined ? null : chartData.result[valueIndex]\n\n const {\n // if this is set, then we're overriding commonMin\n easyPieChartMinValue: min = chartData.min, // todo replace with commonMin\n easyPieChartMaxValue: max = chartData.max, // todo replace with commonMax\n } = attributes\n\n // make sure the order is correct and that value is not outside those boundaries\n // (this check was present in old dashboard but perhaps it's not needed)\n const safeMinMax = pipe(\n map((x: number) => +x),\n sortBy(identity),\n ([_min, _max]: number[]) => [Math.min(_min, value || 0), Math.max(_max, value || 0)],\n )([min, max])\n\n useEffect(() => {\n setMinMax(safeMinMax as [number, number])\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [safeMinMax])\n\n const pcent = getPercentFromValueMinMax({\n value: showUndefined ? 0 : (value as number),\n min: safeMinMax[0],\n max: safeMinMax[1],\n isMinOverride: attributes.easyPieChartMinValue !== undefined,\n isMaxOverride: attributes.easyPieChartMaxValue !== undefined,\n })\n\n useEffect(() => {\n if (chartElement.current && !chartInstance) {\n const stroke = cond([\n [(v) => v < 3, always(2)],\n [T, identity],\n ])(Math.floor(chartWidth / 22))\n\n const {\n easyPieChartTrackColor = window.NETDATA.themes.current.easypiechart_track,\n easyPieChartScaleColor = window.NETDATA.themes.current.easypiechart_scale,\n easyPieChartScaleLength = 5,\n easyPieChartLineCap = \"round\",\n easyPieChartLineWidth = stroke,\n easyPieChartTrackWidth,\n easyPieChartSize = chartWidth,\n easyPieChartRotate = 0,\n easyPieChartAnimate = { duration: 500, enabled: true },\n easyPieChartEasing,\n } = attributes\n\n const newChartInstance = new EasyPie(chartElement.current, {\n barColor: orderedColors[0],\n trackColor: easyPieChartTrackColor,\n scaleColor: easyPieChartScaleColor,\n scaleLength: easyPieChartScaleLength,\n lineCap: easyPieChartLineCap,\n lineWidth: easyPieChartLineWidth,\n trackWidth: easyPieChartTrackWidth,\n size: easyPieChartSize,\n rotate: easyPieChartRotate,\n animate: easyPieChartAnimate,\n easing: easyPieChartEasing,\n })\n setChartInstance(newChartInstance)\n }\n }, [attributes, chartData, chartInstance, chartWidth, orderedColors])\n\n // update with value\n useEffect(() => {\n if (chartInstance) {\n const shouldUseAnimation = hoveredRow === -1 && !showUndefined\n\n if (shouldUseAnimation && !chartInstance.options.animate.enabled) {\n chartInstance.enableAnimation()\n } else if (!shouldUseAnimation && chartInstance.options.animate.enabled) {\n chartInstance.disableAnimation()\n }\n\n setTimeout(() => {\n // need to be in timeout to trigger animation properly\n chartInstance.update(pcent)\n }, 0)\n }\n }, [chartInstance, hoveredRow, pcent, showUndefined])\n\n const valueFontSize = (chartWidth * 2) / 3 / 5\n const valuetop = Math.round((chartWidth - valueFontSize - (chartWidth / 40)) / 2)\n\n const titleFontSize = Math.round((valueFontSize * 1.6) / 3)\n const titletop = Math.round(valuetop - (titleFontSize * 2) - (chartWidth / 40))\n\n const unitFontSize = Math.round(titleFontSize * 0.9)\n const unitTop = Math.round(valuetop + (valueFontSize + unitFontSize) + (chartWidth / 40))\n // to update, just label innerText and pcent are changed\n\n return (\n <div ref={chartElement} id={chartElementId} className={chartElementClassName}>\n <span\n className=\"easyPieChartLabel\"\n style={{\n fontSize: valueFontSize,\n top: valuetop,\n }}\n >\n {legendFormatValue(value)}\n </span>\n <span\n className=\"easyPieChartTitle\"\n style={{\n fontSize: titleFontSize,\n top: titletop,\n }}\n >\n {attributes.title || chartMetadata.title}\n </span>\n <span\n className=\"easyPieChartUnits\"\n style={{\n fontSize: unitFontSize,\n top: unitTop,\n }}\n >\n {unitsCurrent}\n </span>\n\n </div>\n )\n}\n","import React, {\n useRef, useEffect, useState,\n} from \"react\"\n// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport { Gauge } from \"gaugeJS\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { ChartLibraryName } from \"domains/chart/utils/chartLibrariesSettings\"\nimport {\n identity, sortBy, map, pipe, always,\n} from \"ramda\"\n\nconst isSetByUser = (x: undefined | number): x is number => (\n typeof x === \"number\"\n)\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n chartLibrary: ChartLibraryName\n chartUuid: string\n colors: {\n [key: string]: string\n }\n chartHeight: number\n chartWidth: number\n dimensionsVisibility: boolean[]\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n onUpdateChartPanAndZoom: (arg: {\n after: number, before: number,\n callback: (after: number, before: number) => void,\n masterID: string,\n shouldNotExceedAvailableRange: boolean,\n }) => void\n orderedColors: string[]\n\n hoveredRow: number\n hoveredX: number | null\n setGlobalChartUnderlay: (arg: { after: number, before: number, masterID: string }) => void\n setHoveredX: (hoveredX: number | null, noMaster?: boolean) => void\n setMinMax: (minMax: [number, number]) => void\n showUndefined: boolean\n unitsCurrent: string\n viewAfter: number\n viewBefore: number\n}\nexport const GaugeChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n chartUuid,\n chartHeight,\n chartWidth,\n hoveredRow,\n legendFormatValue,\n orderedColors,\n setMinMax,\n showUndefined,\n unitsCurrent,\n}: Props) => {\n const chartCanvasElement = useRef<HTMLCanvasElement>(null)\n const [chartInstance, setChartInstance] = useState()\n\n const valueIndex = hoveredRow === -1\n ? 0\n : (chartData.result.length - 1 - hoveredRow) // because data for easy-pie-chart are flipped\n const value = chartData.result[valueIndex]\n\n const {\n // if this is set, then we're overriding commonMin\n gaugeMinValue: minAttribute,\n gaugeMaxValue: maxAttribute,\n } = attributes\n\n const min = isSetByUser(minAttribute) ? minAttribute : chartData.min\n const max = isSetByUser(maxAttribute) ? maxAttribute : chartData.max\n // we should use minAttribute if it's existing\n // old app was using commonMin\n\n // make sure the order is correct and that value is not outside those boundaries\n // (this check was present in old dashboard but perhaps it's not needed)\n const [safeMin, safeMax] = pipe(\n // if they are attributes, make sure they're converted to numbers\n map((x: number) => +x),\n // make sure it is zero based\n // but only if it has not been set by the user\n ([_min, _max]: number[]) => [\n (!isSetByUser(minAttribute) && _min > 0) ? 0 : _min,\n (!isSetByUser(maxAttribute) && _max < 0) ? 0 : _max,\n ],\n // make sure min <= max\n sortBy(identity),\n ([_min, _max]: number[]) => [Math.min(_min, value), Math.max(_max, value)],\n )([min, max])\n // calling outside \"useEffect\" intentionally,\n // because it should update the values first, and only then render the chart in useEffect()\n useEffect(() => {\n setMinMax([safeMin, safeMax])\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [safeMin, safeMax])\n\n const pcent = pipe(\n always(((value - safeMin) * 100) / (safeMax - safeMin)),\n // bug fix for gauge.js 1.3.1\n // if the value is the absolute min or max, the chart is broken\n (_pcent: number) => Math.max(0.001, _pcent),\n (_pcent: number) => Math.min(99.999, _pcent),\n )()\n\n useEffect(() => {\n if (chartCanvasElement.current && !chartInstance) {\n const {\n gaugePointerColor = window.NETDATA.themes.current.gauge_pointer,\n gaugeStrokeColor = window.NETDATA.themes.current.gauge_stroke,\n gaugeStartColor = orderedColors[0],\n gaugeStopColor,\n gaugeGenerateGradient = false,\n } = attributes\n\n const options = {\n lines: 12, // The number of lines to draw\n angle: 0.14, // The span of the gauge arc\n lineWidth: 0.57, // The line thickness\n radiusScale: 1.0, // Relative radius\n pointer: {\n length: 0.85, // 0.9 The radius of the inner circle\n strokeWidth: 0.045, // The rotation offset\n color: gaugePointerColor, // Fill color\n },\n\n // If false, the max value of the gauge will be updated if value surpass max\n // If true, the min value of the gauge will be fixed unless you set it manually\n limitMax: true,\n limitMin: true,\n colorStart: gaugeStartColor,\n colorStop: gaugeStopColor,\n strokeColor: gaugeStrokeColor,\n generateGradient: (gaugeGenerateGradient === true), // gmosx:\n gradientType: 0,\n highDpiSupport: true, // High resolution support\n }\n\n const newChartInstance = new Gauge(chartCanvasElement.current).setOptions(options)\n\n // we will always feed a percentage (copied from old dashboard)\n newChartInstance.minValue = 0\n newChartInstance.maxValue = 100\n\n setChartInstance(newChartInstance)\n }\n }, [attributes, chartData, chartInstance, chartWidth, orderedColors])\n\n // update with value\n useEffect(() => {\n if (chartInstance) {\n // gauge animation\n const shouldUseAnimation = hoveredRow === -1 && !showUndefined\n // animation doesn't work in newest, 1.3.7 version!\n const speed = shouldUseAnimation ? 32 : 1000000000\n chartInstance.animationSpeed = speed\n setTimeout(() => {\n chartInstance.set(showUndefined ? 0 : pcent)\n }, 0)\n }\n }, [chartInstance, chartHeight, chartWidth, hoveredRow, pcent, showUndefined])\n\n const valueFontSize = Math.floor(chartHeight / 5)\n const valueTop = Math.round((chartHeight - valueFontSize) / 3.2)\n\n const titleFontSize = Math.round(valueFontSize / 2.1)\n const titleTop = 0\n\n const unitFontSize = Math.round(titleFontSize * 0.9)\n\n const minMaxFontSize = Math.round(valueFontSize * 0.75)\n return (\n <div\n id={chartElementId}\n className={chartElementClassName}\n >\n <canvas\n ref={chartCanvasElement}\n className=\"gaugeChart\"\n id={`gauge-${chartUuid}-canvas`}\n style={{\n width: chartWidth,\n height: chartHeight,\n }}\n />\n <span\n className=\"gaugeChartLabel\"\n style={{\n fontSize: valueFontSize,\n top: valueTop,\n }}\n >\n {legendFormatValue(showUndefined ? null : value)}\n </span>\n <span\n className=\"gaugeChartTitle\"\n style={{\n fontSize: titleFontSize,\n top: titleTop,\n }}\n >\n {attributes.title || chartMetadata.title}\n </span>\n <span\n className=\"gaugeChartUnits\"\n style={{\n fontSize: unitFontSize,\n }}\n >\n {unitsCurrent}\n </span>\n <span className=\"gaugeChartMin\" style={{ fontSize: minMaxFontSize }}>\n {legendFormatValue(showUndefined ? null : safeMin)}\n </span>\n <span className=\"gaugeChartMax\" style={{ fontSize: minMaxFontSize }}>\n {legendFormatValue(showUndefined ? null : safeMax)}\n </span>\n </div>\n )\n}\n","import {\n cond, identity, map, pipe, replace, splitEvery, T, toString,\n} from \"ramda\"\n\ntype NormalizeHex = (hex: string) => string\nexport const normalizeHex: NormalizeHex = pipe(\n toString,\n replace(/[^0-9a-f]/gi, \"\"),\n cond([\n [(str) => str.length < 6, (str) => str[0] + str[0] + str[1] + str[1] + str[2] + str[2]],\n [T, identity],\n ]),\n)\n\nexport const colorLuminance = (hex: string, lum: number = 0) => {\n const hexNormalized = normalizeHex(hex)\n\n // convert to decimal and change luminosity\n const rgb = pipe(\n // point-free version generates ts error\n (str: string) => splitEvery(2, str),\n map(\n pipe(\n (str: string) => parseInt(str, 16),\n (nr) => Math.round(\n Math.min(\n Math.max(0, nr + (nr * lum)),\n 255,\n ),\n ).toString(16),\n (str) => `00${str}`.substr(str.length),\n ),\n ),\n (x) => x.join(\"\"),\n )(hexNormalized)\n return `#${rgb}`\n}\n","/* eslint-disable indent */\n/* eslint-disable operator-linebreak */\n/* eslint-disable comma-dangle */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable consistent-return */\nimport \"jquery-sparkline\"\nimport React, { useRef, useEffect, useState } from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { colorLuminance } from \"domains/chart/utils/color-luminance\"\nimport { MS_IN_SECOND } from \"utils/utils\"\nimport { TimeRange } from \"types/common\"\n\nconst convertToTimestamp = (number: number) => {\n if (number > 0) {\n return number\n }\n return new Date().valueOf() + number // number is negative or zero\n}\n\ninterface TimeWindowCorrection {\n paddingLeftPercentage?: string\n widthRatio?: number\n}\nconst getForceTimeWindowCorrection = (\n chartData: EasyPieChartData,\n viewRange: TimeRange\n): TimeWindowCorrection => {\n const requestedAfter = convertToTimestamp(viewRange[0])\n const requestedBefore = convertToTimestamp(viewRange[1])\n const after = chartData.after * MS_IN_SECOND\n const before = chartData.before * MS_IN_SECOND\n\n const currentDuration = before - after\n const requestedDuration = requestedBefore - requestedAfter\n // don't do overrides when current (available) duration is bigger or only slightly lower\n // than requested duration\n const DURATION_CHANGE_TOLERANCE = 1.03\n if (currentDuration > requestedDuration / DURATION_CHANGE_TOLERANCE) {\n return {}\n }\n\n const widthRatio = currentDuration / requestedDuration\n\n const visibleDuration = requestedBefore - requestedAfter\n const paddingLeftPercentage = `${100 * ((after - requestedAfter) / visibleDuration)}%`\n\n return {\n paddingLeftPercentage,\n widthRatio,\n }\n}\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n dimensionsVisibility: boolean[]\n isRemotelyControlled: boolean\n orderedColors: string[]\n unitsCurrent: string\n viewAfterForCurrentData: number\n viewBeforeForCurrentData: number\n}\nexport const SparklineChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n orderedColors,\n unitsCurrent,\n viewAfterForCurrentData,\n viewBeforeForCurrentData,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n\n // update width, height automatically each time\n const [$chartElement, set$chartElement] = useState()\n const sparklineOptions = useRef<{ [key: string]: any }>()\n\n const { paddingLeftPercentage = undefined, widthRatio = 1 } = attributes.forceTimeWindow\n ? getForceTimeWindowCorrection(chartData, [viewAfterForCurrentData, viewBeforeForCurrentData])\n : {}\n\n const updateSparklineValues = () => {\n if (!$chartElement) return\n\n const { width, height } = chartContainerElement.getBoundingClientRect()\n // @ts-ignore\n $chartElement.sparkline(chartData.result, {\n ...sparklineOptions.current,\n width: Math.floor(width * widthRatio),\n height: Math.floor(height),\n })\n }\n\n // create chart\n useEffect(() => {\n const { sparklineLineColor = orderedColors[0] } = attributes\n const defaultFillColor =\n chartMetadata.chart_type === \"line\"\n ? window.NETDATA.themes.current.background\n : colorLuminance(sparklineLineColor, window.NETDATA.chartDefaults.fill_luminance)\n const chartTitle = attributes.title || chartMetadata.title\n\n const emptyStringIfDisable = (x: string | undefined) => (x === \"disable\" ? \"\" : x)\n\n const {\n sparklineType = \"line\",\n sparklineFillColor = defaultFillColor,\n sparklineDisableInteraction = false,\n sparklineDisableTooltips = false,\n sparklineDisableHighlight = false,\n sparklineHighlightLighten = 1.4,\n sparklineTooltipSuffix = ` ${unitsCurrent}`,\n sparklineNumberFormatter = (n: number) => n.toFixed(2),\n } = attributes\n\n const sparklineInitOptions = {\n type: sparklineType,\n lineColor: sparklineLineColor,\n fillColor: sparklineFillColor,\n chartRangeMin: attributes.sparklineChartRangeMin,\n chartRangeMax: attributes.sparklineChartRangeMax,\n composite: attributes.sparklineComposite,\n enableTagOptions: attributes.sparklineEnableTagOptions,\n tagOptionPrefix: attributes.sparklineTagOptionPrefix,\n tagValuesAttribute: attributes.sparklineTagValuesAttribute,\n\n disableHiddenCheck: attributes.sparklineDisableHiddenCheck,\n defaultPixelsPerValue: attributes.sparklineDefaultPixelsPerValue,\n spotColor: emptyStringIfDisable(attributes.sparklineSpotColor),\n minSpotColor: emptyStringIfDisable(attributes.sparklineMinSpotColor),\n maxSpotColor: emptyStringIfDisable(attributes.sparklineMaxSpotColor),\n spotRadius: attributes.sparklineSpotRadius,\n valueSpots: attributes.sparklineValueSpots,\n highlightSpotColor: attributes.sparklineHighlightSpotColor,\n highlightLineColor: attributes.sparklineHighlightLineColor,\n lineWidth: attributes.sparklineLineWidth,\n normalRangeMin: attributes.sparklineNormalRangeMin,\n normalRangeMax: attributes.sparklineNormalRangeMax,\n drawNormalOnTop: attributes.sparklineDrawNormalOnTop,\n xvalues: attributes.sparklineXvalues,\n chartRangeClip: attributes.sparklineChartRangeClip,\n chartRangeMinX: attributes.sparklineChartRangeMinX,\n chartRangeMaxX: attributes.sparklineChartRangeMaxX,\n disableInteraction: sparklineDisableInteraction,\n disableTooltips: sparklineDisableTooltips,\n disableHighlight: sparklineDisableHighlight,\n highlightLighten: sparklineHighlightLighten,\n highlightColor: attributes.sparklineHighlightColor,\n tooltipContainer: attributes.sparklineTooltipContainer,\n tooltipClassname: attributes.sparklineTooltipClassname,\n tooltipChartTitle: chartTitle,\n tooltipFormat: attributes.sparklineTooltipFormat,\n tooltipPrefix: attributes.sparklineTooltipPrefix,\n tooltipSuffix: sparklineTooltipSuffix,\n tooltipSkipNull: attributes.sparklineTooltipSkipNull,\n tooltipValueLookups: attributes.sparklineTooltipValueLookups,\n tooltipFormatFieldlist: attributes.sparklineTooltipFormatFieldlist,\n tooltipFormatFieldlistKey: attributes.sparklineTooltipFormatFieldlistKey,\n numberFormatter: sparklineNumberFormatter,\n numberDigitGroupSep: attributes.sparklineNumberDigitGroupSep,\n numberDecimalMark: attributes.sparklineNumberDecimalMark,\n numberDigitGroupCount: attributes.sparklineNumberDigitGroupCount,\n animatedZooms: attributes.sparklineAnimatedZooms,\n }\n sparklineOptions.current = sparklineInitOptions\n\n if (!chartElement.current || $chartElement) return\n\n set$chartElement(() => window.$(chartElement.current))\n }, [\n $chartElement,\n attributes,\n chartContainerElement,\n chartData.result,\n chartMetadata,\n orderedColors,\n unitsCurrent,\n widthRatio,\n ])\n\n const { sparklineOnHover } = attributes\n useEffect(() => {\n if (!$chartElement || !sparklineOnHover) return\n\n const onLeave = () => sparklineOnHover(null)\n const onChange = ({ sparklines: [sparkline] }: any) => {\n const { x, y } = sparkline.getCurrentRegionFields()\n sparklineOnHover({ x, y })\n }\n\n // @ts-ignore\n $chartElement.bind(\"sparklineRegionChange\", onChange).bind(\"mouseleave\", onLeave)\n return () => {\n // @ts-ignore\n $chartElement.unbind(\"sparklineRegionChange\", onChange).unbind(\"mouseleave\", onLeave)\n }\n }, [$chartElement, sparklineOnHover])\n\n // update chart\n useEffect(updateSparklineValues, [$chartElement, chartData.result])\n\n const style = paddingLeftPercentage\n ? {\n textAlign: \"initial\" as \"initial\", // :) typescript\n paddingLeft: paddingLeftPercentage,\n }\n : undefined\n\n return (\n <div ref={chartElement} id={chartElementId} className={chartElementClassName} style={style} />\n )\n}\n","import * as d3 from \"d3\"\n\nwindow.d3 = d3\n","let fetchPromise: Promise<string>\n\nconst GOOGLE_JS_API_SRC = \"https://www.google.com/jsapi\"\n\nexport const loadGoogleVisualizationApi = () => {\n if (fetchPromise) {\n return fetchPromise\n }\n fetchPromise = new Promise((resolve, reject) => {\n setTimeout(() => {\n const script = document.createElement(\"script\")\n script.type = \"text/javascript\"\n script.async = true\n script.src = GOOGLE_JS_API_SRC\n\n script.onerror = () => {\n reject(Error(\"error loading google.js api\"))\n }\n script.onload = () => {\n resolve(\"ok\")\n }\n\n const firstScript = document.getElementsByTagName(\"script\")[0] as HTMLScriptElement\n (firstScript.parentNode as Node).insertBefore(script, firstScript)\n }, 1000)\n }).then(() => new Promise((resolve) => {\n window.google.load(\"visualization\", \"1.1\", {\n packages: [\"corechart\", \"controls\"],\n callback: resolve,\n })\n }))\n return fetchPromise\n}\n","// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport \"jquery-sparkline\"\nimport React, {\n useRef, useEffect, useState,\n} from \"react\"\n\nimport \"../../utils/d3-loader\"\n// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport d3pie from \"vendor/d3pie-0.2.1-netdata-3\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport {\n ChartMetadata,\n D3pieChartData,\n} from \"domains/chart/chart-types\"\nimport { seconds4human } from \"domains/chart/utils/seconds4human\"\nimport { useDateTime } from \"utils/date-time\"\nimport { tail } from \"ramda\"\n\nconst emptyContent = {\n label: \"no data\",\n value: 100,\n color: \"#666666\",\n}\n\ntype GetDateRange = (arg: {\n chartData: D3pieChartData,\n index: number,\n localeDateString: (date: number | Date) => string,\n localeTimeString: (time: number | Date) => string,\n}) => string\nconst getDateRange: GetDateRange = ({\n chartData, index,\n localeDateString, localeTimeString,\n}) => {\n const dt = Math.round((chartData.before - chartData.after + 1) / chartData.points)\n const dtString = seconds4human(dt)\n\n const before = chartData.result.data[index].time\n const after = before - (dt * 1000)\n\n const d1 = localeDateString(after)\n const t1 = localeTimeString(after)\n const d2 = localeDateString(before)\n const t2 = localeTimeString(before)\n\n if (d1 === d2) {\n return `${d1} ${t1} to ${t2}, ${dtString}`\n }\n\n return `${d1} ${t1} to ${d2} ${t2}, ${dtString}`\n}\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: D3pieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n dimensionsVisibility: boolean[]\n hoveredRow: number\n hoveredX: number | null\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n orderedColors: string[]\n setMinMax: (minMax: [number, number]) => void\n showUndefined: boolean\n unitsCurrent: string\n}\nexport const D3pieChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n orderedColors,\n setMinMax,\n unitsCurrent,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n\n const legendFormatValueRef = useRef(legendFormatValue)\n legendFormatValueRef.current = legendFormatValue\n\n const [d3pieInstance, setD3pieInstance] = useState()\n const d3pieOptions = useRef<{[key: string]: any}>()\n\n const { localeDateString, localeTimeString } = useDateTime()\n\n // create chart\n useEffect(() => {\n if (chartElement.current && !d3pieInstance) {\n // d3pieSetContent\n // todo this should be set in chart.tsx, when creating hook\n setMinMax([chartData.min, chartData.max])\n // index is ROW! it's !== 0 only when selection is made\n const index = 0\n const content = tail(chartData.result.labels).map((label, i) => {\n const value = chartData.result.data[index][label]\n const color = orderedColors[i]\n return {\n label,\n value,\n color,\n }\n }).filter((x) => x.value !== null && x.value > 0)\n const safeContent = content.length > 0 ? content : emptyContent\n\n const defaultTitle = attributes.title || chartMetadata.title\n const dateRange = getDateRange({\n chartData,\n index: 0,\n localeDateString,\n localeTimeString,\n })\n const {\n d3pieTitle = defaultTitle,\n d3pieSubtitle = unitsCurrent,\n d3pieFooter = dateRange,\n d3pieTitleColor = window.NETDATA.themes.current.d3pie.title,\n d3pieTitleFontsize = 12,\n d3pieTitleFontweight = \"bold\",\n d3pieTitleFont = \"arial\",\n d3PieSubtitleColor = window.NETDATA.themes.current.d3pie.subtitle,\n d3PieSubtitleFontsize = 10,\n d3PieSubtitleFontweight = \"normal\",\n d3PieSubtitleFont = \"arial\",\n d3PieFooterColor = window.NETDATA.themes.current.d3pie.footer,\n d3PieFooterFontsize = 9,\n d3PieFooterFontweight = \"bold\",\n d3PieFooterFont = \"arial\",\n d3PieFooterLocation = \"bottom-center\",\n\n d3PiePieinnerradius = \"45%\",\n d3PiePieouterradius = \"80%\",\n d3PieSortorder = \"value-desc\",\n d3PieSmallsegmentgroupingEnabled = false,\n d3PieSmallsegmentgroupingValue = 1,\n d3PieSmallsegmentgroupingValuetype = \"percentage\",\n d3PieSmallsegmentgroupingLabel = \"other\",\n d3PieSmallsegmentgroupingColor = window.NETDATA.themes.current.d3pie.other,\n\n d3PieLabelsOuterFormat = \"label-value1\",\n d3PieLabelsOuterHidewhenlessthanpercentage = null,\n d3PieLabelsOuterPiedistance = 15,\n d3PieLabelsInnerFormat = \"percentage\",\n d3PieLabelsInnerHidewhenlessthanpercentage = 2,\n\n d3PieLabelsMainLabelColor = window.NETDATA.themes.current.d3pie.mainlabel,\n d3PieLabelsMainLabelFont = \"arial\",\n d3PieLabelsMainLabelFontsize = 10,\n d3PieLabelsMainLabelFontweight = \"normal\",\n\n d3PieLabelsPercentageColor = window.NETDATA.themes.current.d3pie.percentage,\n d3PieLabelsPercentageFont = \"arial\",\n d3PieLabelsPercentageFontsize = 10,\n d3PieLabelsPercentageFontweight = \"bold\",\n\n d3PieLabelsValueColor = window.NETDATA.themes.current.d3pie.value,\n d3PieLabelsValueFont = \"arial\",\n d3PieLabelsValueFontsize = 10,\n d3PieLabelsValueFontweight = \"bold\",\n\n d3PieLabelsLinesEnabled = true,\n d3PieLabelsLinesStyle = \"curved\",\n d3PieLabelsLinesColor = \"segment\", // \"segment\" or a hex color\n\n d3PieLabelsTruncationEnabled = false,\n d3PieLabelsTruncationTruncatelength = 30,\n\n d3PieMiscColorsSegmentstroke = window.NETDATA.themes.current.d3pie.segment_stroke,\n d3PieMiscGradientEnabled = false,\n d3PieMiscColorsPercentage = 95,\n d3PieMiscGradientColor = window.NETDATA.themes.current.d3pie.gradient_color,\n\n d3PieCssprefix = null,\n } = attributes\n\n const { width, height } = chartContainerElement.getBoundingClientRect()\n\n const initialD3pieOptions = {\n header: {\n title: {\n text: d3pieTitle,\n color: d3pieTitleColor,\n fontSize: d3pieTitleFontsize,\n fontWeight: d3pieTitleFontweight,\n font: d3pieTitleFont,\n },\n subtitle: {\n text: d3pieSubtitle,\n color: d3PieSubtitleColor,\n fontSize: d3PieSubtitleFontsize,\n fontWeight: d3PieSubtitleFontweight,\n font: d3PieSubtitleFont,\n },\n titleSubtitlePadding: 1,\n },\n footer: {\n text: d3pieFooter,\n color: d3PieFooterColor,\n fontSize: d3PieFooterFontsize,\n fontWeight: d3PieFooterFontweight,\n font: d3PieFooterFont,\n location: d3PieFooterLocation,\n },\n size: {\n canvasHeight: Math.floor(height),\n canvasWidth: Math.floor(width),\n pieInnerRadius: d3PiePieinnerradius,\n pieOuterRadius: d3PiePieouterradius,\n },\n data: {\n // none, random, value-asc, value-desc, label-asc, label-desc\n sortOrder: d3PieSortorder,\n smallSegmentGrouping: {\n enabled: d3PieSmallsegmentgroupingEnabled,\n value: d3PieSmallsegmentgroupingValue,\n // percentage, value\n valueType: d3PieSmallsegmentgroupingValuetype,\n label: d3PieSmallsegmentgroupingLabel,\n color: d3PieSmallsegmentgroupingColor,\n },\n\n // REQUIRED! This is where you enter your pie data; it needs to be an array of objects\n // of this form: { label: \"label\", value: 1.5, color: \"#000000\" } - color is optional\n content: safeContent,\n },\n\n\n labels: {\n outer: {\n // label, value, percentage, label-value1, label-value2, label-percentage1,\n // label-percentage2\n format: d3PieLabelsOuterFormat,\n hideWhenLessThanPercentage: d3PieLabelsOuterHidewhenlessthanpercentage,\n pieDistance: d3PieLabelsOuterPiedistance,\n },\n inner: {\n // label, value, percentage, label-value1, label-value2, label-percentage1,\n // label-percentage2\n format: d3PieLabelsInnerFormat,\n hideWhenLessThanPercentage: d3PieLabelsInnerHidewhenlessthanpercentage,\n },\n mainLabel: {\n color: d3PieLabelsMainLabelColor, // or 'segment' for dynamic color\n font: d3PieLabelsMainLabelFont,\n fontSize: d3PieLabelsMainLabelFontsize,\n fontWeight: d3PieLabelsMainLabelFontweight,\n },\n percentage: {\n color: d3PieLabelsPercentageColor,\n font: d3PieLabelsPercentageFont,\n fontSize: d3PieLabelsPercentageFontsize,\n fontWeight: d3PieLabelsPercentageFontweight,\n decimalPlaces: 0,\n },\n value: {\n color: d3PieLabelsValueColor,\n font: d3PieLabelsValueFont,\n fontSize: d3PieLabelsValueFontsize,\n fontWeight: d3PieLabelsValueFontweight,\n },\n lines: {\n enabled: d3PieLabelsLinesEnabled,\n style: d3PieLabelsLinesStyle,\n color: d3PieLabelsLinesColor,\n },\n truncation: {\n enabled: d3PieLabelsTruncationEnabled,\n truncateLength: d3PieLabelsTruncationTruncatelength,\n },\n formatter(context: any) {\n if (context.part === \"value\") {\n return legendFormatValueRef.current(context.value)\n }\n if (context.part === \"percentage\") {\n return `${context.label}%`\n }\n\n return context.label\n },\n },\n effects: {\n load: {\n effect: \"none\", // none / default\n speed: 0, // commented in the d3pie code to speed it up\n },\n pullOutSegmentOnClick: {\n effect: \"bounce\", // none / linear / bounce / elastic / back\n speed: 400,\n size: 5,\n },\n highlightSegmentOnMouseover: true,\n highlightLuminosity: -0.2,\n },\n tooltips: {\n enabled: false,\n type: \"placeholder\", // caption|placeholder\n string: \"\",\n placeholderParser: null, // function\n styles: {\n fadeInSpeed: 250,\n backgroundColor: window.NETDATA.themes.current.d3pie.tooltip_bg,\n backgroundOpacity: 0.5,\n color: window.NETDATA.themes.current.d3pie.tooltip_fg,\n borderRadius: 2,\n font: \"arial\",\n fontSize: 12,\n padding: 4,\n },\n },\n misc: {\n colors: {\n background: \"transparent\", // transparent or color #\n // segments: state.chartColors(),\n segmentStroke: d3PieMiscColorsSegmentstroke,\n },\n gradient: {\n enabled: d3PieMiscGradientEnabled,\n percentage: d3PieMiscColorsPercentage,\n color: d3PieMiscGradientColor,\n },\n canvasPadding: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5,\n },\n pieCenterOffset: {\n x: 0,\n y: 0,\n },\n cssPrefix: d3PieCssprefix,\n },\n callbacks: {\n onload: null,\n onMouseoverSegment: null,\n onMouseoutSegment: null,\n onClickSegment: null,\n },\n }\n // eslint-disable-next-line new-cap\n const newD3pieInstance = new d3pie(chartElement.current, initialD3pieOptions)\n d3pieOptions.current = initialD3pieOptions\n setD3pieInstance(() => newD3pieInstance)\n }\n }, [attributes, chartContainerElement, chartData, chartMetadata, d3pieInstance, legendFormatValue,\n localeDateString, localeTimeString, orderedColors, setMinMax, unitsCurrent])\n\n // update chart\n useEffect(() => {\n if (d3pieInstance && d3pieOptions.current) {\n const dateRange = getDateRange({\n chartData,\n index: 0,\n localeDateString,\n localeTimeString,\n })\n const {\n d3pieSubtitle = unitsCurrent,\n d3pieFooter = dateRange,\n } = attributes\n\n\n const isHoveredButNoData = !!hoveredX && (hoveredRow === -1)\n const slot = chartData.result.data.length - hoveredRow - 1\n\n const index = (slot < 0 || slot >= chartData.result.data.length)\n ? 0\n : slot\n\n const content = tail(chartData.result.labels).map((label, i) => {\n const value = chartData.result.data[index][label]\n const color = orderedColors[i]\n return {\n label,\n value,\n color,\n }\n }).filter((x) => x.value !== null && x.value > 0)\n const safeContent = (content.length > 0 && !isHoveredButNoData)\n ? content\n : [emptyContent]\n\n d3pieInstance.options.header.subtitle.text = d3pieSubtitle\n d3pieInstance.options.footer.text = d3pieFooter\n\n d3pieInstance.options.data.content = safeContent\n d3pieInstance.destroy()\n d3pieInstance.recreate()\n }\n }, [attributes, chartData, d3pieInstance, hoveredRow, hoveredX, localeDateString,\n localeTimeString, orderedColors, unitsCurrent])\n\n return (\n <div ref={chartElement} id={chartElementId} className={chartElementClassName} />\n )\n}\n","// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport \"peity\"\nimport React, {\n useRef, useState, useLayoutEffect,\n} from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { colorLuminance } from \"domains/chart/utils/color-luminance\"\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n orderedColors: string[]\n}\nexport const PeityChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n orderedColors,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n\n // update width, height automatically each time\n const [$chartElement, set$chartElement] = useState()\n const peityOptions = useRef<{\n stroke: string,\n fill: string,\n strokeWidth: number,\n width: number,\n height: number,\n }>()\n\n\n // create chart\n useLayoutEffect(() => {\n if (chartElement.current && !$chartElement) {\n const $element = window.$(chartElement.current)\n\n const { width, height } = chartContainerElement.getBoundingClientRect()\n\n const {\n peityStrokeWidth = 1,\n } = attributes\n const peityInitOptions = {\n stroke: window.NETDATA.themes.current.foreground,\n strokeWidth: peityStrokeWidth,\n width: Math.floor(width),\n height: Math.floor(height),\n fill: window.NETDATA.themes.current.foreground,\n }\n\n set$chartElement(() => $element)\n peityOptions.current = peityInitOptions\n }\n }, [attributes, $chartElement, chartContainerElement])\n\n // update chart\n useLayoutEffect(() => {\n if ($chartElement && peityOptions.current) {\n const getFillOverride = () => (\n chartMetadata.chart_type === \"line\"\n ? window.NETDATA.themes.current.background\n : colorLuminance(orderedColors[0], window.NETDATA.chartDefaults.fill_luminance)\n )\n const updatedOptions = {\n ...peityOptions.current,\n stroke: orderedColors[0],\n // optimizatino from old dashboard, perhaps could be transformed to useMemo()\n fill: (orderedColors[0] === peityOptions.current.stroke)\n ? peityOptions.current.fill\n : getFillOverride(),\n }\n $chartElement.peity(\"line\", updatedOptions)\n peityOptions.current = updatedOptions\n }\n }, [$chartElement, chartData, chartMetadata, orderedColors])\n\n return (\n <div\n ref={chartElement}\n id={chartElementId}\n className={chartElementClassName}\n >\n {chartData.result}\n </div>\n )\n}\n","import React, {\n useRef, useState, useLayoutEffect,\n} from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { loadGoogleVisualizationApi } from \"domains/chart/utils/google-visualization-loader\"\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n orderedColors: string[]\n unitsCurrent: string\n}\nexport const GoogleChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n orderedColors,\n unitsCurrent,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n const googleChartInstance = useRef<\n google.visualization.AreaChart |\n google.visualization.LineChart>()\n\n const [hasApiBeenLoaded, setHasApiBeenLoaded] = useState(false)\n loadGoogleVisualizationApi()\n .then(() => {\n setHasApiBeenLoaded(true)\n })\n\n const googleOptions = useRef<{[key: string]: unknown}>()\n\n // update chart\n useLayoutEffect(() => {\n if (googleChartInstance.current && googleOptions.current) {\n const dataTable = new window.google.visualization.DataTable(chartData.result)\n googleChartInstance.current.draw(dataTable, googleOptions.current)\n }\n }, [chartData])\n\n // create chart\n useLayoutEffect(() => {\n if (chartElement.current && !googleOptions.current && hasApiBeenLoaded) {\n const dataTable = new window.google.visualization.DataTable(chartData.result)\n\n const {\n title = chartMetadata.title,\n } = attributes\n const chartType = chartMetadata.chart_type\n const areaOpacity = new Map([\n [\"area\", window.NETDATA.options.current.color_fill_opacity_area],\n [\"stacked\", window.NETDATA.options.current.color_fill_opacity_stacked],\n ]).get(chartType) || 0.3\n const initialGoogleOptions = {\n colors: orderedColors,\n\n // do not set width, height - the chart resizes itself\n // width: state.chartWidth(),\n // height: state.chartHeight(),\n lineWidth: chartType === \"line\" ? 2 : 1,\n title,\n fontSize: 11,\n hAxis: {\n // title: \"Time of Day\",\n // format:'HH:mm:ss',\n viewWindowMode: \"maximized\",\n slantedText: false,\n format: \"HH:mm:ss\",\n textStyle: {\n fontSize: 9,\n },\n gridlines: {\n color: \"#EEE\",\n },\n },\n vAxis: {\n title: unitsCurrent,\n viewWindowMode: (chartType === \"area\" || chartType === \"stacked\")\n ? \"maximized\"\n : \"pretty\",\n minValue: chartType === \"stacked\" ? undefined : -0.1,\n maxValue: chartType === \"stacked\" ? undefined : 0.1,\n direction: 1,\n textStyle: {\n fontSize: 9,\n },\n gridlines: {\n color: \"#EEE\",\n },\n },\n chartArea: {\n width: \"65%\",\n height: \"80%\",\n },\n focusTarget: \"category\",\n annotation: {\n 1: {\n style: \"line\",\n },\n },\n pointsVisible: false,\n titlePosition: \"out\",\n titleTextStyle: {\n fontSize: 11,\n },\n tooltip: {\n isHtml: false,\n ignoreBounds: true,\n textStyle: {\n fontSize: 9,\n },\n },\n curveType: \"function\" as \"function\",\n areaOpacity,\n isStacked: chartType === \"stacked\",\n }\n\n const googleInstance = [\"area\", \"stacked\"].includes(chartMetadata.chart_type)\n ? new window.google.visualization.AreaChart(chartElement.current)\n : new window.google.visualization.LineChart(chartElement.current)\n\n googleInstance.draw(dataTable, initialGoogleOptions)\n\n googleOptions.current = initialGoogleOptions\n googleChartInstance.current = googleInstance\n }\n }, [attributes, chartData.result, chartMetadata, chartElement, hasApiBeenLoaded, orderedColors,\n unitsCurrent])\n\n\n return (\n <div\n ref={chartElement}\n id={chartElementId}\n className={chartElementClassName}\n />\n )\n}\n","import React from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { EasyPieChartData } from \"domains/chart/chart-types\"\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartElementClassName: string\n chartElementId: string\n}\nexport const TextOnly = ({\n attributes,\n chartData,\n chartElementClassName,\n chartElementId,\n}: Props) => {\n const { textOnlyDecimalPlaces = 1, textOnlyPrefix = \"\", textOnlySuffix = \"\" } = attributes\n\n // Round based on number of decimal places to show\n const precision = 10 ** textOnlyDecimalPlaces\n const value = Math.round(chartData.result[0] * precision) / precision\n\n const textContent = chartData.result.length === 0 ? \"\" : textOnlyPrefix + value + textOnlySuffix\n\n return (\n <div id={chartElementId} className={chartElementClassName}>\n {textContent}\n </div>\n )\n}\n","/* eslint-disable no-param-reassign */\n// @ts-nocheck\n\nexport const defaultCellSize = 11\nexport const defaultPadding = 1\nexport const defaultAspectRatio = Math.round(16 / 9)\n\nexport const getCellBoxSize = (cellSize = defaultCellSize, padding = defaultPadding) =>\n cellSize - padding\nexport const getRows = (data, aspectRatio = defaultAspectRatio) =>\n Math.sqrt(data.length / aspectRatio)\nexport const getColumns = (rows, aspectRatio = defaultAspectRatio) => rows * aspectRatio\n\nexport const getXPosition = (columns, index, cellSize = defaultCellSize) =>\n Math.floor(index % columns) * cellSize\nexport const getYPosition = (columns, index, cellSize = defaultCellSize) =>\n Math.floor(index / columns) * cellSize\n\nexport const getFullWidth = (columns, cellSize = defaultCellSize) => Math.ceil(columns) * cellSize\nexport const getFullHeight = (rows, cellSize = defaultCellSize, padding = defaultCellSize) =>\n Math.ceil(rows) * cellSize + padding\n\nexport const getOffsetPosition = (offset, cellSize = defaultCellSize) =>\n Math.floor(offset / cellSize)\n","/* eslint-disable object-curly-newline */\n/* eslint-disable no-param-reassign */\n// @ts-nocheck\nimport { getCellBoxSize, getXPosition, getYPosition, getOffsetPosition } from \"./utilities\"\n\nexport default (\n el,\n columns,\n total,\n { onMouseenter, onMouseout },\n { cellSize, cellPadding } = {}\n) => {\n let hoveredIndex = -1\n\n const getEvent = index => {\n const rect = el.getBoundingClientRect()\n const offsetX = getXPosition(columns, index, cellSize)\n const offsetY = getYPosition(columns, index, cellSize)\n const left = rect.left + offsetX\n const top = rect.top + offsetY\n const cellBoxSize = getCellBoxSize(cellSize, cellPadding)\n\n return {\n index,\n left,\n top,\n right: left + cellBoxSize,\n bottom: top + cellBoxSize,\n width: cellBoxSize,\n height: cellBoxSize,\n offsetX,\n offsetY,\n }\n }\n\n const mouseout = () => {\n onMouseout(getEvent(hoveredIndex))\n hoveredIndex = -1\n }\n\n const mousemove = e => {\n const { offsetX, offsetY } = e\n const x = getOffsetPosition(offsetX, cellSize)\n const y = getOffsetPosition(offsetY, cellSize)\n const nextHoveredIndex = y * columns + x\n\n if (nextHoveredIndex === hoveredIndex) return\n\n if (hoveredIndex !== -1) mouseout()\n\n if (nextHoveredIndex >= total) return\n\n onMouseenter(getEvent(nextHoveredIndex))\n hoveredIndex = nextHoveredIndex\n }\n\n el.addEventListener(\"mousemove\", mousemove)\n el.addEventListener(\"mouseout\", mouseout)\n return () => {\n el.removeEventListener(\"mousemove\", mousemove)\n el.removeEventListener(\"mouseout\", mouseout)\n }\n}\n","/* eslint-disable object-curly-newline */\n/* eslint-disable comma-dangle */\n/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable no-param-reassign */\n// @ts-nocheck\nimport { scaleLinear, extent } from \"d3\"\nimport {\n getCellBoxSize,\n getRows,\n getColumns,\n getXPosition,\n getYPosition,\n getFullWidth,\n getFullHeight,\n} from \"./utilities\"\nimport registerEvents from \"./events\"\n\nexport const getWidth = (data, { aspectRatio, cellSize } = {}) => {\n const rows = getRows(data, aspectRatio)\n const columns = getColumns(rows, aspectRatio)\n return getFullWidth(columns, cellSize)\n}\n\nconst getCanvasAttributes = (data, { aspectRatio, cellSize, padding } = {}) => {\n const rows = getRows(data, aspectRatio)\n const columns = getColumns(rows, aspectRatio)\n const width = getFullWidth(columns, cellSize)\n const height = getFullHeight(rows, cellSize, padding)\n\n return { width, height, columns: Math.ceil(columns) }\n}\n\nconst defaultColorRange = [\"rgba(198, 227, 246, 0.9)\", \"rgba(14, 154, 255, 0.9)\"]\n\nconst makeGetColor = (values, colorRange = defaultColorRange) =>\n scaleLinear()\n .domain(extent(values, value => value))\n .range(colorRange)\n\nexport default (el, { onMouseenter, onMouseout }, options = {}) => {\n const { cellSize, cellPadding, cellStroke = 2, lineWidth = 1, colorRange } = options\n const canvas = el.getContext(\"2d\")\n\n let activeBox = -1\n let deactivateBox = () => {}\n let activateBox = {}\n let clearEvents = () => {}\n\n const clear = () => {\n deactivateBox()\n clearEvents()\n canvas.clearRect(0, 0, el.width, el.height)\n canvas.beginPath()\n }\n\n const update = ({ data }) => {\n const { width, height, columns } = getCanvasAttributes(data, options)\n el.width = parseInt(width)\n el.height = parseInt(height)\n clear()\n clearEvents()\n const getColor = makeGetColor(data, colorRange)\n\n const drawBox = (value, index) => {\n canvas.fillStyle = getColor(value)\n\n const offsetX = getXPosition(columns, index, cellSize)\n const offsetY = getYPosition(columns, index, cellSize)\n\n if (lineWidth && cellStroke) {\n canvas.clearRect(\n offsetX - lineWidth,\n offsetY - lineWidth,\n getCellBoxSize(cellSize, cellPadding) + cellStroke,\n getCellBoxSize(cellSize, cellPadding) + cellStroke\n )\n }\n\n canvas.fillRect(\n offsetX,\n offsetY,\n getCellBoxSize(cellSize, cellPadding),\n getCellBoxSize(cellSize, cellPadding)\n )\n }\n\n data.forEach(drawBox)\n\n clearEvents = registerEvents(\n el,\n columns,\n data.length,\n {\n onMouseenter,\n onMouseout,\n },\n options\n )\n\n deactivateBox = () => {\n if (activeBox !== -1) drawBox(data[activeBox], activeBox)\n }\n\n activateBox = index => {\n deactivateBox()\n activeBox = index\n\n const offsetX = getXPosition(columns, index, cellSize)\n const offsetY = getYPosition(columns, index, cellSize)\n\n if (lineWidth && cellStroke) {\n canvas.lineWidth = lineWidth\n canvas.strokeStyle = \"#fff\"\n canvas.strokeRect(\n offsetX + lineWidth,\n offsetY + lineWidth,\n getCellBoxSize(cellSize, cellPadding) - cellStroke,\n getCellBoxSize(cellSize, cellPadding) - cellStroke\n )\n }\n }\n }\n\n return {\n clear,\n update,\n activateBox: index => activateBox(index),\n deactivateBox: () => deactivateBox(),\n }\n}\n","/* eslint-disable arrow-body-style */\n// @ts-nocheck\n\nexport default (el) => {\n return el.getBoundingClientRect().top / window.innerHeight > 0.5 ? \"top\" : \"bottom\"\n}\n","/* eslint-disable operator-linebreak */\n/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable react/jsx-fragments */\n// @ts-nocheck\nimport React, { useRef, useLayoutEffect, Fragment, useState, useCallback } from \"react\"\nimport { Drop } from \"@netdata/netdata-ui\"\nimport drawBoxes from \"./drawBoxes\"\nimport getAlign from \"./getAlign\"\n\ninterface GroupboxData {\n data: number[]\n labels: string[]\n}\n\ninterface GroupBoxProps {\n data: GroupboxData[]\n}\n\nconst aligns = {\n top: { bottom: \"top\" },\n bottom: { top: \"bottom\" },\n}\n\nconst GroupBox = ({ data, renderTooltip, ...options }: GroupBoxProps) => {\n const dataRef = useRef()\n const canvasRef = useRef()\n const boxesRef = useRef()\n\n const [hover, setHover] = useState(null)\n const dropHoverRef = useRef(false)\n const boxHoverRef = useRef(-1)\n const timeoutId = useRef()\n\n const close = () => {\n boxesRef.current.deactivateBox()\n setHover(null)\n dropHoverRef.current = false\n boxHoverRef.current = -1\n }\n\n const closeDrop = () =>\n requestAnimationFrame(() => {\n setHover(currentHover => {\n if (\n !dropHoverRef.current &&\n (boxHoverRef.current === -1 || boxHoverRef.current !== currentHover?.index)\n ) {\n close()\n }\n return currentHover\n })\n })\n\n useLayoutEffect(() => {\n boxesRef.current = drawBoxes(\n canvasRef.current,\n {\n onMouseenter: ({ index, ...rect }) => {\n boxHoverRef.current = index\n boxesRef.current.activateBox(index)\n timeoutId.current = setTimeout(() => {\n setHover({\n target: { getBoundingClientRect: () => rect },\n index,\n rect,\n })\n }, 600)\n },\n onMouseout: () => {\n boxHoverRef.current = -1\n clearTimeout(timeoutId.current)\n closeDrop()\n },\n },\n options\n )\n return () => boxesRef.current.clear()\n }, [])\n\n useLayoutEffect(() => {\n if (\n hover &&\n dataRef.current &&\n dataRef.current.labels[hover.index] !== data.labels[hover.index]\n ) {\n close()\n }\n dataRef.current = data\n boxesRef.current.update(data)\n }, [data])\n\n const onMouseEnter = useCallback(() => {\n dropHoverRef.current = true\n }, [])\n\n const onMouseLeave = useCallback(() => {\n dropHoverRef.current = false\n closeDrop()\n }, [])\n\n const align = hover && getAlign(hover.target)\n\n return (\n <Fragment>\n <canvas data-testid=\"groupBox\" ref={canvasRef} />\n {hover && renderTooltip && (\n <Drop\n align={aligns[align]}\n target={hover.target}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {renderTooltip(hover.index, align)}\n </Drop>\n )}\n </Fragment>\n )\n}\n\nexport default GroupBox\n","/* eslint-disable operator-linebreak */\n/* eslint-disable object-curly-newline */\n/* eslint-disable arrow-body-style */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/jsx-one-expression-per-line */\n// @ts-nocheck\nimport React, { useRef, useMemo } from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, TextMicro, Popover } from \"@netdata/netdata-ui\"\nimport GroupBox from \"./groupBox\"\nimport { getWidth } from \"./drawBoxes\"\nimport getAlign from \"./getAlign\"\n\ninterface GroupBoxWrapperProps {\n data: any\n title: string\n}\n\nconst Title = styled.span`\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow-x: hidden;\n`\n\nconst Label = styled(Flex).attrs({\n as: TextMicro,\n gap: 1,\n})`\n cursor: default;\n &:hover {\n font-weight: bold;\n }\n`\n\nconst GroupBoxWrapper = ({\n data,\n label,\n groupIndex,\n renderGroupPopover,\n renderBoxPopover,\n}: GroupBoxWrapperProps) => {\n const ref = useRef()\n const align = ref.current && getAlign(ref.current)\n\n const style = useMemo(() => ({ maxWidth: `${getWidth(data.data)}px` }), [data])\n\n const boxPopover =\n renderBoxPopover &&\n ((index, boxAlign) => renderBoxPopover({ group: label, groupIndex, align: boxAlign, index }))\n\n const groupPopover =\n renderGroupPopover && (() => renderGroupPopover({ group: label, groupIndex, align }))\n\n return (\n <Flex data-testid=\"groupBoxWrapper\" column alignItems=\"start\" gap={1} margin={[0, 4, 0, 0]}>\n <Popover content={groupPopover} align={align} plain>\n {({ isOpen, ref: popoverRef, ...rest }) => (\n <Label\n data-testid=\"groupBoxWrapper-title\"\n ref={el => {\n ref.current = el\n popoverRef(el)\n }}\n strong={isOpen}\n style={style}\n {...rest}\n >\n <Title>{label}</Title>\n {data.data.length > 3 && <span>({data.data.length})</span>}\n </Label>\n )}\n </Popover>\n <GroupBox data={data} renderTooltip={boxPopover} />\n </Flex>\n )\n}\n\nconst GroupBoxes = ({ data, labels, renderBoxPopover, renderGroupPopover }: any) => (\n <Flex data-testid=\"groupBoxes\" flexWrap overflow={{ vertical: \"auto\" }} flex>\n {labels.map((label, index) => {\n return data[index].data.length ? (\n <GroupBoxWrapper\n key={label}\n label={label}\n groupIndex={index}\n data={data[index]}\n renderGroupPopover={renderGroupPopover}\n renderBoxPopover={renderBoxPopover}\n />\n ) : null\n })}\n </Flex>\n)\n\nexport default GroupBoxes\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, TextNano } from \"@netdata/netdata-ui\"\n\ninterface LegendProps {\n children?: React.ReactNode\n}\n\nconst LinearColorScaleBar = styled(Flex).attrs({ width: \"120px\", height: \"12px\", round: true })`\n background: linear-gradient(to right, #c6e3f6, #0e9aff);\n`\n\nconst Legend = ({ children }: LegendProps) => (\n <Flex data-testid=\"groupBox-legend\" gap={4} alignItems=\"center\">\n <TextNano strong>{children}</TextNano>\n <Flex gap={2} alignItems=\"center\">\n <TextNano>0%</TextNano>\n <LinearColorScaleBar />\n <TextNano>100%</TextNano>\n </Flex>\n {/* <Flex gap={2} alignItems=\"center\">\n <TextNano strong>Alarms</TextNano>\n <Flex width=\"12px\" height=\"12px\" background=\"error\" round />\n </Flex>\n <Flex gap={2} alignItems=\"center\">\n <TextNano strong>Warnings</TextNano>\n <Flex width=\"12px\" height=\"12px\" background=\"warning\" round />\n </Flex> */}\n </Flex>\n)\n\nexport default Legend\n","// @ts-nocheck\n\nconst labels = {\n k8s_cluster_id: { icon: \"cluster\", title: \"Cluster Id\" },\n k8s_node_name: { icon: \"nodes_hollow\", title: \"Node\" },\n k8s_namespace: { icon: \"cluster_spaces\", title: \"Namespace\" },\n k8s_controller_kind: { icon: \"controller_kind\", title: \"Controller Kind\" },\n k8s_controller_name: { icon: \"controller_name\", title: \"Controller Name\" },\n k8s_pod_name: { icon: \"pod\", title: \"Pod Name\" },\n k8s_container_name: { icon: \"container\", title: \"Container\" },\n}\n\nexport const labelIds = Object.keys(labels)\n\nexport default (id) => {\n if (id in labels) return labels[id]\n // k8s_custom_label -> Custom Label\n const title = id.replace(/_./g, (word) => ` ${word[1].toUpperCase()}`).replace(/^k8s /, \"\")\n return { title, icon: \"node\" }\n}\n","/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Separator = () => <Flex height=\"1px\" width=\"100%\" background=\"separator\" />\n\nexport default Separator\n","/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { H5 } from \"@netdata/netdata-ui\"\n\nconst Header = props => (\n <H5 color=\"bright\" wordBreak=\"break-all\" data-testid=\"k8sPopover-header\" {...props} />\n)\n\nexport default Header\n","/* eslint-disable indent */\n/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex, Button, getColor } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\n\nexport const TabButton = styled(Button).attrs(({ active }) => ({\n flavour: \"borderless\",\n neutral: true,\n themeType: \"dark\",\n className: \"btn\",\n disabled: active,\n \"data-testid\": \"k8sPopoverChart-tab\",\n}))`\n &&& {\n height: initial;\n width: initial;\n padding: 2px 20px;\n ${({ active, theme }) => active && `border-bottom: 3px solid ${getColor(\"bright\")({ theme })};`}\n color: ${({ active, theme }) => getColor(active ? \"bright\" : \"separator\")({ theme })}\n }\n`\n\nconst Tabs = ({ value, onChange, ...rest }) => (\n <Flex data-testid=\"k8sPopoverChart-tabs\" {...rest}>\n <TabButton label=\"Context\" active={value === \"context\"} onClick={() => onChange(\"context\")} />\n <TabButton label=\"Metrics\" active={value === \"metrics\"} onClick={() => onChange(\"metrics\")} />\n </Flex>\n)\n\nexport default Tabs\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex, Button, H6, makeFlex } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\n\nconst ExpandButton = styled(makeFlex(Button)).attrs({\n icon: \"chevron_right_s\",\n label: \"More\",\n flavour: \"borderless\",\n neutral: true,\n themeType: \"dark\",\n className: \"btn\",\n alignItems: \"baseline\",\n gap: 1,\n direction: \"rowReverse\",\n})`\n &&& {\n padding: 0;\n margin: 0;\n font-weight: normal;\n height: initial;\n width: initial;\n\n svg {\n height: 6px;\n width: 6px;\n position: initial;\n }\n }\n`\n\nconst Section = ({ title, onExpand, children, noBorder }) => (\n <Flex\n gap={3}\n padding={[0, 0, 3]}\n border={!noBorder && { side: \"bottom\", color: \"separator\" }}\n column\n data-testid=\"k8sPopoverSection\"\n >\n <Flex justifyContent=\"between\" data-testid=\"k8sPopoverSection-header\">\n <H6 color=\"border\" wordBreak=\"break-all\">\n {title}\n </H6>\n {onExpand && <ExpandButton onClick={onExpand} />}\n </Flex>\n <Flex gap={4} column data-testid=\"k8sPopoverSection-content\">\n {children}\n </Flex>\n </Flex>\n)\n\nexport default Section\n","import {\n LOCALSTORAGE_HEIGHT_KEY_PREFIX,\n LOCALSTORAGE_HEIGHT_KEY_PREFIX_OLD,\n} from \"domains/chart/components/resize-handler\"\n\nimport { LEGEND_BOTTOM_SINGLE_LINE_HEIGHT } from \"domains/chart/utils/legend-utils\"\nimport { Attributes } from \"./transformDataAttributes\"\nimport { ChartLibraryConfig } from \"./chartLibrariesSettings\"\n\ntype GetPortalNodeStyles = (\n attributes: Attributes,\n chartSettings: ChartLibraryConfig,\n shouldAddSpecialHeight: boolean,\n) => {\n height: string | undefined,\n width: string | undefined,\n minWidth: string | undefined\n}\n\nconst oldDefaultHeights = [\"180px\", \"90px\"]\n\nconst getHeightFromLocalStorage = (heightID: string, isLegendOnBottom: boolean) => {\n const persitedHeight = localStorage.getItem(`${LOCALSTORAGE_HEIGHT_KEY_PREFIX}${heightID}`)\n if (persitedHeight) {\n if (Number.isNaN(Number(persitedHeight))) {\n return null\n }\n return `${isLegendOnBottom\n ? Number(persitedHeight) + LEGEND_BOTTOM_SINGLE_LINE_HEIGHT\n : persitedHeight\n }px`\n }\n\n // We'll support the old key for few months, so that user's custom heights will be working,\n // but we'll save any changes only to the new key.\n const persistedHeightOld = localStorage.getItem(\n `${LOCALSTORAGE_HEIGHT_KEY_PREFIX_OLD}${heightID}`,\n )\n if (persistedHeightOld) {\n if (oldDefaultHeights.includes(persistedHeightOld)) {\n // If saved value looks like `oldDefaultHeights`, then it is most likely an automatic value\n // from old dashboard. Don't import it anymore. On next resize the height will be persisted\n // to the new key.\n return null\n }\n return persistedHeightOld\n }\n return null\n}\n\nexport const getPortalNodeStyles: GetPortalNodeStyles = (\n attributes,\n chartSettings,\n shouldAddSpecialHeight,\n) => {\n let width\n if (typeof attributes.width === \"string\") {\n // eslint-disable-next-line prefer-destructuring\n width = attributes.width\n } else if (typeof attributes.width === \"number\") {\n width = `${attributes.width.toString()}px`\n }\n let height\n if (chartSettings.aspectRatio === undefined) {\n if (typeof attributes.height === \"string\") {\n // eslint-disable-next-line prefer-destructuring\n height = attributes.height\n } else if (typeof attributes.height === \"number\") {\n height = `${attributes.height.toString()}px`\n }\n }\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n\n const heightFromLocalStorage = attributes.heightId\n ? getHeightFromLocalStorage(attributes.heightId, isLegendOnBottom)\n : null\n\n if (heightFromLocalStorage) {\n // .replace() is for backwards compatibility - old dashboard was always doing\n // JSON.stringify when setting localStorage so many users have '\"180px\"' values set.\n // We can remove .replace() after some time\n height = heightFromLocalStorage.replace(/\"/g, \"\")\n }\n\n if (shouldAddSpecialHeight) {\n const heightOverriden = isLegendOnBottom\n ? window.innerHeight * 0.5\n : window.innerHeight * 0.4\n height = `${heightOverriden}px`\n }\n\n const chartDefaultsMinWidth = window.NETDATA.chartDefaults.min_width\n const minWidth = chartDefaultsMinWidth === null\n ? undefined\n : chartDefaultsMinWidth\n return {\n height,\n width,\n minWidth,\n }\n}\n","import {\n useEffect, useRef, useState, MutableRefObject,\n} from \"react\"\n\nconst globalIntersectionOptions = {\n root: null,\n rootMargin: \"0px\",\n threshold: undefined,\n}\n\ntype IntersectionCallback = (isVisible: boolean) => void\ntype Listener = {\n element: HTMLElement,\n callback: IntersectionCallback,\n}\nconst createGlobalIntersectionObserver = () => {\n let listeners: Listener[] = []\n const globalHandler = (entries: IntersectionObserverEntry[]) => {\n entries.forEach(({ isIntersecting, target }) => {\n const callback = listeners.find(({ element }) => element === target)?.callback\n if (callback) {\n callback(isIntersecting)\n }\n })\n }\n const globalObserver = new IntersectionObserver(globalHandler, globalIntersectionOptions)\n\n return {\n subscribe: (element: HTMLElement, callback: IntersectionCallback) => {\n globalObserver.observe(element)\n listeners = listeners.concat({ element, callback })\n },\n unsubscribe: (elementToUnsubscribe: HTMLElement) => {\n listeners = listeners.filter(({ element }) => element !== elementToUnsubscribe)\n },\n }\n}\nconst globalIntersectionObserver = createGlobalIntersectionObserver()\n\n\n// this hook is created for 2 reasons:\n// 1) to use the same IntersectionObserver for all charts (contrary to use-intersection from\n// react-use, which creates new observer for every hook)\n// 2) to update the isVisible state only when necessary (contrary to what \"use-in-view\" hook from\n// https://github.com/thebuilder/react-intersection-observer does)\nexport const useCommonIntersection = (\n element: HTMLElement,\n clonedChildrenRef: MutableRefObject<HTMLElement | undefined>,\n) => {\n const [isVisible, setIsVisible] = useState(false)\n const isVisibleRef = useRef(isVisible)\n // the ref is just to prevent most updates on init - charts are not visible on first intersection\n // observer callback, but it still tries to set the state. UseState does not bail out when\n // state doesn't change\n\n useEffect(() => {\n if (typeof IntersectionObserver === \"function\") {\n globalIntersectionObserver.subscribe(\n element,\n (newIsVisible) => {\n if (isVisibleRef.current !== newIsVisible) {\n if (clonedChildrenRef.current) {\n // eslint-disable-next-line no-param-reassign\n clonedChildrenRef.current.style.visibility = newIsVisible ? \"visible\" : \"hidden\"\n }\n\n isVisibleRef.current = newIsVisible\n // we need to mirror it in `use-state` to cause react update\n setIsVisible(newIsVisible)\n }\n },\n )\n }\n return () => {\n globalIntersectionObserver.unsubscribe(element)\n }\n }, [clonedChildrenRef, element])\n\n return isVisible\n}\n","import React from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\n\ninterface Props {\n attributes: Attributes\n}\n\n// rendered on init (for example when chart is not visible)\n// and when it's rendering after being hidden previously\nexport const InvisibleSearchableText = ({\n attributes,\n}: Props) => (\n <span style={{ position: \"absolute\", opacity: 0, width: 0 }}>\n {attributes.id}\n </span>\n)\n","import React, {\n useEffect, useLayoutEffect, useState, useRef,\n} from \"react\"\nimport { useDebounce } from \"react-use\"\nimport { forEachObjIndexed } from \"ramda\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\nimport { selectDestroyOnHide, selectIsAsyncOnScroll, selectAlarm } from \"domains/global/selectors\"\nimport { getPortalNodeStyles } from \"domains/chart/utils/get-portal-node-styles\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { chartLibrariesSettings } from \"domains/chart/utils/chartLibrariesSettings\"\nimport { useCommonIntersection } from \"hooks/use-common-intersection\"\n\nimport { clearChartStateAction } from \"../actions\"\n\nimport { InvisibleSearchableText } from \"./invisible-searchable-text\"\n\nconst SCROLL_DEBOUNCE_ASYNC = 750\nconst SCROLL_DEBOUNCE_SYNC = 100\n\nconst cloneWithCanvas = (element: HTMLElement) => {\n const cloned = element.cloneNode(true) as HTMLElement\n const clonedCanvases = cloned.querySelectorAll(\"canvas\")\n\n element.querySelectorAll(\"canvas\")\n .forEach((oldCanvas, index) => {\n const newCanvas = clonedCanvases[index]\n const context = newCanvas.getContext(\"2d\")\n\n newCanvas.width = oldCanvas.width\n newCanvas.height = oldCanvas.height\n\n if (context) {\n context.drawImage(oldCanvas, 0, 0)\n }\n })\n return cloned\n}\n\nconst shouldCleanChartStateAlways = localStorage.getItem(\"wipe-chart-state\")\n\ninterface Props {\n attributes: Attributes\n chartUuid: string\n children: any\n portalNode: HTMLElement\n}\nexport const DisableOutOfView = ({\n attributes,\n chartUuid,\n children,\n portalNode,\n}: Props) => {\n /* when unmounting, clear redux state for this chart */\n const dispatch = useDispatch()\n useEffect(() => { // eslint-disable-line arrow-body-style\n return () => {\n dispatch(clearChartStateAction({ id: chartUuid }))\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n\n /* separate functionality - adding custom styles to portalNode */\n const chartSettings = chartLibrariesSettings[attributes.chartLibrary]\n const [hasPortalNodeBeenStyled, setHasPortalNodeBeenStyled] = useState<boolean>(false)\n const isShowingAlarmOnChart = useSelector(selectAlarm)?.chartId === attributes.id\n useLayoutEffect(() => {\n if (hasPortalNodeBeenStyled) {\n return\n }\n const shouldAddSpecialHeight = isShowingAlarmOnChart\n && attributes.chartLibrary === \"dygraph\"\n && chartSettings.hasLegend(attributes)\n const styles = getPortalNodeStyles(attributes, chartSettings, shouldAddSpecialHeight)\n forEachObjIndexed((value, styleName) => {\n if (value) {\n portalNode.style.setProperty(styleName, value)\n }\n }, styles)\n // eslint-disable-next-line no-param-reassign\n portalNode.className = chartSettings.containerClass(attributes)\n setHasPortalNodeBeenStyled(true)\n }, [attributes, chartSettings, hasPortalNodeBeenStyled, isShowingAlarmOnChart, portalNode,\n setHasPortalNodeBeenStyled ])\n /* end of \"adding custom styles to portalNode\" */\n\n\n const destroyOnHide = useSelector(selectDestroyOnHide)\n\n const clonedChildrenRef = useRef<HTMLElement>()\n const isVisibleIntersection = useCommonIntersection(portalNode, clonedChildrenRef)\n\n // todo hook to scroll (observe on visible items) instead of changes in intersectionRatio\n // because intersectinnRatio maxes out on 1.0 when element is fully visible\n const isAsyncOnScroll = useSelector(selectIsAsyncOnScroll)\n const debounceTime = isAsyncOnScroll ? SCROLL_DEBOUNCE_ASYNC : SCROLL_DEBOUNCE_SYNC\n\n // \"should hide because of debounced scroll handler\"\n const [shouldHideDebounced, setShouldHideDebounced] = useState(!isVisibleIntersection)\n useDebounce(\n () => {\n // start rendering, when intersectionRatio is not 0 and it hasn't changed for 1500 ms\n setShouldHideDebounced(!isVisibleIntersection)\n },\n debounceTime,\n [isVisibleIntersection],\n )\n const shouldHide = isVisibleIntersection ? shouldHideDebounced : true\n\n const previousIsVisibleIntersection = useRef(isVisibleIntersection)\n if (clonedChildrenRef.current\n && previousIsVisibleIntersection.current !== isVisibleIntersection\n ) {\n previousIsVisibleIntersection.current = isVisibleIntersection\n }\n\n useEffect(() => {\n if (!isPrintMode && shouldHide && shouldCleanChartStateAlways) {\n dispatch(clearChartStateAction({ id: chartUuid }))\n }\n }, [chartUuid, dispatch, shouldHide])\n\n\n if (isPrintMode) {\n // we should show everything in this case\n return children\n }\n\n if (shouldHide) {\n // todo perhaps loader should be added here to both scenarios\n if (destroyOnHide) {\n return (\n <InvisibleSearchableText attributes={attributes} />\n )\n }\n\n if (!clonedChildrenRef.current) {\n const newClonedChildren = Array.from(portalNode.children)\n .map((child) => cloneWithCanvas(child as HTMLElement))\n\n const clonedChildrenContainer = document.createElement(\"div\")\n clonedChildrenContainer.style.visibility = \"hidden\"\n\n newClonedChildren.forEach((child) => {\n clonedChildrenContainer.appendChild(child)\n })\n\n clonedChildrenRef.current = clonedChildrenContainer\n }\n\n return (\n <>\n <InvisibleSearchableText attributes={attributes} />\n <div\n ref={(nodeElement) => {\n if (nodeElement && clonedChildrenRef.current) {\n nodeElement.appendChild(clonedChildrenRef.current)\n }\n }}\n />\n </>\n )\n }\n\n if (!destroyOnHide && clonedChildrenRef.current) {\n clonedChildrenRef.current = undefined\n }\n\n return children\n}\n","import React from \"react\"\n\nimport { Attributes } from \"../../utils/transformDataAttributes\"\nimport { ChartMetadata } from \"../../chart-types\"\nimport { ChartWithLoader, RenderCustomElementForDygraph } from \"../chart-with-loader\"\nimport { DisableOutOfView } from \"../disable-out-of-view\"\nimport { DropdownMenu } from \"../chart-dropdown\"\n\nexport type Props = {\n attributes: Attributes\n // warning! this is not the same as chartId in old dashboard\n // here, the chartID must be unique across all agents\n chartUuid: string\n uuid?: string\n portalNode: HTMLElement\n chartMetadata?: ChartMetadata | undefined\n dropdownMenu?: DropdownMenu\n renderCustomElementForDygraph?: RenderCustomElementForDygraph\n onAttributesChange?: any\n}\n\nexport const ChartContainer = ({\n attributes,\n chartMetadata,\n chartUuid,\n dropdownMenu,\n portalNode,\n renderCustomElementForDygraph,\n onAttributesChange,\n uuid,\n}: Props) => (\n <DisableOutOfView attributes={attributes} portalNode={portalNode} chartUuid={chartUuid}>\n <ChartWithLoader\n attributes={attributes}\n chartUuid={chartUuid}\n renderCustomElementForDygraph={renderCustomElementForDygraph}\n onAttributesChange={onAttributesChange}\n dropdownMenu={dropdownMenu}\n externalChartMetadata={chartMetadata}\n portalNode={portalNode}\n uuid={uuid}\n />\n </DisableOutOfView>\n)\n","/* eslint-disable max-len */\nimport { ChartsMetadata } from \"domains/global/types\"\nimport { AnyStringKeyT } from \"types/common\"\nimport { ChartEnriched } from \"domains/chart/chart-types\"\n\nexport interface Submenus {\n [submenus: string]: {\n charts: ChartEnriched[]\n height: number\n info: string | null\n priority: number\n title: string | null\n }\n}\n\nexport interface CorrelationMetadata {\n scoredCount?: number\n totalCount?: number\n averageScore?: number\n}\n\nexport interface Menu {\n // eslint-disable-next-line camelcase\n menu_pattern: string\n priority: number\n submenus: Submenus\n title: string\n icon: string\n info: string\n height: number\n correlationsMetadata?: CorrelationMetadata\n}\n\nexport interface Menus {\n [menu: string]: Menu\n}\n\nexport const options = {\n menus: {} as Menus,\n submenu_names: {} as {[family: string]: string},\n data: null as (ChartsMetadata | null),\n hostname: \"netdata_server\", // will be overwritten by the netdata server\n version: \"unknown\",\n release_channel: \"unknown\",\n hosts: [],\n\n duration: 0, // the default duration of the charts\n update_every: 1,\n\n chartsPerRow: 0,\n // chartsMinWidth: 1450,\n chartsHeight: 180,\n}\n\n\n// netdata standard information\nexport const netdataDashboard = {\n sparklines_registry: {} as {[key: string]: { count: number }},\n os: \"unknown\",\n\n menu: {},\n submenu: {} as {\n [family: string]: {\n info?: string | ((os: string) => string)\n title?: string\n }\n },\n context: {} as {\n [id: string]: {\n valueRange: string // examples: \"[0, 100]\", \"[null, null]\"\n height: number\n decimalDigits: number\n }},\n\n // generate a sparkline\n // used in the documentation\n sparkline(\n prefix: string, chart: string, dimension: string, units: string = \"\", suffix: string,\n ) {\n if (options.data === null || typeof options.data.charts === \"undefined\") {\n return \"\"\n }\n\n if (typeof options.data.charts[chart] === \"undefined\") {\n return \"\"\n }\n\n if (typeof options.data.charts[chart].dimensions === \"undefined\") {\n return \"\"\n }\n\n if (typeof options.data.charts[chart].dimensions[dimension] === \"undefined\") {\n return \"\"\n }\n\n let key = `${chart}.${dimension}`\n\n if (typeof this.sparklines_registry[key] === \"undefined\") {\n this.sparklines_registry[key] = { count: 1 }\n } else {\n this.sparklines_registry[key].count += 1\n }\n\n key = `${key}.${this.sparklines_registry[key].count}`\n\n return `${prefix}<div class=\"netdata-container\" data-netdata=\"${chart}\" data-after=\"-120\"\n data-width=\"25%\" data-height=\"15px\" data-chart-library=\"dygraph\"\n data-dygraph-theme=\"sparkline\" data-dimensions=\"${dimension}\"\n data-show-value-of-${dimension}-at=\"${key}\"></div>\n (<span id=\"${key}\" style=\"display: inline-block; min-width: 50px; text-align: right;\">\n X</span>${units})${suffix}`\n },\n\n gaugeChart(\n title: string, width: string, dimensions: string = \"\", colors: string = \"\",\n ) {\n return `${\"<div class=\\\"netdata-container\\\" data-netdata=\\\"CHART_UNIQUE_ID\\\"\"\n + \" data-dimensions=\\\"\"}${dimensions}\"`\n + \" data-chart-library=\\\"gauge\\\"\"\n + \" data-gauge-adjust=\\\"width\\\"\"\n + ` data-title=\"${title}\"`\n + ` data-width=\"${width}\"`\n + \" data-before=\\\"0\\\"\"\n + \" data-after=\\\"-CHART_DURATION\\\"\"\n + \" data-points=\\\"CHART_DURATION\\\"\"\n + ` data-colors=\"${colors}\"`\n + \" role=\\\"application\\\"></div>\"\n },\n\n anyAttribute(obj: AnyStringKeyT, attr: string, key: string, def: unknown) {\n if (typeof (obj[key]) !== \"undefined\") {\n const x = obj[key][attr]\n\n if (typeof (x) === \"undefined\") {\n return def\n }\n\n if (typeof (x) === \"function\") {\n return x(netdataDashboard.os)\n }\n\n return x\n }\n\n return def\n },\n\n menuTitle(chart: ChartEnriched) {\n if (chart.sectionTitle) {\n return chart.sectionTitle\n }\n if (typeof chart.menu_pattern !== \"undefined\") {\n const type = chart.type || chart.id.split(\".\")[0]\n return (`${this.anyAttribute(this.menu, \"title\", chart.menu_pattern, chart.menu_pattern)\n .toString()\n } ${type.slice(-(type.length - chart.menu_pattern.length - 1)).toString()}`)\n .replace(/_/g, \" \")\n }\n\n return (this.anyAttribute(this.menu, \"title\", chart.menu, chart.menu)).toString()\n .replace(/_/g, \" \")\n },\n\n menuIcon(chart: ChartEnriched) {\n if (typeof chart.menu_pattern !== \"undefined\") {\n return this.anyAttribute(this.menu, \"icon\", chart.menu_pattern,\n \"<i class=\\\"fas fa-puzzle-piece\\\"></i>\").toString()\n }\n\n return this.anyAttribute(this.menu, \"icon\", chart.menu, \"<i class=\\\"fas fa-puzzle-piece\\\"></i>\")\n },\n\n menuInfo(chart: ChartEnriched) {\n if (typeof chart.menu_pattern !== \"undefined\") {\n return this.anyAttribute(this.menu, \"info\", chart.menu_pattern, null)\n }\n\n return this.anyAttribute(this.menu, \"info\", chart.menu, null)\n },\n\n menuHeight(chart: ChartEnriched) {\n if (typeof chart.menu_pattern !== \"undefined\") {\n return this.anyAttribute(this.menu, \"height\", chart.menu_pattern, 1.0)\n }\n\n return this.anyAttribute(this.menu, \"height\", chart.menu, 1.0)\n },\n\n submenuTitle(menu: string, submenu: string) {\n const key = `${menu}.${submenu}`\n // console.log(key);\n const title = this.anyAttribute(this.submenu, \"title\", key, submenu)\n .toString().replace(/_/g, \" \") as string\n if (title.length > 28) {\n const a = title.substring(0, 13)\n const b = title.substring(title.length - 12, title.length)\n return `${a}...${b}`\n }\n return title\n },\n\n submenuInfo(menu: string, submenu: string) {\n const key = `${menu}.${submenu}`\n return this.anyAttribute(this.submenu, \"info\", key, null) as (string | null)\n },\n\n submenuHeight(menu: string, submenu: string, relative: number) {\n const key = `${menu}.${submenu}`\n return this.anyAttribute(this.submenu, \"height\", key, 1.0) * relative\n },\n\n contextInfo(id: string) {\n const x = this.anyAttribute(this.context, \"info\", id, null)\n\n if (x !== null) {\n return `<div class=\"shorten dashboard-context-info\"\n role=\"document\">${x}</div>`\n }\n return \"\"\n },\n\n contextValueRange(id: string) {\n if (typeof this.context[id] !== \"undefined\"\n && typeof this.context[id].valueRange !== \"undefined\"\n ) {\n try {\n return JSON.parse(this.context[id].valueRange)\n } catch (e) {\n return [null, null]\n }\n }\n return [null, null]\n },\n\n contextHeight(id: string, def: number) {\n if (typeof this.context[id] !== \"undefined\" && typeof this.context[id].height !== \"undefined\") {\n return def * this.context[id].height\n }\n return def\n },\n\n contextDecimalDigits(id: string, def: number) {\n if (typeof this.context[id] !== \"undefined\"\n && typeof this.context[id].decimalDigits !== \"undefined\"\n ) {\n return this.context[id].decimalDigits\n }\n return def\n },\n}\n\n// @ts-ignore\nwindow.netdataDashboard = netdataDashboard\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/destructuring-assignment */\n/* eslint-disable operator-linebreak */\n/* eslint-disable arrow-body-style */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { memo } from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, Text } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { useFormatters } from \"domains/chart/utils/formatters\"\nimport { netdataDashboard } from \"domains/dashboard/utils/netdata-dashboard\"\nimport { selectChartData } from \"domains/chart/selectors\"\n\nconst Title = styled(Text)`\n text-overflow: ellipsis;\n max-width: 120px;\n overflow-x: hidden;\n`\n\nconst getUnitSign = unit => {\n return unit === \"percentage\" ? \"%\" : ` ${unit.replace(/milliseconds/, \"ms\")}`\n}\n\nconst aggrMethods = {\n avg: \"Average\",\n sum: \"Sum\",\n min: \"Min\",\n max: \"Max\",\n}\nconst getAggregation = value => `${aggrMethods[value]}` || \"\"\n\nconst ChartValueContainer = memo(({ id, units, aggrMethod, displayedIndex }) => {\n const chartData = useSelector((state: AppStateT) => selectChartData(state, { id }))\n\n const value =\n typeof displayedIndex === \"number\"\n ? chartData.result[displayedIndex]\n : chartData.view_latest_values[0]\n\n const { legendFormatValue, unitsCurrent } = useFormatters({\n attributes: {},\n data: chartData,\n units,\n unitsCommon: null,\n unitsDesired: null,\n uuid: id,\n })\n\n const aggregation = getAggregation(aggrMethod)\n\n return (\n <Text\n wordBreak=\"keep-all\"\n color=\"bright\"\n margin={[0, 0, 0, \"auto\"]}\n data-testid=\"k8sPopoverChart-chartValue\"\n >\n {aggregation && (\n <Text margin={[0, 1, 0, 0]} color=\"separator\" data-testid=\"k8sPopoverChart-chartValue-aggr\">\n {aggregation}\n </Text>\n )}\n {legendFormatValue(value)}\n {getUnitSign(unitsCurrent)}\n </Text>\n )\n})\n\nconst ChartValue = ({ id, ...rest }) => {\n const chartData = useSelector((state: AppStateT) => selectChartData(state, { id }))\n\n if (!chartData || chartData.result.length === 0) return null\n return <ChartValueContainer id={id} {...rest} />\n}\n\nconst ChartOverview = ({ id, chartMetadata, aggrMethod, displayedIndex }) => {\n const { units, context } = chartMetadata\n const title = context.replace(/cgroup\\./, \"\")\n const icon = netdataDashboard.menuIcon(chartMetadata)\n\n return (\n <Flex gap={2} data-testid=\"k8sPopoverChart-overview\">\n <Text color=\"bright\" dangerouslySetInnerHTML={{ __html: icon }} />\n <Title color=\"bright\" data-testid=\"k8sPopoverChart-title\">\n {title}\n </Title>\n <ChartValue id={id} units={units} aggrMethod={aggrMethod} displayedIndex={displayedIndex} />\n </Flex>\n )\n}\n\nexport default memo(ChartOverview)\n","import React, { useMemo } from \"react\"\nimport Anchor from \"@/src/components/anchor\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport { useLocalStorage } from \"react-use\"\nimport { utmUrlSuffix } from \"utils/utils\"\nimport { utmParametersToString } from \"domains/global/selectors\"\n\nexport type UserStatus = \"LOGGED_IN\" | \"EXPIRED_LOGIN\" | \"UNKNOWN\"\nexport type NodeClaimedStatus = \"NOT_CLAIMED\" | \"CLAIMED\"\nexport type UserNodeAccess = \"NO_ACCESS\" | \"ACCESS_OK\"\ntype UserPreference = \"AGENT\" | \"CLOUD\" | \"UNDEFINED\"\nexport type NodeLiveness = \"LIVE\" | \"NOT_LIVE\"\ntype CTATYPE = \"NAVIGATE\" | \"REFRESH\"\n\nexport enum MigrationModalPromos {\n PROMO_SIGN_IN_CLOUD = \"PROMO_SIGN_IN_CLOUD\",\n PROMO_SIGN_UP_CLOUD = \"PROMO_SIGN_UP_CLOUD\",\n PROMO_IVNITED_TO_SPACE = \"PROMO_IVNITED_TO_SPACE\",\n PROMO_CLAIM_NODE = \"PROMO_CLAIM_NODE\",\n PROMO_TO_USE_NEW_DASHBAORD = \"PROMO_TO_USE_NEW_DASHBAORD\",\n FALLBACK_TO_AGENT = \"FALLBACK_TO_AGENT\",\n NO_INFO_FALLBACK_TO_AGENT = \"NO_INFO_FALLBACK_TO_AGENT\",\n}\n\ntype MigrationModalActions = {\n text: string\n action: CTATYPE\n toPath?: string\n userPreference?: UserPreference | \"DONT_SHOW\"\n}\n\ntype MigrationModalContent = {\n title: string\n text: {\n header: ((props: any) => React.ReactNode) | string\n bullets?: Array<string | ((props?: any) => React.ReactNode)>\n footer?: ((props: any) => React.ReactNode) | string\n }\n tickBoxOption: { text: string; preferenceID: MigrationModalPromos }\n CTA1: MigrationModalActions\n CTA2?: MigrationModalActions\n}\n\ntype MigrationModalInfo = {\n [key in MigrationModalPromos]: MigrationModalContent\n}\n\nconst campaign = \"agent_nudge_to_cloud\"\n\nconst makeUTMParameters = (modalPromo: MigrationModalPromos) =>\n `${utmUrlSuffix}${utmParametersToString({\n content: modalPromo,\n campaign,\n })}`\n\nexport const migrationmodalInfo: MigrationModalInfo = {\n [MigrationModalPromos.PROMO_SIGN_UP_CLOUD]: {\n title: \"Learn about Netdata Cloud!\",\n text: {\n header: () => (\n <Text strong>\n Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:\n </Text>\n ),\n bullets: [\n \"Infrastructure level dashboards (each chart aggregates data from multiple nodes)\",\n \"Central dispatch of alert notifications\",\n \"Custom dashboards editor\",\n \"Intelligence assisted troubleshooting, to help surface the root cause of issues\",\n ],\n footer: \"Have a look, you will be surprised!\",\n },\n tickBoxOption: {\n text: \"Remember my choice\",\n preferenceID: MigrationModalPromos.PROMO_SIGN_UP_CLOUD,\n },\n CTA1: {\n text: \"Wow! Let’s go to Netdata Cloud\",\n toPath: \"path/signup/cloud\",\n action: \"NAVIGATE\",\n userPreference: \"CLOUD\",\n },\n CTA2: {\n text: \"Later, stay at the agent dashboard\",\n action: \"NAVIGATE\",\n toPath: \"path/agent-dashboard\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.PROMO_SIGN_IN_CLOUD]: {\n title: \"Sign-in to Netdata Cloud or get an invitation!\",\n text: {\n header: () => (\n <>\n <Text strong>\n This node is connected to Netdata Cloud but you are not. If you have a Netdata Cloud\n account sign-in, if not ask for an invitation to it.\n </Text>\n\n <Text>\n Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:\n </Text>\n </>\n ),\n bullets: [\n \"Infrastructure level dashboards (each chart aggregates data from multiple nodes)\",\n \"Central dispatch of alert notifications\",\n \"Custom dashboards editor\",\n \"Intelligence assisted troubleshooting, to help surface the root cause of issues\",\n ],\n footer: \"Have a look, you will be surprised!\",\n },\n tickBoxOption: {\n text: \"Remember my choice\",\n preferenceID: MigrationModalPromos.PROMO_SIGN_IN_CLOUD,\n },\n CTA1: {\n text: \"Sign-in or get a Netdata Cloud account\",\n action: \"NAVIGATE\",\n toPath: \"path/signin/cloud\",\n userPreference: \"CLOUD\",\n },\n CTA2: {\n text: \"Later, stay at the Agent dashboard\",\n toPath: \"path/agent-dashboard\",\n action: \"NAVIGATE\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.PROMO_IVNITED_TO_SPACE]: {\n title: \"Get an invitation to this Node’s Space!\",\n text: {\n header: () => (\n <Text strong>\n This node is connected to Netdata Cloud but it isnt available on one of your Spaces.\n </Text>\n ),\n bullets: [],\n footer: \"Ask for an invitation to this Space!\",\n },\n tickBoxOption: {\n text: \"Don't remind me of this again\",\n preferenceID: MigrationModalPromos.PROMO_IVNITED_TO_SPACE,\n },\n CTA1: {\n text: \"Thanks, stay at Agent dashboard for now\",\n toPath: \"agent\",\n action: \"NAVIGATE\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.PROMO_CLAIM_NODE]: {\n title: \"This node isn’t connected to Netdata Cloud\",\n text: {\n header: () => (\n <Text strong>\n For you to be able to see this node on Netdata Cloud you will either need to:\n </Text>\n ),\n footer: \"Have a look, you will be surprised!\",\n bullets: [\n () => {\n return (\n <Text>\n {\" \"}\n Connect this node directly (documentation on{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`https://learn.netdata.cloud/docs/agent/claim?${makeUTMParameters(\n MigrationModalPromos.PROMO_CLAIM_NODE\n ).substring(1)}#how-to-connect-a-node`}\n >\n how to connect a node\n </Anchor>\n ) , or\n </Text>\n )\n },\n () => {\n return (\n <Text>\n Αctivate streaming to a parent node that is already connected (documentation on{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`https://learn.netdata.cloud/docs/metrics-storage-management/enable-streaming?${makeUTMParameters(\n MigrationModalPromos.PROMO_CLAIM_NODE\n ).substring(1)}`}\n >\n how to configure streaming\n </Anchor>\n )\n </Text>\n )\n },\n ],\n },\n tickBoxOption: {\n text: \"Remember my choice.\",\n preferenceID: MigrationModalPromos.PROMO_CLAIM_NODE,\n },\n CTA1: {\n text: \"Wow! Let’s go to Netdata Cloud\",\n action: \"NAVIGATE\",\n toPath: \"path/node/cloud\",\n userPreference: \"CLOUD\",\n },\n CTA2: {\n text: \"Later, stay at the Agent dashboard\",\n action: \"NAVIGATE\",\n toPath: \"path/agent-dashboard\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.PROMO_TO_USE_NEW_DASHBAORD]: {\n title: \"Use the Old or the New dashboard?\",\n text: {\n header: () => (\n <Text strong>\n This node is available in your Netdata Cloud account. So, you have full access to the NEW\n dashboards, charts, intelligence-assisted troubleshooting and many more!\n </Text>\n ),\n bullets: [],\n },\n tickBoxOption: {\n text: \"Remember my choice\",\n preferenceID: MigrationModalPromos.PROMO_TO_USE_NEW_DASHBAORD,\n },\n CTA1: {\n text: \"Wow! Let’s go to Netdata Cloud \",\n action: \"NAVIGATE\",\n toPath: \"path/dashboard/cloud\",\n userPreference: \"CLOUD\",\n },\n CTA2: {\n text: \"Later, stay at the Agent dashboard\",\n action: \"NAVIGATE\",\n toPath: \"path/agent-dashboard\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.FALLBACK_TO_AGENT]: {\n title: \"Oops! This node has lost connection to Netdata Cloud!\",\n text: {\n header: ({ date = \"\" }) => {\n return (\n <>\n <Text strong>\n Unfortunately, it seems that this node is not currently connected to Netdata Cloud.\n So, the old agent dashboard is the only option available.\n </Text>\n {/* <Text>\n The node lost its Netdata Cloud connection at <Text strong>{date}</Text>.\n </Text> */}\n <Text>\n To troubleshoot Netdata Cloud connection issues, please follow this{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href={`https://learn.netdata.cloud/docs/agent/claim?${makeUTMParameters(\n MigrationModalPromos.FALLBACK_TO_AGENT\n ).substring(1)}#troubleshooting`}\n >\n this guide.\n </Anchor>\n </Text>\n </>\n )\n },\n bullets: [],\n },\n tickBoxOption: {\n text: \"Don't show this again\",\n preferenceID: MigrationModalPromos.FALLBACK_TO_AGENT,\n },\n CTA1: {\n text: \"Check again please\",\n action: \"REFRESH\",\n userPreference: undefined,\n },\n CTA2: {\n text: \"Thanks, stay at Agent dashboard\",\n toPath: \"path/agent\",\n action: \"NAVIGATE\",\n userPreference: \"AGENT\",\n },\n },\n [MigrationModalPromos.NO_INFO_FALLBACK_TO_AGENT]: {\n title: \"Oops! We aren't able to get information of this node in regards to Netdata Cloud!\",\n text: {\n header: () => {\n return (\n <>\n <Text strong>\n Unfortunately, it seems we aren't able to get information on this node in regards to\n Netdata Cloud.\n </Text>\n <Text>\n This could be from internet connectivity issues from your end or some temporary issue\n with our services. So, the old agent dashboard is the only option available.\n </Text>\n </>\n )\n },\n bullets: [],\n },\n tickBoxOption: {\n text: \"Don't show this again\",\n preferenceID: MigrationModalPromos.NO_INFO_FALLBACK_TO_AGENT,\n },\n CTA1: {\n text: \"Check again please\",\n action: \"REFRESH\",\n userPreference: undefined,\n },\n CTA2: {\n text: \"Thanks, stay at Agent dashboard\",\n toPath: \"path/agent-dashboard\",\n action: \"NAVIGATE\",\n userPreference: \"AGENT\",\n },\n },\n}\n\nexport type PromoProps = {\n userSavedPreference?: UserPreference\n userStatus?: UserStatus\n nodeClaimedStatus?: NodeClaimedStatus\n userNodeAccess?: UserNodeAccess\n nodeLiveness?: NodeLiveness\n}\n\nconst isPromoSignUp = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" && userStatus === \"UNKNOWN\" && nodeClaimedStatus === \"NOT_CLAIMED\"\n\nconst isPromoSignIn = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" && userStatus === \"UNKNOWN\" && nodeClaimedStatus === \"CLAIMED\"\n\nconst isPromoInvitedToSpace = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n userNodeAccess,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeClaimedStatus === \"CLAIMED\" &&\n userNodeAccess === \"NO_ACCESS\"\n\nconst isPromoToClaimThisNode = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeClaimedStatus === \"NOT_CLAIMED\"\n\nconst isPromoToNewDasboardOnCloud = ({\n userSavedPreference,\n userStatus,\n nodeLiveness,\n userNodeAccess,\n}: PromoProps): boolean =>\n !userSavedPreference &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeLiveness === \"LIVE\" &&\n userNodeAccess === \"ACCESS_OK\"\n\nconst isNoInfoFallbackToAgent = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n nodeLiveness,\n userNodeAccess,\n}: PromoProps): boolean =>\n userSavedPreference === \"CLOUD\" &&\n !userStatus &&\n !nodeClaimedStatus &&\n !nodeLiveness &&\n !userNodeAccess\n\nconst isFallbackToAgent = ({\n userSavedPreference,\n userStatus,\n nodeClaimedStatus,\n nodeLiveness,\n userNodeAccess,\n}: PromoProps): boolean =>\n userSavedPreference !== \"AGENT\" &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeClaimedStatus === \"CLAIMED\" &&\n nodeLiveness === \"NOT_LIVE\" &&\n userNodeAccess === \"ACCESS_OK\"\n\nexport const goToAgentDashboard = ({ userSavedPreference }: PromoProps) =>\n userSavedPreference === \"AGENT\"\n\nexport const goToCloud = ({\n userSavedPreference,\n userStatus,\n nodeLiveness,\n userNodeAccess,\n}: PromoProps) =>\n userSavedPreference === \"CLOUD\" &&\n (userStatus === \"LOGGED_IN\" || userStatus === \"EXPIRED_LOGIN\") &&\n nodeLiveness === \"LIVE\" &&\n userNodeAccess === \"ACCESS_OK\"\n\nconst modalStatusWithPromoFunctions: Record<\n MigrationModalPromos,\n (props: PromoProps) => boolean\n> = {\n [MigrationModalPromos.FALLBACK_TO_AGENT]: isFallbackToAgent,\n [MigrationModalPromos.NO_INFO_FALLBACK_TO_AGENT]: isNoInfoFallbackToAgent,\n [MigrationModalPromos.PROMO_TO_USE_NEW_DASHBAORD]: isPromoToNewDasboardOnCloud,\n [MigrationModalPromos.PROMO_CLAIM_NODE]: isPromoToClaimThisNode,\n [MigrationModalPromos.PROMO_IVNITED_TO_SPACE]: isPromoInvitedToSpace,\n [MigrationModalPromos.PROMO_SIGN_IN_CLOUD]: isPromoSignIn,\n [MigrationModalPromos.PROMO_SIGN_UP_CLOUD]: isPromoSignUp,\n}\n\nconst useMigrationModal = ({\n userStatus,\n nodeClaimedStatus,\n userNodeAccess,\n nodeLiveness,\n}: PromoProps) => {\n const [userSavedPreference, setUserPrefrence] = useLocalStorage<UserPreference>(\n \"USER_SAVED_PREFERENCE\"\n )\n\n const migrationModalPromo = useMemo<MigrationModalPromos>(() => {\n return Object.keys(modalStatusWithPromoFunctions).find(modalStatus => {\n return modalStatusWithPromoFunctions[modalStatus]({\n userStatus,\n nodeClaimedStatus,\n userNodeAccess,\n userSavedPreference,\n nodeLiveness,\n })\n }) as MigrationModalPromos\n }, [userStatus, nodeClaimedStatus, userNodeAccess, nodeLiveness, userSavedPreference])\n\n return {\n migrationModalPromoInfo: migrationmodalInfo[migrationModalPromo],\n migrationModalPromo,\n setUserPrefrence,\n userSavedPreference,\n }\n}\n\nexport default useMigrationModal\n","/* eslint-disable comma-dangle */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { useRef, useContext, useLayoutEffect, useState, memo, useMemo } from \"react\"\nimport { throttle } from \"throttle-debounce\"\nimport { ChartContainer } from \"domains/chart/components/chart-container\"\nimport { ThemeContext } from \"styled-components\"\nimport { Flex, getColor } from \"@netdata/netdata-ui\"\nimport ChartOverview from \"./chartOverview\"\n\nconst Chart = ({ groupLabel, postGroupLabel, id, attributes, relatedIndex }) => {\n const theme = useContext(ThemeContext)\n const chartContainerRef = useRef()\n const [displayedIndex, setDisplayedIndex] = useState()\n const setDisplayedIndexThrottled = useMemo(() => throttle(400, setDisplayedIndex), [])\n const [, repaint] = useState()\n\n useLayoutEffect(() => {\n repaint(true)\n }, [])\n\n const { chartMetadata, attributes: relatedChartAttributes } = attributes.relatedCharts[\n relatedIndex\n ]\n\n const chartAttributes = useMemo(\n () => ({\n id: chartMetadata.id,\n\n width: \"100%\",\n height: \"60px\",\n\n chartLibrary: \"sparkline\",\n sparklineLineWidth: \"2px\",\n sparklineLineColor: getColor(\"border\")({ theme }),\n sparklineFillColor: getColor(\"disabled\")({ theme }),\n sparklineSpotRadius: 0,\n sparklineDisableTooltips: true,\n sparklineOnHover: (event) => setDisplayedIndexThrottled(event?.x),\n\n httpMethod: \"POST\",\n host: attributes.host,\n nodeIDs: attributes.nodeIDs,\n dimensions: relatedChartAttributes.dimensions,\n aggrMethod: relatedChartAttributes.aggrMethod,\n\n labels: {\n k8s_cluster_id: [chartMetadata.chartLabels.k8s_cluster_id[0]],\n [attributes.groupBy]: [groupLabel],\n ...(postGroupLabel && { [attributes.postGroupBy]: [postGroupLabel] }),\n },\n }),\n [chartMetadata, attributes]\n )\n\n return (\n <Flex gap={2} column data-testid=\"k8sPopoverChart\">\n <div\n ref={chartContainerRef}\n style={{ height: \"60px\", width: \"100%\" }}\n data-testid=\"k8sPopoverChart-container\"\n >\n {chartContainerRef.current && (\n <ChartContainer\n chartUuid={id}\n attributes={chartAttributes}\n chartMetadata={chartMetadata}\n portalNode={chartContainerRef.current}\n />\n )}\n </div>\n <ChartOverview\n id={id}\n aggrMethod={chartAttributes.aggrMethod}\n chartMetadata={chartMetadata}\n displayedIndex={displayedIndex}\n />\n </Flex>\n )\n}\n\nexport default memo(Chart)\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport styled from \"styled-components\"\nimport { Text, Flex, Icon } from \"@netdata/netdata-ui\"\n\nconst ExternalButton = styled(Icon).attrs({\n margin: [0, 0, 0, \"auto\"],\n color: \"bright\",\n width: \"10px\",\n height: \"10px\",\n alignSelf: \"center\",\n name: \"nav_arrow_goto\",\n role: \"button\",\n title: \"Go to node\",\n \"data-testid\": \"k8sPopoverItem-externalButton\",\n})`\n cursor: pointer;\n`\n\nconst Item = ({ icon, title, secondary, onClick }) => (\n <Flex gap={1} alignItems=\"start\" data-testid=\"k8sPopoverItem\">\n <Flex width=\"22px\" height=\"22px\" data-testid=\"k8sPopoverItem-icon\">\n <Icon name={icon} color=\"bright\" margin={[0, 1, 0, 0]} width=\"22px\" height=\"22px\" />\n </Flex>\n <Text color=\"bright\" data-testid=\"k8sPopoverItem-title\">\n {title}\n </Text>\n {secondary && (\n <Text color=\"border\" wordBreak=\"break-all\" data-testid=\"k8sPopoverItem-detail\">\n {secondary}\n </Text>\n )}\n {onClick && <ExternalButton onClick={onClick} />}\n </Flex>\n)\n\nexport default Item\n","/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { useDateTime } from \"utils/date-time\"\nimport Item from \"./item\"\nimport Section from \"./section\"\n\nconst DateItem = ({ date, title }) => {\n const { localeDateString, localeTimeString } = useDateTime()\n\n return (\n <Item\n icon=\"around_clock\"\n title={title}\n secondary={`${localeDateString(date)} | ${localeTimeString(date)}`}\n />\n )\n}\n\nconst DateSection = ({ before, after }) => (\n <Section title=\"Time\">\n <DateItem title=\"From\" date={after} />\n <DateItem title=\"To\" date={before} />\n </Section>\n)\n\nexport default DateSection\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Section from \"./section\"\nimport Chart from \"./chart\"\nimport DateSection from \"./dateSection\"\n\nconst Metrics = ({ groupLabel, postGroupLabel, attributes, viewAfter, viewBefore }) => (\n <Flex gap={3} column width=\"100%\" data-testid=\"k8sPopoverMetrics\">\n <DateSection after={viewAfter} before={viewBefore} />\n <Section title=\"Metrics\" noBorder>\n <Flex gap={3} column data-testid=\"k8sPopoverMetrics-container\">\n {attributes.relatedCharts.map(({ chartMetadata }, index) => (\n <Chart\n key={chartMetadata.id}\n id={[groupLabel, postGroupLabel, attributes.id, chartMetadata.id].join(\"|\")}\n attributes={attributes}\n relatedIndex={index}\n groupLabel={groupLabel}\n postGroupLabel={postGroupLabel}\n />\n ))}\n </Flex>\n </Section>\n </Flex>\n)\n\nexport default Metrics\n","/* eslint-disable no-param-reassign */\n/* eslint-disable comma-dangle */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { memo } from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Item from \"./item\"\nimport Section from \"./section\"\nimport getLabel, { labelIds } from \"./getLabel\"\n\nconst LabelsSection = ({ labelId, items, onExpand, onItemClick, ...rest }) => {\n const { title, icon } = getLabel(labelId)\n const sliced = items.slice(0, 3)\n const expandable = items.length > 3\n\n const text = expandable ? `${title} (${items.length})` : title\n return (\n <Section title={text} onExpand={expandable && onExpand} {...rest}>\n {sliced.map((item) => (\n <Item\n key={item}\n icon={icon}\n title={item}\n onClick={onItemClick && (() => onItemClick(item))}\n />\n ))}\n </Section>\n )\n}\n\nconst getLabelIds = (chartLabels) => {\n chartLabels = { ...chartLabels }\n const predefinedLabelIds = labelIds.reduce((acc, labelId) => {\n if (!(labelId in chartLabels)) return acc\n\n delete chartLabels[labelId]\n return [...acc, labelId]\n }, [])\n\n return [...predefinedLabelIds, ...Object.keys(chartLabels)]\n}\n\nconst Context = ({ chartLabels, onExpand, onNodeClick }) => {\n const ids = getLabelIds(chartLabels)\n\n return (\n <Flex gap={3} column width=\"100%\" data-testid=\"k8sPopoverContext\">\n {ids.map((id, index) => (\n <LabelsSection\n key={id}\n labelId={id}\n items={chartLabels[id]}\n onExpand={() => onExpand(id)}\n noBorder={index === ids.length - 1}\n onItemClick={id === \"k8s_node_name\" && onNodeClick}\n />\n ))}\n </Flex>\n )\n}\n\nexport default memo(Context)\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex, Button, makeFlex } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\nimport Separator from \"./separator\"\nimport Header from \"./header\"\nimport Item from \"./item\"\nimport getLabel from \"./getLabel\"\n\nconst StyledButton = styled(makeFlex(Button)).attrs({\n flavour: \"borderless\",\n neutral: true,\n themeType: \"dark\",\n className: \"btn\",\n alignItems: \"start\",\n gap: 1,\n})`\n &&& {\n padding: 0;\n margin: 0;\n height: initial;\n width: initial;\n\n svg {\n height: 18px;\n width: 18px;\n position: initial;\n }\n }\n`\n\nconst List = ({ labelId, items, onBack, onItemClick }) => {\n const { title, icon } = getLabel(labelId)\n\n return (\n <Flex height=\"100%\" gap={3} data-testid=\"k8sPopoverList\" column>\n <Header>\n <StyledButton\n label={`${title} (${items.length})`}\n icon=\"chevron_left\"\n onClick={onBack}\n data-testid=\"k8sPopoverList-back\"\n />\n </Header>\n <Separator />\n <Flex\n gap={3}\n overflow={{ vertical: \"auto\", horizontal: \"hidden\" }}\n column\n data-testid=\"k8sPopoverList-container\"\n >\n {items.map((item) => (\n <Item\n key={item}\n icon={icon}\n title={item}\n onClick={onItemClick && (() => onItemClick(item))}\n />\n ))}\n </Flex>\n </Flex>\n )\n}\n\nexport default List\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { useState } from \"react\"\nimport { Flex, DropContainer } from \"@netdata/netdata-ui\"\nimport Separator from \"./separator\"\nimport Header from \"./header\"\nimport Tabs from \"./tabs\"\nimport Metrics from \"./metrics\"\nimport Context from \"./context\"\nimport List from \"./list\"\n\nconst Container = (props) => (\n <DropContainer\n background={[\"transparent\", \"popover\"]}\n padding={[2, 4]}\n width=\"322px\"\n height=\"422px\"\n {...props}\n />\n)\n\nconst TabsContainer = ({ label, value, onChange, children }) => (\n <Flex height=\"100%\" column>\n <Header>{label}</Header>\n <Tabs value={value} onChange={onChange} margin={[4, 0, 0, 0]} />\n <Separator />\n <Flex gap={3} overflow={{ vertical: \"auto\", horizontal: \"hidden\" }} margin={[4, 0, 0, 0]}>\n {children}\n </Flex>\n </Flex>\n)\n\nconst Popover = ({\n title,\n groupLabel,\n postGroupLabel,\n chartLabels,\n attributes,\n viewBefore,\n viewAfter,\n ...rest\n}) => {\n const [view, setView] = useState(\"context\")\n\n const isLabelView = view !== \"context\" && view !== \"metrics\"\n\n const { onNodeClick } = attributes\n\n return (\n <Container data-testid=\"k8sPopover\" {...rest}>\n {isLabelView && (\n <List\n labelId={view}\n items={chartLabels[view]}\n attributes={attributes}\n onBack={() => setView(\"context\")}\n onItemClick={view === \"k8s_node_name\" && onNodeClick}\n />\n )}\n {!isLabelView && (\n <TabsContainer label={title} value={view} onChange={setView}>\n {view === \"context\" && (\n <Context chartLabels={chartLabels} onExpand={setView} onNodeClick={onNodeClick} />\n )}\n {view === \"metrics\" && (\n <Metrics\n groupLabel={groupLabel}\n postGroupLabel={postGroupLabel}\n attributes={attributes}\n viewAfter={viewAfter}\n viewBefore={viewBefore}\n />\n )}\n </TabsContainer>\n )}\n </Container>\n )\n}\n\nexport default Popover\n","/* eslint-disable arrow-body-style */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable comma-dangle */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { useMemo } from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { ChartMetadata } from \"domains/chart/chart-types\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes.ts\"\nimport { ChartTimeframe } from \"domains/chart/components/chart-legend-bottom\"\nimport GroupBoxes from \"domains/chart/components/lib-charts/group-box-chart/groupBoxes\"\nimport Legend from \"domains/chart/components/lib-charts/group-box-chart/legend\"\nimport getLabel from \"./getLabel\"\nimport transform from \"./transform\"\nimport Popover from \"./popover\"\n\ninterface Props {\n chartData: any\n chartMetadata: ChartMetadata\n attributes: Attributes\n viewAfter: number\n viewBefore: number\n hoveredRow: number\n hoveredX: number | null\n showUndefined: boolean\n}\n\nconst Kubernetes = ({\n chartData,\n chartMetadata,\n attributes,\n viewAfter,\n viewBefore,\n hoveredRow,\n hoveredX,\n showUndefined,\n}: Props) => {\n const { filteredRows } = attributes\n const { data: groupBoxData, labels, chartLabels } = useMemo(\n () => transform(chartData, filteredRows),\n [filteredRows, chartData]\n )\n\n const {\n id,\n result: { data },\n groupBy,\n postGroupBy,\n } = chartData\n\n const renderBoxPopover = ({ groupIndex, index, align }) => {\n const label = groupBoxData[groupIndex].labels[index]\n const { title } = getLabel(postGroupBy)\n\n return (\n <Popover\n align={align}\n title={`${title}: ${label}`}\n groupLabel={labels[groupIndex]}\n postGroupLabel={label}\n chartLabels={groupBoxData[groupIndex].chartLabels[index]}\n attributes={attributes}\n viewBefore={viewBefore}\n viewAfter={viewAfter}\n />\n )\n }\n\n const renderGroupPopover = ({ groupIndex, align }) => {\n const label = labels[groupIndex]\n const { title } = getLabel(groupBy)\n\n return (\n <Popover\n align={align}\n title={`${title}: ${label}`}\n groupLabel={label}\n chartLabels={chartLabels[groupIndex]}\n attributes={attributes}\n viewBefore={viewBefore}\n viewAfter={viewAfter}\n />\n )\n }\n\n const groupedBoxesData = useMemo(() => {\n return groupBoxData.map((groupedBox) => {\n return {\n labels: groupedBox.labels,\n data:\n hoveredRow === -1 || hoveredRow > data.length || !(hoveredRow in data)\n ? groupedBox.postAggregated\n : groupedBox.indexes.map((index) => data[hoveredRow][index + 1]) || [],\n }\n })\n }, [data, groupBoxData, hoveredRow])\n\n return (\n <Flex column width=\"100%\" height=\"100%\" gap={4} padding={[4, 2]}>\n <GroupBoxes\n data={groupedBoxesData}\n labels={labels}\n renderBoxPopover={renderBoxPopover}\n renderGroupPopover={renderGroupPopover}\n />\n <Flex data-testid=\"legend-container\" justifyContent=\"between\">\n <Legend>{id}</Legend>\n <ChartTimeframe\n chartMetadata={chartMetadata}\n showUndefined={showUndefined}\n hoveredX={hoveredX}\n viewBefore={viewBefore}\n chartData={chartData}\n />\n </Flex>\n </Flex>\n )\n}\n\nexport default Kubernetes\n","/* eslint-disable arrow-body-style */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable comma-dangle */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\n\nexport default (chartData, filteredRows) => {\n const { keys, labels: labelValues, groupBy, postGroupBy, aggrGroups, postAggregated } = chartData\n const groupValues = keys[groupBy]\n const postGroupValues = keys[postGroupBy]\n const indexes = filteredRows || [...Array(groupValues.length)].map((v, index) => index)\n\n const postGroupData = indexes.reduce((acc: any, index: number) => {\n const groupValue = groupValues[index]\n if (!(groupValue in acc)) {\n acc[groupValue] = {\n labels: [],\n indexes: [],\n chartLabels: [],\n postAggregated: [],\n }\n }\n const boxes = acc[groupValue]\n boxes.indexes.push(index)\n boxes.labels.push(postGroupValues[index])\n boxes.postAggregated.push(postAggregated[index])\n\n const chartLabels = aggrGroups.reduce((labelsAcc, label) => {\n return labelValues[label][index]\n ? { ...labelsAcc, [label]: labelValues[label][index] }\n : labelsAcc\n }, {})\n boxes.chartLabels.push(chartLabels)\n return acc\n }, {})\n\n const labels = Object.keys(postGroupData).sort(\n (a, b) => postGroupData[b].indexes.length - postGroupData[a].indexes.length\n )\n\n const groupData = labels.map((label) => postGroupData[label])\n\n const groupChartLabels = groupData.map((boxes) => {\n return aggrGroups.reduce((acc, label) => {\n const groupLabels = new Set(\n boxes.chartLabels.reduce((accChartLabels, chartLabels) => {\n return chartLabels[label] ? [...accChartLabels, ...chartLabels[label]] : accChartLabels\n }, [])\n )\n return groupLabels.size === 0 ? acc : { ...acc, [label]: Array.from(groupLabels) }\n }, {})\n })\n\n return { labels, data: groupData, chartLabels: groupChartLabels }\n}\n","import React, { useCallback } from \"react\"\nimport classNames from \"classnames\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { setGlobalChartUnderlayAction, setGlobalPanAndZoomAction } from \"domains/global/actions\"\nimport { selectSyncPanAndZoom } from \"domains/global/selectors\"\nimport { setChartPanAndZoomAction } from \"domains/chart/actions\"\nimport { useShowValueOutside } from \"hooks/use-show-value-outside\"\n\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport {\n ChartData, ChartMetadata, DygraphData, EasyPieChartData, D3pieChartData,\n} from \"../chart-types\"\nimport { chartLibrariesSettings, ChartLibraryName } from \"../utils/chartLibrariesSettings\"\n\nimport { DygraphChart } from \"./lib-charts/dygraph-chart\"\nimport { EasyPieChart } from \"./lib-charts/easy-pie-chart\"\nimport { GaugeChart } from \"./lib-charts/gauge-chart\"\nimport { SparklineChart } from \"./lib-charts/sparkline-chart\"\nimport { D3pieChart } from \"./lib-charts/d3pie-chart\"\nimport { PeityChart } from \"./lib-charts/peity-chart\"\nimport { GoogleChart } from \"./lib-charts/google-chart\"\nimport { TextOnly } from \"./lib-charts/text-only\"\nimport { KubernetesGroupBoxes } from \"./lib-charts/group-box-chart\"\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: ChartData\n chartMetadata: ChartMetadata\n chartLibrary: ChartLibraryName\n colors: {\n [key: string]: string\n }\n chartUuid: string\n chartHeight: number\n chartWidth: number\n dimensionsVisibility: boolean[]\n hasEmptyData: boolean\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n orderedColors: string[]\n hoveredX: number | null\n onUpdateChartPanAndZoom: (arg: { after: number, before: number, masterID: string }) => void\n immediatelyDispatchPanAndZoom: () => void\n\n hoveredRow: number\n setHoveredX: (hoveredX: number | null, noMaster?: boolean) => void\n setMinMax: (minMax: [number, number]) => void\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewAfterForCurrentData: number,\n viewBeforeForCurrentData: number,\n}\n\nexport const AbstractChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartLibrary,\n colors,\n chartUuid,\n chartHeight,\n chartWidth,\n dimensionsVisibility,\n hasEmptyData,\n isRemotelyControlled,\n legendFormatValue,\n orderedColors,\n hoveredRow,\n hoveredX,\n onUpdateChartPanAndZoom,\n immediatelyDispatchPanAndZoom,\n setHoveredX,\n setMinMax,\n showLatestOnBlur,\n unitsCurrent,\n viewAfterForCurrentData,\n viewBeforeForCurrentData,\n}: Props) => {\n const dispatch = useDispatch()\n\n const isSyncPanAndZoom = useSelector(selectSyncPanAndZoom)\n const setGlobalChartUnderlay = useCallback(({ after, before, masterID }) => {\n dispatch(setGlobalChartUnderlayAction({ after, before, masterID }))\n\n // freeze charts\n // don't send masterID, so no padding is applied\n if (isSyncPanAndZoom) {\n dispatch(setGlobalPanAndZoomAction({\n after: viewAfterForCurrentData,\n before: viewBeforeForCurrentData,\n }))\n } else {\n dispatch(setChartPanAndZoomAction({\n after: viewAfterForCurrentData,\n before: viewBeforeForCurrentData,\n id: chartUuid,\n }))\n }\n }, [chartUuid, dispatch, isSyncPanAndZoom, viewAfterForCurrentData, viewBeforeForCurrentData])\n\n const chartSettings = chartLibrariesSettings[chartLibrary]\n const { hasLegend } = chartSettings\n const chartElementClassName = hasLegend(attributes)\n ? classNames(\n `netdata-chart-with-legend-${attributes.legendPosition || \"right\"}`,\n `netdata-${chartLibrary}-chart-with-legend-right`,\n )\n : classNames(\n \"netdata-chart\",\n `netdata-${chartLibrary}-chart`,\n )\n const chartElementId = `${chartLibrary}-${chartUuid}-chart`\n const showUndefined = hoveredRow === -1 && !showLatestOnBlur\n\n useShowValueOutside({\n attributes, chartData, chartSettings, hoveredRow, legendFormatValue, showUndefined,\n })\n\n if (chartLibrary === \"easypiechart\") {\n return (\n <EasyPieChart\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n chartLibrary={chartLibrary}\n chartWidth={chartWidth}\n colors={colors}\n chartUuid={chartUuid}\n dimensionsVisibility={dimensionsVisibility}\n isRemotelyControlled={isRemotelyControlled}\n // easyPieChart doesnt support resizing, so lets just create new one when\n // container size changes\n key={chartWidth}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n hoveredRow={hoveredRow}\n onUpdateChartPanAndZoom={onUpdateChartPanAndZoom}\n setGlobalChartUnderlay={setGlobalChartUnderlay}\n setMinMax={setMinMax}\n showUndefined={showUndefined}\n unitsCurrent={unitsCurrent}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n />\n )\n }\n\n if (chartLibrary === \"gauge\") {\n return (\n <GaugeChart\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n chartLibrary={chartLibrary}\n chartHeight={chartHeight}\n chartWidth={chartWidth}\n colors={colors}\n chartUuid={chartUuid}\n dimensionsVisibility={dimensionsVisibility}\n isRemotelyControlled={isRemotelyControlled}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n onUpdateChartPanAndZoom={onUpdateChartPanAndZoom}\n setGlobalChartUnderlay={setGlobalChartUnderlay}\n setHoveredX={setHoveredX}\n setMinMax={setMinMax}\n showUndefined={showUndefined}\n unitsCurrent={unitsCurrent}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n />\n )\n }\n\n if (chartLibrary === \"sparkline\") {\n return (\n <SparklineChart\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n dimensionsVisibility={dimensionsVisibility}\n isRemotelyControlled={isRemotelyControlled}\n orderedColors={orderedColors}\n unitsCurrent={unitsCurrent}\n viewAfterForCurrentData={viewAfterForCurrentData}\n viewBeforeForCurrentData={viewBeforeForCurrentData}\n />\n )\n }\n\n if (chartLibrary === \"d3pie\") {\n return (\n <D3pieChart\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData as D3pieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n dimensionsVisibility={dimensionsVisibility}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n isRemotelyControlled={isRemotelyControlled}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n setMinMax={setMinMax}\n showUndefined={showUndefined}\n unitsCurrent={unitsCurrent}\n />\n )\n }\n\n if (chartLibrary === \"peity\") {\n return (\n <PeityChart\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n orderedColors={orderedColors}\n />\n )\n }\n\n if (chartLibrary === \"google\") {\n return (\n <GoogleChart\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n orderedColors={orderedColors}\n unitsCurrent={unitsCurrent}\n />\n )\n }\n\n if (chartLibrary === \"textonly\") {\n return (\n <TextOnly\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n />\n )\n }\n\n if (chartLibrary === \"groupbox\") {\n return (\n <KubernetesGroupBoxes\n chartData={chartData}\n chartMetadata={chartMetadata}\n attributes={attributes}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n showUndefined={showUndefined}\n />\n )\n }\n\n return (\n <DygraphChart\n attributes={attributes}\n chartData={chartData as DygraphData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n chartLibrary={chartLibrary}\n colors={colors}\n chartUuid={chartUuid}\n dimensionsVisibility={dimensionsVisibility}\n hasEmptyData={hasEmptyData}\n hasLegend={hasLegend(attributes)}\n isRemotelyControlled={isRemotelyControlled}\n orderedColors={orderedColors}\n immediatelyDispatchPanAndZoom={immediatelyDispatchPanAndZoom}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n onUpdateChartPanAndZoom={onUpdateChartPanAndZoom}\n setGlobalChartUnderlay={setGlobalChartUnderlay}\n setHoveredX={setHoveredX}\n setMinMax={setMinMax}\n unitsCurrent={unitsCurrent}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n />\n )\n}\n","import { useEffect, useRef } from \"react\"\nimport { isEmpty } from \"ramda\"\nimport { useMount } from \"react-use\"\n\nimport { ChartData, DygraphData } from \"domains/chart/chart-types\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartLibraryConfig } from \"domains/chart/utils/chartLibrariesSettings\"\n\n\ninterface UseShowValueOutsideArgument {\n attributes: Attributes\n chartData: ChartData\n chartSettings: ChartLibraryConfig\n hoveredRow: number\n legendFormatValue: ((v: number | string | null) => number | string)\n showUndefined: boolean\n}\n\n// example of the attribute:\n// show-value-of-iowait-at: \"system.cpu.iowait.1\"\n\nexport const useShowValueOutside = ({\n attributes,\n chartData,\n chartSettings,\n hoveredRow,\n legendFormatValue,\n showUndefined,\n}: UseShowValueOutsideArgument) => {\n // a ref to store found elements, just once per lifetime of component\n const showValueAttributesNodes = useRef<(HTMLElement | null)[]>([])\n\n // find the nodes that will have populated values\n useMount(() => {\n const { showValueOf } = attributes\n // showValueOf will be undefined if not used, but additional isEmpty check can prevent\n // regression performance issue in the future\n if (!showValueOf || isEmpty(showValueOf)) {\n return\n }\n const dimensionNames = chartData.dimension_names\n const dimensionIds = chartData.dimension_ids\n dimensionNames.forEach((dimensionName, i) => {\n const userElementId = showValueOf[`show-value-of-${dimensionName.toLowerCase()}`]\n || showValueOf[`show-value-of-${dimensionIds[i].toLowerCase()}-at`]\n\n // if element is not found, just add null\n showValueAttributesNodes.current = showValueAttributesNodes.current.concat(\n document.getElementById(userElementId),\n )\n })\n })\n\n useEffect(() => {\n if (showValueAttributesNodes.current.length) {\n const chartSettingCallOptions = chartSettings.options(attributes)\n const isFlipped = chartSettingCallOptions.includes(\"flip\")\n\n // \"objectrows\" is for d3pie, which has different data format\n if (chartData.format === \"json\" && !chartSettingCallOptions.includes(\"objectrows\")) {\n const { data } = (chartData as DygraphData).result\n const valueIndex = hoveredRow === -1\n ? (data.length - 1)\n : (hoveredRow) // because data for easy-pie-chart are flipped\n\n // yes, \"flipped\" value means chronological order (from oldest to newest) :)\n const rowIndex = isFlipped ? valueIndex : (data.length - valueIndex - 1)\n const row = data[rowIndex]\n\n chartData.dimension_names.forEach((dimensionName, dimensionIndex) => {\n const value = (showUndefined || !row)\n ? \"\"\n : legendFormatValue(row[dimensionIndex + 1])\n const element = showValueAttributesNodes.current[dimensionIndex]\n if (element) {\n element.innerText = `${value}`\n }\n })\n }\n }\n }, [attributes, chartData, chartSettings, hoveredRow, legendFormatValue, showUndefined])\n}\n","import { __, prop } from \"ramda\"\nimport React, { useEffect, useState, useCallback, useMemo, memo, useContext } from \"react\"\nimport { ThemeContext } from \"styled-components\"\nimport { useDebouncedCallback } from \"use-debounce\"\n\nimport {\n requestCommonColorsAction,\n setDefaultAfterAction,\n setGlobalPanAndZoomAction,\n setGlobalSelectionAction,\n} from \"domains/global/actions\"\nimport {\n createSelectAssignedColors,\n selectGlobalSelection,\n selectSyncPanAndZoom,\n selectSyncSelection,\n selectUnitsScalingMethod,\n} from \"domains/global/selectors\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { TimeRange } from \"types/common\"\nimport { MS_IN_SECOND, isTimestamp } from \"utils/utils\"\n\nimport { setChartPanAndZoomAction } from \"domains/chart/actions\"\n\nimport { getPanAndZoomStep } from \"../utils/get-pan-and-zoom-step\"\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport { chartLibrariesSettings } from \"../utils/chartLibrariesSettings\"\nimport { useFormatters } from \"../utils/formatters\"\nimport { ChartData, ChartMetadata } from \"../chart-types\"\n\nimport { ChartLegend } from \"./chart-legend\"\nimport { LegendToolbox } from \"./legend-toolbox\"\nimport { ResizeHandler } from \"./resize-handler\"\nimport { AbstractChart } from \"./abstract-chart\"\n\ninterface GlobalPanAndZoomState {\n after: number // timestamp in ms\n before: number // timestamp in ms\n masterID?: string\n shouldForceTimeRange?: boolean\n}\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: ChartData\n chartMetadata: ChartMetadata\n chartHeight: number\n chartUuid: string\n chartWidth: number\n defaultAfter: number\n globalPanAndZoom: null | GlobalPanAndZoomState\n hasEmptyData: boolean\n isRemotelyControlled: boolean\n viewRangeForCurrentData: TimeRange\n viewRange: TimeRange\n selectedDimensions: string[]\n setSelectedDimensions: (newState: string[]) => void\n showLatestOnBlur: boolean\n}\n\nexport const Chart = memo(\n ({\n attributes,\n attributes: { chartLibrary },\n chartContainerElement,\n chartData,\n chartMetadata,\n chartHeight,\n chartUuid,\n chartWidth,\n defaultAfter,\n globalPanAndZoom,\n hasEmptyData,\n isRemotelyControlled,\n viewRangeForCurrentData,\n viewRange,\n selectedDimensions,\n setSelectedDimensions,\n showLatestOnBlur,\n }: Props) => {\n const themeContext = useContext(ThemeContext)\n const unitsScalingMethod = useSelector(selectUnitsScalingMethod)\n const chartSettings = chartLibrariesSettings[chartLibrary]\n const { hasLegend } = chartSettings\n const {\n units = chartMetadata.units,\n unitsCommon,\n unitsDesired = unitsScalingMethod,\n } = attributes\n\n // we need to have empty selectedDimensions work as {all enabled}, in case\n // new dimensions show up (when all are enabled, the new dimensions should also auto-enable)\n const dimensionsVisibility = useMemo(\n () =>\n chartData.dimension_names.map(dimensionName =>\n selectedDimensions.length === 0 ? true : selectedDimensions.includes(dimensionName)\n ),\n [chartData.dimension_names, selectedDimensions]\n )\n\n const shouldDisplayToolbox =\n hasLegend(attributes) && window.NETDATA.options.current.legend_toolbox\n\n const shouldDisplayResizeHandler =\n shouldDisplayToolbox &&\n window.NETDATA.options.current.resize_charts && // legacy way of turning off for print mode\n !attributes.hideResizeHandler\n\n const dispatch = useDispatch()\n const allDimensionNames = useMemo(() => {\n // metadata and chartData dimensions match each other, but we need to first parse\n // dimensions from metadata, to keep the same order (when browser parsers dimensions object,\n // it sorts them in *some* way which is hard to reproduce). And people can get used to colors\n // so let's keep them as they were before\n const dimensionNamesFromMetadata = Object.values(chartMetadata.dimensions).map(x => x.name)\n const additionalDimensionNamesFromData = chartData.dimension_names.filter(\n x => !dimensionNamesFromMetadata.includes(x)\n )\n return dimensionNamesFromMetadata.concat(additionalDimensionNamesFromData)\n }, [chartData.dimension_names, chartMetadata.dimensions])\n useEffect(() => {\n dispatch(\n requestCommonColorsAction({\n chartContext: chartMetadata.context,\n chartUuid,\n colorsAttribute: attributes.colors,\n commonColorsAttribute: attributes.commonColors,\n dimensionNames: allDimensionNames,\n })\n )\n }, [\n allDimensionNames,\n attributes.colors,\n attributes.commonColors,\n chartMetadata.context,\n chartUuid,\n dispatch,\n ])\n\n const { legendFormatValue, legendFormatValueDecimalsFromMinMax, unitsCurrent } = useFormatters({\n attributes,\n data: chartData,\n units,\n unitsCommon,\n unitsDesired,\n uuid: chartUuid,\n })\n\n const [localHoveredX, setLocalHoveredX] = useState<number | null>(null)\n\n const isSyncSelection = useSelector(selectSyncSelection)\n const handleSetHoveredX = useCallback(\n (newHoveredX, noMaster) => {\n if (isSyncSelection) {\n const action = noMaster\n ? { chartUuid: null, hoveredX: newHoveredX }\n : { chartUuid, hoveredX: newHoveredX }\n dispatch(setGlobalSelectionAction(action))\n } else {\n setLocalHoveredX(newHoveredX)\n }\n },\n [chartUuid, dispatch, isSyncSelection]\n )\n const globalHoveredX = useSelector(selectGlobalSelection)\n const hoveredX = isSyncSelection ? globalHoveredX : localHoveredX\n\n // time-frames for requested data (even when request is pending)\n const viewAfter = isTimestamp(viewRange[0]) ? viewRange[0] : chartData.after * MS_IN_SECOND\n const viewBefore = isTimestamp(viewRange[1]) ? viewRange[1] : chartData.before * MS_IN_SECOND\n\n const viewAfterForCurrentData = isTimestamp(viewRangeForCurrentData[0])\n ? viewRangeForCurrentData[0]\n : chartData.after * MS_IN_SECOND\n const viewBeforeForCurrentData = isTimestamp(viewRangeForCurrentData[1])\n ? viewRangeForCurrentData[1]\n : chartData.before * MS_IN_SECOND // when 'before' is 0 or negative\n\n const netdataFirst = chartData.first_entry * MS_IN_SECOND\n const netdataLast = chartData.last_entry * MS_IN_SECOND\n\n // old dashboard persists min duration based on first chartWidth, i assume it's a bug\n // and will update fixedMinDuration when width changes\n const fixedMinDuration = useMemo(\n () => Math.round((chartWidth / 30) * chartMetadata.update_every * MS_IN_SECOND),\n [chartMetadata.update_every, chartWidth]\n )\n\n const isSyncPanAndZoom = useSelector(selectSyncPanAndZoom)\n\n const setGlobalPanAndZoomDebounced = useDebouncedCallback(\n newGlobalPanAndZoom => {\n dispatch(setGlobalPanAndZoomAction(newGlobalPanAndZoom))\n },\n 400 // corresponds to global_pan_sync_time in old dashboard\n )\n\n const immediatelyDispatchPanAndZoom = useCallback(() => {\n setGlobalPanAndZoomDebounced.flush()\n }, [setGlobalPanAndZoomDebounced])\n\n /**\n * pan-and-zoom handler (both for toolbox and mouse events)\n */\n const handleUpdateChartPanAndZoom = useCallback(\n ({\n after,\n before,\n callback,\n shouldFlushImmediately = false,\n shouldForceTimeRange,\n shouldNotExceedAvailableRange,\n }) => {\n if (before < after) {\n return\n }\n let minDuration = fixedMinDuration\n\n const currentDuraton = Math.round(viewBefore - viewAfter)\n\n let afterForced = Math.round(after)\n let beforeForced = Math.round(before)\n const viewUpdateEvery = chartData.view_update_every * MS_IN_SECOND\n\n if (shouldNotExceedAvailableRange) {\n const first = netdataFirst + viewUpdateEvery\n const last = netdataLast + viewUpdateEvery\n // first check \"before\"\n if (beforeForced > last) {\n afterForced -= before - last\n beforeForced = last\n }\n\n if (afterForced < first) {\n afterForced = first\n }\n }\n\n // align them to update_every\n // stretching them further away\n afterForced -= afterForced % viewUpdateEvery\n beforeForced += viewUpdateEvery - (beforeForced % viewUpdateEvery)\n\n // the final wanted duration\n let wantedDuration = beforeForced - afterForced\n\n // to allow panning, accept just a point below our minimum\n if (currentDuraton - viewUpdateEvery < minDuration) {\n minDuration = currentDuraton - viewUpdateEvery\n }\n\n // we do it, but we adjust to minimum size and return false\n // when the wanted size is below the current and the minimum\n // and we zoom\n let doCallback = true\n if (wantedDuration < currentDuraton && wantedDuration < minDuration) {\n minDuration = fixedMinDuration\n\n const dt = (minDuration - wantedDuration) / 2\n beforeForced += dt\n afterForced -= dt\n wantedDuration = beforeForced - afterForced\n doCallback = false\n }\n\n const tolerance = viewUpdateEvery * 2\n const movement = Math.abs(beforeForced - viewBefore)\n\n if (\n Math.abs(currentDuraton - wantedDuration) <= tolerance &&\n movement <= tolerance &&\n doCallback\n ) {\n return\n }\n\n if (isSyncPanAndZoom) {\n setGlobalPanAndZoomDebounced.callback({\n after: afterForced,\n before: beforeForced,\n masterID: chartUuid,\n shouldForceTimeRange,\n })\n if (shouldFlushImmediately) {\n setGlobalPanAndZoomDebounced.flush()\n }\n } else {\n dispatch(\n setChartPanAndZoomAction({\n after: afterForced,\n before: beforeForced,\n id: chartUuid,\n shouldForceTimeRange,\n })\n )\n }\n\n if (doCallback && typeof callback === \"function\") {\n callback(afterForced, beforeForced)\n }\n },\n [\n chartData.view_update_every,\n chartUuid,\n dispatch,\n fixedMinDuration,\n isSyncPanAndZoom,\n netdataFirst,\n netdataLast,\n setGlobalPanAndZoomDebounced,\n viewAfter,\n viewBefore,\n ]\n )\n\n /**\n * toolbox handlers\n */\n const handleToolBoxPanAndZoom = useCallback(\n (after: number, before: number) => {\n const newAfter = Math.max(after, netdataFirst)\n const newBefore = Math.min(before, netdataLast)\n handleUpdateChartPanAndZoom({\n after: newAfter,\n before: newBefore,\n shouldForceTimeRange: true,\n shouldFlushImmediately: true,\n })\n },\n [handleUpdateChartPanAndZoom, netdataFirst, netdataLast]\n )\n\n const handleToolboxLeftClick = useCallback(\n (event: React.MouseEvent) => {\n const step = (viewBefore - viewAfter) * getPanAndZoomStep(event)\n const newBefore = viewBefore - step\n const newAfter = viewAfter - step\n if (newAfter >= netdataFirst) {\n handleToolBoxPanAndZoom(newAfter, newBefore)\n }\n },\n [handleToolBoxPanAndZoom, netdataFirst, viewAfter, viewBefore]\n )\n\n const handleToolboxRightClick = useCallback(\n (event: React.MouseEvent) => {\n const timeWindow = viewBefore - viewAfter\n const step = timeWindow * getPanAndZoomStep(event)\n const newBefore = Math.min(viewBefore + step, netdataLast)\n const newAfter = newBefore - timeWindow\n handleToolBoxPanAndZoom(newAfter, newBefore)\n },\n [handleToolBoxPanAndZoom, netdataLast, viewAfter, viewBefore]\n )\n\n const handleToolboxZoomInClick = useCallback(\n (event: React.MouseEvent) => {\n const panAndZoomStep = getPanAndZoomStep(event) * 0.8\n if (!globalPanAndZoom) {\n dispatch(\n setDefaultAfterAction({\n after: Math.round(defaultAfter / (panAndZoomStep + 1)),\n })\n )\n return\n }\n // if visible time range is much bigger than available time range in history, first zoom-in\n // should just fit to available range\n if (viewBefore - viewAfter > (netdataLast - netdataFirst) * 1.2) {\n handleToolBoxPanAndZoom(netdataFirst, netdataLast)\n return\n }\n const dt = ((viewBefore - viewAfter) * panAndZoomStep) / 2\n const newAfter = viewAfter + dt\n const newBefore = viewBefore - dt\n handleToolBoxPanAndZoom(newAfter, newBefore)\n },\n [\n defaultAfter,\n dispatch,\n globalPanAndZoom,\n handleToolBoxPanAndZoom,\n netdataFirst,\n netdataLast,\n viewAfter,\n viewBefore,\n ]\n )\n\n const handleToolboxZoomOutClick = useCallback(\n (event: React.MouseEvent) => {\n const panAndZoomStep = getPanAndZoomStep(event) * 0.8\n if (!globalPanAndZoom) {\n dispatch(\n setDefaultAfterAction({\n after: Math.round(defaultAfter * (panAndZoomStep + 1)),\n })\n )\n return\n }\n const dt =\n ((viewBefore - viewAfter) / (1.0 - panAndZoomStep * 0.8) - (viewBefore - viewAfter)) / 2\n const newAfter = viewAfter - dt\n const newBefore = viewBefore + dt\n handleToolBoxPanAndZoom(newAfter, newBefore)\n },\n [defaultAfter, dispatch, globalPanAndZoom, handleToolBoxPanAndZoom, viewAfter, viewBefore]\n )\n\n /**\n * assign colors\n */\n const selectAssignedColors = useMemo(\n () =>\n createSelectAssignedColors({\n chartContext: chartMetadata.context,\n chartUuid,\n colorsAttribute: attributes.colors,\n commonColorsAttribute: attributes.commonColors,\n }),\n [attributes.colors, attributes.commonColors, chartMetadata, chartUuid]\n )\n const colors = useSelector(selectAssignedColors)\n const orderedColors = useMemo(\n () => chartData.dimension_names.map(prop(__, colors)),\n [chartData, colors]\n )\n\n if (!colors) {\n return <span /> // wait for createSelectAssignedColors reducer result to come back\n }\n\n const isTimeVisible = hoveredX && hoveredX >= viewAfter && hoveredX <= viewBefore\n const viewUpdateEvery = chartData.view_update_every * MS_IN_SECOND\n const hoveredRow = isTimeVisible\n ? Math.floor(((hoveredX as number) - chartData.after * MS_IN_SECOND) / viewUpdateEvery)\n : -1\n\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n\n const legendToolbox = (\n <LegendToolbox\n onToolboxLeftClick={handleToolboxLeftClick}\n onToolboxRightClick={handleToolboxRightClick}\n onToolboxZoomInClick={handleToolboxZoomInClick}\n onToolboxZoomOutClick={handleToolboxZoomOutClick}\n />\n )\n\n const resizeHandler = shouldDisplayResizeHandler && (\n <ResizeHandler\n chartContainerElement={chartContainerElement}\n chartUuid={chartUuid}\n heightId={attributes.heightId}\n isLegendOnBottom={isLegendOnBottom}\n />\n )\n\n return (\n <>\n <AbstractChart\n // remount on theme change\n key={themeContext.name}\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData}\n chartMetadata={chartMetadata}\n chartLibrary={chartLibrary}\n colors={colors}\n chartUuid={chartUuid}\n chartHeight={chartHeight}\n chartWidth={chartWidth}\n dimensionsVisibility={dimensionsVisibility}\n hasEmptyData={hasEmptyData}\n onUpdateChartPanAndZoom={handleUpdateChartPanAndZoom}\n immediatelyDispatchPanAndZoom={immediatelyDispatchPanAndZoom}\n isRemotelyControlled={isRemotelyControlled}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n hoveredX={hoveredX}\n hoveredRow={hoveredRow}\n setHoveredX={handleSetHoveredX}\n setMinMax={([min, max]) => legendFormatValueDecimalsFromMinMax(min, max)}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewAfterForCurrentData={viewAfterForCurrentData}\n viewBeforeForCurrentData={viewBeforeForCurrentData}\n />\n {hasLegend(attributes) && (\n <ChartLegend\n attributes={attributes}\n chartUuid={chartUuid}\n chartMetadata={chartMetadata}\n chartLibrary={chartLibrary}\n colors={colors}\n hoveredX={hoveredX}\n hoveredRow={hoveredRow}\n legendFormatValue={legendFormatValue}\n selectedDimensions={selectedDimensions}\n setSelectedDimensions={setSelectedDimensions}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewBefore={viewBefore}\n legendToolbox={legendToolbox}\n resizeHandler={resizeHandler}\n />\n )}\n {shouldDisplayToolbox && !isLegendOnBottom && legendToolbox}\n {!isLegendOnBottom && resizeHandler}\n </>\n )\n }\n)\n","import styled from \"styled-components\"\nimport { getColor, Icon } from \"@netdata/netdata-ui\"\n\nexport const DropdownItem = styled.div`\n display: flex;\n flex-direction: start;\n align-items: center;\n color: ${getColor([\"neutral\", \"limedSpruce\"])};\n white-space: nowrap;\n & > svg use {\n fill: ${getColor([\"neutral\", \"limedSpruce\"])};\n }\n`\n\nexport const DropdownItemLabel = styled.span`\n margin-left: 12px;\n`\n\nexport const DotsBtn = styled(Icon)`\n width: 6px;\n height: 10px;\n cursor: pointer;\n & use {\n fill: ${getColor([\"neutral\", \"limedSpruce\"])};\n & :hover {\n fill: ${getColor([\"neutral\", \"regentgrey\"])};\n }\n }\n`\n","import React, { useState, ReactNode } from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata } from \"domains/chart/chart-types\"\n\nimport { List, SimpleListItem } from \"@rmwc/list\"\nimport { MenuSurface, MenuSurfaceAnchor } from \"@rmwc/menu\"\n\nimport * as S from \"./styled\"\n\ninterface DropdownMenuCallbackProps {\n attributes: Attributes,\n chartMetadata: ChartMetadata,\n chartID: string,\n}\n\nexport type DropdownMenu = {\n icon: ReactNode,\n label: string,\n onClick: (dropdownMenuCallbackProps: DropdownMenuCallbackProps) => void,\n}[]\n\ninterface Props {\n attributes: Attributes\n chartID: string\n chartMetadata: ChartMetadata\n dropdownMenu: DropdownMenu\n}\n\nexport const ChartDropdown = ({\n attributes,\n chartID,\n chartMetadata,\n dropdownMenu,\n}: Props) => {\n const [isOpen, setIsOpen] = useState(false)\n\n const handleClose = () => {\n setIsOpen(false)\n }\n\n return (\n <>\n <S.DotsBtn\n name=\"dots_2x3\"\n onClick={() => {\n setIsOpen(true)\n }}\n />\n <MenuSurfaceAnchor>\n <MenuSurface open={isOpen} onClose={handleClose}>\n <List>\n {dropdownMenu.map(({ icon, label, onClick }) => (\n <SimpleListItem\n key={label}\n text={(\n <S.DropdownItem>\n {icon}\n <S.DropdownItemLabel>\n {label}\n </S.DropdownItemLabel>\n </S.DropdownItem>\n )}\n onClick={() => {\n onClick({ attributes, chartMetadata, chartID })\n handleClose()\n }}\n />\n ))}\n </List>\n </MenuSurface>\n </MenuSurfaceAnchor>\n </>\n )\n}\n","import { prop } from \"ramda\"\nimport styled, { keyframes } from \"styled-components\"\n\nimport { getColor } from \"@netdata/netdata-ui\"\n\nconst circleAnimation = keyframes`\n 0% {\n opacity: .1;\n }\n 50% {\n opacity: .5;\n }\n 100% {\n opacity: .1;\n }\n`\n\n\nexport const SpinnerContainer = styled.div<{ top: number, right: number }>`\n position: absolute;\n top: ${prop(\"top\")}px;\n right: ${prop(\"right\")}px;\n display: flex;\n`\n\nexport const Circle = styled.div<{ size: number }>`\n width: ${prop(\"size\")}px;\n height: ${prop(\"size\")}px;\n background: ${getColor(\"border\")};\n border-radius: 50%;\n animation: 1s linear infinite both ${circleAnimation};\n`\n\nexport const Circle2 = styled(Circle)<{ spaceBetween: number }>`\n animation-delay: .3s; \n margin-left: ${prop(\"spaceBetween\")}px;\n`\n\nexport const Circle3 = styled(Circle)<{ spaceBetween: number }>`\n animation-delay: .6s; \n margin-left: ${prop(\"spaceBetween\")}px;\n`\n","import React from \"react\"\n\nimport * as S from \"./styled\"\n\ninterface Props {\n chartLibrary: string\n}\nexport const ChartSpinner = ({\n chartLibrary,\n}: Props) => {\n const top = chartLibrary === \"dygraph\" ? 33 : 0\n const right = chartLibrary === \"dygraph\" ? 8 : 0\n const size = chartLibrary === \"dygraph\" ? 10 : 7\n const spaceBetween = chartLibrary === \"dygraph\" ? 4 : 2\n return (\n <S.SpinnerContainer top={top} right={right}>\n <S.Circle size={size} />\n <S.Circle2 size={size} spaceBetween={spaceBetween} />\n <S.Circle3 size={size} spaceBetween={spaceBetween} />\n </S.SpinnerContainer>\n )\n}\n","import styled from \"styled-components\"\n\nimport { chartDropdownZIndex } from \"styles/z-index\"\n\nexport const ChartDropdownContainer = styled.div`\n position: absolute;\n top: 0;\n left: 40px;\n width: 20px;\n height: 20px;\n z-index: ${chartDropdownZIndex};\n`\n","export const notificationsZIndex = \"z-index: 50;\"\n\nexport const chartDropdownZIndex = 10\n\nexport const spacesBarZIndex = 8\n\nexport const spacePanelZIndex = 6\n\nexport const appHeaderZIndex = 5\n\n// the same as in cloud\nexport const portalSidebarZIndex = \"z-index: 35;\"\nexport const customDropdownZIndex = \"z-index: 45;\"\nexport const dialogsZIndex = 60\n","import { cond, always, T } from \"ramda\"\nimport axios from \"axios\"\nimport React, { useEffect, useState, useMemo, useLayoutEffect } from \"react\"\nimport { useThrottle, useUpdateEffect, useUnmount, useDebounce } from \"react-use\"\n\nimport { AppStateT } from \"store/app-state\"\nimport { useSelector, useDispatch } from \"store/redux-separate-context\"\n\nimport {\n selectGlobalPanAndZoom,\n selectGlobalSelection,\n selectShouldEliminateZeroDimensions,\n selectPanAndZoomDataPadding,\n selectSnapshot,\n selectSpacePanelTransitionEndIsActive,\n selectDefaultAfter,\n} from \"domains/global/selectors\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { CHART_UNMOUNTED } from \"utils/netdata-sdk\"\nimport { getCorrectedPoints } from \"utils/fill-missing-data\"\n\nimport { fallbackUpdateTimeInterval, panAndZoomDelay } from \"../../constants\"\nimport { getChartURLOptions } from \"../../utils/get-chart-url-options\"\nimport { chartLibrariesSettings } from \"../../utils/chartLibrariesSettings\"\nimport { Attributes } from \"../../utils/transformDataAttributes\"\nimport { getChartPixelsPerPoint } from \"../../utils/get-chart-pixels-per-point\"\nimport { useFetchNewDataClock } from \"../../hooks/use-fetch-new-data-clock\"\n\nimport { fetchChartAction, fetchDataAction } from \"../../actions\"\nimport {\n selectChartData,\n selectChartFetchDataParams,\n makeSelectChartMetadataRequest,\n selectChartPanAndZoom,\n selectChartIsFetchingData,\n selectChartViewRange,\n} from \"../../selectors\"\nimport {\n ChartData,\n ChartMetadata,\n D3pieChartData,\n DygraphData,\n EasyPieChartData,\n} from \"../../chart-types\"\n\nimport { Loader } from \"../loader\"\nimport { Chart } from \"../chart\"\nimport { ChartDropdown, DropdownMenu } from \"../chart-dropdown\"\nimport { ChartSpinner } from \"../chart-spinner/chart-spinner\"\n\nimport * as S from \"./styled\"\nimport \"./chart-with-loader.css\"\n\nexport type RenderCustomElementForDygraph = (selectedChartConfiguration: {\n attributes: Attributes\n onAttributesChange: any\n chartMetadata: ChartMetadata\n chartID: string\n chartData: ChartData | null\n}) => JSX.Element\n\nconst dimensionsAggrMethodMap = {\n \"sum-of-abs\": \"sum\",\n}\n\nconst emptyArray = [] as any\n\nexport type Props = {\n attributes: Attributes\n chartUuid: string\n uuid?: string\n dropdownMenu?: DropdownMenu\n externalChartMetadata?: ChartMetadata\n portalNode: HTMLElement\n renderCustomElementForDygraph?: RenderCustomElementForDygraph\n onAttributesChange?: any\n}\n\nexport const ChartWithLoader = ({\n attributes,\n chartUuid,\n uuid,\n dropdownMenu,\n externalChartMetadata,\n portalNode,\n renderCustomElementForDygraph,\n onAttributesChange,\n}: Props) => {\n /**\n * fetch chart details\n */\n const { host = serverDefault, id, nodeIDs } = attributes\n const dispatch = useDispatch()\n const selectChartMetadataRequest = useMemo(makeSelectChartMetadataRequest, [])\n const { chartMetadata, isFetchingDetails } = useSelector((state: AppStateT) =>\n selectChartMetadataRequest(state, { chartId: id, id: chartUuid })\n )\n const actualChartMetadata = externalChartMetadata || chartMetadata\n useEffect(() => {\n if (!chartMetadata && !isFetchingDetails && !externalChartMetadata) {\n dispatch(\n fetchChartAction.request({\n chart: id,\n id: chartUuid,\n host,\n nodeIDs,\n })\n )\n }\n }, [\n id,\n chartUuid,\n dispatch,\n host,\n isFetchingDetails,\n chartMetadata,\n externalChartMetadata,\n nodeIDs,\n uuid,\n ])\n\n // todo local state option\n const globalPanAndZoom = useSelector(selectGlobalPanAndZoom)\n const chartPanAndZoom = useSelector((state: AppStateT) =>\n selectChartPanAndZoom(state, { id: chartUuid })\n )\n const panAndZoom = chartPanAndZoom || globalPanAndZoom\n\n const isPanAndZoomMaster =\n (!!globalPanAndZoom && globalPanAndZoom.masterID === chartUuid) || Boolean(chartPanAndZoom)\n const shouldForceTimeRange = panAndZoom?.shouldForceTimeRange || false\n\n // (isRemotelyControlled === false) only during globalPanAndZoom, when chart is panAndZoomMaster\n // and when no toolbox is used at that time\n const isRemotelyControlled = !panAndZoom || !isPanAndZoomMaster || shouldForceTimeRange // used when zooming/shifting in toolbox\n\n const fetchDataParams = useSelector((state: AppStateT) =>\n selectChartFetchDataParams(state, { id: chartUuid })\n )\n const viewRange = useSelector((state: AppStateT) =>\n selectChartViewRange(state, { id: chartUuid })\n )\n const chartData = useSelector((state: AppStateT) => selectChartData(state, { id: chartUuid }))\n const isFetchingData = useSelector((state: AppStateT) =>\n selectChartIsFetchingData(state, { id: chartUuid })\n )\n\n const hoveredX = useSelector(selectGlobalSelection)\n\n // periodical update of newest data\n // default to 2000ms. When chartMetadata has been fetched, use chartMetadata.update_every\n // if chartData has been fetched, use chartData.view_update_every instead\n // todo add support to \"data-update-every\" attribute\n const viewUpdateEvery = cond([\n [always(!!chartData), () => (chartData as ChartData).view_update_every * 1000],\n [\n always(!!actualChartMetadata),\n () => (actualChartMetadata as ChartMetadata).update_every * 1000,\n ],\n [T, always(fallbackUpdateTimeInterval)],\n ])()\n const [shouldFetch, setShouldFetch] = useFetchNewDataClock({\n areCriteriaMet: !panAndZoom && !hoveredX,\n preferedIntervalTime: viewUpdateEvery,\n })\n\n const panAndZoomThrottled = useThrottle(panAndZoom, panAndZoomDelay)\n useEffect(() => {\n setShouldFetch(true)\n }, [panAndZoomThrottled, setShouldFetch])\n\n const defaultAfter = useSelector(selectDefaultAfter)\n // when after/before changes, don't wait for next interval, just fetch immediately\n useUpdateEffect(() => {\n setShouldFetch(true)\n }, [\n attributes.after,\n attributes.before,\n defaultAfter,\n attributes.dimensions,\n attributes.aggrMethod,\n attributes.groupBy,\n ])\n\n const { before: initialBefore = window.NETDATA.chartDefaults.before } = attributes\n\n // attributes.after should be now used only for old custom dashboard\n // and in the future for setting timeframe per-chart\n const liveModeAfter = attributes.after || defaultAfter\n\n const chartSettings = chartLibrariesSettings[attributes.chartLibrary]\n const { hasLegend } = chartSettings\n\n // todo optimize by using resizeObserver (optionally)\n const boundingClientRect = portalNode.getBoundingClientRect()\n\n // from old dashboard\n const chartWidth = boundingClientRect.width - (hasLegend(attributes) ? 140 : 0)\n const chartHeight = boundingClientRect.height\n\n const isShowingSnapshot = Boolean(useSelector(selectSnapshot))\n const shouldEliminateZeroDimensions =\n useSelector(selectShouldEliminateZeroDimensions) || isShowingSnapshot\n const shouldUsePanAndZoomPadding = useSelector(selectPanAndZoomDataPadding)\n\n const { CancelToken } = axios\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const cancelTokenSource = useMemo(() => CancelToken.source(), [])\n useUnmount(() => {\n cancelTokenSource.cancel(CHART_UNMOUNTED)\n })\n\n /**\n * spinner state\n * show spinner when it's fetching for more than 2 seconds\n * hide spinner immediately when it's not fetching\n */\n const [shouldShowSpinnerDebounced, setShouldShowSpinnerDebounced] = useState(false)\n const shouldShowSpinner = shouldShowSpinnerDebounced && isFetchingData\n useDebounce(\n () => {\n if (isFetchingData) {\n setShouldShowSpinnerDebounced(true)\n }\n },\n 2000,\n [isFetchingData]\n )\n useEffect(() => {\n if (!isFetchingData && shouldShowSpinnerDebounced) {\n setShouldShowSpinnerDebounced(false)\n }\n }, [isFetchingData, shouldShowSpinnerDebounced])\n\n /**\n * fetch data\n */\n useEffect(() => {\n if (shouldFetch && actualChartMetadata && !isFetchingData) {\n // todo can be overriden by main.js\n const forceDataPoints = window.NETDATA.options.force_data_points\n\n let after\n let before\n let newViewRange\n let pointsMultiplier = 1\n\n if (panAndZoom) {\n if (isPanAndZoomMaster) {\n after = Math.round(panAndZoom.after / 1000)\n before = Math.round(panAndZoom.before / 1000)\n\n newViewRange = [after, before]\n\n if (shouldUsePanAndZoomPadding) {\n const requestedPadding = Math.round((before - after) / 2)\n after -= requestedPadding\n before += requestedPadding\n pointsMultiplier = 2\n }\n } else {\n after = Math.round(panAndZoom.after / 1000)\n before = Math.round(panAndZoom.before / 1000)\n pointsMultiplier = 1\n }\n } else {\n // no panAndZoom\n before = initialBefore\n after = liveModeAfter\n pointsMultiplier = 1\n }\n\n newViewRange = (newViewRange || [after, before]).map(x => x * 1000) as [number, number]\n\n const dataPoints =\n attributes.points ||\n Math.round(chartWidth / getChartPixelsPerPoint({ attributes, chartSettings }))\n const points = forceDataPoints || dataPoints * pointsMultiplier\n\n const shouldForceTimeWindow = attributes.forceTimeWindow || Boolean(defaultAfter)\n // if we want to add fake points, we need first need to request less\n // to have the desired frequency\n // this will be removed when Agents will support forcing time-window between points\n const correctedPoints = shouldForceTimeWindow\n ? getCorrectedPoints({\n after,\n before,\n firstEntry: actualChartMetadata.first_entry,\n points,\n })\n : null\n\n const group = attributes.method || window.NETDATA.chartDefaults.method\n setShouldFetch(false)\n dispatch(\n fetchDataAction.request({\n // properties to be passed to API\n host,\n context: actualChartMetadata.context,\n chart: actualChartMetadata.id,\n format: chartSettings.format,\n points: correctedPoints || points,\n group,\n gtime: attributes.gtime || 0,\n options: getChartURLOptions(attributes, shouldEliminateZeroDimensions),\n after: after || null,\n before: before || null,\n dimensions: attributes.dimensions,\n labels: attributes.labels,\n postGroupBy: attributes.postGroupBy,\n postAggregationMethod: attributes.postAggregationMethod,\n aggrMethod: attributes.aggrMethod,\n aggrGroups: attributes.aggrGroups,\n // @ts-ignore\n dimensionsAggrMethod:\n dimensionsAggrMethodMap[attributes.dimensionsAggrMethod] ||\n attributes.dimensionsAggrMethod,\n nodeIDs,\n httpMethod: attributes.httpMethod,\n groupBy: attributes.groupBy,\n\n // properties for the reducer\n fetchDataParams: {\n // we store it here so it is only available when data is fetched\n // those params should be synced with data\n fillMissingPoints: correctedPoints ? points - correctedPoints : undefined,\n isRemotelyControlled,\n viewRange: newViewRange,\n },\n id: chartUuid,\n cancelTokenSource,\n })\n )\n }\n }, [\n attributes,\n actualChartMetadata,\n chartSettings,\n chartUuid,\n chartWidth,\n defaultAfter,\n dispatch,\n hasLegend,\n host,\n initialBefore,\n isFetchingData,\n isPanAndZoomMaster,\n isRemotelyControlled,\n liveModeAfter,\n panAndZoom,\n portalNode,\n setShouldFetch,\n shouldEliminateZeroDimensions,\n shouldUsePanAndZoomPadding,\n shouldFetch,\n cancelTokenSource,\n nodeIDs,\n uuid,\n ])\n\n useSelector(selectSpacePanelTransitionEndIsActive)\n\n const externalSelectedDimensions = attributes?.selectedDimensions\n const [selectedDimensions, setSelectedDimensions] = useState<string[]>(\n externalSelectedDimensions || emptyArray\n )\n\n useLayoutEffect(() => {\n if (externalSelectedDimensions) {\n setSelectedDimensions(externalSelectedDimensions)\n }\n }, [externalSelectedDimensions])\n\n useLayoutEffect(() => {\n setSelectedDimensions(externalSelectedDimensions || emptyArray)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [attributes?.groupBy])\n\n const customElementForDygraph = useMemo(\n () =>\n renderCustomElementForDygraph &&\n renderCustomElementForDygraph({\n onAttributesChange,\n attributes,\n chartMetadata: actualChartMetadata as ChartMetadata,\n chartData,\n chartID: id,\n }),\n [\n onAttributesChange,\n renderCustomElementForDygraph,\n attributes,\n id,\n actualChartMetadata,\n chartData,\n ]\n )\n\n // eslint-disable-next-line max-len\n const hasEmptyData =\n (chartData as DygraphData | D3pieChartData | null)?.result?.data?.length === 0 ||\n (chartData as EasyPieChartData | null)?.result?.length === 0\n\n if (!chartData || !actualChartMetadata) {\n return (\n <>\n <Loader\n // Loader should remount when that flag is changed, because inside\n // there's an oldschool bootstrap icon which doesn't handle updates well\n key={`${hasEmptyData}`}\n hasEmptyData={hasEmptyData}\n containerNode={portalNode}\n />\n {shouldShowSpinner && <ChartSpinner chartLibrary={attributes.chartLibrary} />}\n </>\n )\n }\n\n return (\n <>\n {hasEmptyData && (\n <Loader key={`${hasEmptyData}`} hasEmptyData={hasEmptyData} containerNode={portalNode} />\n )}\n <Chart\n attributes={attributes}\n chartContainerElement={portalNode}\n chartData={chartData}\n chartMetadata={actualChartMetadata}\n chartUuid={chartUuid}\n chartHeight={chartHeight}\n chartWidth={chartWidth}\n defaultAfter={defaultAfter}\n globalPanAndZoom={globalPanAndZoom}\n hasEmptyData={hasEmptyData}\n isRemotelyControlled={fetchDataParams.isRemotelyControlled}\n // view range that updates only when data is fetched\n viewRangeForCurrentData={fetchDataParams.viewRange}\n // view range that updates when requesting and fetching of data\n viewRange={viewRange!}\n selectedDimensions={selectedDimensions}\n setSelectedDimensions={setSelectedDimensions}\n showLatestOnBlur={!panAndZoom}\n />\n {shouldShowSpinner && <ChartSpinner chartLibrary={attributes.chartLibrary} />}\n {dropdownMenu && dropdownMenu.length > 0 && (\n <S.ChartDropdownContainer>\n <ChartDropdown\n dropdownMenu={dropdownMenu}\n chartID={id}\n attributes={attributes}\n chartMetadata={actualChartMetadata}\n />\n </S.ChartDropdownContainer>\n )}\n {customElementForDygraph}\n </>\n )\n}\n","import { useEffect, useState } from \"react\"\nimport { useInterval } from \"react-use\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport {\n selectHasWindowFocus,\n selectStopUpdatesWhenFocusIsLost,\n selectGlobalPause,\n} from \"domains/global/selectors\"\nimport { BIGGEST_INTERVAL_NUMBER } from \"utils/biggest-interval-number\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\n\ntype UseFetchNewDataClock = (arg: {\n areCriteriaMet: boolean\n preferedIntervalTime: number\n}) => [boolean, (shouldFetch: boolean) => void]\nexport const useFetchNewDataClock: UseFetchNewDataClock = ({\n areCriteriaMet,\n preferedIntervalTime,\n}) => {\n const hasWindowFocus = useSelector(selectHasWindowFocus)\n const stopUpdatesWhenFocusIsLost = useSelector(selectStopUpdatesWhenFocusIsLost)\n const globalPause = useSelector(selectGlobalPause)\n\n const shouldBeUpdating = !(!hasWindowFocus && stopUpdatesWhenFocusIsLost) && !globalPause\n\n const [shouldFetch, setShouldFetch] = useState<boolean>(true)\n const [shouldFetchImmediatelyAfterFocus, setShouldFetchImmediatelyAfterFocus] = useState(false)\n\n useEffect(() => {\n if (shouldFetchImmediatelyAfterFocus && shouldBeUpdating) {\n setShouldFetchImmediatelyAfterFocus(false)\n setShouldFetch(true)\n }\n }, [shouldFetchImmediatelyAfterFocus, setShouldFetchImmediatelyAfterFocus, shouldBeUpdating])\n\n // don't use setInterval when we loose focus\n const intervalTime =\n (shouldBeUpdating || !shouldFetchImmediatelyAfterFocus) && !isPrintMode\n ? preferedIntervalTime\n : BIGGEST_INTERVAL_NUMBER\n useInterval(() => {\n if (areCriteriaMet) {\n if (!shouldBeUpdating) {\n setShouldFetchImmediatelyAfterFocus(true)\n return\n }\n setShouldFetch(true)\n }\n // when there's no focus, don't ask for updated data\n }, intervalTime)\n return [shouldFetch, setShouldFetch]\n}\n","import { Attributes } from \"./transformDataAttributes\"\nimport { ChartLibraryConfig } from \"./chartLibrariesSettings\"\n\ntype GetChartPixelsPerPoint = (arg: {\n attributes: Attributes,\n chartSettings: ChartLibraryConfig,\n}) => number\n\nexport const getChartPixelsPerPoint: GetChartPixelsPerPoint = ({\n attributes, chartSettings,\n}) => {\n const {\n pixelsPerPoint: pixelsPerPointAttribute,\n } = attributes\n if (typeof pixelsPerPointAttribute === \"number\") {\n return pixelsPerPointAttribute\n }\n const pixelsPerPointSetting = chartSettings.pixelsPerPoint(attributes)\n\n return Math.max(...[\n pixelsPerPointSetting,\n window.NETDATA.options.current.pixels_per_point,\n ].filter((px) => typeof px === \"number\"))\n}\n","import { prop, pick } from \"ramda\"\nimport { createSelector } from \"reselect\"\n\nimport { AppStateT } from \"store/app-state\"\n\nimport { storeKey } from \"./constants\"\n\nconst selectDashboardDomain = (state: AppStateT) => state[storeKey]\n\nexport const selectIsSnapshotMode = createSelector(\n selectDashboardDomain,\n prop(\"isSnapshotMode\"),\n)\n\nexport const selectSnapshotOptions = createSelector(\n selectDashboardDomain,\n pick([\"snapshotCharts\", \"snapshotDataPoints\"]),\n)\n","import React, { useEffect } from \"react\"\n\nimport { MS_IN_SECOND } from \"utils/utils\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { selectIsSnapshotMode, selectSnapshotOptions } from \"domains/dashboard/selectors\"\nimport { selectGlobalPanAndZoom } from \"domains/global/selectors\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { TimeRangeObjT } from \"types/common\"\n\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport { fetchDataForSnapshotAction } from \"../actions\"\nimport { chartLibrariesSettings } from \"../utils/chartLibrariesSettings\"\nimport { getChartURLOptions } from \"../utils/get-chart-url-options\"\n\ninterface SnapshotLoaderProps {\n attributes: Attributes\n chartUuid: string\n}\nconst SnapshotLoader = ({\n attributes,\n chartUuid,\n}: SnapshotLoaderProps) => {\n const host = attributes.host || serverDefault\n const { snapshotDataPoints } = useSelector(selectSnapshotOptions)\n const group = attributes.method || window.NETDATA.chartDefaults.method\n const { chartLibrary } = attributes\n const chartSettings = chartLibrariesSettings[chartLibrary]\n\n const globalPanAndZoom = useSelector(selectGlobalPanAndZoom)\n const after = (globalPanAndZoom as TimeRangeObjT).after / MS_IN_SECOND\n const before = (globalPanAndZoom as TimeRangeObjT).before / MS_IN_SECOND\n\n const dispatch = useDispatch()\n useEffect(() => {\n dispatch(fetchDataForSnapshotAction.request({\n // properties to be passed to API\n host,\n context: attributes.id,\n chart: attributes.id,\n format: chartSettings.format,\n points: snapshotDataPoints as number,\n group,\n gtime: attributes.gtime || 0,\n // for snapshots, always eliminate zero dimensions\n options: getChartURLOptions(attributes, true),\n after: after || null,\n before: before || null,\n dimensions: attributes.dimensions,\n aggrMethod: attributes.aggrMethod,\n nodeIDs: attributes.nodeIDs,\n chartLibrary,\n id: chartUuid,\n groupBy: attributes.groupBy,\n }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }) // todo fetch based on state\n return null\n}\n\n\ninterface SnapshotLoaderContainerProps {\n attributes: Attributes\n chartUuid: string\n}\nexport const SnapshotLoaderContainer = ({\n attributes,\n chartUuid,\n}: SnapshotLoaderContainerProps) => {\n const isSnapshotMode = useSelector(selectIsSnapshotMode)\n if (!isSnapshotMode) {\n return null\n }\n return <SnapshotLoader attributes={attributes} chartUuid={chartUuid} />\n}\n","import React, { memo } from \"react\"\nimport { createPortal } from \"react-dom\"\n\nimport { getAttributes } from \"../utils/transformDataAttributes\"\nimport { ChartWithLoader } from \"./chart-with-loader\"\nimport { DisableOutOfView } from \"./disable-out-of-view\"\nimport { SnapshotLoaderContainer } from \"./snapshot-loader\"\n\nconst getNodesArray = () => Array.from(document.querySelectorAll(\"[data-netdata]\"))\n\nexport const Portals = memo(() => {\n const nodes = getNodesArray()\n return (\n <>\n {nodes.map((node, index) => {\n const attributesMapped = getAttributes(node)\n const chartId = `${attributesMapped.id}-${index}`\n return (\n createPortal(\n <>\n <DisableOutOfView\n attributes={attributesMapped}\n chartUuid={chartId}\n portalNode={(node as HTMLElement)}\n >\n <ChartWithLoader\n attributes={attributesMapped}\n // todo change to uuid generator (when we disconnect dashboard.js)\n chartUuid={chartId}\n portalNode={(node as HTMLElement)}\n />\n </DisableOutOfView>\n <SnapshotLoaderContainer\n attributes={attributesMapped}\n chartUuid={chartId}\n />\n </>,\n node,\n )\n )\n })}\n </>\n )\n})\n","import { useEffect, useState } from \"react\"\n\nimport { axiosInstance } from \"utils/api\"\n\nexport const useHttp = <T = unknown>(\n url: string | undefined,\n shouldMakeCall : boolean = true,\n isExternal?: boolean,\n) => {\n const [isFetching, setIsFetching] = useState(false)\n const [isError, setIsError] = useState(false)\n const [data, setData] = useState<T | null>(null)\n useEffect(() => {\n if (shouldMakeCall && url) {\n const options = isExternal\n ? { headers: null, withCredentials: false }\n : {}\n\n setIsFetching(true)\n axiosInstance.get(url, options)\n .then((r) => {\n if (r.data) {\n setData(r.data)\n setIsError(false)\n setIsFetching(false)\n }\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.warn(`error fetching ${url}`, error)\n setIsError(true)\n setIsFetching(false)\n })\n }\n }, [isExternal, shouldMakeCall, url])\n // force triple instead of array\n return [data, isFetching, isError] as [T | null, boolean, boolean]\n}\n","import { ReactNode, useEffect, useRef } from \"react\"\nimport { createPortal } from \"react-dom\"\n\nconst modalRoot = document.getElementById(\"modal-root\") as HTMLElement\n\ntype Props = {\n children: ReactNode\n}\nexport const ModalPortal = ({ children }: Props) => {\n const element = useRef(document.createElement(\"div\"))\n useEffect(() => {\n modalRoot.appendChild(element.current)\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n modalRoot.removeChild(element.current)\n }\n }, [])\n\n return createPortal(children, element.current)\n}\n","import React, { useRef, useEffect } from \"react\"\nimport classNames from \"classnames\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { ModalPortal } from \"domains/dashboard/components/modal-portal\"\nimport {\n selectAmountOfCharts, selectAmountOfFetchedCharts, selectNameOfAnyFetchingChart,\n} from \"domains/chart/selectors\"\n\nimport \"./print-modal.scss\"\n\nconst TIMEOUT_DURATION_TO_MAKE_SURE_ALL_CHARTS_HAVE_BEEN_RENDERED = 1000\n\nexport const PrintModal = () => {\n const printModalElement = useRef<HTMLDivElement>(null)\n const isFetchingMetrics = true\n\n useEffect(() => {\n // todo replace bootstrap with newer solution (custom or react-compatible library)\n if (printModalElement.current) {\n const $element = window.$(printModalElement.current)\n $element.modal(\"show\")\n }\n }) // render just once\n\n const amountOfCharts = useSelector(selectAmountOfCharts)\n const amountOfFetchedCharts = useSelector(selectAmountOfFetchedCharts)\n const nameOfAnyFetchingChart = useSelector(selectNameOfAnyFetchingChart)\n\n const percentage = amountOfCharts === 0\n ? 0\n : (amountOfFetchedCharts / amountOfCharts) * 100\n\n useEffect(() => {\n if (percentage === 100) {\n setTimeout(() => {\n // in case browser will not be able to close the window\n window.$(printModalElement.current).modal(\"hide\")\n window.print()\n window.close()\n }, TIMEOUT_DURATION_TO_MAKE_SURE_ALL_CHARTS_HAVE_BEEN_RENDERED)\n }\n }, [percentage])\n\n\n const progressBarText = nameOfAnyFetchingChart\n && `${Math.round(percentage)}%, ${nameOfAnyFetchingChart}`\n\n\n return (\n <ModalPortal>\n <div\n ref={printModalElement}\n className=\"modal fade\"\n id=\"printModal\"\n tabIndex={-1}\n role=\"dialog\"\n aria-labelledby=\"printModalLabel\"\n data-keyboard=\"false\"\n data-backdrop=\"static\"\n >\n <div className=\"modal-dialog modal-lg\" role=\"document\">\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <button\n type=\"button\"\n className={classNames(\n \"close\",\n { \"print-modal__close-button--disabled\": isFetchingMetrics },\n )}\n data-dismiss=\"modal\"\n aria-label=\"Close\"\n >\n <span aria-hidden=\"true\">×</span>\n </button>\n <h4 className=\"modal-title\" id=\"printModalLabel\">\n Preparing dashboard for printing...\n </h4>\n </div>\n <div className=\"modal-body\">\n Please wait while we initialize and render all the charts on the dashboard.\n <div\n className=\"progress progress-striped active\"\n style={{ height: \"2em\" }}\n >\n <div\n id=\"printModalProgressBar\"\n className=\"progress-bar progress-bar-info\"\n role=\"progressbar\"\n aria-valuenow={percentage}\n aria-valuemin={0}\n aria-valuemax={100}\n style={{\n minWidth: \"2em\",\n width: `${percentage}%`,\n }}\n >\n <span\n id=\"printModalProgressBarText\"\n style={{\n paddingLeft: 10,\n paddingTop: 4,\n fontSize: \"1.2em\",\n textAlign: \"left\",\n width: \"100%\",\n position: \"absolute\",\n display: \"block\",\n color: \"black\",\n }}\n >\n {progressBarText}\n </span>\n </div>\n </div>\n The print dialog will appear as soon as we finish rendering the page.\n </div>\n <div className=\"modal-footer\" />\n </div>\n </div>\n </div>\n </ModalPortal>\n )\n}\n","import styled from \"styled-components\"\nimport { getSizeBy, getColor } from \"@netdata/netdata-ui\"\n\nexport const SocialMediaContainer = styled.div`\n width: 185px;\n padding: ${getSizeBy(2)};\n background: ${getColor(\"borderSecondary\")};\n\n font-size: 12px;\n margin-bottom: ${getSizeBy(3)};\n`\n\nexport const FirstRow = styled.div`\n display: flex;\n justify-content: space-between;\n`\n\nexport const GithubCopy = styled.div`\n\n`\n\nexport const GithubCopyLine = styled.div`\n\n`\n\nexport const SocialMediaLink = styled.a`\n &, &:hover {\n color: ${getColor(\"main\")};\n }\n`\n\nexport const GithubStarQuestion = styled(SocialMediaLink)``\n\nexport const GithubIcon = styled(SocialMediaLink)`\n font-size: 24px;\n`\n\nexport const TwitterIcon = styled(SocialMediaLink)`\n font-size: 17px;\n`\n\nexport const FacebookIcon = styled(SocialMediaLink)`\n font-size: 23px;\n`\n\nexport const Separator = styled.div`\n margin-top: ${getSizeBy(2)};\n border-top: 1px solid ${getColor(\"separator\")};\n\n`\nexport const SecondRow = styled.div`\n margin-top: ${getSizeBy(2)};\n display: flex;\n align-items: center;\n justify-content: space-between;\n`\n\nexport const SecondRowText = styled.span`\n font-size: 10px;\n`\n","import React from \"react\"\n\nimport * as S from \"./styled\"\n\nexport const SidebarSocialMedia = () => (\n <S.SocialMediaContainer>\n <S.FirstRow>\n <S.GithubCopy>\n <S.GithubCopyLine>\n Do you like Netdata?\n </S.GithubCopyLine>\n <S.GithubStarQuestion href=\"https://github.com/netdata/netdata/\" target=\"_blank\">\n Give us a star!\n </S.GithubStarQuestion>\n </S.GithubCopy>\n <S.GithubIcon href=\"https://github.com/netdata/netdata/\" target=\"_blank\">\n <i className=\"fab fa-github\" />\n </S.GithubIcon>\n </S.FirstRow>\n <S.Separator />\n <S.SecondRow>\n <S.SecondRowText>\n And share the word!\n </S.SecondRowText>\n <S.TwitterIcon href=\"https://twitter.com/linuxnetdata/\" target=\"_blank\">\n <i className=\"fab fa-twitter\" />\n </S.TwitterIcon>\n <S.FacebookIcon href=\"https://www.facebook.com/linuxnetdata/\" target=\"_blank\">\n <i className=\"fab fa-facebook\" />\n </S.FacebookIcon>\n </S.SecondRow>\n </S.SocialMediaContainer>\n)\n","import React, { useRef } from \"react\"\nimport { createPortal } from \"react-dom\"\n\ninterface Props {\n children: React.ReactNode\n}\nexport const SidebarSocialMediaPortal = ({\n children,\n}: Props) => {\n const element = useRef(document.querySelector(\"#sidebar-end-portal-container\"))\n return createPortal(children, element.current!)\n}\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { ToastContainer, ToastContainerProps } from \"react-toastify\"\nimport \"react-toastify/dist/ReactToastify.min.css\"\n\nimport { getColor } from \"@netdata/netdata-ui\"\n\nimport { notificationsZIndex } from \"styles/z-index\"\n\nconst WrappedToastContainer = ({\n className,\n ...rest\n}: ToastContainerProps & { className?: string }) => (\n <div className={className}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <ToastContainer {...rest} closeButton={false} />\n </div>\n)\n\nexport const NotificationsContainer = styled(WrappedToastContainer)<ToastContainerProps>`\n .Toastify__toast-container {\n position: fixed;\n width: unset;\n min-width: 400px;\n max-width: 500px;\n ${notificationsZIndex};\n color: ${getColor([\"neutral\", \"limedSpruce\"])};\n }\n .Toastify__toast {\n padding: 0;\n padding-top: 5px;\n }\n .Toastify__toast--error {\n background: ${getColor([\"red\", \"lavender\"])};\n border: 1px solid ${getColor(\"error\")};\n }\n .Toastify__toast--warning {\n }\n .Toastify__toast--success {\n background: ${getColor([\"green\", \"frostee\"])};\n border: 1px solid ${getColor(\"success\")};\n }\n .Toastify__toast-body {\n }\n .Toastify__progress-bar {\n bottom: unset;\n top: 0;\n }\n .Toastify__progress-bar--success {\n background-color: ${getColor(\"success\")};\n }\n .Toastify__progress-bar--error {\n background-color: ${getColor(\"error\")};\n }\n`\n","import React from \"react\"\nimport { Icon, Flex } from \"@netdata/netdata-ui\"\n\nconst Item = ({ icon, children, hasBorder }) => (\n <Flex\n gap={2}\n border={hasBorder && { side: \"right\", color: \"separator\" }}\n alignItems=\"center\"\n padding={[0, 3, 0, 0]}\n height=\"100%\"\n >\n {!!icon && <Icon name={icon} color=\"bright\" height=\"15px\" />}\n {children}\n </Flex>\n)\n\nexport default Item\n","import React from \"react\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport Item from \"../item\"\nimport { useSelector } from \"@/src/store/redux-separate-context\"\n\nconst hostNameSelector = state => {\n const snapshot = state.global.snapshot\n const data = state.global.chartsMetadata.data\n\n if (!snapshot && !data) return \"\"\n return snapshot ? snapshot.hostname : data.hostname\n}\n\nconst Node = () => {\n const hostname = useSelector(hostNameSelector)\n\n return (\n <Item icon=\"node_hollow\">\n <Text data-testid={`header-nodename-${hostname}`} color=\"bright\" strong truncate>\n {hostname}\n </Text>\n </Item>\n )\n}\n\nexport default Node\n","import React from \"react\"\nimport { Flex, TextSmall } from \"@netdata/netdata-ui\"\n\nconst tooltipBackground = [\"neutral\", \"black\"]\n\nconst CustomTooltip = ({ children, isBasic }) => (\n <Flex\n padding={[1.5, 2]}\n margin={[2]}\n background={tooltipBackground}\n round={1}\n {...(!isBasic && { width: { max: \"300px\" } })}\n >\n <TextSmall color=\"bright\">{children}</TextSmall>\n </Flex>\n)\n\nexport default CustomTooltip\n","import React from \"react\"\nimport CustomTooltip from \"@/src/components/tooltips/customTooltip\"\n\nconst getContent = (content, { isBasic }) => {\n const contentNode = typeof content === \"function\" ? content() : content\n if (typeof content === \"string\" || isBasic) {\n return <CustomTooltip isBasic={isBasic}>{contentNode}</CustomTooltip>\n }\n return contentNode\n}\n\nexport default getContent\n","import React, { useCallback } from \"react\"\nimport { Tooltip as BaseTooltip } from \"@netdata/netdata-ui\"\nimport getContent from \"./getContent\"\n\nconst Tooltip = ({ children, content, isBasic, ...rest }) => {\n const getTooltipContent = useCallback(() => getContent(content, { isBasic }), [content, isBasic])\n return (\n <BaseTooltip plain animation content={getTooltipContent} {...rest}>\n {children}\n </BaseTooltip>\n )\n}\n\nexport default Tooltip\n","import React, { useCallback } from \"react\"\nimport { Flex, Button } from \"@netdata/netdata-ui\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport { setGlobalPauseAction } from \"domains/global/actions\"\nimport { useDispatch } from \"store/redux-separate-context\"\n\nconst Options = () => {\n const dispatch = useDispatch()\n const onClick = useCallback(() => dispatch(setGlobalPauseAction()), [dispatch])\n return (\n <Flex gap={2} data-testid=\"header-options-button\">\n <Tooltip content=\"Import a Netdata snapshot\" align=\"bottom\" plain>\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n data-toggle=\"modal\"\n data-target=\"#loadSnapshotModal\"\n icon=\"download\"\n />\n </Tooltip>\n <Tooltip content=\"Export a Netdata snapshot\" align=\"bottom\" plain>\n <Button\n onClick={onClick}\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n data-toggle=\"modal\"\n data-target=\"#saveSnapshotModal\"\n icon=\"upload\"\n />\n </Tooltip>\n <Tooltip content=\"Print the dashboard\" align=\"bottom\" plain>\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n data-toggle=\"modal\"\n data-target=\"#printPreflightModal\"\n icon=\"print\"\n />\n </Tooltip>\n </Flex>\n )\n}\n\nexport default Options\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Dropdown = styled(Flex).attrs({\n padding: [4],\n background: \"dropdown\",\n round: 1,\n overflow: { vertical: \"auto\" },\n margin: [4, 0, 0],\n width: 110,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\n\nexport default Dropdown\n","import styled from \"styled-components\"\nimport React, { useRef } from \"react\"\nimport { useMedia, useToggle } from \"react-use\"\nimport { Drop, Flex, Icon, Pill, Text } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectLacksProtoBufSupport } from \"domains/global/selectors\"\n\nimport Dropdown from \"./dropdown\"\n\nconst PillContainer = styled(Flex)`\n white-space: nowrap;\n`\n\nconst Link = styled(Text).attrs({ as: \"a\", color: \"success\", target: \"_blank\" })``\n\nconst breakpoint = \"(min-width: 1400px)\"\n\nconst ProtoBuf = () => {\n const [isOpen, toggle] = useToggle()\n const lacksProtoBufSupport = useSelector(selectLacksProtoBufSupport)\n\n const ref = useRef()\n\n const isLargeEnough = useMedia(breakpoint)\n\n const close = () => {\n toggle(false)\n }\n if (!lacksProtoBufSupport) return null\n\n return (\n <Flex flex={false}>\n <PillContainer ref={ref}>\n <Pill\n data-testid=\"header-options-button\"\n onClick={toggle}\n flavour=\"warning\"\n icon=\"warning_triangle_hollow\"\n >\n {isLargeEnough ? \"NOT MONITORED IN CLOUD\" : \"\"}\n </Pill>\n </PillContainer>\n {ref.current && isOpen && (\n <Drop\n target={ref.current}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n animation\n >\n <Dropdown>\n <Flex background=\"modalTabsBackground\" padding={[4]}>\n <Flex width={14} flex={false} alignItems=\"start\">\n <Flex padding={[2.5]} round=\"50%\" background=\"warningText\">\n <Icon color=\"warningBackground\" name=\"informationPress\" />\n </Flex>\n </Flex>\n <Flex>\n <Text>\n It will not be possible to monitor this node from Netdata Cloud after 1st of\n March. <br /> <br />\n This node does not have proto-buf support. In order to learn how to apply\n proto-buf support to your nodes{\" \"}\n <Link href=\"https://www.netdata.cloud/blog/netdata-clouds-new-architecture\">\n read our documentation.\n </Link>\n <br />\n <br /> If you are not interested in monitoring this node from Netdata Cloud, you\n can{\" \"}\n <Link href=\"https://learn.netdata.cloud/docs/agent/claim#remove-and-reconnect-a-node\">\n unclaim it.\n </Link>\n </Text>\n </Flex>\n </Flex>\n </Dropdown>\n </Drop>\n )}\n </Flex>\n )\n}\n\nexport default ProtoBuf\n","import React from \"react\"\nimport { Button } from \"@netdata/netdata-ui\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nimport { useHttp } from \"hooks/use-http\"\n\nconst NETDATA_LATEST_VERSION_URL = \"https://api.github.com/repos/netdata/netdata/releases/latest\"\nconst NETDATA_LATEST_GCS_VERSION_URL =\n \"https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt\"\n\nconst transformGcsVersionResponse = data => data.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\")\n\nconst transformGithubResponse = data => data?.tag_name.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\")\n\nconst versionsMatch = (v1, v2) => {\n if (v1 === v2) {\n return true\n }\n let s1 = v1.split(\".\")\n let s2 = v2.split(\".\")\n // Check major version\n let n1 = parseInt(s1[0].substring(1, 2), 10)\n let n2 = parseInt(s2[0].substring(1, 2), 10)\n if (n1 < n2) return false\n if (n1 > n2) return true\n\n // Check minor version\n n1 = parseInt(s1[1], 10)\n n2 = parseInt(s2[1], 10)\n if (n1 < n2) return false\n if (n1 > n2) return true\n\n // Split patch: format could be e.g. 0-22-nightly\n s1 = s1[2].split(\"-\")\n s2 = s2[2].split(\"-\")\n\n n1 = parseInt(s1[0], 10)\n n2 = parseInt(s2[0], 10)\n if (n1 < n2) return false\n if (n1 > n2) return true\n\n n1 = s1.length > 1 ? parseInt(s1[1], 10) : 0\n n2 = s2.length > 1 ? parseInt(s2[1], 10) : 0\n if (n1 < n2) return false\n return true\n}\n\nconst VersionControl = ({ currentVersion, releaseChannel }) => {\n const isStableReleaseChannel = releaseChannel === \"stable\"\n const [githubVersion] = useHttp(NETDATA_LATEST_VERSION_URL, isStableReleaseChannel, true)\n\n const [gcsVersionResponse] = useHttp(NETDATA_LATEST_GCS_VERSION_URL, !isStableReleaseChannel)\n const [mediaLinkResponse] = useHttp(gcsVersionResponse?.mediaLink, Boolean(gcsVersionResponse))\n\n const latestVersion = isStableReleaseChannel\n ? transformGithubResponse(githubVersion)\n : mediaLinkResponse\n ? transformGcsVersionResponse(mediaLinkResponse)\n : null\n\n if (!latestVersion) {\n return null\n }\n const isNewVersionAvailable = !versionsMatch(currentVersion, latestVersion)\n\n return (\n <Tooltip content={isNewVersionAvailable ? \"Need help?\" : \"Check Version\"} align=\"bottom\" plain>\n <Button\n data-testid=\"header-version-control-button\"\n flavour=\"borderless\"\n themeType=\"dark\"\n small\n neutral={!isNewVersionAvailable}\n warning={isNewVersionAvailable}\n name={isNewVersionAvailable ? \"update_pending\" : \"update\"}\n icon={isNewVersionAvailable ? \"update_pending\" : \"update\"}\n data-toggle=\"modal\"\n data-target=\"#updateModal\"\n />\n </Tooltip>\n )\n}\n\nexport default VersionControl\n","import React from \"react\"\nimport VersionControl from \"components/app-header/components/versionControl\"\nimport { useSelector } from \"@/src/store/redux-separate-context\"\n\nconst versionSelector = state => {\n const { data } = state.global.chartsMetadata\n\n if (!data) return null\n\n const { version, release_channel: releaseChannel } = data\n return {\n version,\n releaseChannel,\n }\n}\n\nconst Version = () => {\n const data = useSelector(versionSelector)\n return (\n data && <VersionControl currentVersion={data.version} releaseChannel={data.releaseChannel} />\n )\n}\n\nexport default Version\n","import { useState, useCallback } from \"react\"\n\n/**\n * @example\n * const [value, toggle, toggleOn, toggleOff] = useToggle(false);\n *\n * @param {Boolean} initialValue\n */\n\nconst useToggle = (initialValue = false) => {\n const [value, setToggle] = useState(!!initialValue)\n const toggle = useCallback(() => setToggle(oldValue => !oldValue), [])\n const toggleOn = useCallback(() => setToggle(true), [])\n const toggleOff = useCallback(() => setToggle(false), [])\n\n return [value, toggle, toggleOn, toggleOff]\n}\n\nexport default useToggle\n","import { useEffect, useState } from \"react\"\n\nconst useLocalStorage = (key, defaultValue) => {\n const [value, setValue] = useState(() => getValueFromStorage(key, defaultValue))\n\n useEffect(() => localStorage.setItem(key, JSON.stringify(value)), [key, value])\n\n return [value, setValue]\n}\n\nconst getValueFromStorage = (key, defaultValue = \"\") =>\n JSON.parse(localStorage.getItem(key)) ?? defaultValue\n\nexport default useLocalStorage\n","import styled from \"styled-components\"\nimport { getColor, getSizeBy, Icon } from \"@netdata/netdata-ui\"\nimport { Menu } from \"@rmwc/menu\"\n\nexport const RootContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n`\n\nexport const StyledMenu = styled(Menu)``\n\nexport const DropdownContainer = styled.div`\n cursor: pointer;\n color: ${getColor(\"bright\")};\n .mdc-menu-surface {\n border-radius: 0;\n .mdc-list {\n padding: 0;\n }\n .mdc-list-item {\n padding: 0 ${getSizeBy(5)} 0 ${getSizeBy(5)};\n font-size: 14px;\n height: ${getSizeBy(6)};\n }\n }\n`\n\nexport const ListContainer = styled.div`\n padding: ${getSizeBy(3)} 0;\n`\n\nexport const OpenerIcon = styled(Icon)`\n flex-shrink: 0;\n flex-grow: 0;\n margin-left: ${({ noMargin }) => (noMargin ? \"unset\" : \"16px\")};\n fill: ${getColor(\"bright\")};\n width: 10px;\n height: 5px;\n`\n","import styled from \"styled-components\"\nimport { getColor, getSizeBy, Icon, Drop } from \"@netdata/netdata-ui\"\nimport { Dropdown } from \"@/src/components/mdx-components/dropdown\"\nimport { dialogsZIndex, customDropdownZIndex } from \"@/src/styles/z-index\"\n\nexport const PickerBox = styled.div`\n display: flex;\n position: relative;\n min-width: ${getSizeBy(102)};\n min-height: ${getSizeBy(43)};\n flex-direction: column;\n align-items: flex-end;\n background-color: ${getColor(\"mainBackground\")};\n color: ${getColor(\"text\")};\n z-index: ${dialogsZIndex};\n border-radius: 8px;\n`\n\nexport const StyledTimePeriod = styled.span`\n margin-top: ${getSizeBy(3)};\n cursor: pointer;\n width: 187px;\n height: ${getSizeBy(2)};\n &:first-of-type {\n margin-top: ${getSizeBy(1)};\n }\n &:last-of-type {\n margin-bottom: ${getSizeBy(1)};\n }\n & > span:hover {\n color: ${getColor(\"textLite\")};\n }\n`\nexport const StyledCustomTimePeriod = styled.span`\n margin: ${getSizeBy(1)} ${getSizeBy(3)} 0;\n color: ${({ isSelected, theme }) => getColor(isSelected ? \"primary\" : \"text\")({ theme })};\n cursor: pointer;\n &:first-of-type {\n margin-top: 0;\n }\n &:hover {\n color: ${getColor(\"textLite\")};\n }\n`\n\nexport const StyledDropdown = styled(Dropdown)`\n width: 88px;\n height: 32px;\n padding-top: 8px;\n padding-bottom: 8px;\n padding-left: 8px;\n padding-right: 7px;\n border: 1px solid ${getColor(\"border\")};\n box-sizing: border-box;\n border-radius: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ${getColor(\"text\")};\n .mdc-menu-surface--anchor {\n .mdc-menu-surface--open {\n ${customDropdownZIndex}\n margin-top: ${getSizeBy(2)};\n background: ${getColor(\"mainBackground\")};\n border-radius: 4px;\n }\n }\n .mdc-list {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n`\nexport const DropdownIcon = styled(Icon)`\n fill: ${getColor(\"text\")};\n width: 12px;\n height: 12px;\n`\n\nexport const CustomInput = styled.input`\n border: 1px solid ${getColor(\"border\")};\n color: inherit;\n background: ${getColor(\"mainBackground\")};\n box-sizing: border-box;\n border-radius: 4px;\n padding: 4px;\n width: 32px;\n height: 32px;\n margin-left: 10px;\n margin-right: 10px;\n outline: none;\n &:focus {\n border: 1px solid ${getColor(\"primary\")};\n }\n`\nexport const StyledDrop = styled(Drop).attrs({\n background: \"mainBackground\",\n round: 2,\n margin: [4, 0, 0],\n border: { side: \"all\", color: \"elementBackground\" },\n animation: true,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\nexport const StyledHR = styled.hr`\n border: none;\n margin: 0;\n border-left: 1px solid ${getColor(\"borderSecondary\")};\n height: 284px;\n`\n","import React, { useRef } from \"react\"\nimport { List } from \"@rmwc/list\"\nimport { MenuSurfaceAnchor, MenuSurface } from \"@rmwc/menu\"\nimport { RootContainer, ListContainer, DropdownContainer, OpenerIcon } from \"./styled\"\n\nexport const Dropdown = ({\n title,\n children,\n className,\n renderTitle,\n isOpen = false,\n onMenuToggle,\n anchorCorner = \"bottomStart\",\n renderOpener,\n}) => {\n const ref = useRef()\n\n const handleOpenState = () => {\n onMenuToggle(!isOpen)\n }\n\n const handleClose = () => {\n onMenuToggle(false)\n }\n\n return (\n <DropdownContainer className={className}>\n <MenuSurfaceAnchor>\n <MenuSurface ref={ref} open={isOpen} onClose={handleClose} anchorCorner={anchorCorner}>\n {typeof children === \"function\" ? (\n isOpen && (\n <ListContainer>\n <List>{children({ maxHeight: ref.current?.root.ref.style.maxHeight })}</List>\n </ListContainer>\n )\n ) : (\n <ListContainer>\n <List>{children}</List>\n </ListContainer>\n )}\n </MenuSurface>\n <RootContainer onClick={handleOpenState}>\n {title || (renderTitle && renderTitle())}\n {renderOpener ? (\n renderOpener()\n ) : (\n <OpenerIcon name=\"triangle_down\" noMargin={Boolean(renderTitle)} />\n )}\n </RootContainer>\n </MenuSurfaceAnchor>\n </DropdownContainer>\n )\n}\n","import React, { memo, useCallback } from \"react\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport { StyledTimePeriod } from \"./styled\"\n\nconst TimePeriod = ({ value, period, resolution, isSelected, setTimeRange, tagging }) => {\n const onClick = useCallback(\n () => setTimeRange(value, resolution),\n [value, resolution, setTimeRange]\n )\n return (\n <StyledTimePeriod\n key={value}\n onClick={onClick}\n data-ga={`date-picker::click-quick-selector::${tagging}::${-value}`}\n data-testid=\"timePeriod-value\"\n >\n <Text color={isSelected ? \"primary\" : \"text\"}>{period}</Text>\n </StyledTimePeriod>\n )\n}\n\nexport default memo(TimePeriod)\n","import { format, formatDistanceStrict, parse, getTime, getUnixTime, add, isMatch } from \"date-fns\"\n\nconst MINUTE = 60\nconst HOUR = MINUTE * 60\nconst DAY = HOUR * 24\nconst MONTH = 30 * DAY\n\nexport const maxTimePeriodInUnix = 94694400\nexport const dateResolutions = [\"minutes\", \"hours\", \"days\", \"months\"]\n\nconst resolutionsMapping = {\n minutes: MINUTE,\n hours: HOUR,\n days: DAY,\n months: MONTH,\n}\n\nexport const getCustomTimePeriod = (after, resolution) =>\n Math.round(after / resolutionsMapping[resolution])\n\nexport const parseInputPeriod = (timeCorrection, resolution) => {\n const customRange = add(new Date(0), {\n [resolution]: timeCorrection,\n })\n return -getUnixTime(customRange)\n}\n\nconst focusTaggingMap = {\n startDate: \"start\",\n endDate: \"finish\",\n}\n\nexport const getFocusTagging = focusedInput => focusTaggingMap[focusedInput]\n\nexport const timePeriods = [\n { period: \"Last 5 minutes\", value: -5 * MINUTE, resolution: \"minutes\" },\n { period: \"Last 15 minutes\", value: -15 * MINUTE, resolution: \"minutes\" },\n { period: \"Last 30 minutes\", value: -30 * MINUTE, resolution: \"minutes\" },\n { period: \"Last 2 hours\", value: -2 * HOUR, resolution: \"hours\" },\n { period: \"Last 6 hours\", value: -6 * HOUR, resolution: \"hours\" },\n { period: \"Last 12 hours\", value: -12 * HOUR, resolution: \"hours\" },\n { period: \"Last Day\", value: -DAY, resolution: \"days\" },\n { period: \"Last 2 Days\", value: -2 * DAY, resolution: \"days\" },\n { period: \"Last 7 Days\", value: -7 * DAY, resolution: \"days\" },\n]\n\nexport const formatDates = (startDate, endDate) => {\n const formattedStartDate = format(startDate, \"MMMM d yyyy, H:mm:ss\")\n const formattedEndDate = format(endDate, \"MMMM d yyyy, H:mm:ss\")\n return {\n formattedStartDate,\n formattedEndDate,\n }\n}\n\nexport const formatOffset = offset => {\n if (!offset) return \"+00:00\"\n const splitOffset = offset.toString().split(\".\")\n const mathSign = splitOffset[0] > 0 ? \"+\" : \"-\"\n const absoluteNumber = Math.abs(splitOffset[0]).toString()\n const firstPart = `${mathSign}${absoluteNumber.padStart(2, 0)}`\n return splitOffset.length > 1\n ? `${firstPart}:${String(splitOffset[1] * 0.6).padEnd(2, 0)}`\n : `${firstPart}:00`\n}\n\nexport const getDateWithOffset = (date, utcOffset) => {\n const formattedDate = isMatch(date, \"MMMM d yyyy, H:mm\")\n ? date\n : parse(date, \"MMMM d yyyy, H:mm\", Date.now())\n return parse(`${formattedDate} ${formatOffset(utcOffset)}`, \"MMMM d yyyy, H:mm xxx\", Date.now())\n}\n\nexport const getTimePeriod = (startDate, endDate) =>\n formatDistanceStrict(getTime(startDate), getTime(endDate))\n","import React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport TimePeriod from \"./timePeriod\"\nimport { timePeriods } from \"./utils\"\n\nconst TimePeriods = ({ handleTimePeriodChange, selectedDate, tagging }) => (\n <Flex\n column\n justifyContent=\"start\"\n alignItems=\"start\"\n height={{ max: \"240px\" }}\n overflow={{ vertical: \"scroll\" }}\n data-testid=\"timePeriods\"\n >\n {timePeriods.map(({ period, value, resolution }) => (\n <TimePeriod\n key={value}\n value={value}\n period={period}\n resolution={resolution}\n setTimeRange={handleTimePeriodChange}\n isSelected={selectedDate === value}\n tagging={tagging}\n />\n ))}\n </Flex>\n)\n\nexport default TimePeriods\n","import React, { useCallback, useEffect, useState } from \"react\"\nimport { isValid, add, getUnixTime } from \"date-fns\"\nimport { Flex, Text } from \"@netdata/netdata-ui\"\nimport {\n getCustomTimePeriod,\n parseInputPeriod,\n dateResolutions,\n maxTimePeriodInUnix,\n} from \"./utils\"\nimport { StyledDropdown, DropdownIcon, CustomInput, StyledCustomTimePeriod } from \"./styled\"\n\nconst CustomTimePeriod = ({ handleTimePeriodChange, value, resolution, tagging }) => {\n const getInputValue = () => (value <= 0 ? getCustomTimePeriod(-value, resolution) : 0)\n const [inputValue, setInputValue] = useState(getInputValue)\n const [isDropdownOpen, toggleDropdown] = useState(false)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => setInputValue(getInputValue()), [value])\n\n const onChange = useCallback(e => setInputValue(e.target.value), [])\n\n const onBlur = useCallback(\n e => {\n const currentValue = Number(e.currentTarget.value)\n const isValidInput =\n !Number.isNaN(currentValue) && Number.isInteger(currentValue) && currentValue > 0\n const timePeriod = add(new Date(0), {\n [resolution]: currentValue,\n })\n const isValidTimePeriod =\n isValidInput && isValid(timePeriod) && getUnixTime(timePeriod) <= maxTimePeriodInUnix\n if (isValidTimePeriod)\n return handleTimePeriodChange(parseInputPeriod(currentValue, resolution), resolution)\n return value <= 0 ? setInputValue(getCustomTimePeriod(-value, resolution)) : setInputValue(0)\n },\n [resolution, value, handleTimePeriodChange]\n )\n\n const onChangeResolution = useCallback(\n newResolution => {\n return () => {\n handleTimePeriodChange(parseInputPeriod(inputValue, newResolution), newResolution)\n toggleDropdown(false)\n }\n },\n [inputValue, handleTimePeriodChange]\n )\n\n const renderTitle = () => (\n <Flex alignItems=\"center\" flexWrap={false} width=\"100%\">\n <Text padding={[0, 4, 0, 0]}>{resolution}</Text>\n <DropdownIcon name=\"triangle_down\" />\n </Flex>\n )\n return (\n <Flex\n justifyContent=\"start\"\n alignItems=\"center\"\n height={8}\n data-ga={`date-picker::click-last-integer::${tagging}`}\n data-testid=\"customTimePeriod\"\n >\n <Text>Last</Text>\n <CustomInput\n value={inputValue}\n onChange={onChange}\n onBlur={onBlur}\n data-ga={`date-picker::click-last-integer::${tagging}::${inputValue}`}\n data-testid=\"timePeriod-timeInput\"\n />\n <StyledDropdown\n isOpen={isDropdownOpen}\n onMenuToggle={toggleDropdown}\n renderTitle={renderTitle}\n renderOpener={() => null}\n >\n {() =>\n dateResolutions.map(dateResolution => (\n <StyledCustomTimePeriod\n key={dateResolution}\n onClick={onChangeResolution(dateResolution)}\n data-ga={`date-picker::click-last-time-${dateResolution}::${tagging}`}\n data-testid=\"timePeriod-option\"\n >\n {dateResolution}\n </StyledCustomTimePeriod>\n ))\n }\n </StyledDropdown>\n </Flex>\n )\n}\n\nexport default CustomTimePeriod\n","import React from \"react\"\nimport DatePickerLib from \"react-datepicker\"\nimport \"react-datepicker/dist/react-datepicker.css\"\n\nconst DatePicker = ({\n selected,\n selectsStart = false,\n selectsEnd = false,\n startDate,\n endDate,\n onChange,\n minDate,\n maxDate,\n dateFormat = \"MM/dd/yyyy\",\n open = false,\n startOpen = false,\n inline = false,\n selectsRange = false,\n monthsShown = 1,\n showPopperArrow = true,\n calendarContainer = null,\n}) => (\n <DatePickerLib\n selected={selected}\n onChange={onChange}\n selectsStart={selectsStart}\n selectsEnd={selectsEnd}\n startDate={startDate}\n endDate={endDate}\n minDate={minDate}\n maxDate={maxDate}\n dateFormat={dateFormat}\n open={open}\n startOpen={startOpen}\n inline={inline}\n selectsRange={selectsRange}\n monthsShown={monthsShown}\n showPopperArrow={showPopperArrow}\n calendarContainer={calendarContainer}\n />\n)\n\nexport default DatePicker\n","import { getColor, getRgbColor } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\n\nexport const StyledDateInput = styled.input`\n width: 100%;\n text-align: center;\n border: 1px solid ${getColor(\"border\")};\n color: inherit;\n background: ${getColor(\"mainBackground\")};\n box-sizing: border-box;\n border-radius: 4px;\n padding: 4px;\n height: 32px;\n margin-left: 20px;\n margin-right: 20px;\n outline: none;\n &:focus {\n border: 1px solid ${getColor(\"primary\")};\n }\n`\nexport const StyledCalendar = styled.div`\n background: ${getColor(\"mainBackground\")};\n border: 0;\n .react-datepicker {\n &__navigation {\n top: 8px;\n &-icon::before {\n border-color: ${getColor(\"text\")};\n }\n }\n &__header {\n background: ${getColor(\"mainBackground\")};\n border: 0;\n .react-datepicker__current-month {\n color: ${getColor(\"main\")};\n font-weight: normal;\n }\n .react-datepicker__day-name {\n color: ${getColor(\"textLite\")};\n }\n }\n &__day {\n color: ${getColor(\"main\")};\n &:hover {\n background: ${getColor(\"elementBackground\")};\n }\n &--disabled {\n color: ${getColor(\"textLite\")};\n &:hover {\n background: inherit;\n }\n }\n &--keyboard-selected,\n &--keyboard-selected:hover {\n color: ${getColor(\"main\")};\n background: inherit;\n border-radius: inherit;\n }\n &--selected,\n &--selected:hover {\n color: ${getColor(\"bright\")};\n background: ${getColor(\"primary\")};\n border-radius: 8px;\n }\n &--in-selecting-range,\n &--in-range {\n color: ${getColor(\"primary\")};\n background: ${getColor(\"elementBackground\")};\n border-radius: 0;\n }\n &--selecting-range-start,\n &--range-start {\n color: ${getColor(\"bright\")};\n background: ${getColor(\"primary\")};\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n &:hover {\n color: ${getColor(\"bright\")};\n background: ${getRgbColor([\"green\", \"netdata\"], 0.8)};\n border-radius: 0;\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n }\n }\n &--selecting-range-end,\n &--range-end {\n color: ${getColor(\"bright\")};\n background: ${getColor(\"primary\")};\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n &:hover {\n color: ${getColor(\"bright\")};\n background: ${getRgbColor([\"green\", \"netdata\"], 0.8)};\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n }\n }\n }\n }\n`\n","import React, { useState, useEffect, useCallback } from \"react\"\nimport { format, isValid, getTime } from \"date-fns\"\nimport { getDateWithOffset } from \"./utils\"\nimport { StyledDateInput } from \"../datePicker/styled\"\nimport { useDateTime } from \"@/src/utils/date-time\"\n\nconst DatePickerInput = ({\n name = \"\",\n value = \"\",\n onDatesChange,\n onFocus,\n placeholderText = \"\",\n}) => {\n const { utcOffset } = useDateTime()\n const [inputValue, setInputValue] = useState(\"\")\n const onChange = useCallback(e => {\n const date = e.target.value\n setInputValue(date)\n }, [])\n const setFormattedValue = useCallback(value => {\n if (isValid(value)) {\n const formattedDate = format(value, \"MMMM d yyyy, H:mm\")\n setInputValue(formattedDate)\n }\n }, [])\n const onBlur = useCallback(\n e => {\n const parsedDate = getDateWithOffset(e.target.value, utcOffset)\n const isValidDate = isValid(parsedDate) && getTime(parsedDate) > 0\n if (isValidDate) {\n const timestamp = getTime(parsedDate)\n onDatesChange(timestamp, () => setFormattedValue(value))\n } else setFormattedValue(value)\n },\n [value, utcOffset, onDatesChange, setFormattedValue]\n )\n\n useEffect(() => setFormattedValue(value), [value, setFormattedValue])\n\n return (\n <StyledDateInput\n type=\"text\"\n name={name}\n value={value ? inputValue : placeholderText}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n placeholder={placeholderText}\n data-testid=\"datePicker-input\"\n />\n )\n}\n\nexport default DatePickerInput\n","import { useDateTime } from \"@/src/utils/date-time\"\nimport { useCallback } from \"react\"\n\nconst useLocaleDate = () => {\n const { localeTimeString, localeDateString } = useDateTime()\n return useCallback(\n date => {\n return `${localeDateString(date, { locale: \"en-us\", long: false })} ${localeTimeString(date, {\n secs: false,\n })}`\n },\n [localeTimeString, localeDateString]\n )\n}\n\nexport default useLocaleDate\n","import { useMemo } from \"react\"\nimport { toDate } from \"date-fns\"\nimport useLocaleDate from \"./useLocaleDate\"\n\nexport const convertTimestampToDate = (timestamp, getLocaleDate) => {\n if (timestamp > 0) {\n return toDate(new Date(getLocaleDate(timestamp)))\n } else if (timestamp || timestamp === 0)\n return toDate(new Date(getLocaleDate(new Date().valueOf() + timestamp * 1000)))\n return null\n}\n\nconst useConvertedDates = (startDate, endDate) => {\n const getLocaleDate = useLocaleDate()\n return useMemo(\n () => [\n convertTimestampToDate(startDate, getLocaleDate),\n convertTimestampToDate(endDate, getLocaleDate),\n ],\n [startDate, endDate, getLocaleDate]\n )\n}\n\nexport default useConvertedDates\n","import { Flex } from \"@netdata/netdata-ui\"\nimport React, { useCallback } from \"react\"\nimport { getTime, isBefore, format } from \"date-fns\"\nimport { useDateTime } from \"@/src/utils/date-time\"\nimport DatePicker from \"../datePicker/datePickerLib\"\nimport DatePickerInput from \"./datePickerInput\"\nimport useConvertedDates, { convertTimestampToDate } from \"./useConvertedDate\"\nimport useLocaleDate from \"./useLocaleDate\"\nimport { getDateWithOffset } from \"./utils\"\nimport { StyledCalendar } from \"../datePicker/styled\"\n\nconst DatePickerWrapper = ({\n startDate,\n setStartDate,\n endDate,\n setEndDate,\n onDatesChange,\n onInputFocus,\n}) => {\n const getLocaleDate = useLocaleDate()\n const [convertedStartDate, convertedEndDate] = useConvertedDates(startDate, endDate)\n const { utcOffset } = useDateTime()\n const setValidStartDate = useCallback(\n (startDate, setPreviousValue) =>\n isBefore(convertTimestampToDate(startDate, getLocaleDate), convertedEndDate)\n ? setStartDate(startDate)\n : setPreviousValue(),\n [convertedEndDate, getLocaleDate, setStartDate]\n )\n\n const setValidEndDate = useCallback(\n (endDate, setPreviousValue) =>\n isBefore(convertedStartDate, convertTimestampToDate(endDate, getLocaleDate))\n ? setEndDate(endDate)\n : setPreviousValue(),\n [convertedStartDate, getLocaleDate, setEndDate]\n )\n\n const onChange = useCallback(\n dates => {\n const [startDate, endDate] = dates\n\n const startDateWithOffset = startDate\n ? getDateWithOffset(format(startDate, \"MMMM d yyyy, H:mm\"), utcOffset)\n : startDate\n const endDateWithOffset = endDate\n ? getDateWithOffset(format(endDate, \"MMMM d yyyy, H:mm\"), utcOffset)\n : endDate\n\n const startDateTimestamp = getTime(startDateWithOffset) || null\n const endDateTimestamp = getTime(endDateWithOffset) || null\n\n onDatesChange(startDateTimestamp, endDateTimestamp)\n },\n [utcOffset, onDatesChange]\n )\n\n return (\n <Flex\n column\n justifyContent=\"center\"\n alignItems=\"center\"\n flex={{ grow: 1 }}\n gap={3}\n margin={[0, 0, 0, 7]}\n data-testid=\"datePicker-wrapper\"\n >\n <DatePicker\n selected={convertedStartDate}\n onChange={onChange}\n startDate={convertedStartDate}\n endDate={convertedEndDate}\n maxDate={new Date()}\n minDate={new Date(\"1/1/2018\")}\n inline\n selectsRange\n monthsShown={2}\n dateFormat=\"MMMM d yyyy, H:mm\"\n showPopperArrow={false}\n calendarContainer={StyledCalendar}\n />\n <Flex justifyContent=\"around\" alignItems=\"center\" width=\"100%\">\n <DatePickerInput\n name=\"startDate\"\n value={convertedStartDate}\n onDatesChange={setValidStartDate}\n onFocus={onInputFocus}\n placeholderText=\"Select a start date\"\n />\n <DatePickerInput\n name=\"endDate\"\n value={convertedEndDate}\n onDatesChange={setValidEndDate}\n onFocus={onInputFocus}\n placeholderText=\"Select an end date\"\n />\n </Flex>\n </Flex>\n )\n}\n\nexport default DatePickerWrapper\n","import React, { useMemo } from \"react\"\nimport { Flex, Icon, TextSmall } from \"@netdata/netdata-ui\"\nimport { formatDates, getTimePeriod } from \"./utils\"\nimport useConvertedDates from \"./useConvertedDate\"\n\nconst PeriodIndication = ({ startDate, endDate }) => {\n const [convertedStart, convertedEnd] = useConvertedDates(startDate, endDate)\n\n const { formattedStartDate, formattedEndDate } = useMemo(\n () => formatDates(convertedStart, convertedEnd),\n [convertedStart, convertedEnd]\n )\n const timePeriod = useMemo(\n () => getTimePeriod(convertedStart, convertedEnd),\n [convertedStart, convertedEnd]\n )\n\n return (\n <Flex alignItems=\"center\" justifyContent=\"between\" gap={2}>\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={1.5}>\n <TextSmall strong whiteSpace=\"nowrap\">\n From\n </TextSmall>\n <TextSmall whiteSpace=\"nowrap\" data-testid=\"periodIndication-from\">\n {formattedStartDate}\n </TextSmall>\n </Flex>\n <Icon name=\"arrow_left\" size=\"small\" color=\"textLite\" rotate={2} />\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={1.5}>\n <TextSmall strong whiteSpace=\"nowrap\">\n To\n </TextSmall>\n <TextSmall whiteSpace=\"nowrap\" data-testid=\"periodIndication-to\">\n {formattedEndDate}\n </TextSmall>\n </Flex>\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={2}>\n <TextSmall whiteSpace=\"nowrap\">/</TextSmall>\n <TextSmall color=\"textLite\" whiteSpace=\"nowrap\" data-testid=\"periodIndication-period\">\n {timePeriod}\n </TextSmall>\n </Flex>\n </Flex>\n )\n}\n\nexport default PeriodIndication\n","import moment from \"moment\"\n\nexport const SECONDS = 1000\nexport const MINUTE = SECONDS * 60\nexport const HOUR = MINUTE * 60\nexport const DAY = HOUR * 24\nexport const MONTH = DAY * 30\n\nconst resolutionMap = [\n { value: DAY, unit: \"d\" },\n { value: HOUR, unit: \"h\" },\n { value: MINUTE, unit: \"min\" },\n { value: MINUTE, unit: \"min\" },\n { value: SECONDS, unit: \"s\" },\n]\n\nexport const getStartDate = start =>\n start < 0 ? moment(new Date()).add(start, \"seconds\") : moment(start)\nexport const getEndDate = end => (!end ? moment(new Date()) : moment(end))\nexport const getIsSameDate = (startDate, endDate) => startDate.isSame(endDate, \"day\")\nexport const getDuration = (startDate, endDate) => moment.duration(startDate.diff(endDate))\n\nconst getResolution = (value, resolution) => (value > 1 ? `${Math.floor(value)}${resolution}` : \"\")\n\nexport const getGranularDuration = duration => {\n let seconds = Math.abs(duration)\n const showSeconds = seconds < MINUTE\n return resolutionMap.reduce((acc, { value, unit }) => {\n if (value === SECONDS && !showSeconds) return acc\n acc = acc + getResolution(seconds / value, unit)\n seconds = seconds % value\n return acc\n }, \"\")\n}","import styled from \"styled-components\"\nimport { Flex, getColor } from \"@netdata/netdata-ui\"\n\nconst Container = styled(Flex)`\n cursor: pointer;\n\n &:hover * {\n color: ${getColor(\"textLite\")};\n fill: ${getColor(\"textLite\")};\n }\n`\n\nexport default Container\n","import React from \"react\"\nimport { Flex, TextSmall, Icon } from \"@netdata/netdata-ui\"\nimport { useDateTime } from \"utils/date-time\"\n\nconst DateBox = ({ isPlaying, startDate, endDate, isSameDate }) => {\n const { localeTimeString, localeDateString } = useDateTime()\n return (\n <Flex gap={2}>\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n {localeDateString(startDate, { long: false })} •{\" \"}\n <TextSmall color={isPlaying ? \"accent\" : \"textFocus\"} whiteSpace=\"nowrap\">\n {localeTimeString(startDate, { secs: false })}\n </TextSmall>\n </TextSmall>\n <Icon name=\"arrow_left\" color={isPlaying ? \"accent\" : \"textFocus\"} size=\"small\" rotate={2} />\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n {!isSameDate && `${localeDateString(endDate, { long: false })} • `}\n <TextSmall color={isPlaying ? \"accent\" : \"textFocus\"} whiteSpace=\"nowrap\">\n {localeTimeString(endDate, { secs: false })}\n </TextSmall>\n </TextSmall>\n </Flex>\n )\n}\n\nexport default DateBox\n","import React from \"react\"\nimport { Flex, TextSmall } from \"@netdata/netdata-ui\"\n\nconst DurationBox = ({ isPlaying, duration }) => {\n return (\n <Flex gap={1}>\n <Flex width=\"24px\" justifyContent=\"center\">\n {isPlaying && (\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n • last\n </TextSmall>\n )}\n </Flex>\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n {duration}\n </TextSmall>\n </Flex>\n )\n}\n\nexport default DurationBox\n","import React, { useState, useMemo, useEffect, forwardRef } from \"react\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport { useSelector as useDashboardSelector } from \"store/redux-separate-context\"\nimport { selectGlobalPanAndZoom } from \"domains/global/selectors\"\nimport {\n getStartDate,\n getEndDate,\n getIsSameDate,\n getDuration,\n MINUTE,\n getGranularDuration,\n} from \"./utils\"\nimport Container from \"./container\"\nimport DateBox from \"./dateBox\"\nimport DurationBox from \"./durationBox\"\n\nconst PickerAccessorElement = forwardRef(\n (\n { onClick, start = 15 * MINUTE, end, isPlaying, isPickerOpen, setRangeValues, tagging },\n ref\n ) => {\n const [timeframe, setTimeframe] = useState()\n const startDate = getStartDate(start)\n const endDate = getEndDate(end)\n const globalPanAndZoom = useDashboardSelector(selectGlobalPanAndZoom)\n useEffect(() => {\n const after = getDuration(startDate, endDate).as(\"seconds\")\n if (!isPlaying && timeframe !== after) setTimeframe(Math.round(after))\n if (isPlaying && timeframe && !!globalPanAndZoom) {\n setRangeValues({ start: Math.round(timeframe) })\n setTimeframe(null)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [startDate, endDate, timeframe, isPlaying])\n\n const isSameDate = useMemo(() => getIsSameDate(startDate, endDate), [startDate, endDate])\n const duration = useMemo(\n () => getGranularDuration(getDuration(startDate, endDate).as(\"milliseconds\")),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isPlaying, startDate, endDate]\n )\n\n return (\n <Tooltip\n content={isPickerOpen ? () => {} : \"Select a predefined or a custom timeframe\"}\n align=\"bottom\"\n plain\n >\n <Container\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={1}\n height=\"100%\"\n width={{ min: \"380px\" }}\n onMouseDown={onClick}\n padding={[0, 1]}\n ref={ref}\n data-ga={`date-picker::click-time::${tagging}`}\n data-testid=\"datePicker-accessorElement\"\n >\n <DateBox\n isPlaying={isPlaying}\n endDate={endDate}\n startDate={startDate}\n isSameDate={isSameDate}\n />\n <DurationBox isPlaying={isPlaying} duration={duration} />\n </Container>\n </Tooltip>\n )\n }\n)\n\nexport default PickerAccessorElement\n","import React, { useState, useEffect, useMemo, useRef, useCallback } from \"react\"\nimport { Button, Flex } from \"@netdata/netdata-ui\"\nimport useToggle from \"hooks/useToggle\"\nimport useLocalStorage from \"hooks/useLocalStorage\"\nimport TimePeriods from \"./timePeriods\"\nimport CustomTimePeriod from \"./customTimePeriod\"\nimport DatePickerWrapper from \"./datePickerWrapper\"\nimport { getFocusTagging } from \"./utils\"\nimport PeriodIndication from \"./periodIndication\"\nimport AccessorElement from \"./accessorElement\"\nimport { PickerBox, StyledDrop, StyledHR } from \"./styled\"\n\nexport const reportEvent = (\n eventCategory,\n eventAction,\n eventLabel,\n eventValue,\n event = \"gaCustomEvent\"\n) => {\n if (window.dataLayer) {\n const eventData = { event, eventCategory, eventAction, eventLabel, eventValue }\n window.dataLayer.push(eventData)\n }\n}\n\nconst DatePickerDrop = ({\n onChange,\n values: { start: initialStartDate, end: initialEndDate } = {},\n defaultValue = -60 * 15,\n tagging = \"\",\n isPlaying,\n}) => {\n const [startDate, setStartDate] = useState(initialStartDate)\n const [endDate, setEndDate] = useState(initialStartDate)\n const [resolution, setResolution] = useLocalStorage(\"resolution\", \"minutes\")\n const [focusedInput, setFocusedInput] = useState(\"startDate\")\n const [isOpen, toggle, , close] = useToggle()\n const ref = useRef()\n\n const setDates = useCallback(({ startDate, endDate }) => {\n setStartDate(startDate)\n setEndDate(endDate)\n }, [])\n\n useEffect(() => {\n setDates({\n startDate: initialStartDate,\n endDate: initialEndDate,\n })\n }, [initialStartDate, initialEndDate, setDates])\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const clearChanges = useCallback(() => setDates({ startDate: defaultValue, endDate: 0 }), [])\n\n const onInputFocus = useCallback(e => {\n if (!e.target.name) return\n setFocusedInput(e.target.name)\n }, [])\n\n const togglePicker = useCallback(\n e => {\n e.stopPropagation()\n toggle()\n },\n [toggle]\n )\n\n const applyChanges = () => {\n onChange({\n start: startDate,\n end: endDate,\n })\n close()\n }\n\n const focusTagging = useMemo(() => getFocusTagging(focusedInput), [focusedInput])\n\n const isValidTimePeriod = startDate !== null && endDate !== null && startDate !== endDate\n const isApplyDisabled = startDate === initialStartDate && endDate === initialEndDate\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const consistentDefaultValue = useMemo(() => defaultValue, [])\n const isClearDisabled = startDate === consistentDefaultValue\n\n const handleTimePeriodChange = useCallback(\n (time, resolution) => {\n setResolution(resolution)\n setDates({\n startDate: time,\n endDate: 0,\n })\n },\n [setDates, setResolution]\n )\n const onDatepickerChange = (startDate, endDate) => {\n setDates({ startDate, endDate })\n const date = focusTagging === \"finish\" ? endDate || startDate : startDate || endDate\n reportEvent(\"date-picker\", \"click-date-picker\", tagging, String(date))\n }\n\n const pickerDrop =\n ref.current && isOpen ? (\n <StyledDrop\n target={ref.current}\n canHideTarget={false}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n >\n <PickerBox data-testid=\"datePicker\">\n <Flex justifyContent=\"between\" alignItems=\"center\" width=\"100%\" padding={[6, 6, 0, 6]}>\n <Flex column gap={3} margin={[0, 7, 0, 0]}>\n <TimePeriods\n handleTimePeriodChange={handleTimePeriodChange}\n selectedDate={startDate}\n tagging={tagging}\n />\n <CustomTimePeriod\n handleTimePeriodChange={handleTimePeriodChange}\n value={startDate}\n resolution={resolution}\n tagging={tagging}\n />\n </Flex>\n <StyledHR />\n <DatePickerWrapper\n startDate={startDate}\n endDate={endDate}\n setStartDate={setStartDate}\n setEndDate={setEndDate}\n onDatesChange={onDatepickerChange}\n onInputFocus={onInputFocus}\n />\n </Flex>\n <Flex\n alignItems=\"center\"\n justifyContent={isValidTimePeriod ? \"between\" : \"end\"}\n width=\"100%\"\n padding={[5, 6]}\n gap={2}\n >\n {isValidTimePeriod && <PeriodIndication startDate={startDate} endDate={endDate} />}\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={4}>\n <Button\n label=\"Clear\"\n flavour=\"hollow\"\n onClick={clearChanges}\n disabled={isClearDisabled}\n data-ga={`date-picker::click-clear::${tagging}-${focusTagging}`}\n data-testid=\"datePicker-clear\"\n />\n <Button\n label=\"Apply\"\n onClick={applyChanges}\n disabled={!isValidTimePeriod || isApplyDisabled}\n data-ga={`date-picker::click-apply::${tagging}-${focusTagging}`}\n data-testid=\"datePicker-apply\"\n />\n </Flex>\n </Flex>\n </PickerBox>\n </StyledDrop>\n ) : null\n\n return (\n <>\n <AccessorElement\n onClick={togglePicker}\n tagging={tagging}\n isPickerOpen={isOpen}\n isPlaying={isPlaying}\n setRangeValues={onChange}\n start={initialStartDate}\n end={initialEndDate}\n ref={ref}\n />\n {pickerDrop}\n </>\n )\n}\n\nexport default DatePickerDrop\n","import React, { memo, useEffect, useMemo } from \"react\"\nimport {\n useDispatch as useDashboardDispatch,\n useSelector as useDashboardSelector,\n} from \"store/redux-separate-context\"\nimport {\n resetGlobalPanAndZoomAction,\n setGlobalPanAndZoomAction,\n setDefaultAfterAction,\n} from \"domains/global/actions\"\nimport { selectDefaultAfter, selectGlobalPanAndZoom } from \"domains/global/selectors\"\nimport { setHashParams } from \"utils/hash-utils\"\nimport DatePickerDrop from \"./datePickerDrop\"\n\nconst ReduxDatePickerContainer = memo(({ tagging, isPlaying }) => {\n const dashboardDispatch = useDashboardDispatch()\n\n const globalPanAndZoom = useDashboardSelector(selectGlobalPanAndZoom)\n const isGlobalPanAndZoom = Boolean(globalPanAndZoom)\n\n const defaultAfter = useDashboardSelector(selectDefaultAfter)\n const pickedValues = useMemo(\n () =>\n isGlobalPanAndZoom\n ? { start: globalPanAndZoom.after, end: globalPanAndZoom.before }\n : {\n start: defaultAfter,\n end: 0,\n },\n [isGlobalPanAndZoom, globalPanAndZoom, defaultAfter]\n )\n\n function handlePickedValuesChange(params) {\n const { start, end } = params\n if (start < 0) {\n // live mode\n dashboardDispatch(\n // changes the default value, so it becomes inconsistent\n setDefaultAfterAction({\n after: start,\n })\n )\n if (isGlobalPanAndZoom) {\n dashboardDispatch(resetGlobalPanAndZoomAction())\n }\n } else {\n // global-pan-and-zoom mode\n dashboardDispatch(\n setGlobalPanAndZoomAction({\n after: start,\n before: end,\n })\n )\n }\n }\n\n useEffect(() => {\n const { start, end } = pickedValues\n setHashParams({ after: start.toString(), before: end.toString() })\n }, [pickedValues])\n return (\n <DatePickerDrop\n values={pickedValues}\n defaultValue={defaultAfter}\n onChange={handlePickedValuesChange}\n tagging={tagging}\n isPlaying={isPlaying}\n />\n )\n})\n\nexport default ReduxDatePickerContainer\n","import styled from \"styled-components\"\nimport { Flex, getRgbColor } from \"@netdata/netdata-ui\"\n\nconst getBackground = ({ theme, isPlaying }) => {\n const { name } = theme\n\n const background =\n name === \"Dark\"\n ? getRgbColor(isPlaying ? [\"green\", \"netdata\"] : [\"neutral\", \"tuna\"], isPlaying ? 0.3 : 1)\n : getRgbColor(isPlaying ? [\"green\", \"frostee\"] : [\"neutral\", \"blackhaze\"])\n\n return background({ theme })\n}\n\nconst Container = styled(Flex)`\n background: ${getBackground};\n`\n\nexport default Container\n","import styled from \"styled-components\"\nimport { Pill, getColor } from \"@netdata/netdata-ui\"\n\nconst getHoverColor = ({ isPlaying }) =>\n getColor(isPlaying ? [\"green\", \"chateau\"] : [\"neutral\", \"iron\"])\n\nconst StyledPill = styled(Pill).attrs(({ isPlaying }) => ({\n flavour: isPlaying ? \"success\" : \"neutral\",\n}))`\n &:hover {\n background: ${getHoverColor};\n border-color: ${getHoverColor};\n }\n`\n\nexport default StyledPill\n","import React, { useMemo } from \"react\"\nimport { useDispatch } from \"store/redux-separate-context\"\nimport { resetGlobalPauseAction, setGlobalPauseAction } from \"domains/global/actions\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport StyledPill from \"./styledPill\"\n\nconst getIcon = (isPlaying, isForcePlaying) => {\n if (!isPlaying) return \"pauseSolid\"\n return isForcePlaying ? \"forcePlay\" : \"playSolid\"\n}\n\nconst PlayPausePill = ({ isPlaying, isForcePlaying }) => {\n const dispatch = useDispatch()\n\n const onPlay = () => dispatch(resetGlobalPauseAction({ forcePlay: false }))\n const onPause = () => dispatch(setGlobalPauseAction())\n const icon = useMemo(() => getIcon(isPlaying, isForcePlaying), [isPlaying, isForcePlaying])\n\n return (\n <Tooltip content={isPlaying ? \"Click to pause\" : \"Click to play\"} align=\"bottom\" plain>\n <StyledPill icon={icon} onClick={isPlaying ? onPause : onPlay} isPlaying={isPlaying}>\n {isPlaying ? \"Playing\" : \"Paused\"}\n </StyledPill>\n </Tooltip>\n )\n}\n\nexport default PlayPausePill\n","import React, { useCallback, forwardRef } from \"react\"\nimport styled from \"styled-components\"\nimport { getColor, Flex, Icon, Text } from \"@netdata/netdata-ui\"\n\nexport const PanelRowContainer = styled(Flex)`\n cursor: pointer;\n\n &:hover {\n background: ${getColor(\"selected\")};\n }\n\n ${props => props.selected && `background: ${getColor(\"selected\")(props)};`}\n`\n\nconst MenuItem = forwardRef(\n (\n {\n disabled,\n children,\n Wrapper = Text,\n onClick,\n testid,\n icon,\n padding = [2, 3],\n margin = [0],\n round = 0,\n actions,\n selected,\n width = \"100%\",\n },\n ref\n ) => {\n const click = useCallback(() => {\n if (disabled) return\n if (onClick) onClick()\n }, [onClick, disabled])\n\n return (\n <PanelRowContainer\n ref={ref}\n flexWrap={false}\n justifyContent=\"between\"\n alignItems=\"center\"\n padding={padding}\n margin={margin}\n round={round}\n onClick={click}\n data-testid={testid}\n width={width}\n selected={selected}\n disabled={disabled}\n >\n <Flex alignItems=\"center\" gap={3} flex basis=\"\">\n {typeof icon === \"string\" ? (\n <Icon name={icon} disabled={disabled} color=\"text\" height=\"16px\" width=\"16px\" />\n ) : (\n icon\n )}\n <Wrapper opacity={disabled ? \"medium\" : undefined} width=\"150px\">\n {children}\n </Wrapper>\n </Flex>\n {actions}\n </PanelRowContainer>\n )\n }\n)\n\nexport default MenuItem\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, H4, Collapsible } from \"@netdata/netdata-ui\"\n\nexport const DefaultListHeader = styled(H4).attrs({ padding: [0], margin: [0] })`\n cursor: pointer;\n`\n\nconst SectionHandle = ({ toggleOpen, label, testid, Header = DefaultListHeader }) => (\n <Header data-testid={testid} onClick={toggleOpen}>\n {label}\n </Header>\n)\n\nconst ItemsList = ({ isOpen = false, toggleOpen, label, children, testid, Header }) => (\n <Flex column>\n <SectionHandle Header={Header} toggleOpen={toggleOpen} label={label} testid={testid} />\n <Collapsible open={isOpen}>{children}</Collapsible>\n </Flex>\n)\n\nexport default ItemsList\n","import React from \"react\"\nimport { Flex, TextSmall } from \"@netdata/netdata-ui\"\n\nconst PlayOptionsTooltip = () => (\n <Flex\n padding={[1, 2]}\n margin={[1]}\n background={[\"neutral\", \"black\"]}\n round={1}\n justifyContent=\"center\"\n width={{ max: \"320px\" }}\n >\n <TextSmall color=\"bright\">\n Play to refresh and have live content, pause to see historical, or force play to keep\n refreshing even when the tab loses focus at the expense of some system performance.\n </TextSmall>\n </Flex>\n)\n\nexport default PlayOptionsTooltip\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nexport const Divider = styled(Flex).attrs({\n bacgkround: \"disabled\",\n height: \"1px\",\n margin: [2, 6],\n})``\n","import React, { memo, Fragment } from \"react\"\nimport styled from \"styled-components\"\nimport { useToggle } from \"react-use\"\nimport { Flex, Icon, Drop } from \"@netdata/netdata-ui\"\nimport { MenuItem } from \"@/src/components/menus\"\nimport { useDispatch } from \"store/redux-separate-context\"\nimport { resetGlobalPauseAction, setGlobalPauseAction } from \"domains/global/actions\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport PlayOptionsTooltip from \"./playOptionsTooltip\"\n\nconst MenuButton = styled(Flex).attrs({ padding: [1], role: \"button\" })`\n cursor: pointer;\n`\n\nconst Dropdown = styled(Flex).attrs({\n column: true,\n padding: [2],\n background: \"dropdown\",\n round: 1,\n overflow: { vertical: \"auto\" },\n margin: [2, 0, 0],\n width: 40,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\n\nconst PlayOptions = ({ target }) => {\n const dispatch = useDispatch()\n const [isOpen, toggle] = useToggle()\n\n const close = () => toggle(false)\n\n const onPlay = () => {\n dispatch(resetGlobalPauseAction({ forcePlay: false }))\n close()\n }\n\n const onPause = () => {\n dispatch(setGlobalPauseAction())\n close()\n }\n\n const onForcePlay = () => {\n dispatch(resetGlobalPauseAction({ forcePlay: true }))\n close()\n }\n\n return (\n <Fragment>\n {!isOpen ? (\n <Tooltip content={<PlayOptionsTooltip />} align=\"bottom\" plain>\n <MenuButton onClick={toggle} width=\"auto\">\n <Icon name=\"chevron_down\" color=\"text\" width=\"12px\" height=\"12px\" />\n </MenuButton>\n </Tooltip>\n ) : (\n <MenuButton onClick={toggle} width=\"auto\">\n <Icon name=\"chevron_down\" color=\"text\" width=\"12px\" height=\"12px\" />\n </MenuButton>\n )}\n {target.current && isOpen && (\n <Drop\n target={target.current}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n animation\n >\n <Dropdown>\n <MenuItem round={1} icon=\"playOutline\" onClick={onPlay}>\n Play\n </MenuItem>\n <MenuItem round={1} icon=\"pauseOutline\" onClick={onPause}>\n Pause\n </MenuItem>\n <MenuItem round={1} icon=\"forcePlayOutline\" onClick={onForcePlay}>\n Force Play\n </MenuItem>\n </Dropdown>\n </Drop>\n )}\n </Fragment>\n )\n}\n\nconst MemoizedPlayOptions = memo(PlayOptions)\n\nexport default MemoizedPlayOptions\n","import React, { useMemo, useRef } from \"react\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport {\n selectHasWindowFocus,\n selectStopUpdatesWhenFocusIsLost,\n selectGlobalPanAndZoom,\n selectGlobalPause,\n selectGlobalSelection,\n} from \"domains/global/selectors\"\nimport { ReduxDatePickerContainer } from \"components/date-picker\"\nimport Item from \"../item\"\nimport Container from \"./container\"\nimport PlayPausePill from \"./playPausePill\"\nimport PlayOptions from \"./playOptions\"\n\nconst tagging = \"global-view\"\n\nconst GlobalControls = () => {\n const ref = useRef()\n const hasWindowFocus = useSelector(selectHasWindowFocus)\n const stopUpdatesWhenFocusIsLost = useSelector(selectStopUpdatesWhenFocusIsLost)\n const globalPanAndZoom = useSelector(selectGlobalPanAndZoom)\n const hoveredX = useSelector(selectGlobalSelection)\n const globalPause = useSelector(selectGlobalPause)\n\n const isPlaying = useMemo(\n () =>\n Boolean(\n (hasWindowFocus || !stopUpdatesWhenFocusIsLost) &&\n !globalPanAndZoom &&\n !hoveredX &&\n !globalPause\n ),\n [hasWindowFocus, stopUpdatesWhenFocusIsLost, globalPanAndZoom, hoveredX, globalPause]\n )\n\n return (\n <Item hasBorder>\n <Container\n isPlaying={isPlaying}\n padding={[2, 2]}\n round\n height=\"100%\"\n alignItems=\"center\"\n gap={1}\n ref={ref}\n >\n <PlayPausePill isPlaying={isPlaying} isForcePlaying={!stopUpdatesWhenFocusIsLost} />\n <PlayOptions target={ref} />\n <ReduxDatePickerContainer isPlaying={isPlaying} tagging={tagging} />\n </Container>\n </Item>\n )\n}\n\nexport default GlobalControls\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst hollowColors = {\n warning: \"#FFF8E1\",\n error: \"#FFEBEF\",\n}\n\nconst StyledPill = styled(Flex).attrs(({ round = 999, hollow, background }) => ({\n padding: [0.5, 2],\n round,\n border: hollow ? { side: \"all\", color: background, size: \"1px\" } : false,\n}))`\n background: ${({ background, hollow }) => (hollow ? hollowColors[background] : background)};\n cursor: pointer;\n`\n\nexport default StyledPill\n","import React, { forwardRef } from \"react\"\nimport { TextMicro } from \"@netdata/netdata-ui\"\nimport StyledPill from \"./styled\"\n\nconst Pill = forwardRef(({ children, background, color, hollow, ...rest }, ref) => (\n <StyledPill background={background} hollow={hollow} ref={ref} {...rest}>\n <TextMicro color={hollow ? background : color} strong>\n {children}\n </TextMicro>\n </StyledPill>\n))\n\nexport default Pill\n","import React, { useMemo } from \"react\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectActiveAlarms } from \"domains/global/selectors\"\nimport Item from \"./item\"\nimport Pill from \"./pill\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nconst pillProps = {\n \"data-toggle\": \"modal\",\n \"data-target\": \"#alarmsModal\",\n}\n\nconst Alarms = () => {\n const activeAlarms = useSelector(selectActiveAlarms)\n\n const alarms = useMemo(() => (activeAlarms ? Object.values(activeAlarms.alarms) : []), [\n activeAlarms,\n ])\n\n const { critical, warning } = useMemo(\n () =>\n alarms.reduce(\n (acc, { status }) => {\n if (status === \"CRITICAL\") acc.critical = acc.critical + 1\n if (status === \"WARNING\") acc.warning = acc.warning + 1\n return acc\n },\n { critical: 0, warning: 0 }\n ),\n [alarms]\n )\n\n return (\n <Item icon=\"alarm\">\n <Tooltip\n content={\n critical\n ? `${critical} critical alert${critical.length > 1 ? \"s\" : \"\"}`\n : \"No critical alerts\"\n }\n align=\"bottom\"\n plain\n >\n <Pill background=\"error\" hollow {...pillProps}>\n {critical}\n </Pill>\n </Tooltip>\n <Tooltip\n content={\n warning ? `${warning} warning alert${warning.length > 1 ? \"s\" : \"\"}` : \"No warning alerts\"\n }\n align=\"bottom\"\n plain\n >\n <Pill background=\"warning\" hollow {...pillProps}>\n {warning}\n </Pill>\n </Tooltip>\n </Item>\n )\n}\n\nexport default Alarms\n","import React from \"react\"\nimport { Button, News as AgentNews } from \"@netdata/netdata-ui\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nconst News = () => {\n return (\n <AgentNews app=\"agent\">\n {({ toggle, upToDate }) => (\n <Tooltip content=\"News\" align=\"bottom\" plain>\n <Button\n data-testid=\"header-news-button\"\n themeType=\"dark\"\n name=\"news\"\n icon=\"insights\"\n flavour=\"borderless\"\n neutral={upToDate}\n warning={!upToDate}\n onClick={toggle}\n />\n </Tooltip>\n )}\n </AgentNews>\n )\n}\n\nexport default News\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Dropdown = styled(Flex).attrs({\n column: true,\n padding: [2],\n background: \"dropdown\",\n round: 1,\n overflow: { vertical: \"auto\" },\n margin: [2, 0, 0],\n width: 80,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\n\nexport default Dropdown\n","import styled from \"styled-components\"\nimport { TextInput } from \"@netdata/netdata-ui\"\n\nconst SearchInput = styled(TextInput)`\n & input {\n background: transparent;\n }\n\n & > label {\n margin-bottom: 0;\n }\n`\nexport default SearchInput\n","import React, { forwardRef } from \"react\"\nimport SearchInput from \"./searchInput\"\n\nconst Search = forwardRef(({ value, onChange }, ref) => (\n <SearchInput inputRef={ref} value={value} onChange={onChange} placeholder=\"Search\" metaShrinked />\n))\n\nexport default Search\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Container = styled(Flex).attrs({\n column: true,\n padding: [2, 0, 0],\n overflow: { vertical: \"auto\" },\n height: { max: \"320px\" },\n})``\n\nexport default Container\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Wrapper = styled(Flex).attrs({\n justifyContent: \"between\",\n alignItems: \"center\",\n width: \"100%\",\n gap: 2,\n})``\n\nexport default Wrapper\n","import React, { useCallback } from \"react\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport { MenuItem } from \"@/src/components/menus\"\nimport Wrapper from \"./wrapper\"\n\nconst OffsetItem = ({ name, offset, utc, onSelect }) => {\n const onClick = useCallback(() => onSelect(utc), [utc, onSelect])\n\n return (\n <MenuItem round={1} onClick={onClick} Wrapper={Wrapper}>\n <Text color=\"text\">{name}</Text>\n <Text color=\"textLite\" whiteSpace=\"nowrap\">\n UTC {offset}\n </Text>\n </MenuItem>\n )\n}\n\nexport default OffsetItem\n","export const timezones = [\n {\n value: \"Dateline Standard Time\",\n abbr: \"DST\",\n text: \"International Date Line West\",\n utc: [\"Etc/GMT+12\"],\n },\n {\n value: \"UTC-11\",\n abbr: \"U\",\n text: \"Coordinated Universal Time-11\",\n utc: [\"Etc/GMT+11\", \"Pacific/Midway\", \"Pacific/Niue\", \"Pacific/Pago_Pago\"],\n },\n {\n value: \"Hawaiian Standard Time\",\n abbr: \"HST\",\n text: \"Hawaii\",\n utc: [\n \"Etc/GMT+10\",\n \"Pacific/Honolulu\",\n \"Pacific/Johnston\",\n \"Pacific/Rarotonga\",\n \"Pacific/Tahiti\",\n ],\n },\n {\n value: \"Alaskan Standard Time\",\n abbr: \"AKDT\",\n text: \"Alaska\",\n utc: [\n \"America/Anchorage\",\n \"America/Juneau\",\n \"America/Nome\",\n \"America/Sitka\",\n \"America/Yakutat\",\n ],\n },\n {\n value: \"Pacific Standard Time (Mexico)\",\n abbr: \"PDT\",\n text: \"Baja California\",\n utc: [\"America/Santa_Isabel\"],\n },\n {\n value: \"Pacific Standard Time\",\n abbr: \"PST\",\n text: \"Pacific Time (US & Canada)\",\n utc: [\n \"America/Dawson\",\n \"America/Los_Angeles\",\n \"America/Tijuana\",\n \"America/Vancouver\",\n \"America/Whitehorse\",\n \"PST8PDT\",\n ],\n },\n {\n value: \"US Mountain Standard Time\",\n abbr: \"UMST\",\n text: \"Arizona\",\n utc: [\n \"America/Creston\",\n \"America/Dawson_Creek\",\n \"America/Hermosillo\",\n \"America/Phoenix\",\n \"Etc/GMT+7\",\n ],\n },\n {\n value: \"Mountain Standard Time (Mexico)\",\n abbr: \"MDT\",\n text: \"Chihuahua, La Paz, Mazatlan\",\n utc: [\"America/Chihuahua\", \"America/Mazatlan\"],\n },\n {\n value: \"Mountain Standard Time\",\n abbr: \"MDT\",\n text: \"Mountain Time (US & Canada)\",\n utc: [\n \"America/Boise\",\n \"America/Cambridge_Bay\",\n \"America/Denver\",\n \"America/Edmonton\",\n \"America/Inuvik\",\n \"America/Ojinaga\",\n \"America/Yellowknife\",\n \"MST7MDT\",\n ],\n },\n {\n value: \"Central America Standard Time\",\n abbr: \"CAST\",\n text: \"Central America\",\n utc: [\n \"America/Belize\",\n \"America/Costa_Rica\",\n \"America/El_Salvador\",\n \"America/Guatemala\",\n \"America/Managua\",\n \"America/Tegucigalpa\",\n \"Etc/GMT+6\",\n \"Pacific/Galapagos\",\n ],\n },\n {\n value: \"Central Standard Time\",\n abbr: \"CDT\",\n text: \"Central Time (US & Canada)\",\n utc: [\n \"America/Chicago\",\n \"America/Indiana/Knox\",\n \"America/Indiana/Tell_City\",\n \"America/Matamoros\",\n \"America/Menominee\",\n \"America/North_Dakota/Beulah\",\n \"America/North_Dakota/Center\",\n \"America/North_Dakota/New_Salem\",\n \"America/Rainy_River\",\n \"America/Rankin_Inlet\",\n \"America/Resolute\",\n \"America/Winnipeg\",\n \"CST6CDT\",\n ],\n },\n {\n value: \"Central Standard Time (Mexico)\",\n abbr: \"CDT\",\n text: \"Guadalajara, Mexico City, Monterrey\",\n utc: [\n \"America/Bahia_Banderas\",\n \"America/Cancun\",\n \"America/Merida\",\n \"America/Mexico_City\",\n \"America/Monterrey\",\n ],\n },\n {\n value: \"Canada Central Standard Time\",\n abbr: \"CCST\",\n text: \"Saskatchewan\",\n utc: [\"America/Regina\", \"America/Swift_Current\"],\n },\n {\n value: \"SA Pacific Standard Time\",\n abbr: \"SPST\",\n text: \"Bogota, Lima, Quito\",\n utc: [\n \"America/Bogota\",\n \"America/Cayman\",\n \"America/Coral_Harbour\",\n \"America/Eirunepe\",\n \"America/Guayaquil\",\n \"America/Jamaica\",\n \"America/Lima\",\n \"America/Panama\",\n \"America/Rio_Branco\",\n \"Etc/GMT+5\",\n ],\n },\n {\n value: \"Eastern Standard Time\",\n abbr: \"EDT\",\n text: \"Eastern Time (US & Canada)\",\n utc: [\n \"America/Detroit\",\n \"America/Havana\",\n \"America/Indiana/Petersburg\",\n \"America/Indiana/Vincennes\",\n \"America/Indiana/Winamac\",\n \"America/Iqaluit\",\n \"America/Kentucky/Monticello\",\n \"America/Louisville\",\n \"America/Montreal\",\n \"America/Nassau\",\n \"America/New_York\",\n \"America/Nipigon\",\n \"America/Pangnirtung\",\n \"America/Port-au-Prince\",\n \"America/Thunder_Bay\",\n \"America/Toronto\",\n \"EST5EDT\",\n ],\n },\n {\n value: \"US Eastern Standard Time\",\n abbr: \"UEDT\",\n text: \"Indiana (East)\",\n utc: [\"America/Indiana/Marengo\", \"America/Indiana/Vevay\", \"America/Indianapolis\"],\n },\n {\n value: \"Venezuela Standard Time\",\n abbr: \"VST\",\n text: \"Caracas\",\n utc: [\"America/Caracas\"],\n },\n {\n value: \"Paraguay Standard Time\",\n abbr: \"PYT\",\n text: \"Asuncion\",\n utc: [\"America/Asuncion\"],\n },\n {\n value: \"Atlantic Standard Time\",\n abbr: \"ADT\",\n text: \"Atlantic Time (Canada)\",\n utc: [\n \"America/Glace_Bay\",\n \"America/Goose_Bay\",\n \"America/Halifax\",\n \"America/Moncton\",\n \"America/Thule\",\n \"Atlantic/Bermuda\",\n ],\n },\n {\n value: \"Central Brazilian Standard Time\",\n abbr: \"CBST\",\n text: \"Cuiaba\",\n utc: [\"America/Campo_Grande\", \"America/Cuiaba\"],\n },\n {\n value: \"SA Western Standard Time\",\n abbr: \"SWST\",\n text: \"Georgetown, La Paz, Manaus, San Juan\",\n utc: [\n \"America/Anguilla\",\n \"America/Antigua\",\n \"America/Aruba\",\n \"America/Barbados\",\n \"America/Blanc-Sablon\",\n \"America/Boa_Vista\",\n \"America/Curacao\",\n \"America/Dominica\",\n \"America/Grand_Turk\",\n \"America/Grenada\",\n \"America/Guadeloupe\",\n \"America/Guyana\",\n \"America/Kralendijk\",\n \"America/La_Paz\",\n \"America/Lower_Princes\",\n \"America/Manaus\",\n \"America/Marigot\",\n \"America/Martinique\",\n \"America/Montserrat\",\n \"America/Port_of_Spain\",\n \"America/Porto_Velho\",\n \"America/Puerto_Rico\",\n \"America/Santo_Domingo\",\n \"America/St_Barthelemy\",\n \"America/St_Kitts\",\n \"America/St_Lucia\",\n \"America/St_Thomas\",\n \"America/St_Vincent\",\n \"America/Tortola\",\n \"Etc/GMT+4\",\n ],\n },\n {\n value: \"Pacific SA Standard Time\",\n abbr: \"PSST\",\n text: \"Santiago\",\n utc: [\"America/Santiago\", \"Antarctica/Palmer\"],\n },\n {\n value: \"Newfoundland Standard Time\",\n abbr: \"NDT\",\n text: \"Newfoundland\",\n utc: [\"America/St_Johns\"],\n },\n {\n value: \"E. South America Standard Time\",\n abbr: \"ESAST\",\n text: \"Brasilia\",\n utc: [\"America/Sao_Paulo\"],\n },\n {\n value: \"Argentina Standard Time\",\n abbr: \"AST\",\n text: \"Buenos Aires\",\n utc: [\n \"America/Argentina/La_Rioja\",\n \"America/Argentina/Rio_Gallegos\",\n \"America/Argentina/Salta\",\n \"America/Argentina/San_Juan\",\n \"America/Argentina/San_Luis\",\n \"America/Argentina/Tucuman\",\n \"America/Argentina/Ushuaia\",\n \"America/Buenos_Aires\",\n \"America/Catamarca\",\n \"America/Cordoba\",\n \"America/Jujuy\",\n \"America/Mendoza\",\n ],\n },\n {\n value: \"SA Eastern Standard Time\",\n abbr: \"SEST\",\n text: \"Cayenne, Fortaleza\",\n utc: [\n \"America/Araguaina\",\n \"America/Belem\",\n \"America/Cayenne\",\n \"America/Fortaleza\",\n \"America/Maceio\",\n \"America/Paramaribo\",\n \"America/Recife\",\n \"America/Santarem\",\n \"Antarctica/Rothera\",\n \"Atlantic/Stanley\",\n \"Etc/GMT+3\",\n ],\n },\n {\n value: \"Greenland Standard Time\",\n abbr: \"GDT\",\n text: \"Greenland\",\n utc: [\"America/Godthab\"],\n },\n {\n value: \"Montevideo Standard Time\",\n abbr: \"MST\",\n text: \"Montevideo\",\n utc: [\"America/Montevideo\"],\n },\n {\n value: \"Bahia Standard Time\",\n abbr: \"BST\",\n text: \"Salvador\",\n utc: [\"America/Bahia\"],\n },\n {\n value: \"UTC-02\",\n abbr: \"U\",\n text: \"Coordinated Universal Time-02\",\n utc: [\"America/Noronha\", \"Atlantic/South_Georgia\", \"Etc/GMT+2\"],\n },\n {\n value: \"Mid-Atlantic Standard Time\",\n abbr: \"MDT\",\n text: \"Mid-Atlantic - Old\",\n utc: [],\n },\n {\n value: \"Azores Standard Time\",\n abbr: \"ADT\",\n text: \"Azores\",\n utc: [\"America/Scoresbysund\", \"Atlantic/Azores\"],\n },\n {\n value: \"Cape Verde Standard Time\",\n abbr: \"CVST\",\n text: \"Cape Verde Is.\",\n utc: [\"Atlantic/Cape_Verde\", \"Etc/GMT+1\"],\n },\n {\n value: \"Morocco Standard Time\",\n abbr: \"MDT\",\n text: \"Casablanca\",\n utc: [\"Africa/Casablanca\", \"Africa/El_Aaiun\"],\n },\n {\n value: \"UTC\",\n abbr: \"UTC\",\n text: \"Coordinated Universal Time\",\n utc: [\"America/Danmarkshavn\", \"Etc/GMT\"],\n },\n {\n value: \"GMT Standard Time\",\n abbr: \"GMT\",\n text: \"Edinburgh, London\",\n utc: [\"Europe/Isle_of_Man\", \"Europe/Guernsey\", \"Europe/Jersey\", \"Europe/London\"],\n },\n {\n value: \"GMT Standard Time\",\n abbr: \"GDT\",\n text: \"Dublin, Lisbon\",\n utc: [\n \"Atlantic/Canary\",\n \"Atlantic/Faeroe\",\n \"Atlantic/Madeira\",\n \"Europe/Dublin\",\n \"Europe/Lisbon\",\n ],\n },\n {\n value: \"Greenwich Standard Time\",\n abbr: \"GST\",\n text: \"Monrovia, Reykjavik\",\n utc: [\n \"Africa/Abidjan\",\n \"Africa/Accra\",\n \"Africa/Bamako\",\n \"Africa/Banjul\",\n \"Africa/Bissau\",\n \"Africa/Conakry\",\n \"Africa/Dakar\",\n \"Africa/Freetown\",\n \"Africa/Lome\",\n \"Africa/Monrovia\",\n \"Africa/Nouakchott\",\n \"Africa/Ouagadougou\",\n \"Africa/Sao_Tome\",\n \"Atlantic/Reykjavik\",\n \"Atlantic/St_Helena\",\n ],\n },\n {\n value: \"W. Europe Standard Time\",\n abbr: \"WEDT\",\n text: \"Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna\",\n utc: [\n \"Arctic/Longyearbyen\",\n \"Europe/Amsterdam\",\n \"Europe/Andorra\",\n \"Europe/Berlin\",\n \"Europe/Busingen\",\n \"Europe/Gibraltar\",\n \"Europe/Luxembourg\",\n \"Europe/Malta\",\n \"Europe/Monaco\",\n \"Europe/Oslo\",\n \"Europe/Rome\",\n \"Europe/San_Marino\",\n \"Europe/Stockholm\",\n \"Europe/Vaduz\",\n \"Europe/Vatican\",\n \"Europe/Vienna\",\n \"Europe/Zurich\",\n ],\n },\n {\n value: \"Central Europe Standard Time\",\n abbr: \"CEDT\",\n text: \"Belgrade, Bratislava, Budapest, Ljubljana, Prague\",\n utc: [\n \"Europe/Belgrade\",\n \"Europe/Bratislava\",\n \"Europe/Budapest\",\n \"Europe/Ljubljana\",\n \"Europe/Podgorica\",\n \"Europe/Prague\",\n \"Europe/Tirane\",\n ],\n },\n {\n value: \"Romance Standard Time\",\n abbr: \"RDT\",\n text: \"Brussels, Copenhagen, Madrid, Paris\",\n utc: [\"Africa/Ceuta\", \"Europe/Brussels\", \"Europe/Copenhagen\", \"Europe/Madrid\", \"Europe/Paris\"],\n },\n {\n value: \"Central European Standard Time\",\n abbr: \"CEDT\",\n text: \"Sarajevo, Skopje, Warsaw, Zagreb\",\n utc: [\"Europe/Sarajevo\", \"Europe/Skopje\", \"Europe/Warsaw\", \"Europe/Zagreb\"],\n },\n {\n value: \"W. Central Africa Standard Time\",\n abbr: \"WCAST\",\n text: \"West Central Africa\",\n utc: [\n \"Africa/Algiers\",\n \"Africa/Bangui\",\n \"Africa/Brazzaville\",\n \"Africa/Douala\",\n \"Africa/Kinshasa\",\n \"Africa/Lagos\",\n \"Africa/Libreville\",\n \"Africa/Luanda\",\n \"Africa/Malabo\",\n \"Africa/Ndjamena\",\n \"Africa/Niamey\",\n \"Africa/Porto-Novo\",\n \"Africa/Tunis\",\n \"Etc/GMT-1\",\n ],\n },\n {\n value: \"Namibia Standard Time\",\n abbr: \"NST\",\n text: \"Windhoek\",\n utc: [\"Africa/Windhoek\"],\n },\n {\n value: \"GTB Standard Time\",\n abbr: \"GDT\",\n text: \"Athens, Bucharest\",\n utc: [\"Asia/Nicosia\", \"Europe/Athens\", \"Europe/Bucharest\", \"Europe/Chisinau\"],\n },\n {\n value: \"Middle East Standard Time\",\n abbr: \"MEDT\",\n text: \"Beirut\",\n utc: [\"Asia/Beirut\"],\n },\n {\n value: \"Egypt Standard Time\",\n abbr: \"EST\",\n text: \"Cairo\",\n utc: [\"Africa/Cairo\"],\n },\n {\n value: \"Syria Standard Time\",\n abbr: \"SDT\",\n text: \"Damascus\",\n utc: [\"Asia/Damascus\"],\n },\n {\n value: \"E. Europe Standard Time\",\n abbr: \"EEDT\",\n text: \"E. Europe\",\n utc: [\n \"Asia/Nicosia\",\n \"Europe/Athens\",\n \"Europe/Bucharest\",\n \"Europe/Chisinau\",\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Nicosia\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\",\n ],\n },\n {\n value: \"South Africa Standard Time\",\n abbr: \"SAST\",\n text: \"Harare, Pretoria\",\n utc: [\n \"Africa/Blantyre\",\n \"Africa/Bujumbura\",\n \"Africa/Gaborone\",\n \"Africa/Harare\",\n \"Africa/Johannesburg\",\n \"Africa/Kigali\",\n \"Africa/Lubumbashi\",\n \"Africa/Lusaka\",\n \"Africa/Maputo\",\n \"Africa/Maseru\",\n \"Africa/Mbabane\",\n \"Etc/GMT-2\",\n ],\n },\n {\n value: \"FLE Standard Time\",\n abbr: \"FDT\",\n text: \"Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius\",\n utc: [\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\",\n ],\n },\n {\n value: \"Turkey Standard Time\",\n abbr: \"TDT\",\n text: \"Istanbul\",\n utc: [\"Europe/Istanbul\"],\n },\n {\n value: \"Israel Standard Time\",\n abbr: \"JDT\",\n text: \"Jerusalem\",\n utc: [\"Asia/Jerusalem\"],\n },\n {\n value: \"Libya Standard Time\",\n abbr: \"LST\",\n text: \"Tripoli\",\n utc: [\"Africa/Tripoli\"],\n },\n {\n value: \"Jordan Standard Time\",\n abbr: \"JST\",\n text: \"Amman\",\n utc: [\"Asia/Amman\"],\n },\n {\n value: \"Arabic Standard Time\",\n abbr: \"AST\",\n text: \"Baghdad\",\n utc: [\"Asia/Baghdad\"],\n },\n {\n value: \"Kaliningrad Standard Time\",\n abbr: \"KST\",\n text: \"Kaliningrad\",\n utc: [\"Europe/Kaliningrad\"],\n },\n {\n value: \"Arab Standard Time\",\n abbr: \"AST\",\n text: \"Kuwait, Riyadh\",\n utc: [\"Asia/Aden\", \"Asia/Bahrain\", \"Asia/Kuwait\", \"Asia/Qatar\", \"Asia/Riyadh\"],\n },\n {\n value: \"E. Africa Standard Time\",\n abbr: \"EAST\",\n text: \"Nairobi\",\n utc: [\n \"Africa/Addis_Ababa\",\n \"Africa/Asmera\",\n \"Africa/Dar_es_Salaam\",\n \"Africa/Djibouti\",\n \"Africa/Juba\",\n \"Africa/Kampala\",\n \"Africa/Khartoum\",\n \"Africa/Mogadishu\",\n \"Africa/Nairobi\",\n \"Antarctica/Syowa\",\n \"Etc/GMT-3\",\n \"Indian/Antananarivo\",\n \"Indian/Comoro\",\n \"Indian/Mayotte\",\n ],\n },\n {\n value: \"Moscow Standard Time\",\n abbr: \"MSK\",\n text: \"Moscow, St. Petersburg, Volgograd, Minsk\",\n utc: [\"Europe/Kirov\", \"Europe/Moscow\", \"Europe/Simferopol\", \"Europe/Volgograd\", \"Europe/Minsk\"],\n },\n {\n value: \"Samara Time\",\n abbr: \"SAMT\",\n text: \"Samara, Ulyanovsk, Saratov\",\n utc: [\"Europe/Astrakhan\", \"Europe/Samara\", \"Europe/Ulyanovsk\"],\n },\n {\n value: \"Iran Standard Time\",\n abbr: \"IDT\",\n text: \"Tehran\",\n utc: [\"Asia/Tehran\"],\n },\n {\n value: \"Arabian Standard Time\",\n abbr: \"AST\",\n text: \"Abu Dhabi, Muscat\",\n utc: [\"Asia/Dubai\", \"Asia/Muscat\", \"Etc/GMT-4\"],\n },\n {\n value: \"Azerbaijan Standard Time\",\n abbr: \"ADT\",\n text: \"Baku\",\n utc: [\"Asia/Baku\"],\n },\n {\n value: \"Mauritius Standard Time\",\n abbr: \"MST\",\n text: \"Port Louis\",\n utc: [\"Indian/Mahe\", \"Indian/Mauritius\", \"Indian/Reunion\"],\n },\n {\n value: \"Georgian Standard Time\",\n abbr: \"GET\",\n text: \"Tbilisi\",\n utc: [\"Asia/Tbilisi\"],\n },\n {\n value: \"Caucasus Standard Time\",\n abbr: \"CST\",\n text: \"Yerevan\",\n utc: [\"Asia/Yerevan\"],\n },\n {\n value: \"Afghanistan Standard Time\",\n abbr: \"AST\",\n text: \"Kabul\",\n utc: [\"Asia/Kabul\"],\n },\n {\n value: \"West Asia Standard Time\",\n abbr: \"WAST\",\n text: \"Ashgabat, Tashkent\",\n utc: [\n \"Antarctica/Mawson\",\n \"Asia/Aqtau\",\n \"Asia/Aqtobe\",\n \"Asia/Ashgabat\",\n \"Asia/Dushanbe\",\n \"Asia/Oral\",\n \"Asia/Samarkand\",\n \"Asia/Tashkent\",\n \"Etc/GMT-5\",\n \"Indian/Kerguelen\",\n \"Indian/Maldives\",\n ],\n },\n {\n value: \"Yekaterinburg Time\",\n abbr: \"YEKT\",\n text: \"Yekaterinburg\",\n utc: [\"Asia/Yekaterinburg\"],\n },\n {\n value: \"Pakistan Standard Time\",\n abbr: \"PKT\",\n text: \"Islamabad, Karachi\",\n utc: [\"Asia/Karachi\"],\n },\n {\n value: \"India Standard Time\",\n abbr: \"IST\",\n text: \"Chennai, Kolkata, Mumbai, New Delhi\",\n utc: [\"Asia/Kolkata\"],\n },\n {\n value: \"Sri Lanka Standard Time\",\n abbr: \"SLST\",\n text: \"Sri Jayawardenepura\",\n utc: [\"Asia/Colombo\"],\n },\n {\n value: \"Nepal Standard Time\",\n abbr: \"NST\",\n text: \"Kathmandu\",\n utc: [\"Asia/Kathmandu\"],\n },\n {\n value: \"Central Asia Standard Time\",\n abbr: \"CAST\",\n text: \"Nur-Sultan (Astana)\",\n utc: [\n \"Antarctica/Vostok\",\n \"Asia/Almaty\",\n \"Asia/Bishkek\",\n \"Asia/Qyzylorda\",\n \"Asia/Urumqi\",\n \"Etc/GMT-6\",\n \"Indian/Chagos\",\n ],\n },\n {\n value: \"Bangladesh Standard Time\",\n abbr: \"BST\",\n text: \"Dhaka\",\n utc: [\"Asia/Dhaka\", \"Asia/Thimphu\"],\n },\n {\n value: \"Myanmar Standard Time\",\n abbr: \"MST\",\n text: \"Yangon (Rangoon)\",\n utc: [\"Asia/Rangoon\", \"Indian/Cocos\"],\n },\n {\n value: \"SE Asia Standard Time\",\n abbr: \"SAST\",\n text: \"Bangkok, Hanoi, Jakarta\",\n utc: [\n \"Antarctica/Davis\",\n \"Asia/Bangkok\",\n \"Asia/Hovd\",\n \"Asia/Jakarta\",\n \"Asia/Phnom_Penh\",\n \"Asia/Pontianak\",\n \"Asia/Saigon\",\n \"Asia/Vientiane\",\n \"Etc/GMT-7\",\n \"Indian/Christmas\",\n ],\n },\n {\n value: \"N. Central Asia Standard Time\",\n abbr: \"NCAST\",\n text: \"Novosibirsk\",\n utc: [\"Asia/Novokuznetsk\", \"Asia/Novosibirsk\", \"Asia/Omsk\"],\n },\n {\n value: \"China Standard Time\",\n abbr: \"CST\",\n text: \"Beijing, Chongqing, Hong Kong, Urumqi\",\n utc: [\"Asia/Hong_Kong\", \"Asia/Macau\", \"Asia/Shanghai\"],\n },\n {\n value: \"North Asia Standard Time\",\n abbr: \"NAST\",\n text: \"Krasnoyarsk\",\n utc: [\"Asia/Krasnoyarsk\"],\n },\n {\n value: \"Singapore Standard Time\",\n abbr: \"MPST\",\n text: \"Kuala Lumpur, Singapore\",\n utc: [\n \"Asia/Brunei\",\n \"Asia/Kuala_Lumpur\",\n \"Asia/Kuching\",\n \"Asia/Makassar\",\n \"Asia/Manila\",\n \"Asia/Singapore\",\n \"Etc/GMT-8\",\n ],\n },\n {\n value: \"W. Australia Standard Time\",\n abbr: \"WAST\",\n text: \"Perth\",\n utc: [\"Antarctica/Casey\", \"Australia/Perth\"],\n },\n {\n value: \"Taipei Standard Time\",\n abbr: \"TST\",\n text: \"Taipei\",\n utc: [\"Asia/Taipei\"],\n },\n {\n value: \"Ulaanbaatar Standard Time\",\n abbr: \"UST\",\n text: \"Ulaanbaatar\",\n utc: [\"Asia/Choibalsan\", \"Asia/Ulaanbaatar\"],\n },\n {\n value: \"North Asia East Standard Time\",\n abbr: \"NAEST\",\n text: \"Irkutsk\",\n utc: [\"Asia/Irkutsk\"],\n },\n {\n value: \"Japan Standard Time\",\n abbr: \"JST\",\n text: \"Osaka, Sapporo, Tokyo\",\n utc: [\"Asia/Dili\", \"Asia/Jayapura\", \"Asia/Tokyo\", \"Etc/GMT-9\", \"Pacific/Palau\"],\n },\n {\n value: \"Korea Standard Time\",\n abbr: \"KST\",\n text: \"Seoul\",\n utc: [\"Asia/Pyongyang\", \"Asia/Seoul\"],\n },\n {\n value: \"Cen. Australia Standard Time\",\n abbr: \"CAST\",\n text: \"Adelaide\",\n utc: [\"Australia/Adelaide\", \"Australia/Broken_Hill\"],\n },\n {\n value: \"AUS Central Standard Time\",\n abbr: \"ACST\",\n text: \"Darwin\",\n utc: [\"Australia/Darwin\"],\n },\n {\n value: \"E. Australia Standard Time\",\n abbr: \"EAST\",\n text: \"Brisbane\",\n utc: [\"Australia/Brisbane\", \"Australia/Lindeman\"],\n },\n {\n value: \"AUS Eastern Standard Time\",\n abbr: \"AEST\",\n text: \"Canberra, Melbourne, Sydney\",\n utc: [\"Australia/Melbourne\", \"Australia/Sydney\"],\n },\n {\n value: \"West Pacific Standard Time\",\n abbr: \"WPST\",\n text: \"Guam, Port Moresby\",\n utc: [\n \"Antarctica/DumontDUrville\",\n \"Etc/GMT-10\",\n \"Pacific/Guam\",\n \"Pacific/Port_Moresby\",\n \"Pacific/Saipan\",\n \"Pacific/Truk\",\n ],\n },\n {\n value: \"Tasmania Standard Time\",\n abbr: \"TST\",\n text: \"Hobart\",\n utc: [\"Australia/Currie\", \"Australia/Hobart\"],\n },\n {\n value: \"Yakutsk Standard Time\",\n abbr: \"YST\",\n text: \"Yakutsk\",\n utc: [\"Asia/Chita\", \"Asia/Khandyga\", \"Asia/Yakutsk\"],\n },\n {\n value: \"Central Pacific Standard Time\",\n abbr: \"CPST\",\n text: \"Solomon Is., New Caledonia\",\n utc: [\n \"Antarctica/Macquarie\",\n \"Etc/GMT-11\",\n \"Pacific/Efate\",\n \"Pacific/Guadalcanal\",\n \"Pacific/Kosrae\",\n \"Pacific/Noumea\",\n \"Pacific/Ponape\",\n ],\n },\n {\n value: \"Vladivostok Standard Time\",\n abbr: \"VST\",\n text: \"Vladivostok\",\n utc: [\"Asia/Sakhalin\", \"Asia/Ust-Nera\", \"Asia/Vladivostok\"],\n },\n {\n value: \"New Zealand Standard Time\",\n abbr: \"NZST\",\n text: \"Auckland, Wellington\",\n utc: [\"Antarctica/McMurdo\", \"Pacific/Auckland\"],\n },\n {\n value: \"UTC+12\",\n abbr: \"U\",\n text: \"Coordinated Universal Time+12\",\n utc: [\n \"Etc/GMT-12\",\n \"Pacific/Funafuti\",\n \"Pacific/Kwajalein\",\n \"Pacific/Majuro\",\n \"Pacific/Nauru\",\n \"Pacific/Tarawa\",\n \"Pacific/Wake\",\n \"Pacific/Wallis\",\n ],\n },\n {\n value: \"Fiji Standard Time\",\n abbr: \"FST\",\n text: \"Fiji\",\n utc: [\"Pacific/Fiji\"],\n },\n {\n value: \"Magadan Standard Time\",\n abbr: \"MST\",\n text: \"Magadan\",\n utc: [\"Asia/Anadyr\", \"Asia/Kamchatka\", \"Asia/Magadan\", \"Asia/Srednekolymsk\"],\n },\n {\n value: \"Kamchatka Standard Time\",\n abbr: \"KDT\",\n text: \"Petropavlovsk-Kamchatsky - Old\",\n utc: [\"Asia/Kamchatka\"],\n },\n {\n value: \"Tonga Standard Time\",\n abbr: \"TST\",\n text: \"Nuku'alofa\",\n utc: [\"Etc/GMT-13\", \"Pacific/Enderbury\", \"Pacific/Fakaofo\", \"Pacific/Tongatapu\"],\n },\n {\n value: \"Samoa Standard Time\",\n abbr: \"SST\",\n text: \"Samoa\",\n utc: [\"Pacific/Apia\"],\n },\n]\n","import { timezones } from \"./timezones\"\n\nconst digitizeOffset = parsedOffset => {\n if (!parsedOffset) return \"+0\"\n const splitOffset = parsedOffset.split(\":\")\n return splitOffset.length > 1\n ? `${splitOffset[0]}${(splitOffset[1] / 60).toString().substr(1)}`\n : splitOffset[0]\n}\n\nconst normalizeOffset = parsedOffset => (parsedOffset ? parsedOffset.replace(\"−\", \"-\") : \"\")\n\nconst now = new Date()\nexport const timezoneList = () => {\n const memoized = {}\n return timezones.reduce((acc, timezone) => {\n const { utc } = timezone\n\n try {\n // We use 'fr' locale because it is the only one that returns back the UTC offset (dd/mm/yyyy, UTC-x) \n // so we can parse it later and digitize it.\n const dateString = new Intl.DateTimeFormat(\"fr\", {\n timeZone: utc[0],\n timeZoneName: \"short\",\n }).format(now)\n\n const [parsedOffset] = dateString.match(/[−+].+/) || []\n const normalizedOffset = normalizeOffset(parsedOffset)\n\n if (memoized[normalizedOffset])\n return acc.concat({ ...timezone, offset: memoized[normalizedOffset] })\n\n const digitizedOffset = digitizeOffset(normalizedOffset)\n\n memoized[normalizedOffset] = digitizedOffset\n return acc.concat({ ...timezone, offset: digitizedOffset })\n } catch (e) {\n return acc\n }\n }, [])\n}\n\nexport const timezonesById = timezones =>\n timezones.reduce((acc, { utc, ...timezone }) => {\n utc.forEach(item => (acc[item] = { ...timezone, utc: item }))\n return acc\n }, {})\n\nexport const getDefaultTimezone = () => {\n const dateFormat = new Intl.DateTimeFormat(\"default\", {})\n const usedOptions = dateFormat.resolvedOptions()\n return usedOptions\n}\n","import React, { useRef, useState, useEffect, useMemo, useCallback } from \"react\"\nimport { useToggle } from \"react-use\"\nimport { Drop, Flex, Text, Icon } from \"@netdata/netdata-ui\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { setOptionAction } from \"@/src/domains/global/actions\"\nimport { selectTimezoneSetting } from \"domains/global/selectors\"\nimport { MenuItem } from \"@/src/components/menus\"\nimport Item from \"../item\"\nimport Dropdown from \"./dropdown\"\nimport Search from \"./search\"\nimport Container from \"./container\"\nimport Wrapper from \"./wrapper\"\nimport OffsetItem from \"./offsetItem\"\nimport { getDefaultTimezone, timezoneList, timezonesById } from \"./utils\"\nimport { getHashParams } from \"utils/hash-utils\"\n\nconst timezones = timezoneList().sort((a, b) => a.offset - b.offset)\nconst byId = timezonesById(timezones)\n\nconst getTimezone = (selectedTimezone, timezoneHash) => {\n const timezone = timezoneHash\n ? timezoneHash\n : selectedTimezone === \"default\"\n ? getDefaultTimezone().timeZone\n : selectedTimezone\n\n return byId[timezone in byId ? timezone : getDefaultTimezone().timeZone] || {}\n}\n\nconst Timezone = () => {\n const [value, setValue] = useState(\"\")\n const [isOpen, toggle] = useToggle()\n\n const ref = useRef()\n const inputRef = useRef()\n\n const { updateUtcParam } = window.urlOptions\n\n useEffect(() => {\n if (!inputRef.current || !isOpen) return\n inputRef.current.focus()\n }, [isOpen])\n\n const dispatch = useDispatch()\n const selectedTimezone = useSelector(selectTimezoneSetting)\n\n const selectedOffset = useMemo(() => {\n const { utc: timezoneHash = \"\" } = getHashParams()\n const { offset = \"\", utc = \"\" } = getTimezone(selectedTimezone, timezoneHash)\n\n if (timezoneHash !== utc) updateUtcParam(utc)\n if (selectedTimezone !== utc) dispatch(setOptionAction({ key: \"timezone\", value: utc }))\n\n dispatch(setOptionAction({ key: \"utcOffset\", value: parseFloat(offset) }))\n\n return offset\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedTimezone])\n\n const zones = useMemo(() => {\n if (!value) return timezones\n return timezones.filter(\n ({ text, offset }) =>\n text.toUpperCase().includes(value.toUpperCase()) || offset.includes(value)\n )\n }, [value])\n\n const close = () => {\n toggle(false)\n setValue(\"\")\n }\n\n const onSelect = useCallback(utc => {\n updateUtcParam(utc)\n dispatch(setOptionAction({ key: \"timezone\", value: utc }))\n close()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const onChange = useCallback(e => setValue(e.target.value), [])\n\n return (\n <Item hasBorder>\n <MenuItem round={1} onClick={toggle} ref={ref} Wrapper={Wrapper}>\n <Flex gap={1}>\n <Text color=\"textLite\" whiteSpace=\"nowrap\">\n UTC {selectedOffset}\n </Text>\n </Flex>\n <Icon name=\"chevron_down\" color=\"text\" width=\"12px\" height=\"12px\" />\n </MenuItem>\n {ref.current && isOpen && (\n <Drop\n target={ref.current}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n animation\n >\n <Dropdown>\n <Search value={value} onChange={onChange} ref={inputRef} />\n <Container>\n {zones.map(({ text, offset, utc }) => (\n <OffsetItem\n key={text}\n name={text}\n offset={offset}\n utc={utc[0]}\n onSelect={onSelect}\n />\n ))}\n </Container>\n </Dropdown>\n </Drop>\n )}\n </Item>\n )\n}\n\nexport default Timezone\n","import React, { useCallback, useEffect, useState, useRef } from \"react\"\nimport styled from \"styled-components\"\nimport { useSelector, useDispatch } from \"store/redux-separate-context\"\nimport { useLocalStorage } from \"react-use\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { sendToChildIframe, useListenToPostMessage } from \"utils/post-message\"\nimport { getIframeSrc, NETDATA_REGISTRY_SERVER } from \"utils/utils\"\nimport useUserNodeAccessMessage from \"hooks/use-user-node-access\"\nimport { selectRegistry, selectCloudBaseUrl } from \"domains/global/selectors\"\nimport { LOCAL_STORAGE_NEEDS_SYNC } from \"domains/dashboard/sagas\"\nimport { setOfflineAction } from \"@/src/domains/dashboard/actions\"\nimport { SIGN_IN_IFRAME_ID } from \"components/header/constants\"\n\nconst IframeContainer = styled(Flex).attrs({ position: \"absolute\" })`\n display: none;\n`\nconst Iframe = ({ signedIn }) => {\n const [rendered, setRendered] = useState(false)\n const signInMsg = useRef()\n const ref = useRef()\n\n const [lsValue, , removeLsValue] = useLocalStorage(LOCAL_STORAGE_NEEDS_SYNC)\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n const registry = useSelector(selectRegistry)\n\n const dispatch = useDispatch()\n\n const { origin, pathname } = window.location\n const nameParam = encodeURIComponent(registry.hostname)\n const originParam = encodeURIComponent(origin + pathname)\n\n const signInIframeUrl = getIframeSrc(\n cloudBaseURL,\n `sign-in?id=${registry.machineGuid}&name=${nameParam}&origin=${originParam}`\n )\n\n useListenToPostMessage(\"hello-from-sign-in\", msg => {\n signInMsg.current = msg\n })\n\n useUserNodeAccessMessage()\n\n const onLoad = useCallback(() => {\n setRendered(true)\n setTimeout(() => dispatch(setOfflineAction({ offline: signInMsg.current === undefined })), 500)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n useEffect(() => {\n const handler = e => {\n if (!e?.target) return\n if (e.target.src === signInIframeUrl && !rendered) onLoad()\n }\n\n window.addEventListener(\"DOMFrameContentLoaded\", handler)\n return () => window.removeEventListener(\"DOMFrameContentLoaded\", handler)\n }, [signInIframeUrl, rendered, onLoad])\n\n useEffect(() => {\n if (!signedIn || !ref.current) return\n if (!registry.registryServer || registry.registryServer === NETDATA_REGISTRY_SERVER) return\n if (!lsValue) return\n\n removeLsValue()\n\n const { registryMachinesArray } = registry\n if (registryMachinesArray && registryMachinesArray.length > 0) {\n sendToChildIframe(ref.current, {\n type: \"synced-private-registry\",\n payload: registryMachinesArray,\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [signedIn, registry, lsValue])\n\n return (\n <IframeContainer as=\"iframe\" id={SIGN_IN_IFRAME_ID} src={signInIframeUrl} onLoad={onLoad} />\n )\n}\n\nexport default Iframe\n","import { useCallback, useState } from \"react\"\nimport { useLocalStorage } from \"react-use\"\nimport { useDispatch } from \"react-redux\"\nimport { useListenToPostMessage } from \"@/src/utils/post-message\"\nimport { isSignedInAction } from \"@/src/domains/dashboard/actions\"\n\nconst useCheckSignInStatus = () => {\n const dispatch = useDispatch()\n const [value, setValue] = useLocalStorage(\"has-sign-in-history\")\n const [hasSignedInBefore, setHasSignedInBefore] = useState(value)\n\n const onMessage = useCallback(isNew => {\n if (isNew) {\n setHasSignedInBefore(isNew)\n setValue(isNew)\n }\n dispatch(isSignedInAction({ isSignedIn: isNew }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const [signedIn] = useListenToPostMessage(\"is-signed-in\", onMessage)\n\n return [signedIn, hasSignedInBefore]\n}\n\nexport default useCheckSignInStatus\n","import React from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { Button } from \"@netdata/netdata-ui\"\nimport SignInButton from \"components/auth/signIn\"\nimport SignInIframe from \"components/auth/signIn/iframe\"\nimport useCheckSignInStatus from \"components/auth/signIn/useCheckSignInStatus\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nconst SignIn = () => {\n const [signedIn] = useCheckSignInStatus()\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n return (\n cloudEnabled && (\n <Tooltip\n content=\"Sign in to Netdata to monitor all your nodes at once, have composite charts, custom dashboards, use intelligent features and more\"\n align=\"bottom\"\n plain\n >\n <div>\n <SignInIframe signedIn={signedIn} />\n {!signedIn && (\n <SignInButton utmParameters={{ content: \"topbar\" }}>\n {({ isRegistry, link, offline, onSignIn }) => (\n <Button\n data-testid=\"header-signin\"\n label=\"Sign in\"\n disabled={offline}\n {...(isRegistry ? { as: \"a\", href: link } : { onClick: onSignIn })}\n />\n )}\n </SignInButton>\n )}\n </div>\n </Tooltip>\n )\n )\n}\n\nexport default SignIn\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Node from \"./node\"\nimport Options from \"./options\"\nimport ProtoBuf from \"./protoBuf\"\nimport Version from \"./version\"\nimport GlobalControls from \"./globalControls\"\nimport Alarms from \"./alarms\"\nimport News from \"./news\"\nimport Timezone from \"./timezone\"\nimport SignIn from \"./signIn\"\nimport { CloudConnectionStatus } from \"./ACLK\"\nconst Wrapper = styled(Flex).attrs({\n as: \"header\",\n position: \"relative\",\n justifyContent: \"between\",\n background: \"panel\",\n zIndex: 20,\n width: \"100%\",\n padding: [2, 4, 2, 4],\n})`\n pointer-events: all;\n`\n\nconst Header = () => (\n <Wrapper>\n <Flex alignItems=\"center\" gap={3}>\n <Node />\n </Flex>\n <Flex justifyContent=\"end\" alignItems=\"center\" gap={3}>\n <CloudConnectionStatus />\n <Version />\n <News />\n <Options />\n <ProtoBuf />\n <Timezone />\n <GlobalControls />\n <Alarms />\n <SignIn />\n </Flex>\n </Wrapper>\n)\n\nexport default Header\n","import styled from \"styled-components\"\nimport { Button } from \"@netdata/netdata-ui\"\n\nconst ExpandButton = styled(Button)`\n&& {\n > .button-icon {\n width: 6px;\n height: 9px;\n }\n`\nexport default ExpandButton\n","import React from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { selectCloudBaseUrl } from \"domains/global/selectors\"\nimport { getIframeSrc } from \"@/src/utils\"\n\n\nconst SignOut = ({ flavour = \"default\", ...rest }) => {\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n\n return (\n <Flex\n alignItems=\"center\"\n as=\"iframe\"\n src={`${getIframeSrc(cloudBaseURL, \"sign-out\")}?type=${flavour}`}\n border={{ side: \"all\", size: \"0px\" }}\n width={{ max: \"128px\" }}\n height={{ max: \"40px\" }}\n {...rest}\n />\n )\n}\n\nexport default SignOut\n","import React, { useMemo } from \"react\"\nimport { ThemeProvider } from \"styled-components\"\nimport { createSelector } from \"reselect\"\nimport { useToggle } from \"react-use\"\nimport { Flex, Button, DarkTheme, Text, Layer } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { MenuItem } from \"components/menus\"\nimport SignOut from \"components/auth/signOut\"\nimport SignIn from \"components/auth/signIn\"\n\nconst SignInItem = () => {\n const onClick = (e, link) => {\n e.stopPropagation()\n window.location.href = link\n }\n return (\n <SignIn utmParameters={{ content: \"userSettings\" }}>\n {({ isRegistry, link, onSignIn }) => (\n <Text onClick={isRegistry ? e => onClick(e, link) : onSignIn}>Sign in</Text>\n )}\n </SignIn>\n )\n}\n\nconst isSignedInSelector = createSelector(\n ({ dashboard }) => dashboard,\n ({ isSignedIn }) => isSignedIn\n)\n\nconst UserSettings = () => {\n const [isOpen, toggle] = useToggle()\n const signedIn = useSelector(isSignedInSelector)\n\n const menuItems = useMemo(\n () => [\n ...(signedIn\n ? [\n {\n children: \"Operational Status\",\n onClick: () =>\n window.open(\"https://status.netdata.cloud\", \"_blank\", \"noopener,noreferrer\"),\n },\n ]\n : []),\n ...(signedIn ? [{ separator: true }] : []),\n ...(signedIn\n ? [\n {\n children: (\n <SignOut\n data-testid=\"signout-button-sidebar\"\n flavour=\"borderless\"\n height={{ max: \"18px\" }}\n />\n ),\n },\n ]\n : [{ children: <SignInItem /> }]),\n ],\n [signedIn]\n )\n\n return (\n <ThemeProvider theme={DarkTheme}>\n <Button\n data-testid=\"avatar-button-sidebar\"\n flavour=\"borderless\"\n neutral\n icon=\"user\"\n title=\"User settings\"\n name=\"userSettings\"\n onClick={toggle}\n />\n {isOpen && (\n <Layer\n position=\"bottom-left\"\n onClickOutside={toggle}\n onEsc={toggle}\n backdrop={false}\n margin={[5, 18]}\n >\n <Flex column width={52} background=\"mainBackground\" padding={[3]} round>\n {menuItems.map((item, i) => {\n if (item.separator) return <Flex height=\"1px\" background=\"disabled\" key={i} />\n return (\n <MenuItem\n key={i}\n padding={[2, 4]}\n round={1}\n {...(item.onClick && { onClick: item.onClick })}\n >\n {item.children}\n </MenuItem>\n )\n })}\n </Flex>\n </Layer>\n )}\n </ThemeProvider>\n )\n}\n\nexport default UserSettings\n","import React from \"react\"\nimport { Flex, Button } from \"@netdata/netdata-ui\"\n\nconst SpacesSkeleton = () => (\n <React.Fragment>\n <Flex\n width=\"40px\"\n height=\"40px\"\n round={2}\n border={{ side: \"all\", color: \"border\", size: \"2px\", type: \"dotted\" }}\n />\n <Flex height=\"1px\" background=\"separator\" width=\"20px\" />\n <Button icon=\"plus\" disabled />\n </React.Fragment>\n)\n\nexport default SpacesSkeleton\n","import React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectCloudBaseUrl } from \"domains/global/selectors\"\nimport { getIframeSrc } from \"utils/utils\"\n\nconst SpacesIframe = () => {\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n return (\n <Flex\n as=\"iframe\"\n src={getIframeSrc(cloudBaseURL, \"space-bar\")}\n title=\"Space Bar\"\n height=\"100%\"\n width=\"100%\"\n border={{ side: \"all\", size: \"0px\" }}\n overflow=\"hidden\"\n />\n )\n}\n\nexport default SpacesIframe\n","import React from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { Icon, Flex, Button, Documentation } from \"@netdata/netdata-ui\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\nimport ExpandButton from \"./expandButton\"\nimport UserSettings from \"./userSettings\"\nimport SpacesSkeleton from \"./spacesSkeleton\"\nimport SpacesIframe from \"./spacesIframe\"\n\nconst Spaces = ({ isOpen, toggle, isSignedIn }) => {\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n return (\n <Flex\n column\n justifyContent=\"between\"\n background=\"panel\"\n padding={[3, 0]}\n width=\"64px\"\n alignItems=\"center\"\n gap={6}\n position=\"relative\"\n overflow=\"hidden\"\n >\n <Flex column gap={4} alignItems=\"center\" height=\"100%\" overflow=\"hidden\">\n <Icon color=\"success\" name=\"netdataPress\" height=\"32px\" width=\"32px\" />\n {!isOpen && (\n <ExpandButton\n icon=\"chevron_right_s\"\n onClick={toggle}\n small\n neutral\n flavour=\"borderless\"\n themeType=\"dark\"\n />\n )}\n {cloudEnabled && isSignedIn && <SpacesIframe />}\n {cloudEnabled && !isSignedIn && <SpacesSkeleton />}\n </Flex>\n <Flex column gap={4} alignItems=\"center\">\n <Documentation app=\"agent\">\n {toggle => (\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n className=\"btn\"\n icon=\"question\"\n onClick={toggle}\n title=\"Need help?\"\n />\n )}\n </Documentation>\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n className=\"btn\"\n data-toggle=\"modal\"\n data-target=\"#optionsModal\"\n icon=\"gear\"\n title=\"Settings\"\n />\n {cloudEnabled && <UserSettings />}\n </Flex>\n </Flex>\n )\n}\n\nexport default Spaces\n","// some old functions here, i don't have time to comprehend them now\n\n// --------------------------------------------------------------------\n// natural sorting\n// http://www.davekoelle.com/files/alphanum.js - LGPL\n\nconst naturalSortChunkify = (t: string) => {\n const tz = []\n let x = 0\n let y = -1; let n = 0 as boolean | number; let i; let j\n\n // eslint-disable-next-line no-cond-assign,no-plusplus\n while (i = (j = t.charAt(x++)).charCodeAt(0)) {\n const m = (i >= 48 && i <= 57)\n if (m !== n) {\n // eslint-disable-next-line no-plusplus\n tz[++y] = \"\"\n n = m\n }\n tz[y] += j\n }\n\n return tz\n}\n\n\nexport const naturalSortCompare = (a: string, b: string) => {\n const aa = naturalSortChunkify(a.toLowerCase())\n const bb = naturalSortChunkify(b.toLowerCase())\n\n // eslint-disable-next-line no-plusplus\n for (let x = 0; aa[x] && bb[x]; x++) {\n if (aa[x] !== bb[x]) {\n const c = Number(aa[x]); const\n d = Number(bb[x])\n if (c.toString() === aa[x] && d.toString() === bb[x]) {\n return c - d\n }\n return (aa[x] > bb[x]) ? 1 : -1\n }\n }\n return aa.length - bb.length\n}\n\n\ninterface ObjectsWithPriority {\n [key: string]: {\n priority: number\n }\n}\nexport const sortObjectByPriority = <T extends ObjectsWithPriority>(object: T) => {\n const sorted = Object.keys(object)\n\n sorted.sort((a, b) => {\n if (object[a].priority < object[b].priority) {\n return -1\n }\n if (object[a].priority > object[b].priority) {\n return 1\n }\n return naturalSortCompare(a, b)\n })\n\n return sorted\n}\n\n\ninterface PrioritySortObject {\n name: string\n priority: number\n}\nexport const prioritySort = <T extends PrioritySortObject>(a: T, b: T) => {\n if (a.priority < b.priority) {\n return -1\n }\n if (a.priority > b.priority) {\n return 1\n }\n return naturalSortCompare(a.name, b.name)\n}\n","import { naturalSortCompare } from \"domains/dashboard/utils/sorting\"\n\nconst getBaseUrl = hostname => {\n let base = document.location.origin.toString() + decodeURI(document.location.pathname.toString())\n if (base.endsWith(`/host/${hostname}/`)) {\n base = base.substring(0, base.length - `/host/${hostname}/`.toString().length)\n }\n\n if (base.endsWith(\"/\")) {\n base = base.substring(0, base.length - 1)\n }\n\n return base\n}\n\nconst getNodeUrl = (baseUrl, hostname) => `${baseUrl}/host/${hostname}/`\n\nconst getNodes = (hosts, hostname, hostsStatus) => {\n if (!hosts || !hostname) return {}\n\n // decodeURI, because pathname (which is hostname) can contain white-spaces\n // or other characters which are URIencoded when user clicks the link\n // and we need to match it with `chartsMetadata.hostname`\n const baseUrl = getBaseUrl(hostname)\n\n const [{ hostname: parentNodeHostname }] = hosts\n\n const parentNode = {\n hostname: parentNodeHostname,\n url: `${baseUrl}/`,\n }\n\n const replicatedNodes = hosts\n .slice(1)\n .map(({ hostname }, index) => ({\n hostname,\n url: getNodeUrl(baseUrl, hostname),\n status: hostsStatus[index + 1].reachable,\n }))\n .sort((a, b) => naturalSortCompare(a.hostname, b.hostname))\n\n return {\n parentNode,\n replicatedNodes,\n }\n}\n\nexport default getNodes\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Anchor = styled(Flex).attrs({\n as: \"a\",\n gap: 2,\n alignItems: \"center\",\n})`\n & :hover {\n text-decoration: none;\n }\n`\n\nexport default Anchor\n","import React from \"react\"\nimport { Flex, Text, Icon } from \"@netdata/netdata-ui\"\nimport Pill from \"components/header/pill\"\nimport Anchor from \"./anchor\"\n\nconst Node = ({ hostname, url, status }) => {\n return (\n <Anchor href={url} justifyContent=\"between\" padding={[0, 0, 0, 2]}>\n <Flex alignItems=\"center\" gap={2}>\n <Icon name=\"node\" color=\"bright\" />\n <Text color=\"bright\" truncate>\n {hostname}\n </Text>\n </Flex>\n <Pill background={status ? \"success\" : \"border\"} color=\"bright\" round={10}>\n {status ? \"Live\" : \"Off\"}\n </Pill>\n </Anchor>\n )\n}\n\nexport default Node\n","import React, { useState, useCallback, useMemo } from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, Text, Icon, TextInput } from \"@netdata/netdata-ui\"\nimport { MenuList } from \"components/menus\"\nimport Anchor from \"./anchor\"\nimport Node from \"./node\"\n\nconst Search = styled(TextInput)`\n & > label {\n margin-bottom: 0;\n }\n`\n\nconst StyledIcon = styled(Icon)`\n transform: ${({ right }) => (right ? \"rotate(270deg)\" : \"none\")};\n`\n\nconst ReplicatedNodes = ({ parentNode, replicatedNodes }) => {\n const [listOpen, setListOpen] = useState(true)\n const [value, setValue] = useState(\"\")\n\n const toggleListOpen = useCallback(() => setListOpen(o => !o), [])\n const onChange = useCallback(e => setValue(e.target.value), [])\n\n const nodes = useMemo(() => {\n if (!value) return replicatedNodes\n return replicatedNodes.filter(({ hostname }) =>\n hostname.toLowerCase().includes(value.toLowerCase())\n )\n }, [replicatedNodes, value])\n\n return (\n <MenuList\n isOpen={listOpen}\n toggleOpen={toggleListOpen}\n label={\n <Flex alignItems=\"center\" justifyContent=\"between\">\n <Text strong color=\"border\">\n Replicated nodes\n </Text>\n <StyledIcon right={!listOpen} name=\"chevron_down\" size=\"small\" color=\"text\" />\n </Flex>\n }\n >\n <Flex column gap={4} padding={[4, 0, 0]}>\n <Anchor as=\"a\" href={parentNode.url} justifyContent=\"start\">\n <Icon name=\"nodes\" size=\"small\" color=\"bright\" />\n <Text color=\"bright\">{parentNode.hostname}</Text>\n </Anchor>\n {nodes.length >= 5 && (\n <Flex padding={[0, 0, 0, 2]}>\n <Search\n value={value}\n onChange={onChange}\n iconLeft={<Icon name=\"search_s\" size=\"small\" color=\"text\" />}\n metaShrinked\n />\n </Flex>\n )}\n <Flex column gap={2}>\n {nodes.map(({ hostname, url, status }) => (\n <Node key={hostname} hostname={hostname} url={url} status={status} />\n ))}\n </Flex>\n </Flex>\n </MenuList>\n )\n}\n\nexport default ReplicatedNodes\n","import React, { useRef, useEffect } from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { sendToChildIframe, useListenToPostMessage } from \"@/src/utils/post-message\"\nimport { getIframeSrc } from \"@/src/utils\"\nimport { selectCloudBaseUrl } from \"domains/global/selectors\"\n\nconst SpacePanelIframe = ({ parentNode, replicatedNodes }) => {\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n\n const ref = useRef()\n\n const [spacePanelMessage] = useListenToPostMessage(\"hello-from-space-panel\")\n\n useEffect(() => {\n if (!spacePanelMessage || !ref.current) return\n sendToChildIframe(ref.current, {\n type: \"streamed-hosts-data\",\n payload: { parentNode, replicatedNodes },\n })\n }, [replicatedNodes, parentNode, spacePanelMessage])\n\n return (\n <Flex\n ref={ref}\n as=\"iframe\"\n src={getIframeSrc(cloudBaseURL, \"space-panel\")}\n title=\"space panel\"\n width=\"100%\"\n height=\"100%\"\n border={{ side: \"all\", size: \"0px\" }}\n />\n )\n}\n\nexport default SpacePanelIframe\n","import React from \"react\"\nimport { TextSmall } from \"@netdata/netdata-ui\"\n\nconst promptContent = {\n signIn: {\n title: \"Welcome back!\",\n content: [\n <TextSmall key=\"1\" color=\"bright\">\n Sign in again to enjoy the benefits of Netdata Cloud{\" \"}\n </TextSmall>,\n ],\n },\n signUp: {\n title: \"Welcome to Netdata Cloud!\",\n content: [\n <TextSmall key=\"1\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n A single place\n </TextSmall>{\" \"}\n for all your nodes.\n </TextSmall>,\n <TextSmall key=\"2\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n Multi-node dashboards\n </TextSmall>{\" \"}\n out of the box.\n </TextSmall>,\n <TextSmall key=\"3\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n Custom dashboards\n </TextSmall>{\" \"}\n for you to create, edit and share online.\n </TextSmall>,\n <TextSmall key=\"4\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n Metric Correlations\n </TextSmall>{\" \"}\n to find the root cause of anything.\n </TextSmall>,\n <TextSmall key=\"5\" color=\"bright\">\n <TextSmall strong color=\"bright\">\n Centrally dispatched notifications\n </TextSmall>{\" \"}\n for all alarms of all your nodes.\n </TextSmall>,\n <TextSmall key=\"6\" color=\"bright\">\n And... It is{\" \"}\n <TextSmall\n as=\"a\"\n href=\"https://www.netdata.cloud/get-netdata/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n strong\n color=\"bright\"\n >\n free, forever!\n </TextSmall>\n </TextSmall>,\n ],\n },\n}\n\nexport default promptContent\n","import React from \"react\"\nimport { Flex, Text, Button } from \"@netdata/netdata-ui\"\nimport SignIn from \"@/src/components/auth/signIn\"\nimport promptContent from \"./promptContent\"\n\nconst SignInPrompt = () => {\n return (\n <SignIn utmParameters={{ content: \"sidebar\" }}>\n {({ isRegistry, link, onSignIn, offline }) => {\n const { title, content } = promptContent[\"signIn\"]\n return (\n <Flex\n background={[\"neutral\", \"regentgrey\"]}\n column\n gap={4}\n padding={[10]}\n border={{ side: \"right\", color: \"panel\" }}\n >\n <Text color=\"bright\" strong>\n {title}\n </Text>\n {content.map(el => el)}\n <Button\n width=\"100%\"\n label=\"Sign in\"\n disabled={offline}\n {...(isRegistry ? { as: \"a\", href: link } : { onClick: onSignIn })}\n />\n </Flex>\n )\n }}\n </SignIn>\n )\n}\n\nexport default SignInPrompt\n","import React from \"react\"\n\nconst NoNetwork = () => (\n <svg width=\"68\" height=\"68\" viewBox=\"0 0 68 68\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M48.875 6.375H19.125C16.7778 6.375 14.875 8.27779 14.875 10.625V40.375C14.875 42.7222 16.7778 44.625 19.125 44.625H48.875C51.2222 44.625 53.125 42.7222 53.125 40.375V10.625C53.125 8.27779 51.2222 6.375 48.875 6.375Z\"\n fill=\"white\"\n stroke=\"#AEB3B7\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M41.0834 38.25C41.8658 38.25 42.5 38.8843 42.5 39.6667V41.0833C44.0648 41.0833 45.3334 42.3519 45.3334 43.9167V58.0833C45.3334 59.6481 44.0648 60.9167 42.5 60.9167H38.25V65.1667H31.8278V60.9167H26.9167C25.3519 60.9167 24.0834 59.6481 24.0834 58.0833V43.9167C24.0834 42.3519 25.3519 41.0833 26.9167 41.0833V39.6667C26.9167 38.8843 27.551 38.25 28.3334 38.25H41.0834Z\"\n fill=\"#35414A\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M39.7954 12.75C40.5778 12.75 41.2121 13.3843 41.2121 14.1667L41.2108 16.7294L43.9166 16.7296C44.699 16.7296 45.3333 17.3639 45.3333 18.1463V34C45.3333 34.7824 44.699 35.4167 43.9166 35.4167L43.272 35.4152L43.2727 33.3403H41.2121L41.2108 35.4152H39.151L39.1515 33.3403H37.0909L37.0897 35.4152H35.0299L35.0303 33.3403H32.9697L32.9686 35.4152H30.9088L30.909 33.3403H28.8484L28.8475 35.4152H26.7877L26.7878 33.3403H24.7272L24.7265 35.4152L24.0833 35.4167C23.3009 35.4167 22.6666 34.7824 22.6666 34V18.1463C22.6666 17.3639 23.3009 16.7296 24.0833 16.7296L26.7877 16.7294L26.7878 14.1667C26.7878 13.3843 27.4221 12.75 28.2045 12.75H39.7954Z\"\n fill=\"#35414A\"\n />\n </svg>\n)\n\nexport default NoNetwork\n","import React from \"react\"\nimport { Flex, TextNano, TextSmall } from \"@netdata/netdata-ui\"\nimport NoNetwork from \"./noNetwork\"\n\nconst OfflinePrompt = () => (\n <Flex alignItems=\"center\" background={[\"neutral\", \"regentgrey\"]} column gap={1} padding={[10]}>\n <TextSmall color=\"bright\" strong textAlign=\"center\">\n Can't connect to Netdata Cloud\n </TextSmall>\n <NoNetwork />\n <TextNano color=\"bright\" textAlign=\"center\" margin={[2, 0, 0]}>\n Maybe you are behind a firewall or you don’t have connection to the internet\n </TextNano>\n </Flex>\n)\n\nexport default OfflinePrompt\n","import React, { useCallback } from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { createSelector } from \"reselect\"\nimport { Flex, Text, TextSmall, Collapsible, Button } from \"@netdata/netdata-ui\"\nimport { selectIsUsingGlobalRegistry, selectIsCloudEnabled } from \"domains/global/selectors\"\nimport getNodes from \"./nodes\"\nimport ReplicatedNodes from \"./replicatedNodes\"\nimport SpacePanelIframe from \"./spacePanelIframe\"\nimport SignInPrompt from \"./prompts/signIn\"\nimport OfflinePrompt from \"./prompts/offline\"\n\nconst replicatedNodesSelector = createSelector(\n state => state.global.chartsMetadata.data || {},\n state => state.global.registry.fullInfoPayload.mirrored_hosts_status || {},\n ({ hosts, hostname }, hostsStatus) => getNodes(hosts, hostname, hostsStatus)\n)\n\nconst visitedNodesSelector = createSelector(\n state => state.global.registry,\n registry => registry.registryMachinesArray || []\n)\n\nconst isSignedInSelector = createSelector(\n ({ dashboard }) => dashboard,\n ({ isSignedIn, offline }) => ({ isSignedIn, offline })\n)\n\nconst Space = ({ isOpen, toggle }) => {\n const { parentNode = {}, replicatedNodes = [] } = useSelector(replicatedNodesSelector)\n const visitedNodes = useSelector(visitedNodesSelector)\n const globalRegistry = useSelector(selectIsUsingGlobalRegistry)\n const { isSignedIn, offline } = useSelector(isSignedInSelector)\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n const switchIdentity = useCallback(() => window.switchRegistryModalHandler(), [])\n\n return (\n <Collapsible width={74} background=\"panel\" open={isOpen} direction=\"horizontal\" persist>\n <Flex\n flex\n column\n overflow={{ vertical: \"hidden\" }}\n margin={[3, 0, 0]}\n border={{ side: \"left\", color: \"separator\" }}\n style={{ pointerEvents: \"all\" }}\n >\n <Flex overflow={{ vertical: \"auto\" }} flex column gap={4} padding={[4]}>\n <Flex alignSelf=\"end\">\n <Button\n neutral\n flavour=\"borderless\"\n themeType=\"dark\"\n small\n icon=\"chevron_left\"\n onClick={toggle}\n />\n </Flex>\n {!isSignedIn && (\n <>\n {!!replicatedNodes.length && (\n <ReplicatedNodes parentNode={parentNode} replicatedNodes={replicatedNodes} />\n )}\n {!!visitedNodes.length && (\n <Text strong color=\"border\">\n VisitedNodes\n </Text>\n )}\n </>\n )}\n {isSignedIn && (\n <SpacePanelIframe parentNode={parentNode} replicatedNodes={replicatedNodes} />\n )}\n </Flex>\n {globalRegistry && (\n <Flex border={{ side: \"top\" }} justifyContent=\"center\" alignItems=\"center\" padding={[6]}>\n <TextSmall onClick={switchIdentity}>Switch Identity</TextSmall>\n </Flex>\n )}\n {!isSignedIn && cloudEnabled && <SignInPrompt />}\n {offline && cloudEnabled && <OfflinePrompt />}\n </Flex>\n </Collapsible>\n )\n}\n\nexport default React.memo(Space)\n","import React, { useCallback, useEffect } from \"react\"\nimport styled from \"styled-components\"\nimport { createSelector } from \"reselect\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { useDispatch, useSelector } from \"react-redux\"\nimport { useLocalStorage } from \"react-use\"\nimport { selectSpacePanelIsActive } from \"@/src/domains/global/selectors\"\nimport { setSpacePanelStatusAction } from \"@/src/domains/global/actions\"\nimport Spaces from \"./spaces\"\nimport Space from \"./space\"\n\nconst Wrapper = styled(Flex).attrs({ height: \"100vh\", zIndex: 10 })`\n pointer-events: all;\n`\n\nconst isSignedInSelector = createSelector(\n ({ dashboard }) => dashboard,\n ({ isSignedIn }) => isSignedIn\n)\n\nconst Sidebar = () => {\n const [lsValue, setLsValue] = useLocalStorage(\"space-panel-state\")\n const isOpen = useSelector(selectSpacePanelIsActive)\n const signedIn = useSelector(isSignedInSelector)\n\n const dispatch = useDispatch()\n\n const toggle = useCallback(() => {\n dispatch(setSpacePanelStatusAction({ isActive: !isOpen }))\n setLsValue(!isOpen)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen])\n\n useEffect(() => {\n dispatch(setSpacePanelStatusAction({ isActive: lsValue ? signedIn : false }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [signedIn])\n\n return (\n <Wrapper>\n <Spaces isOpen={isOpen} toggle={toggle} isSignedIn={signedIn} />\n <Space isOpen={isOpen} toggle={toggle} offline={true} />\n </Wrapper>\n )\n}\n\nexport default React.memo(Sidebar)\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Header from \"components/header\"\nimport Sidebar from \"components/sidebar\"\n\nconst Wrapper = styled(Flex).attrs({\n position: \"fixed\",\n justifyContent: \"start\",\n alignItems: \"start\",\n width: \"100%\",\n zIndex: 10,\n})`\n top: 0;\n left: 0;\n pointer-events: none;\n`\n\nconst Layout = ({ children, printMode }) => {\n\n if (printMode) return children\n\n return (\n <Wrapper>\n <Sidebar />\n <Header />\n {children}\n </Wrapper>\n )\n}\n\nexport default Layout\n","import { DefaultTheme, DarkTheme } from \"@netdata/netdata-ui\"\n\nexport type DashboardTheme = any\n\nexport const mapTheme = (theme: DashboardTheme): any =>\n ({\n slate: DarkTheme,\n white: DefaultTheme,\n }[theme] || DarkTheme)\n","import React, { useState, useCallback } from \"react\"\nimport GoToCloud from \"components/auth/signIn\"\n\nimport {\n Modal,\n ModalContent,\n ModalBody,\n ModalFooter,\n ModalHeader,\n Text,\n Flex,\n H3,\n Button,\n Box,\n Checkbox,\n} from \"@netdata/netdata-ui\"\n\nconst campaign = \"agent_nudge_to_cloud\"\n\nconst MigrationModal = ({\n migrationModalPromoInfo,\n setUserPrefrence,\n closeModal,\n savePromoRemindMeSelection,\n migrationModalPromo,\n requestRefreshOfAccess,\n}) => {\n const [isRememberChoiceChecked, setIsRememberChoiceChecked] = useState(false)\n\n const handleCheckBoxChange = e => {\n setIsRememberChoiceChecked(e.currentTarget.checked)\n }\n\n const handleClickedCTA1 = useCallback(\n ({ link, toPath }) => {\n const { CTA1 } = migrationModalPromoInfo\n\n if (CTA1.action === \"NAVIGATE\") {\n if (isRememberChoiceChecked) {\n setUserPrefrence(CTA1.userPreference)\n savePromoRemindMeSelection(isRememberChoiceChecked)\n }\n if (toPath !== \"agent\") window.location.href = link\n closeModal()\n } else if (CTA1.action === \"REFRESH\") {\n requestRefreshOfAccess()\n }\n },\n [\n migrationModalPromoInfo,\n setUserPrefrence,\n isRememberChoiceChecked,\n requestRefreshOfAccess,\n savePromoRemindMeSelection,\n closeModal,\n ]\n )\n\n const handleClickedCTA2 = useCallback(() => {\n const { CTA2 } = migrationModalPromoInfo\n if (isRememberChoiceChecked) {\n setUserPrefrence(CTA2.userPreference)\n savePromoRemindMeSelection(isRememberChoiceChecked)\n }\n if (CTA2.action === \"NAVIGATE\") {\n } else if (CTA2.action === \"REFRESH\") {\n requestRefreshOfAccess()\n }\n closeModal()\n }, [\n migrationModalPromoInfo,\n setUserPrefrence,\n isRememberChoiceChecked,\n requestRefreshOfAccess,\n savePromoRemindMeSelection,\n closeModal,\n ])\n\n return migrationModalPromoInfo ? (\n <Modal>\n <ModalContent width={180} background=\"modalBackground\">\n <ModalHeader>\n <H3 margin={[0]}>{migrationModalPromoInfo.title}</H3>\n </ModalHeader>\n <ModalBody>\n <Flex padding={[0, 0, 4, 0]} column gap={3}>\n {typeof migrationModalPromoInfo.text.header === \"function\" ? (\n migrationModalPromoInfo.text.header({})\n ) : (\n <Text>{migrationModalPromoInfo.text.header}</Text>\n )}\n {migrationModalPromoInfo.text.bullets.length > 0 && (\n <Flex column gap={3}>\n <Flex column gap={1} as={\"ul\"}>\n {migrationModalPromoInfo.text.bullets.map(bullet => {\n if (typeof bullet === \"function\") {\n return <li key={bullet}>{bullet()}</li>\n }\n return (\n <li key={bullet}>\n <Text>{bullet}</Text>\n </li>\n )\n })}\n </Flex>\n </Flex>\n )}\n {migrationModalPromoInfo.text.footer && (\n <Text data-testid=\"body-footer\">{migrationModalPromoInfo.text.footer}</Text>\n )}\n </Flex>\n </ModalBody>\n <ModalFooter>\n <Box margin={[0, \"auto\", 0, 0]}>\n <Checkbox\n data-ga={`${migrationModalPromo}::click-remind-me::ad`}\n data-testid=\"remind-me-checkbox\"\n checked={isRememberChoiceChecked}\n onChange={handleCheckBoxChange}\n label={migrationModalPromoInfo.tickBoxOption.text}\n />\n </Box>\n <Box data-testid=\"cta1\" margin={[0, 2, 0, 0]} width={{ min: 40 }}>\n <GoToCloud utmParameters={{ content: migrationModalPromo, campaign }}>\n {({ link }) => (\n <Button\n data-ga={`${migrationModalPromo}::click-ct1::ad`}\n textTransform=\"none\"\n data-testid=\"cta1-button\"\n onClick={() =>\n handleClickedCTA1({ link, toPath: migrationModalPromoInfo.CTA1.toPath })\n }\n width=\"100%\"\n label={migrationModalPromoInfo.CTA1.text}\n />\n )}\n </GoToCloud>\n </Box>\n {migrationModalPromoInfo.CTA2 && (\n <Box\n data-ga={`${migrationModalPromo}::click-ct2::ad`}\n onClick={handleClickedCTA2}\n height={10}\n className=\"btn btn-default\"\n data-testid=\"cta2\"\n width={{ min: 40 }}\n >\n <Box as={Text} sx={{ fontWeight: \"500\", lineHeight: \"25px\" }}>\n {migrationModalPromoInfo.CTA2.text}\n </Box>\n </Box>\n )}\n </ModalFooter>\n </ModalContent>\n </Modal>\n ) : null\n}\n\nexport default MigrationModal\n","import React, { useState, useEffect, useMemo } from \"react\"\nimport { useLocalStorage } from \"react-use\"\nimport { useSelector } from \"react-redux\"\n\nimport { selectUserNodeAccess } from \"domains/global/selectors\"\nimport {\n MigrationModal,\n useMigrationModal,\n PromoProps,\n goToCloud,\n goToAgentDashboard,\n} from \"@/src/domains/dashboard/components/migration-modal\"\nimport { selectSignInUrl } from \"domains/global/selectors\"\nimport { useRequestRefreshOfAccessMessage } from \"hooks/use-user-node-access\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\nimport { selectRegistry } from \"domains/global/selectors\"\n\n// const PROMO_SIGN_UP_CLOUD: PromoProps = { userStatus: \"UNKNOWN\", nodeClaimedStatus: \"NOT_CLAIMED\" } //CLOUD\n// const PROMO_SIGN_IN_CLOUD: PromoProps = {\n// userStatus: \"UNKNOWN\",\n// nodeClaimedStatus: \"CLAIMED\",\n// } //CLOUD\n// const PROMO_IVNITED_TO_SPACE: PromoProps = {\n// userStatus: \"LOGGED_IN\",\n// nodeClaimedStatus: \"CLAIMED\",\n// userNodeAccess: \"NO_ACCESS\",\n// } //CLOUD\n\n// const PROMO_CLAIM_NODE: PromoProps = { userStatus: \"LOGGED_IN\", nodeClaimedStatus: \"NOT_CLAIMED\" } //CLOUD\n// const PROMO_TO_USE_NEW_DASHBAORD: PromoProps = {\n// userStatus: \"LOGGED_IN\",\n// nodeLiveness: \"LIVE\",\n// userNodeAccess: \"ACCESS_OK\",\n// } //UNDEFIND\n\n// const FALLBACK_TO_AGENT: PromoProps = {\n// userStatus: \"LOGGED_IN\",\n// nodeLiveness: \"NOT_LIVE\",\n// userNodeAccess: \"ACCESS_OK\",\n// nodeClaimedStatus: \"CLAIMED\",\n// } //CLOUD\n\n// const NO_INFO_FALLBACK_TO_AGENT: PromoProps = {\n// userStatus: undefined,\n// nodeLiveness: undefined,\n// userNodeAccess: undefined,\n// nodeClaimedStatus: undefined,\n// } //CLOUD\n\n// const GO_TO_CLOUD: PromoProps = {\n// userStatus: \"LOGGED_IN\",\n// nodeLiveness: \"LIVE\",\n// userNodeAccess: \"ACCESS_OK\",\n// nodeClaimedStatus: \"CLAIMED\",\n// } //CLOUD\n\nconst MigrationManager = () => {\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n const registry = useSelector(selectRegistry)\n\n const cloudUrl = useSelector(state =>\n selectSignInUrl({ content: \"agent-auto-redirect\", term: registry.machineGuid })(state as any)\n )\n\n const linkToCoud = useMemo(() => {\n const { href } = window.location\n const redirectURI = encodeURIComponent(href)\n return `${cloudUrl}&redirect_uri=${redirectURI}`\n }, [cloudUrl])\n\n const userNodeAccess = useSelector(selectUserNodeAccess) as PromoProps\n const [isModalOpen, setModalOpen] = useState(false)\n const { migrationModalPromoInfo, setUserPrefrence, userSavedPreference, migrationModalPromo } =\n useMigrationModal({\n ...userNodeAccess,\n })\n\n const preferenceID = migrationModalPromoInfo?.tickBoxOption.preferenceID || \"\"\n\n /**\n * There is seem to be a bug when we are using the useLocalStorage,\n * the value to be returned does not change when preferenceID is changing.\n * For that reason we acces the localStorage directly\n */\n const [, savePromoRemindMeSelection] = useLocalStorage(preferenceID)\n const hasPromoSelectionSaved = localStorage.getItem(preferenceID)\n\n const closeModal = () => {\n setModalOpen(false)\n }\n\n const isPromoEligibleForShow =\n cloudEnabled &&\n migrationModalPromoInfo &&\n isModalOpen &&\n (!hasPromoSelectionSaved || hasPromoSelectionSaved === \"undefined\")\n\n const requestRefreshOfAccess = useRequestRefreshOfAccessMessage()\n\n /** We are delaying the show of modal because some time the userNodeAccess is equal to null\n * and only for a few seconds we are showing the NO_INFO modal an the the userNodeAccess\n * has a new value and we show a second modal on top of the other. We dont want this\n * behaviour\n */\n useEffect(() => {\n let showModalTimer = setTimeout(() => setModalOpen(true), 4000)\n return () => {\n clearTimeout(showModalTimer)\n }\n }, [])\n\n useEffect(() => {\n if (goToCloud({ userSavedPreference, ...userNodeAccess })) {\n window.location.href = linkToCoud\n }\n }, [linkToCoud, userNodeAccess, userSavedPreference])\n\n useEffect(() => {\n if (goToAgentDashboard({ userSavedPreference })) console.log(\"Lets go to Agent\")\n }, [userSavedPreference])\n\n useEffect(() => {\n if (isPromoEligibleForShow) {\n document.documentElement.style.overflow = \"hidden\"\n } else {\n document.documentElement.style.overflow = \"auto\"\n }\n }, [isModalOpen, isPromoEligibleForShow])\n\n if (isPromoEligibleForShow)\n return (\n <MigrationModal\n savePromoRemindMeSelection={savePromoRemindMeSelection}\n migrationModalPromoInfo={migrationModalPromoInfo}\n setUserPrefrence={setUserPrefrence}\n closeModal={closeModal}\n migrationModalPromo={migrationModalPromo}\n requestRefreshOfAccess={requestRefreshOfAccess}\n />\n )\n\n return null\n}\n\nexport default MigrationManager\n","import React, { useEffect, useLayoutEffect, useRef, useState } from \"react\"\nimport Ps from \"perfect-scrollbar\"\nimport { ThemeProvider } from \"styled-components\"\n\nimport \"@formatjs/intl-datetimeformat/polyfill\"\nimport \"@formatjs/intl-datetimeformat/locale-data/en\"\nimport \"@formatjs/intl-datetimeformat/add-all-tz\"\n\nimport \"@material/menu-surface/dist/mdc.menu-surface.css\"\n\n// intentionally loading before bootstrap styles\nimport \"./styles/main.css\"\n\n// needs to be included before bootstrap\nimport \"domains/chart/utils/jquery-loader\"\nimport \"bootstrap\"\nimport \"bootstrap-toggle\"\nimport \"bootstrap-toggle/css/bootstrap-toggle.min.css\"\n\nimport { useStore } from \"react-redux\"\nimport \"typeface-ibm-plex-sans\"\nimport \"@fortawesome/fontawesome-free/js/all\"\n\nimport \"styles/fonts.css\"\nimport { loadCss } from \"utils/css-loader\"\nimport { useDateTime } from \"utils/date-time\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectCloudBaseUrl, selectHasFetchedInfo, selectTheme } from \"domains/global/selectors\"\nimport { Portals } from \"domains/chart/components/portals\"\nimport { useChartsMetadata } from \"domains/dashboard/hooks/use-charts-metadata\"\nimport { PrintModal } from \"domains/dashboard/components/print-modal\"\nimport { SidebarSocialMedia } from \"domains/dashboard/components/sidebar-social-media\"\nimport { SidebarSocialMediaPortal } from \"domains/dashboard/components/sidebar-social-media-portal\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\nimport useAlarmFromUrl from \"domains/dashboard/hooks/useAlarmFromUrl\"\nimport { useRegistry } from \"hooks/use-registry\"\nimport { useAlarms } from \"hooks/use-alarms\"\nimport { NotificationsContainer } from \"components/notifications-container\"\n\nimport Layout from \"components/layout\"\n\nimport \"./types/global\"\n\nimport { useInfo } from \"hooks/use-info\"\nimport { serverStatic } from \"utils/server-detection\"\nimport { mapTheme } from \"utils/map-theme\"\nimport { netdataCallback, updateLocaleFunctions } from \"./main\"\n\nimport { MigrationManager } from \"@/src/domains/dashboard/components/migration-manager\"\nimport { isDemo } from \"./utils/is-demo\"\n\n// support legacy code\nwindow.Ps = Ps\n\nconst App: React.FC = () => {\n const store = useStore()\n useEffect(() => {\n // todo\n // @ts-ignore\n window.NETDATA.alarms = {}\n // @ts-ignore\n window.NETDATA.pause = callback => {\n callback()\n }\n netdataCallback(store)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n const [refreshHelper, setRefreshHelper] = useState<number>()\n // this is temporary, we will not need it when main.js will be fully refactored\n const haveDOMReadyForParsing = refreshHelper !== undefined\n // a workaround - each time parseDom is run, the portals are rerendered\n const parseDom = useRef(() => {\n setRefreshHelper(Math.random())\n })\n\n useEffect(() => {\n if (haveDOMReadyForParsing) {\n const loadOverlay = document.getElementById(\"loadOverlay\")\n if (loadOverlay) {\n loadOverlay.style.display = \"none\"\n }\n }\n }, [haveDOMReadyForParsing])\n\n const { localeDateString, localeTimeString } = useDateTime()\n useEffect(() => {\n updateLocaleFunctions({\n localeDateString,\n localeTimeString,\n })\n }, [localeDateString, localeTimeString])\n\n useRegistry(true)\n useAlarms(true)\n useInfo(true)\n\n const [hasFetchDependencies, setHasFetchDependencies] = useState(false)\n useLayoutEffect(() => {\n Promise.all([\n loadCss(serverStatic + window.NETDATA.themes.current.bootstrap_css),\n loadCss(serverStatic + window.NETDATA.themes.current.dashboard_css),\n ]).then(() => {\n setHasFetchDependencies(true)\n })\n }, [])\n\n const chartsMetadata = useChartsMetadata()\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n\n // @ts-ignore\n window.NETDATA.parseDom = parseDom.current\n\n const hasFetchedInfo = useSelector(selectHasFetchedInfo)\n const theme = useSelector(selectTheme)\n useAlarmFromUrl()\n\n return (\n <ThemeProvider theme={mapTheme(theme)}>\n {hasFetchDependencies && (\n // this needs to render after dynamic css files are loaded, otherwise netdata-ui\n // styling will have smaller priority than bootstrap css\n <NotificationsContainer />\n )}\n {chartsMetadata && cloudBaseURL && hasFetchedInfo && haveDOMReadyForParsing && (\n <Layout printMode={isPrintMode}>\n {isDemo ? null : <MigrationManager />}\n {hasFetchDependencies && (\n <>\n <Portals key={refreshHelper} />\n <SidebarSocialMediaPortal>\n <SidebarSocialMedia />\n </SidebarSocialMediaPortal>\n {isPrintMode && <PrintModal />}\n </>\n )}\n </Layout>\n )}\n </ThemeProvider>\n )\n}\n\nexport default App\n","import { useEffect } from \"react\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { fetchHelloAction } from \"domains/global/actions\"\nimport { selectRegistry } from \"domains/global/selectors\"\n\nexport const useRegistry = (shouldUseRegistry: boolean) => {\n const registry = useSelector(selectRegistry)\n\n const dispatch = useDispatch()\n useEffect(() => {\n if (shouldUseRegistry && !registry.isFetchingHello && !registry.hasFetchedHello\n && !registry.isHelloCallError\n ) {\n dispatch(fetchHelloAction.request({\n serverDefault,\n }))\n }\n }, [dispatch, registry, shouldUseRegistry])\n}\n","import { useEffect } from \"react\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { startAlarmsAction } from \"domains/global/actions\"\nimport { selectHasStartedAlarms } from \"domains/global/selectors\"\nimport { serverDefault } from \"utils/server-detection\"\n\nexport const useAlarms = (shouldUseAlarms: boolean) => {\n const hasStartedAlarms = useSelector(selectHasStartedAlarms)\n\n const dispatch = useDispatch()\n useEffect(() => {\n if (shouldUseAlarms && !hasStartedAlarms) {\n dispatch(startAlarmsAction({\n serverDefault,\n }))\n }\n }, [dispatch, hasStartedAlarms, shouldUseAlarms])\n}\n","import { useEffect } from \"react\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { fetchInfoAction } from \"domains/chart/actions\"\nimport { selectRegistry } from \"domains/global/selectors\"\n\nexport const useInfo = (shouldUseInfo: boolean) => {\n const registry = useSelector(selectRegistry)\n const hasStartedInfo = registry?.hasStartedInfo || false\n const dispatch = useDispatch()\n useEffect(() => {\n if (shouldUseInfo && !hasStartedInfo) {\n dispatch(fetchInfoAction.request({\n poll: false,\n }))\n }\n }, [dispatch, hasStartedInfo, shouldUseInfo])\n}\n","import { useHttp } from \"hooks/use-http\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { ChartsMetadata } from \"domains/global/types\"\n\nexport const useChartsMetadata = () => {\n const [chartsMetadata] = useHttp<ChartsMetadata>(`${serverDefault}api/v1/charts`)\n return chartsMetadata\n}\n","import { useMount } from \"react-use\"\n\nimport { useDispatch } from \"store/redux-separate-context\"\nimport { getHashParams } from \"utils/hash-utils\"\nimport { setAlarmAction, setGlobalPanAndZoomAction } from \"domains/global/actions\"\nimport { alarmStatuses } from \"domains/global/constants\"\n\nexport default () => {\n const dispatch = useDispatch()\n useMount(() => {\n const params = getHashParams()\n const alarmWhen = params[\"alarm_when\"]\n if (alarmWhen) {\n const alarmTime = Number(alarmWhen)\n\n const alarmStatus = params[\"alarm_status\"]\n const alarmChart = params[\"alarm_chart\"]\n const alarmValue = params[\"alarm_value\"]\n if (!alarmStatuses.includes(alarmStatus) || !alarmChart || !alarmValue) {\n return\n }\n\n dispatch(setAlarmAction({\n alarm: {\n chartId: alarmChart,\n status: alarmStatus,\n value: alarmValue,\n when: alarmTime,\n },\n }))\n const PADDING = 1000 * 60 * 5\n dispatch(setGlobalPanAndZoomAction({\n after: alarmTime * 1000 - PADDING,\n before: alarmTime * 1000 + PADDING,\n }))\n }\n })\n}\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Provider } from \"react-redux\"\n\nimport { store } from \"store\"\n\n// resolved in craco.config\n// @ts-ignore\nimport App from \"App\"\n\nimport \"./index.css\"\n\n// todo for static-dashboard:\n// 1) wait for the whole page to load, then render\n// 2) when the whole page is loaded, check window.NETDATA.options set by user and override initial\n// options settings\n\nReactDOM.render(\n <Provider store={store}>\n <App />\n </Provider>,\n document.getElementById(\"root\")\n)\n","/*! @license Copyright 2017 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */\n// SPDX-License-Identifier: MIT\n!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var e;e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this,e.Dygraph=t()}}(function(){return function t(e,a,i){function n(o,s){if(!a[o]){if(!e[o]){var l=\"function\"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var h=new Error(\"Cannot find module '\"+o+\"'\");throw h.code=\"MODULE_NOT_FOUND\",h}var u=a[o]={exports:{}};e[o][0].call(u.exports,function(t){var a=e[o][1][t];return n(a||t)},u,u.exports,t,e,a,i)}return a[o].exports}for(var r=\"function\"==typeof require&&require,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(t,e,a){function i(){throw new Error(\"setTimeout has not been defined\")}function n(){throw new Error(\"clearTimeout has not been defined\")}function r(t){if(d===setTimeout)return setTimeout(t,0);if((d===i||!d)&&setTimeout)return d=setTimeout,setTimeout(t,0);try{return d(t,0)}catch(e){try{return d.call(null,t,0)}catch(e){return d.call(this,t,0)}}}function o(t){if(c===clearTimeout)return clearTimeout(t);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function s(){v&&g&&(v=!1,g.length?f=g.concat(f):_=-1,f.length&&l())}function l(){if(!v){var t=r(s);v=!0;for(var e=f.length;e;){for(g=f,f=[];++_<e;)g&&g[_].run();_=-1,e=f.length}g=null,v=!1,o(t)}}function h(t,e){this.fun=t,this.array=e}function u(){}var d,c,p=e.exports={};!function(){try{d=\"function\"==typeof setTimeout?setTimeout:i}catch(t){d=i}try{c=\"function\"==typeof clearTimeout?clearTimeout:n}catch(t){c=n}}();var g,f=[],v=!1,_=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)e[a-1]=arguments[a];f.push(new h(t,e)),1!==f.length||v||r(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},p.title=\"browser\",p.browser=!0,p.env={},p.argv=[],p.version=\"\",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.prependListener=u,p.prependOnceListener=u,p.listeners=function(t){return[]},p.binding=function(t){throw new Error(\"process.binding is not supported\")},p.cwd=function(){return\"/\"},p.chdir=function(t){throw new Error(\"process.chdir is not supported\")},p.umask=function(){return 0}},{}],2:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./bars\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i,n,r,o=[],s=a.get(\"logscale\"),l=0;l<t.length;l++)i=t[l][0],r=t[l][e],s&&null!==r&&(r[0]<=0||r[1]<=0||r[2]<=0)&&(r=null),null!==r?(n=r[1],null===n||isNaN(n)?o.push([i,n,[n,n]]):o.push([i,n,[r[0],r[2]]])):o.push([i,null,[null,null]]);return o},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s,l,h,u=[];for(n=0,o=0,r=0,s=0,l=0;l<t.length;l++){if(i=t[l][1],h=t[l][2],u[l]=t[l],null===i||isNaN(i)||(n+=h[0],o+=i,r+=h[1],s+=1),l-e>=0){var d=t[l-e];null===d[1]||isNaN(d[1])||(n-=d[2][0],o-=d[1],r-=d[2][1],s-=1)}u[l]=s?[t[l][0],1*o/s,[1*n/s,1*r/s]]:[t[l][0],null,[null,null]]}return u},a.default=r,e.exports=a.default},{\"./bars\":5}],3:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./bars\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i,n,r,o,s=[],l=a.get(\"sigma\"),h=a.get(\"logscale\"),u=0;u<t.length;u++)i=t[u][0],o=t[u][e],h&&null!==o&&(o[0]<=0||o[0]-l*o[1]<=0)&&(o=null),null!==o?(n=o[0],null===n||isNaN(n)?s.push([i,n,[n,n,n]]):(r=l*o[1],s.push([i,n,[n-r,n+r,o[1]]]))):s.push([i,null,[null,null,null]]);return s},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s,l,h,u,d,c=[],p=a.get(\"sigma\");for(i=0;i<t.length;i++){for(s=0,u=0,l=0,n=Math.max(0,i-e+1);n<i+1;n++)null===(r=t[n][1])||isNaN(r)||(l++,s+=r,u+=Math.pow(t[n][2][2],2));l?(h=Math.sqrt(u)/l,d=s/l,c[i]=[t[i][0],d,[d-p*h,d+p*h]]):(o=1==e?t[i][1]:null,c[i]=[t[i][0],o,[o,o]])}return c},a.default=r,e.exports=a.default},{\"./bars\":5}],4:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./bars\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i,n,r,o,s,l,h,u,d=[],c=a.get(\"sigma\"),p=a.get(\"logscale\"),g=0;g<t.length;g++)i=t[g][0],r=t[g][e],p&&null!==r&&(r[0]<=0||r[1]<=0)&&(r=null),null!==r?(o=r[0],s=r[1],null===o||isNaN(o)?d.push([i,o,[o,o,o,s]]):(l=s?o/s:0,h=s?c*Math.sqrt(l*(1-l)/s):1,u=100*h,n=100*l,d.push([i,n,[n-u,n+u,o,s]]))):d.push([i,null,[null,null,null,null]]);return d},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s=[],l=a.get(\"sigma\"),h=a.get(\"wilsonInterval\"),u=0,d=0;for(r=0;r<t.length;r++){u+=t[r][2][2],d+=t[r][2][3],r-e>=0&&(u-=t[r-e][2][2],d-=t[r-e][2][3]);var c=t[r][0],p=d?u/d:0;if(h)if(d){var g=p<0?0:p,f=d,v=l*Math.sqrt(g*(1-g)/f+l*l/(4*f*f)),_=1+l*l/d;i=(g+l*l/(2*d)-v)/_,n=(g+l*l/(2*d)+v)/_,s[r]=[c,100*g,[100*i,100*n]]}else s[r]=[c,0,[0,0]];else o=d?l*Math.sqrt(p*(1-p)/d):1,s[r]=[c,100*p,[100*(p-o),100*(p+o)]]}return s},a.default=r,e.exports=a.default},{\"./bars\":5}],5:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"./datahandler\"),r=i(n),o=t(\"../dygraph-layout\"),s=i(o),l=function(){r.default.call(this)};l.prototype=new r.default,l.prototype.extractSeries=function(t,e,a){},l.prototype.rollingAverage=function(t,e,a){},l.prototype.onPointsCreated_=function(t,e){for(var a=0;a<t.length;++a){var i=t[a],n=e[a];n.y_top=NaN,n.y_bottom=NaN,n.yval_minus=r.default.parseFloat(i[2][0]),n.yval_plus=r.default.parseFloat(i[2][1])}},l.prototype.getExtremeYValues=function(t,e,a){for(var i,n=null,r=null,o=t.length-1,s=0;s<=o;s++)if(null!==(i=t[s][1])&&!isNaN(i)){var l=t[s][2][0],h=t[s][2][1];l>i&&(l=i),h<i&&(h=i),(null===r||h>r)&&(r=h),(null===n||l<n)&&(n=l)}return[n,r]},l.prototype.onLineEvaluated=function(t,e,a){for(var i,n=0;n<t.length;n++)i=t[n],i.y_top=s.default.calcYNormal_(e,i.yval_minus,a),i.y_bottom=s.default.calcYNormal_(e,i.yval_plus,a)},a.default=l,e.exports=a.default},{\"../dygraph-layout\":13,\"./datahandler\":6}],6:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){},n=i;n.X=0,n.Y=1,n.EXTRAS=2,n.prototype.extractSeries=function(t,e,a){},n.prototype.seriesToPoints=function(t,e,a){for(var i=[],r=0;r<t.length;++r){var o=t[r],s=o[1],l=null===s?null:n.parseFloat(s),h={x:NaN,y:NaN,xval:n.parseFloat(o[0]),yval:l,name:e,idx:r+a,canvasx:NaN,canvasy:NaN};i.push(h)}return this.onPointsCreated_(t,i),i},n.prototype.onPointsCreated_=function(t,e){},n.prototype.rollingAverage=function(t,e,a){},n.prototype.getExtremeYValues=function(t,e,a){},n.prototype.onLineEvaluated=function(t,e,a){},n.parseFloat=function(t){return null===t?NaN:t},a.default=i,e.exports=a.default},{}],7:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"./datahandler\"),r=(i(n),t(\"./default\")),o=i(r),s=function(){};s.prototype=new o.default,s.prototype.extractSeries=function(t,e,a){for(var i,n,r,o,s,l,h=[],u=a.get(\"logscale\"),d=0;d<t.length;d++)i=t[d][0],r=t[d][e],u&&null!==r&&(r[0]<=0||r[1]<=0)&&(r=null),null!==r?(o=r[0],s=r[1],null===o||isNaN(o)?h.push([i,o,[o,s]]):(l=s?o/s:0,n=100*l,h.push([i,n,[o,s]]))):h.push([i,null,[null,null]]);return h},s.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n=[],r=0,o=0;for(i=0;i<t.length;i++){r+=t[i][2][0],o+=t[i][2][1],i-e>=0&&(r-=t[i-e][2][0],o-=t[i-e][2][1]);var s=t[i][0],l=o?r/o:0;n[i]=[s,100*l]}return n},a.default=s,e.exports=a.default},{\"./datahandler\":6,\"./default\":8}],8:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./datahandler\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i=[],n=a.get(\"logscale\"),r=0;r<t.length;r++){var o=t[r][0],s=t[r][e];n&&s<=0&&(s=null),i.push([o,s])}return i},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s,l=[];if(1==e)return t;for(i=0;i<t.length;i++){for(o=0,s=0,n=Math.max(0,i-e+1);n<i+1;n++)null===(r=t[n][1])||isNaN(r)||(s++,o+=t[n][1]);l[i]=s?[t[i][0],o/s]:[t[i][0],null]}return l},r.prototype.getExtremeYValues=function(t,e,a){for(var i,n=null,r=null,o=t.length-1,s=0;s<=o;s++)null===(i=t[s][1])||isNaN(i)||((null===r||i>r)&&(r=i),(null===n||i<n)&&(n=i));return[n,r]},a.default=r,e.exports=a.default},{\"./datahandler\":6}],9:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=t(\"./dygraph\"),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=function(t,e,a,i){if(this.dygraph_=t,this.layout=i,this.element=e,this.elementContext=a,this.height=t.height_,this.width=t.width_,!n.isCanvasSupported(this.element))throw\"Canvas is not supported.\";this.area=i.getPlotArea();var r=this.dygraph_.canvas_ctx_;r.beginPath(),r.rect(this.area.x,this.area.y,this.area.w,this.area.h),r.clip(),r=this.dygraph_.hidden_ctx_,r.beginPath(),r.rect(this.area.x,this.area.y,this.area.w,this.area.h),r.clip()};s.prototype.clear=function(){this.elementContext.clearRect(0,0,this.width,this.height)},s.prototype.render=function(){this._updatePoints(),this._renderLineChart()},s._getIteratorPredicate=function(t){return t?s._predicateThatSkipsEmptyPoints:null},s._predicateThatSkipsEmptyPoints=function(t,e){return null!==t[e].yval},s._drawStyledLine=function(t,e,a,i,r,o,l){var h=t.dygraph,u=h.getBooleanOption(\"stepPlot\",t.setName);n.isArrayLike(i)||(i=null);var d=h.getBooleanOption(\"drawGapEdgePoints\",t.setName),c=t.points,p=t.setName,g=n.createIterator(c,0,c.length,s._getIteratorPredicate(h.getBooleanOption(\"connectSeparatedPoints\",p))),f=i&&i.length>=2,v=t.drawingContext;v.save(),f&&v.setLineDash&&v.setLineDash(i);var _=s._drawSeries(t,g,a,l,r,d,u,e);s._drawPointsOnLine(t,_,o,e,l),f&&v.setLineDash&&v.setLineDash([]),v.restore()},s._drawSeries=function(t,e,a,i,n,r,o,s){var l,h,u=null,d=null,c=null,p=[],g=!0,f=t.drawingContext;f.beginPath(),f.strokeStyle=s,f.lineWidth=a;for(var v=e.array_,_=e.end_,y=e.predicate_,x=e.start_;x<_;x++){if(h=v[x],y){for(;x<_&&!y(v,x);)x++;if(x==_)break;h=v[x]}if(null===h.canvasy||h.canvasy!=h.canvasy)o&&null!==u&&(f.moveTo(u,d),f.lineTo(h.canvasx,d)),u=d=null;else{if(l=!1,r||null===u){e.nextIdx_=x,e.next(),c=e.hasNext?e.peek.canvasy:null;var m=null===c||c!=c;l=null===u&&m,r&&(!g&&null===u||e.hasNext&&m)&&(l=!0)}null!==u?a&&(o&&(f.moveTo(u,d),f.lineTo(h.canvasx,d)),f.lineTo(h.canvasx,h.canvasy)):f.moveTo(h.canvasx,h.canvasy),(n||l)&&p.push([h.canvasx,h.canvasy,h.idx]),u=h.canvasx,d=h.canvasy}g=!1}return f.stroke(),p},s._drawPointsOnLine=function(t,e,a,i,n){for(var r=t.drawingContext,o=0;o<e.length;o++){var s=e[o];r.save(),a.call(t.dygraph,t.dygraph,t.setName,r,s[0],s[1],i,n,s[2]),r.restore()}},s.prototype._updatePoints=function(){for(var t=this.layout.points,e=t.length;e--;)for(var a=t[e],i=a.length;i--;){var n=a[i];n.canvasx=this.area.w*n.x+this.area.x,n.canvasy=this.area.h*n.y+this.area.y}},s.prototype._renderLineChart=function(t,e){var a,i,r=e||this.elementContext,o=this.layout.points,s=this.layout.setNames;this.colors=this.dygraph_.colorsMap_;var l=this.dygraph_.getOption(\"plotter\"),h=l;n.isArrayLike(h)||(h=[h]);var u={};for(a=0;a<s.length;a++){i=s[a];var d=this.dygraph_.getOption(\"plotter\",i);d!=l&&(u[i]=d)}for(a=0;a<h.length;a++)for(var c=h[a],p=a==h.length-1,g=0;g<o.length;g++)if(i=s[g],!t||i==t){var f=o[g],v=c;if(i in u){if(!p)continue;v=u[i]}var _=this.colors[i],y=this.dygraph_.getOption(\"strokeWidth\",i);r.save(),r.strokeStyle=_,r.lineWidth=y,v({points:f,setName:i,drawingContext:r,color:_,strokeWidth:y,dygraph:this.dygraph_,axis:this.dygraph_.axisPropertiesForSeries(i),plotArea:this.area,seriesIndex:g,seriesCount:o.length,singleSeriesName:t,allSeriesPoints:o}),r.restore()}},s._Plotters={linePlotter:function(t){s._linePlotter(t)},fillPlotter:function(t){s._fillPlotter(t)},errorPlotter:function(t){s._errorPlotter(t)}},s._linePlotter=function(t){var e=t.dygraph,a=t.setName,i=t.strokeWidth,r=e.getNumericOption(\"strokeBorderWidth\",a),o=e.getOption(\"drawPointCallback\",a)||n.Circles.DEFAULT,l=e.getOption(\"strokePattern\",a),h=e.getBooleanOption(\"drawPoints\",a),u=e.getNumericOption(\"pointSize\",a);r&&i&&s._drawStyledLine(t,e.getOption(\"strokeBorderColor\",a),i+2*r,l,h,o,u),s._drawStyledLine(t,t.color,i,l,h,o,u)},s._errorPlotter=function(t){var e=t.dygraph,a=t.setName;if(e.getBooleanOption(\"errorBars\")||e.getBooleanOption(\"customBars\")){e.getBooleanOption(\"fillGraph\",a)&&console.warn(\"Can't use fillGraph option with error bars\");var i,r=t.drawingContext,o=t.color,l=e.getNumericOption(\"fillAlpha\",a),h=e.getBooleanOption(\"stepPlot\",a),u=t.points,d=n.createIterator(u,0,u.length,s._getIteratorPredicate(e.getBooleanOption(\"connectSeparatedPoints\",a))),c=NaN,p=NaN,g=[-1,-1],f=n.toRGB_(o),v=\"rgba(\"+f.r+\",\"+f.g+\",\"+f.b+\",\"+l+\")\";r.fillStyle=v,r.beginPath();for(var _=function(t){return null===t||void 0===t||isNaN(t)};d.hasNext;){var y=d.next();!h&&_(y.y)||h&&!isNaN(p)&&_(p)?c=NaN:(i=[y.y_bottom,y.y_top],h&&(p=y.y),isNaN(i[0])&&(i[0]=y.y),isNaN(i[1])&&(i[1]=y.y),i[0]=t.plotArea.h*i[0]+t.plotArea.y,i[1]=t.plotArea.h*i[1]+t.plotArea.y,isNaN(c)||(h?(r.moveTo(c,g[0]),r.lineTo(y.canvasx,g[0]),r.lineTo(y.canvasx,g[1])):(r.moveTo(c,g[0]),r.lineTo(y.canvasx,i[0]),r.lineTo(y.canvasx,i[1])),r.lineTo(c,g[1]),r.closePath()),g=i,c=y.canvasx)}r.fill()}},s._fastCanvasProxy=function(t){var e=[],a=null,i=null,n=0,r=function(t){if(!(e.length<=1)){for(var a=e.length-1;a>0;a--){var i=e[a];if(2==i[0]){var n=e[a-1];n[1]==i[1]&&n[2]==i[2]&&e.splice(a,1)}}for(var a=0;a<e.length-1;){var i=e[a];2==i[0]&&2==e[a+1][0]?e.splice(a,1):a++}if(e.length>2&&!t){var r=0;2==e[0][0]&&r++;for(var o=null,s=null,a=r;a<e.length;a++){var i=e[a];if(1==i[0])if(null===o&&null===s)o=a,s=a;else{var l=i[2];l<e[o][2]?o=a:l>e[s][2]&&(s=a)}}var h=e[o],u=e[s];e.splice(r,e.length-r),o<s?(e.push(h),e.push(u)):o>s?(e.push(u),e.push(h)):e.push(h)}}},o=function(a){r(a);for(var o=0,s=e.length;o<s;o++){var l=e[o];1==l[0]?t.lineTo(l[1],l[2]):2==l[0]&&t.moveTo(l[1],l[2])}e.length&&(i=e[e.length-1][1]),n+=e.length,e=[]},s=function(t,n,r){var s=Math.round(n);if(null===a||s!=a){var l=a-i>1,h=s-a>1;o(l||h),a=s}e.push([t,n,r])};return{moveTo:function(t,e){s(2,t,e)},lineTo:function(t,e){s(1,t,e)},stroke:function(){o(!0),t.stroke()},fill:function(){o(!0),t.fill()},beginPath:function(){o(!0),t.beginPath()},closePath:function(){o(!0),t.closePath()},_count:function(){return n}}},s._fillPlotter=function(t){if(!t.singleSeriesName&&0===t.seriesIndex){for(var e=t.dygraph,a=e.getLabels().slice(1),i=a.length;i>=0;i--)e.visibility()[i]||a.splice(i,1);if(function(){for(var t=0;t<a.length;t++)if(e.getBooleanOption(\"fillGraph\",a[t]))return!0;return!1}())for(var r,l,h=t.plotArea,u=t.allSeriesPoints,d=u.length,c=e.getBooleanOption(\"stackedGraph\"),p=e.getColors(),g={},f=function(t,e,a,i){if(t.lineTo(e,a),c)for(var n=i.length-1;n>=0;n--){var r=i[n];t.lineTo(r[0],r[1])}},v=d-1;v>=0;v--){var _=t.drawingContext,y=a[v];if(e.getBooleanOption(\"fillGraph\",y)){var x=e.getNumericOption(\"fillAlpha\",y),m=e.getBooleanOption(\"stepPlot\",y),b=p[v],w=e.axisPropertiesForSeries(y),A=1+w.minyval*w.yscale;A<0?A=0:A>1&&(A=1),A=h.h*A+h.y;var O,D=u[v],E=n.createIterator(D,0,D.length,s._getIteratorPredicate(e.getBooleanOption(\"connectSeparatedPoints\",y))),L=NaN,T=[-1,-1],S=n.toRGB_(b),P=\"rgba(\"+S.r+\",\"+S.g+\",\"+S.b+\",\"+x+\")\";_.fillStyle=P,_.beginPath();var C,M=!0;(D.length>2*e.width_||o.default.FORCE_FAST_PROXY)&&(_=s._fastCanvasProxy(_));for(var N,F=[];E.hasNext;)if(N=E.next(),n.isOK(N.y)||m){if(c){if(!M&&C==N.xval)continue;M=!1,C=N.xval,r=g[N.canvasx];var k;k=void 0===r?A:l?r[0]:r,O=[N.canvasy,k],m?-1===T[0]?g[N.canvasx]=[N.canvasy,A]:g[N.canvasx]=[N.canvasy,T[0]]:g[N.canvasx]=N.canvasy}else O=isNaN(N.canvasy)&&m?[h.y+h.h,A]:[N.canvasy,A];isNaN(L)?(_.moveTo(N.canvasx,O[1]),_.lineTo(N.canvasx,O[0])):(m?(_.lineTo(N.canvasx,T[0]),_.lineTo(N.canvasx,O[0])):_.lineTo(N.canvasx,O[0]),c&&(F.push([L,T[1]]),l&&r?F.push([N.canvasx,r[1]]):F.push([N.canvasx,O[1]]))),T=O,L=N.canvasx}else f(_,L,T[1],F),F=[],L=NaN,null===N.y_stacked||isNaN(N.y_stacked)||(g[N.canvasx]=h.h*N.y_stacked+h.y);l=m,O&&N&&(f(_,N.canvasx,O[1],F),F=[]),_.fill()}}}},a.default=s,e.exports=a.default},{\"./dygraph\":18,\"./dygraph-utils\":17}],10:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}Object.defineProperty(a,\"__esModule\",{value:!0});var r=t(\"./dygraph-tickers\"),o=n(r),s=t(\"./dygraph-interaction-model\"),l=i(s),h=t(\"./dygraph-canvas\"),u=i(h),d=t(\"./dygraph-utils\"),c=n(d),p={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:.5,highlightSeriesBackgroundColor:\"rgb(255, 255, 255)\",labelsSeparateLines:!1,labelsShowZeroValues:!0,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:!0,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:\"white\",axisTickSize:3,axisLabelFontSize:14,rightGap:5,showRoller:!1,xValueParser:void 0,delimiter:\",\",sigma:2,errorBars:!1,fractions:!1,wilsonInterval:!0,customBars:!1,fillGraph:!1,fillAlpha:.15,connectSeparatedPoints:!1,stackedGraph:!1,stackedGraphNaNFill:\"all\",hideOverlayOnMouseOut:!0,legend:\"onmouseover\",stepPlot:!1,xRangePad:0,yRangePad:null,drawAxesAtZero:!1,titleHeight:28,xLabelHeight:18,yLabelWidth:18,axisLineColor:\"black\",axisLineWidth:.3,gridLineWidth:.3,axisLabelWidth:50,gridLineColor:\"rgb(128,128,128)\",interactionModel:l.default.defaultModel,animatedZooms:!1,showRangeSelector:!1,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:\"#808FAB\",rangeSelectorPlotFillGradientColor:\"white\",rangeSelectorPlotFillColor:\"#A7B1C4\",rangeSelectorBackgroundStrokeColor:\"gray\",rangeSelectorBackgroundLineWidth:1,rangeSelectorPlotLineWidth:1.5,rangeSelectorForegroundStrokeColor:\"black\",rangeSelectorForegroundLineWidth:1,rangeSelectorAlpha:.6,showInRangeSelector:null,plotter:[u.default._fillPlotter,u.default._errorPlotter,u.default._linePlotter],plugins:[],axes:{x:{pixelsPerLabel:70,axisLabelWidth:60,axisLabelFormatter:c.dateAxisLabelFormatter,valueFormatter:c.dateValueFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.dateTicker},y:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:c.numberValueFormatter,axisLabelFormatter:c.numberAxisLabelFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.numericTicks},y2:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:c.numberValueFormatter,axisLabelFormatter:c.numberAxisLabelFormatter,drawAxis:!0,drawGrid:!1,independentTicks:!1,ticker:o.numericTicks}}};a.default=p,e.exports=a.default},{\"./dygraph-canvas\":9,\"./dygraph-interaction-model\":12,\"./dygraph-tickers\":16,\"./dygraph-utils\":17}],11:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(t){this.container=t};r.prototype.draw=function(t,e){this.container.innerHTML=\"\",void 0!==this.date_graph&&this.date_graph.destroy(),this.date_graph=new n.default(this.container,t,e)},r.prototype.setSelection=function(t){var e=!1;t.length&&(e=t[0].row),this.date_graph.setSelection(e)},r.prototype.getSelection=function(){var t=[],e=this.date_graph.getSelection();if(e<0)return t;for(var a=this.date_graph.layout_.points,i=0;i<a.length;++i)t.push({row:e,column:i+1});return t},a.default=r,e.exports=a.default},{\"./dygraph\":18}],12:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r={};r.maybeTreatMouseOpAsClick=function(t,e,a){a.dragEndX=n.dragGetX_(t,a),a.dragEndY=n.dragGetY_(t,a);var i=Math.abs(a.dragEndX-a.dragStartX),o=Math.abs(a.dragEndY-a.dragStartY);i<2&&o<2&&void 0!==e.lastx_&&-1!=e.lastx_&&r.treatMouseOpAsClick(e,t,a),a.regionWidth=i,a.regionHeight=o},r.startPan=function(t,e,a){var i,r;a.isPanning=!0;var o=e.xAxisRange();if(e.getOptionForAxis(\"logscale\",\"x\")?(a.initialLeftmostDate=n.log10(o[0]),a.dateRange=n.log10(o[1])-n.log10(o[0])):(a.initialLeftmostDate=o[0],a.dateRange=o[1]-o[0]),a.xUnitsPerPixel=a.dateRange/(e.plotter_.area.w-1),e.getNumericOption(\"panEdgeFraction\")){var s=e.width_*e.getNumericOption(\"panEdgeFraction\"),l=e.xAxisExtremes(),h=e.toDomXCoord(l[0])-s,u=e.toDomXCoord(l[1])+s,d=e.toDataXCoord(h),c=e.toDataXCoord(u);a.boundedDates=[d,c];var p=[],g=e.height_*e.getNumericOption(\"panEdgeFraction\");for(i=0;i<e.axes_.length;i++){r=e.axes_[i];var f=r.extremeRange,v=e.toDomYCoord(f[0],i)+g,_=e.toDomYCoord(f[1],i)-g,y=e.toDataYCoord(v,i),x=e.toDataYCoord(_,i);p[i]=[y,x]}a.boundedValues=p}for(a.is2DPan=!1,a.axes=[],i=0;i<e.axes_.length;i++){r=e.axes_[i];var m={},b=e.yAxisRange(i);e.attributes_.getForAxis(\"logscale\",i)?(m.initialTopValue=n.log10(b[1]),m.dragValueRange=n.log10(b[1])-n.log10(b[0])):(m.initialTopValue=b[1],m.dragValueRange=b[1]-b[0]),m.unitsPerPixel=m.dragValueRange/(e.plotter_.area.h-1),a.axes.push(m),r.valueRange&&(a.is2DPan=!0)}},r.movePan=function(t,e,a){a.dragEndX=n.dragGetX_(t,a),a.dragEndY=n.dragGetY_(t,a);var i=a.initialLeftmostDate-(a.dragEndX-a.dragStartX)*a.xUnitsPerPixel;a.boundedDates&&(i=Math.max(i,a.boundedDates[0]));var r=i+a.dateRange;if(a.boundedDates&&r>a.boundedDates[1]&&(i-=r-a.boundedDates[1],r=i+a.dateRange),e.getOptionForAxis(\"logscale\",\"x\")?e.dateWindow_=[Math.pow(n.LOG_SCALE,i),Math.pow(n.LOG_SCALE,r)]:e.dateWindow_=[i,r],a.is2DPan)for(var o=a.dragEndY-a.dragStartY,s=0;s<e.axes_.length;s++){var l=e.axes_[s],h=a.axes[s],u=o*h.unitsPerPixel,d=a.boundedValues?a.boundedValues[s]:null,c=h.initialTopValue+u;d&&(c=Math.min(c,d[1]));var p=c-h.dragValueRange;d&&p<d[0]&&(c-=p-d[0],p=c-h.dragValueRange),e.attributes_.getForAxis(\"logscale\",s)?l.valueRange=[Math.pow(n.LOG_SCALE,p),Math.pow(n.LOG_SCALE,c)]:l.valueRange=[p,c]}e.drawGraph_(!1)},r.endPan=r.maybeTreatMouseOpAsClick,r.startZoom=function(t,e,a){a.isZooming=!0,a.zoomMoved=!1},r.moveZoom=function(t,e,a){a.zoomMoved=!0,a.dragEndX=n.dragGetX_(t,a),a.dragEndY=n.dragGetY_(t,a);var i=Math.abs(a.dragStartX-a.dragEndX),r=Math.abs(a.dragStartY-a.dragEndY);a.dragDirection=i<r/2?n.VERTICAL:n.HORIZONTAL,e.drawZoomRect_(a.dragDirection,a.dragStartX,a.dragEndX,a.dragStartY,a.dragEndY,a.prevDragDirection,a.prevEndX,a.prevEndY),a.prevEndX=a.dragEndX,a.prevEndY=a.dragEndY,a.prevDragDirection=a.dragDirection},r.treatMouseOpAsClick=function(t,e,a){for(var i=t.getFunctionOption(\"clickCallback\"),n=t.getFunctionOption(\"pointClickCallback\"),r=null,o=-1,s=Number.MAX_VALUE,l=0;l<t.selPoints_.length;l++){var h=t.selPoints_[l],u=Math.pow(h.canvasx-a.dragEndX,2)+Math.pow(h.canvasy-a.dragEndY,2);!isNaN(u)&&(-1==o||u<s)&&(s=u,o=l)}var d=t.getNumericOption(\"highlightCircleSize\")+2;if(s<=d*d&&(r=t.selPoints_[o]),r){var c={cancelable:!0,point:r,canvasx:a.dragEndX,canvasy:a.dragEndY};if(t.cascadeEvents_(\"pointClick\",c))return;n&&n.call(t,e,r)}var c={cancelable:!0,xval:t.lastx_,pts:t.selPoints_,canvasx:a.dragEndX,canvasy:a.dragEndY};t.cascadeEvents_(\"click\",c)||i&&i.call(t,e,t.lastx_,t.selPoints_)},r.endZoom=function(t,e,a){e.clearZoomRect_(),a.isZooming=!1,r.maybeTreatMouseOpAsClick(t,e,a);var i=e.getArea();if(a.regionWidth>=10&&a.dragDirection==n.HORIZONTAL){var o=Math.min(a.dragStartX,a.dragEndX),s=Math.max(a.dragStartX,a.dragEndX);o=Math.max(o,i.x),s=Math.min(s,i.x+i.w),o<s&&e.doZoomX_(o,s),a.cancelNextDblclick=!0}else if(a.regionHeight>=10&&a.dragDirection==n.VERTICAL){var l=Math.min(a.dragStartY,a.dragEndY),h=Math.max(a.dragStartY,a.dragEndY);l=Math.max(l,i.y),h=Math.min(h,i.y+i.h),l<h&&e.doZoomY_(l,h),a.cancelNextDblclick=!0}a.dragStartX=null,a.dragStartY=null},r.startTouch=function(t,e,a){t.preventDefault(),t.touches.length>1&&(a.startTimeForDoubleTapMs=null);for(var i=[],n=0;n<t.touches.length;n++){var r=t.touches[n];i.push({pageX:r.pageX,pageY:r.pageY,dataX:e.toDataXCoord(r.pageX),dataY:e.toDataYCoord(r.pageY)})}if(a.initialTouches=i,1==i.length)a.initialPinchCenter=i[0],a.touchDirections={x:!0,y:!0};else if(i.length>=2){a.initialPinchCenter={pageX:.5*(i[0].pageX+i[1].pageX),pageY:.5*(i[0].pageY+i[1].pageY),dataX:.5*(i[0].dataX+i[1].dataX),dataY:.5*(i[0].dataY+i[1].dataY)};var o=180/Math.PI*Math.atan2(a.initialPinchCenter.pageY-i[0].pageY,i[0].pageX-a.initialPinchCenter.pageX);o=Math.abs(o),o>90&&(o=90-o),a.touchDirections={x:o<67.5,y:o>22.5}}a.initialRange={x:e.xAxisRange(),y:e.yAxisRange()}},r.moveTouch=function(t,e,a){a.startTimeForDoubleTapMs=null;var i,n=[];for(i=0;i<t.touches.length;i++){var r=t.touches[i];n.push({pageX:r.pageX,pageY:r.pageY})}var o,s=a.initialTouches,l=a.initialPinchCenter;o=1==n.length?n[0]:{pageX:.5*(n[0].pageX+n[1].pageX),pageY:.5*(n[0].pageY+n[1].pageY)};var h={pageX:o.pageX-l.pageX,pageY:o.pageY-l.pageY},u=a.initialRange.x[1]-a.initialRange.x[0],d=a.initialRange.y[0]-a.initialRange.y[1];h.dataX=h.pageX/e.plotter_.area.w*u,h.dataY=h.pageY/e.plotter_.area.h*d;var c,p;if(1==n.length)c=1,p=1;else if(n.length>=2){var g=s[1].pageX-l.pageX;c=(n[1].pageX-o.pageX)/g;var f=s[1].pageY-l.pageY;p=(n[1].pageY-o.pageY)/f}c=Math.min(8,Math.max(.125,c)),p=Math.min(8,Math.max(.125,p));var v=!1;if(a.touchDirections.x&&(e.dateWindow_=[l.dataX-h.dataX+(a.initialRange.x[0]-l.dataX)/c,l.dataX-h.dataX+(a.initialRange.x[1]-l.dataX)/c],v=!0),a.touchDirections.y)for(i=0;i<1;i++){var _=e.axes_[i],y=e.attributes_.getForAxis(\"logscale\",i);y||(_.valueRange=[l.dataY-h.dataY+(a.initialRange.y[0]-l.dataY)/p,l.dataY-h.dataY+(a.initialRange.y[1]-l.dataY)/p],v=!0)}if(e.drawGraph_(!1),v&&n.length>1&&e.getFunctionOption(\"zoomCallback\")){var x=e.xAxisRange();e.getFunctionOption(\"zoomCallback\").call(e,x[0],x[1],e.yAxisRanges())}},r.endTouch=function(t,e,a){if(0!==t.touches.length)r.startTouch(t,e,a);else if(1==t.changedTouches.length){var i=(new Date).getTime(),n=t.changedTouches[0];a.startTimeForDoubleTapMs&&i-a.startTimeForDoubleTapMs<500&&a.doubleTapX&&Math.abs(a.doubleTapX-n.screenX)<50&&a.doubleTapY&&Math.abs(a.doubleTapY-n.screenY)<50?e.resetZoom():(a.startTimeForDoubleTapMs=i,a.doubleTapX=n.screenX,a.doubleTapY=n.screenY)}};var o=function(t,e,a){return t<e?e-t:t>a?t-a:0},s=function(t,e){var a=n.findPos(e.canvas_),i={left:a.x,right:a.x+e.canvas_.offsetWidth,top:a.y,bottom:a.y+e.canvas_.offsetHeight},r={x:n.pageX(t),y:n.pageY(t)},s=o(r.x,i.left,i.right),l=o(r.y,i.top,i.bottom);return Math.max(s,l)};r.defaultModel={mousedown:function(t,e,a){if(!t.button||2!=t.button){a.initializeMouseDown(t,e,a),t.altKey||t.shiftKey?r.startPan(t,e,a):r.startZoom(t,e,a);var i=function(t){if(a.isZooming){s(t,e)<100?r.moveZoom(t,e,a):null!==a.dragEndX&&(a.dragEndX=null,a.dragEndY=null,e.clearZoomRect_())}else a.isPanning&&r.movePan(t,e,a)},o=function t(o){a.isZooming?null!==a.dragEndX?r.endZoom(o,e,a):r.maybeTreatMouseOpAsClick(o,e,a):a.isPanning&&r.endPan(o,e,a),n.removeEvent(document,\"mousemove\",i),n.removeEvent(document,\"mouseup\",t),a.destroy()};e.addAndTrackEvent(document,\"mousemove\",i),e.addAndTrackEvent(document,\"mouseup\",o)}},willDestroyContextMyself:!0,touchstart:function(t,e,a){r.startTouch(t,e,a)},touchmove:function(t,e,a){r.moveTouch(t,e,a)},touchend:function(t,e,a){r.endTouch(t,e,a)},dblclick:function(t,e,a){if(a.cancelNextDblclick)return void(a.cancelNextDblclick=!1);var i={canvasx:a.dragEndX,canvasy:a.dragEndY,cancelable:!0};e.cascadeEvents_(\"dblclick\",i)||t.altKey||t.shiftKey||e.resetZoom()}},r.nonInteractiveModel_={mousedown:function(t,e,a){a.initializeMouseDown(t,e,a)},mouseup:r.maybeTreatMouseOpAsClick},r.dragIsPanInteractionModel={mousedown:function(t,e,a){a.initializeMouseDown(t,e,a),r.startPan(t,e,a)},mousemove:function(t,e,a){a.isPanning&&r.movePan(t,e,a)},mouseup:function(t,e,a){a.isPanning&&r.endPan(t,e,a)}},a.default=r,e.exports=a.default},{\"./dygraph-utils\":17}],13:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=function(t){this.dygraph_=t,this.points=[],this.setNames=[],this.annotations=[],this.yAxes_=null,this.xTicks_=null,this.yTicks_=null};r.prototype.addDataset=function(t,e){this.points.push(e),this.setNames.push(t)},r.prototype.getPlotArea=function(){return this.area_},r.prototype.computePlotArea=function(){var t={x:0,y:0};t.w=this.dygraph_.width_-t.x-this.dygraph_.getOption(\"rightGap\"),t.h=this.dygraph_.height_;var e={chart_div:this.dygraph_.graphDiv,reserveSpaceLeft:function(e){var a={x:t.x,y:t.y,w:e,h:t.h};return t.x+=e,t.w-=e,a},reserveSpaceRight:function(e){var a={x:t.x+t.w-e,y:t.y,w:e,h:t.h};return t.w-=e,a},reserveSpaceTop:function(e){var a={x:t.x,y:t.y,w:t.w,h:e};return t.y+=e,t.h-=e,a},reserveSpaceBottom:function(e){var a={x:t.x,y:t.y+t.h-e,w:t.w,h:e};return t.h-=e,a},chartRect:function(){return{x:t.x,y:t.y,w:t.w,h:t.h}}};this.dygraph_.cascadeEvents_(\"layout\",e),this.area_=t},r.prototype.setAnnotations=function(t){this.annotations=[];for(var e=this.dygraph_.getOption(\"xValueParser\")||function(t){return t},a=0;a<t.length;a++){var i={};if(!t[a].xval&&void 0===t[a].x)return void console.error(\"Annotations must have an 'x' property\");if(t[a].icon&&(!t[a].hasOwnProperty(\"width\")||!t[a].hasOwnProperty(\"height\")))return void console.error(\"Must set width and height when setting annotation.icon property\");n.update(i,t[a]),i.xval||(i.xval=e(i.x)),this.annotations.push(i)}},r.prototype.setXTicks=function(t){this.xTicks_=t},r.prototype.setYAxes=function(t){this.yAxes_=t},r.prototype.evaluate=function(){this._xAxis={},this._evaluateLimits(),this._evaluateLineCharts(),this._evaluateLineTicks(),this._evaluateAnnotations()},r.prototype._evaluateLimits=function(){var t=this.dygraph_.xAxisRange();this._xAxis.minval=t[0],this._xAxis.maxval=t[1];var e=t[1]-t[0];this._xAxis.scale=0!==e?1/e:1,this.dygraph_.getOptionForAxis(\"logscale\",\"x\")&&(this._xAxis.xlogrange=n.log10(this._xAxis.maxval)-n.log10(this._xAxis.minval),this._xAxis.xlogscale=0!==this._xAxis.xlogrange?1/this._xAxis.xlogrange:1);for(var a=0;a<this.yAxes_.length;a++){var i=this.yAxes_[a];i.minyval=i.computedValueRange[0],i.maxyval=i.computedValueRange[1],i.yrange=i.maxyval-i.minyval,i.yscale=0!==i.yrange?1/i.yrange:1,this.dygraph_.getOption(\"logscale\")&&(i.ylogrange=n.log10(i.maxyval)-n.log10(i.minyval),i.ylogscale=0!==i.ylogrange?1/i.ylogrange:1,isFinite(i.ylogrange)&&!isNaN(i.ylogrange)||console.error(\"axis \"+a+\" of graph at \"+i.g+\" can't be displayed in log scale for range [\"+i.minyval+\" - \"+i.maxyval+\"]\"))}},r.calcXNormal_=function(t,e,a){return a?(n.log10(t)-n.log10(e.minval))*e.xlogscale:(t-e.minval)*e.scale},r.calcYNormal_=function(t,e,a){if(a){var i=1-(n.log10(e)-n.log10(t.minyval))*t.ylogscale;return isFinite(i)?i:NaN}return 1-(e-t.minyval)*t.yscale},r.prototype._evaluateLineCharts=function(){for(var t=this.dygraph_.getOption(\"stackedGraph\"),e=this.dygraph_.getOptionForAxis(\"logscale\",\"x\"),a=0;a<this.points.length;a++){for(var i=this.points[a],n=this.setNames[a],o=this.dygraph_.getOption(\"connectSeparatedPoints\",n),s=this.dygraph_.axisPropertiesForSeries(n),l=this.dygraph_.attributes_.getForSeries(\"logscale\",n),h=0;h<i.length;h++){var u=i[h];u.x=r.calcXNormal_(u.xval,this._xAxis,e);var d=u.yval;t&&(u.y_stacked=r.calcYNormal_(s,u.yval_stacked,l),\nnull===d||isNaN(d)||(d=u.yval_stacked)),null===d&&(d=NaN,o||(u.yval=NaN)),u.y=r.calcYNormal_(s,d,l)}this.dygraph_.dataHandler_.onLineEvaluated(i,s,l)}},r.prototype._evaluateLineTicks=function(){var t,e,a,i,n,r;for(this.xticks=[],t=0;t<this.xTicks_.length;t++)e=this.xTicks_[t],a=e.label,r=!(\"label_v\"in e),n=r?e.v:e.label_v,(i=this.dygraph_.toPercentXCoord(n))>=0&&i<1&&this.xticks.push({pos:i,label:a,has_tick:r});for(this.yticks=[],t=0;t<this.yAxes_.length;t++)for(var o=this.yAxes_[t],s=0;s<o.ticks.length;s++)e=o.ticks[s],a=e.label,r=!(\"label_v\"in e),n=r?e.v:e.label_v,(i=this.dygraph_.toPercentYCoord(n,t))>0&&i<=1&&this.yticks.push({axis:t,pos:i,label:a,has_tick:r})},r.prototype._evaluateAnnotations=function(){var t,e={};for(t=0;t<this.annotations.length;t++){var a=this.annotations[t];e[a.xval+\",\"+a.series]=a}if(this.annotated_points=[],this.annotations&&this.annotations.length)for(var i=0;i<this.points.length;i++){var n=this.points[i];for(t=0;t<n.length;t++){var r=n[t],o=r.xval+\",\"+r.name;o in e&&(r.annotation=e[o],this.annotated_points.push(r))}}},r.prototype.removeAllDatasets=function(){delete this.points,delete this.setNames,delete this.setPointsLengths,delete this.setPointsOffsets,this.points=[],this.setNames=[],this.setPointsLengths=[],this.setPointsOffsets=[]},a.default=r,e.exports=a.default},{\"./dygraph-utils\":17}],14:[function(t,e,a){(function(t){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=null;if(void 0!==t);a.default=i,e.exports=a.default}).call(this,t(\"_process\"))},{_process:1}],15:[function(t,e,a){(function(i){\"use strict\";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var r=t(\"./dygraph-utils\"),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(r),s=t(\"./dygraph-default-attrs\"),l=n(s),h=t(\"./dygraph-options-reference\"),u=(n(h),function(t){this.dygraph_=t,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get(\"highlightSeriesOpts\")||{},this.reparseSeries()});if(u.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1},u.axisToIndex_=function(t){if(\"string\"==typeof t){if(u.AXIS_STRING_MAPPINGS_.hasOwnProperty(t))return u.AXIS_STRING_MAPPINGS_[t];throw\"Unknown axis : \"+t}if(\"number\"==typeof t){if(0===t||1===t)return t;throw\"Dygraphs only supports two y-axes, indexed from 0-1.\"}if(t)throw\"Unknown axis : \"+t;return 0},u.prototype.reparseSeries=function(){var t=this.get(\"labels\");if(t){this.labels_=t.slice(1),this.yAxes_=[{series:[],options:{}}],this.xAxis_={options:{}},this.series_={};for(var e=this.user_.series||{},a=0;a<this.labels_.length;a++){var i=this.labels_[a],n=e[i]||{},r=u.axisToIndex_(n.axis);this.series_[i]={idx:a,yAxis:r,options:n},this.yAxes_[r]?this.yAxes_[r].series.push(i):this.yAxes_[r]={series:[i],options:{}}}var s=this.user_.axes||{};o.update(this.yAxes_[0].options,s.y||{}),this.yAxes_.length>1&&o.update(this.yAxes_[1].options,s.y2||{}),o.update(this.xAxis_.options,s.x||{})}},u.prototype.get=function(t){var e=this.getGlobalUser_(t);return null!==e?e:this.getGlobalDefault_(t)},u.prototype.getGlobalUser_=function(t){return this.user_.hasOwnProperty(t)?this.user_[t]:null},u.prototype.getGlobalDefault_=function(t){return this.global_.hasOwnProperty(t)?this.global_[t]:l.default.hasOwnProperty(t)?l.default[t]:null},u.prototype.getForAxis=function(t,e){var a,i;if(\"number\"==typeof e)a=e,i=0===a?\"y\":\"y2\";else{if(\"y1\"==e&&(e=\"y\"),\"y\"==e)a=0;else if(\"y2\"==e)a=1;else{if(\"x\"!=e)throw\"Unknown axis \"+e;a=-1}i=e}var n=-1==a?this.xAxis_:this.yAxes_[a];if(n){var r=n.options;if(r.hasOwnProperty(t))return r[t]}if(\"x\"!==e||\"logscale\"!==t){var o=this.getGlobalUser_(t);if(null!==o)return o}var s=l.default.axes[i];return s.hasOwnProperty(t)?s[t]:this.getGlobalDefault_(t)},u.prototype.getForSeries=function(t,e){if(e===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(t))return this.highlightSeries_[t];if(!this.series_.hasOwnProperty(e))throw\"Unknown series: \"+e;var a=this.series_[e],i=a.options;return i.hasOwnProperty(t)?i[t]:this.getForAxis(t,a.yAxis)},u.prototype.numAxes=function(){return this.yAxes_.length},u.prototype.axisForSeries=function(t){return this.series_[t].yAxis},u.prototype.axisOptions=function(t){return this.yAxes_[t].options},u.prototype.seriesForAxis=function(t){return this.yAxes_[t].series},u.prototype.seriesNames=function(){return this.labels_},void 0!==i);a.default=u,e.exports=a.default}).call(this,t(\"_process\"))},{\"./dygraph-default-attrs\":10,\"./dygraph-options-reference\":14,\"./dygraph-utils\":17,_process:1}],16:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=function(t,e,a,i,n,r){return o(t,e,a,function(t){return\"logscale\"!==t&&i(t)},n,r)};a.numericLinearTicks=r;var o=function(t,e,a,i,r,o){var s,l,h,u,c=i(\"pixelsPerLabel\"),p=[];if(o)for(s=0;s<o.length;s++)p.push({v:o[s]});else{if(i(\"logscale\")){u=Math.floor(a/c);var g=n.binarySearch(t,d,1),f=n.binarySearch(e,d,-1);-1==g&&(g=0),-1==f&&(f=d.length-1);var v=null;if(f-g>=u/4){for(var _=f;_>=g;_--){var y=d[_],x=Math.log(y/t)/Math.log(e/t)*a,m={v:y};null===v?v={tickValue:y,pixel_coord:x}:Math.abs(x-v.pixel_coord)>=c?v={tickValue:y,pixel_coord:x}:m.label=\"\",p.push(m)}p.reverse()}}if(0===p.length){var b,w,A=i(\"labelsKMG2\");A?(b=[1,2,4,8,16,32,64,128,256],w=16):(b=[1,2,5,10,20,50,100],w=10);var O,D,E,L=Math.ceil(a/c),T=Math.abs(e-t)/L,S=Math.floor(Math.log(T)/Math.log(w)),P=Math.pow(w,S);for(l=0;l<b.length&&(O=P*b[l],D=Math.floor(t/O)*O,E=Math.ceil(e/O)*O,u=Math.abs(E-D)/O,!(a/u>c));l++);for(D>E&&(O*=-1),s=0;s<=u;s++)h=D+s*O,p.push({v:h})}}var C=i(\"axisLabelFormatter\");for(s=0;s<p.length;s++)void 0===p[s].label&&(p[s].label=C.call(r,p[s].v,0,i,r));return p};a.numericTicks=o;var s=function(t,e,a,i,n,r){var o=c(t,e,a,i);return o>=0?g(t,e,o,i,n):[]};a.dateTicker=s;var l={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29};a.Granularity=l;var h={DATEFIELD_Y:0,DATEFIELD_M:1,DATEFIELD_D:2,DATEFIELD_HH:3,DATEFIELD_MM:4,DATEFIELD_SS:5,DATEFIELD_MS:6,NUM_DATEFIELDS:7},u=[];u[l.MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:1,spacing:1},u[l.TWO_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:2,spacing:2},u[l.FIVE_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:5,spacing:5},u[l.TEN_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:10,spacing:10},u[l.FIFTY_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:50,spacing:50},u[l.HUNDRED_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:100,spacing:100},u[l.FIVE_HUNDRED_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:500,spacing:500},u[l.SECONDLY]={datefield:h.DATEFIELD_SS,step:1,spacing:1e3},u[l.TWO_SECONDLY]={datefield:h.DATEFIELD_SS,step:2,spacing:2e3},u[l.FIVE_SECONDLY]={datefield:h.DATEFIELD_SS,step:5,spacing:5e3},u[l.TEN_SECONDLY]={datefield:h.DATEFIELD_SS,step:10,spacing:1e4},u[l.THIRTY_SECONDLY]={datefield:h.DATEFIELD_SS,step:30,spacing:3e4},u[l.MINUTELY]={datefield:h.DATEFIELD_MM,step:1,spacing:6e4},u[l.TWO_MINUTELY]={datefield:h.DATEFIELD_MM,step:2,spacing:12e4},u[l.FIVE_MINUTELY]={datefield:h.DATEFIELD_MM,step:5,spacing:3e5},u[l.TEN_MINUTELY]={datefield:h.DATEFIELD_MM,step:10,spacing:6e5},u[l.THIRTY_MINUTELY]={datefield:h.DATEFIELD_MM,step:30,spacing:18e5},u[l.HOURLY]={datefield:h.DATEFIELD_HH,step:1,spacing:36e5},u[l.TWO_HOURLY]={datefield:h.DATEFIELD_HH,step:2,spacing:72e5},u[l.SIX_HOURLY]={datefield:h.DATEFIELD_HH,step:6,spacing:216e5},u[l.DAILY]={datefield:h.DATEFIELD_D,step:1,spacing:864e5},u[l.TWO_DAILY]={datefield:h.DATEFIELD_D,step:2,spacing:1728e5},u[l.WEEKLY]={datefield:h.DATEFIELD_D,step:7,spacing:6048e5},u[l.MONTHLY]={datefield:h.DATEFIELD_M,step:1,spacing:2629817280},u[l.QUARTERLY]={datefield:h.DATEFIELD_M,step:3,spacing:216e5*365.2524},u[l.BIANNUAL]={datefield:h.DATEFIELD_M,step:6,spacing:432e5*365.2524},u[l.ANNUAL]={datefield:h.DATEFIELD_Y,step:1,spacing:864e5*365.2524},u[l.DECADAL]={datefield:h.DATEFIELD_Y,step:10,spacing:315578073600},u[l.CENTENNIAL]={datefield:h.DATEFIELD_Y,step:100,spacing:3155780736e3};var d=function(){for(var t=[],e=-39;e<=39;e++)for(var a=Math.pow(10,e),i=1;i<=9;i++){var n=a*i;t.push(n)}return t}(),c=function(t,e,a,i){for(var n=i(\"pixelsPerLabel\"),r=0;r<l.NUM_GRANULARITIES;r++){if(a/p(t,e,r)>=n)return r}return-1},p=function(t,e,a){var i=u[a].spacing;return Math.round(1*(e-t)/i)},g=function(t,e,a,i,r){var o=i(\"axisLabelFormatter\"),s=i(\"labelsUTC\"),d=s?n.DateAccessorsUTC:n.DateAccessorsLocal,c=u[a].datefield,p=u[a].step,g=u[a].spacing,f=new Date(t),v=[];v[h.DATEFIELD_Y]=d.getFullYear(f),v[h.DATEFIELD_M]=d.getMonth(f),v[h.DATEFIELD_D]=d.getDate(f),v[h.DATEFIELD_HH]=d.getHours(f),v[h.DATEFIELD_MM]=d.getMinutes(f),v[h.DATEFIELD_SS]=d.getSeconds(f),v[h.DATEFIELD_MS]=d.getMilliseconds(f);var _=v[c]%p;a==l.WEEKLY&&(_=d.getDay(f)),v[c]-=_;for(var y=c+1;y<h.NUM_DATEFIELDS;y++)v[y]=y===h.DATEFIELD_D?1:0;var x=[],m=d.makeDate.apply(null,v),b=m.getTime();if(a<=l.HOURLY)for(b<t&&(b+=g,m=new Date(b));b<=e;)x.push({v:b,label:o.call(r,m,a,i,r)}),b+=g,m=new Date(b);else for(b<t&&(v[c]+=p,m=d.makeDate.apply(null,v),b=m.getTime());b<=e;)(a>=l.DAILY||d.getHours(m)%p==0)&&x.push({v:b,label:o.call(r,m,a,i,r)}),v[c]+=p,m=d.makeDate.apply(null,v),b=m.getTime();return x};a.getDateAxis=g},{\"./dygraph-utils\":17}],17:[function(t,e,a){\"use strict\";function i(t,e,a){t.removeEventListener(e,a,!1)}function n(t){return t=t||window.event,t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,t.cancel=!0,t.returnValue=!1,!1}function r(t,e,a){var i,n,r;if(0===e)i=a,n=a,r=a;else{var o=Math.floor(6*t),s=6*t-o,l=a*(1-e),h=a*(1-e*s),u=a*(1-e*(1-s));switch(o){case 1:i=h,n=a,r=l;break;case 2:i=l,n=a,r=u;break;case 3:i=l,n=h,r=a;break;case 4:i=u,n=l,r=a;break;case 5:i=a,n=l,r=h;break;case 6:case 0:i=a,n=u,r=l}}return i=Math.floor(255*i+.5),n=Math.floor(255*n+.5),r=Math.floor(255*r+.5),\"rgb(\"+i+\",\"+n+\",\"+r+\")\"}function o(t){var e=t.getBoundingClientRect(),a=window,i=document.documentElement;return{x:e.left+(a.pageXOffset||i.scrollLeft),y:e.top+(a.pageYOffset||i.scrollTop)}}function s(t){return!t.pageX||t.pageX<0?0:t.pageX}function l(t){return!t.pageY||t.pageY<0?0:t.pageY}function h(t,e){return s(t)-e.px}function u(t,e){return l(t)-e.py}function d(t){return!!t&&!isNaN(t)}function c(t,e){return!!t&&(null!==t.yval&&(null!==t.x&&void 0!==t.x&&(null!==t.y&&void 0!==t.y&&!(isNaN(t.x)||!e&&isNaN(t.y)))))}function p(t,e){var a=Math.min(Math.max(1,e||2),21);return Math.abs(t)<.001&&0!==t?t.toExponential(a-1):t.toPrecision(a)}function g(t){return t<10?\"0\"+t:\"\"+t}function f(t,e,a,i){var n=g(t)+\":\"+g(e);if(a&&(n+=\":\"+g(a),i)){var r=\"\"+i;n+=\".\"+(\"000\"+r).substring(r.length)}return n}function v(t,e){var a=e?tt:$,i=new Date(t),n=a.getFullYear(i),r=a.getMonth(i),o=a.getDate(i),s=a.getHours(i),l=a.getMinutes(i),h=a.getSeconds(i),u=a.getMilliseconds(i),d=\"\"+n,c=g(r+1),p=g(o),v=3600*s+60*l+h+.001*u,_=d+\"/\"+c+\"/\"+p;return v&&(_+=\" \"+f(s,l,h,u)),_}function _(t,e){var a=Math.pow(10,e);return Math.round(t*a)/a}function y(t,e,a,i,n){for(var r=!0;r;){var o=t,s=e,l=a,h=i,u=n;if(r=!1,null!==h&&void 0!==h&&null!==u&&void 0!==u||(h=0,u=s.length-1),h>u)return-1;null!==l&&void 0!==l||(l=0);var d,c=function(t){return t>=0&&t<s.length},p=parseInt((h+u)/2,10),g=s[p];if(g==o)return p;if(g>o){if(l>0&&(d=p-1,c(d)&&s[d]<o))return p;t=o,e=s,a=l,i=h,n=p-1,r=!0,c=p=g=d=void 0}else{if(!(g<o))return-1;if(l<0&&(d=p+1,c(d)&&s[d]>o))return p;t=o,e=s,a=l,i=p+1,n=u,r=!0,c=p=g=d=void 0}}}function x(t){var e,a;if((-1==t.search(\"-\")||-1!=t.search(\"T\")||-1!=t.search(\"Z\"))&&(a=m(t))&&!isNaN(a))return a;if(-1!=t.search(\"-\")){for(e=t.replace(\"-\",\"/\",\"g\");-1!=e.search(\"-\");)e=e.replace(\"-\",\"/\");a=m(e)}else 8==t.length?(e=t.substr(0,4)+\"/\"+t.substr(4,2)+\"/\"+t.substr(6,2),a=m(e)):a=m(t);return a&&!isNaN(a)||console.error(\"Couldn't parse \"+t+\" as a date\"),a}function m(t){return new Date(t).getTime()}function b(t,e){if(void 0!==e&&null!==e)for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return t}function w(t,e){if(void 0!==e&&null!==e)for(var a in e)e.hasOwnProperty(a)&&(null===e[a]?t[a]=null:A(e[a])?t[a]=e[a].slice():!function(t){return\"object\"==typeof Node?t instanceof Node:\"object\"==typeof t&&\"number\"==typeof t.nodeType&&\"string\"==typeof t.nodeName}(e[a])&&\"object\"==typeof e[a]?(\"object\"==typeof t[a]&&null!==t[a]||(t[a]={}),w(t[a],e[a])):t[a]=e[a]);return t}function A(t){var e=typeof t;return(\"object\"==e||\"function\"==e&&\"function\"==typeof t.item)&&null!==t&&\"number\"==typeof t.length&&3!==t.nodeType}function O(t){return\"object\"==typeof t&&null!==t&&\"function\"==typeof t.getTime}function D(t){for(var e=[],a=0;a<t.length;a++)A(t[a])?e.push(D(t[a])):e.push(t[a]);return e}function E(){return document.createElement(\"canvas\")}function L(t){try{var e=window.devicePixelRatio,a=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return void 0!==e?e/a:1}catch(t){return 1}}function T(t,e,a,i){e=e||0,a=a||t.length,this.hasNext=!0,this.peek=null,this.start_=e,this.array_=t,this.predicate_=i,this.end_=Math.min(t.length,e+a),this.nextIdx_=e-1,this.next()}function S(t,e,a,i){return new T(t,e,a,i)}function P(t,e,a,i){var n,r=0,o=(new Date).getTime();if(t(r),1==e)return void i();var s=e-1;!function l(){r>=e||et.call(window,function(){var e=(new Date).getTime(),h=e-o;n=r,r=Math.floor(h/a);var u=r-n;r+u>s||r>=s?(t(s),i()):(0!==u&&t(r),l())})}()}function C(t,e){var a={};if(t)for(var i=1;i<t.length;i++)a[t[i]]=!0;var n=function(t){for(var e in t)if(t.hasOwnProperty(e)&&!at[e])return!0;return!1};for(var r in e)if(e.hasOwnProperty(r))if(\"highlightSeriesOpts\"==r||a[r]&&!e.series){if(n(e[r]))return!0}else if(\"series\"==r||\"axes\"==r){var o=e[r];for(var s in o)if(o.hasOwnProperty(s)&&n(o[s]))return!0}else if(!at[r])return!0;return!1}function M(t){for(var e=0;e<t.length;e++){var a=t.charAt(e);if(\"\\r\"===a)return e+1<t.length&&\"\\n\"===t.charAt(e+1)?\"\\r\\n\":a;if(\"\\n\"===a)return e+1<t.length&&\"\\r\"===t.charAt(e+1)?\"\\n\\r\":a}return null}function N(t,e){if(null===e||null===t)return!1;for(var a=t;a&&a!==e;)a=a.parentNode;return a===e}function F(t,e){return e<0?1/Math.pow(t,-e):Math.pow(t,e)}function k(t){var e=nt.exec(t);if(!e)return null;var a=parseInt(e[1],10),i=parseInt(e[2],10),n=parseInt(e[3],10);return e[4]?{r:a,g:i,b:n,a:parseFloat(e[4])}:{r:a,g:i,b:n}}function R(t){var e=k(t);if(e)return e;var a=document.createElement(\"div\");a.style.backgroundColor=t,a.style.visibility=\"hidden\",document.body.appendChild(a);var i=window.getComputedStyle(a,null).backgroundColor;return document.body.removeChild(a),k(i)}function I(t){try{(t||document.createElement(\"canvas\")).getContext(\"2d\")}catch(t){return!1}return!0}function H(t,e,a){var i=parseFloat(t);if(!isNaN(i))return i;if(/^ *$/.test(t))return null;if(/^ *nan *$/i.test(t))return NaN;var n=\"Unable to parse '\"+t+\"' as a number\";return void 0!==a&&void 0!==e&&(n+=\" on line \"+(1+(e||0))+\" ('\"+a+\"') of CSV.\"),console.error(n),null}function Y(t,e){var a=e(\"sigFigs\");if(null!==a)return p(t,a);var i,n=e(\"digitsAfterDecimal\"),r=e(\"maxNumberWidth\"),o=e(\"labelsKMB\"),s=e(\"labelsKMG2\");if(i=0!==t&&(Math.abs(t)>=Math.pow(10,r)||Math.abs(t)<Math.pow(10,-n))?t.toExponential(n):\"\"+_(t,n),o||s){var l,h=[],u=[];o&&(l=1e3,h=rt),s&&(o&&console.warn(\"Setting both labelsKMB and labelsKMG2. Pick one!\"),l=1024,h=ot,u=st);for(var d=Math.abs(t),c=F(l,h.length),g=h.length-1;g>=0;g--,c/=l)if(d>=c){i=_(t/c,n)+h[g];break}if(s){var f=String(t.toExponential()).split(\"e-\");2===f.length&&f[1]>=3&&f[1]<=24&&(i=f[1]%3>0?_(f[0]/F(10,f[1]%3),n):Number(f[0]).toFixed(2),i+=u[Math.floor(f[1]/3)-1])}}return i}function X(t,e,a){return Y.call(this,t,a)}function V(t,e,a){var i=a(\"labelsUTC\"),n=i?tt:$,r=n.getFullYear(t),o=n.getMonth(t),s=n.getDate(t),l=n.getHours(t),h=n.getMinutes(t),u=n.getSeconds(t),d=n.getMilliseconds(t);if(e>=G.Granularity.DECADAL)return\"\"+r;if(e>=G.Granularity.MONTHLY)return lt[o]+\" \"+r;if(0===3600*l+60*h+u+.001*d||e>=G.Granularity.DAILY)return g(s)+\" \"+lt[o];if(e<G.Granularity.SECONDLY){var c=\"\"+d;return g(u)+\".\"+(\"000\"+c).substring(c.length)}return e>G.Granularity.MINUTELY?f(l,h,u,0):f(l,h,u,d)}function Z(t,e){return v(t,e(\"labelsUTC\"))}Object.defineProperty(a,\"__esModule\",{value:!0}),a.removeEvent=i,a.cancelEvent=n,a.hsvToRGB=r,a.findPos=o,a.pageX=s,a.pageY=l,a.dragGetX_=h,a.dragGetY_=u,a.isOK=d,a.isValidPoint=c,a.floatFormat=p,a.zeropad=g,a.hmsString_=f,a.dateString_=v,a.round_=_,a.binarySearch=y,a.dateParser=x,a.dateStrToMillis=m,a.update=b,a.updateDeep=w,a.isArrayLike=A,a.isDateLike=O,a.clone=D,a.createCanvas=E,a.getContextPixelRatio=L,a.Iterator=T,a.createIterator=S,a.repeatAndCleanup=P,a.isPixelChangingOptionList=C,a.detectLineDelimiter=M,a.isNodeContainedBy=N,a.pow=F,a.toRGB_=R,a.isCanvasSupported=I,a.parseFloat_=H,a.numberValueFormatter=Y,a.numberAxisLabelFormatter=X,a.dateAxisLabelFormatter=V,a.dateValueFormatter=Z;var B=t(\"./dygraph-tickers\"),G=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(B);a.LOG_SCALE=10;var W=Math.log(10);a.LN_TEN=W;var U=function(t){return Math.log(t)/W};a.log10=U;var z=function(t,e,a){var i=U(t),n=U(e),r=i+a*(n-i);return Math.pow(10,r)};a.logRangeFraction=z;var j=[2,2];a.DOTTED_LINE=j;var K=[7,3];a.DASHED_LINE=K;var q=[7,2,2,2];a.DOT_DASH_LINE=q;a.HORIZONTAL=1;a.VERTICAL=2;var Q=function(t){return t.getContext(\"2d\")};a.getContext=Q;var J=function(t,e,a){t.addEventListener(e,a,!1)};a.addEvent=J;var $={getFullYear:function(t){return t.getFullYear()},getMonth:function(t){return t.getMonth()},getDate:function(t){return t.getDate()},getHours:function(t){return t.getHours()},getMinutes:function(t){return t.getMinutes()},getSeconds:function(t){return t.getSeconds()},getMilliseconds:function(t){return t.getMilliseconds()},getDay:function(t){return t.getDay()},makeDate:function(t,e,a,i,n,r,o){return new Date(t,e,a,i,n,r,o)}};a.DateAccessorsLocal=$;var tt={getFullYear:function(t){return t.getUTCFullYear()},getMonth:function(t){return t.getUTCMonth()},getDate:function(t){return t.getUTCDate()},getHours:function(t){return t.getUTCHours()},getMinutes:function(t){return t.getUTCMinutes()},getSeconds:function(t){return t.getUTCSeconds()},getMilliseconds:function(t){return t.getUTCMilliseconds()},getDay:function(t){return t.getUTCDay()},makeDate:function(t,e,a,i,n,r,o){return new Date(Date.UTC(t,e,a,i,n,r,o))}};a.DateAccessorsUTC=tt,T.prototype.next=function(){if(!this.hasNext)return null;for(var t=this.peek,e=this.nextIdx_+1,a=!1;e<this.end_;){if(!this.predicate_||this.predicate_(this.array_,e)){this.peek=this.array_[e],a=!0;break}e++}return this.nextIdx_=e,a||(this.hasNext=!1,this.peek=null),t};var et=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();a.requestAnimFrame=et;var at={annotationClickHandler:!0,annotationDblClickHandler:!0,annotationMouseOutHandler:!0,annotationMouseOverHandler:!0,axisLineColor:!0,axisLineWidth:!0,clickCallback:!0,drawCallback:!0,drawHighlightPointCallback:!0,drawPoints:!0,drawPointCallback:!0,drawGrid:!0,fillAlpha:!0,gridLineColor:!0,gridLineWidth:!0,hideOverlayOnMouseOut:!0,highlightCallback:!0,highlightCircleSize:!0,interactionModel:!0,labelsDiv:!0,labelsKMB:!0,labelsKMG2:!0,labelsSeparateLines:!0,labelsShowZeroValues:!0,legend:!0,panEdgeFraction:!0,pixelsPerYLabel:!0,pointClickCallback:!0,pointSize:!0,rangeSelectorPlotFillColor:!0,rangeSelectorPlotFillGradientColor:!0,rangeSelectorPlotStrokeColor:!0,rangeSelectorBackgroundStrokeColor:!0,rangeSelectorBackgroundLineWidth:!0,rangeSelectorPlotLineWidth:!0,rangeSelectorForegroundStrokeColor:!0,rangeSelectorForegroundLineWidth:!0,rangeSelectorAlpha:!0,showLabelsOnHighlight:!0,showRoller:!0,strokeWidth:!0,underlayCallback:!0,unhighlightCallback:!0,zoomCallback:!0},it={DEFAULT:function(t,e,a,i,n,r,o){a.beginPath(),a.fillStyle=r,a.arc(i,n,o,0,2*Math.PI,!1),a.fill()}};a.Circles=it;var nt=/^rgba?\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})(?:,\\s*([01](?:\\.\\d+)?))?\\)$/,rt=[\"K\",\"M\",\"B\",\"T\",\"Q\"],ot=[\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"],st=[\"m\",\"u\",\"n\",\"p\",\"f\",\"a\",\"z\",\"y\"],lt=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]},{\"./dygraph-tickers\":16}],18:[function(t,e,a){(function(i){\"use strict\";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}function o(t){var e=t[0],a=e[0];if(\"number\"!=typeof a&&!x.isDateLike(a))throw new Error(\"Expected number or date but got \"+typeof a+\": \"+a+\".\");for(var i=1;i<e.length;i++){var n=e[i];if(null!==n&&void 0!==n&&(\"number\"!=typeof n&&!x.isArrayLike(n)))throw new Error(\"Expected number or array but got \"+typeof n+\": \"+n+\".\")}}Object.defineProperty(a,\"__esModule\",{value:!0});var s=function(){function t(t,e){var a=[],i=!0,n=!1,r=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(a.push(o.value),!e||a.length!==e);i=!0);}catch(t){n=!0,r=t}finally{try{!i&&s.return&&s.return()}finally{if(n)throw r}}return a}return function(e,a){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,a);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),l=t(\"./dygraph-layout\"),h=r(l),u=t(\"./dygraph-canvas\"),d=r(u),c=t(\"./dygraph-options\"),p=r(c),g=t(\"./dygraph-interaction-model\"),f=r(g),v=t(\"./dygraph-tickers\"),_=n(v),y=t(\"./dygraph-utils\"),x=n(y),m=t(\"./dygraph-default-attrs\"),b=r(m),w=t(\"./dygraph-options-reference\"),A=(r(w),t(\"./iframe-tarp\")),O=r(A),D=t(\"./datahandler/default\"),E=r(D),L=t(\"./datahandler/bars-error\"),T=r(L),S=t(\"./datahandler/bars-custom\"),P=r(S),C=t(\"./datahandler/default-fractions\"),M=r(C),N=t(\"./datahandler/bars-fractions\"),F=r(N),k=t(\"./datahandler/bars\"),R=r(k),I=t(\"./plugins/annotations\"),H=r(I),Y=t(\"./plugins/axes\"),X=r(Y),V=t(\"./plugins/chart-labels\"),Z=r(V),B=t(\"./plugins/grid\"),G=r(B),W=t(\"./plugins/legend\"),U=r(W),z=t(\"./plugins/range-selector\"),j=r(z),K=t(\"./dygraph-gviz\"),q=r(K),Q=function(t,e,a){this.__init__(t,e,a)};Q.NAME=\"Dygraph\",Q.VERSION=\"2.1.0\",Q.DEFAULT_ROLL_PERIOD=1,Q.DEFAULT_WIDTH=480,Q.DEFAULT_HEIGHT=320,Q.ANIMATION_STEPS=12,Q.ANIMATION_DURATION=200,Q.Plotters=d.default._Plotters,Q.addedAnnotationCSS=!1,Q.prototype.__init__=function(t,e,a){if(this.is_initial_draw_=!0,this.readyFns_=[],null!==a&&void 0!==a||(a={}),a=Q.copyUserAttrs_(a),\"string\"==typeof t&&(t=document.getElementById(t)),!t)throw new Error(\"Constructing dygraph with a non-existent div!\");this.maindiv_=t,this.file_=e,this.rollPeriod_=a.rollPeriod||Q.DEFAULT_ROLL_PERIOD,this.previousVerticalX_=-1,this.fractions_=a.fractions||!1,this.dateWindow_=a.dateWindow||null,this.annotations_=[],t.innerHTML=\"\",\"\"===t.style.width&&a.width&&(t.style.width=a.width+\"px\"),\"\"===t.style.height&&a.height&&(t.style.height=a.height+\"px\"),\"\"===t.style.height&&0===t.clientHeight&&(t.style.height=Q.DEFAULT_HEIGHT+\"px\",\"\"===t.style.width&&(t.style.width=Q.DEFAULT_WIDTH+\"px\")),this.width_=t.clientWidth||a.width||0,this.height_=t.clientHeight||a.height||0,a.stackedGraph&&(a.fillGraph=!0),this.user_attrs_={},x.update(this.user_attrs_,a),this.attrs_={},x.updateDeep(this.attrs_,b.default),this.boundaryIds_=[],this.setIndexByName_={},this.datasetIndex_=[],this.registeredEvents_=[],this.eventListeners_={},this.attributes_=new p.default(this),this.createInterface_(),this.plugins_=[];for(var i=Q.PLUGINS.concat(this.getOption(\"plugins\")),n=0;n<i.length;n++){var r,o=i[n];r=void 0!==o.activate?o:new o;var s={plugin:r,events:{},options:{},pluginOptions:{}},l=r.activate(this);for(var h in l)l.hasOwnProperty(h)&&(s.events[h]=l[h]);this.plugins_.push(s)}for(var n=0;n<this.plugins_.length;n++){var u=this.plugins_[n];for(var h in u.events)if(u.events.hasOwnProperty(h)){var d=u.events[h],c=[u.plugin,d];h in this.eventListeners_?this.eventListeners_[h].push(c):this.eventListeners_[h]=[c]}}this.createDragInterface_(),this.start_()},Q.prototype.cascadeEvents_=function(t,e){if(!(t in this.eventListeners_))return!1;var a={dygraph:this,cancelable:!1,defaultPrevented:!1,preventDefault:function(){if(!a.cancelable)throw\"Cannot call preventDefault on non-cancelable event.\";a.defaultPrevented=!0},propagationStopped:!1,stopPropagation:function(){a.propagationStopped=!0}};x.update(a,e);var i=this.eventListeners_[t];if(i)for(var n=i.length-1;n>=0;n--){var r=i[n][0],o=i[n][1];if(o.call(r,a),a.propagationStopped)break}return a.defaultPrevented},Q.prototype.getPluginInstance_=function(t){for(var e=0;e<this.plugins_.length;e++){var a=this.plugins_[e];if(a.plugin instanceof t)return a.plugin}return null},Q.prototype.isZoomed=function(t){var e=!!this.dateWindow_;if(\"x\"===t)return e;var a=this.axes_.map(function(t){return!!t.valueRange}).indexOf(!0)>=0;if(null===t||void 0===t)return e||a;if(\"y\"===t)return a;throw new Error(\"axis parameter is [\"+t+\"] must be null, 'x' or 'y'.\")},Q.prototype.toString=function(){var t=this.maindiv_;return\"[Dygraph \"+(t&&t.id?t.id:t)+\"]\"},Q.prototype.attr_=function(t,e){return e?this.attributes_.getForSeries(t,e):this.attributes_.get(t)},Q.prototype.getOption=function(t,e){return this.attr_(t,e)},Q.prototype.getNumericOption=function(t,e){return this.getOption(t,e)},Q.prototype.getStringOption=function(t,e){return this.getOption(t,e)},Q.prototype.getBooleanOption=function(t,e){return this.getOption(t,e)},Q.prototype.getFunctionOption=function(t,e){return this.getOption(t,e)},Q.prototype.getOptionForAxis=function(t,e){return this.attributes_.getForAxis(t,e)},Q.prototype.optionsViewForAxis_=function(t){var e=this;return function(a){var i=e.user_attrs_.axes;return i&&i[t]&&i[t].hasOwnProperty(a)?i[t][a]:(\"x\"!==t||\"logscale\"!==a)&&(void 0!==e.user_attrs_[a]?e.user_attrs_[a]:(i=e.attrs_.axes,i&&i[t]&&i[t].hasOwnProperty(a)?i[t][a]:\"y\"==t&&e.axes_[0].hasOwnProperty(a)?e.axes_[0][a]:\"y2\"==t&&e.axes_[1].hasOwnProperty(a)?e.axes_[1][a]:e.attr_(a)))}},Q.prototype.rollPeriod=function(){return this.rollPeriod_},Q.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},Q.prototype.xAxisExtremes=function(){var t=this.getNumericOption(\"xRangePad\")/this.plotter_.area.w;if(0===this.numRows())return[0-t,1+t];var e=this.rawData_[0][0],a=this.rawData_[this.rawData_.length-1][0];if(t){var i=a-e;e-=i*t,a+=i*t}return[e,a]},Q.prototype.yAxisExtremes=function(){var t=this.gatherDatasets_(this.rolledSeries_,null),e=t.extremes,a=this.axes_;this.computeYAxisRanges_(e);var i=this.axes_;return this.axes_=a,i.map(function(t){return t.extremeRange})},Q.prototype.yAxisRange=function(t){if(void 0===t&&(t=0),t<0||t>=this.axes_.length)return null;var e=this.axes_[t];return[e.computedValueRange[0],e.computedValueRange[1]]},Q.prototype.yAxisRanges=function(){for(var t=[],e=0;e<this.axes_.length;e++)t.push(this.yAxisRange(e));return t},Q.prototype.toDomCoords=function(t,e,a){return[this.toDomXCoord(t),this.toDomYCoord(e,a)]},Q.prototype.toDomXCoord=function(t){if(null===t)return null;var e=this.plotter_.area,a=this.xAxisRange();return e.x+(t-a[0])/(a[1]-a[0])*e.w},Q.prototype.toDomYCoord=function(t,e){var a=this.toPercentYCoord(t,e);if(null===a)return null;var i=this.plotter_.area;return i.y+a*i.h},Q.prototype.toDataCoords=function(t,e,a){return[this.toDataXCoord(t),this.toDataYCoord(e,a)]},Q.prototype.toDataXCoord=function(t){if(null===t)return null;var e=this.plotter_.area,a=this.xAxisRange();if(this.attributes_.getForAxis(\"logscale\",\"x\")){var i=(t-e.x)/e.w;return x.logRangeFraction(a[0],a[1],i)}return a[0]+(t-e.x)/e.w*(a[1]-a[0])},Q.prototype.toDataYCoord=function(t,e){if(null===t)return null;var a=this.plotter_.area,i=this.yAxisRange(e);if(void 0===e&&(e=0),this.attributes_.getForAxis(\"logscale\",e)){var n=(t-a.y)/a.h;return x.logRangeFraction(i[1],i[0],n)}return i[0]+(a.y+a.h-t)/a.h*(i[1]-i[0])},Q.prototype.toPercentYCoord=function(t,e){if(null===t)return null;void 0===e&&(e=0);var a,i=this.yAxisRange(e);if(this.attributes_.getForAxis(\"logscale\",e)){var n=x.log10(i[0]),r=x.log10(i[1]);a=(r-x.log10(t))/(r-n)}else a=(i[1]-t)/(i[1]-i[0]);return a},Q.prototype.toPercentXCoord=function(t){if(null===t)return null;var e,a=this.xAxisRange();if(!0===this.attributes_.getForAxis(\"logscale\",\"x\")){var i=x.log10(a[0]),n=x.log10(a[1]);e=(x.log10(t)-i)/(n-i)}else e=(t-a[0])/(a[1]-a[0]);return e},Q.prototype.numColumns=function(){return this.rawData_?this.rawData_[0]?this.rawData_[0].length:this.attr_(\"labels\").length:0},Q.prototype.numRows=function(){return this.rawData_?this.rawData_.length:0},Q.prototype.getValue=function(t,e){return t<0||t>this.rawData_.length?null:e<0||e>this.rawData_[t].length?null:this.rawData_[t][e]},Q.prototype.createInterface_=function(){var t=this.maindiv_;this.graphDiv=document.createElement(\"div\"),this.graphDiv.style.textAlign=\"left\",this.graphDiv.style.position=\"relative\",t.appendChild(this.graphDiv),this.canvas_=x.createCanvas(),this.canvas_.style.position=\"absolute\",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=x.getContext(this.canvas_),this.hidden_ctx_=x.getContext(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new h.default(this);var e=this;this.mouseMoveHandler_=function(t){e.mouseMove_(t)},this.mouseOutHandler_=function(t){var a=t.target||t.fromElement,i=t.relatedTarget||t.toElement;x.isNodeContainedBy(a,e.graphDiv)&&!x.isNodeContainedBy(i,e.graphDiv)&&e.mouseOut_(t)},this.addAndTrackEvent(window,\"mouseout\",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,\"mousemove\",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(t){e.resize()},this.addAndTrackEvent(window,\"resize\",this.resizeHandler_))},Q.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+\"px\",this.graphDiv.style.height=this.height_+\"px\";var t=this.getNumericOption(\"pixelRatio\"),e=t||x.getContextPixelRatio(this.canvas_ctx_);this.canvas_.width=this.width_*e,this.canvas_.height=this.height_*e,this.canvas_.style.width=this.width_+\"px\",this.canvas_.style.height=this.height_+\"px\",1!==e&&this.canvas_ctx_.scale(e,e);var a=t||x.getContextPixelRatio(this.hidden_ctx_);this.hidden_.width=this.width_*a,this.hidden_.height=this.height_*a,this.hidden_.style.width=this.width_+\"px\",this.hidden_.style.height=this.height_+\"px\",1!==a&&this.hidden_ctx_.scale(a,a)},Q.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var t=this.plugins_.length-1;t>=0;t--){var e=this.plugins_.pop();e.plugin.destroy&&e.plugin.destroy()}this.removeTrackedEvents_(),x.removeEvent(window,\"mouseout\",this.mouseOutHandler_),x.removeEvent(this.mouseEventElement_,\"mousemove\",this.mouseMoveHandler_),x.removeEvent(window,\"resize\",this.resizeHandler_),this.resizeHandler_=null,function t(e){for(;e.hasChildNodes();)t(e.firstChild),e.removeChild(e.firstChild)}(this.maindiv_);var a=function(t){for(var e in t)\"object\"==typeof t[e]&&(t[e]=null)};a(this.layout_),a(this.plotter_),a(this)},Q.prototype.createPlotKitCanvas_=function(t){var e=x.createCanvas();return e.style.position=\"absolute\",e.style.top=t.style.top,e.style.left=t.style.left,\ne.width=this.width_,e.height=this.height_,e.style.width=this.width_+\"px\",e.style.height=this.height_+\"px\",e},Q.prototype.createMouseEventElement_=function(){return this.canvas_},Q.prototype.setColors_=function(){var t=this.getLabels(),e=t.length-1;this.colors_=[],this.colorsMap_={};for(var a=this.getNumericOption(\"colorSaturation\")||1,i=this.getNumericOption(\"colorValue\")||.5,n=Math.ceil(e/2),r=this.getOption(\"colors\"),o=this.visibility(),s=0;s<e;s++)if(o[s]){var l=t[s+1],h=this.attributes_.getForSeries(\"color\",l);if(!h)if(r)h=r[s%r.length];else{var u=s%2?n+(s+1)/2:Math.ceil((s+1)/2),d=1*u/(1+e);h=x.hsvToRGB(d,a,i)}this.colors_.push(h),this.colorsMap_[l]=h}},Q.prototype.getColors=function(){return this.colors_},Q.prototype.getPropertiesForSeries=function(t){for(var e=-1,a=this.getLabels(),i=1;i<a.length;i++)if(a[i]==t){e=i;break}return-1==e?null:{name:t,column:e,visible:this.visibility()[e-1],color:this.colorsMap_[t],axis:1+this.attributes_.axisForSeries(t)}},Q.prototype.createRollInterface_=function(){var t=this,e=this.roller_;e||(this.roller_=e=document.createElement(\"input\"),e.type=\"text\",e.style.display=\"none\",e.className=\"dygraph-roller\",this.graphDiv.appendChild(e));var a=this.getBooleanOption(\"showRoller\")?\"block\":\"none\",i=this.getArea(),n={top:i.y+i.h-25+\"px\",left:i.x+1+\"px\",display:a};e.size=\"2\",e.value=this.rollPeriod_,x.update(e.style,n),e.onchange=function(){return t.adjustRoll(e.value)}},Q.prototype.createDragInterface_=function(){var t={isZooming:!1,isPanning:!1,is2DPan:!1,dragStartX:null,dragStartY:null,dragEndX:null,dragEndY:null,dragDirection:null,prevEndX:null,prevEndY:null,prevDragDirection:null,cancelNextDblclick:!1,initialLeftmostDate:null,xUnitsPerPixel:null,dateRange:null,px:0,py:0,boundedDates:null,boundedValues:null,tarp:new O.default,initializeMouseDown:function(t,e,a){t.preventDefault?t.preventDefault():(t.returnValue=!1,t.cancelBubble=!0);var i=x.findPos(e.canvas_);a.px=i.x,a.py=i.y,a.dragStartX=x.dragGetX_(t,a),a.dragStartY=x.dragGetY_(t,a),a.cancelNextDblclick=!1,a.tarp.cover()},destroy:function(){var t=this;if((t.isZooming||t.isPanning)&&(t.isZooming=!1,t.dragStartX=null,t.dragStartY=null),t.isPanning){t.isPanning=!1,t.draggingDate=null,t.dateRange=null;for(var e=0;e<a.axes_.length;e++)delete a.axes_[e].draggingValue,delete a.axes_[e].dragValueRange}t.tarp.uncover()}},e=this.getOption(\"interactionModel\"),a=this;for(var i in e)e.hasOwnProperty(i)&&this.addAndTrackEvent(this.mouseEventElement_,i,function(e){return function(i){e(i,a,t)}}(e[i]));if(!e.willDestroyContextMyself){var n=function(e){t.destroy()};this.addAndTrackEvent(document,\"mouseup\",n)}},Q.prototype.drawZoomRect_=function(t,e,a,i,n,r,o,s){var l=this.canvas_ctx_;r==x.HORIZONTAL?l.clearRect(Math.min(e,o),this.layout_.getPlotArea().y,Math.abs(e-o),this.layout_.getPlotArea().h):r==x.VERTICAL&&l.clearRect(this.layout_.getPlotArea().x,Math.min(i,s),this.layout_.getPlotArea().w,Math.abs(i-s)),t==x.HORIZONTAL?a&&e&&(l.fillStyle=\"rgba(128,128,128,0.33)\",l.fillRect(Math.min(e,a),this.layout_.getPlotArea().y,Math.abs(a-e),this.layout_.getPlotArea().h)):t==x.VERTICAL&&n&&i&&(l.fillStyle=\"rgba(128,128,128,0.33)\",l.fillRect(this.layout_.getPlotArea().x,Math.min(i,n),this.layout_.getPlotArea().w,Math.abs(n-i)))},Q.prototype.clearZoomRect_=function(){this.currentZoomRectArgs_=null,this.canvas_ctx_.clearRect(0,0,this.width_,this.height_)},Q.prototype.doZoomX_=function(t,e){this.currentZoomRectArgs_=null;var a=this.toDataXCoord(t),i=this.toDataXCoord(e);this.doZoomXDates_(a,i)},Q.prototype.doZoomXDates_=function(t,e){var a=this,i=this.xAxisRange(),n=[t,e],r=this.getFunctionOption(\"zoomCallback\");this.doAnimatedZoom(i,n,null,null,function(){r&&r.call(a,t,e,a.yAxisRanges())})},Q.prototype.doZoomY_=function(t,e){var a=this;this.currentZoomRectArgs_=null;for(var i=this.yAxisRanges(),n=[],r=0;r<this.axes_.length;r++){var o=this.toDataYCoord(t,r),l=this.toDataYCoord(e,r);n.push([l,o])}var h=this.getFunctionOption(\"zoomCallback\");this.doAnimatedZoom(null,null,i,n,function(){if(h){var t=a.xAxisRange(),e=s(t,2),i=e[0],n=e[1];h.call(a,i,n,a.yAxisRanges())}})},Q.zoomAnimationFunction=function(t,e){return(1-Math.pow(1.5,-t))/(1-Math.pow(1.5,-e))},Q.prototype.resetZoom=function(){var t=this,e=this.isZoomed(\"x\"),a=this.isZoomed(\"y\"),i=e||a;if(this.clearSelection(),i){var n=this.xAxisExtremes(),r=s(n,2),o=r[0],l=r[1],h=this.getBooleanOption(\"animatedZooms\"),u=this.getFunctionOption(\"zoomCallback\");if(!h)return this.dateWindow_=null,this.axes_.forEach(function(t){t.valueRange&&delete t.valueRange}),this.drawGraph_(),void(u&&u.call(this,o,l,this.yAxisRanges()));var d=null,c=null,p=null,g=null;e&&(d=this.xAxisRange(),c=[o,l]),a&&(p=this.yAxisRanges(),g=this.yAxisExtremes()),this.doAnimatedZoom(d,c,p,g,function(){t.dateWindow_=null,t.axes_.forEach(function(t){t.valueRange&&delete t.valueRange}),u&&u.call(t,o,l,t.yAxisRanges())})}},Q.prototype.doAnimatedZoom=function(t,e,a,i,n){var r,o,s=this,l=this.getBooleanOption(\"animatedZooms\")?Q.ANIMATION_STEPS:1,h=[],u=[];if(null!==t&&null!==e)for(r=1;r<=l;r++)o=Q.zoomAnimationFunction(r,l),h[r-1]=[t[0]*(1-o)+o*e[0],t[1]*(1-o)+o*e[1]];if(null!==a&&null!==i)for(r=1;r<=l;r++){o=Q.zoomAnimationFunction(r,l);for(var d=[],c=0;c<this.axes_.length;c++)d.push([a[c][0]*(1-o)+o*i[c][0],a[c][1]*(1-o)+o*i[c][1]]);u[r-1]=d}x.repeatAndCleanup(function(t){if(u.length)for(var e=0;e<s.axes_.length;e++){var a=u[t][e];s.axes_[e].valueRange=[a[0],a[1]]}h.length&&(s.dateWindow_=h[t]),s.drawGraph_()},l,Q.ANIMATION_DURATION/l,n)},Q.prototype.getArea=function(){return this.plotter_.area},Q.prototype.eventToDomCoords=function(t){if(t.offsetX&&t.offsetY)return[t.offsetX,t.offsetY];var e=x.findPos(this.mouseEventElement_);return[x.pageX(t)-e.x,x.pageY(t)-e.y]},Q.prototype.findClosestRow=function(t){for(var e=1/0,a=-1,i=this.layout_.points,n=0;n<i.length;n++)for(var r=i[n],o=r.length,s=0;s<o;s++){var l=r[s];if(x.isValidPoint(l,!0)){var h=Math.abs(l.canvasx-t);h<e&&(e=h,a=l.idx)}}return a},Q.prototype.findClosestPoint=function(t,e){for(var a,i,n,r,o,s,l,h=1/0,u=this.layout_.points.length-1;u>=0;--u)for(var d=this.layout_.points[u],c=0;c<d.length;++c)r=d[c],x.isValidPoint(r)&&(i=r.canvasx-t,n=r.canvasy-e,(a=i*i+n*n)<h&&(h=a,o=r,s=u,l=r.idx));return{row:l,seriesName:this.layout_.setNames[s],point:o}},Q.prototype.findStackedPoint=function(t,e){for(var a,i,n=this.findClosestRow(t),r=0;r<this.layout_.points.length;++r){var o=this.getLeftBoundary_(r),s=n-o,l=this.layout_.points[r];if(!(s>=l.length)){var h=l[s];if(x.isValidPoint(h)){var u=h.canvasy;if(t>h.canvasx&&s+1<l.length){var d=l[s+1];if(x.isValidPoint(d)){var c=d.canvasx-h.canvasx;if(c>0){var p=(t-h.canvasx)/c;u+=p*(d.canvasy-h.canvasy)}}}else if(t<h.canvasx&&s>0){var g=l[s-1];if(x.isValidPoint(g)){var c=h.canvasx-g.canvasx;if(c>0){var p=(h.canvasx-t)/c;u+=p*(g.canvasy-h.canvasy)}}}(0===r||u<e)&&(a=h,i=r)}}}return{row:n,seriesName:this.layout_.setNames[i],point:a}},Q.prototype.mouseMove_=function(t){var e=this.layout_.points;if(void 0!==e&&null!==e){var a=this.eventToDomCoords(t),i=a[0],n=a[1],r=this.getOption(\"highlightSeriesOpts\"),o=!1;if(r&&!this.isSeriesLocked()){var s;s=this.getBooleanOption(\"stackedGraph\")?this.findStackedPoint(i,n):this.findClosestPoint(i,n),o=this.setSelection(s.row,s.seriesName)}else{var l=this.findClosestRow(i);o=this.setSelection(l)}var h=this.getFunctionOption(\"highlightCallback\");h&&o&&h.call(this,t,this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}},Q.prototype.getLeftBoundary_=function(t){if(this.boundaryIds_[t])return this.boundaryIds_[t][0];for(var e=0;e<this.boundaryIds_.length;e++)if(void 0!==this.boundaryIds_[e])return this.boundaryIds_[e][0];return 0},Q.prototype.animateSelection_=function(t){void 0===this.fadeLevel&&(this.fadeLevel=0),void 0===this.animateId&&(this.animateId=0);var e=this.fadeLevel,a=t<0?e:10-e;if(a<=0)return void(this.fadeLevel&&this.updateSelection_(1));var i=++this.animateId,n=this,r=function(){0!==n.fadeLevel&&t<0&&(n.fadeLevel=0,n.clearSelection())};x.repeatAndCleanup(function(e){n.animateId==i&&(n.fadeLevel+=t,0===n.fadeLevel?n.clearSelection():n.updateSelection_(n.fadeLevel/10))},a,30,r)},Q.prototype.updateSelection_=function(t){this.cascadeEvents_(\"select\",{selectedRow:-1===this.lastRow_?void 0:this.lastRow_,selectedX:-1===this.lastx_?void 0:this.lastx_,selectedPoints:this.selPoints_});var e,a=this.canvas_ctx_;if(this.getOption(\"highlightSeriesOpts\")){a.clearRect(0,0,this.width_,this.height_);var i=1-this.getNumericOption(\"highlightSeriesBackgroundAlpha\"),n=x.toRGB_(this.getOption(\"highlightSeriesBackgroundColor\"));if(i){if(void 0===t)return void this.animateSelection_(1);i*=t,a.fillStyle=\"rgba(\"+n.r+\",\"+n.g+\",\"+n.b+\",\"+i+\")\",a.fillRect(0,0,this.width_,this.height_)}this.plotter_._renderLineChart(this.highlightSet_,a)}else if(this.previousVerticalX_>=0){var r=0,o=this.attr_(\"labels\");for(e=1;e<o.length;e++){var s=this.getNumericOption(\"highlightCircleSize\",o[e]);s>r&&(r=s)}var l=this.previousVerticalX_;a.clearRect(l-r-1,0,2*r+2,this.height_)}if(this.selPoints_.length>0){var h=this.selPoints_[0].canvasx;for(a.save(),e=0;e<this.selPoints_.length;e++){var u=this.selPoints_[e];if(!isNaN(u.canvasy)){var d=this.getNumericOption(\"highlightCircleSize\",u.name),c=this.getFunctionOption(\"drawHighlightPointCallback\",u.name),p=this.plotter_.colors[u.name];c||(c=x.Circles.DEFAULT),a.lineWidth=this.getNumericOption(\"strokeWidth\",u.name),a.strokeStyle=p,a.fillStyle=p,c.call(this,this,u.name,a,h,u.canvasy,p,d,u.idx)}}a.restore(),this.previousVerticalX_=h}},Q.prototype.setSelection=function(t,e,a){this.selPoints_=[];var i=!1;if(!1!==t&&t>=0){t!=this.lastRow_&&(i=!0),this.lastRow_=t;for(var n=0;n<this.layout_.points.length;++n){var r=this.layout_.points[n],o=t-this.getLeftBoundary_(n);if(o>=0&&o<r.length&&r[o].idx==t){var s=r[o];null!==s.yval&&this.selPoints_.push(s)}else for(var l=0;l<r.length;++l){var s=r[l];if(s.idx==t){null!==s.yval&&this.selPoints_.push(s);break}}}}else this.lastRow_>=0&&(i=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==e&&(this.highlightSet_!==e&&(i=!0),this.highlightSet_=e),void 0!==a&&(this.lockedSet_=a),i&&this.updateSelection_(void 0),i},Q.prototype.mouseOut_=function(t){this.getFunctionOption(\"unhighlightCallback\")&&this.getFunctionOption(\"unhighlightCallback\").call(this,t),this.getBooleanOption(\"hideOverlayOnMouseOut\")&&!this.lockedSet_&&this.clearSelection()},Q.prototype.clearSelection=function(){if(this.cascadeEvents_(\"deselect\",{}),this.lockedSet_=!1,this.fadeLevel)return void this.animateSelection_(-1);this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,this.highlightSet_=null},Q.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var t=0;t<this.layout_.points.length;t++)for(var e=this.layout_.points[t],a=0;a<e.length;a++)if(e[a].x==this.selPoints_[0].x)return e[a].idx;return-1},Q.prototype.getHighlightSeries=function(){return this.highlightSet_},Q.prototype.isSeriesLocked=function(){return this.lockedSet_},Q.prototype.loadedEvent_=function(t){this.rawData_=this.parseCSV_(t),this.cascadeDataDidUpdateEvent_(),this.predraw_()},Q.prototype.addXTicks_=function(){var t;t=this.dateWindow_?[this.dateWindow_[0],this.dateWindow_[1]]:this.xAxisExtremes();var e=this.optionsViewForAxis_(\"x\"),a=e(\"ticker\")(t[0],t[1],this.plotter_.area.w,e,this);this.layout_.setXTicks(a)},Q.prototype.getHandlerClass_=function(){return this.attr_(\"dataHandler\")?this.attr_(\"dataHandler\"):this.fractions_?this.getBooleanOption(\"errorBars\")?F.default:M.default:this.getBooleanOption(\"customBars\")?P.default:this.getBooleanOption(\"errorBars\")?T.default:E.default},Q.prototype.predraw_=function(){var t=new Date;this.dataHandler_=new(this.getHandlerClass_()),this.layout_.computePlotArea(),this.computeYAxes_(),this.is_initial_draw_||(this.canvas_ctx_.restore(),this.hidden_ctx_.restore()),this.canvas_ctx_.save(),this.hidden_ctx_.save(),this.plotter_=new d.default(this,this.hidden_,this.hidden_ctx_,this.layout_),this.createRollInterface_(),this.cascadeEvents_(\"predraw\"),this.rolledSeries_=[null];for(var e=1;e<this.numColumns();e++){var a=this.dataHandler_.extractSeries(this.rawData_,e,this.attributes_);this.rollPeriod_>1&&(a=this.dataHandler_.rollingAverage(a,this.rollPeriod_,this.attributes_)),this.rolledSeries_.push(a)}this.drawGraph_();var i=new Date;this.drawingTimeMs_=i-t},Q.PointType=void 0,Q.stackPoints_=function(t,e,a,i){for(var n=null,r=null,o=null,s=-1,l=0;l<t.length;++l){var h=t[l],u=h.xval;void 0===e[u]&&(e[u]=0);var d=h.yval;isNaN(d)||null===d?\"none\"==i?d=0:(!function(e){if(!(s>=e))for(var a=e;a<t.length;++a)if(o=null,!isNaN(t[a].yval)&&null!==t[a].yval){s=a,o=t[a];break}}(l),d=r&&o&&\"none\"!=i?r.yval+(o.yval-r.yval)*((u-r.xval)/(o.xval-r.xval)):r&&\"all\"==i?r.yval:o&&\"all\"==i?o.yval:0):r=h;var c=e[u];n!=u&&(c+=d,e[u]=c),n=u,h.yval_stacked=c,c>a[1]&&(a[1]=c),c<a[0]&&(a[0]=c)}},Q.prototype.gatherDatasets_=function(t,e){var a,i,n,r,o,s,l=[],h=[],u=[],d={},c=t.length-1;for(a=c;a>=1;a--)if(this.visibility()[a-1]){if(e){s=t[a];var p=e[0],g=e[1];for(n=null,r=null,i=0;i<s.length;i++)s[i][0]>=p&&null===n&&(n=i),s[i][0]<=g&&(r=i);null===n&&(n=0);for(var f=n,v=!0;v&&f>0;)f--,v=null===s[f][1];null===r&&(r=s.length-1);var _=r;for(v=!0;v&&_<s.length-1;)_++,v=null===s[_][1];f!==n&&(n=f),_!==r&&(r=_),l[a-1]=[n,r],s=s.slice(n,r+1)}else s=t[a],l[a-1]=[0,s.length-1];var y=this.attr_(\"labels\")[a],x=this.dataHandler_.getExtremeYValues(s,e,this.getBooleanOption(\"stepPlot\",y)),m=this.dataHandler_.seriesToPoints(s,y,l[a-1][0]);this.getBooleanOption(\"stackedGraph\")&&(o=this.attributes_.axisForSeries(y),void 0===u[o]&&(u[o]=[]),Q.stackPoints_(m,u[o],x,this.getBooleanOption(\"stackedGraphNaNFill\"))),d[y]=x,h[a]=m}return{points:h,extremes:d,boundaryIds:l}},Q.prototype.drawGraph_=function(){var t=new Date,e=this.is_initial_draw_;this.is_initial_draw_=!1,this.layout_.removeAllDatasets(),this.setColors_(),this.attrs_.pointSize=.5*this.getNumericOption(\"highlightCircleSize\");var a=this.gatherDatasets_(this.rolledSeries_,this.dateWindow_),i=a.points,n=a.extremes;this.boundaryIds_=a.boundaryIds,this.setIndexByName_={};for(var r=this.attr_(\"labels\"),o=0,s=1;s<i.length;s++)this.visibility()[s-1]&&(this.layout_.addDataset(r[s],i[s]),this.datasetIndex_[s]=o++);for(var s=0;s<r.length;s++)this.setIndexByName_[r[s]]=s;if(this.computeYAxisRanges_(n),this.layout_.setYAxes(this.axes_),this.addXTicks_(),this.layout_.evaluate(),this.renderGraph_(e),this.getStringOption(\"timingName\")){var l=new Date;console.log(this.getStringOption(\"timingName\")+\" - drawGraph: \"+(l-t)+\"ms\")}},Q.prototype.renderGraph_=function(t){this.cascadeEvents_(\"clearChart\"),this.plotter_.clear();var e=this.getFunctionOption(\"underlayCallback\");e&&e.call(this,this.hidden_ctx_,this.layout_.getPlotArea(),this,this);var a={canvas:this.hidden_,drawingContext:this.hidden_ctx_};this.cascadeEvents_(\"willDrawChart\",a),this.plotter_.render(),this.cascadeEvents_(\"didDrawChart\",a),this.lastRow_=-1,this.canvas_.getContext(\"2d\").clearRect(0,0,this.width_,this.height_);var i=this.getFunctionOption(\"drawCallback\");if(null!==i&&i.call(this,this,t),t)for(this.readyFired_=!0;this.readyFns_.length>0;){var n=this.readyFns_.pop();n(this)}},Q.prototype.computeYAxes_=function(){var t,e,a;for(this.axes_=[],t=0;t<this.attributes_.numAxes();t++)e={g:this},x.update(e,this.attributes_.axisOptions(t)),this.axes_[t]=e;for(t=0;t<this.axes_.length;t++)if(0===t)e=this.optionsViewForAxis_(\"y\"+(t?\"2\":\"\")),(a=e(\"valueRange\"))&&(this.axes_[t].valueRange=a);else{var i=this.user_attrs_.axes;i&&i.y2&&(a=i.y2.valueRange)&&(this.axes_[t].valueRange=a)}},Q.prototype.numAxes=function(){return this.attributes_.numAxes()},Q.prototype.axisPropertiesForSeries=function(t){return this.axes_[this.attributes_.axisForSeries(t)]},Q.prototype.computeYAxisRanges_=function(t){for(var e,a,i,n,r,o=function(t){return isNaN(parseFloat(t))},s=this.attributes_.numAxes(),l=0;l<s;l++){var h=this.axes_[l],u=this.attributes_.getForAxis(\"logscale\",l),d=this.attributes_.getForAxis(\"includeZero\",l),c=this.attributes_.getForAxis(\"independentTicks\",l);i=this.attributes_.seriesForAxis(l),e=!0,n=.1;var p=this.getNumericOption(\"yRangePad\");if(null!==p&&(e=!1,n=p/this.plotter_.area.h),0===i.length)h.extremeRange=[0,1];else{for(var g,f,v=1/0,_=-1/0,y=0;y<i.length;y++)t.hasOwnProperty(i[y])&&(g=t[i[y]][0],null!==g&&(v=Math.min(g,v)),null!==(f=t[i[y]][1])&&(_=Math.max(f,_)));d&&!u&&(v>0&&(v=0),_<0&&(_=0)),v==1/0&&(v=0),_==-1/0&&(_=1),a=_-v,0===a&&(0!==_?a=Math.abs(_):(_=1,a=1));var m=_,b=v;e&&(u?(m=_+n*a,b=v):(m=_+n*a,b=v-n*a,b<0&&v>=0&&(b=0),m>0&&_<=0&&(m=0))),h.extremeRange=[b,m]}if(h.valueRange){var w=o(h.valueRange[0])?h.extremeRange[0]:h.valueRange[0],A=o(h.valueRange[1])?h.extremeRange[1]:h.valueRange[1];h.computedValueRange=[w,A]}else h.computedValueRange=h.extremeRange;if(!e)if(w=h.computedValueRange[0],A=h.computedValueRange[1],w===A&&(w-=.5,A+=.5),u){var O=n/(2*n-1),D=(n-1)/(2*n-1);h.computedValueRange[0]=x.logRangeFraction(w,A,O),h.computedValueRange[1]=x.logRangeFraction(w,A,D)}else a=A-w,h.computedValueRange[0]=w-a*n,h.computedValueRange[1]=A+a*n;if(c){h.independentTicks=c;var E=this.optionsViewForAxis_(\"y\"+(l?\"2\":\"\")),L=E(\"ticker\");h.ticks=L(h.computedValueRange[0],h.computedValueRange[1],this.plotter_.area.h,E,this),r||(r=h)}}if(void 0===r)throw'Configuration Error: At least one axis has to have the \"independentTicks\" option activated.';for(var l=0;l<s;l++){var h=this.axes_[l];if(!h.independentTicks){for(var E=this.optionsViewForAxis_(\"y\"+(l?\"2\":\"\")),L=E(\"ticker\"),T=r.ticks,S=r.computedValueRange[1]-r.computedValueRange[0],P=h.computedValueRange[1]-h.computedValueRange[0],C=[],M=0;M<T.length;M++){var N=(T[M].v-r.computedValueRange[0])/S,F=h.computedValueRange[0]+N*P;C.push(F)}h.ticks=L(h.computedValueRange[0],h.computedValueRange[1],this.plotter_.area.h,E,this,C)}}},Q.prototype.detectTypeFromString_=function(t){var e=!1,a=t.indexOf(\"-\");a>0&&\"e\"!=t[a-1]&&\"E\"!=t[a-1]||t.indexOf(\"/\")>=0||isNaN(parseFloat(t))?e=!0:8==t.length&&t>\"19700101\"&&t<\"20371231\"&&(e=!0),this.setXAxisOptions_(e)},Q.prototype.setXAxisOptions_=function(t){t?(this.attrs_.xValueParser=x.dateParser,this.attrs_.axes.x.valueFormatter=x.dateValueFormatter,this.attrs_.axes.x.ticker=_.dateTicker,this.attrs_.axes.x.axisLabelFormatter=x.dateAxisLabelFormatter):(this.attrs_.xValueParser=function(t){return parseFloat(t)},this.attrs_.axes.x.valueFormatter=function(t){return t},this.attrs_.axes.x.ticker=_.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},Q.prototype.parseCSV_=function(t){var e,a,i=[],n=x.detectLineDelimiter(t),r=t.split(n||\"\\n\"),o=this.getStringOption(\"delimiter\");-1==r[0].indexOf(o)&&r[0].indexOf(\"\\t\")>=0&&(o=\"\\t\");var s=0;\"labels\"in this.user_attrs_||(s=1,this.attrs_.labels=r[0].split(o),this.attributes_.reparseSeries());for(var l,h=!1,u=this.attr_(\"labels\").length,d=!1,c=s;c<r.length;c++){var p=r[c];if(c,0!==p.length&&\"#\"!=p[0]){var g=p.split(o);if(!(g.length<2)){var f=[];if(h||(this.detectTypeFromString_(g[0]),l=this.getFunctionOption(\"xValueParser\"),h=!0),f[0]=l(g[0],this),this.fractions_)for(a=1;a<g.length;a++)e=g[a].split(\"/\"),2!=e.length?(console.error('Expected fractional \"num/den\" values in CSV data but found a value \\''+g[a]+\"' on line \"+(1+c)+\" ('\"+p+\"') which is not of this form.\"),f[a]=[0,0]):f[a]=[x.parseFloat_(e[0],c,p),x.parseFloat_(e[1],c,p)];else if(this.getBooleanOption(\"errorBars\"))for(g.length%2!=1&&console.error(\"Expected alternating (value, stdev.) pairs in CSV data but line \"+(1+c)+\" has an odd number of values (\"+(g.length-1)+\"): '\"+p+\"'\"),a=1;a<g.length;a+=2)f[(a+1)/2]=[x.parseFloat_(g[a],c,p),x.parseFloat_(g[a+1],c,p)];else if(this.getBooleanOption(\"customBars\"))for(a=1;a<g.length;a++){var v=g[a];/^ *$/.test(v)?f[a]=[null,null,null]:(e=v.split(\";\"),3==e.length?f[a]=[x.parseFloat_(e[0],c,p),x.parseFloat_(e[1],c,p),x.parseFloat_(e[2],c,p)]:console.warn('When using customBars, values must be either blank or \"low;center;high\" tuples (got \"'+v+'\" on line '+(1+c)))}else for(a=1;a<g.length;a++)f[a]=x.parseFloat_(g[a],c,p);if(i.length>0&&f[0]<i[i.length-1][0]&&(d=!0),f.length!=u&&console.error(\"Number of columns in line \"+c+\" (\"+f.length+\") does not agree with number of labels (\"+u+\") \"+p),0===c&&this.attr_(\"labels\")){var _=!0;for(a=0;_&&a<f.length;a++)f[a]&&(_=!1);if(_){console.warn(\"The dygraphs 'labels' option is set, but the first row of CSV data ('\"+p+\"') appears to also contain labels. Will drop the CSV labels and use the option labels.\");continue}}i.push(f)}}}return d&&(console.warn(\"CSV is out of order; order it correctly to speed loading.\"),i.sort(function(t,e){return t[0]-e[0]})),i},Q.prototype.parseArray_=function(t){if(0===t.length)return console.error(\"Can't plot empty data set\"),null;if(0===t[0].length)return console.error(\"Data set cannot contain an empty row\"),null;o(t);var e;if(null===this.attr_(\"labels\")){for(console.warn(\"Using default labels. Set labels explicitly via 'labels' in the options parameter\"),this.attrs_.labels=[\"X\"],e=1;e<t[0].length;e++)this.attrs_.labels.push(\"Y\"+e);this.attributes_.reparseSeries()}else{var a=this.attr_(\"labels\");if(a.length!=t[0].length)return console.error(\"Mismatch between number of labels (\"+a+\") and number of columns in array (\"+t[0].length+\")\"),null}if(x.isDateLike(t[0][0])){this.attrs_.axes.x.valueFormatter=x.dateValueFormatter,this.attrs_.axes.x.ticker=_.dateTicker,this.attrs_.axes.x.axisLabelFormatter=x.dateAxisLabelFormatter;var i=x.clone(t);for(e=0;e<t.length;e++){if(0===i[e].length)return console.error(\"Row \"+(1+e)+\" of data is empty\"),null;if(null===i[e][0]||\"function\"!=typeof i[e][0].getTime||isNaN(i[e][0].getTime()))return console.error(\"x value in row \"+(1+e)+\" is not a Date\"),null;i[e][0]=i[e][0].getTime()}return i}return this.attrs_.axes.x.valueFormatter=function(t){return t},this.attrs_.axes.x.ticker=_.numericTicks,this.attrs_.axes.x.axisLabelFormatter=x.numberAxisLabelFormatter,t},Q.prototype.parseDataTable_=function(t){var e=t.getNumberOfColumns(),a=t.getNumberOfRows(),i=t.getColumnType(0);if(\"date\"==i||\"datetime\"==i)this.attrs_.xValueParser=x.dateParser,this.attrs_.axes.x.valueFormatter=x.dateValueFormatter,this.attrs_.axes.x.ticker=_.dateTicker,this.attrs_.axes.x.axisLabelFormatter=x.dateAxisLabelFormatter;else{if(\"number\"!=i)throw new Error(\"only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '\"+i+\"')\");this.attrs_.xValueParser=function(t){return parseFloat(t)},this.attrs_.axes.x.valueFormatter=function(t){return t},this.attrs_.axes.x.ticker=_.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var n,r,o=[],s={},l=!1;for(n=1;n<e;n++){var h=t.getColumnType(n);if(\"number\"==h)o.push(n);else{if(\"string\"!=h||!this.getBooleanOption(\"displayAnnotations\"))throw new Error(\"Only 'number' is supported as a dependent type with Gviz. 'string' is only supported if displayAnnotations is true\");var u=o[o.length-1];s.hasOwnProperty(u)?s[u].push(n):s[u]=[n],l=!0}}var d=[t.getColumnLabel(0)];for(n=0;n<o.length;n++)d.push(t.getColumnLabel(o[n])),this.getBooleanOption(\"errorBars\")&&(n+=1);this.attrs_.labels=d,e=d.length;var c=[],p=!1,g=[];for(n=0;n<a;n++){var f=[];if(void 0!==t.getValue(n,0)&&null!==t.getValue(n,0)){if(\"date\"==i||\"datetime\"==i?f.push(t.getValue(n,0).getTime()):f.push(t.getValue(n,0)),this.getBooleanOption(\"errorBars\"))for(r=0;r<e-1;r++)f.push([t.getValue(n,1+2*r),t.getValue(n,2+2*r)]);else{for(r=0;r<o.length;r++){var v=o[r];if(f.push(t.getValue(n,v)),l&&s.hasOwnProperty(v)&&null!==t.getValue(n,s[v][0])){var y={};y.series=t.getColumnLabel(v),y.xval=f[0],y.shortText=function(t){var e=String.fromCharCode(65+t%26);for(t=Math.floor(t/26);t>0;)e=String.fromCharCode(65+(t-1)%26)+e.toLowerCase(),t=Math.floor((t-1)/26);return e}(g.length),y.text=\"\";for(var m=0;m<s[v].length;m++)m&&(y.text+=\"\\n\"),y.text+=t.getValue(n,s[v][m]);g.push(y)}}for(r=0;r<f.length;r++)isFinite(f[r])||(f[r]=null)}c.length>0&&f[0]<c[c.length-1][0]&&(p=!0),c.push(f)}else console.warn(\"Ignoring row \"+n+\" of DataTable because of undefined or null first column.\")}p&&(console.warn(\"DataTable is out of order; order it correctly to speed loading.\"),c.sort(function(t,e){return t[0]-e[0]})),this.rawData_=c,g.length>0&&this.setAnnotations(g,!0),this.attributes_.reparseSeries()},Q.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_(\"dataDidUpdate\",{})},Q.prototype.start_=function(){var t=this.file_;if(\"function\"==typeof t&&(t=t()),x.isArrayLike(t))this.rawData_=this.parseArray_(t),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if(\"object\"==typeof t&&\"function\"==typeof t.getColumnRange)this.parseDataTable_(t),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if(\"string\"==typeof t){var e=x.detectLineDelimiter(t);if(e)this.loadedEvent_(t);else{var a;a=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject(\"Microsoft.XMLHTTP\");var i=this;a.onreadystatechange=function(){4==a.readyState&&(200!==a.status&&0!==a.status||i.loadedEvent_(a.responseText))},a.open(\"GET\",t,!0),a.send(null)}}else console.error(\"Unknown data format: \"+typeof t)},Q.prototype.updateOptions=function(t,e){void 0===e&&(e=!1);var a=t.file,i=Q.copyUserAttrs_(t);\"rollPeriod\"in i&&(this.rollPeriod_=i.rollPeriod),\"dateWindow\"in i&&(this.dateWindow_=i.dateWindow);var n=x.isPixelChangingOptionList(this.attr_(\"labels\"),i);x.updateDeep(this.user_attrs_,i),this.attributes_.reparseSeries(),a?(this.cascadeEvents_(\"dataWillUpdate\",{}),this.file_=a,e||this.start_()):e||(n?this.predraw_():this.renderGraph_(!1))},Q.copyUserAttrs_=function(t){var e={};for(var a in t)t.hasOwnProperty(a)&&\"file\"!=a&&t.hasOwnProperty(a)&&(e[a]=t[a]);return e},Q.prototype.resize=function(t,e){if(!this.resize_lock){this.resize_lock=!0,null===t!=(null===e)&&(console.warn(\"Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.\"),t=e=null);var a=this.width_,i=this.height_;t?(this.maindiv_.style.width=t+\"px\",this.maindiv_.style.height=e+\"px\",this.width_=t,this.height_=e):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),a==this.width_&&i==this.height_||(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},Q.prototype.adjustRoll=function(t){this.rollPeriod_=t,this.predraw_()},Q.prototype.visibility=function(){for(this.getOption(\"visibility\")||(this.attrs_.visibility=[]);this.getOption(\"visibility\").length<this.numColumns()-1;)this.attrs_.visibility.push(!0);return this.getOption(\"visibility\")},Q.prototype.setVisibility=function(t,e){var a=this.visibility(),i=!1;if(Array.isArray(t)||(null!==t&&\"object\"==typeof t?i=!0:t=[t]),i)for(var n in t)t.hasOwnProperty(n)&&(n<0||n>=a.length?console.warn(\"Invalid series number in setVisibility: \"+n):a[n]=t[n]);else for(var n=0;n<t.length;n++)\"boolean\"==typeof t[n]?n>=a.length?console.warn(\"Invalid series number in setVisibility: \"+n):a[n]=t[n]:t[n]<0||t[n]>=a.length?console.warn(\"Invalid series number in setVisibility: \"+t[n]):a[t[n]]=e;this.predraw_()},Q.prototype.size=function(){return{width:this.width_,height:this.height_}},Q.prototype.setAnnotations=function(t,e){if(this.annotations_=t,!this.layout_)return void console.warn(\"Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html\");this.layout_.setAnnotations(this.annotations_),e||this.predraw_()},Q.prototype.annotations=function(){return this.annotations_},Q.prototype.getLabels=function(){var t=this.attr_(\"labels\");return t?t.slice():null},Q.prototype.indexFromSetName=function(t){return this.setIndexByName_[t]},Q.prototype.getRowForX=function(t){for(var e=0,a=this.numRows()-1;e<=a;){var i=a+e>>1,n=this.getValue(i,0);if(n<t)e=i+1;else if(n>t)a=i-1;else{if(e==i)return i;a=i}}return null},Q.prototype.ready=function(t){this.is_initial_draw_?this.readyFns_.push(t):t.call(this,this)},Q.prototype.addAndTrackEvent=function(t,e,a){x.addEvent(t,e,a),this.registeredEvents_.push({elem:t,type:e,fn:a})},Q.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var t=0;t<this.registeredEvents_.length;t++){var e=this.registeredEvents_[t];x.removeEvent(e.elem,e.type,e.fn)}this.registeredEvents_=[]},Q.PLUGINS=[U.default,X.default,j.default,Z.default,H.default,G.default],Q.GVizChart=q.default,Q.DASHED_LINE=x.DASHED_LINE,Q.DOT_DASH_LINE=x.DOT_DASH_LINE,Q.dateAxisLabelFormatter=x.dateAxisLabelFormatter,Q.toRGB_=x.toRGB_,Q.findPos=x.findPos,Q.pageX=x.pageX,Q.pageY=x.pageY,Q.dateString_=x.dateString_,Q.defaultInteractionModel=f.default.defaultModel,Q.nonInteractiveModel=Q.nonInteractiveModel_=f.default.nonInteractiveModel_,Q.Circles=x.Circles,Q.Plugins={Legend:U.default,Axes:X.default,Annotations:H.default,ChartLabels:Z.default,Grid:G.default,RangeSelector:j.default},Q.DataHandlers={DefaultHandler:E.default,BarsHandler:R.default,CustomBarsHandler:P.default,DefaultFractionHandler:M.default,ErrorBarsHandler:T.default,FractionsBarsHandler:F.default},Q.startPan=f.default.startPan,Q.startZoom=f.default.startZoom,Q.movePan=f.default.movePan,Q.moveZoom=f.default.moveZoom,Q.endPan=f.default.endPan,Q.endZoom=f.default.endZoom,Q.numericLinearTicks=_.numericLinearTicks,Q.numericTicks=_.numericTicks,Q.dateTicker=_.dateTicker,Q.Granularity=_.Granularity,Q.getDateAxis=_.getDateAxis,Q.floatFormat=x.floatFormat,a.default=Q,e.exports=a.default}).call(this,t(\"_process\"))},{\"./datahandler/bars\":5,\"./datahandler/bars-custom\":2,\"./datahandler/bars-error\":3,\"./datahandler/bars-fractions\":4,\"./datahandler/default\":8,\"./datahandler/default-fractions\":7,\"./dygraph-canvas\":9,\"./dygraph-default-attrs\":10,\"./dygraph-gviz\":11,\"./dygraph-interaction-model\":12,\"./dygraph-layout\":13,\"./dygraph-options\":15,\"./dygraph-options-reference\":14,\"./dygraph-tickers\":16,\"./dygraph-utils\":17,\"./iframe-tarp\":19,\"./plugins/annotations\":20,\"./plugins/axes\":21,\"./plugins/chart-labels\":22,\"./plugins/grid\":23,\"./plugins/legend\":24,\"./plugins/range-selector\":25,_process:1}],19:[function(t,e,a){\"use strict\";function i(){this.tarps=[]}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"./dygraph-utils\"),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(n);i.prototype.cover=function(){for(var t=document.getElementsByTagName(\"iframe\"),e=0;e<t.length;e++){var a=t[e],i=r.findPos(a),n=i.x,o=i.y,s=a.offsetWidth,l=a.offsetHeight,h=document.createElement(\"div\");h.style.position=\"absolute\",h.style.left=n+\"px\",h.style.top=o+\"px\",h.style.width=s+\"px\",h.style.height=l+\"px\",h.style.zIndex=999,document.body.appendChild(h),this.tarps.push(h)}},i.prototype.uncover=function(){for(var t=0;t<this.tarps.length;t++)this.tarps[t].parentNode.removeChild(this.tarps[t]);this.tarps=[]},a.default=i,e.exports=a.default},{\"./dygraph-utils\":17}],20:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){this.annotations_=[]};i.prototype.toString=function(){return\"Annotations Plugin\"},i.prototype.activate=function(t){return{clearChart:this.clearChart,didDrawChart:this.didDrawChart}},i.prototype.detachLabels=function(){for(var t=0;t<this.annotations_.length;t++){var e=this.annotations_[t];e.parentNode&&e.parentNode.removeChild(e),this.annotations_[t]=null}this.annotations_=[]},i.prototype.clearChart=function(t){this.detachLabels()},i.prototype.didDrawChart=function(t){var e=t.dygraph,a=e.layout_.annotated_points;if(a&&0!==a.length)for(var i=t.canvas.parentNode,n=function(t,a,i){return function(n){var r=i.annotation;r.hasOwnProperty(t)?r[t](r,i,e,n):e.getOption(a)&&e.getOption(a)(r,i,e,n)}},r=t.dygraph.getArea(),o={},s=0;s<a.length;s++){var l=a[s];if(!(l.canvasx<r.x||l.canvasx>r.x+r.w||l.canvasy<r.y||l.canvasy>r.y+r.h)){var h=l.annotation,u=6;h.hasOwnProperty(\"tickHeight\")&&(u=h.tickHeight);var d=document.createElement(\"div\");d.style.fontSize=e.getOption(\"axisLabelFontSize\")+\"px\"\n;var c=\"dygraph-annotation\";h.hasOwnProperty(\"icon\")||(c+=\" dygraphDefaultAnnotation dygraph-default-annotation\"),h.hasOwnProperty(\"cssClass\")&&(c+=\" \"+h.cssClass),d.className=c;var p=h.hasOwnProperty(\"width\")?h.width:16,g=h.hasOwnProperty(\"height\")?h.height:16;if(h.hasOwnProperty(\"icon\")){var f=document.createElement(\"img\");f.src=h.icon,f.width=p,f.height=g,d.appendChild(f)}else l.annotation.hasOwnProperty(\"shortText\")&&d.appendChild(document.createTextNode(l.annotation.shortText));var v=l.canvasx-p/2;d.style.left=v+\"px\";var _=0;if(h.attachAtBottom){var y=r.y+r.h-g-u;o[v]?y-=o[v]:o[v]=0,o[v]+=u+g,_=y}else _=l.canvasy-g-u;d.style.top=_+\"px\",d.style.width=p+\"px\",d.style.height=g+\"px\",d.title=l.annotation.text,d.style.color=e.colorsMap_[l.name],d.style.borderColor=e.colorsMap_[l.name],h.div=d,e.addAndTrackEvent(d,\"click\",n(\"clickHandler\",\"annotationClickHandler\",l)),e.addAndTrackEvent(d,\"mouseover\",n(\"mouseOverHandler\",\"annotationMouseOverHandler\",l)),e.addAndTrackEvent(d,\"mouseout\",n(\"mouseOutHandler\",\"annotationMouseOutHandler\",l)),e.addAndTrackEvent(d,\"dblclick\",n(\"dblClickHandler\",\"annotationDblClickHandler\",l)),i.appendChild(d),this.annotations_.push(d);var x=t.drawingContext;if(x.save(),x.strokeStyle=h.hasOwnProperty(\"tickColor\")?h.tickColor:e.colorsMap_[l.name],x.lineWidth=h.hasOwnProperty(\"tickWidth\")?h.tickWidth:e.getOption(\"strokeWidth\"),x.beginPath(),h.attachAtBottom){var y=_+g;x.moveTo(l.canvasx,y),x.lineTo(l.canvasx,y+u)}else x.moveTo(l.canvasx,l.canvasy),x.lineTo(l.canvasx,l.canvasy-2-u);x.closePath(),x.stroke(),x.restore()}}},i.prototype.destroy=function(){this.detachLabels()},a.default=i,e.exports=a.default},{}],21:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"../dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=function(){this.xlabels_=[],this.ylabels_=[]};r.prototype.toString=function(){return\"Axes Plugin\"},r.prototype.activate=function(t){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}},r.prototype.layout=function(t){var e=t.dygraph;if(e.getOptionForAxis(\"drawAxis\",\"y\")){var a=e.getOptionForAxis(\"axisLabelWidth\",\"y\")+2*e.getOptionForAxis(\"axisTickSize\",\"y\");t.reserveSpaceLeft(a)}if(e.getOptionForAxis(\"drawAxis\",\"x\")){var i;i=e.getOption(\"xAxisHeight\")?e.getOption(\"xAxisHeight\"):e.getOptionForAxis(\"axisLabelFontSize\",\"x\")+2*e.getOptionForAxis(\"axisTickSize\",\"x\"),t.reserveSpaceBottom(i)}if(2==e.numAxes()){if(e.getOptionForAxis(\"drawAxis\",\"y2\")){var a=e.getOptionForAxis(\"axisLabelWidth\",\"y2\")+2*e.getOptionForAxis(\"axisTickSize\",\"y2\");t.reserveSpaceRight(a)}}else e.numAxes()>2&&e.error(\"Only two y-axes are supported at this time. (Trying to use \"+e.numAxes()+\")\")},r.prototype.detachLabels=function(){function t(t){for(var e=0;e<t.length;e++){var a=t[e];a.parentNode&&a.parentNode.removeChild(a)}}t(this.xlabels_),t(this.ylabels_),this.xlabels_=[],this.ylabels_=[]},r.prototype.clearChart=function(t){this.detachLabels()},r.prototype.willDrawChart=function(t){function e(t){return Math.round(t)+.5}function a(t){return Math.round(t)-.5}var i=this,r=t.dygraph;if(r.getOptionForAxis(\"drawAxis\",\"x\")||r.getOptionForAxis(\"drawAxis\",\"y\")||r.getOptionForAxis(\"drawAxis\",\"y2\")){var o,s,l,h=t.drawingContext,u=t.canvas.parentNode,d=r.width_,c=r.height_,p=function(t){return{position:\"absolute\",fontSize:r.getOptionForAxis(\"axisLabelFontSize\",t)+\"px\",width:r.getOptionForAxis(\"axisLabelWidth\",t)+\"px\"}},g={x:p(\"x\"),y:p(\"y\"),y2:p(\"y2\")},f=function(t,e,a){var i=document.createElement(\"div\"),r=g[\"y2\"==a?\"y2\":e];n.update(i.style,r);var o=document.createElement(\"div\");return o.className=\"dygraph-axis-label dygraph-axis-label-\"+e+(a?\" dygraph-axis-label-\"+a:\"\"),o.innerHTML=t,i.appendChild(o),i};h.save();var v=r.layout_,_=t.dygraph.plotter_.area,y=function(t){return function(e){return r.getOptionForAxis(e,t)}};if(r.getOptionForAxis(\"drawAxis\",\"y\")){if(v.yticks&&v.yticks.length>0){var x=r.numAxes(),m=[y(\"y\"),y(\"y2\")];v.yticks.forEach(function(t){if(void 0!==t.label){s=_.x;var e=\"y1\",a=m[0];1==t.axis&&(s=_.x+_.w,-1,e=\"y2\",a=m[1]);var n=a(\"axisLabelFontSize\");l=_.y+t.pos*_.h,o=f(t.label,\"y\",2==x?e:null);var r=l-n/2;r<0&&(r=0),r+n+3>c?o.style.bottom=\"0\":o.style.top=r+\"px\",0===t.axis?(o.style.left=_.x-a(\"axisLabelWidth\")-a(\"axisTickSize\")+\"px\",o.style.textAlign=\"right\"):1==t.axis&&(o.style.left=_.x+_.w+a(\"axisTickSize\")+\"px\",o.style.textAlign=\"left\"),o.style.width=a(\"axisLabelWidth\")+\"px\",u.appendChild(o),i.ylabels_.push(o)}});var b=this.ylabels_[0],w=r.getOptionForAxis(\"axisLabelFontSize\",\"y\");parseInt(b.style.top,10)+w>c-w&&(b.style.top=parseInt(b.style.top,10)-w/2+\"px\")}var A;if(r.getOption(\"drawAxesAtZero\")){var O=r.toPercentXCoord(0);(O>1||O<0||isNaN(O))&&(O=0),A=e(_.x+O*_.w)}else A=e(_.x);h.strokeStyle=r.getOptionForAxis(\"axisLineColor\",\"y\"),h.lineWidth=r.getOptionForAxis(\"axisLineWidth\",\"y\"),h.beginPath(),h.moveTo(A,a(_.y)),h.lineTo(A,a(_.y+_.h)),h.closePath(),h.stroke(),2==r.numAxes()&&(h.strokeStyle=r.getOptionForAxis(\"axisLineColor\",\"y2\"),h.lineWidth=r.getOptionForAxis(\"axisLineWidth\",\"y2\"),h.beginPath(),h.moveTo(a(_.x+_.w),a(_.y)),h.lineTo(a(_.x+_.w),a(_.y+_.h)),h.closePath(),h.stroke())}if(r.getOptionForAxis(\"drawAxis\",\"x\")){if(v.xticks){var D=y(\"x\");v.xticks.forEach(function(t){if(void 0!==t.label){s=_.x+t.pos*_.w,l=_.y+_.h,o=f(t.label,\"x\"),o.style.textAlign=\"center\",o.style.top=l+D(\"axisTickSize\")+\"px\";var e=s-D(\"axisLabelWidth\")/2;e+D(\"axisLabelWidth\")>d&&(e=d-D(\"axisLabelWidth\"),o.style.textAlign=\"right\"),e<0&&(e=0,o.style.textAlign=\"left\"),o.style.left=e+\"px\",o.style.width=D(\"axisLabelWidth\")+\"px\",u.appendChild(o),i.xlabels_.push(o)}})}h.strokeStyle=r.getOptionForAxis(\"axisLineColor\",\"x\"),h.lineWidth=r.getOptionForAxis(\"axisLineWidth\",\"x\"),h.beginPath();var E;if(r.getOption(\"drawAxesAtZero\")){var O=r.toPercentYCoord(0,0);(O>1||O<0)&&(O=1),E=a(_.y+O*_.h)}else E=a(_.y+_.h);h.moveTo(e(_.x),E),h.lineTo(e(_.x+_.w),E),h.closePath(),h.stroke()}h.restore()}},a.default=r,e.exports=a.default},{\"../dygraph-utils\":17}],22:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};i.prototype.toString=function(){return\"ChartLabels Plugin\"},i.prototype.activate=function(t){return{layout:this.layout,didDrawChart:this.didDrawChart}};var n=function(t){var e=document.createElement(\"div\");return e.style.position=\"absolute\",e.style.left=t.x+\"px\",e.style.top=t.y+\"px\",e.style.width=t.w+\"px\",e.style.height=t.h+\"px\",e};i.prototype.detachLabels_=function(){for(var t=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],e=0;e<t.length;e++){var a=t[e];a&&(a.parentNode&&a.parentNode.removeChild(a))}this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};var r=function(t,e,a,i,n){var r=document.createElement(\"div\");r.style.position=\"absolute\",r.style.left=1==a?\"0px\":e.x+\"px\",r.style.top=e.y+\"px\",r.style.width=e.w+\"px\",r.style.height=e.h+\"px\",r.style.fontSize=t.getOption(\"yLabelWidth\")-2+\"px\";var o=document.createElement(\"div\");o.style.position=\"absolute\",o.style.width=e.h+\"px\",o.style.height=e.w+\"px\",o.style.top=e.h/2-e.w/2+\"px\",o.style.left=e.w/2-e.h/2+\"px\",o.className=\"dygraph-label-rotate-\"+(1==a?\"right\":\"left\");var s=document.createElement(\"div\");return s.className=i,s.innerHTML=n,o.appendChild(s),r.appendChild(o),r};i.prototype.layout=function(t){this.detachLabels_();var e=t.dygraph,a=t.chart_div;if(e.getOption(\"title\")){var i=t.reserveSpaceTop(e.getOption(\"titleHeight\"));this.title_div_=n(i),this.title_div_.style.fontSize=e.getOption(\"titleHeight\")-8+\"px\";var o=document.createElement(\"div\");o.className=\"dygraph-label dygraph-title\",o.innerHTML=e.getOption(\"title\"),this.title_div_.appendChild(o),a.appendChild(this.title_div_)}if(e.getOption(\"xlabel\")){var s=t.reserveSpaceBottom(e.getOption(\"xLabelHeight\"));this.xlabel_div_=n(s),this.xlabel_div_.style.fontSize=e.getOption(\"xLabelHeight\")-2+\"px\";var o=document.createElement(\"div\");o.className=\"dygraph-label dygraph-xlabel\",o.innerHTML=e.getOption(\"xlabel\"),this.xlabel_div_.appendChild(o),a.appendChild(this.xlabel_div_)}if(e.getOption(\"ylabel\")){var l=t.reserveSpaceLeft(0);this.ylabel_div_=r(e,l,1,\"dygraph-label dygraph-ylabel\",e.getOption(\"ylabel\")),a.appendChild(this.ylabel_div_)}if(e.getOption(\"y2label\")&&2==e.numAxes()){var h=t.reserveSpaceRight(0);this.y2label_div_=r(e,h,2,\"dygraph-label dygraph-y2label\",e.getOption(\"y2label\")),a.appendChild(this.y2label_div_)}},i.prototype.didDrawChart=function(t){var e=t.dygraph;this.title_div_&&(this.title_div_.children[0].innerHTML=e.getOption(\"title\")),this.xlabel_div_&&(this.xlabel_div_.children[0].innerHTML=e.getOption(\"xlabel\")),this.ylabel_div_&&(this.ylabel_div_.children[0].children[0].innerHTML=e.getOption(\"ylabel\")),this.y2label_div_&&(this.y2label_div_.children[0].children[0].innerHTML=e.getOption(\"y2label\"))},i.prototype.clearChart=function(){},i.prototype.destroy=function(){this.detachLabels_()},a.default=i,e.exports=a.default},{}],23:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){};i.prototype.toString=function(){return\"Gridline Plugin\"},i.prototype.activate=function(t){return{willDrawChart:this.willDrawChart}},i.prototype.willDrawChart=function(t){function e(t){return Math.round(t)+.5}function a(t){return Math.round(t)-.5}var i,n,r,o,s=t.dygraph,l=t.drawingContext,h=s.layout_,u=t.dygraph.plotter_.area;if(s.getOptionForAxis(\"drawGrid\",\"y\")){for(var d=[\"y\",\"y2\"],c=[],p=[],g=[],f=[],v=[],r=0;r<d.length;r++)g[r]=s.getOptionForAxis(\"drawGrid\",d[r]),g[r]&&(c[r]=s.getOptionForAxis(\"gridLineColor\",d[r]),p[r]=s.getOptionForAxis(\"gridLineWidth\",d[r]),v[r]=s.getOptionForAxis(\"gridLinePattern\",d[r]),f[r]=v[r]&&v[r].length>=2);o=h.yticks,l.save(),o.forEach(function(t){if(t.has_tick){var r=t.axis;g[r]&&(l.save(),f[r]&&l.setLineDash&&l.setLineDash(v[r]),l.strokeStyle=c[r],l.lineWidth=p[r],i=e(u.x),n=a(u.y+t.pos*u.h),l.beginPath(),l.moveTo(i,n),l.lineTo(i+u.w,n),l.stroke(),l.restore())}}),l.restore()}if(s.getOptionForAxis(\"drawGrid\",\"x\")){o=h.xticks,l.save();var v=s.getOptionForAxis(\"gridLinePattern\",\"x\"),f=v&&v.length>=2;f&&l.setLineDash&&l.setLineDash(v),l.strokeStyle=s.getOptionForAxis(\"gridLineColor\",\"x\"),l.lineWidth=s.getOptionForAxis(\"gridLineWidth\",\"x\"),o.forEach(function(t){t.has_tick&&(i=e(u.x+t.pos*u.w),n=a(u.y+u.h),l.beginPath(),l.moveTo(i,n),l.lineTo(i,u.y),l.closePath(),l.stroke())}),f&&l.setLineDash&&l.setLineDash([]),l.restore()}},i.prototype.destroy=function(){},a.default=i,e.exports=a.default},{}],24:[function(t,e,a){\"use strict\";function i(t,e,a){if(!t||t.length<=1)return'<div class=\"dygraph-legend-line\" style=\"border-bottom-color: '+e+';\"></div>';var i,n,r,o,s,l=0,h=0,u=[];for(i=0;i<=t.length;i++)l+=t[i%t.length];if((s=Math.floor(a/(l-t[0])))>1){for(i=0;i<t.length;i++)u[i]=t[i]/a;h=u.length}else{for(s=1,i=0;i<t.length;i++)u[i]=t[i]/l;h=u.length+1}var d=\"\";for(n=0;n<s;n++)for(i=0;i<h;i+=2)r=u[i%u.length],o=i<t.length?u[(i+1)%u.length]:0,d+='<div class=\"dygraph-legend-dash\" style=\"margin-right: '+o+\"em; padding-left: \"+r+'em;\"></div>';return d}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"../dygraph-utils\"),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(n),o=function(){this.legend_div_=null,this.is_generated_div_=!1};o.prototype.toString=function(){return\"Legend Plugin\"},o.prototype.activate=function(t){var e,a=t.getOption(\"labelsDiv\");return a&&null!==a?e=\"string\"==typeof a||a instanceof String?document.getElementById(a):a:(e=document.createElement(\"div\"),e.className=\"dygraph-legend\",t.graphDiv.appendChild(e),this.is_generated_div_=!0),this.legend_div_=e,this.one_em_width_=10,{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};var s=function(t){var e=document.createElement(\"span\");e.setAttribute(\"style\",\"margin: 0; padding: 0 0 0 1em; border: 0;\"),t.appendChild(e);var a=e.offsetWidth;return t.removeChild(e),a},l=function(t){return t.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\")};o.prototype.select=function(t){var e=t.selectedX,a=t.selectedPoints,i=t.selectedRow,n=t.dygraph.getOption(\"legend\");if(\"never\"===n)return void(this.legend_div_.style.display=\"none\");if(\"follow\"===n){var r=t.dygraph.plotter_.area,s=this.legend_div_.offsetWidth,l=t.dygraph.getOptionForAxis(\"axisLabelWidth\",\"y\"),h=a[0].x*r.w+50,u=a[0].y*r.h-50;h+s+1>r.w&&(h=h-100-s-(l-r.x)),t.dygraph.graphDiv.appendChild(this.legend_div_),this.legend_div_.style.left=l+h+\"px\",this.legend_div_.style.top=u+\"px\"}var d=o.generateLegendHTML(t.dygraph,e,a,this.one_em_width_,i);this.legend_div_.innerHTML=d,this.legend_div_.style.display=\"\"},o.prototype.deselect=function(t){\"always\"!==t.dygraph.getOption(\"legend\")&&(this.legend_div_.style.display=\"none\");var e=s(this.legend_div_);this.one_em_width_=e;var a=o.generateLegendHTML(t.dygraph,void 0,void 0,e,null);this.legend_div_.innerHTML=a},o.prototype.didDrawChart=function(t){this.deselect(t)},o.prototype.predraw=function(t){if(this.is_generated_div_){t.dygraph.graphDiv.appendChild(this.legend_div_);var e=t.dygraph.getArea(),a=this.legend_div_.offsetWidth;this.legend_div_.style.left=e.x+e.w-a-1+\"px\",this.legend_div_.style.top=e.y+\"px\"}},o.prototype.destroy=function(){this.legend_div_=null},o.generateLegendHTML=function(t,e,a,n,s){var h={dygraph:t,x:e,series:[]},u={},d=t.getLabels();if(d)for(var c=1;c<d.length;c++){var p=t.getPropertiesForSeries(d[c]),g=t.getOption(\"strokePattern\",d[c]),f={dashHTML:i(g,p.color,n),label:d[c],labelHTML:l(d[c]),isVisible:p.visible,color:p.color};h.series.push(f),u[d[c]]=f}if(void 0!==e){var v=t.optionsViewForAxis_(\"x\"),_=v(\"valueFormatter\");h.xHTML=_.call(t,e,v,d[0],t,s,0);for(var y=[],x=t.numAxes(),c=0;c<x;c++)y[c]=t.optionsViewForAxis_(\"y\"+(c?1+c:\"\"));var m=t.getOption(\"labelsShowZeroValues\"),b=t.getHighlightSeries();for(c=0;c<a.length;c++){var w=a[c],f=u[w.name];if(f.y=w.yval,0===w.yval&&!m||isNaN(w.canvasy))f.isVisible=!1;else{var p=t.getPropertiesForSeries(w.name),A=y[p.axis-1],O=A(\"valueFormatter\"),D=O.call(t,w.yval,A,w.name,t,s,d.indexOf(w.name));r.update(f,{yHTML:D}),w.name==b&&(f.isHighlighted=!0)}}}return(t.getOption(\"legendFormatter\")||o.defaultFormatter).call(t,h)},o.defaultFormatter=function(t){var e=t.dygraph;if(!0!==e.getOption(\"showLabelsOnHighlight\"))return\"\";var a,i=e.getOption(\"labelsSeparateLines\");if(void 0===t.x){if(\"always\"!=e.getOption(\"legend\"))return\"\";a=\"\";for(var n=0;n<t.series.length;n++){var r=t.series[n];r.isVisible&&(\"\"!==a&&(a+=i?\"<br/>\":\" \"),a+=\"<span style='font-weight: bold; color: \"+r.color+\";'>\"+r.dashHTML+\" \"+r.labelHTML+\"</span>\")}return a}a=t.xHTML+\":\";for(var n=0;n<t.series.length;n++){var r=t.series[n];if(r.isVisible){i&&(a+=\"<br>\");a+=\"<span\"+(r.isHighlighted?' class=\"highlight\"':\"\")+\"> <b><span style='color: \"+r.color+\";'>\"+r.labelHTML+\"</span></b>: \"+r.yHTML+\"</span>\"}}return a},a.default=o,e.exports=a.default},{\"../dygraph-utils\":17}],25:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"../dygraph-utils\"),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(n),o=t(\"../dygraph-interaction-model\"),s=i(o),l=t(\"../iframe-tarp\"),h=i(l),u=function(){this.hasTouchInterface_=\"undefined\"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};u.prototype.toString=function(){return\"RangeSelector Plugin\"},u.prototype.activate=function(t){return this.dygraph_=t,this.getOption_(\"showRangeSelector\")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},u.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},u.prototype.getOption_=function(t,e){return this.dygraph_.getOption(t,e)},u.prototype.setDefaultOption_=function(t,e){this.dygraph_.attrs_[t]=e},u.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_(\"animatedZooms\")&&(console.warn(\"Animated zooms and range selector are not compatible; disabling animatedZooms.\"),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},u.prototype.addToGraph_=function(){var t=this.graphDiv_=this.dygraph_.graphDiv;t.appendChild(this.bgcanvas_),t.appendChild(this.fgcanvas_),t.appendChild(this.leftZoomHandle_),t.appendChild(this.rightZoomHandle_)},u.prototype.removeFromGraph_=function(){var t=this.graphDiv_;t.removeChild(this.bgcanvas_),t.removeChild(this.fgcanvas_),t.removeChild(this.leftZoomHandle_),t.removeChild(this.rightZoomHandle_),this.graphDiv_=null},u.prototype.reserveSpace_=function(t){this.getOption_(\"showRangeSelector\")&&t.reserveSpaceBottom(this.getOption_(\"rangeSelectorHeight\")+4)},u.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},u.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},u.prototype.updateVisibility_=function(){var t=this.getOption_(\"showRangeSelector\");if(t)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var e=this.dygraph_;setTimeout(function(){e.width_=0,e.resize()},1)}return t},u.prototype.resize_=function(){function t(t,e,a,i){var n=i||r.getContextPixelRatio(e);t.style.top=a.y+\"px\",t.style.left=a.x+\"px\",t.width=a.w*n,t.height=a.h*n,t.style.width=a.w+\"px\",t.style.height=a.h+\"px\",1!=n&&e.scale(n,n)}var e=this.dygraph_.layout_.getPlotArea(),a=0;this.dygraph_.getOptionForAxis(\"drawAxis\",\"x\")&&(a=this.getOption_(\"xAxisHeight\")||this.getOption_(\"axisLabelFontSize\")+2*this.getOption_(\"axisTickSize\")),this.canvasRect_={x:e.x,y:e.y+e.h+a+4,w:e.w,h:this.getOption_(\"rangeSelectorHeight\")};var i=this.dygraph_.getNumericOption(\"pixelRatio\");t(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,i),t(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,i)},u.prototype.createCanvases_=function(){this.bgcanvas_=r.createCanvas(),this.bgcanvas_.className=\"dygraph-rangesel-bgcanvas\",this.bgcanvas_.style.position=\"absolute\",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.getContext(this.bgcanvas_),this.fgcanvas_=r.createCanvas(),this.fgcanvas_.className=\"dygraph-rangesel-fgcanvas\",this.fgcanvas_.style.position=\"absolute\",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor=\"default\",this.fgcanvas_ctx_=r.getContext(this.fgcanvas_)},u.prototype.createZoomHandles_=function(){var t=new Image;t.className=\"dygraph-rangesel-zoomhandle\",t.style.position=\"absolute\",t.style.zIndex=10,t.style.visibility=\"hidden\",t.style.cursor=\"col-resize\",t.width=9,t.height=16,t.src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=\",this.isMobileDevice_&&(t.width*=2,t.height*=2),this.leftZoomHandle_=t,this.rightZoomHandle_=t.cloneNode(!1)},u.prototype.initInteraction_=function(){var t,e,a,i,n,o,l,u,d,c,p,g,f,v,_=this,y=document,x=0,m=null,b=!1,w=!1,A=!this.isMobileDevice_,O=new h.default;t=function(t){var e=_.dygraph_.xAxisExtremes(),a=(e[1]-e[0])/_.canvasRect_.w;return[e[0]+(t.leftHandlePos-_.canvasRect_.x)*a,e[0]+(t.rightHandlePos-_.canvasRect_.x)*a]},e=function(t){return r.cancelEvent(t),b=!0,x=t.clientX,m=t.target?t.target:t.srcElement,\"mousedown\"!==t.type&&\"dragstart\"!==t.type||(r.addEvent(y,\"mousemove\",a),r.addEvent(y,\"mouseup\",i)),_.fgcanvas_.style.cursor=\"col-resize\",O.cover(),!0},a=function(t){if(!b)return!1;r.cancelEvent(t);var e=t.clientX-x;if(Math.abs(e)<4)return!0;x=t.clientX;var a,i=_.getZoomHandleStatus_();m==_.leftZoomHandle_?(a=i.leftHandlePos+e,a=Math.min(a,i.rightHandlePos-m.width-3),a=Math.max(a,_.canvasRect_.x)):(a=i.rightHandlePos+e,a=Math.min(a,_.canvasRect_.x+_.canvasRect_.w),a=Math.max(a,i.leftHandlePos+m.width+3));var o=m.width/2;return m.style.left=a-o+\"px\",_.drawInteractiveLayer_(),A&&n(),!0},i=function(t){return!!b&&(b=!1,O.uncover(),r.removeEvent(y,\"mousemove\",a),r.removeEvent(y,\"mouseup\",i),_.fgcanvas_.style.cursor=\"default\",A||n(),!0)},n=function(){try{var e=_.getZoomHandleStatus_();if(_.isChangingRange_=!0,e.isZoomed){var a=t(e);_.dygraph_.doZoomXDates_(a[0],a[1])}else _.dygraph_.resetZoom()}finally{_.isChangingRange_=!1}},o=function(t){var e=_.leftZoomHandle_.getBoundingClientRect(),a=e.left+e.width/2;e=_.rightZoomHandle_.getBoundingClientRect();var i=e.left+e.width/2;return t.clientX>a&&t.clientX<i},l=function(t){return!(w||!o(t)||!_.getZoomHandleStatus_().isZoomed)&&(r.cancelEvent(t),w=!0,x=t.clientX,\"mousedown\"===t.type&&(r.addEvent(y,\"mousemove\",u),r.addEvent(y,\"mouseup\",d)),!0)},u=function(t){if(!w)return!1;r.cancelEvent(t);var e=t.clientX-x;if(Math.abs(e)<4)return!0;x=t.clientX;var a=_.getZoomHandleStatus_(),i=a.leftHandlePos,n=a.rightHandlePos,o=n-i;i+e<=_.canvasRect_.x?(i=_.canvasRect_.x,n=i+o):n+e>=_.canvasRect_.x+_.canvasRect_.w?(n=_.canvasRect_.x+_.canvasRect_.w,i=n-o):(i+=e,n+=e);var s=_.leftZoomHandle_.width/2;return _.leftZoomHandle_.style.left=i-s+\"px\",_.rightZoomHandle_.style.left=n-s+\"px\",_.drawInteractiveLayer_(),A&&c(),!0},d=function(t){return!!w&&(w=!1,r.removeEvent(y,\"mousemove\",u),r.removeEvent(y,\"mouseup\",d),A||c(),!0)},c=function(){try{_.isChangingRange_=!0,_.dygraph_.dateWindow_=t(_.getZoomHandleStatus_()),_.dygraph_.drawGraph_(!1)}finally{_.isChangingRange_=!1}},p=function(t){if(!b&&!w){var e=o(t)?\"move\":\"default\";e!=_.fgcanvas_.style.cursor&&(_.fgcanvas_.style.cursor=e)}},g=function(t){\"touchstart\"==t.type&&1==t.targetTouches.length?e(t.targetTouches[0])&&r.cancelEvent(t):\"touchmove\"==t.type&&1==t.targetTouches.length?a(t.targetTouches[0])&&r.cancelEvent(t):i(t)},f=function(t){\"touchstart\"==t.type&&1==t.targetTouches.length?l(t.targetTouches[0])&&r.cancelEvent(t):\"touchmove\"==t.type&&1==t.targetTouches.length?u(t.targetTouches[0])&&r.cancelEvent(t):d(t)},v=function(t,e){for(var a=[\"touchstart\",\"touchend\",\"touchmove\",\"touchcancel\"],i=0;i<a.length;i++)_.dygraph_.addAndTrackEvent(t,a[i],e)},this.setDefaultOption_(\"interactionModel\",s.default.dragIsPanInteractionModel),this.setDefaultOption_(\"panEdgeFraction\",1e-4);var D=window.opera?\"mousedown\":\"dragstart\";this.dygraph_.addAndTrackEvent(this.leftZoomHandle_,D,e),this.dygraph_.addAndTrackEvent(this.rightZoomHandle_,D,e),this.dygraph_.addAndTrackEvent(this.fgcanvas_,\"mousedown\",l),this.dygraph_.addAndTrackEvent(this.fgcanvas_,\"mousemove\",p),this.hasTouchInterface_&&(v(this.leftZoomHandle_,g),v(this.rightZoomHandle_,g),v(this.fgcanvas_,f))},u.prototype.drawStaticLayer_=function(){var t=this.bgcanvas_ctx_;t.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);try{this.drawMiniPlot_()}catch(t){console.warn(t)}this.bgcanvas_ctx_.lineWidth=this.getOption_(\"rangeSelectorBackgroundLineWidth\"),t.strokeStyle=this.getOption_(\"rangeSelectorBackgroundStrokeColor\"),t.beginPath(),t.moveTo(.5,.5),t.lineTo(.5,this.canvasRect_.h-.5),t.lineTo(this.canvasRect_.w-.5,this.canvasRect_.h-.5),t.lineTo(this.canvasRect_.w-.5,.5),t.stroke()},u.prototype.drawMiniPlot_=function(){var t=this.getOption_(\"rangeSelectorPlotFillColor\"),e=this.getOption_(\"rangeSelectorPlotFillGradientColor\"),a=this.getOption_(\"rangeSelectorPlotStrokeColor\");if(t||a){var i=this.getOption_(\"stepPlot\"),n=this.computeCombinedSeriesAndLimits_(),r=n.yMax-n.yMin,o=this.bgcanvas_ctx_,s=this.dygraph_.xAxisExtremes(),l=Math.max(s[1]-s[0],1e-30),h=(this.canvasRect_.w-.5)/l,u=(this.canvasRect_.h-.5)/r,d=this.canvasRect_.w-.5,c=this.canvasRect_.h-.5,p=null,g=null;o.beginPath(),o.moveTo(.5,c);for(var f=0;f<n.data.length;f++){var v=n.data[f],_=null!==v[0]?(v[0]-s[0])*h:NaN,y=null!==v[1]?c-(v[1]-n.yMin)*u:NaN;(i||null===p||Math.round(_)!=Math.round(p))&&(isFinite(_)&&isFinite(y)?(null===p?o.lineTo(_,c):i&&o.lineTo(_,g),o.lineTo(_,y),p=_,g=y):(null!==p&&(i?(o.lineTo(_,g),o.lineTo(_,c)):o.lineTo(p,c)),p=g=null))}if(o.lineTo(d,c),o.closePath(),t){var x=this.bgcanvas_ctx_.createLinearGradient(0,0,0,c);e&&x.addColorStop(0,e),x.addColorStop(1,t),this.bgcanvas_ctx_.fillStyle=x,o.fill()}a&&(this.bgcanvas_ctx_.strokeStyle=a,this.bgcanvas_ctx_.lineWidth=this.getOption_(\"rangeSelectorPlotLineWidth\"),o.stroke())}},u.prototype.computeCombinedSeriesAndLimits_=function(){var t,e=this.dygraph_,a=this.getOption_(\"logscale\"),i=e.numColumns(),n=e.getLabels(),o=new Array(i),s=!1,l=e.visibility(),h=[];for(t=1;t<i;t++){var u=this.getOption_(\"showInRangeSelector\",n[t]);h.push(u),null!==u&&(s=!0)}if(s)for(t=1;t<i;t++)o[t]=h[t-1];else for(t=1;t<i;t++)o[t]=l[t-1];var d=[],c=e.dataHandler_,p=e.attributes_;for(t=1;t<e.numColumns();t++)if(o[t]){var g=c.extractSeries(e.rawData_,t,p);e.rollPeriod()>1&&(g=c.rollingAverage(g,e.rollPeriod(),p)),d.push(g)}var f=[];for(t=0;t<d[0].length;t++){for(var v=0,_=0,y=0;y<d.length;y++){var x=d[y][t][1];null===x||isNaN(x)||(_++,v+=x)}f.push([d[0][t][0],v/_])}var m=Number.MAX_VALUE,b=-Number.MAX_VALUE;for(t=0;t<f.length;t++){var w=f[t][1];null!==w&&isFinite(w)&&(!a||w>0)&&(m=Math.min(m,w),b=Math.max(b,w))}if(a)for(b=r.log10(b),b+=.25*b,m=r.log10(m),t=0;t<f.length;t++)f[t][1]=r.log10(f[t][1]);else{var A,O=b-m;A=O<=Number.MIN_VALUE?.25*b:.25*O,b+=A,m-=A}return{data:f,yMin:m,yMax:b}},u.prototype.placeZoomHandles_=function(){var t=this.dygraph_.xAxisExtremes(),e=this.dygraph_.xAxisRange(),a=t[1]-t[0],i=Math.max(0,(e[0]-t[0])/a),n=Math.max(0,(t[1]-e[1])/a),r=this.canvasRect_.x+this.canvasRect_.w*i,o=this.canvasRect_.x+this.canvasRect_.w*(1-n),s=Math.max(this.canvasRect_.y,this.canvasRect_.y+(this.canvasRect_.h-this.leftZoomHandle_.height)/2),l=this.leftZoomHandle_.width/2;this.leftZoomHandle_.style.left=r-l+\"px\",this.leftZoomHandle_.style.top=s+\"px\",this.rightZoomHandle_.style.left=o-l+\"px\",this.rightZoomHandle_.style.top=this.leftZoomHandle_.style.top,this.leftZoomHandle_.style.visibility=\"visible\",this.rightZoomHandle_.style.visibility=\"visible\"},u.prototype.drawInteractiveLayer_=function(){var t=this.fgcanvas_ctx_;t.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);var e=this.canvasRect_.w-1,a=this.canvasRect_.h-1,i=this.getZoomHandleStatus_();if(t.strokeStyle=this.getOption_(\"rangeSelectorForegroundStrokeColor\"),t.lineWidth=this.getOption_(\"rangeSelectorForegroundLineWidth\"),i.isZoomed){var n=Math.max(1,i.leftHandlePos-this.canvasRect_.x),r=Math.min(e,i.rightHandlePos-this.canvasRect_.x);t.fillStyle=\"rgba(240, 240, 240, \"+this.getOption_(\"rangeSelectorAlpha\").toString()+\")\",t.fillRect(0,0,n,this.canvasRect_.h),t.fillRect(r,0,this.canvasRect_.w-r,this.canvasRect_.h),t.beginPath(),t.moveTo(1,1),t.lineTo(n,1),t.lineTo(n,a),t.lineTo(r,a),t.lineTo(r,1),t.lineTo(e,1),t.stroke()}else t.beginPath(),t.moveTo(1,1),t.lineTo(1,a),t.lineTo(e,a),t.lineTo(e,1),t.stroke()},u.prototype.getZoomHandleStatus_=function(){var t=this.leftZoomHandle_.width/2,e=parseFloat(this.leftZoomHandle_.style.left)+t,a=parseFloat(this.rightZoomHandle_.style.left)+t;return{leftHandlePos:e,rightHandlePos:a,isZoomed:e-1>this.canvasRect_.x||a+1<this.canvasRect_.x+this.canvasRect_.w}},a.default=u,e.exports=a.default},{\"../dygraph-interaction-model\":12,\"../dygraph-utils\":17,\"../iframe-tarp\":19}]},{},[18])(18)});\n//# sourceMappingURL=dist/dygraph.min.js.map\n","import { ChartData, ChartMetadata } from \"../chart-types\"\nimport { seconds4human } from \"./seconds4human\"\n\nexport const LEGEND_BOTTOM_SINGLE_LINE_HEIGHT = 80\n\nexport const legendPluginModuleString = (withContext: boolean, chartMetadata: ChartMetadata) => {\n let str = \" \"\n let context = \"\"\n\n if (withContext && typeof chartMetadata.context === \"string\") {\n // eslint-disable-next-line prefer-destructuring\n context = chartMetadata.context\n }\n\n if (typeof chartMetadata.plugin === \"string\" && chartMetadata.plugin !== \"\") {\n str = chartMetadata.plugin\n\n if (str.endsWith(\".plugin\")) {\n str = str.substring(0, str.length - 7)\n }\n\n if (typeof chartMetadata.module === \"string\" && chartMetadata.module !== \"\") {\n str += `:${chartMetadata.module}`\n }\n\n if (withContext && context !== \"\") {\n str += `, ${context}`\n }\n } else if (withContext && context !== \"\") {\n str = context\n }\n return str\n}\n\nexport const legendResolutionTooltip = (chartData: ChartData, chartMetadata: ChartMetadata) => {\n const collected = chartMetadata.update_every\n // todo if there's no data (but maybe there wont be situation like this), then use \"collected\"\n const viewed = chartData.view_update_every\n if (collected === viewed) {\n return `resolution ${seconds4human(collected)}`\n }\n\n return `resolution ${seconds4human(viewed)}, collected every ${seconds4human(collected)}`\n}\n\ntype GetNewSelectedDimensions = (arg: {\n allDimensions: string[],\n selectedDimensions: string[],\n clickedDimensionName: string,\n isModifierKeyPressed: boolean,\n}) => string[]\n\nexport const getNewSelectedDimensions: GetNewSelectedDimensions = ({\n allDimensions,\n selectedDimensions,\n clickedDimensionName,\n isModifierKeyPressed,\n}) => {\n // when selectedDimensions is empty, then all dimensions should be enabled\n // let's narrow this case now\n const enabledDimensions = selectedDimensions.length === 0 ? allDimensions : selectedDimensions\n const isCurrentlySelected = enabledDimensions.includes(clickedDimensionName)\n\n let newSelectedDimensions: string[]\n if (!isModifierKeyPressed\n && ((isCurrentlySelected && enabledDimensions.length > 1) || !isCurrentlySelected)\n ) {\n newSelectedDimensions = [clickedDimensionName]\n } else if (isCurrentlySelected) { // modifier key pressed\n newSelectedDimensions = enabledDimensions.filter(\n (dimension) => dimension !== clickedDimensionName,\n )\n } else { // modifier key pressed\n newSelectedDimensions = enabledDimensions.concat(clickedDimensionName)\n }\n\n if (newSelectedDimensions.length === allDimensions.length) {\n return []\n }\n return newSelectedDimensions\n}\n","/* eslint-disable comma-dangle */\n/* eslint-disable implicit-arrow-linebreak */\nimport { omit, pipe, mergeDeepLeft } from \"ramda\"\n\ntype HashParams = { [param: string]: string }\nconst fragmentParamsSeparatorRegEx = /[&;]/\nconst fragmentParamsSeparator = \";\"\n\nexport const getHashParams = (\n hash = decodeURIComponent(window.location.hash.substr(1))\n): HashParams => {\n if (hash.length === 0) {\n return {}\n }\n const params = hash.split(fragmentParamsSeparatorRegEx)\n const response = params.reduce((acc: HashParams, current) => {\n const parts = current.split(\"=\")\n const [param, value] = parts\n acc[param] = value\n return acc\n }, {})\n return response\n}\n\nexport const makeHashFromObject = (params: { [paramKey: string]: string }) => {\n const entries = Object.entries(params)\n if (entries.length === 0) {\n return \"\"\n }\n return entries\n .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)\n .join(fragmentParamsSeparator)\n}\n\nexport const getFilteredHash = (\n excludedParams: string[],\n hash = decodeURIComponent(window.location.hash.substr(1))\n) => {\n const filteredParams = omit(excludedParams, getHashParams(hash))\n return makeHashFromObject(filteredParams)\n}\n\nexport const getUniqueParamsHash = pipe(getHashParams, makeHashFromObject)\n\nexport const setHashParams = (params: { [paramKey: string]: string }) => {\n const allParams = getHashParams()\n const allParamsResult = mergeDeepLeft(params, allParams)\n window.history.replaceState(window.history.state, \"\", `#${makeHashFromObject(allParamsResult)}`)\n}\n\nexport const getHashParam = (\n param: string,\n hash = decodeURIComponent(window.location.hash.substr(1))\n): string => getHashParams(hash)[param]\n\nexport const hasHashParam = (\n param: string,\n hash = decodeURIComponent(window.location.hash.substr(1))\n): boolean => getHashParams(hash)[param] !== undefined\n\nexport const removeHashParams = (params: string[]) => {\n window.history.replaceState(window.history.state, \"\", `#${getFilteredHash(params)}`)\n}\n","import { useEffect, useCallback, useState } from \"react\"\n\ntype IframesMessageType =\n | \"spaces\"\n | \"workspaces\"\n | \"hello-from-spaces-bar\"\n | \"hello-from-space-panel\"\n | \"hello-from-sign-in\"\n | \"is-signed-in\"\n | \"streamed-hosts-data\"\n | \"has-focus\"\n | \"iframe-focus-change\"\n | \"synced-private-registry\"\n | \"set-is-logout-dropdown-opened\"\n | \"user-node-access\"\n | \"request-refresh-access\"\n\ninterface IframesMessage<T = unknown> {\n type: IframesMessageType\n payload: T\n}\n\nexport const sendToChildIframe = (\n htmlIframeElement: HTMLIFrameElement | string,\n message: IframesMessage\n) => {\n const iframeElement =\n typeof htmlIframeElement === \"string\"\n ? (document.getElementById(htmlIframeElement) as HTMLIFrameElement)\n : htmlIframeElement\n\n if (iframeElement.contentWindow) {\n iframeElement.contentWindow.postMessage(message, \"*\")\n }\n}\n\nexport const useListenToPostMessage = <T>(\n messageType: IframesMessageType,\n callback?: (newMessage: T) => void,\n defaultState?: T | (() => T)\n): [T | undefined, () => void] => {\n const [lastMessage, setLastMessage] = useState<T | undefined>(defaultState)\n const handleMessage = useCallback(\n message => {\n const data = message.data as IframesMessage<T>\n if (data.type === messageType) {\n setLastMessage(data.payload)\n if (callback) {\n callback(data.payload)\n }\n }\n },\n [callback, messageType]\n )\n const resetMesssage = useCallback(() => {\n setLastMessage(defaultState as T)\n }, [defaultState])\n useEffect(() => {\n window.addEventListener(\"message\", handleMessage)\n return () => {\n window.removeEventListener(\"message\", handleMessage)\n }\n }, [handleMessage, messageType])\n return [lastMessage, resetMesssage]\n}\n","export const isMainJs = process.env.REACT_APP_IS_MAIN_DASHBOARD\nexport const isTestingEnv = process.env.NODE_ENV === \"test\"\nexport const isDevelopmentEnv = process.env.NODE_ENV === \"development\"\n","export const storeKey = \"dashboard\"\n","import { useCallback, useMemo } from \"react\"\nimport { useDispatch, useSelector } from \"react-redux\"\nimport { createSelector } from \"reselect\"\nimport { useLocalStorage } from \"react-use\"\nimport { showSignInModalAction } from \"domains/dashboard/actions\"\nimport { selectSignInUrl, selectRegistry } from \"domains/global/selectors\"\nimport { NETDATA_REGISTRY_SERVER } from \"utils/utils\"\n\nconst isRegistrySelector = createSelector(\n selectRegistry,\n ({ registryServer }) => registryServer === NETDATA_REGISTRY_SERVER\n)\n\nconst offlineSelector = createSelector(\n ({ dashboard }) => dashboard,\n ({ offline }) => offline\n)\n\nconst SignIn = ({ children, utmParameters }) => {\n const [hasSignedInBefore] = useLocalStorage(\"has-sign-in-history\")\n const signInUrl = useSelector(state => selectSignInUrl(utmParameters)(state))\n const isRegistry = useSelector(isRegistrySelector)\n const offline = useSelector(offlineSelector)\n\n const dispatch = useDispatch()\n\n const link = useMemo(() => {\n const { href } = window.location\n const redirectURI = encodeURIComponent(href)\n return `${signInUrl}&redirect_uri=${redirectURI}`\n }, [signInUrl])\n\n const onSignIn = useCallback(\n () =>\n dispatch(\n showSignInModalAction({\n signInLinkHref: link,\n })\n ),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [link]\n )\n\n return useMemo(\n () =>\n typeof children === \"function\"\n ? children({ isRegistry, link, onSignIn, offline, hasSignedInBefore })\n : children,\n [children, isRegistry, link, onSignIn, offline, hasSignedInBefore]\n )\n}\n\nexport default SignIn\n","import { createContext } from \"react\"\nimport {\n createDispatchHook, createSelectorHook, ReactReduxContextValue,\n useSelector as useSelectorOriginal,\n useDispatch as useDispatchOriginal,\n} from \"react-redux\"\n\nconst shouldUseDefaultContext = process.env.REACT_APP_SHOULD_USE_DEFAULT_CONTEXT\n\nexport const dashboardReduxContext = shouldUseDefaultContext\n ? undefined\n : createContext<ReactReduxContextValue>(undefined as any)\n\nexport const useSelector = dashboardReduxContext\n ? createSelectorHook(dashboardReduxContext)\n : useSelectorOriginal\nexport const useDispatch = dashboardReduxContext\n ? createDispatchHook(dashboardReduxContext)\n : useDispatchOriginal\n","const isPrintMode = window.location.hash.split(\";\").includes(\"help=true\")\n\nconst getIsDemo = () => {\n if (isPrintMode) {\n return false\n }\n const { hostname } = document.location\n return (\n hostname.endsWith(\".my-netdata.io\")\n || hostname.endsWith(\".mynetdata.io\")\n || hostname.endsWith(\".netdata.rocks\")\n || hostname.endsWith(\".netdata.ai\")\n || hostname.endsWith(\".netdata.live\")\n || hostname.endsWith(\".firehol.org\")\n || hostname.endsWith(\".netdata.online\")\n || hostname.endsWith(\".netdata.cloud\")\n )\n}\n\nexport const isDemo = getIsDemo()\n","import { prop, path } from \"ramda\"\nimport { createSelector } from \"reselect\"\n\nimport { AppStateT } from \"store/app-state\"\nimport { utmUrlSuffix } from \"utils/utils\"\nimport { alwaysEndWithSlash } from \"utils/server-detection\"\n\nimport { GetKeyArguments, getKeyForCommonColorsState } from \"./reducer\"\nimport { storeKey } from \"./constants\"\nimport { OptionsKey } from \"./options\"\n\nconst NETDATA_REGISTRY_SERVER = \"https://registry.my-netdata.io\"\n\nexport const createSelectAssignedColors = (args: GetKeyArguments) => (state: AppStateT) => {\n const keyName = getKeyForCommonColorsState(args)\n const substate = state[storeKey].commonColorsKeys[keyName]\n return substate && substate.assigned\n}\n\nexport const selectGlobal = (state: AppStateT) => state.global\n\nexport const selectCommonMin = createSelector(\n selectGlobal,\n (_: unknown, commonMinKey: string) => commonMinKey,\n (globalState, commonMinKey) => (\n globalState.commonMin[commonMinKey]\n ),\n)\n\nexport const selectCommonMax = createSelector(\n selectGlobal,\n (_: unknown, commonMaxKey: string) => commonMaxKey,\n (globalState, commonMaxKey) => (\n globalState.commonMax[commonMaxKey]\n ),\n)\n\nexport const selectGlobalSelection = createSelector(selectGlobal, prop(\"hoveredX\"))\n\nexport const selectGlobalSelectionMaster = createSelector(\n selectGlobal,\n prop(\"currentSelectionMasterId\"),\n)\n\nexport const selectGlobalPanAndZoom = createSelector(selectGlobal, prop(\"globalPanAndZoom\"))\n\nexport const selectDefaultAfter = createSelector(selectGlobal, prop(\"defaultAfter\"))\n\nexport const selectGlobalChartUnderlay = createSelector(selectGlobal, prop(\"globalChartUnderlay\"))\n\nexport const selectHasWindowFocus = createSelector(selectGlobal, prop(\"hasWindowFocus\"))\nexport const selectGlobalPause = createSelector(selectGlobal, prop(\"globalPause\"))\n\nexport const selectSnapshot = createSelector(\n selectGlobal,\n prop(\"snapshot\"),\n)\n\nexport const selectRegistry = createSelector(selectGlobal, prop(\"registry\"))\n\nexport const selectCloudBaseUrl = createSelector(selectRegistry, prop(\"cloudBaseURL\"))\n\nexport const utmParametersToString = (utmParameters = {}) =>\n Object.keys(utmParameters).reduce((acc, key) => (acc += `&utm_${key}=${utmParameters[key]}`), \"\")\n\nexport const selectSignInUrl = utmParameters =>\n createSelector(selectRegistry, selectCloudBaseUrl, (registry, cloudBaseURL) => {\n const name = encodeURIComponent(registry.hostname)\n const origin = encodeURIComponent(\n alwaysEndWithSlash(window.location.origin + window.location.pathname)\n )\n // not adding redirect_url - it needs to always be based on newest href\n // eslint-disable-next-line max-len\n return `${cloudBaseURL}/sign-in?id=${\n registry.machineGuid\n }&name=${name}&origin=${origin}${utmUrlSuffix}${utmParametersToString(utmParameters)}`\n })\n\nexport const selectIsFetchingHello = createSelector(selectRegistry, prop(\"isFetchingHello\"))\nexport const selectIsUsingGlobalRegistry = createSelector(\n selectRegistry,\n ({ registryServer }) => registryServer && (registryServer !== NETDATA_REGISTRY_SERVER),\n)\n\n// currently cloud-base-url is taken from registry?action=hello call, which returns error\n// if Agent+browser are configured to respect do-not-track\nexport const selectIsCloudEnabled = createSelector(\n selectRegistry,\n (registry) => registry.isCloudEnabled && !registry.isHelloCallError,\n)\nexport const selectHasFetchedInfo = createSelector(selectRegistry, prop(\"hasFetchedInfo\"))\nexport const selectFullInfoPayload = createSelector(selectRegistry, prop(\"fullInfoPayload\"))\nexport const selectLacksProtoBufSupport = createSelector(\n selectFullInfoPayload,\n info => info[\"agent-claimed\"] && !info[\"aclk-ng-new-cloud-protocol\"]\n)\n\nexport const selectHasStartedAlarms = createSelector(\n selectGlobal,\n path([\"alarms\", \"hasStartedAlarms\"]),\n)\nexport const selectActiveAlarms = createSelector(\n selectGlobal,\n (global) => global.alarms.activeAlarms,\n)\n\nexport const selectAlarm = createSelector(\n selectGlobal,\n (global) => global.alarm\n)\n\nexport const selectSpacePanelIsActive = createSelector(selectGlobal, prop(\"spacePanelIsActive\"))\nexport const selectSpacePanelTransitionEndIsActive = createSelector(\n selectGlobal, prop(\"spacePanelTransitionEndIsActive\"),\n)\n\nexport const selectOptions = createSelector(selectGlobal, global => global.options)\n\nexport const createSelectOption = <T extends OptionsKey>(optionName: T) => (\n createSelector(selectOptions, (options) => options[optionName])\n)\n\nexport const selectDestroyOnHide = createSelectOption(\"destroy_on_hide\")\nexport const selectStopUpdatesWhenFocusIsLost = createSelectOption(\n \"stop_updates_when_focus_is_lost\",\n)\nexport const selectShouldEliminateZeroDimensions = createSelectOption(\"eliminate_zero_dimensions\")\nexport const selectIsAsyncOnScroll = createSelectOption(\"async_on_scroll\")\n\nexport const selectParallelRefresher = createSelectOption(\"parallel_refresher\")\nexport const selectConcurrentRefreshes = createSelectOption(\"concurrent_refreshes\")\nexport const selectSyncSelection = createSelectOption(\"sync_selection\")\nexport const selectSyncPanAndZoom = createSelectOption(\"sync_pan_and_zoom\")\n\nexport const selectTheme = createSelectOption(\"theme\")\nexport const selectShowHelp = createSelectOption(\"show_help\")\nexport const selectPanAndZoomDataPadding = createSelectOption(\"pan_and_zoom_data_padding\")\nexport const selectSmoothPlot = createSelectOption(\"smooth_plot\")\n\nexport const selectUnitsScalingMethod = createSelectOption(\"units\")\nexport const selectTemperatureSetting = createSelectOption(\"temperature\")\nexport const selectSecondsAsTimeSetting = createSelectOption(\"seconds_as_time\")\nexport const selectTimezoneSetting = createSelectOption(\"timezone\")\nexport const selectUTCOffsetSetting = createSelectOption(\"utcOffset\")\nexport const selectUserSetServerTimezone = createSelectOption(\"user_set_server_timezone\")\n\nexport const selectChartsMetadata = createSelector(\n selectGlobal,\n (global) => global.chartsMetadata.data,\n)\n\nexport const selectChartMetadataFromChartsCall = createSelector(\n selectChartsMetadata,\n (_: unknown, { chartId }: { chartId: string, id: string }) => chartId,\n (allMetadata, chartId) => allMetadata?.charts[chartId],\n)\n\nexport const selectUserNodeAccess = createSelector(selectGlobal, global => global.userNodeAccess)\n","import { createAction } from \"redux-act\"\n\n// slightly simplified version of the creator used in the cloud\n// we will unify it when some typing issues will be fixed (cloud version didn't warn on bad payload)\nexport const createRequestAction = <RequestT, SuccessT = any, FailureT = any>(name: string) => {\n const action = createAction<RequestT>(name.toUpperCase())\n\n return Object.assign(action, {\n request: action,\n success: createAction<SuccessT>(\n `${name.toUpperCase()}_SUCCESS`,\n (payload) => payload,\n (meta) => meta,\n ),\n failure: createAction<FailureT>(\n `${name.toUpperCase()}_FAILURE`,\n (payload) => payload,\n (meta) => ({\n ...meta,\n error: true,\n }),\n ),\n })\n}\n","import { mergeAll, mergeRight } from \"ramda\"\nimport { LOCALSTORAGE_HEIGHT_KEY_PREFIX } from \"domains/chart/components/resize-handler\"\nimport { DashboardTheme } from \"utils/map-theme\"\n\nexport const SYNC_PAN_AND_ZOOM = \"sync_pan_and_zoom\"\nexport const STOP_UPDATES_WHEN_FOCUS_IS_LOST = \"stop_updates_when_focus_is_lost\"\nexport const DESTROY_ON_HIDE = \"destroy_on_hide\"\nexport const THEME = \"theme\"\nexport const LEGEND_RIGHT = \"legend_right\"\n\nexport const themeLocalStorageKey = \"netdataTheme\"\n\n/* eslint-disable camelcase */\n\nexport interface Options {\n // performance options\n [STOP_UPDATES_WHEN_FOCUS_IS_LOST]: boolean\n eliminate_zero_dimensions: boolean\n [DESTROY_ON_HIDE]: boolean\n async_on_scroll: boolean\n\n // synchronization options\n parallel_refresher: boolean\n concurrent_refreshes: boolean\n sync_selection: boolean\n [SYNC_PAN_AND_ZOOM]: boolean\n\n // visual options\n [LEGEND_RIGHT]: boolean\n [THEME]: DashboardTheme\n show_help: boolean\n pan_and_zoom_data_padding: boolean\n smooth_plot: boolean\n\n // locale options\n units: \"auto\" | \"original\"\n temperature: \"celsius\" | \"fahrenheit\"\n seconds_as_time: boolean\n timezone: string\n user_set_server_timezone: string\n utcOffset: number | string\n}\nexport type OptionsKey = keyof Options\n\n// those options have been created around 2015/2016 and some of them are not needed anymore\n// so we need to revisit them, test their impact, etc.\n\nexport const INITIAL_OPTIONS: Options = {\n // performance options\n\n // boolean - shall we stop auto-refreshes when document does not have user focus\n [STOP_UPDATES_WHEN_FOCUS_IS_LOST]: true,\n // do not show dimensions with just zeros\n eliminate_zero_dimensions: true,\n // destroy charts when they are not visible\n [DESTROY_ON_HIDE]: false, // eventually apply slow device detection\n async_on_scroll: false,\n\n // synchronization options\n // enable parallel refresh of charts\n parallel_refresher: true, // eventually apply slow device detection\n // when parallel_refresher is enabled, sync also the charts\n concurrent_refreshes: true,\n // enable or disable selection sync\n sync_selection: true,\n // enable or disable pan and zoom sync\n [SYNC_PAN_AND_ZOOM]: true,\n\n // visual options\n [LEGEND_RIGHT]: false,\n [THEME]: \"slate\",\n // when enabled the charts will show some help\n // when there's no bootstrap, we can't show it\n show_help: Boolean(window.netdataShowHelp) && !window.netdataNoBootstrap,\n // fetch more data for the master chart when panning or zooming\n pan_and_zoom_data_padding: true,\n // enable smooth plot, where possible\n smooth_plot: true, // eventually apply slow device detection\n\n // locale options\n units: \"auto\", // auto or original\n temperature: \"celsius\",\n seconds_as_time: true, // show seconds as DDd:HH:MM:SS ?\n timezone: \"default\", // the timezone to use, or 'default'\n user_set_server_timezone: \"default\", // as set by the user on the dashboard\n utcOffset: 0,\n}\n\nconst localStorageKeyToOption = <T extends string>(key: T) =>\n key.replace(/^options\\./, \"\").replace(themeLocalStorageKey, THEME)\n\nconst getItemFromLocalStorage = <T extends string>(key: T) => {\n const value = localStorage.getItem(key)\n // \"undefined\" (deliberate as a string) to support \"options.setOptionCallback\", an old property\n // used in old dashboard. users will still have it, so we need to support it for some time\n if (value === null || value === \"undefined\") {\n localStorage.removeItem(key)\n return null\n }\n let parsed\n try {\n parsed = JSON.parse(value)\n } catch (e) {\n // todo fix after main.js refactor\n // special case for netdataTheme, only this option is not boolean\n if (key === themeLocalStorageKey && value) {\n return value\n }\n\n console.log(`localStorage: failed to read \"${key}\", using default`) // eslint-disable-line no-console, max-len\n // it was not present in old dashboard, but it probably makes sense to remove broken values\n localStorage.removeItem(key)\n return null\n }\n return parsed\n}\n\nexport const getOptionsMergedWithLocalStorage = (): Options => {\n const optionsFromLocalStorage = Object.keys(localStorage)\n .filter(key => key.startsWith(\"options.\") || key === themeLocalStorageKey)\n .map(key => ({\n [localStorageKeyToOption(key)]: getItemFromLocalStorage(key),\n }))\n .filter(o => Object.values(o)[0] !== null)\n\n const overridenOptions = mergeAll(optionsFromLocalStorage) as unknown as Options\n return mergeRight(INITIAL_OPTIONS, overridenOptions)\n}\n\nexport const optionsMergedWithLocalStorage = getOptionsMergedWithLocalStorage()\nexport const initialLegendRight = optionsMergedWithLocalStorage[LEGEND_RIGHT]\n\nexport const clearLocalStorage = () => {\n const localStorageKeys = Object.keys(localStorage)\n localStorageKeys.forEach(key => {\n if (key.startsWith(LOCALSTORAGE_HEIGHT_KEY_PREFIX) || key.startsWith(\"options.\")) {\n localStorage.removeItem(key)\n }\n })\n}\n"],"sourceRoot":""}
\ No newline at end of file |