diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:05 +0000 |
commit | 97e01009d69b8fbebfebf68f51e3d126d0ed43fc (patch) | |
tree | 02e8b836c3a9d89806f3e67d4a5fe9f52dbb0061 /web/gui/dashboard/static/js/main.cc0e57d1.chunk.js | |
parent | Releasing debian version 1.36.1-1. (diff) | |
download | netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.tar.xz netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.zip |
Merging upstream version 1.37.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/gui/dashboard/static/js/main.7d1bdca1.chunk.js.LICENSE (renamed from web/gui/dashboard/static/js/main.cc0e57d1.chunk.js.LICENSE) | 0 | ||||
-rw-r--r-- | web/gui/dashboard/static/js/main.cc0e57d1.chunk.js | 3 | ||||
-rw-r--r-- | web/gui/dashboard/static/js/main.cc0e57d1.chunk.js.map | 1 |
3 files changed, 0 insertions, 4 deletions
diff --git a/web/gui/dashboard/static/js/main.cc0e57d1.chunk.js.LICENSE b/web/gui/dashboard/static/js/main.7d1bdca1.chunk.js.LICENSE index bf657eca5..bf657eca5 100644 --- a/web/gui/dashboard/static/js/main.cc0e57d1.chunk.js.LICENSE +++ b/web/gui/dashboard/static/js/main.7d1bdca1.chunk.js.LICENSE diff --git a/web/gui/dashboard/static/js/main.cc0e57d1.chunk.js b/web/gui/dashboard/static/js/main.cc0e57d1.chunk.js deleted file mode 100644 index e7f07503e..000000000 --- a/web/gui/dashboard/static/js/main.cc0e57d1.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see main.cc0e57d1.chunk.js.LICENSE */ -(this["webpackJsonp@netdata/dashboard"]=this["webpackJsonp@netdata/dashboard"]||[]).push([[0],{101: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)}}},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}))}},113:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return d}));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_height.",d=function(e){var t=e.chartContainerElement,a=e.chartUuid,d=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,d,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),d){var o=h?r-l.a:r;localStorage.setItem("".concat(u).concat(d),"".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,d,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>"})}},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"))},125:function(e,t,a){"use strict";a.d(t,"b",(function(){return l}));var n=a(0),r=a(28),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}))}))}},140:function(e,t,a){"use strict";var n=a(27);a.d(t,"a",(function(){return n.d}))},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(27),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.e)():-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(27),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.g)(["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__(101),_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__(62),_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(82),_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(89),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.B,null,"This node is currently"," ",o.a.createElement(s.B,{strong:!0},"LIVE"===t?"Connected":"Not Connected")," to Netdata Cloud")},bullets:"NOT_LIVE"===t?[function(){return o.a.createElement(s.B,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.B,null,"You are"," ",o.a.createElement(s.B,{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(56),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.B,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.B,sx:{fontWeight:"500",lineHeight:"25px"}},"Check Now")))))},d=a(28),h=a(125),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.z,{"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"]},27:function(e,t,a){"use strict";a.d(t,"f",(function(){return i})),a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"d",(function(){return c})),a.d(t,"h",(function(){return u})),a.d(t,"e",(function(){return d})),a.d(t,"g",(function(){return h})),a.d(t,"c",(function(){return p}));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};function p(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(e){t.forEach((function(t){null===t||void 0===t||t(e)}))}}},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)},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(100),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(28),l=a(48),c=a(127),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),B=a(549),F=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(B.a)(null),Object(F.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.J)(10),Object(Z.J)(2),Object(Z.J)(2),Object(Z.J)(2),Object(Z.J)(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.B).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.H)("success")||t&&Object(Z.H)("error")}),Object(Z.J)()),ae=Object($.d)(Z.F).withConfig({displayName:"styled__ContentText",componentId:"qqn9iy-4"})(["display:block;color:",";"],(function(e){return e.error&&Object(Z.H)("error")||Object(Z.H)("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.J)(5),Object(Z.J)(5),Object(Z.J)(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,B,F,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("|"),B=R.includes("flip"),H=(F=!je&&!B)?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,F),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 Be(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 Fe(){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,Be);case 6:return e.next=8,Object(S.g)(b.f,Fe);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(27),Ye=a(82),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(Ft),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}))},Bt=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 Ft(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=Bt(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,Ft);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(62),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.d)({highlight_after:o,highlight_before:i})}}function Zt(){window.urlOptions?window.urlOptions.netdataHighlightCallback(!1,0,0):Object(Wt.c)(["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(101),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]),B=Object(n.useRef)(R),F=function(e,t,a){B.current=Na(e,t,a)};return{legendFormatValue:R,legendFormatValueDecimalsFromMinMax:Object(n.useCallback)((function(e,t){if(Pa(m,e)&&Pa(y,t))return B.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 F(n,M,N),B.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)),F(n,g,u),B.current}),[j,N,m,y,s,l,r,i,o,c,a.min,a.max,M]),unitsCurrent:E}},Ba=a(55),Fa={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.J)(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(Ba.c)(!0,a)},v?Object(Ba.c)(!1,a):x(_)),r.a.createElement("br",null),r.a.createElement("span",{className:"netdata-legend-title-time",title:Object(Ba.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 Fa;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)}:Fa}(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(Ba.c)(!0,t)},a?Object(Ba.c)(!1,t):l(u)),r.a.createElement(Va,null,"|"),r.a.createElement("span",{title:Object(Ba.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(Ba.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(113),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=$.d.div.withConfig({displayName:"proceeded-chart-disclaimer__Container",componentId:"sc-5o8wdv-0"})(["display:block;"]),kn=Object(n.forwardRef)((function(e,t){return r.a.createElement(An,{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"),"."))})),jn={WARNING:"#FFF8E1",CRITICAL:"#FFEBEF",CLEAR:"#E5F5E8"},Tn=function(e){return jn[e]||null},Dn={WARNING:"#FFC300",CRITICAL:"#F59B9B",CLEAR:"#68C47D"},Pn=function(e){return Dn[e]||null},Mn={WARNING:"#536775",CRITICAL:"#FF4136",CLEAR:"#00AB44"},Ln=function(e){return Mn[e]||null},In=$.d.div.withConfig({displayName:"alarmBadge__Container",componentId:"tz967u-0"})(["position:absolute;margin-right:10px;overflow:hidden;pointer-events:none;direction:rtl;z-index:10;"]),Nn=$.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})),Rn=Object(n.forwardRef)((function(e,t){var a=e.isVisible,n=e.status,o=e.label;return r.a.createElement(In,{ref:t},a&&r.a.createElement(Nn,{background:Tn(n),border:Pn(n),color:Ln(n)},o))})),Bn=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,B=void 0===R?i:R,F=t.dygraphLabelsSeparateLine,H=void 0===F||F,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,Be=t.dygraphGridLineWidth,Fe=void 0===Be?1:Be,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:B,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:Fe,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)}}}}},Fn=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),B=a.min<0&&"stacked"===R,F=wn(B,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=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)}]}(),ee=Object(A.a)(Q,3),te=ee[0],ae=ee[1],ne=ee[2],re=Object(n.useRef)({alarm:T,chartData:a,globalChartUnderlay:k,hoveredX:_,immediatelyDispatchPanAndZoom:b,resetGlobalPanAndZoom:J,setGlobalChartUnderlay:y,updateAlarmBadge:ne,updateChartPanOrZoom:z,viewAfter:E,viewBefore:S}),oe=Sn(H,re),ie=Object(A.a)(oe,3),se=ie[0],le=ie[1],ce=ie[2];Object(n.useLayoutEffect)((function(){re.current.alarm=T,re.current.chartData=a,re.current.hoveredX=_,re.current.immediatelyDispatchPanAndZoom=b,re.current.globalChartUnderlay=k,re.current.resetGlobalPanAndZoom=J,re.current.setGlobalChartUnderlay=y,re.current.updateAlarmBadge=ne,re.current.updateChartPanOrZoom=z,re.current.viewAfter=E,re.current.viewBefore=S}),[T,a,k,_,b,J,y,ne,z,E,S]);var de=Object(la.b)(ue.D);Object(n.useLayoutEffect)((function(){if(H&&H.current&&!U.current&&!d){var e=Bn({attributes:t,chartData:a,chartMetadata:o,chartSettings:I,dimensionsVisibility:u,hiddenLabelsElementId:N,isFakeStacked:B,orderedColors:m,setMinMax:x,shouldSmoothPlot:de,unitsCurrent:w,xAxisDateString:M,xAxisTimeString:L});G.current=!1;var n=Object(g.a)({},e,{dateWindow:[re.current.viewAfter,re.current.viewBefore],highlightCallback:function(e,t){var a=V.current?null:t;a!==re.current.hoveredX&&O(a)},unhighlightCallback:function(){null!==re.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:re.current.chartData})&&re.current.updateChartPanOrZoom({after:a,before:n})}},zoomCallback:function(e,t){G.current=!0,re.current.updateChartPanOrZoom({after:e,before:t})},underlayCallback:function(e,t,a){if(ce(a),re.current.alarm){var n=re.current.alarm,r=a.toDomXCoord(1e3*n.when),o=Pn(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})),re.current.updateAlarmBadge(re.current.alarm,a,r-3)}if(re.current.globalChartUnderlay){var i=re.current.globalChartUnderlay,s=i.after,l=i.before;if(s<l){var c=a.toDomCoords(s,-20),u=a.toDomCoords(l,20),d=c[0],h=u[0];e.fillStyle=window.NETDATA.themes.current.highlight,e.fillRect(d,t.y,h-d,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){null!==Y.current?(G.current=!0,pn.a.moveZoom(e,t,a),e.preventDefault()):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)]);re.current.setGlobalChartUnderlay({after:r[0],before:r[1],masterID:a.id}),Y.current=null,n.isZooming=!1,t.clearZoomRect_(),t.drawGraph_(!1)}else n.isPanning?(G.current=!0,pn.a.endPan(e,t,n),re.current.immediatelyDispatchPanAndZoom()):n.isZooming&&(G.current=!0,pn.a.endZoom(e,t,n),re.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];re.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})),re.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=re.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&&re.current.resetGlobalPanAndZoom());Z.current=s,re.current.immediatelyDispatchPanAndZoom()}}}),r=B?_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,B,m,O,x,de,w,M,L,ce,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 he=Object(la.b)(ue.G);Object(fa.a)((function(){U.current&&window.requestAnimationFrame((function(){U.current&&U.current.resize()}))}),[he]),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=B?_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:B?xn(Object(W.a)(l)):l,file:c,labels:a.result.labels,fillAlpha:F},"stacked"===R?{includeZero:h}:{},{stackedGraph:"stacked"===R&&!B,visibility:B?Object(W.a)(u):u}))}}),[t,a.result,c,u,R,F,d,B,p,m,E,S]),Object(fa.a)((function(){if(U.current){var e=Bn({attributes:t,chartData:a,chartMetadata:o,chartSettings:I,dimensionsVisibility:u,hiddenLabelsElementId:N,isFakeStacked:B,orderedColors:m,setMinMax:x,shouldSmoothPlot:de,unitsCurrent:w,xAxisDateString:M,xAxisTimeString:L});d||U.current.updateOptions(e)}}),[R,D]);var pe=Object(la.b)(ue.p);Object(n.useLayoutEffect)((function(){if(U.current&&pe!==c){if(-1===v)return void(-1!==U.current.getSelection()&&U.current.clearSelection());U.current.setSelection(v)}}),[a,c,pe,v,E,S]);var fe=Object(la.b)((function(e){return Object(Ea.l)(e,{id:c})}));Object(n.useLayoutEffect)((function(){U.current&&U.current.resize()}),[fe,a.dimension_names.length]);var ge=Object(la.b)((function(e){return t.commonMin?Object(ue.h)(e,t.commonMin):void 0})),me=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&&ge&&ge.currentExtreme<o&&(p[0]=ge.currentExtreme,h=!0),a&&d&&me&&me.currentExtreme>i&&(p[1]=me.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===ge||void 0===ge?void 0:ge.charts[c])&&q(Object(Ke.p)({chartUuid:c,commonMinKey:e,value:p[0]})),a&&d&&p[1]!==(null===me||void 0===me?void 0:me.charts[c])&&q(Object(Ke.o)({chartUuid:c,commonMaxKey:a,value:p[1]}))}}),[t,a.result,c,ge,me,q]),Object(n.useLayoutEffect)((function(){se&&U.current&&ce(U.current)}),[se]),Object(ga.a)((function(){U.current&&U.current.destroy()}));var be=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);be.current=new fn.a((function(){a()})),be.current.observe(H.current)}})),Object(ga.a)((function(){U.current=null,be.current&&be.current.disconnect()}));var ve="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":ve})}),se&&h&&r.a.createElement(kn,{ref:le}),(null===T||void 0===T?void 0:T.value)&&h&&r.a.createElement(Rn,{isVisible:te,ref:ae,status:T.status,label:T.value}),r.a.createElement("div",{className:"dygraph-chart__labels-hidden",id:N}))},Hn=a(274),zn=a.n(Hn),Un=a(193),Gn=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(Un.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 zn.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))},Wn=a(275),Vn=function(e){return"number"===typeof e},Yn=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=Vn(E)?E:a.min,k=Vn(S)?S:a.max,j=Object(de.a)(Object(Un.a)((function(e){return+e})),(function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return[!Vn(E)&&a>0?0:a,!Vn(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 Wn.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),B=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:B}},h(g?null:D)),r.a.createElement("span",{className:"gaugeChartMax",style:{fontSize:B}},h(g?null:P)))},Xn=(a(254),a(134)),Kn=a(537),Zn=a(538),qn=Object(de.a)(Xn.a,Object(Kn.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]])),$n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=qn(e),n=Object(de.a)((function(e){return Object(Zn.a)(2,e)}),Object(Un.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)},Jn=function(e){return e>0?e:(new Date).valueOf()+e},Qn=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=Jn(t[0]),n=Jn(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:$n(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})},er=a(144);window.d3=er;var tr,ar=a(276),nr=a.n(ar),rr=a(46),or={label:"no data",value:100,color:"#666666"},ir=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(rr.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)},sr=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:or,r=t.title||i.title,s=ir({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,B=t.d3PieSubtitleFont,F=void 0===B?"arial":B,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,Be=void 0===Re?"bold":Re,Fe=t.d3PieLabelsValueColor,He=void 0===Fe?window.NETDATA.themes.current.d3pie.value:Fe,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:F},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:Be,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 nr.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=ir({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:[or];_.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})},lr=(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:$n(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)}),cr=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];(tr||(tr=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})},ur=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)},dr=a(37),hr=Math.round(16/9),pr=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},fr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hr;return Math.sqrt(e.length/t)},gr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hr;return e*t},mr=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.floor(t%e)*a},br=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.floor(t/e)*a},vr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11;return Math.ceil(e)*t},_r=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},yr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11;return Math.floor(e/t)},Or=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=mr(t,a,s),o=br(t,a,s),i=n.left+r,c=n.top+o,u=pr(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=yr(n,s),l=yr(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)}},xr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.aspectRatio,n=t.cellSize,r=fr(e,a),o=gr(r,a);return vr(o,n)},wr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.aspectRatio,n=t.cellSize,r=t.padding,o=fr(e,a),i=gr(o,a),s=vr(i,n),l=_r(o,n,r);return{width:s,height:l,columns:Math.ceil(i)}},Er=["rgba(198, 227, 246, 0.9)","rgba(14, 154, 255, 0.9)"],Sr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Er;return Object(er.scaleLinear)().domain(Object(er.extent)(e,(function(e){return e}))).range(t)},Cr=function(e){return e.getBoundingClientRect().top/window.innerHeight>.5?"top":"bottom"},Ar={top:{bottom:"top"},bottom:{top:"bottom"}},kr=function(e){var t=e.data,a=e.renderTooltip,o=Object(dr.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=wr(s,r),v=c.width,_=c.height,y=c.columns;e.width=parseInt(v),e.height=parseInt(_),b(),m();var O=Sr(s,d),x=function(e,t){h.fillStyle=O(e);var a=mr(y,t,o),n=br(y,t,o);u&&l&&h.clearRect(a-u,n-u,pr(o,i)+l,pr(o,i)+l),h.fillRect(a,n,pr(o,i),pr(o,i))};s.forEach(x),m=Or(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=mr(y,e,o),a=br(y,e,o);u&&l&&(h.lineWidth=u,h.strokeStyle="#fff",h.strokeRect(t+u,a+u,pr(o,i)-l,pr(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(dr.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&&Cr(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:Ar[y],target:d.target,onMouseEnter:v,onMouseLeave:_},a(d.index,y)))},jr=$.d.span.withConfig({displayName:"groupBoxes__Title",componentId:"sc-11qnspu-0"})(["white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;"]),Tr=Object($.d)(Z.j).attrs({as:Z.D,gap:1}).withConfig({displayName:"groupBoxes__Label",componentId:"sc-11qnspu-1"})(["cursor:default;&:hover{font-weight:bold;}"]),Dr=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&&Cr(l.current),u=Object(n.useMemo)((function(){return{maxWidth:"".concat(xr(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.A,{content:h,align:c,plain:!0},(function(e){var n=e.isOpen,o=e.ref,i=Object(dr.a)(e,["isOpen","ref"]);return r.a.createElement(Tr,Object.assign({"data-testid":"groupBoxWrapper-title",ref:function(e){l.current=e,o(e)},strong:n,style:u},i),r.a.createElement(jr,null,a),t.data.length>3&&r.a.createElement("span",null,"(",t.data.length,")"))})),r.a.createElement(kr,{data:t,renderTooltip:d}))},Pr=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(Dr,{key:e,label:e,groupIndex:a,data:t[a],renderGroupPopover:o,renderBoxPopover:n}):null})))},Mr=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);"]),Lr=function(e){var t=e.children;return r.a.createElement(Z.j,{"data-testid":"groupBox-legend",gap:4,alignItems:"center"},r.a.createElement(Z.E,{strong:!0},t),r.a.createElement(Z.j,{gap:2,alignItems:"center"},r.a.createElement(Z.E,null,"0%"),r.a.createElement(Mr,null),r.a.createElement(Z.E,null,"100%")))},Ir={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"}},Nr=Object.keys(Ir),Rr=function(e){return e in Ir?Ir[e]:{title:e.replace(/_./g,(function(e){return" ".concat(e[1].toUpperCase())})).replace(/^k8s /,""),icon:"node"}},Br=function(){return r.a.createElement(Z.j,{height:"1px",width:"100%",background:"separator"})},Fr=function(e){return r.a.createElement(Z.m,Object.assign({color:"bright",wordBreak:"break-all","data-testid":"k8sPopover-header"},e))},Hr=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.H)("bright")({theme:a}),";")}),(function(e){var t=e.active,a=e.theme;return Object(Z.H)(t?"bright":"separator")({theme:a})})),zr=function(e){var t=e.value,a=e.onChange,n=Object(dr.a)(e,["value","onChange"]);return r.a.createElement(Z.j,Object.assign({"data-testid":"k8sPopoverChart-tabs"},n),r.a.createElement(Hr,{label:"Context",active:"context"===t,onClick:function(){return a("context")}}),r.a.createElement(Hr,{label:"Metrics",active:"metrics"===t,onClick:function(){return a("metrics")}}))},Ur=Object($.d)(Object(Z.K)(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;}}"]),Gr=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(Ur,{onClick:a})),r.a.createElement(Z.j,{gap:4,column:!0,"data-testid":"k8sPopoverSection-content"},n))},Wr=a(169),Vr=a(539),Yr=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));return a?Number.isNaN(Number(a))?null:"".concat(t?Number(a)+Ba.a:a,"px"):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}},Xr={root:null,rootMargin:"0px",threshold:void 0},Kr=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)}))}),Xr);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}))}}}(),Zr=function(e){var t=e.attributes;return r.a.createElement("span",{style:{position:"absolute",opacity:0,width:0}},t.id)},qr=localStorage.getItem("wipe-chart-state"),$r=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=Yr(a,c,e);Object(Vr.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&&Kr.subscribe(e,(function(e){s.current!==e&&(t.current&&(t.current.style.visibility=e?"visible":"hidden"),s.current=e,i(e))})),function(){Kr.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&&qr&&l(Object(_e.a)({id:o}))}),[o,l,w]),ve)return i;if(w){if(g)return r.a.createElement(Zr,{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(Zr,{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},Jr=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($r,{attributes:t,portalNode:i,chartUuid:n},r.a.createElement(Uo,{attributes:t,chartUuid:n,renderCustomElementForDygraph:s,onAttributesChange:l,dropdownMenu:o,externalChartMetadata:a,portalNode:i,uuid:c}))},Qr=null,eo={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===Qr||"undefined"===typeof Qr.charts)return"";if("undefined"===typeof Qr.charts[t])return"";if("undefined"===typeof Qr.charts[t].dimensions)return"";if("undefined"===typeof Qr.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(eo.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=eo;var to,ao,no,ro=Object($.d)(Z.B).withConfig({displayName:"chartOverview__Title",componentId:"sc-1ga681p-0"})(["text-overflow:ellipsis;max-width:120px;overflow-x:hidden;"]),oo={avg:"Average",sum:"Sum",min:"Min",max:"Max"},io=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(oo[e])||""}(o);return r.a.createElement(Z.B,{wordBreak:"keep-all",color:"bright",margin:[0,0,0,"auto"],"data-testid":"k8sPopoverChart-chartValue"},h&&r.a.createElement(Z.B,{margin:[0,1,0,0],color:"separator","data-testid":"k8sPopoverChart-chartValue-aggr"},h),u(l),"percentage"===(t=d)?"%":" ".concat(t.replace(/milliseconds/,"ms")))})),so=function(e){var t=e.id,a=Object(dr.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(io,Object.assign({id:t},a)):null},lo=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=eo.menuIcon(a);return r.a.createElement(Z.j,{gap:2,"data-testid":"k8sPopoverChart-overview"},r.a.createElement(Z.B,{color:"bright",dangerouslySetInnerHTML:{__html:l}}),r.a.createElement(ro,{color:"bright","data-testid":"k8sPopoverChart-title"},s),r.a.createElement(so,{id:t,units:i,aggrMethod:n,displayedIndex:o}))})),co=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(Wr.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.H)("border")({theme:l}),sparklineFillColor:Object(Z.H)("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(Jr,{chartUuid:o,attributes:x,chartMetadata:y,portalNode:c.current})),r.a.createElement(lo,{id:o,aggrMethod:x.aggrMethod,chartMetadata:y,displayedIndex:p}))})),uo=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;"]),ho=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.B,{color:"bright","data-testid":"k8sPopoverItem-title"},a),n&&r.a.createElement(Z.B,{color:"border",wordBreak:"break-all","data-testid":"k8sPopoverItem-detail"},n),o&&r.a.createElement(uo,{onClick:o}))},po=function(e){var t=e.date,a=e.title,n=Object(sa.b)(),o=n.localeDateString,i=n.localeTimeString;return r.a.createElement(ho,{icon:"around_clock",title:a,secondary:"".concat(o(t)," | ").concat(i(t))})},fo=function(e){var t=e.before,a=e.after;return r.a.createElement(Gr,{title:"Time"},r.a.createElement(po,{title:"From",date:a}),r.a.createElement(po,{title:"To",date:t}))},go=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(fo,{after:o,before:i}),r.a.createElement(Gr,{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(co,{key:i.id,id:[t,a,n.id,i.id].join("|"),attributes:n,relatedIndex:o,groupLabel:t,postGroupLabel:a})})))))},mo=function(e){var t=e.labelId,a=e.items,n=e.onExpand,o=e.onItemClick,i=Object(dr.a)(e,["labelId","items","onExpand","onItemClick"]),s=Rr(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(Gr,Object.assign({title:h,onExpand:d&&n},i),u.map((function(e){return r.a.createElement(ho,{key:e,icon:c,title:e,onClick:o&&function(){return o(e)}})})))},bo=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=Nr.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(mo,{key:e,labelId:e,items:t[e],onExpand:function(){return a(e)},noBorder:i===o.length-1,onItemClick:"k8s_node_name"===e&&n})})))})),vo=Object($.d)(Object(Z.K)(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;}}"]),_o=function(e){var t=e.labelId,a=e.items,n=e.onBack,o=e.onItemClick,i=Rr(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(Fr,null,r.a.createElement(vo,{label:"".concat(s," (").concat(a.length,")"),icon:"chevron_left",onClick:n,"data-testid":"k8sPopoverList-back"})),r.a.createElement(Br,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(ho,{key:e,icon:l,title:e,onClick:o&&function(){return o(e)}})}))))},yo=function(e){return r.a.createElement(Z.i,Object.assign({background:["transparent","popover"],padding:[2,4],width:"322px",height:"422px"},e))},Oo=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(Fr,null,t),r.a.createElement(zr,{value:a,onChange:n,margin:[4,0,0,0]}),r.a.createElement(Br,null),r.a.createElement(Z.j,{gap:3,overflow:{vertical:"auto",horizontal:"hidden"},margin:[4,0,0,0]},o))},xo=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(dr.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(yo,Object.assign({"data-testid":"k8sPopover"},u),g&&r.a.createElement(_o,{labelId:p,items:i[p],attributes:s,onBack:function(){return f("context")},onItemClick:"k8s_node_name"===p&&m}),!g&&r.a.createElement(Oo,{label:t,value:p,onChange:f},"context"===p&&r.a.createElement(bo,{chartLabels:i,onExpand:f,onNodeClick:m}),"metrics"===p&&r.a.createElement(go,{groupLabel:a,postGroupLabel:o,attributes:s,viewAfter:c,viewBefore:l})))},wo=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(Pr,{data:x,labels:m,renderBoxPopover:function(e){var t=e.groupIndex,a=e.index,n=e.align,l=f[t].labels[a],c=Rr(O).title;return r.a.createElement(xo,{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=Rr(y).title;return r.a.createElement(xo,{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(Lr,null,v),r.a.createElement(nn,{chartMetadata:a,showUndefined:d,hoveredX:c,viewBefore:s,chartData:t})))},Eo=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(Gn,{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(Yn,{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(Qn,{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(sr,{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(lr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,orderedColors:m}):"google"===s?r.a.createElement(cr,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,orderedColors:m,unitsCurrent:E}):"textonly"===s?r.a.createElement(ur,{attributes:t,chartData:o,chartElementClassName:P,chartElementId:M}):"groupbox"===s?r.a.createElement(wo,{chartData:o,chartMetadata:i,attributes:t,viewAfter:S,viewBefore:C,hoveredRow:b,hoveredX:v,showUndefined:L}):r.a.createElement(Fn,{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})},So=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,B=Object(n.useState)(null),F=Object(A.a)(B,2),H=F[0],z=F[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.f)(m[0])?m[0]:i.after*Ve.a,X=Object(Ve.f)(m[1])?m[1]:i.before*Ve.a,K=Object(Ve.f)(g[0])?g[0]:i.after*Ve.a,Z=Object(Ve.f)(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.b,{chartContainerElement:o,chartUuid:c,heightId:t.heightId,isLegendOnBottom:me});return r.a.createElement(r.a.Fragment,null,r.a.createElement(Eo,{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)})),Co=a(555),Ao=a(548),ko=a(192),jo=$.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.H)(["neutral","limedSpruce"]),Object(Z.H)(["neutral","limedSpruce"])),To=$.d.span.withConfig({displayName:"styled__DropdownItemLabel",componentId:"sc-1pvwpze-1"})(["margin-left:12px;"]),Do=Object($.d)(Z.o).withConfig({displayName:"styled__DotsBtn",componentId:"sc-1pvwpze-2"})(["width:6px;height:10px;cursor:pointer;& use{fill:",";&:hover{fill:",";}}"],Object(Z.H)(["neutral","limedSpruce"]),Object(Z.H)(["neutral","regentgrey"])),Po=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(Do,{name:"dots_2x3",onClick:function(){u(!0)}}),r.a.createElement(ko.b,null,r.a.createElement(ko.a,{open:c,onClose:d},r.a.createElement(Co.a,null,i.map((function(e){var n=e.icon,i=e.label,s=e.onClick;return r.a.createElement(Ao.b,{key:i,text:r.a.createElement(jo,null,n,r.a.createElement(To,null,i)),onClick:function(){s({attributes:t,chartMetadata:o,chartID:a}),d()}})}))))))},Mo=Object($.e)(["0%{opacity:.1;}50%{opacity:.5;}100%{opacity:.1;}"]),Lo=$.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")),Io=$.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.H)("border"),Mo),No=Object($.d)(Io).withConfig({displayName:"styled__Circle2",componentId:"sc-1foc7xt-2"})(["animation-delay:.3s;margin-left:","px;"],Object(qe.a)("spaceBetween")),Ro=Object($.d)(Io).withConfig({displayName:"styled__Circle3",componentId:"sc-1foc7xt-3"})(["animation-delay:.6s;margin-left:","px;"],Object(qe.a)("spaceBetween")),Bo=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(Lo,{top:a,right:n},r.a.createElement(Io,{size:o}),r.a.createElement(No,{size:o,spaceBetween:i}),r.a.createElement(Ro,{size:o,spaceBetween:i}))},Fo=$.d.div.withConfig({displayName:"styled__ChartDropdownContainer",componentId:"sc-177ahzb-0"})(["position:absolute;top:0;left:40px;width:20px;height:20px;z-index:",";"],10),Ho=(a(440),{"sum-of-abs":"sum"}),zo=[],Uo=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})})),B=Object(la.b)((function(e){return Object(Ea.j)(e,{id:c})})),F=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)(!!F),function(){return 1e3*F.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:Ho[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||zo),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||zo)}),[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:F,chartID:_})}),[m,g,l,_,k,F]),xe=0===(null===(t=F)||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=F)||void 0===i?void 0:null===(s=i.result)||void 0===s?void 0:s.length);return F&&k?r.a.createElement(r.a.Fragment,null,xe&&r.a.createElement(Ca,{key:"".concat(xe),hasEmptyData:xe,containerNode:p}),r.a.createElement(So,{attributes:l,chartContainerElement:p,chartData:F,chartMetadata:k,chartUuid:c,chartHeight:ae,chartWidth:te,defaultAfter:K,globalPanAndZoom:T,hasEmptyData:xe,isRemotelyControlled:R.isRemotelyControlled,viewRangeForCurrentData:R.viewRange,viewRange:B,selectedDimensions:be,setSelectedDimensions:ye,showLatestOnBlur:!M}),pe&&r.a.createElement(Bo,{chartLibrary:l.chartLibrary}),d&&d.length>0&&r.a.createElement(Fo,null,r.a.createElement(Po,{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(Bo,{chartLibrary:l.chartLibrary}))},Go=a(497),Wo=function(e){return e[O.a]},Vo=Object(Ha.a)(Wo,Object(qe.a)("isSnapshotMode")),Yo=Object(Ha.a)(Wo,Object(Go.a)(["snapshotCharts","snapshotDataPoints"])),Xo=function(e){var t=e.attributes,a=e.chartUuid,r=t.host||D.b,o=Object(la.b)(Yo).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},Ko=function(e){var t=e.attributes,a=e.chartUuid;return Object(la.b)(Vo)?r.a.createElement(Xo,{attributes:t,chartUuid:a}):null},Zo=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($r,{attributes:a,chartUuid:n,portalNode:e},r.a.createElement(Uo,{attributes:a,chartUuid:n,portalNode:e})),r.a.createElement(Ko,{attributes:a,chartUuid:n})),e)})))})),qo=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]},$o=document.getElementById("modal-root"),Jo=function(e){var t=e.children,a=Object(n.useRef)(document.createElement("div"));return Object(n.useEffect)((function(){return $o.appendChild(a.current),function(){$o.removeChild(a.current)}}),[]),Object(o.createPortal)(t,a.current)},Qo=(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(Jo,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"})))))}),ei=$.d.div.withConfig({displayName:"styled__SocialMediaContainer",componentId:"sc-3gu94j-0"})(["width:185px;padding:",";background:",";font-size:12px;margin-bottom:",";"],Object(Z.J)(2),Object(Z.H)("borderSecondary"),Object(Z.J)(3)),ti=$.d.div.withConfig({displayName:"styled__FirstRow",componentId:"sc-3gu94j-1"})(["display:flex;justify-content:space-between;"]),ai=$.d.div.withConfig({displayName:"styled__GithubCopy",componentId:"sc-3gu94j-2"})([""]),ni=$.d.div.withConfig({displayName:"styled__GithubCopyLine",componentId:"sc-3gu94j-3"})([""]),ri=$.d.a.withConfig({displayName:"styled__SocialMediaLink",componentId:"sc-3gu94j-4"})(["&,&:hover{color:",";}"],Object(Z.H)("main")),oi=Object($.d)(ri).withConfig({displayName:"styled__GithubStarQuestion",componentId:"sc-3gu94j-5"})([""]),ii=Object($.d)(ri).withConfig({displayName:"styled__GithubIcon",componentId:"sc-3gu94j-6"})(["font-size:24px;"]),si=Object($.d)(ri).withConfig({displayName:"styled__TwitterIcon",componentId:"sc-3gu94j-7"})(["font-size:17px;"]),li=Object($.d)(ri).withConfig({displayName:"styled__FacebookIcon",componentId:"sc-3gu94j-8"})(["font-size:23px;"]),ci=$.d.div.withConfig({displayName:"styled__Separator",componentId:"sc-3gu94j-9"})(["margin-top:",";border-top:1px solid ",";"],Object(Z.J)(2),Object(Z.H)("separator")),ui=$.d.div.withConfig({displayName:"styled__SecondRow",componentId:"sc-3gu94j-10"})(["margin-top:",";display:flex;align-items:center;justify-content:space-between;"],Object(Z.J)(2)),di=$.d.span.withConfig({displayName:"styled__SecondRowText",componentId:"sc-3gu94j-11"})(["font-size:10px;"]),hi=function(){return r.a.createElement(ei,null,r.a.createElement(ti,null,r.a.createElement(ai,null,r.a.createElement(ni,null,"Do you like Netdata?"),r.a.createElement(oi,{href:"https://github.com/netdata/netdata/",target:"_blank"},"Give us a star!")),r.a.createElement(ii,{href:"https://github.com/netdata/netdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-github"}))),r.a.createElement(ci,null),r.a.createElement(ui,null,r.a.createElement(di,null,"And share the word!"),r.a.createElement(si,{href:"https://twitter.com/linuxnetdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-twitter"})),r.a.createElement(li,{href:"https://www.facebook.com/linuxnetdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-facebook"}))))},pi=function(e){var t=e.children,a=Object(n.useRef)(document.querySelector("#sidebar-end-portal-container"));return Object(o.createPortal)(t,a.current)},fi=(a(442),Object($.d)((function(e){var t=e.className,a=Object(dr.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.H)(["neutral","limedSpruce"]),Object(Z.H)(["red","lavender"]),Object(Z.H)("error"),Object(Z.H)(["green","frostee"]),Object(Z.H)("success"),Object(Z.H)("success"),Object(Z.H)("error"))),gi=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)},mi=function(e){var t=e.global.snapshot,a=e.global.chartsMetadata.data;return t||a?t?t.hostname:a.hostname:""},bi=function(){var e=Object(la.b)(mi);return r.a.createElement(gi,{icon:"node_hollow"},r.a.createElement(Z.B,{"data-testid":"header-nodename-".concat(e),color:"bright",strong:!0,truncate:!0},e))},vi=["neutral","black"],_i=function(e){var t=e.children,a=e.isBasic;return r.a.createElement(Z.j,Object.assign({padding:[1.5,2],margin:[2],background:vi,round:1},!a&&{width:{max:"300px"}}),r.a.createElement(Z.F,{color:"bright"},t))},yi=function(e,t){var a=t.isBasic,n="function"===typeof e?e():e;return"string"===typeof e||a?r.a.createElement(_i,{isBasic:a},n):n},Oi=function(e){var t=e.children,a=e.content,o=e.isBasic,i=Object(dr.a)(e,["children","content","isBasic"]),s=Object(n.useCallback)((function(){return yi(a,{isBasic:o})}),[a,o]);return r.a.createElement(Z.G,Object.assign({plain:!0,animation:!0,content:s},i),t)},xi=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(Oi,{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(Oi,{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(Oi,{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"})))},wi=a(544),Ei=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);"]),Si=Ei,Ci=Object($.d)(Z.j).withConfig({displayName:"protoBuf__PillContainer",componentId:"sc-15abcpz-0"})(["white-space:nowrap;"]),Ai=Object($.d)(Z.B).attrs({as:"a",color:"success",target:"_blank"}).withConfig({displayName:"protoBuf__Link",componentId:"sc-15abcpz-1"})([""]),ki=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(wi.a)("(min-width: 1400px)"),c=function(){o(!1)};return i?r.a.createElement(Z.j,{flex:!1},r.a.createElement(Ci,{ref:s},r.a.createElement(Z.z,{"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(Si,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.B,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(Ai,{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(Ai,{href:"https://learn.netdata.cloud/docs/agent/claim#remove-and-reconnect-a-node"},"unclaim it."))))))):null},ji=function(e){var t,a=e.currentVersion,n="stable"===e.releaseChannel,o=qo("https://api.github.com/repos/netdata/netdata/releases/latest",n,!0),i=Object(A.a)(o,1)[0],s=qo("https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt",!n),l=Object(A.a)(s,1)[0],c=qo(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(Oi,{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"}))},Ti=function(e){var t=e.global.chartsMetadata.data;return t?{version:t.version,releaseChannel:t.release_channel}:null},Di=function(){var e=Object(la.b)(Ti);return e&&r.a.createElement(ji,{currentVersion:e.version,releaseChannel:e.releaseChannel})},Pi=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]},Mi=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},Li=function(e,t){var a=Object(n.useState)((function(){return Mi(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]},Ii=a(551),Ni=$.d.div.withConfig({displayName:"styled__RootContainer",componentId:"sc-1al6duq-0"})(["width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;"]),Ri=(Object($.d)(Ii.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.H)("bright"),Object(Z.J)(5),Object(Z.J)(5),Object(Z.J)(6))),Bi=$.d.div.withConfig({displayName:"styled__ListContainer",componentId:"sc-1al6duq-3"})(["padding:"," 0;"],Object(Z.J)(3)),Fi=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.H)("bright")),Hi=$.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.J)(102),Object(Z.J)(43),Object(Z.H)("mainBackground"),Object(Z.H)("text"),60),zi=$.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.J)(3),Object(Z.J)(2),Object(Z.J)(1),Object(Z.J)(1),Object(Z.H)("textLite")),Ui=$.d.span.withConfig({displayName:"styled__StyledCustomTimePeriod",componentId:"y9nggg-2"})(["margin:"," "," 0;color:",";cursor:pointer;&:first-of-type{margin-top:0;}&:hover{color:",";}"],Object(Z.J)(1),Object(Z.J)(3),(function(e){var t=e.isSelected,a=e.theme;return Object(Z.H)(t?"primary":"text")({theme:a})}),Object(Z.H)("textLite")),Gi=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(Ri,{className:i},r.a.createElement(ko.b,null,r.a.createElement(ko.a,{ref:f,open:c,onClose:function(){u(!1)},anchorCorner:h},"function"===typeof o?c&&r.a.createElement(Bi,null,r.a.createElement(Co.a,null,o({maxHeight:null===(t=f.current)||void 0===t?void 0:t.root.ref.style.maxHeight}))):r.a.createElement(Bi,null,r.a.createElement(Co.a,null,o))),r.a.createElement(Ni,{onClick:function(){u(!c)}},a||s&&s(),p?p():r.a.createElement(Fi,{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.H)("border"),Object(Z.H)("text"),"z-index: 45;",Object(Z.J)(2),Object(Z.H)("mainBackground")),Wi=Object($.d)(Z.o).withConfig({displayName:"styled__DropdownIcon",componentId:"y9nggg-4"})(["fill:",";width:12px;height:12px;"],Object(Z.H)("text")),Vi=$.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.H)("border"),Object(Z.H)("mainBackground"),Object(Z.H)("primary")),Yi=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);"]),Xi=$.d.hr.withConfig({displayName:"styled__StyledHR",componentId:"y9nggg-7"})(["border:none;margin:0;border-left:1px solid ",";height:284px;"],Object(Z.H)("borderSecondary")),Ki=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(zi,{key:t,onClick:c,"data-ga":"date-picker::click-quick-selector::".concat(l,"::").concat(-t),"data-testid":"timePeriod-value"},r.a.createElement(Z.B,{color:i?"primary":"text"},a))})),Zi=a(556),qi=a(545),$i=a(550),Ji=a(546),Qi=a(283),es=a(557),ts=a(278),as=["minutes","hours","days","months"],ns={minutes:60,hours:3600,days:86400,months:2592e3},rs=function(e,t){return Math.round(e/ns[t])},os=function(e,t){var a=Object(Zi.a)(new Date(0),Object(u.a)({},t,e));return-Object(qi.a)(a)},is={startDate:"start",endDate:"finish"},ss=[{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"}],ls=function(e,t){var a=Object(Ji.a)(e,"MMMM d yyyy, H:mm")?e:Object(Qi.a)(e,"MMMM d yyyy, H:mm",Date.now());return Object(Qi.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())},cs=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"},ss.map((function(e){var o=e.period,i=e.value,s=e.resolution;return r.a.createElement(Ki,{key:i,value:i,period:o,resolution:s,setTimeRange:t,isSelected:a===i,tagging:n})})))},us=a(174),ds=function(e){var t=e.handleTimePeriodChange,a=e.value,o=e.resolution,i=e.tagging,s=function(){return a<=0?rs(-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(Zi.a)(new Date(0),Object(u.a)({},o,n));return r&&Object(us.a)(i)&&Object(qi.a)(i)<=94694400?t(os(n,o),o):h(a<=0?rs(-a,o):0)}),[o,a,t]),_=Object(n.useCallback)((function(e){return function(){t(os(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.B,null,"Last"),r.a.createElement(Vi,{value:d,onChange:b,onBlur:v,"data-ga":"date-picker::click-last-integer::".concat(i,"::").concat(d),"data-testid":"timePeriod-timeInput"}),r.a.createElement(Gi,{isOpen:g,onMenuToggle:m,renderTitle:function(){return r.a.createElement(Z.j,{alignItems:"center",flexWrap:!1,width:"100%"},r.a.createElement(Z.B,{padding:[0,4,0,0]},o),r.a.createElement(Wi,{name:"triangle_down"}))},renderOpener:function(){return null}},(function(){return as.map((function(e){return r.a.createElement(Ui,{key:e,onClick:_(e),"data-ga":"date-picker::click-last-time-".concat(e,"::").concat(i),"data-testid":"timePeriod-option"},e)}))})))},hs=a(547),ps=a(279),fs=a.n(ps),gs=(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(fs.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})}),ms=$.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.H)("border"),Object(Z.H)("mainBackground"),Object(Z.H)("primary")),bs=$.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.H)("mainBackground"),Object(Z.H)("text"),Object(Z.H)("mainBackground"),Object(Z.H)("main"),Object(Z.H)("textLite"),Object(Z.H)("main"),Object(Z.H)("elementBackground"),Object(Z.H)("textLite"),Object(Z.H)("main"),Object(Z.H)("bright"),Object(Z.H)("primary"),Object(Z.H)("primary"),Object(Z.H)("elementBackground"),Object(Z.H)("bright"),Object(Z.H)("primary"),Object(Z.H)("bright"),Object(Z.I)(["green","netdata"],.8),Object(Z.H)("bright"),Object(Z.H)("primary"),Object(Z.H)("bright"),Object(Z.I)(["green","netdata"],.8)),vs=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(us.a)(e)){var t=Object($i.a)(e,"MMMM d yyyy, H:mm");g(t)}}),[]),v=Object(n.useCallback)((function(e){var t=ls(e.target.value,d);if(Object(us.a)(t)&&Object(ts.a)(t)>0){var a=Object(ts.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(ms,{type:"text",name:a,value:i?f:u,onChange:m,onBlur:v,onFocus:l,placeholder:u,"data-testid":"datePicker-input"})},_s=a(24),ys=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])},Os=function(e,t){return e>0?Object(_s.a)(new Date(t(e))):e||0===e?Object(_s.a)(new Date(t((new Date).valueOf()+1e3*e))):null},xs=function(e,t){var a=ys();return Object(n.useMemo)((function(){return[Os(e,a),Os(t,a)]}),[e,t,a])},ws=function(e){var t=e.startDate,a=e.setStartDate,o=e.endDate,i=e.setEndDate,s=e.onDatesChange,l=e.onInputFocus,c=ys(),u=xs(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(hs.a)(Os(e,c),p)?a(e):t()}),[p,c,a]),m=Object(n.useCallback)((function(e,t){return Object(hs.a)(h,Os(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?ls(Object($i.a)(a,"MMMM d yyyy, H:mm"),f):a,o=n?ls(Object($i.a)(n,"MMMM d yyyy, H:mm"),f):n,i=Object(ts.a)(r)||null,l=Object(ts.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(gs,{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:bs}),r.a.createElement(Z.j,{justifyContent:"around",alignItems:"center",width:"100%"},r.a.createElement(vs,{name:"startDate",value:h,onDatesChange:g,onFocus:l,placeholderText:"Select a start date"}),r.a.createElement(vs,{name:"endDate",value:p,onDatesChange:m,onFocus:l,placeholderText:"Select an end date"})))},Es=function(e){var t=e.startDate,a=e.endDate,o=xs(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($i.a)(e,"MMMM d yyyy, H:mm:ss"),formattedEndDate:Object($i.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(es.a)(Object(ts.a)(e),Object(ts.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.F,{strong:!0,whiteSpace:"nowrap"},"From"),r.a.createElement(Z.F,{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.F,{strong:!0,whiteSpace:"nowrap"},"To"),r.a.createElement(Z.F,{whiteSpace:"nowrap","data-testid":"periodIndication-to"},d)),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:2},r.a.createElement(Z.F,{whiteSpace:"nowrap"},"/"),r.a.createElement(Z.F,{color:"textLite",whiteSpace:"nowrap","data-testid":"periodIndication-period"},h)))},Ss=a(100),Cs=a.n(Ss),As=[{value:864e5,unit:"d"},{value:36e5,unit:"h"},{value:6e4,unit:"min"},{value:6e4,unit:"min"},{value:1e3,unit:"s"}],ks=function(e,t){return Cs.a.duration(e.diff(t))},js=function(e){var t=Math.abs(e),a=t<6e4;return As.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}),"")},Ts=Object($.d)(Z.j).withConfig({displayName:"container__Container",componentId:"sc-1oifnqd-0"})(["cursor:pointer;&:hover *{color:",";fill:",";}"],Object(Z.H)("textLite"),Object(Z.H)("textLite")),Ds=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.F,{color:"text",whiteSpace:"nowrap"},l(a,{long:!1})," \u2022"," ",r.a.createElement(Z.F,{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.F,{color:"text",whiteSpace:"nowrap"},!o&&"".concat(l(n,{long:!1})," \u2022 "),r.a.createElement(Z.F,{color:t?"accent":"textFocus",whiteSpace:"nowrap"},s(n,{secs:!1}))))},Ps=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.F,{color:"text",whiteSpace:"nowrap"},"\u2022 last")),r.a.createElement(Z.F,{color:"text",whiteSpace:"nowrap"},a))},Ms=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?Cs()(new Date).add(e,"seconds"):Cs()(e)}(i),b=function(e){return e?Cs()(e):Cs()(new Date)}(s),v=Object(la.b)(ue.m);Object(n.useEffect)((function(){var e=ks(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 js(ks(m,b).as("milliseconds"))}),[l,m,b]);return r.a.createElement(Oi,{content:c?function(){}:"Select a predefined or a custom timeframe",align:"bottom",plain:!0},r.a.createElement(Ts,{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(Ds,{isPlaying:l,endDate:b,startDate:m,isSameDate:_}),r.a.createElement(Ps,{isPlaying:l,duration:y})))})),Ls=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=Li("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=Pi(),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)}),[]),B=Object(n.useCallback)((function(e){e.stopPropagation(),P()}),[P]),F=Object(n.useMemo)((function(){return function(e){return is[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(Yi,{target:L.current,canHideTarget:!1,align:{top:"bottom",left:"left"},onEsc:M,onClickOutside:M},r.a.createElement(Hi,{"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(cs,{handleTimePeriodChange:W,selectedDate:f,tagging:u}),r.a.createElement(ds,{handleTimePeriodChange:W,value:f,resolution:x,tagging:u})),r.a.createElement(Xi,null),r.a.createElement(ws,{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"===F?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(Es,{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(F),"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(F),"data-testid":"datePicker-apply"}))))):null;return r.a.createElement(r.a.Fragment,null,r.a.createElement(Ms,{onClick:B,tagging:u,isPickerOpen:D,isPlaying:d,setRangeValues:t,start:o,end:i,ref:L}),V)},Is=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.d)({after:e.toString(),before:t.toString()})}),[c]),r.a.createElement(Ls,{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})})),Ns=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.I)(a?["green","netdata"]:["neutral","tuna"],a?.3:1):Object(Z.I)(a?["green","frostee"]:["neutral","blackhaze"]))({theme:t})})),Rs=function(e){var t=e.isPlaying;return Object(Z.H)(t?["green","chateau"]:["neutral","iron"])},Bs=Object($.d)(Z.z).attrs((function(e){return{flavour:e.isPlaying?"success":"neutral"}})).withConfig({displayName:"styledPill__StyledPill",componentId:"sc-151yrns-0"})(["&:hover{background:",";border-color:",";}"],Rs,Rs),Fs=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(Oi,{content:t?"Click to pause":"Click to play",align:"bottom",plain:!0},r.a.createElement(Bs,{icon:i,onClick:t?function(){return o(Object(Ke.t)())}:function(){return o(Object(Ke.k)({forcePlay:!1}))},isPlaying:t},t?"Playing":"Paused"))},Hs=Object($.d)(Z.j).withConfig({displayName:"item__PanelRowContainer",componentId:"sc-1qh9192-0"})(["cursor:pointer;&:hover{background:",";}",""],Object(Z.H)("selected"),(function(e){return e.selected&&"background: ".concat(Object(Z.H)("selected")(e),";")})),zs=Object(n.forwardRef)((function(e,t){var a=e.disabled,o=e.children,i=e.Wrapper,s=void 0===i?Z.B: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(Hs,{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)})),Us=Object($.d)(Z.l).attrs({padding:[0],margin:[0]}).withConfig({displayName:"list__DefaultListHeader",componentId:"cb73mo-0"})(["cursor:pointer;"]),Gs=function(e){var t=e.toggleOpen,a=e.label,n=e.testid,o=e.Header,i=void 0===o?Us:o;return r.a.createElement(i,{"data-testid":n,onClick:t},a)},Ws=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(Gs,{Header:l,toggleOpen:n,label:o,testid:s}),r.a.createElement(Z.d,{open:a},i))},Vs=(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.F,{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."))}),Ys=Object($.d)(Z.j).attrs({padding:[1],role:"button"}).withConfig({displayName:"playOptions__MenuButton",componentId:"cm1181-0"})(["cursor:pointer;"]),Xs=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);"]),Ks=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(Ys,{onClick:l,width:"auto"},r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"})):r.a.createElement(Oi,{content:r.a.createElement(Vs,null),align:"bottom",plain:!0},r.a.createElement(Ys,{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(Xs,null,r.a.createElement(zs,{round:1,icon:"playOutline",onClick:function(){a(Object(Ke.k)({forcePlay:!1})),c()}},"Play"),r.a.createElement(zs,{round:1,icon:"pauseOutline",onClick:function(){a(Object(Ke.t)()),c()}},"Pause"),r.a.createElement(zs,{round:1,icon:"forcePlayOutline",onClick:function(){a(Object(Ke.k)({forcePlay:!0})),c()}},"Force Play"))))})),Zs=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(gi,{hasBorder:!0},r.a.createElement(Ns,{isPlaying:l,padding:[2,2],round:!0,height:"100%",alignItems:"center",gap:1,ref:e},r.a.createElement(Fs,{isPlaying:l,isForcePlaying:!a}),r.a.createElement(Ks,{target:e}),r.a.createElement(Is,{isPlaying:l,tagging:"global-view"})))},qs={warning:"#FFF8E1",error:"#FFEBEF"},$s=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?qs[t]:t})),Js=Object(n.forwardRef)((function(e,t){var a=e.children,n=e.background,o=e.color,i=e.hollow,s=Object(dr.a)(e,["children","background","color","hollow"]);return r.a.createElement($s,Object.assign({background:n,hollow:i,ref:t},s),r.a.createElement(Z.D,{color:i?n:o,strong:!0},a))})),Qs={"data-toggle":"modal","data-target":"#alarmsModal"},el=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(gi,{icon:"alarm"},r.a.createElement(Oi,{content:o?"".concat(o," critical alert").concat(o.length>1?"s":""):"No critical alerts",align:"bottom",plain:!0},r.a.createElement(Js,Object.assign({background:"error",hollow:!0},Qs),o)),r.a.createElement(Oi,{content:i?"".concat(i," warning alert").concat(i.length>1?"s":""):"No warning alerts",align:"bottom",plain:!0},r.a.createElement(Js,Object.assign({background:"warning",hollow:!0},Qs),i)))},tl=function(){return r.a.createElement(Z.y,{app:"agent"},(function(e){var t=e.toggle,a=e.upToDate;return r.a.createElement(Oi,{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}))}))},al=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);"]),nl=Object($.d)(Z.C).withConfig({displayName:"searchInput__SearchInput",componentId:"sc-1j08rwh-0"})(["& input{background:transparent;}& > label{margin-bottom:0;}"]),rl=Object(n.forwardRef)((function(e,t){var a=e.value,n=e.onChange;return r.a.createElement(nl,{inputRef:t,value:a,onChange:n,placeholder:"Search",metaShrinked:!0})})),ol=Object($.d)(Z.j).attrs({column:!0,padding:[2,0,0],overflow:{vertical:"auto"},height:{max:"320px"}}).withConfig({displayName:"container__Container",componentId:"qngq57-0"})([""]),il=Object($.d)(Z.j).attrs({justifyContent:"between",alignItems:"center",width:"100%",gap:2}).withConfig({displayName:"wrapper__Wrapper",componentId:"sc-1m1od8q-0"})([""]),sl=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(zs,{round:1,onClick:s,Wrapper:il},r.a.createElement(Z.B,{color:"text"},t),r.a.createElement(Z.B,{color:"textLite",whiteSpace:"nowrap"},"UTC ",a))},ll=[{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"]}],cl=new Date,ul=function(){return new Intl.DateTimeFormat("default",{}).resolvedOptions()},dl=function(){var e={};return ll.reduce((function(t,a){var n=a.utc;try{var r=new Intl.DateTimeFormat("fr",{timeZone:n[0],timeZoneName:"short"}).format(cl).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})),hl=dl.reduce((function(e,t){var a=t.utc,n=Object(dr.a)(t,["utc"]);return a.forEach((function(t){return e[t]=Object(g.a)({},n,{utc:t})})),e}),{}),pl=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?ul().timeZone:e);return hl[a in hl?a:ul().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?dl.filter((function(e){var t=e.text,n=e.offset;return t.toUpperCase().includes(a.toUpperCase())||n.includes(a)})):dl}),[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(gi,{hasBorder:!0},r.a.createElement(zs,{round:1,onClick:c,ref:u,Wrapper:il},r.a.createElement(Z.j,{gap:1},r.a.createElement(Z.B,{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(al,null,r.a.createElement(rl,{value:a,onChange:_,ref:d}),r.a.createElement(ol,null,m.map((function(e){var t=e.text,a=e.offset,n=e.utc;return r.a.createElement(sl,{key:t,name:t,offset:a,utc:n[0],onSelect:v})}))))))},fl=a(56),gl=a(501),ml=a(73),bl=a(125),vl=a(182),_l=Object($.d)(Z.j).attrs({position:"absolute"}).withConfig({displayName:"iframe__IframeContainer",componentId:"sc-1tybwh7-0"})(["display:none;"]),yl=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(gl.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.d)(f,"sign-in?id=".concat(g.machineGuid,"&name=").concat(O,"&origin=").concat(x));Object(ml.b)("hello-from-sign-in",(function(e){l.current=e})),Object(bl.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(ml.a)(c.current,{type:"synced-private-registry",payload:e})}}),[t,g,h]),r.a.createElement(_l,{as:"iframe",id:vl.a,src:w,onLoad:E})},Ol=function(){var e=Object(s.d)(),t=Object(gl.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(ml.b)("is-signed-in",d);return[Object(A.a)(h,1)[0],c]},xl=function(){var e=Ol(),t=Object(A.a)(e,1)[0];return Object(s.e)(ue.u)&&r.a.createElement(Oi,{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(yl,{signedIn:t}),!t&&r.a.createElement(fl.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}))}))))},wl=a(282),El=function(e){var t=e.label,a=e.active,n=e.showBorderLeft,o=e.icon,i=e.onActivate;return r.a.createElement(Z.w,{onActivate:function(){a||i&&i()},icon:r.a.createElement(Z.o,{name:o,size:"small"}),fixed:!0,closable:!1,showBorderLeft:n,active:a},r.a.createElement(Z.B,null,t))},Sl="Discover the free benefits of Netdata Cloud",Cl=a(89),Al=function(e){var t=e.children;return r.a.createElement(Z.B,{fontSize:"16px"},t)},kl={Home:{id:"Home",label:"Home",header:"Home",text:function(){return r.a.createElement(Al,null,"The Home view in Netdata cloud provides summarized relevant information in an easily digestible display. You can see information about your nodes, data collection and retention stats, alerts, users and dashboards.")},icon:"room_home",image:"images/home.png"},nodeView:{id:"nodeView",label:"Node View",header:"Node View",text:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Al,null,"The single node view you are currently using will of course be available on Netdata Cloud as well. In addition, the charts and visualization on Netdata Cloud will be more flexible and powerful for troubleshooting than what is available on the agent."),r.a.createElement(Al,null,"Netdata Cloud also comes with the Metric Correlations feature that lets you quickly find metrics and charts related to a particular window of interest that you want to explore further. By displaying the standard Netdata dashboard, filtered to show only charts that are relevant to the window of interest, you can get to the root cause sooner."))},icon:"nodes_hollow",image:"images/nodeView.png"},Overview:{id:"Overview",label:"Overview",header:"Overview",text:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Al,null,"The Overview tab is a great way to monitor your infrastructure using Netdata Cloud. While the interface might look similar to local dashboards served by an Agent, or even the single-node dashboards in Netdata Cloud, Overview uses composite charts. These charts display real-time aggregated metrics from all the nodes (or a filtered selection) in a given War Room."),r.a.createElement(Al,null,"With Overview's composite charts, you can see your infrastructure from a single pane of glass, discover trends or anomalies, then drill down by grouping metrics by node and jumping to single-node dashboards for root cause analysis."),r.a.createElement(Al,null,"Here's an example of a composite chart visualizing Disk I/O bandwidth from 5 different nodes in one chart."))},icon:"room_overview",image:"images/overview.png"},Nodes:{id:"Nodes",label:"Nodes",header:"Nodes",text:function(){return r.a.createElement(Al,null,"The Nodes view in Netdata Cloud lets you see and customize key metrics from any number of Agent-monitored nodes and seamlessly navigate to any node's dashboard for troubleshooting performance issues or anomalies using Netdata's highly-granular metrics.")},icon:"nodes_hollow",image:"images/nodes.jpg"},Dashboards:{id:"Dashboards",label:"Dashboards",header:"Dashboards",text:function(){return r.a.createElement(Al,null,"With Netdata Cloud, you can build new dashboards that target your infrastructure's unique needs. Put key metrics from any number of distributed systems in one place for a bird's eye view of your infrastructure.")},icon:"dashboard",image:"images/dashboards.png"},Alerts:{id:"Alerts",label:"Alerts",header:"Alerts",text:function(){return r.a.createElement(Al,null,"The Alerts view gives you a high level of availability and performance information for every node you're monitoring with Netdata Cloud. It also offers an easy way to drill down into any particular alert by taking the user to the dedicated alert view from where the user can run metrics correlation or take further troubleshooting steps.")},icon:"alarm",image:"images/alerts.jpg"},Anomalies:{id:"Anomalies",label:"Anomalies",header:"Anomaies",text:function(){return r.a.createElement(Al,null,"The Anomalies view on Netdata Cloud lets you quickly surface potentially anomalous metrics and charts related to a particular highlight window of interest using Anomaly Advisor. Anomalies are detected using per metric unsupervised machine learning running at the edge!")},icon:"anomaliesLens",video:"https://user-images.githubusercontent.com/24860547/165943403-1acb9759-7446-4704-8955-c566d04ad7ab.mp4"},Pricing:{id:"Pricing",label:"Pricing",header:"Pricing",text:function(){return r.a.createElement(Al,null,"Netdata Cloud\u2019s distributed architecture\u2014with processing occurring at the individual nodes\u2014enables us to add any number of users at marginal cost. Couple this with our upcoming paid plan with added functionality for enterprise customers, and it means we can commit to providing our current functionality for free, always.")},image:"images/pricing.png",icon:"pricing"},Privacy:{id:"Privacy",label:"Privacy",header:"Privacy",text:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Al,null,"Data privacy is very important to us. We firmly believe that your data belongs to you. This is why we don't store any metric data in Netdata Cloud."),r.a.createElement(Al,null,"Your local installations of the Netdata Agent form the basis for the Netdata Cloud. All the data that you see in the web browser when using Netdata Cloud, is actually streamed directly from the Netdata Agent to the Netdata Cloud dashboard. The data passes through our systems, but it isn't stored. You can learn more about"," ",r.a.createElement(Cl.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/netdata-security"},"the Agent's security design")," ","design in the Agent documentation."),r.a.createElement(Al,null,"However, to be able to offer the stunning visualizations and advanced functionality of Netdata Cloud, it does store a limited number of metadata. This metadata is ONLY available to Netdata and NEVER to any 3rd parties. You can learn more about what metadata is stored in Netdata cloud in our",r.a.createElement(Cl.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/cloud/data-privacy"}," ","documentation")))},icon:"privacy"}},jl=function(e){var t=e.parentRef,a=e.isDropdownOpen,n=e.closeDropdown,o=e.text,i=e.header,s=e.handleGoToCloud,l=e.image,c=e.video;return t.current&&a?r.a.createElement(Z.h,{backdrop:!0,"data-testid":"selectedNodesDropdown",onEsc:n,align:{top:"bottom",left:"left"},target:t.current,onClickOutside:n},r.a.createElement(Z.t,{background:"modalBackground"},r.a.createElement(Z.v,null,r.a.createElement(Z.j,{gap:2},r.a.createElement(Z.o,{color:"white",name:"netdata"}),r.a.createElement(Z.k,{margin:[0]},"Discover the free benefits of Netdata Cloud",":")),r.a.createElement(Z.s,{onClose:n})),r.a.createElement(Z.r,null,r.a.createElement(Z.j,{column:!0,width:189,height:130},r.a.createElement(Z.j,{padding:[0,0,4,0],column:!0,gap:4},r.a.createElement(Z.j,{alignItems:"center"},r.a.createElement(Z.l,{margin:[0]},i),r.a.createElement(Z.a,{sx:{marginLeft:"auto"},"data-testid":"go-to-cloud-cta",margin:[0,2,0,0],width:{min:40}},r.a.createElement(fl.a,{utmParameters:{campaign:"discover_cloud"}},(function(e){var t=e.link;return r.a.createElement(Z.a,{label:r.a.createElement(Z.B,{textTransform:"none",strong:!0,color:"panel"},"Sign in to Netdata Cloud!"),width:"100%",onClick:function(){return s({link:t})},"data-testid":"cta1-button",as:Z.b,small:!0,"data-ga":"go-to-cloud-button"})})))),o()),l&&r.a.createElement(Z.j,{height:"auto",width:"100%",overflow:"hidden"},r.a.createElement(Z.a,{sx:{width:"100%",height:"auto"},as:"img",src:l})),c&&r.a.createElement(Z.j,{height:"100%",width:"100%"},r.a.createElement(Z.a,{sx:{width:"100%",height:"100%"}},r.a.createElement("iframe",{title:"discover-cloud-iframe}",width:"100%",height:"100%",src:c,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}))))),r.a.createElement(Z.u,null))):null},Tl=Z.j,Dl=Z.j,Pl=function(){var e=Object(n.useState)(!1),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(n.useState)(null),s=Object(A.a)(i,2),l=s[0],c=s[1],u=Object(n.useRef)(),d=function(){o(!0)};return r.a.createElement(Tl,{padding:[0,0,0,4],position:"relative",height:15},r.a.createElement(Dl,{padding:[4,2,4,2],gap:4,height:"100%",justifyContent:"center",alignItems:"center"},r.a.createElement(Z.B,{color:"primary"},Sl,":"),r.a.createElement(Z.j,{ref:u},r.a.createElement(Z.x,null,Object.keys(kl).map((function(e,t){var a=kl[e],n=a.label,o=a.icon,i=a.id,s=l?l.id:null;return r.a.createElement(El,{key:e,icon:o,active:i===s,label:n,showBorderLeft:0===t,onActivate:Object(Ve.c)(d,(function(){c(kl[e])}))})}))))),r.a.createElement(jl,Object.assign({parentRef:u,isDropdownOpen:a},l,{closeDropdown:Object(Ve.c)((function(){o(!1)}),(function(){c(null)})),handleGoToCloud:function(e){var t=e.link;window.location.href=t}})))},Ml=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;"]),Ll=function(){return r.a.createElement(Ml,null,r.a.createElement(Z.j,{alignItems:"center",gap:3},r.a.createElement(bi,null)),r.a.createElement(Z.j,{justifyContent:"end",alignItems:"center",gap:3},r.a.createElement(wl.CloudConnectionStatus,null),r.a.createElement(Di,null),r.a.createElement(tl,null),r.a.createElement(xi,null),r.a.createElement(ki,null),r.a.createElement(pl,null),r.a.createElement(Zs,null),r.a.createElement(el,null),r.a.createElement(xl,null)),r.a.createElement(Z.a,{sx:{background:"#272B30"},position:"absolute",top:"52px",left:"0px",right:"0px"},r.a.createElement(Pl,null)))},Il=Object($.d)(Z.b).withConfig({displayName:"expandButton__ExpandButton",componentId:"ebkdno-0"})(["&&{> .button-icon{width:6px;height:9px;}"]),Nl=a(140),Rl=function(e){var t=e.flavour,a=void 0===t?"default":t,n=Object(dr.a)(e,["flavour"]),o=Object(s.e)(ue.f);return r.a.createElement(Z.j,Object.assign({alignItems:"center",as:"iframe",src:"".concat(Object(Nl.a)(o,"sign-out"),"?type=").concat(a),border:{side:"all",size:"0px"},width:{max:"128px"},height:{max:"40px"}},n))},Bl=function(){return r.a.createElement(fl.a,{utmParameters:{content:"userSettings"}},(function(e){var t=e.isRegistry,a=e.link,n=e.onSignIn;return r.a.createElement(Z.B,{onClick:t?function(e){return function(e,t){e.stopPropagation(),window.location.href=t}(e,a)}:n},"Sign in")}))},Fl=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return e.isSignedIn})),Hl=function(){var e=Object(En.a)(),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(la.b)(Fl),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(Rl,{"data-testid":"signout-button-sidebar",flavour:"borderless",height:{max:"18px"}})}]:[{children:r.a.createElement(Bl,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(zs,Object.assign({key:t,padding:[2,4],round:1},e.onClick&&{onClick:e.onClick}),e.children)})))))},zl=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}))},Ul=function(){var e=Object(la.b)(ue.f);return r.a.createElement(Z.j,{as:"iframe",src:Object(Ve.d)(e,"space-bar"),title:"Space Bar",height:"100%",width:"100%",border:{side:"all",size:"0px"},overflow:"hidden"})},Gl=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(Il,{icon:"chevron_right_s",onClick:a,small:!0,neutral:!0,flavour:"borderless",themeType:"dark"}),o&&n&&r.a.createElement(Ul,null),o&&!n&&r.a.createElement(zl,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(Hl,null)))},Wl=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},Vl=function(e,t){for(var a=Wl(e.toLowerCase()),n=Wl(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},Yl=function(e,t){return"".concat(e,"/host/").concat(t,"/")},Xl=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:Yl(n,r),status:a[t+1].reachable}})).sort((function(e,t){return Vl(e.hostname,t.hostname)}))}},Kl=Object($.d)(Z.j).attrs({as:"a",gap:2,alignItems:"center"}).withConfig({displayName:"anchor__Anchor",componentId:"sc-8wivg4-0"})(["&:hover{text-decoration:none;}"]),Zl=function(e){var t=e.hostname,a=e.url,n=e.status;return r.a.createElement(Kl,{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.B,{color:"bright",truncate:!0},t)),r.a.createElement(Js,{background:n?"success":"border",color:"bright",round:10},n?"Live":"Off"))},ql=Object($.d)(Z.C).withConfig({displayName:"replicatedNodes__Search",componentId:"sc-1bn9jso-0"})(["& > label{margin-bottom:0;}"]),$l=Object($.d)(Z.o).withConfig({displayName:"replicatedNodes__StyledIcon",componentId:"sc-1bn9jso-1"})(["transform:",";"],(function(e){return e.right?"rotate(270deg)":"none"})),Jl=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(Ws,{isOpen:s,toggleOpen:p,label:r.a.createElement(Z.j,{alignItems:"center",justifyContent:"between"},r.a.createElement(Z.B,{strong:!0,color:"border"},"Replicated nodes"),r.a.createElement($l,{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(Kl,{as:"a",href:t.url,justifyContent:"start"},r.a.createElement(Z.o,{name:"nodes",size:"small",color:"bright"}),r.a.createElement(Z.B,{color:"bright"},t.hostname)),g.length>=5&&r.a.createElement(Z.j,{padding:[0,0,0,2]},r.a.createElement(ql,{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(Zl,{key:t,hostname:t,url:a,status:n})})))))},Ql=function(e){var t=e.parentNode,a=e.replicatedNodes,o=Object(la.b)(ue.f),i=Object(n.useRef)(),s=Object(ml.b)("hello-from-space-panel"),l=Object(A.a)(s,1)[0];return Object(n.useEffect)((function(){l&&i.current&&Object(ml.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(Nl.a)(o,"space-panel"),title:"space panel",width:"100%",height:"100%",border:{side:"all",size:"0px"}})},ec={signIn:{title:"Welcome back!",content:[r.a.createElement(Z.F,{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.F,{key:"1",color:"bright"},r.a.createElement(Z.F,{strong:!0,color:"bright"},"A single place")," ","for all your nodes."),r.a.createElement(Z.F,{key:"2",color:"bright"},r.a.createElement(Z.F,{strong:!0,color:"bright"},"Multi-node dashboards")," ","out of the box."),r.a.createElement(Z.F,{key:"3",color:"bright"},r.a.createElement(Z.F,{strong:!0,color:"bright"},"Custom dashboards")," ","for you to create, edit and share online."),r.a.createElement(Z.F,{key:"4",color:"bright"},r.a.createElement(Z.F,{strong:!0,color:"bright"},"Metric Correlations")," ","to find the root cause of anything."),r.a.createElement(Z.F,{key:"5",color:"bright"},r.a.createElement(Z.F,{strong:!0,color:"bright"},"Centrally dispatched notifications")," ","for all alarms of all your nodes."),r.a.createElement(Z.F,{key:"6",color:"bright"},"And... It is"," ",r.a.createElement(Z.F,{as:"a",href:"https://www.netdata.cloud/get-netdata/",target:"_blank",rel:"noopener noreferrer",strong:!0,color:"bright"},"free, forever!"))]}},tc=function(){return r.a.createElement(fl.a,{utmParameters:{content:"sidebar"}},(function(e){var t=e.isRegistry,a=e.link,n=e.onSignIn,o=e.offline,i=ec.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.B,{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})))}))},ac=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"}))},nc=function(){return r.a.createElement(Z.j,{alignItems:"center",background:["neutral","regentgrey"],column:!0,gap:1,padding:[10]},r.a.createElement(Z.F,{color:"bright",strong:!0,textAlign:"center"},"Can't connect to Netdata Cloud"),r.a.createElement(ac,null),r.a.createElement(Z.E,{color:"bright",textAlign:"center",margin:[2,0,0]},"Maybe you are behind a firewall or you don\u2019t have connection to the internet"))},rc=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 Xl(a,n,t)})),oc=Object(Ha.a)((function(e){return e.global.registry}),(function(e){return e.registryMachinesArray||[]})),ic=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return{isSignedIn:e.isSignedIn,offline:e.offline}})),sc=r.a.memo((function(e){var t=e.isOpen,a=e.toggle,o=Object(s.e)(rc),i=o.parentNode,l=void 0===i?{}:i,c=o.replicatedNodes,u=void 0===c?[]:c,d=Object(s.e)(oc),h=Object(s.e)(ue.v),p=Object(s.e)(ic),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(Jl,{parentNode:l,replicatedNodes:u}),!!d.length&&r.a.createElement(Z.B,{strong:!0,color:"border"},"VisitedNodes")),f&&r.a.createElement(Ql,{parentNode:l,replicatedNodes:u})),h&&r.a.createElement(Z.j,{border:{side:"top"},justifyContent:"center",alignItems:"center",padding:[6]},r.a.createElement(Z.F,{onClick:b},"Switch Identity")),!f&&m&&r.a.createElement(tc,null),g&&m&&r.a.createElement(nc,null)))})),lc=Object($.d)(Z.j).attrs({height:"100vh",zIndex:10}).withConfig({displayName:"sidebar__Wrapper",componentId:"v4d3v5-0"})(["pointer-events:all;"]),cc=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return e.isSignedIn})),uc=r.a.memo((function(){var e=Object(gl.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)(cc),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(lc,null,r.a.createElement(Gl,{isOpen:i,toggle:u,isSignedIn:l}),r.a.createElement(sc,{isOpen:i,toggle:u,offline:!0}))})),dc=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;"]),hc=function(e){var t=e.children;return e.printMode?t:r.a.createElement(dc,null,r.a.createElement(uc,null),r.a.createElement(Ll,null),t)},pc=(a(487),function(e){return{slate:Z.e,white:Z.f}[e]||Z.e}),fc=a(216),gc=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.B,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.B,null,e))})))),t.text.footer&&r.a.createElement(Z.B,{"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(fl.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.B,sx:{fontWeight:"500",lineHeight:"25px"}},t.CTA2.text))))):null};!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"}(no||(no={}));var mc=function(e){return"".concat(Ve.h).concat(Object(ue.Q)({content:e,campaign:"agent_nudge_to_cloud"}))},bc=(to={},Object(u.a)(to,no.PROMO_SIGN_UP_CLOUD,{title:"Learn about Netdata Cloud!",text:{header:function(){return r.a.createElement(Z.B,{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:no.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)(to,no.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.B,{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.B,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:no.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)(to,no.PROMO_IVNITED_TO_SPACE,{title:"Get an invitation to this Node\u2019s Space!",text:{header:function(){return r.a.createElement(Z.B,{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:no.PROMO_IVNITED_TO_SPACE},CTA1:{text:"Thanks, stay at Agent dashboard for now",toPath:"agent",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(to,no.PROMO_CLAIM_NODE,{title:"This node isn\u2019t connected to Netdata Cloud",text:{header:function(){return r.a.createElement(Z.B,{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.B,null," ","Connect this node directly (documentation on"," ",r.a.createElement(Cl.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim?".concat(mc(no.PROMO_CLAIM_NODE).substring(1),"#how-to-connect-a-node")},"how to connect a node"),") , or")},function(){return r.a.createElement(Z.B,null,"\u0391ctivate streaming to a parent node that is already connected (documentation on"," ",r.a.createElement(Cl.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/metrics-storage-management/enable-streaming?".concat(mc(no.PROMO_CLAIM_NODE).substring(1))},"how to configure streaming"),")")}]},tickBoxOption:{text:"Remember my choice.",preferenceID:no.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)(to,no.PROMO_TO_USE_NEW_DASHBAORD,{title:"Use the Old or the New dashboard?",text:{header:function(){return r.a.createElement(Z.B,{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:no.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)(to,no.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.B,{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.B,null,"To troubleshoot Netdata Cloud connection issues, please follow this"," ",r.a.createElement(Cl.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim?".concat(mc(no.FALLBACK_TO_AGENT).substring(1),"#troubleshooting")},"this guide.")))},bullets:[]},tickBoxOption:{text:"Don't show this again",preferenceID:no.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)(to,no.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.B,{strong:!0},"Unfortunately, it seems we aren't able to get information on this node in regards to Netdata Cloud."),r.a.createElement(Z.B,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:no.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"}}),to),vc=(ao={},Object(u.a)(ao,no.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)(ao,no.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)(ao,no.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)(ao,no.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)(ao,no.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)(ao,no.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)(ao,no.PROMO_SIGN_UP_CLOUD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&"UNKNOWN"===a&&"NOT_CLAIMED"===n})),ao),_c=function(e){var t=e.userStatus,a=e.nodeClaimedStatus,r=e.userNodeAccess,o=e.nodeLiveness,i=Object(gl.a)("USER_SAVED_PREFERENCE"),s=Object(A.a)(i,2),l=s[0],c=s[1],u=Object(n.useMemo)((function(){return Object.keys(vc).find((function(e){return vc[e]({userStatus:t,nodeClaimedStatus:a,userNodeAccess:r,userSavedPreference:l,nodeLiveness:o})}))}),[t,a,r,o,l]);return{migrationModalPromoInfo:bc[u],migrationModalPromo:u,setUserPrefrence:c,userSavedPreference:l}},yc=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=_c(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(gl.a)(v),y=Object(A.a)(_,2)[1],O=localStorage.getItem(v),x=e&&p&&u&&(!O||"undefined"===O),w=Object(bl.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(gc,{savePromoRemindMeSelection:y,migrationModalPromoInfo:p,setUserPrefrence:f,closeModal:function(){d(!1)},migrationModalPromo:b,requestRefreshOfAccess:w}):null},Oc=Z.a;window.Ps=na.a;var xc=function(){var e=Object(s.f)();Object(n.useEffect)((function(){window.NETDATA.alarms={},window.NETDATA.pause=function(e){e()},Object(fc.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(fc.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=qo("".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:pc(O)},m&&r.a.createElement(fi,null),r.a.createElement(r.a.Fragment,null),v&&_&&y&&l&&r.a.createElement(r.a.Fragment,null,r.a.createElement(hc,{printMode:ve},Ye.a?null:r.a.createElement(yc,null),m&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Zo,{key:o}),r.a.createElement(pi,null,r.a.createElement(hi,null)),ve&&r.a.createElement(Qo,null))),r.a.createElement(Oc,{height:15})))};a(488);i.a.render(r.a.createElement(s.a,{store:ta},r.a.createElement(xc,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";var n=a(5),r=a(0),o=a(28),i=a(17),s=a(501),l=a(44),c=a(9),u=a(27),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])}},62:function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"d",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return h}));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){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"},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(28),r=n.e,o=n.d},82: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")}()},89: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.H)("primary"),Object(s.H)("primary"),Object(s.H)("accent"));t.a=function(e){var t=e.Component,a=void 0===t?s.B:t,r=Object(n.a)(e,["Component"]);return o.a.createElement(a,Object.assign({as:l},r))}},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 B})),a.d(t,"H",(function(){return F})),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(27),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.h).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]}))},B=R("destroy_on_hide"),F=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(113),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.cc0e57d1.chunk.js.map
\ No newline at end of file diff --git a/web/gui/dashboard/static/js/main.cc0e57d1.chunk.js.map b/web/gui/dashboard/static/js/main.cc0e57d1.chunk.js.map deleted file mode 100644 index e3f5155c1..000000000 --- a/web/gui/dashboard/static/js/main.cc0e57d1.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["utils/units-conversion.ts","components/button/button.tsx","domains/chart/components/toolbox-button.tsx","domains/chart/components/resize-handler.tsx","domains/global/actions.ts","hooks/use-user-node-access.ts","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","utils/utils.ts","vendor/d3pie-0.2.1-netdata-3.js","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/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/discover-cloud/cloudTab.js","components/discover-cloud/discoverCloudModal.js","components/discover-cloud/contants.js","components/discover-cloud/discoverCloudDrop.js","components/discover-cloud/discoverCloud.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","components/auth/signIn/index.js","utils/hash-utils.ts","utils/post-message.ts","utils/env.ts","domains/dashboard/constants.ts","store/redux-separate-context.ts","utils/is-demo.ts","components/anchor/index.tsx","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","Button","React","ref","children","className","rest","type","classNames","ToolboxButton","iconType","onClick","onDoubleClick","onMouseDown","onTouchStart","popoverContent","popoverTitle","buttonRef","useRef","showHelp","useSelector","selectShowHelp","useEffect","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","LOCALSTORAGE_HEIGHT_KEY_PREFIX","ResizeHandler","chartContainerElement","chartUuid","heightId","isLegendOnBottom","useState","clientHeight","resizeHeight","setResizeHeight","dispatch","useDispatch","setResizeHeightAction","id","handleResize","useCallback","event","preventDefault","intialHeight","eventStartHeight","touches","clientY","setHeight","currentHeight","nextHeight","style","height","heightForPersistance","LEGEND_BOTTOM_SINGLE_LINE_HEIGHT","localStorage","setItem","onMouseMove","e","onTouchMove","document","addEventListener","onTouchEnd","removeEventListener","onMouseEnd","stopPropagation","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","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","as","bullet","data-testid","utmParameters","campaign","data-ga","disabled","textTransform","label","Text","sx","fontWeight","lineHeight","CloudConnectionStatus","selectUserNodeAccess","cloudEnabled","selectIsCloudEnabled","isModalOpen","setModalOpen","cloudConnectionStatusInfo","nodeLiveness","documentElement","openModal","flavour","MASKED_DATA","INFO_POLLING_FREQUENCY","alarmStatuses","isTimestamp","NETDATA_REGISTRY_SERVER","MS_IN_SECOND","getIframeSrc","path","utmUrlSuffix","getBoundingClientRect","obj1","obj2","equals","callAll","fns","arg","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","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","styled","getSizeBy","SideContent","ContentContainer","HeaderText","getColor","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","ProceededChartDisclaimer","forwardRef","backgroundColorMap","WARNING","CRITICAL","CLEAR","borderColorMap","getBorderColor","textColorMap","Badge","border","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","isRendered","toggleIsRendered","positionTo","useDygraphBadge","isAlarmBadgeVisible","alarmBadgeRef","updateAlarmBadge","isProceeded","precededChartRef","updatePrecededPosition","useLayoutEffect","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","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","getPortalNodeStyles","shouldAddSpecialHeight","heightFromLocalStorage","heightID","persitedHeight","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","CloudTab","showBorderLeft","onActivate","fixed","closable","TITLE","TabsContentText","TabsContent","Home","image","nodeView","Overview","Nodes","Dashboards","Alerts","Anomalies","video","Pricing","Privacy","DiscoverCloudDrop","parentRef","closeDropdown","handleGoToCloud","backdrop","marginLeft","frameBorder","allow","allowFullScreen","InnerPostioner","DiscoverCloud","setIsModalOpen","seletedModalContent","setSelectedModalContent","dropDownParentRef","handleOpenModal","slectedContentId","zIndex","SignOut","SignInItem","isSignedInSelector","dashboard","UserSettings","menuItems","separator","DarkTheme","SpacesSkeleton","Fragment","SpacesIframe","Spaces","getNodeUrl","baseUrl","getNodes","hostsStatus","base","decodeURI","getBaseUrl","replicatedNodes","Anchor","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","FakeMargin","Box","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","isRegistrySelector","offlineSelector","signInUrl","fragmentParamsSeparatorRegEx","param","makeHashFromObject","allParams","allParamsResult","mergeDeepLeft","excludedParams","filteredParams","getFilteredHash","htmlIframeElement","iframeElement","contentWindow","postMessage","messageType","defaultState","lastMessage","setLastMessage","handleMessage","resetMesssage","process","useSelectorOriginal","useDispatchOriginal","getIsDemo","BaseAnchor","Component","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,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,KAAM,8BACN7U,IAAK,CAAC,oBAAqB,qBAE7B,CACE1kB,MAAO,yBACPksG,KAAM,MACN3yE,KAAM,8BACN7U,IAAK,CACH,gBACA,wBACA,iBACA,mBACA,iBACA,kBACA,sBACA,YAGJ,CACE1kB,MAAO,gCACPksG,KAAM,OACN3yE,KAAM,kBACN7U,IAAK,CACH,iBACA,qBACA,sBACA,oBACA,kBACA,sBACA,YACA,sBAGJ,CACE1kB,MAAO,wBACPksG,KAAM,MACN3yE,KAAM,6BACN7U,IAAK,CACH,kBACA,uBACA,4BACA,oBACA,oBACA,8BACA,8BACA,iCACA,sBACA,uBACA,mBACA,mBACA,YAGJ,CACE1kB,MAAO,iCACPksG,KAAM,MACN3yE,KAAM,sCACN7U,IAAK,CACH,yBACA,iBACA,iBACA,sBACA,sBAGJ,CACE1kB,MAAO,+BACPksG,KAAM,OACN3yE,KAAM,eACN7U,IAAK,CAAC,iBAAkB,0BAE1B,CACE1kB,MAAO,2BACPksG,KAAM,OACN3yE,KAAM,sBACN7U,IAAK,CACH,iBACA,iBACA,wBACA,mBACA,oBACA,kBACA,eACA,iBACA,qBACA,cAGJ,CACE1kB,MAAO,wBACPksG,KAAM,MACN3yE,KAAM,6BACN7U,IAAK,CACH,kBACA,iBACA,6BACA,4BACA,0BACA,kBACA,8BACA,qBACA,mBACA,iBACA,mBACA,kBACA,sBACA,yBACA,sBACA,kBACA,YAGJ,CACE1kB,MAAO,2BACPksG,KAAM,OACN3yE,KAAM,iBACN7U,IAAK,CAAC,0BAA2B,wBAAyB,yBAE5D,CACE1kB,MAAO,0BACPksG,KAAM,MACN3yE,KAAM,UACN7U,IAAK,CAAC,oBAER,CACE1kB,MAAO,yBACPksG,KAAM,MACN3yE,KAAM,WACN7U,IAAK,CAAC,qBAER,CACE1kB,MAAO,yBACPksG,KAAM,MACN3yE,KAAM,yBACN7U,IAAK,CACH,oBACA,oBACA,kBACA,kBACA,gBACA,qBAGJ,CACE1kB,MAAO,kCACPksG,KAAM,OACN3yE,KAAM,SACN7U,IAAK,CAAC,uBAAwB,mBAEhC,CACE1kB,MAAO,2BACPksG,KAAM,OACN3yE,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,CACE1kB,MAAO,2BACPksG,KAAM,OACN3yE,KAAM,WACN7U,IAAK,CAAC,mBAAoB,sBAE5B,CACE1kB,MAAO,6BACPksG,KAAM,MACN3yE,KAAM,eACN7U,IAAK,CAAC,qBAER,CACE1kB,MAAO,iCACPksG,KAAM,QACN3yE,KAAM,WACN7U,IAAK,CAAC,sBAER,CACE1kB,MAAO,0BACPksG,KAAM,MACN3yE,KAAM,eACN7U,IAAK,CACH,6BACA,iCACA,0BACA,6BACA,6BACA,4BACA,4BACA,uBACA,oBACA,kBACA,gBACA,oBAGJ,CACE1kB,MAAO,2BACPksG,KAAM,OACN3yE,KAAM,qBACN7U,IAAK,CACH,oBACA,gBACA,kBACA,oBACA,iBACA,qBACA,iBACA,mBACA,qBACA,mBACA,cAGJ,CACE1kB,MAAO,0BACPksG,KAAM,MACN3yE,KAAM,YACN7U,IAAK,CAAC,oBAER,CACE1kB,MAAO,2BACPksG,KAAM,MACN3yE,KAAM,aACN7U,IAAK,CAAC,uBAER,CACE1kB,MAAO,sBACPksG,KAAM,MACN3yE,KAAM,WACN7U,IAAK,CAAC,kBAER,CACE1kB,MAAO,SACPksG,KAAM,IACN3yE,KAAM,gCACN7U,IAAK,CAAC,kBAAmB,yBAA0B,cAErD,CACE1kB,MAAO,6BACPksG,KAAM,MACN3yE,KAAM,qBACN7U,IAAK,IAEP,CACE1kB,MAAO,uBACPksG,KAAM,MACN3yE,KAAM,SACN7U,IAAK,CAAC,uBAAwB,oBAEhC,CACE1kB,MAAO,2BACPksG,KAAM,OACN3yE,KAAM,iBACN7U,IAAK,CAAC,sBAAuB,cAE/B,CACE1kB,MAAO,wBACPksG,KAAM,MACN3yE,KAAM,aACN7U,IAAK,CAAC,oBAAqB,oBAE7B,CACE1kB,MAAO,MACPksG,KAAM,MACN3yE,KAAM,6BACN7U,IAAK,CAAC,uBAAwB,YAEhC,CACE1kB,MAAO,oBACPksG,KAAM,MACN3yE,KAAM,oBACN7U,IAAK,CAAC,qBAAsB,kBAAmB,gBAAiB,kBAElE,CACE1kB,MAAO,oBACPksG,KAAM,MACN3yE,KAAM,iBACN7U,IAAK,CACH,kBACA,kBACA,mBACA,gBACA,kBAGJ,CACE1kB,MAAO,0BACPksG,KAAM,MACN3yE,KAAM,sBACN7U,IAAK,CACH,iBACA,eACA,gBACA,gBACA,gBACA,iBACA,eACA,kBACA,cACA,kBACA,oBACA,qBACA,kBACA,qBACA,uBAGJ,CACE1kB,MAAO,0BACPksG,KAAM,OACN3yE,KAAM,mDACN7U,IAAK,CACH,sBACA,mBACA,iBACA,gBACA,kBACA,mBACA,oBACA,eACA,gBACA,cACA,cACA,oBACA,mBACA,eACA,iBACA,gBACA,kBAGJ,CACE1kB,MAAO,+BACPksG,KAAM,OACN3yE,KAAM,oDACN7U,IAAK,CACH,kBACA,oBACA,kBACA,mBACA,mBACA,gBACA,kBAGJ,CACE1kB,MAAO,wBACPksG,KAAM,MACN3yE,KAAM,sCACN7U,IAAK,CAAC,eAAgB,kBAAmB,oBAAqB,gBAAiB,iBAEjF,CACE1kB,MAAO,iCACPksG,KAAM,OACN3yE,KAAM,mCACN7U,IAAK,CAAC,kBAAmB,gBAAiB,gBAAiB,kBAE7D,CACE1kB,MAAO,kCACPksG,KAAM,QACN3yE,KAAM,sBACN7U,IAAK,CACH,iBACA,gBACA,qBACA,gBACA,kBACA,eACA,oBACA,gBACA,gBACA,kBACA,gBACA,oBACA,eACA,cAGJ,CACE1kB,MAAO,wBACPksG,KAAM,MACN3yE,KAAM,WACN7U,IAAK,CAAC,oBAER,CACE1kB,MAAO,oBACPksG,KAAM,MACN3yE,KAAM,oBACN7U,IAAK,CAAC,eAAgB,gBAAiB,mBAAoB,oBAE7D,CACE1kB,MAAO,4BACPksG,KAAM,OACN3yE,KAAM,SACN7U,IAAK,CAAC,gBAER,CACE1kB,MAAO,sBACPksG,KAAM,MACN3yE,KAAM,QACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,sBACPksG,KAAM,MACN3yE,KAAM,WACN7U,IAAK,CAAC,kBAER,CACE1kB,MAAO,0BACPksG,KAAM,OACN3yE,KAAM,YACN7U,IAAK,CACH,eACA,gBACA,mBACA,kBACA,kBACA,cACA,mBACA,iBACA,cACA,eACA,iBACA,kBACA,iBACA,sBAGJ,CACE1kB,MAAO,6BACPksG,KAAM,OACN3yE,KAAM,mBACN7U,IAAK,CACH,kBACA,mBACA,kBACA,gBACA,sBACA,gBACA,oBACA,gBACA,gBACA,gBACA,iBACA,cAGJ,CACE1kB,MAAO,oBACPksG,KAAM,MACN3yE,KAAM,gDACN7U,IAAK,CACH,kBACA,cACA,mBACA,cACA,eACA,iBACA,kBACA,iBACA,sBAGJ,CACE1kB,MAAO,uBACPksG,KAAM,MACN3yE,KAAM,WACN7U,IAAK,CAAC,oBAER,CACE1kB,MAAO,uBACPksG,KAAM,MACN3yE,KAAM,YACN7U,IAAK,CAAC,mBAER,CACE1kB,MAAO,sBACPksG,KAAM,MACN3yE,KAAM,UACN7U,IAAK,CAAC,mBAER,CACE1kB,MAAO,uBACPksG,KAAM,MACN3yE,KAAM,QACN7U,IAAK,CAAC,eAER,CACE1kB,MAAO,uBACPksG,KAAM,MACN3yE,KAAM,UACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,4BACPksG,KAAM,MACN3yE,KAAM,cACN7U,IAAK,CAAC,uBAER,CACE1kB,MAAO,qBACPksG,KAAM,MACN3yE,KAAM,iBACN7U,IAAK,CAAC,YAAa,eAAgB,cAAe,aAAc,gBAElE,CACE1kB,MAAO,0BACPksG,KAAM,OACN3yE,KAAM,UACN7U,IAAK,CACH,qBACA,gBACA,uBACA,kBACA,cACA,iBACA,kBACA,mBACA,iBACA,mBACA,YACA,sBACA,gBACA,mBAGJ,CACE1kB,MAAO,uBACPksG,KAAM,MACN3yE,KAAM,2CACN7U,IAAK,CAAC,eAAgB,gBAAiB,oBAAqB,mBAAoB,iBAElF,CACE1kB,MAAO,cACPksG,KAAM,OACN3yE,KAAM,6BACN7U,IAAK,CAAC,mBAAoB,gBAAiB,qBAE7C,CACE1kB,MAAO,qBACPksG,KAAM,MACN3yE,KAAM,SACN7U,IAAK,CAAC,gBAER,CACE1kB,MAAO,wBACPksG,KAAM,MACN3yE,KAAM,oBACN7U,IAAK,CAAC,aAAc,cAAe,cAErC,CACE1kB,MAAO,2BACPksG,KAAM,MACN3yE,KAAM,OACN7U,IAAK,CAAC,cAER,CACE1kB,MAAO,0BACPksG,KAAM,MACN3yE,KAAM,aACN7U,IAAK,CAAC,cAAe,mBAAoB,mBAE3C,CACE1kB,MAAO,yBACPksG,KAAM,MACN3yE,KAAM,UACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,yBACPksG,KAAM,MACN3yE,KAAM,UACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,4BACPksG,KAAM,MACN3yE,KAAM,QACN7U,IAAK,CAAC,eAER,CACE1kB,MAAO,0BACPksG,KAAM,OACN3yE,KAAM,qBACN7U,IAAK,CACH,oBACA,aACA,cACA,gBACA,gBACA,YACA,iBACA,gBACA,YACA,mBACA,oBAGJ,CACE1kB,MAAO,qBACPksG,KAAM,OACN3yE,KAAM,gBACN7U,IAAK,CAAC,uBAER,CACE1kB,MAAO,yBACPksG,KAAM,MACN3yE,KAAM,qBACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,sBACPksG,KAAM,MACN3yE,KAAM,sCACN7U,IAAK,CAAC,iBAER,CACE1kB,MAAO,0BACPksG,KAAM,OACN3yE,KAAM,sBACN7U,IAAK,CAAC,iBAER,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AAW1W,GACjB,MAET,OAAOu0H,EAO6BC,CAAwBx0H,OAEzDzB,QAAO,SAAAo6B,GAAC,OAA4B,OAAxBnnC,OAAOsN,OAAO65B,GAAG,MAE1B87F,EAAmBn2H,YAAS+1H,GAClC,OAAOj5E,YAAW+4E,EAAiBM,IAGxBh4H,EAAgCyD,IAChC+R,EAAqBxV,EAA6B,aAElDwD,EAAoB,WACNzO,OAAOlB,KAAKkG,cACpB/E,SAAQ,SAAAuO,IACnBA,EAAI4R,WAAWjd,MAAmCqL,EAAI4R,WAAW,cACnEpb,aAAakgB,WAAW1W,S","file":"static/js/main.cc0e57d1.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 * 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 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 = \"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 { 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","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 initialization 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 omit 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","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)[],\n obj1: T | null,\n obj2: T\n): T => {\n if (!obj1) {\n return obj2\n }\n return keys.reduce<T>(\n (acc, key) => ({\n ...acc,\n [key]: equals(obj1[key], obj2![key]) ? obj1[key] : obj2[key],\n }),\n obj2\n )\n}\n\nexport type AnyFunction<T = any> = (...args: T[]) => any\n\nexport type FunctionArguments<T extends Function> = T extends (...args: infer R) => any ? R : never\n\nexport function callAll<T extends AnyFunction>(...fns: (T | undefined)[]) {\n return function mergedFn(arg: FunctionArguments<T>[0]) {\n fns.forEach(fn => {\n fn?.(arg)\n })\n }\n}\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","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 doesn't 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 // temporarily, 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 doesn't 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 omitting 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 whether 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 refactored\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 occurrences just take the unitsCurrent from this state\n },\n temperatureSetting,\n secondsAsTimeSetting\n )\n\n // as function, so useState() interprets 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","//@ts-nocheck\nimport { sortBy, reverse } from \"ramda\"\nimport React, { useLayoutEffect, useRef, useCallback } 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\"\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,\n setCommonMaxAction,\n setCommonMinAction,\n setGlobalPauseAction,\n 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,\n getDataForFakeStacked,\n transformColors,\n 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\"\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 // insufficient 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\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 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.updateChartPanOrZoom = updateChartPanOrZoom\n propsRef.current.viewAfter = viewAfter\n propsRef.current.viewBefore = viewBefore\n }, [\n alarm,\n chartData,\n globalChartUnderlay,\n hoveredX,\n immediatelyDispatchPanAndZoom,\n resetGlobalPanAndZoom,\n setGlobalChartUnderlay,\n updateAlarmBadge,\n updateChartPanOrZoom,\n viewAfter,\n viewBefore,\n ])\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 // 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 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 // 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 latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.endPan(event, dygraph, context)\n propsRef.current.immediatelyDispatchPanAndZoom()\n } else if (context.isZooming) {\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\n isVisible={isAlarmBadgeVisible}\n ref={alarmBadgeRef}\n status={alarm.status}\n label={alarm.value}\n />\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 { LOCALSTORAGE_HEIGHT_KEY_PREFIX } 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 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 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 doesn't 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 overridden 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 { Text, NavigationTab, Icon } from \"@netdata/netdata-ui\"\nimport React from \"react\"\n\nconst CloudTab = ({ label, active, showBorderLeft, icon, onActivate }) => {\n const handleOnActivate = () => {\n if (active) return\n if (onActivate) onActivate()\n }\n return (\n <NavigationTab\n onActivate={handleOnActivate}\n icon={<Icon name={icon} size=\"small\" />}\n fixed\n closable={false}\n showBorderLeft={showBorderLeft}\n active={active}\n >\n <Text>{label}</Text>\n </NavigationTab>\n )\n}\n\nexport default CloudTab\n","import React from \"react\"\nimport {\n Flex,\n Button,\n Box,\n Text,\n H3,\n H4,\n Modal,\n ModalContent,\n ModalBody,\n ModalHeader,\n ModalCloseButton,\n ModalFooter,\n Icon,\n} from \"@netdata/netdata-ui\"\n\nimport GoToCloud from \"components/auth/signIn\"\n\nexport const TITLE = \"Discover the free benefits of Netdata Cloud\"\n\nconst DiscoverCloudModal = ({ closeModal, text, header, handleGoToCloud, image, video }) => {\n return (\n <Modal borderShadow backdrop={false}>\n <ModalContent background=\"modalBackground\">\n <ModalHeader>\n <Flex gap={2}>\n <Icon color=\"white\" name=\"netdata\" />\n <H3 margin={[0]}>{TITLE}:</H3>\n </Flex>\n\n <ModalCloseButton onClose={closeModal} />\n </ModalHeader>\n <ModalBody>\n <Flex column width={189} height={130}>\n <Flex padding={[0, 0, 4, 0]} column gap={4}>\n <Flex alignItems=\"center\">\n <H4 margin={[0]}>{header}</H4>\n <Box\n sx={{ marginLeft: \"auto\" }}\n data-testid=\"go-to-cloud-cta\"\n margin={[0, 2, 0, 0]}\n width={{ min: 40 }}\n >\n <GoToCloud utmParameters={{ campaign: \"discover_cloud\" }}>\n {({ link }) => (\n <Box\n label={\n <Text textTransform=\"none\" strong color=\"panel\">\n Sign in to Netdata Cloud!\n </Text>\n }\n width=\"100%\"\n onClick={() => handleGoToCloud({ link })}\n as={Button}\n small\n data-ga={\"go-to-cloud-button\"}\n data-testid=\"cta1-button\"\n />\n )}\n </GoToCloud>\n </Box>\n </Flex>\n {text()}\n </Flex>\n {image && (\n <Flex height=\"auto\" width=\"100%\" overflow=\"hidden\">\n <Box\n sx={{\n width: \"100%\",\n height: \"auto\",\n }}\n as=\"img\"\n src={image}\n ></Box>\n </Flex>\n )}\n {video && (\n <Flex height=\"100%\" width=\"100%\">\n <Box sx={{ width: \"100%\", height: \"100%\" }}>\n <iframe\n title={`discover-cloud-iframe}`}\n width=\"100%\"\n height=\"100%\"\n src={video}\n frameBorder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n />\n </Box>\n </Flex>\n )}\n </Flex>\n </ModalBody>\n <ModalFooter></ModalFooter>\n </ModalContent>\n </Modal>\n )\n}\n\nexport default DiscoverCloudModal\n","import { Text } from \"@netdata/netdata-ui\"\nimport Anchor from \"@/src/components/anchor\"\nimport React from \"react\"\n\nconst TabsContentText = ({ children }) => <Text fontSize=\"16px\">{children}</Text>\n\nexport const TabsContent = {\n Home: {\n id: \"Home\",\n label: \"Home\",\n header: \"Home\",\n text: () => (\n <TabsContentText>\n The Home view in Netdata cloud provides summarized relevant information in an easily\n digestible display. You can see information about your nodes, data collection and retention\n stats, alerts, users and dashboards.\n </TabsContentText>\n ),\n icon: \"room_home\",\n image: \"images/home.png\",\n },\n nodeView: {\n id: \"nodeView\",\n label: \"Node View\",\n header: \"Node View\",\n text: () => (\n <>\n <TabsContentText>\n The single node view you are currently using will of course be available on Netdata Cloud\n as well. In addition, the charts and visualization on Netdata Cloud will be more flexible\n and powerful for troubleshooting than what is available on the agent.\n </TabsContentText>\n <TabsContentText>\n Netdata Cloud also comes with the Metric Correlations feature that lets you quickly find\n metrics and charts related to a particular window of interest that you want to explore\n further. By displaying the standard Netdata dashboard, filtered to show only charts that\n are relevant to the window of interest, you can get to the root cause sooner.\n </TabsContentText>\n </>\n ),\n icon: \"nodes_hollow\",\n image: \"images/nodeView.png\",\n },\n Overview: {\n id: \"Overview\",\n label: \"Overview\",\n header: \"Overview\",\n text: () => (\n <>\n <TabsContentText>\n The Overview tab is a great way to monitor your infrastructure using Netdata Cloud. While\n the interface might look similar to local dashboards served by an Agent, or even the\n single-node dashboards in Netdata Cloud, Overview uses composite charts. These charts\n display real-time aggregated metrics from all the nodes (or a filtered selection) in a\n given War Room.\n </TabsContentText>\n <TabsContentText>\n With Overview's composite charts, you can see your infrastructure from a single pane of\n glass, discover trends or anomalies, then drill down by grouping metrics by node and\n jumping to single-node dashboards for root cause analysis.\n </TabsContentText>\n <TabsContentText>\n Here's an example of a composite chart visualizing Disk I/O bandwidth from 5 different\n nodes in one chart.\n </TabsContentText>\n </>\n ),\n icon: \"room_overview\",\n image: \"images/overview.png\",\n },\n Nodes: {\n id: \"Nodes\",\n label: \"Nodes\",\n header: \"Nodes\",\n text: () => (\n <TabsContentText>\n The Nodes view in Netdata Cloud lets you see and customize key metrics from any number of\n Agent-monitored nodes and seamlessly navigate to any node's dashboard for troubleshooting\n performance issues or anomalies using Netdata's highly-granular metrics.\n </TabsContentText>\n ),\n icon: \"nodes_hollow\",\n image: \"images/nodes.jpg\",\n },\n Dashboards: {\n id: \"Dashboards\",\n label: \"Dashboards\",\n header: \"Dashboards\",\n text: () => (\n <TabsContentText>\n With Netdata Cloud, you can build new dashboards that target your infrastructure's unique\n needs. Put key metrics from any number of distributed systems in one place for a bird's eye\n view of your infrastructure.\n </TabsContentText>\n ),\n icon: \"dashboard\",\n image: \"images/dashboards.png\",\n },\n Alerts: {\n id: \"Alerts\",\n label: \"Alerts\",\n header: \"Alerts\",\n text: () => (\n <TabsContentText>\n The Alerts view gives you a high level of availability and performance information for every\n node you're monitoring with Netdata Cloud. It also offers an easy way to drill down into any\n particular alert by taking the user to the dedicated alert view from where the user can run\n metrics correlation or take further troubleshooting steps.\n </TabsContentText>\n ),\n icon: \"alarm\",\n image: \"images/alerts.jpg\",\n },\n Anomalies: {\n id: \"Anomalies\",\n label: \"Anomalies\",\n header: \"Anomaies\",\n text: () => (\n <TabsContentText>\n The Anomalies view on Netdata Cloud lets you quickly surface potentially anomalous metrics\n and charts related to a particular highlight window of interest using Anomaly Advisor.\n Anomalies are detected using per metric unsupervised machine learning running at the edge!\n </TabsContentText>\n ),\n icon: \"anomaliesLens\",\n video:\n \"https://user-images.githubusercontent.com/24860547/165943403-1acb9759-7446-4704-8955-c566d04ad7ab.mp4\",\n },\n Pricing: {\n id: \"Pricing\",\n label: \"Pricing\",\n header: \"Pricing\",\n text: () => (\n <TabsContentText>\n Netdata Cloud’s distributed architecture—with processing occurring at the individual\n nodes—enables us to add any number of users at marginal cost. Couple this with our upcoming\n paid plan with added functionality for enterprise customers, and it means we can commit to\n providing our current functionality for free, always.\n </TabsContentText>\n ),\n image: \"images/pricing.png\",\n icon: \"pricing\",\n },\n Privacy: {\n id: \"Privacy\",\n label: \"Privacy\",\n header: \"Privacy\",\n text: () => (\n <>\n <TabsContentText>\n Data privacy is very important to us. We firmly believe that your data belongs to you.\n This is why we don't store any metric data in Netdata Cloud.\n </TabsContentText>\n <TabsContentText>\n Your local installations of the Netdata Agent form the basis for the Netdata Cloud. All\n the data that you see in the web browser when using Netdata Cloud, is actually streamed\n directly from the Netdata Agent to the Netdata Cloud dashboard. The data passes through\n our systems, but it isn't stored. You can learn more about{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href=\"https://learn.netdata.cloud/docs/agent/netdata-security\"\n >\n the Agent's security design\n </Anchor>{\" \"}\n design in the Agent documentation.\n </TabsContentText>\n <TabsContentText>\n However, to be able to offer the stunning visualizations and advanced functionality of\n Netdata Cloud, it does store a limited number of metadata. This metadata is ONLY available\n to Netdata and NEVER to any 3rd parties. You can learn more about what metadata is stored\n in Netdata cloud in our\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href=\"https://learn.netdata.cloud/docs/cloud/data-privacy\"\n >\n {\" \"}\n documentation\n </Anchor>\n </TabsContentText>\n </>\n ),\n icon: \"privacy\",\n },\n}\n","import React from \"react\"\nimport {\n Text,\n Drop,\n ModalContent,\n ModalBody,\n ModalHeader,\n ModalCloseButton,\n ModalFooter,\n Flex,\n Button,\n Box,\n H3,\n H4,\n Icon,\n} from \"@netdata/netdata-ui\"\n\nimport GoToCloud from \"components/auth/signIn\"\n\nexport const TITLE = \"Discover the free benefits of Netdata Cloud\"\n\nconst DiscoverCloudDrop = ({\n parentRef,\n isDropdownOpen,\n closeDropdown,\n text,\n header,\n handleGoToCloud,\n image,\n video,\n}) => {\n if (parentRef.current && isDropdownOpen)\n return (\n <Drop\n backdrop\n data-testid=\"selectedNodesDropdown\"\n onEsc={closeDropdown}\n align={{ top: \"bottom\", left: \"left\" }}\n target={parentRef.current}\n onClickOutside={closeDropdown}\n >\n <ModalContent background=\"modalBackground\">\n <ModalHeader>\n <Flex gap={2}>\n <Icon color=\"white\" name=\"netdata\" />\n <H3 margin={[0]}>{TITLE}:</H3>\n </Flex>\n\n <ModalCloseButton onClose={closeDropdown} />\n </ModalHeader>\n <ModalBody>\n <Flex column width={189} height={130}>\n <Flex padding={[0, 0, 4, 0]} column gap={4}>\n <Flex alignItems=\"center\">\n <H4 margin={[0]}>{header}</H4>\n <Box\n sx={{ marginLeft: \"auto\" }}\n data-testid=\"go-to-cloud-cta\"\n margin={[0, 2, 0, 0]}\n width={{ min: 40 }}\n >\n <GoToCloud utmParameters={{ campaign: \"discover_cloud\" }}>\n {({ link }) => (\n <Box\n label={\n <Text textTransform=\"none\" strong color=\"panel\">\n Sign in to Netdata Cloud!\n </Text>\n }\n width=\"100%\"\n onClick={() => handleGoToCloud({ link })}\n data-testid=\"cta1-button\"\n as={Button}\n small\n data-ga={\"go-to-cloud-button\"}\n />\n )}\n </GoToCloud>\n </Box>\n </Flex>\n {text()}\n </Flex>\n {image && (\n <Flex height=\"auto\" width=\"100%\" overflow=\"hidden\">\n <Box\n sx={{\n width: \"100%\",\n height: \"auto\",\n }}\n as=\"img\"\n src={image}\n ></Box>\n </Flex>\n )}\n {video && (\n <Flex height=\"100%\" width=\"100%\">\n <Box sx={{ width: \"100%\", height: \"100%\" }}>\n <iframe\n title={`discover-cloud-iframe}`}\n width=\"100%\"\n height=\"100%\"\n src={video}\n frameBorder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n />\n </Box>\n </Flex>\n )}\n </Flex>\n </ModalBody>\n <ModalFooter></ModalFooter>\n </ModalContent>\n </Drop>\n )\n\n return null\n}\n\nexport default DiscoverCloudDrop\n","import React, { useState, useRef } from \"react\"\nimport { Text, Flex, NavigationTabs } from \"@netdata/netdata-ui\"\n\nimport CloudTab from \"./cloudTab\"\nimport { TITLE } from \"./discoverCloudModal\"\n\nimport { callAll } from \"@/src/utils/utils\"\nimport { TabsContent } from \"./contants\"\n\nimport DiscoverCloudDrop from \"./discoverCloudDrop\"\n\nconst Wrapper = Flex\nconst InnerPostioner = Flex\n\nconst DiscoverCloud = () => {\n const [isModalOpen, setIsModalOpen] = useState(false)\n const [seletedModalContent, setSelectedModalContent] = useState(null)\n const dropDownParentRef = useRef()\n\n const handleOpenModal = () => {\n setIsModalOpen(true)\n }\n\n const handleCloseModal = () => {\n setIsModalOpen(false)\n }\n\n const handleGoToCloud = ({ link }) => {\n window.location.href = link\n }\n\n const handleSetModalContent = content => {\n setSelectedModalContent(content)\n }\n const handleResetModalContent = () => {\n setSelectedModalContent(null)\n }\n\n return (\n <Wrapper padding={[0, 0, 0, 4]} position=\"relative\" height={15}>\n <InnerPostioner\n padding={[4, 2, 4, 2]}\n gap={4}\n height=\"100%\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <Text color=\"primary\">{TITLE}:</Text>\n <Flex ref={dropDownParentRef}>\n <NavigationTabs>\n {Object.keys(TabsContent).map((key, index) => {\n const { label, icon, id } = TabsContent[key]\n const slectedContentId = seletedModalContent ? seletedModalContent.id : null\n return (\n <CloudTab\n key={key}\n icon={icon}\n active={id === slectedContentId}\n label={label}\n showBorderLeft={index === 0}\n onActivate={callAll(handleOpenModal, () =>\n handleSetModalContent(TabsContent[key])\n )}\n />\n )\n })}\n </NavigationTabs>\n </Flex>\n </InnerPostioner>\n <DiscoverCloudDrop\n parentRef={dropDownParentRef}\n isDropdownOpen={isModalOpen}\n {...seletedModalContent}\n closeDropdown={callAll(handleCloseModal, handleResetModalContent)}\n handleGoToCloud={handleGoToCloud}\n />\n {/* {isModalOpen && seletedModalContent && (\n <DiscoverCloudModal\n {...seletedModalContent}\n closeModal={callAll(handleCloseModal, handleResetModalContent)}\n handleGoToCloud={handleGoToCloud}\n />\n )} */}\n </Wrapper>\n )\n}\n\nexport default DiscoverCloud\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, Box } 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\"\nimport { DiscoverCloud } from \"@/src/components/discover-cloud\"\n\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 <Box sx={{ background: \"#272B30\" }} position=\"absolute\" top=\"52px\" left=\"0px\" right=\"0px\">\n <DiscoverCloud />\n </Box>\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\"\nimport { Box } from \"@netdata/netdata-ui\"\n\nconst FakeMargin = Box\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 <></>\n {chartsMetadata && cloudBaseURL && hasFetchedInfo && haveDOMReadyForParsing && (\n <>\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 <FakeMargin height={15} />\n </>\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 won't 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","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","/* 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 { 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 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","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 |