diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-04-14 18:12:10 +0000 |
commit | b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc (patch) | |
tree | 36c41e35994786456154f9d3bf88c324763aeea4 /web/gui/dashboard/static/js/main.485cc284.chunk.js | |
parent | Adding upstream version 1.33.1. (diff) | |
download | netdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.tar.xz netdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.zip |
Adding upstream version 1.34.0.upstream/1.34.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/gui/dashboard/static/js/main.485cc284.chunk.js | 3 | ||||
-rw-r--r-- | web/gui/dashboard/static/js/main.485cc284.chunk.js.LICENSE (renamed from web/gui/dashboard/static/js/main.e3f3d31b.chunk.js.LICENSE) | 0 | ||||
-rw-r--r-- | web/gui/dashboard/static/js/main.485cc284.chunk.js.map | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/web/gui/dashboard/static/js/main.485cc284.chunk.js b/web/gui/dashboard/static/js/main.485cc284.chunk.js new file mode 100644 index 000000000..9b90dbc02 --- /dev/null +++ b/web/gui/dashboard/static/js/main.485cc284.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see main.485cc284.chunk.js.LICENSE */ +(this["webpackJsonp@netdata/dashboard"]=this["webpackJsonp@netdata/dashboard"]||[]).push([[0],{100:function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return c}));var n,r,o=function(e){return e>-10&&e<10?"0".concat(e.toString()):e.toString()},i={"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}},s={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}}},seconds:{time:{check:function(){return r},convert:function(e){return c.seconds2time(e)}}},milliseconds:{milliseconds:{check:function(e){return r&&e<1e3},convert:function(e){var t=Math.round(10*e),a=Math.floor(t/10);return t-=10*a,"".concat(a.toString(),".").concat(t.toString())}},seconds:{check:function(e){return r&&e>=1e3&&e<6e4},convert:function(e){var t=Math.round(e),a=Math.floor(t/1e3);return t-=1e3*a,t=Math.round(t/10),"".concat(a.toString(),".").concat(o(t))}},"M:SS.ms":{check:function(e){return r&&e>=6e4},convert:function(e){var t=Math.round(e),a=Math.floor(t/6e4);t-=6e4*a;var n=Math.floor(t/1e3);return t-=1e3*n,t=Math.round(t/10),"".concat(a.toString(),":").concat(o(n),".").concat(o(t))}}}},l=function(e){return e},c={keys:{},latest:{},globalReset:function(){this.keys={},this.latest={}},seconds2time:function(e){var t=Math.abs(e),a=Math.floor(t/86400);t-=86400*a;var n=Math.floor(t/3600);t-=3600*n;var r=Math.floor(t/60);t-=60*r,t=Math.round(t);return"".concat((a>0?"".concat(a.toString(),"d:"):"").toString()+o(n),":").concat(o(r),":").concat(o(t)).concat("")},get:function(e,t,a,o,c,u,d,h,p){if("undefined"===typeof o&&(o="undefined"),n=h,r=p,"undefined"===typeof i[o]&&"undefined"===typeof s[o])return function(e){return e};if(void 0===c||null===c||"original"===c||c===o)return d(o),l;var f,g=null,m=0;if("undefined"!==typeof i[o]){if("auto"===c){(t=Math.abs(t))>(a=Math.abs(a))&&(a=t);var b=i[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),l;if("string"===typeof u){var v="".concat(u,"-").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 i[o][c]?(m=i[o][c],d(c),function(e){return e/m}):(console.log("Units conversion from ".concat(o.toString()," to ").concat(c.toString(),"\n is not supported.")),d(o),l)}return"undefined"!==typeof s[o]?"auto"===c?(Object.keys(s[o]).forEach((function(e){f||s[o][e].check(a)&&(d(e),f=s[o][e].convert)})),f||(d(o),l)):"undefined"!==typeof s[o][c]?(d(c),s[o][c].convert):(console.log("Units conversion from ".concat(o.toString()," to ").concat(c.toString(),"\n is not supported.")),d(o),l):(console.log("Unmatched unit conversion method for units ".concat(o.toString())),d(o),l)}}},104:function(e,t,a){"use strict";a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return h}));var n=a(5),r=a(0),o=a.n(r),i=a(110),s=a(18),l=a(55),c=a(8),u="chart_heights.",d="chart_height.",h=function(e){var t=e.chartContainerElement,a=e.chartUuid,u=e.heightId,h=e.isLegendOnBottom,p=Object(r.useState)((function(){return t.clientHeight})),f=Object(n.a)(p,2),g=f[0],m=f[1],b=Object(c.a)();Object(r.useEffect)((function(){g>=70&&b(Object(s.i)({id:a,resizeHeight:g}))}),[g,a,u,b]);var v=Object(r.useCallback)((function(e){e.preventDefault();var a=t.clientHeight,n="touchstart"===e.type?e.touches[0].clientY:e.clientY,r=function(e){var r=a+e-n;if(t.style.height="".concat(r.toString(),"px"),m(r),u){var o=h?r-l.a:r;localStorage.setItem("".concat(d).concat(u),"".concat(o))}},o=function(e){return r(e.clientY)},i=function(e){return r(e.touches[0].clientY)};"touchstart"===e.type?(document.addEventListener("touchmove",i),document.addEventListener("touchend",(function e(){document.removeEventListener("touchmove",i),document.removeEventListener("touchend",e)}))):(document.addEventListener("mousemove",o),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)})))}),[t.clientHeight,t.style.height,u,h]);return o.a.createElement(i.a,{className:"netdata-legend-resize-handler",onDoubleClick:function(e){e.preventDefault(),e.stopPropagation()},onMouseDown:v,onTouchStart:v,iconType:"resize",popoverTitle:"Chart Resize",popoverContent:"Drag this point with your mouse or your finger (on touch devices), to resize the chart vertically. You can also <b>double click it</b> or <b>double tap it</b> to reset between 2 states: the default and the one that fits all the values.<br/><small>Help can be disabled from the settings.</small>"})}},110:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(34),i=a.n(o),s=a(8),l=a(9),c=a(161),u=a(37),d=(a(316),n.forwardRef((function(e,t){var a=e.children,r=e.className,o=Object(u.a)(e,["children","className"]);return n.createElement("button",Object.assign({},o,{type:"button",className:i()("netdata-reset-button",r),ref:t}),a)})));a.d(t,"a",(function(){return h}));var h=function(e){var t=e.className,a=e.iconType,o=e.onClick,u=e.onDoubleClick,h=e.onMouseDown,p=e.onTouchStart,f=e.popoverContent,g=e.popoverTitle,m=Object(n.useRef)(null),b=Object(s.b)(l.B);return Object(n.useEffect)((function(){m.current&&b&&window.$(m.current).popover({container:"body",animation:!1,html:!0,trigger:"hover",placement:"bottom",delay:{show:window.NETDATA.options.current.show_help_delay_show_ms,hide:window.NETDATA.options.current.show_help_delay_hide_ms},title:g,content:f})}),[]),r.a.createElement(d,{className:i()(t),onClick:o,onDoubleClick:u,onMouseDown:h,onTouchStart:p,ref:m},r.a.createElement(c.a,{iconType:a}))}},12:function(e,t,a){"use strict";a.d(t,"h",(function(){return i})),a.d(t,"p",(function(){return s})),a.d(t,"o",(function(){return l})),a.d(t,"u",(function(){return c})),a.d(t,"s",(function(){return u})),a.d(t,"j",(function(){return d})),a.d(t,"q",(function(){return h})),a.d(t,"i",(function(){return p})),a.d(t,"r",(function(){return f})),a.d(t,"b",(function(){return g})),a.d(t,"d",(function(){return m})),a.d(t,"D",(function(){return b})),a.d(t,"f",(function(){return v})),a.d(t,"C",(function(){return _})),a.d(t,"a",(function(){return y})),a.d(t,"A",(function(){return O})),a.d(t,"e",(function(){return x})),a.d(t,"B",(function(){return w})),a.d(t,"v",(function(){return E})),a.d(t,"l",(function(){return S})),a.d(t,"g",(function(){return C})),a.d(t,"c",(function(){return A})),a.d(t,"w",(function(){return k})),a.d(t,"x",(function(){return j})),a.d(t,"n",(function(){return T})),a.d(t,"m",(function(){return D})),a.d(t,"t",(function(){return P})),a.d(t,"k",(function(){return M})),a.d(t,"y",(function(){return L})),a.d(t,"z",(function(){return I}));var n=a(22),r=a(89),o=a(26),i=Object(n.createAction)("".concat(o.e,"/globalRequestCommonColors")),s=Object(n.createAction)("".concat(o.e,"/setCommonMin")),l=Object(n.createAction)("".concat(o.e,"/setCommonMax")),c=Object(n.createAction)("".concat(o.e,"/setGlobalSelection")),u=Object(n.createAction)("".concat(o.e,"/setGlobalPanAndZoom")),d=Object(n.createAction)("".concat(o.e,"/resetGlobalPanAndZoomAction")),h=Object(n.createAction)("".concat(o.e,"/setDefaultAfterAction")),p=Object(n.createAction)("".concat(o.e,"/resetDefaultAfterAction")),f=Object(n.createAction)("".concat(o.e,"/setGlobalChartUnderlay")),g=Object(n.createAction)("".concat(o.e,"/centerAroundHighlightAction")),m=Object(n.createAction)("".concat(o.e,"/clearHighlightAction")),b=Object(n.createAction)("".concat(o.e,"/windowFocusChangeAction")),v=Object(r.a)("".concat(o.e,"/fetchHelloAction")),_=Object(n.createAction)("".concat(o.e,"/updatePersonUrlsAction")),y=Object(n.createAction)("".concat(o.e,"/accessRegistrySuccessAction")),O=Object(n.createAction)("".concat(o.e,"/startAlarmsAction")),x=Object(r.a)("".concat(o.e,"/fetchAllAlarmsAction")),w=Object(n.createAction)("".concat(o.e,"/updateActiveAlarmsAction")),E=Object(n.createAction)("".concat(o.e,"/setOptionAction")),S=Object(n.createAction)("".concat(o.e,"/resetOptions")),C=Object(n.createAction)("".concat(o.e,"/loadSnapshotAction")),A=Object(n.createAction)("".concat(o.e,"/chartsMetadataRequestSuccess")),k=Object(n.createAction)("".concat(o.e,"/setSpacePanelStatusAction")),j=Object(n.createAction)("".concat(o.e,"/setSpacePanelStatusAction")),T=Object(n.createAction)("".concat(o.e,"/setAlarmAction")),D=Object(n.createAction)("".concat(o.e,"/resetRegistry")),P=Object(n.createAction)("".concat(o.e,"/setGlobalPauseAction")),M=Object(n.createAction)("".concat(o.e,"/resetGlobalPauseAction")),L=Object(n.createAction)("".concat(o.e,"/setUTCOffset")),I=Object(n.createAction)("".concat(o.e,"/setUserNodeAccess"))},124:function(e,t,a){"use strict";a.d(t,"b",(function(){return l}));var n=a(0),r=a(27),o=a(73),i=a(12),s=a(182),l=function(){return Object(n.useCallback)((function(){Object(o.a)(s.a,{type:"request-refresh-access",payload:!0})}),[])};t.a=function(){var e=Object(r.d)();Object(o.b)("user-node-access",(function(t){e(Object(i.z)({message:t}))}))}},132:function(e,t,a){"use strict";var n=a(37),r=a(0),o=a.n(r),i=a(4),s=a(3),l=Object(i.d)("a").withConfig({displayName:"anchor__BaseAnchor",componentId:"sc-1eq5dgj-0"})(["&&{color:",";:hover{color:",";}:visited{color:",";}}"],Object(s.F)("primary"),Object(s.F)("primary"),Object(s.F)("accent"));t.a=function(e){var t=e.Component,a=void 0===t?s.z:t,r=Object(n.a)(e,["Component"]);return o.a.createElement(a,Object.assign({as:l},r))}},140:function(e,t,a){"use strict";var n=a(28);a.d(t,"a",(function(){return n.c}))},142:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n=function(e){return e.replace(/ /g,"_").replace(/:/g,"_").replace(/\(/g,"_").replace(/\)/g,"_").replace(/\./g,"_").replace(/\//g,"_")}},155:function(e,t,a){"use strict";a.d(t,"b",(function(){return b})),a.d(t,"a",(function(){return v}));var n=a(7),r=a(14),o=a(35),i=a(219),s=a(496),l=a(218),c=a(22),u=a(28),d=a(74),h=a(18),p=a(12),f=a(97),g=a(26),m={commonColorsKeys:{},commonMin:{},commonMax:{},currentSelectionMasterId:null,globalPanAndZoom:null,defaultAfter:d.b?Object(u.d)():-900,globalChartUnderlay:null,hoveredX:null,hasWindowFocus:document.hasFocus(),globalPause:!1,spacePanelIsActive:!1,spacePanelTransitionEndIsActive:!1,registry:{cloudBaseURL:null,hasFetchedInfo:!1,hasFetchedHello:!1,isHelloCallError:null,hostname:"unknown",isCloudEnabled:null,isCloudAvailable:null,isAgentClaimed:null,isACLKAvailable:null,hasStartedInfo:!1,isFetchingHello:!1,fullInfoPayload:null,machineGuid:null,personGuid:null,registryMachines:null,registryMachinesArray:null,registryServer:null},snapshot:null,alarms:{activeAlarms:null,hasStartedAlarms:!1},alarm:null,chartsMetadata:{isFetching:!1,isFetchingError:!1,data:null},options:f.e,userNodeAccess:null},b=Object(c.createReducer)({},m),v=function(e){var t=e.colorsAttribute,a=e.commonColorsAttribute,n=e.chartUuid,r=e.chartContext,o="string"===typeof t&&t.length>0;return a||(o?n:r)},_=function(e){return"ONLY"===Object(i.a)(e)},y=function(e,t){var a,n=t?(a=e.split(" "),_(a)?Object(s.a)(a):a):[],r=!t||!_(e.split(" "));return{assigned:{},available:[].concat(Object(o.a)(n),Object(o.a)(r||0===n.length?window.NETDATA.themes.current.colors:[])),custom:n}};b.on(p.h,(function(e,t){var a=t.chartContext,o=t.chartUuid,i=t.colorsAttribute,s=t.commonColorsAttribute,c=t.dimensionNames,u=v({colorsAttribute:i,commonColorsAttribute:s,chartUuid:o,chartContext:a}),d="string"===typeof i&&i.length>0,h=e.commonColorsKeys[u]||y(i,d),p=Object.keys(h.assigned).length,f=Object(l.a)(c.filter((function(e){return!h.assigned[e]})).map((function(e,t){return Object(r.a)({},e,h.available[(t+p)%h.available.length])}))),g=Object(n.a)({},h.assigned,{},f);return Object(n.a)({},e,{commonColorsKeys:Object(n.a)({},e.commonColorsKeys,Object(r.a)({},u,Object(n.a)({},h,{assigned:g})))})})),b.on(p.p,(function(e,t){var a,i=t.chartUuid,s=t.commonMinKey,l=t.value,c=Object(n.a)({},null===(a=e.commonMin[s])||void 0===a?void 0:a.charts,Object(r.a)({},i,l)),u=Math.min.apply(Math,Object(o.a)(Object.values(c)));return Object(n.a)({},e,{commonMin:Object(n.a)({},e.commonMin,Object(r.a)({},s,{charts:c,currentExtreme:u}))})})),b.on(p.o,(function(e,t){var a,i=t.chartUuid,s=t.commonMaxKey,l=t.value,c=Object(n.a)({},null===(a=e.commonMax[s])||void 0===a?void 0:a.charts,Object(r.a)({},i,l)),u=Math.max.apply(Math,Object(o.a)(Object.values(c)));return Object(n.a)({},e,{commonMax:Object(n.a)({},e.commonMax,Object(r.a)({},s,{charts:c,currentExtreme:u}))})})),b.on(p.w,(function(e,t){var a=t.isActive;return Object(n.a)({},e,{spacePanelIsActive:a})})),b.on(p.x,(function(e,t){var a=t.isActive;return Object(n.a)({},e,{spacePanelTransitionEndIsActive:a})})),b.on(p.u,(function(e,t){var a=t.chartUuid,r=t.hoveredX;return Object(n.a)({},e,{hoveredX:r,currentSelectionMasterId:a})})),b.on(p.s,(function(e,t){return Object(n.a)({},e,{globalPanAndZoom:t})})),b.on(p.j,(function(e){return Object(n.a)({},e,{globalPanAndZoom:m.globalPanAndZoom,hoveredX:m.hoveredX})})),b.on(p.q,(function(e,t){var a=t.after;return Object(n.a)({},e,{defaultAfter:a})})),b.on(p.i,(function(e){return Object(n.a)({},e,{defaultAfter:m.defaultAfter})})),b.on(p.r,(function(e,t){var a=t.after,r=t.before,o=t.masterID;return Object(n.a)({},e,{globalChartUnderlay:{after:a,before:r,masterID:o}})})),b.on(p.b,(function(e){if(!e.globalChartUnderlay)return console.warn("Cannot center around empty selection"),e;var t=e.globalChartUnderlay,a=t.after,r=t.before,o=(r-a)/2;return Object(n.a)({},e,{globalPanAndZoom:{after:a-o,before:r+o}})})),b.on(p.d,(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.resetPanAndZoom,r=void 0===a||a;return Object(n.a)({},e,{globalChartUnderlay:m.globalChartUnderlay},r?{globalPanAndZoom:m.globalPanAndZoom}:{})})),b.on(p.D,(function(e,t){var a=t.hasWindowFocus,r=document.hasFocus();return Object(n.a)({},e,{hasWindowFocus:r||a})})),b.on(p.t,(function(e){return Object(n.a)({},e,{globalPause:!0})})),b.on(p.k,(function(e,t){var a=t.forcePlay;return Object(n.a)({},e,{globalPause:m.globalPause,globalPanAndZoom:m.globalPanAndZoom,hoveredX:m.hoveredX,options:Object(n.a)({},e.options,{stop_updates_when_focus_is_lost:!a})})})),b.on(p.y,(function(e,t){var a=t.utcOffset;return Object(n.a)({},e,{options:Object(n.a)({},e.options,{utcOffset:a})})})),b.on(p.f.request,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{isFetchingHello:!0})})})),b.on(p.f.success,(function(e,t){var a=t.cloudBaseURL,r=t.hostname,o=t.machineGuid;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{cloudBaseURL:a,isFetchingHello:!1,hasFetchedHello:!0,hostname:r,machineGuid:o})})})),b.on(p.f.failure,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{cloudBaseURL:g.a,isFetchingHello:!1,isHelloCallError:!0})})})),b.on(p.a,(function(e,t){var a=t.registryServer;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{registryServer:a})})})),b.on(p.m,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{hasFetchedHello:m.registry.hasFetchedHello})})})),b.on(h.f,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{hasStartedInfo:!0})})})),b.on(h.f.success,(function(e,t){var a=t.isCloudAvailable,r=t.isCloudEnabled,o=t.isAgentClaimed,i=t.isACLKAvailable,s=t.fullInfoPayload;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{hasFetchedInfo:!0,isCloudAvailable:a,isCloudEnabled:r,isAgentClaimed:o,isACLKAvailable:i,fullInfoPayload:s})})})),b.on(h.f.failure,(function(e){return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{isCloudAvailable:!1,isCloudEnabled:!1,isAgentClaimed:!1,isACLKAvailable:!1})})})),b.on(p.C,(function(e,t){var a=t.personGuid,r=t.registryMachines,o=t.registryMachinesArray;return Object(n.a)({},e,{registry:Object(n.a)({},e.registry,{personGuid:a,registryMachines:r,registryMachinesArray:o})})})),b.on(p.A,(function(e){return Object(n.a)({},e,{alarms:Object(n.a)({},e.alarms,{hasStartedAlarms:!0})})})),b.on(p.B,(function(e,t){var a=t.activeAlarms;return Object(n.a)({},e,{alarms:Object(n.a)({},e.alarms,{activeAlarms:a})})})),b.on(p.v,(function(e,t){var a=t.key,o=t.value;return Object(n.a)({},e,{options:Object(n.a)({},e.options,Object(r.a)({},a,o))})})),b.on(p.l,(function(e){return Object(f.b)(),Object(n.a)({},e,{options:Object(f.c)()})})),b.on(p.g,(function(e,t){var a=t.snapshot,o=Object.keys(a.data).map((function(e){var t,n;try{if(null===(t=a.uncompress(a.data[e])))return console.warn("uncompressed snapshot data for key ".concat(e," is null")),null;if("undefined"===typeof t)return console.warn("uncompressed snapshot data for key ".concat(e," is undefined")),null}catch(o){console.warn("decompression of snapshot data for key ".concat(e," failed"),o),t=null}if("string"!==typeof t)return console.warn("uncompressed snapshot data for key ".concat(e," is not string")),{};try{n=JSON.parse(t)}catch(o){return console.warn("parsing snapshot data for key ".concat(e," failed")),{}}return Object(r.a)({},e,n)})).reduce((function(e,t){return Object(n.a)({},e,{},t)}),{});return Object(n.a)({},e,{snapshot:Object(n.a)({},a,{data:o})})})),b.on(p.n,(function(e,t){var a=t.alarm;return Object(n.a)({},e,{alarm:a})})),b.on(p.c,(function(e,t){var a=t.data;return Object(n.a)({},e,{chartsMetadata:Object(n.a)({},e.chartsMetadata,{data:a})})})),b.on(p.z,(function(e,t){var a=t.message;return Object(n.a)({},e,{userNodeAccess:a})}))},161:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),o=a(34),i=a.n(o),s=function(e){return{left:"fa-backward",reset:"fa-play",right:"fa-forward",zoomIn:"fa-plus",zoomOut:"fa-minus",resize:"fa-sort",lineChart:"fa-chart-line",areaChart:"fa-chart-area",noChart:"fa-chart-area",loading:"fa-sync-alt",noData:"fa-exclamation-triangle"}[e]},l=function(e){var t=e.iconType;return r.a.createElement("i",{className:i()("fas",s(t))})}},163:function(e,t,a){"use strict";a.d(t,"b",(function(){return f})),a.d(t,"a",(function(){return g}));var n=a(14),r=a(7),o=a(193),i=a(497),s=a(498),l=a(286),c=a(22),u=a(12),d=a(97),h=a(28),p=a(18),f={chartData:null,chartId:null,chartMetadata:null,chartPanAndZoom:null,fetchDataParams:{isRemotelyControlled:!1,viewRange:null},isFetchingData:!1,isFetchDataFailure:!1,isFetchDetailsFailure:!1,isFetchingDetails:!1,resizeHeight:null,snapshotDataIsFetching:!1,snapshotDataIsError:!1,snapshotData:null,viewRange:null},g=Object(c.createReducer)({},{}),m=function(e,t){return e[t]||f};g.on(p.c.request,(function(e,t){var a=t.chart,o=t.fetchDataParams,i=t.id;return Object(r.a)({},e,Object(n.a)({},i,Object(r.a)({},m(e,i),{chartId:a,isFetchingData:!0,viewRange:o.viewRange})))})),g.on(p.d,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchingData:!1})))})),g.on(p.c.failure,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchingData:!1,isFetchDataFailure:!0})))})),g.on(p.c.success,(function(e,t){var a=t.id,o=t.chartData,i=t.fetchDataParams,s=m(e,a);return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},s,{chartData:Object(h.f)(["dimension_names"],s.chartData,o),fetchDataParams:i,isFetchingData:!1,isFetchDataFailure:!1,viewRange:i.viewRange})))})),g.on(p.e.request,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{snapshotDataIsFetching:!0})))})),g.on(p.e.failure,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{snapshotDataIsFetching:!1,snapshotDataIsError:!0})))})),g.on(p.e.success,(function(e,t){var a=t.id,o=t.snapshotData;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{snapshotDataIsFetching:!1,snapshotDataIsError:!1,snapshotData:o})))})),g.on(p.j,(function(e){return Object(o.a)((function(e){return Object(r.a)({},e,{},Object(i.a)(["snapshotDataIsFetching","snapshotDataIsError","snapshotData"],f))}),e)})),g.on(p.b.request,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchingDetails:!0})))})),g.on(p.b.failure,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{isFetchDetailsFailure:!0})))})),g.on(p.b.success,(function(e,t){var a=t.id,o=t.chartMetadata;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{chartMetadata:o,isFetchingDetails:!1,isFetchDetailsFailure:!1})))})),g.on(p.i,(function(e,t){var a=t.id,o=t.resizeHeight;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{resizeHeight:o})))})),g.on(p.h,(function(e,t){var a=t.after,o=t.before,i=t.id,s=t.shouldForceTimeRange;return Object(r.a)({},e,Object(n.a)({},i,Object(r.a)({},m(e,i),{chartPanAndZoom:{after:a,before:o,shouldForceTimeRange:s}})))})),g.on(p.g,(function(e,t){var a=t.id;return Object(r.a)({},e,Object(n.a)({},a,Object(r.a)({},m(e,a),{chartPanAndZoom:f.chartPanAndZoom})))})),g.on(u.v,(function(e,t){var a=t.key,n=t.value;return a===d.a&&!0===n?Object(o.a)(Object(s.a)("chartPanAndZoom",f.chartPanAndZoom),e):e})),g.on(p.a,(function(e,t){var a=t.id;return Object(l.a)([a],e)}))},170:function(e,t,a){"use strict";a.d(t,"b",(function(){return d})),a.d(t,"a",(function(){return h}));var n=a(7),r=a(14),o=a(499),i=a(218),s=a(503),l=a(97),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(89),o=a(45),i=(Object(n.createAction)("".concat(o.c,"/updateChartData")),Object(n.createAction)("".concat(o.c,"/updateChartMetadata")),Object(r.a)("".concat(o.c,"/fetchDataAction"))),s=Object(n.createAction)("".concat(o.c,"/fetchDataCancelAction")),l=Object(r.a)("".concat(o.c,"/fetchDataForSnapshotAction")),c=Object(r.a)("".concat(o.c,"/snapshotExportResetAction")),u=Object(r.a)("".concat(o.c,"/fetchChartAction")),d=Object(n.createAction)("".concat(o.c,"/setResizeHeight")),h=Object(n.createAction)("".concat(o.c,"/setChartPanAndZoom")),p=Object(n.createAction)("".concat(o.c,"/resetChartPanAndZoomAction")),f=Object(n.createAction)("".concat(o.c,"/clearChartStateAction")),g=Object(r.a)("".concat(o.c,"/fetchInfoAction"))},182:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n="sign_in_iframe"},216:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return updateLocaleFunctions})),__webpack_require__.d(__webpack_exports__,"a",(function(){return netdataCallback}));var ramda__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(500),ramda__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(146),_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12),_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(9),_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(46),_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(100),_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(44),_domains_chart_actions__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(18),_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(39),_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(36),_utils_name_2_id__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(142),_utils_date_time__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(42),_utils__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(140),utils_hash_utils__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(56),_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(98),_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":case"statsd":e.menu=a;break;case"apache":e.menu=e.type,t.length>2&&"cache"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"bind":e.menu=e.type,t.length>2&&"rndc"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"cgroup":e.menu=e.type,e.id.match(/.*[\._\/-:]qemu[\._\/-:]*/)||e.id.match(/.*[\._\/-:]kvm[\._\/-:]*/)?e.menu_pattern="cgqemu":e.menu_pattern="cgroup";break;case"go":e.menu=e.type,t.length>2&&"expvar"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"mount":t.length>2?e.menu=a+"_"+t[1]:e.menu=a;break;case"isc":e.menu=e.type,t.length>2&&"dhcpd"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"ovpn":e.menu=e.type,t.length>3&&"status"===t[1]&&"log"===t[2]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"smartd":case"web":e.menu=e.type,t.length>2&&"log"===t[1]?e.menu_pattern=a+"_"+t[1]:t.length>1&&(e.menu_pattern=a);break;case"anomaly":t.length>=2&&t[1].startsWith("detection")&&(e.menu=a+"_detection");break;case"tc":if(e.menu=a,"tc.qos"===e.context&&("undefined"===typeof options.submenu_names[e.family]||options.submenu_names[e.family]===e.family)){var n=e.name.split(".")[1];n.endsWith("_in")?options.submenu_names[e.family]=n.slice(0,n.lastIndexOf("_in")):n.endsWith("_out")?options.submenu_names[e.family]=n.slice(0,n.lastIndexOf("_out")):n.startsWith("in_")?options.submenu_names[e.family]=n.slice(3,n.length):n.startsWith("out_")?options.submenu_names[e.family]=n.slice(4,n.length):options.submenu_names[e.family]=n}e.id.match(/.*-ifb$/)&&e.priority--;break;default:e.menu=e.type,t.length>1&&(e.menu_pattern=a)}e.submenu=e.family}function headMain(e,t,a){if("print"===urlOptions.mode)return"";var n="";return"undefined"!==typeof t["system.swap"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.swap" data-dimensions="used" data-append-options="percentage" data-chart-library="easypiechart" data-title="Used Swap" data-units="%" data-easypiechart-max-value="100" data-width="9%" data-points="'+a.toString()+'" data-colors="#DD4400" role="application"></div>'),"undefined"!==typeof t["system.io"]?(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.io" data-dimensions="in" data-chart-library="easypiechart" data-title="Disk Read" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.io.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.io" data-dimensions="out" data-chart-library="easypiechart" data-title="Disk Write" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.io.mainhead" role="application"></div>'):"undefined"!==typeof t["system.pgpgio"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.pgpgio" data-dimensions="in" data-chart-library="easypiechart" data-title="Disk Read" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.pgpgio.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.pgpgio" data-dimensions="out" data-chart-library="easypiechart" data-title="Disk Write" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.pgpgio.mainhead" role="application"></div>'),"undefined"!==typeof t["system.cpu"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.cpu" data-chart-library="gauge" data-title="CPU" data-units="%" data-gauge-max-value="100" data-width="20%" data-points="'+a.toString()+'" data-colors="'+NETDATA.colors[12]+'" role="application"></div>'),"undefined"!==typeof t["system.net"]?(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.net" data-dimensions="received" data-chart-library="easypiechart" data-title="Net Inbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.net.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.net" data-dimensions="sent" data-chart-library="easypiechart" data-title="Net Outbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.net.mainhead" role="application"></div>'):"undefined"!==typeof t["system.ip"]?(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ip" data-dimensions="received" data-chart-library="easypiechart" data-title="IP Inbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ip.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ip" data-dimensions="sent" data-chart-library="easypiechart" data-title="IP Outbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ip.mainhead" role="application"></div>'):"undefined"!==typeof t["system.ipv4"]?(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ipv4" data-dimensions="received" data-chart-library="easypiechart" data-title="IPv4 Inbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ipv4.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ipv4" data-dimensions="sent" data-chart-library="easypiechart" data-title="IPv4 Outbound" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ipv4.mainhead" role="application"></div>'):"undefined"!==typeof t["system.ipv6"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ipv6" data-dimensions="received" data-chart-library="easypiechart" data-title="IPv6 Inbound" data-units="kbps" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ipv6.mainhead" role="application"></div>',n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ipv6" data-dimensions="sent" data-chart-library="easypiechart" data-title="IPv6 Outbound" data-units="kbps" data-width="11%" data-points="'+a.toString()+'" data-common-units="system.ipv6.mainhead" role="application"></div>'),"undefined"!==typeof t["system.ram"]&&(n+='<div class="netdata-container" style="margin-right: 10px;" data-netdata="system.ram" data-dimensions="used|buffers|active|wired" data-append-options="percentage" data-chart-library="easypiechart" data-title="Used RAM" data-units="%" data-easypiechart-max-value="100" data-width="9%" data-points="'+a.toString()+'" data-colors="'+NETDATA.colors[7]+'" role="application"></div>'),n}function generateHeadCharts(e,t,a){if("print"===urlOptions.mode)return"";var n="",r=netdataDashboard.anyAttribute(netdataDashboard.context,e,t.context,[]);if(r.length>0)for(var o=0,i=r.length;o<i;)"function"===typeof r[o]?n+=r[o](netdataDashboard.os,t.id).replace(/CHART_DURATION/g,a.toString()).replace(/CHART_UNIQUE_ID/g,t.id):n+=r[o].replace(/CHART_DURATION/g,a.toString()).replace(/CHART_UNIQUE_ID/g,t.id),o++;return n}function renderPage(e,t){var a=document.getElementById("charts_div"),n=Math.floor(100/chartsPerRow($(a).width())),r=60*Math.round($(a).width()*n/100*t.update_every/3/60);options.duration=r,options.update_every=t.update_every;for(var o,i,s,l="",c='<ul class="nav dashboard-sidenav" data-spy="affix" id="sidebar_ul">',u=headMain(netdataDashboard.os,t.charts,r),d=sortObjectByPriority(e),h=0,p=d.length,f="bottom"===_domains_chart_utils_transformDataAttributes__WEBPACK_IMPORTED_MODULE_16__.a.legendPosition,g=f?_domains_chart_utils_legend_utils__WEBPACK_IMPORTED_MODULE_15__.a:0;h<p;){var m=d[h++],b=NETDATA.name2id("menu_"+m);c+='<li class=""><a href="#'+b+'" onClick="return scrollToId(\''+b+"');\">"+e[m].icon+" "+e[m].title+'</a><ul class="nav">',l+='<div role="section" class="dashboard-section"><div role="sectionhead"><h1 id="'+b+'" role="heading">'+e[m].icon+" "+e[m].title+'</h1></div><div role="section" class="dashboard-subsection">',null!==e[m].info&&(l+=e[m].info);var v="",_='<div class="netdata-chart-row">'+u;u="";for(var y=sortObjectByPriority(e[m].submenus),O=0,x=y.length;O<x;){var w=y[O++],E=NETDATA.name2id("menu_"+m+"_submenu_"+w);c+='<li class><a href="#'+E+'" onClick="return scrollToId(\''+E+"');\">"+e[m].submenus[w].title+"</a></li>",v+='<div role="section" class="dashboard-section-container" id="'+E+'"><h2 id="'+E+'" class="netdata-chart-alignment" role="heading">'+e[m].submenus[w].title+"</h2>",null!==e[m].submenus[w].info&&(v+='<div class="dashboard-submenu-info netdata-chart-alignment" role="document">'+e[m].submenus[w].info+"</div>");var S='<div class="netdata-chart-row">',C="";e[m].submenus[w].charts.sort(prioritySort);for(var A=0,k=e[m].submenus[w].charts.length;A<k;){var j=e[m].submenus[w].charts[A++];_+=generateHeadCharts("mainheads",j,r),S+=generateHeadCharts("heads",j,r),"print"===urlOptions.mode&&(C+='<div role="row" class="dashboard-print-row">');var T=netdataDashboard.contextHeight(j.context,options.chartsHeight)+g;C+='<div class="netdata-chartblock-container" style="width: '+n.toString()+'%;">'+netdataDashboard.contextInfo(j.context)+'<div class="netdata-container" id="chart_'+NETDATA.name2id(j.id)+'" data-netdata="'+j.id+'" data-width="100%" data-height="'+T.toString()+'px" data-dygraph-valuerange="'+netdataDashboard.contextValueRange(j.context)+'" data-id="'+NETDATA.name2id(options.hostname+"/"+j.id)+'" data-colors="'+netdataDashboard.anyAttribute(netdataDashboard.context,"colors",j.context,"")+'" data-decimal-digits="'+netdataDashboard.contextDecimalDigits(j.context,-1)+'"'+(f?' data-legend-position="bottom"':"")+(o=j.family,i=j.context,s=j.units,"undefined"!==typeof netdataDashboard.anyAttribute(netdataDashboard.context,"commonMin",i,void 0)?' data-common-min="'+o+"/"+i+"/"+s+'"':"")+function(e,t,a){return"undefined"!==typeof netdataDashboard.anyAttribute(netdataDashboard.context,"commonMax",t,void 0)?' data-common-max="'+e+"/"+t+"/"+a+'"':""}(j.family,j.context,j.units)+' role="application"></div></div>',"print"===urlOptions.mode&&(C+="</div>")}v+=(S+="</div>")+C+"</div>"}c+="</ul></li>",l+=(_+="</div>")+v+'</div></div><hr role="separator"/>'}var D="dbengine"===t.memory_mode;c+='<li class="" style="padding-top:15px;"><a href="https://learn.netdata.cloud/docs/agent/collectors/quickstart/" target="_blank"><i class="fas fa-plus"></i> Add more charts</a></li>',c+='<li class=""><a href="https://learn.netdata.cloud/docs/agent/health/quickstart/" target="_blank"><i class="fas fa-plus"></i> Add more alarms</a></li>',c+='<li class="" style="margin:20px;color:#666;"><small>Every '+(1===t.update_every?"second":t.update_every.toString()+" seconds")+", Netdata collects <strong>"+t.dimensions_count.toLocaleString()+"</strong> metrics on "+t.hostname.toString()+", presents them in <strong>"+t.charts_count.toLocaleString()+"</strong> charts"+(D?"":",")+" and monitors them with <strong>"+t.alarms_count.toLocaleString()+"</strong> alarms.",D||(c+='<br /> <br />Get more history by <a href="https://learn.netdata.cloud/guides/longer-metrics-storage#using-the-round-robin-database" target=_blank>configuring Netdata\'s <strong>history</strong></a> or switching to the <a href="https://learn.netdata.cloud/docs/agent/database/engine" target=_blank>database engine.</a>'),c+="<br/> <br/><strong>netdata</strong><br/>"+t.version.toString()+"</small>",c+="</li>",c+='<li id="sidebar-end-portal-container"></li>',c+="</ul>",a.innerHTML=l,document.getElementById("sidebar").innerHTML=c,!0===urlOptions.highlight&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.r)({after:urlOptions.highlight_after,before:urlOptions.highlight_before})),"print"===urlOptions.mode?printPage():finalizePage()}function renderChartsAndMenu(e){options.menus={},options.submenu_names={};var t,a=options.menus,n=e.charts;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];enrichChartData(o),"undefined"===typeof a[i=o.menu]?a[i]={menu_pattern:o.menu_pattern,priority:o.priority,submenus:{},title:netdataDashboard.menuTitle(o),icon:netdataDashboard.menuIcon(o),info:netdataDashboard.menuInfo(o),height:netdataDashboard.menuHeight(o)*options.chartsHeight}:("undefined"===typeof a[i].menu_pattern&&(a[i].menu_pattern=o.menu_pattern),o.priority<a[i].priority&&(a[i].priority=o.priority)),t="undefined"!==typeof a[i].menu_pattern?a[i].menu_pattern:i,"undefined"===typeof a[i].submenus[o.submenu]?a[i].submenus[o.submenu]={priority:o.priority,charts:[],title:null,info:netdataDashboard.submenuInfo(t,o.submenu),height:netdataDashboard.submenuHeight(t,o.submenu,a[i].height)}:o.priority<a[i].submenus[o.submenu].priority&&(a[i].submenus[o.submenu].priority=o.priority),a[i].submenus[o.submenu].charts.push(o)}for(var i in a)if(a.hasOwnProperty(i))for(var s in a[i].submenus)a[i].submenus.hasOwnProperty(s)&&("undefined"!==typeof options.submenu_names[s]?a[i].submenus[s].title=s+" ("+options.submenu_names[s]+")":(t="undefined"!==typeof a[i].menu_pattern?a[i].menu_pattern:i,a[i].submenus[s].title=netdataDashboard.submenuTitle(t,s)));renderPage(a,e)}window.netdataDashboard=netdataDashboard;var handleLoadJs=function(e,t,a){return e.catch((function(e){console.warn("error",e),alert("Cannot load required JS library: ".concat(t))})).then((function(){a()}))};function loadClipboard(e){handleLoadJs(__webpack_require__.e(8).then(__webpack_require__.bind(null,504)).then((function(e){window.clipboard=e})),"clipboard-polyfill",e)}function loadBootstrapTable(e){handleLoadJs(Promise.all([__webpack_require__.e(6).then(__webpack_require__.t.bind(null,505,7)).then((function(){return __webpack_require__.e(7).then(__webpack_require__.t.bind(null,506,7))})),__webpack_require__.e(10).then(__webpack_require__.t.bind(null,507,7))]),"bootstrap-table",e)}function loadBootstrapSlider(e){handleLoadJs(Promise.all([__webpack_require__.e(5).then(__webpack_require__.t.bind(null,508,7)).then((function(e){var t=e.default;window.Slider=t})),__webpack_require__.e(4).then(__webpack_require__.t.bind(null,509,7))]),"bootstrap-slider",e)}function loadLzString(e){handleLoadJs(__webpack_require__.e(9).then(__webpack_require__.t.bind(null,510,7)),"lz-string",e)}function loadPako(e){handleLoadJs(__webpack_require__.e(3).then(__webpack_require__.t.bind(null,511,7)).then((function(e){var t=e.default;window.pako=t})),"pako",e)}function alarmsUpdateModal(){var e='<h3>Raised Alarms</h3><table class="table">',t='<h3>All Running Alarms</h3><div class="panel-group" id="alarms_all_accordion" role="tablist" aria-multiselectable="true">',a='<hr/><a href="https://github.com/netdata/netdata/tree/master/web/api/badges#netdata-badges" target="_blank">netdata badges</a> refresh automatically. Their color indicates the state of the alarm: <span style="color: #e05d44"><b> red </b></span> is critical, <span style="color:#fe7d37"><b> orange </b></span> is warning, <span style="color: #4c1"><b> bright green </b></span> is ok, <span style="color: #9f9f9f"><b> light grey </b></span> is undefined (i.e. no data or no status), <span style="color: #000"><b> black </b></span> is not initialized. You can copy and paste their URLs to embed them in any web page.<br/>netdata can send notifications for these alarms. Check <a href="https://github.com/netdata/netdata/blob/master/health/notifications/health_alarm_notify.conf" target="_blank">this configuration file</a> for more information.';loadClipboard((function(){}));reduxStore.dispatch(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.e.request({callback:function(n){if(options.alarm_families=[],null!==n){var r,o,i,s=0,l=0,c={},u=[];for(r in n.alarms)if(n.alarms.hasOwnProperty(r)){o=(i=n.alarms[r]).family;var d=options.data.charts[i.chart];"undefined"===typeof d&&(d=options.data.charts_by_name[i.chart]),"undefined"===typeof d?(console.log("WARNING: alarm "+r+" is linked to chart "+i.chart+", which is not found in the list of chart got from the server."),d={priority:9999999}):"undefined"!==typeof d.menu&&"undefined"!==typeof d.submenu&&(o=d.menu+" - "+d.submenu),"undefined"===typeof c[o]&&(c[o]={name:o,arr:[],priority:d.priority},u.push(c[o])),d.priority<c[o].priority&&(c[o].priority=d.priority),c[o].arr.unshift(i)}for(var h=u.sort((function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:naturalSortCompare(e.name,t.name)})),p=0,f=0,g=h.length;g--;){o=h[p++].name;var m=!1;0!==f&&(t+="</table></div></div></div>"),t+='<div class="panel panel-default"><div class="panel-heading" role="tab" id="alarm_all_heading_'+f.toString()+'"><h4 class="panel-title"><a class="collapsed" role="button" data-toggle="collapse" data-parent="#alarms_all_accordion" href="#alarm_all_'+f.toString()+'" aria-expanded="false" aria-controls="alarm_all_'+f.toString()+'">'+o.toString()+'</a></h4></div><div id="alarm_all_'+f.toString()+'" class="panel-collapse collapse " role="tabpanel" aria-labelledby="alarm_all_heading_'+f.toString()+'" data-alarm-id="'+f.toString()+'"><div class="panel-body" id="alarm_all_body_'+f.toString()+'">',options.alarm_families[f]=c[o],f++;for(var b=c[o].arr,v=b.length;v--;)"WARNING"!==(i=b[v]).status&&"CRITICAL"!==i.status||(m||(m=!0,e+='<tr><th class="text-center" colspan="2"><h4>'+o+"</h4></th></tr>"),s++,e+=x(i,!0)),l++}e+="</table>",h.length>0&&(t+="</div></div></div>"),t+="</div>",e+=s?a:'<div style="width:100%; height: 100px; text-align: center;"><span style="font-size: 50px;"><i class="fas fa-thumbs-up"></i></span><br/>Everything is normal. No raised alarms.</div>',t+=l?a:"<h4>No alarms are running in this system.</h4>",document.getElementById("alarms_active").innerHTML=e,document.getElementById("alarms_all").innerHTML=t,enableTooltipsAndPopovers(),h.length>0&&w(0);var _=$("#alarms_all_accordion");_.on("show.bs.collapse",(function(e){var t=$(e.target);w($(t).data("alarm-id"))})),_.on("hidden.bs.collapse",(function(e){var t=$(e.target),a=$(t).data("alarm-id");$("#alarm_all_"+a.toString()).html("")})),document.getElementById("alarms_log").innerHTML='<h3>Alarm Log</h3><table id="alarms_log_table"></table>',loadBootstrapTable((function(){$("#alarms_log_table").bootstrapTable({url:"".concat(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,"/api/v1/alarm_log?all"),cache:!1,pagination:!0,pageSize:10,showPaginationSwitch:!1,search:!0,searchTimeOut:300,searchAlign:"left",showColumns:!0,showExport:!0,exportDataType:"all",exportOptions:{fileName:"netdata_alarm_log"},onClickRow:function(e){return scrollToChartAfterHidingModal(e.chart,1e3*e.when,e.status),$("#alarmsModal").modal("hide"),!1},rowStyle:function(e){switch(e.status){case"CRITICAL":return{classes:"danger"};case"WARNING":return{classes:"warning"};case"UNDEFINED":return{classes:"info"};case"CLEAR":return{classes:"success"}}return{}},showFooter:!1,showHeader:!0,showRefresh:!0,showToggle:!1,sortable:!0,silentSort:!1,columns:[{field:"when",title:"Event Date",valign:"middle",titleTooltip:"The date and time the even took place",formatter:function(e,t,a){return O(e," ")},align:"center",switchable:!1,sortable:!0},{field:"hostname",title:"Host",valign:"middle",titleTooltip:"The host that generated this event",align:"center",visible:!1,sortable:!0},{field:"unique_id",title:"Unique ID",titleTooltip:"The host unique ID for this event",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"alarm_id",title:"Alarm ID",titleTooltip:"The ID of the alarm that generated this event",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"alarm_event_id",title:"Alarm Event ID",titleTooltip:"The incremental ID of this event for the given alarm",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"chart",title:"Chart",titleTooltip:"The chart the alarm is attached to",align:"center",valign:"middle",switchable:!1,sortable:!0},{field:"family",title:"Family",titleTooltip:"The family of the chart the alarm is attached to",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"name",title:"Alarm",titleTooltip:"The alarm name that generated this event",formatter:function(e,t,a){return e.toString().replace(/_/g," ")},align:"center",valign:"middle",switchable:!1,sortable:!0},{field:"value_string",title:"Friendly Value",titleTooltip:"The value of the alarm, that triggered this event",align:"right",valign:"middle",sortable:!0},{field:"old_value_string",title:"Friendly Old Value",titleTooltip:"The value of the alarm, just before this event",align:"right",valign:"middle",visible:!1,sortable:!0},{field:"old_value",title:"Old Value",titleTooltip:"The value of the alarm, just before this event",formatter:function(e,t,a){return(null!==e?Math.round(100*e)/100:"NaN").toString()},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"value",title:"Value",titleTooltip:"The value of the alarm, that triggered this event",formatter:function(e,t,a){return(null!==e?Math.round(100*e)/100:"NaN").toString()},align:"right",valign:"middle",visible:!1,sortable:!0},{field:"units",title:"Units",titleTooltip:"The units of the value of the alarm",align:"left",valign:"middle",visible:!1,sortable:!0},{field:"old_status",title:"Old Status",titleTooltip:"The status of the alarm, just before this event",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"status",title:"Status",titleTooltip:"The status of the alarm, that was set due to this event",align:"center",valign:"middle",switchable:!1,sortable:!0},{field:"duration",title:"Last Duration",titleTooltip:"The duration the alarm was at its previous state, just before this event",formatter:function(e,t,a){return Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e,{negative_suffix:"",space:" ",now:"no time"})},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"non_clear_duration",title:"Raised Duration",titleTooltip:"The duration the alarm was raised, just before this event",formatter:function(e,t,a){return Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e,{negative_suffix:"",space:" ",now:"no time"})},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"recipient",title:"Recipient",titleTooltip:"The recipient of this event",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"processed",title:"Processed Status",titleTooltip:"True when this event is processed",formatter:function(e,t,a){return!0===e?"DONE":"PENDING"},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"updated",title:"Updated Status",titleTooltip:"True when this event has been updated by another event",formatter:function(e,t,a){return!0===e?"UPDATED":"CURRENT"},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"updated_by_id",title:"Updated By ID",titleTooltip:"The unique ID of the event that obsoleted this one",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"updates_id",title:"Updates ID",titleTooltip:"The unique ID of the event obsoleted because of this event",formatter:function(e,t,a){return y(e)},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"exec",title:"Script",titleTooltip:"The script to handle the event notification",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"exec_run",title:"Script Run At",titleTooltip:"The date and time the script has been ran",formatter:function(e,t,a){return O(e," ")},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"exec_code",title:"Script Return Value",titleTooltip:"The return code of the script",formatter:function(e,t,a){return 0===e?"OK (returned 0)":"FAILED (with code "+e.toString()+")"},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"delay",title:"Script Delay",titleTooltip:"The hysteresis of the notification",formatter:function(e,t,a){return Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e,{negative_suffix:"",space:" ",now:"no time"})},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"delay_up_to_timestamp",title:"Script Delay Run At",titleTooltip:"The date and time the script should be run, after hysteresis",formatter:function(e,t,a){return O(e," ")},align:"center",valign:"middle",visible:!1,sortable:!0},{field:"info",title:"Description",titleTooltip:"A short description of the alarm",align:"center",valign:"middle",visible:!1,sortable:!0},{field:"source",title:"Alarm Source",titleTooltip:"The source of configuration of the alarm",align:"center",valign:"middle",visible:!1,sortable:!0}]})}))}else document.getElementById("alarms_active").innerHTML=document.getElementById("alarms_all").innerHTML=document.getElementById("alarms_log").innerHTML="failed to load alarm data!";function y(e){return 0===e?"-":e.toString()}function O(e,t){if(0===e)return"-";"undefined"===typeof t&&(t=" ");var a=new Date(1e3*e);return a.toLocaleDateString()+t+a.toLocaleTimeString()}function x(e,t){var a=options.data.charts[e.chart];if("undefined"===typeof a&&"undefined"===typeof(a=options.data.charts_by_name[e.chart]))return console.log("Cannot find chart "+e.chart+", you probably need to refresh the page."),"";var n="undefined"!==typeof e.warn||"undefined"!==typeof e.crit,r="".concat(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,"/api/v1/badge.svg?chart=").concat(e.chart,"&alarm=").concat(e.name,"&refresh=auto"),o="<br/> <br/>role: <b>"+e.recipient+'</b><br/> <br/><div class="action-button ripple" title="click to scroll the dashboard to the chart of this alarm" data-toggle="tooltip" data-placement="bottom" onClick="scrollToChartAfterHidingModal(\''+e.chart+"', "+1e3*e.last_status_change+", '"+e.status+'\'); $(\'#alarmsModal\').modal(\'hide\'); return false;"><i class="fab fa-periscope"></i></div><div class="action-button ripple" title="click to copy to the clipboard the URL of this badge" data-toggle="tooltip" data-placement="bottom" onClick="clipboardCopy(\''+r+'\'); return false;"><i class="far fa-copy"></i></div><div class="action-button ripple" title="click to copy to the clipboard an auto-refreshing <code>embed</code> html element for this badge" data-toggle="tooltip" data-placement="bottom" onClick="clipboardCopyBadgeEmbed(\''+r+'\'); return false;"><i class="fas fa-copy"></i></div>',i='<tr><td class="text-center" style="vertical-align: middle; word-break: break-word;" width="40%"><b>'+e.chart+'</b><br/> <br/><embed src="'+r+'" type="image/svg+xml" height="20"/><br/> <br/><span style="font-size: 18px;">'+e.info+"</span>"+o+'</td><td><table class="table">'+("undefined"!==typeof e.warn?'<tr><td width="10%" style="text-align:right">warning when</td><td><span style="font-family: monospace; color:#fe7d37; font-weight: bold;">'+e.warn+"</span></td></tr>":"")+("undefined"!==typeof e.crit?'<tr><td width="10%" style="text-align:right">critical when</td><td><span style="font-family: monospace; color: #e05d44; font-weight: bold;">'+e.crit+"</span></td></tr>":"");if(!0===t){var s=a.units;"%"===s&&(s="%"),i+=("undefined"!==typeof e.lookup_after?'<tr><td width="10%" style="text-align:right">db lookup</td><td>'+function(e,t){var a=" of all values ";return t.dimensions.length>1&&(a=" of the sum of all dimensions "),"undefined"!==typeof e.lookup_dimensions&&(a=e.lookup_dimensions.replace(/|/g,",").split(",").length>1?"of the sum of dimensions <code>"+e.lookup_dimensions+"</code> ":"of all values of dimension <code>"+e.lookup_dimensions+"</code> "),"<code>"+e.lookup_method+"</code> "+a+", of chart <code>"+e.chart+"</code>, starting <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.lookup_after+e.lookup_before,{space:" "})+"</code> and up to <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.lookup_before,{space:" "})+"</code>"+(e.lookup_options?", with options <code>"+e.lookup_options.replace(/ /g,", ")+"</code>":"")+"."}(e,a)+"</td></tr>":"")+("undefined"!==typeof e.calc?'<tr><td width="10%" style="text-align:right">calculation</td><td><span style="font-family: monospace;">'+e.calc+"</span></td></tr>":"")+(null!==a.green?'<tr><td width="10%" style="text-align:right">green threshold</td><td><code>'+a.green+" "+s+"</code></td></tr>":"")+(null!==a.red?'<tr><td width="10%" style="text-align:right">red threshold</td><td><code>'+a.red+" "+s+"</code></td></tr>":"")}e.warn_repeat_every>0&&(i+='<tr><td width="10%" style="text-align:right">repeat warning</td><td>'+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.warn_repeat_every)+"</td></tr>"),e.crit_repeat_every>0&&(i+='<tr><td width="10%" style="text-align:right">repeat critical</td><td>'+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.crit_repeat_every)+"</td></tr>");var l="";return(e.delay_up_duration>0||e.delay_down_duration>0)&&0!==e.delay_multiplier&&e.delay_max_duration>0&&(e.delay_up_duration===e.delay_down_duration?l+="<small><br/>hysteresis "+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_up_duration,{space:" ",negative_suffix:""}):(l="<small><br/>hysteresis ",e.delay_up_duration>0&&(l+="on escalation <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_up_duration,{space:" ",negative_suffix:""})+"</code>, "),e.delay_down_duration>0&&(l+="on recovery <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_down_duration,{space:" ",negative_suffix:""})+"</code>, ")),1!==e.delay_multiplier&&(l+="multiplied by <code>"+e.delay_multiplier.toString()+"</code>",l+=", up to <code>"+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.delay_max_duration,{space:" ",negative_suffix:""})+"</code>"),l+="</small>"),i+='<tr><td width="10%" style="text-align:right">check every</td><td>'+Object(_domains_chart_utils_seconds4human__WEBPACK_IMPORTED_MODULE_4__.a)(e.update_every,{space:" ",negative_suffix:""})+"</td></tr>"+(!0===n?'<tr><td width="10%" style="text-align:right">execute</td><td><span style="font-family: monospace;">'+e.exec+"</span>"+l+"</td></tr>":"")+'<tr><td width="10%" style="text-align:right">source</td><td><span style="font-family: monospace; word-break: break-word;">'+e.source+"</span></td></tr></table></td></tr>"}function w(e){for(var t='<table class="table">',a=options.alarm_families[e],n=a.arr.length;n--;){t+=x(a.arr[n],!0)}t+="</table>",$("#alarm_all_"+e.toString()).html(t),enableTooltipsAndPopovers()}},serverDefault:_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b}))}function initializeDynamicDashboardWithData(e){if(null!==e){options.hostname=e.hostname,options.data=e,options.version=e.version,options.release_channel=e.release_channel,options.timezone=e.timezone,netdataDashboard.os=e.os,"undefined"!==typeof e.hosts&&(options.hosts=e.hosts),document.getElementById("netdataVersion").innerHTML=options.version,document.title=options.hostname+" netdata dashboard",e.charts_by_name={};var t,a=e.charts;for(t in a)if(a.hasOwnProperty(t)){var n=a[t];e.charts_by_name[n.name]=n}renderChartsAndMenu(e)}}window.clipboardCopy=function(e){clipboard.writeText(e)},window.clipboardCopyBadgeEmbed=function(e){clipboard.writeText('<embed src="'+e+'" type="image/svg+xml" height="20"/>')};var initializeConfig={url:null,custom_info:!0},loadDashboardInfo=Object(ramda__WEBPACK_IMPORTED_MODULE_0__.a)(ramda__WEBPACK_IMPORTED_MODULE_1__.a,(function(){return $.ajax({url:"".concat(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,"dashboard_info.js"),cache:!0,dataType:"script",xhrFields:{withCredentials:!0}}).fail((function(){alert("Cannot load required JS library: dashboard_info.js")}))}));function loadCustomDashboardInfo(e,t){$.ajax({url:e,cache:!0,dataType:"script",xhrFields:{withCredentials:!0}}).fail((function(){alert("Cannot load required JS library: ".concat(e))})).always((function(){$.extend(!0,netdataDashboard,customDashboard),t()}))}function initializeChartsAndCustomInfo(){loadDashboardInfo().then((function(){NETDATA.chartRegistry.downloadAll(initializeConfig.url,(function(e){null!==e&&(reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.c)({data:e})),!0===initializeConfig.custom_info&&"undefined"!==typeof e.custom_info&&""!==e.custom_info&&null===window.netdataSnapshotData?loadCustomDashboardInfo(_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b+e.custom_info,(function(){initializeDynamicDashboardWithData(e)})):initializeDynamicDashboardWithData(e))}))}))}function initializeDynamicDashboard(e){e&&(reduxStore=e,netdataPrepCallback(),initializeConfig.url=_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b),"undefined"!==typeof netdataCheckXSS&&!0===netdataCheckXSS?(document.getElementById("netdataXssModalServer").innerText=initializeConfig.url,$("#xssModal").modal("show")):initializeChartsAndCustomInfo()}function versionLog(e){document.getElementById("versionCheckLog").innerHTML=e}function versionsMatch(e,t){if(e==t)return!0;var a=e.split("."),n=t.split("."),r=parseInt(a[0].substring(1,2),10),o=parseInt(n[0].substring(1,2),10);return!(r<o)&&(r>o||!((r=parseInt(a[1],10))<(o=parseInt(n[1],10)))&&(r>o||(a=a[2].split("-"),n=n[2].split("-"),!((r=parseInt(a[0],10))<(o=parseInt(n[0],10)))&&(r>o||!((r=a.length>1?parseInt(a[1],10):0)<(o=n.length>1?parseInt(n[1],10):0))))))}function getGithubLatestVersion(e){versionLog("Downloading latest version id from github..."),$.ajax({url:"https://api.github.com/repos/netdata/netdata/releases/latest",async:!0,cache:!1}).done((function(t){versionLog("Latest stable version from github is "+(t=t.tag_name.replace(/(\r\n|\n|\r| |\t)/gm,""))),e(t)})).fail((function(){versionLog("Failed to download the latest stable version id from github!"),e(null)}))}function getGCSLatestVersion(e){versionLog("Downloading latest version id from GCS..."),$.ajax({url:"https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt",async:!0,cache:!1}).done((function(t){$.ajax({url:t.mediaLink,async:!0,cache:!1}).done((function(t){versionLog("Latest nightly version from GCS is "+(t=t.replace(/(\r\n|\n|\r| |\t)/gm,""))),e(t)})).fail((function(t,a,n){versionLog("Failed to download the latest nightly version id from GCS!"),e(null)}))})).fail((function(t,a,n){versionLog("Failed to download the latest nightly version from GCS!"),e(null)}))}function checkForUpdateByVersion(e,t){return"stable"===options.release_channel?getGithubLatestVersion((function(e){t(options.version,e)})):getGCSLatestVersion((function(e){t(options.version,e)})),null}function showPageFooter(){document.getElementById("footer").style.display="block"}function printPage(){window.NETDATA.parseDom(),!0===urlOptions.pan_and_zoom&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:urlOptions.after,before:urlOptions.before})),showPageFooter()}function jsonStringifyFn(e){return JSON.stringify(e,(function(e,t){return"function"===typeof t?t.toString():t}))}function jsonParseFn(str){return JSON.parse(str,(function(key,value){return"string"!=typeof value?value:"function"==value.substring(0,8)?eval("("+value+")"):value}))}window.xssModalDisableXss=function(){return NETDATA.xss.enabled=!1,NETDATA.xss.enabled_for_data=!1,initializeConfig.custom_info=!0,initializeChartsAndCustomInfo(),!1},window.xssModalKeepXss=function(){return NETDATA.xss.enabled=!0,NETDATA.xss.enabled_for_data=!0,initializeConfig.custom_info=!1,initializeChartsAndCustomInfo(),!1},window.notifyForUpdate=function(e){versionLog("<p>checking for updates...</p>");var t=Date.now();if("undefined"===typeof e||!0!==e){var a=loadLocalStorage("last_update_check");if(a="string"===typeof a?parseInt(a):0,t-a<288e5)return}checkForUpdateByVersion(e,(function(e,a){var n=!1;if(null===e)n=!1,versionLog('<p><big>Failed to get your netdata version!</big></p><p>You can always get the latest netdata from <a href="https://github.com/netdata/netdata" target="_blank">its github page</a>.</p>');else if(null===a)n=!1,versionLog('<p><big>Failed to get the latest netdata version.</big></p><p>You can always get the latest netdata from <a href="https://github.com/netdata/netdata" target="_blank">its github page</a>.</p>');else if(versionsMatch(e,a))n=!0,versionLog('<p><big>You already have the latest netdata!</big></p><p>No update yet?<br/>We probably need some motivation to keep going on!</p><p>If you haven\'t already, <a href="https://github.com/netdata/netdata" target="_blank">give netdata a <b><i class="fas fa-star"></i></b> at its github page</a>.</p>');else{n=!0;versionLog("<p><big><strong>New version of netdata available!</strong></big></p><p>Latest version: <b><code>"+a+'</code></b></p><p><a href="https://learn.netdata.cloud/docs/agent/changelog/" target="_blank">Click here for the changes log</a> and<br/><a href="https://github.com/netdata/netdata/tree/master/packaging/installer/UPDATE.md" target="_blank">click here for directions on updating</a> your netdata installation.</p><p>We suggest to review the changes log for new features you may be interested, or important bug fixes you may need.<br/>Keeping your netdata updated is generally a good idea.</p>')}n&&saveLocalStorage("last_update_check",t.toString())}))},window.printPreflight=function(){var e=document.location.origin.toString()+document.location.pathname.toString()+document.location.search.toString()+urlOptions.genHash()+";mode=print",t=90*screen.height/100;window.open(e,"","width="+990..toString()+",height="+t.toString()+",menubar=no,toolbar=no,personalbar=no,location=no,resizable=no,scrollbars=yes,status=no,chrome=yes,centerscreen=yes,attention=yes,dialog=yes"),$("#printPreflightModal").modal("hide")};var snapshotOptions={bytes_per_chart:2048,compressionDefault:"pako.deflate.base64",compressions:{none:{bytes_per_point_memory:5.2,bytes_per_point_disk:5.6,compress:function(e){return e},compressed_length:function(e){return e.length},uncompress:function(e){return e}},"pako.deflate.base64":{bytes_per_point_memory:1.8,bytes_per_point_disk:1.9,compress:function(e){return btoa(pako.deflate(e,{to:"string"}))},compressed_length:function(e){return e.length},uncompress:function(e){return pako.inflate(atob(e),{to:"string"})}},"pako.deflate":{bytes_per_point_memory:1.4,bytes_per_point_disk:3.2,compress:function(e){return pako.deflate(e,{to:"string"})},compressed_length:function(e){return e.length},uncompress:function(e){return pako.inflate(e,{to:"string"})}},"lzstring.utf16":{bytes_per_point_memory:1.7,bytes_per_point_disk:2.6,compress:function(e){return LZString.compressToUTF16(e)},compressed_length:function(e){return 2*e.length},uncompress:function(e){return LZString.decompressFromUTF16(e)}},"lzstring.base64":{bytes_per_point_memory:2.1,bytes_per_point_disk:2.3,compress:function(e){return LZString.compressToBase64(e)},compressed_length:function(e){return e.length},uncompress:function(e){return LZString.decompressFromBase64(e)}},"lzstring.uri":{bytes_per_point_memory:2.1,bytes_per_point_disk:2.3,compress:function(e){return LZString.compressToEncodedURIComponent(e)},compressed_length:function(e){return e.length},uncompress:function(e){return LZString.decompressFromEncodedURIComponent(e)}}}};function loadSnapshotModalLog(e,t){document.getElementById("loadSnapshotStatus").className="alert alert-"+e,document.getElementById("loadSnapshotStatus").innerHTML=t}var tmpSnapshotData=null;function loadSnapshotPreflightFile(e){var t=NETDATA.xss.string(e.name),a=new FileReader;a.onload=function(e){document.getElementById("loadSnapshotFilename").innerHTML=t;var a=null;try{a=NETDATA.xss.checkAlways("snapshot",JSON.parse(e.target.result),/^(snapshot\.info|snapshot\.data)$/);var n=new Date(a.after_ms),r=new Date(a.before_ms);"undefined"===typeof a.charts_ok&&(a.charts_ok="unknown"),"undefined"===typeof a.charts_failed&&(a.charts_failed=0),"undefined"===typeof a.compression&&(a.compression="none"),"undefined"===typeof a.data_size&&(a.data_size=0),document.getElementById("loadSnapshotFilename").innerHTML="<code>"+t+"</code>",document.getElementById("loadSnapshotHostname").innerHTML="<b>"+a.hostname+"</b>, netdata version: <b>"+a.netdata_version.toString()+"</b>",document.getElementById("loadSnapshotURL").innerHTML=a.url,document.getElementById("loadSnapshotCharts").innerHTML=a.charts.charts_count.toString()+" charts, "+a.charts.dimensions_count.toString()+" dimensions, "+a.data_points.toString()+" points per dimension, "+Math.round(a.duration_ms/a.data_points).toString()+" ms per point",document.getElementById("loadSnapshotInfo").innerHTML="version: <b>"+a.snapshot_version.toString()+"</b>, includes <b>"+a.charts_ok.toString()+"</b> unique chart data queries "+(a.charts_failed>0?"<b>"+a.charts_failed.toString()+"</b> failed":"").toString()+", compressed with <code>"+a.compression.toString()+"</code>, data size "+(Math.round(100*a.data_size/1024/1024)/100).toString()+" MB",document.getElementById("loadSnapshotTimeRange").innerHTML="<b>"+localeDateString(n)+" "+localeTimeString(n)+"</b> to <b>"+localeDateString(r)+" "+localeTimeString(r)+"</b>",document.getElementById("loadSnapshotComments").innerHTML=(a.comments?a.comments:"").toString(),loadSnapshotModalLog("success","File loaded, click <b>Import</b> to render it!"),$("#loadSnapshotImport").removeClass("disabled"),tmpSnapshotData=a}catch(e){console.log(e),document.getElementById("loadSnapshotStatus").className="alert alert-danger",document.getElementById("loadSnapshotStatus").innerHTML="Failed to parse this file!",$("#loadSnapshotImport").addClass("disabled")}},a.readAsText(e)}function loadSnapshotPreflightEmpty(){document.getElementById("loadSnapshotFilename").innerHTML="",document.getElementById("loadSnapshotHostname").innerHTML="",document.getElementById("loadSnapshotURL").innerHTML="",document.getElementById("loadSnapshotCharts").innerHTML="",document.getElementById("loadSnapshotInfo").innerHTML="",document.getElementById("loadSnapshotTimeRange").innerHTML="",document.getElementById("loadSnapshotComments").innerHTML="",loadSnapshotModalLog("success","Browse for a snapshot file (or drag it and drop it here), then click <b>Import</b> to render it."),$("#loadSnapshotImport").addClass("disabled")}window.loadSnapshot=function(){if($("#loadSnapshotImport").addClass("disabled"),null===tmpSnapshotData)return loadSnapshotPreflightEmpty(),void loadSnapshotModalLog("danger","no data have been loaded");loadPako((function(){loadLzString((function(){if(loadSnapshotModalLog("info","Please wait, activating snapshot..."),$("#loadSnapshotModal").modal("hide"),netdataShowAlarms=!1,netdataRegistry=!1,netdataServer=tmpSnapshotData.server,document.getElementById("charts_div").innerHTML="",document.getElementById("sidebar").innerHTML="","undefined"!==typeof tmpSnapshotData.hash?urlOptions.hash=tmpSnapshotData.hash:urlOptions.hash="#","undefined"!==typeof tmpSnapshotData.info){var e=jsonParseFn(tmpSnapshotData.info);"undefined"!==typeof e.menu&&(netdataDashboard.menu=e.menu),"undefined"!==typeof e.submenu&&(netdataDashboard.submenu=e.submenu),"undefined"!==typeof e.context&&(netdataDashboard.context=e.context)}"string"!==typeof tmpSnapshotData.compression&&(tmpSnapshotData.compression="none"),"undefined"===typeof snapshotOptions.compressions[tmpSnapshotData.compression]&&(alert("unknown compression method: "+tmpSnapshotData.compression),tmpSnapshotData.compression="none"),tmpSnapshotData.uncompress=snapshotOptions.compressions[tmpSnapshotData.compression].uncompress,window.NETDATA.parseDom(),reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.g)({snapshot:tmpSnapshotData})),window.netdataSnapshotData=tmpSnapshotData,urlOptions.after=tmpSnapshotData.after_ms,urlOptions.before=tmpSnapshotData.before_ms,"undefined"!==typeof tmpSnapshotData.highlight_after_ms&&null!==tmpSnapshotData.highlight_after_ms&&tmpSnapshotData.highlight_after_ms>0&&"undefined"!==typeof tmpSnapshotData.highlight_before_ms&&null!==tmpSnapshotData.highlight_before_ms&&tmpSnapshotData.highlight_before_ms>0?(urlOptions.highlight_after=tmpSnapshotData.highlight_after_ms,urlOptions.highlight_before=tmpSnapshotData.highlight_before_ms,urlOptions.highlight=!0):(urlOptions.highlight_after=0,urlOptions.highlight_before=0,urlOptions.highlight=!1),netdataCheckXSS=!1,NETDATA.xss.enabled=!0,NETDATA.xss.enabled_for_data=!0,loadSnapshotPreflightEmpty(),initializeDynamicDashboard()}))}))};var loadSnapshotDragAndDropInitialized=!1;function loadSnapshotDragAndDropSetup(){!1===loadSnapshotDragAndDropInitialized&&(loadSnapshotDragAndDropInitialized=!0,$("#loadSnapshotDragAndDrop").on("drag dragstart dragend dragover dragenter dragleave drop",(function(e){e.preventDefault(),e.stopPropagation()})).on("drop",(function(e){e.originalEvent.dataTransfer.files.length?loadSnapshotPreflightFile(e.originalEvent.dataTransfer.files.item(0)):(loadSnapshotPreflightEmpty(),loadSnapshotModalLog("danger","No file selected"))})))}window.loadSnapshotPreflight=function(){var e=document.getElementById("loadSnapshotSelectFiles").files;if(!e.length)return loadSnapshotPreflightEmpty(),void loadSnapshotModalLog("danger","No file selected");loadSnapshotModalLog("info","Loading file..."),loadSnapshotPreflightFile(e.item(0))};var saveSnapshotStop=!1;function saveSnapshotCancel(){reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.f)()),saveSnapshotStop=!0}var saveSnapshotModalInitialized=!1;function saveSnapshotModalSetup(){!1===saveSnapshotModalInitialized&&(saveSnapshotModalInitialized=!0,$("#saveSnapshotModal").on("hide.bs.modal",saveSnapshotCancel).on("show.bs.modal",saveSnapshotModalInit).on("shown.bs.modal",(function(){$("#saveSnapshotResolutionSlider").find(".slider-handle:first").attr("tabindex",1),document.getElementById("saveSnapshotComments").focus()})))}function saveSnapshotModalLog(e,t){document.getElementById("saveSnapshotStatus").className="alert alert-"+e,document.getElementById("saveSnapshotStatus").innerHTML=t}function saveSnapshotModalShowExpectedSize(){var e=Math.round(saveSnapshotViewDuration/saveSnapshotSelectedSecondsPerPoint),t="info",a="A moderate snapshot.",n=Math.round(10*(options.data.charts_count*snapshotOptions.bytes_per_chart+options.data.dimensions_count*e*snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_disk)/1024/1024)/10,r=Math.round(10*(options.data.charts_count*snapshotOptions.bytes_per_chart+options.data.dimensions_count*e*snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_memory)/1024/1024)/10;n<10&&(t="success",a="A nice small snapshot!"),n>50&&(t="warning",a="Will stress your browser..."),n>100&&(t="danger",a="Hm... good luck..."),saveSnapshotModalLog(t,"The snapshot will have "+e.toString()+" points per dimension. Expected size on disk "+n+" MB, at browser memory "+r+" MB.<br/>"+a)}var saveSnapshotCompression=snapshotOptions.compressionDefault;function saveSnapshotSetCompression(e){saveSnapshotCompression=e,document.getElementById("saveSnapshotCompressionName").innerHTML=saveSnapshotCompression,saveSnapshotModalShowExpectedSize()}var saveSnapshotSlider=null,saveSnapshotSelectedSecondsPerPoint=1,saveSnapshotViewDuration=1,browser_timezone;function saveSnapshotModalInit(){$("#saveSnapshotModalProgressSection").hide(),$("#saveSnapshotResolutionRadio").show(),saveSnapshotModalLog("info","Select resolution and click <b>Save</b>"),$("#saveSnapshotExport").removeClass("disabled"),loadBootstrapSlider((function(){var e=reduxStore.getState();saveSnapshotViewDuration=-Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.i)(e);var t=Math.round(Date.now()-1e3*saveSnapshotViewDuration),a=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.m)(e);Boolean(a)&&(saveSnapshotViewDuration=Math.round((a.before-a.after)/1e3),t=a.after);var n=new Date(t),r=n.getFullYear()+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getMonth()+1)+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getDate())+"-"+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getHours())+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getMinutes())+Object(_utils_units_conversion__WEBPACK_IMPORTED_MODULE_5__.b)(n.getSeconds());document.getElementById("saveSnapshotFilename").value="netdata-"+options.hostname.toString()+"-"+r.toString()+"-"+saveSnapshotViewDuration.toString()+".snapshot",saveSnapshotSetCompression(saveSnapshotCompression);var o=options.update_every,i=Math.round(saveSnapshotViewDuration/100);Boolean(a)&&(i=Math.round(saveSnapshotViewDuration/50));var s=Math.round(saveSnapshotViewDuration/Math.round($(document.getElementById("charts_div")).width()/2));i<10&&(i=10),i<o&&(i=o),s<o&&(s=o),s>i&&(s=i),null!==saveSnapshotSlider&&saveSnapshotSlider.destroy(),saveSnapshotSlider=new Slider("#saveSnapshotResolutionSlider",{ticks:[o,s,i],min:o,max:i,step:options.update_every,value:s,scale:i>100?"logarithmic":"linear",tooltip:"always",formatter:function(e){e<1&&(e=1),e<options.data.update_every&&(e=options.data.update_every),saveSnapshotSelectedSecondsPerPoint=e,saveSnapshotModalShowExpectedSize();var t=" seconds ";return 1===e&&(t=" second "),e+t+"per point"+(e===options.data.update_every?", server default":"").toString()}})}))}window.saveSnapshot=function(){loadPako((function(){loadLzString((function(){saveSnapshotStop=!1,$("#saveSnapshotModalProgressSection").show(),$("#saveSnapshotResolutionRadio").hide(),$("#saveSnapshotExport").addClass("disabled");var e=document.getElementById("saveSnapshotFilename").value;saveSnapshotModalLog("info","Generating snapshot as <code>"+e.toString()+"</code>");var t=document.getElementById("saveSnapshotModalProgressBar"),a=document.getElementById("saveSnapshotModalProgressBarText");options.data.charts_by_name=null;var n=reduxStore.getState(),r=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.i)(n),o={hostname:options.hostname,server:_utils_server_detection__WEBPACK_IMPORTED_MODULE_9__.b,netdata_version:options.data.version,snapshot_version:1,after_ms:Date.now()+1e3*r,before_ms:Date.now(),highlight_after_ms:urlOptions.highlight_after,highlight_before_ms:urlOptions.highlight_before,duration_ms:1e3*options.duration,update_every_ms:1e3*options.update_every,data_points:0,url:(null!==urlOptions.server?urlOptions.server:document.location.origin.toString()+document.location.pathname.toString()+document.location.search.toString()).toString(),comments:document.getElementById("saveSnapshotComments").value.toString(),hash:urlOptions.hash,charts:options.data,info:jsonStringifyFn({menu:netdataDashboard.menu,submenu:netdataDashboard.submenu,context:netdataDashboard.context}),charts_ok:0,charts_failed:0,compression:saveSnapshotCompression,data_size:0,data:{}};"undefined"===typeof snapshotOptions.compressions[o.compression]&&(alert("unknown compression method: "+o.compression),o.compression="none");var i=snapshotOptions.compressions[o.compression].compress,s=snapshotOptions.compressions[o.compression].compressed_length;function l(e){var t=e.data,a=e.chartDataUniqueID;if(null===t)return 0;var n=JSON.stringify(t),r=i(n);return o.data[a]=r,s(r)}var c=Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.m)(n),u=!1;c?(o.after_ms=c.after,o.before_ms=c.before):(reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:o.after_ms,before:o.before_ms})),u=!0),o.duration_ms=o.before_ms-o.after_ms,o.data_points=Math.round((o.before_ms-o.after_ms)/(1e3*saveSnapshotSelectedSecondsPerPoint)),saveSnapshotModalLog("info","Generating snapshot with "+o.data_points.toString()+" data points per dimension..."),reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.e)({charts:o.charts,dataPoints:o.data_points})),window.saveSnapshotRestore=function(){$("#saveSnapshotModal").modal("hide"),$(t).css("width","0%").attr("aria-valuenow",0),a.innerText="0%",reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.f)()),reduxStore.dispatch(Object(_domains_chart_actions__WEBPACK_IMPORTED_MODULE_7__.j)()),u&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.j)()),$("#saveSnapshotExport").removeClass("disabled")};var d=0,h=" Resolution: <b>"+saveSnapshotSelectedSecondsPerPoint.toString()+(1===saveSnapshotSelectedSecondsPerPoint?" second ":" seconds ").toString()+"per point</b>.";window.chartUpdated=function(n){var r=n.chart,i=n.chartDataUniqueID,s=n.data;!0===saveSnapshotStop&&(saveSnapshotModalLog("info","Cancelled!"),saveSnapshotRestore());var c=reduxStore.getState(),u=Object(_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__.b)(c),p=Object(_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__.e)(c),f=Object(_domains_chart_selectors__WEBPACK_IMPORTED_MODULE_8__.d)(c),g=(p+f)/u*100;$(t).css("width",g+"%").attr("aria-valuenow",g),a.innerText=Math.round(g).toString()+"%, "+(r||s.id),d+=l({data:s,chartDataUniqueID:i}),saveSnapshotModalLog(f?"danger":"info","Generated snapshot data size <b>"+(Math.round(100*d/1024/1024)/100).toString()+" MB</b>. "+(f?f.toString()+" charts have failed to be downloaded":"").toString()+h),window.saveData=o,p+f===u&&(o.charts_ok=p,o.charts_failed=f,o.data_size=d,saveObjectToClient(o,e),f>0&&alert("".concat(f," failed to be downloaded")),saveSnapshotRestore(),o=null)}}))}))};try{browser_timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){console.log("failed to detect browser timezone: "+e.toString()),browser_timezone="cannot-detect-it"}var getOption=function(e){var t=reduxStore.getState();return Object(_domains_global_selectors__WEBPACK_IMPORTED_MODULE_3__.b)(e)(t)};function dashboardSettingsSetup(){var e=function(){var e=function(e){var t=$("#"+e);t.prop("checked")!==getOption(e)&&t.bootstrapToggle(getOption(e)?"on":"off")};e("stop_updates_when_focus_is_lost"),e("eliminate_zero_dimensions"),e("destroy_on_hide"),e("async_on_scroll"),e("parallel_refresher"),e("concurrent_refreshes"),e("sync_selection"),e("legend_right"),$("#"+"netdata_theme_control").bootstrapToggle("slate"===netdataTheme?"on":"off"),e("show_help"),e("pan_and_zoom_data_padding"),e("smooth_plot"),function(e){var t=$("#"+e);t.prop("checked")!==("auto"===getOption("units"))&&t.bootstrapToggle("auto"===getOption("units")?"on":"off"),!0===t.prop("checked")?($("#settingsLocaleTempRow").show(),$("#settingsLocaleTimeRow").show()):($("#settingsLocaleTempRow").hide(),$("#settingsLocaleTimeRow").hide())}("units_conversion"),function(e){var t=$("#"+e);t.prop("checked")!==("celsius"===getOption("temperature"))&&t.bootstrapToggle("celsius"===getOption("temperature")?"on":"off")}("units_temp"),e("seconds_as_time"),!1===getOption("parallel_refresher")?$("#concurrent_refreshes_row").hide():$("#concurrent_refreshes_row").show()};e(),$("#eliminate_zero_dimensions").change((function(){setOption("eliminate_zero_dimensions",$(this).prop("checked"))})),$("#destroy_on_hide").change((function(){setOption("destroy_on_hide",$(this).prop("checked"))})),$("#async_on_scroll").change((function(){setOption("async_on_scroll",$(this).prop("checked"))})),$("#parallel_refresher").change((function(){setOption("parallel_refresher",$(this).prop("checked"))})),$("#concurrent_refreshes").change((function(){setOption("concurrent_refreshes",$(this).prop("checked"))})),$("#sync_selection").change((function(){setOption("sync_selection",$(this).prop("checked")),netdataReload()})),$("#stop_updates_when_focus_is_lost").change((function(){urlOptions.update_always=!$(this).prop("checked"),urlOptions.hashUpdate(),setOption("stop_updates_when_focus_is_lost",!urlOptions.update_always)})),$("#smooth_plot").change((function(){setOption("smooth_plot",$(this).prop("checked"))})),$("#pan_and_zoom_data_padding").change((function(){setOption("pan_and_zoom_data_padding",$(this).prop("checked"))})),$("#seconds_as_time").change((function(){setOption("seconds_as_time",$(this).prop("checked"))})),$("#units_conversion").change((function(){setOption("units",$(this).prop("checked")?"auto":"original"),e()})),$("#units_temp").change((function(){setOption("temperature",$(this).prop("checked")?"celsius":"fahrenheit")})),$("#legend_right").change((function(){setOption("legend_right",$(this).prop("checked")),netdataReload()})),$("#show_help").change((function(){urlOptions.help=$(this).prop("checked"),urlOptions.hashUpdate(),setOption("show_help",urlOptions.help),netdataReload()})),$("#netdata_theme_control").change((function(){urlOptions.theme=$(this).prop("checked")?"slate":"white",urlOptions.hashUpdate(),setTheme(urlOptions.theme)&&netdataReload()}))}var CHART_DIV_ID_PREFIX="chart_",CHART_DIV_OFFSET=-50;function scrollDashboardTo(){if(null!==window.netdataSnapshotData&&"undefined"!==typeof window.netdataSnapshotData.hash)scrollToId(window.netdataSnapshotData.hash.replace("#",""));else if(scrollToId(urlOptions.hash.replace("#","")),null!==urlOptions.chart){var e=document.getElementById("".concat(CHART_DIV_ID_PREFIX).concat(Object(_utils_name_2_id__WEBPACK_IMPORTED_MODULE_10__.a)(urlOptions.chart)));if(e){var t=e.offsetTop+CHART_DIV_OFFSET;document.querySelector("html").scrollTop=t}}}var modalHiddenCallback=null;function enableTooltipsAndPopovers(){$('[data-toggle="tooltip"]').tooltip({animated:"fade",trigger:"hover",html:!0,delay:{show:500,hide:0},container:"body"}),$('[data-toggle="popover"]').popover()}window.scrollToChartAfterHidingModal=function(e,t,a){modalHiddenCallback=function(){if("string"===typeof e){var n=document.getElementById("".concat(CHART_DIV_ID_PREFIX).concat(Object(_utils_name_2_id__WEBPACK_IMPORTED_MODULE_10__.a)(e)));if(n){var r=n.offsetTop+CHART_DIV_OFFSET;document.querySelector("html").scrollTop=r}}if(["WARNING","CRITICAL"].includes(a)){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:t-12e4,before:t+12e4}))}}};var runOnceOnDashboardLastRun=0;function runOnceOnDashboardWithjQuery(){if(0!==runOnceOnDashboardLastRun)return scrollDashboardTo(),$(document.body).scrollspy("refresh"),void $(document.body).scrollspy("process");runOnceOnDashboardLastRun=Date.now();var e=0,t=0,a=!1,n=!1,r=$(window).height()/3;$(".modal").on("show.bs.modal",(function(){0===t&&(e=window.scrollY,$("body").css({overflow:"hidden",position:"fixed",top:-e}),a=!0,null===NETDATA.options.pauseCallback?(NETDATA.pause((function(){})),n=!0):n=!1),t++})).on("hide.bs.modal",(function(){--t<=0&&(t=0,$("body").css({overflow:"",position:"",top:""}),$("html, body").animate({scrollTop:e},0),!0===n&&(NETDATA.unpause(),n=!1),$(document.body).scrollspy("process"))})).on("hidden.bs.modal",(function(){0===t&&(a=!1),"function"===typeof modalHiddenCallback&&modalHiddenCallback(),modalHiddenCallback=null})),$("#sidebar").affix({offset:{top:0,bottom:0}}).on("affixed.bs.affix",(function(){$(this).removeAttr("style")})).on("affix-top.bs.affix",(function(){if(a)return!1})).on("activate.bs.scrollspy",(function(e){if(!1===a){var t=$(e.target).find("a").attr("href");"string"===typeof t&&"#"===t.substring(0,1)&&!1===urlOptions.hash.startsWith(t+"_submenu_")&&(urlOptions.hash=t,urlOptions.hashUpdate())}})),Ps.initialize(document.getElementById("sidebar"),{wheelSpeed:.5,wheelPropagation:!0,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,suppressScrollX:!0,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,theme:"default"}),r>250&&(r=250),r<75&&(r=75),document.body.setAttribute("data-offset",r),scrollDashboardTo(),$(document.body).scrollspy({target:"#sidebar",offset:r}),$("#deleteRegistryModal").on("hidden.bs.modal",(function(){deleteRegistryGuid=null})),$("#updateModal").on("show.bs.modal",(function(){versionLog("checking, please wait...")})).on("shown.bs.modal",(function(){notifyForUpdate(!0)})),$("#alarmsModal").on("shown.bs.modal",(function(){alarmsUpdateModal()})).on("hidden.bs.modal",(function(){document.getElementById("alarms_active").innerHTML=document.getElementById("alarms_all").innerHTML=document.getElementById("alarms_log").innerHTML="loading..."})),dashboardSettingsSetup(),loadSnapshotDragAndDropSetup(),saveSnapshotModalSetup(),showPageFooter(),$.fn.shorten=function(e){var t={showChars:750,minHideChars:10,ellipsesText:"...",moreText:'<i class="fas fa-expand"></i> show more information',lessText:'<i class="fas fa-compress"></i> show less information',onLess:function(){NETDATA.onscroll()},onMore:function(){NETDATA.onscroll()},errMsg:null,force:!1};return e&&$.extend(t,e),!($(this).data("jquery.shorten")&&!t.force)&&($(this).data("jquery.shorten",!0),$(document).off("click",".morelink"),$(document).on({click:function(){var e=$(this);return e.hasClass("less")?(e.removeClass("less"),e.html(t.moreText),e.parent().prev().animate({height:"0%"},0,(function(){e.parent().prev().prev().show()})).hide(0,(function(){t.onLess()}))):(e.addClass("less"),e.html(t.lessText),e.parent().prev().animate({height:"100%"},0,(function(){e.parent().prev().prev().hide()})).show(0,(function(){t.onMore()}))),!1}},".morelink"),this.each((function(){var e=$(this),a=e.html();if(e.text().length>t.showChars+t.minHideChars){var n=a.substr(0,t.showChars);if(n.indexOf("<")>=0){for(var r=!1,o="",i=0,s=[],l=null,c=0,u=0;u<=t.showChars;c++)if("<"!==a[c]||r||(r=!0,"/"===(l=a.substring(c+1,a.indexOf(">",c)))[0]?l!=="/"+s[0]?t.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":s.shift():"br"!==l.toLowerCase()&&s.unshift(l)),r&&">"===a[c]&&(r=!1),r)o+=a.charAt(c);else if(u++,i<=t.showChars)o+=a.charAt(c),i++;else if(s.length>0){for(var d=0;d<s.length;d++)o+="</"+s[d]+">";break}n=$("<div/>").html(o+'<span class="ellip">'+t.ellipsesText+"</span>").html()}else n+=t.ellipsesText;var h='<div class="shortcontent">'+n+'</div><div class="allcontent">'+a+'</div><span><a href="javascript://nop/" class="morelink">'+t.moreText+"</a></span>";e.html(h),e.find(".allcontent").hide(),$(".shortcontent p:last",e).css("margin-bottom",0)}})))}}function finalizePage(){urlOptions.after<0?reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.q)({after:urlOptions.after})):!0===urlOptions.pan_and_zoom&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:urlOptions.after,before:urlOptions.before})),NETDATA.parseDom(),NETDATA.unpause(),runOnceOnDashboardWithjQuery(),$(".shorten").shorten(),enableTooltipsAndPopovers(),_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__.a?(NETDATA.options.current.retries_on_data_failures=60,setTimeout((function(){var e,t,a,n,r,o;e=window,t=document,a="script",n="ga",e.GoogleAnalyticsObject=n,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,r=t.createElement(a),o=t.getElementsByTagName(a)[0],r.async=1,r.src="https://www.google-analytics.com/analytics.js",o.parentNode.insertBefore(r,o),ga("create","UA-64295674-3","auto"),ga("send","pageview","/demosite/"+window.location.host)}),2e3)):notifyForUpdate(),!0===urlOptions.show_alarms&&setTimeout((function(){$("#alarmsModal").modal("show")}),1e3),NETDATA.onresizeCallback=function(){Ps.update(document.getElementById("sidebar"))},NETDATA.onresizeCallback(),null!==window.netdataSnapshotData&&reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.s)({after:window.netdataSnapshotData.after_ms,before:window.netdataSnapshotData.before_ms}))}window.resetDashboardOptions=function(){reduxStore.dispatch(Object(_domains_global_actions__WEBPACK_IMPORTED_MODULE_2__.l)()),urlOptions.update_always=!1,urlOptions.help=!1,urlOptions.theme="slate",urlOptions.hashUpdate(),netdataReload()};var netdataPrepCallback=function(){_utils_is_demo__WEBPACK_IMPORTED_MODULE_14__.a?document.getElementById("masthead").style.display="block":!0===urlOptions.update_always&&setOption("stop_updates_when_focus_is_lost",!urlOptions.update_always)};window.selected_server_timezone=function(e,t){if(document.getElementById("timezone_error_message").innerHTML="","undefined"===typeof t)setOption("user_set_server_timezone",e),Object(_utils_date_time__WEBPACK_IMPORTED_MODULE_11__.a)(e)?($("#local_timezone").prop("checked")&&$("#local_timezone").bootstrapToggle("off"),setOption("timezone",e)):(setOption("timezone","default"),$("#local_timezone").prop("checked")||$("#local_timezone").bootstrapToggle("on"),document.getElementById("timezone_error_message").innerHTML="Ooops! That timezone was not accepted by your browser. Please open a github issue to help us fix it.",setOption("user_set_server_timezone",options.timezone));else if(!0===t)setOption("timezone","default");else{var a=getOption("user_set_server_timezone");"default"===a&&(setOption("user_set_server_timezone",options.timezone),a=options.timezone),Object(_utils_date_time__WEBPACK_IMPORTED_MODULE_11__.a)(a)?setOption("timezone",a):(setOption("timezone","default"),$("#local_timezone").prop("checked")||$("#local_timezone").bootstrapToggle("on"),document.getElementById("timezone_error_message").innerHTML='Sorry. The timezone "'+e.toString()+'" is not accepted by your browser. Please select one from the list.',setOption("user_set_server_timezone",options.timezone))}var n=getOption("timezone");return document.getElementById("current_timezone").innerText="default"===n?"unset, using browser default":n,!1};var netdataCallback=initializeDynamicDashboard;window.showSignInModal=function(){document.getElementById("sim-registry").innerHTML=getFromRegistry("registryServer"),$("#signInModal").modal("show")},window.explicitlySignIn=function(){$("#signInModal").modal("hide"),reduxStore.dispatch(Object(_domains_dashboard_actions__WEBPACK_IMPORTED_MODULE_6__.a)())}},256:function(e,t){},257:function(e,t,a){"use strict";var n=a(5),r=a(0),o=a.n(r),i=a(132),s=a(3),l=function(e){var t=e.userStatus,a=e.nodeStatus,n=e.date;return Object(r.useMemo)((function(){return function(e){var t=e.nodeStatus,a=e.userStatus;e.date;return{title:"Netdata Cloud connection status",text:{header:function(){return o.a.createElement(s.z,null,"This node is currently"," ",o.a.createElement(s.z,{strong:!0},"LIVE"===t?"Connected":"Not Connected")," to Netdata Cloud")},bullets:"NOT_LIVE"===t?[function(){return o.a.createElement(s.z,null,"To troubleshoot Netdata Cloud connection issues, please follow"," ",o.a.createElement(i.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim#troubleshooting"},"this guide"),".")}]:[],footer:function(){return o.a.createElement(s.z,null,"You are"," ",o.a.createElement(s.z,{strong:!0},"LOGGED_IN"===a?"Logged In":"EXPIRED_LOGIN"===a?"Logged out":"Not signed-up")," ","to Netdata Cloud")}},CTA1:{text:"Take me to Netdata Cloud"}}}({userStatus:t,nodeStatus:a,date:n})}),[t,a,n])},c=a(78),u=function(e){var t=e.title,a=e.text,n=e.CTA1,i=e.closeModal,l=e.onRefresh,u=e.isCTA1Disabled,d=Object(r.useCallback)((function(e){var t=e.link;i(),window.open(t,"_blank")}),[i]);return o.a.createElement(s.q,null,o.a.createElement(s.t,{width:180,background:"modalBackground"},o.a.createElement(s.v,null,o.a.createElement(s.k,{margin:[0]},t),o.a.createElement(s.s,{onClose:i})),o.a.createElement(s.r,null,o.a.createElement(s.j,{padding:[0,0,4,0],column:!0,gap:3},a.header({}),a.bullets.length>0&&o.a.createElement(s.j,{column:!0,gap:3},o.a.createElement(s.j,{column:!0,gap:1,as:"ul"},a.bullets.map((function(e,t){return"function"===typeof e?o.a.createElement("li",{key:t}," ",e()):o.a.createElement("li",{key:e},o.a.createElement(s.z,null,e))})))),a.footer())),o.a.createElement(s.u,null,o.a.createElement(s.a,{"data-testid":"cta1",margin:[0,2,0,0],width:{min:40}},o.a.createElement(c.a,{utmParameters:{content:"connection_to_cloud",campaign:"agent_nudge_to_cloud"}},(function(e){var t=e.link;return o.a.createElement(s.b,{"data-ga":"connection-to-cloud::click-ct1::ad",disabled:u,textTransform:"none","data-testid":"cta1-button",onClick:function(){return d({link:t})},width:"100%",label:n.text})}))),o.a.createElement(s.a,{"data-ga":"connection-to-cloud::click-check-now::ad",onClick:l,height:10,className:"btn btn-default","data-testid":"cta2-button",width:{min:40}},o.a.createElement(s.a,{as:s.z,sx:{fontWeight:"500",lineHeight:"25px"}},"Check Now")))))},d=a(27),h=a(124),p=a(9);t.a=function(){var e=Object(d.e)(p.P),t=Object(d.e)(p.u),a=Object(r.useState)(!1),i=Object(n.a)(a,2),c=i[0],f=i[1],g=l({userStatus:(null===e||void 0===e?void 0:e.userStatus)||"UNKNOWN",nodeStatus:(null===e||void 0===e?void 0:e.nodeLiveness)||"NOT_LIVE",date:""});Object(r.useEffect)((function(){document.documentElement.style.overflow=c?"hidden":"auto"}),[c]);var m=Object(r.useCallback)((function(){f(!0)}),[]),b=Object(r.useCallback)((function(){f(!1)}),[]),v=Object(h.b)();return t?o.a.createElement(s.j,{column:!0},o.a.createElement(s.x,{"data-ga":"connection-to-cloud::click-pill::ad","data-testid":"header-connection-to-cloud-button",onClick:m,flavour:"neutral"},"Connection to Cloud"),c&&o.a.createElement(u,Object.assign({},g,{isCTA1Disabled:"LIVE"!==(null===e||void 0===e?void 0:e.nodeLiveness),closeModal:b,onRefresh:v}))):null}},26:function(e,t,a){"use strict";a.d(t,"e",(function(){return n})),a.d(t,"c",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return i})),a.d(t,"d",(function(){return s}));var n="global",r="***",o=5e3,i="CLOUD_BASE_URL_DISABLED",s=["WARNING","ERROR","REMOVED","UNDEFINED","UNINITIALIZED","CLEAR","CRITICAL"]},276:function(e,t,a){var n,r,o;r=[],void 0===(o="function"===typeof(n=function(){var e=0,t={header:{title:{text:"",color:"#333333",fontSize:18,fontWeight:"bold",font:"arial"},subtitle:{text:"",color:"#666666",fontSize:14,fontWeight:"bold",font:"arial"},location:"top-center",titleSubtitlePadding:8},footer:{text:"",color:"#666666",fontSize:14,fontWeight:"bold",font:"arial",location:"left"},size:{canvasHeight:500,canvasWidth:500,pieInnerRadius:"0%",pieOuterRadius:null},data:{sortOrder:"none",ignoreSmallSegments:{enabled:!1,valueType:"percentage",value:null},smallSegmentGrouping:{enabled:!1,value:1,valueType:"percentage",label:"Other",color:"#cccccc"},content:[]},labels:{outer:{format:"label",hideWhenLessThanPercentage:null,pieDistance:30},inner:{format:"percentage",hideWhenLessThanPercentage:null},mainLabel:{color:"#333333",font:"arial",fontWeight:"normal",fontSize:10},percentage:{color:"#dddddd",font:"arial",fontWeight:"bold",fontSize:10,decimalPlaces:0},value:{color:"#cccc44",fontWeight:"bold",font:"arial",fontSize:10},lines:{enabled:!0,style:"curved",color:"segment"},truncation:{enabled:!1,truncateLength:30},formatter:null},effects:{load:{effect:"none",speed:1e3},pullOutSegmentOnClick:{effect:"none",speed:300,size:10},highlightSegmentOnMouseover:!1,highlightLuminosity:-.2},tooltips:{enabled:!1,type:"placeholder",string:"",placeholderParser:null,styles:{fadeInSpeed:250,backgroundColor:"#000000",backgroundOpacity:.5,color:"#efefef",borderRadius:2,font:"arial",fontWeight:"bold",fontSize:10,padding:4}},misc:{colors:{background:null,segments:["#2484c1","#65a620","#7b6888","#a05d56","#961a1a","#d8d23a","#e98125","#d0743c","#635222","#6ada6a","#0c6197","#7d9058","#207f33","#44b9b0","#bca44a","#e4a14b","#a3acb2","#8cc3e9","#69a6f9","#5b388f","#546e91","#8bde95","#d2ab58","#273c71","#98bf6e","#4daa4b","#98abc5","#cc1010","#31383b","#006391","#c2643f","#b0a474","#a5a39c","#a9c2bc","#22af8c","#7fcecf","#987ac6","#3d3b87","#b77b1c","#c9c2b6","#807ece","#8db27c","#be66a2","#9ed3c6","#00644b","#005064","#77979f","#77e079","#9c73ab","#1f79a7"],segmentStroke:"#ffffff"},gradient:{enabled:!1,percentage:95,color:"#000000"},canvasPadding:{top:5,right:5,bottom:5,left:5},pieCenterOffset:{x:0,y:0},cssPrefix:null},callbacks:{onload:null,onMouseoverSegment:null,onMouseoutSegment:null,onClickSegment:null}},a=function(e){var t=e.cssPrefix,a=e.element,r=e.options;if(!window.d3||!window.d3.hasOwnProperty("version"))return console.error("d3pie error: d3 is not available"),!1;if(!(a instanceof HTMLElement||a instanceof SVGElement))return console.error("d3pie error: the first d3pie() param must be a valid DOM element (not jQuery) or a ID string."),!1;if(!/[a-zA-Z][a-zA-Z0-9_-]*$/.test(t))return console.error("d3pie error: invalid options.misc.cssPrefix"),!1;if(!n.isArray(r.data.content))return console.error("d3pie error: invalid config structure: missing data.content property."),!1;if(0===r.data.content.length)return console.error("d3pie error: no data supplied."),!1;for(var o=[],i=0;i<r.data.content.length;i++)"number"!==typeof r.data.content[i].value||isNaN(r.data.content[i].value)?console.log("not valid: ",r.data.content[i]):r.data.content[i].value<=0?console.log("not valid - should have positive value: ",r.data.content[i]):o.push(r.data.content[i]);return e.options.data.content=o,!0},n={addSVGSpace:function(e){var t=e.element,a=e.options.size.canvasWidth,n=e.options.size.canvasHeight,r=e.options.misc.colors.background,o=d3.select(t).append("svg:svg").attr("width",a).attr("height",n);return"transparent"!==r&&o.style("background-color",(function(){return r})),o},shuffleArray:function(e){for(var t,a,n=e.length;0!==n;)a=Math.floor(Math.random()*n),t=e[n-=1],e[n]=e[a],e[a]=t;return e},processObj:function(e,t,a){return"string"===typeof t?n.processObj(e,t.split("."),a):1===t.length&&void 0!==a?(e[t[0]]=a,e[t[0]]):0===t.length?e:n.processObj(e[t[0]],t.slice(1),a)},getDimensions:function(e){"string"===typeof e&&(e=document.getElementById(e));var t=0,a=0;if(e){var n=e.getBBox();t=n.width,a=n.height}else console.log("error: getDimensions() "+id+" not found.");return{w:t,h:a}},rectIntersect:function(e,t){return!(t.x>e.x+e.w||t.x+t.w<e.x||t.y+t.h<e.y||t.y>e.y+e.h)},getColorShade:function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var a="#",n=0;n<3;n++){var r=parseInt(e.substr(2*n,2),16);a+=("00"+(r=Math.round(Math.min(Math.max(0,r+r*t),255)).toString(16))).substr(r.length)}return a},initSegmentColors:function(e){for(var t=e.options.data.content,a=e.options.misc.colors.segments,n=[],r=0;r<t.length;r++)t[r].hasOwnProperty("color")?n.push(t[r].color):n.push(a[r]);return n},applySmallSegmentGrouping:function(e,t){var a;"percentage"===t.valueType&&(a=o.getTotalPieSize(e));for(var n=[],r=[],i=0,s=0;s<e.length;s++)if("percentage"===t.valueType){if(e[s].value/a*100<=t.value){r.push(e[s]),i+=e[s].value;continue}e[s].isGrouped=!1,n.push(e[s])}else{if(e[s].value<=t.value){r.push(e[s]),i+=e[s].value;continue}e[s].isGrouped=!1,n.push(e[s])}return r.length&&n.push({color:t.color,label:t.label,value:i,isGrouped:!0,groupedData:r}),n},showPoint:function(e,t,a){e.append("circle").attr("cx",t).attr("cy",a).attr("r",2).style("fill","black")},isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)}},r=function e(){var t,a,n,r,o,i,s=arguments[0]||{},l=1,c=arguments.length,u=!1,d=Object.prototype.toString,h=Object.prototype.hasOwnProperty,p={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},f={isFunction:function(e){return"function"===f.type(e)},isArray:Array.isArray||function(e){return"array"===f.type(e)},isWindow:function(e){return null!==e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null===e?String(e):p[d.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==f.type(e)||e.nodeType)return!1;try{if(e.constructor&&!h.call(e,"constructor")&&!h.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(a){return!1}var t;for(t in e);return void 0===t||h.call(e,t)}};for("boolean"===typeof s&&(u=s,s=arguments[1]||{},l=2),"object"===typeof s||f.isFunction(s)||(s={}),c===l&&(s=this,--l);l<c;l++)if(null!==(t=arguments[l]))for(a in t)n=s[a],s!==(r=t[a])&&(u&&r&&(f.isPlainObject(r)||(o=f.isArray(r)))?(o?(o=!1,i=n&&f.isArray(n)?n:[]):i=n&&f.isPlainObject(n)?n:{},s[a]=e(u,i,r)):void 0!==r&&(s[a]=r));return s},o={toRadians:function(e){return e*(Math.PI/180)},toDegrees:function(e){return e*(180/Math.PI)},computePieRadius:function(e){var t=e.options.size,a=e.options.misc.canvasPadding,n=t.canvasWidth-a.left-a.right,r=t.canvasHeight-a.top-a.bottom;"pie-center"!==e.options.header.location&&(r-=e.textComponents.headerHeight),e.textComponents.footer.exists&&(r-=e.textComponents.footer.h);var o,i,s=(n<(r=r<0?0:r)?n:r)/3;if(null!==t.pieOuterRadius)if(/%/.test(t.pieOuterRadius)){i=(i=(i=parseInt(t.pieOuterRadius.replace(/[\D]/,""),10))>99?99:i)<0?0:i;var l=n<r?n:r;if("none"!==e.options.labels.outer.format){var c=2*parseInt(e.options.labels.outer.pieDistance,10);l-c>0&&(l-=c)}s=Math.floor(l/100*i)/2}else s=parseInt(t.pieOuterRadius,10);/%/.test(t.pieInnerRadius)?(i=(i=(i=parseInt(t.pieInnerRadius.replace(/[\D]/,""),10))>99?99:i)<0?0:i,o=Math.floor(s/100*i)):o=parseInt(t.pieInnerRadius,10),e.innerRadius=o,e.outerRadius=s},getTotalPieSize:function(e){for(var t=0,a=0;a<e.length;a++)t+=e[a].value;return t},sortPieData:function(e){var t=e.options.data.content;switch(e.options.data.sortOrder){case"none":break;case"random":t=n.shuffleArray(t);break;case"value-asc":t.sort((function(e,t){return e.value<t.value?-1:1}));break;case"value-desc":t.sort((function(e,t){return e.value<t.value?1:-1}));break;case"label-asc":t.sort((function(e,t){return e.label.toLowerCase()>t.label.toLowerCase()?1:-1}));break;case"label-desc":t.sort((function(e,t){return e.label.toLowerCase()<t.label.toLowerCase()?1:-1}))}return t},getPieTranslateCenter:function(e){return"translate("+e.x+","+e.y+")"},calculatePieCenter:function(e){var t=e.options.misc.pieCenterOffset,a=e.textComponents.title.exists&&"pie-center"!==e.options.header.location,n=e.textComponents.subtitle.exists&&"pie-center"!==e.options.header.location,r=e.options.misc.canvasPadding.top;a&&n?r+=e.textComponents.title.h+e.options.header.titleSubtitlePadding+e.textComponents.subtitle.h:a?r+=e.textComponents.title.h:n&&(r+=e.textComponents.subtitle.h);var o=0;e.textComponents.footer.exists&&(o=e.textComponents.footer.h+e.options.misc.canvasPadding.bottom);var i=(e.options.size.canvasWidth-e.options.misc.canvasPadding.left-e.options.misc.canvasPadding.right)/2+e.options.misc.canvasPadding.left,s=(e.options.size.canvasHeight-o-r)/2+r;i+=t.x,s+=t.y,e.pieCenter={x:i,y:s}},rotate:function(e,t,a,n,r){r=r*Math.PI/180;var o=Math.cos,i=Math.sin;return{x:(e-a)*o(r)-(t-n)*i(r)+a,y:(e-a)*i(r)+(t-n)*o(r)+n}},translate:function(e,t,a,n){var r=o.toRadians(n);return{x:e+a*Math.sin(r),y:t-a*Math.cos(r)}},pointIsInArc:function(e,t,a){var n=a.innerRadius()(t),r=a.outerRadius()(t),o=a.startAngle()(t),i=a.endAngle()(t),s=e.x*e.x+e.y*e.y,l=Math.atan2(e.x,-e.y);return l=l<0?l+2*Math.PI:l,n*n<=s&&s<=r*r&&o<=l&&l<=i}},i={add:function(e,t,a){var n=i.getIncludes(a),r=e.options.labels,o=e.svg.insert("g","."+e.cssPrefix+"labels-"+t).attr("class",e.cssPrefix+"labels-"+t),s=e.__labels[t]=o.selectAll("."+e.cssPrefix+"labelGroup-"+t).data(e.options.data.content).enter().append("g").attr("id",(function(a,n){return e.cssPrefix+"labelGroup"+n+"-"+t})).attr("data-index",(function(e,t){return t})).attr("class",e.cssPrefix+"labelGroup-"+t).style("opacity",0),l={section:t,sectionDisplayType:a};n.mainLabel&&s.append("text").attr("id",(function(a,n){return e.cssPrefix+"segmentMainLabel"+n+"-"+t})).attr("class",e.cssPrefix+"segmentMainLabel-"+t).text((function(e,t){var a=e.label;return r.formatter?(l.index=t,l.part="mainLabel",l.value=e.value,l.label=a,a=r.formatter(l)):r.truncation.enabled&&e.label.length>r.truncation.truncateLength&&(a=e.label.substring(0,r.truncation.truncateLength)+"..."),a})).style("font-size",r.mainLabel.fontSize+"px").style("font-family",r.mainLabel.font).style("font-weight",r.mainLabel.fontWeight).style("fill",(function(t,a){return"segment"===r.mainLabel.color?e.options.colors[a]:r.mainLabel.color})),n.percentage&&s.append("text").attr("id",(function(a,n){return e.cssPrefix+"segmentPercentage"+n+"-"+t})).attr("class",e.cssPrefix+"segmentPercentage-"+t).text((function(e,t){var a=e.percentage;return r.formatter?(l.index=t,l.part="percentage",l.value=e.value,l.label=e.percentage,a=r.formatter(l)):a+="%",a})).style("font-size",r.percentage.fontSize+"px").style("font-family",r.percentage.font).style("font-weight",r.percentage.fontWeight).style("fill",r.percentage.color),n.value&&s.append("text").attr("id",(function(a,n){return e.cssPrefix+"segmentValue"+n+"-"+t})).attr("class",e.cssPrefix+"segmentValue-"+t).text((function(e,t){return l.index=t,l.part="value",l.value=e.value,l.label=e.value,r.formatter?r.formatter(l,e.value):e.value})).style("font-size",r.value.fontSize+"px").style("font-family",r.value.font).style("font-weight",r.value.fontWeight).style("fill",r.value.color)},positionLabelElements:function(e,t,a){i["dimensions-"+t]=[],e.__labels[t].each((function(a,n){var r=d3.select(this).selectAll("."+e.cssPrefix+"segmentMainLabel-"+t),o=d3.select(this).selectAll("."+e.cssPrefix+"segmentPercentage-"+t),s=d3.select(this).selectAll("."+e.cssPrefix+"segmentValue-"+t);i["dimensions-"+t].push({mainLabel:null!==r.node()?r.node().getBBox():null,percentage:null!==o.node()?o.node().getBBox():null,value:null!==s.node()?s.node().getBBox():null})}));var n=i["dimensions-"+t];switch(a){case"label-value1":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+5}));break;case"label-value2":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dy",(function(e,t){return n[t].mainLabel.height}));break;case"label-percentage1":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+5}));break;case"label-percentage2":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width/2-n[t].percentage.width/2})).attr("dy",(function(e,t){return n[t].mainLabel.height}))}},computeLabelLinePositions:function(e){e.lineCoordGroups=[],e.__labels.outer.each((function(t,a){return i.computeLinePosition(e,a)}))},computeLinePosition:function(e,t){var a,n,r,i,l=s.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),c=o.rotate(e.pieCenter.x,e.pieCenter.y-e.outerRadius,e.pieCenter.x,e.pieCenter.y,l),u=e.outerLabelGroupData[t].h/5,d=Math.floor(l/90);switch(2===d&&180===l&&(d=1),d){case 0:a=e.outerLabelGroupData[t].x-6-(e.outerLabelGroupData[t].x-6-c.x)/2,n=e.outerLabelGroupData[t].y+(c.y-e.outerLabelGroupData[t].y)/4,r=e.outerLabelGroupData[t].x-6,i=e.outerLabelGroupData[t].y-u;break;case 1:a=c.x+(e.outerLabelGroupData[t].x-c.x)/4,n=c.y+(e.outerLabelGroupData[t].y-c.y)/4,r=e.outerLabelGroupData[t].x-6,i=e.outerLabelGroupData[t].y-u;break;case 2:var h=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6;a=c.x-(c.x-h)/4,n=c.y+(e.outerLabelGroupData[t].y-c.y)/4,r=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6,i=e.outerLabelGroupData[t].y-u;break;case 3:var p=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6;a=p+(c.x-p)/4,n=e.outerLabelGroupData[t].y+(c.y-e.outerLabelGroupData[t].y)/4,r=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+6,i=e.outerLabelGroupData[t].y-u}"straight"===e.options.labels.lines.style?e.lineCoordGroups[t]=[{x:c.x,y:c.y},{x:r,y:i}]:e.lineCoordGroups[t]=[{x:c.x,y:c.y},{x:a,y:n},{x:r,y:i}]},addLabelLines:function(e){var t=e.svg.insert("g","."+e.cssPrefix+"pieChart").attr("class",e.cssPrefix+"lineGroups").style("opacity",1).selectAll("."+e.cssPrefix+"lineGroup").data(e.lineCoordGroups).enter().append("g").attr("class",e.cssPrefix+"lineGroup"),a=d3.line().curve(d3.curveBasis).x((function(e){return e.x})).y((function(e){return e.y}));t.append("path").attr("d",a).attr("stroke",(function(t,a){return"segment"===e.options.labels.lines.color?e.options.colors[a]:e.options.labels.lines.color})).attr("stroke-width",1).attr("fill","none").style("opacity",(function(t,a){var n=e.options.labels.outer.hideWhenLessThanPercentage;return null!==n&&t.percentage<n||""===e.options.data.content[a].label?0:1}))},positionLabelGroups:function(e,t){"none"!==e.options.labels[t].format&&e.__labels[t].style("opacity",(function(a,n){var r=e.options.labels[t].hideWhenLessThanPercentage;return null!==r&&a.percentage<r?0:1})).attr("transform",(function(a,i){var l,c;if("outer"===t)l=e.outerLabelGroupData[i].x,c=e.outerLabelGroupData[i].y;else{var u=r(!0,{},e.pieCenter);if(e.innerRadius>0){var d=s.getSegmentAngle(i,e.options.data.content,e.totalSize,{midpoint:!0}),h=o.translate(e.pieCenter.x,e.pieCenter.y,e.innerRadius,d);u.x=h.x,u.y=h.y}var p=n.getDimensions(e.cssPrefix+"labelGroup"+i+"-inner"),f=p.w/2,g=p.h/4;l=u.x+(e.lineCoordGroups[i][0].x-u.x)/1.8,c=u.y+(e.lineCoordGroups[i][0].y-u.y)/1.8,l-=f,c+=g}return"translate("+l+","+c+")"}))},getIncludes:function(e){var t=!1,a=!1,n=!1;switch(e){case"label":t=!0;break;case"value":a=!0;break;case"percentage":n=!0;break;case"label-value1":case"label-value2":t=!0,a=!0;break;case"label-percentage1":case"label-percentage2":t=!0,n=!0}return{mainLabel:t,value:a,percentage:n}},computeOuterLabelCoords:function(e){e.__labels.outer.each((function(t,a){return i.getIdealOuterLabelPositions(e,a)})),i.resolveOuterLabelCollisions(e)},resolveOuterLabelCollisions:function(e){if("none"!==e.options.labels.outer.format){var t=e.options.data.content.length;i.checkConflict(e,0,"clockwise",t),i.checkConflict(e,t-1,"anticlockwise",t)}},checkConflict:function(e,t,a,r){var o,s;if(!(r<=1)){var l=e.outerLabelGroupData[t].hs;if(("clockwise"!==a||"right"===l)&&("anticlockwise"!==a||"left"===l)){var c="clockwise"===a?t+1:t-1,u=e.outerLabelGroupData[t],d=e.outerLabelGroupData[c],h={labelHeights:e.outerLabelGroupData[0].h,center:e.pieCenter,lineLength:e.outerRadius+e.options.labels.outer.pieDistance,heightChange:e.outerLabelGroupData[0].h+1};if("clockwise"===a){for(o=0;o<=t;o++)if(s=e.outerLabelGroupData[o],!i.isLabelHidden(e,o)&&n.rectIntersect(s,d)){i.adjustLabelPos(e,c,u,h);break}}else for(o=r-1;o>=t;o--)if(s=e.outerLabelGroupData[o],!i.isLabelHidden(e,o)&&n.rectIntersect(s,d)){i.adjustLabelPos(e,c,u,h);break}i.checkConflict(e,c,a,r)}}},isLabelHidden:function(e,t){var a=e.options.labels.outer.hideWhenLessThanPercentage;return null!==a&&d.percentage<a||""===e.options.data.content[t].label},adjustLabelPos:function(e,t,a,n){var r,o,i,s;s=a.y+n.heightChange,o=n.center.y-s,r=Math.abs(n.lineLength)>Math.abs(o)?Math.sqrt(n.lineLength*n.lineLength-o*o):Math.sqrt(o*o-n.lineLength*n.lineLength),i="right"===a.hs?n.center.x+r:n.center.x-r-e.outerLabelGroupData[t].w,e.outerLabelGroupData[t].x=i,e.outerLabelGroupData[t].y=s},getIdealOuterLabelPositions:function(e,t){var a=e.svg.select("#"+e.cssPrefix+"labelGroup"+t+"-outer").node();if(a){var n=a.getBBox(),r=s.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),i=e.pieCenter.x,l=e.pieCenter.y-(e.outerRadius+e.options.labels.outer.pieDistance),c=o.rotate(i,l,e.pieCenter.x,e.pieCenter.y,r),u="right";r>180?(c.x-=n.width+8,u="left"):c.x+=8,e.outerLabelGroupData[t]={x:c.x,y:c.y,w:n.width,h:n.height,hs:u}}}},s={effectMap:{none:d3.easeLinear,bounce:d3.easeBounce,linear:d3.easeLinear,sin:d3.easeSin,elastic:d3.easeElastic,back:d3.easeBack,quad:d3.easeQuad,circle:d3.easeCircle,exp:d3.easeExp},create:function(e){var t=e.pieCenter,a=e.options.colors,n=(e.options.effects.load,e.options.misc.colors.segmentStroke),r=e.svg.insert("g","#"+e.cssPrefix+"title").attr("transform",(function(){return o.getPieTranslateCenter(t)})).attr("class",e.cssPrefix+"pieChart"),i=d3.arc().innerRadius(e.innerRadius).outerRadius(e.outerRadius).startAngle(0).endAngle((function(t){return t.value/e.totalSize*2*Math.PI}));r.selectAll("."+e.cssPrefix+"arc").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"arc").append("path").attr("id",(function(t,a){return e.cssPrefix+"segment"+a})).attr("fill",(function(t,n){var r=a[n];return e.options.misc.gradient.enabled&&(r="url(#"+e.cssPrefix+"grad"+n+")"),r})).style("stroke",n).style("stroke-width",1).attr("data-index",(function(e,t){return t})).attr("d",i),e.svg.selectAll("g."+e.cssPrefix+"arc").attr("transform",(function(t,a){var n=0;return a>0&&(n=s.getSegmentAngle(a-1,e.options.data.content,e.totalSize)),"rotate("+n+")"})),e.arc=i},addGradients:function(e){var t=e.svg.append("defs").selectAll("radialGradient").data(e.options.data.content).enter().append("radialGradient").attr("gradientUnits","userSpaceOnUse").attr("cx",0).attr("cy",0).attr("r","120%").attr("id",(function(t,a){return e.cssPrefix+"grad"+a}));t.append("stop").attr("offset","0%").style("stop-color",(function(t,a){return e.options.colors[a]})),t.append("stop").attr("offset",e.options.misc.gradient.percentage+"%").style("stop-color",e.options.misc.gradient.color)},addSegmentEventHandlers:function(e){var t=e.svg.selectAll("."+e.cssPrefix+"arc");(t=t.merge(e.__labels.inner.merge(e.__labels.outer))).on("click",(function(){var t,a=d3.select(this);if(a.attr("class")===e.cssPrefix+"arc")t=a.select("path");else{var n=a.attr("data-index");t=d3.select("#"+e.cssPrefix+"segment"+n)}var r=t.attr("class")===e.cssPrefix+"expanded";s.onSegmentEvent(e,e.options.callbacks.onClickSegment,t,r),"none"!==e.options.effects.pullOutSegmentOnClick.effect&&(r?s.closeSegment(e,t.node()):s.openSegment(e,t.node()))})),t.on("mouseover",(function(){var t,a,r=d3.select(this);if(r.attr("class")===e.cssPrefix+"arc"?t=r.select("path"):(a=r.attr("data-index"),t=d3.select("#"+e.cssPrefix+"segment"+a)),e.options.effects.highlightSegmentOnMouseover){a=t.attr("data-index");var o=e.options.colors[a];t.style("fill",n.getColorShade(o,e.options.effects.highlightLuminosity))}e.options.tooltips.enabled&&(a=t.attr("data-index"),c.showTooltip(e,a));var i=t.attr("class")===e.cssPrefix+"expanded";s.onSegmentEvent(e,e.options.callbacks.onMouseoverSegment,t,i)})),t.on("mousemove",(function(){c.moveTooltip(e)})),t.on("mouseout",(function(){var t,a,n=d3.select(this);if(n.attr("class")===e.cssPrefix+"arc"?t=n.select("path"):(a=n.attr("data-index"),t=d3.select("#"+e.cssPrefix+"segment"+a)),e.options.effects.highlightSegmentOnMouseover){a=t.attr("data-index");var r=e.options.colors[a];e.options.misc.gradient.enabled&&(r="url(#"+e.cssPrefix+"grad"+a+")"),t.style("fill",r)}e.options.tooltips.enabled&&(a=t.attr("data-index"),c.hideTooltip(e,a));var o=t.attr("class")===e.cssPrefix+"expanded";s.onSegmentEvent(e,e.options.callbacks.onMouseoutSegment,t,o)}))},onSegmentEvent:function(e,t,a,r){if(n.isFunction(t)){var o=parseInt(a.attr("data-index"),10);t({segment:a.node(),index:o,expanded:r,data:e.options.data.content[o]})}},openSegment:function(e,t){e.isOpeningSegment||(e.isOpeningSegment=!0,s.maybeCloseOpenSegment(e),d3.select(t).transition().ease(s.effectMap[e.options.effects.pullOutSegmentOnClick.effect]).duration(e.options.effects.pullOutSegmentOnClick.speed).attr("transform",(function(t,a){var n=e.arc.centroid(t),r=n[0],o=n[1],i=Math.sqrt(r*r+o*o),s=parseInt(e.options.effects.pullOutSegmentOnClick.size,10);return"translate("+r/i*s+","+o/i*s+")"})).on("end",(function(a,n){e.currentlyOpenSegment=t,e.isOpeningSegment=!1,d3.select(t).attr("class",e.cssPrefix+"expanded")})))},maybeCloseOpenSegment:function(e){"undefined"!==typeof e&&e.svg.selectAll("."+e.cssPrefix+"expanded").size()>0&&s.closeSegment(e,e.svg.select("."+e.cssPrefix+"expanded").node())},closeSegment:function(e,t){d3.select(t).transition().duration(400).attr("transform","translate(0,0)").on("end",(function(a,n){d3.select(t).attr("class",""),e.currentlyOpenSegment=null}))},getCentroid:function(e){var t=e.getBBox();return{x:t.x+t.width/2,y:t.y+t.height/2}},getSegmentAngle:function(e,t,a,n){var o,i=r({compounded:!0,midpoint:!1},n),s=t[e].value;if(i.compounded){o=0;for(var l=0;l<=e;l++)o+=t[l].value}"undefined"===typeof o&&(o=s);var c=o/a*360;return i.midpoint&&(c-=s/a*360/2),c}},l={offscreenCoord:-1e4,addTitle:function(e){e.__title=e.svg.selectAll("."+e.cssPrefix+"title").data([e.options.header.title]).enter().append("text").text((function(e){return e.text})).attr("id",e.cssPrefix+"title").attr("class",e.cssPrefix+"title").attr("x",l.offscreenCoord).attr("y",l.offscreenCoord).attr("text-anchor",(function(){return"top-center"===e.options.header.location||"pie-center"===e.options.header.location?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize+"px"})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionTitle:function(e){var t,a=e.textComponents,n=e.options.header.location,r=e.options.misc.canvasPadding,o=e.options.size.canvasWidth,i=e.options.header.titleSubtitlePadding;t="top-left"===n?r.left:(o-r.right)/2+r.left,t+=e.options.misc.pieCenterOffset.x;var s=r.top+a.title.h;"pie-center"===n&&(s=e.pieCenter.y,a.subtitle.exists?s=s-(a.title.h+i+a.subtitle.h)/2+a.title.h:s+=a.title.h/4),e.__title.attr("x",t).attr("y",s)},addSubtitle:function(e){var t=e.options.header.location;e.__subtitle=e.svg.selectAll("."+e.cssPrefix+"subtitle").data([e.options.header.subtitle]).enter().append("text").text((function(e){return e.text})).attr("x",l.offscreenCoord).attr("y",l.offscreenCoord).attr("id",e.cssPrefix+"subtitle").attr("class",e.cssPrefix+"subtitle").attr("text-anchor",(function(){return"top-center"===t||"pie-center"===t?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize+"px"})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionSubtitle:function(e){var t,a=e.options.misc.canvasPadding,n=e.options.size.canvasWidth;t="top-left"===e.options.header.location?a.left:(n-a.right)/2+a.left,t+=e.options.misc.pieCenterOffset.x;var r=l.getHeaderHeight(e);e.__subtitle.attr("x",t).attr("y",r)},addFooter:function(e){e.__footer=e.svg.selectAll("."+e.cssPrefix+"footer").data([e.options.footer]).enter().append("text").text((function(e){return e.text})).attr("x",l.offscreenCoord).attr("y",l.offscreenCoord).attr("id",e.cssPrefix+"footer").attr("class",e.cssPrefix+"footer").attr("text-anchor",(function(){var t="left";return"bottom-center"===e.options.footer.location?t="middle":"bottom-right"===e.options.footer.location&&(t="left"),t})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize+"px"})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionFooter:function(e){var t,a=e.options.footer.location,n=e.textComponents.footer.w,r=e.options.size.canvasWidth,o=e.options.size.canvasHeight,i=e.options.misc.canvasPadding;t="bottom-left"===a?i.left:"bottom-right"===a?r-n-i.right:r/2,e.__footer.attr("x",t).attr("y",o-i.bottom)},getHeaderHeight:function(e){var t;if(e.textComponents.title.exists){var a=e.textComponents.title.h+e.options.header.titleSubtitlePadding+e.textComponents.subtitle.h;t="pie-center"===e.options.header.location?e.pieCenter.y-a/2+a:a+e.options.misc.canvasPadding.top}else if("pie-center"===e.options.header.location){var n=e.options.misc.canvasPadding.bottom+e.textComponents.footer.h;t=(e.options.size.canvasHeight-n)/2+e.options.misc.canvasPadding.top+e.textComponents.subtitle.h/2}else t=e.options.misc.canvasPadding.top+e.textComponents.subtitle.h;return t}},c={addTooltips:function(e){var t=e.svg.insert("g").attr("class",e.cssPrefix+"tooltips");t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"tooltip").attr("id",(function(t,a){return e.cssPrefix+"tooltip"+a})).style("opacity",0).append("rect").attr("rx",e.options.tooltips.styles.borderRadius).attr("ry",e.options.tooltips.styles.borderRadius).attr("x",-e.options.tooltips.styles.padding).attr("opacity",e.options.tooltips.styles.backgroundOpacity).style("fill",e.options.tooltips.styles.backgroundColor),t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).append("text").attr("fill",(function(t){return e.options.tooltips.styles.color})).style("font-size",(function(t){return e.options.tooltips.styles.fontSize})).style("font-weight",(function(t){return e.options.tooltips.styles.fontWeight})).style("font-family",(function(t){return e.options.tooltips.styles.font})).text((function(t,a){var n=e.options.tooltips.string;return"caption"===e.options.tooltips.type&&(n=t.caption),c.replacePlaceholders(e,n,a,{label:t.label,value:t.value,percentage:t.percentage})})),t.selectAll("."+e.cssPrefix+"tooltip rect").attr("width",(function(t,a){return n.getDimensions(e.cssPrefix+"tooltip"+a).w+2*e.options.tooltips.styles.padding})).attr("height",(function(t,a){return n.getDimensions(e.cssPrefix+"tooltip"+a).h+2*e.options.tooltips.styles.padding})).attr("y",(function(t,a){return-n.getDimensions(e.cssPrefix+"tooltip"+a).h/2+1}))},showTooltip:function(e,t){var a=e.options.tooltips.styles.fadeInSpeed;c.currentTooltip===t&&(a=1),c.currentTooltip=t,d3.select("#"+e.cssPrefix+"tooltip"+t).transition().duration(a).style("opacity",(function(){return 1})),c.moveTooltip(e)},moveTooltip:function(e){d3.selectAll("#"+e.cssPrefix+"tooltip"+c.currentTooltip).attr("transform",(function(t){var a=d3.mouse(this.parentNode);return"translate("+(a[0]+e.options.tooltips.styles.padding+2)+","+(a[1]-2*e.options.tooltips.styles.padding-2)+")"}))},hideTooltip:function(e,t){d3.select("#"+e.cssPrefix+"tooltip"+t).style("opacity",(function(){return 0})),d3.select("#"+e.cssPrefix+"tooltip"+c.currentTooltip).attr("transform",(function(t,a){return"translate("+(e.options.size.canvasWidth+1e3)+","+(e.options.size.canvasHeight+1e3)+")"}))},replacePlaceholders:function(e,t,a,r){return n.isFunction(e.options.tooltips.placeholderParser)&&e.options.tooltips.placeholderParser(a,r),t.replace(/\{(\w+)\}/g,(function(e){var t=arguments[1];return r.hasOwnProperty(t)?r[arguments[1]]:arguments[0]}))}},u=function(n,o){if(this.element=n,"string"===typeof n){var i=n.replace(/^#/,"");this.element=document.getElementById(i)}var s={};r(!0,s,t,o),this.options=s,null!==this.options.misc.cssPrefix?this.cssPrefix=this.options.misc.cssPrefix:(this.cssPrefix="p"+e+"_",e++),a(this)&&(d3.select(this.element).attr("d3pie","0.2.1"),h.call(this),p.call(this))};u.prototype.recreate=function(){a(this)&&(h.call(this),p.call(this))},u.prototype.redraw=function(){this.element.innerHTML="",p.call(this)},u.prototype.destroy=function(){this.element.innerHTML="",d3.select(this.element).attr("d3pie",null)},u.prototype.getOpenSegment=function(){var e=this.currentlyOpenSegment;if(null!==e&&"undefined"!==typeof e){var t=parseInt(d3.select(e).attr("data-index"),10);return{element:e,index:t,data:this.options.data.content[t]}}return null},u.prototype.openSegment=function(e){(e=parseInt(e,10))<0||e>this.options.data.content.length-1||s.openSegment(this,d3.select("#"+this.cssPrefix+"segment"+e).node())},u.prototype.closeSegment=function(){s.maybeCloseOpenSegment(this)},u.prototype.updateProp=function(e,t){switch(e){case"header.title.text":var a=n.processObj(this.options,e);n.processObj(this.options,e,t),d3.select("#"+this.cssPrefix+"title").html(t),(""===a&&""!==t||""!==a&&""===t)&&this.redraw();break;case"header.subtitle.text":var r=n.processObj(this.options,e);n.processObj(this.options,e,t),d3.select("#"+this.cssPrefix+"subtitle").html(t),(""===r&&""!==t||""!==r&&""===t)&&this.redraw();break;case"callbacks.onload":case"callbacks.onMouseoverSegment":case"callbacks.onMouseoutSegment":case"callbacks.onClickSegment":case"effects.pullOutSegmentOnClick.effect":case"effects.pullOutSegmentOnClick.speed":case"effects.pullOutSegmentOnClick.size":case"effects.highlightSegmentOnMouseover":case"effects.highlightLuminosity":n.processObj(this.options,e,t);break;default:n.processObj(this.options,e,t),this.destroy(),this.recreate()}};var h=function(){this.options.data.content=o.sortPieData(this),this.options.data.smallSegmentGrouping.enabled&&(this.options.data.content=n.applySmallSegmentGrouping(this.options.data.content,this.options.data.smallSegmentGrouping)),this.options.colors=n.initSegmentColors(this),this.totalSize=o.getTotalPieSize(this.options.data.content);for(var e=this.options.labels.percentage.decimalPlaces,t=0;t<this.options.data.content.length;t++)this.options.data.content[t].percentage=f(this.options.data.content[t].value,this.totalSize,e);for(var a=0,r=0;r<this.options.data.content.length;r++)r===this.options.data.content.length-1&&(this.options.data.content[r].percentage=(100-a).toFixed(e)),a+=parseFloat(this.options.data.content[r].percentage)},p=function(){this.svg=n.addSVGSpace(this),this.textComponents={headerHeight:0,title:{exists:""!==this.options.header.title.text,h:0,w:0},subtitle:{exists:""!==this.options.header.subtitle.text,h:0,w:0},footer:{exists:""!==this.options.footer.text,h:0,w:0}},this.outerLabelGroupData=[],this.textComponents.title.exists&&l.addTitle(this),this.textComponents.subtitle.exists&&l.addSubtitle(this),l.addFooter(this),l.positionFooter(this);var e=n.getDimensions(this.__footer.node());if(this.textComponents.footer.h=e.h,this.textComponents.footer.w=e.w,this.textComponents.title.exists){var t=n.getDimensions(this.__title.node());this.textComponents.title.h=t.h,this.textComponents.title.w=t.w}if(this.textComponents.subtitle.exists){var a=n.getDimensions(this.__subtitle.node());this.textComponents.subtitle.h=a.h,this.textComponents.subtitle.w=a.w}if(this.textComponents.title.exists||this.textComponents.subtitle.exists){var r=0;this.textComponents.title.exists&&(r+=this.textComponents.title.h,this.textComponents.subtitle.exists&&(r+=this.options.header.titleSubtitlePadding)),this.textComponents.subtitle.exists&&(r+=this.textComponents.subtitle.h),this.textComponents.headerHeight=r}if(o.computePieRadius(this),o.calculatePieCenter(this),l.positionTitle(this),l.positionSubtitle(this),this.options.misc.gradient.enabled&&s.addGradients(this),s.create(this),this.__labels={},i.add(this,"inner",this.options.labels.inner.format),i.add(this,"outer",this.options.labels.outer.format),i.positionLabelElements(this,"inner",this.options.labels.inner.format),i.positionLabelElements(this,"outer",this.options.labels.outer.format),i.computeOuterLabelCoords(this),i.positionLabelGroups(this,"outer"),i.computeLabelLinePositions(this),this.options.labels.lines.enabled&&"none"!==this.options.labels.outer.format&&i.addLabelLines(this),i.positionLabelGroups(this,"inner"),n.isFunction(this.options.callbacks.onload))try{this.options.callbacks.onload()}catch(u){}this.options.tooltips.enabled&&c.addTooltips(this),s.addSegmentEventHandlers(this)},f=function(e,t,a){var n=e/t;return a<=0?Math.round(100*n):(100*n).toFixed(a)};return u})?n.apply(t,r):n)||(e.exports=o)},28:function(e,t,a){"use strict";a.d(t,"e",(function(){return i})),a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"c",(function(){return c})),a.d(t,"g",(function(){return u})),a.d(t,"d",(function(){return d})),a.d(t,"f",(function(){return h}));var n=a(14),r=a(7),o=a(133),i=function(e){return e>0},s="https://registry.my-netdata.io",l=1e3,c=function(e,t){return"".concat(e,"/sso/v2/").concat(t)},u="&utm_source=agent&utm_medium=web",d=function(){var e=document.getElementById("charts_div");return e?60*-Math.round(e.getBoundingClientRect().width/3/60):(console.error("Couldn't find '.charts_div' element to calculate width"),-900)},h=function(e,t,a){return t?e.reduce((function(e,i){return Object(r.a)({},e,Object(n.a)({},i,Object(o.a)(t[i],a[i])?t[i]:a[i]))}),a):a}},282:function(e,t,a){"use strict";a(256);var n=a(257);a.d(t,"CloudConnectionStatus",(function(){return n.a}))},300:function(e,t,a){e.exports=a(489)},316:function(e,t,a){},355:function(e,t){},36:function(e,t,a){"use strict";a.d(t,"a",(function(){return p})),a.d(t,"b",(function(){return f})),a.d(t,"c",(function(){return g}));var n=a(287),r=a(146),o=a(285),i=a(219),s=a(288),l=a(133),c=a(494),u=a(74),d=u.c?{src:"http://localhost:3000/some-script.js"}:document.currentScript,h=function(){if(u.a)return"http://localhost:19999";if(u.b){var e=window.location.pathname.replace("index.html","").replace("default.html","");return window.location.origin+e}return function(e){return e.replace(new RegExp("[^\\/]*\\.js(\\/?.*)?$"),"").replace("/static/js","")}(Object(n.a)([[Boolean,r.a],[o.a,function(){return Object(i.a)(document.getElementsByTagName("script"))}]])(d).src)},p=Object(n.a)([[Object(s.a)(i.a,Object(l.a)("/")),r.a],[o.a,function(e){return Object(c.a)(e,"/")}]]),f=p(window.netdataServer||h()),g=u.a?"/":p(h())},39:function(e,t,a){"use strict";a.d(t,"f",(function(){return u})),a.d(t,"a",(function(){return f})),a.d(t,"j",(function(){return g})),a.d(t,"h",(function(){return m})),a.d(t,"g",(function(){return b})),a.d(t,"l",(function(){return v})),a.d(t,"i",(function(){return _})),a.d(t,"c",(function(){return y})),a.d(t,"b",(function(){return O})),a.d(t,"k",(function(){return x})),a.d(t,"e",(function(){return w})),a.d(t,"d",(function(){return E}));var n=a(49),r=a(17),o=a(9),i=a(163),s=a(45),l=function(e){return e[s.c]},c=Object(r.a)(l,(function(e,t){return t.id}),(function(e,t){return e[t]||i.b})),u=Object(r.a)(c,(function(e){return e.chartData})),d=Object(r.a)(c,Object(n.a)("chartMetadata")),h=Object(r.a)(o.e,d,(function(e,t){return e||t})),p=Object(r.a)(c,Object(n.a)("isFetchingDetails")),f=function(){return Object(r.a)(h,p,(function(e,t){return{chartMetadata:e,isFetchingDetails:t}}))},g=Object(r.a)(c,(function(e){return e.viewRange})),m=Object(r.a)(c,(function(e){return e.isFetchingData})),b=Object(r.a)(c,(function(e){return e.fetchDataParams})),v=Object(r.a)(c,(function(e){return e.resizeHeight})),_=Object(r.a)(c,Object(n.a)("chartPanAndZoom")),y=(Object(r.a)(l,(function(e){return Object.values(e).some((function(e){return e.isFetchingData}))})),Object(r.a)(l,(function(e){return Object.values(e).reduce((function(e,t){return e+(function(e){return e.isFetchDataFailure||Boolean(e.chartData)||e.isFetchDetailsFailure}(t)?1:0)}),0)}))),O=Object(r.a)(l,(function(e){return Object.keys(e).length})),x=Object(r.a)(l,(function(e){var t;return null===(t=Object.values(e).find((function(e){return e.isFetchingData})))||void 0===t?void 0:t.chartId})),w=Object(r.a)(l,(function(e){return Object.values(e).reduce((function(e,t){return e+(t.snapshotData?1:0)}),0)})),E=Object(r.a)(l,(function(e){return Object.values(e).reduce((function(e,t){return e+(t.snapshotDataIsError?1:0)}),0)}))},396:function(e,t,a){},416:function(e,t,a){},42:function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"b",(function(){return b}));var n=a(37),r=a(7),o=a(0),i=(a(99),a(8)),s=a(9),l=function(e){return e>-10&&e<10?"0".concat(e.toString()):e.toString()},c=!!(Intl&&Intl.DateTimeFormat&&navigator.language),u=function(e){return"number"===typeof e?new Date(e):e},d=function(e){return u(e).toLocaleDateString()},h=function(e){return u(e).toLocaleTimeString()},p=function(e){var t=u(e);return"".concat(l(t.getHours()),":").concat(l(t.getMinutes()),":").concat(l(t.getSeconds()))},f=function(e){try{Intl.DateTimeFormat(navigator.language,{localeMatcher:"best fit",formatMatcher:"best fit",weekday:"short",year:"numeric",month:"short",day:"2-digit",timeZone:e})}catch(t){return!1}return!0},g=function(e,t){var a=t.locale,o=Object(n.a)(t,["locale"]);return new Intl.DateTimeFormat(null!==a&&void 0!==a?a:navigator.language,function(e){var t=e.long,a=e.isTime,n=e.secs,o=e.timezone;return Object(r.a)({hourCycle:"h23"},a?{}:t?{weekday:"short",year:"numeric",month:"short",day:"2-digit"}:{dateStyle:"short"},{},a&&{timeStyle:n?"medium":"short"},{timeZone:o})}(o)).format(e)},m=function(e){return""!==e&&"default"!==e?e:void 0},b=function(){var e=Object(i.b)(s.M),t=Object(i.b)(s.N),a=Object(o.useMemo)((function(){return c?function(t,a){return g(t,Object(r.a)({long:!0,timezone:m(e)},a))}:d}),[e]),n=Object(o.useMemo)((function(){return c?function(t,a){return g(t,Object(r.a)({secs:!0,isTime:!0,timezone:m(e)},a))}:h}),[e]),l=Object(o.useMemo)((function(){return c?function(t){return g(t,{secs:!0,isTime:!0,timezone:m(e)})}:p}),[e]);return{localeDateString:a,localeTimeString:n,xAxisDateString:Object(o.useMemo)((function(){return c?function(t){return g(t,{long:!0,timezone:m(e)})}:p}),[e]),xAxisTimeString:l,utcOffset:t}}},436:function(e,t,a){},44:function(e,t,a){"use strict";a.d(t,"e",(function(){return o})),a.d(t,"f",(function(){return i})),a.d(t,"d",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return u}));var n=a(22),r=a(75),o=Object(n.createAction)("".concat(r.a,"/isSnapshotModeAction")),i=Object(n.createAction)("".concat(r.a,"/stopSnapshotModeAction")),s=Object(n.createAction)("".concat(r.a,"/showSignInModal")),l=Object(n.createAction)("".concat(r.a,"/explicitlySignIn")),c=Object(n.createAction)("".concat(r.a,"/isSignedInAction")),u=Object(n.createAction)("".concat(r.a,"/setOfflineAction"))},440:function(e,t,a){},441:function(e,t,a){},45:function(e,t,a){"use strict";a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o}));var n="chart",r=2e3,o=300},46:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(7),r=function(e,t){var a={now:"now",space:" ",negative_suffix:"ago",day:"day",days:"days",hour:"hour",hours:"hours",minute:"min",minutes:"mins",second:"sec",seconds:"secs",and:"and"},r="object"===typeof t?Object(n.a)({},a,{},t):a,o="string"===typeof e?parseInt(e,10):e;if(0===o)return r.now;var i="";o<0&&(o=-o,""!==r.negative_suffix&&(i=r.space+r.negative_suffix));var s=Math.floor(o/86400);o-=86400*s;var l=Math.floor(o/3600);o-=3600*l;var c=Math.floor(o/60);o-=60*c;var u=[];if(s>1?u.push(s.toString()+r.space+r.days):1===s&&u.push(s.toString()+r.space+r.day),l>1?u.push(l.toString()+r.space+r.hours):1===l&&u.push(l.toString()+r.space+r.hour),c>1?u.push(c.toString()+r.space+r.minutes):1===c&&u.push(c.toString()+r.space+r.minute),o>1?u.push(Math.floor(o).toString()+r.space+r.seconds):1===o&&u.push(Math.floor(o).toString()+r.space+r.second),1===u.length)return u.pop()+i;var d=u.pop();return"".concat(u.join(", ")," ").concat(r.and," ").concat(d).concat(i)}},487:function(e,t){},488:function(e,t,a){},489:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),o=a(32),i=a.n(o),s=a(27),l=a(48),c=a(126),u=a(14),d=a(155),h=a(26),p=a(163),f=a(45),g=a(7),m=a(22),b=a(44),v={isSnapshotMode:!1,snapshotCharts:null,snapshotDataPoints:null,isSignedIn:!1,offline:!1},_=Object(m.createReducer)({},v);_.on(b.e,(function(e,t){var a=t.charts,n=t.dataPoints;return Object(g.a)({},e,{snapshotCharts:a,snapshotDataPoints:n,isSnapshotMode:!0})})),_.on(b.f,(function(e){return Object(g.a)({},e,{isSnapshotMode:v.isSnapshotMode,snapshotCharts:v.snapshotCharts,snapshotDataPoints:v.snapshotDataPoints})})),_.on(b.b,(function(e,t){var a=t.isSignedIn;return Object(g.a)({},e,{isSignedIn:a})})),_.on(b.c,(function(e,t){var a=t.offline;return Object(g.a)({},e,{offline:a})}));var y,O=a(75),x=Object(l.c)((y={},Object(u.a)(y,h.e,d.b),Object(u.a)(y,f.c,p.a),Object(u.a)(y,O.a,_),y)),w=a(21),E=a.n(w),S=a(16),C=a(35),A=a(5),k=a(92),j=a.n(k),T=j.a.create({headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},withCredentials:!0}),D=a(36),P=a(554),M=a(184),L=a(529),I=a(261),N=a(527),R=a(528),F=a(549),B=a(530),H=j.a.create({headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},withCredentials:!0}),z=function(e){var t=new P.a,a=new P.a,n=Object(I.a)((function(e){var t=e.url,a=e.method,n=void 0===a?"GET":a,r=e.params,o=void 0===r?{}:r,i=e.data,s=e.onErrorCallback,l=e.onSuccessCallback,c=e.cancelTokenSource;return Object(M.a)(H.request({url:t,method:n,params:o,data:i,timeout:15e3,cancelToken:null===c||void 0===c?void 0:c.token})).pipe(Object(N.a)((function(e){var t=e.data;l(t)})),Object(R.a)((function(e){return"Chart scrolled out of view"!==(null===e||void 0===e?void 0:e.message)&&console.warn("fetch error",t),s(e),Object(L.a)()})))}),e);return a.pipe(Object(F.a)(null),Object(B.a)((function(){return t.pipe(n)}))).subscribe(),[t,a]},U=a(74),G=a(260),W=a(531),V=a(558),Y=function(e,t){return"json"===e.format?function(e,t){var a=e.view_update_every;if(!e.result.data.length)return e;var n=e.result.data[0][0]-t*a,r=Object(G.a)(e.result.labels).map((function(){return null})),o=new Array(t).fill(null).map((function(e,t){return[n+t*a].concat(Object(C.a)(r))}));return Object(g.a)({},e,{after:e.after-a*t,result:Object(g.a)({},e.result,{data:o.concat(e.result.data)})})}(e,t):e},X=[],K=function(e,t,a){if("array"===t&&"json"===e.format){if(Array.isArray(e.result))return e;var n=a?Object(W.a)(e.result.data):e.result.data;return Object(g.a)({},e,{format:"array",result:n.reduce((function(e,t){return t.shift(),[].concat(Object(C.a)(e),[Object(V.a)(t)])}),X)})}return e},Z=a(3),q=a(135),$=a(4),J=$.d.div.withConfig({displayName:"styled__Container",componentId:"qqn9iy-0"})(["width:100%;height:100%;min-height:",";display:flex;flex-flow:row nowrap;padding:"," "," "," ",";"],Object(Z.H)(10),Object(Z.H)(2),Object(Z.H)(2),Object(Z.H)(2),Object(Z.H)(2)),Q=$.d.div.withConfig({displayName:"styled__SideContent",componentId:"qqn9iy-1"})(["flex-grow:0;flex-shrink:0;height:100%;align-self:stretch;"]),ee=$.d.div.withConfig({displayName:"styled__ContentContainer",componentId:"qqn9iy-2"})([""]),te=Object($.d)(Z.z).withConfig({displayName:"styled__HeaderText",componentId:"qqn9iy-3"})(["color:",";font-weight:bold;display:block;margin-bottom:",";"],(function(e){var t=e.error;return e.success&&Object(Z.F)("success")||t&&Object(Z.F)("error")}),Object(Z.H)()),ae=Object($.d)(Z.D).withConfig({displayName:"styled__ContentText",componentId:"qqn9iy-4"})(["display:block;color:",";"],(function(e){return e.error&&Object(Z.F)("error")||Object(Z.F)("border")})),ne=function(e){var t=e.header,a=e.text,n=e.leftContent,o=e.rightContent,i=e.renderContent,s=e.success,l=e.error;return r.a.createElement(J,null,n&&r.a.createElement(Q,null,n),r.a.createElement(ee,null,t&&r.a.createElement(te,{success:s,error:l},t),a&&r.a.createElement(ae,{success:s,error:l},a),i&&i(e)),o&&r.a.createElement(Q,{right:!0},o))},re=function(e){return r.a.createElement(ne,e)},oe=$.d.div.withConfig({displayName:"styled__NodeIconContainer",componentId:"fe9uuu-0"})(["width:",";height:",";margin-right:",";display:flex;justify-content:center;align-items:center;"],Object(Z.H)(5),Object(Z.H)(5),Object(Z.H)(2)),ie=$.d.a.withConfig({displayName:"styled__NotificationLink",componentId:"fe9uuu-1"})(["&,&:hover{text-decoration:underline;color:inherit;}"]),se={position:q.b.POSITION.BOTTOM_RIGHT,autoClose:1e4,pauseOnFocusLoss:!1},le=function(){var e=re(Object(g.a)({},{header:"Installation error",text:"The installer could not prepare the required dependencies to enable Netdata Cloud functionality"},{error:!0,leftContent:r.a.createElement(oe,null,r.a.createElement(Z.o,{name:"gear",size:"large",color:"error"}))}));q.b.error(e,se)},ce=function(){var e={header:"Connection Problem",text:r.a.createElement(ie,{href:"https://learn.netdata.cloud/docs/agent/packaging/installer#automatic-one-line-installation-script",target:"_blank"},"To access Cloud install again your agent via the kickstart script")},t=re(Object(g.a)({},e,{error:!0,leftContent:r.a.createElement(oe,null,r.a.createElement(Z.o,{name:"gear",size:"large",color:"error"}))}));q.b.error(t,se)},ue=a(9),de=a(288),he=a(559),pe=a(218),fe=a(495),ge=a(552),me={hash:"#",theme:null,help:null,mode:"live",update_always:!1,pan_and_zoom:!1,server:null,after:0,before:0,highlight:!1,highlight_after:0,highlight_before:0,nowelcome:!1,show_alarms:!1,chart:null,family:null,alarm:null,alarm_unique_id:0,alarm_id:0,alarm_event_id:0,alarm_when:0},be=function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return void 0===me[a]||void 0===n}([a,n])?{}:Object(u.a)({},a,decodeURIComponent(n))},ve="print"===Object(de.a)(Object(he.a)(";"),Object(ge.a)((function(e,t){return 0===t?{hash:e}:be(e.split("="))})),pe.a,Object(fe.a)(me))(document.location.hash).mode,_e=a(18),ye=E.a.mark(Ae),Oe=E.a.mark(Me),xe=E.a.mark(He),we=E.a.mark(ze),Ee=E.a.mark(Ue),Se=U.b?30:60,Ce=Object(c.a)();function Ae(){var e,t,a,n,r,o;return E.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=3,Object(S.f)(Ce);case 3:if((e=i.sent).type!==_e.c.success.toString()){i.next=15;break}return t=e.payload,a=t.fetchDataParams.viewRange,n=Object(A.a)(a,2),r=n[0],o=n[1],i.next=10,Object(S.d)(ue.m);case 10:if(!i.sent||!(r<=0||o<=0)){i.next=15;break}return i.next=14,Object(S.c)(Object(_e.d)({id:t.id}));case 14:return i.abrupt("continue",0);case 15:return i.next=17,Object(S.c)(e);case 17:i.next=0;break;case 19:case"end":return i.stop()}}),ye)}var ke=function(e,t){return"".concat(void 0===e?"null":encodeURIComponent(e),",").concat(encodeURIComponent(t))},je=!1,Te=function(e){return"chart"===e?"node":"node"===e||"dimension"===e?e:"label=".concat(e)},De=z(ve?2:Se),Pe=Object(A.a)(De,1)[0];function Me(e){var t,a,n,r,o,i,s,l,c,u,d,h,p,f,m,b,v,_,y,O,x,w,A,k,j,T,P,M,L,I,N,R,F,B,H,z,G,W,V;return E.a.wrap((function(E){for(;;)switch(E.prev=E.next){case 0:return t=e.payload,a=t.host,n=t.context,r=t.chart,o=t.format,i=t.points,s=t.group,l=t.gtime,c=t.options,u=t.after,d=t.before,h=t.dimensions,p=t.labels,f=t.postGroupBy,m=t.postAggregationMethod,b=t.aggrMethod,v=t.dimensionsAggrMethod,_=t.nodeIDs,y=t.httpMethod,O=t.groupBy,x=void 0===O?"dimension":O,w=t.aggrGroups,A=void 0===w?[]:w,k=t.fetchDataParams,j=t.id,T=t.cancelTokenSource,E.next=4,Object(S.d)(ue.E);case 4:if(!(P=E.sent)){E.next=15;break}if(M=ke(h,c),L=Object.keys(P.data).find((function(e){return e.startsWith(r)&&e.includes(M)}))){E.next=11;break}return console.warn("Could not find snapshot key for chart: ".concat(r," and id ").concat(j)),E.abrupt("return");case 11:return I=P.data[L],E.next=14,Object(S.c)(_e.c.success({chartData:I,fetchDataParams:k,id:j}));case 14:return E.abrupt("return");case 15:N=U.b?"".concat(Object(D.a)(a),"api/v1/data"):a,R=c.split("|"),F=R.includes("flip"),H=(B=!je&&!F)?R.concat("flip"):R,z=[Te(x),f&&"label=".concat(f)].filter(Boolean),G="POST"===y?{data:Object(g.a)({filter:{nodeIDs:_,context:n,dimensions:h?h.split(/['|]/):void 0,labels:p},after:u,before:d,points:i,group:s,gtime:l,agent_options:H},m&&{post_aggregation_methods:[m]},{aggregations:["dimension"!==x&&{method:v||"sum",groupBy:["chart"].concat(Object(C.a)(z))},"chart"!==x&&Object(g.a)({method:b,groupBy:z},A.length&&{labels:A})].filter(Boolean)})}:{params:{chart:r,_:(new Date).valueOf(),format:o,points:i,group:s,gtime:l,options:c,after:u,before:d,dimensions:h}},W=function(e){if(null===e||void 0===e?void 0:e.result){var t=k.fillMissingPoints,a=K(e,o,B),n=Object(g.a)({},a,{},"post_aggregated_data"in e.result&&{postAggregationMethod:m,groupBy:x,postGroupBy:f,aggrGroups:A,postAggregated:e.result.post_aggregated_data[m]});Ce.put(_e.c.success({chartData:t?Y(n,t):n,fetchDataParams:k,id:j}))}else Ce.put(_e.c.failure({id:j}))},V=function(e){console.warn("fetch chart data failure",e),Ce.put(_e.c.failure({id:j}))},Pe.next(Object(g.a)({},G,{method:y||"GET",url:N,onErrorCallback:V,onSuccessCallback:W,cancelTokenSource:T}));case 25:case"end":return E.stop()}}),Oe)}var Le=z(1),Ie=Object(A.a)(Le,2),Ne=Ie[0],Re=Ie[1];function Fe(e){var t=e.payload,a=t.host,n=t.chart,r=t.format,o=t.points,i=t.group,s=t.gtime,l=t.options,c=t.after,u=t.before,d=t.dimensions,h=t.aggrMethod,p=t.groupBy,f=t.nodeIDs,m=t.chartLibrary,b=t.id,v="".concat(n,",").concat(m,",").concat(ke(d,l)),_="".concat(Object(D.a)(a),"api/v1/data"),y=Object(g.a)({chart:n,_:(new Date).valueOf(),format:r,points:o,group:i,gtime:s,options:l,after:c,before:u,dimensions:d},h&&{aggr_method:h},{},f&&{node_ids:f.join(",")},{},p&&{groupBy:p});Ne.next({url:_,params:y,onErrorCallback:function(){Ce.put(_e.e.failure({id:b})),window.chartUpdated({chartDataUniqueID:v,chart:n,data:null})},onSuccessCallback:function(e){Ce.put(_e.e.success({snapshotData:e,id:b})),window.chartUpdated({chartDataUniqueID:v,data:e})}})}function Be(){Re.next()}function He(e){var t,a,n,r,o,i,s;return E.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.payload,a=t.chart,n=t.id,r=t.host,l.next=4,Object(S.d)(ue.E);case 4:if(!(o=l.sent)){l.next=9;break}return l.next=8,Object(S.c)(_e.b.success({chartMetadata:o.charts.charts[a],id:n}));case 8:return l.abrupt("return");case 9:return s=U.b?"".concat(Object(D.a)(r),"api/v1/chart"):r.replace("/data","/chart"),l.prev=10,l.next=13,Object(S.a)(T.get,s,{params:{chart:a}});case 13:i=l.sent,l.next=22;break;case 16:return l.prev=16,l.t0=l.catch(10),console.warn("fetch chart details failure"),l.next=21,Object(S.c)(_e.b.failure({id:n}));case 21:return l.abrupt("return");case 22:return l.next=24,Object(S.c)(_e.b.success({chartMetadata:i.data,id:n}));case 24:case"end":return l.stop()}}),xe,null,[[10,16]])}function ze(e){var t,a,n,r,o,i,s,l,c,u,d;return E.a.wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return t=e.payload,a=t.poll,n=!1,r=!1,o=!1,i=!1,p.prev=6,p.next=9,Object(S.d)(ue.y);case 9:return s=p.sent,l=null===s||void 0===s?void 0:s.isCloudAvailable,c=null===s||void 0===s?void 0:s.isACLKAvailable,p.next=14,Object(S.a)(T.get,"".concat(D.b,"/api/v1/info"));case 14:return u=p.sent,d=u.data,o=(null===d||void 0===d?void 0:d["cloud-available"])||!1,n=(null===d||void 0===d?void 0:d["cloud-enabled"])||!1,r=(null===d||void 0===d?void 0:d["agent-claimed"])||!1,i=(null===d||void 0===d?void 0:d["aclk-available"])||!1,p.next=22,Object(S.c)(_e.f.success({isCloudAvailable:o,isCloudEnabled:n,isAgentClaimed:r,isACLKAvailable:i,fullInfoPayload:d}));case 22:n&&null===l&&!o&&le(),o&&r&&!1!==c&&!i&&ce(),p.next=31;break;case 26:return p.prev=26,p.t0=p.catch(6),console.warn("fetch agent info failure"),p.next=31,Object(S.c)(_e.f.failure());case 31:if(!(a&&n&&r)){p.next=36;break}return p.next=34,Object(S.b)(h.b);case 34:return p.next=36,Object(S.c)(Object(_e.f)({poll:!0}));case 36:case"end":return p.stop()}}),we,null,[[6,26]])}function Ue(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.g)(_e.c.request,Me);case 2:return e.next=4,Object(S.g)(_e.b.request,He);case 4:return e.next=6,Object(S.g)(_e.e.request,Fe);case 6:return e.next=8,Object(S.g)(b.f,Be);case 8:return e.next=10,Object(S.g)(_e.f.request,ze);case 10:return e.next=12,Object(S.e)(Ae);case 12:case"end":return e.stop()}}),Ee)}var Ge=a(284),We=a(553),Ve=a(28),Ye=a(98),Xe=.2,Ke=a(12),Ze=a(532),qe=a(49),$e=a(219),Je=a(142),Qe=E.a.mark(mt),et=E.a.mark(vt),tt=E.a.mark(_t),at=E.a.mark(yt),nt=E.a.mark(Ot),rt=E.a.mark(xt),ot=E.a.mark(wt),it=1e3,st=1e4,lt=500,ct="Notification"in window,ut=window.netdataAlarmsNotifCallback,dt=0,ht=0,pt=function(e){"object"===typeof e&&(function(e){if("string"===typeof e){var t=document.querySelector("#chart_".concat(Object(Je.a)(e)));if(t){var a=t.offsetTop+-50;return document.querySelector("html").scrollTop=a,!0}}return!1}(e.chart)&&window.focus())},ft=function(){ct&&"default"===Notification.permission&&Notification.requestPermission()},gt=function(){return ct&&"granted"===Notification.permission};function mt(e,t){var a,n;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(S.a)(T.get,"".concat(t,"/api/v1/alarm_log?after=").concat(e));case 3:return a=r.sent,n=a.data,r.abrupt("return",n);case 8:return r.prev=8,r.t0=r.catch(0),console.warn("Error fetching alarms log",r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),Qe,null,[[0,8]])}var bt=function(e,t,a){if(!e.updated){var n=e.value_string,r=t.alarms["".concat(e.chart,".").concat(e.name)];"undefined"!==typeof r&&e.status===r.status&&"undefined"!==typeof r.value_string&&(n=r.value_string);var o=e.name.replace(/_/g," "),i=e.status.toLowerCase(),s="".concat(o," = ").concat(n),l=e.alarm_id,c="images/banner-icon-144x144.png",u=!1,d=!0;switch(e.status){case"REMOVED":d=!1;break;case"UNDEFINED":case"UNINITIALIZED":return;case"CLEAR":if(e.unique_id<a)return;if("UNINITIALIZED"===e.old_status||"UNDEFINED"===e.old_status)return;if(e.no_clear_notification)return;s="".concat(o," back to normal (").concat(n,")"),c="images/check-mark-2-128-green.png",u=!1;break;case"WARNING":"CRITICAL"===e.old_status&&(i="demoted to ".concat(e.status.toLowerCase())),c="images/alert-128-orange.png",u=!1;break;case"CRITICAL":"WARNING"===e.old_status&&(i="escalated to ".concat(e.status.toLowerCase())),c="images/alert-128-red.png",u=!0;break;default:return void console.warn("invalid alarm status ".concat(e.status))}return d&&("function"===typeof ut&&(d=ut(e)),d)?{notificationTitle:s,notificationOptions:{body:"".concat(e.hostname," - ").concat(e.chart," (").concat(e.family,") - ").concat(i,": ").concat(e.info),tag:"".concat(l),requireInteraction:u,icon:D.c+c,data:e},notificationHandler:function(e){if(e.preventDefault(),e.target){var t=e.target.data;pt(t)}}}:void 0}};function vt(e,t){var a,n,r,o,i,s,l,c,u;return E.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,Object(S.a)(mt,ht,e);case 2:if(null!==(a=d.sent)&&"object"===typeof a){d.next=6;break}return console.warn("invalid alarms log response"),d.abrupt("return");case 6:if(0!==a.length){d.next=9;break}return console.log("received empty alarm log"),d.abrupt("return");case 9:n=Object(Ze.a)(Object(qe.a)("unique_id"),a),r=n.filter((function(e){return e.unique_id>ht})),o=r.map((function(e){return bt(e,t,dt)})).filter((function(e){return void 0!==e})),i=0;case 13:if(!(i<o.length)){d.next=22;break}return s=o[i],l=s.notificationTitle,c=s.notificationOptions,u=s.notificationHandler,new Notification(l,c).onclick=u,d.next=19,Object(S.b)(lt);case 19:i+=1,d.next=13;break;case 22:ht=Object($e.a)(n).unique_id,("undefined"===typeof window.netdataAlarmsRemember||window.netdataAlarmsRemember)&&localStorage.setItem("last_notification_id","".concat(ht));case 24:case"end":return d.stop()}}),et)}function _t(e,t){var a,n;return E.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(S.a)(T.get,"".concat(t,"/api/v1/alarms?").concat(e));case 2:return a=r.sent,n=a.data,0===dt&&"number"===typeof n.latest_alarm_log_unique_id&&(dt=n.latest_alarm_log_unique_id),r.abrupt("return",n);case 6:case"end":return r.stop()}}),tt)}function yt(e){var t;return E.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=3,Object(S.a)(_t,"active",e);case 3:if(!(t=a.sent)){a.next=12;break}return a.next=7,Object(S.c)(Object(Ke.B)({activeAlarms:t}));case 7:if(!(gt()&&t.latest_alarm_log_unique_id>ht)){a.next=12;break}return a.next=10,Object(S.a)(vt,e,t);case 10:if(!1!==t.status){a.next=12;break}return a.abrupt("break",16);case 12:return a.next=14,Object(S.b)(st);case 14:a.next=0;break;case 16:case"end":return a.stop()}}),at)}function Ot(){var e,t,a;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(S.f)(Ke.A);case 2:return e=n.sent,t=e.payload,a=t.serverDefault,n.next=7,Object(S.b)(it);case 7:return ht=+(localStorage.getItem("last_notification_id")||ht),ft(),n.next=11,Object(S.a)(yt,a);case 11:case"end":return n.stop()}}),nt)}function xt(e){var t,a,n,r;return E.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload,a=t.callback,n=t.serverDefault,o.next=4,Object(S.a)(_t,"all",n);case 4:r=o.sent,a(r);case 6:case"end":return o.stop()}}),rt)}function wt(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.e)(Ot);case 2:return e.next=4,Object(S.g)(Ke.e.request,xt);case 4:case"end":return e.stop()}}),ot)}var Et=["","https://www.google.com/","https://duckduckgo.com/","https://www.reddit.com/"],St=function(e){return Et.includes(e)||e.endsWith(".my-netdata.io/")||e.startsWith("https://github.com/")||e.endsWith("netdata.cloud/")||e.startsWith("https://app.netdata.cloud/")},Ct=E.a.mark(Lt),At=E.a.mark(It),kt=E.a.mark(Nt),jt=E.a.mark(Bt),Tt=E.a.mark(Ut),Dt=E.a.mark(Gt),Pt=Object(c.a)();function Mt(){window.addEventListener("focus",(function(){Pt.put(Object(Ke.D)({hasWindowFocus:!0}))})),window.addEventListener("blur",(function(){Pt.put(Object(Ke.D)({hasWindowFocus:!1}))}))}function Lt(){var e;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Object(S.f)(Pt);case 3:return e=t.sent,t.next=6,Object(S.c)(e);case 6:t.next=0;break;case 8:case"end":return t.stop()}}),Ct)}function It(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.f)(_e.f.success);case 2:return e.abrupt("return",e.sent.payload.fullInfoPayload);case 3:case"end":return e.stop()}}),At)}function Nt(e,t){var a,n,r,o,i,s;return E.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(!window.posthog){l.next=2;break}return l.abrupt("return");case 2:return l.next=4,Object(S.d)(ue.k);case 4:if(l.t1=l.sent,l.t1){l.next=9;break}return l.next=8,Object(S.a)(It);case 8:l.t1=l.sent;case 9:if(l.t0=l.t1,l.t0){l.next=12;break}l.t0={};case 12:i=l.t0,function(e,t){var a,n,r,o;t.__SV||(window.posthog=t,t._i=[],t.init=function(i,s,l){function c(e,t){var a=t.split(".");2==a.length&&(e=e[a[0]],t=a[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}(r=e.createElement("script")).type="text/javascript",r.async=!0,r.src=s.api_host+"/static/array.js",(o=e.getElementsByTagName("script")[0]).parentNode.insertBefore(r,o);var u=t;for(void 0!==l?u=t[l]=[]:l="posthog",u.people=u.people||[],u.toString=function(e){var t="posthog";return"posthog"!==l&&(t+="."+l),e||(t+=" (stub)"),t},u.people.toString=function(){return u.toString(1)+".people (stub)"},a="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags".split(" "),n=0;n<a.length;n++)c(u,a[n]);t._i.push([i,s,l])},t.__SV=1)}(document,window.posthog||[]),window.posthog.init("mqkwGT0JNFqO-zX2t0mW6Tec9yooaVu7xCBlXtHnt5Y",{api_host:"https://posthog.netdata.cloud",loaded:function(e){t&&e.identify(t)}}),s=!Ye.a&&!St(document.referrer),"masked",window.posthog.register(Object(Ge.a)((function(e){return void 0!==e&&null!==e}),{$ip:"127.0.0.1",$current_url:Ye.a?null:"agent dashboard",$pathname:Ye.a?null:"netdata-dashboard",$host:Ye.a?null:"dashboard.netdata.io",$initial_referring_domain:s?"masked":null,$initial_referrer:s?"masked":null,$referring_domain:s?"masked":null,$referrer:s?"masked":null,event_source:"agent dashboard",netdata_version:i.version,netdata_machine_guid:e,netdata_person_id:t||"Unavailable",netdata_buildinfo:i.buildinfo,netdata_release_channel:i["release-channel"],mirrored_host_count:null===(a=i.mirrored_hosts)||void 0===a?void 0:a.length,alarms_normal:null===(n=i.alarms)||void 0===n?void 0:n.normal,alarms_warning:null===(r=i.alarms)||void 0===r?void 0:r.warning,alarms_critical:i.alarms.critical,host_os_name:i.os_name,host_os_id:i.os_id,host_os_id_like:i.os_id_like,host_os_version:i.os_version,host_os_version_id:i.os_version_id,host_os_detection:i.os_detection,system_cores_total:i.cores_total,system_total_disk_space:i.total_disk_space,system_cpu_freq:i.cpu_freq,system_ram_total:i.ram_total,system_kernel_name:i.kernel_name,system_kernel_version:i.kernel_version,system_architecture:i.architecture,system_virtualization:i.virtualization,system_virt_detection:i.virt_detection,system_container:i.container,system_container_detection:i.container_detection,container_os_name:i.container_os_name,container_os_id:i.container_os_id,container_os_id_like:i.container_os_id_like,container_os_version:i.container_os_version,container_os_version_id:i.container_os_version_id,host_collectors_count:i.collectors.length,host_cloud_enabled:i["cloud-enabled"],host_cloud_available:i["cloud-available"],host_agent_claimed:i["agent-claimed"],host_aclk_available:i["aclk-available"],host_aclk_implementation:i["aclk-implementation"],host_allmetrics_json_used:i["allmetrics-json-used"],host_allmetrics_prometheus_used:i["allmetrics-prometheus-used"],host_allmetrics_shell_used:i["allmetrics-shell-used"],host_charts_count:i["charts-count"],host_dashboard_used:i["dashboard-used"],host_metrics_count:i["metrics-count"],host_notification_methods:i["notification-methods"],config_memory_mode:i["memory-mode"],config_exporting_enabled:i["exporting-enabled"],config_exporting_connectors:i["exporting-connectors"],config_hosts_available:i["hosts-available"],config_https_enabled:i["https-enabled"],config_multidb_disk_quota:i["multidb-disk-quota"],config_page_cache_size:i["page-cache-size"],config_stream_enabled:i["stream-enabled"],config_web_enabled:i["web-enabled"],host_is_parent:null===(o=i.host_labels)||void 0===o?void 0:o._is_parent,mirrored_hosts_reachable:i.mirrored_hosts_status.filter((function(e){return e.reachable})).length,mirrored_hosts_unreachable:i.mirrored_hosts_status.filter((function(e){return!e.reachable})).length,host_collectors:i.collectors,host_is_k8s_node:i.is_k8s_node}));case 18:case"end":return l.stop()}}),kt)}var Rt=function e(t){var a=t.machineGuid,n=t.maxRedirects,r=t.name,o=t.registryServer,i=t.url;return T.get("".concat(o,"/api/v1/registry"),{headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},params:{action:"access",machine:a,name:r,url:i},withCredentials:!0}).then((function(t){var s=t.data,l="string"===typeof s.registry,c=s;if("string"===typeof s.status&&"ok"===s.status||(c=null),null===c)return l&&n>0?e({maxRedirects:n-1,machineGuid:a,name:r,registryServer:s.registry,url:i}):{registryServer:o};var u=s.urls.filter((function(e){return e[1]!==h.c}));return{personGuid:s.person_guid||null,registryServer:o,urls:u}})).catch((function(){return console.warn("error calling registry:",o),null}))},Ft=function(e){var t={};e.slice().reverse().forEach((function(e){var a=Object(A.a)(e,5),n=a[0],r=a[1],o=a[2],i=a[3],s=a[4],l=t[n]||{lastTimestamp:0,accesses:0,alternateUrls:[],guid:"",url:"",name:""},c=l.lastTimestamp<o,u={guid:l.guid||n,url:c?r:l.url,lastTimestamp:c?o:l.lastTimestamp,accesses:l.accesses+i,name:c?s:l.name,alternateUrls:l.alternateUrls.concat(r)};t[n]=u}));var a=Object(We.a)(e.slice().reverse().map((function(e){return Object(A.a)(e,1)[0]}))).map((function(e){return t[e]}));return{registryMachines:t,registryMachinesArray:a}};function Bt(e){var t,a,n,r,o,i,s,l,c,u,d,p,f,g,m;return E.a.wrap((function(b){for(;;)switch(b.prev=b.next){case 0:return t=e.payload,a=t.serverDefault,n="".concat(a,"api/v1/registry?action=hello"),b.prev=3,b.next=6,Object(S.a)(T.get,n,{headers:{"Cache-Control":"no-cache, no-store",Pragma:"no-cache"},withCredentials:!0});case 6:r=b.sent,b.next=15;break;case 9:return b.prev=9,b.t0=b.catch(3),console.warn("error accessing registry or Do-Not-Track is enabled"),b.next=14,Object(S.c)(Ke.f.failure());case 14:return b.abrupt("return");case 15:return o=r.data.cloud_base_url,i=r.data.hostname,s=r.data.machine_guid,l=r.data.registry,c=l===Ve.b,b.next=22,Object(S.c)(Ke.f.success({cloudBaseURL:o,hostname:i,isUsingGlobalRegistry:c,machineGuid:s}));case 22:return u=c?h.c:i,d=c?h.c:a,b.next=26,Object(S.a)(Rt,{machineGuid:s,maxRedirects:2,name:u,registryServer:l,url:d});case 26:if(p=b.sent,!r.data.anonymous_statistics){b.next=30;break}return b.next=30,Object(S.e)(Nt,r.data.machine_guid,null===p||void 0===p?void 0:p.personGuid);case 30:if(!((null===p||void 0===p?void 0:p.urls)&&(null===p||void 0===p?void 0:p.personGuid))){b.next=35;break}return f=Ft(p.urls),g=f.registryMachines,m=f.registryMachinesArray,b.next=35,Object(S.c)(Object(Ke.C)({personGuid:p.personGuid,registryMachines:g,registryMachinesArray:m}));case 35:return b.next=37,Object(S.c)(Object(Ke.a)({registryServer:(null===p||void 0===p?void 0:p.registryServer)||l}));case 37:case"end":return b.stop()}}),jt,null,[[3,9]])}var Ht=function(e){return"options.".concat(e)};function zt(e){var t=e.payload,a=t.key,n=t.value;"stop_updates_when_focus_is_lost"!==a&&localStorage.setItem(Ht(a),JSON.stringify(n))}function Ut(e){var t;return E.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return(t=e.payload).isActive?document.body.className="with-panel":document.body.className="",a.next=4,Object(S.b)(1e3*Xe);case 4:return a.next=6,Object(S.c)(Object(Ke.x)({isActive:t.isActive}));case 6:case"end":return a.stop()}}),Tt)}function Gt(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.e)(Mt);case 2:return e.next=4,Object(S.e)(Lt);case 4:return e.next=6,Object(S.g)(Ke.f.request,Bt);case 6:return e.next=8,Object(S.e)(wt);case 8:return e.next=10,Object(S.g)(Ke.v,zt);case 10:return e.next=12,Object(S.g)(Ke.w,Ut);case 12:case"end":return e.stop()}}),Dt)}var Wt=a(56),Vt=E.a.mark(qt),Yt=E.a.mark($t),Xt="LOCAL-STORAGE-NEEDS-SYNC";function Kt(e){var t=e.payload,a=t.after,n=t.before;if(window.urlOptions)window.urlOptions.after===a&&window.urlOptions.before===n||window.urlOptions.netdataHighlightCallback(!0,a,n);else{var r=Object(Wt.b)(),o=Math.round(a).toString(),i=Math.round(n).toString();r.highlight_after===o&&r.highlight_before===i||Object(Wt.e)({highlight_after:o,highlight_before:i})}}function Zt(){window.urlOptions?window.urlOptions.netdataHighlightCallback(!1,0,0):Object(Wt.d)(["highlight_after","highlight_before"])}function qt(e){var t,a;return E.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.payload,!window.showSignInModal){n.next=8;break}return window.showSignInModal(),n.next=5,Object(S.f)(b.a);case 5:a=t.signInLinkHref,window.localStorage.setItem(Xt,"true"),window.location.href=a;case 8:case"end":return n.stop()}}),Vt)}function $t(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.g)(Ke.r,Kt);case 2:return e.next=4,Object(S.g)(Ke.d,Zt);case 4:return e.next=6,Object(S.g)(b.d,qt);case 6:case"end":return e.stop()}}),Yt)}var Jt=E.a.mark(Qt);function Qt(){return E.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.e)(Gt);case 2:return e.next=4,Object(S.e)(Ue);case 4:return e.next=6,Object(S.e)($t);case 6:case"end":return e.stop()}}),Jt)}var ea=Object(c.b)(),ta=function(){var e=Object(l.e)(x,Object(l.d)(Object(l.a)(ea)));return ea.run(Qt),e}(),aa=a(270),na=a.n(aa),ra=(a(374),a(393),a(394),a(395),a(396),a(152)),oa=a.n(ra);window.$=oa.a,window.jQuery=oa.a;a(397),a(410),a(411),a(412),a(413),a(416);var ia=function(e){return new Promise((function(t,a){var n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href",e),n.onload=function(){t()},n.onerror=function(){a(Error("Error loading css: ".concat(e)))},document.getElementsByTagName("head")[0].appendChild(n)}))},sa=a(42),la=a(8),ca=a(170),ua=a(287),da=a(535),ha=a(285),pa=a(543),fa=a(560),ga=a(273),ma=a(561),ba=a(34),va=a.n(ba),_a=function(e){return"sparkline"===e.dygraphTheme},ya={dygraph:{hasToolboxPanAndZoom:!0,xssRegexIgnore:new RegExp("^/api/v1/data.result.data$"),format:"json",options:function(e){return"function"===typeof this.isLogScale?"ms|flip".concat(this.isLogScale(e)?"|abs":""):""},hasLegend:function(e){var t=e.legend,a=void 0===t||t;return!_a(e)&&Boolean(a)},trackColors:!0,pixelsPerPoint:function(e){return _a(e)?2:3},isLogScale:function(e){return"logscale"===e.dygraphTheme},containerClass:function(e){return this.hasLegend(e)?va()("netdata-container-with-legend","bottom"===e.legendPosition&&"netdata-container-with-legend--bottom"):"netdata-container"}},sparkline:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$"),format:"array",options:function(){return"flip|abs"},hasLegend:function(){return!1},trackColors:!1,pixelsPerPoint:function(){return 3},containerClass:function(){return"netdata-container"}},peity:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$"),format:"ssvcomma",options:function(){return"null2zero|flip|abs"},hasLegend:function(){return!1},trackColors:!1,pixelsPerPoint:function(){return 3},containerClass:function(){return"netdata-container"}},google:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result.rows$"),format:"datatable",options:function(){return""},hasLegend:function(){return!1},trackColors:!1,pixelsPerPoint:function(){return 4},containerClass:function(){return"netdata-container"}},d3pie:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result.data$"),format:"json",hasLegend:function(){return!1},options:function(){return"objectrows|ms"},trackColors:!1,pixelsPerPoint:function(){return 15},containerClass:function(){return"netdata-container"}},easypiechart:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$"),format:"array",options:function(){return"absolute"},hasLegend:function(){return!1},trackColors:!0,pixelsPerPoint:function(){return 3},aspectRatio:100,containerClass:function(){return"netdata-container-easypiechart"}},gauge:{hasToolboxPanAndZoom:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$"),format:"array",options:function(){return"absolute"},hasLegend:function(){return!1},trackColors:!0,pixelsPerPoint:function(){return 3},aspectRatio:60,containerClass:function(){return"netdata-container-gauge"}},textonly:{containerClass:function(){return"netdata-container"},format:"array",hasLegend:function(){return!1},options:function(){return"absolute"},pixelsPerPoint:function(){return 3},trackColors:!1,xssRegexIgnore:new RegExp("^/api/v1/data.result$")},groupbox:{containerClass:function(){return"netdata-container"},hasLegend:function(){return!1},options:function(){return"absolute"},format:"json",trackColors:!1,pixelsPerPoint:function(){return 3},xssRegexIgnore:new RegExp("^/api/v1/data.result$")}},Oa=function(e,t){var a=e.appendOptions,n=e.overrideOptions,r="";return r+=n?n.toString():ya[e.chartLibrary].options(e),"string"===typeof a&&(r+="|".concat(encodeURIComponent(a))),r+="|jsonwrap",t&&(r+="|nonzero"),("sum-of-abs"===e.dimensionsAggrMethod||!e.dimensionsAggrMethod&&e.groupBy&&"dimension"!==e.groupBy)&&(r+="|absolute"),r},xa=a(533),wa=Math.pow(2,31)-1,Ea=a(39),Sa=a(161),Ca=function(e){var t=e.containerNode,a=e.hasEmptyData,n=window.screen.height,o=t.clientHeight,i=Math.max(.2*o,5);o-=i;var s=(i-5)/2,l=t.clientWidth/10;o>l&&(s+=(o-l)/2,o=l),o>n/20&&(s+=(o-n/20)/2,o=n/20);var c=a?" empty":" netdata",u=a?"noData":"loading";return r.a.createElement("div",{className:"netdata-message icon",style:{fontSize:o,paddingTop:s}},r.a.createElement(Sa.a,{iconType:u}),c)},Aa=a(541),ka=a(540),ja=function(e){return e.ctrlKey?window.NETDATA.options.current.pan_and_zoom_factor*window.NETDATA.options.current.pan_and_zoom_factor_multiplier_control:e.shiftKey?window.NETDATA.options.current.pan_and_zoom_factor*window.NETDATA.options.current.pan_and_zoom_factor_multiplier_shift:e.altKey?window.NETDATA.options.current.pan_and_zoom_factor*window.NETDATA.options.current.pan_and_zoom_factor_multiplier_alt:window.NETDATA.options.current.pan_and_zoom_factor},Ta=a(146),Da=a(100),Pa=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)},Ma=[],La=[],Ia=function(e,t){var a=t;return e===t?("undefined"===typeof Ma[a]&&(Ma[a]=new Intl.NumberFormat(void 0,{useGrouping:!0,minimumFractionDigits:e,maximumFractionDigits:t})),Ma[a]):0===e?("undefined"===typeof La[a]&&(La[a]=new Intl.NumberFormat(void 0,{useGrouping:!0,minimumFractionDigits:e,maximumFractionDigits:t})),La[a]):new Intl.NumberFormat(void 0,{useGrouping:!0,minimumFractionDigits:e,maximumFractionDigits:t})},Na=function(e,t,a){return function(n){if("number"!==typeof n)return"-";var r,o,i=e(n);if("number"!==typeof i)return i;if(null!==t)return t.format(i);if(-1!==a)r=a,o=a;else{r=0;var s=i<0?-i:i;o=s>1e3?0:s>10?1:s>1?2:s>.1?2:s>.01?4:s>.001?5:s>1e-4?6:7}return Ia(r,o).format(i)}},Ra=function(e){var t=e.attributes,a=e.data,r=e.units,o=e.unitsCommon,i=e.unitsDesired,s=e.uuid,l=Object(la.b)(ue.K),c=Object(la.b)(ue.z),u=Object(n.useState)((function(){return Ta.a})),d=Object(A.a)(u,2),h=d[0],p=d[1],f=Object(n.useState)(),g=Object(A.a)(f,2),m=g[0],b=g[1],v=Object(n.useState)(),_=Object(A.a)(v,2),y=_[0],O=_[1],x=Object(n.useState)(r),w=Object(A.a)(x,2),E=w[0],S=w[1],C=Object(n.useState)(-1),k=Object(A.a)(C,2),j=k[0],T=k[1],D=Object(n.useState)(null),P=Object(A.a)(D,2),M=P[0],L=P[1],I=t.decimalDigits,N=void 0===I?-1:I,R=Object(n.useMemo)((function(){return Na(h,M,N)}),[h,N,M]),F=Object(n.useRef)(R),B=function(e,t,a){F.current=Na(e,t,a)};return{legendFormatValue:R,legendFormatValueDecimalsFromMinMax:Object(n.useCallback)((function(e,t){if(Pa(m,e)&&Pa(y,t))return F.current;b(e),O(t);var n=Da.a.get(s,e,t,r,i,o,(function(e){S(e)}),l,c);p((function(){return n}));var u,d=n(e),h=n(t);if("number"!==typeof d||"number"!==typeof h)return B(n,M,N),F.current;if(a.min===a.max)u=-1;else if(-1!==N)u=N;else{var f;u=(f=d===h?Math.abs(d):Math.abs(h-d))>1e3?0:f>10?1:f>1?2:f>.1?2:f>.01?4:f>.001?5:f>1e-4?6:7}var g=M;return u!==j&&(g=u<0?null:Ia(u,u),L((function(){return g})),T(u)),B(n,g,u),F.current}),[j,N,m,y,s,l,r,i,o,c,a.min,a.max,M]),unitsCurrent:E}},Fa=a(55),Ba={r:255,g:0,b:0},Ha=a(17),za=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendContainer",componentId:"ltgk2z-0"})(["margin-bottom:",";padding-left:35px;"],Object(Z.H)(3)),Ua=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendFirstRow",componentId:"ltgk2z-1"})(["margin-top:4px;display:flex;justify-content:space-between;"]),Ga=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendSecondRow",componentId:"ltgk2z-2"})(["margin-top:4px;display:flex;justify-content:space-between;"]),Wa=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendUnit",componentId:"ltgk2z-3"})([""]),Va=$.d.span.withConfig({displayName:"chart-legend-bottomstyled__DateTimeSeparator",componentId:"ltgk2z-4"})(["margin:0 3px;"]),Ya=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__LegendItems",componentId:"ltgk2z-5"})(["display:flex;flex-wrap:wrap;overflow:auto;max-height:80px;"]),Xa=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__DimensionItem",componentId:"ltgk2z-6"})(["display:flex;align-items:center;color:",";margin-right:12px;cursor:pointer;opacity:",";user-select:none;font-size:11px;&:focus{outline:none;}"],(function(e){return e.color}),(function(e){return e.isDisabled?.3:null})),Ka=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__DimensionItemToolboxPlaceholder",componentId:"ltgk2z-7"})(["width:140px;height:20px;"]),Za=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__DimensionIcon",componentId:"ltgk2z-8"})(["width:14px;height:7px;border-radius:4px;overflow:hidden;background-color:",";"],(function(e){return e.color})),qa=$.d.span.withConfig({displayName:"chart-legend-bottomstyled__DimensionLabel",componentId:"ltgk2z-9"})(["margin-left:3px;"]),$a=$.d.span.withConfig({displayName:"chart-legend-bottomstyled__DimensionValue",componentId:"ltgk2z-10"})(["margin-left:5px;min-width:30px;"]),Ja=$.d.div.withConfig({displayName:"chart-legend-bottomstyled__ToolboxContainer",componentId:"ltgk2z-11"})(["position:relative;touch-action:none;"]),Qa={},en=Object(Ha.a)(Ea.f,(function(e){var t=e.dimension_names,a=e.keys;return{dimensionNames:t,keys:void 0===a?Qa:a}})),tn=function(e){var t=e.id,a=e.index,o=Object(la.b)(Object(n.useCallback)((function(e){return en(e,{id:t})}),[t])),i=o.dimensionNames,s=o.keys,l=s.chart,c=s.node;if(l&&c&&2===Object.keys(s).length)return r.a.createElement(qa,null,l[a],"@",c[a]);var u=i[a];return r.a.createElement(qa,null,u)},an=function(e){var t=e.chartUuid,a=e.chartMetadata,o=e.chartLibrary,i=e.colors,s=e.hoveredRow,l=e.hoveredX,c=e.legendFormatValue,u=e.onDimensionClick,d=e.selectedDimensions,h=e.showLatestOnBlur,p=e.unitsCurrent,f=e.viewBefore,g=Object(la.b)(Object(n.useCallback)((function(e){return Object(Ea.f)(e,{id:t})}),[t])),m=g.dimension_names,b=g.dimension_ids,v=-1===s&&!h,_=new Date(l||f),y=window.NETDATA.options.current["color_fill_opacity_".concat(a.chart_type)],O=Object(sa.b)(),x=O.localeDateString,w=O.localeTimeString,E=Object(n.useRef)(null);return Object(n.useEffect)((function(){E.current&&window.Ps.initialize(E.current,{wheelSpeed:.2,wheelPropagation:!0,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,suppressScrollX:!0,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,theme:"default"})}),[E]),r.a.createElement("div",{className:va()("netdata-chart-legend","netdata-".concat(o,"-legend"))},r.a.createElement("span",{className:"netdata-legend-title-date",title:Object(Fa.c)(!0,a)},v?Object(Fa.c)(!1,a):x(_)),r.a.createElement("br",null),r.a.createElement("span",{className:"netdata-legend-title-time",title:Object(Fa.d)(g,a)},v?a.context.toString():w(_)),r.a.createElement("br",null),r.a.createElement("span",{className:"netdata-legend-title-units"},p),r.a.createElement("br",null),r.a.createElement("div",{className:"netdata-legend-series",ref:E},r.a.createElement("div",{className:"netdata-legend-series-content"},b.map((function(e,o){var l,h=m[o],p=i[h],f=function(e){if(!e)return Ba;var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,a,n){return t+t+a+a+n+n})),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return a||console.warn("wrong color format:",e),a?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:Ba}(p),b=0===d.length||d.includes(h);if(v)l=null;else if(-1!==s){var _=g.result.data[s];l=_?_[o+1]:null}else l=g.view_latest_values[o];return r.a.createElement(n.Fragment,{key:e},0!==o&&r.a.createElement("br",null),r.a.createElement("span",{title:h,className:va()("netdata-legend-name",b?"selected":"not-selected"),onClick:function(e){u(h,e)},role:"button",style:{color:p},tabIndex:0},r.a.createElement("table",{className:"netdata-legend-name-table-".concat(a.chart_type),style:{backgroundColor:"rgba(".concat(f.r,",").concat(f.g,",").concat(f.b,",").concat(y,")")}},r.a.createElement("tbody",null,r.a.createElement("tr",{className:"netdata-legend-name-tr"},r.a.createElement("td",{className:"netdata-legend-name-td"}))))," ",r.a.createElement(tn,{id:t,index:o})),r.a.createElement("span",{title:h,className:va()("netdata-legend-value",!b&&"hidden"),onClick:function(e){u(h,e)},role:"button",style:{color:p},tabIndex:0},c(l)))})))))},nn=function(e){var t=e.chartMetadata,a=e.showUndefined,n=e.hoveredX,o=e.viewBefore,i=e.chartData,s=Object(sa.b)(),l=s.localeDateString,c=s.localeTimeString,u=new Date(n||o);return r.a.createElement("div",null,r.a.createElement("span",{title:Object(Fa.c)(!0,t)},a?Object(Fa.c)(!1,t):l(u)),r.a.createElement(Va,null,"|"),r.a.createElement("span",{title:Object(Fa.d)(i,t)},a?t.context.toString():c(u)))},rn=function(e){var t=e.chartUuid,a=e.chartMetadata,o=e.colors,i=e.hoveredRow,s=e.hoveredX,l=e.legendFormatValue,c=e.onDimensionClick,u=e.selectedDimensions,d=e.showLatestOnBlur,h=e.unitsCurrent,p=e.viewBefore,f=e.legendToolbox,g=e.resizeHandler,m=-1===i&&!d,b=Object(la.b)(Object(n.useCallback)((function(e){return Object(Ea.f)(e,{id:t})}),[t])),v=b.dimension_names,_=b.dimension_ids;return r.a.createElement(za,null,r.a.createElement(Ua,null,r.a.createElement(Wa,null,h),r.a.createElement(nn,{chartMetadata:a,showUndefined:m,hoveredX:s,viewBefore:p,chartData:b})),r.a.createElement(Ga,null,r.a.createElement(Ya,null,_.map((function(e,a){var n,s=v[a],d=o[s],h=0===u.length||u.includes(s);if(m)n=null;else if(-1!==i){var p=b.result.data[i];n=p?p[a+1]:null}else n=b.view_latest_values[a];return r.a.createElement(Xa,{color:d,onClick:function(e){c(s,e)},role:"button",tabIndex:0,isDisabled:!h,key:e},r.a.createElement(Za,{title:s,color:d}),r.a.createElement(tn,{id:t,index:a}),r.a.createElement($a,null,h&&l(n)))})),r.a.createElement(Ka,null)),r.a.createElement(Ja,null,f,g)))},on=function(e){var t=e.attributes,a=e.chartUuid,o=e.chartMetadata,i=e.chartLibrary,s=e.colors,l=e.hoveredRow,c=e.hoveredX,u=e.legendFormatValue,d=e.selectedDimensions,h=e.setSelectedDimensions,p=e.showLatestOnBlur,f=e.unitsCurrent,g=e.viewBefore,m=e.legendToolbox,b=e.resizeHandler,v=Object(la.b)(Object(n.useCallback)((function(e){return Object(Ea.f)(e,{id:a}).dimension_names}),[a])),_=function(e,t){t.preventDefault();var a=t.shiftKey||t.ctrlKey,n=Object(Fa.b)({allDimensions:v,selectedDimensions:d,clickedDimensionName:e,isModifierKeyPressed:a});h(n)};return"bottom"===t.legendPosition?r.a.createElement(rn,{chartUuid:a,chartLibrary:i,chartMetadata:o,colors:s,hoveredRow:l,hoveredX:c,legendFormatValue:u,onDimensionClick:_,selectedDimensions:d,showLatestOnBlur:p,unitsCurrent:f,viewBefore:g,legendToolbox:m,resizeHandler:b}):r.a.createElement(an,{chartUuid:a,chartLibrary:i,chartMetadata:o,colors:s,hoveredRow:l,hoveredX:c,legendFormatValue:u,onDimensionClick:_,selectedDimensions:d,showLatestOnBlur:p,unitsCurrent:f,viewBefore:g})},sn=a(110),ln=function(e){var t=e.onToolboxLeftClick,a=e.onToolboxRightClick,n=e.onToolboxZoomInClick,o=e.onToolboxZoomOutClick;return r.a.createElement("div",{className:"netdata-legend-toolbox"},r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:t,iconType:"left",popoverTitle:"Pan Left",popoverContent:"Pan the chart to the left. You can also <b>drag it</b> with your mouse or your finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>"}),r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:a,iconType:"right",popoverTitle:"Pan Right",popoverContent:"Pan the chart to the right. You can also <b>drag it</b> with your mouse or your finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>"}),r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:n,iconType:"zoomIn",popoverTitle:"Chart Zoom In",popoverContent:"Zoom in the chart. You can also press SHIFT and select an area of the chart, or press SHIFT or ALT and use the mouse wheel or 2-finger touchpad scroll to zoom in or out. <br/><small>Help can be disabled from the settings.</small>"}),r.a.createElement(sn.a,{className:"netdata-legend-toolbox-button",onClick:o,iconType:"zoomOut",popoverTitle:"Chart Zoom Out",popoverContent:"Zoom out the chart. You can also press SHIFT or ALT and use the mouse wheel, or 2-finger touchpad scroll to zoom in or out.<br/><small>Help can be disabled from the settings.</small>"}))},cn=a(104),un=a(503),dn=a(534),hn=a(51),pn=a.n(hn),fn=(a(418),a(271)),gn=a(272),mn=a(500),bn=a(215),vn=a.n(bn),_n=function(e,t){return e.map((function(e){var a=Object(gn.a)(e),n=a[0],r=a.slice(1),o=[],i=0,s=0;return r.map((function(e,a){return{isVisible:t[a],value:e}})).slice().reverse().forEach((function(e){var t=e.isVisible,a=e.value;t?a>=0?(s+=a,o.push(s)):(i+=a,o.push(i)):o.push(0)})),[n].concat(o)}))},yn=function(e,t,a,n){var r,o=n.isLogScale(e),i=e.dygraphType,s=void 0===i?a.chart_type:i,l=e.groupBy;if(l&&"dimension"!==l&&("percentage"===(r=a.units)||"percent"===r||-1!==r.indexOf("%")))return"line";var c=s;return"stacked"===c&&1===t.dimensions&&(c="area"),"stacked"===c&&o&&(c="area"),c},On=Object(mn.a)(Object(da.a)("true"),(function(){return vn()(window.NETDATA.themes.current.background)})),xn=function(e){return e.map((function(e){return vn()(e).mix(On(),.2).hex()}))},wn=function(e,t){return e?window.NETDATA.options.current.color_fill_opacity_fake_stacked:"stacked"===t?window.NETDATA.options.current.color_fill_opacity_stacked:window.NETDATA.options.current.color_fill_opacity_area},En=(a(436),a(536)),Sn=function(e,t){var a=Object(En.a)(!1),r=Object(A.a)(a,2),o=r[0],i=r[1],s=Object(n.useRef)(null),l=Object(n.useCallback)((function(a){var n=a.getArea().x,r=a.toDomXCoord(1e3*t.current.chartData.first_entry),o=r>n;if(i(o),o&&s.current){var l=e.current.getBoundingClientRect().height;s.current.style.left="".concat(n,"px"),s.current.style.right="calc(100% - ".concat(r,"px)"),s.current.style.top="".concat(l/2,"px")}}),[]);return[o,s,l]},Cn=function(e,t,a,n){e.current.style.left="".concat(t,"px"),e.current.style.right="calc(100% - ".concat(a,"px)"),e.current.style.top=n},An=function(){var e=Object(En.a)(!1),t=Object(A.a)(e,2),a=t[0],r=t[1],o=Object(n.useRef)(null);return[a,o,function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Cn;if(e){if(o.current){r(!0);var i=t.getArea(),s=i.x;n(o,s,a,"40px")}}else r(!1)}]},kn=$.d.div.withConfig({displayName:"proceeded-chart-disclaimer__Container",componentId:"sc-5o8wdv-0"})(["display:block;"]),jn=Object(n.forwardRef)((function(e,t){return r.a.createElement(kn,{ref:t,className:"dygraph__history-tip","data-testid":"proceededChartDisclaimer"},r.a.createElement("span",{className:"dygraph__history-tip-content"},"Want to extend your history of real-time metrics?",r.a.createElement("br",null),r.a.createElement("a",{href:"https://learn.netdata.cloud/guides/longer-metrics-storage/",target:"_blank",rel:"noopener noreferrer","data-testid":"proceededChartDisclaimer-configure"},"Configure Netdata's\xa0",r.a.createElement("b",null,"history")),"\xa0or use the\xa0",r.a.createElement("a",{href:"https://learn.netdata.cloud/docs/agent/database/engine/",target:"_blank",rel:"noopener noreferrer","data-testid":"proceededChartDisclaimer-engine"},"DB engine"),"."))})),Tn={WARNING:"#FFF8E1",CRITICAL:"#FFEBEF",CLEAR:"#E5F5E8"},Dn=function(e){return Tn[e]||null},Pn={WARNING:"#FFC300",CRITICAL:"#F59B9B",CLEAR:"#68C47D"},Mn=function(e){return Pn[e]||null},Ln={WARNING:"#536775",CRITICAL:"#FF4136",CLEAR:"#00AB44"},In=function(e){return Ln[e]||null},Nn=$.d.div.withConfig({displayName:"alarmBadge__Container",componentId:"tz967u-0"})(["position:absolute;margin-right:10px;overflow:hidden;pointer-events:none;direction:rtl;z-index:10;"]),Rn=$.d.div.withConfig({displayName:"alarmBadge__Badge",componentId:"tz967u-1"})(["display:inline-block;border-radius:36px;padding:2px 12px;background:",";border:1px solid ",";color:",";font-size:12px;font-weight:700;direction:ltr;white-space:nowrap;"],(function(e){return e.background}),(function(e){return e.border}),(function(e){return e.color})),Fn=Object(n.forwardRef)((function(e,t){var a=e.isVisible,n=e.status,o=e.label;return r.a.createElement(Nn,{ref:t},a&&r.a.createElement(Rn,{background:Dn(n),border:Mn(n),color:In(n)},o))})),Bn=$.d.div.withConfig({displayName:"neutralPill__Container",componentId:"gtu76-0"})(["position:absolute;margin-right:10px;overflow:hidden;pointer-events:none;direction:rtl;z-index:10;"]),Hn=$.d.div.withConfig({displayName:"neutralPill__Badge",componentId:"gtu76-1"})(["display:inline-block;border-radius:36px;padding:2px 12px;background:",";border:1px solid ",";color:",";font-size:12px;font-weight:700;direction:ltr;white-space:nowrap;"],Object(Z.F)("mainBackground"),Object(Z.F)("border"),Object(Z.F)("text")),zn=Object(n.forwardRef)((function(e,t){var a=e.isVisible,n=(e.before-e.after)/1e3;return r.a.createElement(Bn,{ref:t},a&&r.a.createElement(Hn,null,Math.round(n)," sec.",function(e){return e<15?" (Select at least 15 sec)":e>180?" (Select up to 180 sec)":""}(n)))})),Un=function(e){var t=e.attributes,a=e.chartData,n=e.chartMetadata,r=e.chartSettings,o=e.dimensionsVisibility,i=e.hiddenLabelsElementId,s=e.isFakeStacked,l=e.orderedColors,c=e.setMinMax,u=e.shouldSmoothPlot,d=e.unitsCurrent,h=e.xAxisDateString,p=e.xAxisTimeString,f="sparkline"===t.dygraphTheme,g=f?3:4,m=r.isLogScale(t),b=yn(t,a,n,r),v=t.dygraphSmooth,_=void 0===v?"line"===b&&!f:v,y=t.dygraphDrawAxis,O=void 0===y||y,x="bottom"===t.legendPosition,w=t.dygraphColors,E=void 0===w?l:w,S=t.dygraphRightGap,C=void 0===S?5:S,A=t.dygraphShowRangeSelector,k=void 0!==A&&A,j=t.dygraphShowRoller,T=void 0!==j&&j,D=t.dygraphTitle,P=void 0===D?t.title||n.title:D,M=t.dygraphTitleHeight,L=void 0===M?19:M,I=t.dygraphLegend,N=void 0===I?"always":I,R=t.dygraphLabelsDiv,F=void 0===R?i:R,B=t.dygraphLabelsSeparateLine,H=void 0===B||B,z=t.dygraphIncludeZero,U=void 0===z?"stacked"===b:z,G=t.dygraphShowZeroValues,V=void 0===G||G,Y=t.dygraphShowLabelsOnHighLight,X=void 0===Y||Y,K=t.dygraphHideOverlayOnMouseOut,Z=void 0===K||K,q=t.dygraphXRangePad,$=void 0===q?0:q,J=t.dygraphYRangePad,Q=void 0===J?1:J,ee=t.dygraphValueRange,te=void 0===ee?[null,null]:ee,ae=t.dygraphYLabelWidth,ne=void 0===ae?12:ae,re=t.dygraphStrokeWidth,oe=void 0===re?"stacked"===b?.1:!0===_?1.5:.7:re,ie=t.dygraphStrokePattern,se=t.dygraphDrawPoints,le=void 0!==se&&se,ce=t.dygraphDrawGapEdgePoints,ue=void 0===ce||ce,de=t.dygraphConnectSeparatedPoints,he=void 0!==de&&de,pe=t.dygraphPointSize,fe=void 0===pe?1:pe,ge=t.dygraphStepPlot,me=void 0!==ge&&ge,be=t.dygraphStrokeBorderColor,ve=void 0===be?window.NETDATA.themes.current.background:be,_e=t.dygraphStrokeBorderWidth,ye=void 0===_e?0:_e,Oe=t.dygraphFillGraph,xe=void 0===Oe?"area"===b||"stacked"===b:Oe,we=t.dygraphFillAlpha,Ee=void 0===we?wn(s,b):we,Se=t.dygraphStackedGraph,Ce=void 0===Se?"stacked"===b&&!s:Se,Ae=t.dygraphStackedGraphNanFill,ke=void 0===Ae?"none":Ae,je=t.dygraphAxisLabelFontSize,Te=void 0===je?10:je,De=t.dygraphAxisLineColor,Pe=void 0===De?window.NETDATA.themes.current.axis:De,Me=t.dygraphAxisLineWidth,Le=void 0===Me?1:Me,Ie=t.dygraphDrawGrid,Ne=void 0===Ie||Ie,Re=t.dygraphGridLinePattern,Fe=t.dygraphGridLineWidth,Be=void 0===Fe?1:Fe,He=t.dygraphGridLineColor,ze=void 0===He?window.NETDATA.themes.current.grid:He,Ue=t.dygraphMaxNumberWidth,Ge=void 0===Ue?8:Ue,We=t.dygraphSigFigs,Ve=t.dygraphDigitsAfterDecimal,Ye=void 0===Ve?2:Ve,Xe=t.dygraphHighlighCircleSize,Ke=void 0===Xe?g:Xe,Ze=t.dygraphHighlightSeriesOpts,qe=t.dygraphHighlightSeriesBackgroundAlpha,$e=t.dygraphXPixelsPerLabel,Je=void 0===$e?50:$e,Qe=t.dygraphXAxisLabelWidth,et=void 0===Qe?60:Qe,tt=t.dygraphDrawXAxis,at=void 0===tt?O:tt,nt=t.dygraphYPixelsPerLabel,rt=void 0===nt?15:nt,ot=t.dygraphYAxisLabelWidth,it=void 0===ot?x?30:50:ot,st=t.dygraphDrawYAxis,lt=void 0===st?O:st;return{colors:s?xn(Object(W.a)(E)):E,rightGap:f?0:C,showRangeSelector:k,showRoller:T,title:f?void 0:P,titleHeight:L,legend:N,labels:a.result.labels,labelsDiv:F,labelsSeparateLines:!!f||H,labelsShowZeroValues:!m&&V,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:X,hideOverlayOnMouseOut:Z,includeZero:U,xRangePad:$,yRangePad:f?1:Q,valueRange:te,ylabel:f||x?void 0:d,yLabelWidth:f||x?0:ne,plotter:_&&u?window.smoothPlotter:null,strokeWidth:oe,strokePattern:ie,drawPoints:le,drawGapEdgePoints:ue,connectSeparatedPoints:!m&&he,pointSize:fe,stepPlot:me,strokeBorderColor:ve,strokeBorderWidth:ye,fillGraph:xe,fillAlpha:Ee,stackedGraph:Ce,stackedGraphNaNFill:ke,drawAxis:!f&&O,axisLabelFontSize:Te,axisLineColor:Pe,axisLineWidth:Le,drawGrid:!f&&Ne,gridLinePattern:Re,gridLineWidth:Be,gridLineColor:ze,maxNumberWidth:Ge,sigFigs:We,digitsAfterDecimal:Ye,highlightCircleSize:Ke,highlightSeriesOpts:Ze,highlightSeriesBackgroundAlpha:qe,visibility:o,logscale:m,axes:{x:{pixelsPerLabel:Je,ticker:pn.a.dateTicker,axisLabelWidth:et,drawAxis:!f&&at,axisLabelFormatter:function(e){return e.toTimeString().startsWith("00:00:00")?h(e):p(e)}},y:{logscale:m,pixelsPerLabel:rt,axisLabelWidth:it,drawAxis:!f&<,axisLabelFormatter:function(e){return c([this.axes_[0].extremeRange[0],this.axes_[0].extremeRange[1]])(e)}}}}},Gn=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.chartLibrary,c=e.chartUuid,u=e.dimensionsVisibility,d=e.hasEmptyData,h=e.hasLegend,p=e.isRemotelyControlled,f=e.onUpdateChartPanAndZoom,m=e.orderedColors,b=e.immediatelyDispatchPanAndZoom,v=e.hoveredRow,_=e.hoveredX,y=e.setGlobalChartUnderlay,O=e.setHoveredX,x=e.setMinMax,w=e.unitsCurrent,E=e.viewAfter,S=e.viewBefore,k=Object(la.b)(ue.l),j=Object(la.b)(ue.d),T=(null===j||void 0===j?void 0:j.chartId)===a.id?j:null,D=Object(la.b)(ue.M),P=Object(sa.b)(),M=P.xAxisDateString,L=P.xAxisTimeString,I=ya[l],N="".concat(c,"-hidden-labels-id"),R=yn(t,a,o,I),F=a.min<0&&"stacked"===R,B=wn(F,R),H=Object(n.useRef)(null),z=Object(n.useCallback)((function(e){var t=e.after,a=e.before,n=e.callback,r=e.shouldNotExceedAvailableRange;f({after:t,before:a,callback:n,masterID:c,shouldNotExceedAvailableRange:r})}),[c,f]),U=Object(n.useRef)(),G=Object(n.useRef)(!1),V=Object(n.useRef)(!1),Y=Object(n.useRef)(null),X=Object(n.useRef)(0),K=Object(n.useRef)(0),Z=Object(n.useRef)(),q=Object(la.a)(),$=Object(la.b)(ue.I),J=Object(n.useCallback)((function(){G.current=!1,U.current&&U.current.updateOptions({dateWindow:null}),q($?Object(Ke.j)():Object(_e.g)({id:c}))}),[c,q,$]),Q=An(),ee=Object(A.a)(Q,3),te=ee[0],ae=ee[1],ne=ee[2],re=An(),oe=Object(A.a)(re,3),ie=oe[0],se=oe[1],le=oe[2],ce=Object(n.useRef)({alarm:T,chartData:a,globalChartUnderlay:k,hoveredX:_,immediatelyDispatchPanAndZoom:b,resetGlobalPanAndZoom:J,setGlobalChartUnderlay:y,updateAlarmBadge:ne,updateHighlightBadge:le,updateChartPanOrZoom:z,viewAfter:E,viewBefore:S}),de=Sn(H,ce),he=Object(A.a)(de,3),pe=he[0],fe=he[1],ge=he[2];Object(n.useLayoutEffect)((function(){ce.current.alarm=T,ce.current.chartData=a,ce.current.hoveredX=_,ce.current.immediatelyDispatchPanAndZoom=b,ce.current.globalChartUnderlay=k,ce.current.resetGlobalPanAndZoom=J,ce.current.setGlobalChartUnderlay=y,ce.current.updateAlarmBadge=ne,ce.current.updateHighlightBadge=le,ce.current.updateChartPanOrZoom=z,ce.current.viewAfter=E,ce.current.viewBefore=S}),[T,a,k,_,b,J,y,ne,le,z,E,S]);var me=Object(n.useState)(null),be=Object(A.a)(me,2),ve=be[0],ye=be[1],Oe=Object(la.b)(ue.D);Object(n.useLayoutEffect)((function(){if(H&&H.current&&!U.current&&!d){var e=Un({attributes:t,chartData:a,chartMetadata:o,chartSettings:I,dimensionsVisibility:u,hiddenLabelsElementId:N,isFakeStacked:F,orderedColors:m,setMinMax:x,shouldSmoothPlot:Oe,unitsCurrent:w,xAxisDateString:M,xAxisTimeString:L});G.current=!1;var n=Object(g.a)({},e,{dateWindow:[ce.current.viewAfter,ce.current.viewBefore],highlightCallback:function(e,t){var a=V.current?null:t;a!==ce.current.hoveredX&&O(a)},unhighlightCallback:function(){null!==ce.current.hoveredX&&O(null)},drawCallback:function(e){if(G.current){G.current=!1;var t=e.xAxisRange(),a=Math.round(t[0]),n=Math.round(t[1]);(function(e){var t=e.after,a=e.before,n=e.chartData;return t>=1e3*n.first_entry&&a<=1e3*n.last_entry})({after:a,before:n,chartData:ce.current.chartData})&&ce.current.updateChartPanOrZoom({after:a,before:n})}},zoomCallback:function(e,t){G.current=!0,ce.current.updateChartPanOrZoom({after:e,before:t})},underlayCallback:function(e,t,a){if(ge(a),ce.current.alarm){var n=ce.current.alarm,r=a.toDomXCoord(1e3*n.when),o=Mn(n.status);requestAnimationFrame((function(){e.fillStyle=o;var a=e.globalAlpha;e.globalAlpha=.7,e.fillRect(r-3,t.y,6,t.h),e.globalAlpha=a})),ce.current.updateAlarmBadge(ce.current.alarm,a,r-3)}if(Object(Wt.c)("metrics_correlation")&&ce.current.globalChartUnderlay){var i=ce.current.globalChartUnderlay,s=i.before,l=i.masterID;if(l&&l!==ce.current.chartData.id)ce.current.updateHighlightBadge(!1);else{ce.current.updateHighlightBadge(!0,a,a.toDomXCoord(s),(function(e,t,a,n){e.current.style.left="".concat(a+3,"px"),e.current.style.top=n}))}}else ce.current.updateHighlightBadge(!1);if(ce.current.globalChartUnderlay){var c=ce.current.globalChartUnderlay,u=c.after,d=c.before;if(u<d){var h=a.toDomCoords(u,-20),p=a.toDomCoords(d,20),f=h[0],g=p[0];e.fillStyle=window.NETDATA.themes.current.highlight,e.fillRect(f,t.y,g-f,t.h)}}},interactionModel:{mousedown:function(e,t,a){e.button&&2===e.button||(G.current=!0,V.current=!0,a.initializeMouseDown(e,t,a),a.tarp.tarps=a.tarp.tarps.filter((function(e){var t=Number(e.style.left.replace("px",""))>1e4;return t&&e.parentNode.removeChild(e),!t})),q(Object(Ke.t)()),e.button&&1===e.button?e.shiftKey?(Y.current=null,pn.a.startPan(e,t,a)):e.altKey||e.ctrlKey||e.metaKey?(Y.current=t.toDataXCoord(e.offsetX),pn.a.startZoom(e,t,a)):(Y.current=null,pn.a.startZoom(e,t,a)):e.shiftKey?(Y.current=null,pn.a.startZoom(e,t,a)):e.altKey||e.ctrlKey||e.metaKey?(Y.current=t.toDataXCoord(e.offsetX),pn.a.startZoom(e,t,a)):(Y.current=null,pn.a.startPan(e,t,a)))},mousemove:function(e,t,a){if(null!==Y.current){if(G.current=!0,pn.a.moveZoom(e,t,a),Object(Wt.c)("metrics_correlation")){var n=t.toDataXCoord(e.offsetX),r=Y.current;n-r>1e3&&(ye({after:r,before:n}),ce.current.updateHighlightBadge(!0,t,t.toDomXCoord(n),(function(e,t,a,n){e.current.style.left="".concat(a,"px"),e.current.style.top=n})))}e.preventDefault()}else a.isPanning?(G.current=!0,a.is2DPan=!1,pn.a.movePan(e,t,a)):a.isZooming&&pn.a.moveZoom(e,t,a)},mouseup:function(e,t,n){if(V.current=!1,null!==Y.current){var r=Object(Ze.a)((function(e){return+e}),[Y.current,t.toDataXCoord(e.offsetX)]);ce.current.setGlobalChartUnderlay({after:r[0],before:r[1],masterID:a.id}),Y.current=null,ye(null),n.isZooming=!1,t.clearZoomRect_(),t.drawGraph_(!1)}else n.isPanning?(G.current=!0,pn.a.endPan(e,t,n),ce.current.immediatelyDispatchPanAndZoom()):n.isZooming&&(G.current=!0,pn.a.endZoom(e,t,n),ce.current.immediatelyDispatchPanAndZoom())},wheel:function(e,t){function a(e,t,a){var n=(e[1]-e[0])*t,r=[n*a,n*(1-a)];return[e[0]+r[0],e[1]-r[1]]}if(e.altKey||e.shiftKey){var n;G.current=!0,n="number"!==typeof e.wheelDelta||Number.isNaN(e.wheelDelta)?-1.2*e.deltaY:e.wheelDelta/40;var r=(e.detail?-1*e.detail:n)/50,o=function(e,t,a){var n=e.toDomXCoord(e.xAxisRange()[0]),r=e.yAxisRange(0),o=e.toDomYCoord(r[1]),i=t-n,s=a-o,l=e.toDomXCoord(e.xAxisRange()[1])-n,c=e.toDomYCoord(r[0])-o;return[0===l?0:i/l,1-(0===c?0:s/c)]}(t,e.offsetX,e.offsetY),i=o[0],s=o[1],l=function(e,t,n,r){for(var o=e.yAxisRanges(),i=[],s=0;s<o.length;s+=1)i[s]=a(o[s],t,r||.5);return a(e.xAxisRange(),t,n||.5)}(t,r,i,s),c=Object(A.a)(l,2),u=c[0],d=c[1];ce.current.updateChartPanOrZoom({after:u,before:d,shouldNotExceedAvailableRange:!0,callback:function(e,a){t.updateOptions({dateWindow:[e,a]})}}),e.preventDefault()}},click:function(e){e.preventDefault()},dblclick:function(){q(Object(Ke.k)({forcePlay:!1})),ce.current.resetGlobalPanAndZoom()},touchstart:function(e,t,a){V.current=!0,G.current=!0,pn.a.defaultInteractionModel.touchstart(e,t,a),a.touchDirections={x:!0,y:!1},X.current=0,"number"===typeof e.touches[0].pageX?K.current=e.touches[0].pageX:K.current=0},touchmove:function(e,t,a){G.current=!0,pn.a.defaultInteractionModel.touchmove(e,t,a),X.current=Date.now()},touchend:function(e,t,a){if(V.current=!1,G.current=!0,pn.a.defaultInteractionModel.touchend(e,t,a),0===X.current&&0!==K.current&&H.current){G.current=!1;var n=t.plotter_,r=(K.current-(n.area.x+H.current.getBoundingClientRect().left))/n.area.w,o=ce.current,i=Math.round(o.viewAfter+(o.viewBefore-o.viewAfter)*r);O(i,!0)}var s=Date.now();"undefined"!==typeof Z.current&&(0===X.current&&s-Z.current<=window.NETDATA.options.current.double_click_speed&&ce.current.resetGlobalPanAndZoom());Z.current=s,ce.current.immediatelyDispatchPanAndZoom()}}}),r=F?_n(a.result.data,u):a.result.data,i=new pn.a(H.current,r,n);U.current=i}}),[t,a,o,I,c,u,d,N,F,m,O,x,Oe,w,M,L,ge,q]),Object(fa.a)((function(){if(U.current){var e="sparkline"===t.dygraphTheme,a="bottom"===t.legendPosition;U.current.updateOptions({ylabel:e||a?void 0:w})}}),[t,w]),Object(fa.a)((function(){U.current&&U.current.updateOptions({})}),[T,k]);var xe=Object(la.b)(ue.G);Object(fa.a)((function(){U.current&&window.requestAnimationFrame((function(){U.current&&U.current.resize()}))}),[xe]),Object(fa.a)((function(){if(U.current&&!d){var e=[E,S],n=U.current.xAxisRange(),r=Math.abs(S-E-(n[1]-n[0]))>5e3,o=S<=0&&n[1]>S&&n[0]>E&&!r,i=p&&!o?{dateWindow:e}:{},s=t.dygraphColors,l=void 0===s?m:s,c=F?_n(a.result.data,u):a.result.data,h=1===u.length||u.filter((function(e){return!0===e})).length>1;U.current.updateOptions(Object(g.a)({},i,{colors:F?xn(Object(W.a)(l)):l,file:c,labels:a.result.labels,fillAlpha:B},"stacked"===R?{includeZero:h}:{},{stackedGraph:"stacked"===R&&!F,visibility:F?Object(W.a)(u):u}))}}),[t,a.result,c,u,R,B,d,F,p,m,E,S]),Object(fa.a)((function(){if(U.current){var e=Un({attributes:t,chartData:a,chartMetadata:o,chartSettings:I,dimensionsVisibility:u,hiddenLabelsElementId:N,isFakeStacked:F,orderedColors:m,setMinMax:x,shouldSmoothPlot:Oe,unitsCurrent:w,xAxisDateString:M,xAxisTimeString:L});d||U.current.updateOptions(e)}}),[R,D]);var we=Object(la.b)(ue.p);Object(n.useLayoutEffect)((function(){if(U.current&&we!==c){if(-1===v)return void(-1!==U.current.getSelection()&&U.current.clearSelection());U.current.setSelection(v)}}),[a,c,we,v,E,S]);var Ee=Object(la.b)((function(e){return Object(Ea.l)(e,{id:c})}));Object(n.useLayoutEffect)((function(){U.current&&U.current.resize()}),[Ee,a.dimension_names.length]);var Se=Object(la.b)((function(e){return t.commonMin?Object(ue.h)(e,t.commonMin):void 0})),Ce=Object(la.b)((function(e){return t.commonMax?Object(ue.g)(e,t.commonMax):void 0}));Object(n.useLayoutEffect)((function(){var e=t.commonMin,a=t.commonMax;if(U.current&&(e||a)){var n=U.current.yAxisExtremes()[0],r=Object(A.a)(n,2),o=r[0],i=r[1],s=t.dygraphValueRange,l=void 0===s?[null,null]:s,u=null===l[0],d=null===l[1],h=!1,p=Object(C.a)(n);if(e&&u&&Se&&Se.currentExtreme<o&&(p[0]=Se.currentExtreme,h=!0),a&&d&&Ce&&Ce.currentExtreme>i&&(p[1]=Ce.currentExtreme,h=!0),h){U.current.updateOptions({valueRange:p});var f=U.current.yAxisExtremes()[0];p=Object(C.a)(f)}e&&u&&p[0]!==(null===Se||void 0===Se?void 0:Se.charts[c])&&q(Object(Ke.p)({chartUuid:c,commonMinKey:e,value:p[0]})),a&&d&&p[1]!==(null===Ce||void 0===Ce?void 0:Ce.charts[c])&&q(Object(Ke.o)({chartUuid:c,commonMaxKey:a,value:p[1]}))}}),[t,a.result,c,Se,Ce,q]),Object(n.useLayoutEffect)((function(){pe&&U.current&&ge(U.current)}),[pe]),Object(ga.a)((function(){U.current&&U.current.destroy()}));var Ae=Object(n.useRef)();Object(dn.a)((function(){if(t.detectResize){var e=!1,a=function(e,t){var a=null;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null!==a&&(clearTimeout(a),a=null),a=setTimeout((function(){return e.apply(void 0,r)}),t)}}((function(){e?U.current&&U.current.resize():e=!0}),500);Ae.current=new fn.a((function(){a()})),Ae.current.observe(H.current)}})),Object(ga.a)((function(){U.current=null,Ae.current&&Ae.current.disconnect()}));var ke="bottom"===t.legendPosition;return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{ref:H,id:s,className:va()(i,{"dygraph-chart--legend-bottom":ke})}),pe&&h&&r.a.createElement(jn,{ref:fe}),(null===T||void 0===T?void 0:T.value)&&h&&r.a.createElement(Fn,{isVisible:te,ref:ae,status:T.status,label:T.value}),h&&r.a.createElement(zn,Object.assign({isVisible:ie,ref:se},k,ve)),r.a.createElement("div",{className:"dygraph-chart__labels-hidden",id:N}))},Wn=a(274),Vn=a.n(Wn),Yn=a(193),Xn=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.chartWidth,c=e.hoveredRow,u=e.legendFormatValue,d=e.orderedColors,h=e.setMinMax,p=e.showUndefined,f=e.unitsCurrent,g=Object(n.useRef)(null),m=Object(n.useState)(),b=Object(A.a)(m,2),v=b[0],_=b[1],y=-1===c?0:a.result.length-1-c,O=p?null:a.result[y],x=t.easyPieChartMinValue,w=void 0===x?a.min:x,E=t.easyPieChartMaxValue,S=void 0===E?a.max:E,C=Object(de.a)(Object(Yn.a)((function(e){return+e})),Object(Ze.a)(Ta.a),(function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return[Math.min(a,O||0),Math.max(n,O||0)]}))([w,S]);Object(n.useEffect)((function(){h(C)}),[C]);var k=function(e){var t,a=e.value,n=void 0===a?0:a,r=e.min,o=void 0===r?0:r,i=e.max,s=void 0===i?0:i;return!e.isMinOverride&&o>0&&(o=0),!e.isMaxOverride&&s<0&&(s=0),o<0&&s>0?(s=-o>s?-o:s,t=Math.round(100*n/s)):n>=0&&o>=0&&s>=0?0===(t=Math.round(100*(n-o)/(s-o)))&&(t=.1):0===(t=Math.round(100*(n-s)/(s-o)))&&(t=-.1),t}({value:p?0:O,min:C[0],max:C[1],isMinOverride:void 0!==t.easyPieChartMinValue,isMaxOverride:void 0!==t.easyPieChartMaxValue});Object(n.useEffect)((function(){if(g.current&&!v){var e=Object(ua.a)([[function(e){return e<3},Object(da.a)(2)],[ha.a,Ta.a]])(Math.floor(l/22)),a=t.easyPieChartTrackColor,n=void 0===a?window.NETDATA.themes.current.easypiechart_track:a,r=t.easyPieChartScaleColor,o=void 0===r?window.NETDATA.themes.current.easypiechart_scale:r,i=t.easyPieChartScaleLength,s=void 0===i?5:i,c=t.easyPieChartLineCap,u=void 0===c?"round":c,h=t.easyPieChartLineWidth,p=void 0===h?e:h,f=t.easyPieChartTrackWidth,m=t.easyPieChartSize,b=void 0===m?l:m,y=t.easyPieChartRotate,O=void 0===y?0:y,x=t.easyPieChartAnimate,w=void 0===x?{duration:500,enabled:!0}:x,E=t.easyPieChartEasing,S=new Vn.a(g.current,{barColor:d[0],trackColor:n,scaleColor:o,scaleLength:s,lineCap:u,lineWidth:p,trackWidth:f,size:b,rotate:O,animate:w,easing:E});_(S)}}),[t,a,v,l,d]),Object(n.useEffect)((function(){if(v){var e=-1===c&&!p;e&&!v.options.animate.enabled?v.enableAnimation():!e&&v.options.animate.enabled&&v.disableAnimation(),setTimeout((function(){v.update(k)}),0)}}),[v,c,k,p]);var j=2*l/3/5,T=Math.round((l-j-l/40)/2),D=Math.round(1.6*j/3),P=Math.round(T-2*D-l/40),M=Math.round(.9*D),L=Math.round(T+(j+M)+l/40);return r.a.createElement("div",{ref:g,id:s,className:i},r.a.createElement("span",{className:"easyPieChartLabel",style:{fontSize:j,top:T}},u(O)),r.a.createElement("span",{className:"easyPieChartTitle",style:{fontSize:D,top:P}},t.title||o.title),r.a.createElement("span",{className:"easyPieChartUnits",style:{fontSize:M,top:L}},f))},Kn=a(275),Zn=function(e){return"number"===typeof e},qn=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.chartUuid,c=e.chartHeight,u=e.chartWidth,d=e.hoveredRow,h=e.legendFormatValue,p=e.orderedColors,f=e.setMinMax,g=e.showUndefined,m=e.unitsCurrent,b=Object(n.useRef)(null),v=Object(n.useState)(),_=Object(A.a)(v,2),y=_[0],O=_[1],x=-1===d?0:a.result.length-1-d,w=a.result[x],E=t.gaugeMinValue,S=t.gaugeMaxValue,C=Zn(E)?E:a.min,k=Zn(S)?S:a.max,j=Object(de.a)(Object(Yn.a)((function(e){return+e})),(function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return[!Zn(E)&&a>0?0:a,!Zn(S)&&n<0?0:n]}),Object(Ze.a)(Ta.a),(function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return[Math.min(a,w),Math.max(n,w)]}))([C,k]),T=Object(A.a)(j,2),D=T[0],P=T[1];Object(n.useEffect)((function(){f([D,P])}),[D,P]);var M=Object(de.a)(Object(da.a)(100*(w-D)/(P-D)),(function(e){return Math.max(.001,e)}),(function(e){return Math.min(99.999,e)}))();Object(n.useEffect)((function(){if(b.current&&!y){var e=t.gaugePointerColor,a=void 0===e?window.NETDATA.themes.current.gauge_pointer:e,n=t.gaugeStrokeColor,r=void 0===n?window.NETDATA.themes.current.gauge_stroke:n,o=t.gaugeStartColor,i=void 0===o?p[0]:o,s=t.gaugeStopColor,l=t.gaugeGenerateGradient,c={lines:12,angle:.14,lineWidth:.57,radiusScale:1,pointer:{length:.85,strokeWidth:.045,color:a},limitMax:!0,limitMin:!0,colorStart:i,colorStop:s,strokeColor:r,generateGradient:!0===(void 0!==l&&l),gradientType:0,highDpiSupport:!0},u=new Kn.Gauge(b.current).setOptions(c);u.minValue=0,u.maxValue=100,O(u)}}),[t,a,y,u,p]),Object(n.useEffect)((function(){if(y){var e=-1===d&&!g?32:1e9;y.animationSpeed=e,setTimeout((function(){y.set(g?0:M)}),0)}}),[y,c,u,d,M,g]);var L=Math.floor(c/5),I=Math.round((c-L)/3.2),N=Math.round(L/2.1),R=Math.round(.9*N),F=Math.round(.75*L);return r.a.createElement("div",{id:s,className:i},r.a.createElement("canvas",{ref:b,className:"gaugeChart",id:"gauge-".concat(l,"-canvas"),style:{width:u,height:c}}),r.a.createElement("span",{className:"gaugeChartLabel",style:{fontSize:L,top:I}},h(g?null:w)),r.a.createElement("span",{className:"gaugeChartTitle",style:{fontSize:N,top:0}},t.title||o.title),r.a.createElement("span",{className:"gaugeChartUnits",style:{fontSize:R}},m),r.a.createElement("span",{className:"gaugeChartMin",style:{fontSize:F}},h(g?null:D)),r.a.createElement("span",{className:"gaugeChartMax",style:{fontSize:F}},h(g?null:P)))},$n=(a(254),a(134)),Jn=a(537),Qn=a(538),er=Object(de.a)($n.a,Object(Jn.a)(/[^0-9a-f]/gi,""),Object(ua.a)([[function(e){return e.length<6},function(e){return e[0]+e[0]+e[1]+e[1]+e[2]+e[2]}],[ha.a,Ta.a]])),tr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=er(e),n=Object(de.a)((function(e){return Object(Qn.a)(2,e)}),Object(Yn.a)(Object(de.a)((function(e){return parseInt(e,16)}),(function(e){return Math.round(Math.min(Math.max(0,e+e*t),255)).toString(16)}),(function(e){return"00".concat(e).substr(e.length)}))),(function(e){return e.join("")}))(a);return"#".concat(n)},ar=function(e){return e>0?e:(new Date).valueOf()+e},nr=function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartElementClassName,l=e.chartElementId,c=e.orderedColors,u=e.unitsCurrent,d=e.viewAfterForCurrentData,h=e.viewBeforeForCurrentData,p=Object(n.useRef)(null),f=Object(n.useState)(),m=Object(A.a)(f,2),b=m[0],v=m[1],_=Object(n.useRef)(),y=t.forceTimeWindow?function(e,t){var a=ar(t[0]),n=ar(t[1]),r=e.after*Ve.a,o=e.before*Ve.a-r,i=n-a;if(o>i/1.03)return{};var s=o/i;return{paddingLeftPercentage:"".concat((r-a)/(n-a)*100,"%"),widthRatio:s}}(o,[d,h]):{},O=y.paddingLeftPercentage,x=void 0===O?void 0:O,w=y.widthRatio,E=void 0===w?1:w;Object(n.useEffect)((function(){var e=t.sparklineLineColor,a=void 0===e?c[0]:e,n="line"===i.chart_type?window.NETDATA.themes.current.background:tr(a,window.NETDATA.chartDefaults.fill_luminance),r=t.title||i.title,o=function(e){return"disable"===e?"":e},s=t.sparklineType,l=void 0===s?"line":s,d=t.sparklineFillColor,h=void 0===d?n:d,f=t.sparklineDisableInteraction,g=void 0!==f&&f,m=t.sparklineDisableTooltips,y=void 0!==m&&m,O=t.sparklineDisableHighlight,x=void 0!==O&&O,w=t.sparklineHighlightLighten,E=void 0===w?1.4:w,S=t.sparklineTooltipSuffix,C=void 0===S?" ".concat(u):S,A=t.sparklineNumberFormatter,k=void 0===A?function(e){return e.toFixed(2)}:A,j={type:l,lineColor:a,fillColor:h,chartRangeMin:t.sparklineChartRangeMin,chartRangeMax:t.sparklineChartRangeMax,composite:t.sparklineComposite,enableTagOptions:t.sparklineEnableTagOptions,tagOptionPrefix:t.sparklineTagOptionPrefix,tagValuesAttribute:t.sparklineTagValuesAttribute,disableHiddenCheck:t.sparklineDisableHiddenCheck,defaultPixelsPerValue:t.sparklineDefaultPixelsPerValue,spotColor:o(t.sparklineSpotColor),minSpotColor:o(t.sparklineMinSpotColor),maxSpotColor:o(t.sparklineMaxSpotColor),spotRadius:t.sparklineSpotRadius,valueSpots:t.sparklineValueSpots,highlightSpotColor:t.sparklineHighlightSpotColor,highlightLineColor:t.sparklineHighlightLineColor,lineWidth:t.sparklineLineWidth,normalRangeMin:t.sparklineNormalRangeMin,normalRangeMax:t.sparklineNormalRangeMax,drawNormalOnTop:t.sparklineDrawNormalOnTop,xvalues:t.sparklineXvalues,chartRangeClip:t.sparklineChartRangeClip,chartRangeMinX:t.sparklineChartRangeMinX,chartRangeMaxX:t.sparklineChartRangeMaxX,disableInteraction:g,disableTooltips:y,disableHighlight:x,highlightLighten:E,highlightColor:t.sparklineHighlightColor,tooltipContainer:t.sparklineTooltipContainer,tooltipClassname:t.sparklineTooltipClassname,tooltipChartTitle:r,tooltipFormat:t.sparklineTooltipFormat,tooltipPrefix:t.sparklineTooltipPrefix,tooltipSuffix:C,tooltipSkipNull:t.sparklineTooltipSkipNull,tooltipValueLookups:t.sparklineTooltipValueLookups,tooltipFormatFieldlist:t.sparklineTooltipFormatFieldlist,tooltipFormatFieldlistKey:t.sparklineTooltipFormatFieldlistKey,numberFormatter:k,numberDigitGroupSep:t.sparklineNumberDigitGroupSep,numberDecimalMark:t.sparklineNumberDecimalMark,numberDigitGroupCount:t.sparklineNumberDigitGroupCount,animatedZooms:t.sparklineAnimatedZooms};_.current=j,p.current&&!b&&v((function(){return window.$(p.current)}))}),[b,t,a,o.result,i,c,u,E]);var S=t.sparklineOnHover;Object(n.useEffect)((function(){if(b&&S){var e=function(){return S(null)},t=function(e){var t=Object(A.a)(e.sparklines,1)[0].getCurrentRegionFields(),a=t.x,n=t.y;S({x:a,y:n})};return b.bind("sparklineRegionChange",t).bind("mouseleave",e),function(){b.unbind("sparklineRegionChange",t).unbind("mouseleave",e)}}}),[b,S]),Object(n.useEffect)((function(){if(b){var e=a.getBoundingClientRect(),t=e.width,n=e.height;b.sparkline(o.result,Object(g.a)({},_.current,{width:Math.floor(t*E),height:Math.floor(n)}))}}),[b,o.result]);var C=x?{textAlign:"initial",paddingLeft:x}:void 0;return r.a.createElement("div",{ref:p,id:l,className:s,style:C})},rr=a(144);window.d3=rr;var or,ir=a(276),sr=a.n(ir),lr=a(46),cr={label:"no data",value:100,color:"#666666"},ur=function(e){var t=e.chartData,a=e.index,n=e.localeDateString,r=e.localeTimeString,o=Math.round((t.before-t.after+1)/t.points),i=Object(lr.a)(o),s=t.result.data[a].time,l=s-1e3*o,c=n(l),u=r(l),d=n(s),h=r(s);return c===d?"".concat(c," ").concat(u," to ").concat(h,", ").concat(i):"".concat(c," ").concat(u," to ").concat(d," ").concat(h,", ").concat(i)},dr=function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartElementClassName,l=e.chartElementId,c=e.hoveredRow,u=e.hoveredX,d=e.legendFormatValue,h=e.orderedColors,p=e.setMinMax,f=e.unitsCurrent,g=Object(n.useRef)(null),m=Object(n.useRef)(d);m.current=d;var b=Object(n.useState)(),v=Object(A.a)(b,2),_=v[0],y=v[1],O=Object(n.useRef)(),x=Object(sa.b)(),w=x.localeDateString,E=x.localeTimeString;return Object(n.useEffect)((function(){if(g.current&&!_){p([o.min,o.max]);var e=Object(G.a)(o.result.labels).map((function(e,t){return{label:e,value:o.result.data[0][e],color:h[t]}})).filter((function(e){return null!==e.value&&e.value>0})),n=e.length>0?e:cr,r=t.title||i.title,s=ur({chartData:o,index:0,localeDateString:w,localeTimeString:E}),l=t.d3pieTitle,c=void 0===l?r:l,u=t.d3pieSubtitle,d=void 0===u?f:u,b=t.d3pieFooter,v=void 0===b?s:b,x=t.d3pieTitleColor,S=void 0===x?window.NETDATA.themes.current.d3pie.title:x,C=t.d3pieTitleFontsize,A=void 0===C?12:C,k=t.d3pieTitleFontweight,j=void 0===k?"bold":k,T=t.d3pieTitleFont,D=void 0===T?"arial":T,P=t.d3PieSubtitleColor,M=void 0===P?window.NETDATA.themes.current.d3pie.subtitle:P,L=t.d3PieSubtitleFontsize,I=void 0===L?10:L,N=t.d3PieSubtitleFontweight,R=void 0===N?"normal":N,F=t.d3PieSubtitleFont,B=void 0===F?"arial":F,H=t.d3PieFooterColor,z=void 0===H?window.NETDATA.themes.current.d3pie.footer:H,U=t.d3PieFooterFontsize,W=void 0===U?9:U,V=t.d3PieFooterFontweight,Y=void 0===V?"bold":V,X=t.d3PieFooterFont,K=void 0===X?"arial":X,Z=t.d3PieFooterLocation,q=void 0===Z?"bottom-center":Z,$=t.d3PiePieinnerradius,J=void 0===$?"45%":$,Q=t.d3PiePieouterradius,ee=void 0===Q?"80%":Q,te=t.d3PieSortorder,ae=void 0===te?"value-desc":te,ne=t.d3PieSmallsegmentgroupingEnabled,re=void 0!==ne&&ne,oe=t.d3PieSmallsegmentgroupingValue,ie=void 0===oe?1:oe,se=t.d3PieSmallsegmentgroupingValuetype,le=void 0===se?"percentage":se,ce=t.d3PieSmallsegmentgroupingLabel,ue=void 0===ce?"other":ce,de=t.d3PieSmallsegmentgroupingColor,he=void 0===de?window.NETDATA.themes.current.d3pie.other:de,pe=t.d3PieLabelsOuterFormat,fe=void 0===pe?"label-value1":pe,ge=t.d3PieLabelsOuterHidewhenlessthanpercentage,me=void 0===ge?null:ge,be=t.d3PieLabelsOuterPiedistance,ve=void 0===be?15:be,_e=t.d3PieLabelsInnerFormat,ye=void 0===_e?"percentage":_e,Oe=t.d3PieLabelsInnerHidewhenlessthanpercentage,xe=void 0===Oe?2:Oe,we=t.d3PieLabelsMainLabelColor,Ee=void 0===we?window.NETDATA.themes.current.d3pie.mainlabel:we,Se=t.d3PieLabelsMainLabelFont,Ce=void 0===Se?"arial":Se,Ae=t.d3PieLabelsMainLabelFontsize,ke=void 0===Ae?10:Ae,je=t.d3PieLabelsMainLabelFontweight,Te=void 0===je?"normal":je,De=t.d3PieLabelsPercentageColor,Pe=void 0===De?window.NETDATA.themes.current.d3pie.percentage:De,Me=t.d3PieLabelsPercentageFont,Le=void 0===Me?"arial":Me,Ie=t.d3PieLabelsPercentageFontsize,Ne=void 0===Ie?10:Ie,Re=t.d3PieLabelsPercentageFontweight,Fe=void 0===Re?"bold":Re,Be=t.d3PieLabelsValueColor,He=void 0===Be?window.NETDATA.themes.current.d3pie.value:Be,ze=t.d3PieLabelsValueFont,Ue=void 0===ze?"arial":ze,Ge=t.d3PieLabelsValueFontsize,We=void 0===Ge?10:Ge,Ve=t.d3PieLabelsValueFontweight,Ye=void 0===Ve?"bold":Ve,Xe=t.d3PieLabelsLinesEnabled,Ke=void 0===Xe||Xe,Ze=t.d3PieLabelsLinesStyle,qe=void 0===Ze?"curved":Ze,$e=t.d3PieLabelsLinesColor,Je=void 0===$e?"segment":$e,Qe=t.d3PieLabelsTruncationEnabled,et=void 0!==Qe&&Qe,tt=t.d3PieLabelsTruncationTruncatelength,at=void 0===tt?30:tt,nt=t.d3PieMiscColorsSegmentstroke,rt=void 0===nt?window.NETDATA.themes.current.d3pie.segment_stroke:nt,ot=t.d3PieMiscGradientEnabled,it=void 0!==ot&&ot,st=t.d3PieMiscColorsPercentage,lt=void 0===st?95:st,ct=t.d3PieMiscGradientColor,ut=void 0===ct?window.NETDATA.themes.current.d3pie.gradient_color:ct,dt=t.d3PieCssprefix,ht=void 0===dt?null:dt,pt=a.getBoundingClientRect(),ft=pt.width,gt=pt.height,mt={header:{title:{text:c,color:S,fontSize:A,fontWeight:j,font:D},subtitle:{text:d,color:M,fontSize:I,fontWeight:R,font:B},titleSubtitlePadding:1},footer:{text:v,color:z,fontSize:W,fontWeight:Y,font:K,location:q},size:{canvasHeight:Math.floor(gt),canvasWidth:Math.floor(ft),pieInnerRadius:J,pieOuterRadius:ee},data:{sortOrder:ae,smallSegmentGrouping:{enabled:re,value:ie,valueType:le,label:ue,color:he},content:n},labels:{outer:{format:fe,hideWhenLessThanPercentage:me,pieDistance:ve},inner:{format:ye,hideWhenLessThanPercentage:xe},mainLabel:{color:Ee,font:Ce,fontSize:ke,fontWeight:Te},percentage:{color:Pe,font:Le,fontSize:Ne,fontWeight:Fe,decimalPlaces:0},value:{color:He,font:Ue,fontSize:We,fontWeight:Ye},lines:{enabled:Ke,style:qe,color:Je},truncation:{enabled:et,truncateLength:at},formatter:function(e){return"value"===e.part?m.current(e.value):"percentage"===e.part?"".concat(e.label,"%"):e.label}},effects:{load:{effect:"none",speed:0},pullOutSegmentOnClick:{effect:"bounce",speed:400,size:5},highlightSegmentOnMouseover:!0,highlightLuminosity:-.2},tooltips:{enabled:!1,type:"placeholder",string:"",placeholderParser:null,styles:{fadeInSpeed:250,backgroundColor:window.NETDATA.themes.current.d3pie.tooltip_bg,backgroundOpacity:.5,color:window.NETDATA.themes.current.d3pie.tooltip_fg,borderRadius:2,font:"arial",fontSize:12,padding:4}},misc:{colors:{background:"transparent",segmentStroke:rt},gradient:{enabled:it,percentage:lt,color:ut},canvasPadding:{top:5,right:5,bottom:5,left:5},pieCenterOffset:{x:0,y:0},cssPrefix:ht},callbacks:{onload:null,onMouseoverSegment:null,onMouseoutSegment:null,onClickSegment:null}},bt=new sr.a(g.current,mt);O.current=mt,y((function(){return bt}))}}),[t,a,o,i,_,d,w,E,h,p,f]),Object(n.useEffect)((function(){if(_&&O.current){var e=ur({chartData:o,index:0,localeDateString:w,localeTimeString:E}),a=t.d3pieSubtitle,n=void 0===a?f:a,r=t.d3pieFooter,i=void 0===r?e:r,s=!!u&&-1===c,l=o.result.data.length-c-1,d=l<0||l>=o.result.data.length?0:l,p=Object(G.a)(o.result.labels).map((function(e,t){return{label:e,value:o.result.data[d][e],color:h[t]}})).filter((function(e){return null!==e.value&&e.value>0})),g=p.length>0&&!s?p:[cr];_.options.header.subtitle.text=n,_.options.footer.text=i,_.options.data.content=g,_.destroy(),_.recreate()}}),[t,o,_,c,u,w,E,h,f]),r.a.createElement("div",{ref:g,id:l,className:s})},hr=(a(437),function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartElementClassName,l=e.chartElementId,c=e.orderedColors,u=Object(n.useRef)(null),d=Object(n.useState)(),h=Object(A.a)(d,2),p=h[0],f=h[1],m=Object(n.useRef)();return Object(n.useLayoutEffect)((function(){if(u.current&&!p){var e=window.$(u.current),n=a.getBoundingClientRect(),r=n.width,o=n.height,i=t.peityStrokeWidth,s=void 0===i?1:i,l={stroke:window.NETDATA.themes.current.foreground,strokeWidth:s,width:Math.floor(r),height:Math.floor(o),fill:window.NETDATA.themes.current.foreground};f((function(){return e})),m.current=l}}),[t,p,a]),Object(n.useLayoutEffect)((function(){if(p&&m.current){var e=Object(g.a)({},m.current,{stroke:c[0],fill:c[0]===m.current.stroke?m.current.fill:"line"===i.chart_type?window.NETDATA.themes.current.background:tr(c[0],window.NETDATA.chartDefaults.fill_luminance)});p.peity("line",e),m.current=e}}),[p,o,i,c]),r.a.createElement("div",{ref:u,id:l,className:s},o.result)}),pr=function(e){var t=e.attributes,a=e.chartData,o=e.chartMetadata,i=e.chartElementClassName,s=e.chartElementId,l=e.orderedColors,c=e.unitsCurrent,u=Object(n.useRef)(null),d=Object(n.useRef)(),h=Object(n.useState)(!1),p=Object(A.a)(h,2),f=p[0],g=p[1];(or||(or=new Promise((function(e,t){setTimeout((function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://www.google.com/jsapi",a.onerror=function(){t(Error("error loading google.js api"))},a.onload=function(){e("ok")};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}),1e3)})).then((function(){return new Promise((function(e){window.google.load("visualization","1.1",{packages:["corechart","controls"],callback:e})}))})))).then((function(){g(!0)}));var m=Object(n.useRef)();return Object(n.useLayoutEffect)((function(){if(d.current&&m.current){var e=new window.google.visualization.DataTable(a.result);d.current.draw(e,m.current)}}),[a]),Object(n.useLayoutEffect)((function(){if(u.current&&!m.current&&f){var e=new window.google.visualization.DataTable(a.result),n=t.title,r=void 0===n?o.title:n,i=o.chart_type,s=new Map([["area",window.NETDATA.options.current.color_fill_opacity_area],["stacked",window.NETDATA.options.current.color_fill_opacity_stacked]]).get(i)||.3,h={colors:l,lineWidth:"line"===i?2:1,title:r,fontSize:11,hAxis:{viewWindowMode:"maximized",slantedText:!1,format:"HH:mm:ss",textStyle:{fontSize:9},gridlines:{color:"#EEE"}},vAxis:{title:c,viewWindowMode:"area"===i||"stacked"===i?"maximized":"pretty",minValue:"stacked"===i?void 0:-.1,maxValue:"stacked"===i?void 0:.1,direction:1,textStyle:{fontSize:9},gridlines:{color:"#EEE"}},chartArea:{width:"65%",height:"80%"},focusTarget:"category",annotation:{1:{style:"line"}},pointsVisible:!1,titlePosition:"out",titleTextStyle:{fontSize:11},tooltip:{isHtml:!1,ignoreBounds:!0,textStyle:{fontSize:9}},curveType:"function",areaOpacity:s,isStacked:"stacked"===i},p=["area","stacked"].includes(o.chart_type)?new window.google.visualization.AreaChart(u.current):new window.google.visualization.LineChart(u.current);p.draw(e,h),m.current=h,d.current=p}}),[t,a.result,o,u,f,l,c]),r.a.createElement("div",{ref:u,id:s,className:i})},fr=function(e){var t=e.attributes,a=e.chartData,n=e.chartElementClassName,o=e.chartElementId,i=t.textOnlyDecimalPlaces,s=void 0===i?1:i,l=t.textOnlyPrefix,c=void 0===l?"":l,u=t.textOnlySuffix,d=void 0===u?"":u,h=Math.pow(10,s),p=Math.round(a.result[0]*h)/h,f=0===a.result.length?"":c+p+d;return r.a.createElement("div",{id:o,className:n},f)},gr=a(37),mr=Math.round(16/9),br=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e-t},vr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mr;return Math.sqrt(e.length/t)},_r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mr;return e*t},yr=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.floor(t%e)*a},Or=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.floor(t/e)*a},xr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11;return Math.ceil(e)*t},wr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11;return Math.ceil(e)*t+a},Er=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:11;return Math.floor(e/t)},Sr=function(e,t,a,n){var r=n.onMouseenter,o=n.onMouseout,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=i.cellSize,l=i.cellPadding,c=-1,u=function(a){var n=e.getBoundingClientRect(),r=yr(t,a,s),o=Or(t,a,s),i=n.left+r,c=n.top+o,u=br(s,l);return{index:a,left:i,top:c,right:i+u,bottom:c+u,width:u,height:u,offsetX:r,offsetY:o}},d=function(){o(u(c)),c=-1},h=function(e){var n=e.offsetX,o=e.offsetY,i=Er(n,s),l=Er(o,s)*t+i;l!==c&&(-1!==c&&d(),l>=a||(r(u(l)),c=l))};return e.addEventListener("mousemove",h),e.addEventListener("mouseout",d),function(){e.removeEventListener("mousemove",h),e.removeEventListener("mouseout",d)}},Cr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.aspectRatio,n=t.cellSize,r=vr(e,a),o=_r(r,a);return xr(o,n)},Ar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.aspectRatio,n=t.cellSize,r=t.padding,o=vr(e,a),i=_r(o,a),s=xr(i,n),l=wr(o,n,r);return{width:s,height:l,columns:Math.ceil(i)}},kr=["rgba(198, 227, 246, 0.9)","rgba(14, 154, 255, 0.9)"],jr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kr;return Object(rr.scaleLinear)().domain(Object(rr.extent)(e,(function(e){return e}))).range(t)},Tr=function(e){return e.getBoundingClientRect().top/window.innerHeight>.5?"top":"bottom"},Dr={top:{bottom:"top"},bottom:{top:"bottom"}},Pr=function(e){var t=e.data,a=e.renderTooltip,o=Object(gr.a)(e,["data","renderTooltip"]),i=Object(n.useRef)(),s=Object(n.useRef)(),l=Object(n.useRef)(),c=Object(n.useState)(null),u=Object(A.a)(c,2),d=u[0],h=u[1],p=Object(n.useRef)(!1),f=Object(n.useRef)(-1),g=Object(n.useRef)(),m=function(){l.current.deactivateBox(),h(null),p.current=!1,f.current=-1},b=function(){return requestAnimationFrame((function(){h((function(e){return p.current||-1!==f.current&&f.current===(null===e||void 0===e?void 0:e.index)||m(),e}))}))};Object(n.useLayoutEffect)((function(){return l.current=function(e,t){var a=t.onMouseenter,n=t.onMouseout,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.cellSize,i=r.cellPadding,s=r.cellStroke,l=void 0===s?2:s,c=r.lineWidth,u=void 0===c?1:c,d=r.colorRange,h=e.getContext("2d"),p=-1,f=function(){},g={},m=function(){},b=function(){f(),m(),h.clearRect(0,0,e.width,e.height),h.beginPath()},v=function(t){var s=t.data,c=Ar(s,r),v=c.width,_=c.height,y=c.columns;e.width=parseInt(v),e.height=parseInt(_),b(),m();var O=jr(s,d),x=function(e,t){h.fillStyle=O(e);var a=yr(y,t,o),n=Or(y,t,o);u&&l&&h.clearRect(a-u,n-u,br(o,i)+l,br(o,i)+l),h.fillRect(a,n,br(o,i),br(o,i))};s.forEach(x),m=Sr(e,y,s.length,{onMouseenter:a,onMouseout:n},r),f=function(){-1!==p&&x(s[p],p)},g=function(e){f(),p=e;var t=yr(y,e,o),a=Or(y,e,o);u&&l&&(h.lineWidth=u,h.strokeStyle="#fff",h.strokeRect(t+u,a+u,br(o,i)-l,br(o,i)-l))}};return{clear:b,update:v,activateBox:function(e){return g(e)},deactivateBox:function(){return f()}}}(s.current,{onMouseenter:function(e){var t=e.index,a=Object(gr.a)(e,["index"]);f.current=t,l.current.activateBox(t),g.current=setTimeout((function(){h({target:{getBoundingClientRect:function(){return a}},index:t,rect:a})}),600)},onMouseout:function(){f.current=-1,clearTimeout(g.current),b()}},o),function(){return l.current.clear()}}),[]),Object(n.useLayoutEffect)((function(){d&&i.current&&i.current.labels[d.index]!==t.labels[d.index]&&m(),i.current=t,l.current.update(t)}),[t]);var v=Object(n.useCallback)((function(){p.current=!0}),[]),_=Object(n.useCallback)((function(){p.current=!1,b()}),[]),y=d&&Tr(d.target);return r.a.createElement(n.Fragment,null,r.a.createElement("canvas",{"data-testid":"groupBox",ref:s}),d&&a&&r.a.createElement(Z.h,{align:Dr[y],target:d.target,onMouseEnter:v,onMouseLeave:_},a(d.index,y)))},Mr=$.d.span.withConfig({displayName:"groupBoxes__Title",componentId:"sc-11qnspu-0"})(["white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;"]),Lr=Object($.d)(Z.j).attrs({as:Z.B,gap:1}).withConfig({displayName:"groupBoxes__Label",componentId:"sc-11qnspu-1"})(["cursor:default;&:hover{font-weight:bold;}"]),Ir=function(e){var t=e.data,a=e.label,o=e.groupIndex,i=e.renderGroupPopover,s=e.renderBoxPopover,l=Object(n.useRef)(),c=l.current&&Tr(l.current),u=Object(n.useMemo)((function(){return{maxWidth:"".concat(Cr(t.data),"px")}}),[t]),d=s&&function(e,t){return s({group:a,groupIndex:o,align:t,index:e})},h=i&&function(){return i({group:a,groupIndex:o,align:c})};return r.a.createElement(Z.j,{"data-testid":"groupBoxWrapper",column:!0,alignItems:"start",gap:1,margin:[0,4,0,0]},r.a.createElement(Z.y,{content:h,align:c,plain:!0},(function(e){var n=e.isOpen,o=e.ref,i=Object(gr.a)(e,["isOpen","ref"]);return r.a.createElement(Lr,Object.assign({"data-testid":"groupBoxWrapper-title",ref:function(e){l.current=e,o(e)},strong:n,style:u},i),r.a.createElement(Mr,null,a),t.data.length>3&&r.a.createElement("span",null,"(",t.data.length,")"))})),r.a.createElement(Pr,{data:t,renderTooltip:d}))},Nr=function(e){var t=e.data,a=e.labels,n=e.renderBoxPopover,o=e.renderGroupPopover;return r.a.createElement(Z.j,{"data-testid":"groupBoxes",flexWrap:!0,overflow:{vertical:"auto"},flex:!0},a.map((function(e,a){return t[a].data.length?r.a.createElement(Ir,{key:e,label:e,groupIndex:a,data:t[a],renderGroupPopover:o,renderBoxPopover:n}):null})))},Rr=Object($.d)(Z.j).attrs({width:"120px",height:"12px",round:!0}).withConfig({displayName:"legend__LinearColorScaleBar",componentId:"sc-7zc5gz-0"})(["background:linear-gradient(to right,#c6e3f6,#0e9aff);"]),Fr=function(e){var t=e.children;return r.a.createElement(Z.j,{"data-testid":"groupBox-legend",gap:4,alignItems:"center"},r.a.createElement(Z.C,{strong:!0},t),r.a.createElement(Z.j,{gap:2,alignItems:"center"},r.a.createElement(Z.C,null,"0%"),r.a.createElement(Rr,null),r.a.createElement(Z.C,null,"100%")))},Br={k8s_cluster_id:{icon:"cluster",title:"Cluster Id"},k8s_node_name:{icon:"nodes_hollow",title:"Node"},k8s_namespace:{icon:"cluster_spaces",title:"Namespace"},k8s_controller_kind:{icon:"controller_kind",title:"Controller Kind"},k8s_controller_name:{icon:"controller_name",title:"Controller Name"},k8s_pod_name:{icon:"pod",title:"Pod Name"},k8s_container_name:{icon:"container",title:"Container"}},Hr=Object.keys(Br),zr=function(e){return e in Br?Br[e]:{title:e.replace(/_./g,(function(e){return" ".concat(e[1].toUpperCase())})).replace(/^k8s /,""),icon:"node"}},Ur=function(){return r.a.createElement(Z.j,{height:"1px",width:"100%",background:"separator"})},Gr=function(e){return r.a.createElement(Z.m,Object.assign({color:"bright",wordBreak:"break-all","data-testid":"k8sPopover-header"},e))},Wr=Object($.d)(Z.b).attrs((function(e){return{flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",disabled:e.active,"data-testid":"k8sPopoverChart-tab"}})).withConfig({displayName:"tabs__TabButton",componentId:"sc-18vk2nn-0"})(["&&&{height:initial;width:initial;padding:2px 20px;"," color:","}"],(function(e){var t=e.active,a=e.theme;return t&&"border-bottom: 3px solid ".concat(Object(Z.F)("bright")({theme:a}),";")}),(function(e){var t=e.active,a=e.theme;return Object(Z.F)(t?"bright":"separator")({theme:a})})),Vr=function(e){var t=e.value,a=e.onChange,n=Object(gr.a)(e,["value","onChange"]);return r.a.createElement(Z.j,Object.assign({"data-testid":"k8sPopoverChart-tabs"},n),r.a.createElement(Wr,{label:"Context",active:"context"===t,onClick:function(){return a("context")}}),r.a.createElement(Wr,{label:"Metrics",active:"metrics"===t,onClick:function(){return a("metrics")}}))},Yr=Object($.d)(Object(Z.I)(Z.b)).attrs({icon:"chevron_right_s",label:"More",flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",alignItems:"baseline",gap:1,direction:"rowReverse"}).withConfig({displayName:"section__ExpandButton",componentId:"z6mskd-0"})(["&&&{padding:0;margin:0;font-weight:normal;height:initial;width:initial;svg{height:6px;width:6px;position:initial;}}"]),Xr=function(e){var t=e.title,a=e.onExpand,n=e.children,o=e.noBorder;return r.a.createElement(Z.j,{gap:3,padding:[0,0,3],border:!o&&{side:"bottom",color:"separator"},column:!0,"data-testid":"k8sPopoverSection"},r.a.createElement(Z.j,{justifyContent:"between","data-testid":"k8sPopoverSection-header"},r.a.createElement(Z.n,{color:"border",wordBreak:"break-all"},t),a&&r.a.createElement(Yr,{onClick:a})),r.a.createElement(Z.j,{gap:4,column:!0,"data-testid":"k8sPopoverSection-content"},n))},Kr=a(169),Zr=a(539),qr=["180px","90px"],$r=function(e,t,a){var n,r;"string"===typeof e.width?n=e.width:"number"===typeof e.width&&(n="".concat(e.width.toString(),"px")),void 0===t.aspectRatio&&("string"===typeof e.height?r=e.height:"number"===typeof e.height&&(r="".concat(e.height.toString(),"px")));var o="bottom"===e.legendPosition,i=e.heightId?function(e,t){var a=localStorage.getItem("".concat(cn.a).concat(e));if(a)return Number.isNaN(Number(a))?null:"".concat(t?Number(a)+Fa.a:a,"px");var n=localStorage.getItem("".concat(cn.b).concat(e));return n?qr.includes(n)?null:n:null}(e.heightId,o):null;if(i&&(r=i.replace(/"/g,"")),a){var s=o?.5*window.innerHeight:.4*window.innerHeight;r="".concat(s,"px")}var l=window.NETDATA.chartDefaults.min_width;return{height:r,width:n,minWidth:null===l?void 0:l}},Jr={root:null,rootMargin:"0px",threshold:void 0},Qr=function(){var e=[],t=new IntersectionObserver((function(t){t.forEach((function(t){var a,n=t.isIntersecting,r=t.target,o=null===(a=e.find((function(e){return e.element===r})))||void 0===a?void 0:a.callback;o&&o(n)}))}),Jr);return{subscribe:function(a,n){t.observe(a),e=e.concat({element:a,callback:n})},unsubscribe:function(t){e=e.filter((function(e){return e.element!==t}))}}}(),eo=function(e){var t=e.attributes;return r.a.createElement("span",{style:{position:"absolute",opacity:0,width:0}},t.id)},to=localStorage.getItem("wipe-chart-state"),ao=function(e){var t,a=e.attributes,o=e.chartUuid,i=e.children,s=e.portalNode,l=Object(la.a)();Object(n.useEffect)((function(){return function(){l(Object(_e.a)({id:o}))}}),[]);var c=ya[a.chartLibrary],u=Object(n.useState)(!1),d=Object(A.a)(u,2),h=d[0],p=d[1],f=(null===(t=Object(la.b)(ue.d))||void 0===t?void 0:t.chartId)===a.id;Object(n.useLayoutEffect)((function(){if(!h){var e=f&&"dygraph"===a.chartLibrary&&c.hasLegend(a),t=$r(a,c,e);Object(Zr.a)((function(e,t){e&&s.style.setProperty(t,e)}),t),s.className=c.containerClass(a),p(!0)}}),[a,c,h,f,s,p]);var g=Object(la.b)(ue.j),m=Object(n.useRef)(),b=function(e,t){var a=Object(n.useState)(!1),r=Object(A.a)(a,2),o=r[0],i=r[1],s=Object(n.useRef)(o);return Object(n.useEffect)((function(){return"function"===typeof IntersectionObserver&&Qr.subscribe(e,(function(e){s.current!==e&&(t.current&&(t.current.style.visibility=e?"visible":"hidden"),s.current=e,i(e))})),function(){Qr.unsubscribe(e)}}),[t,e]),o}(s,m),v=Object(la.b)(ue.t)?750:100,_=Object(n.useState)(!b),y=Object(A.a)(_,2),O=y[0],x=y[1];Object(ma.a)((function(){x(!b)}),v,[b]);var w=!b||O,E=Object(n.useRef)(b);if(m.current&&E.current!==b&&(E.current=b),Object(n.useEffect)((function(){!ve&&w&&to&&l(Object(_e.a)({id:o}))}),[o,l,w]),ve)return i;if(w){if(g)return r.a.createElement(eo,{attributes:a});if(!m.current){var S=Array.from(s.children).map((function(e){return function(e){var t=e.cloneNode(!0),a=t.querySelectorAll("canvas");return e.querySelectorAll("canvas").forEach((function(e,t){var n=a[t],r=n.getContext("2d");n.width=e.width,n.height=e.height,r&&r.drawImage(e,0,0)})),t}(e)})),C=document.createElement("div");C.style.visibility="hidden",S.forEach((function(e){C.appendChild(e)})),m.current=C}return r.a.createElement(r.a.Fragment,null,r.a.createElement(eo,{attributes:a}),r.a.createElement("div",{ref:function(e){e&&m.current&&e.appendChild(m.current)}}))}return!g&&m.current&&(m.current=void 0),i},no=function(e){var t=e.attributes,a=e.chartMetadata,n=e.chartUuid,o=e.dropdownMenu,i=e.portalNode,s=e.renderCustomElementForDygraph,l=e.onAttributesChange,c=e.uuid;return r.a.createElement(ao,{attributes:t,portalNode:i,chartUuid:n},r.a.createElement(Xo,{attributes:t,chartUuid:n,renderCustomElementForDygraph:s,onAttributesChange:l,dropdownMenu:o,externalChartMetadata:a,portalNode:i,uuid:c}))},ro=null,oo={sparklines_registry:{},os:"unknown",menu:{},submenu:{},context:{},sparkline:function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4?arguments[4]:void 0;if(null===ro||"undefined"===typeof ro.charts)return"";if("undefined"===typeof ro.charts[t])return"";if("undefined"===typeof ro.charts[t].dimensions)return"";if("undefined"===typeof ro.charts[t].dimensions[a])return"";var o="".concat(t,".").concat(a);return"undefined"===typeof this.sparklines_registry[o]?this.sparklines_registry[o]={count:1}:this.sparklines_registry[o].count+=1,o="".concat(o,".").concat(this.sparklines_registry[o].count),"".concat(e,'<div class="netdata-container" data-netdata="').concat(t,'" data-after="-120"\n data-width="25%" data-height="15px" data-chart-library="dygraph"\n data-dygraph-theme="sparkline" data-dimensions="').concat(a,'"\n data-show-value-of-').concat(a,'-at="').concat(o,'"></div>\n (<span id="').concat(o,'" style="display: inline-block; min-width: 50px; text-align: right;">\n X</span>').concat(n,")").concat(r)},gaugeChart:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return"".concat('<div class="netdata-container" data-netdata="CHART_UNIQUE_ID" data-dimensions="').concat(a,'"')+' data-chart-library="gauge" data-gauge-adjust="width"'+' data-title="'.concat(e,'"')+' data-width="'.concat(t,'"')+' data-before="0" data-after="-CHART_DURATION" data-points="CHART_DURATION"'+' data-colors="'.concat(n,'"')+' role="application"></div>'},anyAttribute:function(e,t,a,n){if("undefined"!==typeof e[a]){var r=e[a][t];return"undefined"===typeof r?n:"function"===typeof r?r(oo.os):r}return n},menuTitle:function(e){if(e.sectionTitle)return e.sectionTitle;if("undefined"!==typeof e.menu_pattern){var t=e.type||e.id.split(".")[0];return"".concat(this.anyAttribute(this.menu,"title",e.menu_pattern,e.menu_pattern).toString()," ").concat(t.slice(-(t.length-e.menu_pattern.length-1)).toString()).replace(/_/g," ")}return this.anyAttribute(this.menu,"title",e.menu,e.menu).toString().replace(/_/g," ")},menuIcon:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"icon",e.menu_pattern,'<i class="fas fa-puzzle-piece"></i>').toString():this.anyAttribute(this.menu,"icon",e.menu,'<i class="fas fa-puzzle-piece"></i>')},menuInfo:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"info",e.menu_pattern,null):this.anyAttribute(this.menu,"info",e.menu,null)},menuHeight:function(e){return"undefined"!==typeof e.menu_pattern?this.anyAttribute(this.menu,"height",e.menu_pattern,1):this.anyAttribute(this.menu,"height",e.menu,1)},submenuTitle:function(e,t){var a="".concat(e,".").concat(t),n=this.anyAttribute(this.submenu,"title",a,t).toString().replace(/_/g," ");if(n.length>28){var r=n.substring(0,13),o=n.substring(n.length-12,n.length);return"".concat(r,"...").concat(o)}return n},submenuInfo:function(e,t){var a="".concat(e,".").concat(t);return this.anyAttribute(this.submenu,"info",a,null)},submenuHeight:function(e,t,a){var n="".concat(e,".").concat(t);return this.anyAttribute(this.submenu,"height",n,1)*a},contextInfo:function(e){var t=this.anyAttribute(this.context,"info",e,null);return null!==t?'<div class="shorten dashboard-context-info"\n role="document">'.concat(t,"</div>"):""},contextValueRange:function(e){if("undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].valueRange)try{return JSON.parse(this.context[e].valueRange)}catch(t){return[null,null]}return[null,null]},contextHeight:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].height?t*this.context[e].height:t},contextDecimalDigits:function(e,t){return"undefined"!==typeof this.context[e]&&"undefined"!==typeof this.context[e].decimalDigits?this.context[e].decimalDigits:t}};window.netdataDashboard=oo;var io,so,lo,co=Object($.d)(Z.z).withConfig({displayName:"chartOverview__Title",componentId:"sc-1ga681p-0"})(["text-overflow:ellipsis;max-width:120px;overflow-x:hidden;"]),uo={avg:"Average",sum:"Sum",min:"Min",max:"Max"},ho=Object(n.memo)((function(e){var t,a=e.id,n=e.units,o=e.aggrMethod,i=e.displayedIndex,s=Object(la.b)((function(e){return Object(Ea.f)(e,{id:a})})),l="number"===typeof i?s.result[i]:s.view_latest_values[0],c=Ra({attributes:{},data:s,units:n,unitsCommon:null,unitsDesired:null,uuid:a}),u=c.legendFormatValue,d=c.unitsCurrent,h=function(e){return"".concat(uo[e])||""}(o);return r.a.createElement(Z.z,{wordBreak:"keep-all",color:"bright",margin:[0,0,0,"auto"],"data-testid":"k8sPopoverChart-chartValue"},h&&r.a.createElement(Z.z,{margin:[0,1,0,0],color:"separator","data-testid":"k8sPopoverChart-chartValue-aggr"},h),u(l),"percentage"===(t=d)?"%":" ".concat(t.replace(/milliseconds/,"ms")))})),po=function(e){var t=e.id,a=Object(gr.a)(e,["id"]),n=Object(la.b)((function(e){return Object(Ea.f)(e,{id:t})}));return n&&0!==n.result.length?r.a.createElement(ho,Object.assign({id:t},a)):null},fo=Object(n.memo)((function(e){var t=e.id,a=e.chartMetadata,n=e.aggrMethod,o=e.displayedIndex,i=a.units,s=a.context.replace(/cgroup\./,""),l=oo.menuIcon(a);return r.a.createElement(Z.j,{gap:2,"data-testid":"k8sPopoverChart-overview"},r.a.createElement(Z.z,{color:"bright",dangerouslySetInnerHTML:{__html:l}}),r.a.createElement(co,{color:"bright","data-testid":"k8sPopoverChart-title"},s),r.a.createElement(po,{id:t,units:i,aggrMethod:n,displayedIndex:o}))})),go=Object(n.memo)((function(e){var t=e.groupLabel,a=e.postGroupLabel,o=e.id,i=e.attributes,s=e.relatedIndex,l=Object(n.useContext)($.a),c=Object(n.useRef)(),d=Object(n.useState)(),h=Object(A.a)(d,2),p=h[0],f=h[1],m=Object(n.useMemo)((function(){return Object(Kr.b)(400,f)}),[]),b=Object(n.useState)(),v=Object(A.a)(b,2)[1];Object(n.useLayoutEffect)((function(){v(!0)}),[]);var _=i.relatedCharts[s],y=_.chartMetadata,O=_.attributes,x=Object(n.useMemo)((function(){return{id:y.id,width:"100%",height:"60px",chartLibrary:"sparkline",sparklineLineWidth:"2px",sparklineLineColor:Object(Z.F)("border")({theme:l}),sparklineFillColor:Object(Z.F)("disabled")({theme:l}),sparklineSpotRadius:0,sparklineDisableTooltips:!0,sparklineOnHover:function(e){return m(null===e||void 0===e?void 0:e.x)},httpMethod:"POST",host:i.host,nodeIDs:i.nodeIDs,dimensions:O.dimensions,aggrMethod:O.aggrMethod,labels:Object(g.a)(Object(u.a)({k8s_cluster_id:[y.chartLabels.k8s_cluster_id[0]]},i.groupBy,[t]),a&&Object(u.a)({},i.postGroupBy,[a]))}}),[y,i]);return r.a.createElement(Z.j,{gap:2,column:!0,"data-testid":"k8sPopoverChart"},r.a.createElement("div",{ref:c,style:{height:"60px",width:"100%"},"data-testid":"k8sPopoverChart-container"},c.current&&r.a.createElement(no,{chartUuid:o,attributes:x,chartMetadata:y,portalNode:c.current})),r.a.createElement(fo,{id:o,aggrMethod:x.aggrMethod,chartMetadata:y,displayedIndex:p}))})),mo=Object($.d)(Z.o).attrs({margin:[0,0,0,"auto"],color:"bright",width:"10px",height:"10px",alignSelf:"center",name:"nav_arrow_goto",role:"button",title:"Go to node","data-testid":"k8sPopoverItem-externalButton"}).withConfig({displayName:"item__ExternalButton",componentId:"sc-351vj-0"})(["cursor:pointer;"]),bo=function(e){var t=e.icon,a=e.title,n=e.secondary,o=e.onClick;return r.a.createElement(Z.j,{gap:1,alignItems:"start","data-testid":"k8sPopoverItem"},r.a.createElement(Z.j,{width:"22px",height:"22px","data-testid":"k8sPopoverItem-icon"},r.a.createElement(Z.o,{name:t,color:"bright",margin:[0,1,0,0],width:"22px",height:"22px"})),r.a.createElement(Z.z,{color:"bright","data-testid":"k8sPopoverItem-title"},a),n&&r.a.createElement(Z.z,{color:"border",wordBreak:"break-all","data-testid":"k8sPopoverItem-detail"},n),o&&r.a.createElement(mo,{onClick:o}))},vo=function(e){var t=e.date,a=e.title,n=Object(sa.b)(),o=n.localeDateString,i=n.localeTimeString;return r.a.createElement(bo,{icon:"around_clock",title:a,secondary:"".concat(o(t)," | ").concat(i(t))})},_o=function(e){var t=e.before,a=e.after;return r.a.createElement(Xr,{title:"Time"},r.a.createElement(vo,{title:"From",date:a}),r.a.createElement(vo,{title:"To",date:t}))},yo=function(e){var t=e.groupLabel,a=e.postGroupLabel,n=e.attributes,o=e.viewAfter,i=e.viewBefore;return r.a.createElement(Z.j,{gap:3,column:!0,width:"100%","data-testid":"k8sPopoverMetrics"},r.a.createElement(_o,{after:o,before:i}),r.a.createElement(Xr,{title:"Metrics",noBorder:!0},r.a.createElement(Z.j,{gap:3,column:!0,"data-testid":"k8sPopoverMetrics-container"},n.relatedCharts.map((function(e,o){var i=e.chartMetadata;return r.a.createElement(go,{key:i.id,id:[t,a,n.id,i.id].join("|"),attributes:n,relatedIndex:o,groupLabel:t,postGroupLabel:a})})))))},Oo=function(e){var t=e.labelId,a=e.items,n=e.onExpand,o=e.onItemClick,i=Object(gr.a)(e,["labelId","items","onExpand","onItemClick"]),s=zr(t),l=s.title,c=s.icon,u=a.slice(0,3),d=a.length>3,h=d?"".concat(l," (").concat(a.length,")"):l;return r.a.createElement(Xr,Object.assign({title:h,onExpand:d&&n},i),u.map((function(e){return r.a.createElement(bo,{key:e,icon:c,title:e,onClick:o&&function(){return o(e)}})})))},xo=Object(n.memo)((function(e){var t=e.chartLabels,a=e.onExpand,n=e.onNodeClick,o=function(e){e=Object(g.a)({},e);var t=Hr.reduce((function(t,a){return a in e?(delete e[a],[].concat(Object(C.a)(t),[a])):t}),[]);return[].concat(Object(C.a)(t),Object(C.a)(Object.keys(e)))}(t);return r.a.createElement(Z.j,{gap:3,column:!0,width:"100%","data-testid":"k8sPopoverContext"},o.map((function(e,i){return r.a.createElement(Oo,{key:e,labelId:e,items:t[e],onExpand:function(){return a(e)},noBorder:i===o.length-1,onItemClick:"k8s_node_name"===e&&n})})))})),wo=Object($.d)(Object(Z.I)(Z.b)).attrs({flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",alignItems:"start",gap:1}).withConfig({displayName:"list__StyledButton",componentId:"sc-11aix5x-0"})(["&&&{padding:0;margin:0;height:initial;width:initial;svg{height:18px;width:18px;position:initial;}}"]),Eo=function(e){var t=e.labelId,a=e.items,n=e.onBack,o=e.onItemClick,i=zr(t),s=i.title,l=i.icon;return r.a.createElement(Z.j,{height:"100%",gap:3,"data-testid":"k8sPopoverList",column:!0},r.a.createElement(Gr,null,r.a.createElement(wo,{label:"".concat(s," (").concat(a.length,")"),icon:"chevron_left",onClick:n,"data-testid":"k8sPopoverList-back"})),r.a.createElement(Ur,null),r.a.createElement(Z.j,{gap:3,overflow:{vertical:"auto",horizontal:"hidden"},column:!0,"data-testid":"k8sPopoverList-container"},a.map((function(e){return r.a.createElement(bo,{key:e,icon:l,title:e,onClick:o&&function(){return o(e)}})}))))},So=function(e){return r.a.createElement(Z.i,Object.assign({background:["transparent","popover"],padding:[2,4],width:"322px",height:"422px"},e))},Co=function(e){var t=e.label,a=e.value,n=e.onChange,o=e.children;return r.a.createElement(Z.j,{height:"100%",column:!0},r.a.createElement(Gr,null,t),r.a.createElement(Vr,{value:a,onChange:n,margin:[4,0,0,0]}),r.a.createElement(Ur,null),r.a.createElement(Z.j,{gap:3,overflow:{vertical:"auto",horizontal:"hidden"},margin:[4,0,0,0]},o))},Ao=function(e){var t=e.title,a=e.groupLabel,o=e.postGroupLabel,i=e.chartLabels,s=e.attributes,l=e.viewBefore,c=e.viewAfter,u=Object(gr.a)(e,["title","groupLabel","postGroupLabel","chartLabels","attributes","viewBefore","viewAfter"]),d=Object(n.useState)("context"),h=Object(A.a)(d,2),p=h[0],f=h[1],g="context"!==p&&"metrics"!==p,m=s.onNodeClick;return r.a.createElement(So,Object.assign({"data-testid":"k8sPopover"},u),g&&r.a.createElement(Eo,{labelId:p,items:i[p],attributes:s,onBack:function(){return f("context")},onItemClick:"k8s_node_name"===p&&m}),!g&&r.a.createElement(Co,{label:t,value:p,onChange:f},"context"===p&&r.a.createElement(xo,{chartLabels:i,onExpand:f,onNodeClick:m}),"metrics"===p&&r.a.createElement(yo,{groupLabel:a,postGroupLabel:o,attributes:s,viewAfter:c,viewBefore:l})))},ko=function(e){var t=e.chartData,a=e.chartMetadata,o=e.attributes,i=e.viewAfter,s=e.viewBefore,l=e.hoveredRow,c=e.hoveredX,d=e.showUndefined,h=o.filteredRows,p=Object(n.useMemo)((function(){return function(e,t){var a=e.keys,n=e.labels,r=e.groupBy,o=e.postGroupBy,i=e.aggrGroups,s=e.postAggregated,l=a[r],c=a[o],d=(t||Object(C.a)(Array(l.length)).map((function(e,t){return t}))).reduce((function(e,t){var a=l[t];a in e||(e[a]={labels:[],indexes:[],chartLabels:[],postAggregated:[]});var r=e[a];r.indexes.push(t),r.labels.push(c[t]),r.postAggregated.push(s[t]);var o=i.reduce((function(e,a){return n[a][t]?Object(g.a)({},e,Object(u.a)({},a,n[a][t])):e}),{});return r.chartLabels.push(o),e}),{}),h=Object.keys(d).sort((function(e,t){return d[t].indexes.length-d[e].indexes.length})),p=h.map((function(e){return d[e]})),f=p.map((function(e){return i.reduce((function(t,a){var n=new Set(e.chartLabels.reduce((function(e,t){return t[a]?[].concat(Object(C.a)(e),Object(C.a)(t[a])):e}),[]));return 0===n.size?t:Object(g.a)({},t,Object(u.a)({},a,Array.from(n)))}),{})}));return{labels:h,data:p,chartLabels:f}}(t,h)}),[h,t]),f=p.data,m=p.labels,b=p.chartLabels,v=t.id,_=t.result.data,y=t.groupBy,O=t.postGroupBy,x=Object(n.useMemo)((function(){return f.map((function(e){return{labels:e.labels,data:-1===l||l>_.length||!(l in _)?e.postAggregated:e.indexes.map((function(e){return _[l][e+1]}))||[]}}))}),[_,f,l]);return r.a.createElement(Z.j,{column:!0,width:"100%",height:"100%",gap:4,padding:[4,2]},r.a.createElement(Nr,{data:x,labels:m,renderBoxPopover:function(e){var t=e.groupIndex,a=e.index,n=e.align,l=f[t].labels[a],c=zr(O).title;return r.a.createElement(Ao,{align:n,title:"".concat(c,": ").concat(l),groupLabel:m[t],postGroupLabel:l,chartLabels:f[t].chartLabels[a],attributes:o,viewBefore:s,viewAfter:i})},renderGroupPopover:function(e){var t=e.groupIndex,a=e.align,n=m[t],l=zr(y).title;return r.a.createElement(Ao,{align:a,title:"".concat(l,": ").concat(n),groupLabel:n,chartLabels:b[t],attributes:o,viewBefore:s,viewAfter:i})}}),r.a.createElement(Z.j,{"data-testid":"legend-container",justifyContent:"between"},r.a.createElement(Fr,null,v),r.a.createElement(nn,{chartMetadata:a,showUndefined:d,hoveredX:c,viewBefore:s,chartData:t})))},jo=function(e){var t=e.attributes,a=e.chartContainerElement,o=e.chartData,i=e.chartMetadata,s=e.chartLibrary,l=e.colors,c=e.chartUuid,u=e.chartHeight,d=e.chartWidth,h=e.dimensionsVisibility,p=e.hasEmptyData,f=e.isRemotelyControlled,g=e.legendFormatValue,m=e.orderedColors,b=e.hoveredRow,v=e.hoveredX,_=e.onUpdateChartPanAndZoom,y=e.immediatelyDispatchPanAndZoom,O=e.setHoveredX,x=e.setMinMax,w=e.showLatestOnBlur,E=e.unitsCurrent,S=e.viewAfterForCurrentData,C=e.viewBeforeForCurrentData,A=Object(la.a)(),k=Object(la.b)(ue.I),j=Object(n.useCallback)((function(e){var t=e.after,a=e.before,n=e.masterID;A(Object(Ke.r)({after:t,before:a,masterID:n})),A(k?Object(Ke.s)({after:S,before:C}):Object(_e.h)({after:S,before:C,id:c}))}),[c,A,k,S,C]),T=ya[s],D=T.hasLegend,P=D(t)?va()("netdata-chart-with-legend-".concat(t.legendPosition||"right"),"netdata-".concat(s,"-chart-with-legend-right")):va()("netdata-chart","netdata-".concat(s,"-chart")),M="".concat(s,"-").concat(c,"-chart"),L=-1===b&&!w;return function(e){var t=e.attributes,a=e.chartData,r=e.chartSettings,o=e.hoveredRow,i=e.legendFormatValue,s=e.showUndefined,l=Object(n.useRef)([]);Object(dn.a)((function(){var e=t.showValueOf;if(e&&!Object(un.a)(e)){var n=a.dimension_names,r=a.dimension_ids;n.forEach((function(t,a){var n=e["show-value-of-".concat(t.toLowerCase())]||e["show-value-of-".concat(r[a].toLowerCase(),"-at")];l.current=l.current.concat(document.getElementById(n))}))}})),Object(n.useEffect)((function(){if(l.current.length){var e=r.options(t),n=e.includes("flip");if("json"===a.format&&!e.includes("objectrows")){var c=a.result.data,u=-1===o?c.length-1:o,d=c[n?u:c.length-u-1];a.dimension_names.forEach((function(e,t){var a=s||!d?"":i(d[t+1]),n=l.current[t];n&&(n.innerText="".concat(a))}))}}}),[t,a,r,o,i,s])}({attributes:t,chartData:o,chartSettings:T,hoveredRow:b,legendFormatValue:g,showUndefined:L}),"easypiechart"===s?r.a.createElement(Xn,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,chartLibrary:s,chartWidth:d,colors:l,chartUuid:c,dimensionsVisibility:h,isRemotelyControlled:f,key:d,legendFormatValue:g,orderedColors:m,hoveredRow:b,onUpdateChartPanAndZoom:_,setGlobalChartUnderlay:j,setMinMax:x,showUndefined:L,unitsCurrent:E,viewAfter:S,viewBefore:C}):"gauge"===s?r.a.createElement(qn,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,chartLibrary:s,chartHeight:u,chartWidth:d,colors:l,chartUuid:c,dimensionsVisibility:h,isRemotelyControlled:f,legendFormatValue:g,orderedColors:m,hoveredRow:b,hoveredX:v,onUpdateChartPanAndZoom:_,setGlobalChartUnderlay:j,setHoveredX:O,setMinMax:x,showUndefined:L,unitsCurrent:E,viewAfter:S,viewBefore:C}):"sparkline"===s?r.a.createElement(nr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,dimensionsVisibility:h,isRemotelyControlled:f,orderedColors:m,unitsCurrent:E,viewAfterForCurrentData:S,viewBeforeForCurrentData:C}):"d3pie"===s?r.a.createElement(dr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,dimensionsVisibility:h,hoveredRow:b,hoveredX:v,isRemotelyControlled:f,legendFormatValue:g,orderedColors:m,setMinMax:x,showUndefined:L,unitsCurrent:E}):"peity"===s?r.a.createElement(hr,{attributes:t,chartContainerElement:a,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,orderedColors:m}):"google"===s?r.a.createElement(pr,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,orderedColors:m,unitsCurrent:E}):"textonly"===s?r.a.createElement(fr,{attributes:t,chartData:o,chartElementClassName:P,chartElementId:M}):"groupbox"===s?r.a.createElement(ko,{chartData:o,chartMetadata:i,attributes:t,viewAfter:S,viewBefore:C,hoveredRow:b,hoveredX:v,showUndefined:L}):r.a.createElement(Gn,{attributes:t,chartData:o,chartMetadata:i,chartElementClassName:P,chartElementId:M,chartLibrary:s,colors:l,chartUuid:c,dimensionsVisibility:h,hasEmptyData:p,hasLegend:D(t),isRemotelyControlled:f,orderedColors:m,immediatelyDispatchPanAndZoom:y,hoveredRow:b,hoveredX:v,onUpdateChartPanAndZoom:_,setGlobalChartUnderlay:j,setHoveredX:O,setMinMax:x,unitsCurrent:E,viewAfter:S,viewBefore:C})},To=Object(n.memo)((function(e){var t=e.attributes,a=e.attributes.chartLibrary,o=e.chartContainerElement,i=e.chartData,s=e.chartMetadata,l=e.chartHeight,c=e.chartUuid,u=e.chartWidth,d=e.defaultAfter,h=e.globalPanAndZoom,p=e.hasEmptyData,f=e.isRemotelyControlled,g=e.viewRangeForCurrentData,m=e.viewRange,b=e.selectedDimensions,v=e.setSelectedDimensions,_=e.showLatestOnBlur,y=Object(n.useContext)($.a),O=Object(la.b)(ue.O),x=ya[a].hasLegend,w=t.units,E=void 0===w?s.units:w,S=t.unitsCommon,C=t.unitsDesired,k=void 0===C?O:C,j=Object(n.useMemo)((function(){return i.dimension_names.map((function(e){return 0===b.length||b.includes(e)}))}),[i.dimension_names,b]),T=x(t)&&window.NETDATA.options.current.legend_toolbox,D=T&&window.NETDATA.options.current.resize_charts&&!t.hideResizeHandler,P=Object(la.a)(),M=Object(n.useMemo)((function(){var e=Object.values(s.dimensions).map((function(e){return e.name})),t=i.dimension_names.filter((function(t){return!e.includes(t)}));return e.concat(t)}),[i.dimension_names,s.dimensions]);Object(n.useEffect)((function(){P(Object(Ke.h)({chartContext:s.context,chartUuid:c,colorsAttribute:t.colors,commonColorsAttribute:t.commonColors,dimensionNames:M}))}),[M,t.colors,t.commonColors,s.context,c,P]);var L=Ra({attributes:t,data:i,units:E,unitsCommon:S,unitsDesired:k,uuid:c}),I=L.legendFormatValue,N=L.legendFormatValueDecimalsFromMinMax,R=L.unitsCurrent,F=Object(n.useState)(null),B=Object(A.a)(F,2),H=B[0],z=B[1],U=Object(la.b)(ue.J),G=Object(n.useCallback)((function(e,t){if(U){var a=t?{chartUuid:null,hoveredX:e}:{chartUuid:c,hoveredX:e};P(Object(Ke.u)(a))}else z(e)}),[c,P,U]),W=Object(la.b)(ue.o),V=U?W:H,Y=Object(Ve.e)(m[0])?m[0]:i.after*Ve.a,X=Object(Ve.e)(m[1])?m[1]:i.before*Ve.a,K=Object(Ve.e)(g[0])?g[0]:i.after*Ve.a,Z=Object(Ve.e)(g[1])?g[1]:i.before*Ve.a,q=i.first_entry*Ve.a,J=i.last_entry*Ve.a,Q=Object(n.useMemo)((function(){return Math.round(u/30*s.update_every*Ve.a)}),[s.update_every,u]),ee=Object(la.b)(ue.I),te=Object(ka.a)((function(e){P(Object(Ke.s)(e))}),400),ae=Object(n.useCallback)((function(){te.flush()}),[te]),ne=Object(n.useCallback)((function(e){var t=e.after,a=e.before,n=e.callback,r=e.shouldFlushImmediately,o=void 0!==r&&r,s=e.shouldForceTimeRange,l=e.shouldNotExceedAvailableRange;if(!(a<t)){var u=Q,d=Math.round(X-Y),h=Math.round(t),p=Math.round(a),f=i.view_update_every*Ve.a;if(l){var g=q+f,m=J+f;p>m&&(h-=a-m,p=m),h<g&&(h=g)}var b=(p+=f-p%f)-(h-=h%f);d-f<u&&(u=d-f);var v=!0;if(b<d&&b<u){var _=((u=Q)-b)/2;b=(p+=_)-(h-=_),v=!1}var y=2*f,O=Math.abs(p-X);Math.abs(d-b)<=y&&O<=y&&v||(ee?(te.callback({after:h,before:p,masterID:c,shouldForceTimeRange:s}),o&&te.flush()):P(Object(_e.h)({after:h,before:p,id:c,shouldForceTimeRange:s})),v&&"function"===typeof n&&n(h,p))}}),[i.view_update_every,c,P,Q,ee,q,J,te,Y,X]),re=Object(n.useCallback)((function(e,t){var a=Math.max(e,q),n=Math.min(t,J);ne({after:a,before:n,shouldForceTimeRange:!0,shouldFlushImmediately:!0})}),[ne,q,J]),oe=Object(n.useCallback)((function(e){var t=(X-Y)*ja(e),a=Y-t;a>=q&&re(a,X-t)}),[re,q,Y,X]),ie=Object(n.useCallback)((function(e){var t=X-Y,a=t*ja(e),n=Math.min(X+a,J);re(n-t,n)}),[re,J,Y,X]),se=Object(n.useCallback)((function(e){var t=.8*ja(e);if(h)if(X-Y>1.2*(J-q))re(q,J);else{var a=(X-Y)*t/2;re(Y+a,X-a)}else P(Object(Ke.q)({after:Math.round(d/(t+1))}))}),[d,P,h,re,q,J,Y,X]),le=Object(n.useCallback)((function(e){var t=.8*ja(e);if(h){var a=((X-Y)/(1-.8*t)-(X-Y))/2;re(Y-a,X+a)}else P(Object(Ke.q)({after:Math.round(d*(t+1))}))}),[d,P,h,re,Y,X]),ce=Object(n.useMemo)((function(){return Object(ue.a)({chartContext:s.context,chartUuid:c,colorsAttribute:t.colors,commonColorsAttribute:t.commonColors})}),[t.colors,t.commonColors,s,c]),de=Object(la.b)(ce),he=Object(n.useMemo)((function(){return i.dimension_names.map(Object(qe.a)(Aa.a,de))}),[i,de]);if(!de)return r.a.createElement("span",null);var pe=V&&V>=Y&&V<=X,fe=i.view_update_every*Ve.a,ge=pe?Math.floor((V-i.after*Ve.a)/fe):-1,me="bottom"===t.legendPosition,be=r.a.createElement(ln,{onToolboxLeftClick:oe,onToolboxRightClick:ie,onToolboxZoomInClick:se,onToolboxZoomOutClick:le}),ve=D&&r.a.createElement(cn.c,{chartContainerElement:o,chartUuid:c,heightId:t.heightId,isLegendOnBottom:me});return r.a.createElement(r.a.Fragment,null,r.a.createElement(jo,{key:y.name,attributes:t,chartContainerElement:o,chartData:i,chartMetadata:s,chartLibrary:a,colors:de,chartUuid:c,chartHeight:l,chartWidth:u,dimensionsVisibility:j,hasEmptyData:p,onUpdateChartPanAndZoom:ne,immediatelyDispatchPanAndZoom:ae,isRemotelyControlled:f,legendFormatValue:I,orderedColors:he,hoveredX:V,hoveredRow:ge,setHoveredX:G,setMinMax:function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1];return N(a,n)},showLatestOnBlur:_,unitsCurrent:R,viewAfterForCurrentData:K,viewBeforeForCurrentData:Z}),x(t)&&r.a.createElement(on,{attributes:t,chartUuid:c,chartMetadata:s,chartLibrary:a,colors:de,hoveredX:V,hoveredRow:ge,legendFormatValue:I,selectedDimensions:b,setSelectedDimensions:v,showLatestOnBlur:_,unitsCurrent:R,viewBefore:X,legendToolbox:be,resizeHandler:ve}),T&&!me&&be,!me&&ve)})),Do=a(555),Po=a(548),Mo=a(192),Lo=$.d.div.withConfig({displayName:"styled__DropdownItem",componentId:"sc-1pvwpze-0"})(["display:flex;flex-direction:start;align-items:center;color:",";white-space:nowrap;& > svg use{fill:",";}"],Object(Z.F)(["neutral","limedSpruce"]),Object(Z.F)(["neutral","limedSpruce"])),Io=$.d.span.withConfig({displayName:"styled__DropdownItemLabel",componentId:"sc-1pvwpze-1"})(["margin-left:12px;"]),No=Object($.d)(Z.o).withConfig({displayName:"styled__DotsBtn",componentId:"sc-1pvwpze-2"})(["width:6px;height:10px;cursor:pointer;& use{fill:",";&:hover{fill:",";}}"],Object(Z.F)(["neutral","limedSpruce"]),Object(Z.F)(["neutral","regentgrey"])),Ro=function(e){var t=e.attributes,a=e.chartID,o=e.chartMetadata,i=e.dropdownMenu,s=Object(n.useState)(!1),l=Object(A.a)(s,2),c=l[0],u=l[1],d=function(){u(!1)};return r.a.createElement(r.a.Fragment,null,r.a.createElement(No,{name:"dots_2x3",onClick:function(){u(!0)}}),r.a.createElement(Mo.b,null,r.a.createElement(Mo.a,{open:c,onClose:d},r.a.createElement(Do.a,null,i.map((function(e){var n=e.icon,i=e.label,s=e.onClick;return r.a.createElement(Po.b,{key:i,text:r.a.createElement(Lo,null,n,r.a.createElement(Io,null,i)),onClick:function(){s({attributes:t,chartMetadata:o,chartID:a}),d()}})}))))))},Fo=Object($.e)(["0%{opacity:.1;}50%{opacity:.5;}100%{opacity:.1;}"]),Bo=$.d.div.withConfig({displayName:"styled__SpinnerContainer",componentId:"sc-1foc7xt-0"})(["position:absolute;top:","px;right:","px;display:flex;"],Object(qe.a)("top"),Object(qe.a)("right")),Ho=$.d.div.withConfig({displayName:"styled__Circle",componentId:"sc-1foc7xt-1"})(["width:","px;height:","px;background:",";border-radius:50%;animation:1s linear infinite both ",";"],Object(qe.a)("size"),Object(qe.a)("size"),Object(Z.F)("border"),Fo),zo=Object($.d)(Ho).withConfig({displayName:"styled__Circle2",componentId:"sc-1foc7xt-2"})(["animation-delay:.3s;margin-left:","px;"],Object(qe.a)("spaceBetween")),Uo=Object($.d)(Ho).withConfig({displayName:"styled__Circle3",componentId:"sc-1foc7xt-3"})(["animation-delay:.6s;margin-left:","px;"],Object(qe.a)("spaceBetween")),Go=function(e){var t=e.chartLibrary,a="dygraph"===t?33:0,n="dygraph"===t?8:0,o="dygraph"===t?10:7,i="dygraph"===t?4:2;return r.a.createElement(Bo,{top:a,right:n},r.a.createElement(Ho,{size:o}),r.a.createElement(zo,{size:o,spaceBetween:i}),r.a.createElement(Uo,{size:o,spaceBetween:i}))},Wo=$.d.div.withConfig({displayName:"styled__ChartDropdownContainer",componentId:"sc-177ahzb-0"})(["position:absolute;top:0;left:40px;width:20px;height:20px;z-index:",";"],10),Vo=(a(440),{"sum-of-abs":"sum"}),Yo=[],Xo=function(e){var t,a,o,i,s,l=e.attributes,c=e.chartUuid,u=e.uuid,d=e.dropdownMenu,h=e.externalChartMetadata,p=e.portalNode,g=e.renderCustomElementForDygraph,m=e.onAttributesChange,b=l.host,v=void 0===b?D.b:b,_=l.id,y=l.nodeIDs,O=Object(la.a)(),x=Object(n.useMemo)(Ea.a,[]),w=Object(la.b)((function(e){return x(e,{chartId:_,id:c})})),E=w.chartMetadata,S=w.isFetchingDetails,k=h||E;Object(n.useEffect)((function(){E||S||h||O(_e.b.request({chart:_,id:c,host:v,nodeIDs:y}))}),[_,c,O,v,S,E,h,y,u]);var T=Object(la.b)(ue.m),P=Object(la.b)((function(e){return Object(Ea.i)(e,{id:c})})),M=P||T,L=!!T&&T.masterID===c||Boolean(P),I=(null===M||void 0===M?void 0:M.shouldForceTimeRange)||!1,N=!M||!L||I,R=Object(la.b)((function(e){return Object(Ea.g)(e,{id:c})})),F=Object(la.b)((function(e){return Object(Ea.j)(e,{id:c})})),B=Object(la.b)((function(e){return Object(Ea.f)(e,{id:c})})),H=Object(la.b)((function(e){return Object(Ea.h)(e,{id:c})})),z=Object(la.b)(ue.o),U=Object(ua.a)([[Object(da.a)(!!B),function(){return 1e3*B.view_update_every}],[Object(da.a)(!!k),function(){return 1e3*k.update_every}],[ha.a,Object(da.a)(f.a)]])(),G=function(e){var t=e.areCriteriaMet,a=e.preferedIntervalTime,r=Object(la.b)(ue.s),o=Object(la.b)(ue.H),i=Object(la.b)(ue.n),s=!(!r&&o)&&!i,l=Object(n.useState)(!0),c=Object(A.a)(l,2),u=c[0],d=c[1],h=Object(n.useState)(!1),p=Object(A.a)(h,2),f=p[0],g=p[1];Object(n.useEffect)((function(){f&&s&&(g(!1),d(!0))}),[f,g,s]);var m=!s&&f||ve?wa:a;return Object(xa.a)((function(){if(t){if(!s)return void g(!0);d(!0)}}),m),[u,d]}({areCriteriaMet:!M&&!z,preferedIntervalTime:U}),W=Object(A.a)(G,2),V=W[0],Y=W[1],X=Object(pa.a)(M,f.b);Object(n.useEffect)((function(){Y(!0)}),[X,Y]);var K=Object(la.b)(ue.i);Object(fa.a)((function(){Y(!0)}),[l.after,l.before,K,l.dimensions,l.aggrMethod,l.groupBy]);var Z=l.before,q=void 0===Z?window.NETDATA.chartDefaults.before:Z,$=l.after||K,J=ya[l.chartLibrary],Q=J.hasLegend,ee=p.getBoundingClientRect(),te=ee.width-(Q(l)?140:0),ae=ee.height,ne=Boolean(Object(la.b)(ue.E)),re=Object(la.b)(ue.A)||ne,oe=Object(la.b)(ue.x),ie=j.a.CancelToken,se=Object(n.useMemo)((function(){return ie.source()}),[]);Object(ga.a)((function(){se.cancel("Chart scrolled out of view")}));var le=Object(n.useState)(!1),ce=Object(A.a)(le,2),de=ce[0],he=ce[1],pe=de&&H;Object(ma.a)((function(){H&&he(!0)}),2e3,[H]),Object(n.useEffect)((function(){!H&&de&&he(!1)}),[H,de]),Object(n.useEffect)((function(){if(V&&k&&!H){var e,t,a,n=window.NETDATA.options.force_data_points,r=1;if(M)if(L){if(a=[e=Math.round(M.after/1e3),t=Math.round(M.before/1e3)],oe){var o=Math.round((t-e)/2);e-=o,t+=o,r=2}}else e=Math.round(M.after/1e3),t=Math.round(M.before/1e3),r=1;else t=q,e=$,r=1;a=(a||[e,t]).map((function(e){return 1e3*e}));var i=l.points||Math.round(te/function(e){var t=e.attributes,a=e.chartSettings,n=t.pixelsPerPoint;if("number"===typeof n)return n;var r=a.pixelsPerPoint(t);return Math.max.apply(Math,Object(C.a)([r,window.NETDATA.options.current.pixels_per_point].filter((function(e){return"number"===typeof e}))))}({attributes:l,chartSettings:J})),s=n||i*r,u=l.forceTimeWindow||Boolean(K)?function(e){var t=e.after,a=e.before,n=e.firstEntry,r=e.points,o=Math.round((new Date).valueOf()/1e3),i=t>0?t:o+t,s=a>0?a:o+a;if(i<n){var l=s-i,c=s-Math.max(i,n);return Math.round(r*c/l)}return null}({after:e,before:t,firstEntry:k.first_entry,points:s}):null,d=l.method||window.NETDATA.chartDefaults.method;Y(!1),O(_e.c.request({host:v,context:k.context,chart:k.id,format:J.format,points:u||s,group:d,gtime:l.gtime||0,options:Oa(l,re),after:e||null,before:t||null,dimensions:l.dimensions,labels:l.labels,postGroupBy:l.postGroupBy,postAggregationMethod:l.postAggregationMethod,aggrMethod:l.aggrMethod,aggrGroups:l.aggrGroups,dimensionsAggrMethod:Vo[l.dimensionsAggrMethod]||l.dimensionsAggrMethod,nodeIDs:y,httpMethod:l.httpMethod,groupBy:l.groupBy,fetchDataParams:{fillMissingPoints:u?s-u:void 0,isRemotelyControlled:N,viewRange:a},id:c,cancelTokenSource:se}))}}),[l,k,J,c,te,K,O,Q,v,q,H,L,N,$,M,p,Y,re,oe,V,se,y,u]),Object(la.b)(ue.G);var fe=null===l||void 0===l?void 0:l.selectedDimensions,ge=Object(n.useState)(fe||Yo),me=Object(A.a)(ge,2),be=me[0],ye=me[1];Object(n.useLayoutEffect)((function(){fe&&ye(fe)}),[fe]),Object(n.useLayoutEffect)((function(){ye(fe||Yo)}),[null===l||void 0===l?void 0:l.groupBy]);var Oe=Object(n.useMemo)((function(){return g&&g({onAttributesChange:m,attributes:l,chartMetadata:k,chartData:B,chartID:_})}),[m,g,l,_,k,B]),xe=0===(null===(t=B)||void 0===t?void 0:null===(a=t.result)||void 0===a?void 0:null===(o=a.data)||void 0===o?void 0:o.length)||0===(null===(i=B)||void 0===i?void 0:null===(s=i.result)||void 0===s?void 0:s.length);return B&&k?r.a.createElement(r.a.Fragment,null,xe&&r.a.createElement(Ca,{key:"".concat(xe),hasEmptyData:xe,containerNode:p}),r.a.createElement(To,{attributes:l,chartContainerElement:p,chartData:B,chartMetadata:k,chartUuid:c,chartHeight:ae,chartWidth:te,defaultAfter:K,globalPanAndZoom:T,hasEmptyData:xe,isRemotelyControlled:R.isRemotelyControlled,viewRangeForCurrentData:R.viewRange,viewRange:F,selectedDimensions:be,setSelectedDimensions:ye,showLatestOnBlur:!M}),pe&&r.a.createElement(Go,{chartLibrary:l.chartLibrary}),d&&d.length>0&&r.a.createElement(Wo,null,r.a.createElement(Ro,{dropdownMenu:d,chartID:_,attributes:l,chartMetadata:k})),Oe):r.a.createElement(r.a.Fragment,null,r.a.createElement(Ca,{key:"".concat(xe),hasEmptyData:xe,containerNode:p}),pe&&r.a.createElement(Go,{chartLibrary:l.chartLibrary}))},Ko=a(497),Zo=function(e){return e[O.a]},qo=Object(Ha.a)(Zo,Object(qe.a)("isSnapshotMode")),$o=Object(Ha.a)(Zo,Object(Ko.a)(["snapshotCharts","snapshotDataPoints"])),Jo=function(e){var t=e.attributes,a=e.chartUuid,r=t.host||D.b,o=Object(la.b)($o).snapshotDataPoints,i=t.method||window.NETDATA.chartDefaults.method,s=t.chartLibrary,l=ya[s],c=Object(la.b)(ue.m),u=c.after/Ve.a,d=c.before/Ve.a,h=Object(la.a)();return Object(n.useEffect)((function(){h(_e.e.request({host:r,context:t.id,chart:t.id,format:l.format,points:o,group:i,gtime:t.gtime||0,options:Oa(t,!0),after:u||null,before:d||null,dimensions:t.dimensions,aggrMethod:t.aggrMethod,nodeIDs:t.nodeIDs,chartLibrary:s,id:a,groupBy:t.groupBy}))})),null},Qo=function(e){var t=e.attributes,a=e.chartUuid;return Object(la.b)(qo)?r.a.createElement(Jo,{attributes:t,chartUuid:a}):null},ei=Object(n.memo)((function(){var e=Array.from(document.querySelectorAll("[data-netdata]"));return r.a.createElement(r.a.Fragment,null,e.map((function(e,t){var a=Object(ca.b)(e),n="".concat(a.id,"-").concat(t);return Object(o.createPortal)(r.a.createElement(r.a.Fragment,null,r.a.createElement(ao,{attributes:a,chartUuid:n,portalNode:e},r.a.createElement(Xo,{attributes:a,chartUuid:n,portalNode:e})),r.a.createElement(Qo,{attributes:a,chartUuid:n})),e)})))})),ti=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0,r=Object(n.useState)(!1),o=Object(A.a)(r,2),i=o[0],s=o[1],l=Object(n.useState)(!1),c=Object(A.a)(l,2),u=c[0],d=c[1],h=Object(n.useState)(null),p=Object(A.a)(h,2),f=p[0],g=p[1];return Object(n.useEffect)((function(){if(t&&e){var n=a?{headers:null,withCredentials:!1}:{};s(!0),T.get(e,n).then((function(e){e.data&&(g(e.data),d(!1),s(!1))})).catch((function(t){console.warn("error fetching ".concat(e),t),d(!0),s(!1)}))}}),[a,t,e]),[f,i,u]},ai=document.getElementById("modal-root"),ni=function(e){var t=e.children,a=Object(n.useRef)(document.createElement("div"));return Object(n.useEffect)((function(){return ai.appendChild(a.current),function(){ai.removeChild(a.current)}}),[]),Object(o.createPortal)(t,a.current)},ri=(a(441),function(){var e=Object(n.useRef)(null);Object(n.useEffect)((function(){e.current&&window.$(e.current).modal("show")}));var t=Object(la.b)(Ea.b),a=Object(la.b)(Ea.c),o=Object(la.b)(Ea.k),i=0===t?0:a/t*100;Object(n.useEffect)((function(){100===i&&setTimeout((function(){window.$(e.current).modal("hide"),window.print(),window.close()}),1e3)}),[i]);var s=o&&"".concat(Math.round(i),"%, ").concat(o);return r.a.createElement(ni,null,r.a.createElement("div",{ref:e,className:"modal fade",id:"printModal",tabIndex:-1,role:"dialog","aria-labelledby":"printModalLabel","data-keyboard":"false","data-backdrop":"static"},r.a.createElement("div",{className:"modal-dialog modal-lg",role:"document"},r.a.createElement("div",{className:"modal-content"},r.a.createElement("div",{className:"modal-header"},r.a.createElement("button",{type:"button",className:va()("close",{"print-modal__close-button--disabled":!0}),"data-dismiss":"modal","aria-label":"Close"},r.a.createElement("span",{"aria-hidden":"true"},"\xd7")),r.a.createElement("h4",{className:"modal-title",id:"printModalLabel"},"Preparing dashboard for printing...")),r.a.createElement("div",{className:"modal-body"},"Please wait while we initialize and render all the charts on the dashboard.",r.a.createElement("div",{className:"progress progress-striped active",style:{height:"2em"}},r.a.createElement("div",{id:"printModalProgressBar",className:"progress-bar progress-bar-info",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,style:{minWidth:"2em",width:"".concat(i,"%")}},r.a.createElement("span",{id:"printModalProgressBarText",style:{paddingLeft:10,paddingTop:4,fontSize:"1.2em",textAlign:"left",width:"100%",position:"absolute",display:"block",color:"black"}},s))),"The print dialog will appear as soon as we finish rendering the page."),r.a.createElement("div",{className:"modal-footer"})))))}),oi=$.d.div.withConfig({displayName:"styled__SocialMediaContainer",componentId:"sc-3gu94j-0"})(["width:185px;padding:",";background:",";font-size:12px;margin-bottom:",";"],Object(Z.H)(2),Object(Z.F)("borderSecondary"),Object(Z.H)(3)),ii=$.d.div.withConfig({displayName:"styled__FirstRow",componentId:"sc-3gu94j-1"})(["display:flex;justify-content:space-between;"]),si=$.d.div.withConfig({displayName:"styled__GithubCopy",componentId:"sc-3gu94j-2"})([""]),li=$.d.div.withConfig({displayName:"styled__GithubCopyLine",componentId:"sc-3gu94j-3"})([""]),ci=$.d.a.withConfig({displayName:"styled__SocialMediaLink",componentId:"sc-3gu94j-4"})(["&,&:hover{color:",";}"],Object(Z.F)("main")),ui=Object($.d)(ci).withConfig({displayName:"styled__GithubStarQuestion",componentId:"sc-3gu94j-5"})([""]),di=Object($.d)(ci).withConfig({displayName:"styled__GithubIcon",componentId:"sc-3gu94j-6"})(["font-size:24px;"]),hi=Object($.d)(ci).withConfig({displayName:"styled__TwitterIcon",componentId:"sc-3gu94j-7"})(["font-size:17px;"]),pi=Object($.d)(ci).withConfig({displayName:"styled__FacebookIcon",componentId:"sc-3gu94j-8"})(["font-size:23px;"]),fi=$.d.div.withConfig({displayName:"styled__Separator",componentId:"sc-3gu94j-9"})(["margin-top:",";border-top:1px solid ",";"],Object(Z.H)(2),Object(Z.F)("separator")),gi=$.d.div.withConfig({displayName:"styled__SecondRow",componentId:"sc-3gu94j-10"})(["margin-top:",";display:flex;align-items:center;justify-content:space-between;"],Object(Z.H)(2)),mi=$.d.span.withConfig({displayName:"styled__SecondRowText",componentId:"sc-3gu94j-11"})(["font-size:10px;"]),bi=function(){return r.a.createElement(oi,null,r.a.createElement(ii,null,r.a.createElement(si,null,r.a.createElement(li,null,"Do you like Netdata?"),r.a.createElement(ui,{href:"https://github.com/netdata/netdata/",target:"_blank"},"Give us a star!")),r.a.createElement(di,{href:"https://github.com/netdata/netdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-github"}))),r.a.createElement(fi,null),r.a.createElement(gi,null,r.a.createElement(mi,null,"And share the word!"),r.a.createElement(hi,{href:"https://twitter.com/linuxnetdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-twitter"})),r.a.createElement(pi,{href:"https://www.facebook.com/linuxnetdata/",target:"_blank"},r.a.createElement("i",{className:"fab fa-facebook"}))))},vi=function(e){var t=e.children,a=Object(n.useRef)(document.querySelector("#sidebar-end-portal-container"));return Object(o.createPortal)(t,a.current)},_i=(a(442),Object($.d)((function(e){var t=e.className,a=Object(gr.a)(e,["className"]);return r.a.createElement("div",{className:t},r.a.createElement(q.a,Object.assign({},a,{closeButton:!1})))})).withConfig({displayName:"notifications-container__NotificationsContainer",componentId:"n0kffi-0"})([".Toastify__toast-container{position:fixed;width:unset;min-width:400px;max-width:500px;",";color:",";}.Toastify__toast{padding:0;padding-top:5px;}.Toastify__toast--error{background:",";border:1px solid ",";}.Toastify__toast--warning{}.Toastify__toast--success{background:",";border:1px solid ",";}.Toastify__toast-body{}.Toastify__progress-bar{bottom:unset;top:0;}.Toastify__progress-bar--success{background-color:",";}.Toastify__progress-bar--error{background-color:",";}"],"z-index: 50;",Object(Z.F)(["neutral","limedSpruce"]),Object(Z.F)(["red","lavender"]),Object(Z.F)("error"),Object(Z.F)(["green","frostee"]),Object(Z.F)("success"),Object(Z.F)("success"),Object(Z.F)("error"))),yi=function(e){var t=e.icon,a=e.children,n=e.hasBorder;return r.a.createElement(Z.j,{gap:2,border:n&&{side:"right",color:"separator"},alignItems:"center",padding:[0,3,0,0],height:"100%"},!!t&&r.a.createElement(Z.o,{name:t,color:"bright",height:"15px"}),a)},Oi=function(e){var t=e.global.snapshot,a=e.global.chartsMetadata.data;return t||a?t?t.hostname:a.hostname:""},xi=function(){var e=Object(la.b)(Oi);return r.a.createElement(yi,{icon:"node_hollow"},r.a.createElement(Z.z,{"data-testid":"header-nodename-".concat(e),color:"bright",strong:!0,truncate:!0},e))},wi=["neutral","black"],Ei=function(e){var t=e.children,a=e.isBasic;return r.a.createElement(Z.j,Object.assign({padding:[1.5,2],margin:[2],background:wi,round:1},!a&&{width:{max:"300px"}}),r.a.createElement(Z.D,{color:"bright"},t))},Si=function(e,t){var a=t.isBasic,n="function"===typeof e?e():e;return"string"===typeof e||a?r.a.createElement(Ei,{isBasic:a},n):n},Ci=function(e){var t=e.children,a=e.content,o=e.isBasic,i=Object(gr.a)(e,["children","content","isBasic"]),s=Object(n.useCallback)((function(){return Si(a,{isBasic:o})}),[a,o]);return r.a.createElement(Z.E,Object.assign({plain:!0,animation:!0,content:s},i),t)},Ai=function(){var e=Object(la.a)(),t=Object(n.useCallback)((function(){return e(Object(Ke.t)())}),[e]);return r.a.createElement(Z.j,{gap:2,"data-testid":"header-options-button"},r.a.createElement(Ci,{content:"Import a Netdata snapshot",align:"bottom",plain:!0},r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark","data-toggle":"modal","data-target":"#loadSnapshotModal",icon:"download"})),r.a.createElement(Ci,{content:"Export a Netdata snapshot",align:"bottom",plain:!0},r.a.createElement(Z.b,{onClick:t,flavour:"borderless",neutral:!0,themeType:"dark","data-toggle":"modal","data-target":"#saveSnapshotModal",icon:"upload"})),r.a.createElement(Ci,{content:"Print the dashboard",align:"bottom",plain:!0},r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark","data-toggle":"modal","data-target":"#printPreflightModal",icon:"print"})))},ki=a(544),ji=Object($.d)(Z.j).attrs({padding:[4],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[4,0,0],width:110}).withConfig({displayName:"dropdown__Dropdown",componentId:"sc-1pb06sp-0"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),Ti=ji,Di=Object($.d)(Z.j).withConfig({displayName:"protoBuf__PillContainer",componentId:"sc-15abcpz-0"})(["white-space:nowrap;"]),Pi=Object($.d)(Z.z).attrs({as:"a",color:"success",target:"_blank"}).withConfig({displayName:"protoBuf__Link",componentId:"sc-15abcpz-1"})([""]),Mi=function(){var e=Object(En.a)(),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(la.b)(ue.w),s=Object(n.useRef)(),l=Object(ki.a)("(min-width: 1400px)"),c=function(){o(!1)};return i?r.a.createElement(Z.j,{flex:!1},r.a.createElement(Di,{ref:s},r.a.createElement(Z.x,{"data-testid":"header-options-button",onClick:o,flavour:"warning",icon:"warning_triangle_hollow"},l?"NOT MONITORED IN CLOUD":"")),s.current&&a&&r.a.createElement(Z.h,{target:s.current,align:{top:"bottom",left:"left"},onEsc:c,onClickOutside:c,animation:!0},r.a.createElement(Ti,null,r.a.createElement(Z.j,{background:"modalTabsBackground",padding:[4]},r.a.createElement(Z.j,{width:14,flex:!1,alignItems:"start"},r.a.createElement(Z.j,{padding:[2.5],round:"50%",background:"warningText"},r.a.createElement(Z.o,{color:"warningBackground",name:"informationPress"}))),r.a.createElement(Z.j,null,r.a.createElement(Z.z,null,"It will not be possible to monitor this node from Netdata Cloud after 1st of March. ",r.a.createElement("br",null)," ",r.a.createElement("br",null),"This node does not have proto-buf support. In order to learn how to apply proto-buf support to your nodes"," ",r.a.createElement(Pi,{href:"https://www.netdata.cloud/blog/netdata-clouds-new-architecture"},"read our documentation."),r.a.createElement("br",null),r.a.createElement("br",null)," If you are not interested in monitoring this node from Netdata Cloud, you can"," ",r.a.createElement(Pi,{href:"https://learn.netdata.cloud/docs/agent/claim#remove-and-reconnect-a-node"},"unclaim it."))))))):null},Li=function(e){var t,a=e.currentVersion,n="stable"===e.releaseChannel,o=ti("https://api.github.com/repos/netdata/netdata/releases/latest",n,!0),i=Object(A.a)(o,1)[0],s=ti("https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt",!n),l=Object(A.a)(s,1)[0],c=ti(null===l||void 0===l?void 0:l.mediaLink,Boolean(l)),u=Object(A.a)(c,1)[0],d=n?null===(t=i)||void 0===t?void 0:t.tag_name.replace(/(\r\n|\n|\r| |\t)/gm,""):u?function(e){return e.replace(/(\r\n|\n|\r| |\t)/gm,"")}(u):null;if(!d)return null;var h=!function(e,t){if(e===t)return!0;var a=e.split("."),n=t.split("."),r=parseInt(a[0].substring(1,2),10),o=parseInt(n[0].substring(1,2),10);return!(r<o)&&(r>o||!((r=parseInt(a[1],10))<(o=parseInt(n[1],10)))&&(r>o||(a=a[2].split("-"),n=n[2].split("-"),!((r=parseInt(a[0],10))<(o=parseInt(n[0],10)))&&(r>o||!((r=a.length>1?parseInt(a[1],10):0)<(o=n.length>1?parseInt(n[1],10):0))))))}(a,d);return r.a.createElement(Ci,{content:h?"Need help?":"Check Version",align:"bottom",plain:!0},r.a.createElement(Z.b,{"data-testid":"header-version-control-button",flavour:"borderless",themeType:"dark",small:!0,neutral:!h,warning:h,name:h?"update_pending":"update",icon:h?"update_pending":"update","data-toggle":"modal","data-target":"#updateModal"}))},Ii=function(e){var t=e.global.chartsMetadata.data;return t?{version:t.version,releaseChannel:t.release_channel}:null},Ni=function(){var e=Object(la.b)(Ii);return e&&r.a.createElement(Li,{currentVersion:e.version,releaseChannel:e.releaseChannel})},Ri=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(n.useState)(!!e),a=Object(A.a)(t,2),r=a[0],o=a[1],i=Object(n.useCallback)((function(){return o((function(e){return!e}))}),[]),s=Object(n.useCallback)((function(){return o(!0)}),[]),l=Object(n.useCallback)((function(){return o(!1)}),[]);return[r,i,s,l]},Fi=function(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=JSON.parse(localStorage.getItem(e)))&&void 0!==t?t:a},Bi=function(e,t){var a=Object(n.useState)((function(){return Fi(e,t)})),r=Object(A.a)(a,2),o=r[0],i=r[1];return Object(n.useEffect)((function(){return localStorage.setItem(e,JSON.stringify(o))}),[e,o]),[o,i]},Hi=a(551),zi=$.d.div.withConfig({displayName:"styled__RootContainer",componentId:"sc-1al6duq-0"})(["width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;"]),Ui=(Object($.d)(Hi.a).withConfig({displayName:"styled__StyledMenu",componentId:"sc-1al6duq-1"})([""]),$.d.div.withConfig({displayName:"styled__DropdownContainer",componentId:"sc-1al6duq-2"})(["cursor:pointer;color:",";.mdc-menu-surface{border-radius:0;.mdc-list{padding:0;}.mdc-list-item{padding:0 "," 0 ",";font-size:14px;height:",";}}"],Object(Z.F)("bright"),Object(Z.H)(5),Object(Z.H)(5),Object(Z.H)(6))),Gi=$.d.div.withConfig({displayName:"styled__ListContainer",componentId:"sc-1al6duq-3"})(["padding:"," 0;"],Object(Z.H)(3)),Wi=Object($.d)(Z.o).withConfig({displayName:"styled__OpenerIcon",componentId:"sc-1al6duq-4"})(["flex-shrink:0;flex-grow:0;margin-left:",";fill:",";width:10px;height:5px;"],(function(e){return e.noMargin?"unset":"16px"}),Object(Z.F)("bright")),Vi=$.d.div.withConfig({displayName:"styled__PickerBox",componentId:"y9nggg-0"})(["display:flex;position:relative;min-width:",";min-height:",";flex-direction:column;align-items:flex-end;background-color:",";color:",";z-index:",";border-radius:8px;"],Object(Z.H)(102),Object(Z.H)(43),Object(Z.F)("mainBackground"),Object(Z.F)("text"),60),Yi=$.d.span.withConfig({displayName:"styled__StyledTimePeriod",componentId:"y9nggg-1"})(["margin-top:",";cursor:pointer;width:187px;height:",";&:first-of-type{margin-top:",";}&:last-of-type{margin-bottom:",";}& > span:hover{color:",";}"],Object(Z.H)(3),Object(Z.H)(2),Object(Z.H)(1),Object(Z.H)(1),Object(Z.F)("textLite")),Xi=$.d.span.withConfig({displayName:"styled__StyledCustomTimePeriod",componentId:"y9nggg-2"})(["margin:"," "," 0;color:",";cursor:pointer;&:first-of-type{margin-top:0;}&:hover{color:",";}"],Object(Z.H)(1),Object(Z.H)(3),(function(e){var t=e.isSelected,a=e.theme;return Object(Z.F)(t?"primary":"text")({theme:a})}),Object(Z.F)("textLite")),Ki=Object($.d)((function(e){var t,a=e.title,o=e.children,i=e.className,s=e.renderTitle,l=e.isOpen,c=void 0!==l&&l,u=e.onMenuToggle,d=e.anchorCorner,h=void 0===d?"bottomStart":d,p=e.renderOpener,f=Object(n.useRef)();return r.a.createElement(Ui,{className:i},r.a.createElement(Mo.b,null,r.a.createElement(Mo.a,{ref:f,open:c,onClose:function(){u(!1)},anchorCorner:h},"function"===typeof o?c&&r.a.createElement(Gi,null,r.a.createElement(Do.a,null,o({maxHeight:null===(t=f.current)||void 0===t?void 0:t.root.ref.style.maxHeight}))):r.a.createElement(Gi,null,r.a.createElement(Do.a,null,o))),r.a.createElement(zi,{onClick:function(){u(!c)}},a||s&&s(),p?p():r.a.createElement(Wi,{name:"triangle_down",noMargin:Boolean(s)}))))})).withConfig({displayName:"styled__StyledDropdown",componentId:"y9nggg-3"})(["width:88px;height:32px;padding-top:8px;padding-bottom:8px;padding-left:8px;padding-right:7px;border:1px solid ",";box-sizing:border-box;border-radius:4px;display:flex;justify-content:center;align-items:center;color:",";.mdc-menu-surface--anchor{.mdc-menu-surface--open{"," margin-top:",";background:",";border-radius:4px;}}.mdc-list{display:flex;flex-direction:column;justify-content:center;align-items:center;}"],Object(Z.F)("border"),Object(Z.F)("text"),"z-index: 45;",Object(Z.H)(2),Object(Z.F)("mainBackground")),Zi=Object($.d)(Z.o).withConfig({displayName:"styled__DropdownIcon",componentId:"y9nggg-4"})(["fill:",";width:12px;height:12px;"],Object(Z.F)("text")),qi=$.d.input.withConfig({displayName:"styled__CustomInput",componentId:"y9nggg-5"})(["border:1px solid ",";color:inherit;background:",";box-sizing:border-box;border-radius:4px;padding:4px;width:32px;height:32px;margin-left:10px;margin-right:10px;outline:none;&:focus{border:1px solid ",";}"],Object(Z.F)("border"),Object(Z.F)("mainBackground"),Object(Z.F)("primary")),$i=Object($.d)(Z.h).attrs({background:"mainBackground",round:2,margin:[4,0,0],border:{side:"all",color:"elementBackground"},animation:!0}).withConfig({displayName:"styled__StyledDrop",componentId:"y9nggg-6"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),Ji=$.d.hr.withConfig({displayName:"styled__StyledHR",componentId:"y9nggg-7"})(["border:none;margin:0;border-left:1px solid ",";height:284px;"],Object(Z.F)("borderSecondary")),Qi=Object(n.memo)((function(e){var t=e.value,a=e.period,o=e.resolution,i=e.isSelected,s=e.setTimeRange,l=e.tagging,c=Object(n.useCallback)((function(){return s(t,o)}),[t,o,s]);return r.a.createElement(Yi,{key:t,onClick:c,"data-ga":"date-picker::click-quick-selector::".concat(l,"::").concat(-t),"data-testid":"timePeriod-value"},r.a.createElement(Z.z,{color:i?"primary":"text"},a))})),es=a(556),ts=a(545),as=a(550),ns=a(546),rs=a(283),os=a(557),is=a(278),ss=["minutes","hours","days","months"],ls={minutes:60,hours:3600,days:86400,months:2592e3},cs=function(e,t){return Math.round(e/ls[t])},us=function(e,t){var a=Object(es.a)(new Date(0),Object(u.a)({},t,e));return-Object(ts.a)(a)},ds={startDate:"start",endDate:"finish"},hs=[{period:"Last 5 minutes",value:-300,resolution:"minutes"},{period:"Last 15 minutes",value:-900,resolution:"minutes"},{period:"Last 30 minutes",value:-1800,resolution:"minutes"},{period:"Last 2 hours",value:-7200,resolution:"hours"},{period:"Last 6 hours",value:-21600,resolution:"hours"},{period:"Last 12 hours",value:-43200,resolution:"hours"},{period:"Last Day",value:-86400,resolution:"days"},{period:"Last 2 Days",value:-172800,resolution:"days"},{period:"Last 7 Days",value:-604800,resolution:"days"}],ps=function(e,t){var a=Object(ns.a)(e,"MMMM d yyyy, H:mm")?e:Object(rs.a)(e,"MMMM d yyyy, H:mm",Date.now());return Object(rs.a)("".concat(a," ").concat(function(e){if(!e)return"+00:00";var t=e.toString().split("."),a=t[0]>0?"+":"-",n=Math.abs(t[0]).toString(),r="".concat(a).concat(n.padStart(2,0));return t.length>1?"".concat(r,":").concat(String(.6*t[1]).padEnd(2,0)):"".concat(r,":00")}(t)),"MMMM d yyyy, H:mm xxx",Date.now())},fs=function(e){var t=e.handleTimePeriodChange,a=e.selectedDate,n=e.tagging;return r.a.createElement(Z.j,{column:!0,justifyContent:"start",alignItems:"start",height:{max:"240px"},overflow:{vertical:"scroll"},"data-testid":"timePeriods"},hs.map((function(e){var o=e.period,i=e.value,s=e.resolution;return r.a.createElement(Qi,{key:i,value:i,period:o,resolution:s,setTimeRange:t,isSelected:a===i,tagging:n})})))},gs=a(174),ms=function(e){var t=e.handleTimePeriodChange,a=e.value,o=e.resolution,i=e.tagging,s=function(){return a<=0?cs(-a,o):0},l=Object(n.useState)(s),c=Object(A.a)(l,2),d=c[0],h=c[1],p=Object(n.useState)(!1),f=Object(A.a)(p,2),g=f[0],m=f[1];Object(n.useEffect)((function(){return h(s())}),[a]);var b=Object(n.useCallback)((function(e){return h(e.target.value)}),[]),v=Object(n.useCallback)((function(e){var n=Number(e.currentTarget.value),r=!Number.isNaN(n)&&Number.isInteger(n)&&n>0,i=Object(es.a)(new Date(0),Object(u.a)({},o,n));return r&&Object(gs.a)(i)&&Object(ts.a)(i)<=94694400?t(us(n,o),o):h(a<=0?cs(-a,o):0)}),[o,a,t]),_=Object(n.useCallback)((function(e){return function(){t(us(d,e),e),m(!1)}}),[d,t]);return r.a.createElement(Z.j,{justifyContent:"start",alignItems:"center",height:8,"data-ga":"date-picker::click-last-integer::".concat(i),"data-testid":"customTimePeriod"},r.a.createElement(Z.z,null,"Last"),r.a.createElement(qi,{value:d,onChange:b,onBlur:v,"data-ga":"date-picker::click-last-integer::".concat(i,"::").concat(d),"data-testid":"timePeriod-timeInput"}),r.a.createElement(Ki,{isOpen:g,onMenuToggle:m,renderTitle:function(){return r.a.createElement(Z.j,{alignItems:"center",flexWrap:!1,width:"100%"},r.a.createElement(Z.z,{padding:[0,4,0,0]},o),r.a.createElement(Zi,{name:"triangle_down"}))},renderOpener:function(){return null}},(function(){return ss.map((function(e){return r.a.createElement(Xi,{key:e,onClick:_(e),"data-ga":"date-picker::click-last-time-".concat(e,"::").concat(i),"data-testid":"timePeriod-option"},e)}))})))},bs=a(547),vs=a(279),_s=a.n(vs),ys=(a(444),function(e){var t=e.selected,a=e.selectsStart,n=void 0!==a&&a,o=e.selectsEnd,i=void 0!==o&&o,s=e.startDate,l=e.endDate,c=e.onChange,u=e.minDate,d=e.maxDate,h=e.dateFormat,p=void 0===h?"MM/dd/yyyy":h,f=e.open,g=void 0!==f&&f,m=e.startOpen,b=void 0!==m&&m,v=e.inline,_=void 0!==v&&v,y=e.selectsRange,O=void 0!==y&&y,x=e.monthsShown,w=void 0===x?1:x,E=e.showPopperArrow,S=void 0===E||E,C=e.calendarContainer,A=void 0===C?null:C;return r.a.createElement(_s.a,{selected:t,onChange:c,selectsStart:n,selectsEnd:i,startDate:s,endDate:l,minDate:u,maxDate:d,dateFormat:p,open:g,startOpen:b,inline:_,selectsRange:O,monthsShown:w,showPopperArrow:S,calendarContainer:A})}),Os=$.d.input.withConfig({displayName:"styled__StyledDateInput",componentId:"sc-1tun1nl-0"})(["width:100%;text-align:center;border:1px solid ",";color:inherit;background:",";box-sizing:border-box;border-radius:4px;padding:4px;height:32px;margin-left:20px;margin-right:20px;outline:none;&:focus{border:1px solid ",";}"],Object(Z.F)("border"),Object(Z.F)("mainBackground"),Object(Z.F)("primary")),xs=$.d.div.withConfig({displayName:"styled__StyledCalendar",componentId:"sc-1tun1nl-1"})(["background:",";border:0;.react-datepicker{&__navigation{top:8px;&-icon::before{border-color:",";}}&__header{background:",";border:0;.react-datepicker__current-month{color:",";font-weight:normal;}.react-datepicker__day-name{color:",";}}&__day{color:",";&:hover{background:",";}&--disabled{color:",";&:hover{background:inherit;}}&--keyboard-selected,&--keyboard-selected:hover{color:",";background:inherit;border-radius:inherit;}&--selected,&--selected:hover{color:",";background:",";border-radius:8px;}&--in-selecting-range,&--in-range{color:",";background:",";border-radius:0;}&--selecting-range-start,&--range-start{color:",";background:",";border-top-left-radius:8px;border-bottom-left-radius:8px;&:hover{color:",";background:",";border-radius:0;border-top-left-radius:8px;border-bottom-left-radius:8px;}}&--selecting-range-end,&--range-end{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;&:hover{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;}}}}"],Object(Z.F)("mainBackground"),Object(Z.F)("text"),Object(Z.F)("mainBackground"),Object(Z.F)("main"),Object(Z.F)("textLite"),Object(Z.F)("main"),Object(Z.F)("elementBackground"),Object(Z.F)("textLite"),Object(Z.F)("main"),Object(Z.F)("bright"),Object(Z.F)("primary"),Object(Z.F)("primary"),Object(Z.F)("elementBackground"),Object(Z.F)("bright"),Object(Z.F)("primary"),Object(Z.F)("bright"),Object(Z.G)(["green","netdata"],.8),Object(Z.F)("bright"),Object(Z.F)("primary"),Object(Z.F)("bright"),Object(Z.G)(["green","netdata"],.8)),ws=function(e){var t=e.name,a=void 0===t?"":t,o=e.value,i=void 0===o?"":o,s=e.onDatesChange,l=e.onFocus,c=e.placeholderText,u=void 0===c?"":c,d=Object(sa.b)().utcOffset,h=Object(n.useState)(""),p=Object(A.a)(h,2),f=p[0],g=p[1],m=Object(n.useCallback)((function(e){var t=e.target.value;g(t)}),[]),b=Object(n.useCallback)((function(e){if(Object(gs.a)(e)){var t=Object(as.a)(e,"MMMM d yyyy, H:mm");g(t)}}),[]),v=Object(n.useCallback)((function(e){var t=ps(e.target.value,d);if(Object(gs.a)(t)&&Object(is.a)(t)>0){var a=Object(is.a)(t);s(a,(function(){return b(i)}))}else b(i)}),[i,d,s,b]);return Object(n.useEffect)((function(){return b(i)}),[i,b]),r.a.createElement(Os,{type:"text",name:a,value:i?f:u,onChange:m,onBlur:v,onFocus:l,placeholder:u,"data-testid":"datePicker-input"})},Es=a(24),Ss=function(){var e=Object(sa.b)(),t=e.localeTimeString,a=e.localeDateString;return Object(n.useCallback)((function(e){return"".concat(a(e,{locale:"en-us",long:!1})," ").concat(t(e,{secs:!1}))}),[t,a])},Cs=function(e,t){return e>0?Object(Es.a)(new Date(t(e))):e||0===e?Object(Es.a)(new Date(t((new Date).valueOf()+1e3*e))):null},As=function(e,t){var a=Ss();return Object(n.useMemo)((function(){return[Cs(e,a),Cs(t,a)]}),[e,t,a])},ks=function(e){var t=e.startDate,a=e.setStartDate,o=e.endDate,i=e.setEndDate,s=e.onDatesChange,l=e.onInputFocus,c=Ss(),u=As(t,o),d=Object(A.a)(u,2),h=d[0],p=d[1],f=Object(sa.b)().utcOffset,g=Object(n.useCallback)((function(e,t){return Object(bs.a)(Cs(e,c),p)?a(e):t()}),[p,c,a]),m=Object(n.useCallback)((function(e,t){return Object(bs.a)(h,Cs(e,c))?i(e):t()}),[h,c,i]),b=Object(n.useCallback)((function(e){var t=Object(A.a)(e,2),a=t[0],n=t[1],r=a?ps(Object(as.a)(a,"MMMM d yyyy, H:mm"),f):a,o=n?ps(Object(as.a)(n,"MMMM d yyyy, H:mm"),f):n,i=Object(is.a)(r)||null,l=Object(is.a)(o)||null;s(i,l)}),[f,s]);return r.a.createElement(Z.j,{column:!0,justifyContent:"center",alignItems:"center",flex:{grow:1},gap:3,margin:[0,0,0,7],"data-testid":"datePicker-wrapper"},r.a.createElement(ys,{selected:h,onChange:b,startDate:h,endDate:p,maxDate:new Date,minDate:new Date("1/1/2018"),inline:!0,selectsRange:!0,monthsShown:2,dateFormat:"MMMM d yyyy, H:mm",showPopperArrow:!1,calendarContainer:xs}),r.a.createElement(Z.j,{justifyContent:"around",alignItems:"center",width:"100%"},r.a.createElement(ws,{name:"startDate",value:h,onDatesChange:g,onFocus:l,placeholderText:"Select a start date"}),r.a.createElement(ws,{name:"endDate",value:p,onDatesChange:m,onFocus:l,placeholderText:"Select an end date"})))},js=function(e){var t=e.startDate,a=e.endDate,o=As(t,a),i=Object(A.a)(o,2),s=i[0],l=i[1],c=Object(n.useMemo)((function(){return function(e,t){return{formattedStartDate:Object(as.a)(e,"MMMM d yyyy, H:mm:ss"),formattedEndDate:Object(as.a)(t,"MMMM d yyyy, H:mm:ss")}}(s,l)}),[s,l]),u=c.formattedStartDate,d=c.formattedEndDate,h=Object(n.useMemo)((function(){return function(e,t){return Object(os.a)(Object(is.a)(e),Object(is.a)(t))}(s,l)}),[s,l]);return r.a.createElement(Z.j,{alignItems:"center",justifyContent:"between",gap:2},r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:1.5},r.a.createElement(Z.D,{strong:!0,whiteSpace:"nowrap"},"From"),r.a.createElement(Z.D,{whiteSpace:"nowrap","data-testid":"periodIndication-from"},u)),r.a.createElement(Z.o,{name:"arrow_left",size:"small",color:"textLite",rotate:2}),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:1.5},r.a.createElement(Z.D,{strong:!0,whiteSpace:"nowrap"},"To"),r.a.createElement(Z.D,{whiteSpace:"nowrap","data-testid":"periodIndication-to"},d)),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:2},r.a.createElement(Z.D,{whiteSpace:"nowrap"},"/"),r.a.createElement(Z.D,{color:"textLite",whiteSpace:"nowrap","data-testid":"periodIndication-period"},h)))},Ts=a(99),Ds=a.n(Ts),Ps=[{value:864e5,unit:"d"},{value:36e5,unit:"h"},{value:6e4,unit:"min"},{value:6e4,unit:"min"},{value:1e3,unit:"s"}],Ms=function(e,t){return Ds.a.duration(e.diff(t))},Ls=function(e){var t=Math.abs(e),a=t<6e4;return Ps.reduce((function(e,n){var r=n.value,o=n.unit;return 1e3!==r||a?(e+=function(e,t){return e>1?"".concat(Math.floor(e)).concat(t):""}(t/r,o),t%=r,e):e}),"")},Is=Object($.d)(Z.j).withConfig({displayName:"container__Container",componentId:"sc-1oifnqd-0"})(["cursor:pointer;&:hover *{color:",";fill:",";}"],Object(Z.F)("textLite"),Object(Z.F)("textLite")),Ns=function(e){var t=e.isPlaying,a=e.startDate,n=e.endDate,o=e.isSameDate,i=Object(sa.b)(),s=i.localeTimeString,l=i.localeDateString;return r.a.createElement(Z.j,{gap:2},r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},l(a,{long:!1})," \u2022"," ",r.a.createElement(Z.D,{color:t?"accent":"textFocus",whiteSpace:"nowrap"},s(a,{secs:!1}))),r.a.createElement(Z.o,{name:"arrow_left",color:t?"accent":"textFocus",size:"small",rotate:2}),r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},!o&&"".concat(l(n,{long:!1})," \u2022 "),r.a.createElement(Z.D,{color:t?"accent":"textFocus",whiteSpace:"nowrap"},s(n,{secs:!1}))))},Rs=function(e){var t=e.isPlaying,a=e.duration;return r.a.createElement(Z.j,{gap:1},r.a.createElement(Z.j,{width:"24px",justifyContent:"center"},t&&r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},"\u2022 last")),r.a.createElement(Z.D,{color:"text",whiteSpace:"nowrap"},a))},Fs=Object(n.forwardRef)((function(e,t){var a=e.onClick,o=e.start,i=void 0===o?9e5:o,s=e.end,l=e.isPlaying,c=e.isPickerOpen,u=e.setRangeValues,d=e.tagging,h=Object(n.useState)(),p=Object(A.a)(h,2),f=p[0],g=p[1],m=function(e){return e<0?Ds()(new Date).add(e,"seconds"):Ds()(e)}(i),b=function(e){return e?Ds()(e):Ds()(new Date)}(s),v=Object(la.b)(ue.m);Object(n.useEffect)((function(){var e=Ms(m,b).as("seconds");l||f===e||g(Math.round(e)),l&&f&&v&&(u({start:Math.round(f)}),g(null))}),[m,b,f,l]);var _=Object(n.useMemo)((function(){return function(e,t){return e.isSame(t,"day")}(m,b)}),[m,b]),y=Object(n.useMemo)((function(){return Ls(Ms(m,b).as("milliseconds"))}),[l,m,b]);return r.a.createElement(Ci,{content:c?function(){}:"Select a predefined or a custom timeframe",align:"bottom",plain:!0},r.a.createElement(Is,{alignItems:"center",justifyContent:"center",gap:1,height:"100%",width:{min:"380px"},onMouseDown:a,padding:[0,1],ref:t,"data-ga":"date-picker::click-time::".concat(d),"data-testid":"datePicker-accessorElement"},r.a.createElement(Ns,{isPlaying:l,endDate:b,startDate:m,isSameDate:_}),r.a.createElement(Rs,{isPlaying:l,duration:y})))})),Bs=function(e){var t=e.onChange,a=e.values,o=(a=void 0===a?{}:a).start,i=a.end,s=e.defaultValue,l=void 0===s?-900:s,c=e.tagging,u=void 0===c?"":c,d=e.isPlaying,h=Object(n.useState)(o),p=Object(A.a)(h,2),f=p[0],g=p[1],m=Object(n.useState)(o),b=Object(A.a)(m,2),v=b[0],_=b[1],y=Bi("resolution","minutes"),O=Object(A.a)(y,2),x=O[0],w=O[1],E=Object(n.useState)("startDate"),S=Object(A.a)(E,2),C=S[0],k=S[1],j=Ri(),T=Object(A.a)(j,4),D=T[0],P=T[1],M=T[3],L=Object(n.useRef)(),I=Object(n.useCallback)((function(e){var t=e.startDate,a=e.endDate;g(t),_(a)}),[]);Object(n.useEffect)((function(){I({startDate:o,endDate:i})}),[o,i,I]);var N=Object(n.useCallback)((function(){return I({startDate:l,endDate:0})}),[]),R=Object(n.useCallback)((function(e){e.target.name&&k(e.target.name)}),[]),F=Object(n.useCallback)((function(e){e.stopPropagation(),P()}),[P]),B=Object(n.useMemo)((function(){return function(e){return ds[e]}(C)}),[C]),H=null!==f&&null!==v&&f!==v,z=f===o&&v===i,U=Object(n.useMemo)((function(){return l}),[]),G=f===U,W=Object(n.useCallback)((function(e,t){w(t),I({startDate:e,endDate:0})}),[I,w]),V=L.current&&D?r.a.createElement($i,{target:L.current,canHideTarget:!1,align:{top:"bottom",left:"left"},onEsc:M,onClickOutside:M},r.a.createElement(Vi,{"data-testid":"datePicker"},r.a.createElement(Z.j,{justifyContent:"between",alignItems:"center",width:"100%",padding:[6,6,0,6]},r.a.createElement(Z.j,{column:!0,gap:3,margin:[0,7,0,0]},r.a.createElement(fs,{handleTimePeriodChange:W,selectedDate:f,tagging:u}),r.a.createElement(ms,{handleTimePeriodChange:W,value:f,resolution:x,tagging:u})),r.a.createElement(Ji,null),r.a.createElement(ks,{startDate:f,endDate:v,setStartDate:g,setEndDate:_,onDatesChange:function(e,t){I({startDate:e,endDate:t}),function(e,t,a,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"gaCustomEvent";if(window.dataLayer){var o={event:r,eventCategory:e,eventAction:t,eventLabel:a,eventValue:n};window.dataLayer.push(o)}}("date-picker","click-date-picker",u,String("finish"===B?t||e:e||t))},onInputFocus:R})),r.a.createElement(Z.j,{alignItems:"center",justifyContent:H?"between":"end",width:"100%",padding:[5,6],gap:2},H&&r.a.createElement(js,{startDate:f,endDate:v}),r.a.createElement(Z.j,{alignItems:"center",justifyContent:"center",gap:4},r.a.createElement(Z.b,{label:"Clear",flavour:"hollow",onClick:N,disabled:G,"data-ga":"date-picker::click-clear::".concat(u,"-").concat(B),"data-testid":"datePicker-clear"}),r.a.createElement(Z.b,{label:"Apply",onClick:function(){t({start:f,end:v}),M()},disabled:!H||z,"data-ga":"date-picker::click-apply::".concat(u,"-").concat(B),"data-testid":"datePicker-apply"}))))):null;return r.a.createElement(r.a.Fragment,null,r.a.createElement(Fs,{onClick:F,tagging:u,isPickerOpen:D,isPlaying:d,setRangeValues:t,start:o,end:i,ref:L}),V)},Hs=Object(n.memo)((function(e){var t=e.tagging,a=e.isPlaying,o=Object(la.a)(),i=Object(la.b)(ue.m),s=Boolean(i),l=Object(la.b)(ue.i),c=Object(n.useMemo)((function(){return s?{start:i.after,end:i.before}:{start:l,end:0}}),[s,i,l]);return Object(n.useEffect)((function(){var e=c.start,t=c.end;Object(Wt.e)({after:e.toString(),before:t.toString()})}),[c]),r.a.createElement(Bs,{values:c,defaultValue:l,onChange:function(e){var t=e.start,a=e.end;t<0?(o(Object(Ke.q)({after:t})),s&&o(Object(Ke.j)())):o(Object(Ke.s)({after:t,before:a}))},tagging:t,isPlaying:a})})),zs=Object($.d)(Z.j).withConfig({displayName:"container__Container",componentId:"sc-1y4i7z8-0"})(["background:",";"],(function(e){var t=e.theme,a=e.isPlaying;return("Dark"===t.name?Object(Z.G)(a?["green","netdata"]:["neutral","tuna"],a?.3:1):Object(Z.G)(a?["green","frostee"]:["neutral","blackhaze"]))({theme:t})})),Us=function(e){var t=e.isPlaying;return Object(Z.F)(t?["green","chateau"]:["neutral","iron"])},Gs=Object($.d)(Z.x).attrs((function(e){return{flavour:e.isPlaying?"success":"neutral"}})).withConfig({displayName:"styledPill__StyledPill",componentId:"sc-151yrns-0"})(["&:hover{background:",";border-color:",";}"],Us,Us),Ws=function(e){var t=e.isPlaying,a=e.isForcePlaying,o=Object(la.a)(),i=Object(n.useMemo)((function(){return function(e,t){return e?t?"forcePlay":"playSolid":"pauseSolid"}(t,a)}),[t,a]);return r.a.createElement(Ci,{content:t?"Click to pause":"Click to play",align:"bottom",plain:!0},r.a.createElement(Gs,{icon:i,onClick:t?function(){return o(Object(Ke.t)())}:function(){return o(Object(Ke.k)({forcePlay:!1}))},isPlaying:t},t?"Playing":"Paused"))},Vs=Object($.d)(Z.j).withConfig({displayName:"item__PanelRowContainer",componentId:"sc-1qh9192-0"})(["cursor:pointer;&:hover{background:",";}",""],Object(Z.F)("selected"),(function(e){return e.selected&&"background: ".concat(Object(Z.F)("selected")(e),";")})),Ys=Object(n.forwardRef)((function(e,t){var a=e.disabled,o=e.children,i=e.Wrapper,s=void 0===i?Z.z:i,l=e.onClick,c=e.testid,u=e.icon,d=e.padding,h=void 0===d?[2,3]:d,p=e.margin,f=void 0===p?[0]:p,g=e.round,m=void 0===g?0:g,b=e.actions,v=e.selected,_=e.width,y=void 0===_?"100%":_,O=Object(n.useCallback)((function(){a||l&&l()}),[l,a]);return r.a.createElement(Vs,{ref:t,flexWrap:!1,justifyContent:"between",alignItems:"center",padding:h,margin:f,round:m,onClick:O,"data-testid":c,width:y,selected:v,disabled:a},r.a.createElement(Z.j,{alignItems:"center",gap:3,flex:!0,basis:""},"string"===typeof u?r.a.createElement(Z.o,{name:u,disabled:a,color:"text",height:"16px",width:"16px"}):u,r.a.createElement(s,{opacity:a?"medium":void 0,width:"150px"},o)),b)})),Xs=Object($.d)(Z.l).attrs({padding:[0],margin:[0]}).withConfig({displayName:"list__DefaultListHeader",componentId:"cb73mo-0"})(["cursor:pointer;"]),Ks=function(e){var t=e.toggleOpen,a=e.label,n=e.testid,o=e.Header,i=void 0===o?Xs:o;return r.a.createElement(i,{"data-testid":n,onClick:t},a)},Zs=function(e){var t=e.isOpen,a=void 0!==t&&t,n=e.toggleOpen,o=e.label,i=e.children,s=e.testid,l=e.Header;return r.a.createElement(Z.j,{column:!0},r.a.createElement(Ks,{Header:l,toggleOpen:n,label:o,testid:s}),r.a.createElement(Z.d,{open:a},i))},qs=(Object($.d)(Z.j).attrs({bacgkround:"disabled",height:"1px",margin:[2,6]}).withConfig({displayName:"styled__Divider",componentId:"sc-1gb5vnf-0"})([""]),function(){return r.a.createElement(Z.j,{padding:[1,2],margin:[1],background:["neutral","black"],round:1,justifyContent:"center",width:{max:"320px"}},r.a.createElement(Z.D,{color:"bright"},"Play to refresh and have live content, pause to see historical, or force play to keep refreshing even when the tab loses focus at the expense of some system performance."))}),$s=Object($.d)(Z.j).attrs({padding:[1],role:"button"}).withConfig({displayName:"playOptions__MenuButton",componentId:"cm1181-0"})(["cursor:pointer;"]),Js=Object($.d)(Z.j).attrs({column:!0,padding:[2],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[2,0,0],width:40}).withConfig({displayName:"playOptions__Dropdown",componentId:"cm1181-1"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),Qs=Object(n.memo)((function(e){var t=e.target,a=Object(la.a)(),o=Object(En.a)(),i=Object(A.a)(o,2),s=i[0],l=i[1],c=function(){return l(!1)};return r.a.createElement(n.Fragment,null,s?r.a.createElement($s,{onClick:l,width:"auto"},r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"})):r.a.createElement(Ci,{content:r.a.createElement(qs,null),align:"bottom",plain:!0},r.a.createElement($s,{onClick:l,width:"auto"},r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"}))),t.current&&s&&r.a.createElement(Z.h,{target:t.current,align:{top:"bottom",left:"left"},onEsc:c,onClickOutside:c,animation:!0},r.a.createElement(Js,null,r.a.createElement(Ys,{round:1,icon:"playOutline",onClick:function(){a(Object(Ke.k)({forcePlay:!1})),c()}},"Play"),r.a.createElement(Ys,{round:1,icon:"pauseOutline",onClick:function(){a(Object(Ke.t)()),c()}},"Pause"),r.a.createElement(Ys,{round:1,icon:"forcePlayOutline",onClick:function(){a(Object(Ke.k)({forcePlay:!0})),c()}},"Force Play"))))})),el=function(){var e=Object(n.useRef)(),t=Object(la.b)(ue.s),a=Object(la.b)(ue.H),o=Object(la.b)(ue.m),i=Object(la.b)(ue.o),s=Object(la.b)(ue.n),l=Object(n.useMemo)((function(){return Boolean((t||!a)&&!o&&!i&&!s)}),[t,a,o,i,s]);return r.a.createElement(yi,{hasBorder:!0},r.a.createElement(zs,{isPlaying:l,padding:[2,2],round:!0,height:"100%",alignItems:"center",gap:1,ref:e},r.a.createElement(Ws,{isPlaying:l,isForcePlaying:!a}),r.a.createElement(Qs,{target:e}),r.a.createElement(Hs,{isPlaying:l,tagging:"global-view"})))},tl={warning:"#FFF8E1",error:"#FFEBEF"},al=Object($.d)(Z.j).attrs((function(e){var t=e.round,a=void 0===t?999:t,n=e.hollow,r=e.background;return{padding:[.5,2],round:a,border:!!n&&{side:"all",color:r,size:"1px"}}})).withConfig({displayName:"styled__StyledPill",componentId:"sc-1rgk900-0"})(["background:",";cursor:pointer;"],(function(e){var t=e.background;return e.hollow?tl[t]:t})),nl=Object(n.forwardRef)((function(e,t){var a=e.children,n=e.background,o=e.color,i=e.hollow,s=Object(gr.a)(e,["children","background","color","hollow"]);return r.a.createElement(al,Object.assign({background:n,hollow:i,ref:t},s),r.a.createElement(Z.B,{color:i?n:o,strong:!0},a))})),rl={"data-toggle":"modal","data-target":"#alarmsModal"},ol=function(){var e=Object(la.b)(ue.c),t=Object(n.useMemo)((function(){return e?Object.values(e.alarms):[]}),[e]),a=Object(n.useMemo)((function(){return t.reduce((function(e,t){var a=t.status;return"CRITICAL"===a&&(e.critical=e.critical+1),"WARNING"===a&&(e.warning=e.warning+1),e}),{critical:0,warning:0})}),[t]),o=a.critical,i=a.warning;return r.a.createElement(yi,{icon:"alarm"},r.a.createElement(Ci,{content:o?"".concat(o," critical alert").concat(o.length>1?"s":""):"No critical alerts",align:"bottom",plain:!0},r.a.createElement(nl,Object.assign({background:"error",hollow:!0},rl),o)),r.a.createElement(Ci,{content:i?"".concat(i," warning alert").concat(i.length>1?"s":""):"No warning alerts",align:"bottom",plain:!0},r.a.createElement(nl,Object.assign({background:"warning",hollow:!0},rl),i)))},il=function(){return r.a.createElement(Z.w,{app:"agent"},(function(e){var t=e.toggle,a=e.upToDate;return r.a.createElement(Ci,{content:"News",align:"bottom",plain:!0},r.a.createElement(Z.b,{"data-testid":"header-news-button",themeType:"dark",name:"news",icon:"insights",flavour:"borderless",neutral:a,warning:!a,onClick:t}))}))},sl=Object($.d)(Z.j).attrs({column:!0,padding:[2],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[2,0,0],width:80}).withConfig({displayName:"dropdown__Dropdown",componentId:"i5fe1c-0"})(["box-shadow:0px 4px 4px rgba(0,0,0,0.25);"]),ll=Object($.d)(Z.A).withConfig({displayName:"searchInput__SearchInput",componentId:"sc-1j08rwh-0"})(["& input{background:transparent;}& > label{margin-bottom:0;}"]),cl=Object(n.forwardRef)((function(e,t){var a=e.value,n=e.onChange;return r.a.createElement(ll,{inputRef:t,value:a,onChange:n,placeholder:"Search",metaShrinked:!0})})),ul=Object($.d)(Z.j).attrs({column:!0,padding:[2,0,0],overflow:{vertical:"auto"},height:{max:"320px"}}).withConfig({displayName:"container__Container",componentId:"qngq57-0"})([""]),dl=Object($.d)(Z.j).attrs({justifyContent:"between",alignItems:"center",width:"100%",gap:2}).withConfig({displayName:"wrapper__Wrapper",componentId:"sc-1m1od8q-0"})([""]),hl=function(e){var t=e.name,a=e.offset,o=e.utc,i=e.onSelect,s=Object(n.useCallback)((function(){return i(o)}),[o,i]);return r.a.createElement(Ys,{round:1,onClick:s,Wrapper:dl},r.a.createElement(Z.z,{color:"text"},t),r.a.createElement(Z.z,{color:"textLite",whiteSpace:"nowrap"},"UTC ",a))},pl=[{value:"Dateline Standard Time",abbr:"DST",text:"International Date Line West",utc:["Etc/GMT+12"]},{value:"UTC-11",abbr:"U",text:"Coordinated Universal Time-11",utc:["Etc/GMT+11","Pacific/Midway","Pacific/Niue","Pacific/Pago_Pago"]},{value:"Hawaiian Standard Time",abbr:"HST",text:"Hawaii",utc:["Etc/GMT+10","Pacific/Honolulu","Pacific/Johnston","Pacific/Rarotonga","Pacific/Tahiti"]},{value:"Alaskan Standard Time",abbr:"AKDT",text:"Alaska",utc:["America/Anchorage","America/Juneau","America/Nome","America/Sitka","America/Yakutat"]},{value:"Pacific Standard Time (Mexico)",abbr:"PDT",text:"Baja California",utc:["America/Santa_Isabel"]},{value:"Pacific Standard Time",abbr:"PST",text:"Pacific Time (US & Canada)",utc:["America/Dawson","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse","PST8PDT"]},{value:"US Mountain Standard Time",abbr:"UMST",text:"Arizona",utc:["America/Creston","America/Dawson_Creek","America/Hermosillo","America/Phoenix","Etc/GMT+7"]},{value:"Mountain Standard Time (Mexico)",abbr:"MDT",text:"Chihuahua, La Paz, Mazatlan",utc:["America/Chihuahua","America/Mazatlan"]},{value:"Mountain Standard Time",abbr:"MDT",text:"Mountain Time (US & Canada)",utc:["America/Boise","America/Cambridge_Bay","America/Denver","America/Edmonton","America/Inuvik","America/Ojinaga","America/Yellowknife","MST7MDT"]},{value:"Central America Standard Time",abbr:"CAST",text:"Central America",utc:["America/Belize","America/Costa_Rica","America/El_Salvador","America/Guatemala","America/Managua","America/Tegucigalpa","Etc/GMT+6","Pacific/Galapagos"]},{value:"Central Standard Time",abbr:"CDT",text:"Central Time (US & Canada)",utc:["America/Chicago","America/Indiana/Knox","America/Indiana/Tell_City","America/Matamoros","America/Menominee","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Rainy_River","America/Rankin_Inlet","America/Resolute","America/Winnipeg","CST6CDT"]},{value:"Central Standard Time (Mexico)",abbr:"CDT",text:"Guadalajara, Mexico City, Monterrey",utc:["America/Bahia_Banderas","America/Cancun","America/Merida","America/Mexico_City","America/Monterrey"]},{value:"Canada Central Standard Time",abbr:"CCST",text:"Saskatchewan",utc:["America/Regina","America/Swift_Current"]},{value:"SA Pacific Standard Time",abbr:"SPST",text:"Bogota, Lima, Quito",utc:["America/Bogota","America/Cayman","America/Coral_Harbour","America/Eirunepe","America/Guayaquil","America/Jamaica","America/Lima","America/Panama","America/Rio_Branco","Etc/GMT+5"]},{value:"Eastern Standard Time",abbr:"EDT",text:"Eastern Time (US & Canada)",utc:["America/Detroit","America/Havana","America/Indiana/Petersburg","America/Indiana/Vincennes","America/Indiana/Winamac","America/Iqaluit","America/Kentucky/Monticello","America/Louisville","America/Montreal","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port-au-Prince","America/Thunder_Bay","America/Toronto","EST5EDT"]},{value:"US Eastern Standard Time",abbr:"UEDT",text:"Indiana (East)",utc:["America/Indiana/Marengo","America/Indiana/Vevay","America/Indianapolis"]},{value:"Venezuela Standard Time",abbr:"VST",text:"Caracas",utc:["America/Caracas"]},{value:"Paraguay Standard Time",abbr:"PYT",text:"Asuncion",utc:["America/Asuncion"]},{value:"Atlantic Standard Time",abbr:"ADT",text:"Atlantic Time (Canada)",utc:["America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Moncton","America/Thule","Atlantic/Bermuda"]},{value:"Central Brazilian Standard Time",abbr:"CBST",text:"Cuiaba",utc:["America/Campo_Grande","America/Cuiaba"]},{value:"SA Western Standard Time",abbr:"SWST",text:"Georgetown, La Paz, Manaus, San Juan",utc:["America/Anguilla","America/Antigua","America/Aruba","America/Barbados","America/Blanc-Sablon","America/Boa_Vista","America/Curacao","America/Dominica","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guyana","America/Kralendijk","America/La_Paz","America/Lower_Princes","America/Manaus","America/Marigot","America/Martinique","America/Montserrat","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Santo_Domingo","America/St_Barthelemy","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Tortola","Etc/GMT+4"]},{value:"Pacific SA Standard Time",abbr:"PSST",text:"Santiago",utc:["America/Santiago","Antarctica/Palmer"]},{value:"Newfoundland Standard Time",abbr:"NDT",text:"Newfoundland",utc:["America/St_Johns"]},{value:"E. South America Standard Time",abbr:"ESAST",text:"Brasilia",utc:["America/Sao_Paulo"]},{value:"Argentina Standard Time",abbr:"AST",text:"Buenos Aires",utc:["America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Buenos_Aires","America/Catamarca","America/Cordoba","America/Jujuy","America/Mendoza"]},{value:"SA Eastern Standard Time",abbr:"SEST",text:"Cayenne, Fortaleza",utc:["America/Araguaina","America/Belem","America/Cayenne","America/Fortaleza","America/Maceio","America/Paramaribo","America/Recife","America/Santarem","Antarctica/Rothera","Atlantic/Stanley","Etc/GMT+3"]},{value:"Greenland Standard Time",abbr:"GDT",text:"Greenland",utc:["America/Godthab"]},{value:"Montevideo Standard Time",abbr:"MST",text:"Montevideo",utc:["America/Montevideo"]},{value:"Bahia Standard Time",abbr:"BST",text:"Salvador",utc:["America/Bahia"]},{value:"UTC-02",abbr:"U",text:"Coordinated Universal Time-02",utc:["America/Noronha","Atlantic/South_Georgia","Etc/GMT+2"]},{value:"Mid-Atlantic Standard Time",abbr:"MDT",text:"Mid-Atlantic - Old",utc:[]},{value:"Azores Standard Time",abbr:"ADT",text:"Azores",utc:["America/Scoresbysund","Atlantic/Azores"]},{value:"Cape Verde Standard Time",abbr:"CVST",text:"Cape Verde Is.",utc:["Atlantic/Cape_Verde","Etc/GMT+1"]},{value:"Morocco Standard Time",abbr:"MDT",text:"Casablanca",utc:["Africa/Casablanca","Africa/El_Aaiun"]},{value:"UTC",abbr:"UTC",text:"Coordinated Universal Time",utc:["America/Danmarkshavn","Etc/GMT"]},{value:"GMT Standard Time",abbr:"GMT",text:"Edinburgh, London",utc:["Europe/Isle_of_Man","Europe/Guernsey","Europe/Jersey","Europe/London"]},{value:"GMT Standard Time",abbr:"GDT",text:"Dublin, Lisbon",utc:["Atlantic/Canary","Atlantic/Faeroe","Atlantic/Madeira","Europe/Dublin","Europe/Lisbon"]},{value:"Greenwich Standard Time",abbr:"GST",text:"Monrovia, Reykjavik",utc:["Africa/Abidjan","Africa/Accra","Africa/Bamako","Africa/Banjul","Africa/Bissau","Africa/Conakry","Africa/Dakar","Africa/Freetown","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Africa/Sao_Tome","Atlantic/Reykjavik","Atlantic/St_Helena"]},{value:"W. Europe Standard Time",abbr:"WEDT",text:"Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",utc:["Arctic/Longyearbyen","Europe/Amsterdam","Europe/Andorra","Europe/Berlin","Europe/Busingen","Europe/Gibraltar","Europe/Luxembourg","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Rome","Europe/San_Marino","Europe/Stockholm","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Zurich"]},{value:"Central Europe Standard Time",abbr:"CEDT",text:"Belgrade, Bratislava, Budapest, Ljubljana, Prague",utc:["Europe/Belgrade","Europe/Bratislava","Europe/Budapest","Europe/Ljubljana","Europe/Podgorica","Europe/Prague","Europe/Tirane"]},{value:"Romance Standard Time",abbr:"RDT",text:"Brussels, Copenhagen, Madrid, Paris",utc:["Africa/Ceuta","Europe/Brussels","Europe/Copenhagen","Europe/Madrid","Europe/Paris"]},{value:"Central European Standard Time",abbr:"CEDT",text:"Sarajevo, Skopje, Warsaw, Zagreb",utc:["Europe/Sarajevo","Europe/Skopje","Europe/Warsaw","Europe/Zagreb"]},{value:"W. Central Africa Standard Time",abbr:"WCAST",text:"West Central Africa",utc:["Africa/Algiers","Africa/Bangui","Africa/Brazzaville","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Malabo","Africa/Ndjamena","Africa/Niamey","Africa/Porto-Novo","Africa/Tunis","Etc/GMT-1"]},{value:"Namibia Standard Time",abbr:"NST",text:"Windhoek",utc:["Africa/Windhoek"]},{value:"GTB Standard Time",abbr:"GDT",text:"Athens, Bucharest",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau"]},{value:"Middle East Standard Time",abbr:"MEDT",text:"Beirut",utc:["Asia/Beirut"]},{value:"Egypt Standard Time",abbr:"EST",text:"Cairo",utc:["Africa/Cairo"]},{value:"Syria Standard Time",abbr:"SDT",text:"Damascus",utc:["Asia/Damascus"]},{value:"E. Europe Standard Time",abbr:"EEDT",text:"E. Europe",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{value:"South Africa Standard Time",abbr:"SAST",text:"Harare, Pretoria",utc:["Africa/Blantyre","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Kigali","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Etc/GMT-2"]},{value:"FLE Standard Time",abbr:"FDT",text:"Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",utc:["Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{value:"Turkey Standard Time",abbr:"TDT",text:"Istanbul",utc:["Europe/Istanbul"]},{value:"Israel Standard Time",abbr:"JDT",text:"Jerusalem",utc:["Asia/Jerusalem"]},{value:"Libya Standard Time",abbr:"LST",text:"Tripoli",utc:["Africa/Tripoli"]},{value:"Jordan Standard Time",abbr:"JST",text:"Amman",utc:["Asia/Amman"]},{value:"Arabic Standard Time",abbr:"AST",text:"Baghdad",utc:["Asia/Baghdad"]},{value:"Kaliningrad Standard Time",abbr:"KST",text:"Kaliningrad",utc:["Europe/Kaliningrad"]},{value:"Arab Standard Time",abbr:"AST",text:"Kuwait, Riyadh",utc:["Asia/Aden","Asia/Bahrain","Asia/Kuwait","Asia/Qatar","Asia/Riyadh"]},{value:"E. Africa Standard Time",abbr:"EAST",text:"Nairobi",utc:["Africa/Addis_Ababa","Africa/Asmera","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Mogadishu","Africa/Nairobi","Antarctica/Syowa","Etc/GMT-3","Indian/Antananarivo","Indian/Comoro","Indian/Mayotte"]},{value:"Moscow Standard Time",abbr:"MSK",text:"Moscow, St. Petersburg, Volgograd, Minsk",utc:["Europe/Kirov","Europe/Moscow","Europe/Simferopol","Europe/Volgograd","Europe/Minsk"]},{value:"Samara Time",abbr:"SAMT",text:"Samara, Ulyanovsk, Saratov",utc:["Europe/Astrakhan","Europe/Samara","Europe/Ulyanovsk"]},{value:"Iran Standard Time",abbr:"IDT",text:"Tehran",utc:["Asia/Tehran"]},{value:"Arabian Standard Time",abbr:"AST",text:"Abu Dhabi, Muscat",utc:["Asia/Dubai","Asia/Muscat","Etc/GMT-4"]},{value:"Azerbaijan Standard Time",abbr:"ADT",text:"Baku",utc:["Asia/Baku"]},{value:"Mauritius Standard Time",abbr:"MST",text:"Port Louis",utc:["Indian/Mahe","Indian/Mauritius","Indian/Reunion"]},{value:"Georgian Standard Time",abbr:"GET",text:"Tbilisi",utc:["Asia/Tbilisi"]},{value:"Caucasus Standard Time",abbr:"CST",text:"Yerevan",utc:["Asia/Yerevan"]},{value:"Afghanistan Standard Time",abbr:"AST",text:"Kabul",utc:["Asia/Kabul"]},{value:"West Asia Standard Time",abbr:"WAST",text:"Ashgabat, Tashkent",utc:["Antarctica/Mawson","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Dushanbe","Asia/Oral","Asia/Samarkand","Asia/Tashkent","Etc/GMT-5","Indian/Kerguelen","Indian/Maldives"]},{value:"Yekaterinburg Time",abbr:"YEKT",text:"Yekaterinburg",utc:["Asia/Yekaterinburg"]},{value:"Pakistan Standard Time",abbr:"PKT",text:"Islamabad, Karachi",utc:["Asia/Karachi"]},{value:"India Standard Time",abbr:"IST",text:"Chennai, Kolkata, Mumbai, New Delhi",utc:["Asia/Kolkata"]},{value:"Sri Lanka Standard Time",abbr:"SLST",text:"Sri Jayawardenepura",utc:["Asia/Colombo"]},{value:"Nepal Standard Time",abbr:"NST",text:"Kathmandu",utc:["Asia/Kathmandu"]},{value:"Central Asia Standard Time",abbr:"CAST",text:"Nur-Sultan (Astana)",utc:["Antarctica/Vostok","Asia/Almaty","Asia/Bishkek","Asia/Qyzylorda","Asia/Urumqi","Etc/GMT-6","Indian/Chagos"]},{value:"Bangladesh Standard Time",abbr:"BST",text:"Dhaka",utc:["Asia/Dhaka","Asia/Thimphu"]},{value:"Myanmar Standard Time",abbr:"MST",text:"Yangon (Rangoon)",utc:["Asia/Rangoon","Indian/Cocos"]},{value:"SE Asia Standard Time",abbr:"SAST",text:"Bangkok, Hanoi, Jakarta",utc:["Antarctica/Davis","Asia/Bangkok","Asia/Hovd","Asia/Jakarta","Asia/Phnom_Penh","Asia/Pontianak","Asia/Saigon","Asia/Vientiane","Etc/GMT-7","Indian/Christmas"]},{value:"N. Central Asia Standard Time",abbr:"NCAST",text:"Novosibirsk",utc:["Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk"]},{value:"China Standard Time",abbr:"CST",text:"Beijing, Chongqing, Hong Kong, Urumqi",utc:["Asia/Hong_Kong","Asia/Macau","Asia/Shanghai"]},{value:"North Asia Standard Time",abbr:"NAST",text:"Krasnoyarsk",utc:["Asia/Krasnoyarsk"]},{value:"Singapore Standard Time",abbr:"MPST",text:"Kuala Lumpur, Singapore",utc:["Asia/Brunei","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Makassar","Asia/Manila","Asia/Singapore","Etc/GMT-8"]},{value:"W. Australia Standard Time",abbr:"WAST",text:"Perth",utc:["Antarctica/Casey","Australia/Perth"]},{value:"Taipei Standard Time",abbr:"TST",text:"Taipei",utc:["Asia/Taipei"]},{value:"Ulaanbaatar Standard Time",abbr:"UST",text:"Ulaanbaatar",utc:["Asia/Choibalsan","Asia/Ulaanbaatar"]},{value:"North Asia East Standard Time",abbr:"NAEST",text:"Irkutsk",utc:["Asia/Irkutsk"]},{value:"Japan Standard Time",abbr:"JST",text:"Osaka, Sapporo, Tokyo",utc:["Asia/Dili","Asia/Jayapura","Asia/Tokyo","Etc/GMT-9","Pacific/Palau"]},{value:"Korea Standard Time",abbr:"KST",text:"Seoul",utc:["Asia/Pyongyang","Asia/Seoul"]},{value:"Cen. Australia Standard Time",abbr:"CAST",text:"Adelaide",utc:["Australia/Adelaide","Australia/Broken_Hill"]},{value:"AUS Central Standard Time",abbr:"ACST",text:"Darwin",utc:["Australia/Darwin"]},{value:"E. Australia Standard Time",abbr:"EAST",text:"Brisbane",utc:["Australia/Brisbane","Australia/Lindeman"]},{value:"AUS Eastern Standard Time",abbr:"AEST",text:"Canberra, Melbourne, Sydney",utc:["Australia/Melbourne","Australia/Sydney"]},{value:"West Pacific Standard Time",abbr:"WPST",text:"Guam, Port Moresby",utc:["Antarctica/DumontDUrville","Etc/GMT-10","Pacific/Guam","Pacific/Port_Moresby","Pacific/Saipan","Pacific/Truk"]},{value:"Tasmania Standard Time",abbr:"TST",text:"Hobart",utc:["Australia/Currie","Australia/Hobart"]},{value:"Yakutsk Standard Time",abbr:"YST",text:"Yakutsk",utc:["Asia/Chita","Asia/Khandyga","Asia/Yakutsk"]},{value:"Central Pacific Standard Time",abbr:"CPST",text:"Solomon Is., New Caledonia",utc:["Antarctica/Macquarie","Etc/GMT-11","Pacific/Efate","Pacific/Guadalcanal","Pacific/Kosrae","Pacific/Noumea","Pacific/Ponape"]},{value:"Vladivostok Standard Time",abbr:"VST",text:"Vladivostok",utc:["Asia/Sakhalin","Asia/Ust-Nera","Asia/Vladivostok"]},{value:"New Zealand Standard Time",abbr:"NZST",text:"Auckland, Wellington",utc:["Antarctica/McMurdo","Pacific/Auckland"]},{value:"UTC+12",abbr:"U",text:"Coordinated Universal Time+12",utc:["Etc/GMT-12","Pacific/Funafuti","Pacific/Kwajalein","Pacific/Majuro","Pacific/Nauru","Pacific/Tarawa","Pacific/Wake","Pacific/Wallis"]},{value:"Fiji Standard Time",abbr:"FST",text:"Fiji",utc:["Pacific/Fiji"]},{value:"Magadan Standard Time",abbr:"MST",text:"Magadan",utc:["Asia/Anadyr","Asia/Kamchatka","Asia/Magadan","Asia/Srednekolymsk"]},{value:"Kamchatka Standard Time",abbr:"KDT",text:"Petropavlovsk-Kamchatsky - Old",utc:["Asia/Kamchatka"]},{value:"Tonga Standard Time",abbr:"TST",text:"Nuku'alofa",utc:["Etc/GMT-13","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Tongatapu"]},{value:"Samoa Standard Time",abbr:"SST",text:"Samoa",utc:["Pacific/Apia"]}],fl=new Date,gl=function(){return new Intl.DateTimeFormat("default",{}).resolvedOptions()},ml=function(){var e={};return pl.reduce((function(t,a){var n=a.utc;try{var r=new Intl.DateTimeFormat("fr",{timeZone:n[0],timeZoneName:"short"}).format(fl).match(/[\u2212+].+/)||[],o=function(e){return e?e.replace("\u2212","-"):""}(Object(A.a)(r,1)[0]);if(e[o])return t.concat(Object(g.a)({},a,{offset:e[o]}));var i=function(e){if(!e)return"+0";var t=e.split(":");return t.length>1?"".concat(t[0]).concat((t[1]/60).toString().substr(1)):t[0]}(o);return e[o]=i,t.concat(Object(g.a)({},a,{offset:i}))}catch(s){return t}}),[])}().sort((function(e,t){return e.offset-t.offset})),bl=ml.reduce((function(e,t){var a=t.utc,n=Object(gr.a)(t,["utc"]);return a.forEach((function(t){return e[t]=Object(g.a)({},n,{utc:t})})),e}),{}),vl=function(){var e=Object(n.useState)(""),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(En.a)(),s=Object(A.a)(i,2),l=s[0],c=s[1],u=Object(n.useRef)(),d=Object(n.useRef)(),h=window.urlOptions.updateUtcParam;Object(n.useEffect)((function(){d.current&&l&&d.current.focus()}),[l]);var p=Object(la.a)(),f=Object(la.b)(ue.M),g=Object(n.useMemo)((function(){var e=Object(Wt.b)().utc,t=void 0===e?"":e,a=function(e,t){var a=t||("default"===e?gl().timeZone:e);return bl[a in bl?a:gl().timeZone]||{}}(f,t),n=a.offset,r=void 0===n?"":n,o=a.utc,i=void 0===o?"":o;return t!==i&&h(i),f!==i&&p(Object(Ke.v)({key:"timezone",value:i})),p(Object(Ke.v)({key:"utcOffset",value:parseFloat(r)})),r}),[f]),m=Object(n.useMemo)((function(){return a?ml.filter((function(e){var t=e.text,n=e.offset;return t.toUpperCase().includes(a.toUpperCase())||n.includes(a)})):ml}),[a]),b=function(){c(!1),o("")},v=Object(n.useCallback)((function(e){h(e),p(Object(Ke.v)({key:"timezone",value:e})),b()}),[]),_=Object(n.useCallback)((function(e){return o(e.target.value)}),[]);return r.a.createElement(yi,{hasBorder:!0},r.a.createElement(Ys,{round:1,onClick:c,ref:u,Wrapper:dl},r.a.createElement(Z.j,{gap:1},r.a.createElement(Z.z,{color:"textLite",whiteSpace:"nowrap"},"UTC ",g)),r.a.createElement(Z.o,{name:"chevron_down",color:"text",width:"12px",height:"12px"})),u.current&&l&&r.a.createElement(Z.h,{target:u.current,align:{top:"bottom",left:"left"},onEsc:b,onClickOutside:b,animation:!0},r.a.createElement(sl,null,r.a.createElement(cl,{value:a,onChange:_,ref:d}),r.a.createElement(ul,null,m.map((function(e){var t=e.text,a=e.offset,n=e.utc;return r.a.createElement(hl,{key:t,name:t,offset:a,utc:n[0],onSelect:v})}))))))},_l=a(78),yl=a(501),Ol=a(73),xl=a(124),wl=a(182),El=Object($.d)(Z.j).attrs({position:"absolute"}).withConfig({displayName:"iframe__IframeContainer",componentId:"sc-1tybwh7-0"})(["display:none;"]),Sl=function(e){var t=e.signedIn,a=Object(n.useState)(!1),o=Object(A.a)(a,2),i=o[0],s=o[1],l=Object(n.useRef)(),c=Object(n.useRef)(),u=Object(yl.a)(Xt),d=Object(A.a)(u,3),h=d[0],p=d[2],f=Object(la.b)(ue.f),g=Object(la.b)(ue.y),m=Object(la.a)(),v=window.location,_=v.origin,y=v.pathname,O=encodeURIComponent(g.hostname),x=encodeURIComponent(_+y),w=Object(Ve.c)(f,"sign-in?id=".concat(g.machineGuid,"&name=").concat(O,"&origin=").concat(x));Object(Ol.b)("hello-from-sign-in",(function(e){l.current=e})),Object(xl.a)();var E=Object(n.useCallback)((function(){s(!0),setTimeout((function(){return m(Object(b.c)({offline:void 0===l.current}))}),500)}),[]);return Object(n.useEffect)((function(){var e=function(e){(null===e||void 0===e?void 0:e.target)&&(e.target.src!==w||i||E())};return window.addEventListener("DOMFrameContentLoaded",e),function(){return window.removeEventListener("DOMFrameContentLoaded",e)}}),[w,i,E]),Object(n.useEffect)((function(){if(t&&c.current&&g.registryServer&&g.registryServer!==Ve.b&&h){p();var e=g.registryMachinesArray;e&&e.length>0&&Object(Ol.a)(c.current,{type:"synced-private-registry",payload:e})}}),[t,g,h]),r.a.createElement(El,{as:"iframe",id:wl.a,src:w,onLoad:E})},Cl=function(){var e=Object(s.d)(),t=Object(yl.a)("has-sign-in-history"),a=Object(A.a)(t,2),r=a[0],o=a[1],i=Object(n.useState)(r),l=Object(A.a)(i,2),c=l[0],u=l[1],d=Object(n.useCallback)((function(t){t&&(u(t),o(t)),e(Object(b.b)({isSignedIn:t}))}),[]),h=Object(Ol.b)("is-signed-in",d);return[Object(A.a)(h,1)[0],c]},Al=function(){var e=Cl(),t=Object(A.a)(e,1)[0];return Object(s.e)(ue.u)&&r.a.createElement(Ci,{content:"Sign in to Netdata to monitor all your nodes at once, have composite charts, custom dashboards, use intelligent features and more",align:"bottom",plain:!0},r.a.createElement("div",null,r.a.createElement(Sl,{signedIn:t}),!t&&r.a.createElement(_l.a,{utmParameters:{content:"topbar"}},(function(e){var t=e.isRegistry,a=e.link,n=e.offline,o=e.onSignIn;return r.a.createElement(Z.b,Object.assign({"data-testid":"header-signin",label:"Sign in",disabled:n},t?{as:"a",href:a}:{onClick:o}))}))))},kl=a(282),jl=Object($.d)(Z.j).attrs({as:"header",position:"relative",justifyContent:"between",background:"panel",zIndex:20,width:"100%",padding:[2,4,2,4]}).withConfig({displayName:"header__Wrapper",componentId:"c0wsrq-0"})(["pointer-events:all;"]),Tl=function(){return r.a.createElement(jl,null,r.a.createElement(Z.j,{alignItems:"center",gap:3},r.a.createElement(xi,null)),r.a.createElement(Z.j,{justifyContent:"end",alignItems:"center",gap:3},r.a.createElement(kl.CloudConnectionStatus,null),r.a.createElement(Ni,null),r.a.createElement(il,null),r.a.createElement(Ai,null),r.a.createElement(Mi,null),r.a.createElement(vl,null),r.a.createElement(el,null),r.a.createElement(ol,null),r.a.createElement(Al,null)))},Dl=Object($.d)(Z.b).withConfig({displayName:"expandButton__ExpandButton",componentId:"ebkdno-0"})(["&&{> .button-icon{width:6px;height:9px;}"]),Pl=a(140),Ml=function(e){var t=e.flavour,a=void 0===t?"default":t,n=Object(gr.a)(e,["flavour"]),o=Object(s.e)(ue.f);return r.a.createElement(Z.j,Object.assign({alignItems:"center",as:"iframe",src:"".concat(Object(Pl.a)(o,"sign-out"),"?type=").concat(a),border:{side:"all",size:"0px"},width:{max:"128px"},height:{max:"40px"}},n))},Ll=function(){return r.a.createElement(_l.a,{utmParameters:{content:"userSettings"}},(function(e){var t=e.isRegistry,a=e.link,n=e.onSignIn;return r.a.createElement(Z.z,{onClick:t?function(e){return function(e,t){e.stopPropagation(),window.open(t,"_blank","noopener,noreferrer")}(e,a)}:n},"Sign in")}))},Il=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return e.isSignedIn})),Nl=function(){var e=Object(En.a)(),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(la.b)(Il),s=Object(n.useMemo)((function(){return[].concat(Object(C.a)(i?[{children:"Operational Status",onClick:function(){return window.open("https://status.netdata.cloud","_blank","noopener,noreferrer")}}]:[]),Object(C.a)(i?[{separator:!0}]:[]),Object(C.a)(i?[{children:r.a.createElement(Ml,{"data-testid":"signout-button-sidebar",flavour:"borderless",height:{max:"18px"}})}]:[{children:r.a.createElement(Ll,null)}]))}),[i]);return r.a.createElement($.b,{theme:Z.e},r.a.createElement(Z.b,{"data-testid":"avatar-button-sidebar",flavour:"borderless",neutral:!0,icon:"user",title:"User settings",name:"userSettings",onClick:o}),a&&r.a.createElement(Z.p,{position:"bottom-left",onClickOutside:o,onEsc:o,backdrop:!1,margin:[5,18]},r.a.createElement(Z.j,{column:!0,width:52,background:"mainBackground",padding:[3],round:!0},s.map((function(e,t){return e.separator?r.a.createElement(Z.j,{height:"1px",background:"disabled",key:t}):r.a.createElement(Ys,Object.assign({key:t,padding:[2,4],round:1},e.onClick&&{onClick:e.onClick}),e.children)})))))},Rl=function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.j,{width:"40px",height:"40px",round:2,border:{side:"all",color:"border",size:"2px",type:"dotted"}}),r.a.createElement(Z.j,{height:"1px",background:"separator",width:"20px"}),r.a.createElement(Z.b,{icon:"plus",disabled:!0}))},Fl=function(){var e=Object(la.b)(ue.f);return r.a.createElement(Z.j,{as:"iframe",src:Object(Ve.c)(e,"space-bar"),title:"Space Bar",height:"100%",width:"100%",border:{side:"all",size:"0px"},overflow:"hidden"})},Bl=function(e){var t=e.isOpen,a=e.toggle,n=e.isSignedIn,o=Object(s.e)(ue.u);return r.a.createElement(Z.j,{column:!0,justifyContent:"between",background:"panel",padding:[3,0],width:"64px",alignItems:"center",gap:6,position:"relative",overflow:"hidden"},r.a.createElement(Z.j,{column:!0,gap:4,alignItems:"center",height:"100%",overflow:"hidden"},r.a.createElement(Z.o,{color:"success",name:"netdataPress",height:"32px",width:"32px"}),!t&&r.a.createElement(Dl,{icon:"chevron_right_s",onClick:a,small:!0,neutral:!0,flavour:"borderless",themeType:"dark"}),o&&n&&r.a.createElement(Fl,null),o&&!n&&r.a.createElement(Rl,null)),r.a.createElement(Z.j,{column:!0,gap:4,alignItems:"center"},r.a.createElement(Z.g,{app:"agent"},(function(e){return r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark",className:"btn",icon:"question",onClick:e,title:"Need help?"})})),r.a.createElement(Z.b,{flavour:"borderless",neutral:!0,themeType:"dark",className:"btn","data-toggle":"modal","data-target":"#optionsModal",icon:"gear",title:"Settings"}),o&&r.a.createElement(Nl,null)))},Hl=function(e){for(var t,a,n=[],r=0,o=-1,i=0;t=(a=e.charAt(r++)).charCodeAt(0);){var s=t>=48&&t<=57;s!==i&&(n[++o]="",i=s),n[o]+=a}return n},zl=function(e,t){for(var a=Hl(e.toLowerCase()),n=Hl(t.toLowerCase()),r=0;a[r]&&n[r];r++)if(a[r]!==n[r]){var o=Number(a[r]),i=Number(n[r]);return o.toString()===a[r]&&i.toString()===n[r]?o-i:a[r]>n[r]?1:-1}return a.length-n.length},Ul=function(e,t){return"".concat(e,"/host/").concat(t,"/")},Gl=function(e,t,a){if(!e||!t)return{};var n=function(e){var t=document.location.origin.toString()+decodeURI(document.location.pathname.toString());return t.endsWith("/host/".concat(e,"/"))&&(t=t.substring(0,t.length-"/host/".concat(e,"/").toString().length)),t.endsWith("/")&&(t=t.substring(0,t.length-1)),t}(t);return{parentNode:{hostname:Object(A.a)(e,1)[0].hostname,url:"".concat(n,"/")},replicatedNodes:e.slice(1).map((function(e,t){var r=e.hostname;return{hostname:r,url:Ul(n,r),status:a[t+1].reachable}})).sort((function(e,t){return zl(e.hostname,t.hostname)}))}},Wl=Object($.d)(Z.j).attrs({as:"a",gap:2,alignItems:"center"}).withConfig({displayName:"anchor__Anchor",componentId:"sc-8wivg4-0"})(["&:hover{text-decoration:none;}"]),Vl=function(e){var t=e.hostname,a=e.url,n=e.status;return r.a.createElement(Wl,{href:a,justifyContent:"between",padding:[0,0,0,2]},r.a.createElement(Z.j,{alignItems:"center",gap:2},r.a.createElement(Z.o,{name:"node",color:"bright"}),r.a.createElement(Z.z,{color:"bright",truncate:!0},t)),r.a.createElement(nl,{background:n?"success":"border",color:"bright",round:10},n?"Live":"Off"))},Yl=Object($.d)(Z.A).withConfig({displayName:"replicatedNodes__Search",componentId:"sc-1bn9jso-0"})(["& > label{margin-bottom:0;}"]),Xl=Object($.d)(Z.o).withConfig({displayName:"replicatedNodes__StyledIcon",componentId:"sc-1bn9jso-1"})(["transform:",";"],(function(e){return e.right?"rotate(270deg)":"none"})),Kl=function(e){var t=e.parentNode,a=e.replicatedNodes,o=Object(n.useState)(!0),i=Object(A.a)(o,2),s=i[0],l=i[1],c=Object(n.useState)(""),u=Object(A.a)(c,2),d=u[0],h=u[1],p=Object(n.useCallback)((function(){return l((function(e){return!e}))}),[]),f=Object(n.useCallback)((function(e){return h(e.target.value)}),[]),g=Object(n.useMemo)((function(){return d?a.filter((function(e){return e.hostname.toLowerCase().includes(d.toLowerCase())})):a}),[a,d]);return r.a.createElement(Zs,{isOpen:s,toggleOpen:p,label:r.a.createElement(Z.j,{alignItems:"center",justifyContent:"between"},r.a.createElement(Z.z,{strong:!0,color:"border"},"Replicated nodes"),r.a.createElement(Xl,{right:!s,name:"chevron_down",size:"small",color:"text"}))},r.a.createElement(Z.j,{column:!0,gap:4,padding:[4,0,0]},r.a.createElement(Wl,{as:"a",href:t.url,justifyContent:"start"},r.a.createElement(Z.o,{name:"nodes",size:"small",color:"bright"}),r.a.createElement(Z.z,{color:"bright"},t.hostname)),g.length>=5&&r.a.createElement(Z.j,{padding:[0,0,0,2]},r.a.createElement(Yl,{value:d,onChange:f,iconLeft:r.a.createElement(Z.o,{name:"search_s",size:"small",color:"text"}),metaShrinked:!0})),r.a.createElement(Z.j,{column:!0,gap:2},g.map((function(e){var t=e.hostname,a=e.url,n=e.status;return r.a.createElement(Vl,{key:t,hostname:t,url:a,status:n})})))))},Zl=function(e){var t=e.parentNode,a=e.replicatedNodes,o=Object(la.b)(ue.f),i=Object(n.useRef)(),s=Object(Ol.b)("hello-from-space-panel"),l=Object(A.a)(s,1)[0];return Object(n.useEffect)((function(){l&&i.current&&Object(Ol.a)(i.current,{type:"streamed-hosts-data",payload:{parentNode:t,replicatedNodes:a}})}),[a,t,l]),r.a.createElement(Z.j,{ref:i,as:"iframe",src:Object(Pl.a)(o,"space-panel"),title:"space panel",width:"100%",height:"100%",border:{side:"all",size:"0px"}})},ql={signIn:{title:"Welcome back!",content:[r.a.createElement(Z.D,{key:"1",color:"bright"},"Sign in again to enjoy the benefits of Netdata Cloud"," ")]},signUp:{title:"Welcome to Netdata Cloud!",content:[r.a.createElement(Z.D,{key:"1",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"A single place")," ","for all your nodes."),r.a.createElement(Z.D,{key:"2",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Multi-node dashboards")," ","out of the box."),r.a.createElement(Z.D,{key:"3",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Custom dashboards")," ","for you to create, edit and share online."),r.a.createElement(Z.D,{key:"4",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Metric Correlations")," ","to find the root cause of anything."),r.a.createElement(Z.D,{key:"5",color:"bright"},r.a.createElement(Z.D,{strong:!0,color:"bright"},"Centrally dispatched notifications")," ","for all alarms of all your nodes."),r.a.createElement(Z.D,{key:"6",color:"bright"},"And... It is"," ",r.a.createElement(Z.D,{as:"a",href:"https://www.netdata.cloud/get-netdata/",target:"_blank",rel:"noopener noreferrer",strong:!0,color:"bright"},"free, forever!"))]}},$l=function(){return r.a.createElement(_l.a,{utmParameters:{content:"sidebar"}},(function(e){var t=e.isRegistry,a=e.link,n=e.onSignIn,o=e.offline,i=ql.signIn,s=i.title,l=i.content;return r.a.createElement(Z.j,{background:["neutral","regentgrey"],column:!0,gap:4,padding:[10],border:{side:"right",color:"panel"}},r.a.createElement(Z.z,{color:"bright",strong:!0},s),l.map((function(e){return e})),r.a.createElement(Z.b,Object.assign({width:"100%",label:"Sign in",disabled:o},t?{as:"a",href:a}:{onClick:n})))}))},Jl=function(){return r.a.createElement("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.a.createElement("path",{d:"M48.875 6.375H19.125C16.7778 6.375 14.875 8.27779 14.875 10.625V40.375C14.875 42.7222 16.7778 44.625 19.125 44.625H48.875C51.2222 44.625 53.125 42.7222 53.125 40.375V10.625C53.125 8.27779 51.2222 6.375 48.875 6.375Z",fill:"white",stroke:"#AEB3B7"}),r.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M41.0834 38.25C41.8658 38.25 42.5 38.8843 42.5 39.6667V41.0833C44.0648 41.0833 45.3334 42.3519 45.3334 43.9167V58.0833C45.3334 59.6481 44.0648 60.9167 42.5 60.9167H38.25V65.1667H31.8278V60.9167H26.9167C25.3519 60.9167 24.0834 59.6481 24.0834 58.0833V43.9167C24.0834 42.3519 25.3519 41.0833 26.9167 41.0833V39.6667C26.9167 38.8843 27.551 38.25 28.3334 38.25H41.0834Z",fill:"#35414A"}),r.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.7954 12.75C40.5778 12.75 41.2121 13.3843 41.2121 14.1667L41.2108 16.7294L43.9166 16.7296C44.699 16.7296 45.3333 17.3639 45.3333 18.1463V34C45.3333 34.7824 44.699 35.4167 43.9166 35.4167L43.272 35.4152L43.2727 33.3403H41.2121L41.2108 35.4152H39.151L39.1515 33.3403H37.0909L37.0897 35.4152H35.0299L35.0303 33.3403H32.9697L32.9686 35.4152H30.9088L30.909 33.3403H28.8484L28.8475 35.4152H26.7877L26.7878 33.3403H24.7272L24.7265 35.4152L24.0833 35.4167C23.3009 35.4167 22.6666 34.7824 22.6666 34V18.1463C22.6666 17.3639 23.3009 16.7296 24.0833 16.7296L26.7877 16.7294L26.7878 14.1667C26.7878 13.3843 27.4221 12.75 28.2045 12.75H39.7954Z",fill:"#35414A"}))},Ql=function(){return r.a.createElement(Z.j,{alignItems:"center",background:["neutral","regentgrey"],column:!0,gap:1,padding:[10]},r.a.createElement(Z.D,{color:"bright",strong:!0,textAlign:"center"},"Can't connect to Netdata Cloud"),r.a.createElement(Jl,null),r.a.createElement(Z.C,{color:"bright",textAlign:"center",margin:[2,0,0]},"Maybe you are behind a firewall or you don\u2019t have connection to the internet"))},ec=Object(Ha.a)((function(e){return e.global.chartsMetadata.data||{}}),(function(e){return e.global.registry.fullInfoPayload.mirrored_hosts_status||{}}),(function(e,t){var a=e.hosts,n=e.hostname;return Gl(a,n,t)})),tc=Object(Ha.a)((function(e){return e.global.registry}),(function(e){return e.registryMachinesArray||[]})),ac=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return{isSignedIn:e.isSignedIn,offline:e.offline}})),nc=r.a.memo((function(e){var t=e.isOpen,a=e.toggle,o=Object(s.e)(ec),i=o.parentNode,l=void 0===i?{}:i,c=o.replicatedNodes,u=void 0===c?[]:c,d=Object(s.e)(tc),h=Object(s.e)(ue.v),p=Object(s.e)(ac),f=p.isSignedIn,g=p.offline,m=Object(s.e)(ue.u),b=Object(n.useCallback)((function(){return window.switchRegistryModalHandler()}),[]);return r.a.createElement(Z.d,{width:74,background:"panel",open:t,direction:"horizontal",persist:!0},r.a.createElement(Z.j,{flex:!0,column:!0,overflow:{vertical:"hidden"},margin:[3,0,0],border:{side:"left",color:"separator"},style:{pointerEvents:"all"}},r.a.createElement(Z.j,{overflow:{vertical:"auto"},flex:!0,column:!0,gap:4,padding:[4]},r.a.createElement(Z.j,{alignSelf:"end"},r.a.createElement(Z.b,{neutral:!0,flavour:"borderless",themeType:"dark",small:!0,icon:"chevron_left",onClick:a})),!f&&r.a.createElement(r.a.Fragment,null,!!u.length&&r.a.createElement(Kl,{parentNode:l,replicatedNodes:u}),!!d.length&&r.a.createElement(Z.z,{strong:!0,color:"border"},"VisitedNodes")),f&&r.a.createElement(Zl,{parentNode:l,replicatedNodes:u})),h&&r.a.createElement(Z.j,{border:{side:"top"},justifyContent:"center",alignItems:"center",padding:[6]},r.a.createElement(Z.D,{onClick:b},"Switch Identity")),!f&&m&&r.a.createElement($l,null),g&&m&&r.a.createElement(Ql,null)))})),rc=Object($.d)(Z.j).attrs({height:"100vh",zIndex:10}).withConfig({displayName:"sidebar__Wrapper",componentId:"v4d3v5-0"})(["pointer-events:all;"]),oc=Object(Ha.a)((function(e){return e.dashboard}),(function(e){return e.isSignedIn})),ic=r.a.memo((function(){var e=Object(yl.a)("space-panel-state"),t=Object(A.a)(e,2),a=t[0],o=t[1],i=Object(s.e)(ue.F),l=Object(s.e)(oc),c=Object(s.d)(),u=Object(n.useCallback)((function(){c(Object(Ke.w)({isActive:!i})),o(!i)}),[i]);return Object(n.useEffect)((function(){c(Object(Ke.w)({isActive:!!a&&l}))}),[l]),r.a.createElement(rc,null,r.a.createElement(Bl,{isOpen:i,toggle:u,isSignedIn:l}),r.a.createElement(nc,{isOpen:i,toggle:u,offline:!0}))})),sc=Object($.d)(Z.j).attrs({position:"fixed",justifyContent:"start",alignItems:"start",width:"100%",zIndex:10}).withConfig({displayName:"layout__Wrapper",componentId:"sc-1d05imu-0"})(["top:0;left:0;pointer-events:none;"]),lc=function(e){var t=e.children;return e.printMode?t:r.a.createElement(sc,null,r.a.createElement(ic,null),r.a.createElement(Tl,null),t)},cc=(a(487),function(e){return{slate:Z.e,white:Z.f}[e]||Z.e}),uc=a(216),dc=function(e){var t=e.migrationModalPromoInfo,a=e.setUserPrefrence,o=e.closeModal,i=e.savePromoRemindMeSelection,s=e.migrationModalPromo,l=e.requestRefreshOfAccess,c=Object(n.useState)(!1),u=Object(A.a)(c,2),d=u[0],h=u[1],p=Object(n.useCallback)((function(e){var n=e.link,r=e.toPath,s=t.CTA1;"NAVIGATE"===s.action?(d&&(a(s.userPreference),i(d)),"agent"!==r&&window.open(n,"_blank"),o()):"REFRESH"===s.action&&l()}),[t,a,d,l,i,o]),f=Object(n.useCallback)((function(){var e=t.CTA2;d&&(a(e.userPreference),i(d)),"NAVIGATE"===e.action||"REFRESH"===e.action&&l(),o()}),[t,a,d,l,i,o]);return t?r.a.createElement(Z.q,null,r.a.createElement(Z.t,{width:180,background:"modalBackground"},r.a.createElement(Z.v,null,r.a.createElement(Z.k,{margin:[0]},t.title)),r.a.createElement(Z.r,null,r.a.createElement(Z.j,{padding:[0,0,4,0],column:!0,gap:3},"function"===typeof t.text.header?t.text.header({}):r.a.createElement(Z.z,null,t.text.header),t.text.bullets.length>0&&r.a.createElement(Z.j,{column:!0,gap:3},r.a.createElement(Z.j,{column:!0,gap:1,as:"ul"},t.text.bullets.map((function(e){return"function"===typeof e?r.a.createElement("li",{key:e},e()):r.a.createElement("li",{key:e},r.a.createElement(Z.z,null,e))})))),t.text.footer&&r.a.createElement(Z.z,{"data-testid":"body-footer"},t.text.footer))),r.a.createElement(Z.u,null,r.a.createElement(Z.a,{margin:[0,"auto",0,0]},r.a.createElement(Z.c,{"data-ga":"".concat(s,"::click-remind-me::ad"),"data-testid":"remind-me-checkbox",checked:d,onChange:function(e){h(e.currentTarget.checked)},label:t.tickBoxOption.text})),r.a.createElement(Z.a,{"data-testid":"cta1",margin:[0,2,0,0],width:{min:40}},r.a.createElement(_l.a,{utmParameters:{content:s,campaign:"agent_nudge_to_cloud"}},(function(e){var a=e.link;return r.a.createElement(Z.b,{"data-ga":"".concat(s,"::click-ct1::ad"),textTransform:"none","data-testid":"cta1-button",onClick:function(){return p({link:a,toPath:t.CTA1.toPath})},width:"100%",label:t.CTA1.text})}))),t.CTA2&&r.a.createElement(Z.a,{"data-ga":"".concat(s,"::click-ct2::ad"),onClick:f,height:10,className:"btn btn-default","data-testid":"cta2",width:{min:40}},r.a.createElement(Z.a,{as:Z.z,sx:{fontWeight:"500",lineHeight:"25px"}},t.CTA2.text))))):null},hc=a(132);!function(e){e.PROMO_SIGN_IN_CLOUD="PROMO_SIGN_IN_CLOUD",e.PROMO_SIGN_UP_CLOUD="PROMO_SIGN_UP_CLOUD",e.PROMO_IVNITED_TO_SPACE="PROMO_IVNITED_TO_SPACE",e.PROMO_CLAIM_NODE="PROMO_CLAIM_NODE",e.PROMO_TO_USE_NEW_DASHBAORD="PROMO_TO_USE_NEW_DASHBAORD",e.FALLBACK_TO_AGENT="FALLBACK_TO_AGENT",e.NO_INFO_FALLBACK_TO_AGENT="NO_INFO_FALLBACK_TO_AGENT"}(lo||(lo={}));var pc=function(e){return"".concat(Ve.g).concat(Object(ue.Q)({content:e,campaign:"agent_nudge_to_cloud"}))},fc=(io={},Object(u.a)(io,lo.PROMO_SIGN_UP_CLOUD,{title:"Learn about Netdata Cloud!",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:")},bullets:["Infrastructure level dashboards (each chart aggregates data from multiple nodes)","Central dispatch of alert notifications","Custom dashboards editor","Intelligence assisted troubleshooting, to help surface the root cause of issues"],footer:"Have a look, you will be surprised!"},tickBoxOption:{text:"Remember my choice",prefrenceID:lo.PROMO_SIGN_UP_CLOUD},CTA1:{text:"Wow! Let\u2019s go to Netdata Cloud",toPath:"path/signup/cloud",action:"NAVIGATE",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the agent dashboard",action:"NAVIGATE",toPath:"path/agent-dashboard",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_SIGN_IN_CLOUD,{title:"Sign-in to Netdata Cloud or get an invitation!",text:{header:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.z,{strong:!0},"This node is connected to Netdata Cloud but you are not. If you have a Netdata Cloud account sign-in, if not ask for an invitation to it."),r.a.createElement(Z.z,null,"Netdata Cloud is a FREE service that complements the Netdata Agent, to provide:"))},bullets:["Infrastructure level dashboards (each chart aggregates data from multiple nodes)","Central dispatch of alert notifications","Custom dashboards editor","Intelligence assisted troubleshooting, to help surface the root cause of issues"],footer:"Have a look, you will be surprised!"},tickBoxOption:{text:"Remember my choice",prefrenceID:lo.PROMO_SIGN_IN_CLOUD},CTA1:{text:"Sign-in or get a Netdata Cloud account",action:"NAVIGATE",toPath:"path/signin/cloud",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the Agent dashboard",toPath:"path/agent-dashboard",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_IVNITED_TO_SPACE,{title:"Get an invitation to this Node\u2019s Space!",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"This node is connected to Netdata Cloud but it isnt available on one of your Spaces.")},bullets:[],footer:"Ask for an invitation to this Space!"},tickBoxOption:{text:"Don't remind me of this again",prefrenceID:lo.PROMO_IVNITED_TO_SPACE},CTA1:{text:"Thanks, stay at Agent dashboard for now",toPath:"agent",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_CLAIM_NODE,{title:"This node isn\u2019t connected to Netdata Cloud",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"For you to be able to see this node on Netdata Cloud you will either need to:")},footer:"Have a look, you will be surprised!",bullets:[function(){return r.a.createElement(Z.z,null," ","Connect this node directly (documentation on"," ",r.a.createElement(hc.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim?".concat(pc(lo.PROMO_CLAIM_NODE).substring(1),"#how-to-connect-a-node")},"how to connect a node"),") , or")},function(){return r.a.createElement(Z.z,null,"\u0391ctivate streaming to a parent node that is already connected (documentation on"," ",r.a.createElement(hc.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/metrics-storage-management/enable-streaming?".concat(pc(lo.PROMO_CLAIM_NODE).substring(1))},"how to configure streaming"),")")}]},tickBoxOption:{text:"Remember my choice.",prefrenceID:lo.PROMO_CLAIM_NODE},CTA1:{text:"Wow! Let\u2019s go to Netdata Cloud",action:"NAVIGATE",toPath:"path/node/cloud",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the Agent dashboard",action:"NAVIGATE",toPath:"path/agent-dashboard",userPreference:"AGENT"}}),Object(u.a)(io,lo.PROMO_TO_USE_NEW_DASHBAORD,{title:"Use the Old or the New dashboard?",text:{header:function(){return r.a.createElement(Z.z,{strong:!0},"This node is available in your Netdata Cloud account. So, you have full access to the NEW dashboards, charts, intelligence-assisted troubleshooting and many more!")},bullets:[]},tickBoxOption:{text:"Remember my choice",prefrenceID:lo.PROMO_TO_USE_NEW_DASHBAORD},CTA1:{text:"Wow! Let\u2019s go to Netdata Cloud ",action:"NAVIGATE",toPath:"path/dashboard/cloud",userPreference:"CLOUD"},CTA2:{text:"Later, stay at the Agent dashboard",action:"NAVIGATE",toPath:"path/agent-dashboard",userPreference:"AGENT"}}),Object(u.a)(io,lo.FALLBACK_TO_AGENT,{title:"Oops! This node has lost connection to Netdata Cloud!",text:{header:function(e){e.date;return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.z,{strong:!0},"Unfortunately, it seems that this node is not currently connected to Netdata Cloud. So, the old agent dashboard is the only option available."),r.a.createElement(Z.z,null,"To troubleshoot Netdata Cloud connection issues, please follow this"," ",r.a.createElement(hc.a,{target:"_blank",rel:"noopener noreferrer",href:"https://learn.netdata.cloud/docs/agent/claim?".concat(pc(lo.FALLBACK_TO_AGENT).substring(1),"#troubleshooting")},"this guide.")))},bullets:[]},tickBoxOption:{text:"Don't show this again",prefrenceID:lo.FALLBACK_TO_AGENT},CTA1:{text:"Check again please",action:"REFRESH",userPreference:void 0},CTA2:{text:"Thanks, stay at Agent dashboard",toPath:"path/agent",action:"NAVIGATE",userPreference:"AGENT"}}),Object(u.a)(io,lo.NO_INFO_FALLBACK_TO_AGENT,{title:"Oops! We aren't able to get information of this node in regards to Netdata Cloud!",text:{header:function(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.z,{strong:!0},"Unfortunately, it seems we aren't able to get information on this node in regards to Netdata Cloud."),r.a.createElement(Z.z,null,"This could be from internet connectivity issues from your end or some temporary issue with our services. So, the old agent dashboard is the only option available."))},bullets:[]},tickBoxOption:{text:"Don't show this again",prefrenceID:lo.NO_INFO_FALLBACK_TO_AGENT},CTA1:{text:"Check again please",action:"REFRESH",userPreference:void 0},CTA2:{text:"Thanks, stay at Agent dashboard",toPath:"path/agent-dashboard",action:"NAVIGATE",userPreference:"AGENT"}}),io),gc=(so={},Object(u.a)(so,lo.FALLBACK_TO_AGENT,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus,r=e.nodeLiveness,o=e.userNodeAccess;return"AGENT"!==t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"CLAIMED"===n&&"NOT_LIVE"===r&&"ACCESS_OK"===o})),Object(u.a)(so,lo.NO_INFO_FALLBACK_TO_AGENT,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus,r=e.nodeLiveness,o=e.userNodeAccess;return"CLOUD"===t&&!a&&!n&&!r&&!o})),Object(u.a)(so,lo.PROMO_TO_USE_NEW_DASHBAORD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeLiveness,r=e.userNodeAccess;return!t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"LIVE"===n&&"ACCESS_OK"===r})),Object(u.a)(so,lo.PROMO_CLAIM_NODE,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"NOT_CLAIMED"===n})),Object(u.a)(so,lo.PROMO_IVNITED_TO_SPACE,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus,r=e.userNodeAccess;return"AGENT"!==t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"CLAIMED"===n&&"NO_ACCESS"===r})),Object(u.a)(so,lo.PROMO_SIGN_IN_CLOUD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&"UNKNOWN"===a&&"CLAIMED"===n})),Object(u.a)(so,lo.PROMO_SIGN_UP_CLOUD,(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeClaimedStatus;return"AGENT"!==t&&"UNKNOWN"===a&&"NOT_CLAIMED"===n})),so),mc=function(e){var t=e.userStatus,a=e.nodeClaimedStatus,r=e.userNodeAccess,o=e.nodeLiveness,i=Object(yl.a)("USER_SAVED_PREFERENCE"),s=Object(A.a)(i,2),l=s[0],c=s[1],u=Object(n.useMemo)((function(){return Object.keys(gc).find((function(e){return gc[e]({userStatus:t,nodeClaimedStatus:a,userNodeAccess:r,userSavedPreference:l,nodeLiveness:o})}))}),[t,a,r,o,l]);return{migrationModalPromoInfo:fc[u],migrationModalPromo:u,setUserPrefrence:c,userSavedPreference:l}},bc=function(){var e=Object(s.e)(ue.u),t=Object(s.e)(ue.y),a=Object(s.e)((function(e){return Object(ue.C)({content:"agent-auto-redirect",term:t.machineGuid})(e)})),o=Object(n.useMemo)((function(){var e=window.location.href,t=encodeURIComponent(e);return"".concat(a,"&redirect_uri=").concat(t)}),[a]),i=Object(s.e)(ue.P),l=Object(n.useState)(!1),c=Object(A.a)(l,2),u=c[0],d=c[1],h=mc(Object(g.a)({},i)),p=h.migrationModalPromoInfo,f=h.setUserPrefrence,m=h.userSavedPreference,b=h.migrationModalPromo,v=(null===p||void 0===p?void 0:p.tickBoxOption.prefrenceID)||"",_=Object(yl.a)(v),y=Object(A.a)(_,2)[1],O=localStorage.getItem(v),x=e&&p&&u&&(!O||"undefined"===O),w=Object(xl.b)();return Object(n.useEffect)((function(){var e=setTimeout((function(){return d(!0)}),4e3);return function(){clearTimeout(e)}}),[]),Object(n.useEffect)((function(){(function(e){var t=e.userSavedPreference,a=e.userStatus,n=e.nodeLiveness,r=e.userNodeAccess;return"CLOUD"===t&&("LOGGED_IN"===a||"EXPIRED_LOGIN"===a)&&"LIVE"===n&&"ACCESS_OK"===r})(Object(g.a)({userSavedPreference:m},i))&&(window.location.href=o)}),[o,i,m]),Object(n.useEffect)((function(){"AGENT"==={userSavedPreference:m}.userSavedPreference&&console.log("Lets go to Agent")}),[m]),Object(n.useEffect)((function(){document.documentElement.style.overflow=x?"hidden":"auto"}),[u,x]),x?r.a.createElement(dc,{savePromoRemindMeSelection:y,migrationModalPromoInfo:p,setUserPrefrence:f,closeModal:function(){d(!1)},migrationModalPromo:b,requestRefreshOfAccess:w}):null};window.Ps=na.a;var vc=function(){var e=Object(s.f)();Object(n.useEffect)((function(){window.NETDATA.alarms={},window.NETDATA.pause=function(e){e()},Object(uc.a)(e)}),[]);var t=Object(n.useState)(),a=Object(A.a)(t,2),o=a[0],i=a[1],l=void 0!==o,c=Object(n.useRef)((function(){i(Math.random())}));Object(n.useEffect)((function(){if(l){var e=document.getElementById("loadOverlay");e&&(e.style.display="none")}}),[l]);var u=Object(sa.b)(),d=u.localeDateString,p=u.localeTimeString;Object(n.useEffect)((function(){Object(uc.b)({localeDateString:d,localeTimeString:p})}),[d,p]),function(e){var t=Object(la.b)(ue.y),a=Object(la.a)();Object(n.useEffect)((function(){!e||t.isFetchingHello||t.hasFetchedHello||t.isHelloCallError||a(Ke.f.request({serverDefault:D.b}))}),[a,t,e])}(!0),function(e){var t=Object(la.b)(ue.r),a=Object(la.a)();Object(n.useEffect)((function(){e&&!t&&a(Object(Ke.A)({serverDefault:D.b}))}),[a,t,e])}(!0),function(e){var t=Object(la.b)(ue.y),a=(null===t||void 0===t?void 0:t.hasStartedInfo)||!1,r=Object(la.a)();Object(n.useEffect)((function(){e&&!a&&r(_e.f.request({poll:!1}))}),[r,a,e])}(!0);var f=Object(n.useState)(!1),g=Object(A.a)(f,2),m=g[0],b=g[1];Object(n.useLayoutEffect)((function(){Promise.all([ia(D.c+window.NETDATA.themes.current.bootstrap_css),ia(D.c+window.NETDATA.themes.current.dashboard_css)]).then((function(){b(!0)}))}),[]);var v=function(){var e=ti("".concat(D.b,"api/v1/charts"));return Object(A.a)(e,1)[0]}(),_=Object(la.b)(ue.f);window.NETDATA.parseDom=c.current;var y=Object(la.b)(ue.q),O=Object(la.b)(ue.L);return function(){var e=Object(la.a)();Object(dn.a)((function(){var t=Object(Wt.b)(),a=t.alarm_when;if(a){var n=Number(a),r=t.alarm_status,o=t.alarm_chart,i=t.alarm_value;if(!h.d.includes(r)||!o||!i)return;e(Object(Ke.n)({alarm:{chartId:o,status:r,value:i,when:n}}));e(Object(Ke.s)({after:1e3*n-3e5,before:1e3*n+3e5}))}}))}(),r.a.createElement($.b,{theme:cc(O)},m&&r.a.createElement(_i,null),v&&_&&y&&l&&r.a.createElement(lc,{printMode:ve},r.a.createElement(bc,null),m&&r.a.createElement(r.a.Fragment,null,r.a.createElement(ei,{key:o}),r.a.createElement(vi,null,r.a.createElement(bi,null)),ve&&r.a.createElement(ri,null))))};a(488);i.a.render(r.a.createElement(s.a,{store:ta},r.a.createElement(vc,null)),document.getElementById("root"))},51:function(e,t,a){var n;e.exports=function e(t,a,r){function o(s,l){if(!a[s]){if(!t[s]){if(!l&&"function"==typeof n&&n)return n(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=a[s]={exports:{}};t[s][0].call(u.exports,(function(e){return o(t[s][1][e]||e)}),u,u.exports,e,t,a,r)}return a[s].exports}for(var i="function"==typeof n&&n,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,a){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function i(){g&&p&&(g=!1,p.length?f=p.concat(f):m=-1,f.length&&s())}function s(){if(!g){var e=o(i);g=!0;for(var t=f.length;t;){for(p=f,f=[];++m<t;)p&&p[m].run();m=-1,t=f.length}p=null,g=!1,function(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var u,d,h=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(e){u=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(e){d=r}}();var p,f=[],g=!1,m=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)t[a-1]=arguments[a];f.push(new l(e,t)),1!==f.length||g||o(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],2:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./bars")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n,r,o,i=[],s=a.get("logscale"),l=0;l<e.length;l++)n=e[l][0],o=e[l][t],s&&null!==o&&(o[0]<=0||o[1]<=0||o[2]<=0)&&(o=null),null!==o?null===(r=o[1])||isNaN(r)?i.push([n,r,[r,r]]):i.push([n,r,[o[0],o[2]]]):i.push([n,null,[null,null]]);return i},r.prototype.rollingAverage=function(e,t,a){t=Math.min(t,e.length);var n,r,o,i,s,l,c,u=[];for(r=0,i=0,o=0,s=0,l=0;l<e.length;l++){if(n=e[l][1],c=e[l][2],u[l]=e[l],null===n||isNaN(n)||(r+=c[0],i+=n,o+=c[1],s+=1),l-t>=0){var d=e[l-t];null===d[1]||isNaN(d[1])||(r-=d[2][0],i-=d[1],o-=d[2][1],s-=1)}u[l]=s?[e[l][0],1*i/s,[1*r/s,1*o/s]]:[e[l][0],null,[null,null]]}return u},a.default=r,t.exports=a.default},{"./bars":5}],3:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./bars")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n,r,o,i,s=[],l=a.get("sigma"),c=a.get("logscale"),u=0;u<e.length;u++)n=e[u][0],i=e[u][t],c&&null!==i&&(i[0]<=0||i[0]-l*i[1]<=0)&&(i=null),null!==i?null===(r=i[0])||isNaN(r)?s.push([n,r,[r,r,r]]):(o=l*i[1],s.push([n,r,[r-o,r+o,i[1]]])):s.push([n,null,[null,null,null]]);return s},r.prototype.rollingAverage=function(e,t,a){t=Math.min(t,e.length);var n,r,o,i,s,l,c,u,d,h=[],p=a.get("sigma");for(n=0;n<e.length;n++){for(s=0,u=0,l=0,r=Math.max(0,n-t+1);r<n+1;r++)null===(o=e[r][1])||isNaN(o)||(l++,s+=o,u+=Math.pow(e[r][2][2],2));l?(c=Math.sqrt(u)/l,d=s/l,h[n]=[e[n][0],d,[d-p*c,d+p*c]]):(i=1==t?e[n][1]:null,h[n]=[e[n][0],i,[i,i]])}return h},a.default=r,t.exports=a.default},{"./bars":5}],4:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./bars")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n,r,o,i,s,l,c,u=[],d=a.get("sigma"),h=a.get("logscale"),p=0;p<e.length;p++)n=e[p][0],o=e[p][t],h&&null!==o&&(o[0]<=0||o[1]<=0)&&(o=null),null!==o?(i=o[0],s=o[1],null===i||isNaN(i)?u.push([n,i,[i,i,i,s]]):(l=s?i/s:0,c=100*(s?d*Math.sqrt(l*(1-l)/s):1),r=100*l,u.push([n,r,[r-c,r+c,i,s]]))):u.push([n,null,[null,null,null,null]]);return u},r.prototype.rollingAverage=function(e,t,a){t=Math.min(t,e.length);var n,r,o,i,s=[],l=a.get("sigma"),c=a.get("wilsonInterval"),u=0,d=0;for(o=0;o<e.length;o++){u+=e[o][2][2],d+=e[o][2][3],o-t>=0&&(u-=e[o-t][2][2],d-=e[o-t][2][3]);var h=e[o][0],p=d?u/d:0;if(c)if(d){var f=p<0?0:p,g=d,m=l*Math.sqrt(f*(1-f)/g+l*l/(4*g*g)),b=1+l*l/d;n=(f+l*l/(2*d)-m)/b,r=(f+l*l/(2*d)+m)/b,s[o]=[h,100*f,[100*n,100*r]]}else s[o]=[h,0,[0,0]];else i=d?l*Math.sqrt(p*(1-p)/d):1,s[o]=[h,100*p,[100*(p-i),100*(p+i)]]}return s},a.default=r,t.exports=a.default},{"./bars":5}],5:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var r=n(e("./datahandler")),o=n(e("../dygraph-layout")),i=function(){r.default.call(this)};(i.prototype=new r.default).extractSeries=function(e,t,a){},i.prototype.rollingAverage=function(e,t,a){},i.prototype.onPointsCreated_=function(e,t){for(var a=0;a<e.length;++a){var n=e[a],o=t[a];o.y_top=NaN,o.y_bottom=NaN,o.yval_minus=r.default.parseFloat(n[2][0]),o.yval_plus=r.default.parseFloat(n[2][1])}},i.prototype.getExtremeYValues=function(e,t,a){for(var n,r=null,o=null,i=e.length-1,s=0;s<=i;s++)if(null!==(n=e[s][1])&&!isNaN(n)){var l=e[s][2][0],c=e[s][2][1];l>n&&(l=n),c<n&&(c=n),(null===o||c>o)&&(o=c),(null===r||l<r)&&(r=l)}return[r,o]},i.prototype.onLineEvaluated=function(e,t,a){for(var n,r=0;r<e.length;r++)(n=e[r]).y_top=o.default.calcYNormal_(t,n.yval_minus,a),n.y_bottom=o.default.calcYNormal_(t,n.yval_plus,a)},a.default=i,t.exports=a.default},{"../dygraph-layout":13,"./datahandler":6}],6:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){},r=n;r.X=0,r.Y=1,r.EXTRAS=2,r.prototype.extractSeries=function(e,t,a){},r.prototype.seriesToPoints=function(e,t,a){for(var n=[],o=0;o<e.length;++o){var i=e[o],s=i[1],l=null===s?null:r.parseFloat(s),c={x:NaN,y:NaN,xval:r.parseFloat(i[0]),yval:l,name:t,idx:o+a,canvasx:NaN,canvasy:NaN};n.push(c)}return this.onPointsCreated_(e,n),n},r.prototype.onPointsCreated_=function(e,t){},r.prototype.rollingAverage=function(e,t,a){},r.prototype.getExtremeYValues=function(e,t,a){},r.prototype.onLineEvaluated=function(e,t,a){},r.parseFloat=function(e){return null===e?NaN:e},a.default=n,t.exports=a.default},{}],7:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var r=(n(e("./datahandler")),e("./default")),o=n(r),i=function(){};(i.prototype=new o.default).extractSeries=function(e,t,a){for(var n,r,o,i,s,l=[],c=a.get("logscale"),u=0;u<e.length;u++)n=e[u][0],o=e[u][t],c&&null!==o&&(o[0]<=0||o[1]<=0)&&(o=null),null!==o?(i=o[0],s=o[1],null===i||isNaN(i)?l.push([n,i,[i,s]]):(r=100*(s?i/s:0),l.push([n,r,[i,s]]))):l.push([n,null,[null,null]]);return l},i.prototype.rollingAverage=function(e,t,a){t=Math.min(t,e.length);var n,r=[],o=0,i=0;for(n=0;n<e.length;n++){o+=e[n][2][0],i+=e[n][2][1],n-t>=0&&(o-=e[n-t][2][0],i-=e[n-t][2][1]);var s=e[n][0],l=i?o/i:0;r[n]=[s,100*l]}return r},a.default=i,t.exports=a.default},{"./datahandler":6,"./default":8}],8:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./datahandler")),r=function(){};(r.prototype=new n.default).extractSeries=function(e,t,a){for(var n=[],r=a.get("logscale"),o=0;o<e.length;o++){var i=e[o][0],s=e[o][t];r&&s<=0&&(s=null),n.push([i,s])}return n},r.prototype.rollingAverage=function(e,t,a){var n,r,o,i,s,l=[];if(1==(t=Math.min(t,e.length)))return e;for(n=0;n<e.length;n++){for(i=0,s=0,r=Math.max(0,n-t+1);r<n+1;r++)null===(o=e[r][1])||isNaN(o)||(s++,i+=e[r][1]);l[n]=s?[e[n][0],i/s]:[e[n][0],null]}return l},r.prototype.getExtremeYValues=function(e,t,a){for(var n,r=null,o=null,i=e.length-1,s=0;s<=i;s++)null===(n=e[s][1])||isNaN(n)||((null===o||n>o)&&(o=n),(null===r||n<r)&&(r=n));return[r,o]},a.default=r,t.exports=a.default},{"./datahandler":6}],9:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils")),r=function(e){return e&&e.__esModule?e:{default:e}}(e("./dygraph")),o=function(e,t,a,r){if(this.dygraph_=e,this.layout=r,this.element=t,this.elementContext=a,this.height=e.height_,this.width=e.width_,!n.isCanvasSupported(this.element))throw"Canvas is not supported.";this.area=r.getPlotArea();var o=this.dygraph_.canvas_ctx_;o.beginPath(),o.rect(this.area.x,this.area.y,this.area.w,this.area.h),o.clip(),(o=this.dygraph_.hidden_ctx_).beginPath(),o.rect(this.area.x,this.area.y,this.area.w,this.area.h),o.clip()};o.prototype.clear=function(){this.elementContext.clearRect(0,0,this.width,this.height)},o.prototype.render=function(){this._updatePoints(),this._renderLineChart()},o._getIteratorPredicate=function(e){return e?o._predicateThatSkipsEmptyPoints:null},o._predicateThatSkipsEmptyPoints=function(e,t){return null!==e[t].yval},o._drawStyledLine=function(e,t,a,r,i,s,l){var c=e.dygraph,u=c.getBooleanOption("stepPlot",e.setName);n.isArrayLike(r)||(r=null);var d=c.getBooleanOption("drawGapEdgePoints",e.setName),h=e.points,p=e.setName,f=n.createIterator(h,0,h.length,o._getIteratorPredicate(c.getBooleanOption("connectSeparatedPoints",p))),g=r&&r.length>=2,m=e.drawingContext;m.save(),g&&m.setLineDash&&m.setLineDash(r);var b=o._drawSeries(e,f,a,l,i,d,u,t);o._drawPointsOnLine(e,b,s,t,l),g&&m.setLineDash&&m.setLineDash([]),m.restore()},o._drawSeries=function(e,t,a,n,r,o,i,s){var l,c,u=null,d=null,h=null,p=[],f=!0,g=e.drawingContext;g.beginPath(),g.strokeStyle=s,g.lineWidth=a;for(var m=t.array_,b=t.end_,v=t.predicate_,_=t.start_;_<b;_++){if(c=m[_],v){for(;_<b&&!v(m,_);)_++;if(_==b)break;c=m[_]}if(null===c.canvasy||c.canvasy!=c.canvasy)i&&null!==u&&(g.moveTo(u,d),g.lineTo(c.canvasx,d)),u=d=null;else{if(l=!1,o||null===u){t.nextIdx_=_,t.next();var y=null===(h=t.hasNext?t.peek.canvasy:null)||h!=h;l=null===u&&y,o&&(!f&&null===u||t.hasNext&&y)&&(l=!0)}null!==u?a&&(i&&(g.moveTo(u,d),g.lineTo(c.canvasx,d)),g.lineTo(c.canvasx,c.canvasy)):g.moveTo(c.canvasx,c.canvasy),(r||l)&&p.push([c.canvasx,c.canvasy,c.idx]),u=c.canvasx,d=c.canvasy}f=!1}return g.stroke(),p},o._drawPointsOnLine=function(e,t,a,n,r){for(var o=e.drawingContext,i=0;i<t.length;i++){var s=t[i];o.save(),a.call(e.dygraph,e.dygraph,e.setName,o,s[0],s[1],n,r,s[2]),o.restore()}},o.prototype._updatePoints=function(){for(var e=this.layout.points,t=e.length;t--;)for(var a=e[t],n=a.length;n--;){var r=a[n];r.canvasx=this.area.w*r.x+this.area.x,r.canvasy=this.area.h*r.y+this.area.y}},o.prototype._renderLineChart=function(e,t){var a,r,o=t||this.elementContext,i=this.layout.points,s=this.layout.setNames;this.colors=this.dygraph_.colorsMap_;var l=this.dygraph_.getOption("plotter"),c=l;n.isArrayLike(c)||(c=[c]);var u={};for(a=0;a<s.length;a++){r=s[a];var d=this.dygraph_.getOption("plotter",r);d!=l&&(u[r]=d)}for(a=0;a<c.length;a++)for(var h=c[a],p=a==c.length-1,f=0;f<i.length;f++)if(r=s[f],!e||r==e){var g=i[f],m=h;if(r in u){if(!p)continue;m=u[r]}var b=this.colors[r],v=this.dygraph_.getOption("strokeWidth",r);o.save(),o.strokeStyle=b,o.lineWidth=v,m({points:g,setName:r,drawingContext:o,color:b,strokeWidth:v,dygraph:this.dygraph_,axis:this.dygraph_.axisPropertiesForSeries(r),plotArea:this.area,seriesIndex:f,seriesCount:i.length,singleSeriesName:e,allSeriesPoints:i}),o.restore()}},o._Plotters={linePlotter:function(e){o._linePlotter(e)},fillPlotter:function(e){o._fillPlotter(e)},errorPlotter:function(e){o._errorPlotter(e)}},o._linePlotter=function(e){var t=e.dygraph,a=e.setName,r=e.strokeWidth,i=t.getNumericOption("strokeBorderWidth",a),s=t.getOption("drawPointCallback",a)||n.Circles.DEFAULT,l=t.getOption("strokePattern",a),c=t.getBooleanOption("drawPoints",a),u=t.getNumericOption("pointSize",a);i&&r&&o._drawStyledLine(e,t.getOption("strokeBorderColor",a),r+2*i,l,c,s,u),o._drawStyledLine(e,e.color,r,l,c,s,u)},o._errorPlotter=function(e){var t=e.dygraph,a=e.setName;if(t.getBooleanOption("errorBars")||t.getBooleanOption("customBars")){t.getBooleanOption("fillGraph",a)&&console.warn("Can't use fillGraph option with error bars");var r,i=e.drawingContext,s=e.color,l=t.getNumericOption("fillAlpha",a),c=t.getBooleanOption("stepPlot",a),u=e.points,d=n.createIterator(u,0,u.length,o._getIteratorPredicate(t.getBooleanOption("connectSeparatedPoints",a))),h=NaN,p=NaN,f=[-1,-1],g=n.toRGB_(s),m="rgba("+g.r+","+g.g+","+g.b+","+l+")";i.fillStyle=m,i.beginPath();for(var b=function(e){return null===e||void 0===e||isNaN(e)};d.hasNext;){var v=d.next();!c&&b(v.y)||c&&!isNaN(p)&&b(p)?h=NaN:(r=[v.y_bottom,v.y_top],c&&(p=v.y),isNaN(r[0])&&(r[0]=v.y),isNaN(r[1])&&(r[1]=v.y),r[0]=e.plotArea.h*r[0]+e.plotArea.y,r[1]=e.plotArea.h*r[1]+e.plotArea.y,isNaN(h)||(c?(i.moveTo(h,f[0]),i.lineTo(v.canvasx,f[0]),i.lineTo(v.canvasx,f[1])):(i.moveTo(h,f[0]),i.lineTo(v.canvasx,r[0]),i.lineTo(v.canvasx,r[1])),i.lineTo(h,f[1]),i.closePath()),f=r,h=v.canvasx)}i.fill()}},o._fastCanvasProxy=function(e){var t=[],a=null,n=null,r=0,o=function(a){!function(e){if(!(t.length<=1)){for(var a=t.length-1;a>0;a--)if(2==(s=t[a])[0]){var n=t[a-1];n[1]==s[1]&&n[2]==s[2]&&t.splice(a,1)}for(a=0;a<t.length-1;)2==(s=t[a])[0]&&2==t[a+1][0]?t.splice(a,1):a++;if(t.length>2&&!e){var r=0;2==t[0][0]&&r++;var o=null,i=null;for(a=r;a<t.length;a++){var s;if(1==(s=t[a])[0])if(null===o&&null===i)o=a,i=a;else{var l=s[2];l<t[o][2]?o=a:l>t[i][2]&&(i=a)}}var c=t[o],u=t[i];t.splice(r,t.length-r),o<i?(t.push(c),t.push(u)):o>i?(t.push(u),t.push(c)):t.push(c)}}}(a);for(var o=0,i=t.length;o<i;o++){var s=t[o];1==s[0]?e.lineTo(s[1],s[2]):2==s[0]&&e.moveTo(s[1],s[2])}t.length&&(n=t[t.length-1][1]),r+=t.length,t=[]},i=function(e,r,i){var s=Math.round(r);null!==a&&s==a||(o(a-n>1||s-a>1),a=s),t.push([e,r,i])};return{moveTo:function(e,t){i(2,e,t)},lineTo:function(e,t){i(1,e,t)},stroke:function(){o(!0),e.stroke()},fill:function(){o(!0),e.fill()},beginPath:function(){o(!0),e.beginPath()},closePath:function(){o(!0),e.closePath()},_count:function(){return r}}},o._fillPlotter=function(e){if(!e.singleSeriesName&&0===e.seriesIndex){for(var t=e.dygraph,a=t.getLabels().slice(1),i=a.length;i>=0;i--)t.visibility()[i]||a.splice(i,1);if(function(){for(var e=0;e<a.length;e++)if(t.getBooleanOption("fillGraph",a[e]))return!0;return!1}())for(var s,l,c=e.plotArea,u=e.allSeriesPoints,d=u.length,h=t.getBooleanOption("stackedGraph"),p=t.getColors(),f={},g=function(e,t,a,n){if(e.lineTo(t,a),h)for(var r=n.length-1;r>=0;r--){var o=n[r];e.lineTo(o[0],o[1])}},m=d-1;m>=0;m--){var b=e.drawingContext,v=a[m];if(t.getBooleanOption("fillGraph",v)){var _=t.getNumericOption("fillAlpha",v),y=t.getBooleanOption("stepPlot",v),O=p[m],x=t.axisPropertiesForSeries(v),w=1+x.minyval*x.yscale;w<0?w=0:w>1&&(w=1),w=c.h*w+c.y;var E,S=u[m],C=n.createIterator(S,0,S.length,o._getIteratorPredicate(t.getBooleanOption("connectSeparatedPoints",v))),A=NaN,k=[-1,-1],j=n.toRGB_(O),T="rgba("+j.r+","+j.g+","+j.b+","+_+")";b.fillStyle=T,b.beginPath();var D,P=!0;(S.length>2*t.width_||r.default.FORCE_FAST_PROXY)&&(b=o._fastCanvasProxy(b));for(var M,L=[];C.hasNext;)if(M=C.next(),n.isOK(M.y)||y){if(h){if(!P&&D==M.xval)continue;var I;P=!1,D=M.xval,I=void 0===(s=f[M.canvasx])?w:l?s[0]:s,E=[M.canvasy,I],y?-1===k[0]?f[M.canvasx]=[M.canvasy,w]:f[M.canvasx]=[M.canvasy,k[0]]:f[M.canvasx]=M.canvasy}else E=isNaN(M.canvasy)&&y?[c.y+c.h,w]:[M.canvasy,w];isNaN(A)?(b.moveTo(M.canvasx,E[1]),b.lineTo(M.canvasx,E[0])):(y?(b.lineTo(M.canvasx,k[0]),b.lineTo(M.canvasx,E[0])):b.lineTo(M.canvasx,E[0]),h&&(L.push([A,k[1]]),l&&s?L.push([M.canvasx,s[1]]):L.push([M.canvasx,E[1]]))),k=E,A=M.canvasx}else g(b,A,k[1],L),L=[],A=NaN,null===M.y_stacked||isNaN(M.y_stacked)||(f[M.canvasx]=c.h*M.y_stacked+c.y);l=y,E&&M&&(g(b,M.canvasx,E[1],L),L=[]),b.fill()}}}},a.default=o,t.exports=a.default},{"./dygraph":18,"./dygraph-utils":17}],10:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}Object.defineProperty(a,"__esModule",{value:!0});var o=r(e("./dygraph-tickers")),i=n(e("./dygraph-interaction-model")),s=n(e("./dygraph-canvas")),l=r(e("./dygraph-utils")),c={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:.5,highlightSeriesBackgroundColor:"rgb(255, 255, 255)",labelsSeparateLines:!1,labelsShowZeroValues:!0,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:!0,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:"white",axisTickSize:3,axisLabelFontSize:14,rightGap:5,showRoller:!1,xValueParser:void 0,delimiter:",",sigma:2,errorBars:!1,fractions:!1,wilsonInterval:!0,customBars:!1,fillGraph:!1,fillAlpha:.15,connectSeparatedPoints:!1,stackedGraph:!1,stackedGraphNaNFill:"all",hideOverlayOnMouseOut:!0,legend:"onmouseover",stepPlot:!1,xRangePad:0,yRangePad:null,drawAxesAtZero:!1,titleHeight:28,xLabelHeight:18,yLabelWidth:18,axisLineColor:"black",axisLineWidth:.3,gridLineWidth:.3,axisLabelWidth:50,gridLineColor:"rgb(128,128,128)",interactionModel:i.default.defaultModel,animatedZooms:!1,showRangeSelector:!1,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:"#808FAB",rangeSelectorPlotFillGradientColor:"white",rangeSelectorPlotFillColor:"#A7B1C4",rangeSelectorBackgroundStrokeColor:"gray",rangeSelectorBackgroundLineWidth:1,rangeSelectorPlotLineWidth:1.5,rangeSelectorForegroundStrokeColor:"black",rangeSelectorForegroundLineWidth:1,rangeSelectorAlpha:.6,showInRangeSelector:null,plotter:[s.default._fillPlotter,s.default._errorPlotter,s.default._linePlotter],plugins:[],axes:{x:{pixelsPerLabel:70,axisLabelWidth:60,axisLabelFormatter:l.dateAxisLabelFormatter,valueFormatter:l.dateValueFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.dateTicker},y:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:l.numberValueFormatter,axisLabelFormatter:l.numberAxisLabelFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.numericTicks},y2:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:l.numberValueFormatter,axisLabelFormatter:l.numberAxisLabelFormatter,drawAxis:!0,drawGrid:!1,independentTicks:!1,ticker:o.numericTicks}}};a.default=c,t.exports=a.default},{"./dygraph-canvas":9,"./dygraph-interaction-model":12,"./dygraph-tickers":16,"./dygraph-utils":17}],11:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./dygraph")),r=function(e){this.container=e};r.prototype.draw=function(e,t){this.container.innerHTML="",void 0!==this.date_graph&&this.date_graph.destroy(),this.date_graph=new n.default(this.container,e,t)},r.prototype.setSelection=function(e){var t=!1;e.length&&(t=e[0].row),this.date_graph.setSelection(t)},r.prototype.getSelection=function(){var e=[],t=this.date_graph.getSelection();if(t<0)return e;for(var a=this.date_graph.layout_.points,n=0;n<a.length;++n)e.push({row:t,column:n+1});return e},a.default=r,t.exports=a.default},{"./dygraph":18}],12:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils")),r={maybeTreatMouseOpAsClick:function(e,t,a){a.dragEndX=n.dragGetX_(e,a),a.dragEndY=n.dragGetY_(e,a);var o=Math.abs(a.dragEndX-a.dragStartX),i=Math.abs(a.dragEndY-a.dragStartY);o<2&&i<2&&void 0!==t.lastx_&&-1!=t.lastx_&&r.treatMouseOpAsClick(t,e,a),a.regionWidth=o,a.regionHeight=i},startPan:function(e,t,a){var r,o;a.isPanning=!0;var i=t.xAxisRange();if(t.getOptionForAxis("logscale","x")?(a.initialLeftmostDate=n.log10(i[0]),a.dateRange=n.log10(i[1])-n.log10(i[0])):(a.initialLeftmostDate=i[0],a.dateRange=i[1]-i[0]),a.xUnitsPerPixel=a.dateRange/(t.plotter_.area.w-1),t.getNumericOption("panEdgeFraction")){var s=t.width_*t.getNumericOption("panEdgeFraction"),l=t.xAxisExtremes(),c=t.toDomXCoord(l[0])-s,u=t.toDomXCoord(l[1])+s,d=t.toDataXCoord(c),h=t.toDataXCoord(u);a.boundedDates=[d,h];var p=[],f=t.height_*t.getNumericOption("panEdgeFraction");for(r=0;r<t.axes_.length;r++){var g=(o=t.axes_[r]).extremeRange,m=t.toDomYCoord(g[0],r)+f,b=t.toDomYCoord(g[1],r)-f,v=t.toDataYCoord(m,r),_=t.toDataYCoord(b,r);p[r]=[v,_]}a.boundedValues=p}for(a.is2DPan=!1,a.axes=[],r=0;r<t.axes_.length;r++){o=t.axes_[r];var y={},O=t.yAxisRange(r);t.attributes_.getForAxis("logscale",r)?(y.initialTopValue=n.log10(O[1]),y.dragValueRange=n.log10(O[1])-n.log10(O[0])):(y.initialTopValue=O[1],y.dragValueRange=O[1]-O[0]),y.unitsPerPixel=y.dragValueRange/(t.plotter_.area.h-1),a.axes.push(y),o.valueRange&&(a.is2DPan=!0)}},movePan:function(e,t,a){a.dragEndX=n.dragGetX_(e,a),a.dragEndY=n.dragGetY_(e,a);var r=a.initialLeftmostDate-(a.dragEndX-a.dragStartX)*a.xUnitsPerPixel;a.boundedDates&&(r=Math.max(r,a.boundedDates[0]));var o=r+a.dateRange;if(a.boundedDates&&o>a.boundedDates[1]&&(o=(r-=o-a.boundedDates[1])+a.dateRange),t.getOptionForAxis("logscale","x")?t.dateWindow_=[Math.pow(n.LOG_SCALE,r),Math.pow(n.LOG_SCALE,o)]:t.dateWindow_=[r,o],a.is2DPan)for(var i=a.dragEndY-a.dragStartY,s=0;s<t.axes_.length;s++){var l=t.axes_[s],c=a.axes[s],u=i*c.unitsPerPixel,d=a.boundedValues?a.boundedValues[s]:null,h=c.initialTopValue+u;d&&(h=Math.min(h,d[1]));var p=h-c.dragValueRange;d&&p<d[0]&&(p=(h-=p-d[0])-c.dragValueRange),t.attributes_.getForAxis("logscale",s)?l.valueRange=[Math.pow(n.LOG_SCALE,p),Math.pow(n.LOG_SCALE,h)]:l.valueRange=[p,h]}t.drawGraph_(!1)}};r.endPan=r.maybeTreatMouseOpAsClick,r.startZoom=function(e,t,a){a.isZooming=!0,a.zoomMoved=!1},r.moveZoom=function(e,t,a){a.zoomMoved=!0,a.dragEndX=n.dragGetX_(e,a),a.dragEndY=n.dragGetY_(e,a);var r=Math.abs(a.dragStartX-a.dragEndX),o=Math.abs(a.dragStartY-a.dragEndY);a.dragDirection=r<o/2?n.VERTICAL:n.HORIZONTAL,t.drawZoomRect_(a.dragDirection,a.dragStartX,a.dragEndX,a.dragStartY,a.dragEndY,a.prevDragDirection,a.prevEndX,a.prevEndY),a.prevEndX=a.dragEndX,a.prevEndY=a.dragEndY,a.prevDragDirection=a.dragDirection},r.treatMouseOpAsClick=function(e,t,a){for(var n=e.getFunctionOption("clickCallback"),r=e.getFunctionOption("pointClickCallback"),o=null,i=-1,s=Number.MAX_VALUE,l=0;l<e.selPoints_.length;l++){var c=e.selPoints_[l],u=Math.pow(c.canvasx-a.dragEndX,2)+Math.pow(c.canvasy-a.dragEndY,2);!isNaN(u)&&(-1==i||u<s)&&(s=u,i=l)}var d=e.getNumericOption("highlightCircleSize")+2;if(s<=d*d&&(o=e.selPoints_[i]),o){var h={cancelable:!0,point:o,canvasx:a.dragEndX,canvasy:a.dragEndY};if(e.cascadeEvents_("pointClick",h))return;r&&r.call(e,t,o)}h={cancelable:!0,xval:e.lastx_,pts:e.selPoints_,canvasx:a.dragEndX,canvasy:a.dragEndY},e.cascadeEvents_("click",h)||n&&n.call(e,t,e.lastx_,e.selPoints_)},r.endZoom=function(e,t,a){t.clearZoomRect_(),a.isZooming=!1,r.maybeTreatMouseOpAsClick(e,t,a);var o=t.getArea();if(a.regionWidth>=10&&a.dragDirection==n.HORIZONTAL){var i=Math.min(a.dragStartX,a.dragEndX),s=Math.max(a.dragStartX,a.dragEndX);(i=Math.max(i,o.x))<(s=Math.min(s,o.x+o.w))&&t.doZoomX_(i,s),a.cancelNextDblclick=!0}else if(a.regionHeight>=10&&a.dragDirection==n.VERTICAL){var l=Math.min(a.dragStartY,a.dragEndY),c=Math.max(a.dragStartY,a.dragEndY);(l=Math.max(l,o.y))<(c=Math.min(c,o.y+o.h))&&t.doZoomY_(l,c),a.cancelNextDblclick=!0}a.dragStartX=null,a.dragStartY=null},r.startTouch=function(e,t,a){e.preventDefault(),e.touches.length>1&&(a.startTimeForDoubleTapMs=null);for(var n=[],r=0;r<e.touches.length;r++){var o=e.touches[r];n.push({pageX:o.pageX,pageY:o.pageY,dataX:t.toDataXCoord(o.pageX),dataY:t.toDataYCoord(o.pageY)})}if(a.initialTouches=n,1==n.length)a.initialPinchCenter=n[0],a.touchDirections={x:!0,y:!0};else if(n.length>=2){a.initialPinchCenter={pageX:.5*(n[0].pageX+n[1].pageX),pageY:.5*(n[0].pageY+n[1].pageY),dataX:.5*(n[0].dataX+n[1].dataX),dataY:.5*(n[0].dataY+n[1].dataY)};var i=180/Math.PI*Math.atan2(a.initialPinchCenter.pageY-n[0].pageY,n[0].pageX-a.initialPinchCenter.pageX);(i=Math.abs(i))>90&&(i=90-i),a.touchDirections={x:i<67.5,y:i>22.5}}a.initialRange={x:t.xAxisRange(),y:t.yAxisRange()}},r.moveTouch=function(e,t,a){a.startTimeForDoubleTapMs=null;var n,r=[];for(n=0;n<e.touches.length;n++){var o=e.touches[n];r.push({pageX:o.pageX,pageY:o.pageY})}var i,s,l,c=a.initialTouches,u=a.initialPinchCenter,d={pageX:(i=1==r.length?r[0]:{pageX:.5*(r[0].pageX+r[1].pageX),pageY:.5*(r[0].pageY+r[1].pageY)}).pageX-u.pageX,pageY:i.pageY-u.pageY},h=a.initialRange.x[1]-a.initialRange.x[0],p=a.initialRange.y[0]-a.initialRange.y[1];if(d.dataX=d.pageX/t.plotter_.area.w*h,d.dataY=d.pageY/t.plotter_.area.h*p,1==r.length)s=1,l=1;else if(r.length>=2){var f=c[1].pageX-u.pageX;s=(r[1].pageX-i.pageX)/f;var g=c[1].pageY-u.pageY;l=(r[1].pageY-i.pageY)/g}s=Math.min(8,Math.max(.125,s)),l=Math.min(8,Math.max(.125,l));var m=!1;if(a.touchDirections.x&&(t.dateWindow_=[u.dataX-d.dataX+(a.initialRange.x[0]-u.dataX)/s,u.dataX-d.dataX+(a.initialRange.x[1]-u.dataX)/s],m=!0),a.touchDirections.y)for(n=0;n<1;n++){var b=t.axes_[n];t.attributes_.getForAxis("logscale",n)||(b.valueRange=[u.dataY-d.dataY+(a.initialRange.y[0]-u.dataY)/l,u.dataY-d.dataY+(a.initialRange.y[1]-u.dataY)/l],m=!0)}if(t.drawGraph_(!1),m&&r.length>1&&t.getFunctionOption("zoomCallback")){var v=t.xAxisRange();t.getFunctionOption("zoomCallback").call(t,v[0],v[1],t.yAxisRanges())}},r.endTouch=function(e,t,a){if(0!==e.touches.length)r.startTouch(e,t,a);else if(1==e.changedTouches.length){var n=(new Date).getTime(),o=e.changedTouches[0];a.startTimeForDoubleTapMs&&n-a.startTimeForDoubleTapMs<500&&a.doubleTapX&&Math.abs(a.doubleTapX-o.screenX)<50&&a.doubleTapY&&Math.abs(a.doubleTapY-o.screenY)<50?t.resetZoom():(a.startTimeForDoubleTapMs=n,a.doubleTapX=o.screenX,a.doubleTapY=o.screenY)}};var o=function(e,t,a){return e<t?t-e:e>a?e-a:0},i=function(e,t){var a=n.findPos(t.canvas_),r={left:a.x,right:a.x+t.canvas_.offsetWidth,top:a.y,bottom:a.y+t.canvas_.offsetHeight},i={x:n.pageX(e),y:n.pageY(e)},s=o(i.x,r.left,r.right),l=o(i.y,r.top,r.bottom);return Math.max(s,l)};r.defaultModel={mousedown:function(e,t,a){if(!e.button||2!=e.button){a.initializeMouseDown(e,t,a),e.altKey||e.shiftKey?r.startPan(e,t,a):r.startZoom(e,t,a);var o=function(e){a.isZooming?i(e,t)<100?r.moveZoom(e,t,a):null!==a.dragEndX&&(a.dragEndX=null,a.dragEndY=null,t.clearZoomRect_()):a.isPanning&&r.movePan(e,t,a)};t.addAndTrackEvent(document,"mousemove",o),t.addAndTrackEvent(document,"mouseup",(function e(i){a.isZooming?null!==a.dragEndX?r.endZoom(i,t,a):r.maybeTreatMouseOpAsClick(i,t,a):a.isPanning&&r.endPan(i,t,a),n.removeEvent(document,"mousemove",o),n.removeEvent(document,"mouseup",e),a.destroy()}))}},willDestroyContextMyself:!0,touchstart:function(e,t,a){r.startTouch(e,t,a)},touchmove:function(e,t,a){r.moveTouch(e,t,a)},touchend:function(e,t,a){r.endTouch(e,t,a)},dblclick:function(e,t,a){if(a.cancelNextDblclick)a.cancelNextDblclick=!1;else{var n={canvasx:a.dragEndX,canvasy:a.dragEndY,cancelable:!0};t.cascadeEvents_("dblclick",n)||e.altKey||e.shiftKey||t.resetZoom()}}},r.nonInteractiveModel_={mousedown:function(e,t,a){a.initializeMouseDown(e,t,a)},mouseup:r.maybeTreatMouseOpAsClick},r.dragIsPanInteractionModel={mousedown:function(e,t,a){a.initializeMouseDown(e,t,a),r.startPan(e,t,a)},mousemove:function(e,t,a){a.isPanning&&r.movePan(e,t,a)},mouseup:function(e,t,a){a.isPanning&&r.endPan(e,t,a)}},a.default=r,t.exports=a.default},{"./dygraph-utils":17}],13:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils")),r=function(e){this.dygraph_=e,this.points=[],this.setNames=[],this.annotations=[],this.yAxes_=null,this.xTicks_=null,this.yTicks_=null};r.prototype.addDataset=function(e,t){this.points.push(t),this.setNames.push(e)},r.prototype.getPlotArea=function(){return this.area_},r.prototype.computePlotArea=function(){var e={x:0,y:0};e.w=this.dygraph_.width_-e.x-this.dygraph_.getOption("rightGap"),e.h=this.dygraph_.height_;var t={chart_div:this.dygraph_.graphDiv,reserveSpaceLeft:function(t){var a={x:e.x,y:e.y,w:t,h:e.h};return e.x+=t,e.w-=t,a},reserveSpaceRight:function(t){var a={x:e.x+e.w-t,y:e.y,w:t,h:e.h};return e.w-=t,a},reserveSpaceTop:function(t){var a={x:e.x,y:e.y,w:e.w,h:t};return e.y+=t,e.h-=t,a},reserveSpaceBottom:function(t){var a={x:e.x,y:e.y+e.h-t,w:e.w,h:t};return e.h-=t,a},chartRect:function(){return{x:e.x,y:e.y,w:e.w,h:e.h}}};this.dygraph_.cascadeEvents_("layout",t),this.area_=e},r.prototype.setAnnotations=function(e){this.annotations=[];for(var t=this.dygraph_.getOption("xValueParser")||function(e){return e},a=0;a<e.length;a++){var r={};if(!e[a].xval&&void 0===e[a].x)return void console.error("Annotations must have an 'x' property");if(e[a].icon&&(!e[a].hasOwnProperty("width")||!e[a].hasOwnProperty("height")))return void console.error("Must set width and height when setting annotation.icon property");n.update(r,e[a]),r.xval||(r.xval=t(r.x)),this.annotations.push(r)}},r.prototype.setXTicks=function(e){this.xTicks_=e},r.prototype.setYAxes=function(e){this.yAxes_=e},r.prototype.evaluate=function(){this._xAxis={},this._evaluateLimits(),this._evaluateLineCharts(),this._evaluateLineTicks(),this._evaluateAnnotations()},r.prototype._evaluateLimits=function(){var e=this.dygraph_.xAxisRange();this._xAxis.minval=e[0],this._xAxis.maxval=e[1];var t=e[1]-e[0];this._xAxis.scale=0!==t?1/t:1,this.dygraph_.getOptionForAxis("logscale","x")&&(this._xAxis.xlogrange=n.log10(this._xAxis.maxval)-n.log10(this._xAxis.minval),this._xAxis.xlogscale=0!==this._xAxis.xlogrange?1/this._xAxis.xlogrange:1);for(var a=0;a<this.yAxes_.length;a++){var r=this.yAxes_[a];r.minyval=r.computedValueRange[0],r.maxyval=r.computedValueRange[1],r.yrange=r.maxyval-r.minyval,r.yscale=0!==r.yrange?1/r.yrange:1,this.dygraph_.getOption("logscale")&&(r.ylogrange=n.log10(r.maxyval)-n.log10(r.minyval),r.ylogscale=0!==r.ylogrange?1/r.ylogrange:1,isFinite(r.ylogrange)&&!isNaN(r.ylogrange)||console.error("axis "+a+" of graph at "+r.g+" can't be displayed in log scale for range ["+r.minyval+" - "+r.maxyval+"]"))}},r.calcXNormal_=function(e,t,a){return a?(n.log10(e)-n.log10(t.minval))*t.xlogscale:(e-t.minval)*t.scale},r.calcYNormal_=function(e,t,a){if(a){var r=1-(n.log10(t)-n.log10(e.minyval))*e.ylogscale;return isFinite(r)?r:NaN}return 1-(t-e.minyval)*e.yscale},r.prototype._evaluateLineCharts=function(){for(var e=this.dygraph_.getOption("stackedGraph"),t=this.dygraph_.getOptionForAxis("logscale","x"),a=0;a<this.points.length;a++){for(var n=this.points[a],o=this.setNames[a],i=this.dygraph_.getOption("connectSeparatedPoints",o),s=this.dygraph_.axisPropertiesForSeries(o),l=this.dygraph_.attributes_.getForSeries("logscale",o),c=0;c<n.length;c++){var u=n[c];u.x=r.calcXNormal_(u.xval,this._xAxis,t);var d=u.yval;e&&(u.y_stacked=r.calcYNormal_(s,u.yval_stacked,l),null===d||isNaN(d)||(d=u.yval_stacked)),null===d&&(d=NaN,i||(u.yval=NaN)),u.y=r.calcYNormal_(s,d,l)}this.dygraph_.dataHandler_.onLineEvaluated(n,s,l)}},r.prototype._evaluateLineTicks=function(){var e,t,a,n,r,o;for(this.xticks=[],e=0;e<this.xTicks_.length;e++)a=(t=this.xTicks_[e]).label,r=(o=!("label_v"in t))?t.v:t.label_v,(n=this.dygraph_.toPercentXCoord(r))>=0&&n<1&&this.xticks.push({pos:n,label:a,has_tick:o});for(this.yticks=[],e=0;e<this.yAxes_.length;e++)for(var i=this.yAxes_[e],s=0;s<i.ticks.length;s++)a=(t=i.ticks[s]).label,r=(o=!("label_v"in t))?t.v:t.label_v,(n=this.dygraph_.toPercentYCoord(r,e))>0&&n<=1&&this.yticks.push({axis:e,pos:n,label:a,has_tick:o})},r.prototype._evaluateAnnotations=function(){var e,t={};for(e=0;e<this.annotations.length;e++){var a=this.annotations[e];t[a.xval+","+a.series]=a}if(this.annotated_points=[],this.annotations&&this.annotations.length)for(var n=0;n<this.points.length;n++){var r=this.points[n];for(e=0;e<r.length;e++){var o=r[e],i=o.xval+","+o.name;i in t&&(o.annotation=t[i],this.annotated_points.push(o))}}},r.prototype.removeAllDatasets=function(){delete this.points,delete this.setNames,delete this.setPointsLengths,delete this.setPointsOffsets,this.points=[],this.setNames=[],this.setPointsLengths=[],this.setPointsOffsets=[]},a.default=r,t.exports=a.default},{"./dygraph-utils":17}],14:[function(e,t,a){(function(e){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=null,t.exports=a.default}).call(this,e("_process"))},{_process:1}],15:[function(e,t,a){(function(n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils")),i=r(e("./dygraph-default-attrs")),s=(r(e("./dygraph-options-reference")),function(e){this.dygraph_=e,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get("highlightSeriesOpts")||{},this.reparseSeries()});s.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1},s.axisToIndex_=function(e){if("string"==typeof e){if(s.AXIS_STRING_MAPPINGS_.hasOwnProperty(e))return s.AXIS_STRING_MAPPINGS_[e];throw"Unknown axis : "+e}if("number"==typeof e){if(0===e||1===e)return e;throw"Dygraphs only supports two y-axes, indexed from 0-1."}if(e)throw"Unknown axis : "+e;return 0},s.prototype.reparseSeries=function(){var e=this.get("labels");if(e){this.labels_=e.slice(1),this.yAxes_=[{series:[],options:{}}],this.xAxis_={options:{}},this.series_={};for(var t=this.user_.series||{},a=0;a<this.labels_.length;a++){var n=this.labels_[a],r=t[n]||{},i=s.axisToIndex_(r.axis);this.series_[n]={idx:a,yAxis:i,options:r},this.yAxes_[i]?this.yAxes_[i].series.push(n):this.yAxes_[i]={series:[n],options:{}}}var l=this.user_.axes||{};o.update(this.yAxes_[0].options,l.y||{}),this.yAxes_.length>1&&o.update(this.yAxes_[1].options,l.y2||{}),o.update(this.xAxis_.options,l.x||{})}},s.prototype.get=function(e){var t=this.getGlobalUser_(e);return null!==t?t:this.getGlobalDefault_(e)},s.prototype.getGlobalUser_=function(e){return this.user_.hasOwnProperty(e)?this.user_[e]:null},s.prototype.getGlobalDefault_=function(e){return this.global_.hasOwnProperty(e)?this.global_[e]:i.default.hasOwnProperty(e)?i.default[e]:null},s.prototype.getForAxis=function(e,t){var a,n;if("number"==typeof t)n=0===(a=t)?"y":"y2";else{if("y1"==t&&(t="y"),"y"==t)a=0;else if("y2"==t)a=1;else{if("x"!=t)throw"Unknown axis "+t;a=-1}n=t}var r=-1==a?this.xAxis_:this.yAxes_[a];if(r){var o=r.options;if(o.hasOwnProperty(e))return o[e]}if("x"!==t||"logscale"!==e){var s=this.getGlobalUser_(e);if(null!==s)return s}var l=i.default.axes[n];return l.hasOwnProperty(e)?l[e]:this.getGlobalDefault_(e)},s.prototype.getForSeries=function(e,t){if(t===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(e))return this.highlightSeries_[e];if(!this.series_.hasOwnProperty(t))throw"Unknown series: "+t;var a=this.series_[t],n=a.options;return n.hasOwnProperty(e)?n[e]:this.getForAxis(e,a.yAxis)},s.prototype.numAxes=function(){return this.yAxes_.length},s.prototype.axisForSeries=function(e){return this.series_[e].yAxis},s.prototype.axisOptions=function(e){return this.yAxes_[e].options},s.prototype.seriesForAxis=function(e){return this.yAxes_[e].series},s.prototype.seriesNames=function(){return this.labels_},a.default=s,t.exports=a.default}).call(this,e("_process"))},{"./dygraph-default-attrs":10,"./dygraph-options-reference":14,"./dygraph-utils":17,_process:1}],16:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils"));a.numericLinearTicks=function(e,t,a,n,o,i){return r(e,t,a,(function(e){return"logscale"!==e&&n(e)}),o,i)};var r=function(e,t,a,r,o,i){var s,l,c,u,d=r("pixelsPerLabel"),h=[];if(i)for(s=0;s<i.length;s++)h.push({v:i[s]});else{if(r("logscale")){u=Math.floor(a/d);var p=n.binarySearch(e,g,1),f=n.binarySearch(t,g,-1);-1==p&&(p=0),-1==f&&(f=g.length-1);var m=null;if(f-p>=u/4){for(var b=f;b>=p;b--){var v=g[b],_=Math.log(v/e)/Math.log(t/e)*a,y={v:v};null===m?m={tickValue:v,pixel_coord:_}:Math.abs(_-m.pixel_coord)>=d?m={tickValue:v,pixel_coord:_}:y.label="",h.push(y)}h.reverse()}}if(0===h.length){var O,x;r("labelsKMG2")?(O=[1,2,4,8,16,32,64,128,256],x=16):(O=[1,2,5,10,20,50,100],x=10);var w,E,S,C=Math.ceil(a/d),A=Math.abs(t-e)/C,k=Math.floor(Math.log(A)/Math.log(x)),j=Math.pow(x,k);for(l=0;l<O.length&&(w=j*O[l],E=Math.floor(e/w)*w,S=Math.ceil(t/w)*w,!(a/(u=Math.abs(S-E)/w)>d));l++);for(E>S&&(w*=-1),s=0;s<=u;s++)c=E+s*w,h.push({v:c})}}var T=r("axisLabelFormatter");for(s=0;s<h.length;s++)void 0===h[s].label&&(h[s].label=T.call(o,h[s].v,0,r,o));return h};a.numericTicks=r,a.dateTicker=function(e,t,a,n,r,o){var i=m(e,t,a,n);return i>=0?v(e,t,i,n,r):[]};var o={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29};a.Granularity=o;var i=0,s=1,l=2,c=3,u=4,d=5,h=6,p=7,f=[];f[o.MILLISECONDLY]={datefield:h,step:1,spacing:1},f[o.TWO_MILLISECONDLY]={datefield:h,step:2,spacing:2},f[o.FIVE_MILLISECONDLY]={datefield:h,step:5,spacing:5},f[o.TEN_MILLISECONDLY]={datefield:h,step:10,spacing:10},f[o.FIFTY_MILLISECONDLY]={datefield:h,step:50,spacing:50},f[o.HUNDRED_MILLISECONDLY]={datefield:h,step:100,spacing:100},f[o.FIVE_HUNDRED_MILLISECONDLY]={datefield:h,step:500,spacing:500},f[o.SECONDLY]={datefield:d,step:1,spacing:1e3},f[o.TWO_SECONDLY]={datefield:d,step:2,spacing:2e3},f[o.FIVE_SECONDLY]={datefield:d,step:5,spacing:5e3},f[o.TEN_SECONDLY]={datefield:d,step:10,spacing:1e4},f[o.THIRTY_SECONDLY]={datefield:d,step:30,spacing:3e4},f[o.MINUTELY]={datefield:u,step:1,spacing:6e4},f[o.TWO_MINUTELY]={datefield:u,step:2,spacing:12e4},f[o.FIVE_MINUTELY]={datefield:u,step:5,spacing:3e5},f[o.TEN_MINUTELY]={datefield:u,step:10,spacing:6e5},f[o.THIRTY_MINUTELY]={datefield:u,step:30,spacing:18e5},f[o.HOURLY]={datefield:c,step:1,spacing:36e5},f[o.TWO_HOURLY]={datefield:c,step:2,spacing:72e5},f[o.SIX_HOURLY]={datefield:c,step:6,spacing:216e5},f[o.DAILY]={datefield:l,step:1,spacing:864e5},f[o.TWO_DAILY]={datefield:l,step:2,spacing:1728e5},f[o.WEEKLY]={datefield:l,step:7,spacing:6048e5},f[o.MONTHLY]={datefield:s,step:1,spacing:2629817280},f[o.QUARTERLY]={datefield:s,step:3,spacing:216e5*365.2524},f[o.BIANNUAL]={datefield:s,step:6,spacing:432e5*365.2524},f[o.ANNUAL]={datefield:i,step:1,spacing:864e5*365.2524},f[o.DECADAL]={datefield:i,step:10,spacing:315578073600},f[o.CENTENNIAL]={datefield:i,step:100,spacing:3155780736e3};var g=function(){for(var e=[],t=-39;t<=39;t++)for(var a=Math.pow(10,t),n=1;n<=9;n++){var r=a*n;e.push(r)}return e}(),m=function(e,t,a,n){for(var r=n("pixelsPerLabel"),i=0;i<o.NUM_GRANULARITIES;i++)if(a/b(e,t,i)>=r)return i;return-1},b=function(e,t,a){var n=f[a].spacing;return Math.round(1*(t-e)/n)},v=function(e,t,a,r,g){var m=r("axisLabelFormatter"),b=r("labelsUTC")?n.DateAccessorsUTC:n.DateAccessorsLocal,v=f[a].datefield,_=f[a].step,y=f[a].spacing,O=new Date(e),x=[];x[i]=b.getFullYear(O),x[s]=b.getMonth(O),x[l]=b.getDate(O),x[c]=b.getHours(O),x[u]=b.getMinutes(O),x[d]=b.getSeconds(O),x[h]=b.getMilliseconds(O);var w=x[v]%_;a==o.WEEKLY&&(w=b.getDay(O)),x[v]-=w;for(var E=v+1;E<p;E++)x[E]=E===l?1:0;var S=[],C=b.makeDate.apply(null,x),A=C.getTime();if(a<=o.HOURLY)for(A<e&&(A+=y,C=new Date(A));A<=t;)S.push({v:A,label:m.call(g,C,a,r,g)}),A+=y,C=new Date(A);else for(A<e&&(x[v]+=_,A=(C=b.makeDate.apply(null,x)).getTime());A<=t;)(a>=o.DAILY||b.getHours(C)%_==0)&&S.push({v:A,label:m.call(g,C,a,r,g)}),x[v]+=_,A=(C=b.makeDate.apply(null,x)).getTime();return S};a.getDateAxis=v},{"./dygraph-utils":17}],17:[function(e,t,a){"use strict";function n(e){return!e.pageX||e.pageX<0?0:e.pageX}function r(e){return!e.pageY||e.pageY<0?0:e.pageY}function o(e,t){var a=Math.min(Math.max(1,t||2),21);return Math.abs(e)<.001&&0!==e?e.toExponential(a-1):e.toPrecision(a)}function i(e){return e<10?"0"+e:""+e}function s(e,t,a,n){var r=i(e)+":"+i(t);if(a&&(r+=":"+i(a),n)){var o=""+n;r+="."+("000"+o).substring(o.length)}return r}function l(e,t){var a=t?y:_,n=new Date(e),r=a.getFullYear(n),o=a.getMonth(n),l=a.getDate(n),c=a.getHours(n),u=a.getMinutes(n),d=a.getSeconds(n),h=a.getMilliseconds(n),p=r+"/"+i(o+1)+"/"+i(l);return 3600*c+60*u+d+.001*h&&(p+=" "+s(c,u,d,h)),p}function c(e,t){var a=Math.pow(10,t);return Math.round(e*a)/a}function u(e){return new Date(e).getTime()}function d(e){var t=typeof e;return("object"==t||"function"==t&&"function"==typeof e.item)&&null!==e&&"number"==typeof e.length&&3!==e.nodeType}function h(e,t,a,n){t=t||0,a=a||e.length,this.hasNext=!0,this.peek=null,this.start_=t,this.array_=e,this.predicate_=n,this.end_=Math.min(e.length,t+a),this.nextIdx_=t-1,this.next()}function p(e,t){return t<0?1/Math.pow(e,-t):Math.pow(e,t)}function f(e){var t=E.exec(e);if(!t)return null;var a=parseInt(t[1],10),n=parseInt(t[2],10),r=parseInt(t[3],10);return t[4]?{r:a,g:n,b:r,a:parseFloat(t[4])}:{r:a,g:n,b:r}}function g(e,t){var a=t("sigFigs");if(null!==a)return o(e,a);var n,r=t("digitsAfterDecimal"),i=t("maxNumberWidth"),s=t("labelsKMB"),l=t("labelsKMG2");if(n=0!==e&&(Math.abs(e)>=Math.pow(10,i)||Math.abs(e)<Math.pow(10,-r))?e.toExponential(r):""+c(e,r),s||l){var u,d=[],h=[];s&&(u=1e3,d=S),l&&(s&&console.warn("Setting both labelsKMB and labelsKMG2. Pick one!"),u=1024,d=C,h=A);for(var f=Math.abs(e),g=p(u,d.length),m=d.length-1;m>=0;m--,g/=u)if(f>=g){n=c(e/g,r)+d[m];break}if(l){var b=String(e.toExponential()).split("e-");2===b.length&&b[1]>=3&&b[1]<=24&&(n=b[1]%3>0?c(b[0]/p(10,b[1]%3),r):Number(b[0]).toFixed(2),n+=h[Math.floor(b[1]/3)-1])}}return n}Object.defineProperty(a,"__esModule",{value:!0}),a.removeEvent=function(e,t,a){e.removeEventListener(t,a,!1)},a.cancelEvent=function(e){return(e=e||window.event).stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1},a.hsvToRGB=function(e,t,a){var n,r,o;if(0===t)n=a,r=a,o=a;else{var i=Math.floor(6*e),s=6*e-i,l=a*(1-t),c=a*(1-t*s),u=a*(1-t*(1-s));switch(i){case 1:n=c,r=a,o=l;break;case 2:n=l,r=a,o=u;break;case 3:n=l,r=c,o=a;break;case 4:n=u,r=l,o=a;break;case 5:n=a,r=l,o=c;break;case 6:case 0:n=a,r=u,o=l}}return"rgb("+(n=Math.floor(255*n+.5))+","+(r=Math.floor(255*r+.5))+","+(o=Math.floor(255*o+.5))+")"},a.findPos=function(e){var t=e.getBoundingClientRect(),a=window,n=document.documentElement;return{x:t.left+(a.pageXOffset||n.scrollLeft),y:t.top+(a.pageYOffset||n.scrollTop)}},a.pageX=n,a.pageY=r,a.dragGetX_=function(e,t){return n(e)-t.px},a.dragGetY_=function(e,t){return r(e)-t.py},a.isOK=function(e){return!!e&&!isNaN(e)},a.isValidPoint=function(e,t){return!!e&&null!==e.yval&&null!==e.x&&void 0!==e.x&&null!==e.y&&void 0!==e.y&&!(isNaN(e.x)||!t&&isNaN(e.y))},a.floatFormat=o,a.zeropad=i,a.hmsString_=s,a.dateString_=l,a.round_=c,a.binarySearch=function(e,t,a,n,r){for(var o=!0;o;){var i=e,s=t,l=a,c=n,u=r;if(o=!1,null!==c&&void 0!==c&&null!==u&&void 0!==u||(c=0,u=s.length-1),c>u)return-1;null!==l&&void 0!==l||(l=0);var d,h=function(e){return e>=0&&e<s.length},p=parseInt((c+u)/2,10),f=s[p];if(f==i)return p;if(f>i){if(l>0&&h(d=p-1)&&s[d]<i)return p;e=i,t=s,a=l,n=c,r=p-1,o=!0,h=p=f=d=void 0}else{if(!(f<i))return-1;if(l<0&&h(d=p+1)&&s[d]>i)return p;e=i,t=s,a=l,n=p+1,r=u,o=!0,h=p=f=d=void 0}}},a.dateParser=function(e){var t,a;if((-1==e.search("-")||-1!=e.search("T")||-1!=e.search("Z"))&&(a=u(e))&&!isNaN(a))return a;if(-1!=e.search("-")){for(t=e.replace("-","/","g");-1!=t.search("-");)t=t.replace("-","/");a=u(t)}else a=8==e.length?u(t=e.substr(0,4)+"/"+e.substr(4,2)+"/"+e.substr(6,2)):u(e);return a&&!isNaN(a)||console.error("Couldn't parse "+e+" as a date"),a},a.dateStrToMillis=u,a.update=function(e,t){if(void 0!==t&&null!==t)for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a]);return e},a.updateDeep=function e(t,a){if(void 0!==a&&null!==a)for(var n in a)a.hasOwnProperty(n)&&(null===a[n]?t[n]=null:d(a[n])?t[n]=a[n].slice():function(e){return"object"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}(a[n])||"object"!=typeof a[n]?t[n]=a[n]:("object"==typeof t[n]&&null!==t[n]||(t[n]={}),e(t[n],a[n])));return t},a.isArrayLike=d,a.isDateLike=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime},a.clone=function e(t){for(var a=[],n=0;n<t.length;n++)d(t[n])?a.push(e(t[n])):a.push(t[n]);return a},a.createCanvas=function(){return document.createElement("canvas")},a.getContextPixelRatio=function(e){try{var t=window.devicePixelRatio,a=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return void 0!==t?t/a:1}catch(e){return 1}},a.Iterator=h,a.createIterator=function(e,t,a,n){return new h(e,t,a,n)},a.repeatAndCleanup=function(e,t,a,n){var r,o=0,i=(new Date).getTime();if(e(o),1!=t){var s=t-1;!function l(){o>=t||O.call(window,(function(){var t=(new Date).getTime()-i;r=o;var c=(o=Math.floor(t/a))-r;o+c>s||o>=s?(e(s),n()):(0!==c&&e(o),l())}))}()}else n()},a.isPixelChangingOptionList=function(e,t){var a={};if(e)for(var n=1;n<e.length;n++)a[e[n]]=!0;var r=function(e){for(var t in e)if(e.hasOwnProperty(t)&&!x[t])return!0;return!1};for(var o in t)if(t.hasOwnProperty(o))if("highlightSeriesOpts"==o||a[o]&&!t.series){if(r(t[o]))return!0}else if("series"==o||"axes"==o){var i=t[o];for(var s in i)if(i.hasOwnProperty(s)&&r(i[s]))return!0}else if(!x[o])return!0;return!1},a.detectLineDelimiter=function(e){for(var t=0;t<e.length;t++){var a=e.charAt(t);if("\r"===a)return t+1<e.length&&"\n"===e.charAt(t+1)?"\r\n":a;if("\n"===a)return t+1<e.length&&"\r"===e.charAt(t+1)?"\n\r":a}return null},a.isNodeContainedBy=function(e,t){if(null===t||null===e)return!1;for(var a=e;a&&a!==t;)a=a.parentNode;return a===t},a.pow=p,a.toRGB_=function(e){var t=f(e);if(t)return t;var a=document.createElement("div");a.style.backgroundColor=e,a.style.visibility="hidden",document.body.appendChild(a);var n=window.getComputedStyle(a,null).backgroundColor;return document.body.removeChild(a),f(n)},a.isCanvasSupported=function(e){try{(e||document.createElement("canvas")).getContext("2d")}catch(e){return!1}return!0},a.parseFloat_=function(e,t,a){var n=parseFloat(e);if(!isNaN(n))return n;if(/^ *$/.test(e))return null;if(/^ *nan *$/i.test(e))return NaN;var r="Unable to parse '"+e+"' as a number";return void 0!==a&&void 0!==t&&(r+=" on line "+(1+(t||0))+" ('"+a+"') of CSV."),console.error(r),null},a.numberValueFormatter=g,a.numberAxisLabelFormatter=function(e,t,a){return g.call(this,e,a)},a.dateAxisLabelFormatter=function(e,t,a){var n=a("labelsUTC")?y:_,r=n.getFullYear(e),o=n.getMonth(e),l=n.getDate(e),c=n.getHours(e),u=n.getMinutes(e),d=n.getSeconds(e),h=n.getMilliseconds(e);if(t>=m.Granularity.DECADAL)return""+r;if(t>=m.Granularity.MONTHLY)return k[o]+" "+r;if(0===3600*c+60*u+d+.001*h||t>=m.Granularity.DAILY)return i(l)+" "+k[o];if(t<m.Granularity.SECONDLY){var p=""+h;return i(d)+"."+("000"+p).substring(p.length)}return t>m.Granularity.MINUTELY?s(c,u,d,0):s(c,u,d,h)},a.dateValueFormatter=function(e,t){return l(e,t("labelsUTC"))};var m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-tickers"));a.LOG_SCALE=10;var b=Math.log(10);a.LN_TEN=b;var v=function(e){return Math.log(e)/b};a.log10=v,a.logRangeFraction=function(e,t,a){var n=v(e),r=n+a*(v(t)-n);return Math.pow(10,r)},a.DOTTED_LINE=[2,2],a.DASHED_LINE=[7,3],a.DOT_DASH_LINE=[7,2,2,2],a.HORIZONTAL=1,a.VERTICAL=2,a.getContext=function(e){return e.getContext("2d")},a.addEvent=function(e,t,a){e.addEventListener(t,a,!1)};var _={getFullYear:function(e){return e.getFullYear()},getMonth:function(e){return e.getMonth()},getDate:function(e){return e.getDate()},getHours:function(e){return e.getHours()},getMinutes:function(e){return e.getMinutes()},getSeconds:function(e){return e.getSeconds()},getMilliseconds:function(e){return e.getMilliseconds()},getDay:function(e){return e.getDay()},makeDate:function(e,t,a,n,r,o,i){return new Date(e,t,a,n,r,o,i)}};a.DateAccessorsLocal=_;var y={getFullYear:function(e){return e.getUTCFullYear()},getMonth:function(e){return e.getUTCMonth()},getDate:function(e){return e.getUTCDate()},getHours:function(e){return e.getUTCHours()},getMinutes:function(e){return e.getUTCMinutes()},getSeconds:function(e){return e.getUTCSeconds()},getMilliseconds:function(e){return e.getUTCMilliseconds()},getDay:function(e){return e.getUTCDay()},makeDate:function(e,t,a,n,r,o,i){return new Date(Date.UTC(e,t,a,n,r,o,i))}};a.DateAccessorsUTC=y,h.prototype.next=function(){if(!this.hasNext)return null;for(var e=this.peek,t=this.nextIdx_+1,a=!1;t<this.end_;){if(!this.predicate_||this.predicate_(this.array_,t)){this.peek=this.array_[t],a=!0;break}t++}return this.nextIdx_=t,a||(this.hasNext=!1,this.peek=null),e};var O=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)};a.requestAnimFrame=O;var x={annotationClickHandler:!0,annotationDblClickHandler:!0,annotationMouseOutHandler:!0,annotationMouseOverHandler:!0,axisLineColor:!0,axisLineWidth:!0,clickCallback:!0,drawCallback:!0,drawHighlightPointCallback:!0,drawPoints:!0,drawPointCallback:!0,drawGrid:!0,fillAlpha:!0,gridLineColor:!0,gridLineWidth:!0,hideOverlayOnMouseOut:!0,highlightCallback:!0,highlightCircleSize:!0,interactionModel:!0,labelsDiv:!0,labelsKMB:!0,labelsKMG2:!0,labelsSeparateLines:!0,labelsShowZeroValues:!0,legend:!0,panEdgeFraction:!0,pixelsPerYLabel:!0,pointClickCallback:!0,pointSize:!0,rangeSelectorPlotFillColor:!0,rangeSelectorPlotFillGradientColor:!0,rangeSelectorPlotStrokeColor:!0,rangeSelectorBackgroundStrokeColor:!0,rangeSelectorBackgroundLineWidth:!0,rangeSelectorPlotLineWidth:!0,rangeSelectorForegroundStrokeColor:!0,rangeSelectorForegroundLineWidth:!0,rangeSelectorAlpha:!0,showLabelsOnHighlight:!0,showRoller:!0,strokeWidth:!0,underlayCallback:!0,unhighlightCallback:!0,zoomCallback:!0},w={DEFAULT:function(e,t,a,n,r,o,i){a.beginPath(),a.fillStyle=o,a.arc(n,r,i,0,2*Math.PI,!1),a.fill()}};a.Circles=w;var E=/^rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(?:,\s*([01](?:\.\d+)?))?\)$/,S=["K","M","B","T","Q"],C=["k","M","G","T","P","E","Z","Y"],A=["m","u","n","p","f","a","z","y"],k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},{"./dygraph-tickers":16}],18:[function(e,t,a){(function(n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],n=!0,r=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done)&&(a.push(i.value),!t||a.length!==t);n=!0);}catch(e){r=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=o(e("./dygraph-layout")),l=o(e("./dygraph-canvas")),c=o(e("./dygraph-options")),u=o(e("./dygraph-interaction-model")),d=r(e("./dygraph-tickers")),h=r(e("./dygraph-utils")),p=o(e("./dygraph-default-attrs")),f=(o(e("./dygraph-options-reference")),e("./iframe-tarp")),g=o(f),m=o(e("./datahandler/default")),b=o(e("./datahandler/bars-error")),v=o(e("./datahandler/bars-custom")),_=o(e("./datahandler/default-fractions")),y=o(e("./datahandler/bars-fractions")),O=o(e("./datahandler/bars")),x=o(e("./plugins/annotations")),w=o(e("./plugins/axes")),E=o(e("./plugins/chart-labels")),S=o(e("./plugins/grid")),C=o(e("./plugins/legend")),A=o(e("./plugins/range-selector")),k=o(e("./dygraph-gviz")),j=function(e,t,a){this.__init__(e,t,a)};j.NAME="Dygraph",j.VERSION="2.1.0",j.DEFAULT_ROLL_PERIOD=1,j.DEFAULT_WIDTH=480,j.DEFAULT_HEIGHT=320,j.ANIMATION_STEPS=12,j.ANIMATION_DURATION=200,j.Plotters=l.default._Plotters,j.addedAnnotationCSS=!1,j.prototype.__init__=function(e,t,a){if(this.is_initial_draw_=!0,this.readyFns_=[],null!==a&&void 0!==a||(a={}),a=j.copyUserAttrs_(a),"string"==typeof e&&(e=document.getElementById(e)),!e)throw new Error("Constructing dygraph with a non-existent div!");this.maindiv_=e,this.file_=t,this.rollPeriod_=a.rollPeriod||j.DEFAULT_ROLL_PERIOD,this.previousVerticalX_=-1,this.fractions_=a.fractions||!1,this.dateWindow_=a.dateWindow||null,this.annotations_=[],e.innerHTML="",""===e.style.width&&a.width&&(e.style.width=a.width+"px"),""===e.style.height&&a.height&&(e.style.height=a.height+"px"),""===e.style.height&&0===e.clientHeight&&(e.style.height=j.DEFAULT_HEIGHT+"px",""===e.style.width&&(e.style.width=j.DEFAULT_WIDTH+"px")),this.width_=e.clientWidth||a.width||0,this.height_=e.clientHeight||a.height||0,a.stackedGraph&&(a.fillGraph=!0),this.user_attrs_={},h.update(this.user_attrs_,a),this.attrs_={},h.updateDeep(this.attrs_,p.default),this.boundaryIds_=[],this.setIndexByName_={},this.datasetIndex_=[],this.registeredEvents_=[],this.eventListeners_={},this.attributes_=new c.default(this),this.createInterface_(),this.plugins_=[];for(var n=j.PLUGINS.concat(this.getOption("plugins")),r=0;r<n.length;r++){var o,i=n[r],s={plugin:o=void 0!==i.activate?i:new i,events:{},options:{},pluginOptions:{}},l=o.activate(this);for(var u in l)l.hasOwnProperty(u)&&(s.events[u]=l[u]);this.plugins_.push(s)}for(r=0;r<this.plugins_.length;r++){var d=this.plugins_[r];for(var u in d.events)if(d.events.hasOwnProperty(u)){var f=d.events[u],g=[d.plugin,f];u in this.eventListeners_?this.eventListeners_[u].push(g):this.eventListeners_[u]=[g]}}this.createDragInterface_(),this.start_()},j.prototype.cascadeEvents_=function(e,t){if(!(e in this.eventListeners_))return!1;var a={dygraph:this,cancelable:!1,defaultPrevented:!1,preventDefault:function(){if(!a.cancelable)throw"Cannot call preventDefault on non-cancelable event.";a.defaultPrevented=!0},propagationStopped:!1,stopPropagation:function(){a.propagationStopped=!0}};h.update(a,t);var n=this.eventListeners_[e];if(n)for(var r=n.length-1;r>=0;r--){var o=n[r][0];if(n[r][1].call(o,a),a.propagationStopped)break}return a.defaultPrevented},j.prototype.getPluginInstance_=function(e){for(var t=0;t<this.plugins_.length;t++){var a=this.plugins_[t];if(a.plugin instanceof e)return a.plugin}return null},j.prototype.isZoomed=function(e){var t=!!this.dateWindow_;if("x"===e)return t;var a=this.axes_.map((function(e){return!!e.valueRange})).indexOf(!0)>=0;if(null===e||void 0===e)return t||a;if("y"===e)return a;throw new Error("axis parameter is ["+e+"] must be null, 'x' or 'y'.")},j.prototype.toString=function(){var e=this.maindiv_;return"[Dygraph "+(e&&e.id?e.id:e)+"]"},j.prototype.attr_=function(e,t){return t?this.attributes_.getForSeries(e,t):this.attributes_.get(e)},j.prototype.getOption=function(e,t){return this.attr_(e,t)},j.prototype.getNumericOption=function(e,t){return this.getOption(e,t)},j.prototype.getStringOption=function(e,t){return this.getOption(e,t)},j.prototype.getBooleanOption=function(e,t){return this.getOption(e,t)},j.prototype.getFunctionOption=function(e,t){return this.getOption(e,t)},j.prototype.getOptionForAxis=function(e,t){return this.attributes_.getForAxis(e,t)},j.prototype.optionsViewForAxis_=function(e){var t=this;return function(a){var n=t.user_attrs_.axes;return n&&n[e]&&n[e].hasOwnProperty(a)?n[e][a]:("x"!==e||"logscale"!==a)&&(void 0!==t.user_attrs_[a]?t.user_attrs_[a]:(n=t.attrs_.axes)&&n[e]&&n[e].hasOwnProperty(a)?n[e][a]:"y"==e&&t.axes_[0].hasOwnProperty(a)?t.axes_[0][a]:"y2"==e&&t.axes_[1].hasOwnProperty(a)?t.axes_[1][a]:t.attr_(a))}},j.prototype.rollPeriod=function(){return this.rollPeriod_},j.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},j.prototype.xAxisExtremes=function(){var e=this.getNumericOption("xRangePad")/this.plotter_.area.w;if(0===this.numRows())return[0-e,1+e];var t=this.rawData_[0][0],a=this.rawData_[this.rawData_.length-1][0];if(e){var n=a-t;t-=n*e,a+=n*e}return[t,a]},j.prototype.yAxisExtremes=function(){var e=this.gatherDatasets_(this.rolledSeries_,null).extremes,t=this.axes_;this.computeYAxisRanges_(e);var a=this.axes_;return this.axes_=t,a.map((function(e){return e.extremeRange}))},j.prototype.yAxisRange=function(e){if(void 0===e&&(e=0),e<0||e>=this.axes_.length)return null;var t=this.axes_[e];return[t.computedValueRange[0],t.computedValueRange[1]]},j.prototype.yAxisRanges=function(){for(var e=[],t=0;t<this.axes_.length;t++)e.push(this.yAxisRange(t));return e},j.prototype.toDomCoords=function(e,t,a){return[this.toDomXCoord(e),this.toDomYCoord(t,a)]},j.prototype.toDomXCoord=function(e){if(null===e)return null;var t=this.plotter_.area,a=this.xAxisRange();return t.x+(e-a[0])/(a[1]-a[0])*t.w},j.prototype.toDomYCoord=function(e,t){var a=this.toPercentYCoord(e,t);if(null===a)return null;var n=this.plotter_.area;return n.y+a*n.h},j.prototype.toDataCoords=function(e,t,a){return[this.toDataXCoord(e),this.toDataYCoord(t,a)]},j.prototype.toDataXCoord=function(e){if(null===e)return null;var t=this.plotter_.area,a=this.xAxisRange();if(this.attributes_.getForAxis("logscale","x")){var n=(e-t.x)/t.w;return h.logRangeFraction(a[0],a[1],n)}return a[0]+(e-t.x)/t.w*(a[1]-a[0])},j.prototype.toDataYCoord=function(e,t){if(null===e)return null;var a=this.plotter_.area,n=this.yAxisRange(t);if(void 0===t&&(t=0),this.attributes_.getForAxis("logscale",t)){var r=(e-a.y)/a.h;return h.logRangeFraction(n[1],n[0],r)}return n[0]+(a.y+a.h-e)/a.h*(n[1]-n[0])},j.prototype.toPercentYCoord=function(e,t){if(null===e)return null;void 0===t&&(t=0);var a,n=this.yAxisRange(t);if(this.attributes_.getForAxis("logscale",t)){var r=h.log10(n[0]),o=h.log10(n[1]);a=(o-h.log10(e))/(o-r)}else a=(n[1]-e)/(n[1]-n[0]);return a},j.prototype.toPercentXCoord=function(e){if(null===e)return null;var t,a=this.xAxisRange();if(!0===this.attributes_.getForAxis("logscale","x")){var n=h.log10(a[0]),r=h.log10(a[1]);t=(h.log10(e)-n)/(r-n)}else t=(e-a[0])/(a[1]-a[0]);return t},j.prototype.numColumns=function(){return this.rawData_?this.rawData_[0]?this.rawData_[0].length:this.attr_("labels").length:0},j.prototype.numRows=function(){return this.rawData_?this.rawData_.length:0},j.prototype.getValue=function(e,t){return e<0||e>this.rawData_.length?null:t<0||t>this.rawData_[e].length?null:this.rawData_[e][t]},j.prototype.createInterface_=function(){var e=this.maindiv_;this.graphDiv=document.createElement("div"),this.graphDiv.style.textAlign="left",this.graphDiv.style.position="relative",e.appendChild(this.graphDiv),this.canvas_=h.createCanvas(),this.canvas_.style.position="absolute",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=h.getContext(this.canvas_),this.hidden_ctx_=h.getContext(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new s.default(this);var t=this;this.mouseMoveHandler_=function(e){t.mouseMove_(e)},this.mouseOutHandler_=function(e){var a=e.target||e.fromElement,n=e.relatedTarget||e.toElement;h.isNodeContainedBy(a,t.graphDiv)&&!h.isNodeContainedBy(n,t.graphDiv)&&t.mouseOut_(e)},this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(e){t.resize()},this.addAndTrackEvent(window,"resize",this.resizeHandler_))},j.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px",this.graphDiv.style.height=this.height_+"px";var e=this.getNumericOption("pixelRatio"),t=e||h.getContextPixelRatio(this.canvas_ctx_);this.canvas_.width=this.width_*t,this.canvas_.height=this.height_*t,this.canvas_.style.width=this.width_+"px",this.canvas_.style.height=this.height_+"px",1!==t&&this.canvas_ctx_.scale(t,t);var a=e||h.getContextPixelRatio(this.hidden_ctx_);this.hidden_.width=this.width_*a,this.hidden_.height=this.height_*a,this.hidden_.style.width=this.width_+"px",this.hidden_.style.height=this.height_+"px",1!==a&&this.hidden_ctx_.scale(a,a)},j.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var e=this.plugins_.length-1;e>=0;e--){var t=this.plugins_.pop();t.plugin.destroy&&t.plugin.destroy()}this.removeTrackedEvents_(),h.removeEvent(window,"mouseout",this.mouseOutHandler_),h.removeEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),h.removeEvent(window,"resize",this.resizeHandler_),this.resizeHandler_=null,function e(t){for(;t.hasChildNodes();)e(t.firstChild),t.removeChild(t.firstChild)}(this.maindiv_);var a=function(e){for(var t in e)"object"==typeof e[t]&&(e[t]=null)};a(this.layout_),a(this.plotter_),a(this)},j.prototype.createPlotKitCanvas_=function(e){var t=h.createCanvas();return t.style.position="absolute",t.style.top=e.style.top,t.style.left=e.style.left,t.width=this.width_,t.height=this.height_,t.style.width=this.width_+"px",t.style.height=this.height_+"px",t},j.prototype.createMouseEventElement_=function(){return this.canvas_},j.prototype.setColors_=function(){var e=this.getLabels(),t=e.length-1;this.colors_=[],this.colorsMap_={};for(var a=this.getNumericOption("colorSaturation")||1,n=this.getNumericOption("colorValue")||.5,r=Math.ceil(t/2),o=this.getOption("colors"),i=this.visibility(),s=0;s<t;s++)if(i[s]){var l=e[s+1],c=this.attributes_.getForSeries("color",l);if(!c)if(o)c=o[s%o.length];else{var u=1*(s%2?r+(s+1)/2:Math.ceil((s+1)/2))/(1+t);c=h.hsvToRGB(u,a,n)}this.colors_.push(c),this.colorsMap_[l]=c}},j.prototype.getColors=function(){return this.colors_},j.prototype.getPropertiesForSeries=function(e){for(var t=-1,a=this.getLabels(),n=1;n<a.length;n++)if(a[n]==e){t=n;break}return-1==t?null:{name:e,column:t,visible:this.visibility()[t-1],color:this.colorsMap_[e],axis:1+this.attributes_.axisForSeries(e)}},j.prototype.createRollInterface_=function(){var e=this,t=this.roller_;t||(this.roller_=t=document.createElement("input"),t.type="text",t.style.display="none",t.className="dygraph-roller",this.graphDiv.appendChild(t));var a=this.getBooleanOption("showRoller")?"block":"none",n=this.getArea(),r={top:n.y+n.h-25+"px",left:n.x+1+"px",display:a};t.size="2",t.value=this.rollPeriod_,h.update(t.style,r),t.onchange=function(){return e.adjustRoll(t.value)}},j.prototype.createDragInterface_=function(){var e={isZooming:!1,isPanning:!1,is2DPan:!1,dragStartX:null,dragStartY:null,dragEndX:null,dragEndY:null,dragDirection:null,prevEndX:null,prevEndY:null,prevDragDirection:null,cancelNextDblclick:!1,initialLeftmostDate:null,xUnitsPerPixel:null,dateRange:null,px:0,py:0,boundedDates:null,boundedValues:null,tarp:new g.default,initializeMouseDown:function(e,t,a){e.preventDefault?e.preventDefault():(e.returnValue=!1,e.cancelBubble=!0);var n=h.findPos(t.canvas_);a.px=n.x,a.py=n.y,a.dragStartX=h.dragGetX_(e,a),a.dragStartY=h.dragGetY_(e,a),a.cancelNextDblclick=!1,a.tarp.cover()},destroy:function(){var e=this;if((e.isZooming||e.isPanning)&&(e.isZooming=!1,e.dragStartX=null,e.dragStartY=null),e.isPanning){e.isPanning=!1,e.draggingDate=null,e.dateRange=null;for(var t=0;t<a.axes_.length;t++)delete a.axes_[t].draggingValue,delete a.axes_[t].dragValueRange}e.tarp.uncover()}},t=this.getOption("interactionModel"),a=this;for(var n in t)t.hasOwnProperty(n)&&this.addAndTrackEvent(this.mouseEventElement_,n,function(t){return function(n){t(n,a,e)}}(t[n]));t.willDestroyContextMyself||this.addAndTrackEvent(document,"mouseup",(function(t){e.destroy()}))},j.prototype.drawZoomRect_=function(e,t,a,n,r,o,i,s){var l=this.canvas_ctx_;o==h.HORIZONTAL?l.clearRect(Math.min(t,i),this.layout_.getPlotArea().y,Math.abs(t-i),this.layout_.getPlotArea().h):o==h.VERTICAL&&l.clearRect(this.layout_.getPlotArea().x,Math.min(n,s),this.layout_.getPlotArea().w,Math.abs(n-s)),e==h.HORIZONTAL?a&&t&&(l.fillStyle="rgba(128,128,128,0.33)",l.fillRect(Math.min(t,a),this.layout_.getPlotArea().y,Math.abs(a-t),this.layout_.getPlotArea().h)):e==h.VERTICAL&&r&&n&&(l.fillStyle="rgba(128,128,128,0.33)",l.fillRect(this.layout_.getPlotArea().x,Math.min(n,r),this.layout_.getPlotArea().w,Math.abs(r-n)))},j.prototype.clearZoomRect_=function(){this.currentZoomRectArgs_=null,this.canvas_ctx_.clearRect(0,0,this.width_,this.height_)},j.prototype.doZoomX_=function(e,t){this.currentZoomRectArgs_=null;var a=this.toDataXCoord(e),n=this.toDataXCoord(t);this.doZoomXDates_(a,n)},j.prototype.doZoomXDates_=function(e,t){var a=this,n=this.xAxisRange(),r=[e,t],o=this.getFunctionOption("zoomCallback");this.doAnimatedZoom(n,r,null,null,(function(){o&&o.call(a,e,t,a.yAxisRanges())}))},j.prototype.doZoomY_=function(e,t){var a=this;this.currentZoomRectArgs_=null;for(var n=this.yAxisRanges(),r=[],o=0;o<this.axes_.length;o++){var s=this.toDataYCoord(e,o),l=this.toDataYCoord(t,o);r.push([l,s])}var c=this.getFunctionOption("zoomCallback");this.doAnimatedZoom(null,null,n,r,(function(){if(c){var e=a.xAxisRange(),t=i(e,2),n=t[0],r=t[1];c.call(a,n,r,a.yAxisRanges())}}))},j.zoomAnimationFunction=function(e,t){return(1-Math.pow(1.5,-e))/(1-Math.pow(1.5,-t))},j.prototype.resetZoom=function(){var e=this,t=this.isZoomed("x"),a=this.isZoomed("y"),n=t||a;if(this.clearSelection(),n){var r=this.xAxisExtremes(),o=i(r,2),s=o[0],l=o[1],c=this.getBooleanOption("animatedZooms"),u=this.getFunctionOption("zoomCallback");if(!c)return this.dateWindow_=null,this.axes_.forEach((function(e){e.valueRange&&delete e.valueRange})),this.drawGraph_(),void(u&&u.call(this,s,l,this.yAxisRanges()));var d=null,h=null,p=null,f=null;t&&(d=this.xAxisRange(),h=[s,l]),a&&(p=this.yAxisRanges(),f=this.yAxisExtremes()),this.doAnimatedZoom(d,h,p,f,(function(){e.dateWindow_=null,e.axes_.forEach((function(e){e.valueRange&&delete e.valueRange})),u&&u.call(e,s,l,e.yAxisRanges())}))}},j.prototype.doAnimatedZoom=function(e,t,a,n,r){var o,i,s=this,l=this.getBooleanOption("animatedZooms")?j.ANIMATION_STEPS:1,c=[],u=[];if(null!==e&&null!==t)for(o=1;o<=l;o++)i=j.zoomAnimationFunction(o,l),c[o-1]=[e[0]*(1-i)+i*t[0],e[1]*(1-i)+i*t[1]];if(null!==a&&null!==n)for(o=1;o<=l;o++){i=j.zoomAnimationFunction(o,l);for(var d=[],p=0;p<this.axes_.length;p++)d.push([a[p][0]*(1-i)+i*n[p][0],a[p][1]*(1-i)+i*n[p][1]]);u[o-1]=d}h.repeatAndCleanup((function(e){if(u.length)for(var t=0;t<s.axes_.length;t++){var a=u[e][t];s.axes_[t].valueRange=[a[0],a[1]]}c.length&&(s.dateWindow_=c[e]),s.drawGraph_()}),l,j.ANIMATION_DURATION/l,r)},j.prototype.getArea=function(){return this.plotter_.area},j.prototype.eventToDomCoords=function(e){if(e.offsetX&&e.offsetY)return[e.offsetX,e.offsetY];var t=h.findPos(this.mouseEventElement_);return[h.pageX(e)-t.x,h.pageY(e)-t.y]},j.prototype.findClosestRow=function(e){for(var t=1/0,a=-1,n=this.layout_.points,r=0;r<n.length;r++)for(var o=n[r],i=o.length,s=0;s<i;s++){var l=o[s];if(h.isValidPoint(l,!0)){var c=Math.abs(l.canvasx-e);c<t&&(t=c,a=l.idx)}}return a},j.prototype.findClosestPoint=function(e,t){for(var a,n,r,o,i,s,l,c=1/0,u=this.layout_.points.length-1;u>=0;--u)for(var d=this.layout_.points[u],p=0;p<d.length;++p)o=d[p],h.isValidPoint(o)&&(a=(n=o.canvasx-e)*n+(r=o.canvasy-t)*r)<c&&(c=a,i=o,s=u,l=o.idx);return{row:l,seriesName:this.layout_.setNames[s],point:i}},j.prototype.findStackedPoint=function(e,t){for(var a,n,r=this.findClosestRow(e),o=0;o<this.layout_.points.length;++o){var i=r-this.getLeftBoundary_(o),s=this.layout_.points[o];if(!(i>=s.length)){var l=s[i];if(h.isValidPoint(l)){var c=l.canvasy;if(e>l.canvasx&&i+1<s.length){var u=s[i+1];h.isValidPoint(u)&&(d=u.canvasx-l.canvasx)>0&&(c+=(e-l.canvasx)/d*(u.canvasy-l.canvasy))}else if(e<l.canvasx&&i>0){var d,p=s[i-1];h.isValidPoint(p)&&(d=l.canvasx-p.canvasx)>0&&(c+=(l.canvasx-e)/d*(p.canvasy-l.canvasy))}(0===o||c<t)&&(a=l,n=o)}}}return{row:r,seriesName:this.layout_.setNames[n],point:a}},j.prototype.mouseMove_=function(e){var t=this.layout_.points;if(void 0!==t&&null!==t){var a=this.eventToDomCoords(e),n=a[0],r=a[1],o=!1;if(this.getOption("highlightSeriesOpts")&&!this.isSeriesLocked()){var i;i=this.getBooleanOption("stackedGraph")?this.findStackedPoint(n,r):this.findClosestPoint(n,r),o=this.setSelection(i.row,i.seriesName)}else{var s=this.findClosestRow(n);o=this.setSelection(s)}var l=this.getFunctionOption("highlightCallback");l&&o&&l.call(this,e,this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}},j.prototype.getLeftBoundary_=function(e){if(this.boundaryIds_[e])return this.boundaryIds_[e][0];for(var t=0;t<this.boundaryIds_.length;t++)if(void 0!==this.boundaryIds_[t])return this.boundaryIds_[t][0];return 0},j.prototype.animateSelection_=function(e){void 0===this.fadeLevel&&(this.fadeLevel=0),void 0===this.animateId&&(this.animateId=0);var t=this.fadeLevel,a=e<0?t:10-t;if(a<=0)this.fadeLevel&&this.updateSelection_(1);else{var n=++this.animateId,r=this;h.repeatAndCleanup((function(t){r.animateId==n&&(r.fadeLevel+=e,0===r.fadeLevel?r.clearSelection():r.updateSelection_(r.fadeLevel/10))}),a,30,(function(){0!==r.fadeLevel&&e<0&&(r.fadeLevel=0,r.clearSelection())}))}},j.prototype.updateSelection_=function(e){this.cascadeEvents_("select",{selectedRow:-1===this.lastRow_?void 0:this.lastRow_,selectedX:-1===this.lastx_?void 0:this.lastx_,selectedPoints:this.selPoints_});var t,a=this.canvas_ctx_;if(this.getOption("highlightSeriesOpts")){a.clearRect(0,0,this.width_,this.height_);var n=1-this.getNumericOption("highlightSeriesBackgroundAlpha"),r=h.toRGB_(this.getOption("highlightSeriesBackgroundColor"));if(n){if(void 0===e)return void this.animateSelection_(1);n*=e,a.fillStyle="rgba("+r.r+","+r.g+","+r.b+","+n+")",a.fillRect(0,0,this.width_,this.height_)}this.plotter_._renderLineChart(this.highlightSet_,a)}else if(this.previousVerticalX_>=0){var o=0,i=this.attr_("labels");for(t=1;t<i.length;t++){var s=this.getNumericOption("highlightCircleSize",i[t]);s>o&&(o=s)}var l=this.previousVerticalX_;a.clearRect(l-o-1,0,2*o+2,this.height_)}if(this.selPoints_.length>0){var c=this.selPoints_[0].canvasx;for(a.save(),t=0;t<this.selPoints_.length;t++){var u=this.selPoints_[t];if(!isNaN(u.canvasy)){var d=this.getNumericOption("highlightCircleSize",u.name),p=this.getFunctionOption("drawHighlightPointCallback",u.name),f=this.plotter_.colors[u.name];p||(p=h.Circles.DEFAULT),a.lineWidth=this.getNumericOption("strokeWidth",u.name),a.strokeStyle=f,a.fillStyle=f,p.call(this,this,u.name,a,c,u.canvasy,f,d,u.idx)}}a.restore(),this.previousVerticalX_=c}},j.prototype.setSelection=function(e,t,a){this.selPoints_=[];var n=!1;if(!1!==e&&e>=0){e!=this.lastRow_&&(n=!0),this.lastRow_=e;for(var r=0;r<this.layout_.points.length;++r){var o=this.layout_.points[r],i=e-this.getLeftBoundary_(r);if(i>=0&&i<o.length&&o[i].idx==e)null!==(l=o[i]).yval&&this.selPoints_.push(l);else for(var s=0;s<o.length;++s){var l;if((l=o[s]).idx==e){null!==l.yval&&this.selPoints_.push(l);break}}}}else this.lastRow_>=0&&(n=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==t&&(this.highlightSet_!==t&&(n=!0),this.highlightSet_=t),void 0!==a&&(this.lockedSet_=a),n&&this.updateSelection_(void 0),n},j.prototype.mouseOut_=function(e){this.getFunctionOption("unhighlightCallback")&&this.getFunctionOption("unhighlightCallback").call(this,e),this.getBooleanOption("hideOverlayOnMouseOut")&&!this.lockedSet_&&this.clearSelection()},j.prototype.clearSelection=function(){this.cascadeEvents_("deselect",{}),this.lockedSet_=!1,this.fadeLevel?this.animateSelection_(-1):(this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,this.highlightSet_=null)},j.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var e=0;e<this.layout_.points.length;e++)for(var t=this.layout_.points[e],a=0;a<t.length;a++)if(t[a].x==this.selPoints_[0].x)return t[a].idx;return-1},j.prototype.getHighlightSeries=function(){return this.highlightSet_},j.prototype.isSeriesLocked=function(){return this.lockedSet_},j.prototype.loadedEvent_=function(e){this.rawData_=this.parseCSV_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_()},j.prototype.addXTicks_=function(){var e;e=this.dateWindow_?[this.dateWindow_[0],this.dateWindow_[1]]:this.xAxisExtremes();var t=this.optionsViewForAxis_("x"),a=t("ticker")(e[0],e[1],this.plotter_.area.w,t,this);this.layout_.setXTicks(a)},j.prototype.getHandlerClass_=function(){return this.attr_("dataHandler")?this.attr_("dataHandler"):this.fractions_?this.getBooleanOption("errorBars")?y.default:_.default:this.getBooleanOption("customBars")?v.default:this.getBooleanOption("errorBars")?b.default:m.default},j.prototype.predraw_=function(){var e=new Date;this.dataHandler_=new(this.getHandlerClass_()),this.layout_.computePlotArea(),this.computeYAxes_(),this.is_initial_draw_||(this.canvas_ctx_.restore(),this.hidden_ctx_.restore()),this.canvas_ctx_.save(),this.hidden_ctx_.save(),this.plotter_=new l.default(this,this.hidden_,this.hidden_ctx_,this.layout_),this.createRollInterface_(),this.cascadeEvents_("predraw"),this.rolledSeries_=[null];for(var t=1;t<this.numColumns();t++){var a=this.dataHandler_.extractSeries(this.rawData_,t,this.attributes_);this.rollPeriod_>1&&(a=this.dataHandler_.rollingAverage(a,this.rollPeriod_,this.attributes_)),this.rolledSeries_.push(a)}this.drawGraph_();var n=new Date;this.drawingTimeMs_=n-e},j.PointType=void 0,j.stackPoints_=function(e,t,a,n){for(var r=null,o=null,i=null,s=-1,l=0;l<e.length;++l){var c=e[l],u=c.xval;void 0===t[u]&&(t[u]=0);var d=c.yval;isNaN(d)||null===d?"none"==n?d=0:(function(t){if(!(s>=t))for(var a=t;a<e.length;++a)if(i=null,!isNaN(e[a].yval)&&null!==e[a].yval){s=a,i=e[a];break}}(l),d=o&&i&&"none"!=n?o.yval+(i.yval-o.yval)*((u-o.xval)/(i.xval-o.xval)):o&&"all"==n?o.yval:i&&"all"==n?i.yval:0):o=c;var h=t[u];r!=u&&(h+=d,t[u]=h),r=u,c.yval_stacked=h,h>a[1]&&(a[1]=h),h<a[0]&&(a[0]=h)}},j.prototype.gatherDatasets_=function(e,t){var a,n,r,o,i,s,l=[],c=[],u=[],d={};for(a=e.length-1;a>=1;a--)if(this.visibility()[a-1]){if(t){s=e[a];var h=t[0],p=t[1];for(r=null,o=null,n=0;n<s.length;n++)s[n][0]>=h&&null===r&&(r=n),s[n][0]<=p&&(o=n);null===r&&(r=0);for(var f=r,g=!0;g&&f>0;)g=null===s[--f][1];null===o&&(o=s.length-1);var m=o;for(g=!0;g&&m<s.length-1;)g=null===s[++m][1];f!==r&&(r=f),m!==o&&(o=m),l[a-1]=[r,o],s=s.slice(r,o+1)}else s=e[a],l[a-1]=[0,s.length-1];var b=this.attr_("labels")[a],v=this.dataHandler_.getExtremeYValues(s,t,this.getBooleanOption("stepPlot",b)),_=this.dataHandler_.seriesToPoints(s,b,l[a-1][0]);this.getBooleanOption("stackedGraph")&&(void 0===u[i=this.attributes_.axisForSeries(b)]&&(u[i]=[]),j.stackPoints_(_,u[i],v,this.getBooleanOption("stackedGraphNaNFill"))),d[b]=v,c[a]=_}return{points:c,extremes:d,boundaryIds:l}},j.prototype.drawGraph_=function(){var e=new Date,t=this.is_initial_draw_;this.is_initial_draw_=!1,this.layout_.removeAllDatasets(),this.setColors_(),this.attrs_.pointSize=.5*this.getNumericOption("highlightCircleSize");var a=this.gatherDatasets_(this.rolledSeries_,this.dateWindow_),n=a.points,r=a.extremes;this.boundaryIds_=a.boundaryIds,this.setIndexByName_={};for(var o=this.attr_("labels"),i=0,s=1;s<n.length;s++)this.visibility()[s-1]&&(this.layout_.addDataset(o[s],n[s]),this.datasetIndex_[s]=i++);for(s=0;s<o.length;s++)this.setIndexByName_[o[s]]=s;if(this.computeYAxisRanges_(r),this.layout_.setYAxes(this.axes_),this.addXTicks_(),this.layout_.evaluate(),this.renderGraph_(t),this.getStringOption("timingName")){var l=new Date;console.log(this.getStringOption("timingName")+" - drawGraph: "+(l-e)+"ms")}},j.prototype.renderGraph_=function(e){this.cascadeEvents_("clearChart"),this.plotter_.clear();var t=this.getFunctionOption("underlayCallback");t&&t.call(this,this.hidden_ctx_,this.layout_.getPlotArea(),this,this);var a={canvas:this.hidden_,drawingContext:this.hidden_ctx_};this.cascadeEvents_("willDrawChart",a),this.plotter_.render(),this.cascadeEvents_("didDrawChart",a),this.lastRow_=-1,this.canvas_.getContext("2d").clearRect(0,0,this.width_,this.height_);var n=this.getFunctionOption("drawCallback");if(null!==n&&n.call(this,this,e),e)for(this.readyFired_=!0;this.readyFns_.length>0;)this.readyFns_.pop()(this)},j.prototype.computeYAxes_=function(){var e,t,a;for(this.axes_=[],e=0;e<this.attributes_.numAxes();e++)t={g:this},h.update(t,this.attributes_.axisOptions(e)),this.axes_[e]=t;for(e=0;e<this.axes_.length;e++)if(0===e)(a=(t=this.optionsViewForAxis_("y"+(e?"2":"")))("valueRange"))&&(this.axes_[e].valueRange=a);else{var n=this.user_attrs_.axes;n&&n.y2&&(a=n.y2.valueRange)&&(this.axes_[e].valueRange=a)}},j.prototype.numAxes=function(){return this.attributes_.numAxes()},j.prototype.axisPropertiesForSeries=function(e){return this.axes_[this.attributes_.axisForSeries(e)]},j.prototype.computeYAxisRanges_=function(e){for(var t,a,n,r,o,i=function(e){return isNaN(parseFloat(e))},s=this.attributes_.numAxes(),l=0;l<s;l++){var c=this.axes_[l],u=this.attributes_.getForAxis("logscale",l),d=this.attributes_.getForAxis("includeZero",l),p=this.attributes_.getForAxis("independentTicks",l);n=this.attributes_.seriesForAxis(l),t=!0,r=.1;var f=this.getNumericOption("yRangePad");if(null!==f&&(t=!1,r=f/this.plotter_.area.h),0===n.length)c.extremeRange=[0,1];else{for(var g,m,b=1/0,v=-1/0,_=0;_<n.length;_++)e.hasOwnProperty(n[_])&&(null!==(g=e[n[_]][0])&&(b=Math.min(g,b)),null!==(m=e[n[_]][1])&&(v=Math.max(m,v)));d&&!u&&(b>0&&(b=0),v<0&&(v=0)),b==1/0&&(b=0),v==-1/0&&(v=1),0===(a=v-b)&&(0!==v?a=Math.abs(v):(v=1,a=1));var y=v,O=b;t&&(u?(y=v+r*a,O=b):((O=b-r*a)<0&&b>=0&&(O=0),(y=v+r*a)>0&&v<=0&&(y=0))),c.extremeRange=[O,y]}if(c.valueRange){var x=i(c.valueRange[0])?c.extremeRange[0]:c.valueRange[0],w=i(c.valueRange[1])?c.extremeRange[1]:c.valueRange[1];c.computedValueRange=[x,w]}else c.computedValueRange=c.extremeRange;if(!t)if((x=c.computedValueRange[0])===(w=c.computedValueRange[1])&&(x-=.5,w+=.5),u){var E=r/(2*r-1),S=(r-1)/(2*r-1);c.computedValueRange[0]=h.logRangeFraction(x,w,E),c.computedValueRange[1]=h.logRangeFraction(x,w,S)}else a=w-x,c.computedValueRange[0]=x-a*r,c.computedValueRange[1]=w+a*r;if(p){c.independentTicks=p;var C=(A=this.optionsViewForAxis_("y"+(l?"2":"")))("ticker");c.ticks=C(c.computedValueRange[0],c.computedValueRange[1],this.plotter_.area.h,A,this),o||(o=c)}}if(void 0===o)throw'Configuration Error: At least one axis has to have the "independentTicks" option activated.';for(l=0;l<s;l++)if(!(c=this.axes_[l]).independentTicks){C=(A=this.optionsViewForAxis_("y"+(l?"2":"")))("ticker");for(var A,k=o.ticks,j=o.computedValueRange[1]-o.computedValueRange[0],T=c.computedValueRange[1]-c.computedValueRange[0],D=[],P=0;P<k.length;P++){var M=(k[P].v-o.computedValueRange[0])/j,L=c.computedValueRange[0]+M*T;D.push(L)}c.ticks=C(c.computedValueRange[0],c.computedValueRange[1],this.plotter_.area.h,A,this,D)}},j.prototype.detectTypeFromString_=function(e){var t=!1,a=e.indexOf("-");a>0&&"e"!=e[a-1]&&"E"!=e[a-1]||e.indexOf("/")>=0||isNaN(parseFloat(e))?t=!0:8==e.length&&e>"19700101"&&e<"20371231"&&(t=!0),this.setXAxisOptions_(t)},j.prototype.setXAxisOptions_=function(e){e?(this.attrs_.xValueParser=h.dateParser,this.attrs_.axes.x.valueFormatter=h.dateValueFormatter,this.attrs_.axes.x.ticker=d.dateTicker,this.attrs_.axes.x.axisLabelFormatter=h.dateAxisLabelFormatter):(this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=d.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},j.prototype.parseCSV_=function(e){var t,a,n=[],r=h.detectLineDelimiter(e),o=e.split(r||"\n"),i=this.getStringOption("delimiter");-1==o[0].indexOf(i)&&o[0].indexOf("\t")>=0&&(i="\t");var s=0;"labels"in this.user_attrs_||(s=1,this.attrs_.labels=o[0].split(i),this.attributes_.reparseSeries());for(var l,c=!1,u=this.attr_("labels").length,d=!1,p=s;p<o.length;p++){var f=o[p];if(0!==f.length&&"#"!=f[0]){var g=f.split(i);if(!(g.length<2)){var m=[];if(c||(this.detectTypeFromString_(g[0]),l=this.getFunctionOption("xValueParser"),c=!0),m[0]=l(g[0],this),this.fractions_)for(a=1;a<g.length;a++)2!=(t=g[a].split("/")).length?(console.error('Expected fractional "num/den" values in CSV data but found a value \''+g[a]+"' on line "+(1+p)+" ('"+f+"') which is not of this form."),m[a]=[0,0]):m[a]=[h.parseFloat_(t[0],p,f),h.parseFloat_(t[1],p,f)];else if(this.getBooleanOption("errorBars"))for(g.length%2!=1&&console.error("Expected alternating (value, stdev.) pairs in CSV data but line "+(1+p)+" has an odd number of values ("+(g.length-1)+"): '"+f+"'"),a=1;a<g.length;a+=2)m[(a+1)/2]=[h.parseFloat_(g[a],p,f),h.parseFloat_(g[a+1],p,f)];else if(this.getBooleanOption("customBars"))for(a=1;a<g.length;a++){var b=g[a];/^ *$/.test(b)?m[a]=[null,null,null]:3==(t=b.split(";")).length?m[a]=[h.parseFloat_(t[0],p,f),h.parseFloat_(t[1],p,f),h.parseFloat_(t[2],p,f)]:console.warn('When using customBars, values must be either blank or "low;center;high" tuples (got "'+b+'" on line '+(1+p))}else for(a=1;a<g.length;a++)m[a]=h.parseFloat_(g[a],p,f);if(n.length>0&&m[0]<n[n.length-1][0]&&(d=!0),m.length!=u&&console.error("Number of columns in line "+p+" ("+m.length+") does not agree with number of labels ("+u+") "+f),0===p&&this.attr_("labels")){var v=!0;for(a=0;v&&a<m.length;a++)m[a]&&(v=!1);if(v){console.warn("The dygraphs 'labels' option is set, but the first row of CSV data ('"+f+"') appears to also contain labels. Will drop the CSV labels and use the option labels.");continue}}n.push(m)}}}return d&&(console.warn("CSV is out of order; order it correctly to speed loading."),n.sort((function(e,t){return e[0]-t[0]}))),n},j.prototype.parseArray_=function(e){if(0===e.length)return console.error("Can't plot empty data set"),null;if(0===e[0].length)return console.error("Data set cannot contain an empty row"),null;var t;if(function(e){var t=e[0],a=t[0];if("number"!=typeof a&&!h.isDateLike(a))throw new Error("Expected number or date but got "+typeof a+": "+a+".");for(var n=1;n<t.length;n++){var r=t[n];if(null!==r&&void 0!==r&&"number"!=typeof r&&!h.isArrayLike(r))throw new Error("Expected number or array but got "+typeof r+": "+r+".")}}(e),null===this.attr_("labels")){for(console.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter"),this.attrs_.labels=["X"],t=1;t<e[0].length;t++)this.attrs_.labels.push("Y"+t);this.attributes_.reparseSeries()}else{var a=this.attr_("labels");if(a.length!=e[0].length)return console.error("Mismatch between number of labels ("+a+") and number of columns in array ("+e[0].length+")"),null}if(h.isDateLike(e[0][0])){this.attrs_.axes.x.valueFormatter=h.dateValueFormatter,this.attrs_.axes.x.ticker=d.dateTicker,this.attrs_.axes.x.axisLabelFormatter=h.dateAxisLabelFormatter;var n=h.clone(e);for(t=0;t<e.length;t++){if(0===n[t].length)return console.error("Row "+(1+t)+" of data is empty"),null;if(null===n[t][0]||"function"!=typeof n[t][0].getTime||isNaN(n[t][0].getTime()))return console.error("x value in row "+(1+t)+" is not a Date"),null;n[t][0]=n[t][0].getTime()}return n}return this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=d.numericTicks,this.attrs_.axes.x.axisLabelFormatter=h.numberAxisLabelFormatter,e},j.prototype.parseDataTable_=function(e){var t=e.getNumberOfColumns(),a=e.getNumberOfRows(),n=e.getColumnType(0);if("date"==n||"datetime"==n)this.attrs_.xValueParser=h.dateParser,this.attrs_.axes.x.valueFormatter=h.dateValueFormatter,this.attrs_.axes.x.ticker=d.dateTicker,this.attrs_.axes.x.axisLabelFormatter=h.dateAxisLabelFormatter;else{if("number"!=n)throw new Error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+n+"')");this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=d.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var r,o,i=[],s={},l=!1;for(r=1;r<t;r++){var c=e.getColumnType(r);if("number"==c)i.push(r);else{if("string"!=c||!this.getBooleanOption("displayAnnotations"))throw new Error("Only 'number' is supported as a dependent type with Gviz. 'string' is only supported if displayAnnotations is true");var u=i[i.length-1];s.hasOwnProperty(u)?s[u].push(r):s[u]=[r],l=!0}}var p=[e.getColumnLabel(0)];for(r=0;r<i.length;r++)p.push(e.getColumnLabel(i[r])),this.getBooleanOption("errorBars")&&(r+=1);this.attrs_.labels=p,t=p.length;var f=[],g=!1,m=[];for(r=0;r<a;r++){var b=[];if(void 0!==e.getValue(r,0)&&null!==e.getValue(r,0)){if("date"==n||"datetime"==n?b.push(e.getValue(r,0).getTime()):b.push(e.getValue(r,0)),this.getBooleanOption("errorBars"))for(o=0;o<t-1;o++)b.push([e.getValue(r,1+2*o),e.getValue(r,2+2*o)]);else{for(o=0;o<i.length;o++){var v=i[o];if(b.push(e.getValue(r,v)),l&&s.hasOwnProperty(v)&&null!==e.getValue(r,s[v][0])){var _={};_.series=e.getColumnLabel(v),_.xval=b[0],_.shortText=function(e){var t=String.fromCharCode(65+e%26);for(e=Math.floor(e/26);e>0;)t=String.fromCharCode(65+(e-1)%26)+t.toLowerCase(),e=Math.floor((e-1)/26);return t}(m.length),_.text="";for(var y=0;y<s[v].length;y++)y&&(_.text+="\n"),_.text+=e.getValue(r,s[v][y]);m.push(_)}}for(o=0;o<b.length;o++)isFinite(b[o])||(b[o]=null)}f.length>0&&b[0]<f[f.length-1][0]&&(g=!0),f.push(b)}else console.warn("Ignoring row "+r+" of DataTable because of undefined or null first column.")}g&&(console.warn("DataTable is out of order; order it correctly to speed loading."),f.sort((function(e,t){return e[0]-t[0]}))),this.rawData_=f,m.length>0&&this.setAnnotations(m,!0),this.attributes_.reparseSeries()},j.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_("dataDidUpdate",{})},j.prototype.start_=function(){var e=this.file_;if("function"==typeof e&&(e=e()),h.isArrayLike(e))this.rawData_=this.parseArray_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("object"==typeof e&&"function"==typeof e.getColumnRange)this.parseDataTable_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("string"==typeof e)if(h.detectLineDelimiter(e))this.loadedEvent_(e);else{var t;t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var a=this;t.onreadystatechange=function(){4==t.readyState&&(200!==t.status&&0!==t.status||a.loadedEvent_(t.responseText))},t.open("GET",e,!0),t.send(null)}else console.error("Unknown data format: "+typeof e)},j.prototype.updateOptions=function(e,t){void 0===t&&(t=!1);var a=e.file,n=j.copyUserAttrs_(e);"rollPeriod"in n&&(this.rollPeriod_=n.rollPeriod),"dateWindow"in n&&(this.dateWindow_=n.dateWindow);var r=h.isPixelChangingOptionList(this.attr_("labels"),n);h.updateDeep(this.user_attrs_,n),this.attributes_.reparseSeries(),a?(this.cascadeEvents_("dataWillUpdate",{}),this.file_=a,t||this.start_()):t||(r?this.predraw_():this.renderGraph_(!1))},j.copyUserAttrs_=function(e){var t={};for(var a in e)e.hasOwnProperty(a)&&"file"!=a&&e.hasOwnProperty(a)&&(t[a]=e[a]);return t},j.prototype.resize=function(e,t){if(!this.resize_lock){this.resize_lock=!0,null===e!=(null===t)&&(console.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero."),e=t=null);var a=this.width_,n=this.height_;e?(this.maindiv_.style.width=e+"px",this.maindiv_.style.height=t+"px",this.width_=e,this.height_=t):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),a==this.width_&&n==this.height_||(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},j.prototype.adjustRoll=function(e){this.rollPeriod_=e,this.predraw_()},j.prototype.visibility=function(){for(this.getOption("visibility")||(this.attrs_.visibility=[]);this.getOption("visibility").length<this.numColumns()-1;)this.attrs_.visibility.push(!0);return this.getOption("visibility")},j.prototype.setVisibility=function(e,t){var a=this.visibility(),n=!1;if(Array.isArray(e)||(null!==e&&"object"==typeof e?n=!0:e=[e]),n)for(var r in e)e.hasOwnProperty(r)&&(r<0||r>=a.length?console.warn("Invalid series number in setVisibility: "+r):a[r]=e[r]);else for(r=0;r<e.length;r++)"boolean"==typeof e[r]?r>=a.length?console.warn("Invalid series number in setVisibility: "+r):a[r]=e[r]:e[r]<0||e[r]>=a.length?console.warn("Invalid series number in setVisibility: "+e[r]):a[e[r]]=t;this.predraw_()},j.prototype.size=function(){return{width:this.width_,height:this.height_}},j.prototype.setAnnotations=function(e,t){this.annotations_=e,this.layout_?(this.layout_.setAnnotations(this.annotations_),t||this.predraw_()):console.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html")},j.prototype.annotations=function(){return this.annotations_},j.prototype.getLabels=function(){var e=this.attr_("labels");return e?e.slice():null},j.prototype.indexFromSetName=function(e){return this.setIndexByName_[e]},j.prototype.getRowForX=function(e){for(var t=0,a=this.numRows()-1;t<=a;){var n=a+t>>1,r=this.getValue(n,0);if(r<e)t=n+1;else if(r>e)a=n-1;else{if(t==n)return n;a=n}}return null},j.prototype.ready=function(e){this.is_initial_draw_?this.readyFns_.push(e):e.call(this,this)},j.prototype.addAndTrackEvent=function(e,t,a){h.addEvent(e,t,a),this.registeredEvents_.push({elem:e,type:t,fn:a})},j.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var e=0;e<this.registeredEvents_.length;e++){var t=this.registeredEvents_[e];h.removeEvent(t.elem,t.type,t.fn)}this.registeredEvents_=[]},j.PLUGINS=[C.default,w.default,A.default,E.default,x.default,S.default],j.GVizChart=k.default,j.DASHED_LINE=h.DASHED_LINE,j.DOT_DASH_LINE=h.DOT_DASH_LINE,j.dateAxisLabelFormatter=h.dateAxisLabelFormatter,j.toRGB_=h.toRGB_,j.findPos=h.findPos,j.pageX=h.pageX,j.pageY=h.pageY,j.dateString_=h.dateString_,j.defaultInteractionModel=u.default.defaultModel,j.nonInteractiveModel=j.nonInteractiveModel_=u.default.nonInteractiveModel_,j.Circles=h.Circles,j.Plugins={Legend:C.default,Axes:w.default,Annotations:x.default,ChartLabels:E.default,Grid:S.default,RangeSelector:A.default},j.DataHandlers={DefaultHandler:m.default,BarsHandler:O.default,CustomBarsHandler:v.default,DefaultFractionHandler:_.default,ErrorBarsHandler:b.default,FractionsBarsHandler:y.default},j.startPan=u.default.startPan,j.startZoom=u.default.startZoom,j.movePan=u.default.movePan,j.moveZoom=u.default.moveZoom,j.endPan=u.default.endPan,j.endZoom=u.default.endZoom,j.numericLinearTicks=d.numericLinearTicks,j.numericTicks=d.numericTicks,j.dateTicker=d.dateTicker,j.Granularity=d.Granularity,j.getDateAxis=d.getDateAxis,j.floatFormat=h.floatFormat,a.default=j,t.exports=a.default}).call(this,e("_process"))},{"./datahandler/bars":5,"./datahandler/bars-custom":2,"./datahandler/bars-error":3,"./datahandler/bars-fractions":4,"./datahandler/default":8,"./datahandler/default-fractions":7,"./dygraph-canvas":9,"./dygraph-default-attrs":10,"./dygraph-gviz":11,"./dygraph-interaction-model":12,"./dygraph-layout":13,"./dygraph-options":15,"./dygraph-options-reference":14,"./dygraph-tickers":16,"./dygraph-utils":17,"./iframe-tarp":19,"./plugins/annotations":20,"./plugins/axes":21,"./plugins/chart-labels":22,"./plugins/grid":23,"./plugins/legend":24,"./plugins/range-selector":25,_process:1}],19:[function(e,t,a){"use strict";function n(){this.tarps=[]}Object.defineProperty(a,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("./dygraph-utils"));n.prototype.cover=function(){for(var e=document.getElementsByTagName("iframe"),t=0;t<e.length;t++){var a=e[t],n=r.findPos(a),o=n.x,i=n.y,s=a.offsetWidth,l=a.offsetHeight,c=document.createElement("div");c.style.position="absolute",c.style.left=o+"px",c.style.top=i+"px",c.style.width=s+"px",c.style.height=l+"px",c.style.zIndex=999,document.body.appendChild(c),this.tarps.push(c)}},n.prototype.uncover=function(){for(var e=0;e<this.tarps.length;e++)this.tarps[e].parentNode.removeChild(this.tarps[e]);this.tarps=[]},a.default=n,t.exports=a.default},{"./dygraph-utils":17}],20:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){this.annotations_=[]};n.prototype.toString=function(){return"Annotations Plugin"},n.prototype.activate=function(e){return{clearChart:this.clearChart,didDrawChart:this.didDrawChart}},n.prototype.detachLabels=function(){for(var e=0;e<this.annotations_.length;e++){var t=this.annotations_[e];t.parentNode&&t.parentNode.removeChild(t),this.annotations_[e]=null}this.annotations_=[]},n.prototype.clearChart=function(e){this.detachLabels()},n.prototype.didDrawChart=function(e){var t=e.dygraph,a=t.layout_.annotated_points;if(a&&0!==a.length)for(var n=e.canvas.parentNode,r=function(e,a,n){return function(r){var o=n.annotation;o.hasOwnProperty(e)?o[e](o,n,t,r):t.getOption(a)&&t.getOption(a)(o,n,t,r)}},o=e.dygraph.getArea(),i={},s=0;s<a.length;s++){var l=a[s];if(!(l.canvasx<o.x||l.canvasx>o.x+o.w||l.canvasy<o.y||l.canvasy>o.y+o.h)){var c=l.annotation,u=6;c.hasOwnProperty("tickHeight")&&(u=c.tickHeight);var d=document.createElement("div");d.style.fontSize=t.getOption("axisLabelFontSize")+"px";var h="dygraph-annotation";c.hasOwnProperty("icon")||(h+=" dygraphDefaultAnnotation dygraph-default-annotation"),c.hasOwnProperty("cssClass")&&(h+=" "+c.cssClass),d.className=h;var p=c.hasOwnProperty("width")?c.width:16,f=c.hasOwnProperty("height")?c.height:16;if(c.hasOwnProperty("icon")){var g=document.createElement("img");g.src=c.icon,g.width=p,g.height=f,d.appendChild(g)}else l.annotation.hasOwnProperty("shortText")&&d.appendChild(document.createTextNode(l.annotation.shortText));var m=l.canvasx-p/2;d.style.left=m+"px";var b=0;if(c.attachAtBottom){var v=o.y+o.h-f-u;i[m]?v-=i[m]:i[m]=0,i[m]+=u+f,b=v}else b=l.canvasy-f-u;d.style.top=b+"px",d.style.width=p+"px",d.style.height=f+"px",d.title=l.annotation.text,d.style.color=t.colorsMap_[l.name],d.style.borderColor=t.colorsMap_[l.name],c.div=d,t.addAndTrackEvent(d,"click",r("clickHandler","annotationClickHandler",l)),t.addAndTrackEvent(d,"mouseover",r("mouseOverHandler","annotationMouseOverHandler",l)),t.addAndTrackEvent(d,"mouseout",r("mouseOutHandler","annotationMouseOutHandler",l)),t.addAndTrackEvent(d,"dblclick",r("dblClickHandler","annotationDblClickHandler",l)),n.appendChild(d),this.annotations_.push(d);var _=e.drawingContext;_.save(),_.strokeStyle=c.hasOwnProperty("tickColor")?c.tickColor:t.colorsMap_[l.name],_.lineWidth=c.hasOwnProperty("tickWidth")?c.tickWidth:t.getOption("strokeWidth"),_.beginPath(),c.attachAtBottom?(v=b+f,_.moveTo(l.canvasx,v),_.lineTo(l.canvasx,v+u)):(_.moveTo(l.canvasx,l.canvasy),_.lineTo(l.canvasx,l.canvasy-2-u)),_.closePath(),_.stroke(),_.restore()}}},n.prototype.destroy=function(){this.detachLabels()},a.default=n,t.exports=a.default},{}],21:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("../dygraph-utils")),r=function(){this.xlabels_=[],this.ylabels_=[]};r.prototype.toString=function(){return"Axes Plugin"},r.prototype.activate=function(e){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}},r.prototype.layout=function(e){var t,a=e.dygraph;if(a.getOptionForAxis("drawAxis","y")){var n=a.getOptionForAxis("axisLabelWidth","y")+2*a.getOptionForAxis("axisTickSize","y");e.reserveSpaceLeft(n)}a.getOptionForAxis("drawAxis","x")&&(t=a.getOption("xAxisHeight")?a.getOption("xAxisHeight"):a.getOptionForAxis("axisLabelFontSize","x")+2*a.getOptionForAxis("axisTickSize","x"),e.reserveSpaceBottom(t)),2==a.numAxes()?a.getOptionForAxis("drawAxis","y2")&&(n=a.getOptionForAxis("axisLabelWidth","y2")+2*a.getOptionForAxis("axisTickSize","y2"),e.reserveSpaceRight(n)):a.numAxes()>2&&a.error("Only two y-axes are supported at this time. (Trying to use "+a.numAxes()+")")},r.prototype.detachLabels=function(){function e(e){for(var t=0;t<e.length;t++){var a=e[t];a.parentNode&&a.parentNode.removeChild(a)}}e(this.xlabels_),e(this.ylabels_),this.xlabels_=[],this.ylabels_=[]},r.prototype.clearChart=function(e){this.detachLabels()},r.prototype.willDrawChart=function(e){function t(e){return Math.round(e)+.5}function a(e){return Math.round(e)-.5}var r=this,o=e.dygraph;if(o.getOptionForAxis("drawAxis","x")||o.getOptionForAxis("drawAxis","y")||o.getOptionForAxis("drawAxis","y2")){var i,s,l,c=e.drawingContext,u=e.canvas.parentNode,d=o.width_,h=o.height_,p=function(e){return{position:"absolute",fontSize:o.getOptionForAxis("axisLabelFontSize",e)+"px",width:o.getOptionForAxis("axisLabelWidth",e)+"px"}},f={x:p("x"),y:p("y"),y2:p("y2")},g=function(e,t,a){var r=document.createElement("div"),o=f["y2"==a?"y2":t];n.update(r.style,o);var i=document.createElement("div");return i.className="dygraph-axis-label dygraph-axis-label-"+t+(a?" dygraph-axis-label-"+a:""),i.innerHTML=e,r.appendChild(i),r};c.save();var m=o.layout_,b=e.dygraph.plotter_.area,v=function(e){return function(t){return o.getOptionForAxis(t,e)}};if(o.getOptionForAxis("drawAxis","y")){if(m.yticks&&m.yticks.length>0){var _=o.numAxes(),y=[v("y"),v("y2")];m.yticks.forEach((function(e){if(void 0!==e.label){s=b.x;var t="y1",a=y[0];1==e.axis&&(s=b.x+b.w,t="y2",a=y[1]);var n=a("axisLabelFontSize");l=b.y+e.pos*b.h,i=g(e.label,"y",2==_?t:null);var o=l-n/2;o<0&&(o=0),o+n+3>h?i.style.bottom="0":i.style.top=o+"px",0===e.axis?(i.style.left=b.x-a("axisLabelWidth")-a("axisTickSize")+"px",i.style.textAlign="right"):1==e.axis&&(i.style.left=b.x+b.w+a("axisTickSize")+"px",i.style.textAlign="left"),i.style.width=a("axisLabelWidth")+"px",u.appendChild(i),r.ylabels_.push(i)}}));var O=this.ylabels_[0],x=o.getOptionForAxis("axisLabelFontSize","y");parseInt(O.style.top,10)+x>h-x&&(O.style.top=parseInt(O.style.top,10)-x/2+"px")}var w;o.getOption("drawAxesAtZero")?(((C=o.toPercentXCoord(0))>1||C<0||isNaN(C))&&(C=0),w=t(b.x+C*b.w)):w=t(b.x),c.strokeStyle=o.getOptionForAxis("axisLineColor","y"),c.lineWidth=o.getOptionForAxis("axisLineWidth","y"),c.beginPath(),c.moveTo(w,a(b.y)),c.lineTo(w,a(b.y+b.h)),c.closePath(),c.stroke(),2==o.numAxes()&&(c.strokeStyle=o.getOptionForAxis("axisLineColor","y2"),c.lineWidth=o.getOptionForAxis("axisLineWidth","y2"),c.beginPath(),c.moveTo(a(b.x+b.w),a(b.y)),c.lineTo(a(b.x+b.w),a(b.y+b.h)),c.closePath(),c.stroke())}if(o.getOptionForAxis("drawAxis","x")){if(m.xticks){var E=v("x");m.xticks.forEach((function(e){if(void 0!==e.label){s=b.x+e.pos*b.w,l=b.y+b.h,(i=g(e.label,"x")).style.textAlign="center",i.style.top=l+E("axisTickSize")+"px";var t=s-E("axisLabelWidth")/2;t+E("axisLabelWidth")>d&&(t=d-E("axisLabelWidth"),i.style.textAlign="right"),t<0&&(t=0,i.style.textAlign="left"),i.style.left=t+"px",i.style.width=E("axisLabelWidth")+"px",u.appendChild(i),r.xlabels_.push(i)}}))}var S,C;c.strokeStyle=o.getOptionForAxis("axisLineColor","x"),c.lineWidth=o.getOptionForAxis("axisLineWidth","x"),c.beginPath(),o.getOption("drawAxesAtZero")?(((C=o.toPercentYCoord(0,0))>1||C<0)&&(C=1),S=a(b.y+C*b.h)):S=a(b.y+b.h),c.moveTo(t(b.x),S),c.lineTo(t(b.x+b.w),S),c.closePath(),c.stroke()}c.restore()}},a.default=r,t.exports=a.default},{"../dygraph-utils":17}],22:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};n.prototype.toString=function(){return"ChartLabels Plugin"},n.prototype.activate=function(e){return{layout:this.layout,didDrawChart:this.didDrawChart}};var r=function(e){var t=document.createElement("div");return t.style.position="absolute",t.style.left=e.x+"px",t.style.top=e.y+"px",t.style.width=e.w+"px",t.style.height=e.h+"px",t};n.prototype.detachLabels_=function(){for(var e=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],t=0;t<e.length;t++){var a=e[t];a&&a.parentNode&&a.parentNode.removeChild(a)}this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};var o=function(e,t,a,n,r){var o=document.createElement("div");o.style.position="absolute",o.style.left=1==a?"0px":t.x+"px",o.style.top=t.y+"px",o.style.width=t.w+"px",o.style.height=t.h+"px",o.style.fontSize=e.getOption("yLabelWidth")-2+"px";var i=document.createElement("div");i.style.position="absolute",i.style.width=t.h+"px",i.style.height=t.w+"px",i.style.top=t.h/2-t.w/2+"px",i.style.left=t.w/2-t.h/2+"px",i.className="dygraph-label-rotate-"+(1==a?"right":"left");var s=document.createElement("div");return s.className=n,s.innerHTML=r,i.appendChild(s),o.appendChild(i),o};n.prototype.layout=function(e){this.detachLabels_();var t=e.dygraph,a=e.chart_div;if(t.getOption("title")){var n=e.reserveSpaceTop(t.getOption("titleHeight"));this.title_div_=r(n),this.title_div_.style.fontSize=t.getOption("titleHeight")-8+"px",(i=document.createElement("div")).className="dygraph-label dygraph-title",i.innerHTML=t.getOption("title"),this.title_div_.appendChild(i),a.appendChild(this.title_div_)}if(t.getOption("xlabel")){var i,s=e.reserveSpaceBottom(t.getOption("xLabelHeight"));this.xlabel_div_=r(s),this.xlabel_div_.style.fontSize=t.getOption("xLabelHeight")-2+"px",(i=document.createElement("div")).className="dygraph-label dygraph-xlabel",i.innerHTML=t.getOption("xlabel"),this.xlabel_div_.appendChild(i),a.appendChild(this.xlabel_div_)}if(t.getOption("ylabel")){var l=e.reserveSpaceLeft(0);this.ylabel_div_=o(t,l,1,"dygraph-label dygraph-ylabel",t.getOption("ylabel")),a.appendChild(this.ylabel_div_)}if(t.getOption("y2label")&&2==t.numAxes()){var c=e.reserveSpaceRight(0);this.y2label_div_=o(t,c,2,"dygraph-label dygraph-y2label",t.getOption("y2label")),a.appendChild(this.y2label_div_)}},n.prototype.didDrawChart=function(e){var t=e.dygraph;this.title_div_&&(this.title_div_.children[0].innerHTML=t.getOption("title")),this.xlabel_div_&&(this.xlabel_div_.children[0].innerHTML=t.getOption("xlabel")),this.ylabel_div_&&(this.ylabel_div_.children[0].children[0].innerHTML=t.getOption("ylabel")),this.y2label_div_&&(this.y2label_div_.children[0].children[0].innerHTML=t.getOption("y2label"))},n.prototype.clearChart=function(){},n.prototype.destroy=function(){this.detachLabels_()},a.default=n,t.exports=a.default},{}],23:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=function(){};n.prototype.toString=function(){return"Gridline Plugin"},n.prototype.activate=function(e){return{willDrawChart:this.willDrawChart}},n.prototype.willDrawChart=function(e){function t(e){return Math.round(e)+.5}function a(e){return Math.round(e)-.5}var n,r,o,i=e.dygraph,s=e.drawingContext,l=i.layout_,c=e.dygraph.plotter_.area;if(i.getOptionForAxis("drawGrid","y")){for(var u=["y","y2"],d=[],h=[],p=[],f=[],g=[],m=0;m<u.length;m++)p[m]=i.getOptionForAxis("drawGrid",u[m]),p[m]&&(d[m]=i.getOptionForAxis("gridLineColor",u[m]),h[m]=i.getOptionForAxis("gridLineWidth",u[m]),g[m]=i.getOptionForAxis("gridLinePattern",u[m]),f[m]=g[m]&&g[m].length>=2);o=l.yticks,s.save(),o.forEach((function(e){if(e.has_tick){var o=e.axis;p[o]&&(s.save(),f[o]&&s.setLineDash&&s.setLineDash(g[o]),s.strokeStyle=d[o],s.lineWidth=h[o],n=t(c.x),r=a(c.y+e.pos*c.h),s.beginPath(),s.moveTo(n,r),s.lineTo(n+c.w,r),s.stroke(),s.restore())}})),s.restore()}i.getOptionForAxis("drawGrid","x")&&(o=l.xticks,s.save(),g=i.getOptionForAxis("gridLinePattern","x"),(f=g&&g.length>=2)&&s.setLineDash&&s.setLineDash(g),s.strokeStyle=i.getOptionForAxis("gridLineColor","x"),s.lineWidth=i.getOptionForAxis("gridLineWidth","x"),o.forEach((function(e){e.has_tick&&(n=t(c.x+e.pos*c.w),r=a(c.y+c.h),s.beginPath(),s.moveTo(n,r),s.lineTo(n,c.y),s.closePath(),s.stroke())})),f&&s.setLineDash&&s.setLineDash([]),s.restore())},n.prototype.destroy=function(){},a.default=n,t.exports=a.default},{}],24:[function(e,t,a){"use strict";function n(e,t,a){if(!e||e.length<=1)return'<div class="dygraph-legend-line" style="border-bottom-color: '+t+';"></div>';var n,r,o,i,s=0,l=0,c=[];for(n=0;n<=e.length;n++)s+=e[n%e.length];if((i=Math.floor(a/(s-e[0])))>1){for(n=0;n<e.length;n++)c[n]=e[n]/a;l=c.length}else{for(i=1,n=0;n<e.length;n++)c[n]=e[n]/s;l=c.length+1}var u="";for(r=0;r<i;r++)for(n=0;n<l;n+=2)o=c[n%c.length],u+='<div class="dygraph-legend-dash" style="margin-right: '+(n<e.length?c[(n+1)%c.length]:0)+"em; padding-left: "+o+'em;"></div>';return u}Object.defineProperty(a,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("../dygraph-utils")),o=function(){this.legend_div_=null,this.is_generated_div_=!1};o.prototype.toString=function(){return"Legend Plugin"},o.prototype.activate=function(e){var t,a=e.getOption("labelsDiv");return a&&null!==a?t="string"==typeof a||a instanceof String?document.getElementById(a):a:((t=document.createElement("div")).className="dygraph-legend",e.graphDiv.appendChild(t),this.is_generated_div_=!0),this.legend_div_=t,this.one_em_width_=10,{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};var i=function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")};o.prototype.select=function(e){var t=e.selectedX,a=e.selectedPoints,n=e.selectedRow,r=e.dygraph.getOption("legend");if("never"!==r){if("follow"===r){var i=e.dygraph.plotter_.area,s=this.legend_div_.offsetWidth,l=e.dygraph.getOptionForAxis("axisLabelWidth","y"),c=a[0].x*i.w+50,u=a[0].y*i.h-50;c+s+1>i.w&&(c=c-100-s-(l-i.x)),e.dygraph.graphDiv.appendChild(this.legend_div_),this.legend_div_.style.left=l+c+"px",this.legend_div_.style.top=u+"px"}var d=o.generateLegendHTML(e.dygraph,t,a,this.one_em_width_,n);this.legend_div_.innerHTML=d,this.legend_div_.style.display=""}else this.legend_div_.style.display="none"},o.prototype.deselect=function(e){"always"!==e.dygraph.getOption("legend")&&(this.legend_div_.style.display="none");var t=function(e){var t=document.createElement("span");t.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;"),e.appendChild(t);var a=t.offsetWidth;return e.removeChild(t),a}(this.legend_div_);this.one_em_width_=t;var a=o.generateLegendHTML(e.dygraph,void 0,void 0,t,null);this.legend_div_.innerHTML=a},o.prototype.didDrawChart=function(e){this.deselect(e)},o.prototype.predraw=function(e){if(this.is_generated_div_){e.dygraph.graphDiv.appendChild(this.legend_div_);var t=e.dygraph.getArea(),a=this.legend_div_.offsetWidth;this.legend_div_.style.left=t.x+t.w-a-1+"px",this.legend_div_.style.top=t.y+"px"}},o.prototype.destroy=function(){this.legend_div_=null},o.generateLegendHTML=function(e,t,a,s,l){var c={dygraph:e,x:t,series:[]},u={},d=e.getLabels();if(d)for(var h=1;h<d.length;h++){var p=e.getPropertiesForSeries(d[h]),f={dashHTML:n(e.getOption("strokePattern",d[h]),p.color,s),label:d[h],labelHTML:i(d[h]),isVisible:p.visible,color:p.color};c.series.push(f),u[d[h]]=f}if(void 0!==t){var g=e.optionsViewForAxis_("x"),m=g("valueFormatter");c.xHTML=m.call(e,t,g,d[0],e,l,0);var b=[],v=e.numAxes();for(h=0;h<v;h++)b[h]=e.optionsViewForAxis_("y"+(h?1+h:""));var _=e.getOption("labelsShowZeroValues"),y=e.getHighlightSeries();for(h=0;h<a.length;h++){var O=a[h];if((f=u[O.name]).y=O.yval,0===O.yval&&!_||isNaN(O.canvasy))f.isVisible=!1;else{var x=b[(p=e.getPropertiesForSeries(O.name)).axis-1],w=x("valueFormatter").call(e,O.yval,x,O.name,e,l,d.indexOf(O.name));r.update(f,{yHTML:w}),O.name==y&&(f.isHighlighted=!0)}}}return(e.getOption("legendFormatter")||o.defaultFormatter).call(e,c)},o.defaultFormatter=function(e){var t=e.dygraph;if(!0!==t.getOption("showLabelsOnHighlight"))return"";var a,n=t.getOption("labelsSeparateLines");if(void 0===e.x){if("always"!=t.getOption("legend"))return"";a="";for(var r=0;r<e.series.length;r++)(o=e.series[r]).isVisible&&(""!==a&&(a+=n?"<br/>":" "),a+="<span style='font-weight: bold; color: "+o.color+";'>"+o.dashHTML+" "+o.labelHTML+"</span>");return a}for(a=e.xHTML+":",r=0;r<e.series.length;r++){var o;(o=e.series[r]).isVisible&&(n&&(a+="<br>"),a+="<span"+(o.isHighlighted?' class="highlight"':"")+"> <b><span style='color: "+o.color+";'>"+o.labelHTML+"</span></b>: "+o.yHTML+"</span>")}return a},a.default=o,t.exports=a.default},{"../dygraph-utils":17}],25:[function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(a,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(e("../dygraph-utils")),o=n(e("../dygraph-interaction-model")),i=n(e("../iframe-tarp")),s=function(){this.hasTouchInterface_="undefined"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};s.prototype.toString=function(){return"RangeSelector Plugin"},s.prototype.activate=function(e){return this.dygraph_=e,this.getOption_("showRangeSelector")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},s.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},s.prototype.getOption_=function(e,t){return this.dygraph_.getOption(e,t)},s.prototype.setDefaultOption_=function(e,t){this.dygraph_.attrs_[e]=t},s.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_("animatedZooms")&&(console.warn("Animated zooms and range selector are not compatible; disabling animatedZooms."),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},s.prototype.addToGraph_=function(){var e=this.graphDiv_=this.dygraph_.graphDiv;e.appendChild(this.bgcanvas_),e.appendChild(this.fgcanvas_),e.appendChild(this.leftZoomHandle_),e.appendChild(this.rightZoomHandle_)},s.prototype.removeFromGraph_=function(){var e=this.graphDiv_;e.removeChild(this.bgcanvas_),e.removeChild(this.fgcanvas_),e.removeChild(this.leftZoomHandle_),e.removeChild(this.rightZoomHandle_),this.graphDiv_=null},s.prototype.reserveSpace_=function(e){this.getOption_("showRangeSelector")&&e.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)},s.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},s.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},s.prototype.updateVisibility_=function(){var e=this.getOption_("showRangeSelector");if(e)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var t=this.dygraph_;setTimeout((function(){t.width_=0,t.resize()}),1)}return e},s.prototype.resize_=function(){function e(e,t,a,n){var o=n||r.getContextPixelRatio(t);e.style.top=a.y+"px",e.style.left=a.x+"px",e.width=a.w*o,e.height=a.h*o,e.style.width=a.w+"px",e.style.height=a.h+"px",1!=o&&t.scale(o,o)}var t=this.dygraph_.layout_.getPlotArea(),a=0;this.dygraph_.getOptionForAxis("drawAxis","x")&&(a=this.getOption_("xAxisHeight")||this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize")),this.canvasRect_={x:t.x,y:t.y+t.h+a+4,w:t.w,h:this.getOption_("rangeSelectorHeight")};var n=this.dygraph_.getNumericOption("pixelRatio");e(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,n),e(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,n)},s.prototype.createCanvases_=function(){this.bgcanvas_=r.createCanvas(),this.bgcanvas_.className="dygraph-rangesel-bgcanvas",this.bgcanvas_.style.position="absolute",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.getContext(this.bgcanvas_),this.fgcanvas_=r.createCanvas(),this.fgcanvas_.className="dygraph-rangesel-fgcanvas",this.fgcanvas_.style.position="absolute",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor="default",this.fgcanvas_ctx_=r.getContext(this.fgcanvas_)},s.prototype.createZoomHandles_=function(){var e=new Image;e.className="dygraph-rangesel-zoomhandle",e.style.position="absolute",e.style.zIndex=10,e.style.visibility="hidden",e.style.cursor="col-resize",e.width=9,e.height=16,e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=",this.isMobileDevice_&&(e.width*=2,e.height*=2),this.leftZoomHandle_=e,this.rightZoomHandle_=e.cloneNode(!1)},s.prototype.initInteraction_=function(){var e,t,a,n,s,l,c,u,d,h,p,f,g,m,b=this,v=document,_=0,y=null,O=!1,x=!1,w=!this.isMobileDevice_,E=new i.default;e=function(e){var t=b.dygraph_.xAxisExtremes(),a=(t[1]-t[0])/b.canvasRect_.w;return[t[0]+(e.leftHandlePos-b.canvasRect_.x)*a,t[0]+(e.rightHandlePos-b.canvasRect_.x)*a]},t=function(e){return r.cancelEvent(e),O=!0,_=e.clientX,y=e.target?e.target:e.srcElement,"mousedown"!==e.type&&"dragstart"!==e.type||(r.addEvent(v,"mousemove",a),r.addEvent(v,"mouseup",n)),b.fgcanvas_.style.cursor="col-resize",E.cover(),!0},a=function(e){if(!O)return!1;r.cancelEvent(e);var t=e.clientX-_;if(Math.abs(t)<4)return!0;_=e.clientX;var a,n=b.getZoomHandleStatus_();y==b.leftZoomHandle_?(a=n.leftHandlePos+t,a=Math.min(a,n.rightHandlePos-y.width-3),a=Math.max(a,b.canvasRect_.x)):(a=n.rightHandlePos+t,a=Math.min(a,b.canvasRect_.x+b.canvasRect_.w),a=Math.max(a,n.leftHandlePos+y.width+3));var o=y.width/2;return y.style.left=a-o+"px",b.drawInteractiveLayer_(),w&&s(),!0},n=function(e){return!!O&&(O=!1,E.uncover(),r.removeEvent(v,"mousemove",a),r.removeEvent(v,"mouseup",n),b.fgcanvas_.style.cursor="default",w||s(),!0)},s=function(){try{var t=b.getZoomHandleStatus_();if(b.isChangingRange_=!0,t.isZoomed){var a=e(t);b.dygraph_.doZoomXDates_(a[0],a[1])}else b.dygraph_.resetZoom()}finally{b.isChangingRange_=!1}},l=function(e){var t=b.leftZoomHandle_.getBoundingClientRect(),a=t.left+t.width/2,n=(t=b.rightZoomHandle_.getBoundingClientRect()).left+t.width/2;return e.clientX>a&&e.clientX<n},c=function(e){return!(x||!l(e)||!b.getZoomHandleStatus_().isZoomed)&&(r.cancelEvent(e),x=!0,_=e.clientX,"mousedown"===e.type&&(r.addEvent(v,"mousemove",u),r.addEvent(v,"mouseup",d)),!0)},u=function(e){if(!x)return!1;r.cancelEvent(e);var t=e.clientX-_;if(Math.abs(t)<4)return!0;_=e.clientX;var a=b.getZoomHandleStatus_(),n=a.leftHandlePos,o=a.rightHandlePos,i=o-n;n+t<=b.canvasRect_.x?o=(n=b.canvasRect_.x)+i:o+t>=b.canvasRect_.x+b.canvasRect_.w?n=(o=b.canvasRect_.x+b.canvasRect_.w)-i:(n+=t,o+=t);var s=b.leftZoomHandle_.width/2;return b.leftZoomHandle_.style.left=n-s+"px",b.rightZoomHandle_.style.left=o-s+"px",b.drawInteractiveLayer_(),w&&h(),!0},d=function(e){return!!x&&(x=!1,r.removeEvent(v,"mousemove",u),r.removeEvent(v,"mouseup",d),w||h(),!0)},h=function(){try{b.isChangingRange_=!0,b.dygraph_.dateWindow_=e(b.getZoomHandleStatus_()),b.dygraph_.drawGraph_(!1)}finally{b.isChangingRange_=!1}},p=function(e){if(!O&&!x){var t=l(e)?"move":"default";t!=b.fgcanvas_.style.cursor&&(b.fgcanvas_.style.cursor=t)}},f=function(e){"touchstart"==e.type&&1==e.targetTouches.length?t(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?a(e.targetTouches[0])&&r.cancelEvent(e):n(e)},g=function(e){"touchstart"==e.type&&1==e.targetTouches.length?c(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?u(e.targetTouches[0])&&r.cancelEvent(e):d(e)},m=function(e,t){for(var a=["touchstart","touchend","touchmove","touchcancel"],n=0;n<a.length;n++)b.dygraph_.addAndTrackEvent(e,a[n],t)},this.setDefaultOption_("interactionModel",o.default.dragIsPanInteractionModel),this.setDefaultOption_("panEdgeFraction",1e-4);var S=window.opera?"mousedown":"dragstart";this.dygraph_.addAndTrackEvent(this.leftZoomHandle_,S,t),this.dygraph_.addAndTrackEvent(this.rightZoomHandle_,S,t),this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousedown",c),this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousemove",p),this.hasTouchInterface_&&(m(this.leftZoomHandle_,f),m(this.rightZoomHandle_,f),m(this.fgcanvas_,g))},s.prototype.drawStaticLayer_=function(){var e=this.bgcanvas_ctx_;e.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);try{this.drawMiniPlot_()}catch(e){console.warn(e)}this.bgcanvas_ctx_.lineWidth=this.getOption_("rangeSelectorBackgroundLineWidth"),e.strokeStyle=this.getOption_("rangeSelectorBackgroundStrokeColor"),e.beginPath(),e.moveTo(.5,.5),e.lineTo(.5,this.canvasRect_.h-.5),e.lineTo(this.canvasRect_.w-.5,this.canvasRect_.h-.5),e.lineTo(this.canvasRect_.w-.5,.5),e.stroke()},s.prototype.drawMiniPlot_=function(){var e=this.getOption_("rangeSelectorPlotFillColor"),t=this.getOption_("rangeSelectorPlotFillGradientColor"),a=this.getOption_("rangeSelectorPlotStrokeColor");if(e||a){var n=this.getOption_("stepPlot"),r=this.computeCombinedSeriesAndLimits_(),o=r.yMax-r.yMin,i=this.bgcanvas_ctx_,s=this.dygraph_.xAxisExtremes(),l=Math.max(s[1]-s[0],1e-30),c=(this.canvasRect_.w-.5)/l,u=(this.canvasRect_.h-.5)/o,d=this.canvasRect_.w-.5,h=this.canvasRect_.h-.5,p=null,f=null;i.beginPath(),i.moveTo(.5,h);for(var g=0;g<r.data.length;g++){var m=r.data[g],b=null!==m[0]?(m[0]-s[0])*c:NaN,v=null!==m[1]?h-(m[1]-r.yMin)*u:NaN;(n||null===p||Math.round(b)!=Math.round(p))&&(isFinite(b)&&isFinite(v)?(null===p?i.lineTo(b,h):n&&i.lineTo(b,f),i.lineTo(b,v),p=b,f=v):(null!==p&&(n?(i.lineTo(b,f),i.lineTo(b,h)):i.lineTo(p,h)),p=f=null))}if(i.lineTo(d,h),i.closePath(),e){var _=this.bgcanvas_ctx_.createLinearGradient(0,0,0,h);t&&_.addColorStop(0,t),_.addColorStop(1,e),this.bgcanvas_ctx_.fillStyle=_,i.fill()}a&&(this.bgcanvas_ctx_.strokeStyle=a,this.bgcanvas_ctx_.lineWidth=this.getOption_("rangeSelectorPlotLineWidth"),i.stroke())}},s.prototype.computeCombinedSeriesAndLimits_=function(){var e,t=this.dygraph_,a=this.getOption_("logscale"),n=t.numColumns(),o=t.getLabels(),i=new Array(n),s=!1,l=t.visibility(),c=[];for(e=1;e<n;e++){var u=this.getOption_("showInRangeSelector",o[e]);c.push(u),null!==u&&(s=!0)}if(s)for(e=1;e<n;e++)i[e]=c[e-1];else for(e=1;e<n;e++)i[e]=l[e-1];var d=[],h=t.dataHandler_,p=t.attributes_;for(e=1;e<t.numColumns();e++)if(i[e]){var f=h.extractSeries(t.rawData_,e,p);t.rollPeriod()>1&&(f=h.rollingAverage(f,t.rollPeriod(),p)),d.push(f)}var g=[];for(e=0;e<d[0].length;e++){for(var m=0,b=0,v=0;v<d.length;v++){var _=d[v][e][1];null===_||isNaN(_)||(b++,m+=_)}g.push([d[0][e][0],m/b])}var y=Number.MAX_VALUE,O=-Number.MAX_VALUE;for(e=0;e<g.length;e++){var x=g[e][1];null!==x&&isFinite(x)&&(!a||x>0)&&(y=Math.min(y,x),O=Math.max(O,x))}if(a)for(O=r.log10(O),O+=.25*O,y=r.log10(y),e=0;e<g.length;e++)g[e][1]=r.log10(g[e][1]);else{var w,E=O-y;O+=w=E<=Number.MIN_VALUE?.25*O:.25*E,y-=w}return{data:g,yMin:y,yMax:O}},s.prototype.placeZoomHandles_=function(){var e=this.dygraph_.xAxisExtremes(),t=this.dygraph_.xAxisRange(),a=e[1]-e[0],n=Math.max(0,(t[0]-e[0])/a),r=Math.max(0,(e[1]-t[1])/a),o=this.canvasRect_.x+this.canvasRect_.w*n,i=this.canvasRect_.x+this.canvasRect_.w*(1-r),s=Math.max(this.canvasRect_.y,this.canvasRect_.y+(this.canvasRect_.h-this.leftZoomHandle_.height)/2),l=this.leftZoomHandle_.width/2;this.leftZoomHandle_.style.left=o-l+"px",this.leftZoomHandle_.style.top=s+"px",this.rightZoomHandle_.style.left=i-l+"px",this.rightZoomHandle_.style.top=this.leftZoomHandle_.style.top,this.leftZoomHandle_.style.visibility="visible",this.rightZoomHandle_.style.visibility="visible"},s.prototype.drawInteractiveLayer_=function(){var e=this.fgcanvas_ctx_;e.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);var t=this.canvasRect_.w-1,a=this.canvasRect_.h-1,n=this.getZoomHandleStatus_();if(e.strokeStyle=this.getOption_("rangeSelectorForegroundStrokeColor"),e.lineWidth=this.getOption_("rangeSelectorForegroundLineWidth"),n.isZoomed){var r=Math.max(1,n.leftHandlePos-this.canvasRect_.x),o=Math.min(t,n.rightHandlePos-this.canvasRect_.x);e.fillStyle="rgba(240, 240, 240, "+this.getOption_("rangeSelectorAlpha").toString()+")",e.fillRect(0,0,r,this.canvasRect_.h),e.fillRect(o,0,this.canvasRect_.w-o,this.canvasRect_.h),e.beginPath(),e.moveTo(1,1),e.lineTo(r,1),e.lineTo(r,a),e.lineTo(o,a),e.lineTo(o,1),e.lineTo(t,1),e.stroke()}else e.beginPath(),e.moveTo(1,1),e.lineTo(1,a),e.lineTo(t,a),e.lineTo(t,1),e.stroke()},s.prototype.getZoomHandleStatus_=function(){var e=this.leftZoomHandle_.width/2,t=parseFloat(this.leftZoomHandle_.style.left)+e,a=parseFloat(this.rightZoomHandle_.style.left)+e;return{leftHandlePos:t,rightHandlePos:a,isZoomed:t-1>this.canvasRect_.x||a+1<this.canvasRect_.x+this.canvasRect_.w}},a.default=s,t.exports=a.default},{"../dygraph-interaction-model":12,"../dygraph-utils":17,"../iframe-tarp":19}]},{},[18])(18)},55:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"c",(function(){return o})),a.d(t,"d",(function(){return i})),a.d(t,"b",(function(){return s}));var n=a(46),r=80,o=function(e,t){var a=" ",n="";return e&&"string"===typeof t.context&&(n=t.context),"string"===typeof t.plugin&&""!==t.plugin?((a=t.plugin).endsWith(".plugin")&&(a=a.substring(0,a.length-7)),"string"===typeof t.module&&""!==t.module&&(a+=":".concat(t.module)),e&&""!==n&&(a+=", ".concat(n))):e&&""!==n&&(a=n),a},i=function(e,t){var a=t.update_every,r=e.view_update_every;return a===r?"resolution ".concat(Object(n.a)(a)):"resolution ".concat(Object(n.a)(r),", collected every ").concat(Object(n.a)(a))},s=function(e){var t,a=e.allDimensions,n=e.selectedDimensions,r=e.clickedDimensionName,o=e.isModifierKeyPressed,i=0===n.length?a:n,s=i.includes(r);return(t=o||!(s&&i.length>1)&&s?s?i.filter((function(e){return e!==r})):i.concat(r):[r]).length===a.length?[]:t}},56:function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"e",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return h})),a.d(t,"d",(function(){return p}));var n=a(5),r=a(286),o=a(288),i=a(502),s=/[&;]/,l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:decodeURIComponent(window.location.hash.substr(1));if(0===e.length)return{};var t=e.split(s),a=t.reduce((function(e,t){var a=t.split("="),r=Object(n.a)(a,2),o=r[0],i=r[1];return e[o]=i,e}),{});return a},c=function(e){var t=Object.entries(e);return 0===t.length?"":t.map((function(e){var t=Object(n.a)(e,2),a=t[0],r=t[1];return"".concat(a,"=").concat(encodeURIComponent(r))})).join(";")},u=(Object(o.a)(l,c),function(e){var t=l(),a=Object(i.a)(e,t);window.history.replaceState(window.history.state,"","#".concat(c(a)))}),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1));return l(t)[e]},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1));return void 0!==l(t)[e]},p=function(e){window.history.replaceState(window.history.state,"","#".concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1)),a=Object(r.a)(e,l(t));return c(a)}(e)))}},73:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return i}));var n=a(5),r=a(0),o=function(e,t){var a="string"===typeof e?document.getElementById(e):e;a.contentWindow&&a.contentWindow.postMessage(t,"*")},i=function(e,t,a){var o=Object(r.useState)(a),i=Object(n.a)(o,2),s=i[0],l=i[1],c=Object(r.useCallback)((function(a){var n=a.data;n.type===e&&(l(n.payload),t&&t(n.payload))}),[t,e]),u=Object(r.useCallback)((function(){l(a)}),[a]);return Object(r.useEffect)((function(){return window.addEventListener("message",c),function(){window.removeEventListener("message",c)}}),[c,e]),[s,u]}},74:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){return o}));var n="true",r=!1,o=!1},75:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n="dashboard"},78:function(e,t,a){"use strict";var n=a(5),r=a(0),o=a(27),i=a(17),s=a(501),l=a(44),c=a(9),u=a(28),d=Object(i.a)(c.y,(function(e){return e.registryServer===u.b})),h=Object(i.a)((function(e){return e.dashboard}),(function(e){return e.offline}));t.a=function(e){var t=e.children,a=e.utmParameters,i=Object(s.a)("has-sign-in-history"),u=Object(n.a)(i,1)[0],p=Object(o.e)((function(e){return Object(c.C)(a)(e)})),f=Object(o.e)(d),g=Object(o.e)(h),m=Object(o.d)(),b=Object(r.useMemo)((function(){var e=window.location.href,t=encodeURIComponent(e);return"".concat(p,"&redirect_uri=").concat(t)}),[p]),v=Object(r.useCallback)((function(){return m(Object(l.d)({signInLinkHref:b}))}),[b]);return Object(r.useMemo)((function(){return"function"===typeof t?t({isRegistry:f,link:b,onSignIn:v,offline:g,hasSignedInBefore:u}):t}),[t,f,b,v,g,u])}},8:function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return o}));a(0);var n=a(27),r=n.e,o=n.d},89: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})}))})}},9:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"h",(function(){return h})),a.d(t,"g",(function(){return p})),a.d(t,"o",(function(){return f})),a.d(t,"p",(function(){return g})),a.d(t,"m",(function(){return m})),a.d(t,"i",(function(){return b})),a.d(t,"l",(function(){return v})),a.d(t,"s",(function(){return _})),a.d(t,"n",(function(){return y})),a.d(t,"E",(function(){return O})),a.d(t,"y",(function(){return x})),a.d(t,"f",(function(){return w})),a.d(t,"Q",(function(){return E})),a.d(t,"C",(function(){return S})),a.d(t,"v",(function(){return C})),a.d(t,"u",(function(){return A})),a.d(t,"q",(function(){return k})),a.d(t,"k",(function(){return j})),a.d(t,"w",(function(){return T})),a.d(t,"r",(function(){return D})),a.d(t,"c",(function(){return P})),a.d(t,"d",(function(){return M})),a.d(t,"F",(function(){return L})),a.d(t,"G",(function(){return I})),a.d(t,"b",(function(){return R})),a.d(t,"j",(function(){return F})),a.d(t,"H",(function(){return B})),a.d(t,"A",(function(){return H})),a.d(t,"t",(function(){return z})),a.d(t,"J",(function(){return U})),a.d(t,"I",(function(){return G})),a.d(t,"L",(function(){return W})),a.d(t,"B",(function(){return V})),a.d(t,"x",(function(){return Y})),a.d(t,"D",(function(){return X})),a.d(t,"O",(function(){return K})),a.d(t,"K",(function(){return Z})),a.d(t,"z",(function(){return q})),a.d(t,"M",(function(){return $})),a.d(t,"N",(function(){return J})),a.d(t,"e",(function(){return ee})),a.d(t,"P",(function(){return te}));var n=a(49),r=a(212),o=a(17),i=a(28),s=a(36),l=a(155),c=a(26),u=function(e){return function(t){var a=Object(l.a)(e),n=t[c.e].commonColorsKeys[a];return n&&n.assigned}},d=function(e){return e.global},h=Object(o.a)(d,(function(e,t){return t}),(function(e,t){return e.commonMin[t]})),p=Object(o.a)(d,(function(e,t){return t}),(function(e,t){return e.commonMax[t]})),f=Object(o.a)(d,Object(n.a)("hoveredX")),g=Object(o.a)(d,Object(n.a)("currentSelectionMasterId")),m=Object(o.a)(d,Object(n.a)("globalPanAndZoom")),b=Object(o.a)(d,Object(n.a)("defaultAfter")),v=Object(o.a)(d,Object(n.a)("globalChartUnderlay")),_=Object(o.a)(d,Object(n.a)("hasWindowFocus")),y=Object(o.a)(d,Object(n.a)("globalPause")),O=Object(o.a)(d,Object(n.a)("snapshot")),x=Object(o.a)(d,Object(n.a)("registry")),w=Object(o.a)(x,Object(n.a)("cloudBaseURL")),E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,a){return t+"&utm_".concat(a,"=").concat(e[a])}),"")},S=function(e){return Object(o.a)(x,w,(function(t,a){var n=encodeURIComponent(t.hostname),r=encodeURIComponent(Object(s.a)(window.location.origin+window.location.pathname));return"".concat(a,"/sign-in?id=").concat(t.machineGuid,"&name=").concat(n,"&origin=").concat(r).concat(i.g).concat(E(e))}))},C=(Object(o.a)(x,Object(n.a)("isFetchingHello")),Object(o.a)(x,(function(e){var t=e.registryServer;return t&&"https://registry.my-netdata.io"!==t}))),A=Object(o.a)(x,(function(e){return e.isCloudEnabled&&!e.isHelloCallError})),k=Object(o.a)(x,Object(n.a)("hasFetchedInfo")),j=Object(o.a)(x,Object(n.a)("fullInfoPayload")),T=Object(o.a)(j,(function(e){return e["agent-claimed"]&&!e["aclk-ng-new-cloud-protocol"]})),D=Object(o.a)(d,Object(r.a)(["alarms","hasStartedAlarms"])),P=Object(o.a)(d,(function(e){return e.alarms.activeAlarms})),M=Object(o.a)(d,(function(e){return e.alarm})),L=Object(o.a)(d,Object(n.a)("spacePanelIsActive")),I=Object(o.a)(d,Object(n.a)("spacePanelTransitionEndIsActive")),N=Object(o.a)(d,(function(e){return e.options})),R=function(e){return Object(o.a)(N,(function(t){return t[e]}))},F=R("destroy_on_hide"),B=R("stop_updates_when_focus_is_lost"),H=R("eliminate_zero_dimensions"),z=R("async_on_scroll"),U=(R("parallel_refresher"),R("concurrent_refreshes"),R("sync_selection")),G=R("sync_pan_and_zoom"),W=R("theme"),V=R("show_help"),Y=R("pan_and_zoom_data_padding"),X=R("smooth_plot"),K=R("units"),Z=R("temperature"),q=R("seconds_as_time"),$=R("timezone"),J=R("utcOffset"),Q=(R("user_set_server_timezone"),Object(o.a)(d,(function(e){return e.chartsMetadata.data}))),ee=Object(o.a)(Q,(function(e,t){return t.chartId}),(function(e,t){return null===e||void 0===e?void 0:e.charts[t]})),te=Object(o.a)(d,(function(e){return e.userNodeAccess}))},97:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"c",(function(){return u})),a.d(t,"e",(function(){return d})),a.d(t,"d",(function(){return h})),a.d(t,"b",(function(){return p}));var n,r=a(14),o=a(218),i=a(495),s=a(104),l="sync_pan_and_zoom",c=(n={},Object(r.a)(n,"stop_updates_when_focus_is_lost",!0),Object(r.a)(n,"eliminate_zero_dimensions",!0),Object(r.a)(n,"destroy_on_hide",!1),Object(r.a)(n,"async_on_scroll",!1),Object(r.a)(n,"parallel_refresher",!0),Object(r.a)(n,"concurrent_refreshes",!0),Object(r.a)(n,"sync_selection",!0),Object(r.a)(n,l,!0),Object(r.a)(n,"legend_right",!1),Object(r.a)(n,"theme","slate"),Object(r.a)(n,"show_help",Boolean(window.netdataShowHelp)&&!window.netdataNoBootstrap),Object(r.a)(n,"pan_and_zoom_data_padding",!0),Object(r.a)(n,"smooth_plot",!0),Object(r.a)(n,"units","auto"),Object(r.a)(n,"temperature","celsius"),Object(r.a)(n,"seconds_as_time",!0),Object(r.a)(n,"timezone","default"),Object(r.a)(n,"user_set_server_timezone","default"),Object(r.a)(n,"utcOffset",0),n),u=function(){var e=Object.keys(localStorage).filter((function(e){return e.startsWith("options.")||"netdataTheme"===e})).map((function(e){return Object(r.a)({},function(e){return e.replace(/^options\./,"").replace("netdataTheme","theme")}(e),function(e){var t,a=localStorage.getItem(e);if(null===a||"undefined"===a)return localStorage.removeItem(e),null;try{t=JSON.parse(a)}catch(n){return"netdataTheme"===e&&a?a:(console.log('localStorage: failed to read "'.concat(e,'", using default')),localStorage.removeItem(e),null)}return t}(e))})).filter((function(e){return null!==Object.values(e)[0]})),t=Object(o.a)(e);return Object(i.a)(c,t)},d=u(),h=d.legend_right,p=function(){Object.keys(localStorage).forEach((function(e){(e.startsWith(s.a)||e.startsWith("options."))&&localStorage.removeItem(e)}))}},98: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")}()}},[[300,1,2]]]); +//# sourceMappingURL=main.485cc284.chunk.js.map
\ No newline at end of file diff --git a/web/gui/dashboard/static/js/main.e3f3d31b.chunk.js.LICENSE b/web/gui/dashboard/static/js/main.485cc284.chunk.js.LICENSE index bf657eca5..bf657eca5 100644 --- a/web/gui/dashboard/static/js/main.e3f3d31b.chunk.js.LICENSE +++ b/web/gui/dashboard/static/js/main.485cc284.chunk.js.LICENSE diff --git a/web/gui/dashboard/static/js/main.485cc284.chunk.js.map b/web/gui/dashboard/static/js/main.485cc284.chunk.js.map new file mode 100644 index 000000000..9d2a87633 --- /dev/null +++ b/web/gui/dashboard/static/js/main.485cc284.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["utils/units-conversion.ts","domains/chart/components/resize-handler.tsx","components/button/button.tsx","domains/chart/components/toolbox-button.tsx","domains/global/actions.ts","hooks/use-user-node-access.ts","components/anchor/index.tsx","utils/index.ts","utils/name-2-id.ts","domains/global/reducer.ts","components/icon.tsx","domains/chart/reducer.ts","domains/chart/utils/transformDataAttributes.ts","domains/chart/actions.ts","components/header/constants.js","main.js","components/header/ACLK/use-cloud-connection-status.tsx","components/header/ACLK/cloud-connection-status-modal.tsx","components/header/ACLK/cloud-connection-status.tsx","domains/global/constants.ts","vendor/d3pie-0.2.1-netdata-3.js","utils/utils.ts","components/header/ACLK/index.ts","utils/server-detection.ts","domains/chart/selectors.ts","utils/date-time.js","domains/dashboard/actions.ts","domains/chart/constants.ts","domains/chart/utils/seconds4human.ts","domains/dashboard/reducer.ts","store/root-reducer.ts","utils/api.ts","utils/netdata-sdk/axios-instance.ts","utils/netdata-sdk/metrics-stream.ts","utils/fill-missing-data.ts","components/ui-notification/styled.ts","components/ui-notification/ui-notification.tsx","components/notifications/styled.tsx","components/notifications/notifications.tsx","domains/dashboard/utils/parse-url.ts","domains/chart/sagas.ts","components/space-panel/settings.ts","domains/global/alarms-sagas.ts","domains/global/utils.ts","domains/global/sagas.ts","domains/dashboard/sagas.ts","store/root-saga.ts","store/store.ts","domains/chart/utils/jquery-loader.ts","utils/css-loader.ts","domains/chart/utils/chartLibrariesSettings.ts","domains/chart/utils/get-chart-url-options.ts","utils/biggest-interval-number.ts","domains/chart/components/loader.tsx","domains/chart/utils/get-pan-and-zoom-step.ts","utils/safe-equal-check.ts","domains/chart/utils/formatters.ts","utils/color-hex-2-rgb.ts","domains/chart/components/chart-legend-bottom.styled.ts","domains/chart/components/legendText.js","domains/chart/components/chart-legend-right.tsx","domains/chart/components/chart-legend-bottom.tsx","domains/chart/components/chart-legend.tsx","domains/chart/components/legend-toolbox.tsx","domains/chart/components/lib-charts/dygraph/utils.ts","domains/chart/hooks/use-proceeded-chart.ts","domains/chart/hooks/useDygraphBadge.js","domains/chart/components/lib-charts/proceeded-chart-disclaimer.tsx","domains/chart/components/lib-charts/alarmBadge.js","domains/chart/components/lib-charts/neutralPill.js","domains/chart/components/lib-charts/dygraph-chart.tsx","utils/debounce.ts","domains/chart/components/lib-charts/easy-pie-chart.tsx","domains/chart/components/lib-charts/gauge-chart.tsx","domains/chart/utils/color-luminance.ts","domains/chart/components/lib-charts/sparkline-chart.tsx","domains/chart/utils/d3-loader.ts","domains/chart/utils/google-visualization-loader.ts","domains/chart/components/lib-charts/d3pie-chart.tsx","domains/chart/components/lib-charts/peity-chart.tsx","domains/chart/components/lib-charts/google-chart.tsx","domains/chart/components/lib-charts/text-only.tsx","domains/chart/components/lib-charts/group-box-chart/utilities.ts","domains/chart/components/lib-charts/group-box-chart/events.ts","domains/chart/components/lib-charts/group-box-chart/drawBoxes.ts","domains/chart/components/lib-charts/group-box-chart/getAlign.ts","domains/chart/components/lib-charts/group-box-chart/groupBox.tsx","domains/chart/components/lib-charts/group-box-chart/groupBoxes.tsx","domains/chart/components/lib-charts/group-box-chart/legend.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/getLabel.ts","domains/chart/components/lib-charts/group-box-chart/kubernetes/separator.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/header.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/tabs.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/section.tsx","domains/chart/utils/get-portal-node-styles.ts","hooks/use-common-intersection.ts","domains/chart/components/invisible-searchable-text.tsx","domains/chart/components/disable-out-of-view.tsx","domains/chart/components/chart-container/chart-container.tsx","domains/dashboard/utils/netdata-dashboard.ts","domains/chart/components/lib-charts/group-box-chart/kubernetes/chartOverview.tsx","domains/dashboard/components/migration-modal/use-migration-modal.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/chart.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/item.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/dateSection.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/metrics.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/context.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/list.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/popover.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/index.tsx","domains/chart/components/lib-charts/group-box-chart/kubernetes/transform.ts","domains/chart/components/abstract-chart.tsx","hooks/use-show-value-outside.ts","domains/chart/components/chart.tsx","domains/chart/components/chart-dropdown/styled.ts","domains/chart/components/chart-dropdown/chart-dropdown.tsx","domains/chart/components/chart-spinner/styled.ts","domains/chart/components/chart-spinner/chart-spinner.tsx","domains/chart/components/chart-with-loader/styled.ts","styles/z-index.js","domains/chart/components/chart-with-loader/chart-with-loader.tsx","domains/chart/hooks/use-fetch-new-data-clock.ts","domains/chart/utils/get-chart-pixels-per-point.ts","domains/dashboard/selectors.ts","domains/chart/components/snapshot-loader.tsx","domains/chart/components/portals.tsx","hooks/use-http.ts","domains/dashboard/components/modal-portal.tsx","domains/dashboard/components/print-modal/print-modal.tsx","domains/dashboard/components/sidebar-social-media/styled.ts","domains/dashboard/components/sidebar-social-media/sidebar-social-media.tsx","domains/dashboard/components/sidebar-social-media-portal/sidebar-social-media-portal.tsx","components/notifications-container/notifications-container.tsx","components/header/item.js","components/header/node/index.js","components/tooltips/customTooltip.js","components/tooltips/getContent.js","components/tooltips/index.js","components/header/options/index.js","components/header/protoBuf/dropdown.js","components/header/protoBuf/index.js","components/app-header/components/versionControl/index.js","components/header/version.js","hooks/useToggle/index.js","hooks/useLocalStorage/index.js","components/mdx-components/dropdown/styled.js","components/date-picker/styled.js","components/mdx-components/dropdown/dropdown.js","components/date-picker/timePeriod.js","components/date-picker/utils.js","components/date-picker/timePeriods.js","components/date-picker/customTimePeriod.js","components/datePicker/datePickerLib.js","components/datePicker/styled.js","components/date-picker/datePickerInput.js","components/date-picker/useLocaleDate.js","components/date-picker/useConvertedDate.js","components/date-picker/datePickerWrapper.js","components/date-picker/periodIndication.js","components/date-picker/accessorElement/utils.js","components/date-picker/accessorElement/container.js","components/date-picker/accessorElement/dateBox.js","components/date-picker/accessorElement/durationBox.js","components/date-picker/accessorElement/index.js","components/date-picker/datePickerDrop.js","components/date-picker/reduxDatePickerContainer.js","components/header/globalControls/container.js","components/header/globalControls/playPausePill/styledPill.js","components/header/globalControls/playPausePill/index.js","components/menus/item.js","components/menus/list.js","components/header/globalControls/playOptions/playOptionsTooltip.js","components/menus/styled.js","components/header/globalControls/playOptions/index.js","components/header/globalControls/index.js","components/header/pill/styled.js","components/header/pill/index.js","components/header/alarms.js","components/header/news/index.js","components/header/timezone/dropdown.js","components/header/timezone/search/searchInput.js","components/header/timezone/search/index.js","components/header/timezone/container.js","components/header/timezone/wrapper.js","components/header/timezone/offsetItem.js","components/header/timezone/timezones.js","components/header/timezone/utils.js","components/header/timezone/index.js","components/auth/signIn/iframe.js","components/auth/signIn/useCheckSignInStatus.js","components/header/signIn/index.js","components/header/index.js","components/sidebar/spaces/expandButton.js","components/auth/signOut/index.js","components/sidebar/spaces/userSettings.js","components/sidebar/spaces/spacesSkeleton.js","components/sidebar/spaces/spacesIframe.js","components/sidebar/spaces/index.js","domains/dashboard/utils/sorting.ts","components/sidebar/space/nodes.js","components/sidebar/space/replicatedNodes/anchor.js","components/sidebar/space/replicatedNodes/node.js","components/sidebar/space/replicatedNodes/index.js","components/sidebar/space/spacePanelIframe.js","components/sidebar/space/prompts/signIn/promptContent.js","components/sidebar/space/prompts/signIn/index.js","components/sidebar/space/prompts/offline/noNetwork.js","components/sidebar/space/prompts/offline/index.js","components/sidebar/space/index.js","components/sidebar/index.js","components/layout/index.js","utils/map-theme.ts","domains/dashboard/components/migration-modal/migration-modal.js","domains/dashboard/components/migration-manager/migration-manager.tsx","App.tsx","hooks/use-registry.ts","hooks/use-alarms.ts","hooks/use-info.ts","domains/dashboard/hooks/use-charts-metadata.ts","domains/dashboard/hooks/useAlarmFromUrl.js","index.tsx","../public/lib/dygraph-c91c859.min.js","domains/chart/utils/legend-utils.ts","utils/hash-utils.ts","utils/post-message.ts","utils/env.ts","domains/dashboard/constants.ts","components/auth/signIn/index.js","store/redux-separate-context.ts","utils/createRequestAction.ts","domains/global/selectors.ts","domains/global/options.ts","utils/is-demo.ts"],"names":["currentTemperatureSetting","currentSecondsAsTimeSetting","zeropad","x","toString","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","convertibleUnits","Celsius","Fahrenheit","check","convert","value","celsius","fahrenheit","seconds","time","unitsConversionCreator","seconds2time","milliseconds","max","tms","Math","round","millisecondsRet","floor","millisecondsReturn","minutes","identity","keys","latest","globalReset","this","secondsReturn","abs","days","hours","get","uuid","min","units","desiredUnits","commonUnitsName","switchUnitsCallback","temperatureSetting","secondsAsTimeSetting","undefined","newConvertFunction","tunits","tdivider","scalableUnitsGroup","Object","forEach","unit","unitDivider","commonUnitsKey","t","divider","commonUnits","console","log","LOCALSTORAGE_HEIGHT_KEY_PREFIX_OLD","LOCALSTORAGE_HEIGHT_KEY_PREFIX","ResizeHandler","chartContainerElement","chartUuid","heightId","isLegendOnBottom","useState","clientHeight","resizeHeight","setResizeHeight","dispatch","useDispatch","useEffect","setResizeHeightAction","id","handleResize","useCallback","event","preventDefault","intialHeight","eventStartHeight","type","touches","clientY","setHeight","currentHeight","nextHeight","style","height","heightForPersistance","LEGEND_BOTTOM_SINGLE_LINE_HEIGHT","localStorage","setItem","onMouseMove","e","onTouchMove","document","addEventListener","onTouchEnd","removeEventListener","onMouseEnd","className","onDoubleClick","stopPropagation","onMouseDown","onTouchStart","iconType","popoverTitle","popoverContent","Button","React","ref","children","rest","classNames","ToolboxButton","onClick","buttonRef","useRef","showHelp","useSelector","selectShowHelp","current","window","$","popover","container","animation","html","trigger","placement","delay","show","NETDATA","options","show_help_delay_show_ms","hide","show_help_delay_hide_ms","title","content","requestCommonColorsAction","createAction","storeKey","setCommonMinAction","setCommonMaxAction","setGlobalSelectionAction","setGlobalPanAndZoomAction","resetGlobalPanAndZoomAction","setDefaultAfterAction","resetDefaultAfterAction","setGlobalChartUnderlayAction","centerAroundHighlightAction","clearHighlightAction","windowFocusChangeAction","fetchHelloAction","createRequestAction","updatePersonUrlsAction","accessRegistrySuccessAction","startAlarmsAction","fetchAllAlarmsAction","updateActiveAlarmsAction","setOptionAction","resetOptionsAction","loadSnapshotAction","chartsMetadataRequestSuccess","setSpacePanelStatusAction","setSpacePanelTransitionEndAction","setAlarmAction","resetRegistry","setGlobalPauseAction","resetGlobalPauseAction","setUTCOffset","setUserNodeAccess","useRequestRefreshOfAccessMessage","sendToChildIframe","SIGN_IN_IFRAME_ID","payload","useUserNodeAccessMessage","useListenToPostMessage","message","BaseAnchor","styled","getColor","Anchor","Component","Text","as","name2id","s","replace","initialState","commonColorsKeys","commonMin","commonMax","currentSelectionMasterId","globalPanAndZoom","defaultAfter","isMainJs","getInitialAfterFromWindow","globalChartUnderlay","hoveredX","hasWindowFocus","hasFocus","globalPause","spacePanelIsActive","spacePanelTransitionEndIsActive","registry","cloudBaseURL","hasFetchedInfo","hasFetchedHello","isHelloCallError","hostname","isCloudEnabled","isCloudAvailable","isAgentClaimed","isACLKAvailable","hasStartedInfo","isFetchingHello","fullInfoPayload","machineGuid","personGuid","registryMachines","registryMachinesArray","registryServer","snapshot","alarms","activeAlarms","hasStartedAlarms","alarm","chartsMetadata","isFetching","isFetchingError","data","optionsMergedWithLocalStorage","userNodeAccess","globalReducer","createReducer","getKeyForCommonColorsState","colorsAttribute","commonColorsAttribute","chartContext","hasCustomColors","length","hasLastOnly","array","last","createCommonColorsKeysSubstate","custom","split","init","shouldCopyTheme","assigned","available","themes","colors","on","state","dimensionNames","keyName","subState","currentlyAssignedNr","requestedDimensionsAssigned","mergeAll","filter","dimensionName","map","i","commonMinKey","charts","currentExtreme","values","commonMaxKey","isActive","after","before","masterID","warn","highlightMargin","resetPanAndZoom","hasFocusNow","forcePlay","stop_updates_when_focus_is_lost","utcOffset","request","success","failure","CLOUD_BASE_URL_DISABLED","fetchInfoAction","key","clearLocalStorage","getOptionsMergedWithLocalStorage","parsedData","dataKey","uncompressed","uncompress","JSON","parse","reduce","acc","obj","typeToClassName","left","reset","right","zoomIn","zoomOut","resize","lineChart","areaChart","noChart","loading","noData","Icon","initialSingleState","chartData","chartId","chartMetadata","chartPanAndZoom","fetchDataParams","isRemotelyControlled","viewRange","isFetchingData","isFetchDataFailure","isFetchDetailsFailure","isFetchingDetails","snapshotDataIsFetching","snapshotDataIsError","snapshotData","chartReducer","getSubstate","fetchDataAction","chart","fetchDataCancelAction","substate","useNewKeysOnlyIfDifferent","fetchDataForSnapshotAction","snapshotExportResetAction","pick","fetchChartAction","setChartPanAndZoomAction","shouldForceTimeRange","resetChartPanAndZoomAction","SYNC_PAN_AND_ZOOM","assoc","clearChartStateAction","omit","getDataAttribute","element","defaultValue","hasAttribute","getAttribute","test","getAttributesStatic","node","mapObjIndexed","attribute","getDataAttributeBoolean","host","httpMethod","chartLibrary","chartDefaults","library","width","legend","legendPosition","unitsCommon","unitsDesired","aggrMethod","labels","postGroupBy","postAggregationMethod","dimensionsAggrMethod","aggrGroups","selectedChart","filteredRows","groupBy","nodeIDs","commonColors","decimalDigits","dimensions","selectedDimensions","forceTimeWindow","appendOptions","gtime","method","overrideOptions","pixelsPerPoint","points","hideResizeHandler","detectResize","dygraphType","dygraphValueRange","dygraphTheme","dygraphSmooth","dygraphColors","dygraphRightGap","dygraphShowRangeSelector","dygraphShowRoller","dygraphTitle","dygraphTitleHeight","dygraphLegend","dygraphLabelsDiv","dygraphLabelsSeparateLine","dygraphIncludeZero","dygraphShowZeroValues","dygraphShowLabelsOnHighLight","dygraphHideOverlayOnMouseOut","dygraphXRangePad","dygraphYRangePad","dygraphYLabelWidth","dygraphStrokeWidth","dygraphStrokePattern","dygraphDrawPoints","dygraphDrawGapEdgePoints","dygraphConnectSeparatedPoints","dygraphPointSize","dygraphStepPlot","dygraphStrokeBorderColor","dygraphStrokeBorderWidth","dygraphFillGraph","dygraphFillAlpha","dygraphStackedGraph","dygraphStackedGraphNanFill","dygraphAxisLabelFontSize","dygraphAxisLineColor","dygraphAxisLineWidth","dygraphDrawGrid","dygraphGridLinePattern","dygraphGridLineWidth","dygraphGridLineColor","dygraphMaxNumberWidth","dygraphSigFigs","dygraphDigitsAfterDecimal","dygraphHighlighCircleSize","dygraphHighlightSeriesOpts","dygraphHighlightSeriesBackgroundAlpha","dygraphXPixelsPerLabel","dygraphXAxisLabelWidth","dygraphDrawXAxis","dygraphYPixelsPerLabel","dygraphYAxisLabelWidth","dygraphDrawYAxis","dygraphDrawAxis","easyPieChartMinValue","easyPieChartMaxValue","easyPieChartBarColor","easyPieChartTrackColor","easyPieChartScaleColor","easyPieChartScaleLength","easyPieChartLineCap","easyPieChartLineWidth","easyPieChartTrackWidth","easyPieChartSize","easyPieChartRotate","easyPieChartAnimate","easyPieChartEasing","gaugeMinValue","gaugeMaxValue","gaugePointerColor","gaugeStrokeColor","gaugeStartColor","gaugeStopColor","gaugeGenerateGradient","sparklineType","sparklineLineColor","sparklineFillColor","sparklineChartRangeMin","sparklineChartRangeMax","sparklineComposite","sparklineEnableTagOptions","sparklineTagOptionPrefix","sparklineTagValuesAttribute","sparklineDisableHiddenCheck","sparklineDefaultPixelsPerValue","sparklineSpotColor","sparklineMinSpotColor","sparklineMaxSpotColor","sparklineSpotRadius","sparklineValueSpots","sparklineHighlightSpotColor","sparklineHighlightLineColor","sparklineLineWidth","sparklineNormalRangeMin","sparklineNormalRangeMax","sparklineDrawNormalOnTop","sparklineXvalues","sparklineChartRangeClip","sparklineChartRangeMinX","sparklineChartRangeMaxX","sparklineDisableInteraction","sparklineDisableTooltips","sparklineOnHover","sparklineDisableHighlight","sparklineHighlightLighten","sparklineHighlightColor","sparklineTooltipContainer","sparklineTooltipClassname","sparklineTooltipFormat","sparklineTooltipPrefix","sparklineTooltipSuffix","sparklineTooltipSkipNull","sparklineTooltipValueLookups","sparklineTooltipFormatFieldlist","sparklineTooltipFormatFieldlistKey","sparklineNumberFormatter","sparklineNumberDigitGroupSep","sparklineNumberDecimalMark","sparklineNumberDigitGroupCount","sparklineAnimatedZooms","d3pieTitle","d3pieSubtitle","d3pieFooter","d3pieTitleColor","d3pieTitleFontsize","d3pieTitleFontweight","d3pieTitleFont","d3PieSubtitleColor","d3PieSubtitleFontsize","d3PieSubtitleFontweight","d3PieSubtitleFont","d3PieFooterColor","d3PieFooterFontsize","d3PieFooterFontweight","d3PieFooterFont","d3PieFooterLocation","d3PiePieinnerradius","d3PiePieouterradius","d3PieSortorder","d3PieSmallsegmentgroupingEnabled","d3PieSmallsegmentgroupingValue","d3PieSmallsegmentgroupingValuetype","d3PieSmallsegmentgroupingLabel","d3PieSmallsegmentgroupingColor","d3PieLabelsOuterFormat","d3PieLabelsOuterHidewhenlessthanpercentage","d3PieLabelsOuterPiedistance","d3PieLabelsInnerFormat","d3PieLabelsInnerHidewhenlessthanpercentage","d3PieLabelsMainLabelColor","d3PieLabelsMainLabelFont","d3PieLabelsMainLabelFontsize","d3PieLabelsMainLabelFontweight","d3PieLabelsPercentageColor","d3PieLabelsPercentageFont","d3PieLabelsPercentageFontsize","d3PieLabelsPercentageFontweight","d3PieLabelsValueColor","d3PieLabelsValueFont","d3PieLabelsValueFontsize","d3PieLabelsValueFontweight","d3PieLabelsLinesEnabled","d3PieLabelsLinesStyle","d3PieLabelsLinesColor","d3PieLabelsTruncationEnabled","d3PieLabelsTruncationTruncatelength","d3PieMiscColorsSegmentstroke","d3PieMiscGradientEnabled","d3PieMiscColorsPercentage","d3PieMiscGradientColor","d3PieCssprefix","peityStrokeWidth","textOnlyDecimalPlaces","textOnlyPrefix","textOnlySuffix","getAttributes","attributesStatic","showValueOf","showValueOfAttribues","Array","from","attributes","name","startsWith","merged","isEmpty","getAttributesDynamic","defaultAttributes","initialLegendRight","localeDateString","localeTimeString","updateLocaleFunctions","newLocaleDateString","newLocaleTimeString","netdataShowAlarms","netdataRegistry","netdataServer","netdataServerStatic","netdataCheckXSS","reduxStore","escapeUserInputHTML","setOption","getFromRegistry","prop","selectRegistry","getState","verifyURL","urlOptions","hash","theme","help","mode","update_always","pan_and_zoom","server","getHashParam","highlight","highlight_after","highlight_before","nowelcome","show_alarms","family","utc","hasProperty","property","genHash","forReload","parseHash","variables","location","len","p","decodeURIComponent","booleans","numeric","parseInt","origin","pathname","welcome","Date","now","hashUpdate","history","replaceState","netdataPanAndZoomCallback","status","netdataSnapshotData","updateUtcParam","netdataHighlightCallback","d1","d2","getElementById","innerHTML","seconds4human","tooltip","clearHighlight","showHighlight","localStorageTested","localStorageTest","Storage","removeItem","loadLocalStorage","ret","getItem","error","saveLocalStorage","getTheme","def","setTheme","netdataTheme","updateTheme","netdataShowHelp","naturalSortChunkify","j","tz","y","n","charAt","charCodeAt","m","naturalSortCompare","a","b","aa","toLowerCase","bb","c","Number","d","saveTextToClient","filename","blob","Blob","url","URL","createObjectURL","link","createElement","setAttribute","el","appendChild","setTimeout","removeChild","revokeObjectURL","click","saveObjectToClient","stringify","netdataURL","indexOf","substring","netdataReload","reload","gotoHostedModalHandler","gotoServerValidateRemaining","gotoServerMiddleClick","gotoServerStop","gotoServerValidateUrl","guid","penalty","finalURL","registryHello","machine_guid","open","modal","gotoServerModalHandler","checked","alternateUrls","count","registrySearch","urls","switchRegistryModalHandler","notifyForSwitchRegistry","newPersonGuid","ajax","encodeURIComponent","serverDefault","async","cache","headers","xhrFields","withCredentials","done","xss","checkAlways","fail","deleteRegistryGuid","deleteRegistryUrl","deleteRegistryModalHandler","notifyForDeleteRegistry","responseEl","registryDelete","result","menus","submenu_names","version","release_channel","hosts","duration","update_every","chartsPerRow","chartsHeight","total","prioritySort","priority","sortObjectByPriority","object","idx","sorted","hasOwnProperty","push","sort","scrollToId","offset","animate","scrollTop","top","customDashboard","menu","submenu","context","netdataDashboard","sparklines_registry","os","sparkline","prefix","dimension","suffix","gaugeChart","anyAttribute","attr","menuTitle","menu_pattern","slice","menuIcon","menuInfo","menuHeight","submenuTitle","submenuInfo","submenuHeight","relative","contextInfo","contextValueRange","valueRange","contextHeight","contextDecimalDigits","enrichChartData","parts","tmp","match","endsWith","lastIndexOf","headMain","head","generateHeadCharts","hcharts","hi","hlen","renderPage","div","pcent_width","sidebar","mainhead","main","hasChartsOnBottom","chartAdditionalHeight","menuid","icon","info","shtml","mhead","sub","submenus","si","slen","submenuid","chtml","ci","clen","chartHeight","chartCommonMax","isMemoryModeDbEngine","memory_mode","dimensions_count","toLocaleString","charts_count","alarms_count","printPage","finalizePage","renderChartsAndMenu","menu_key","handleLoadJs","promise","callback","catch","alert","then","loadClipboard","clipboard","loadBootstrapTable","Promise","all","loadBootstrapSlider","slider","default","Slider","loadLzString","loadPako","pako","alarmsUpdateModal","active","footer","alarm_families","count_active","count_all","families","families_sort","charts_by_name","arr","unshift","families_sorted","fc","active_family_added","alarm_to_html","enableTooltipsAndPopovers","alarm_family_show","$accordion","target","bootstrapTable","pagination","pageSize","showPaginationSwitch","search","searchTimeOut","searchAlign","showColumns","showExport","exportDataType","exportOptions","fileName","onClickRow","row","scrollToChartAfterHidingModal","when","rowStyle","classes","showFooter","showHeader","showRefresh","showToggle","sortable","silentSort","columns","field","valign","titleTooltip","formatter","index","timestamp4human","align","switchable","visible","alarmid4human","negative_suffix","space","timestamp","toLocaleDateString","toLocaleTimeString","full","has_alarm","crit","badge_url","action_buttons","recipient","last_status_change","lookup_after","lookup_dimensions","lookup_method","lookup_before","lookup_options","alarm_lookup_explain","calc","green","red","warn_repeat_every","crit_repeat_every","delay_up_duration","delay_down_duration","delay_multiplier","delay_max_duration","exec","source","initializeDynamicDashboardWithData","timezone","clipboardCopy","text","writeText","clipboardCopyBadgeEmbed","initializeConfig","custom_info","loadDashboardInfo","memoizeWith","dataType","loadCustomDashboardInfo","always","extend","initializeChartsAndCustomInfo","chartRegistry","downloadAll","initializeDynamicDashboard","newReduxStore","netdataPrepCallback","innerText","versionLog","msg","versionsMatch","v1","v2","s1","s2","n1","n2","getGithubLatestVersion","tag_name","getGCSLatestVersion","response","mediaLink","xhr","textStatus","errorThrown","checkForUpdateByVersion","force","sha2","showPageFooter","display","parseDom","jsonStringifyFn","jsonParseFn","str","eval","xssModalDisableXss","enabled","enabled_for_data","xssModalKeepXss","notifyForUpdate","sha1","save","printPreflight","screen","snapshotOptions","bytes_per_chart","compressionDefault","compressions","bytes_per_point_memory","bytes_per_point_disk","compress","compressed_length","btoa","deflate","to","inflate","atob","LZString","compressToUTF16","decompressFromUTF16","compressToBase64","decompressFromBase64","compressToEncodedURIComponent","decompressFromEncodedURIComponent","loadSnapshotModalLog","tmpSnapshotData","loadSnapshotPreflightFile","file","string","fr","FileReader","onload","date_after","after_ms","date_before","before_ms","charts_ok","charts_failed","compression","data_size","netdata_version","data_points","duration_ms","snapshot_version","comments","removeClass","addClass","readAsText","loadSnapshotPreflightEmpty","loadSnapshot","highlight_after_ms","highlight_before_ms","loadSnapshotDragAndDropInitialized","loadSnapshotDragAndDropSetup","originalEvent","dataTransfer","files","item","loadSnapshotPreflight","saveSnapshotStop","saveSnapshotCancel","stopSnapshotModeAction","saveSnapshotModalInitialized","saveSnapshotModalSetup","saveSnapshotModalInit","find","focus","saveSnapshotModalLog","saveSnapshotModalShowExpectedSize","saveSnapshotViewDuration","saveSnapshotSelectedSecondsPerPoint","sizemb","saveSnapshotCompression","memmb","saveSnapshotSetCompression","saveSnapshotSlider","browser_timezone","reduxState","selectDefaultAfter","start_ms","selectGlobalPanAndZoom","Boolean","start_date","yyyymmddhhssmm","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","view","destroy","ticks","step","scale","saveSnapshot","eltxt","saveData","update_every_ms","pack_api1_v1_chart_data","chartDataUniqueID","cstr","clearPanAndZoom","startSnapshotModeAction","dataPoints","saveSnapshotRestore","css","size","chartUpdated","chartsCount","selectAmountOfCharts","chartsOk","selectAmountOfSnapshotsFetched","chartsFailed","selectAmountOfSnapshotsFailed","pcent","Intl","DateTimeFormat","resolvedOptions","timeZone","getOption","option","createSelectOption","dashboardSettingsSetup","update_options_modal","sync_option","self","bootstrapToggle","units_sync_option","temp_sync_option","change","CHART_DIV_ID_PREFIX","CHART_DIV_OFFSET","scrollDashboardTo","chartElement","offsetTop","querySelector","modalHiddenCallback","animated","alarmDate","alarmStatus","includes","runOnceOnDashboardLastRun","runOnceOnDashboardWithjQuery","body","scrollspy","scrollPos","modal_depth","modal_shown","netdata_paused_on_modal","scrollspyOffset","scrollY","overflow","position","pauseCallback","pause","unpause","affix","bottom","removeAttr","Ps","initialize","wheelSpeed","wheelPropagation","swipePropagation","minScrollbarLength","maxScrollbarLength","useBothWheelAxes","suppressScrollX","suppressScrollY","scrollXMarginOffset","scrollYMarginOffset","fn","shorten","settings","config","showChars","minHideChars","ellipsesText","moreText","lessText","onLess","onscroll","onMore","errMsg","off","$this","hasClass","parent","prev","each","substr","inTag","bag","countChars","openTags","tagName","r","shift","isDemo","retries_on_data_failures","o","q","arguments","l","getElementsByTagName","src","parentNode","insertBefore","ga","onresizeCallback","update","resetDashboardOptions","selected_server_timezone","isProperTimezone","userSetServerTimezone","timezoneOption","netdataCallback","showSignInModal","explicitlySignIn","explicitlySignInAction","useCloudConnectionStatus","userStatus","nodeStatus","date","useMemo","header","strong","bullets","rel","href","CTA1","makeCloudConnectionStatusInfo","CloudConnectionStatusModal","closeModal","onRefresh","isCTA1Disabled","handleClickedCTA1","background","margin","onClose","padding","column","gap","bullet","data-testid","utmParameters","campaign","data-ga","disabled","textTransform","label","sx","fontWeight","lineHeight","CloudConnectionStatus","selectUserNodeAccess","cloudEnabled","selectIsCloudEnabled","isModalOpen","setModalOpen","cloudConnectionStatusInfo","nodeLiveness","documentElement","openModal","flavour","MASKED_DATA","INFO_POLLING_FREQUENCY","alarmStatuses","define","_uniqueIDCounter","defaultSettings","color","fontSize","font","subtitle","titleSubtitlePadding","canvasHeight","canvasWidth","pieInnerRadius","pieOuterRadius","sortOrder","ignoreSmallSegments","valueType","smallSegmentGrouping","outer","format","hideWhenLessThanPercentage","pieDistance","inner","mainLabel","percentage","decimalPlaces","lines","truncation","truncateLength","effects","load","effect","speed","pullOutSegmentOnClick","highlightSegmentOnMouseover","highlightLuminosity","tooltips","placeholderParser","styles","fadeInSpeed","backgroundColor","backgroundOpacity","borderRadius","misc","segments","segmentStroke","gradient","canvasPadding","pieCenterOffset","cssPrefix","callbacks","onMouseoverSegment","onMouseoutSegment","onClickSegment","validate","pie","d3","HTMLElement","SVGElement","helpers","isArray","isNaN","addSVGSpace","svg","select","append","shuffleArray","tmpVal","randomIndex","currentIndex","random","processObj","is","getDimensions","w","h","getBBox","rectIntersect","r1","r2","getColorShade","hex","lum","String","newHex","initSegmentColors","finalColors","applySmallSegmentGrouping","totalSize","math","getTotalPieSize","newData","groupedData","totalGroupedData","isGrouped","showPoint","isFunction","functionToCheck","call","prototype","copy","copyIsArray","clone","deep","hasOwn","class2type","jQuery","isWindow","isNumeric","parseFloat","isFinite","isPlainObject","nodeType","constructor","toRadians","degrees","PI","toDegrees","radians","computePieRadius","textComponents","headerHeight","exists","innerRadius","percent","outerRadius","smallestDimension","pieDistanceSpace","sortPieData","getPieTranslateCenter","pieCenter","calculatePieCenter","hasTopTitle","hasTopSubtitle","headerOffset","footerOffset","rotate","xm","ym","cos","sin","translate","rads","pointIsInArc","pt","ptData","d3Arc","theta1","startAngle","theta2","endAngle","dist","angle","atan2","add","section","sectionDisplayType","include","getIncludes","outerLabel","insert","labelGroup","__labels","selectAll","enter","formatterContext","part","positionLabelElements","dims","computeLabelLinePositions","lineCoordGroups","computeLinePosition","x2","y2","x3","y3","getSegmentAngle","midpoint","originCoords","heightOffset","outerLabelGroupData","quarter","startOfLabelX","startOfLabel","addLabelLines","lineGroup","lineFunction","line","curve","curveBasis","positionLabelGroups","pieCenterCopy","newCoords","xOffset","yOffset","val","addMainLabel","addValue","addPercentage","computeOuterLabelCoords","getIdealOuterLabelPositions","resolveOuterLabelCollisions","checkConflict","currIndex","direction","curr","currIndexHemisphere","hs","nextIndex","currLabelGroup","examinedLabelGroup","labelHeights","center","lineLength","heightChange","isLabelHidden","adjustLabelPos","lastCorrectlyPositionedLabel","xDiff","yDiff","newXPos","newYPos","sqrt","labelGroupNode","labelGroupDims","originalX","originalY","hemisphere","effectMap","easeLinear","easeBounce","easeSin","easeElastic","easeBack","easeQuad","easeCircle","easeExp","create","pieChartElement","arc","addGradients","grads","addSegmentEventHandlers","merge","segment","currentEl","isExpanded","onSegmentEvent","closeSegment","openSegment","segColor","tt","showTooltip","moveTooltip","hideTooltip","func","expanded","isOpeningSegment","maybeCloseOpenSegment","transition","ease","centroid","pullOutSize","currentlyOpenSegment","getCentroid","bbox","opts","fullValue","compounded","currValue","offscreenCoord","addTitle","__title","positionTitle","headerLocation","addSubtitle","__subtitle","positionSubtitle","getHeaderHeight","addFooter","__footer","positionFooter","footerLocation","footerWidth","totalTitleHeight","footerPlusPadding","addTooltips","caption","replacePlaceholders","currentTooltip","mouseCoords","mouse","replacements","placeholder","d3pie","_setupData","_init","recreate","redraw","getOpenSegment","updateProp","propKey","oldVal","oldValue","dp","_getPercentage","totalPercentage","toFixed","relativeAmount","isTimestamp","NETDATA_REGISTRY_SERVER","MS_IN_SECOND","getIframeSrc","path","utmUrlSuffix","getBoundingClientRect","obj1","obj2","equals","currentScript","isTestingEnv","getDefaultServer","isDevelopmentEnv","RegExp","getPathFromScriptSource","cond","T","alwaysEndWithSlash","pipe","concat","serverStatic","selectChartsState","selectSingleChartState","createSelector","_","chartsState","selectChartData","chartState","selectChartMetadataFromExplicitCall","selectChartMetadata","selectChartMetadataFromChartsCall","metadataFromAll","metadataFromSingleCall","selectIsFetchingDetails","makeSelectChartMetadataRequest","selectChartViewRange","selectChartIsFetchingData","selectChartFetchDataParams","selectResizeHeight","selectChartPanAndZoom","selectAmountOfFetchedCharts","some","hasCompletedFetching","selectNameOfAnyFetchingChart","isSupportingDateTimeFormat","navigator","language","narrowToDate","localeDateStringNative","localeTimeStringNative","xAxisTimeStringNative","localeMatcher","formatMatcher","weekday","year","month","day","dateFormat","locale","long","isTime","secs","hourCycle","dateStyle","timeStyle","getOptions","getTimezone","useDateTime","selectTimezoneSetting","selectUTCOffsetSetting","xAxisTimeString","xAxisDateString","showSignInModalAction","isSignedInAction","setOfflineAction","fallbackUpdateTimeInterval","panAndZoomDelay","totalSeconds","defaultOptions","hour","minute","second","and","strings","pop","join","isSnapshotMode","snapshotCharts","snapshotDataPoints","isSignedIn","offline","dashboardReducer","combineReducers","globalKey","chartKey","dashboardKey","axiosInstance","axios","Pragma","getFetchStream","concurrentCallsLimit","fetch$","Subject","resetFetch$","handler","mergeMap","params","onErrorCallback","onSuccessCallback","cancelTokenSource","timeout","cancelToken","token","tap","responseData","catchError","empty","startWith","switchMap","subscribe","fillMissingData","nrOfPointsToFill","viewUpdateEvery","view_update_every","firstAddedTimestamp","emptyPoint","tail","nulls","fill","addPointsDygraph","emptyArray","transformResults","shouldRevertFlip","dataResult","reverse","pointData","sum","Container","getSizeBy","SideContent","ContentContainer","HeaderText","ContentText","TextSmall","UINotification","props","leftContent","rightContent","renderContent","createUINotification","NodeIconContainer","NotificationLink","toastOptions","toast","POSITION","BOTTOM_RIGHT","autoClose","pauseOnFocusLoss","showCloudInstallationProblemNotification","notificationComponent","showCloudConnectionProblemNotification","uiNotification","defaultUrlOptions","alarm_unique_id","alarm_id","alarm_event_id","alarm_when","parseQueryPair","isInvalidPair","isPrintMode","mapIndexed","mergeRight","parseUrl","watchFetchDataResponseChannel","fetchDataSaga","fetchChartSaga","fetchInfoSaga","chartSagas","CONCURRENT_CALLS_LIMIT_METRICS","fetchDataResponseChannel","channel","take","action","start","end","put","constructCompatibleKey","IS_FLIP_RESPECTED_IN_COMPOSITE_CHARTS","getGroupByValues","fetchMetrics$","group","selectSnapshot","dimensionsWithUrlOptions","matchingKey","snapshotKey","agentOptionsOriginal","hasFlip","agentOptions","shouldAddFakeFlip","groupValues","axiosOptions","agent_options","post_aggregation_methods","aggregations","valueOf","fillMissingPoints","transformedResults","postAggregated","post_aggregated_data","next","fetchForSnapshot$","resetFetchForSnapshot$","fetchDataForSnapshotSaga","aggr_method","node_ids","stopSnapshotModeSaga","poll","wasCloudAvailable","wasACLKAvailable","takeEvery","spawn","sidePanelTransitionTimeInSeconds","getLog","notifyAll","alarmsLoop","startAlarms","fetchAllAlarmsSaga","alarmsSagas","ALARMS_INITIALIZATION_DELAY","ALARMS_UPDATE_EVERY","ALARMS_MS_BETWEEN_NOTIFICATIONS","areNotificationsAvailable","notificationCallback","netdataAlarmsNotifCallback","firstNotificationId","lastNotificationId","scrollToAlarm","chartID","scrollToChart","requestPermissions","Notification","permission","requestPermission","hasGivenNotificationPermissions","lastNotificationIdArg","getNotification","entry","firstNotificationIdArg","updated","valueString","value_string","tag","interaction","unique_id","old_status","no_clear_notification","notificationTitle","notificationOptions","requireInteraction","notificationHandler","alarmLogs","logsSorted","sortBy","newLogs","notifications","onclick","netdataAlarmsRemember","what","latest_alarm_log_unique_id","allAlarms","allowedReferrerDomains","isAllowedReferrer","referrer","watchWindowFocusChannel","waitForFullInfoPayload","injectPosthog","fetchHelloSaga","spacePanelSaga","globalSagas","windowFocusChannel","listenToWindowFocus","posthog","selectFullInfoPayload","__SV","_i","g","api_host","u","people","loaded","identify","shouldMaskReferrer","register","$ip","$current_url","$pathname","$host","$initial_referring_domain","$initial_referrer","$referring_domain","$referrer","event_source","netdata_machine_guid","netdata_person_id","netdata_buildinfo","netdata_release_channel","mirrored_host_count","mirrored_hosts","alarms_normal","normal","alarms_warning","warning","alarms_critical","critical","host_os_name","os_name","host_os_id","os_id","host_os_id_like","os_id_like","host_os_version","os_version","host_os_version_id","os_version_id","host_os_detection","os_detection","system_cores_total","cores_total","system_total_disk_space","total_disk_space","system_cpu_freq","cpu_freq","system_ram_total","ram_total","system_kernel_name","kernel_name","system_kernel_version","kernel_version","system_architecture","architecture","system_virtualization","virtualization","system_virt_detection","virt_detection","system_container","system_container_detection","container_detection","container_os_name","container_os_id","container_os_id_like","container_os_version","container_os_version_id","host_collectors_count","collectors","host_cloud_enabled","host_cloud_available","host_agent_claimed","host_aclk_available","host_aclk_implementation","host_allmetrics_json_used","host_allmetrics_prometheus_used","host_allmetrics_shell_used","host_charts_count","host_dashboard_used","host_metrics_count","host_notification_methods","config_memory_mode","config_exporting_enabled","config_exporting_connectors","config_hosts_available","config_https_enabled","config_multidb_disk_quota","config_page_cache_size","config_stream_enabled","config_web_enabled","host_is_parent","host_labels","_is_parent","mirrored_hosts_reachable","mirrored_hosts_status","reachable","mirrored_hosts_unreachable","host_collectors","host_is_k8s_node","is_k8s_node","accessRegistry","maxRedirects","machine","isRedirect","returnData","person_guid","parsePersonUrls","personUrls","lastTimestamp","accesses","existingObj","isNewer","extended","uniq","helloCallUrl","cloud_base_url","isUsingGlobalRegistry","accessRegistryResponse","anonymous_statistics","constructOptionStorageKey","setOptionSaga","showSignInSaga","mainJsSagas","LOCAL_STORAGE_NEEDS_SYNC","setGlobalChartUnderlaySaga","hashParams","getHashParams","setHashParams","clearHighlightSaga","removeHashParams","signInLinkHref","rootSaga","sagaMiddleware","createSagaMiddleware","store","createStore","rootReducer","compose","applyMiddleware","run","configureStore","loadCss","resolve","reject","fileRef","onerror","Error","isDygraphSparkline","chartLibrariesSettings","dygraph","hasToolboxPanAndZoom","xssRegexIgnore","isLogScale","hasLegend","trackColors","containerClass","peity","google","easypiechart","aspectRatio","gauge","textonly","groupbox","getChartURLOptions","shouldEliminateZeroDimensions","BIGGEST_INTERVAL_NUMBER","Loader","containerNode","hasEmptyData","screenHeight","lost","paddingTop","clientWidth","getPanAndZoomStep","ctrlKey","pan_and_zoom_factor","pan_and_zoom_factor_multiplier_control","shiftKey","pan_and_zoom_factor_multiplier_shift","altKey","pan_and_zoom_factor_multiplier_alt","safeEqualCheck","formattersFixed","formattersZeroBased","fastNumberFormat","NumberFormat","useGrouping","minimumFractionDigits","maximumFractionDigits","getLegendFormatValue","convertUnits","intlNumberFormat","valueDecimalDetail","dmin","dmax","convertedValue","useFormatters","selectTemperatureSetting","selectSecondsAsTimeSetting","setConvertUnits","setMin","setMax","unitsCurrent","setUnitsCurrent","decimals","setDecimals","setIntlNumberFormat","legendFormatValue","legendFormatValueRef","updateLegendFormatValueRef","newConvertUnits","newIntlNumberFormat","newDecimalDigits","legendFormatValueDecimalsFromMinMax","newMin","newMax","switchedUnits","newDecimals","convertedMin","convertedMax","delta","defaultColor","LegendContainer","LegendFirstRow","LegendSecondRow","LegendUnit","DateTimeSeparator","span","LegendItems","DimensionItem","isDisabled","DimensionItemToolboxPlaceholder","DimensionIcon","DimensionLabel","DimensionValue","ToolboxContainer","emptyObject","selector","dimension_names","LegendText","ChartLegendRight","hoveredRow","onDimensionClick","showLatestOnBlur","viewBefore","dimensionIds","dimension_ids","showUndefined","legendDate","colorFillOpacity","chart_type","scrollbarRef","legendPluginModuleString","legendResolutionTooltip","dimensionId","rgb","hexFull","colorHex2Rgb","isSelected","hoveredValueArray","view_latest_values","role","tabIndex","ChartTimeframe","ChartLegendBottom","legendToolbox","resizeHandler","ChartLegend","setSelectedDimensions","clickedDimensionName","isModifierKeyPressed","newSelectedDimensions","getNewSelectedDimensions","allDimensions","LegendToolbox","onToolboxLeftClick","onToolboxRightClick","onToolboxZoomInClick","onToolboxZoomOutClick","getDataForFakeStacked","dimensionsVisibility","point","currentMin","currentMax","isVisible","getDygraphChartType","chartSettings","dygraphRequestedType","dygraphChartType","getBackgroundColor","Color","transformColors","mix","getDygraphFillAlpha","isFakeStacked","color_fill_opacity_fake_stacked","color_fill_opacity_stacked","color_fill_opacity_area","useProceededChart","chartRef","propsRef","useToggle","proceeded","toggleProceeded","updatePosition","getArea","distance","toDomXCoord","first_entry","hasProceeded","defaultPositionTo","topMargin","isRendered","toggleIsRendered","positionTo","ProceededChartDisclaimer","forwardRef","backgroundColorMap","WARNING","CRITICAL","CLEAR","borderColorMap","getBorderColor","textColorMap","Badge","border","NeutralPill","getMissingTime","getInitialDygraphOptions","hiddenLabelsElementId","orderedColors","setMinMax","shouldSmoothPlot","isSparkline","highlightCircleSize","axis","grid","rightGap","showRangeSelector","showRoller","titleHeight","labelsDiv","labelsSeparateLines","labelsShowZeroValues","labelsKMB","labelsKMG2","showLabelsOnHighlight","hideOverlayOnMouseOut","includeZero","xRangePad","yRangePad","ylabel","yLabelWidth","plotter","smoothPlotter","strokeWidth","strokePattern","drawPoints","drawGapEdgePoints","connectSeparatedPoints","pointSize","stepPlot","strokeBorderColor","strokeBorderWidth","fillGraph","fillAlpha","stackedGraph","stackedGraphNaNFill","drawAxis","axisLabelFontSize","axisLineColor","axisLineWidth","drawGrid","gridLinePattern","gridLineWidth","gridLineColor","maxNumberWidth","sigFigs","digitsAfterDecimal","highlightSeriesOpts","highlightSeriesBackgroundAlpha","visibility","logscale","axes","pixelsPerLabel","ticker","Dygraph","dateTicker","axisLabelWidth","axisLabelFormatter","toTimeString","axes_","extremeRange","DygraphChart","chartElementClassName","chartElementId","onUpdateChartPanAndZoom","immediatelyDispatchPanAndZoom","setGlobalChartUnderlay","setHoveredX","viewAfter","selectGlobalChartUnderlay","selectedAlarm","selectAlarm","updateChartPanOrZoom","shouldNotExceedAvailableRange","dygraphInstance","latestIsUserAction","isMouseDown","dygraphHighlightAfter","dygraphLastTouchMove","dygraphLastTouchPageX","dygraphLastTouchEnd","isSyncPanAndZoom","selectSyncPanAndZoom","resetGlobalPanAndZoom","updateOptions","dateWindow","useDygraphBadge","isAlarmBadgeVisible","alarmBadgeRef","updateAlarmBadge","isHighlightBadgeVisible","highlightBadgeRef","updateHighlightBadge","isProceeded","precededChartRef","updatePrecededPosition","useLayoutEffect","localHighlight","setLocalHighlight","selectSmoothPlot","dygraphOptionsStatic","dygraphOptions","highlightCallback","xval","newHoveredX","unhighlightCallback","drawCallback","xRange","xAxisRange","last_entry","isInRangeOfAvailableData","zoomCallback","minDate","maxDate","underlayCallback","canvas","area","currentAlarm","alarmPosition","fillColor","requestAnimationFrame","fillStyle","globalAlphaCache","globalAlpha","fillRect","hasHashParam","pillRef","pillX","pillPosition","bottomLeft","toDomCoords","topRight","interactionModel","mousedown","button","initializeMouseDown","tarp","tarps","isOutsideReasonableViewport","startPan","metaKey","toDataXCoord","offsetX","startZoom","mousemove","moveZoom","isPanning","is2DPan","movePan","isZooming","mouseup","sortedRange","clearZoomRect_","drawGraph_","endPan","endZoom","wheel","adjustAxis","zoomInPercentage","bias","increment","foo","normalDef","wheelDelta","deltaY","detail","percentages","offsetY","yar0","yAxisRange","toDomYCoord","offsetToPercentage","xPct","yPct","xBias","yBias","yAxes","yAxisRanges","newYAxes","zoomRange","updatedAfter","updatedBefore","dblclick","touchstart","defaultInteractionModel","touchDirections","pageX","touchmove","touchend","dygraphPlotter","plotter_","pct","double_click_speed","instance","useUpdateEffect","selectSpacePanelTransitionEndIsActive","forceDateWindow","hasChangedDuration","hasScrolledToTheFutureDuringPlayMode","optionsDateWindow","selectGlobalSelectionMaster","getSelection","clearSelection","setSelection","commonMinState","selectCommonMin","commonMaxState","selectCommonMax","extremes","yAxisExtremes","shouldUseCommonMin","shouldUseCommonMax","shouldUpdate","newExtremes","useUnmount","resizeObserver","useMount","hasOmitedFirstCallback","callbackDebounced","waitFor","args","clearTimeout","debounce","ResizeObserver","observe","disconnect","EasyPieChart","chartWidth","chartInstance","setChartInstance","valueIndex","safeMinMax","_min","_max","isMinOverride","isMaxOverride","getPercentFromValueMinMax","stroke","v","easypiechart_track","easypiechart_scale","newChartInstance","EasyPie","barColor","trackColor","scaleColor","scaleLength","lineCap","lineWidth","trackWidth","easing","shouldUseAnimation","enableAnimation","disableAnimation","valueFontSize","valuetop","titleFontSize","titletop","unitFontSize","unitTop","isSetByUser","GaugeChart","chartCanvasElement","minAttribute","maxAttribute","safeMin","safeMax","_pcent","gauge_pointer","gauge_stroke","radiusScale","pointer","limitMax","limitMin","colorStart","colorStop","strokeColor","generateGradient","gradientType","highDpiSupport","Gauge","setOptions","minValue","maxValue","animationSpeed","set","valueTop","minMaxFontSize","normalizeHex","colorLuminance","hexNormalized","splitEvery","nr","convertToTimestamp","number","SparklineChart","viewAfterForCurrentData","viewBeforeForCurrentData","$chartElement","set$chartElement","sparklineOptions","requestedAfter","requestedBefore","currentDuration","requestedDuration","widthRatio","paddingLeftPercentage","getForceTimeWindowCorrection","defaultFillColor","fill_luminance","chartTitle","emptyStringIfDisable","sparklineInitOptions","lineColor","chartRangeMin","chartRangeMax","composite","enableTagOptions","tagOptionPrefix","tagValuesAttribute","disableHiddenCheck","defaultPixelsPerValue","spotColor","minSpotColor","maxSpotColor","spotRadius","valueSpots","highlightSpotColor","highlightLineColor","normalRangeMin","normalRangeMax","drawNormalOnTop","xvalues","chartRangeClip","chartRangeMinX","chartRangeMaxX","disableInteraction","disableTooltips","disableHighlight","highlightLighten","highlightColor","tooltipContainer","tooltipClassname","tooltipChartTitle","tooltipFormat","tooltipPrefix","tooltipSuffix","tooltipSkipNull","tooltipValueLookups","tooltipFormatFieldlist","tooltipFormatFieldlistKey","numberFormatter","numberDigitGroupSep","numberDecimalMark","numberDigitGroupCount","animatedZooms","onLeave","onChange","sparklines","getCurrentRegionFields","bind","unbind","textAlign","paddingLeft","fetchPromise","emptyContent","getDateRange","dt","dtString","t1","t2","D3pieChart","d3pieInstance","setD3pieInstance","d3pieOptions","safeContent","defaultTitle","dateRange","other","mainlabel","segment_stroke","gradient_color","initialD3pieOptions","tooltip_bg","tooltip_fg","newD3pieInstance","isHoveredButNoData","slot","PeityChart","peityOptions","$element","peityInitOptions","foreground","updatedOptions","GoogleChart","googleChartInstance","hasApiBeenLoaded","setHasApiBeenLoaded","script","firstScript","packages","googleOptions","dataTable","visualization","DataTable","draw","chartType","areaOpacity","Map","initialGoogleOptions","hAxis","viewWindowMode","slantedText","textStyle","gridlines","vAxis","chartArea","focusTarget","annotation","1","pointsVisible","titlePosition","titleTextStyle","isHtml","ignoreBounds","curveType","isStacked","googleInstance","AreaChart","LineChart","TextOnly","precision","textContent","defaultAspectRatio","getCellBoxSize","cellSize","getRows","getColumns","rows","getXPosition","getYPosition","getFullWidth","ceil","getFullHeight","getOffsetPosition","onMouseenter","onMouseout","cellPadding","hoveredIndex","getEvent","rect","cellBoxSize","mouseout","nextHoveredIndex","getWidth","getCanvasAttributes","defaultColorRange","makeGetColor","colorRange","scaleLinear","domain","extent","range","innerHeight","aligns","GroupBox","renderTooltip","dataRef","canvasRef","boxesRef","hover","setHover","dropHoverRef","boxHoverRef","timeoutId","close","deactivateBox","closeDrop","currentHover","cellStroke","getContext","activeBox","activateBox","clearEvents","clear","clearRect","beginPath","drawBox","registerEvents","strokeStyle","strokeRect","drawBoxes","onMouseEnter","onMouseLeave","getAlign","Title","Label","Flex","attrs","TextMicro","GroupBoxWrapper","groupIndex","renderGroupPopover","renderBoxPopover","maxWidth","boxPopover","boxAlign","groupPopover","alignItems","plain","isOpen","popoverRef","GroupBoxes","flexWrap","vertical","flex","LinearColorScaleBar","Legend","k8s_cluster_id","k8s_node_name","k8s_namespace","k8s_controller_kind","k8s_controller_name","k8s_pod_name","k8s_container_name","labelIds","word","toUpperCase","Separator","Header","wordBreak","TabButton","neutral","themeType","Tabs","ExpandButton","makeFlex","Section","onExpand","noBorder","side","justifyContent","oldDefaultHeights","getPortalNodeStyles","shouldAddSpecialHeight","heightFromLocalStorage","heightID","persitedHeight","persistedHeightOld","getHeightFromLocalStorage","heightOverriden","chartDefaultsMinWidth","min_width","minWidth","globalIntersectionOptions","root","rootMargin","threshold","globalIntersectionObserver","listeners","globalObserver","IntersectionObserver","entries","isIntersecting","unsubscribe","elementToUnsubscribe","createGlobalIntersectionObserver","InvisibleSearchableText","opacity","shouldCleanChartStateAlways","DisableOutOfView","portalNode","hasPortalNodeBeenStyled","setHasPortalNodeBeenStyled","isShowingAlarmOnChart","forEachObjIndexed","styleName","setProperty","destroyOnHide","selectDestroyOnHide","clonedChildrenRef","isVisibleIntersection","setIsVisible","isVisibleRef","newIsVisible","useCommonIntersection","debounceTime","selectIsAsyncOnScroll","shouldHideDebounced","setShouldHideDebounced","useDebounce","shouldHide","previousIsVisibleIntersection","newClonedChildren","child","cloned","cloneNode","clonedCanvases","querySelectorAll","oldCanvas","newCanvas","drawImage","cloneWithCanvas","clonedChildrenContainer","nodeElement","ChartContainer","dropdownMenu","renderCustomElementForDygraph","onAttributesChange","externalChartMetadata","sectionTitle","MigrationModalPromos","aggrMethods","avg","ChartValueContainer","memo","displayedIndex","aggregation","getAggregation","ChartValue","dangerouslySetInnerHTML","__html","groupLabel","postGroupLabel","relatedIndex","useContext","ThemeContext","chartContainerRef","setDisplayedIndex","setDisplayedIndexThrottled","throttle","repaint","relatedCharts","relatedChartAttributes","chartAttributes","chartLabels","ExternalButton","alignSelf","Item","secondary","DateItem","DateSection","Metrics","LabelsSection","labelId","items","onItemClick","getLabel","sliced","expandable","onNodeClick","ids","predefinedLabelIds","getLabelIds","StyledButton","List","onBack","horizontal","TabsContainer","Popover","setView","isLabelView","Kubernetes","labelValues","postGroupValues","postGroupData","groupValue","indexes","boxes","labelsAcc","groupData","groupChartLabels","groupLabels","Set","accChartLabels","transform","groupBoxData","groupedBoxesData","groupedBox","AbstractChart","showValueAttributesNodes","userElementId","chartSettingCallOptions","isFlipped","dimensionIndex","useShowValueOutside","Chart","viewRangeForCurrentData","themeContext","unitsScalingMethod","selectUnitsScalingMethod","shouldDisplayToolbox","legend_toolbox","shouldDisplayResizeHandler","resize_charts","allDimensionNames","dimensionNamesFromMetadata","additionalDimensionNamesFromData","localHoveredX","setLocalHoveredX","isSyncSelection","selectSyncSelection","handleSetHoveredX","noMaster","globalHoveredX","selectGlobalSelection","netdataFirst","netdataLast","fixedMinDuration","setGlobalPanAndZoomDebounced","useDebouncedCallback","newGlobalPanAndZoom","flush","handleUpdateChartPanAndZoom","shouldFlushImmediately","minDuration","currentDuraton","afterForced","beforeForced","first","wantedDuration","doCallback","tolerance","movement","handleToolBoxPanAndZoom","newAfter","newBefore","handleToolboxLeftClick","handleToolboxRightClick","timeWindow","handleToolboxZoomInClick","panAndZoomStep","handleToolboxZoomOutClick","selectAssignedColors","createSelectAssignedColors","__","isTimeVisible","DropdownItem","DropdownItemLabel","DotsBtn","ChartDropdown","setIsOpen","handleClose","circleAnimation","keyframes","SpinnerContainer","Circle","Circle2","Circle3","ChartSpinner","spaceBetween","ChartDropdownContainer","dimensionsAggrMethodMap","ChartWithLoader","selectChartMetadataRequest","actualChartMetadata","panAndZoom","isPanAndZoomMaster","areCriteriaMet","preferedIntervalTime","selectHasWindowFocus","stopUpdatesWhenFocusIsLost","selectStopUpdatesWhenFocusIsLost","selectGlobalPause","shouldBeUpdating","shouldFetch","setShouldFetch","shouldFetchImmediatelyAfterFocus","setShouldFetchImmediatelyAfterFocus","intervalTime","useInterval","useFetchNewDataClock","panAndZoomThrottled","useThrottle","initialBefore","liveModeAfter","boundingClientRect","isShowingSnapshot","selectShouldEliminateZeroDimensions","shouldUsePanAndZoomPadding","selectPanAndZoomDataPadding","CancelToken","cancel","shouldShowSpinnerDebounced","setShouldShowSpinnerDebounced","shouldShowSpinner","newViewRange","forceDataPoints","force_data_points","pointsMultiplier","requestedPadding","pixelsPerPointAttribute","pixelsPerPointSetting","pixels_per_point","px","getChartPixelsPerPoint","correctedPoints","firstEntry","nowInSeconds","afterAbsolute","beforeAbsolute","requestedRange","availableRange","getCorrectedPoints","externalSelectedDimensions","customElementForDygraph","selectDashboardDomain","selectIsSnapshotMode","selectSnapshotOptions","SnapshotLoader","SnapshotLoaderContainer","Portals","nodes","attributesMapped","createPortal","useHttp","shouldMakeCall","isExternal","setIsFetching","isError","setIsError","setData","modalRoot","ModalPortal","PrintModal","printModalElement","amountOfCharts","amountOfFetchedCharts","nameOfAnyFetchingChart","print","progressBarText","aria-labelledby","data-keyboard","data-backdrop","data-dismiss","aria-label","aria-hidden","aria-valuenow","aria-valuemin","aria-valuemax","SocialMediaContainer","FirstRow","GithubCopy","GithubCopyLine","SocialMediaLink","GithubStarQuestion","GithubIcon","TwitterIcon","FacebookIcon","SecondRow","SecondRowText","SidebarSocialMedia","SidebarSocialMediaPortal","NotificationsContainer","closeButton","hasBorder","hostNameSelector","global","Node","truncate","tooltipBackground","CustomTooltip","isBasic","getContent","contentNode","Tooltip","getTooltipContent","Options","data-toggle","data-target","Dropdown","PillContainer","Link","ProtoBuf","toggle","lacksProtoBufSupport","selectLacksProtoBufSupport","isLargeEnough","useMedia","onEsc","onClickOutside","VersionControl","currentVersion","isStableReleaseChannel","releaseChannel","githubVersion","gcsVersionResponse","mediaLinkResponse","latestVersion","transformGcsVersionResponse","isNewVersionAvailable","small","versionSelector","Version","initialValue","setToggle","toggleOn","toggleOff","getValueFromStorage","useLocalStorage","setValue","RootContainer","DropdownContainer","Menu","ListContainer","OpenerIcon","noMargin","PickerBox","StyledTimePeriod","StyledCustomTimePeriod","StyledDropdown","renderTitle","onMenuToggle","anchorCorner","renderOpener","maxHeight","DropdownIcon","CustomInput","input","StyledDrop","Drop","StyledHR","hr","period","resolution","setTimeRange","tagging","dateResolutions","resolutionsMapping","MINUTE","HOUR","months","getCustomTimePeriod","parseInputPeriod","timeCorrection","customRange","getUnixTime","focusTaggingMap","startDate","endDate","timePeriods","getDateWithOffset","formattedDate","isMatch","splitOffset","mathSign","absoluteNumber","firstPart","padStart","padEnd","formatOffset","TimePeriods","handleTimePeriodChange","selectedDate","CustomTimePeriod","getInputValue","inputValue","setInputValue","isDropdownOpen","toggleDropdown","onBlur","currentValue","currentTarget","isValidInput","isInteger","timePeriod","isValid","onChangeResolution","newResolution","dateResolution","DatePicker","selected","selectsStart","selectsEnd","startOpen","inline","selectsRange","monthsShown","showPopperArrow","calendarContainer","StyledDateInput","StyledCalendar","getRgbColor","DatePickerInput","onDatesChange","onFocus","placeholderText","setFormattedValue","parsedDate","getTime","useLocaleDate","convertTimestampToDate","getLocaleDate","toDate","useConvertedDates","DatePickerWrapper","setStartDate","setEndDate","onInputFocus","convertedStartDate","convertedEndDate","setValidStartDate","setPreviousValue","isBefore","setValidEndDate","dates","startDateWithOffset","endDateWithOffset","startDateTimestamp","endDateTimestamp","grow","PeriodIndication","convertedStart","convertedEnd","formattedStartDate","formattedEndDate","formatDates","formatDistanceStrict","getTimePeriod","whiteSpace","resolutionMap","SECONDS","getDuration","moment","diff","getGranularDuration","showSeconds","getResolution","DateBox","isPlaying","isSameDate","DurationBox","PickerAccessorElement","isPickerOpen","setRangeValues","timeframe","setTimeframe","getStartDate","getEndDate","useDashboardSelector","isSame","getIsSameDate","DatePickerDrop","initialStartDate","initialEndDate","setResolution","focusedInput","setFocusedInput","setDates","clearChanges","togglePicker","focusTagging","getFocusTagging","isValidTimePeriod","isApplyDisabled","consistentDefaultValue","isClearDisabled","pickerDrop","canHideTarget","eventCategory","eventAction","eventLabel","eventValue","dataLayer","eventData","reportEvent","ReduxDatePickerContainer","dashboardDispatch","useDashboardDispatch","isGlobalPanAndZoom","pickedValues","getHoverColor","StyledPill","Pill","PlayPausePill","isForcePlaying","getIcon","PanelRowContainer","MenuItem","Wrapper","testid","actions","basis","DefaultListHeader","H4","SectionHandle","toggleOpen","ItemsList","PlayOptionsTooltip","bacgkround","MenuButton","MemoizedPlayOptions","GlobalControls","hollowColors","hollow","pillProps","Alarms","selectActiveAlarms","News","app","upToDate","SearchInput","TextInput","Search","inputRef","metaShrinked","OffsetItem","onSelect","timezones","abbr","getDefaultTimezone","memoized","timeZoneName","normalizedOffset","parsedOffset","normalizeOffset","digitizedOffset","digitizeOffset","timezoneList","byId","Timezone","selectedTimezone","selectedOffset","timezoneHash","zones","IframeContainer","Iframe","signedIn","rendered","setRendered","signInMsg","lsValue","removeLsValue","selectCloudBaseUrl","nameParam","originParam","signInIframeUrl","onLoad","useCheckSignInStatus","hasSignedInBefore","setHasSignedInBefore","onMessage","isNew","SignIn","isRegistry","onSignIn","zIndex","SignOut","SignInItem","isSignedInSelector","dashboard","UserSettings","menuItems","separator","DarkTheme","backdrop","SpacesSkeleton","Fragment","SpacesIframe","Spaces","getNodeUrl","baseUrl","getNodes","hostsStatus","base","decodeURI","getBaseUrl","replicatedNodes","StyledIcon","ReplicatedNodes","listOpen","setListOpen","toggleListOpen","iconLeft","SpacePanelIframe","spacePanelMessage","promptContent","signIn","signUp","SignInPrompt","NoNetwork","viewBox","xmlns","fillRule","clipRule","OfflinePrompt","replicatedNodesSelector","visitedNodesSelector","visitedNodes","globalRegistry","selectIsUsingGlobalRegistry","switchIdentity","persist","pointerEvents","setLsValue","selectSpacePanelIsActive","Layout","printMode","mapTheme","slate","white","DefaultTheme","MigrationModal","migrationModalPromoInfo","setUserPrefrence","savePromoRemindMeSelection","migrationModalPromo","requestRefreshOfAccess","isRememberChoiceChecked","setIsRememberChoiceChecked","toPath","userPreference","handleClickedCTA2","CTA2","tickBoxOption","makeUTMParameters","modalPromo","utmParametersToString","migrationmodalInfo","PROMO_SIGN_UP_CLOUD","prefrenceID","PROMO_SIGN_IN_CLOUD","PROMO_IVNITED_TO_SPACE","PROMO_CLAIM_NODE","PROMO_TO_USE_NEW_DASHBAORD","FALLBACK_TO_AGENT","NO_INFO_FALLBACK_TO_AGENT","modalStatusWithPromoFunctions","userSavedPreference","nodeClaimedStatus","useMigrationModal","modalStatus","MigrationManager","cloudUrl","selectSignInUrl","term","linkToCoud","redirectURI","hasPromoSelectionSaved","isPromoEligibleForShow","showModalTimer","goToCloud","App","useStore","refreshHelper","setRefreshHelper","haveDOMReadyForParsing","loadOverlay","shouldUseRegistry","useRegistry","shouldUseAlarms","selectHasStartedAlarms","useAlarms","shouldUseInfo","useInfo","hasFetchDependencies","setHasFetchDependencies","bootstrap_css","dashboard_css","useChartsMetadata","selectHasFetchedInfo","selectTheme","alarmWhen","alarmTime","alarmChart","alarmValue","useAlarmFromUrl","ReactDOM","render","module","exports","require","code","f","fun","nextTick","apply","browser","env","argv","versions","addListener","once","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","binding","cwd","chdir","umask","2","defineProperty","__esModule","extractSeries","rollingAverage","3","pow","4","5","onPointsCreated_","y_top","NaN","y_bottom","yval_minus","yval_plus","getExtremeYValues","onLineEvaluated","calcYNormal_","6","X","Y","EXTRAS","seriesToPoints","yval","canvasx","canvasy","7","8","9","dygraph_","layout","elementContext","height_","width_","isCanvasSupported","getPlotArea","canvas_ctx_","clip","hidden_ctx_","_updatePoints","_renderLineChart","_getIteratorPredicate","_predicateThatSkipsEmptyPoints","_drawStyledLine","getBooleanOption","setName","isArrayLike","createIterator","drawingContext","setLineDash","_drawSeries","_drawPointsOnLine","restore","array_","end_","predicate_","start_","moveTo","lineTo","nextIdx_","hasNext","peek","setNames","colorsMap_","axisPropertiesForSeries","plotArea","seriesIndex","seriesCount","singleSeriesName","allSeriesPoints","_Plotters","linePlotter","_linePlotter","fillPlotter","_fillPlotter","errorPlotter","_errorPlotter","getNumericOption","Circles","DEFAULT","toRGB_","closePath","_fastCanvasProxy","splice","_count","getLabels","getColors","A","minyval","yscale","O","D","E","L","S","P","C","M","FORCE_FAST_PROXY","N","F","isOK","k","y_stacked","10","highlightSeriesBackgroundColor","axisTickSize","xValueParser","delimiter","sigma","errorBars","fractions","wilsonInterval","customBars","drawAxesAtZero","xLabelHeight","defaultModel","rangeSelectorHeight","rangeSelectorPlotStrokeColor","rangeSelectorPlotFillGradientColor","rangeSelectorPlotFillColor","rangeSelectorBackgroundStrokeColor","rangeSelectorBackgroundLineWidth","rangeSelectorPlotLineWidth","rangeSelectorForegroundStrokeColor","rangeSelectorForegroundLineWidth","rangeSelectorAlpha","showInRangeSelector","plugins","dateAxisLabelFormatter","valueFormatter","dateValueFormatter","independentTicks","numberValueFormatter","numberAxisLabelFormatter","numericTicks","11","date_graph","layout_","12","dragEndX","dragGetX_","dragEndY","dragGetY_","dragStartX","dragStartY","lastx_","treatMouseOpAsClick","regionWidth","regionHeight","getOptionForAxis","initialLeftmostDate","log10","xUnitsPerPixel","xAxisExtremes","boundedDates","toDataYCoord","boundedValues","attributes_","getForAxis","initialTopValue","dragValueRange","unitsPerPixel","dateWindow_","LOG_SCALE","maybeTreatMouseOpAsClick","zoomMoved","dragDirection","VERTICAL","HORIZONTAL","drawZoomRect_","prevDragDirection","prevEndX","prevEndY","getFunctionOption","MAX_VALUE","selPoints_","cancelable","cascadeEvents_","pts","doZoomX_","cancelNextDblclick","doZoomY_","startTouch","startTimeForDoubleTapMs","pageY","dataX","dataY","initialTouches","initialPinchCenter","initialRange","moveTouch","endTouch","changedTouches","doubleTapX","screenX","doubleTapY","screenY","resetZoom","findPos","canvas_","offsetWidth","offsetHeight","addAndTrackEvent","removeEvent","willDestroyContextMyself","nonInteractiveModel_","dragIsPanInteractionModel","13","annotations","yAxes_","xTicks_","yTicks_","addDataset","area_","computePlotArea","chart_div","graphDiv","reserveSpaceLeft","reserveSpaceRight","reserveSpaceTop","reserveSpaceBottom","chartRect","setAnnotations","setXTicks","setYAxes","evaluate","_xAxis","_evaluateLimits","_evaluateLineCharts","_evaluateLineTicks","_evaluateAnnotations","minval","maxval","xlogrange","xlogscale","computedValueRange","maxyval","yrange","ylogrange","ylogscale","calcXNormal_","getForSeries","yval_stacked","dataHandler_","xticks","label_v","toPercentXCoord","pos","has_tick","yticks","toPercentYCoord","series","annotated_points","removeAllDatasets","setPointsLengths","setPointsOffsets","14","_process","15","xAxis_","series_","global_","attrs_","user_","user_attrs_","labels_","highlightSeries_","reparseSeries","AXIS_STRING_MAPPINGS_","y1","Y1","Y2","axisToIndex_","yAxis","getGlobalUser_","getGlobalDefault_","getHighlightSeries","numAxes","axisForSeries","axisOptions","seriesForAxis","seriesNames","16","numericLinearTicks","binarySearch","tickValue","pixel_coord","MILLISECONDLY","TWO_MILLISECONDLY","FIVE_MILLISECONDLY","TEN_MILLISECONDLY","FIFTY_MILLISECONDLY","HUNDRED_MILLISECONDLY","FIVE_HUNDRED_MILLISECONDLY","SECONDLY","TWO_SECONDLY","FIVE_SECONDLY","TEN_SECONDLY","THIRTY_SECONDLY","MINUTELY","TWO_MINUTELY","FIVE_MINUTELY","TEN_MINUTELY","THIRTY_MINUTELY","HOURLY","TWO_HOURLY","SIX_HOURLY","DAILY","TWO_DAILY","WEEKLY","MONTHLY","QUARTERLY","BIANNUAL","ANNUAL","DECADAL","CENTENNIAL","NUM_GRANULARITIES","Granularity","datefield","spacing","DateAccessorsUTC","DateAccessorsLocal","getMilliseconds","getDay","makeDate","getDateAxis","17","toExponential","toPrecision","nt","rt","ot","st","cancelEvent","cancelBubble","returnValue","hsvToRGB","pageXOffset","scrollLeft","pageYOffset","py","isValidPoint","floatFormat","hmsString_","dateString_","round_","dateParser","dateStrToMillis","updateDeep","nodeName","isDateLike","createCanvas","getContextPixelRatio","devicePixelRatio","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","Iterator","repeatAndCleanup","et","isPixelChangingOptionList","at","detectLineDelimiter","isNodeContainedBy","getComputedStyle","parseFloat_","G","lt","W","LN_TEN","U","logRangeFraction","DOTTED_LINE","DASHED_LINE","DOT_DASH_LINE","addEvent","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","getUTCDay","UTC","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","requestAnimFrame","annotationClickHandler","annotationDblClickHandler","annotationMouseOutHandler","annotationMouseOverHandler","clickCallback","drawHighlightPointCallback","drawPointCallback","panEdgeFraction","pixelsPerYLabel","pointClickCallback","it","18","Symbol","iterator","return","TypeError","R","H","Z","Q","__init__","NAME","VERSION","DEFAULT_ROLL_PERIOD","DEFAULT_WIDTH","DEFAULT_HEIGHT","ANIMATION_STEPS","ANIMATION_DURATION","Plotters","addedAnnotationCSS","is_initial_draw_","readyFns_","copyUserAttrs_","maindiv_","file_","rollPeriod_","rollPeriod","previousVerticalX_","fractions_","annotations_","boundaryIds_","setIndexByName_","datasetIndex_","registeredEvents_","eventListeners_","createInterface_","plugins_","PLUGINS","plugin","activate","events","pluginOptions","createDragInterface_","defaultPrevented","propagationStopped","getPluginInstance_","isZoomed","attr_","getStringOption","optionsViewForAxis_","numRows","rawData_","gatherDatasets_","rolledSeries_","computeYAxisRanges_","toDataCoords","numColumns","getValue","hidden_","createPlotKitCanvas_","resizeElements_","mouseEventElement_","createMouseEventElement_","mouseMoveHandler_","mouseMove_","mouseOutHandler_","fromElement","relatedTarget","toElement","mouseOut_","resizeHandler_","removeTrackedEvents_","hasChildNodes","firstChild","setColors_","colors_","getPropertiesForSeries","createRollInterface_","roller_","onchange","adjustRoll","cover","draggingDate","draggingValue","uncover","currentZoomRectArgs_","doZoomXDates_","doAnimatedZoom","zoomAnimationFunction","eventToDomCoords","findClosestRow","findClosestPoint","seriesName","findStackedPoint","getLeftBoundary_","isSeriesLocked","lastRow_","highlightSet_","animateSelection_","fadeLevel","animateId","updateSelection_","selectedRow","selectedX","selectedPoints","lockedSet_","loadedEvent_","parseCSV_","cascadeDataDidUpdateEvent_","predraw_","addXTicks_","getHandlerClass_","computeYAxes_","drawingTimeMs_","PointType","stackPoints_","boundaryIds","renderGraph_","readyFired_","detectTypeFromString_","setXAxisOptions_","parseArray_","parseDataTable_","getNumberOfColumns","getNumberOfRows","getColumnType","getColumnLabel","shortText","fromCharCode","getColumnRange","XMLHttpRequest","ActiveXObject","onreadystatechange","readyState","responseText","send","resize_lock","setVisibility","indexFromSetName","getRowForX","ready","elem","GVizChart","nonInteractiveModel","Plugins","Axes","Annotations","ChartLabels","Grid","RangeSelector","DataHandlers","DefaultHandler","BarsHandler","CustomBarsHandler","DefaultFractionHandler","ErrorBarsHandler","FractionsBarsHandler","19","20","clearChart","didDrawChart","detachLabels","tickHeight","cssClass","createTextNode","attachAtBottom","borderColor","tickColor","tickWidth","21","xlabels_","ylabels_","willDrawChart","22","title_div_","xlabel_div_","ylabel_div_","y2label_div_","detachLabels_","23","24","legend_div_","is_generated_div_","one_em_width_","deselect","predraw","generateLegendHTML","dashHTML","labelHTML","xHTML","yHTML","isHighlighted","defaultFormatter","25","hasTouchInterface_","TouchEvent","isMobileDevice_","appVersion","interfaceCreated_","getOption_","reserveSpace_","renderStaticLayer_","renderInteractiveLayer_","bgcanvas_","fgcanvas_","leftZoomHandle_","rightZoomHandle_","setDefaultOption_","createCanvases_","createZoomHandles_","initInteraction_","addToGraph_","graphDiv_","removeFromGraph_","updateVisibility_","resize_","drawStaticLayer_","isChangingRange_","placeZoomHandles_","drawInteractiveLayer_","canvasRect_","bgcanvas_ctx_","fgcanvas_ctx_","cursor","Image","leftHandlePos","rightHandlePos","clientX","srcElement","getZoomHandleStatus_","targetTouches","opera","drawMiniPlot_","computeCombinedSeriesAndLimits_","yMax","yMin","createLinearGradient","addColorStop","MIN_VALUE","withContext","collected","viewed","enabledDimensions","isCurrentlySelected","fragmentParamsSeparatorRegEx","param","makeHashFromObject","allParams","allParamsResult","mergeDeepLeft","excludedParams","filteredParams","getFilteredHash","htmlIframeElement","iframeElement","contentWindow","postMessage","messageType","defaultState","lastMessage","setLastMessage","handleMessage","resetMesssage","process","isRegistrySelector","offlineSelector","signInUrl","useSelectorOriginal","useDispatchOriginal","assign","meta","selectGlobal","globalState","selectOptions","optionName","selectChartsMetadata","allMetadata","INITIAL_OPTIONS","netdataNoBootstrap","optionsFromLocalStorage","localStorageKeyToOption","parsed","getItemFromLocalStorage","overridenOptions","getIsDemo"],"mappings":";gIAAA,oEAAO,IAyJHA,EACAC,EA1JSC,EAAU,SAACC,GACtB,OAAIA,GAAK,IAAMA,EAAI,GACX,IAAN,OAAWA,EAAEC,YAERD,EAAEC,YASLC,EAA+B,CACnC,YAAa,CACXC,IAAK,EACLC,KAAM,IACNC,KAAM,KAERF,IAAK,CACHA,IAAK,EACLC,KAAM,IACNC,KAAM,KAER,aAAc,CACZ,SAAU,KACV,aAAc,EACd,aAAc,IACd,aAAc,IACd,aAAc,KAEhB,UAAW,CACT,UAAW,EACX,cAAe,KACf,cAAe,QACf,cAAe,WACf,cAAe,eAEjB,cAAe,CACb,UAAW,EAAI,KACf,cAAe,EACf,cAAe,KACf,cAAe,QACf,cAAe,YAEjB,MAAO,CACL,MAAO,EACP,QAAS,KACT,QAAS,QACT,QAAS,WACT,QAAS,eAEX,OAAQ,CACN,MAAO,EAAI,KACX,OAAQ,EACR,OAAQ,KACR,OAAQ,QACR,OAAQ,YAEV,QAAS,CACP,MAAO,EAAI,KACX,QAAS,EACT,QAAS,KACT,QAAS,QACT,QAAS,YAEXC,MAAO,CACLA,MAAO,EACPC,UAAW,KACXC,UAAW,QACXC,UAAW,WACXC,UAAW,eAEbC,GAAI,CACFA,GAA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kBACA,sBACA,YAGJ,CACEzlB,MAAO,gCACPstG,KAAM,OACNjzE,KAAM,kBACN5U,IAAK,CACH,iBACA,qBACA,sBACA,oBACA,kBACA,sBACA,YACA,sBAGJ,CACEzlB,MAAO,wBACPstG,KAAM,MACNjzE,KAAM,6BACN5U,IAAK,CACH,kBACA,uBACA,4BACA,oBACA,oBACA,8BACA,8BACA,iCACA,sBACA,uBACA,mBACA,mBACA,YAGJ,CACEzlB,MAAO,iCACPstG,KAAM,MACNjzE,KAAM,sCACN5U,IAAK,CACH,yBACA,iBACA,iBACA,sBACA,sBAGJ,CACEzlB,MAAO,+BACPstG,KAAM,OACNjzE,KAAM,eACN5U,IAAK,CAAC,iBAAkB,0BAE1B,CACEzlB,MAAO,2BACPstG,KAAM,OACNjzE,KAAM,sBACN5U,IAAK,CACH,iBACA,iBACA,wBACA,mBACA,oBACA,kBACA,eACA,iBACA,qBACA,cAGJ,CACEzlB,MAAO,wBACPstG,KAAM,MACNjzE,KAAM,6BACN5U,IAAK,CACH,kBACA,iBACA,6BACA,4BACA,0BACA,kBACA,8BACA,qBACA,mBACA,iBACA,mBACA,kBACA,sBACA,yBACA,sBACA,kBACA,YAGJ,CACEzlB,MAAO,2BACPstG,KAAM,OACNjzE,KAAM,iBACN5U,IAAK,CAAC,0BAA2B,wBAAyB,yBAE5D,CACEzlB,MAAO,0BACPstG,KAAM,MACNjzE,KAAM,UACN5U,IAAK,CAAC,oBAER,CACEzlB,MAAO,yBACPstG,KAAM,MACNjzE,KAAM,WACN5U,IAAK,CAAC,qBAER,CACEzlB,MAAO,yBACPstG,KAAM,MACNjzE,KAAM,yBACN5U,IAAK,CACH,oBACA,oBACA,kBACA,kBACA,gBACA,qBAGJ,CACEzlB,MAAO,kCACPstG,KAAM,OACNjzE,KAAM,SACN5U,IAAK,CAAC,uBAAwB,mBAEhC,CACEzlB,MAAO,2BACPstG,KAAM,OACNjzE,KAAM,uCACN5U,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,CACEzlB,MAAO,2BACPstG,KAAM,OACNjzE,KAAM,WACN5U,IAAK,CAAC,mBAAoB,sBAE5B,CACEzlB,MAAO,6BACPstG,KAAM,MACNjzE,KAAM,eACN5U,IAAK,CAAC,qBAER,CACEzlB,MAAO,iCACPstG,KAAM,QACNjzE,KAAM,WACN5U,IAAK,CAAC,sBAER,CACEzlB,MAAO,0BACPstG,KAAM,MACNjzE,KAAM,eACN5U,IAAK,CACH,6BACA,iCACA,0BACA,6BACA,6BACA,4BACA,4BACA,uBACA,oBACA,kBACA,gBACA,oBAGJ,CACEzlB,MAAO,2BACPstG,KAAM,OACNjzE,KAAM,qBACN5U,IAAK,CACH,oBACA,gBACA,kBACA,oBACA,iBACA,qBACA,iBACA,mBACA,qBACA,mBACA,cAGJ,CACEzlB,MAAO,0BACPstG,KAAM,MACNjzE,KAAM,YACN5U,IAAK,CAAC,oBAER,CACEzlB,MAAO,2BACPstG,KAAM,MACNjzE,KAAM,aACN5U,IAAK,CAAC,uBAER,CACEzlB,MAAO,sBACPstG,KAAM,MACNjzE,KAAM,WACN5U,IAAK,CAAC,kBAER,CACEzlB,MAAO,SACPstG,KAAM,IACNjzE,KAAM,gCACN5U,IAAK,CAAC,kBAAmB,yBAA0B,cAErD,CACEzlB,MAAO,6BACPstG,KAAM,MACNjzE,KAAM,qBACN5U,IAAK,IAEP,CACEzlB,MAAO,uBACPstG,KAAM,MACNjzE,KAAM,SACN5U,IAAK,CAAC,uBAAwB,oBAEhC,CACEzlB,MAAO,2BACPstG,KAAM,OACNjzE,KAAM,iBACN5U,IAAK,CAAC,sBAAuB,cAE/B,CACEzlB,MAAO,wBACPstG,KAAM,MACNjzE,KAAM,aACN5U,IAAK,CAAC,oBAAqB,oBAE7B,CACEzlB,MAAO,MACPstG,KAAM,MACNjzE,KAAM,6BACN5U,IAAK,CAAC,uBAAwB,YAEhC,CACEzlB,MAAO,oBACPstG,KAAM,MACNjzE,KAAM,oBACN5U,IAAK,CAAC,qBAAsB,kBAAmB,gBAAiB,kBAElE,CACEzlB,MAAO,oBACPstG,KAAM,MACNjzE,KAAM,iBACN5U,IAAK,CACH,kBACA,kBACA,mBACA,gBACA,kBAGJ,CACEzlB,MAAO,0BACPstG,KAAM,MACNjzE,KAAM,sBACN5U,IAAK,CACH,iBACA,eACA,gBACA,gBACA,gBACA,iBACA,eACA,kBACA,cACA,kBACA,oBACA,qBACA,kBACA,qBACA,uBAGJ,CACEzlB,MAAO,0BACPstG,KAAM,OACNjzE,KAAM,mDACN5U,IAAK,CACH,sBACA,mBACA,iBACA,gBACA,kBACA,mBACA,oBACA,eACA,gBACA,cACA,cACA,oBACA,mBACA,eACA,iBACA,gBACA,kBAGJ,CACEzlB,MAAO,+BACPstG,KAAM,OACNjzE,KAAM,oDACN5U,IAAK,CACH,kBACA,oBACA,kBACA,mBACA,mBACA,gBACA,kBAGJ,CACEzlB,MAAO,wBACPstG,KAAM,MACNjzE,KAAM,sCACN5U,IAAK,CAAC,eAAgB,kBAAmB,oBAAqB,gBAAiB,iBAEjF,CACEzlB,MAAO,iCACPstG,KAAM,OACNjzE,KAAM,mCACN5U,IAAK,CAAC,kBAAmB,gBAAiB,gBAAiB,kBAE7D,CACEzlB,MAAO,kCACPstG,KAAM,QACNjzE,KAAM,sBACN5U,IAAK,CACH,iBACA,gBACA,qBACA,gBACA,kBACA,eACA,oBACA,gBACA,gBACA,kBACA,gBACA,oBACA,eACA,cAGJ,CACEzlB,MAAO,wBACPstG,KAAM,MACNjzE,KAAM,WACN5U,IAAK,CAAC,oBAER,CACEzlB,MAAO,oBACPstG,KAAM,MACNjzE,KAAM,oBACN5U,IAAK,CAAC,eAAgB,gBAAiB,mBAAoB,oBAE7D,CACEzlB,MAAO,4BACPstG,KAAM,OACNjzE,KAAM,SACN5U,IAAK,CAAC,gBAER,CACEzlB,MAAO,sBACPstG,KAAM,MACNjzE,KAAM,QACN5U,IAAK,CAAC,iBAER,CACEzlB,MAAO,sBACPstG,KAAM,MACNjzE,KAAM,WACN5U,IAAK,CAAC,kBAER,CACEzlB,MAAO,0BACPstG,KAAM,OACNjzE,KAAM,YACN5U,IAAK,CACH,eACA,gBACA,mBACA,kBACA,kBACA,cACA,mBACA,iBACA,cACA,eACA,iBACA,kBACA,iBACA,sBAGJ,CACEzlB,MAAO,6BACPstG,KAAM,OACNjzE,KAAM,mBACN5U,IAAK,CACH,kBACA,mBACA,kBACA,gBACA,sBACA,gBACA,oBACA,gBACA,gBACA,gBACA,iBACA,cAGJ,CACEzlB,MAAO,oBACPstG,KAAM,MACNjzE,KAAM,gDACN5U,IAAK,CACH,kBACA,cACA,mBACA,cACA,eACA,iBACA,kBACA,iBACA,sBAGJ,CACEzlB,MAAO,uBACPstG,KAAM,MACNjzE,KAAM,WACN5U,IAAK,CAAC,oBAER,CACEzlB,MAAO,uBACPstG,KAAM,MACNjzE,KAAM,YACN5U,IAAK,CAAC,mBAER,CACEzlB,MAAO,sBACPstG,KAAM,MACNjzE,KAAM,UACN5U,IAAK,CAAC,mBAER,CACEzlB,MAAO,uBACPstG,KAAM,MACNjzE,KAAM,QACN5U,IAAK,CAAC,eAER,CACEzlB,MAAO,uBACPstG,KAAM,MACNjzE,KAAM,UACN5U,IAAK,CAAC,iBAER,CACEzlB,MAAO,4BACPstG,KAAM,MACNjzE,KAAM,cACN5U,IAAK,CAAC,uBAER,CACEzlB,MAAO,qBACPstG,KAAM,MACNjzE,KAAM,iBACN5U,IAAK,CAAC,YAAa,eAAgB,cAAe,aAAc,gBAElE,CACEzlB,MAAO,0BACPstG,KAAM,OACNjzE,KAAM,UACN5U,IAAK,CACH,qBACA,gBACA,uBACA,kBACA,cACA,iBACA,kBACA,mBACA,iBACA,mBACA,YACA,sBACA,gBACA,mBAGJ,CACEzlB,MAAO,uBACPstG,KAAM,MACNjzE,KAAM,2CACN5U,IAAK,CAAC,eAAgB,gBAAiB,oBAAqB,mBAAoB,iBAElF,CACEzlB,MAAO,cACPstG,KAAM,OACNjzE,KAAM,6BACN5U,IAAK,CAAC,mBAAoB,gBAAiB,qBAE7C,CACEzlB,MAAO,qBACPstG,KAAM,MACNjzE,KAAM,SACN5U,IAAK,CAAC,gBAER,CACEzlB,MAAO,wBACPstG,KAAM,MACNjzE,KAAM,oBACN5U,IAAK,CAAC,aAAc,cAAe,cAErC,CACEzlB,MAAO,2BACPstG,KAAM,MACNjzE,KAAM,OACN5U,IAAK,CAAC,cAER,CACEzlB,MAAO,0BACPstG,KAAM,MACNjzE,KAAM,aACN5U,IAAK,CAAC,cAAe,mBAAoB,mBAE3C,CACEzlB,MAAO,yBACPstG,KAAM,MACNjzE,KAAM,UACN5U,IAAK,CAAC,iBAER,CACEzlB,MAAO,yBACPstG,KAAM,MACNjzE,KAAM,UACN5U,IAAK,CAAC,iBAER,CACEzlB,MAAO,4BACPstG,KAAM,MACNjzE,KAAM,QACN5U,IAAK,CAAC,eAER,CACEzlB,MAAO,0BACPstG,KAAM,OACNjzE,KAAM,qBACN5U,IAAK,CACH,oBACA,aACA,cACA,gBACA,gBACA,YACA,iBACA,gBACA,YACA,mBACA,oBAGJ,CACEzlB,MAAO,qBACPstG,KAAM,OACNjzE,KAAM,gBACN5U,IAAK,CAAC,uBAER,CACEzlB,MAAO,yBACPstG,KAAM,MACNjzE,KAAM,qBACN5U,IAAK,CAAC,iBAER,CACEzlB,MAAO,sBACPstG,KAAM,MACNjzE,KAAM,sCACN5U,IAAK,CAAC,iBAER,CACEzlB,MAAO,0BACPstG,KAAM,OACNjzE,KAAM,sBACN5U,IAAK,CAAC,iBAER,CACEzlB,MAAO,sBACPstG,KAAM,MACNjzE,KAAM,YACN5U,IAAK,CAAC,mBAER,CACEzlB,MAAO,6BACPstG,KAAM,OACNjzE,KAAM,sBACN5U,IAAK,CACH,oBACA,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AA8O,IACnBA,EAAI4R,WAAWhgB,MAAmCoO,EAAI4R,WAAW,cACnEje,aAAa8iB,WAAWzW,Q,gCCxI9B,sCAAM26C,EAAchlD,OAAO+e,SAASrB,KAAK7V,MAAM,KAAKs3B,SAAS,aAmBhD0D,EAjBK,WAChB,GAAImiB,EACF,OAAO,EAFa,IAIdx/C,EAAanH,SAAS0gB,SAAtBvZ,SACR,OACEA,EAAS2kB,SAAS,mBACf3kB,EAAS2kB,SAAS,kBAClB3kB,EAAS2kB,SAAS,mBAClB3kB,EAAS2kB,SAAS,gBAClB3kB,EAAS2kB,SAAS,kBAClB3kB,EAAS2kB,SAAS,iBAClB3kB,EAAS2kB,SAAS,oBAClB3kB,EAAS2kB,SAAS,kBAIHwyG,K","file":"static/js/main.485cc284.chunk.js","sourcesContent":["export const zeropad = (x: number) => {\n if (x > -10 && x < 10) {\n return `0${x.toString()}`\n }\n return x.toString()\n}\n\ninterface ScalableUnits {\n [unitGroupName: string]: {\n [unitName: string]: number\n }\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}\nconst convertibleUnits: ConvertibleUnits = {\n Celsius: {\n Fahrenheit: {\n // check(max) {\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(max) {\n check() {\n return currentTemperatureSetting === \"fahrenheit\"\n },\n convert(value: number) {\n return (value * 9) / 5 + 32\n },\n },\n },\n seconds: {\n time: {\n // check(max) {\n check() {\n return currentSecondsAsTimeSetting\n },\n convert(seconds: number) {\n // eslint-disable-next-line no-use-before-define\n return unitsConversionCreator.seconds2time(seconds)\n },\n },\n },\n milliseconds: {\n milliseconds: {\n check(max: number) {\n return currentSecondsAsTimeSetting && max < 1000\n },\n convert(milliseconds: number) {\n let tms = Math.round(milliseconds * 10)\n const millisecondsRet = Math.floor(tms / 10)\n\n tms -= millisecondsRet * 10\n\n return `${(millisecondsRet).toString()}.${tms.toString()}`\n },\n },\n seconds: {\n check(max: number) {\n return currentSecondsAsTimeSetting && max >= 1000 && max < 60000\n },\n convert(milliseconds: number) {\n let millisecondsReturn = Math.round(milliseconds)\n\n const seconds = Math.floor(millisecondsReturn / 1000)\n millisecondsReturn -= seconds * 1000\n\n millisecondsReturn = Math.round(millisecondsReturn / 10)\n\n return `${seconds.toString()}.${\n zeropad(millisecondsReturn)}`\n },\n },\n \"M:SS.ms\": {\n check(max) {\n return currentSecondsAsTimeSetting && max >= 60000\n },\n convert(milliseconds: number) {\n let millisecondsReturn = Math.round(milliseconds)\n\n const minutes = Math.floor(millisecondsReturn / 60000)\n millisecondsReturn -= minutes * 60000\n\n const seconds = Math.floor(millisecondsReturn / 1000)\n millisecondsReturn -= seconds * 1000\n\n millisecondsReturn = Math.round(millisecondsReturn / 10)\n\n return `${minutes.toString()}:${\n zeropad(seconds)}.${\n zeropad(millisecondsReturn)}`\n },\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 seconds2time(seconds: number) {\n let secondsReturn = Math.abs(seconds)\n\n const days = Math.floor(secondsReturn / 86400)\n secondsReturn -= days * 86400\n\n const hours = Math.floor(secondsReturn / 3600)\n secondsReturn -= hours * 3600\n\n const minutes = Math.floor(secondsReturn / 60)\n secondsReturn -= minutes * 60\n\n secondsReturn = Math.round(secondsReturn)\n\n const msTxt = \"\"\n\n return `${((days > 0) ? `${days.toString()}d:` : \"\").toString()\n + zeropad(hours)}:${\n zeropad(minutes)}:${\n zeropad(secondsReturn)\n }${msTxt}`\n },\n\n // get a function that converts the units\n // + every time units are switched call the callback\n get(\n uuid: string, min: number, max: number, units: string | undefined,\n desiredUnits: undefined | null | string, commonUnitsName: string | null | undefined,\n switchUnitsCallback: (units: string) => void, temperatureSetting: \"celsius\" | \"fahrenheit\",\n secondsAsTimeSetting: boolean,\n ) {\n // validate the parameters\n if (typeof units === \"undefined\") {\n // eslint-disable-next-line no-param-reassign\n units = \"undefined\"\n }\n\n // it will be removed when we'll lift the state to redux\n currentTemperatureSetting = temperatureSetting\n currentSecondsAsTimeSetting = secondsAsTimeSetting\n\n // check if we support units conversion\n if (typeof scalableUnits[units] === \"undefined\"\n && typeof convertibleUnits[units] === \"undefined\"\n ) {\n // we can't convert these units\n // console.log('DEBUG: ' + uuid.toString() + ' can\\'t convert units: ' + units.toString());\n return (value: number) => value\n }\n\n // check if the caller wants the original units\n if (desiredUnits === undefined || desiredUnits === null || desiredUnits === \"original\"\n || desiredUnits === units\n ) {\n // console.log('DEBUG: ' + uuid.toString() + ' original units wanted');\n switchUnitsCallback(units)\n return identity\n }\n\n // now we know we can convert the units\n // and the caller wants some kind of conversion\n\n let tunits = null\n let tdivider = 0\n\n if (typeof scalableUnits[units] !== \"undefined\") {\n // units that can be scaled\n // we decide a divider\n\n if (desiredUnits === \"auto\") {\n // the caller wants to auto-scale the units\n\n // find the absolute maximum value that is rendered on the chart\n // based on this we decide the scale\n /* eslint-disable no-param-reassign */\n min = Math.abs(min)\n max = Math.abs(max)\n if (min > max) {\n max = min\n }\n /* eslint-enable no-param-reassign */\n\n const scalableUnitsGroup = scalableUnits[units]\n Object.keys(scalableUnitsGroup).forEach((unit) => {\n const unitDivider = scalableUnitsGroup[unit]\n if (unitDivider <= max && unitDivider > tdivider) {\n tunits = unit\n tdivider = unitDivider\n }\n })\n\n if (tunits === null || tdivider <= 0) {\n // we couldn't find auto-scaling candidate for unit\n switchUnitsCallback(units)\n return identity\n }\n\n if (typeof commonUnitsName === \"string\") {\n // the caller wants several charts to have the same units\n // data-common-units\n\n const commonUnitsKey = `${commonUnitsName}-${units}`\n\n // add our divider into the list of keys\n let t = this.keys[commonUnitsKey]\n if (typeof t === \"undefined\") {\n this.keys[commonUnitsKey] = {}\n t = this.keys[commonUnitsKey]\n }\n t[uuid] = {\n units: tunits,\n divider: tdivider,\n }\n\n // find the max divider of all charts\n let commonUnits = t[uuid]\n // todo remove imperative forEach\n Object.keys(t).forEach((x) => {\n if (t[x].divider > commonUnits.divider) {\n commonUnits = t[x]\n }\n })\n\n // save our common_max to the latest keys\n const latest = {\n units: commonUnits.units,\n divider: commonUnits.divider,\n }\n this.latest[commonUnitsKey] = latest\n\n tunits = latest.units\n tdivider = latest.divider\n\n // apply it to this chart\n switchUnitsCallback(tunits)\n return (value: number) => {\n if (tdivider !== latest.divider) {\n // another chart switched our common units\n // we should switch them too\n tunits = latest.units\n tdivider = latest.divider\n switchUnitsCallback(tunits)\n }\n\n return value / tdivider\n }\n }\n // the caller did not give data-common-units\n // this chart auto-scales independently of all others\n\n switchUnitsCallback(tunits)\n return (value: number) => value / tdivider\n }\n // the caller wants specific units\n\n if (typeof scalableUnits[units][desiredUnits] !== \"undefined\") {\n // all good, set the new units\n tdivider = scalableUnits[units][desiredUnits]\n switchUnitsCallback(desiredUnits)\n return (value: number) => value / tdivider\n }\n // oops! switch back to original units\n // eslint-disable-next-line no-console\n console.log(`Units conversion from ${units.toString()} to ${desiredUnits.toString()}\n is not supported.`)\n\n switchUnitsCallback(units)\n return identity\n } if (typeof convertibleUnits[units] !== \"undefined\") {\n // units that can be converted\n if (desiredUnits === \"auto\") {\n let newConvertFunction: ((number: number) => number | string) | undefined\n Object.keys(convertibleUnits[units]).forEach((x) => {\n if (newConvertFunction) { return }\n if (convertibleUnits[(units as string)][x].check(max)) {\n // converting\n switchUnitsCallback(x)\n newConvertFunction = convertibleUnits[(units as string)][x].convert\n }\n })\n if (newConvertFunction) {\n return newConvertFunction\n }\n\n // none checked ok (no conversion available)\n switchUnitsCallback(units)\n return identity\n } if (typeof convertibleUnits[units][desiredUnits] !== \"undefined\") {\n switchUnitsCallback(desiredUnits)\n return convertibleUnits[units][desiredUnits].convert\n }\n // eslint-disable-next-line no-console\n console.log(`Units conversion from ${units.toString()} to ${desiredUnits.toString()}\n is not supported.`)\n switchUnitsCallback(units)\n return identity\n }\n // hm... did we forget to implement the new type?\n // eslint-disable-next-line no-console\n console.log(`Unmatched unit conversion method for units ${units.toString()}`)\n switchUnitsCallback(units)\n return identity\n },\n}\n","import React, { useState, useCallback, useEffect } from \"react\"\nimport { ToolboxButton } from \"domains/chart/components/toolbox-button\"\nimport { setResizeHeightAction } from \"domains/chart/actions\"\nimport { LEGEND_BOTTOM_SINGLE_LINE_HEIGHT } from \"domains/chart/utils/legend-utils\"\nimport { useDispatch } from \"store/redux-separate-context\"\n\nexport const LOCALSTORAGE_HEIGHT_KEY_PREFIX_OLD = \"chart_heights.\"\nexport const LOCALSTORAGE_HEIGHT_KEY_PREFIX = \"chart_height.\"\n\ninterface Props {\n chartContainerElement: HTMLElement\n chartUuid: string\n heightId: string | undefined\n isLegendOnBottom: boolean\n}\n\nexport const ResizeHandler = ({\n chartContainerElement, chartUuid, heightId, isLegendOnBottom,\n}: Props) => {\n const [resizeHeight, setResizeHeight] = useState(() => chartContainerElement.clientHeight)\n const dispatch = useDispatch()\n\n useEffect(() => {\n // todo when attributes.id are present, hook height to localStorage\n if (resizeHeight >= 70) {\n dispatch(\n setResizeHeightAction({\n id: chartUuid,\n resizeHeight,\n }),\n )\n }\n }, [resizeHeight, chartUuid, heightId, dispatch])\n\n const handleResize = useCallback(\n (event) => {\n event.preventDefault()\n const intialHeight = chartContainerElement.clientHeight\n const eventStartHeight = event.type === \"touchstart\"\n ? event.touches[0].clientY\n : event.clientY\n\n const setHeight = (currentHeight: number) => {\n const nextHeight = intialHeight + currentHeight - eventStartHeight\n // eslint-disable-next-line no-param-reassign\n chartContainerElement.style.height = `${nextHeight.toString()}px`\n setResizeHeight(nextHeight)\n if (heightId) {\n const heightForPersistance = isLegendOnBottom\n ? (nextHeight - LEGEND_BOTTOM_SINGLE_LINE_HEIGHT)\n : nextHeight\n localStorage.setItem(\n `${LOCALSTORAGE_HEIGHT_KEY_PREFIX}${heightId}`,\n `${heightForPersistance}`,\n )\n }\n }\n\n const onMouseMove = (e: MouseEvent) => setHeight(e.clientY)\n const onTouchMove = (e: TouchEvent) => setHeight(e.touches[0].clientY)\n\n const onMouseEnd = () => {\n document.removeEventListener(\"mousemove\", onMouseMove)\n document.removeEventListener(\"mouseup\", onMouseEnd)\n }\n\n const onTouchEnd = () => {\n document.removeEventListener(\"touchmove\", onTouchMove)\n document.removeEventListener(\"touchend\", onTouchEnd)\n }\n\n if (event.type === \"touchstart\") {\n document.addEventListener(\"touchmove\", onTouchMove)\n document.addEventListener(\"touchend\", onTouchEnd)\n } else {\n document.addEventListener(\"mousemove\", onMouseMove)\n document.addEventListener(\"mouseup\", onMouseEnd)\n }\n },\n [chartContainerElement.clientHeight, chartContainerElement.style.height, heightId,\n isLegendOnBottom],\n )\n\n return (\n <ToolboxButton\n className=\"netdata-legend-resize-handler\"\n onDoubleClick={(event: React.MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n }}\n onMouseDown={handleResize}\n onTouchStart={handleResize}\n iconType=\"resize\"\n popoverTitle=\"Chart Resize\"\n popoverContent=\"Drag this point with your mouse or your finger (on touch devices), to resize\n the chart vertically. You can also <b>double click it</b> or <b>double tap it</b> to reset\n between 2 states: the default and the one that fits all the values.<br/><small>Help\n can be disabled from the settings.</small>\"\n />\n )\n}\n","import * as React from \"react\"\nimport classNames from \"classnames\"\n\nimport \"./button.css\"\n\ntype Props = React.ButtonHTMLAttributes<HTMLButtonElement>\nexport const Button = React.forwardRef(({\n children,\n className,\n ...rest\n}: Props, ref: React.Ref<HTMLButtonElement>) => (\n <button\n {...rest} // eslint-disable-line react/jsx-props-no-spreading\n type=\"button\"\n className={classNames(\"netdata-reset-button\", className)}\n ref={ref}\n >\n {children}\n </button>\n))\n","import React, { useRef, useEffect } from \"react\"\nimport classNames from \"classnames\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectShowHelp } from \"domains/global/selectors\"\nimport { Icon, IconType } from \"components/icon\"\nimport { Button } from \"components/button\"\n\ntype ClickCallback = (event: React.MouseEvent) => void\ninterface ToolboxButtonProps {\n className?: string\n iconType: IconType\n onClick?: ClickCallback\n onDoubleClick?: (event: React.MouseEvent) => void\n onMouseDown?: (event: React.MouseEvent) => void\n onTouchStart?: (event: React.TouchEvent) => void\n popoverContent: string\n popoverTitle: string\n}\nexport const ToolboxButton = ({\n className,\n iconType,\n onClick,\n onDoubleClick,\n onMouseDown,\n onTouchStart,\n popoverContent,\n popoverTitle,\n}: ToolboxButtonProps) => {\n const buttonRef = useRef(null)\n const showHelp = useSelector(selectShowHelp)\n useEffect(() => {\n if (buttonRef.current && showHelp) {\n window.$(buttonRef.current).popover({\n container: \"body\",\n animation: false,\n html: true,\n trigger: \"hover\",\n placement: \"bottom\",\n delay: {\n show: window.NETDATA.options.current.show_help_delay_show_ms,\n hide: window.NETDATA.options.current.show_help_delay_hide_ms,\n },\n title: popoverTitle,\n content: popoverContent,\n })\n }\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n return (\n <Button\n className={classNames(className)}\n onClick={onClick}\n onDoubleClick={onDoubleClick}\n onMouseDown={onMouseDown}\n onTouchStart={onTouchStart}\n ref={buttonRef}\n >\n <Icon iconType={iconType} />\n </Button>\n )\n}\n","import { createAction } from \"redux-act\"\n\nimport { createRequestAction } from \"utils/createRequestAction\"\nimport { RegistryMachine } from \"domains/global/sagas\"\nimport { storeKey } from \"./constants\"\nimport { ActiveAlarms, ChartsMetadata, Snapshot, Alarm, UserNodeAccessMessage } from \"./types\"\n\ninterface RequestCommonColors {\n chartContext: string\n chartUuid: string\n colorsAttribute: string | undefined\n commonColorsAttribute: string | undefined\n dimensionNames: string[]\n}\nexport const requestCommonColorsAction = createAction<RequestCommonColors>(\n `${storeKey}/globalRequestCommonColors`\n)\n\ninterface SetCommonMinAction {\n chartUuid: string\n commonMinKey: string\n value: number\n}\nexport const setCommonMinAction = createAction<SetCommonMinAction>(`${storeKey}/setCommonMin`)\n\ninterface SetCommonMaxAction {\n chartUuid: string\n commonMaxKey: string\n value: number\n}\nexport const setCommonMaxAction = createAction<SetCommonMaxAction>(`${storeKey}/setCommonMax`)\n\ninterface SetGlobalSelectionAction {\n chartUuid: string | null\n hoveredX: number\n}\nexport const setGlobalSelectionAction = createAction<SetGlobalSelectionAction>(\n `${storeKey}/setGlobalSelection`\n)\n\nexport interface SetGlobalPanAndZoomAction {\n after: number\n before: number\n masterID?: string\n shouldForceTimeRange?: boolean\n}\nexport const setGlobalPanAndZoomAction = createAction<SetGlobalPanAndZoomAction>(\n `${storeKey}/setGlobalPanAndZoom`\n)\n\nexport const resetGlobalPanAndZoomAction = createAction(`${storeKey}/resetGlobalPanAndZoomAction`)\n\nexport interface SetDefaultAfterAction {\n after: number\n}\nexport const setDefaultAfterAction = createAction<SetDefaultAfterAction>(\n `${storeKey}/setDefaultAfterAction`\n)\n\nexport const resetDefaultAfterAction = createAction(`${storeKey}/resetDefaultAfterAction`)\n\nexport interface SetGlobalChartUnderlayAction {\n after: number\n before: number\n masterID: string\n}\nexport const setGlobalChartUnderlayAction = createAction<SetGlobalChartUnderlayAction>(\n `${storeKey}/setGlobalChartUnderlay`\n)\n\nexport const centerAroundHighlightAction = createAction(`${storeKey}/centerAroundHighlightAction`)\nexport const clearHighlightAction = createAction(`${storeKey}/clearHighlightAction`)\n\ninterface WindowFocusChangeAction {\n hasWindowFocus: boolean\n}\nexport const windowFocusChangeAction = createAction<WindowFocusChangeAction>(\n `${storeKey}/windowFocusChangeAction`\n)\n\nexport interface FetchHelloPayload {\n serverDefault: string\n}\n/* eslint-disable camelcase */\nexport interface HelloResponse {\n action: \"hello\"\n anonymous_statistics: boolean\n cloud_base_url: string\n hostname: string\n machine_guid: string\n registry: string\n status: string\n}\n/* eslint-enable camelcase */\n\nexport const fetchHelloAction = createRequestAction<\n FetchHelloPayload,\n { cloudBaseURL: string; hostname: string; isCloudEnabled: boolean; machineGuid: string }\n>(`${storeKey}/fetchHelloAction`)\n\ninterface UpdatePersonUrlsAction {\n personGuid: string\n registryMachines: { [key: string]: RegistryMachine }\n registryMachinesArray: RegistryMachine[]\n}\nexport const updatePersonUrlsAction = createAction<UpdatePersonUrlsAction>(\n `${storeKey}/updatePersonUrlsAction`\n)\n\nexport interface AccessRegistrySuccessAction {\n registryServer: string\n}\nexport const accessRegistrySuccessAction = createAction<AccessRegistrySuccessAction>(\n `${storeKey}/accessRegistrySuccessAction`\n)\n\nexport interface StartAlarmsPayload {\n serverDefault: string\n}\nexport const startAlarmsAction = createAction<StartAlarmsPayload>(`${storeKey}/startAlarmsAction`)\n\nexport const fetchAllAlarmsAction = createRequestAction(`${storeKey}/fetchAllAlarmsAction`)\n\nexport interface UpdateActiveAlarmAction {\n activeAlarms: ActiveAlarms\n}\nexport const updateActiveAlarmsAction = createAction<UpdateActiveAlarmAction>(\n `${storeKey}/updateActiveAlarmsAction`\n)\n\nexport interface SetOptionAction {\n key: string\n value: unknown\n}\nexport const setOptionAction = createAction<SetOptionAction>(`${storeKey}/setOptionAction`)\n\nexport const resetOptionsAction = createAction(`${storeKey}/resetOptions`)\n\nexport const loadSnapshotAction = createAction<{ snapshot: Snapshot }>(\n `${storeKey}/loadSnapshotAction`\n)\n\nexport const chartsMetadataRequestSuccess = createAction<{ data: ChartsMetadata }>(\n `${storeKey}/chartsMetadataRequestSuccess`\n)\n\nexport interface SetSpacePanelStatusActionPayload {\n isActive: boolean\n}\nexport const setSpacePanelStatusAction = createAction<SetSpacePanelStatusActionPayload>(\n `${storeKey}/setSpacePanelStatusAction`\n)\n\nexport interface SetSpacePanelTransitionEndPayload {\n isActive: boolean\n}\nexport const setSpacePanelTransitionEndAction = createAction<SetSpacePanelTransitionEndPayload>(\n `${storeKey}/setSpacePanelStatusAction`\n)\n\nexport const setAlarmAction = createAction<{ alarm: Alarm }>(`${storeKey}/setAlarmAction`)\n\nexport const resetRegistry = createAction(`${storeKey}/resetRegistry`)\n\nexport const setGlobalPauseAction = createAction(`${storeKey}/setGlobalPauseAction`)\nexport const resetGlobalPauseAction = createAction<{ forcePlay?: boolean }>(\n `${storeKey}/resetGlobalPauseAction`\n)\nexport const setUTCOffset = createAction<{ utcOffset?: number | string }>(\n `${storeKey}/setUTCOffset`\n)\n\nexport const setUserNodeAccess = createAction<{ message: UserNodeAccessMessage }>(\n `${storeKey}/setUserNodeAccess`\n)\n","import { useCallback } from \"react\"\nimport { useDispatch } from \"react-redux\"\nimport { sendToChildIframe, useListenToPostMessage } from \"utils/post-message\"\nimport { setUserNodeAccess } from \"domains/global/actions\"\nimport { UserNodeAccessMessage } from \"domains/global/types\"\nimport { SIGN_IN_IFRAME_ID } from \"components/header/constants\"\n\nconst useUserNodeAccessMessage = () => {\n const dispatch = useDispatch()\n useListenToPostMessage<UserNodeAccessMessage>(\"user-node-access\", message => {\n dispatch(setUserNodeAccess({ message }))\n })\n}\n\nexport const useRequestRefreshOfAccessMessage = () => {\n return useCallback(() => {\n sendToChildIframe(SIGN_IN_IFRAME_ID, { type: \"request-refresh-access\", payload: true })\n }, [])\n}\n\nexport default useUserNodeAccessMessage\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Text, getColor } from \"@netdata/netdata-ui\"\n\nconst BaseAnchor = styled(\"a\")`\n && {\n color: ${getColor(\"primary\")};\n\n :hover {\n color: ${getColor(\"primary\")};\n }\n\n :visited {\n color: ${getColor(\"accent\")};\n }\n }\n`\n\ntype AnchorProps = React.ComponentPropsWithRef<\"a\"> & {\n Component?: React.ElementType\n}\n\nconst Anchor = ({ Component = Text, ...rest }: AnchorProps): any => (\n <Component as={BaseAnchor} {...rest} />\n)\n\nexport default Anchor\n","export * from \"./utils\"\n","export const name2id = (s: string) => s\n .replace(/ /g, \"_\")\n .replace(/:/g, \"_\")\n .replace(/\\(/g, \"_\")\n .replace(/\\)/g, \"_\")\n .replace(/\\./g, \"_\")\n .replace(/\\//g, \"_\")\n","import { init, last, mergeAll } from \"ramda\"\nimport { createReducer } from \"redux-act\"\n\nimport { getInitialAfterFromWindow } from \"utils/utils\"\nimport { isMainJs } from \"utils/env\"\nimport { RegistryMachine } from \"domains/global/sagas\"\nimport { Alarm, ActiveAlarms, Snapshot, ChartsMetadata } from \"domains/global/types\"\nimport { fetchInfoAction } from \"domains/chart/actions\"\nimport { InfoPayload } from \"./__mocks__/info-mock\"\nimport {\n requestCommonColorsAction,\n setGlobalChartUnderlayAction,\n setGlobalSelectionAction,\n setGlobalPanAndZoomAction,\n centerAroundHighlightAction,\n clearHighlightAction,\n resetGlobalPanAndZoomAction,\n setDefaultAfterAction,\n windowFocusChangeAction,\n fetchHelloAction,\n updatePersonUrlsAction,\n startAlarmsAction,\n updateActiveAlarmsAction,\n setOptionAction,\n loadSnapshotAction,\n chartsMetadataRequestSuccess,\n setCommonMaxAction,\n setCommonMinAction,\n resetOptionsAction,\n setSpacePanelStatusAction,\n setSpacePanelTransitionEndAction,\n resetRegistry,\n accessRegistrySuccessAction,\n resetDefaultAfterAction,\n setAlarmAction,\n setGlobalPauseAction,\n resetGlobalPauseAction,\n setUTCOffset,\n setUserNodeAccess,\n} from \"./actions\"\nimport {\n Options,\n optionsMergedWithLocalStorage,\n getOptionsMergedWithLocalStorage,\n clearLocalStorage,\n} from \"./options\"\nimport { CLOUD_BASE_URL_DISABLED } from \"./constants\"\nimport { UserNodeAccessMessage } from \"./types\"\n\ninterface CommonMinMax {\n [commonKey: string]: {\n charts: {\n [chartUuid: string]: number\n }\n currentExtreme: number\n }\n}\n\nexport type StateT = {\n commonColorsKeys: {\n [key: string]: {\n // key can be uuid, chart's context or commonColors attribute\n assigned: {\n // name-value of dimensions and their colors\n [dimensionName: string]: string\n }\n available: string[] // an array of colors available to be used\n custom: string[] // the array of colors defined by the user\n charts: {} // the charts linked to this todo remove\n copyTheme: boolean\n }\n }\n commonMin: CommonMinMax\n commonMax: CommonMinMax\n currentSelectionMasterId: string | null\n globalPanAndZoom: null | {\n after: number // timestamp in ms\n before: number // timestamp in ms\n masterID?: string\n shouldForceTimeRange?: boolean\n }\n defaultAfter: number\n globalChartUnderlay: null | {\n after: number\n before: number\n masterID: string\n }\n hoveredX: number | null\n hasWindowFocus: boolean\n globalPause: boolean\n\n spacePanelIsActive: boolean\n spacePanelTransitionEndIsActive: boolean\n\n registry: {\n cloudBaseURL: string | null\n hasFetchedHello: boolean\n isHelloCallError: boolean | null\n hasFetchedInfo: boolean\n hostname: string\n isCloudEnabled: boolean | null\n isCloudAvailable: boolean | null\n isAgentClaimed: boolean | null\n isACLKAvailable: boolean | null\n hasStartedInfo: boolean\n fullInfoPayload: InfoPayload | null\n isFetchingHello: boolean\n machineGuid: string | null\n personGuid: string | null\n registryMachines: { [key: string]: RegistryMachine } | null\n registryMachinesArray: RegistryMachine[] | null\n registryServer: string | null\n }\n\n chartsMetadata: {\n isFetching: boolean\n isFetchingError: boolean\n data: null | ChartsMetadata\n }\n\n alarms: {\n activeAlarms: null | ActiveAlarms\n hasStartedAlarms: boolean\n }\n alarm: null | Alarm\n\n snapshot: Snapshot | null\n options: Options\n userNodeAccess: UserNodeAccessMessage\n}\n\nexport const initialDefaultAfter = isMainJs ? getInitialAfterFromWindow() : -900\n\nexport const initialState: StateT = {\n commonColorsKeys: {},\n commonMin: {},\n commonMax: {},\n currentSelectionMasterId: null,\n globalPanAndZoom: null,\n // todo for dashboard calculate it based on width and window.NETDATA.chartDefaults.after\n defaultAfter: initialDefaultAfter,\n globalChartUnderlay: null,\n hoveredX: null,\n hasWindowFocus: document.hasFocus(),\n globalPause: false,\n spacePanelIsActive: false, // set to true only for testing layout\n // the same as property above, just updated after transition ends\n spacePanelTransitionEndIsActive: false,\n\n registry: {\n cloudBaseURL: null,\n hasFetchedInfo: false,\n hasFetchedHello: false,\n isHelloCallError: null,\n hostname: \"unknown\",\n isCloudEnabled: null,\n isCloudAvailable: null,\n isAgentClaimed: null,\n isACLKAvailable: null,\n hasStartedInfo: false,\n isFetchingHello: false,\n fullInfoPayload: null,\n machineGuid: null,\n personGuid: null,\n registryMachines: null,\n registryMachinesArray: null,\n registryServer: null,\n },\n\n snapshot: null,\n alarms: {\n activeAlarms: null,\n hasStartedAlarms: false,\n },\n alarm: null,\n\n chartsMetadata: {\n isFetching: false,\n isFetchingError: false,\n data: null,\n },\n\n options: optionsMergedWithLocalStorage,\n userNodeAccess: null,\n}\n\nexport const globalReducer = createReducer<StateT>({}, initialState)\n\nexport interface GetKeyArguments {\n colorsAttribute: string | undefined\n commonColorsAttribute: string | undefined\n chartUuid: string\n chartContext: string\n}\nexport const getKeyForCommonColorsState = ({\n colorsAttribute,\n commonColorsAttribute,\n chartUuid,\n chartContext,\n}: GetKeyArguments) => {\n const hasCustomColors = typeof colorsAttribute === \"string\" && colorsAttribute.length > 0\n\n // when there's commonColors attribute, share the state between all charts with that attribute\n // if not, when there are custom colors, make each chart independent\n // if not, share the same state between charts with the same context\n return commonColorsAttribute || (hasCustomColors ? chartUuid : chartContext)\n}\n\nconst hasLastOnly = (array: string[]) => last(array) === \"ONLY\"\nconst removeLastOnly = (array: string[]) => (hasLastOnly(array) ? init(array) : array)\nconst createCommonColorsKeysSubstate = (\n colorsAttribute: string | undefined,\n hasCustomColors: boolean\n) => {\n const custom = hasCustomColors ? removeLastOnly((colorsAttribute as string).split(\" \")) : []\n const shouldCopyTheme = hasCustomColors\n ? // disable copyTheme when there's \"ONLY\" keyword in \"data-colors\" attribute\n !hasLastOnly((colorsAttribute as string).split(\" \"))\n : true\n const available = [\n ...custom,\n ...(shouldCopyTheme || custom.length === 0 ? window.NETDATA.themes.current.colors : []),\n ]\n return {\n assigned: {},\n available,\n custom,\n }\n}\n\nglobalReducer.on(\n requestCommonColorsAction,\n //@ts-ignore\n (state, { chartContext, chartUuid, colorsAttribute, commonColorsAttribute, dimensionNames }) => {\n const keyName = getKeyForCommonColorsState({\n colorsAttribute,\n commonColorsAttribute,\n chartUuid,\n chartContext,\n })\n\n const hasCustomColors = typeof colorsAttribute === \"string\" && colorsAttribute.length > 0\n const subState =\n state.commonColorsKeys[keyName] ||\n createCommonColorsKeysSubstate(colorsAttribute, hasCustomColors)\n\n const currentlyAssignedNr = Object.keys(subState.assigned).length\n const requestedDimensionsAssigned = mergeAll(\n dimensionNames\n // dont assign already assigned dimensions\n .filter(dimensionName => !subState.assigned[dimensionName])\n .map((dimensionName, i) => ({\n [dimensionName]:\n subState.available[(i + currentlyAssignedNr) % subState.available.length],\n }))\n )\n const assigned = {\n ...subState.assigned,\n ...requestedDimensionsAssigned,\n }\n\n return {\n ...state,\n commonColorsKeys: {\n ...state.commonColorsKeys,\n [keyName]: {\n ...subState,\n assigned,\n },\n },\n }\n }\n)\n\nglobalReducer.on(setCommonMinAction, (state, { chartUuid, commonMinKey, value }) => {\n const charts = {\n ...state.commonMin[commonMinKey]?.charts,\n [chartUuid]: value,\n }\n const currentExtreme = Math.min(...Object.values(charts))\n\n return {\n ...state,\n commonMin: {\n ...state.commonMin,\n [commonMinKey]: {\n charts,\n currentExtreme,\n },\n },\n }\n})\n\nglobalReducer.on(setCommonMaxAction, (state, { chartUuid, commonMaxKey, value }) => {\n const charts = {\n ...state.commonMax[commonMaxKey]?.charts,\n [chartUuid]: value,\n }\n const currentExtreme = Math.max(...Object.values(charts))\n\n return {\n ...state,\n commonMax: {\n ...state.commonMax,\n [commonMaxKey]: {\n charts,\n currentExtreme,\n },\n },\n }\n})\n\nglobalReducer.on(setSpacePanelStatusAction, (state, { isActive }) => ({\n ...state,\n spacePanelIsActive: isActive,\n}))\n\nglobalReducer.on(setSpacePanelTransitionEndAction, (state, { isActive }) => ({\n ...state,\n spacePanelTransitionEndIsActive: isActive,\n}))\n\nglobalReducer.on(setGlobalSelectionAction, (state, { chartUuid, hoveredX }) => ({\n ...state,\n hoveredX,\n currentSelectionMasterId: chartUuid,\n}))\n\nglobalReducer.on(setGlobalPanAndZoomAction, (state, payload) => ({\n ...state,\n globalPanAndZoom: payload,\n}))\n\nglobalReducer.on(resetGlobalPanAndZoomAction, state => ({\n ...state,\n globalPanAndZoom: initialState.globalPanAndZoom,\n hoveredX: initialState.hoveredX, // need to reset this also on mobile\n}))\n\nglobalReducer.on(setDefaultAfterAction, (state, { after }) => ({\n ...state,\n defaultAfter: after,\n}))\n\nglobalReducer.on(resetDefaultAfterAction, state => ({\n ...state,\n defaultAfter: initialState.defaultAfter,\n}))\n\nglobalReducer.on(setGlobalChartUnderlayAction, (state, { after, before, masterID }) => ({\n ...state,\n globalChartUnderlay: {\n after,\n before,\n masterID,\n },\n}))\n\nglobalReducer.on(centerAroundHighlightAction, state => {\n if (!state.globalChartUnderlay) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot center around empty selection\")\n return state\n }\n const { after, before } = state.globalChartUnderlay\n const highlightMargin = (before - after) / 2\n return {\n ...state,\n globalPanAndZoom: {\n after: after - highlightMargin,\n before: before + highlightMargin,\n },\n }\n})\n\nglobalReducer.on(\n clearHighlightAction,\n (state, { resetPanAndZoom = true }: { resetPanAndZoom?: boolean } = {}) => ({\n ...state,\n globalChartUnderlay: initialState.globalChartUnderlay,\n ...(resetPanAndZoom ? { globalPanAndZoom: initialState.globalPanAndZoom } : {}),\n })\n)\n\nglobalReducer.on(windowFocusChangeAction, (state, { hasWindowFocus }) => {\n // make additional check, because it's possible to get hasWindowFocus === false\n // message from iframe, after main window makes the state change (race condition)\n const hasFocusNow = document.hasFocus()\n return {\n ...state,\n hasWindowFocus: hasFocusNow || hasWindowFocus,\n }\n})\n\nglobalReducer.on(setGlobalPauseAction, state => ({ ...state, globalPause: true }))\nglobalReducer.on(resetGlobalPauseAction, (state, { forcePlay }) => ({\n ...state,\n globalPause: initialState.globalPause,\n globalPanAndZoom: initialState.globalPanAndZoom,\n hoveredX: initialState.hoveredX,\n options: { ...state.options, stop_updates_when_focus_is_lost: !forcePlay },\n}))\n\nglobalReducer.on(setUTCOffset, (state, { utcOffset }) => ({\n ...state,\n options: { ...state.options, utcOffset },\n}))\n\nglobalReducer.on(fetchHelloAction.request, state => ({\n ...state,\n registry: {\n ...state.registry,\n isFetchingHello: true,\n },\n}))\n\nglobalReducer.on(fetchHelloAction.success, (state, { cloudBaseURL, hostname, machineGuid }) => ({\n ...state,\n registry: {\n ...state.registry,\n cloudBaseURL,\n isFetchingHello: false,\n hasFetchedHello: true,\n hostname,\n machineGuid,\n },\n}))\nglobalReducer.on(fetchHelloAction.failure, state => ({\n ...state,\n registry: {\n ...state.registry,\n cloudBaseURL: CLOUD_BASE_URL_DISABLED,\n isFetchingHello: false,\n isHelloCallError: true,\n },\n}))\nglobalReducer.on(accessRegistrySuccessAction, (state, { registryServer }) => ({\n ...state,\n registry: {\n ...state.registry,\n registryServer,\n },\n}))\n\nglobalReducer.on(resetRegistry, state => ({\n ...state,\n registry: {\n ...state.registry,\n hasFetchedHello: initialState.registry.hasFetchedHello,\n },\n}))\n\nglobalReducer.on(fetchInfoAction, state => ({\n ...state,\n registry: {\n ...state.registry,\n hasStartedInfo: true,\n },\n}))\nglobalReducer.on(\n fetchInfoAction.success,\n (\n state,\n { isCloudAvailable, isCloudEnabled, isAgentClaimed, isACLKAvailable, fullInfoPayload }\n ) => ({\n ...state,\n registry: {\n ...state.registry,\n hasFetchedInfo: true,\n isCloudAvailable,\n isCloudEnabled,\n isAgentClaimed,\n isACLKAvailable,\n fullInfoPayload,\n },\n })\n)\n\nglobalReducer.on(fetchInfoAction.failure, state => ({\n ...state,\n registry: {\n ...state.registry,\n isCloudAvailable: false,\n isCloudEnabled: false,\n isAgentClaimed: false,\n isACLKAvailable: false,\n },\n}))\n\nglobalReducer.on(\n updatePersonUrlsAction,\n (state, { personGuid, registryMachines, registryMachinesArray }) => ({\n ...state,\n registry: {\n ...state.registry,\n personGuid,\n registryMachines,\n registryMachinesArray,\n },\n })\n)\n\nglobalReducer.on(startAlarmsAction, state => ({\n ...state,\n alarms: {\n ...state.alarms,\n hasStartedAlarms: true,\n },\n}))\n\nglobalReducer.on(updateActiveAlarmsAction, (state, { activeAlarms }) => ({\n ...state,\n alarms: {\n ...state.alarms,\n activeAlarms,\n },\n}))\n\nglobalReducer.on(setOptionAction, (state, { key, value }) => ({\n ...state,\n options: {\n ...state.options,\n [key]: value,\n },\n}))\n\nglobalReducer.on(resetOptionsAction, state => {\n clearLocalStorage()\n return {\n ...state,\n options: getOptionsMergedWithLocalStorage(),\n }\n})\n\nglobalReducer.on(loadSnapshotAction, (state, { snapshot }) => {\n const parsedData = Object.keys(snapshot.data)\n .map(dataKey => {\n let uncompressed\n try {\n // @ts-ignore\n uncompressed = snapshot.uncompress(snapshot.data[dataKey])\n\n // repeat old logging\n if (uncompressed === null) {\n // eslint-disable-next-line no-console\n console.warn(`uncompressed snapshot data for key ${dataKey} is null`)\n return null\n }\n\n if (typeof uncompressed === \"undefined\") {\n // eslint-disable-next-line no-console\n console.warn(`uncompressed snapshot data for key ${dataKey} is undefined`)\n return null\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(`decompression of snapshot data for key ${dataKey} failed`, e)\n uncompressed = null\n }\n\n if (typeof uncompressed !== \"string\") {\n // eslint-disable-next-line no-console\n console.warn(`uncompressed snapshot data for key ${dataKey} is not string`)\n return {}\n }\n\n let data\n try {\n data = JSON.parse(uncompressed)\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(`parsing snapshot data for key ${dataKey} failed`)\n return {}\n }\n\n return { [dataKey]: data }\n })\n .reduce((acc, obj) => ({ ...acc, ...obj }), {})\n\n return {\n ...state,\n snapshot: {\n ...snapshot,\n data: parsedData as { [key: string]: unknown },\n },\n }\n})\n\nglobalReducer.on(setAlarmAction, (state, { alarm }) => ({\n ...state,\n alarm,\n}))\n\nglobalReducer.on(chartsMetadataRequestSuccess, (state, { data }) => ({\n ...state,\n chartsMetadata: {\n ...state.chartsMetadata,\n data,\n },\n}))\n\nglobalReducer.on(setUserNodeAccess, (state, { message }) => ({ ...state, userNodeAccess: message }))\n","import React from \"react\"\nimport classNames from \"classnames\"\n\n// todo add supoort for window.netdataIcons\nexport type IconType = \"left\" | \"reset\" | \"right\" | \"zoomIn\" | \"zoomOut\" | \"resize\" | \"lineChart\"\n | \"areaChart\" | \"noChart\" | \"loading\" | \"noData\"\nconst typeToClassName = (iconType: IconType) => ({\n left: \"fa-backward\",\n reset: \"fa-play\",\n right: \"fa-forward\",\n zoomIn: \"fa-plus\",\n zoomOut: \"fa-minus\",\n resize: \"fa-sort\",\n lineChart: \"fa-chart-line\",\n areaChart: \"fa-chart-area\",\n noChart: \"fa-chart-area\",\n loading: \"fa-sync-alt\",\n noData: \"fa-exclamation-triangle\",\n} as {[key in IconType]: string})[iconType]\n\ninterface Props {\n iconType: IconType\n}\nexport const Icon = ({ iconType }: Props) => (\n <i className={classNames(\"fas\", typeToClassName(iconType))} />\n)\n","import {\n map, omit, assoc, pick,\n} from \"ramda\"\nimport { createReducer } from \"redux-act\"\n\nimport { setOptionAction } from \"domains/global/actions\"\nimport { SYNC_PAN_AND_ZOOM } from \"domains/global/options\"\nimport { useNewKeysOnlyIfDifferent } from \"utils/utils\"\n\nimport {\n fetchDataAction,\n fetchChartAction,\n setResizeHeightAction,\n clearChartStateAction,\n fetchDataForSnapshotAction,\n snapshotExportResetAction,\n setChartPanAndZoomAction,\n resetChartPanAndZoomAction,\n fetchDataCancelAction,\n} from \"./actions\"\nimport { ChartState } from \"./chart-types\"\n\nexport type StateT = {\n [chartID: string]: ChartState\n}\n\nexport const initialState = {\n}\nexport const initialSingleState = {\n chartData: null,\n chartId: null,\n chartMetadata: null,\n chartPanAndZoom: null,\n fetchDataParams: {\n isRemotelyControlled: false,\n viewRange: null,\n },\n isFetchingData: false,\n isFetchDataFailure: false,\n isFetchDetailsFailure: false,\n isFetchingDetails: false,\n resizeHeight: null,\n\n snapshotDataIsFetching: false,\n snapshotDataIsError: false,\n snapshotData: null,\n viewRange: null,\n}\n\nexport const chartReducer = createReducer<StateT>(\n {},\n initialState,\n)\n\nexport const getSubstate = (state: StateT, id: string) => state[id] || initialSingleState\n\nchartReducer.on(fetchDataAction.request, (state, { chart, fetchDataParams, id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartId: chart,\n isFetchingData: true,\n viewRange: fetchDataParams.viewRange,\n },\n}))\n\nchartReducer.on(fetchDataCancelAction, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchingData: false,\n },\n}))\n\nchartReducer.on(fetchDataAction.failure, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchingData: false,\n isFetchDataFailure: true,\n },\n}))\n\nchartReducer.on(fetchDataAction.success, (state, { id, chartData, fetchDataParams }) => {\n const substate = getSubstate(state, id)\n return {\n ...state,\n [id]: {\n ...substate,\n chartData: useNewKeysOnlyIfDifferent([\"dimension_names\"], substate.chartData, chartData!),\n fetchDataParams,\n isFetchingData: false,\n isFetchDataFailure: false,\n viewRange: fetchDataParams.viewRange,\n },\n }\n})\n\n\nchartReducer.on(fetchDataForSnapshotAction.request, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n snapshotDataIsFetching: true,\n },\n}))\n\nchartReducer.on(fetchDataForSnapshotAction.failure, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n snapshotDataIsFetching: false,\n snapshotDataIsError: true,\n },\n}))\n\nchartReducer.on(fetchDataForSnapshotAction.success, (state, { id, snapshotData }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n snapshotDataIsFetching: false,\n snapshotDataIsError: false,\n snapshotData,\n },\n}))\n\nchartReducer.on(snapshotExportResetAction, (state) => map((substate) => ({\n ...substate,\n ...pick([\"snapshotDataIsFetching\", \"snapshotDataIsError\", \"snapshotData\"], initialSingleState),\n}), state))\n\n\nchartReducer.on(fetchChartAction.request, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchingDetails: true,\n },\n}))\n\nchartReducer.on(fetchChartAction.failure, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n isFetchDetailsFailure: true,\n },\n}))\n\nchartReducer.on(fetchChartAction.success, (state, { id, chartMetadata }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartMetadata,\n isFetchingDetails: false,\n isFetchDetailsFailure: false,\n },\n}))\n\n// todo handle errors without creating a loop\n// chartReducer.on(fetchChartAction.failure, (state, { id }) => ({\n// ...state,\n// [id]: {\n// ...getSubstate(state, id),\n// isFetchingDetails: false,\n// },\n// }))\n\nchartReducer.on(setResizeHeightAction, (state, { id, resizeHeight }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n resizeHeight,\n },\n}))\n\nchartReducer.on(setChartPanAndZoomAction, (state, {\n after, before, id, shouldForceTimeRange,\n}) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartPanAndZoom: { after, before, shouldForceTimeRange },\n },\n}))\n\nchartReducer.on(resetChartPanAndZoomAction, (state, { id }) => ({\n ...state,\n [id]: {\n ...getSubstate(state, id),\n chartPanAndZoom: initialSingleState.chartPanAndZoom,\n },\n}))\n\nchartReducer.on(setOptionAction, (state, { key, value }) => {\n // clear chartPanAndZoom, when SYNC_PAN_AND_ZOOM flag is turned on\n if (key === SYNC_PAN_AND_ZOOM && value === true) {\n return map(\n assoc(\"chartPanAndZoom\", initialSingleState.chartPanAndZoom),\n state,\n )\n }\n return state\n})\n\nchartReducer.on(clearChartStateAction, (state, { id }) => omit([id], state))\n","import { mapObjIndexed, mergeAll, isEmpty } from \"ramda\"\nimport { Method } from \"axios\"\nimport { initialLegendRight } from \"domains/global/options\"\nimport { ChartLibraryName } from \"./chartLibrariesSettings\"\n\ntype OutputValue = string | boolean | number | null | undefined | any[]\n// almost the same as in old dashboard to ensure readers that it works the same way\nconst getDataAttribute = (element: Element, key: string, defaultValue?: OutputValue) => {\n const dataKey = `data-${key}`\n if (element.hasAttribute(dataKey)) {\n // we know it's not null because of hasAttribute()\n const data = element.getAttribute(dataKey) as string\n\n if (data === \"true\") {\n return true\n }\n if (data === \"false\") {\n return false\n }\n if (data === \"null\") {\n return null\n }\n\n // Only convert to a number if it doesn't change the string\n if (data === `${+data}`) {\n return +data\n }\n\n if (/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/.test(data)) {\n return JSON.parse(data)\n }\n\n return data\n }\n // if no default is passed, then it's undefined and can be replaced with default value later\n // it is recommended to do it in props destructuring assignment phase, ie.:\n // const Chart = ({ dygraphPointsize = 1 }) => ....\n return defaultValue\n}\n\nconst getDataAttributeBoolean = (element: Element, key: string, defaultValue?: boolean) => {\n const value = getDataAttribute(element, key, defaultValue)\n\n if (value === true || value === false) { // gmosx: Love this :)\n return value\n }\n\n if (typeof (value) === \"string\") {\n if (value === \"yes\" || value === \"on\") {\n return true\n }\n\n if (value === \"\" || value === \"no\" || value === \"off\" || value === \"null\") {\n return false\n }\n\n return defaultValue\n }\n\n if (typeof (value) === \"number\") {\n return value !== 0\n }\n\n return defaultValue\n}\n\ninterface BaseAttributeConfig {\n key: string\n defaultValue?: OutputValue\n}\ninterface BooleanAttributeConfig extends BaseAttributeConfig {\n type: \"boolean\"\n defaultValue?: boolean\n}\ntype AttributeConfig = BaseAttributeConfig | BooleanAttributeConfig\n\nexport interface StaticAttributes {\n id: string\n host?: string | undefined\n httpMethod?: Method\n title?: string\n chartLibrary: ChartLibraryName\n width: number | string | null\n height?: number | string | null\n after?: number\n before?: number\n legend?: boolean\n legendPosition?: \"bottom\" | \"right\"\n units?: string\n unitsCommon?: string\n unitsDesired?: string\n aggrMethod?: string\n labels?: {[key: string]: string}\n postGroupBy?: string\n dimensionsAggrMethod?: string\n postAggregationMethod?: string\n aggrGroups?: string[]\n selectedChart?: string\n filteredRows?: string[] | null\n groupBy?: string\n nodeIDs?: string[]\n colors?: string\n commonColors?: string\n decimalDigits?: number\n dimensions?: string\n selectedDimensions?: string[]\n forceTimeWindow?: boolean\n\n appendOptions?: string | undefined\n gtime?: number\n method?: string\n overrideOptions?: string\n pixelsPerPoint?: number\n points?: number\n heightId?: string\n hideResizeHandler?: boolean\n detectResize?: boolean\n commonMin?: string\n commonMax?: string\n\n dygraphType?: string\n dygraphValueRange?: any[]\n dygraphTheme?: string\n dygraphSmooth?: boolean\n dygraphColors?: string[]\n dygraphRightGap?: number\n dygraphShowRangeSelector?: boolean\n dygraphShowRoller?: boolean\n dygraphTitle?: string\n dygraphTitleHeight?: number\n dygraphLegend?: \"always\" | \"follow\" | \"onmouseover\" | \"never\"\n dygraphLabelsDiv?: string\n dygraphLabelsSeparateLine?: boolean\n dygraphIncludeZero?: boolean\n dygraphShowZeroValues?: boolean\n dygraphShowLabelsOnHighLight?: boolean\n dygraphHideOverlayOnMouseOut?: boolean\n dygraphXRangePad?: number\n dygraphYRangePad?: number\n dygraphYLabelWidth?: number\n dygraphStrokeWidth?: number\n dygraphStrokePattern?: number[]\n dygraphDrawPoints?: boolean\n dygraphDrawGapEdgePoints?: boolean\n dygraphConnectSeparatedPoints?: boolean\n dygraphPointSize?: number\n dygraphStepPlot?: boolean\n dygraphStrokeBorderColor?: string\n dygraphStrokeBorderWidth?: number\n dygraphFillGraph?: boolean\n dygraphFillAlpha?: number\n dygraphStackedGraph?: boolean\n dygraphStackedGraphNanFill?: string\n dygraphAxisLabelFontSize?: number\n dygraphAxisLineColor?: string\n dygraphAxisLineWidth?: number\n dygraphDrawGrid?: boolean\n dygraphGridLinePattern?: number[]\n dygraphGridLineWidth?: number\n dygraphGridLineColor?: string\n dygraphMaxNumberWidth?: number\n dygraphSigFigs?: number\n dygraphDigitsAfterDecimal?: number\n dygraphHighlighCircleSize?: number\n dygraphHighlightSeriesOpts?: {[options: string]: number}\n dygraphHighlightSeriesBackgroundAlpha?: number\n dygraphXPixelsPerLabel?: number\n dygraphXAxisLabelWidth?: number\n dygraphDrawXAxis?: boolean\n dygraphYPixelsPerLabel?: number\n dygraphYAxisLabelWidth?: number\n dygraphDrawYAxis?: boolean\n dygraphDrawAxis?: boolean\n\n easyPieChartMinValue?: number\n easyPieChartMaxValue?: number\n easyPieChartBarColor?: string\n easyPieChartTrackColor?: string\n easyPieChartScaleColor?: string,\n easyPieChartScaleLength?: number,\n easyPieChartLineCap?: string,\n easyPieChartLineWidth?: string,\n easyPieChartTrackWidth?: string,\n easyPieChartSize?: string,\n easyPieChartRotate?: number,\n easyPieChartAnimate?: string,\n easyPieChartEasing?: string,\n\n gaugeMinValue?: number,\n gaugeMaxValue?: number,\n gaugePointerColor?: string,\n gaugeStrokeColor?: string,\n gaugeStartColor?: string,\n gaugeStopColor?: string,\n gaugeGenerateGradient?: boolean | string[],\n\n sparklineType?: string,\n sparklineLineColor?: string,\n sparklineFillColor?: string,\n sparklineChartRangeMin?: string,\n sparklineChartRangeMax?: string,\n sparklineComposite?: string,\n sparklineEnableTagOptions?: string,\n sparklineTagOptionPrefix?: string,\n sparklineTagValuesAttribute?: string,\n sparklineDisableHiddenCheck?: string,\n sparklineDefaultPixelsPerValue?: string,\n sparklineSpotColor?: string,\n sparklineMinSpotColor?: string,\n sparklineMaxSpotColor?: string,\n sparklineSpotRadius?: string,\n sparklineValueSpots?: string,\n sparklineHighlightSpotColor?: string,\n sparklineHighlightLineColor?: string,\n sparklineLineWidth?: string,\n sparklineNormalRangeMin?: string,\n sparklineNormalRangeMax?: string,\n sparklineDrawNormalOnTop?: string,\n sparklineXvalues?: string,\n sparklineChartRangeClip?: string,\n sparklineChartRangeMinX?: string,\n sparklineChartRangeMaxX?: string,\n sparklineDisableInteraction?: boolean,\n sparklineDisableTooltips?: boolean,\n sparklineOnHover?: Function,\n sparklineDisableHighlight?: boolean,\n sparklineHighlightLighten?: string,\n sparklineHighlightColor?: string,\n sparklineTooltipContainer?: string,\n sparklineTooltipClassname?: string,\n sparklineTooltipFormat?: string,\n sparklineTooltipPrefix?: string,\n sparklineTooltipSuffix?: string,\n sparklineTooltipSkipNull?: boolean,\n sparklineTooltipValueLookups?: string,\n sparklineTooltipFormatFieldlist?: string,\n sparklineTooltipFormatFieldlistKey?: string,\n sparklineNumberFormatter?: (d: number) => string,\n sparklineNumberDigitGroupSep?: string,\n sparklineNumberDecimalMark?: string,\n sparklineNumberDigitGroupCount?: string,\n sparklineAnimatedZooms?: boolean,\n\n\n d3pieTitle?: string,\n d3pieSubtitle?: string,\n d3pieFooter?: string,\n d3pieTitleColor?: string,\n d3pieTitleFontsize?: string,\n d3pieTitleFontweight?: string,\n d3pieTitleFont?: string,\n d3PieSubtitleColor?: string,\n d3PieSubtitleFontsize?: string,\n d3PieSubtitleFontweight?: string,\n d3PieSubtitleFont?: string,\n d3PieFooterColor?: string,\n d3PieFooterFontsize?: string,\n d3PieFooterFontweight?: string,\n d3PieFooterFont?: string,\n d3PieFooterLocation?: string,\n d3PiePieinnerradius?: string,\n d3PiePieouterradius?: string,\n d3PieSortorder?: string,\n d3PieSmallsegmentgroupingEnabled?: boolean,\n d3PieSmallsegmentgroupingValue?: string,\n d3PieSmallsegmentgroupingValuetype?: string,\n d3PieSmallsegmentgroupingLabel?: string,\n d3PieSmallsegmentgroupingColor?: string,\n d3PieLabelsOuterFormat?: string,\n d3PieLabelsOuterHidewhenlessthanpercentage?: string,\n d3PieLabelsOuterPiedistance?: string,\n d3PieLabelsInnerFormat?: string,\n d3PieLabelsInnerHidewhenlessthanpercentage?: string,\n d3PieLabelsMainLabelColor?: string,\n d3PieLabelsMainLabelFont?: string,\n d3PieLabelsMainLabelFontsize?: string,\n d3PieLabelsMainLabelFontweight?: string,\n d3PieLabelsPercentageColor?: string,\n d3PieLabelsPercentageFont?: string,\n d3PieLabelsPercentageFontsize?: string,\n d3PieLabelsPercentageFontweight?: string,\n d3PieLabelsValueColor?: string,\n d3PieLabelsValueFont?: string,\n d3PieLabelsValueFontsize?: string,\n d3PieLabelsValueFontweight?: string,\n d3PieLabelsLinesEnabled?: boolean,\n d3PieLabelsLinesStyle?: string,\n d3PieLabelsLinesColor?: string,\n d3PieLabelsTruncationEnabled?: boolean,\n d3PieLabelsTruncationTruncatelength?: string,\n d3PieMiscColorsSegmentstroke?: string,\n d3PieMiscGradientEnabled?: boolean,\n d3PieMiscColorsPercentage?: string,\n d3PieMiscGradientColor?: string,\n d3PieCssprefix?: string,\n\n peityStrokeWidth?: number,\n\n textOnlyDecimalPlaces?: number,\n textOnlyPrefix?: string,\n textOnlySuffix?: string,\n}\n\nexport interface Attributes extends StaticAttributes {\n // changed structure compared to original dashboard.js (not flat list, but dynamic objects stored\n // in \"showValueOf\" property\n showValueOf?: { [key: string]: string }\n}\n\nexport interface ChartsAttributes {\n [chartID:string]: Attributes\n}\n\nexport type AttributePropKeys = keyof StaticAttributes\n\ntype AttributesMap = {\n [key in AttributePropKeys]: AttributeConfig\n}\n\n// needs to be a getter so all window.NETDATA settings are set\nconst getAttributesMap = (): AttributesMap => ({\n // all properties that don't have `defaultValue` should be \"| undefined\" in Attributes interface\n // todo try to write above rule in TS\n id: { key: \"netdata\" },\n host: { key: \"host\" },\n httpMethod: { key: \"http-method\" },\n title: { key: \"title\" },\n chartLibrary: { key: \"chart-library\", defaultValue: window.NETDATA.chartDefaults.library },\n width: { key: \"width\", defaultValue: window.NETDATA.chartDefaults.width },\n height: { key: \"height\", defaultValue: window.NETDATA.chartDefaults.height },\n // todo use chartDefaults for static custom dashboards\n // after: { key: \"after\", defaultValue: window.NETDATA.chartDefaults.after },\n after: { key: \"after\" },\n before: { key: \"before\", defaultValue: window.NETDATA.chartDefaults.before },\n legend: { key: \"legend\", type: \"boolean\", defaultValue: true },\n legendPosition: { key: \"legend-position\" },\n units: { key: \"units\" },\n unitsCommon: { key: \"common-units\" },\n unitsDesired: { key: \"desired-units\" },\n aggrMethod: { key: \"aggr-method\" },\n labels: { key: \"labels\" },\n postGroupBy: { key: \"post-group-by\" },\n postAggregationMethod: { key: \"post-aggregation-method\" },\n dimensionsAggrMethod: { key: \"dimensions-aggr-method\" },\n aggrGroups: { key: \"aggrGroups\" },\n selectedChart: { key: \"selected-chart\" },\n filteredRows: { key: \"filtered-rows\" },\n groupBy: { key: \"group-by\" },\n nodeIDs: { key: \"node-ids\" },\n colors: { key: \"colors\" },\n commonColors: { key: \"common-colors\" },\n decimalDigits: { key: \"decimal-digits\" },\n dimensions: { key: \"dimensions\" },\n selectedDimensions: { key: \"selected-dimensions\" },\n forceTimeWindow: { key: \"force-time-window\" },\n\n appendOptions: { key: \"append-options\" },\n gtime: { key: \"gtime\" },\n method: { key: \"method\" },\n overrideOptions: { key: \"override-options\" },\n pixelsPerPoint: { key: \"pixels-per-point\" },\n points: { key: \"points\" },\n heightId: { key: \"id\" },\n hideResizeHandler: { key: \"hide-resize-handler\" },\n detectResize: { key: \"detect-resize\" },\n commonMin: { key: \"common-min\" },\n commonMax: { key: \"common-max\" },\n\n // let's not put the default values here, because they will also be needed by the main Agent page\n // and the Cloud App\n dygraphType: { key: \"dygraph-type\" },\n dygraphValueRange: { key: \"dygraph-valuerange\" },\n dygraphTheme: { key: \"dygraph-theme\" },\n dygraphSmooth: { key: \"dygraph-smooth\", type: \"boolean\" },\n dygraphColors: { key: \"dygraph-colors\" }, // not working in original dashboard\n dygraphRightGap: { key: \"dygraph-rightgap\" },\n dygraphShowRangeSelector: { key: \"dygraph-showrangeselector\", type: \"boolean\" },\n dygraphShowRoller: { key: \"dygraph-showroller\", type: \"boolean\" },\n dygraphTitle: { key: \"dygraph-title\" },\n dygraphTitleHeight: { key: \"dygraph-titleheight\" },\n dygraphLegend: { key: \"dygraph-legend\" },\n dygraphLabelsDiv: { key: \"dygraph-labelsdiv\" },\n dygraphLabelsSeparateLine: { key: \"dygraph-labelsseparatelines\", type: \"boolean\" },\n dygraphIncludeZero: { key: \"dygraph-includezero\", type: \"boolean\" },\n dygraphShowZeroValues: { key: \"dygraph-labelsshowzerovalues\", type: \"boolean\" },\n dygraphShowLabelsOnHighLight: { key: \"dygraph-showlabelsonhighlight\", type: \"boolean\" },\n dygraphHideOverlayOnMouseOut: { key: \"dygraph-hideoverlayonmouseout\", type: \"boolean\" },\n dygraphXRangePad: { key: \"dygraph-xrangepad\" },\n dygraphYRangePad: { key: \"dygraph-yrangepad\" },\n dygraphYLabelWidth: { key: \"dygraph-ylabelwidth\" },\n dygraphStrokeWidth: { key: \"dygraph-strokewidth\" },\n dygraphStrokePattern: { key: \"dygraph-strokepattern\" },\n dygraphDrawPoints: { key: \"dygraph-drawpoints\", type: \"boolean\" },\n dygraphDrawGapEdgePoints: { key: \"dygraph-drawgapedgepoints\", type: \"boolean\" },\n dygraphConnectSeparatedPoints: { key: \"dygraph-connectseparatedpoints\", type: \"boolean\" },\n dygraphPointSize: { key: \"dygraph-pointsize\" },\n dygraphStepPlot: { key: \"dygraph-stepplot\", type: \"boolean\" },\n dygraphStrokeBorderColor: { key: \"dygraph-strokebordercolor\" },\n dygraphStrokeBorderWidth: { key: \"dygraph-strokeborderwidth\" },\n // it was not boolean in the old app, but that was most likely a bug\n dygraphFillGraph: { key: \"dygraph-fillgraph\", type: \"boolean\" },\n dygraphFillAlpha: { key: \"dygraph-fillalpha\" },\n // also originally not set as boolean\n dygraphStackedGraph: { key: \"dygraph-stackedgraph\", type: \"boolean\" },\n dygraphStackedGraphNanFill: { key: \"dygraph-stackedgraphnanfill\" },\n dygraphAxisLabelFontSize: { key: \"dygraph-axislabelfontsize\" },\n dygraphAxisLineColor: { key: \"dygraph-axislinecolor\" },\n dygraphAxisLineWidth: { key: \"dygraph-axislinewidth\" },\n dygraphDrawGrid: { key: \"dygraph-drawgrid\", type: \"boolean\" },\n dygraphGridLinePattern: { key: \"dygraph-gridlinepattern\" },\n dygraphGridLineWidth: { key: \"dygraph-gridlinewidth\" },\n dygraphGridLineColor: { key: \"dygraph-gridlinecolor\" },\n dygraphMaxNumberWidth: { key: \"dygraph-maxnumberwidth\" },\n dygraphSigFigs: { key: \"dygraph-sigfigs\" },\n dygraphDigitsAfterDecimal: { key: \"dygraph-digitsafterdecimal\" },\n // dygraphValueFormatter: { key: \"dygraph-valueformatter\" },\n dygraphHighlighCircleSize: { key: \"dygraph-highlightcirclesize\" },\n dygraphHighlightSeriesOpts: { key: \"dygraph-highlightseriesopts\" },\n dygraphHighlightSeriesBackgroundAlpha: { key: \"dygraph-highlightseriesbackgroundalpha\" },\n // dygraphPointClickCallback: { key: \"dygraph-pointclickcallback\" },\n dygraphXPixelsPerLabel: { key: \"dygraph-xpixelsperlabel\" },\n dygraphXAxisLabelWidth: { key: \"dygraph-xaxislabelwidth\" },\n dygraphDrawXAxis: { key: \"dygraph-drawxaxis\", type: \"boolean\" },\n dygraphYPixelsPerLabel: { key: \"dygraph-ypixelsperlabel\" },\n dygraphYAxisLabelWidth: { key: \"dygraph-yaxislabelwidth\" },\n dygraphDrawYAxis: { key: \"dygraph-drawyaxis\", type: \"boolean\" },\n dygraphDrawAxis: { key: \"dygraph-drawaxis\", type: \"boolean\" },\n\n easyPieChartMinValue: { key: \"easypiechart-min-value\" },\n easyPieChartMaxValue: { key: \"easypiechart-max-value\" },\n easyPieChartBarColor: { key: \"easypiechart-barcolor\" },\n easyPieChartTrackColor: { key: \"easypiechart-trackcolor\" },\n easyPieChartScaleColor: { key: \"easypiechart-scalecolor\" },\n easyPieChartScaleLength: { key: \"easypiechart-scalelength\" },\n easyPieChartLineCap: { key: \"easypiechart-linecap\" },\n easyPieChartLineWidth: { key: \"easypiechart-linewidth\" },\n easyPieChartTrackWidth: { key: \"easypiechart-trackwidth\" },\n easyPieChartSize: { key: \"easypiechart-size\" },\n easyPieChartRotate: { key: \"easypiechart-rotate\" },\n easyPieChartAnimate: { key: \"easypiechart-animate\" },\n easyPieChartEasing: { key: \"easypiechart-easing\" },\n\n gaugeMinValue: { key: \"gauge-min-value\" },\n gaugeMaxValue: { key: \"gauge-max-value\" },\n gaugePointerColor: { key: \"gauge-pointer-color\" },\n gaugeStrokeColor: { key: \"gauge-stroke-color\" },\n gaugeStartColor: { key: \"gauge-start-color\" },\n gaugeStopColor: { key: \"gauge-stop-color\" },\n gaugeGenerateGradient: { key: \"gauge-generate-gradient\" },\n\n sparklineType: { key: \"sparkline-type\" },\n sparklineLineColor: { key: \"sparkline-linecolor\" },\n sparklineFillColor: { key: \"sparkline-fillcolor\" },\n sparklineChartRangeMin: { key: \"sparkline-chartrangemin\" },\n sparklineChartRangeMax: { key: \"sparkline-chartrangemax\" },\n sparklineComposite: { key: \"sparkline-composite\" },\n sparklineEnableTagOptions: { key: \"sparkline-enabletagoptions\" },\n sparklineTagOptionPrefix: { key: \"sparkline-tagoptionprefix\" },\n sparklineTagValuesAttribute: { key: \"sparkline-tagvaluesattribute\" },\n sparklineDisableHiddenCheck: { key: \"sparkline-disablehiddencheck\" },\n sparklineDefaultPixelsPerValue: { key: \"sparkline-defaultpixelspervalue\" },\n sparklineSpotColor: { key: \"sparkline-spotcolor\" },\n sparklineMinSpotColor: { key: \"sparkline-minspotcolor\" },\n sparklineMaxSpotColor: { key: \"sparkline-maxspotcolor\" },\n sparklineSpotRadius: { key: \"sparkline-spotradius\" },\n sparklineValueSpots: { key: \"sparkline-valuespots\" },\n sparklineHighlightSpotColor: { key: \"sparkline-highlightspotcolor\" },\n sparklineHighlightLineColor: { key: \"sparkline-highlightlinecolor\" },\n sparklineLineWidth: { key: \"sparkline-linewidth\" },\n sparklineNormalRangeMin: { key: \"sparkline-normalrangemin\" },\n sparklineNormalRangeMax: { key: \"sparkline-normalrangemax\" },\n sparklineDrawNormalOnTop: { key: \"sparkline-drawnormalontop\" },\n sparklineXvalues: { key: \"sparkline-xvalues\" },\n sparklineChartRangeClip: { key: \"sparkline-chartrangeclip\" },\n sparklineChartRangeMinX: { key: \"sparkline-chartrangeminx\" },\n sparklineChartRangeMaxX: { key: \"sparkline-chartrangemaxx\" },\n sparklineDisableInteraction: { key: \"sparkline-disableinteraction\", type: \"boolean\" },\n sparklineDisableTooltips: { key: \"sparkline-disabletooltips\", type: \"boolean\" },\n sparklineOnHover: { key: \"sparkline-on-hover\" },\n sparklineDisableHighlight: { key: \"sparkline-disablehighlight\", type: \"boolean\" },\n sparklineHighlightLighten: { key: \"sparkline-highlightlighten\" },\n sparklineHighlightColor: { key: \"sparkline-highlightcolor\" },\n sparklineTooltipContainer: { key: \"sparkline-tooltipcontainer\" },\n sparklineTooltipClassname: { key: \"sparkline-tooltipclassname\" },\n sparklineTooltipFormat: { key: \"sparkline-tooltipformat\" },\n sparklineTooltipPrefix: { key: \"sparkline-tooltipprefix\" },\n sparklineTooltipSuffix: { key: \"sparkline-tooltipsuffix\" },\n sparklineTooltipSkipNull: { key: \"sparkline-tooltipskipnull\", type: \"boolean\" },\n sparklineTooltipValueLookups: { key: \"sparkline-tooltipvaluelookups\" },\n sparklineTooltipFormatFieldlist: { key: \"sparkline-tooltipformatfieldlist\" },\n sparklineTooltipFormatFieldlistKey: { key: \"sparkline-tooltipformatfieldlistkey\" },\n sparklineNumberFormatter: { key: \"sparkline-numberformatter\" },\n sparklineNumberDigitGroupSep: { key: \"sparkline-numberdigitgroupsep\" },\n sparklineNumberDecimalMark: { key: \"sparkline-numberdecimalmark\" },\n sparklineNumberDigitGroupCount: { key: \"sparkline-numberdigitgroupcount\" },\n sparklineAnimatedZooms: { key: \"sparkline-animatedzooms\", type: \"boolean\" },\n\n d3pieTitle: { key: \"d3pie-title\" },\n d3pieSubtitle: { key: \"d3pie-subtitle\" },\n d3pieFooter: { key: \"d3pie-footer\" },\n d3pieTitleColor: { key: \"d3pie-title-color\" },\n d3pieTitleFontsize: { key: \"d3pie-title-fontsize\" },\n d3pieTitleFontweight: { key: \"d3pie-title-fontweight\" },\n d3pieTitleFont: { key: \"d3pie-title-font\" },\n d3PieSubtitleColor: { key: \"d3pie-subtitle-color\" },\n d3PieSubtitleFontsize: { key: \"d3pie-subtitle-fontsize\" },\n d3PieSubtitleFontweight: { key: \"d3pie-subtitle-fontweight\" },\n d3PieSubtitleFont: { key: \"d3pie-subtitle-font\" },\n d3PieFooterColor: { key: \"d3pie-footer-color\" },\n d3PieFooterFontsize: { key: \"d3pie-footer-fontsize\" },\n d3PieFooterFontweight: { key: \"d3pie-footer-fontweight\" },\n d3PieFooterFont: { key: \"d3pie-footer-font\" },\n d3PieFooterLocation: { key: \"d3pie-footer-location\" },\n d3PiePieinnerradius: { key: \"d3pie-pieinnerradius\" },\n d3PiePieouterradius: { key: \"d3pie-pieouterradius\" },\n d3PieSortorder: { key: \"d3pie-sortorder\" },\n d3PieSmallsegmentgroupingEnabled: { key: \"d3pie-smallsegmentgrouping-enabled\", type: \"boolean\" },\n d3PieSmallsegmentgroupingValue: { key: \"d3pie-smallsegmentgrouping-value\" },\n d3PieSmallsegmentgroupingValuetype: { key: \"d3pie-smallsegmentgrouping-valuetype\" },\n d3PieSmallsegmentgroupingLabel: { key: \"d3pie-smallsegmentgrouping-label\" },\n d3PieSmallsegmentgroupingColor: { key: \"d3pie-smallsegmentgrouping-color\" },\n d3PieLabelsOuterFormat: { key: \"d3pie-labels-outer-format\" },\n d3PieLabelsOuterHidewhenlessthanpercentage: {\n key: \"d3pie-labels-outer-hidewhenlessthanpercentage\",\n },\n d3PieLabelsOuterPiedistance: { key: \"d3pie-labels-outer-piedistance\" },\n d3PieLabelsInnerFormat: { key: \"d3pie-labels-inner-format\" },\n d3PieLabelsInnerHidewhenlessthanpercentage: {\n key: \"d3pie-labels-inner-hidewhenlessthanpercentage\",\n },\n d3PieLabelsMainLabelColor: { key: \"d3pie-labels-mainLabel-color\" },\n d3PieLabelsMainLabelFont: { key: \"d3pie-labels-mainLabel-font\" },\n d3PieLabelsMainLabelFontsize: { key: \"d3pie-labels-mainLabel-fontsize\" },\n d3PieLabelsMainLabelFontweight: { key: \"d3pie-labels-mainLabel-fontweight\" },\n d3PieLabelsPercentageColor: { key: \"d3pie-labels-percentage-color\" },\n d3PieLabelsPercentageFont: { key: \"d3pie-labels-percentage-font\" },\n d3PieLabelsPercentageFontsize: { key: \"d3pie-labels-percentage-fontsize\" },\n d3PieLabelsPercentageFontweight: { key: \"d3pie-labels-percentage-fontweight\" },\n d3PieLabelsValueColor: { key: \"d3pie-labels-value-color\" },\n d3PieLabelsValueFont: { key: \"d3pie-labels-value-font\" },\n d3PieLabelsValueFontsize: { key: \"d3pie-labels-value-fontsize\" },\n d3PieLabelsValueFontweight: { key: \"d3pie-labels-value-fontweight\" },\n d3PieLabelsLinesEnabled: { key: \"d3pie-labels-lines-enabled\", type: \"boolean\" },\n d3PieLabelsLinesStyle: { key: \"d3pie-labels-lines-style\" },\n d3PieLabelsLinesColor: { key: \"d3pie-labels-lines-color\" },\n d3PieLabelsTruncationEnabled: { key: \"d3pie-labels-truncation-enabled\", type: \"boolean\" },\n d3PieLabelsTruncationTruncatelength: { key: \"d3pie-labels-truncation-truncatelength\" },\n d3PieMiscColorsSegmentstroke: { key: \"d3pie-misc-colors-segmentstroke\" },\n d3PieMiscGradientEnabled: { key: \"d3pie-misc-gradient-enabled\", type: \"boolean\" },\n d3PieMiscColorsPercentage: { key: \"d3pie-misc-colors-percentage\" },\n d3PieMiscGradientColor: { key: \"d3pie-misc-gradient-color\" },\n d3PieCssprefix: { key: \"d3pie-cssprefix\" },\n\n peityStrokeWidth: { key: \"peity-strokewidth\" },\n\n textOnlyDecimalPlaces: { key: \"textonly-decimal-places\" },\n textOnlyPrefix: { key: \"textonly-prefix\" },\n textOnlySuffix: { key: \"textonly-suffix\" },\n})\n\nexport const getAttributesStatic = (node: Element): Attributes => mapObjIndexed(\n (attribute: AttributeConfig) => (\n (attribute as BooleanAttributeConfig).type === \"boolean\"\n ? getDataAttributeBoolean(\n node,\n attribute.key,\n attribute.defaultValue as BooleanAttributeConfig[\"defaultValue\"],\n ) : getDataAttribute(node, attribute.key, attribute.defaultValue)\n ),\n getAttributesMap(),\n) as Attributes // need to override because of broken Ramda typings\n\nexport const getAttributesDynamic = (node: Element) => {\n const showValueOfAttribues = Array.from(node.attributes)\n .filter((attribute) => attribute.name.startsWith(\"data-show-value-of\"))\n .map((attribute) => ({\n [attribute.name.replace(\"data-\", \"\")]: attribute.value,\n }))\n const merged = mergeAll(showValueOfAttribues)\n return isEmpty(merged) ? undefined : merged\n}\n\nexport const getAttributes = (node: Element): Attributes => {\n const attributesStatic = getAttributesStatic(node)\n const showValueOf = getAttributesDynamic(node)\n return { ...attributesStatic, showValueOf }\n}\n\nexport const defaultAttributes: Partial<Attributes> = {\n legendPosition: initialLegendRight ? \"right\" : \"bottom\",\n}\n","import { createAction } from \"redux-act\"\nimport { CancelTokenSource, Method } from \"axios\"\n\nimport { createRequestAction } from \"utils/createRequestAction\"\nimport { InfoPayload } from \"domains/global/__mocks__/info-mock\"\n\nimport { storeKey } from \"./constants\"\nimport { ChartData, ChartMetadata } from \"./chart-types\"\n\nexport interface UpdateChartDataAction {\n chartData: ChartData\n id: string\n}\nexport const updateChartDataAction = createAction<UpdateChartDataAction>(\n `${storeKey}/updateChartData`,\n)\n\nexport interface UpdateChartMetadataAction {\n chartMetadata: ChartMetadata\n id: string\n}\nexport const updateChartMetadataAction = createAction<UpdateChartMetadataAction>(\n `${storeKey}/updateChartMetadata`,\n)\n\nexport interface FetchDataParams {\n fillMissingPoints?: number\n isRemotelyControlled: boolean\n viewRange: [number, number]\n}\nexport interface FetchDataUrlParams {\n host: string\n chart: string\n context: string\n format: string\n points: number\n group: string\n gtime: number\n options: string\n after: number | null\n before?: number | null\n dimensions?: string\n labels?: {[key: string]: string}\n postGroupBy?: string\n postAggregationMethod?: string\n aggrMethod?: string\n aggrGroups?: string[]\n dimensionsAggrMethod?: string\n nodeIDs?: string[]\n httpMethod?: Method\n groupBy?: string\n}\nexport interface FetchDataPayload extends FetchDataUrlParams {\n id: string,\n fetchDataParams: FetchDataParams\n cancelTokenSource: CancelTokenSource\n}\n\nexport const fetchDataAction = createRequestAction<\n FetchDataPayload,\n { id: string, chartData: ChartData, fetchDataParams: FetchDataParams }\n>(`${storeKey}/fetchDataAction`)\n\n\nexport interface FetchDataCancelAction { id: string }\nexport const fetchDataCancelAction = createAction<FetchDataCancelAction>(\n `${storeKey}/fetchDataCancelAction`,\n)\n\nexport interface FetchDataForSnapshotPayload extends FetchDataUrlParams {\n chartLibrary: string\n id: string\n}\nexport const fetchDataForSnapshotAction = createRequestAction<\n FetchDataForSnapshotPayload,\n { id: string, snapshotData: ChartData }\n>(`${storeKey}/fetchDataForSnapshotAction`)\n\nexport const snapshotExportResetAction = createRequestAction(\n `${storeKey}/snapshotExportResetAction`,\n)\n\nexport interface FetchChartPayload {\n chart: string\n id: string\n host: string\n nodeIDs?: string[]\n}\n\nexport const fetchChartAction = createRequestAction<\n FetchChartPayload,\n { chartMetadata: ChartMetadata, id: string }\n>(`${storeKey}/fetchChartAction`)\n\n\nexport interface SetResizeHeightAction {\n id: string\n resizeHeight: number\n}\nexport const setResizeHeightAction = createAction<SetResizeHeightAction>(\n `${storeKey}/setResizeHeight`,\n)\n\nexport interface SetChartPanAndZoomAction {\n id: string\n after: number\n before: number\n shouldForceTimeRange?: boolean\n}\nexport const setChartPanAndZoomAction = createAction<SetChartPanAndZoomAction>(\n `${storeKey}/setChartPanAndZoom`,\n)\n\nexport const resetChartPanAndZoomAction = createAction<{ id: string }>(\n `${storeKey}/resetChartPanAndZoomAction`,\n)\n\nexport const clearChartStateAction = createAction<{ id: string }>(\n `${storeKey}/clearChartStateAction`,\n)\n\nexport interface FetchInfoPayload {\n poll?: boolean\n}\nexport interface FetchInfoSuccessPayload {\n isCloudAvailable: boolean\n isCloudEnabled: boolean\n isAgentClaimed: boolean\n isACLKAvailable: boolean\n fullInfoPayload: InfoPayload\n}\nexport const fetchInfoAction = createRequestAction<\n FetchInfoPayload,\n FetchInfoSuccessPayload\n>(`${storeKey}/fetchInfoAction`)\n","export const SIGN_IN_IFRAME_ID = \"sign_in_iframe\"\n","/* eslint-disable */\n// Main JavaScript file for the Netdata GUI.\n\n// Codacy declarations\n/* global NETDATA */\n\nimport { identity, memoizeWith } from \"ramda\"\nimport {\n centerAroundHighlightAction,\n chartsMetadataRequestSuccess,\n clearHighlightAction,\n fetchAllAlarmsAction,\n loadSnapshotAction,\n resetGlobalPanAndZoomAction,\n resetOptionsAction,\n resetRegistry,\n setDefaultAfterAction,\n setGlobalChartUnderlayAction,\n setGlobalPanAndZoomAction,\n setOptionAction,\n} from './domains/global/actions';\nimport {\n createSelectOption,\n selectDefaultAfter,\n selectGlobalPanAndZoom,\n selectRegistry,\n} from \"./domains/global/selectors\"\nimport { seconds4human } from './domains/chart/utils/seconds4human';\nimport { zeropad } from './utils/units-conversion';\nimport {\n explicitlySignInAction,\n startSnapshotModeAction,\n stopSnapshotModeAction,\n} from './domains/dashboard/actions';\nimport { snapshotExportResetAction } from './domains/chart/actions';\nimport {\n selectAmountOfCharts,\n selectAmountOfSnapshotsFailed,\n selectAmountOfSnapshotsFetched,\n} from './domains/chart/selectors';\nimport { serverDefault } from './utils/server-detection';\nimport { name2id } from './utils/name-2-id';\nimport { isProperTimezone } from './utils/date-time';\nimport { NETDATA_REGISTRY_SERVER } from './utils';\nimport { getHashParam } from 'utils/hash-utils';\nimport { isDemo } from \"./utils/is-demo\"\nimport { LEGEND_BOTTOM_SINGLE_LINE_HEIGHT } from './domains/chart/utils/legend-utils';\nimport { defaultAttributes } from './domains/chart/utils/transformDataAttributes';\n\n// this is temporary, hook will be used after the full main.js refactor\nlet localeDateString, localeTimeString\nexport const updateLocaleFunctions = ({\n localeDateString: newLocaleDateString,\n localeTimeString: newLocaleTimeString,\n}) => {\n localeDateString = newLocaleDateString\n localeTimeString = newLocaleTimeString\n}\n\n// enable alarms checking and notifications\nvar netdataShowAlarms = true;\n\n// enable registry updates\nvar netdataRegistry = true;\n\n// forward definition only - not used here\nvar netdataServer = undefined;\nvar netdataServerStatic = undefined;\nvar netdataCheckXSS = undefined;\n\nlet reduxStore\n\nfunction escapeUserInputHTML(s) {\n return s.toString()\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/#/g, '#')\n .replace(/'/g, ''')\n .replace(/\\(/g, '(')\n .replace(/\\)/g, ')')\n .replace(/\\//g, '/');\n}\n\nconst setOption = (key, value) => {\n reduxStore.dispatch(setOptionAction({\n key,\n value,\n }))\n}\n\n// temporary function that will be removed after full main.js migration to react\nconst getFromRegistry = (prop) => {\n const registry = selectRegistry(reduxStore.getState())\n return registry?.[prop]\n}\n\nfunction verifyURL(s) {\n if (typeof (s) === 'string' && (s.startsWith('http://') || s.startsWith('https://'))) {\n return s\n .replace(/'/g, '%22')\n .replace(/\"/g, '%27')\n .replace(/\\)/g, '%28')\n .replace(/\\(/g, '%29');\n }\n\n console.log('invalid URL detected:');\n console.log(s);\n return 'javascript:alert(\"invalid url\");';\n}\n\n// --------------------------------------------------------------------\n// urlOptions\n\nwindow.urlOptions = {\n hash: '#',\n theme: null,\n help: null,\n mode: 'live', // 'live', 'print'\n update_always: false,\n pan_and_zoom: false,\n server: null,\n after: getHashParam('after') ?? 0,\n before: getHashParam('before') ?? 0,\n highlight: false,\n highlight_after: 0,\n highlight_before: 0,\n nowelcome: false,\n show_alarms: false,\n chart: null,\n family: null,\n alarm: null,\n utc: null,\n\n hasProperty: function (property) {\n // console.log('checking property ' + property + ' of type ' + typeof(this[property]));\n return typeof this[property] !== 'undefined';\n },\n\n genHash: function (forReload) {\n var hash = urlOptions.hash;\n\n hash += ';after=' + urlOptions.after.toString() +\n ';before=' + urlOptions.before.toString();\n\n if (urlOptions.highlight === true) {\n hash += ';highlight_after=' + urlOptions.highlight_after.toString() +\n ';highlight_before=' + urlOptions.highlight_before.toString();\n }\n\n if (urlOptions.theme !== null) {\n hash += ';theme=' + urlOptions.theme.toString();\n }\n\n if (urlOptions.help !== null) {\n hash += ';help=' + urlOptions.help.toString();\n }\n\n if (urlOptions.update_always === true) {\n hash += ';update_always=true';\n }\n\n if (forReload === true && urlOptions.server !== null) {\n hash += ';server=' + urlOptions.server.toString();\n }\n\n if (urlOptions.mode !== 'live') {\n hash += ';mode=' + urlOptions.mode;\n }\n\n if (urlOptions.utc !== null) {\n hash += ';utc=' + urlOptions.utc;\n }\n\n return hash;\n },\n\n parseHash: function () {\n var variables = document.location.hash.split(';');\n var len = variables.length;\n while (len--) {\n if (len !== 0) {\n var p = variables[len].split('=');\n if (urlOptions.hasProperty(p[0]) && typeof p[1] !== 'undefined') {\n urlOptions[p[0]] = decodeURIComponent(p[1]);\n }\n } else {\n if (variables[len].length > 0) {\n urlOptions.hash = variables[len];\n }\n }\n }\n\n var booleans = ['nowelcome', 'show_alarms', 'update_always'];\n len = booleans.length;\n while (len--) {\n if (urlOptions[booleans[len]] === 'true' || urlOptions[booleans[len]] === true || urlOptions[booleans[len]] === '1' || urlOptions[booleans[len]] === 1) {\n urlOptions[booleans[len]] = true;\n } else {\n urlOptions[booleans[len]] = false;\n }\n }\n\n var numeric = ['after', 'before', 'highlight_after', 'highlight_before'];\n len = numeric.length;\n while (len--) {\n if (typeof urlOptions[numeric[len]] === 'string') {\n try {\n urlOptions[numeric[len]] = parseInt(urlOptions[numeric[len]]);\n }\n catch (e) {\n console.log('failed to parse URL hash parameter ' + numeric[len]);\n urlOptions[numeric[len]] = 0;\n }\n }\n }\n\n if (urlOptions.server !== null && urlOptions.server !== '') {\n netdataServerStatic = document.location.origin.toString() + document.location.pathname.toString();\n netdataServer = urlOptions.server;\n netdataCheckXSS = true;\n } else {\n urlOptions.server = null;\n }\n\n if (urlOptions.before > 0 && urlOptions.after > 0) {\n urlOptions.pan_and_zoom = true;\n urlOptions.nowelcome = true;\n } else {\n urlOptions.pan_and_zoom = false;\n }\n\n if (urlOptions.highlight_before > 0 && urlOptions.highlight_after > 0) {\n urlOptions.highlight = true;\n } else {\n urlOptions.highlight = false;\n }\n\n switch (urlOptions.mode) {\n case 'print':\n urlOptions.theme = 'white';\n urlOptions.welcome = false;\n urlOptions.help = false;\n urlOptions.show_alarms = false;\n\n if (urlOptions.pan_and_zoom === false) {\n urlOptions.pan_and_zoom = true;\n urlOptions.before = Date.now();\n urlOptions.after = urlOptions.before - 600000;\n }\n\n netdataShowAlarms = false;\n netdataRegistry = false;\n break;\n\n case 'live':\n default:\n urlOptions.mode = 'live';\n break;\n }\n\n // console.log(urlOptions);\n },\n\n hashUpdate: function () {\n history.replaceState(null, '', urlOptions.genHash(true));\n },\n\n netdataPanAndZoomCallback: function (status, after, before) {\n //console.log(1);\n //console.log(new Error().stack);\n\n if (netdataSnapshotData === null) {\n urlOptions.pan_and_zoom = status;\n urlOptions.after = after;\n urlOptions.before = before;\n urlOptions.hashUpdate();\n }\n },\n\n updateUtcParam: function (utc) {\n if (!utc) return\n urlOptions.utc = utc\n urlOptions.hashUpdate();\n },\n\n netdataHighlightCallback: function (status, after, before) {\n if (status === true && (after === null || before === null || after <= 0 || before <= 0 || after >= before)) {\n status = false;\n after = 0;\n before = 0;\n }\n\n if (window.netdataSnapshotData === null) {\n urlOptions.highlight = status;\n } else {\n urlOptions.highlight = false;\n }\n\n urlOptions.highlight_after = Math.round(after);\n urlOptions.highlight_before = Math.round(before);\n urlOptions.hashUpdate();\n\n if (status === true && after > 0 && before > 0 && after < before) {\n var d1 = localeDateString(after);\n var d2 = localeDateString(before);\n if (d1 === d2) {\n d2 = '';\n }\n document.getElementById('navbar-highlight-content').innerHTML =\n '<span class=\"navbar-highlight-bar highlight-tooltip\" onclick=\"urlOptions.showHighlight();\" title=\"restore the highlighted view\" data-toggle=\"tooltip\" data-placement=\"bottom\">'\n + 'highlighted time-frame'\n + ' <b>' + d1 + ' <code>' + localeTimeString(after) + '</code></b> to '\n + ' <b>' + d2 + ' <code>' + localeTimeString(before) + '</code></b>, '\n + 'duration <b>' + seconds4human(Math.round((before - after) / 1000)) + '</b>'\n + '</span>'\n + '<span class=\"navbar-highlight-button-right highlight-tooltip\" onclick=\"urlOptions.clearHighlight();\" title=\"clear the highlighted time-frame\" data-toggle=\"tooltip\" data-placement=\"bottom\"><i class=\"fas fa-times\"></i></span>';\n\n $('.navbar-highlight').show();\n $('.navbar-highlight').width(\"80%\");\n $('.highlight-tooltip').tooltip({\n html: true,\n delay: { show: 500, hide: 0 },\n container: 'body'\n });\n } else {\n $('.navbar-highlight').hide();\n $('.navbar-highlight').width(\"100%\");\n }\n },\n\n clearHighlight: function () {\n reduxStore.dispatch(clearHighlightAction())\n },\n\n showHighlight: function () {\n reduxStore.dispatch(centerAroundHighlightAction())\n }\n};\n\nurlOptions.parseHash();\n\n// --------------------------------------------------------------------\n// check options that should be processed before loading netdata.js\n\nvar localStorageTested = -1;\n\nfunction localStorageTest() {\n if (localStorageTested !== -1) {\n return localStorageTested;\n }\n\n if (typeof Storage !== \"undefined\" && typeof localStorage === 'object') {\n var test = 'test';\n try {\n localStorage.setItem(test, test);\n localStorage.removeItem(test);\n localStorageTested = true;\n }\n catch (e) {\n console.log(e);\n localStorageTested = false;\n }\n } else {\n localStorageTested = false;\n }\n\n return localStorageTested;\n}\n\nfunction loadLocalStorage(name) {\n var ret = null;\n\n try {\n if (localStorageTest() === true) {\n ret = localStorage.getItem(name);\n } else {\n console.log('localStorage is not available');\n }\n }\n catch (error) {\n console.log(error);\n return null;\n }\n\n if (typeof ret === 'undefined' || ret === null) {\n return null;\n }\n\n // console.log('loaded: ' + name.toString() + ' = ' + ret.toString());\n\n return ret;\n}\n\nfunction saveLocalStorage(name, value) {\n // console.log('saving: ' + name.toString() + ' = ' + value.toString());\n try {\n if (localStorageTest() === true) {\n localStorage.setItem(name, value.toString());\n return true;\n }\n }\n catch (error) {\n console.log(error);\n }\n\n return false;\n}\n\nfunction getTheme(def) {\n if (urlOptions.mode === 'print') {\n return 'white';\n }\n\n var ret = loadLocalStorage('netdataTheme');\n if (typeof ret === 'undefined' || ret === null || ret === 'undefined') {\n return def;\n } else {\n return ret;\n }\n}\n\nfunction setTheme(theme) {\n if (urlOptions.mode === 'print') {\n return false;\n }\n\n if (theme === netdataTheme) {\n return false;\n }\n return saveLocalStorage('netdataTheme', theme);\n}\n\nwindow.netdataTheme = getTheme('slate');\n// this is of course temporary, will be fixed during complete main.js rewrite\nNETDATA.updateTheme()\nvar netdataShowHelp = true;\n\nif (urlOptions.theme !== null) {\n setTheme(urlOptions.theme);\n netdataTheme = urlOptions.theme;\n window.NETDATA.updateTheme()\n} else {\n urlOptions.theme = netdataTheme;\n}\n\nif (urlOptions.help !== null) {\n saveLocalStorage('options.show_help', urlOptions.help);\n netdataShowHelp = urlOptions.help;\n} else {\n urlOptions.help = loadLocalStorage('options.show_help');\n}\n\n// --------------------------------------------------------------------\n// natural sorting\n// http://www.davekoelle.com/files/alphanum.js - LGPL\n\nfunction naturalSortChunkify(t) {\n var tz = [];\n var x = 0, y = -1, n = 0, i, j;\n\n while (i = (j = t.charAt(x++)).charCodeAt(0)) {\n var m = (i >= 48 && i <= 57);\n if (m !== n) {\n tz[++y] = \"\";\n n = m;\n }\n tz[y] += j;\n }\n\n return tz;\n}\n\nfunction naturalSortCompare(a, b) {\n var aa = naturalSortChunkify(a.toLowerCase());\n var bb = naturalSortChunkify(b.toLowerCase());\n\n for (var x = 0; aa[x] && bb[x]; x++) {\n if (aa[x] !== bb[x]) {\n var c = Number(aa[x]), d = Number(bb[x]);\n if (c.toString() === aa[x] && d.toString() === bb[x]) {\n return c - d;\n } else {\n return (aa[x] > bb[x]) ? 1 : -1;\n }\n }\n }\n\n return aa.length - bb.length;\n}\n\n// --------------------------------------------------------------------\n// saving files to client\n\nfunction saveTextToClient(data, filename) {\n var blob = new Blob([data], {\n type: 'application/octet-stream'\n });\n\n var url = URL.createObjectURL(blob);\n var link = document.createElement('a');\n link.setAttribute('href', url);\n link.setAttribute('download', filename);\n\n var el = document.getElementById('hiddenDownloadLinks');\n el.innerHTML = '';\n el.appendChild(link);\n\n setTimeout(function () {\n el.removeChild(link);\n URL.revokeObjectURL(url);\n }, 60);\n\n link.click();\n}\n\nfunction saveObjectToClient(data, filename) {\n saveTextToClient(JSON.stringify(data), filename);\n}\n\nfunction netdataURL(url, forReload) {\n if (typeof url === 'undefined')\n // url = document.location.toString();\n {\n url = '';\n }\n\n if (url.indexOf('#') !== -1) {\n url = url.substring(0, url.indexOf('#'));\n }\n\n var hash = urlOptions.genHash(forReload);\n\n // console.log('netdataURL: ' + url + hash);\n\n return url + hash;\n}\n\nfunction netdataReload(url) {\n document.location = verifyURL(netdataURL(url, true));\n\n // since we play with hash\n // this is needed to reload the page\n location.reload();\n}\n\nwindow.gotoHostedModalHandler = (url) => {\n document.location = verifyURL(url + urlOptions.genHash());\n return false;\n}\n\nvar gotoServerValidateRemaining = 0;\nvar gotoServerMiddleClick = false;\nvar gotoServerStop = false;\n\nfunction gotoServerValidateUrl(id, guid, url) {\n var penalty = 0;\n var error = 'failed';\n\n if (document.location.toString().startsWith('http://') && url.toString().startsWith('https://'))\n // we penalize https only if the current url is http\n // to allow the user walk through all its servers.\n {\n penalty = 500;\n } else if (document.location.toString().startsWith('https://') && url.toString().startsWith('http://')) {\n error = 'can\\'t check';\n }\n\n var finalURL = netdataURL(url);\n\n setTimeout(function () {\n document.getElementById('gotoServerList').innerHTML += '<tr><td style=\"padding-left: 20px;\"><a href=\"' + verifyURL(finalURL) + '\" target=\"_blank\">' + escapeUserInputHTML(url) + '</a></td><td style=\"padding-left: 30px;\"><code id=\"' + guid + '-' + id + '-status\">checking...</code></td></tr>';\n\n NETDATA.registryHello(url, function (data) {\n if (typeof data !== 'undefined' && data !== null && typeof data.machine_guid === 'string' && data.machine_guid === guid) {\n // console.log('OK ' + id + ' URL: ' + url);\n document.getElementById(guid + '-' + id + '-status').innerHTML = \"OK\";\n\n if (!gotoServerStop) {\n gotoServerStop = true;\n\n if (gotoServerMiddleClick) {\n window.open(verifyURL(finalURL), '_blank');\n gotoServerMiddleClick = false;\n const registryMachines = getFromRegistry(\"registryMachines\");\n document.getElementById('gotoServerResponse').innerHTML = '<b>Opening new window to ' + registryMachines[guid].name + '<br/><a href=\"' + verifyURL(finalURL) + '\">' + escapeUserInputHTML(url) + '</a></b><br/>(check your pop-up blocker if it fails)';\n } else {\n document.getElementById('gotoServerResponse').innerHTML += 'found it! It is at:<br/><small>' + escapeUserInputHTML(url) + '</small>';\n document.location = verifyURL(finalURL);\n $('#gotoServerModal').modal('hide');\n }\n }\n } else {\n if (typeof data !== 'undefined' && data !== null && typeof data.machine_guid === 'string' && data.machine_guid !== guid) {\n error = 'wrong machine';\n }\n\n document.getElementById(guid + '-' + id + '-status').innerHTML = error;\n gotoServerValidateRemaining--;\n if (gotoServerValidateRemaining <= 0) {\n gotoServerMiddleClick = false;\n document.getElementById('gotoServerResponse').innerHTML = '<b>Sorry! I cannot find any operational URL for this server</b>';\n }\n }\n });\n }, (id * 50) + penalty);\n}\n\nwindow.gotoServerModalHandler = function gotoServerModalHandler(guid) {\n // console.log('goto server: ' + guid);\n\n gotoServerStop = false;\n var checked = {};\n const registryMachines = getFromRegistry(\"registryMachines\");\n var len = registryMachines[guid].alternateUrls.length;\n var count = 0;\n\n document.getElementById('gotoServerResponse').innerHTML = '';\n document.getElementById('gotoServerList').innerHTML = '';\n document.getElementById('gotoServerName').innerHTML = registryMachines[guid].name;\n $('#gotoServerModal').modal('show');\n\n gotoServerValidateRemaining = len;\n while (len--) {\n var url = registryMachines[guid].alternateUrls[len];\n checked[url] = true;\n gotoServerValidateUrl(count++, guid, url);\n }\n\n // When the registry is enabled, if the user's known URLs are not working\n // we consult the registry to get additional URLs.\n setTimeout(function () {\n if (gotoServerStop === false) {\n document.getElementById('gotoServerResponse').innerHTML = '<b>Added all the known URLs for this machine.</b>';\n NETDATA.registrySearch(guid, getFromRegistry, function (data) {\n // console.log(data);\n len = data.urls.length;\n while (len--) {\n var url = data.urls[len][1];\n // console.log(url);\n if (typeof checked[url] === 'undefined') {\n gotoServerValidateRemaining++;\n checked[url] = true;\n gotoServerValidateUrl(count++, guid, url);\n }\n }\n });\n }\n }, 2000);\n\n return false;\n}\n\nwindow.switchRegistryModalHandler = () => {\n document.getElementById('switchRegistryPersonGUID').value = getFromRegistry(\"personGuid\");\n document.getElementById('switchRegistryURL').innerHTML = getFromRegistry(\"registryServer\");\n document.getElementById('switchRegistryResponse').innerHTML = '';\n $('#switchRegistryModal').modal('show');\n};\n\nwindow.notifyForSwitchRegistry = () => {\n // it's just old code, with minimal changes\n const newPersonGuid = document.getElementById('switchRegistryPersonGUID').value;\n\n if (newPersonGuid !== '' && newPersonGuid.length === 36) {\n\n $.ajax({\n url: getFromRegistry(\"registryServer\") + '/api/v1/registry?action=switch&machine='\n + getFromRegistry(\"machineGuid\") + '&name='\n + encodeURIComponent(getFromRegistry(\"hostname\")) + '&url='\n + encodeURIComponent(serverDefault) + '&to=' + newPersonGuid,\n async: true,\n cache: false,\n headers: {\n 'Cache-Control': 'no-cache, no-store',\n 'Pragma': 'no-cache'\n },\n xhrFields: {withCredentials: true} // required for the cookie\n })\n .done(function (data) {\n data = NETDATA.xss.checkAlways('/api/v1/registry?action=switch', data);\n\n if (typeof data.status !== 'string' || data.status !== 'ok') {\n // NETDATA.error(413, NETDATA.registry.server + ' responded with: ' + JSON.stringify(data));\n console.warn(\"Netdata registry server send invalid response to SWITCH\", data)\n data = null;\n }\n\n $('#switchRegistryModal').modal('hide');\n })\n .fail(function () {\n // NETDATA.error(414, NETDATA.registry.server);\n console.warn(\"Netdata registry SWITCH failed\")\n document.getElementById('switchRegistryResponse').innerHTML = \"<b>Sorry! The registry rejected your request.</b>\";\n });\n } else {\n document.getElementById('switchRegistryResponse').innerHTML = \"<b>The ID you have entered is not a GUID.</b>\";\n }\n};\n\nvar deleteRegistryGuid = null;\nvar deleteRegistryUrl = null;\n\nwindow.deleteRegistryModalHandler = (guid, name, url) => {\n deleteRegistryGuid = guid;\n deleteRegistryUrl = url;\n\n document.getElementById('deleteRegistryServerName').innerHTML = name;\n document.getElementById('deleteRegistryServerName2').innerHTML = name;\n document.getElementById('deleteRegistryServerURL').innerHTML = url;\n document.getElementById('deleteRegistryResponse').innerHTML = '';\n\n $('#deleteRegistryModal').modal('show');\n}\n\nwindow.notifyForDeleteRegistry = () => {\n const responseEl = document.getElementById('deleteRegistryResponse');\n\n if (deleteRegistryUrl) {\n NETDATA.registryDelete(getFromRegistry, serverDefault, deleteRegistryUrl, function (result) {\n if (result !== null) {\n deleteRegistryUrl = null;\n $('#deleteRegistryModal').modal('hide');\n reduxStore.dispatch(resetRegistry())\n } else {\n responseEl.innerHTML = \"<b>Sorry, this command was rejected by the registry server!</b>\";\n }\n });\n }\n}\n\nvar options = {\n menus: {},\n submenu_names: {},\n data: null,\n hostname: 'netdata_server', // will be overwritten by the netdata server\n version: 'unknown',\n release_channel: 'unknown',\n hosts: [],\n\n duration: 0, // the default duration of the charts\n update_every: 1,\n\n chartsPerRow: 0,\n // chartsMinWidth: 1450,\n chartsHeight: 180,\n};\n\nfunction chartsPerRow(total) {\n void (total);\n\n if (options.chartsPerRow === 0) {\n return 1;\n //var width = Math.floor(total / options.chartsMinWidth);\n //if(width === 0) width = 1;\n //return width;\n } else {\n return options.chartsPerRow;\n }\n}\n\nfunction prioritySort(a, b) {\n if (a.priority < b.priority) {\n return -1;\n }\n if (a.priority > b.priority) {\n return 1;\n }\n return naturalSortCompare(a.name, b.name);\n}\n\nfunction sortObjectByPriority(object) {\n var idx = {};\n var sorted = [];\n\n for (var i in object) {\n if (!object.hasOwnProperty(i)) {\n continue;\n }\n\n if (typeof idx[i] === 'undefined') {\n idx[i] = object[i];\n sorted.push(i);\n }\n }\n\n sorted.sort(function (a, b) {\n if (idx[a].priority < idx[b].priority) {\n return -1;\n }\n if (idx[a].priority > idx[b].priority) {\n return 1;\n }\n return naturalSortCompare(a, b);\n });\n\n return sorted;\n}\n\n// ----------------------------------------------------------------------------\n// scroll to a section, without changing the browser history\n\nwindow.scrollToId = (hash) => {\n if (hash && hash !== '' && document.getElementById(hash) !== null) {\n var offset = $('#' + hash).offset();\n if (typeof offset !== 'undefined') {\n //console.log('scrolling to ' + hash + ' at ' + offset.top.toString());\n $('html, body').animate({ scrollTop: offset.top - 30 }, 0);\n }\n }\n\n // we must return false to prevent the default action\n return false;\n}\n\n// ----------------------------------------------------------------------------\n\n// user editable information\nwindow.customDashboard = {\n menu: {},\n submenu: {},\n context: {}\n};\n\n// netdata standard information\nconst netdataDashboard = {\n sparklines_registry: {},\n os: 'unknown',\n\n menu: {},\n submenu: {},\n context: {},\n\n // generate a sparkline\n // used in the documentation\n sparkline: function (prefix, chart, dimension, units, suffix) {\n if (options.data === null || typeof options.data.charts === 'undefined') {\n return '';\n }\n\n if (typeof options.data.charts[chart] === 'undefined') {\n return '';\n }\n\n if (typeof options.data.charts[chart].dimensions === 'undefined') {\n return '';\n }\n\n if (typeof options.data.charts[chart].dimensions[dimension] === 'undefined') {\n return '';\n }\n\n var key = chart + '.' + dimension;\n\n if (typeof units === 'undefined') {\n units = '';\n }\n\n if (typeof this.sparklines_registry[key] === 'undefined') {\n this.sparklines_registry[key] = { count: 1 };\n } else {\n this.sparklines_registry[key].count++;\n }\n\n key = key + '.' + this.sparklines_registry[key].count;\n\n return prefix + '<div class=\"netdata-container\" data-netdata=\"' + chart + '\" data-width=\"25%\" data-height=\"15px\" data-chart-library=\"dygraph\" data-dygraph-theme=\"sparkline\" data-dimensions=\"' + dimension + '\" data-show-value-of-' + dimension + '-at=\"' + key + '\"></div> (<span id=\"' + key + '\" style=\"display: inline-block; min-width: 50px; text-align: right;\">X</span>' + units + ')' + suffix;\n },\n\n gaugeChart: function (title, width, dimensions, colors) {\n if (typeof colors === 'undefined') {\n colors = '';\n }\n\n if (typeof dimensions === 'undefined') {\n dimensions = '';\n }\n\n return '<div class=\"netdata-container\" data-netdata=\"CHART_UNIQUE_ID\"'\n + ' data-dimensions=\"' + dimensions + '\"'\n + ' data-chart-library=\"gauge\"'\n + ' data-gauge-adjust=\"width\"'\n + ' data-title=\"' + title + '\"'\n + ' data-width=\"' + width + '\"'\n + ' data-points=\"CHART_DURATION\"'\n + ' data-colors=\"' + colors + '\"'\n + ' role=\"application\"></div>';\n },\n\n anyAttribute: function (obj, attr, key, def) {\n if (typeof (obj[key]) !== 'undefined') {\n var x = obj[key][attr];\n\n if (typeof (x) === 'undefined') {\n return def;\n }\n\n if (typeof (x) === 'function') {\n return x(netdataDashboard.os);\n }\n\n return x;\n }\n\n return def;\n },\n\n menuTitle: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return (this.anyAttribute(this.menu, 'title', chart.menu_pattern, chart.menu_pattern).toString()\n + ' ' + chart.type.slice(-(chart.type.length - chart.menu_pattern.length - 1)).toString()).replace(/_/g, ' ');\n }\n\n return (this.anyAttribute(this.menu, 'title', chart.menu, chart.menu)).toString().replace(/_/g, ' ');\n },\n\n menuIcon: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return this.anyAttribute(this.menu, 'icon', chart.menu_pattern, '<i class=\"fas fa-puzzle-piece\"></i>').toString();\n }\n\n return this.anyAttribute(this.menu, 'icon', chart.menu, '<i class=\"fas fa-puzzle-piece\"></i>');\n },\n\n menuInfo: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return this.anyAttribute(this.menu, 'info', chart.menu_pattern, null);\n }\n\n return this.anyAttribute(this.menu, 'info', chart.menu, null);\n },\n\n menuHeight: function (chart) {\n if (typeof chart.menu_pattern !== 'undefined') {\n return this.anyAttribute(this.menu, 'height', chart.menu_pattern, 1.0);\n }\n\n return this.anyAttribute(this.menu, 'height', chart.menu, 1.0);\n },\n\n submenuTitle: function (menu, submenu) {\n var key = menu + '.' + submenu;\n // console.log(key);\n var title = this.anyAttribute(this.submenu, 'title', key, submenu).toString().replace(/_/g, ' ');\n if (title.length > 28) {\n var a = title.substring(0, 13);\n var b = title.substring(title.length - 12, title.length);\n return a + '...' + b;\n }\n return title;\n },\n\n submenuInfo: function (menu, submenu) {\n var key = menu + '.' + submenu;\n return this.anyAttribute(this.submenu, 'info', key, null);\n },\n\n submenuHeight: function (menu, submenu, relative) {\n var key = menu + '.' + submenu;\n return this.anyAttribute(this.submenu, 'height', key, 1.0) * relative;\n },\n\n contextInfo: function (id) {\n var x = this.anyAttribute(this.context, 'info', id, null);\n\n if (x !== null) {\n return '<div class=\"shorten dashboard-context-info netdata-chart-alignment\" role=\"document\">' + x + '</div>';\n } else {\n return '';\n }\n },\n\n contextValueRange: function (id) {\n if (typeof this.context[id] !== 'undefined' && typeof this.context[id].valueRange !== 'undefined') {\n return this.context[id].valueRange;\n } else {\n return '[null, null]';\n }\n },\n\n contextHeight: function (id, def) {\n if (typeof this.context[id] !== 'undefined' && typeof this.context[id].height !== 'undefined') {\n return def * this.context[id].height;\n } else {\n return def;\n }\n },\n\n contextDecimalDigits: function (id, def) {\n if (typeof this.context[id] !== 'undefined' && typeof this.context[id].decimalDigits !== 'undefined') {\n return this.context[id].decimalDigits;\n } else {\n return def;\n }\n }\n};\nwindow.netdataDashboard = netdataDashboard // share with dashboard_info.js :/\n\n// ----------------------------------------------------------------------------\n\n// enrich the data structure returned by netdata\n// to reflect our menu system and content\n// TODO: this is a shame - we should fix charts naming (issue #807)\nfunction enrichChartData(chart) {\n var parts = chart.type.split('_');\n var tmp = parts[0];\n\n switch (tmp) {\n case 'ap':\n case 'net':\n case 'disk':\n case 'powersupply':\n case 'statsd':\n chart.menu = tmp;\n break;\n\n case 'apache':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'cache') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'bind':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'rndc') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'cgroup':\n chart.menu = chart.type;\n if (chart.id.match(/.*[\\._\\/-:]qemu[\\._\\/-:]*/) || chart.id.match(/.*[\\._\\/-:]kvm[\\._\\/-:]*/)) {\n chart.menu_pattern = 'cgqemu';\n } else {\n chart.menu_pattern = 'cgroup';\n }\n break;\n\n case 'go':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'expvar') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'mount':\n if (parts.length > 2) {\n chart.menu = tmp + '_' + parts[1];\n }\n else {\n chart.menu = tmp;\n }\n break;\n\n case 'isc':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'dhcpd') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'ovpn':\n chart.menu = chart.type;\n if (parts.length > 3 && parts[1] === 'status' && parts[2] === 'log') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'smartd':\n case 'web':\n chart.menu = chart.type;\n if (parts.length > 2 && parts[1] === 'log') {\n chart.menu_pattern = tmp + '_' + parts[1];\n } else if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n\n case 'anomaly':\n if (parts.length >= 2 && parts[1].startsWith('detection')) {\n chart.menu = tmp + '_detection';\n }\n break;\n\n case 'tc':\n chart.menu = tmp;\n\n // find a name for this device from fireqos info\n // we strip '_(in|out)' or '(in|out)_'\n if (chart.context === 'tc.qos' && (typeof options.submenu_names[chart.family] === 'undefined' || options.submenu_names[chart.family] === chart.family)) {\n var n = chart.name.split('.')[1];\n if (n.endsWith('_in')) {\n options.submenu_names[chart.family] = n.slice(0, n.lastIndexOf('_in'));\n } else if (n.endsWith('_out')) {\n options.submenu_names[chart.family] = n.slice(0, n.lastIndexOf('_out'));\n } else if (n.startsWith('in_')) {\n options.submenu_names[chart.family] = n.slice(3, n.length);\n } else if (n.startsWith('out_')) {\n options.submenu_names[chart.family] = n.slice(4, n.length);\n } else {\n options.submenu_names[chart.family] = n;\n }\n }\n\n // increase the priority of IFB devices\n // to have inbound appear before outbound\n if (chart.id.match(/.*-ifb$/)) {\n chart.priority--;\n }\n\n break;\n\n default:\n chart.menu = chart.type;\n if (parts.length > 1) {\n chart.menu_pattern = tmp;\n }\n break;\n }\n\n chart.submenu = chart.family;\n}\n\n// ----------------------------------------------------------------------------\n\nfunction headMain(os, charts, duration) {\n void (os);\n\n if (urlOptions.mode === 'print') {\n return '';\n }\n\n var head = '';\n\n if (typeof charts['system.swap'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.swap\"'\n + ' data-dimensions=\"used\"'\n + ' data-append-options=\"percentage\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Used Swap\"'\n + ' data-units=\"%\"'\n + ' data-easypiechart-max-value=\"100\"'\n + ' data-width=\"9%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-colors=\"#DD4400\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.io'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.io\"'\n + ' data-dimensions=\"in\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Read\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.io.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.io\"'\n + ' data-dimensions=\"out\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Write\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.io.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.pgpgio'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.pgpgio\"'\n + ' data-dimensions=\"in\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Read\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.pgpgio.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.pgpgio\"'\n + ' data-dimensions=\"out\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Disk Write\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.pgpgio.mainhead\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.cpu'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.cpu\"'\n + ' data-chart-library=\"gauge\"'\n + ' data-title=\"CPU\"'\n + ' data-units=\"%\"'\n + ' data-gauge-max-value=\"100\"'\n + ' data-width=\"20%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-colors=\"' + NETDATA.colors[12] + '\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.net'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.net\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Net Inbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.net.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.net\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Net Outbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.net.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.ip'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ip\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IP Inbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ip.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ip\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IP Outbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ip.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.ipv4'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv4\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv4 Inbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv4.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv4\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv4 Outbound\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv4.mainhead\"'\n + ' role=\"application\"></div>';\n }\n else if (typeof charts['system.ipv6'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv6\"'\n + ' data-dimensions=\"received\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv6 Inbound\"'\n + ' data-units=\"kbps\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv6.mainhead\"'\n + ' role=\"application\"></div>';\n\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ipv6\"'\n + ' data-dimensions=\"sent\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"IPv6 Outbound\"'\n + ' data-units=\"kbps\"'\n + ' data-width=\"11%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-common-units=\"system.ipv6.mainhead\"'\n + ' role=\"application\"></div>';\n }\n\n if (typeof charts['system.ram'] !== 'undefined') {\n head += '<div class=\"netdata-container\" style=\"margin-right: 10px;\" data-netdata=\"system.ram\"'\n + ' data-dimensions=\"used|buffers|active|wired\"' // active and wired are FreeBSD stats\n + ' data-append-options=\"percentage\"'\n + ' data-chart-library=\"easypiechart\"'\n + ' data-title=\"Used RAM\"'\n + ' data-units=\"%\"'\n + ' data-easypiechart-max-value=\"100\"'\n + ' data-width=\"9%\"'\n + ' data-points=\"' + duration.toString() + '\"'\n + ' data-colors=\"' + NETDATA.colors[7] + '\"'\n + ' role=\"application\"></div>';\n }\n\n return head;\n}\n\nfunction generateHeadCharts(type, chart, duration) {\n if (urlOptions.mode === 'print') {\n return '';\n }\n\n var head = '';\n var hcharts = netdataDashboard.anyAttribute(netdataDashboard.context, type, chart.context, []);\n if (hcharts.length > 0) {\n var hi = 0, hlen = hcharts.length;\n while (hi < hlen) {\n if (typeof hcharts[hi] === 'function') {\n head += hcharts[hi](netdataDashboard.os, chart.id).replace(/CHART_DURATION/g, duration.toString()).replace(/CHART_UNIQUE_ID/g, chart.id);\n } else {\n head += hcharts[hi].replace(/CHART_DURATION/g, duration.toString()).replace(/CHART_UNIQUE_ID/g, chart.id);\n }\n hi++;\n }\n }\n return head;\n}\n\nfunction renderPage(menus, data) {\n var div = document.getElementById('charts_div');\n var pcent_width = Math.floor(100 / chartsPerRow($(div).width()));\n\n // find the proper duration for per-second updates\n var duration = Math.round(($(div).width() * pcent_width / 100 * data.update_every / 3) / 60) * 60;\n options.duration = duration; // probably obsolete/not needed\n options.update_every = data.update_every;\n\n var html = '';\n var sidebar = '<ul class=\"nav dashboard-sidenav\" data-spy=\"affix\" id=\"sidebar_ul\">';\n var mainhead = headMain(netdataDashboard.os, data.charts, duration);\n\n // sort the menus\n var main = sortObjectByPriority(menus);\n var i = 0, len = main.length;\n\n // todo hook to options\n const hasChartsOnBottom = defaultAttributes.legendPosition === \"bottom\"\n const chartAdditionalHeight = hasChartsOnBottom ? LEGEND_BOTTOM_SINGLE_LINE_HEIGHT : 0\n while (i < len) {\n var menu = main[i++];\n\n // generate an entry at the main menu\n\n var menuid = NETDATA.name2id('menu_' + menu);\n sidebar += '<li class=\"\"><a href=\"#' + menuid + '\" onClick=\"return scrollToId(\\'' + menuid + '\\');\">' + menus[menu].icon + ' ' + menus[menu].title + '</a><ul class=\"nav\">';\n html += '<div role=\"section\" class=\"dashboard-section\"><div role=\"sectionhead\"><h1 id=\"' + menuid + '\" role=\"heading\">' + menus[menu].icon + ' ' + menus[menu].title + '</h1></div><div role=\"section\" class=\"dashboard-subsection\">';\n\n if (menus[menu].info !== null) {\n html += menus[menu].info;\n }\n\n // console.log(' >> ' + menu + ' (' + menus[menu].priority + '): ' + menus[menu].title);\n\n var shtml = '';\n var mhead = '<div class=\"netdata-chart-row\">' + mainhead;\n mainhead = '';\n\n // sort the submenus of this menu\n var sub = sortObjectByPriority(menus[menu].submenus);\n var si = 0, slen = sub.length;\n while (si < slen) {\n var submenu = sub[si++];\n\n // generate an entry at the submenu\n var submenuid = NETDATA.name2id('menu_' + menu + '_submenu_' + submenu);\n sidebar += '<li class><a href=\"#' + submenuid + '\" onClick=\"return scrollToId(\\'' + submenuid + '\\');\">' + menus[menu].submenus[submenu].title + '</a></li>';\n shtml += '<div role=\"section\" class=\"dashboard-section-container\" id=\"' + submenuid + '\"><h2 id=\"' + submenuid + '\" class=\"netdata-chart-alignment\" role=\"heading\">' + menus[menu].submenus[submenu].title + '</h2>';\n\n if (menus[menu].submenus[submenu].info !== null) {\n shtml += '<div class=\"dashboard-submenu-info netdata-chart-alignment\" role=\"document\">' + menus[menu].submenus[submenu].info + '</div>';\n }\n\n var head = '<div class=\"netdata-chart-row\">';\n var chtml = '';\n\n // console.log(' \\------- ' + submenu + ' (' + menus[menu].submenus[submenu].priority + '): ' + menus[menu].submenus[submenu].title);\n\n // sort the charts in this submenu of this menu\n menus[menu].submenus[submenu].charts.sort(prioritySort);\n var ci = 0, clen = menus[menu].submenus[submenu].charts.length;\n while (ci < clen) {\n var chart = menus[menu].submenus[submenu].charts[ci++];\n\n // generate the submenu heading charts\n mhead += generateHeadCharts('mainheads', chart, duration);\n head += generateHeadCharts('heads', chart, duration);\n\n function chartCommonMin(family, context, units) {\n var x = netdataDashboard.anyAttribute(netdataDashboard.context, 'commonMin', context, undefined);\n if (typeof x !== 'undefined') {\n return ' data-common-min=\"' + family + '/' + context + '/' + units + '\"';\n } else {\n return '';\n }\n }\n\n function chartCommonMax(family, context, units) {\n var x = netdataDashboard.anyAttribute(netdataDashboard.context, 'commonMax', context, undefined);\n if (typeof x !== 'undefined') {\n return ' data-common-max=\"' + family + '/' + context + '/' + units + '\"';\n } else {\n return '';\n }\n }\n\n // generate the chart\n if (urlOptions.mode === 'print') {\n chtml += '<div role=\"row\" class=\"dashboard-print-row\">';\n }\n\n const chartHeight = netdataDashboard.contextHeight(chart.context, options.chartsHeight)\n + chartAdditionalHeight;\n\n chtml += '<div class=\"netdata-chartblock-container\" style=\"width: ' + pcent_width.toString() + '%;\">' + netdataDashboard.contextInfo(chart.context) + '<div class=\"netdata-container\" id=\"chart_' + NETDATA.name2id(chart.id) + '\" data-netdata=\"' + chart.id + '\"'\n + ' data-width=\"100%\"'\n + ' data-height=\"' + chartHeight.toString() + 'px\"'\n + ' data-dygraph-valuerange=\"' + netdataDashboard.contextValueRange(chart.context) + '\"'\n + ' data-id=\"' + NETDATA.name2id(options.hostname + '/' + chart.id) + '\"'\n + ' data-colors=\"' + netdataDashboard.anyAttribute(netdataDashboard.context, 'colors', chart.context, '') + '\"'\n + ' data-decimal-digits=\"' + netdataDashboard.contextDecimalDigits(chart.context, -1) + '\"'\n + (hasChartsOnBottom ? ' data-legend-position=\"bottom\"' : '')\n + chartCommonMin(chart.family, chart.context, chart.units)\n + chartCommonMax(chart.family, chart.context, chart.units)\n + ' role=\"application\"></div></div>';\n\n if (urlOptions.mode === 'print') {\n chtml += '</div>';\n }\n }\n\n head += '</div>';\n shtml += head + chtml + '</div>';\n }\n\n mhead += '</div>';\n sidebar += '</ul></li>';\n html += mhead + shtml + '</div></div><hr role=\"separator\"/>';\n }\n\n const isMemoryModeDbEngine = data.memory_mode === \"dbengine\";\n\n sidebar += '<li class=\"\" style=\"padding-top:15px;\"><a href=\"https://learn.netdata.cloud/docs/agent/collectors/quickstart/\" target=\"_blank\"><i class=\"fas fa-plus\"></i> Add more charts</a></li>';\n sidebar += '<li class=\"\"><a href=\"https://learn.netdata.cloud/docs/agent/health/quickstart/\" target=\"_blank\"><i class=\"fas fa-plus\"></i> Add more alarms</a></li>';\n sidebar += '<li class=\"\" style=\"margin:20px;color:#666;\"><small>Every ' +\n ((data.update_every === 1) ? 'second' : data.update_every.toString() + ' seconds') + ', ' +\n 'Netdata collects <strong>' + data.dimensions_count.toLocaleString() + '</strong> metrics on ' +\n data.hostname.toString() + ', presents them in <strong>' +\n data.charts_count.toLocaleString() + '</strong> charts' +\n (isMemoryModeDbEngine ? '' : ',') + // oxford comma\n ' and monitors them with <strong>' +\n data.alarms_count.toLocaleString() + '</strong> alarms.';\n\n if (!isMemoryModeDbEngine) {\n sidebar += '<br /> <br />Get more history by ' +\n '<a href=\"https://learn.netdata.cloud/guides/longer-metrics-storage#using-the-round-robin-database\" target=_blank>configuring Netdata\\'s <strong>history</strong></a> or switching to the <a href=\"https://learn.netdata.cloud/docs/agent/database/engine\" target=_blank>database engine.</a>';\n }\n\n sidebar += '<br/> <br/><strong>netdata</strong><br/>' + data.version.toString() + '</small>';\n\n sidebar += '</li>'\n\n sidebar += '<li id=\"sidebar-end-portal-container\"></li>'\n\n\n sidebar += '</ul>';\n div.innerHTML = html;\n document.getElementById('sidebar').innerHTML = sidebar;\n\n if (urlOptions.highlight === true) {\n reduxStore.dispatch(setGlobalChartUnderlayAction({\n after: urlOptions.highlight_after,\n before: urlOptions.highlight_before,\n }))\n }\n\n if (urlOptions.mode === 'print') {\n printPage();\n } else {\n finalizePage();\n }\n}\n\nfunction renderChartsAndMenu(data) {\n options.menus = {};\n options.submenu_names = {};\n\n var menus = options.menus;\n var charts = data.charts;\n var m, menu_key;\n\n for (var c in charts) {\n if (!charts.hasOwnProperty(c)) {\n continue;\n }\n\n var chart = charts[c];\n enrichChartData(chart);\n m = chart.menu;\n\n // create the menu\n if (typeof menus[m] === 'undefined') {\n menus[m] = {\n menu_pattern: chart.menu_pattern,\n priority: chart.priority,\n submenus: {},\n title: netdataDashboard.menuTitle(chart),\n icon: netdataDashboard.menuIcon(chart),\n info: netdataDashboard.menuInfo(chart),\n height: netdataDashboard.menuHeight(chart) * options.chartsHeight\n };\n } else {\n if (typeof (menus[m].menu_pattern) === 'undefined') {\n menus[m].menu_pattern = chart.menu_pattern;\n }\n\n if (chart.priority < menus[m].priority) {\n menus[m].priority = chart.priority;\n }\n }\n\n menu_key = (typeof (menus[m].menu_pattern) !== 'undefined') ? menus[m].menu_pattern : m;\n\n // create the submenu\n if (typeof menus[m].submenus[chart.submenu] === 'undefined') {\n menus[m].submenus[chart.submenu] = {\n priority: chart.priority,\n charts: [],\n title: null,\n info: netdataDashboard.submenuInfo(menu_key, chart.submenu),\n height: netdataDashboard.submenuHeight(menu_key, chart.submenu, menus[m].height)\n };\n } else {\n if (chart.priority < menus[m].submenus[chart.submenu].priority) {\n menus[m].submenus[chart.submenu].priority = chart.priority;\n }\n }\n\n // index the chart in the menu/submenu\n menus[m].submenus[chart.submenu].charts.push(chart);\n }\n\n // propagate the descriptive subname given to QoS\n // to all the other submenus with the same name\n for (var m in menus) {\n if (!menus.hasOwnProperty(m)) {\n continue;\n }\n\n for (var s in menus[m].submenus) {\n if (!menus[m].submenus.hasOwnProperty(s)) {\n continue;\n }\n\n // set the family using a name\n if (typeof options.submenu_names[s] !== 'undefined') {\n menus[m].submenus[s].title = s + ' (' + options.submenu_names[s] + ')';\n } else {\n menu_key = (typeof (menus[m].menu_pattern) !== 'undefined') ? menus[m].menu_pattern : m;\n menus[m].submenus[s].title = netdataDashboard.submenuTitle(menu_key, s);\n }\n }\n }\n\n renderPage(menus, data);\n}\n\n// ----------------------------------------------------------------------------\n\nexport const handleLoadJs = (promise, library, callback) => promise\n .catch((e) => {\n console.warn('error', e);\n alert(`Cannot load required JS library: ${library}`)\n })\n .then(() => {\n callback()\n })\n\n\nfunction loadClipboard(callback) {\n handleLoadJs(\n import(\"clipboard-polyfill\").then((clipboard) => {\n window.clipboard = clipboard\n }),\n \"clipboard-polyfill\",\n callback,\n )\n}\n\nfunction loadBootstrapTable(callback) {\n handleLoadJs(\n Promise.all([\n import(\"bootstrap-table\").then(() => (\n import('bootstrap-table/dist/extensions/export/bootstrap-table-export.min')\n )),\n import(\"tableexport.jquery.plugin\")\n ]),\n \"bootstrap-table\",\n callback,\n )\n}\n\nfunction loadBootstrapSlider(callback) {\n handleLoadJs(\n Promise.all([\n import(\"bootstrap-slider\").then(({ default: slider }) => {\n window.Slider = slider\n }),\n import(\"bootstrap-slider/dist/css/bootstrap-slider.min.css\"),\n ]),\n \"bootstrap-slider\",\n callback,\n )\n}\n\nfunction loadLzString(callback) {\n handleLoadJs(import(\"lz-string\"), \"lz-string\", callback)\n}\n\nfunction loadPako(callback) {\n handleLoadJs(\n import(\"pako\").then(({ default: pako }) => {\n window.pako = pako\n }),\n \"pako\",\n callback,\n )\n}\n\n// ----------------------------------------------------------------------------\n\nwindow.clipboardCopy = text => {\n clipboard.writeText(text);\n};\n\nwindow.clipboardCopyBadgeEmbed = url => {\n clipboard.writeText('<embed src=\"' + url + '\" type=\"image/svg+xml\" height=\"20\"/>');\n};\n\n// ----------------------------------------------------------------------------\n\nfunction alarmsUpdateModal() {\n var active = '<h3>Raised Alarms</h3><table class=\"table\">';\n var all = '<h3>All Running Alarms</h3><div class=\"panel-group\" id=\"alarms_all_accordion\" role=\"tablist\" aria-multiselectable=\"true\">';\n var footer = '<hr/><a href=\"https://github.com/netdata/netdata/tree/master/web/api/badges#netdata-badges\" target=\"_blank\">netdata badges</a> refresh automatically. Their color indicates the state of the alarm: <span style=\"color: #e05d44\"><b> red </b></span> is critical, <span style=\"color:#fe7d37\"><b> orange </b></span> is warning, <span style=\"color: #4c1\"><b> bright green </b></span> is ok, <span style=\"color: #9f9f9f\"><b> light grey </b></span> is undefined (i.e. no data or no status), <span style=\"color: #000\"><b> black </b></span> is not initialized. You can copy and paste their URLs to embed them in any web page.<br/>netdata can send notifications for these alarms. Check <a href=\"https://github.com/netdata/netdata/blob/master/health/notifications/health_alarm_notify.conf\" target=\"_blank\">this configuration file</a> for more information.';\n\n loadClipboard(function () {\n });\n\n\n const callback = (data) => {\n options.alarm_families = [];\n\n if (data === null) {\n document.getElementById('alarms_active').innerHTML =\n document.getElementById('alarms_all').innerHTML =\n document.getElementById('alarms_log').innerHTML =\n 'failed to load alarm data!';\n return;\n }\n\n function alarmid4human(id) {\n if (id === 0) {\n return '-';\n }\n\n return id.toString();\n }\n\n function timestamp4human(timestamp, space) {\n if (timestamp === 0) {\n return '-';\n }\n\n if (typeof space === 'undefined') {\n space = ' ';\n }\n\n var t = new Date(timestamp * 1000);\n\n // commented out to always have date+time, to have consistent exports\n // var now = new Date();\n\n // if (t.toDateString() === now.toDateString()) {\n // return t.toLocaleTimeString();\n // }\n\n return t.toLocaleDateString() + space + t.toLocaleTimeString();\n }\n\n function alarm_lookup_explain(alarm, chart) {\n var dimensions = ' of all values ';\n\n if (chart.dimensions.length > 1) {\n dimensions = ' of the sum of all dimensions ';\n }\n\n if (typeof alarm.lookup_dimensions !== 'undefined') {\n var d = alarm.lookup_dimensions.replace(/|/g, ',');\n var x = d.split(',');\n if (x.length > 1) {\n dimensions = 'of the sum of dimensions <code>' + alarm.lookup_dimensions + '</code> ';\n } else {\n dimensions = 'of all values of dimension <code>' + alarm.lookup_dimensions + '</code> ';\n }\n }\n\n return '<code>' + alarm.lookup_method + '</code> '\n + dimensions + ', of chart <code>' + alarm.chart + '</code>'\n + ', starting <code>' + seconds4human(alarm.lookup_after + alarm.lookup_before, { space: ' ' }) + '</code> and up to <code>' + seconds4human(alarm.lookup_before, { space: ' ' }) + '</code>'\n + ((alarm.lookup_options) ? (', with options <code>' + alarm.lookup_options.replace(/ /g, ', ') + '</code>') : '')\n + '.';\n }\n\n function alarm_to_html(alarm, full) {\n var chart = options.data.charts[alarm.chart];\n if (typeof (chart) === 'undefined') {\n chart = options.data.charts_by_name[alarm.chart];\n if (typeof (chart) === 'undefined') {\n // this means the charts loaded are incomplete\n // probably netdata was restarted and more alarms\n // are now available.\n console.log('Cannot find chart ' + alarm.chart + ', you probably need to refresh the page.');\n return '';\n }\n }\n\n var has_alarm = (typeof alarm.warn !== 'undefined' || typeof alarm.crit !== 'undefined');\n var badge_url = `${serverDefault}/api/v1/badge.svg?chart=${alarm.chart}&alarm=${alarm.name}&refresh=auto`;\n\n var action_buttons = '<br/> <br/>role: <b>' + alarm.recipient + '</b><br/> <br/>'\n + '<div class=\"action-button ripple\" title=\"click to scroll the dashboard to the chart of this alarm\" data-toggle=\"tooltip\" data-placement=\"bottom\" onClick=\"scrollToChartAfterHidingModal(\\'' + alarm.chart + '\\', ' + alarm.last_status_change * 1000 + ', \\'' + alarm.status + '\\'); $(\\'#alarmsModal\\').modal(\\'hide\\'); return false;\"><i class=\"fab fa-periscope\"></i></div>'\n + '<div class=\"action-button ripple\" title=\"click to copy to the clipboard the URL of this badge\" data-toggle=\"tooltip\" data-placement=\"bottom\" onClick=\"clipboardCopy(\\'' + badge_url + '\\'); return false;\"><i class=\"far fa-copy\"></i></div>'\n + '<div class=\"action-button ripple\" title=\"click to copy to the clipboard an auto-refreshing <code>embed</code> html element for this badge\" data-toggle=\"tooltip\" data-placement=\"bottom\" onClick=\"clipboardCopyBadgeEmbed(\\'' + badge_url + '\\'); return false;\"><i class=\"fas fa-copy\"></i></div>';\n\n var html = '<tr><td class=\"text-center\" style=\"vertical-align: middle; word-break: break-word;\" width=\"40%\"><b>' + alarm.chart + '</b><br/> <br/><embed src=\"' + badge_url + '\" type=\"image/svg+xml\" height=\"20\"/><br/> <br/><span style=\"font-size: 18px;\">' + alarm.info + '</span>' + action_buttons + '</td>'\n + '<td><table class=\"table\">'\n + ((typeof alarm.warn !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">warning when</td><td><span style=\"font-family: monospace; color:#fe7d37; font-weight: bold;\">' + alarm.warn + '</span></td></tr>') : '')\n + ((typeof alarm.crit !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">critical when</td><td><span style=\"font-family: monospace; color: #e05d44; font-weight: bold;\">' + alarm.crit + '</span></td></tr>') : '');\n\n if (full === true) {\n var units = chart.units;\n if (units === '%') {\n units = '%';\n }\n\n html += ((typeof alarm.lookup_after !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">db lookup</td><td>' + alarm_lookup_explain(alarm, chart) + '</td></tr>') : '')\n + ((typeof alarm.calc !== 'undefined') ? ('<tr><td width=\"10%\" style=\"text-align:right\">calculation</td><td><span style=\"font-family: monospace;\">' + alarm.calc + '</span></td></tr>') : '')\n + ((chart.green !== null) ? ('<tr><td width=\"10%\" style=\"text-align:right\">green threshold</td><td><code>' + chart.green + ' ' + units + '</code></td></tr>') : '')\n + ((chart.red !== null) ? ('<tr><td width=\"10%\" style=\"text-align:right\">red threshold</td><td><code>' + chart.red + ' ' + units + '</code></td></tr>') : '');\n }\n\n if (alarm.warn_repeat_every > 0) {\n html += '<tr><td width=\"10%\" style=\"text-align:right\">repeat warning</td><td>' + seconds4human(alarm.warn_repeat_every) + '</td></tr>';\n }\n\n if (alarm.crit_repeat_every > 0) {\n html += '<tr><td width=\"10%\" style=\"text-align:right\">repeat critical</td><td>' + seconds4human(alarm.crit_repeat_every) + '</td></tr>';\n }\n\n var delay = '';\n if ((alarm.delay_up_duration > 0 || alarm.delay_down_duration > 0) && alarm.delay_multiplier !== 0 && alarm.delay_max_duration > 0) {\n if (alarm.delay_up_duration === alarm.delay_down_duration) {\n delay += '<small><br/>hysteresis ' + seconds4human(alarm.delay_up_duration, {\n space: ' ',\n negative_suffix: ''\n });\n } else {\n delay = '<small><br/>hysteresis ';\n if (alarm.delay_up_duration > 0) {\n delay += 'on escalation <code>' + seconds4human(alarm.delay_up_duration, {\n space: ' ',\n negative_suffix: ''\n }) + '</code>, ';\n }\n if (alarm.delay_down_duration > 0) {\n delay += 'on recovery <code>' + seconds4human(alarm.delay_down_duration, {\n space: ' ',\n negative_suffix: ''\n }) + '</code>, ';\n }\n }\n if (alarm.delay_multiplier !== 1.0) {\n delay += 'multiplied by <code>' + alarm.delay_multiplier.toString() + '</code>';\n delay += ', up to <code>' + seconds4human(alarm.delay_max_duration, {\n space: ' ',\n negative_suffix: ''\n }) + '</code>';\n }\n delay += '</small>';\n }\n\n html += '<tr><td width=\"10%\" style=\"text-align:right\">check every</td><td>' + seconds4human(alarm.update_every, {\n space: ' ',\n negative_suffix: ''\n }) + '</td></tr>'\n + ((has_alarm === true) ? ('<tr><td width=\"10%\" style=\"text-align:right\">execute</td><td><span style=\"font-family: monospace;\">' + alarm.exec + '</span>' + delay + '</td></tr>') : '')\n + '<tr><td width=\"10%\" style=\"text-align:right\">source</td><td><span style=\"font-family: monospace; word-break: break-word;\">' + alarm.source + '</span></td></tr>'\n + '</table></td></tr>';\n\n return html;\n }\n\n function alarm_family_show(id) {\n var html = '<table class=\"table\">';\n var family = options.alarm_families[id];\n var len = family.arr.length;\n while (len--) {\n var alarm = family.arr[len];\n html += alarm_to_html(alarm, true);\n }\n html += '</table>';\n\n $('#alarm_all_' + id.toString()).html(html);\n enableTooltipsAndPopovers();\n }\n\n // find the proper family of each alarm\n var x, family, alarm;\n var count_active = 0;\n var count_all = 0;\n var families = {};\n var families_sort = [];\n for (x in data.alarms) {\n if (!data.alarms.hasOwnProperty(x)) {\n continue;\n }\n\n alarm = data.alarms[x];\n family = alarm.family;\n\n // find the chart\n var chart = options.data.charts[alarm.chart];\n if (typeof chart === 'undefined') {\n chart = options.data.charts_by_name[alarm.chart];\n }\n\n // not found - this should never happen!\n if (typeof chart === 'undefined') {\n console.log('WARNING: alarm ' + x + ' is linked to chart ' + alarm.chart + ', which is not found in the list of chart got from the server.');\n chart = { priority: 9999999 };\n }\n else if (typeof chart.menu !== 'undefined' && typeof chart.submenu !== 'undefined')\n // the family based on the chart\n {\n family = chart.menu + ' - ' + chart.submenu;\n }\n\n if (typeof families[family] === 'undefined') {\n families[family] = {\n name: family,\n arr: [],\n priority: chart.priority\n };\n\n families_sort.push(families[family]);\n }\n\n if (chart.priority < families[family].priority) {\n families[family].priority = chart.priority;\n }\n\n families[family].arr.unshift(alarm);\n }\n\n // sort the families, like the dashboard menu does\n var families_sorted = families_sort.sort(function (a, b) {\n if (a.priority < b.priority) {\n return -1;\n }\n if (a.priority > b.priority) {\n return 1;\n }\n return naturalSortCompare(a.name, b.name);\n });\n\n var i = 0;\n var fc = 0;\n var len = families_sorted.length;\n while (len--) {\n family = families_sorted[i++].name;\n var active_family_added = false;\n\n var expanded = 'false';\n var collapsed = 'class=\"collapsed\"';\n var cin = '';\n\n // uncomment if first family needs to be expanded by default\n // var expanded = 'true';\n // var collapsed = '';\n // var cin = 'in';\n\n if (fc !== 0) {\n all += \"</table></div></div></div>\";\n\n // uncomment if first family needs to be expanded by default\n // expanded = 'false';\n // collapsed = 'class=\"collapsed\"';\n // cin = '';\n }\n\n all += '<div class=\"panel panel-default\"><div class=\"panel-heading\" role=\"tab\" id=\"alarm_all_heading_' + fc.toString() + '\"><h4 class=\"panel-title\"><a ' + collapsed + ' role=\"button\" data-toggle=\"collapse\" data-parent=\"#alarms_all_accordion\" href=\"#alarm_all_' + fc.toString() + '\" aria-expanded=\"' + expanded + '\" aria-controls=\"alarm_all_' + fc.toString() + '\">' + family.toString() + '</a></h4></div><div id=\"alarm_all_' + fc.toString() + '\" class=\"panel-collapse collapse ' + cin + '\" role=\"tabpanel\" aria-labelledby=\"alarm_all_heading_' + fc.toString() + '\" data-alarm-id=\"' + fc.toString() + '\"><div class=\"panel-body\" id=\"alarm_all_body_' + fc.toString() + '\">';\n\n options.alarm_families[fc] = families[family];\n\n fc++;\n\n var arr = families[family].arr;\n var c = arr.length;\n while (c--) {\n alarm = arr[c];\n if (alarm.status === 'WARNING' || alarm.status === 'CRITICAL') {\n if (!active_family_added) {\n active_family_added = true;\n active += '<tr><th class=\"text-center\" colspan=\"2\"><h4>' + family + '</h4></th></tr>';\n }\n count_active++;\n active += alarm_to_html(alarm, true);\n }\n\n count_all++;\n }\n }\n active += \"</table>\";\n if (families_sorted.length > 0) {\n all += \"</div></div></div>\";\n }\n all += \"</div>\";\n\n if (!count_active) {\n active += '<div style=\"width:100%; height: 100px; text-align: center;\"><span style=\"font-size: 50px;\"><i class=\"fas fa-thumbs-up\"></i></span><br/>Everything is normal. No raised alarms.</div>';\n } else {\n active += footer;\n }\n\n if (!count_all) {\n all += \"<h4>No alarms are running in this system.</h4>\";\n } else {\n all += footer;\n }\n\n document.getElementById('alarms_active').innerHTML = active;\n document.getElementById('alarms_all').innerHTML = all;\n enableTooltipsAndPopovers();\n\n if (families_sorted.length > 0) {\n alarm_family_show(0);\n }\n\n // register bootstrap events\n var $accordion = $('#alarms_all_accordion');\n $accordion.on('show.bs.collapse', function (d) {\n var target = $(d.target);\n var id = $(target).data('alarm-id');\n alarm_family_show(id);\n });\n $accordion.on('hidden.bs.collapse', function (d) {\n var target = $(d.target);\n var id = $(target).data('alarm-id');\n $('#alarm_all_' + id.toString()).html('');\n });\n\n document.getElementById('alarms_log').innerHTML = '<h3>Alarm Log</h3><table id=\"alarms_log_table\"></table>';\n\n loadBootstrapTable(function () {\n $('#alarms_log_table').bootstrapTable({\n url: `${serverDefault}/api/v1/alarm_log?all`,\n cache: false,\n pagination: true,\n pageSize: 10,\n showPaginationSwitch: false,\n search: true,\n searchTimeOut: 300,\n searchAlign: 'left',\n showColumns: true,\n showExport: true,\n exportDataType: 'all',\n exportOptions: {\n fileName: 'netdata_alarm_log'\n },\n onClickRow: function (row) {\n scrollToChartAfterHidingModal(row.chart, row.when * 1000, row.status);\n $('#alarmsModal').modal('hide');\n return false;\n },\n rowStyle: function (row) {\n switch (row.status) {\n case 'CRITICAL':\n return { classes: 'danger' };\n break;\n case 'WARNING':\n return { classes: 'warning' };\n break;\n case 'UNDEFINED':\n return { classes: 'info' };\n break;\n case 'CLEAR':\n return { classes: 'success' };\n break;\n }\n return {};\n },\n showFooter: false,\n showHeader: true,\n showRefresh: true,\n showToggle: false,\n sortable: true,\n silentSort: false,\n columns: [\n {\n field: 'when',\n title: 'Event Date',\n valign: 'middle',\n titleTooltip: 'The date and time the even took place',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return timestamp4human(value, ' ');\n },\n align: 'center',\n switchable: false,\n sortable: true\n },\n {\n field: 'hostname',\n title: 'Host',\n valign: 'middle',\n titleTooltip: 'The host that generated this event',\n align: 'center',\n visible: false,\n sortable: true\n },\n {\n field: 'unique_id',\n title: 'Unique ID',\n titleTooltip: 'The host unique ID for this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'alarm_id',\n title: 'Alarm ID',\n titleTooltip: 'The ID of the alarm that generated this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'alarm_event_id',\n title: 'Alarm Event ID',\n titleTooltip: 'The incremental ID of this event for the given alarm',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'chart',\n title: 'Chart',\n titleTooltip: 'The chart the alarm is attached to',\n align: 'center',\n valign: 'middle',\n switchable: false,\n sortable: true\n },\n {\n field: 'family',\n title: 'Family',\n titleTooltip: 'The family of the chart the alarm is attached to',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'name',\n title: 'Alarm',\n titleTooltip: 'The alarm name that generated this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return value.toString().replace(/_/g, ' ');\n },\n align: 'center',\n valign: 'middle',\n switchable: false,\n sortable: true\n },\n {\n field: 'value_string',\n title: 'Friendly Value',\n titleTooltip: 'The value of the alarm, that triggered this event',\n align: 'right',\n valign: 'middle',\n sortable: true\n },\n {\n field: 'old_value_string',\n title: 'Friendly Old Value',\n titleTooltip: 'The value of the alarm, just before this event',\n align: 'right',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'old_value',\n title: 'Old Value',\n titleTooltip: 'The value of the alarm, just before this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return ((value !== null) ? Math.round(value * 100) / 100 : 'NaN').toString();\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'value',\n title: 'Value',\n titleTooltip: 'The value of the alarm, that triggered this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return ((value !== null) ? Math.round(value * 100) / 100 : 'NaN').toString();\n },\n align: 'right',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'units',\n title: 'Units',\n titleTooltip: 'The units of the value of the alarm',\n align: 'left',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'old_status',\n title: 'Old Status',\n titleTooltip: 'The status of the alarm, just before this event',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'status',\n title: 'Status',\n titleTooltip: 'The status of the alarm, that was set due to this event',\n align: 'center',\n valign: 'middle',\n switchable: false,\n sortable: true\n },\n {\n field: 'duration',\n title: 'Last Duration',\n titleTooltip: 'The duration the alarm was at its previous state, just before this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'non_clear_duration',\n title: 'Raised Duration',\n titleTooltip: 'The duration the alarm was raised, just before this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'recipient',\n title: 'Recipient',\n titleTooltip: 'The recipient of this event',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'processed',\n title: 'Processed Status',\n titleTooltip: 'True when this event is processed',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n if (value === true) {\n return 'DONE';\n } else {\n return 'PENDING';\n }\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'updated',\n title: 'Updated Status',\n titleTooltip: 'True when this event has been updated by another event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n if (value === true) {\n return 'UPDATED';\n } else {\n return 'CURRENT';\n }\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'updated_by_id',\n title: 'Updated By ID',\n titleTooltip: 'The unique ID of the event that obsoleted this one',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'updates_id',\n title: 'Updates ID',\n titleTooltip: 'The unique ID of the event obsoleted because of this event',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return alarmid4human(value);\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'exec',\n title: 'Script',\n titleTooltip: 'The script to handle the event notification',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'exec_run',\n title: 'Script Run At',\n titleTooltip: 'The date and time the script has been ran',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return timestamp4human(value, ' ');\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'exec_code',\n title: 'Script Return Value',\n titleTooltip: 'The return code of the script',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n if (value === 0) {\n return 'OK (returned 0)';\n } else {\n return 'FAILED (with code ' + value.toString() + ')';\n }\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'delay',\n title: 'Script Delay',\n titleTooltip: 'The hysteresis of the notification',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n\n return seconds4human(value, { negative_suffix: '', space: ' ', now: 'no time' });\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'delay_up_to_timestamp',\n title: 'Script Delay Run At',\n titleTooltip: 'The date and time the script should be run, after hysteresis',\n formatter: function (value, row, index) {\n void (row);\n void (index);\n return timestamp4human(value, ' ');\n },\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'info',\n title: 'Description',\n titleTooltip: 'A short description of the alarm',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n },\n {\n field: 'source',\n title: 'Alarm Source',\n titleTooltip: 'The source of configuration of the alarm',\n align: 'center',\n valign: 'middle',\n visible: false,\n sortable: true\n }\n ]\n });\n // console.log($('#alarms_log_table').bootstrapTable('getOptions'));\n });\n }\n\n reduxStore.dispatch(fetchAllAlarmsAction.request({\n callback,\n serverDefault,\n }))\n}\n\nfunction initializeDynamicDashboardWithData(data) {\n if (data !== null) {\n options.hostname = data.hostname;\n options.data = data;\n options.version = data.version;\n options.release_channel = data.release_channel;\n options.timezone = data.timezone;\n netdataDashboard.os = data.os;\n\n if (typeof data.hosts !== 'undefined') {\n options.hosts = data.hosts;\n }\n\n // update the dashboard hostname\n document.getElementById('netdataVersion').innerHTML = options.version;\n\n // update the dashboard title\n document.title = options.hostname + ' netdata dashboard';\n\n // create a chart_by_name index\n data.charts_by_name = {};\n var charts = data.charts;\n var x;\n for (x in charts) {\n if (!charts.hasOwnProperty(x)) {\n continue;\n }\n\n var chart = charts[x];\n data.charts_by_name[chart.name] = chart;\n }\n\n // render all charts\n renderChartsAndMenu(data);\n }\n}\n\n// an object to keep initilization configuration\n// needed due to the async nature of the XSS modal\nvar initializeConfig = {\n url: null,\n custom_info: true,\n};\n\n// will be removed when we'll transform dashboard_info.js into DSL\n// memoize so it's fetched only once\nconst loadDashboardInfo = memoizeWith(identity, () => (\n $.ajax({\n url: `${serverDefault}dashboard_info.js`,\n cache: true,\n dataType: 'script',\n xhrFields: { withCredentials: true }, // required for the cookie\n })\n .fail(function () {\n alert(`Cannot load required JS library: dashboard_info.js`);\n })\n))\n\nfunction loadCustomDashboardInfo(url, callback) {\n $.ajax({\n url,\n cache: true,\n dataType: \"script\",\n xhrFields: { withCredentials: true } // required for the cookie\n })\n .fail(function () {\n alert(`Cannot load required JS library: ${url}`);\n })\n .always(function () {\n $.extend(true, netdataDashboard, customDashboard);\n callback();\n })\n}\n\nfunction initializeChartsAndCustomInfo() {\n loadDashboardInfo().then(() => {\n // download all the charts the server knows\n NETDATA.chartRegistry.downloadAll(initializeConfig.url, function (data) {\n if (data !== null) {\n reduxStore.dispatch(chartsMetadataRequestSuccess({ data }))\n if (initializeConfig.custom_info === true && typeof data.custom_info !== 'undefined' && data.custom_info !== \"\" && window.netdataSnapshotData === null) {\n //console.log('loading custom dashboard decorations from server ' + initializeConfig.url);\n loadCustomDashboardInfo(serverDefault + data.custom_info, function () {\n initializeDynamicDashboardWithData(data);\n });\n } else {\n //console.log('not loading custom dashboard decorations from server ' + initializeConfig.url);\n initializeDynamicDashboardWithData(data);\n }\n }\n });\n })\n}\n\nwindow.xssModalDisableXss = () => {\n //console.log('disabling xss checks');\n NETDATA.xss.enabled = false;\n NETDATA.xss.enabled_for_data = false;\n initializeConfig.custom_info = true;\n initializeChartsAndCustomInfo();\n return false;\n};\n\n\nwindow.xssModalKeepXss = () => {\n //console.log('keeping xss checks');\n NETDATA.xss.enabled = true;\n NETDATA.xss.enabled_for_data = true;\n initializeConfig.custom_info = false;\n initializeChartsAndCustomInfo();\n return false;\n};\n\nfunction initializeDynamicDashboard(newReduxStore) {\n if (newReduxStore) {\n reduxStore = newReduxStore\n\n netdataPrepCallback()\n\n initializeConfig.url = serverDefault;\n }\n\n if (typeof netdataCheckXSS !== 'undefined' && netdataCheckXSS === true) {\n //$(\"#loadOverlay\").css(\"display\",\"none\");\n document.getElementById('netdataXssModalServer').innerText = initializeConfig.url;\n $('#xssModal').modal('show');\n } else {\n initializeChartsAndCustomInfo();\n }\n}\n\n// ----------------------------------------------------------------------------\n\nfunction versionLog(msg) {\n document.getElementById('versionCheckLog').innerHTML = msg;\n}\n\n// New way of checking for updates, based only on versions\n\nfunction versionsMatch(v1, v2) {\n if (v1 == v2) {\n return true;\n } else {\n let s1 = v1.split('.');\n let s2 = v2.split('.');\n // Check major version\n let n1 = parseInt(s1[0].substring(1, 2), 10);\n let n2 = parseInt(s2[0].substring(1, 2), 10);\n if (n1 < n2) return false;\n else if (n1 > n2) return true;\n\n // Check minor version\n n1 = parseInt(s1[1], 10);\n n2 = parseInt(s2[1], 10);\n if (n1 < n2) return false;\n else if (n1 > n2) return true;\n\n // Split patch: format could be e.g. 0-22-nightly\n s1 = s1[2].split('-');\n s2 = s2[2].split('-');\n\n n1 = parseInt(s1[0], 10);\n n2 = parseInt(s2[0], 10);\n if (n1 < n2) return false;\n else if (n1 > n2) return true;\n\n n1 = (s1.length > 1) ? parseInt(s1[1], 10) : 0;\n n2 = (s2.length > 1) ? parseInt(s2[1], 10) : 0;\n if (n1 < n2) return false;\n else return true;\n }\n}\n\nfunction getGithubLatestVersion(callback) {\n versionLog('Downloading latest version id from github...');\n\n $.ajax({\n url: 'https://api.github.com/repos/netdata/netdata/releases/latest',\n async: true,\n cache: false\n })\n .done(function (data) {\n data = data.tag_name.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\");\n versionLog('Latest stable version from github is ' + data);\n callback(data);\n })\n .fail(function () {\n versionLog('Failed to download the latest stable version id from github!');\n callback(null);\n });\n}\n\nfunction getGCSLatestVersion(callback) {\n versionLog('Downloading latest version id from GCS...');\n $.ajax({\n url: \"https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt\",\n async: true,\n cache: false\n })\n .done(function (response) {\n $.ajax({\n url: response.mediaLink,\n async: true,\n cache: false\n })\n .done(function (data) {\n data = data.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\");\n versionLog('Latest nightly version from GCS is ' + data);\n callback(data);\n })\n .fail(function (xhr, textStatus, errorThrown) {\n versionLog('Failed to download the latest nightly version id from GCS!');\n callback(null);\n });\n })\n .fail(function (xhr, textStatus, errorThrown) {\n versionLog('Failed to download the latest nightly version from GCS!');\n callback(null);\n });\n}\n\n\nfunction checkForUpdateByVersion(force, callback) {\n if (options.release_channel === 'stable') {\n getGithubLatestVersion(function (sha2) {\n callback(options.version, sha2);\n });\n } else {\n getGCSLatestVersion(function (sha2) {\n callback(options.version, sha2);\n });\n }\n return null;\n}\n\nwindow.notifyForUpdate = (force) => {\n versionLog('<p>checking for updates...</p>');\n\n var now = Date.now();\n\n if (typeof force === 'undefined' || force !== true) {\n var last = loadLocalStorage('last_update_check');\n\n if (typeof last === 'string') {\n last = parseInt(last);\n } else {\n last = 0;\n }\n\n if (now - last < 3600000 * 8) {\n // no need to check it - too soon\n return;\n }\n }\n\n checkForUpdateByVersion(force, function (sha1, sha2) {\n var save = false;\n\n if (sha1 === null) {\n save = false;\n versionLog('<p><big>Failed to get your netdata version!</big></p><p>You can always get the latest netdata from <a href=\"https://github.com/netdata/netdata\" target=\"_blank\">its github page</a>.</p>');\n } else if (sha2 === null) {\n save = false;\n versionLog('<p><big>Failed to get the latest netdata version.</big></p><p>You can always get the latest netdata from <a href=\"https://github.com/netdata/netdata\" target=\"_blank\">its github page</a>.</p>');\n } else if (versionsMatch(sha1, sha2)) {\n save = true;\n versionLog('<p><big>You already have the latest netdata!</big></p><p>No update yet?<br/>We probably need some motivation to keep going on!</p><p>If you haven\\'t already, <a href=\"https://github.com/netdata/netdata\" target=\"_blank\">give netdata a <b><i class=\"fas fa-star\"></i></b> at its github page</a>.</p>');\n } else {\n save = true;\n var compare = 'https://learn.netdata.cloud/docs/agent/changelog/';\n versionLog('<p><big><strong>New version of netdata available!</strong></big></p><p>Latest version: <b><code>' + sha2 + '</code></b></p><p><a href=\"' + compare + '\" target=\"_blank\">Click here for the changes log</a> and<br/><a href=\"https://github.com/netdata/netdata/tree/master/packaging/installer/UPDATE.md\" target=\"_blank\">click here for directions on updating</a> your netdata installation.</p><p>We suggest to review the changes log for new features you may be interested, or important bug fixes you may need.<br/>Keeping your netdata updated is generally a good idea.</p>');\n }\n\n if (save) {\n saveLocalStorage('last_update_check', now.toString());\n }\n });\n}\n\n// ----------------------------------------------------------------------------\n// printing dashboards\n\nfunction showPageFooter() {\n document.getElementById('footer').style.display = 'block';\n}\n\nwindow.printPreflight = () => {\n var url = document.location.origin.toString() + document.location.pathname.toString() + document.location.search.toString() + urlOptions.genHash() + ';mode=print';\n var width = 990;\n var height = screen.height * 90 / 100;\n //console.log(url);\n //console.log(document.location);\n window.open(url, '', 'width=' + width.toString() + ',height=' + height.toString() + ',menubar=no,toolbar=no,personalbar=no,location=no,resizable=no,scrollbars=yes,status=no,chrome=yes,centerscreen=yes,attention=yes,dialog=yes');\n $('#printPreflightModal').modal('hide');\n}\n\nfunction printPage() {\n window.NETDATA.parseDom();\n if (urlOptions.pan_and_zoom === true) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: urlOptions.after,\n before: urlOptions.before,\n }))\n }\n showPageFooter(); // todo after full rewrite the footer should show when charts are loaded\n}\n\n// --------------------------------------------------------------------\n\nfunction jsonStringifyFn(obj) {\n return JSON.stringify(obj, function (key, value) {\n return (typeof value === 'function') ? value.toString() : value;\n });\n}\n\nfunction jsonParseFn(str) {\n return JSON.parse(str, function (key, value) {\n if (typeof value != 'string') {\n return value;\n }\n return (value.substring(0, 8) == 'function') ? eval('(' + value + ')') : value;\n });\n}\n\n// --------------------------------------------------------------------\n\nvar snapshotOptions = {\n bytes_per_chart: 2048,\n compressionDefault: 'pako.deflate.base64',\n\n compressions: {\n 'none': {\n bytes_per_point_memory: 5.2,\n bytes_per_point_disk: 5.6,\n\n compress: function (s) {\n return s;\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return s;\n }\n },\n\n 'pako.deflate.base64': {\n bytes_per_point_memory: 1.8,\n bytes_per_point_disk: 1.9,\n\n compress: function (s) {\n return btoa(pako.deflate(s, { to: 'string' }));\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return pako.inflate(atob(s), { to: 'string' });\n }\n },\n\n 'pako.deflate': {\n bytes_per_point_memory: 1.4,\n bytes_per_point_disk: 3.2,\n\n compress: function (s) {\n return pako.deflate(s, { to: 'string' });\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return pako.inflate(s, { to: 'string' });\n }\n },\n\n 'lzstring.utf16': {\n bytes_per_point_memory: 1.7,\n bytes_per_point_disk: 2.6,\n\n compress: function (s) {\n return LZString.compressToUTF16(s);\n },\n\n compressed_length: function (s) {\n return s.length * 2;\n },\n\n uncompress: function (s) {\n return LZString.decompressFromUTF16(s);\n }\n },\n\n 'lzstring.base64': {\n bytes_per_point_memory: 2.1,\n bytes_per_point_disk: 2.3,\n\n compress: function (s) {\n return LZString.compressToBase64(s);\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return LZString.decompressFromBase64(s);\n }\n },\n\n 'lzstring.uri': {\n bytes_per_point_memory: 2.1,\n bytes_per_point_disk: 2.3,\n\n compress: function (s) {\n return LZString.compressToEncodedURIComponent(s);\n },\n\n compressed_length: function (s) {\n return s.length;\n },\n\n uncompress: function (s) {\n return LZString.decompressFromEncodedURIComponent(s);\n }\n }\n }\n};\n\n// --------------------------------------------------------------------\n// loading snapshots\n\nfunction loadSnapshotModalLog(priority, msg) {\n document.getElementById('loadSnapshotStatus').className = \"alert alert-\" + priority;\n document.getElementById('loadSnapshotStatus').innerHTML = msg;\n}\n\nvar tmpSnapshotData = null;\n\nwindow.loadSnapshot = () => {\n $('#loadSnapshotImport').addClass('disabled');\n\n if (tmpSnapshotData === null) {\n loadSnapshotPreflightEmpty();\n loadSnapshotModalLog('danger', 'no data have been loaded');\n return;\n }\n\n loadPako(function () {\n loadLzString(function () {\n loadSnapshotModalLog('info', 'Please wait, activating snapshot...');\n $('#loadSnapshotModal').modal('hide');\n\n netdataShowAlarms = false;\n netdataRegistry = false;\n netdataServer = tmpSnapshotData.server;\n\n document.getElementById('charts_div').innerHTML = '';\n document.getElementById('sidebar').innerHTML = '';\n\n if (typeof tmpSnapshotData.hash !== 'undefined') {\n urlOptions.hash = tmpSnapshotData.hash;\n } else {\n urlOptions.hash = '#';\n }\n\n if (typeof tmpSnapshotData.info !== 'undefined') {\n var info = jsonParseFn(tmpSnapshotData.info);\n if (typeof info.menu !== 'undefined') {\n netdataDashboard.menu = info.menu;\n }\n\n if (typeof info.submenu !== 'undefined') {\n netdataDashboard.submenu = info.submenu;\n }\n\n if (typeof info.context !== 'undefined') {\n netdataDashboard.context = info.context;\n }\n }\n\n if (typeof tmpSnapshotData.compression !== 'string') {\n tmpSnapshotData.compression = 'none';\n }\n\n if (typeof snapshotOptions.compressions[tmpSnapshotData.compression] === 'undefined') {\n alert('unknown compression method: ' + tmpSnapshotData.compression);\n tmpSnapshotData.compression = 'none';\n }\n\n tmpSnapshotData.uncompress = snapshotOptions.compressions[tmpSnapshotData.compression].uncompress;\n\n window.NETDATA.parseDom()\n reduxStore.dispatch(loadSnapshotAction({\n snapshot: tmpSnapshotData,\n }))\n\n window.netdataSnapshotData = tmpSnapshotData;\n\n urlOptions.after = tmpSnapshotData.after_ms;\n urlOptions.before = tmpSnapshotData.before_ms;\n\n if (typeof tmpSnapshotData.highlight_after_ms !== 'undefined'\n && tmpSnapshotData.highlight_after_ms !== null\n && tmpSnapshotData.highlight_after_ms > 0\n && typeof tmpSnapshotData.highlight_before_ms !== 'undefined'\n && tmpSnapshotData.highlight_before_ms !== null\n && tmpSnapshotData.highlight_before_ms > 0\n ) {\n urlOptions.highlight_after = tmpSnapshotData.highlight_after_ms;\n urlOptions.highlight_before = tmpSnapshotData.highlight_before_ms;\n urlOptions.highlight = true;\n } else {\n urlOptions.highlight_after = 0;\n urlOptions.highlight_before = 0;\n urlOptions.highlight = false;\n }\n\n netdataCheckXSS = false; // disable the modal - this does not affect XSS checks, since dashboard.js is already loaded\n NETDATA.xss.enabled = true; // we should not do any remote requests, but if we do, check them\n NETDATA.xss.enabled_for_data = true; // check also snapshot data - that have been excluded from the initial check, due to compression\n loadSnapshotPreflightEmpty();\n initializeDynamicDashboard();\n });\n });\n};\n\nfunction loadSnapshotPreflightFile(file) {\n var filename = NETDATA.xss.string(file.name);\n var fr = new FileReader();\n fr.onload = function (e) {\n document.getElementById('loadSnapshotFilename').innerHTML = filename;\n var result = null;\n try {\n result = NETDATA.xss.checkAlways('snapshot', JSON.parse(e.target.result), /^(snapshot\\.info|snapshot\\.data)$/);\n\n //console.log(result);\n var date_after = new Date(result.after_ms);\n var date_before = new Date(result.before_ms);\n\n if (typeof result.charts_ok === 'undefined') {\n result.charts_ok = 'unknown';\n }\n\n if (typeof result.charts_failed === 'undefined') {\n result.charts_failed = 0;\n }\n\n if (typeof result.compression === 'undefined') {\n result.compression = 'none';\n }\n\n if (typeof result.data_size === 'undefined') {\n result.data_size = 0;\n }\n\n document.getElementById('loadSnapshotFilename').innerHTML = '<code>' + filename + '</code>';\n document.getElementById('loadSnapshotHostname').innerHTML = '<b>' + result.hostname + '</b>, netdata version: <b>' + result.netdata_version.toString() + '</b>';\n document.getElementById('loadSnapshotURL').innerHTML = result.url;\n document.getElementById('loadSnapshotCharts').innerHTML = result.charts.charts_count.toString() + ' charts, ' + result.charts.dimensions_count.toString() + ' dimensions, ' + result.data_points.toString() + ' points per dimension, ' + Math.round(result.duration_ms / result.data_points).toString() + ' ms per point';\n document.getElementById('loadSnapshotInfo').innerHTML = 'version: <b>' + result.snapshot_version.toString() + '</b>, includes <b>' + result.charts_ok.toString() + '</b> unique chart data queries ' + ((result.charts_failed > 0) ? ('<b>' + result.charts_failed.toString() + '</b> failed') : '').toString() + ', compressed with <code>' + result.compression.toString() + '</code>, data size ' + (Math.round(result.data_size * 100 / 1024 / 1024) / 100).toString() + ' MB';\n document.getElementById('loadSnapshotTimeRange').innerHTML = '<b>' + localeDateString(date_after) + ' ' + localeTimeString(date_after) + '</b> to <b>' + localeDateString(date_before) + ' ' + localeTimeString(date_before) + '</b>';\n document.getElementById('loadSnapshotComments').innerHTML = ((result.comments) ? result.comments : '').toString();\n loadSnapshotModalLog('success', 'File loaded, click <b>Import</b> to render it!');\n $('#loadSnapshotImport').removeClass('disabled');\n\n tmpSnapshotData = result;\n }\n catch (e) {\n console.log(e);\n document.getElementById('loadSnapshotStatus').className = \"alert alert-danger\";\n document.getElementById('loadSnapshotStatus').innerHTML = \"Failed to parse this file!\";\n $('#loadSnapshotImport').addClass('disabled');\n }\n }\n\n //console.log(file);\n fr.readAsText(file);\n};\n\nfunction loadSnapshotPreflightEmpty() {\n document.getElementById('loadSnapshotFilename').innerHTML = '';\n document.getElementById('loadSnapshotHostname').innerHTML = '';\n document.getElementById('loadSnapshotURL').innerHTML = '';\n document.getElementById('loadSnapshotCharts').innerHTML = '';\n document.getElementById('loadSnapshotInfo').innerHTML = '';\n document.getElementById('loadSnapshotTimeRange').innerHTML = '';\n document.getElementById('loadSnapshotComments').innerHTML = '';\n loadSnapshotModalLog('success', 'Browse for a snapshot file (or drag it and drop it here), then click <b>Import</b> to render it.');\n $('#loadSnapshotImport').addClass('disabled');\n};\n\nvar loadSnapshotDragAndDropInitialized = false;\n\nfunction loadSnapshotDragAndDropSetup() {\n if (loadSnapshotDragAndDropInitialized === false) {\n loadSnapshotDragAndDropInitialized = true;\n $('#loadSnapshotDragAndDrop')\n .on('drag dragstart dragend dragover dragenter dragleave drop', function (e) {\n e.preventDefault();\n e.stopPropagation();\n })\n .on('drop', function (e) {\n if (e.originalEvent.dataTransfer.files.length) {\n loadSnapshotPreflightFile(e.originalEvent.dataTransfer.files.item(0));\n } else {\n loadSnapshotPreflightEmpty();\n loadSnapshotModalLog('danger', 'No file selected');\n }\n });\n }\n};\n\nwindow.loadSnapshotPreflight = () => {\n var files = document.getElementById('loadSnapshotSelectFiles').files;\n if (!files.length) {\n loadSnapshotPreflightEmpty();\n loadSnapshotModalLog('danger', 'No file selected');\n return;\n }\n\n loadSnapshotModalLog('info', 'Loading file...');\n\n loadSnapshotPreflightFile(files.item(0));\n}\n\n// --------------------------------------------------------------------\n// saving snapshots\n\nvar saveSnapshotStop = false;\n\nfunction saveSnapshotCancel() {\n reduxStore.dispatch(stopSnapshotModeAction())\n saveSnapshotStop = true;\n}\n\nvar saveSnapshotModalInitialized = false;\n\nfunction saveSnapshotModalSetup() {\n if (saveSnapshotModalInitialized === false) {\n saveSnapshotModalInitialized = true;\n $('#saveSnapshotModal')\n .on('hide.bs.modal', saveSnapshotCancel)\n .on('show.bs.modal', saveSnapshotModalInit)\n .on('shown.bs.modal', function () {\n $('#saveSnapshotResolutionSlider').find(\".slider-handle:first\").attr(\"tabindex\", 1);\n document.getElementById('saveSnapshotComments').focus();\n });\n }\n};\n\nfunction saveSnapshotModalLog(priority, msg) {\n document.getElementById('saveSnapshotStatus').className = \"alert alert-\" + priority;\n document.getElementById('saveSnapshotStatus').innerHTML = msg;\n}\n\nfunction saveSnapshotModalShowExpectedSize() {\n var points = Math.round(saveSnapshotViewDuration / saveSnapshotSelectedSecondsPerPoint);\n var priority = 'info';\n var msg = 'A moderate snapshot.';\n\n var sizemb = Math.round(\n (options.data.charts_count * snapshotOptions.bytes_per_chart\n + options.data.dimensions_count * points * snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_disk)\n * 10 / 1024 / 1024) / 10;\n\n var memmb = Math.round(\n (options.data.charts_count * snapshotOptions.bytes_per_chart\n + options.data.dimensions_count * points * snapshotOptions.compressions[saveSnapshotCompression].bytes_per_point_memory)\n * 10 / 1024 / 1024) / 10;\n\n if (sizemb < 10) {\n priority = 'success';\n msg = 'A nice small snapshot!';\n }\n if (sizemb > 50) {\n priority = 'warning';\n msg = 'Will stress your browser...';\n }\n if (sizemb > 100) {\n priority = 'danger';\n msg = 'Hm... good luck...';\n }\n\n saveSnapshotModalLog(priority, 'The snapshot will have ' + points.toString() + ' points per dimension. Expected size on disk ' + sizemb + ' MB, at browser memory ' + memmb + ' MB.<br/>' + msg);\n}\n\nvar saveSnapshotCompression = snapshotOptions.compressionDefault;\n\nfunction saveSnapshotSetCompression(name) {\n saveSnapshotCompression = name;\n document.getElementById('saveSnapshotCompressionName').innerHTML = saveSnapshotCompression;\n saveSnapshotModalShowExpectedSize();\n}\n\nvar saveSnapshotSlider = null;\nvar saveSnapshotSelectedSecondsPerPoint = 1;\nvar saveSnapshotViewDuration = 1;\n\nfunction saveSnapshotModalInit() {\n $('#saveSnapshotModalProgressSection').hide();\n $('#saveSnapshotResolutionRadio').show();\n saveSnapshotModalLog('info', 'Select resolution and click <b>Save</b>');\n $('#saveSnapshotExport').removeClass('disabled');\n\n loadBootstrapSlider(function () {\n const reduxState = reduxStore.getState()\n saveSnapshotViewDuration = - selectDefaultAfter(reduxState)\n var start_ms = Math.round(Date.now() - saveSnapshotViewDuration * 1000);\n const globalPanAndZoom = selectGlobalPanAndZoom(reduxState)\n\n if (Boolean(globalPanAndZoom)) {\n saveSnapshotViewDuration = Math.round((globalPanAndZoom.before - globalPanAndZoom.after) / 1000);\n start_ms = globalPanAndZoom.after;\n }\n\n var start_date = new Date(start_ms);\n var yyyymmddhhssmm = start_date.getFullYear() + zeropad(start_date.getMonth() + 1) + zeropad(start_date.getDate()) + '-' + zeropad(start_date.getHours()) + zeropad(start_date.getMinutes()) + zeropad(start_date.getSeconds());\n\n document.getElementById('saveSnapshotFilename').value = 'netdata-' + options.hostname.toString() + '-' + yyyymmddhhssmm.toString() + '-' + saveSnapshotViewDuration.toString() + '.snapshot';\n saveSnapshotSetCompression(saveSnapshotCompression);\n\n var min = options.update_every;\n var max = Math.round(saveSnapshotViewDuration / 100);\n\n if (Boolean(globalPanAndZoom)) {\n max = Math.round(saveSnapshotViewDuration / 50);\n }\n\n var view = Math.round(saveSnapshotViewDuration / Math.round($(document.getElementById('charts_div')).width() / 2));\n\n if (max < 10) {\n max = 10;\n }\n if (max < min) {\n max = min;\n }\n if (view < min) {\n view = min;\n }\n if (view > max) {\n view = max;\n }\n\n if (saveSnapshotSlider !== null) {\n saveSnapshotSlider.destroy();\n }\n\n saveSnapshotSlider = new Slider('#saveSnapshotResolutionSlider', {\n ticks: [min, view, max],\n min: min,\n max: max,\n step: options.update_every,\n value: view,\n scale: (max > 100) ? 'logarithmic' : 'linear',\n tooltip: 'always',\n formatter: function (value) {\n if (value < 1) {\n value = 1;\n }\n\n if (value < options.data.update_every) {\n value = options.data.update_every;\n }\n\n saveSnapshotSelectedSecondsPerPoint = value;\n saveSnapshotModalShowExpectedSize();\n\n var seconds = ' seconds ';\n if (value === 1) {\n seconds = ' second ';\n }\n\n return value + seconds + 'per point' + ((value === options.data.update_every) ? ', server default' : '').toString();\n }\n });\n });\n}\n\nwindow.saveSnapshot = () => {\n loadPako(function () {\n loadLzString(function () {\n saveSnapshotStop = false;\n $('#saveSnapshotModalProgressSection').show();\n $('#saveSnapshotResolutionRadio').hide();\n $('#saveSnapshotExport').addClass('disabled');\n\n var filename = document.getElementById('saveSnapshotFilename').value;\n // console.log(filename);\n saveSnapshotModalLog('info', 'Generating snapshot as <code>' + filename.toString() + '</code>');\n\n\n var el = document.getElementById('saveSnapshotModalProgressBar');\n var eltxt = document.getElementById('saveSnapshotModalProgressBarText');\n\n options.data.charts_by_name = null;\n const reduxState = reduxStore.getState()\n const defaultAfter = selectDefaultAfter(reduxState)\n\n var saveData = {\n hostname: options.hostname,\n server: serverDefault,\n netdata_version: options.data.version,\n snapshot_version: 1,\n after_ms: Date.now() + defaultAfter * 1000,\n before_ms: Date.now(),\n highlight_after_ms: urlOptions.highlight_after,\n highlight_before_ms: urlOptions.highlight_before,\n duration_ms: options.duration * 1000,\n update_every_ms: options.update_every * 1000,\n data_points: 0,\n url: ((urlOptions.server !== null) ? urlOptions.server : document.location.origin.toString() + document.location.pathname.toString() + document.location.search.toString()).toString(),\n comments: document.getElementById('saveSnapshotComments').value.toString(),\n hash: urlOptions.hash,\n charts: options.data,\n info: jsonStringifyFn({\n menu: netdataDashboard.menu,\n submenu: netdataDashboard.submenu,\n context: netdataDashboard.context\n }),\n charts_ok: 0,\n charts_failed: 0,\n compression: saveSnapshotCompression,\n data_size: 0,\n data: {}\n };\n\n if (typeof snapshotOptions.compressions[saveData.compression] === 'undefined') {\n alert('unknown compression method: ' + saveData.compression);\n saveData.compression = 'none';\n }\n\n var compress = snapshotOptions.compressions[saveData.compression].compress;\n var compressed_length = snapshotOptions.compressions[saveData.compression].compressed_length;\n\n function pack_api1_v1_chart_data({ data, chartDataUniqueID }) {\n if (data === null) {\n return 0\n }\n\n var str = JSON.stringify(data);\n\n var cstr = compress(str);\n saveData.data[chartDataUniqueID] = cstr;\n return compressed_length(cstr);\n }\n\n const globalPanAndZoom = selectGlobalPanAndZoom(reduxState)\n var clearPanAndZoom = false;\n if (!globalPanAndZoom) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: saveData.after_ms,\n before: saveData.before_ms,\n }))\n clearPanAndZoom = true;\n } else {\n saveData.after_ms = globalPanAndZoom.after\n saveData.before_ms = globalPanAndZoom.before\n }\n\n\n saveData.duration_ms = saveData.before_ms - saveData.after_ms;\n saveData.data_points = Math.round((saveData.before_ms - saveData.after_ms) / (saveSnapshotSelectedSecondsPerPoint * 1000));\n saveSnapshotModalLog('info', 'Generating snapshot with ' + saveData.data_points.toString() + ' data points per dimension...');\n\n reduxStore.dispatch(startSnapshotModeAction({\n charts: saveData.charts,\n dataPoints: saveData.data_points,\n }))\n\n\n window.saveSnapshotRestore = () => {\n $('#saveSnapshotModal').modal('hide');\n\n $(el).css('width', '0%').attr('aria-valuenow', 0);\n eltxt.innerText = '0%';\n\n reduxStore.dispatch(stopSnapshotModeAction())\n reduxStore.dispatch(snapshotExportResetAction())\n if (clearPanAndZoom) {\n // clear that afterwards\n reduxStore.dispatch(resetGlobalPanAndZoomAction())\n }\n\n $('#saveSnapshotExport').removeClass('disabled');\n }\n\n var size = 0;\n var info = ' Resolution: <b>' + saveSnapshotSelectedSecondsPerPoint.toString() + ((saveSnapshotSelectedSecondsPerPoint === 1) ? ' second ' : ' seconds ').toString() + 'per point</b>.';\n\n window.chartUpdated = ({ chart, chartDataUniqueID, data }) => {\n if (saveSnapshotStop === true) {\n saveSnapshotModalLog('info', 'Cancelled!');\n saveSnapshotRestore()\n }\n const state = reduxStore.getState()\n const chartsCount = selectAmountOfCharts(state)\n const chartsOk = selectAmountOfSnapshotsFetched(state) // hook\n const chartsFailed = selectAmountOfSnapshotsFailed(state)\n\n const pcent = ((chartsOk + chartsFailed) / chartsCount) * 100\n $(el).css('width', pcent + '%').attr('aria-valuenow', pcent);\n eltxt.innerText = Math.round(pcent).toString() + '%, ' + (chart || data.id)\n\n size += pack_api1_v1_chart_data({ data, chartDataUniqueID })\n\n saveSnapshotModalLog((chartsFailed) ? 'danger' : 'info', 'Generated snapshot data size <b>' + (Math.round(size * 100 / 1024 / 1024) / 100).toString() + ' MB</b>. ' + ((chartsFailed) ? (chartsFailed.toString() + ' charts have failed to be downloaded') : '').toString() + info);\n\n window.saveData = saveData\n // better not to use equality against pcent in case of floating point errors\n if (chartsOk + chartsFailed === chartsCount) {\n saveData.charts_ok = chartsOk\n saveData.charts_failed = chartsFailed\n saveData.data_size = size\n\n saveObjectToClient(saveData, filename)\n if (chartsFailed > 0) {\n alert(`${chartsFailed} failed to be downloaded`);\n }\n saveSnapshotRestore()\n saveData = null\n }\n }\n\n // called for every chart\n function update_chart(idx) {\n if (saveSnapshotStop === true) {\n saveSnapshotModalLog('info', 'Cancelled!');\n saveSnapshotRestore();\n return;\n }\n\n var state = NETDATA.options.targets[--idx];\n\n var pcent = (NETDATA.options.targets.length - idx) * 100 / NETDATA.options.targets.length;\n $(el).css('width', pcent + '%').attr('aria-valuenow', pcent);\n eltxt.innerText = Math.round(pcent).toString() + '%, ' + state.id;\n\n setTimeout(function () {\n charts_count++;\n state.isVisible(true);\n state.current.force_after_ms = saveData.after_ms;\n state.current.force_before_ms = saveData.before_ms;\n\n state.updateChart(function (status, reason) {\n state.current.force_after_ms = null;\n state.current.force_before_ms = null;\n\n if (status === true) {\n charts_ok++;\n // state.log('ok');\n size += pack_api1_v1_chart_data(state);\n } else {\n charts_failed++;\n state.log('failed to be updated: ' + reason);\n }\n\n saveSnapshotModalLog((charts_failed) ? 'danger' : 'info', 'Generated snapshot data size <b>' + (Math.round(size * 100 / 1024 / 1024) / 100).toString() + ' MB</b>. ' + ((charts_failed) ? (charts_failed.toString() + ' charts have failed to be downloaded') : '').toString() + info);\n\n if (idx > 0) {\n update_chart(idx);\n } else {\n saveData.charts_ok = charts_ok;\n saveData.charts_failed = charts_failed;\n saveData.data_size = size;\n // console.log(saveData.compression + ': ' + (size / (options.data.dimensions_count * Math.round(saveSnapshotViewDuration / saveSnapshotSelectedSecondsPerPoint))).toString());\n\n // save it\n // console.log(saveData);\n saveObjectToClient(saveData, filename);\n\n if (charts_failed > 0) {\n alert(charts_failed.toString() + ' failed to be downloaded');\n }\n\n saveSnapshotRestore();\n saveData = null;\n }\n })\n }, 0);\n }\n\n });\n });\n}\n\n// --------------------------------------------------------------------\n// activate netdata on the page\nlet browser_timezone\ntry {\n browser_timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n} catch (e) {\n console.log('failed to detect browser timezone: ' + e.toString());\n browser_timezone = 'cannot-detect-it';\n}\n\nconst getOption = (option) => {\n const state = reduxStore.getState()\n return createSelectOption(option)(state)\n}\n\n\nfunction dashboardSettingsSetup() {\n var update_options_modal = function () {\n var sync_option = function (option) {\n var self = $('#' + option);\n\n if (self.prop('checked') !== getOption(option)) {\n // console.log('switching ' + option.toString());\n self.bootstrapToggle(getOption(option) ? 'on' : 'off');\n }\n };\n\n var theme_sync_option = function (option) {\n var self = $('#' + option);\n\n self.bootstrapToggle(netdataTheme === 'slate' ? 'on' : 'off');\n };\n var units_sync_option = function (option) {\n var self = $('#' + option);\n\n if (self.prop('checked') !== (getOption('units') === 'auto')) {\n self.bootstrapToggle(getOption('units') === 'auto' ? 'on' : 'off');\n }\n\n if (self.prop('checked') === true) {\n $('#settingsLocaleTempRow').show();\n $('#settingsLocaleTimeRow').show();\n } else {\n $('#settingsLocaleTempRow').hide();\n $('#settingsLocaleTimeRow').hide();\n }\n };\n var temp_sync_option = function (option) {\n var self = $('#' + option);\n\n if (self.prop('checked') !== (getOption('temperature') === 'celsius')) {\n self.bootstrapToggle(getOption('temperature') === 'celsius' ? 'on' : 'off');\n }\n };\n\n sync_option('stop_updates_when_focus_is_lost');\n sync_option('eliminate_zero_dimensions');\n sync_option('destroy_on_hide');\n sync_option('async_on_scroll');\n\n sync_option('parallel_refresher');\n sync_option('concurrent_refreshes');\n sync_option('sync_selection');\n\n sync_option('legend_right');\n theme_sync_option('netdata_theme_control');\n sync_option('show_help');\n sync_option('pan_and_zoom_data_padding');\n sync_option('smooth_plot');\n\n units_sync_option('units_conversion');\n temp_sync_option('units_temp');\n sync_option('seconds_as_time');\n\n if (getOption('parallel_refresher') === false) {\n $('#concurrent_refreshes_row').hide();\n } else {\n $('#concurrent_refreshes_row').show();\n }\n };\n\n update_options_modal();\n\n // handle options changes\n $('#eliminate_zero_dimensions').change(function () {\n setOption('eliminate_zero_dimensions', $(this).prop('checked'));\n });\n $('#destroy_on_hide').change(function () {\n setOption('destroy_on_hide', $(this).prop('checked'));\n });\n $('#async_on_scroll').change(function () {\n setOption('async_on_scroll', $(this).prop('checked'));\n });\n $('#parallel_refresher').change(function () {\n setOption('parallel_refresher', $(this).prop('checked'));\n });\n $('#concurrent_refreshes').change(function () {\n setOption('concurrent_refreshes', $(this).prop('checked'));\n });\n $('#sync_selection').change(function () {\n setOption('sync_selection', $(this).prop('checked'));\n netdataReload();\n });\n $('#stop_updates_when_focus_is_lost').change(function () {\n urlOptions.update_always = !$(this).prop('checked');\n urlOptions.hashUpdate();\n\n setOption('stop_updates_when_focus_is_lost', !urlOptions.update_always);\n });\n $('#smooth_plot').change(function () {\n setOption('smooth_plot', $(this).prop('checked'));\n });\n $('#pan_and_zoom_data_padding').change(function () {\n setOption('pan_and_zoom_data_padding', $(this).prop('checked'));\n });\n $('#seconds_as_time').change(function () {\n setOption('seconds_as_time', $(this).prop('checked'));\n });\n\n $('#units_conversion').change(function () {\n setOption('units', $(this).prop('checked') ? 'auto' : 'original');\n update_options_modal()\n });\n $('#units_temp').change(function () {\n setOption('temperature', $(this).prop('checked') ? 'celsius' : 'fahrenheit');\n });\n\n $('#legend_right').change(function () {\n setOption('legend_right', $(this).prop('checked'));\n // reloading for now, it's much easier than rebuilding charts bootstraping in main.js\n netdataReload();\n });\n\n $('#show_help').change(function () {\n urlOptions.help = $(this).prop('checked');\n urlOptions.hashUpdate();\n\n setOption('show_help', urlOptions.help);\n netdataReload();\n });\n\n // this has to be the last\n // it reloads the page\n $('#netdata_theme_control').change(function () {\n urlOptions.theme = $(this).prop('checked') ? 'slate' : 'white';\n urlOptions.hashUpdate();\n\n if (setTheme(urlOptions.theme)) {\n netdataReload();\n }\n });\n}\n\nconst CHART_DIV_ID_PREFIX = 'chart_'\nconst CHART_DIV_OFFSET = -50\n\nfunction scrollDashboardTo() {\n if (window.netdataSnapshotData !== null && typeof window.netdataSnapshotData.hash !== 'undefined') {\n scrollToId(window.netdataSnapshotData.hash.replace('#', ''));\n } else {\n // check if we have to jump to a specific section\n scrollToId(urlOptions.hash.replace('#', ''));\n if (urlOptions.chart !== null) {\n const chartElement = document.getElementById(`${CHART_DIV_ID_PREFIX}${name2id(urlOptions.chart)}`)\n if (chartElement) {\n const offset = chartElement.offsetTop + CHART_DIV_OFFSET;\n document.querySelector(\"html\").scrollTop = offset\n }\n }\n }\n}\n\nvar modalHiddenCallback = null;\n\nwindow.scrollToChartAfterHidingModal = (chart, alarmDate, alarmStatus) => {\n modalHiddenCallback = function () {\n\n if (typeof chart === 'string') {\n const chartElement = document.getElementById(`${CHART_DIV_ID_PREFIX}${name2id(chart)}`)\n if (chartElement) {\n const offset = chartElement.offsetTop + CHART_DIV_OFFSET;\n document.querySelector(\"html\").scrollTop = offset\n }\n }\n\n if (['WARNING', 'CRITICAL'].includes(alarmStatus)) {\n const twoMinutes = 2 * 60 * 1000\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: alarmDate - twoMinutes,\n before: alarmDate + twoMinutes,\n }))\n }\n };\n}\n\n// ----------------------------------------------------------------------------\n\nfunction enableTooltipsAndPopovers() {\n $('[data-toggle=\"tooltip\"]').tooltip({\n animated: 'fade',\n trigger: 'hover',\n html: true,\n delay: { show: 500, hide: 0 },\n container: 'body'\n });\n $('[data-toggle=\"popover\"]').popover();\n}\n\n// ----------------------------------------------------------------------------\n\nvar runOnceOnDashboardLastRun = 0;\n\nfunction runOnceOnDashboardWithjQuery() {\n if (runOnceOnDashboardLastRun !== 0) {\n scrollDashboardTo();\n\n // restore the scrollspy at the proper position\n $(document.body).scrollspy('refresh');\n $(document.body).scrollspy('process');\n\n return;\n }\n\n runOnceOnDashboardLastRun = Date.now();\n\n // ------------------------------------------------------------------------\n // bootstrap modals\n\n // prevent bootstrap modals from scrolling the page\n // maintains the current scroll position\n // https://stackoverflow.com/a/34754029/4525767\n\n var scrollPos = 0;\n var modal_depth = 0; // how many modals are currently open\n var modal_shown = false; // set to true, if a modal is shown\n var netdata_paused_on_modal = false; // set to true, if the modal paused netdata\n var scrollspyOffset = $(window).height() / 3; // will be updated below - the offset of scrollspy to select an item\n\n $('.modal')\n .on('show.bs.modal', function () {\n if (modal_depth === 0) {\n scrollPos = window.scrollY;\n\n $('body').css({\n overflow: 'hidden',\n position: 'fixed',\n top: -scrollPos\n });\n\n modal_shown = true;\n\n if (NETDATA.options.pauseCallback === null) {\n NETDATA.pause(function () {\n });\n netdata_paused_on_modal = true;\n } else {\n netdata_paused_on_modal = false;\n }\n }\n\n modal_depth++;\n //console.log(urlOptions.after);\n\n })\n .on('hide.bs.modal', function () {\n\n modal_depth--;\n\n if (modal_depth <= 0) {\n modal_depth = 0;\n\n $('body')\n .css({\n overflow: '',\n position: '',\n top: ''\n });\n\n // scroll to the position we had open before the modal\n $('html, body')\n .animate({ scrollTop: scrollPos }, 0);\n\n // unpause netdata, if we paused it\n if (netdata_paused_on_modal === true) {\n NETDATA.unpause();\n netdata_paused_on_modal = false;\n }\n\n // restore the scrollspy at the proper position\n $(document.body).scrollspy('process');\n }\n //console.log(urlOptions.after);\n })\n .on('hidden.bs.modal', function () {\n if (modal_depth === 0) {\n modal_shown = false;\n }\n\n if (typeof modalHiddenCallback === 'function') {\n modalHiddenCallback();\n }\n\n modalHiddenCallback = null;\n //console.log(urlOptions.after);\n });\n\n // ------------------------------------------------------------------------\n // sidebar / affix\n\n $('#sidebar')\n .affix({\n offset: {\n top: 0,\n bottom: 0\n }\n })\n .on('affixed.bs.affix', function () {\n // fix scrolling of very long affix lists\n // http://stackoverflow.com/questions/21691585/bootstrap-3-1-0-affix-too-long\n\n $(this).removeAttr('style');\n })\n .on('affix-top.bs.affix', function () {\n // fix bootstrap affix click bug\n // https://stackoverflow.com/a/37847981/4525767\n\n if (modal_shown) {\n return false;\n }\n })\n .on('activate.bs.scrollspy', function (e) {\n // change the URL based on the current position of the screen\n\n if (modal_shown === false) {\n var el = $(e.target);\n var hash = el.find('a').attr('href');\n if (typeof hash === 'string' && hash.substring(0, 1) === '#' && urlOptions.hash.startsWith(hash + '_submenu_') === false) {\n urlOptions.hash = hash;\n urlOptions.hashUpdate();\n }\n }\n });\n\n Ps.initialize(document.getElementById('sidebar'), {\n wheelSpeed: 0.5,\n wheelPropagation: true,\n swipePropagation: true,\n minScrollbarLength: null,\n maxScrollbarLength: null,\n useBothWheelAxes: false,\n suppressScrollX: true,\n suppressScrollY: false,\n scrollXMarginOffset: 0,\n scrollYMarginOffset: 0,\n theme: 'default'\n });\n\n // ------------------------------------------------------------------------\n // scrollspy\n\n if (scrollspyOffset > 250) {\n scrollspyOffset = 250;\n }\n if (scrollspyOffset < 75) {\n scrollspyOffset = 75;\n }\n document.body.setAttribute('data-offset', scrollspyOffset);\n\n // scroll the dashboard, before activating the scrollspy, so that our\n // hash will not be updated before we got the chance to scroll to it\n scrollDashboardTo();\n\n $(document.body).scrollspy({\n target: '#sidebar',\n offset: scrollspyOffset // controls the diff of the <hX> element to the top, to select it\n });\n\n // ------------------------------------------------------------------------\n // my-netdata menu\n\n $('#deleteRegistryModal')\n .on('hidden.bs.modal', function () {\n deleteRegistryGuid = null;\n });\n\n // ------------------------------------------------------------------------\n // update modal\n\n $('#updateModal')\n .on('show.bs.modal', function () {\n versionLog('checking, please wait...');\n })\n .on('shown.bs.modal', function () {\n notifyForUpdate(true);\n });\n\n // ------------------------------------------------------------------------\n // alarms modal\n\n $('#alarmsModal')\n .on('shown.bs.modal', function () {\n alarmsUpdateModal();\n })\n .on('hidden.bs.modal', function () {\n document.getElementById('alarms_active').innerHTML =\n document.getElementById('alarms_all').innerHTML =\n document.getElementById('alarms_log').innerHTML =\n 'loading...';\n });\n\n // ------------------------------------------------------------------------\n\n dashboardSettingsSetup();\n loadSnapshotDragAndDropSetup();\n saveSnapshotModalSetup();\n showPageFooter();\n\n // ------------------------------------------------------------------------\n // https://github.com/viralpatel/jquery.shorten/blob/master/src/jquery.shorten.js\n\n $.fn.shorten = function (settings) {\n \"use strict\";\n\n var config = {\n showChars: 750,\n minHideChars: 10,\n ellipsesText: \"...\",\n moreText: '<i class=\"fas fa-expand\"></i> show more information',\n lessText: '<i class=\"fas fa-compress\"></i> show less information',\n onLess: function () {\n NETDATA.onscroll();\n },\n onMore: function () {\n NETDATA.onscroll();\n },\n errMsg: null,\n force: false\n };\n\n if (settings) {\n $.extend(config, settings);\n }\n\n if ($(this).data('jquery.shorten') && !config.force) {\n return false;\n }\n $(this).data('jquery.shorten', true);\n\n $(document).off(\"click\", '.morelink');\n\n $(document).on({\n click: function () {\n\n var $this = $(this);\n if ($this.hasClass('less')) {\n $this.removeClass('less');\n $this.html(config.moreText);\n $this.parent().prev().animate({ 'height': '0' + '%' }, 0, function () {\n $this.parent().prev().prev().show();\n }).hide(0, function () {\n config.onLess();\n });\n } else {\n $this.addClass('less');\n $this.html(config.lessText);\n $this.parent().prev().animate({ 'height': '100' + '%' }, 0, function () {\n $this.parent().prev().prev().hide();\n }).show(0, function () {\n config.onMore();\n });\n }\n return false;\n }\n }, '.morelink');\n\n return this.each(function () {\n var $this = $(this);\n\n var content = $this.html();\n var contentlen = $this.text().length;\n if (contentlen > config.showChars + config.minHideChars) {\n var c = content.substr(0, config.showChars);\n if (c.indexOf('<') >= 0) // If there's HTML don't want to cut it\n {\n var inTag = false; // I'm in a tag?\n var bag = ''; // Put the characters to be shown here\n var countChars = 0; // Current bag size\n var openTags = []; // Stack for opened tags, so I can close them later\n var tagName = null;\n\n for (var i = 0, r = 0; r <= config.showChars; i++) {\n if (content[i] === '<' && !inTag) {\n inTag = true;\n\n // This could be \"tag\" or \"/tag\"\n tagName = content.substring(i + 1, content.indexOf('>', i));\n\n // If its a closing tag\n if (tagName[0] === '/') {\n\n if (tagName !== ('/' + openTags[0])) {\n config.errMsg = 'ERROR en HTML: the top of the stack should be the tag that closes';\n } else {\n openTags.shift(); // Pops the last tag from the open tag stack (the tag is closed in the retult HTML!)\n }\n\n } else {\n // There are some nasty tags that don't have a close tag like <br/>\n if (tagName.toLowerCase() !== 'br') {\n openTags.unshift(tagName); // Add to start the name of the tag that opens\n }\n }\n }\n\n if (inTag && content[i] === '>') {\n inTag = false;\n }\n\n if (inTag) {\n bag += content.charAt(i);\n } else {\n // Add tag name chars to the result\n r++;\n if (countChars <= config.showChars) {\n bag += content.charAt(i); // Fix to ie 7 not allowing you to reference string characters using the []\n countChars++;\n } else {\n // Now I have the characters needed\n if (openTags.length > 0) {\n // I have unclosed tags\n\n for (var j = 0; j < openTags.length; j++) {\n bag += '</' + openTags[j] + '>'; // Close all tags that were opened\n\n // You could shift the tag from the stack to check if you end with an empty stack, that means you have closed all open tags\n }\n break;\n }\n }\n }\n }\n c = $('<div/>').html(bag + '<span class=\"ellip\">' + config.ellipsesText + '</span>').html();\n } else {\n c += config.ellipsesText;\n }\n\n var html = '<div class=\"shortcontent\">' + c +\n '</div><div class=\"allcontent\">' + content +\n '</div><span><a href=\"javascript://nop/\" class=\"morelink\">' + config.moreText + '</a></span>';\n\n $this.html(html);\n $this.find(\".allcontent\").hide(); // Hide all text\n $('.shortcontent p:last', $this).css('margin-bottom', 0); //Remove bottom margin on last paragraph as it's likely shortened\n }\n });\n };\n}\n\nfunction finalizePage() {\n if (urlOptions.after < 0) {\n reduxStore.dispatch(setDefaultAfterAction({ after: urlOptions.after }))\n } else if (urlOptions.pan_and_zoom === true) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: urlOptions.after,\n before: urlOptions.before,\n }))\n }\n\n // resize all charts - without starting the background thread\n // this has to be done while NETDATA is paused\n // if we ommit this, the affix menu will be wrong, since all\n // the Dom elements are initially zero-sized\n NETDATA.parseDom();\n\n // let it run (update the charts)\n NETDATA.unpause();\n\n runOnceOnDashboardWithjQuery();\n $(\".shorten\").shorten();\n enableTooltipsAndPopovers();\n\n if (isDemo) {\n // do not to give errors on netdata demo servers for 60 seconds\n NETDATA.options.current.retries_on_data_failures = 60;\n\n // google analytics when this is used for the home page of the demo sites\n // this does not run on user's installations\n setTimeout(function () {\n (function (i, s, o, g, r, a, m) {\n i['GoogleAnalyticsObject'] = r;\n i[r] = i[r] || function () {\n (i[r].q = i[r].q || []).push(arguments)\n }, i[r].l = 1 * new Date();\n a = s.createElement(o),\n m = s.getElementsByTagName(o)[0];\n a.async = 1;\n a.src = g;\n m.parentNode.insertBefore(a, m)\n })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');\n\n ga('create', 'UA-64295674-3', 'auto');\n ga('send', 'pageview', '/demosite/' + window.location.host);\n }, 2000);\n } else {\n notifyForUpdate();\n }\n\n if (urlOptions.show_alarms === true) {\n setTimeout(function () {\n $('#alarmsModal').modal('show');\n }, 1000);\n }\n\n NETDATA.onresizeCallback = function () {\n Ps.update(document.getElementById('sidebar'));\n };\n NETDATA.onresizeCallback();\n\n if (window.netdataSnapshotData !== null) {\n reduxStore.dispatch(setGlobalPanAndZoomAction({\n after: window.netdataSnapshotData.after_ms,\n before: window.netdataSnapshotData.before_ms,\n }))\n }\n}\n\nwindow.resetDashboardOptions = () => {\n reduxStore.dispatch(resetOptionsAction())\n\n // it's dirty, but this will be rewritten anyway\n urlOptions.update_always = false;\n urlOptions.help = false;\n urlOptions.theme = \"slate\";\n urlOptions.hashUpdate();\n\n netdataReload()\n}\n\n// callback to add the dashboard info to the\n// parallel javascript downloader in netdata\nexport const netdataPrepCallback = () => {\n if (isDemo) {\n document.getElementById('masthead').style.display = 'block';\n } else {\n if (urlOptions.update_always === true) {\n setOption('stop_updates_when_focus_is_lost', !urlOptions.update_always);\n }\n }\n};\n\nwindow.selected_server_timezone = function (timezone, status) {\n // clear the error\n document.getElementById('timezone_error_message').innerHTML = '';\n\n if (typeof status === 'undefined') {\n // the user selected a timezone from the menu\n\n setOption('user_set_server_timezone', timezone);\n\n if (!isProperTimezone(timezone)) {\n setOption(\"timezone\", \"default\")\n\n if (!$('#local_timezone').prop('checked')) {\n $('#local_timezone').bootstrapToggle('on');\n }\n\n document.getElementById('timezone_error_message').innerHTML = 'Ooops! That timezone was not accepted by your browser. Please open a github issue to help us fix it.';\n setOption('user_set_server_timezone', options.timezone);\n } else {\n if ($('#local_timezone').prop('checked')) {\n $('#local_timezone').bootstrapToggle('off');\n }\n setOption(\"timezone\", timezone)\n }\n } else if (status === true) {\n // the user wants the browser default timezone to be activated\n setOption(\"timezone\", \"default\")\n } else {\n // the user wants the server default timezone to be activated\n\n let userSetServerTimezone = getOption(\"user_set_server_timezone\")\n if (userSetServerTimezone === 'default') {\n setOption(\"user_set_server_timezone\", options.timezone) // timezone from /charts endpoint\n userSetServerTimezone = options.timezone\n }\n\n if (!isProperTimezone(userSetServerTimezone)) {\n setOption(\"timezone\", \"default\");\n\n if (!$('#local_timezone').prop('checked')) {\n $('#local_timezone').bootstrapToggle('on');\n }\n\n document.getElementById('timezone_error_message').innerHTML = 'Sorry. The timezone \"' + timezone.toString() + '\" is not accepted by your browser. Please select one from the list.';\n setOption('user_set_server_timezone', options.timezone);\n } else {\n setOption(\"timezone\", userSetServerTimezone)\n }\n }\n\n const timezoneOption = getOption(\"timezone\")\n document.getElementById('current_timezone').innerText = (timezoneOption === 'default') ? 'unset, using browser default' : timezoneOption;\n return false;\n};\n\nexport var netdataCallback = initializeDynamicDashboard;\n\nwindow.showSignInModal = function() {\n document.getElementById(\"sim-registry\").innerHTML = getFromRegistry(\"registryServer\");\n $(\"#signInModal\").modal(\"show\");\n}\n\nwindow.explicitlySignIn = () => {\n $(\"#signInModal\").modal(\"hide\");\n reduxStore.dispatch(explicitlySignInAction())\n};\n","import React, { useMemo } from \"react\"\nimport { CloudConnectionProps, ConnectionModalStatusContent } from \"./types\"\nimport Anchor from \"@/src/components/anchor\"\n\nimport { Text } from \"@netdata/netdata-ui\"\n\nexport const makeCloudConnectionStatusInfo = ({\n nodeStatus,\n userStatus,\n date,\n}: CloudConnectionProps): ConnectionModalStatusContent => ({\n title: \"Netdata Cloud connection status\",\n text: {\n header: () => {\n return (\n <Text>\n This node is currently{\" \"}\n <Text strong>{nodeStatus === \"LIVE\" ? \"Connected\" : \"Not Connected\"}</Text> to Netdata\n Cloud\n </Text>\n )\n },\n bullets:\n nodeStatus === \"NOT_LIVE\"\n ? [\n // `The node lost its Netdata Cloud connection at ${date}`,\n () => (\n <Text>\n To troubleshoot Netdata Cloud connection issues, please follow{\" \"}\n <Anchor\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href=\"https://learn.netdata.cloud/docs/agent/claim#troubleshooting\"\n >\n this guide\n </Anchor>\n .\n </Text>\n ),\n ]\n : [],\n footer: () => (\n <Text>\n You are{\" \"}\n <Text strong>\n {userStatus === \"LOGGED_IN\"\n ? \"Logged In\"\n : userStatus === \"EXPIRED_LOGIN\"\n ? \"Logged out\"\n : \"Not signed-up\"}\n </Text>{\" \"}\n to Netdata Cloud\n </Text>\n ),\n },\n CTA1: {\n text: \"Take me to Netdata Cloud\",\n },\n})\n\nconst useCloudConnectionStatus = ({ userStatus, nodeStatus, date }: CloudConnectionProps) => {\n const cloudConnectionStatusInfo = useMemo<ConnectionModalStatusContent>(() => {\n return makeCloudConnectionStatusInfo({ userStatus, nodeStatus, date })\n }, [userStatus, nodeStatus, date])\n\n return cloudConnectionStatusInfo\n}\n\nexport default useCloudConnectionStatus\n","import React, { useCallback } from \"react\"\nimport GoToCloud from \"components/auth/signIn\"\n\nimport {\n Modal,\n ModalContent,\n ModalBody,\n ModalFooter,\n ModalHeader,\n Text,\n Flex,\n H3,\n Button,\n Box,\n ModalCloseButton,\n} from \"@netdata/netdata-ui\"\n\nimport { ConnectionModalStatusContent } from \"./types\"\n\nconst campaign = \"agent_nudge_to_cloud\"\n\nexport type CloudConnectionStatusModalProps = ConnectionModalStatusContent & {\n closeModal: () => void\n onRefresh?: () => void\n isCTA1Disabled: boolean\n}\n\nconst CloudConnectionStatusModal = ({\n title,\n text,\n CTA1,\n closeModal,\n onRefresh,\n isCTA1Disabled,\n}: CloudConnectionStatusModalProps) => {\n const handleClickedCTA1 = useCallback(\n ({ link }: { link: string }) => {\n closeModal()\n window.open(link, \"_blank\")\n },\n [closeModal]\n )\n\n return (\n <Modal>\n <ModalContent width={180} background=\"modalBackground\">\n <ModalHeader>\n <H3 margin={[0]}>{title}</H3>\n <ModalCloseButton onClose={closeModal} />\n </ModalHeader>\n <ModalBody>\n <Flex padding={[0, 0, 4, 0]} column gap={3}>\n {text.header({})}\n {text.bullets.length > 0 && (\n <Flex column gap={3}>\n <Flex column gap={1} as={\"ul\"}>\n {text.bullets.map((bullet, index) => {\n if (typeof bullet === \"function\") {\n return <li key={index}> {bullet()}</li>\n }\n return (\n <li key={bullet}>\n <Text>{bullet}</Text>\n </li>\n )\n })}\n </Flex>\n </Flex>\n )}\n {text.footer()}\n </Flex>\n </ModalBody>\n <ModalFooter>\n <Box data-testid=\"cta1\" margin={[0, 2, 0, 0]} width={{ min: 40 }}>\n <GoToCloud utmParameters={{ content: \"connection_to_cloud\", campaign }}>\n {({ link }) => (\n <Button\n data-ga={`connection-to-cloud::click-ct1::ad`}\n disabled={isCTA1Disabled}\n textTransform=\"none\"\n data-testid=\"cta1-button\"\n onClick={() => handleClickedCTA1({ link })}\n width=\"100%\"\n label={CTA1.text}\n />\n )}\n </GoToCloud>\n </Box>\n <Box\n data-ga={`connection-to-cloud::click-check-now::ad`}\n onClick={onRefresh}\n height={10}\n className=\"btn btn-default\"\n data-testid=\"cta2-button\"\n width={{ min: 40 }}\n >\n <Box as={Text} sx={{ fontWeight: \"500\", lineHeight: \"25px\" }}>\n Check Now\n </Box>\n </Box>\n </ModalFooter>\n </ModalContent>\n </Modal>\n )\n}\n\nexport default CloudConnectionStatusModal\n","import React, { useState, useCallback, useEffect } from \"react\"\nimport useCloudConnectionStatus from \"./use-cloud-connection-status\"\nimport CloudConnectionStatusModal from \"./cloud-connection-status-modal\"\n\nimport { Pill, Flex } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"react-redux\"\nimport { useRequestRefreshOfAccessMessage } from \"hooks/use-user-node-access\"\nimport { selectUserNodeAccess } from \"domains/global/selectors\"\nimport { PromoProps } from \"@/src/domains/dashboard/components/migration-modal\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\n\nconst CloudConnectionStatus = () => {\n const userNodeAccess = useSelector(selectUserNodeAccess) as PromoProps\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n const [isModalOpen, setModalOpen] = useState(false)\n const cloudConnectionStatusInfo = useCloudConnectionStatus({\n userStatus: userNodeAccess?.userStatus || \"UNKNOWN\",\n nodeStatus: userNodeAccess?.nodeLiveness || \"NOT_LIVE\",\n date: \"\",\n })\n\n useEffect(() => {\n if (isModalOpen) {\n document.documentElement.style.overflow = \"hidden\"\n } else {\n document.documentElement.style.overflow = \"auto\"\n }\n }, [isModalOpen])\n\n const openModal = useCallback(() => {\n setModalOpen(true)\n }, [])\n\n const closeModal = useCallback(() => {\n setModalOpen(false)\n }, [])\n\n const onRefresh = useRequestRefreshOfAccessMessage()\n\n if (!cloudEnabled) return null\n\n return (\n <Flex column>\n <Pill\n data-ga={`connection-to-cloud::click-pill::ad`}\n data-testid=\"header-connection-to-cloud-button\"\n onClick={openModal}\n flavour=\"neutral\"\n >\n Connection to Cloud\n </Pill>\n {isModalOpen && (\n <CloudConnectionStatusModal\n {...cloudConnectionStatusInfo}\n isCTA1Disabled={userNodeAccess?.nodeLiveness !== \"LIVE\"}\n closeModal={closeModal}\n onRefresh={onRefresh}\n />\n )}\n </Flex>\n )\n}\n\nexport default CloudConnectionStatus\n","import { AlarmStatus } from \"domains/global/types\"\n\nexport const storeKey = \"global\"\n\nexport const TEMPORARY_MAIN_JS_TIMEOUT = 1000\n\nexport const MASKED_DATA = \"***\"\n\nexport const NOTIFICATIONS_TIMEOUT = 5000\n\nexport const INFO_POLLING_FREQUENCY = 5000\n\nexport const CLOUD_BASE_URL_DISABLED = \"CLOUD_BASE_URL_DISABLED\"\n\nexport const alarmStatuses: AlarmStatus[] = [\"WARNING\", \"ERROR\", \"REMOVED\", \"UNDEFINED\", \"UNINITIALIZED\", \"CLEAR\", \"CRITICAL\"]\n","/* eslint-disable */\n/*!\n * d3pie\n * @author Ben Keen\n * @version 0.1.9\n * @date June 17th, 2015\n * @repo http://github.com/benkeen/d3pie\n * SPDX-License-Identifier: MIT\n */\n\n// UMD pattern from https://github.com/umdjs/umd/blob/master/returnExports.js\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module\n define([], factory);\n } else if (typeof exports === 'object') {\n // Node. Does not work with strict CommonJS, but only CommonJS-like environments that support module.exports,\n // like Node\n module.exports = factory();\n } else {\n // browser globals (root is window)\n root.d3pie = factory(root);\n }\n}(this, function() {\n\n var _scriptName = \"d3pie\";\n var _version = \"0.2.1\";\n\n // used to uniquely generate IDs and classes, ensuring no conflict between multiple pies on the same page\n var _uniqueIDCounter = 0;\n\n\n // this section includes all helper libs on the d3pie object. They're populated via grunt-template. Note: to keep\n // the syntax highlighting from getting all messed up, I commented out each line. That REQUIRES each of the files\n // to have an empty first line. Crumby, yes, but acceptable.\n //// --------- _default-settings.js -----------/**\n/**\n * Contains the out-the-box settings for the script. Any of these settings that aren't explicitly overridden for the\n * d3pie instance will inherit from these. This is also included on the main website for use in the generation script.\n */\nvar defaultSettings = {\n header: {\n title: {\n text: \"\",\n color: \"#333333\",\n fontSize: 18,\n fontWeight: \"bold\",\n font: \"arial\"\n },\n subtitle: {\n text: \"\",\n color: \"#666666\",\n fontSize: 14,\n fontWeight: \"bold\",\n font: \"arial\"\n },\n location: \"top-center\",\n titleSubtitlePadding: 8\n },\n footer: {\n text: \t \"\",\n color: \"#666666\",\n fontSize: 14,\n fontWeight: \"bold\",\n font: \"arial\",\n location: \"left\"\n },\n size: {\n canvasHeight: 500,\n canvasWidth: 500,\n pieInnerRadius: \"0%\",\n pieOuterRadius: null\n },\n data: {\n sortOrder: \"none\",\n ignoreSmallSegments: {\n enabled: false,\n valueType: \"percentage\",\n value: null\n },\n smallSegmentGrouping: {\n enabled: false,\n value: 1,\n valueType: \"percentage\",\n label: \"Other\",\n color: \"#cccccc\"\n },\n content: []\n },\n labels: {\n outer: {\n format: \"label\",\n hideWhenLessThanPercentage: null,\n pieDistance: 30\n },\n inner: {\n format: \"percentage\",\n hideWhenLessThanPercentage: null\n },\n mainLabel: {\n color: \"#333333\",\n font: \"arial\",\n fontWeight: \"normal\",\n fontSize: 10\n },\n percentage: {\n color: \"#dddddd\",\n font: \"arial\",\n fontWeight: \"bold\",\n fontSize: 10,\n decimalPlaces: 0\n },\n value: {\n color: \"#cccc44\",\n fontWeight: \"bold\",\n font: \"arial\",\n fontSize: 10\n },\n lines: {\n enabled: true,\n style: \"curved\",\n color: \"segment\"\n },\n truncation: {\n enabled: false,\n truncateLength: 30\n },\n formatter: null\n },\n effects: {\n load: {\n effect: \"none\", // \"default\", commented in the code\n speed: 1000\n },\n pullOutSegmentOnClick: {\n effect: \"none\", // \"bounce\", commented in the code\n speed: 300,\n size: 10\n },\n highlightSegmentOnMouseover: false,\n highlightLuminosity: -0.2\n },\n tooltips: {\n enabled: false,\n type: \"placeholder\", // caption|placeholder\n string: \"\",\n placeholderParser: null,\n styles: {\n fadeInSpeed: 250,\n backgroundColor: \"#000000\",\n backgroundOpacity: 0.5,\n color: \"#efefef\",\n borderRadius: 2,\n font: \"arial\",\n fontWeight: \"bold\",\n fontSize: 10,\n padding: 4\n }\n },\n misc: {\n colors: {\n background: null,\n segments: [\n \"#2484c1\", \"#65a620\", \"#7b6888\", \"#a05d56\", \"#961a1a\", \"#d8d23a\", \"#e98125\", \"#d0743c\", \"#635222\", \"#6ada6a\",\n \"#0c6197\", \"#7d9058\", \"#207f33\", \"#44b9b0\", \"#bca44a\", \"#e4a14b\", \"#a3acb2\", \"#8cc3e9\", \"#69a6f9\", \"#5b388f\",\n \"#546e91\", \"#8bde95\", \"#d2ab58\", \"#273c71\", \"#98bf6e\", \"#4daa4b\", \"#98abc5\", \"#cc1010\", \"#31383b\", \"#006391\",\n \"#c2643f\", \"#b0a474\", \"#a5a39c\", \"#a9c2bc\", \"#22af8c\", \"#7fcecf\", \"#987ac6\", \"#3d3b87\", \"#b77b1c\", \"#c9c2b6\",\n \"#807ece\", \"#8db27c\", \"#be66a2\", \"#9ed3c6\", \"#00644b\", \"#005064\", \"#77979f\", \"#77e079\", \"#9c73ab\", \"#1f79a7\"\n ],\n segmentStroke: \"#ffffff\"\n },\n gradient: {\n enabled: false,\n percentage: 95,\n color: \"#000000\"\n },\n canvasPadding: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5\n },\n pieCenterOffset: {\n x: 0,\n y: 0\n },\n cssPrefix: null\n },\n callbacks: {\n onload: null,\n onMouseoverSegment: null,\n onMouseoutSegment: null,\n onClickSegment: null\n }\n};\n\n //// --------- validate.js -----------\nvar validate = {\n\n // called whenever a new pie chart is created\n initialCheck: function(pie) {\n var cssPrefix = pie.cssPrefix;\n var element = pie.element;\n var options = pie.options;\n\n // confirm d3 is available [check minimum version]\n if (!window.d3 || !window.d3.hasOwnProperty(\"version\")) {\n console.error(\"d3pie error: d3 is not available\");\n return false;\n }\n\n // confirm element is either a DOM element or a valid string for a DOM element\n if (!(element instanceof HTMLElement || element instanceof SVGElement)) {\n console.error(\"d3pie error: the first d3pie() param must be a valid DOM element (not jQuery) or a ID string.\");\n return false;\n }\n\n // confirm the CSS prefix is valid. It has to start with a-Z and contain nothing but a-Z0-9_-\n if (!(/[a-zA-Z][a-zA-Z0-9_-]*$/.test(cssPrefix))) {\n console.error(\"d3pie error: invalid options.misc.cssPrefix\");\n return false;\n }\n\n // confirm some data has been supplied\n if (!helpers.isArray(options.data.content)) {\n console.error(\"d3pie error: invalid config structure: missing data.content property.\");\n return false;\n }\n if (options.data.content.length === 0) {\n console.error(\"d3pie error: no data supplied.\");\n return false;\n }\n\n // clear out any invalid data. Each data row needs a valid positive number and a label\n var data = [];\n for (var i=0; i<options.data.content.length; i++) {\n if (typeof options.data.content[i].value !== \"number\" || isNaN(options.data.content[i].value)) {\n console.log(\"not valid: \", options.data.content[i]);\n continue;\n }\n if (options.data.content[i].value <= 0) {\n console.log(\"not valid - should have positive value: \", options.data.content[i]);\n continue;\n }\n data.push(options.data.content[i]);\n }\n pie.options.data.content = data;\n\n // labels.outer.hideWhenLessThanPercentage - 1-100\n // labels.inner.hideWhenLessThanPercentage - 1-100\n\n return true;\n }\n};\n\n //// --------- helpers.js -----------\nvar helpers = {\n\n // creates the SVG element\n addSVGSpace: function(pie) {\n var element = pie.element;\n var canvasWidth = pie.options.size.canvasWidth;\n var canvasHeight = pie.options.size.canvasHeight;\n var backgroundColor = pie.options.misc.colors.background;\n\n var svg = d3.select(element).append(\"svg:svg\")\n .attr(\"width\", canvasWidth)\n .attr(\"height\", canvasHeight);\n\n if (backgroundColor !== \"transparent\") {\n svg.style(\"background-color\", function() { return backgroundColor; });\n }\n\n return svg;\n },\n\n shuffleArray: function(array) {\n var currentIndex = array.length, tmpVal, randomIndex;\n\n while (0 !== currentIndex) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n\n // and swap it with the current element\n tmpVal = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = tmpVal;\n }\n return array;\n },\n\n processObj: function(obj, is, value) {\n if (typeof is === 'string') {\n return helpers.processObj(obj, is.split('.'), value);\n } else if (is.length === 1 && value !== undefined) {\n obj[is[0]] = value;\n return obj[is[0]];\n } else if (is.length === 0) {\n return obj;\n } else {\n return helpers.processObj(obj[is[0]], is.slice(1), value);\n }\n },\n\n getDimensions: function(el) {\n if(typeof el === 'string')\n el = document.getElementById(el);\n\n var w = 0, h = 0;\n if (el) {\n var dimensions = el.getBBox();\n w = dimensions.width;\n h = dimensions.height;\n }\n else {\n console.log(\"error: getDimensions() \" + id + \" not found.\");\n }\n\n return { w: w, h: h };\n },\n\n /**\n * This is based on the SVG coordinate system, where top-left is 0,0 and bottom right is n-n.\n * @param r1\n * @param r2\n * @returns {boolean}\n */\n rectIntersect: function(r1, r2) {\n var returnVal = (\n // r2.left > r1.right\n (r2.x > (r1.x + r1.w)) ||\n\n // r2.right < r1.left\n ((r2.x + r2.w) < r1.x) ||\n\n // r2.top < r1.bottom\n ((r2.y + r2.h) < r1.y) ||\n\n // r2.bottom > r1.top\n (r2.y > (r1.y + r1.h))\n );\n\n return !returnVal;\n },\n\n /**\n * Returns a lighter/darker shade of a hex value, based on a luminance value passed.\n * @param hex a hex color value such as “#abc” or “#123456″ (the hash is optional)\n * @param lum the luminosity factor: -0.1 is 10% darker, 0.2 is 20% lighter, etc.\n * @returns {string}\n */\n getColorShade: function(hex, lum) {\n\n // validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n lum = lum || 0;\n\n // convert to decimal and change luminosity\n var newHex = \"#\";\n for (var i=0; i<3; i++) {\n var c = parseInt(hex.substr(i * 2, 2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n newHex += (\"00\" + c).substr(c.length);\n }\n\n return newHex;\n },\n\n /**\n * Users can choose to specify segment colors in three ways (in order of precedence):\n * \t1. include a \"color\" attribute for each row in data.content\n * \t2. include a misc.colors.segments property which contains an array of hex codes\n * \t3. specify nothing at all and rely on this lib provide some reasonable defaults\n *\n * This function sees what's included and populates this.options.colors with whatever's required\n * for this pie chart.\n * @param data\n */\n initSegmentColors: function(pie) {\n var data = pie.options.data.content;\n var colors = pie.options.misc.colors.segments;\n\n // TODO this needs a ton of error handling\n\n var finalColors = [];\n for (var i=0; i<data.length; i++) {\n if (data[i].hasOwnProperty(\"color\")) {\n finalColors.push(data[i].color);\n } else {\n finalColors.push(colors[i]);\n }\n }\n\n return finalColors;\n },\n\n applySmallSegmentGrouping: function(data, smallSegmentGrouping) {\n var totalSize;\n if (smallSegmentGrouping.valueType === \"percentage\") {\n totalSize = math.getTotalPieSize(data);\n }\n\n // loop through each data item\n var newData = [];\n var groupedData = [];\n var totalGroupedData = 0;\n for (var i=0; i<data.length; i++) {\n if (smallSegmentGrouping.valueType === \"percentage\") {\n var dataPercent = (data[i].value / totalSize) * 100;\n if (dataPercent <= smallSegmentGrouping.value) {\n groupedData.push(data[i]);\n totalGroupedData += data[i].value;\n continue;\n }\n data[i].isGrouped = false;\n newData.push(data[i]);\n } else {\n if (data[i].value <= smallSegmentGrouping.value) {\n groupedData.push(data[i]);\n totalGroupedData += data[i].value;\n continue;\n }\n data[i].isGrouped = false;\n newData.push(data[i]);\n }\n }\n\n // we're done! See if there's any small segment groups to add\n if (groupedData.length) {\n newData.push({\n color: smallSegmentGrouping.color,\n label: smallSegmentGrouping.label,\n value: totalGroupedData,\n isGrouped: true,\n groupedData: groupedData\n });\n }\n\n return newData;\n },\n\n // for debugging\n showPoint: function(svg, x, y) {\n svg.append(\"circle\").attr(\"cx\", x).attr(\"cy\", y).attr(\"r\", 2).style(\"fill\", \"black\");\n },\n\n isFunction: function(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n },\n\n isArray: function(o) {\n return Object.prototype.toString.call(o) === '[object Array]';\n }\n};\n\n\n// taken from jQuery\nvar extend = function() {\n var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false,\n toString = Object.prototype.toString,\n hasOwn = Object.prototype.hasOwnProperty,\n class2type = {\n \"[object Boolean]\": \"boolean\",\n \"[object Number]\": \"number\",\n \"[object String]\": \"string\",\n \"[object Function]\": \"function\",\n \"[object Array]\": \"array\",\n \"[object Date]\": \"date\",\n \"[object RegExp]\": \"regexp\",\n \"[object Object]\": \"object\"\n },\n\n jQuery = {\n isFunction: function (obj) {\n return jQuery.type(obj) === \"function\";\n },\n isArray: Array.isArray ||\n function (obj) {\n return jQuery.type(obj) === \"array\";\n },\n isWindow: function (obj) {\n return obj !== null && obj === obj.window;\n },\n isNumeric: function (obj) {\n return !isNaN(parseFloat(obj)) && isFinite(obj);\n },\n type: function (obj) {\n return obj === null ? String(obj) : class2type[toString.call(obj)] || \"object\";\n },\n isPlainObject: function (obj) {\n if (!obj || jQuery.type(obj) !== \"object\" || obj.nodeType) {\n return false;\n }\n try {\n if (obj.constructor && !hasOwn.call(obj, \"constructor\") && !hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\")) {\n return false;\n }\n } catch (e) {\n return false;\n }\n var key;\n for (key in obj) {}\n return key === undefined || hasOwn.call(obj, key);\n }\n };\n if (typeof target === \"boolean\") {\n deep = target;\n target = arguments[1] || {};\n i = 2;\n }\n if (typeof target !== \"object\" && !jQuery.isFunction(target)) {\n target = {};\n }\n if (length === i) {\n target = this;\n --i;\n }\n for (i; i < length; i++) {\n if ((options = arguments[i]) !== null) {\n for (name in options) {\n src = target[name];\n copy = options[name];\n if (target === copy) {\n continue;\n }\n if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {\n if (copyIsArray) {\n copyIsArray = false;\n clone = src && jQuery.isArray(src) ? src : [];\n } else {\n clone = src && jQuery.isPlainObject(src) ? src : {};\n }\n // WARNING: RECURSION\n target[name] = extend(deep, clone, copy);\n } else if (copy !== undefined) {\n target[name] = copy;\n }\n }\n }\n }\n return target;\n};\n //// --------- math.js -----------\nvar math = {\n\n toRadians: function(degrees) {\n return degrees * (Math.PI / 180);\n },\n\n toDegrees: function(radians) {\n return radians * (180 / Math.PI);\n },\n\n computePieRadius: function(pie) {\n var size = pie.options.size;\n var canvasPadding = pie.options.misc.canvasPadding;\n\n // outer radius is either specified (e.g. through the generator), or omitted altogether\n // and calculated based on the canvas dimensions. Right now the estimated version isn't great - it should\n // be possible to calculate it to precisely generate the maximum sized pie, but it's fussy as heck. Something\n // for the next release.\n\n // first, calculate the default _outerRadius\n var w = size.canvasWidth - canvasPadding.left - canvasPadding.right;\n var h = size.canvasHeight - canvasPadding.top - canvasPadding.bottom;\n\n // now factor in the footer, title & subtitle\n if (pie.options.header.location !== \"pie-center\") {\n h -= pie.textComponents.headerHeight;\n }\n\n if (pie.textComponents.footer.exists) {\n h -= pie.textComponents.footer.h;\n }\n\n // for really teeny pies, h may be < 0. Adjust it back\n h = (h < 0) ? 0 : h;\n\n var outerRadius = ((w < h) ? w : h) / 3;\n var innerRadius, percent;\n\n // if the user specified something, use that instead\n if (size.pieOuterRadius !== null) {\n if (/%/.test(size.pieOuterRadius)) {\n percent = parseInt(size.pieOuterRadius.replace(/[\\D]/, \"\"), 10);\n percent = (percent > 99) ? 99 : percent;\n percent = (percent < 0) ? 0 : percent;\n\n var smallestDimension = (w < h) ? w : h;\n\n // now factor in the label line size\n if (pie.options.labels.outer.format !== \"none\") {\n var pieDistanceSpace = parseInt(pie.options.labels.outer.pieDistance, 10) * 2;\n if (smallestDimension - pieDistanceSpace > 0) {\n smallestDimension -= pieDistanceSpace;\n }\n }\n\n outerRadius = Math.floor((smallestDimension / 100) * percent) / 2;\n } else {\n outerRadius = parseInt(size.pieOuterRadius, 10);\n }\n }\n\n // inner radius\n if (/%/.test(size.pieInnerRadius)) {\n percent = parseInt(size.pieInnerRadius.replace(/[\\D]/, \"\"), 10);\n percent = (percent > 99) ? 99 : percent;\n percent = (percent < 0) ? 0 : percent;\n innerRadius = Math.floor((outerRadius / 100) * percent);\n } else {\n innerRadius = parseInt(size.pieInnerRadius, 10);\n }\n\n pie.innerRadius = innerRadius;\n pie.outerRadius = outerRadius;\n },\n\n getTotalPieSize: function(data) {\n var totalSize = 0;\n for (var i=0; i<data.length; i++) {\n totalSize += data[i].value;\n }\n return totalSize;\n },\n\n sortPieData: function(pie) {\n var data = pie.options.data.content;\n var sortOrder = pie.options.data.sortOrder;\n\n switch (sortOrder) {\n case \"none\":\n // do nothing\n break;\n case \"random\":\n data = helpers.shuffleArray(data);\n break;\n case \"value-asc\":\n data.sort(function(a, b) { return (a.value < b.value) ? -1 : 1; });\n break;\n case \"value-desc\":\n data.sort(function(a, b) { return (a.value < b.value) ? 1 : -1; });\n break;\n case \"label-asc\":\n data.sort(function(a, b) { return (a.label.toLowerCase() > b.label.toLowerCase()) ? 1 : -1; });\n break;\n case \"label-desc\":\n data.sort(function(a, b) { return (a.label.toLowerCase() < b.label.toLowerCase()) ? 1 : -1; });\n break;\n }\n\n return data;\n },\n\n // var pieCenter = math.getPieCenter();\n getPieTranslateCenter: function(pieCenter) {\n return \"translate(\" + pieCenter.x + \",\" + pieCenter.y + \")\";\n },\n\n /**\n * Used to determine where on the canvas the center of the pie chart should be. It takes into account the\n * height and position of the title, subtitle and footer, and the various paddings.\n * @private\n */\n calculatePieCenter: function(pie) {\n var pieCenterOffset = pie.options.misc.pieCenterOffset;\n var hasTopTitle = (pie.textComponents.title.exists && pie.options.header.location !== \"pie-center\");\n var hasTopSubtitle = (pie.textComponents.subtitle.exists && pie.options.header.location !== \"pie-center\");\n\n var headerOffset = pie.options.misc.canvasPadding.top;\n if (hasTopTitle && hasTopSubtitle) {\n headerOffset += pie.textComponents.title.h + pie.options.header.titleSubtitlePadding + pie.textComponents.subtitle.h;\n } else if (hasTopTitle) {\n headerOffset += pie.textComponents.title.h;\n } else if (hasTopSubtitle) {\n headerOffset += pie.textComponents.subtitle.h;\n }\n\n var footerOffset = 0;\n if (pie.textComponents.footer.exists) {\n footerOffset = pie.textComponents.footer.h + pie.options.misc.canvasPadding.bottom;\n }\n\n var x = ((pie.options.size.canvasWidth - pie.options.misc.canvasPadding.left - pie.options.misc.canvasPadding.right) / 2) + pie.options.misc.canvasPadding.left;\n var y = ((pie.options.size.canvasHeight - footerOffset - headerOffset) / 2) + headerOffset;\n\n x += pieCenterOffset.x;\n y += pieCenterOffset.y;\n\n pie.pieCenter = { x: x, y: y };\n },\n\n\n /**\n * Rotates a point (x, y) around an axis (xm, ym) by degrees (a).\n * @param x\n * @param y\n * @param xm\n * @param ym\n * @param a angle in degrees\n * @returns {Array}\n */\n rotate: function(x, y, xm, ym, a) {\n\n a = a * Math.PI / 180; // convert to radians\n\n var cos = Math.cos,\n sin = Math.sin,\n // subtract midpoints, so that midpoint is translated to origin and add it in the end again\n xr = (x - xm) * cos(a) - (y - ym) * sin(a) + xm,\n yr = (x - xm) * sin(a) + (y - ym) * cos(a) + ym;\n\n return { x: xr, y: yr };\n },\n\n /**\n * Translates a point x, y by distance d, and by angle a.\n * @param x\n * @param y\n * @param dist\n * @param a angle in degrees\n */\n translate: function(x, y, d, a) {\n var rads = math.toRadians(a);\n return {\n x: x + d * Math.sin(rads),\n y: y - d * Math.cos(rads)\n };\n },\n\n // from: http://stackoverflow.com/questions/19792552/d3-put-arc-labels-in-a-pie-chart-if-there-is-enough-space\n pointIsInArc: function(pt, ptData, d3Arc) {\n // Center of the arc is assumed to be 0,0\n // (pt.x, pt.y) are assumed to be relative to the center\n var r1 = d3Arc.innerRadius()(ptData), // Note: Using the innerRadius\n r2 = d3Arc.outerRadius()(ptData),\n theta1 = d3Arc.startAngle()(ptData),\n theta2 = d3Arc.endAngle()(ptData);\n\n var dist = pt.x * pt.x + pt.y * pt.y,\n angle = Math.atan2(pt.x, -pt.y); // Note: different coordinate system\n\n angle = (angle < 0) ? (angle + Math.PI * 2) : angle;\n\n return (r1 * r1 <= dist) && (dist <= r2 * r2) &&\n (theta1 <= angle) && (angle <= theta2);\n }\n};\n\n //// --------- labels.js -----------\nvar labels = {\n\n /**\n * Adds the labels to the pie chart, but doesn't position them. There are two locations for the\n * labels: inside (center) of the segments, or outside the segments on the edge.\n * @param section \"inner\" or \"outer\"\n * @param sectionDisplayType \"percentage\", \"value\", \"label\", \"label-value1\", etc.\n * @param pie\n */\n add: function(pie, section, sectionDisplayType) {\n var include = labels.getIncludes(sectionDisplayType);\n var settings = pie.options.labels;\n\n // group the label groups (label, percentage, value) into a single element for simpler positioning\n var outerLabel = pie.svg.insert(\"g\", \".\" + pie.cssPrefix + \"labels-\" + section)\n .attr(\"class\", pie.cssPrefix + \"labels-\" + section);\n\n var labelGroup = pie.__labels[section] = outerLabel.selectAll(\".\" + pie.cssPrefix + \"labelGroup-\" + section)\n .data(pie.options.data.content)\n .enter()\n .append(\"g\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"labelGroup\" + i + \"-\" + section; })\n .attr(\"data-index\", function(d, i) { return i; })\n .attr(\"class\", pie.cssPrefix + \"labelGroup-\" + section)\n .style(\"opacity\", 0);\n\n var formatterContext = { section: section, sectionDisplayType: sectionDisplayType };\n\n // 1. Add the main label\n if (include.mainLabel) {\n labelGroup.append(\"text\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segmentMainLabel\" + i + \"-\" + section; })\n .attr(\"class\", pie.cssPrefix + \"segmentMainLabel-\" + section)\n .text(function(d, i) {\n var str = d.label;\n\n // if a custom formatter has been defined, pass it the raw label string - it can do whatever it wants with it.\n // we only apply truncation if it's not defined\n if (settings.formatter) {\n formatterContext.index = i;\n formatterContext.part = 'mainLabel';\n formatterContext.value = d.value;\n formatterContext.label = str;\n str = settings.formatter(formatterContext);\n } else if (settings.truncation.enabled && d.label.length > settings.truncation.truncateLength) {\n str = d.label.substring(0, settings.truncation.truncateLength) + \"...\";\n }\n return str;\n })\n .style(\"font-size\", settings.mainLabel.fontSize + \"px\")\n .style(\"font-family\", settings.mainLabel.font)\n .style(\"font-weight\", settings.mainLabel.fontWeight)\n .style(\"fill\", function(d, i) {\n return (settings.mainLabel.color === \"segment\") ? pie.options.colors[i] : settings.mainLabel.color;\n });\n }\n\n // 2. Add the percentage label\n if (include.percentage) {\n labelGroup.append(\"text\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segmentPercentage\" + i + \"-\" + section; })\n .attr(\"class\", pie.cssPrefix + \"segmentPercentage-\" + section)\n .text(function(d, i) {\n var percentage = d.percentage;\n if (settings.formatter) {\n formatterContext.index = i;\n formatterContext.part = \"percentage\";\n formatterContext.value = d.value;\n formatterContext.label = d.percentage;\n percentage = settings.formatter(formatterContext);\n } else {\n percentage += \"%\";\n }\n return percentage;\n })\n .style(\"font-size\", settings.percentage.fontSize + \"px\")\n .style(\"font-family\", settings.percentage.font)\n .style(\"font-weight\", settings.percentage.fontWeight)\n .style(\"fill\", settings.percentage.color);\n }\n\n // 3. Add the value label\n if (include.value) {\n labelGroup.append(\"text\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segmentValue\" + i + \"-\" + section; })\n .attr(\"class\", pie.cssPrefix + \"segmentValue-\" + section)\n .text(function(d, i) {\n formatterContext.index = i;\n formatterContext.part = \"value\";\n formatterContext.value = d.value;\n formatterContext.label = d.value;\n return settings.formatter ? settings.formatter(formatterContext, d.value) : d.value;\n })\n .style(\"font-size\", settings.value.fontSize + \"px\")\n .style(\"font-family\", settings.value.font)\n .style(\"font-weight\", settings.value.fontWeight)\n .style(\"fill\", settings.value.color);\n }\n },\n\n /**\n * @param section \"inner\" / \"outer\"\n */\n positionLabelElements: function(pie, section, sectionDisplayType) {\n labels[\"dimensions-\" + section] = [];\n\n // get the latest widths, heights\n var labelGroups = pie.__labels[section];\n labelGroups.each(function(d, i) {\n var mainLabel = d3.select(this).selectAll(\".\" + pie.cssPrefix + \"segmentMainLabel-\" + section);\n var percentage = d3.select(this).selectAll(\".\" + pie.cssPrefix + \"segmentPercentage-\" + section);\n var value = d3.select(this).selectAll(\".\" + pie.cssPrefix + \"segmentValue-\" + section);\n\n labels[\"dimensions-\" + section].push({\n mainLabel: (mainLabel.node() !== null) ? mainLabel.node().getBBox() : null,\n percentage: (percentage.node() !== null) ? percentage.node().getBBox() : null,\n value: (value.node() !== null) ? value.node().getBBox() : null\n });\n });\n\n var singleLinePad = 5;\n var dims = labels[\"dimensions-\" + section];\n switch (sectionDisplayType) {\n case \"label-value1\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentValue-\" + section)\n .attr(\"dx\", function(d, i) { return dims[i].mainLabel.width + singleLinePad; });\n break;\n case \"label-value2\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentValue-\" + section)\n .attr(\"dy\", function(d, i) { return dims[i].mainLabel.height; });\n break;\n case \"label-percentage1\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentPercentage-\" + section)\n .attr(\"dx\", function(d, i) { return dims[i].mainLabel.width + singleLinePad; });\n break;\n case \"label-percentage2\":\n pie.svg.selectAll(\".\" + pie.cssPrefix + \"segmentPercentage-\" + section)\n .attr(\"dx\", function(d, i) { return (dims[i].mainLabel.width / 2) - (dims[i].percentage.width / 2); })\n .attr(\"dy\", function(d, i) { return dims[i].mainLabel.height; });\n break;\n }\n },\n\n computeLabelLinePositions: function(pie) {\n pie.lineCoordGroups = [];\n pie.__labels.outer\n .each(function(d, i) { return labels.computeLinePosition(pie, i); });\n },\n\n computeLinePosition: function(pie, i) {\n var angle = segments.getSegmentAngle(i, pie.options.data.content, pie.totalSize, { midpoint: true });\n var originCoords = math.rotate(pie.pieCenter.x, pie.pieCenter.y - pie.outerRadius, pie.pieCenter.x, pie.pieCenter.y, angle);\n var heightOffset = pie.outerLabelGroupData[i].h / 5; // TODO check\n var labelXMargin = 6; // the x-distance of the label from the end of the line [TODO configurable]\n\n var quarter = Math.floor(angle / 90);\n var midPoint = 4;\n var x2, y2, x3, y3;\n\n // this resolves an issue when the\n if (quarter === 2 && angle === 180) {\n quarter = 1;\n }\n\n switch (quarter) {\n case 0:\n x2 = pie.outerLabelGroupData[i].x - labelXMargin - ((pie.outerLabelGroupData[i].x - labelXMargin - originCoords.x) / 2);\n y2 = pie.outerLabelGroupData[i].y + ((originCoords.y - pie.outerLabelGroupData[i].y) / midPoint);\n x3 = pie.outerLabelGroupData[i].x - labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n case 1:\n x2 = originCoords.x + (pie.outerLabelGroupData[i].x - originCoords.x) / midPoint;\n y2 = originCoords.y + (pie.outerLabelGroupData[i].y - originCoords.y) / midPoint;\n x3 = pie.outerLabelGroupData[i].x - labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n case 2:\n var startOfLabelX = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n x2 = originCoords.x - (originCoords.x - startOfLabelX) / midPoint;\n y2 = originCoords.y + (pie.outerLabelGroupData[i].y - originCoords.y) / midPoint;\n x3 = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n case 3:\n var startOfLabel = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n x2 = startOfLabel + ((originCoords.x - startOfLabel) / midPoint);\n y2 = pie.outerLabelGroupData[i].y + (originCoords.y - pie.outerLabelGroupData[i].y) / midPoint;\n x3 = pie.outerLabelGroupData[i].x + pie.outerLabelGroupData[i].w + labelXMargin;\n y3 = pie.outerLabelGroupData[i].y - heightOffset;\n break;\n }\n\n /*\n * x1 / y1: the x/y coords of the start of the line, at the mid point of the segments arc on the pie circumference\n * x2 / y2: if \"curved\" line style is being used, this is the midpoint of the line. Other\n * x3 / y3: the end of the line; closest point to the label\n */\n if (pie.options.labels.lines.style === \"straight\") {\n pie.lineCoordGroups[i] = [\n { x: originCoords.x, y: originCoords.y },\n { x: x3, y: y3 }\n ];\n } else {\n pie.lineCoordGroups[i] = [\n { x: originCoords.x, y: originCoords.y },\n { x: x2, y: y2 },\n { x: x3, y: y3 }\n ];\n }\n },\n\n addLabelLines: function(pie) {\n var lineGroups = pie.svg.insert(\"g\", \".\" + pie.cssPrefix + \"pieChart\") // meaning, BEFORE .pieChart\n .attr(\"class\", pie.cssPrefix + \"lineGroups\")\n .style(\"opacity\", 1);\n\n var lineGroup = lineGroups.selectAll(\".\" + pie.cssPrefix + \"lineGroup\")\n .data(pie.lineCoordGroups)\n .enter()\n .append(\"g\")\n .attr(\"class\", pie.cssPrefix + \"lineGroup\");\n\n var lineFunction = d3.line()\n .curve(d3.curveBasis)\n .x(function(d) { return d.x; })\n .y(function(d) { return d.y; });\n\n lineGroup.append(\"path\")\n .attr(\"d\", lineFunction)\n .attr(\"stroke\", function(d, i) {\n return (pie.options.labels.lines.color === \"segment\") ? pie.options.colors[i] : pie.options.labels.lines.color;\n })\n .attr(\"stroke-width\", 1)\n .attr(\"fill\", \"none\")\n .style(\"opacity\", function(d, i) {\n var percentage = pie.options.labels.outer.hideWhenLessThanPercentage;\n var isHidden = (percentage !== null && d.percentage < percentage) || pie.options.data.content[i].label === \"\";\n return isHidden ? 0 : 1;\n });\n },\n\n positionLabelGroups: function(pie, section) {\n if (pie.options.labels[section].format === \"none\")\n return;\n\n pie.__labels[section]\n .style(\"opacity\", function(d, i) {\n var percentage = pie.options.labels[section].hideWhenLessThanPercentage;\n return (percentage !== null && d.percentage < percentage) ? 0 : 1;\n })\n .attr(\"transform\", function(d, i) {\n var x, y;\n if (section === \"outer\") {\n x = pie.outerLabelGroupData[i].x;\n y = pie.outerLabelGroupData[i].y;\n } else {\n var pieCenterCopy = extend(true, {}, pie.pieCenter);\n\n // now recompute the \"center\" based on the current _innerRadius\n if (pie.innerRadius > 0) {\n var angle = segments.getSegmentAngle(i, pie.options.data.content, pie.totalSize, { midpoint: true });\n var newCoords = math.translate(pie.pieCenter.x, pie.pieCenter.y, pie.innerRadius, angle);\n pieCenterCopy.x = newCoords.x;\n pieCenterCopy.y = newCoords.y;\n }\n\n var dims = helpers.getDimensions(pie.cssPrefix + \"labelGroup\" + i + \"-inner\");\n var xOffset = dims.w / 2;\n var yOffset = dims.h / 4; // confusing! Why 4? should be 2, but it doesn't look right\n\n x = pieCenterCopy.x + (pie.lineCoordGroups[i][0].x - pieCenterCopy.x) / 1.8;\n y = pieCenterCopy.y + (pie.lineCoordGroups[i][0].y - pieCenterCopy.y) / 1.8;\n\n x = x - xOffset;\n y = y + yOffset;\n }\n\n return \"translate(\" + x + \",\" + y + \")\";\n });\n },\n\n\n getIncludes: function(val) {\n var addMainLabel = false;\n var addValue = false;\n var addPercentage = false;\n\n switch (val) {\n case \"label\":\n addMainLabel = true;\n break;\n case \"value\":\n addValue = true;\n break;\n case \"percentage\":\n addPercentage = true;\n break;\n case \"label-value1\":\n case \"label-value2\":\n addMainLabel = true;\n addValue = true;\n break;\n case \"label-percentage1\":\n case \"label-percentage2\":\n addMainLabel = true;\n addPercentage = true;\n break;\n }\n return {\n mainLabel: addMainLabel,\n value: addValue,\n percentage: addPercentage\n };\n },\n\n\n /**\n * This does the heavy-lifting to compute the actual coordinates for the outer label groups. It does two things:\n * 1. Make a first pass and position them in the ideal positions, based on the pie sizes\n * 2. Do some basic collision avoidance.\n */\n computeOuterLabelCoords: function(pie) {\n\n // 1. figure out the ideal positions for the outer labels\n pie.__labels.outer\n .each(function(d, i) {\n return labels.getIdealOuterLabelPositions(pie, i);\n });\n\n // 2. now adjust those positions to try to accommodate conflicts\n labels.resolveOuterLabelCollisions(pie);\n },\n\n /**\n * This attempts to resolve label positioning collisions.\n */\n resolveOuterLabelCollisions: function(pie) {\n if (pie.options.labels.outer.format === \"none\") {\n return;\n }\n\n var size = pie.options.data.content.length;\n labels.checkConflict(pie, 0, \"clockwise\", size);\n labels.checkConflict(pie, size-1, \"anticlockwise\", size);\n },\n\n checkConflict: function(pie, currIndex, direction, size) {\n var i, curr;\n\n if (size <= 1) {\n return;\n }\n\n var currIndexHemisphere = pie.outerLabelGroupData[currIndex].hs;\n if (direction === \"clockwise\" && currIndexHemisphere !== \"right\") {\n return;\n }\n if (direction === \"anticlockwise\" && currIndexHemisphere !== \"left\") {\n return;\n }\n var nextIndex = (direction === \"clockwise\") ? currIndex+1 : currIndex-1;\n\n // this is the current label group being looked at. We KNOW it's positioned properly (the first item\n // is always correct)\n var currLabelGroup = pie.outerLabelGroupData[currIndex];\n\n // this one we don't know about. That's the one we're going to look at and move if necessary\n var examinedLabelGroup = pie.outerLabelGroupData[nextIndex];\n\n var info = {\n labelHeights: pie.outerLabelGroupData[0].h,\n center: pie.pieCenter,\n lineLength: (pie.outerRadius + pie.options.labels.outer.pieDistance),\n heightChange: pie.outerLabelGroupData[0].h + 1 // 1 = padding\n };\n\n // loop through *ALL* label groups examined so far to check for conflicts. This is because when they're\n // very tightly fitted, a later label group may still appear high up on the page\n if (direction === \"clockwise\") {\n i = 0;\n for (; i<=currIndex; i++) {\n curr = pie.outerLabelGroupData[i];\n\n // if there's a conflict with this label group, shift the label to be AFTER the last known\n // one that's been properly placed\n if (!labels.isLabelHidden(pie, i) && helpers.rectIntersect(curr, examinedLabelGroup)) {\n labels.adjustLabelPos(pie, nextIndex, currLabelGroup, info);\n break;\n }\n }\n } else {\n i = size - 1;\n for (; i >= currIndex; i--) {\n curr = pie.outerLabelGroupData[i];\n\n // if there's a conflict with this label group, shift the label to be AFTER the last known\n // one that's been properly placed\n if (!labels.isLabelHidden(pie, i) && helpers.rectIntersect(curr, examinedLabelGroup)) {\n labels.adjustLabelPos(pie, nextIndex, currLabelGroup, info);\n break;\n }\n }\n }\n labels.checkConflict(pie, nextIndex, direction, size);\n },\n\n isLabelHidden: function(pie, index) {\n var percentage = pie.options.labels.outer.hideWhenLessThanPercentage;\n return (percentage !== null && d.percentage < percentage) || pie.options.data.content[index].label === \"\";\n },\n\n // does a little math to shift a label into a new position based on the last properly placed one\n adjustLabelPos: function(pie, nextIndex, lastCorrectlyPositionedLabel, info) {\n var xDiff, yDiff, newXPos, newYPos;\n newYPos = lastCorrectlyPositionedLabel.y + info.heightChange;\n yDiff = info.center.y - newYPos;\n\n if (Math.abs(info.lineLength) > Math.abs(yDiff)) {\n xDiff = Math.sqrt((info.lineLength * info.lineLength) - (yDiff * yDiff));\n } else {\n xDiff = Math.sqrt((yDiff * yDiff) - (info.lineLength * info.lineLength));\n }\n\n if (lastCorrectlyPositionedLabel.hs === \"right\") {\n newXPos = info.center.x + xDiff;\n } else {\n newXPos = info.center.x - xDiff - pie.outerLabelGroupData[nextIndex].w;\n }\n\n pie.outerLabelGroupData[nextIndex].x = newXPos;\n pie.outerLabelGroupData[nextIndex].y = newYPos;\n },\n\n /**\n * @param i 0-N where N is the dataset size - 1.\n */\n getIdealOuterLabelPositions: function(pie, i) {\n var labelGroupNode = pie.svg.select(\"#\" + pie.cssPrefix + \"labelGroup\" + i + \"-outer\").node();\n if (!labelGroupNode) return;\n\n var labelGroupDims = labelGroupNode.getBBox();\n var angle = segments.getSegmentAngle(i, pie.options.data.content, pie.totalSize, { midpoint: true });\n\n var originalX = pie.pieCenter.x;\n var originalY = pie.pieCenter.y - (pie.outerRadius + pie.options.labels.outer.pieDistance);\n var newCoords = math.rotate(originalX, originalY, pie.pieCenter.x, pie.pieCenter.y, angle);\n\n // if the label is on the left half of the pie, adjust the values\n var hemisphere = \"right\"; // hemisphere\n if (angle > 180) {\n newCoords.x -= (labelGroupDims.width + 8);\n hemisphere = \"left\";\n } else {\n newCoords.x += 8;\n }\n\n pie.outerLabelGroupData[i] = {\n x: newCoords.x,\n y: newCoords.y,\n w: labelGroupDims.width,\n h: labelGroupDims.height,\n hs: hemisphere\n };\n }\n};\n\n //// --------- segments.js -----------\nvar segments = {\n\n effectMap: {\n \"none\": d3.easeLinear,\n \"bounce\": d3.easeBounce,\n \"linear\": d3.easeLinear,\n \"sin\": d3.easeSin,\n \"elastic\": d3.easeElastic,\n \"back\": d3.easeBack,\n \"quad\": d3.easeQuad,\n \"circle\": d3.easeCircle,\n \"exp\": d3.easeExp\n },\n\n /**\n * Creates the pie chart segments and displays them according to the desired load effect.\n * @private\n */\n create: function(pie) {\n var pieCenter = pie.pieCenter;\n var colors = pie.options.colors;\n var loadEffects = pie.options.effects.load;\n var segmentStroke = pie.options.misc.colors.segmentStroke;\n\n // we insert the pie chart BEFORE the title, to ensure the title overlaps the pie\n var pieChartElement = pie.svg.insert(\"g\", \"#\" + pie.cssPrefix + \"title\")\n .attr(\"transform\", function() { return math.getPieTranslateCenter(pieCenter); })\n .attr(\"class\", pie.cssPrefix + \"pieChart\");\n\n var arc = d3.arc()\n .innerRadius(pie.innerRadius)\n .outerRadius(pie.outerRadius)\n .startAngle(0)\n .endAngle(function(d) {\n return (d.value / pie.totalSize) * 2 * Math.PI;\n });\n\n var g = pieChartElement.selectAll(\".\" + pie.cssPrefix + \"arc\")\n .data(pie.options.data.content)\n .enter()\n .append(\"g\")\n .attr(\"class\", pie.cssPrefix + \"arc\");\n\n // if we're not fading in the pie, just set the load speed to 0\n //var loadSpeed = loadEffects.speed;\n //if (loadEffects.effect === \"none\") {\n //\tloadSpeed = 0;\n //}\n\n g.append(\"path\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"segment\" + i; })\n .attr(\"fill\", function(d, i) {\n var color = colors[i];\n if (pie.options.misc.gradient.enabled) {\n color = \"url(#\" + pie.cssPrefix + \"grad\" + i + \")\";\n }\n return color;\n })\n .style(\"stroke\", segmentStroke)\n .style(\"stroke-width\", 1)\n //.transition()\n //.ease(d3.easeCubicInOut)\n //.duration(loadSpeed)\n .attr(\"data-index\", function(d, i) { return i; })\n .attr(\"d\", arc);\n/*\n .attrTween(\"d\", function(b) {\n var i = d3.interpolate({ value: 0 }, b);\n return function(t) {\n var ret = pie.arc(i(t));\n console.log(ret);\n return ret;\n };\n });\n*/\n pie.svg.selectAll(\"g.\" + pie.cssPrefix + \"arc\")\n .attr(\"transform\",\n function(d, i) {\n var angle = 0;\n if (i > 0) {\n angle = segments.getSegmentAngle(i-1, pie.options.data.content, pie.totalSize);\n }\n return \"rotate(\" + angle + \")\";\n }\n );\n pie.arc = arc;\n },\n\n addGradients: function(pie) {\n var grads = pie.svg.append(\"defs\")\n .selectAll(\"radialGradient\")\n .data(pie.options.data.content)\n .enter().append(\"radialGradient\")\n .attr(\"gradientUnits\", \"userSpaceOnUse\")\n .attr(\"cx\", 0)\n .attr(\"cy\", 0)\n .attr(\"r\", \"120%\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"grad\" + i; });\n\n grads.append(\"stop\").attr(\"offset\", \"0%\").style(\"stop-color\", function(d, i) { return pie.options.colors[i]; });\n grads.append(\"stop\").attr(\"offset\", pie.options.misc.gradient.percentage + \"%\").style(\"stop-color\", pie.options.misc.gradient.color);\n },\n\n addSegmentEventHandlers: function(pie) {\n var arc = pie.svg.selectAll(\".\" + pie.cssPrefix + \"arc\");\n arc = arc.merge(pie.__labels.inner.merge(pie.__labels.outer));\n\n arc.on(\"click\", function() {\n var currentEl = d3.select(this);\n var segment;\n\n // mouseover works on both the segments AND the segment labels, hence the following\n if (currentEl.attr(\"class\") === pie.cssPrefix + \"arc\") {\n segment = currentEl.select(\"path\");\n } else {\n var index = currentEl.attr(\"data-index\");\n segment = d3.select(\"#\" + pie.cssPrefix + \"segment\" + index);\n }\n\n var isExpanded = segment.attr(\"class\") === pie.cssPrefix + \"expanded\";\n segments.onSegmentEvent(pie, pie.options.callbacks.onClickSegment, segment, isExpanded);\n if (pie.options.effects.pullOutSegmentOnClick.effect !== \"none\") {\n if (isExpanded) {\n segments.closeSegment(pie, segment.node());\n } else {\n segments.openSegment(pie, segment.node());\n }\n }\n });\n\n arc.on(\"mouseover\", function() {\n var currentEl = d3.select(this);\n var segment, index;\n\n if (currentEl.attr(\"class\") === pie.cssPrefix + \"arc\") {\n segment = currentEl.select(\"path\");\n } else {\n index = currentEl.attr(\"data-index\");\n segment = d3.select(\"#\" + pie.cssPrefix + \"segment\" + index);\n }\n\n if (pie.options.effects.highlightSegmentOnMouseover) {\n index = segment.attr(\"data-index\");\n var segColor = pie.options.colors[index];\n segment.style(\"fill\", helpers.getColorShade(segColor, pie.options.effects.highlightLuminosity));\n }\n\n if (pie.options.tooltips.enabled) {\n index = segment.attr(\"data-index\");\n tt.showTooltip(pie, index);\n }\n\n var isExpanded = segment.attr(\"class\") === pie.cssPrefix + \"expanded\";\n segments.onSegmentEvent(pie, pie.options.callbacks.onMouseoverSegment, segment, isExpanded);\n });\n\n arc.on(\"mousemove\", function() {\n tt.moveTooltip(pie);\n });\n\n arc.on(\"mouseout\", function() {\n var currentEl = d3.select(this);\n var segment, index;\n\n if (currentEl.attr(\"class\") === pie.cssPrefix + \"arc\") {\n segment = currentEl.select(\"path\");\n } else {\n index = currentEl.attr(\"data-index\");\n segment = d3.select(\"#\" + pie.cssPrefix + \"segment\" + index);\n }\n\n if (pie.options.effects.highlightSegmentOnMouseover) {\n index = segment.attr(\"data-index\");\n var color = pie.options.colors[index];\n if (pie.options.misc.gradient.enabled) {\n color = \"url(#\" + pie.cssPrefix + \"grad\" + index + \")\";\n }\n segment.style(\"fill\", color);\n }\n\n if (pie.options.tooltips.enabled) {\n index = segment.attr(\"data-index\");\n tt.hideTooltip(pie, index);\n }\n\n var isExpanded = segment.attr(\"class\") === pie.cssPrefix + \"expanded\";\n segments.onSegmentEvent(pie, pie.options.callbacks.onMouseoutSegment, segment, isExpanded);\n });\n },\n\n // helper function used to call the click, mouseover, mouseout segment callback functions\n onSegmentEvent: function(pie, func, segment, isExpanded) {\n if (!helpers.isFunction(func)) {\n return;\n }\n var index = parseInt(segment.attr(\"data-index\"), 10);\n func({\n segment: segment.node(),\n index: index,\n expanded: isExpanded,\n data: pie.options.data.content[index]\n });\n },\n\n openSegment: function(pie, segment) {\n if (pie.isOpeningSegment) {\n return;\n }\n pie.isOpeningSegment = true;\n\n segments.maybeCloseOpenSegment(pie);\n\n d3.select(segment)\n .transition()\n .ease(segments.effectMap[pie.options.effects.pullOutSegmentOnClick.effect])\n .duration(pie.options.effects.pullOutSegmentOnClick.speed)\n .attr(\"transform\", function(d, i) {\n var c = pie.arc.centroid(d),\n x = c[0],\n y = c[1],\n h = Math.sqrt(x*x + y*y),\n pullOutSize = parseInt(pie.options.effects.pullOutSegmentOnClick.size, 10);\n\n return \"translate(\" + ((x/h) * pullOutSize) + ',' + ((y/h) * pullOutSize) + \")\";\n })\n .on(\"end\", function(d, i) {\n pie.currentlyOpenSegment = segment;\n pie.isOpeningSegment = false;\n d3.select(segment).attr(\"class\", pie.cssPrefix + \"expanded\");\n });\n },\n\n maybeCloseOpenSegment: function(pie) {\n if (typeof pie !== 'undefined' && pie.svg.selectAll(\".\" + pie.cssPrefix + \"expanded\").size() > 0) {\n segments.closeSegment(pie, pie.svg.select(\".\" + pie.cssPrefix + \"expanded\").node());\n }\n },\n\n closeSegment: function(pie, segment) {\n d3.select(segment)\n .transition()\n .duration(400)\n .attr(\"transform\", \"translate(0,0)\")\n .on(\"end\", function(d, i) {\n d3.select(segment).attr(\"class\", \"\");\n pie.currentlyOpenSegment = null;\n });\n },\n\n getCentroid: function(el) {\n var bbox = el.getBBox();\n return {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n },\n\n /**\n * General helper function to return a segment's angle, in various different ways.\n * @param index\n * @param opts optional object for fine-tuning exactly what you want.\n */\n getSegmentAngle: function(index, data, totalSize, opts) {\n var options = extend({\n // if true, this returns the full angle from the origin. Otherwise it returns the single segment angle\n compounded: true,\n\n // optionally returns the midpoint of the angle instead of the full angle\n midpoint: false\n }, opts);\n\n var currValue = data[index].value;\n var fullValue;\n if (options.compounded) {\n fullValue = 0;\n\n // get all values up to and including the specified index\n for (var i=0; i<=index; i++) {\n fullValue += data[i].value;\n }\n }\n\n if (typeof fullValue === 'undefined') {\n fullValue = currValue;\n }\n\n // now convert the full value to an angle\n var angle = (fullValue / totalSize) * 360;\n\n // lastly, if we want the midpoint, factor that sucker in\n if (options.midpoint) {\n var currAngle = (currValue / totalSize) * 360;\n angle -= (currAngle / 2);\n }\n\n return angle;\n }\n\n};\n\n //// --------- text.js -----------\nvar text = {\n offscreenCoord: -10000,\n\n addTitle: function(pie) {\n pie.__title = pie.svg.selectAll(\".\" + pie.cssPrefix + \"title\")\n .data([pie.options.header.title])\n .enter()\n .append(\"text\")\n .text(function(d) { return d.text; })\n .attr(\"id\", pie.cssPrefix + \"title\")\n .attr(\"class\", pie.cssPrefix + \"title\")\n .attr(\"x\", text.offscreenCoord)\n .attr(\"y\", text.offscreenCoord)\n .attr(\"text-anchor\", function() {\n var location;\n if (pie.options.header.location === \"top-center\" || pie.options.header.location === \"pie-center\") {\n location = \"middle\";\n } else {\n location = \"left\";\n }\n return location;\n })\n .attr(\"fill\", function(d) { return d.color; })\n .style(\"font-size\", function(d) { return d.fontSize + \"px\"; })\n .style(\"font-weight\", function(d) { return d.fontWeight; })\n .style(\"font-family\", function(d) { return d.font; });\n },\n\n positionTitle: function(pie) {\n var textComponents = pie.textComponents;\n var headerLocation = pie.options.header.location;\n var canvasPadding = pie.options.misc.canvasPadding;\n var canvasWidth = pie.options.size.canvasWidth;\n var titleSubtitlePadding = pie.options.header.titleSubtitlePadding;\n\n var x;\n if (headerLocation === \"top-left\") {\n x = canvasPadding.left;\n } else {\n x = ((canvasWidth - canvasPadding.right) / 2) + canvasPadding.left;\n }\n\n // add whatever offset has been added by user\n x += pie.options.misc.pieCenterOffset.x;\n\n var y = canvasPadding.top + textComponents.title.h;\n\n if (headerLocation === \"pie-center\") {\n y = pie.pieCenter.y;\n\n // still not fully correct\n if (textComponents.subtitle.exists) {\n var totalTitleHeight = textComponents.title.h + titleSubtitlePadding + textComponents.subtitle.h;\n y = y - (totalTitleHeight / 2) + textComponents.title.h;\n } else {\n y += (textComponents.title.h / 4);\n }\n }\n\n pie.__title\n .attr(\"x\", x)\n .attr(\"y\", y);\n },\n\n addSubtitle: function(pie) {\n var headerLocation = pie.options.header.location;\n\n pie.__subtitle = pie.svg.selectAll(\".\" + pie.cssPrefix + \"subtitle\")\n .data([pie.options.header.subtitle])\n .enter()\n .append(\"text\")\n .text(function(d) { return d.text; })\n .attr(\"x\", text.offscreenCoord)\n .attr(\"y\", text.offscreenCoord)\n .attr(\"id\", pie.cssPrefix + \"subtitle\")\n .attr(\"class\", pie.cssPrefix + \"subtitle\")\n .attr(\"text-anchor\", function() {\n var location;\n if (headerLocation === \"top-center\" || headerLocation === \"pie-center\") {\n location = \"middle\";\n } else {\n location = \"left\";\n }\n return location;\n })\n .attr(\"fill\", function(d) { return d.color; })\n .style(\"font-size\", function(d) { return d.fontSize + \"px\"; })\n .style(\"font-weight\", function(d) { return d.fontWeight; })\n .style(\"font-family\", function(d) { return d.font; });\n },\n\n positionSubtitle: function(pie) {\n var canvasPadding = pie.options.misc.canvasPadding;\n var canvasWidth = pie.options.size.canvasWidth;\n\n var x;\n if (pie.options.header.location === \"top-left\") {\n x = canvasPadding.left;\n } else {\n x = ((canvasWidth - canvasPadding.right) / 2) + canvasPadding.left;\n }\n\n // add whatever offset has been added by user\n x += pie.options.misc.pieCenterOffset.x;\n\n var y = text.getHeaderHeight(pie);\n\n pie.__subtitle\n .attr(\"x\", x)\n .attr(\"y\", y);\n },\n\n addFooter: function(pie) {\n pie.__footer = pie.svg.selectAll(\".\" + pie.cssPrefix + \"footer\")\n .data([pie.options.footer])\n .enter()\n .append(\"text\")\n .text(function(d) { return d.text; })\n .attr(\"x\", text.offscreenCoord)\n .attr(\"y\", text.offscreenCoord)\n .attr(\"id\", pie.cssPrefix + \"footer\")\n .attr(\"class\", pie.cssPrefix + \"footer\")\n .attr(\"text-anchor\", function() {\n var location = \"left\";\n if (pie.options.footer.location === \"bottom-center\") {\n location = \"middle\";\n } else if (pie.options.footer.location === \"bottom-right\") {\n location = \"left\"; // on purpose. We have to change the x-coord to make it properly right-aligned\n }\n return location;\n })\n .attr(\"fill\", function(d) { return d.color; })\n .style(\"font-size\", function(d) { return d.fontSize + \"px\"; })\n .style(\"font-weight\", function(d) { return d.fontWeight; })\n .style(\"font-family\", function(d) { return d.font; });\n },\n\n positionFooter: function(pie) {\n var footerLocation = pie.options.footer.location;\n var footerWidth = pie.textComponents.footer.w;\n var canvasWidth = pie.options.size.canvasWidth;\n var canvasHeight = pie.options.size.canvasHeight;\n var canvasPadding = pie.options.misc.canvasPadding;\n\n var x;\n if (footerLocation === \"bottom-left\") {\n x = canvasPadding.left;\n } else if (footerLocation === \"bottom-right\") {\n x = canvasWidth - footerWidth - canvasPadding.right;\n } else {\n x = canvasWidth / 2; // TODO - shouldn't this also take into account padding?\n }\n\n pie.__footer\n .attr(\"x\", x)\n .attr(\"y\", canvasHeight - canvasPadding.bottom);\n },\n\n getHeaderHeight: function(pie) {\n var h;\n if (pie.textComponents.title.exists) {\n\n // if the subtitle isn't defined, it'll be set to 0\n var totalTitleHeight = pie.textComponents.title.h + pie.options.header.titleSubtitlePadding + pie.textComponents.subtitle.h;\n if (pie.options.header.location === \"pie-center\") {\n h = pie.pieCenter.y - (totalTitleHeight / 2) + totalTitleHeight;\n } else {\n h = totalTitleHeight + pie.options.misc.canvasPadding.top;\n }\n } else {\n if (pie.options.header.location === \"pie-center\") {\n var footerPlusPadding = pie.options.misc.canvasPadding.bottom + pie.textComponents.footer.h;\n h = ((pie.options.size.canvasHeight - footerPlusPadding) / 2) + pie.options.misc.canvasPadding.top + (pie.textComponents.subtitle.h / 2);\n } else {\n h = pie.options.misc.canvasPadding.top + pie.textComponents.subtitle.h;\n }\n }\n return h;\n }\n};\n\n //// --------- validate.js -----------\nvar tt = {\n addTooltips: function(pie) {\n\n // group the label groups (label, percentage, value) into a single element for simpler positioning\n var tooltips = pie.svg.insert(\"g\")\n .attr(\"class\", pie.cssPrefix + \"tooltips\");\n\n tooltips.selectAll(\".\" + pie.cssPrefix + \"tooltip\")\n .data(pie.options.data.content)\n .enter()\n .append(\"g\")\n .attr(\"class\", pie.cssPrefix + \"tooltip\")\n .attr(\"id\", function(d, i) { return pie.cssPrefix + \"tooltip\" + i; })\n .style(\"opacity\", 0)\n .append(\"rect\")\n .attr(\"rx\", pie.options.tooltips.styles.borderRadius)\n .attr(\"ry\", pie.options.tooltips.styles.borderRadius)\n .attr(\"x\", -pie.options.tooltips.styles.padding)\n .attr(\"opacity\", pie.options.tooltips.styles.backgroundOpacity)\n .style(\"fill\", pie.options.tooltips.styles.backgroundColor);\n\n tooltips.selectAll(\".\" + pie.cssPrefix + \"tooltip\")\n .data(pie.options.data.content)\n .append(\"text\")\n .attr(\"fill\", function(d) { return pie.options.tooltips.styles.color; })\n .style(\"font-size\", function(d) { return pie.options.tooltips.styles.fontSize; })\n .style(\"font-weight\", function(d) { return pie.options.tooltips.styles.fontWeight; })\n .style(\"font-family\", function(d) { return pie.options.tooltips.styles.font; })\n .text(function(d, i) {\n var caption = pie.options.tooltips.string;\n if (pie.options.tooltips.type === \"caption\") {\n caption = d.caption;\n }\n return tt.replacePlaceholders(pie, caption, i, {\n label: d.label,\n value: d.value,\n percentage: d.percentage\n });\n });\n\n tooltips.selectAll(\".\" + pie.cssPrefix + \"tooltip rect\")\n .attr(\"width\", function (d, i) {\n var dims = helpers.getDimensions(pie.cssPrefix + \"tooltip\" + i);\n return dims.w + (2 * pie.options.tooltips.styles.padding);\n })\n .attr(\"height\", function (d, i) {\n var dims = helpers.getDimensions(pie.cssPrefix + \"tooltip\" + i);\n return dims.h + (2 * pie.options.tooltips.styles.padding);\n })\n .attr(\"y\", function (d, i) {\n var dims = helpers.getDimensions(pie.cssPrefix + \"tooltip\" + i);\n return -(dims.h / 2) + 1;\n });\n },\n\n showTooltip: function(pie, index) {\n var fadeInSpeed = pie.options.tooltips.styles.fadeInSpeed;\n if (tt.currentTooltip === index) {\n fadeInSpeed = 1;\n }\n\n tt.currentTooltip = index;\n d3.select(\"#\" + pie.cssPrefix + \"tooltip\" + index)\n .transition()\n .duration(fadeInSpeed)\n .style(\"opacity\", function() { return 1; });\n\n tt.moveTooltip(pie);\n },\n\n moveTooltip: function(pie) {\n d3.selectAll(\"#\" + pie.cssPrefix + \"tooltip\" + tt.currentTooltip)\n .attr(\"transform\", function(d) {\n var mouseCoords = d3.mouse(this.parentNode);\n var x = mouseCoords[0] + pie.options.tooltips.styles.padding + 2;\n var y = mouseCoords[1] - (2 * pie.options.tooltips.styles.padding) - 2;\n return \"translate(\" + x + \",\" + y + \")\";\n });\n },\n\n hideTooltip: function(pie, index) {\n d3.select(\"#\" + pie.cssPrefix + \"tooltip\" + index)\n .style(\"opacity\", function() { return 0; });\n\n // move the tooltip offscreen. This ensures that when the user next mouseovers the segment the hidden\n // element won't interfere\n d3.select(\"#\" + pie.cssPrefix + \"tooltip\" + tt.currentTooltip)\n .attr(\"transform\", function(d, i) {\n // klutzy, but it accounts for tooltip padding which could push it onscreen\n var x = pie.options.size.canvasWidth + 1000;\n var y = pie.options.size.canvasHeight + 1000;\n return \"translate(\" + x + \",\" + y + \")\";\n });\n },\n\n replacePlaceholders: function(pie, str, index, replacements) {\n\n // if the user has defined a placeholderParser function, call it before doing the replacements\n if (helpers.isFunction(pie.options.tooltips.placeholderParser)) {\n pie.options.tooltips.placeholderParser(index, replacements);\n }\n\n var replacer = function() {\n return function(match) {\n var placeholder = arguments[1];\n if (replacements.hasOwnProperty(placeholder)) {\n return replacements[arguments[1]];\n } else {\n return arguments[0];\n }\n };\n };\n return str.replace(/\\{(\\w+)\\}/g, replacer(replacements));\n }\n};\n\n\n // --------------------------------------------------------------------------------------------\n\n // our constructor\n var d3pie = function(element, options) {\n\n // element can be an ID or DOM element\n this.element = element;\n if (typeof element === \"string\") {\n var el = element.replace(/^#/, \"\"); // replace any jQuery-like ID hash char\n this.element = document.getElementById(el);\n }\n\n var opts = {};\n extend(true, opts, defaultSettings, options);\n this.options = opts;\n\n // if the user specified a custom CSS element prefix (ID, class), use it\n if (this.options.misc.cssPrefix !== null) {\n this.cssPrefix = this.options.misc.cssPrefix;\n } else {\n this.cssPrefix = \"p\" + _uniqueIDCounter + \"_\";\n _uniqueIDCounter++;\n }\n\n\n // now run some validation on the user-defined info\n if (!validate.initialCheck(this)) {\n return;\n }\n\n // add a data-role to the DOM node to let anyone know that it contains a d3pie instance, and the d3pie version\n d3.select(this.element).attr(_scriptName, _version);\n\n // things that are done once\n _setupData.call(this);\n _init.call(this);\n };\n\n d3pie.prototype.recreate = function() {\n // now run some validation on the user-defined info\n if (!validate.initialCheck(this)) {\n return;\n }\n\n _setupData.call(this);\n _init.call(this);\n };\n\n d3pie.prototype.redraw = function() {\n this.element.innerHTML = \"\";\n _init.call(this);\n };\n\n d3pie.prototype.destroy = function() {\n this.element.innerHTML = \"\"; // clear out the SVG\n d3.select(this.element).attr(_scriptName, null); // remove the data attr\n };\n\n /**\n * Returns all pertinent info about the current open info. Returns null if nothing's open, or if one is, an object of\n * the following form:\n * \t{\n * \t element: DOM NODE,\n * \t index: N,\n * \t data: {}\n * \t}\n */\n d3pie.prototype.getOpenSegment = function() {\n var segment = this.currentlyOpenSegment;\n if (segment !== null && typeof segment !== \"undefined\") {\n var index = parseInt(d3.select(segment).attr(\"data-index\"), 10);\n return {\n element: segment,\n index: index,\n data: this.options.data.content[index]\n };\n } else {\n return null;\n }\n };\n\n d3pie.prototype.openSegment = function(index) {\n index = parseInt(index, 10);\n if (index < 0 || index > this.options.data.content.length-1) {\n return;\n }\n segments.openSegment(this, d3.select(\"#\" + this.cssPrefix + \"segment\" + index).node());\n };\n\n d3pie.prototype.closeSegment = function() {\n segments.maybeCloseOpenSegment(this);\n };\n\n // this let's the user dynamically update aspects of the pie chart without causing a complete redraw. It\n // intelligently re-renders only the part of the pie that the user specifies. Some things cause a repaint, others\n // just redraw the single element\n d3pie.prototype.updateProp = function(propKey, value) {\n switch (propKey) {\n case \"header.title.text\":\n var oldVal = helpers.processObj(this.options, propKey);\n helpers.processObj(this.options, propKey, value);\n d3.select(\"#\" + this.cssPrefix + \"title\").html(value);\n if ((oldVal === \"\" && value !== \"\") || (oldVal !== \"\" && value === \"\")) {\n this.redraw();\n }\n break;\n\n case \"header.subtitle.text\":\n var oldValue = helpers.processObj(this.options, propKey);\n helpers.processObj(this.options, propKey, value);\n d3.select(\"#\" + this.cssPrefix + \"subtitle\").html(value);\n if ((oldValue === \"\" && value !== \"\") || (oldValue !== \"\" && value === \"\")) {\n this.redraw();\n }\n break;\n\n case \"callbacks.onload\":\n case \"callbacks.onMouseoverSegment\":\n case \"callbacks.onMouseoutSegment\":\n case \"callbacks.onClickSegment\":\n case \"effects.pullOutSegmentOnClick.effect\":\n case \"effects.pullOutSegmentOnClick.speed\":\n case \"effects.pullOutSegmentOnClick.size\":\n case \"effects.highlightSegmentOnMouseover\":\n case \"effects.highlightLuminosity\":\n helpers.processObj(this.options, propKey, value);\n break;\n\n // everything else, attempt to update it & do a repaint\n default:\n helpers.processObj(this.options, propKey, value);\n\n this.destroy();\n this.recreate();\n break;\n }\n };\n\n\n // ------------------------------------------------------------------------------------------------\n\n var _setupData = function () {\n this.options.data.content = math.sortPieData(this);\n if (this.options.data.smallSegmentGrouping.enabled) {\n this.options.data.content = helpers.applySmallSegmentGrouping(this.options.data.content, this.options.data.smallSegmentGrouping);\n }\n\n\n this.options.colors = helpers.initSegmentColors(this);\n this.totalSize = math.getTotalPieSize(this.options.data.content);\n\n var dp = this.options.labels.percentage.decimalPlaces;\n\n // add in percentage data to content\n for (var i=0; i<this.options.data.content.length; i++) {\n this.options.data.content[i].percentage = _getPercentage(this.options.data.content[i].value, this.totalSize, dp);\n }\n\n // adjust the final item to ensure the percentage always adds up to precisely 100%. This is necessary\n var totalPercentage = 0;\n for (var j=0; j<this.options.data.content.length; j++) {\n if (j === this.options.data.content.length - 1) {\n this.options.data.content[j].percentage = (100 - totalPercentage).toFixed(dp);\n }\n totalPercentage += parseFloat(this.options.data.content[j].percentage);\n }\n };\n\n var _init = function() {\n\n // prep-work\n this.svg = helpers.addSVGSpace(this);\n\n // store info about the main text components as part of the d3pie object instance\n this.textComponents = {\n headerHeight: 0,\n title: {\n exists: this.options.header.title.text !== \"\",\n h: 0,\n w: 0\n },\n subtitle: {\n exists: this.options.header.subtitle.text !== \"\",\n h: 0,\n w: 0\n },\n footer: {\n exists: this.options.footer.text !== \"\",\n h: 0,\n w: 0\n }\n };\n\n this.outerLabelGroupData = [];\n\n // add the key text components offscreen (title, subtitle, footer). We need to know their widths/heights for later computation\n if (this.textComponents.title.exists) text.addTitle(this);\n if (this.textComponents.subtitle.exists) text.addSubtitle(this);\n text.addFooter(this);\n\n // console.log(this);\n\n // the footer never moves. Put it in place now\n var self = this;\n text.positionFooter(self);\n var d3 = helpers.getDimensions(self.__footer.node());\n self.textComponents.footer.h = d3.h;\n self.textComponents.footer.w = d3.w;\n\n if (self.textComponents.title.exists) {\n var d1 = helpers.getDimensions(self.__title.node());\n self.textComponents.title.h = d1.h;\n self.textComponents.title.w = d1.w;\n }\n\n if (self.textComponents.subtitle.exists) {\n var d2 = helpers.getDimensions(self.__subtitle.node());\n self.textComponents.subtitle.h = d2.h;\n self.textComponents.subtitle.w = d2.w;\n }\n\n // now compute the full header height\n if (self.textComponents.title.exists || self.textComponents.subtitle.exists) {\n var headerHeight = 0;\n if (self.textComponents.title.exists) {\n headerHeight += self.textComponents.title.h;\n if (self.textComponents.subtitle.exists) {\n headerHeight += self.options.header.titleSubtitlePadding;\n }\n }\n if (self.textComponents.subtitle.exists) {\n headerHeight += self.textComponents.subtitle.h;\n }\n self.textComponents.headerHeight = headerHeight;\n }\n\n // at this point, all main text component dimensions have been calculated\n math.computePieRadius(self);\n\n // this value is used all over the place for placing things and calculating locations. We figure it out ONCE\n // and store it as part of the object\n math.calculatePieCenter(self);\n\n // position the title and subtitle\n text.positionTitle(self);\n text.positionSubtitle(self);\n\n // now create the pie chart segments, and gradients if the user desired\n if (self.options.misc.gradient.enabled) {\n segments.addGradients(self);\n }\n segments.create(self); // also creates this.arc\n\n self.__labels = {};\n labels.add(self, \"inner\", self.options.labels.inner.format);\n labels.add(self, \"outer\", self.options.labels.outer.format);\n\n // position the label elements relatively within their individual group (label, percentage, value)\n labels.positionLabelElements(self, \"inner\", self.options.labels.inner.format);\n labels.positionLabelElements(self, \"outer\", self.options.labels.outer.format);\n labels.computeOuterLabelCoords(self);\n\n // this is (and should be) dumb. It just places the outer groups at their calculated, collision-free positions\n labels.positionLabelGroups(self, \"outer\");\n\n // we use the label line positions for many other calculations, so ALWAYS compute them\n labels.computeLabelLinePositions(self);\n\n // only add them if they're actually enabled\n if (self.options.labels.lines.enabled && self.options.labels.outer.format !== \"none\") {\n labels.addLabelLines(self);\n }\n\n labels.positionLabelGroups(self, \"inner\");\n\n if (helpers.isFunction(self.options.callbacks.onload)) {\n try {\n self.options.callbacks.onload();\n } catch (e) { }\n }\n\n // add and position the tooltips\n if (self.options.tooltips.enabled) {\n tt.addTooltips(self);\n }\n\n segments.addSegmentEventHandlers(self);\n };\n\n var _getPercentage = function(value, total, decimalPlaces) {\n var relativeAmount = value / total;\n if (decimalPlaces <= 0) {\n return Math.round(relativeAmount * 100);\n } else {\n return (relativeAmount * 100).toFixed(decimalPlaces);\n }\n };\n\n return d3pie;\n}));\n","import { equals } from \"ramda\"\n\n// we use numbers to specify time. it can be either a timestamp (ms), or a relative value in seconds\n// which is always 0 or less (0 is now, -300 is -5 minutes)\n\nexport const isTimestamp = (x: number) => x > 0\n\nexport const NETDATA_REGISTRY_SERVER = \"https://registry.my-netdata.io\"\n\nexport const MS_IN_SECOND = 1000\nexport const NODE_VIEW_DYGRAPH_TITLE_HEIGHT = 30\nexport const DEFAULT_DASHBOARD_DURATION = 5 * 60\n\nexport const getIframeSrc = (cloudBaseURL: string, path: string) => `${cloudBaseURL}/sso/v2/${path}`\nexport const utmUrlSuffix = \"&utm_source=agent&utm_medium=web\"\n\nexport const getInitialAfterFromWindow = () => {\n const div = document.getElementById(\"charts_div\")\n if (!div) {\n // eslint-disable-next-line no-console\n console.error(\"Couldn't find '.charts_div' element to calculate width\")\n return -900\n }\n // based on https://github.com/netdata/dashboard/blob/7a7b538b00f1c5a4e1550f69cb5333212bb68f95/src/main.js#L1753\n // eslint-disable-next-line max-len\n // var duration = Math.round(($(div).width() * pcent_width / 100 * data.update_every / 3) / 60) * 60;\n return -Math.round((div.getBoundingClientRect().width / 3) / 60) * 60\n}\n\nexport const SPACE_PANEL_STATE = \"space-panel-state\"\n\nexport const useNewKeysOnlyIfDifferent = <T extends {}>(\n keys: (keyof T)[], obj1: T | null, obj2: T,\n): T => {\n if (!obj1) {\n return obj2\n }\n return keys.reduce<T>((acc, key) => ({\n ...acc,\n [key]: equals(obj1[key], obj2![key]) ? obj1[key] : obj2[key],\n }), obj2)\n}\n","export * from \"./types\"\n\nexport { default as CloudConnectionStatus } from \"./cloud-connection-status\"\n","import {\n concat, cond, equals, identity, last, pipe, T,\n} from \"ramda\"\n\nimport { isDevelopmentEnv, isMainJs, isTestingEnv } from \"utils/env\"\n\n\n// this part needs to be static and should run immediately because otherwise document.currentScript\n// will be null\nconst currentScript = isTestingEnv\n ? { src: \"http://localhost:3000/some-script.js\" } // test env doesnt have document.currentScript\n : document.currentScript\n\nconst getScriptSource = () => {\n // logic based on old dashboard\n\n // http://stackoverflow.com/questions/984510/what-is-my-script-src-url\n // http://stackoverflow.com/questions/6941533/get-protocol-domain-and-port-from-url\n const script = cond([\n [Boolean, identity],\n // \"last\" typings don't work well with HTMLScriptElement\n // if document.currentScript is not available\n [T, () => last(document.getElementsByTagName(\"script\") as unknown as [HTMLScriptElement])],\n ])(currentScript)\n\n return script.src\n}\n\nexport const getPathFromScriptSource = (source: string) => {\n // match strings not containing slash, ending with `.js`, with optional suffix started by `?`\n const jsFilenameRegex = \"[^\\\\/]*\\\\.js(\\\\/?.*)?$\"\n const staticJsPath = \"/static/js\"\n return source.replace(new RegExp(jsFilenameRegex), \"\")\n .replace(staticJsPath, \"\")\n}\n\nconst getDefaultServer = () => {\n if (isDevelopmentEnv) {\n return \"http://localhost:19999\"\n }\n\n // Agent Dashboard does not need sophisticated server-detection, which is causing problems\n // when navigating through streamed nodes. Let's overwrite that setting\n if (isMainJs) {\n const pathname = window.location.pathname\n .replace(\"index.html\", \"\")\n // todo consider .replace(/[^\\/]*\\.html/, \"\") (every .html file in the url)\n .replace(\"default.html\", \"\") // for netdata demo servers\n return window.location.origin + pathname\n }\n\n const source = getScriptSource()\n return getPathFromScriptSource(source)\n}\n\n// append \"/\" at the end, if it's not already there\nexport const alwaysEndWithSlash = cond([\n [pipe(last, equals(\"/\")), identity],\n [T, (x: string) => concat(x, \"/\")], // R.__ typings don't work well\n])\n\nexport const serverDefault: string = alwaysEndWithSlash(\n window.netdataServer || getDefaultServer(),\n)\n\nexport const serverStatic: string = isDevelopmentEnv\n ? \"/\" // for localhost:3000/css/...\n : alwaysEndWithSlash(getDefaultServer()) // by default, load from netdata server\n","import { prop } from \"ramda\"\nimport { createSelector } from \"reselect\"\n\nimport { AppStateT } from \"store/app-state\"\nimport { selectChartMetadataFromChartsCall } from \"domains/global/selectors\"\n\nimport { ChartState } from \"./chart-types\"\nimport { initialSingleState } from \"./reducer\"\nimport { storeKey } from \"./constants\"\n\nexport const selectChartsState = (state: AppStateT) => state[storeKey]\nexport const selectSingleChartState = createSelector(\n selectChartsState,\n (_: unknown, { id }: { chartId?: string, id: string }) => id,\n (chartsState, id) => chartsState[id] || initialSingleState,\n)\n\nexport const selectChartData = createSelector(\n selectSingleChartState,\n (chartState) => chartState.chartData,\n)\n\nconst selectChartMetadataFromExplicitCall = createSelector(\n selectSingleChartState, prop(\"chartMetadata\"),\n)\n// dashboard.js normally fetches metadata for every individual charts, but we can prevent it\n// if metadata for ALL charts will be present in state.global (from single call)\nconst selectChartMetadata = createSelector(\n selectChartMetadataFromChartsCall,\n selectChartMetadataFromExplicitCall,\n (metadataFromAll, metadataFromSingleCall) => metadataFromAll || metadataFromSingleCall,\n)\nconst selectIsFetchingDetails = createSelector(selectSingleChartState, prop(\"isFetchingDetails\"))\n\nexport const makeSelectChartMetadataRequest = () => createSelector(\n selectChartMetadata,\n selectIsFetchingDetails,\n (chartMetadata, isFetchingDetails) => ({ chartMetadata, isFetchingDetails }),\n)\n\nexport const selectChartViewRange = createSelector(\n selectSingleChartState,\n (chartState) => chartState.viewRange,\n)\n\nexport const selectChartIsFetchingData = createSelector(\n selectSingleChartState,\n (chartState) => chartState.isFetchingData,\n)\n\nexport const selectChartFetchDataParams = createSelector(\n selectSingleChartState,\n (chartState) => chartState.fetchDataParams,\n)\n\nexport const selectResizeHeight = createSelector(\n selectSingleChartState,\n (chartState) => chartState.resizeHeight,\n)\n\nexport const selectChartPanAndZoom = createSelector(selectSingleChartState, prop(\"chartPanAndZoom\"))\n\n// count the nr of \"success\" or \"failure\" charts\nconst hasCompletedFetching = (chartState: ChartState) => chartState.isFetchDataFailure\n || Boolean(chartState.chartData) || chartState.isFetchDetailsFailure\n\nexport const selectChartsAreFetching = createSelector(selectChartsState, chartsState =>\n Object.values(chartsState).some(({ isFetchingData }) => isFetchingData)\n)\n\nexport const selectAmountOfFetchedCharts = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .reduce((acc, chartState) => acc + (hasCompletedFetching(chartState) ? 1 : 0), 0),\n)\n\nexport const selectAmountOfCharts = createSelector(\n selectChartsState,\n (chartsState) => Object.keys(chartsState).length,\n)\n\nexport const selectNameOfAnyFetchingChart = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .find((chartState) => chartState.isFetchingData)?.chartId,\n)\n\nexport const selectAmountOfSnapshotsFetched = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .reduce((acc, chartState) => acc + (chartState.snapshotData ? 1 : 0), 0),\n)\n\nexport const selectAmountOfSnapshotsFailed = createSelector(\n selectChartsState,\n (chartsState) => Object.values(chartsState)\n .reduce((acc, chartState) => acc + (chartState.snapshotDataIsError ? 1 : 0), 0),\n)\n","import { useMemo } from \"react\"\nimport moment from \"moment\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectTimezoneSetting, selectUTCOffsetSetting } from \"domains/global/selectors\"\n\nconst zeropad = x => {\n if (x > -10 && x < 10) {\n return `0${x.toString()}`\n }\n return x.toString()\n}\n\nexport const isSupportingDateTimeFormat = !!(Intl && Intl.DateTimeFormat && navigator.language)\n\nconst narrowToDate = d => (typeof d === \"number\" ? new Date(d) : d)\n// these are the old netdata functions\n// we fallback to these, if the new ones fail\nexport const localeDateStringNative = d => narrowToDate(d).toLocaleDateString()\nexport const localeTimeStringNative = d => narrowToDate(d).toLocaleTimeString()\nexport const xAxisTimeStringNative = d => {\n const date = narrowToDate(d)\n return `${zeropad(date.getHours())}:${zeropad(date.getMinutes())}:${zeropad(date.getSeconds())}`\n}\n\nexport const isProperTimezone = timeZone => {\n try {\n Intl.DateTimeFormat(navigator.language, {\n localeMatcher: \"best fit\",\n formatMatcher: \"best fit\",\n weekday: \"short\",\n year: \"numeric\",\n month: \"short\",\n day: \"2-digit\",\n timeZone,\n })\n } catch (e) {\n return false\n }\n return true\n}\n\nexport const getDateWithOffset = (date, offset) => moment(date).utcOffset(offset)\n\nconst getOptions = ({ long, isTime, secs, timezone }) => ({\n hourCycle: \"h23\",\n ...(isTime\n ? {}\n : long\n ? { weekday: \"short\", year: \"numeric\", month: \"short\", day: \"2-digit\" }\n : { dateStyle: \"short\" }),\n ...(isTime && {\n timeStyle: secs ? \"medium\" : \"short\",\n }),\n timeZone: timezone,\n})\n\nconst dateFormat = (date, { locale, ...options }) =>\n new Intl.DateTimeFormat(locale ?? navigator.language, getOptions(options)).format(date)\n\nconst getTimezone = timezone => (timezone !== \"\" && timezone !== \"default\" ? timezone : undefined)\n\nexport const useDateTime = () => {\n const timezone = useSelector(selectTimezoneSetting)\n const utcOffset = useSelector(selectUTCOffsetSetting)\n\n const localeDateString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? (date, options) =>\n dateFormat(date, { long: true, timezone: getTimezone(timezone), ...options })\n : localeDateStringNative\n }, [timezone])\n\n const localeTimeString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? (date, options) =>\n dateFormat(date, {\n secs: true,\n isTime: true,\n timezone: getTimezone(timezone),\n ...options,\n })\n : localeTimeStringNative\n }, [timezone])\n\n const xAxisTimeString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? date => dateFormat(date, { secs: true, isTime: true, timezone: getTimezone(timezone) })\n : xAxisTimeStringNative\n }, [timezone])\n\n const xAxisDateString = useMemo(() => {\n return isSupportingDateTimeFormat\n ? date => dateFormat(date, { long: true, timezone: getTimezone(timezone) })\n : xAxisTimeStringNative\n }, [timezone])\n\n return {\n localeDateString,\n localeTimeString,\n xAxisDateString,\n xAxisTimeString,\n utcOffset,\n }\n}\n","import { createAction } from \"redux-act\"\nimport { ChartsMetadata } from \"domains/global/types\"\n\nimport { storeKey } from \"./constants\"\n\nexport interface startSnapshotModeAction {\n charts: ChartsMetadata\n dataPoints: number\n}\nexport const startSnapshotModeAction = createAction<startSnapshotModeAction>(\n `${storeKey}/isSnapshotModeAction`,\n)\n\nexport const stopSnapshotModeAction = createAction(`${storeKey}/stopSnapshotModeAction`)\n\nexport interface ShowSignInModalAction { signInLinkHref: string }\nexport const showSignInModalAction = createAction<ShowSignInModalAction>(\n `${storeKey}/showSignInModal`,\n)\n\nexport const explicitlySignInAction = createAction(`${storeKey}/explicitlySignIn`)\n\nexport interface IsSignedInAction { isSignedIn: boolean }\nexport const isSignedInAction = createAction<IsSignedInAction>(`${storeKey}/isSignedInAction`)\n\nexport interface SetOfflineAction { offline: boolean }\nexport const setOfflineAction = createAction<SetOfflineAction>(`${storeKey}/setOfflineAction`)\n","export const storeKey = \"chart\"\n\nexport const fallbackUpdateTimeInterval = 2000\n\n// corresponds to force_update_at in old dashboard\n// throttle time between use globalPanAndZoom change actions - and requests sent to server\nexport const panAndZoomDelay = 300\n","export const seconds4human = (\n totalSeconds: number | string, overrideOptions?: {[key: string]: string},\n) => {\n const defaultOptions: {[key: string]: string} = {\n now: \"now\",\n space: \" \",\n negative_suffix: \"ago\",\n day: \"day\",\n days: \"days\",\n hour: \"hour\",\n hours: \"hours\",\n minute: \"min\",\n minutes: \"mins\",\n second: \"sec\",\n seconds: \"secs\",\n and: \"and\",\n }\n\n const options = typeof overrideOptions === \"object\"\n ? { ...defaultOptions, ...overrideOptions }\n : defaultOptions\n\n let seconds = typeof totalSeconds === \"string\"\n ? parseInt(totalSeconds, 10)\n : totalSeconds\n\n if (seconds === 0) {\n return options.now\n }\n\n let suffix = \"\"\n if (seconds < 0) {\n seconds = -seconds\n if (options.negative_suffix !== \"\") {\n suffix = options.space + options.negative_suffix\n }\n }\n\n const days = Math.floor(seconds / 86400)\n seconds -= (days * 86400)\n\n const hours = Math.floor(seconds / 3600)\n seconds -= (hours * 3600)\n\n const minutes = Math.floor(seconds / 60)\n seconds -= (minutes * 60)\n\n const strings = []\n\n if (days > 1) {\n strings.push(days.toString() + options.space + options.days)\n } else if (days === 1) {\n strings.push(days.toString() + options.space + options.day)\n }\n\n if (hours > 1) {\n strings.push(hours.toString() + options.space + options.hours)\n } else if (hours === 1) {\n strings.push(hours.toString() + options.space + options.hour)\n }\n\n if (minutes > 1) {\n strings.push(minutes.toString() + options.space + options.minutes)\n } else if (minutes === 1) {\n strings.push(minutes.toString() + options.space + options.minute)\n }\n\n if (seconds > 1) {\n strings.push(Math.floor(seconds).toString() + options.space + options.seconds)\n } else if (seconds === 1) {\n strings.push(Math.floor(seconds).toString() + options.space + options.second)\n }\n\n if (strings.length === 1) {\n return strings.pop() + suffix\n }\n\n const last = strings.pop()\n return `${strings.join(\", \")} ${options.and} ${last}${suffix}`\n}\n","import { createReducer } from \"redux-act\"\n\nimport { ChartsMetadata } from \"domains/global/types\"\n\nimport { startSnapshotModeAction, stopSnapshotModeAction, isSignedInAction, setOfflineAction } from \"./actions\"\n\nexport type StateT = {\n isSnapshotMode: boolean\n snapshotCharts: ChartsMetadata | null\n snapshotDataPoints: number | null\n isSignedIn: boolean\n offline: boolean\n}\n\nexport const initialState: StateT = {\n isSnapshotMode: false,\n snapshotCharts: null,\n snapshotDataPoints: null,\n isSignedIn: false,\n offline: false\n}\n\nexport const dashboardReducer = createReducer<StateT>({}, initialState)\n\ndashboardReducer.on(startSnapshotModeAction, (state, { charts, dataPoints }) => ({\n ...state,\n snapshotCharts: charts, // todo integrate with /charts result\n snapshotDataPoints: dataPoints,\n isSnapshotMode: true,\n}))\n\ndashboardReducer.on(stopSnapshotModeAction, (state) => ({\n ...state,\n isSnapshotMode: initialState.isSnapshotMode,\n snapshotCharts: initialState.snapshotCharts,\n snapshotDataPoints: initialState.snapshotDataPoints,\n}))\n\ndashboardReducer.on(isSignedInAction, (state, { isSignedIn }) => ({\n ...state,\n isSignedIn\n}))\n\ndashboardReducer.on(setOfflineAction, (state, { offline }) => ({\n ...state,\n offline\n}))\n","import { combineReducers } from \"redux\"\n\nimport { globalReducer } from \"domains/global/reducer\"\nimport { storeKey as globalKey } from \"domains/global/constants\"\n\nimport { chartReducer } from \"domains/chart/reducer\"\nimport { storeKey as chartKey } from \"domains/chart/constants\"\n\nimport { dashboardReducer } from \"domains/dashboard/reducer\"\nimport { storeKey as dashboardKey } from \"domains/dashboard/constants\"\n\nexport default combineReducers({\n [globalKey]: globalReducer,\n [chartKey]: chartReducer,\n\n // todo lazy-load and inject those reducers, when they are not needed (dashboard.js, cloud)\n [dashboardKey]: dashboardReducer,\n})\n","import axios from \"axios\"\n\nexport const axiosInstance = axios.create({\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n withCredentials: true,\n})\n","import axios from \"axios\"\n\nexport const axiosInstance = axios.create({\n // timeout: 30 * 1000, // todo\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n withCredentials: true,\n})\n","import {\n Subject, from, empty,\n} from \"rxjs\"\nimport {\n mergeMap, tap, catchError, startWith, switchMap,\n} from \"rxjs/operators\"\nimport { CancelTokenSource, Method } from \"axios\"\n\nimport { UnknownStringKeyT } from \"types/common\"\n\nimport { axiosInstance } from \"./axios-instance\"\n\nexport const CHART_UNMOUNTED = \"Chart scrolled out of view\"\n\ninterface FetchInputEvent {\n url: string\n method?: Method\n params?: UnknownStringKeyT\n data?: UnknownStringKeyT\n onErrorCallback: (error: Error) => void\n onSuccessCallback: (data: { [key: string]: unknown }) => void\n cancelTokenSource?: CancelTokenSource\n}\n\nconst METRICS_TIMEOUT = 15_000\n\nexport const getFetchStream = (concurrentCallsLimit: number) => {\n const fetch$ = new Subject<FetchInputEvent>()\n const resetFetch$ = new Subject()\n\n const handler = mergeMap(({\n url, method = \"GET\", params = {}, data, onErrorCallback, onSuccessCallback, cancelTokenSource,\n }: FetchInputEvent) => (\n from(axiosInstance.request({\n url,\n method,\n params,\n data,\n timeout: METRICS_TIMEOUT,\n cancelToken: cancelTokenSource?.token,\n })).pipe(\n tap(({ data: responseData }) => { onSuccessCallback(responseData) }),\n catchError((error: Error) => {\n // todo implement error handling to support NETDATA.options.current.retries_on_data_failures\n if (error?.message !== CHART_UNMOUNTED) {\n console.warn(\"fetch error\", url) // eslint-disable-line no-console\n }\n onErrorCallback(error)\n return empty()\n }),\n )\n ), concurrentCallsLimit)\n\n const output = resetFetch$.pipe(\n startWith(null),\n switchMap(() => fetch$.pipe(handler)),\n )\n\n output.subscribe()\n return [fetch$, resetFetch$]\n}\n","import { tail, sum, reverse } from \"ramda\"\nimport { ChartData, DygraphData } from \"domains/chart/chart-types\"\n\n/*\nwhen requesting for bigger time interval than available history in the agent,\nwe get only the available range. Dashboard was first designed to not allow zooming-out too much.\nBut we want to show the requested time-range, so to do it consistently, we return nr of points\nwhen making the request, and after getting result, we add `null`s at the beginning\n */\n\ninterface GetCorrectedPointsArg {\n after: number\n before: number\n firstEntry: number\n points: number\n}\nexport const getCorrectedPoints = ({\n after,\n before,\n firstEntry,\n points,\n}: GetCorrectedPointsArg) => {\n const nowInSeconds = Math.round(new Date().valueOf() / 1000)\n const afterAbsolute = after > 0 ? after : nowInSeconds + after\n const beforeAbsolute = before > 0 ? before : nowInSeconds + before\n\n if (afterAbsolute < firstEntry) {\n // take into account first_entry\n const realAfter = Math.max(afterAbsolute, firstEntry)\n const requestedRange = beforeAbsolute - afterAbsolute\n const availableRange = beforeAbsolute - realAfter\n\n return Math.round((points * availableRange) / requestedRange)\n }\n return null\n}\n\nexport const addPointsDygraph = (data: DygraphData, nrOfPointsToFill: number) => {\n const viewUpdateEvery = data.view_update_every\n if (!data.result.data.length) {\n return data\n }\n const firstAddedTimestamp = data.result.data[0][0] - nrOfPointsToFill * viewUpdateEvery\n const emptyPoint = tail(data.result.labels).map(() => null)\n const nulls = new Array(nrOfPointsToFill)\n .fill(null)\n .map((_, i) => [firstAddedTimestamp + i * viewUpdateEvery, ...emptyPoint])\n return {\n ...data,\n after: data.after - viewUpdateEvery * nrOfPointsToFill,\n result: {\n ...data.result,\n data: nulls.concat(data.result.data),\n },\n }\n}\n\nexport const fillMissingData = (data: ChartData, nrOfPointsToFill: number) => {\n if (data.format === \"json\") {\n return addPointsDygraph(data as DygraphData, nrOfPointsToFill)\n }\n return data\n}\n\nconst emptyArray: number[] = []\nexport const transformResults = (data: ChartData, format: string, shouldRevertFlip: boolean) => {\n if (format === \"array\" && data.format === \"json\") {\n if (Array.isArray(data.result)) return data\n\n const dataResult = shouldRevertFlip\n ? reverse((data as DygraphData).result.data)\n : (data as DygraphData).result.data\n return {\n ...data,\n // set proper output type so other functions like fillMissingData work properly\n format: \"array\",\n result: dataResult.reduce((acc: number[], pointData: number[]) => {\n pointData.shift()\n return [...acc, sum(pointData)]\n }, emptyArray),\n }\n }\n return data\n}\n\nexport const mapDefaultAggrMethod = (unit: string): string => {\n if (unit.length === 0) {\n return \"sum\"\n }\n const avgUnits: any = {\n percentage: true,\n percent: true,\n \"rotations/min\": true,\n ratio: true,\n seconds: true,\n \"seconds ago\": true,\n milliseconds: true,\n millisec: true,\n ms: true,\n \"log2 s\": true,\n minutes: true,\n hours: true,\n interval: true,\n ticks: true,\n celsius: true,\n c: true,\n mhz: true,\n hz: true,\n volts: true,\n kwh: true,\n ampere: true,\n amps: true,\n dbm: true,\n value: true,\n stratum: true,\n units: true,\n watt: true,\n temperature: true,\n \"random number\": true,\n rpm: true,\n quadro: true,\n \"adv/item\": true,\n multiplier: true,\n geforce: true,\n }\n if (avgUnits[unit.toLowerCase()]) {\n return \"avg\"\n }\n const avgUnitsRegExes: any = [\".*%.*\", \".*/operation\", \".*/run\", \".*/ run\", \".*/request\"]\n if (\n avgUnitsRegExes.some((regEx: string) => {\n const regExpression = RegExp(regEx, \"i\")\n return regExpression.test(unit.toLowerCase())\n })\n ) {\n return \"avg\"\n }\n return \"sum\"\n}\n","import styled from \"styled-components\"\nimport {\n getSizeBy, Text, TextSmall, getColor,\n} from \"@netdata/netdata-ui\"\n\nexport const Container = styled.div`\n width: 100%;\n height: 100%;\n min-height: ${getSizeBy(10)};\n display: flex;\n flex-flow: row nowrap;\n padding: ${getSizeBy(2)} ${getSizeBy(2)} ${getSizeBy(2)} ${getSizeBy(2)};\n`\n\nexport const SideContent = styled.div<{ right?: boolean }>`\n flex-grow: 0;\n flex-shrink: 0;\n height: 100%;\n align-self: stretch;\n`\n\nexport const ContentContainer = styled.div``\n\nexport const HeaderText = styled(Text)<{ error?: boolean; success?: boolean }>`\n color: ${({ error, success }) => (success && getColor(\"success\"))\n || (error && getColor(\"error\"))};\n font-weight: bold;\n display: block;\n margin-bottom: ${getSizeBy()};\n`\n\nexport const ContentText = styled(TextSmall)<{ error?: boolean; success?: boolean }>`\n display: block;\n color: ${({ error }) => (error && getColor(\"error\")) || getColor(\"border\")};\n`\n","import React from \"react\"\nimport {\n Container, SideContent, ContentContainer, HeaderText, ContentText,\n} from \"./styled\"\n\ninterface NotificationProps {\n header?: string\n leftContent?: React.ReactNode\n rightContent?: React.ReactNode\n text?: React.ReactNode\n className?: string\n renderContent?: (props: NotificationProps) => React.ReactNode | React.ReactNodeArray | null\n success?: boolean\n error?: boolean\n}\n\nexport const UINotification = (props: NotificationProps) => {\n const {\n header, text, leftContent, rightContent, renderContent, success, error,\n } = props\n return (\n <Container>\n {leftContent && <SideContent>{leftContent}</SideContent>}\n <ContentContainer>\n {header && (\n <HeaderText success={success} error={error}>\n {header}\n </HeaderText>\n )}\n {text && (\n <ContentText success={success} error={error}>\n {text}\n </ContentText>\n )}\n {renderContent && renderContent(props)}\n </ContentContainer>\n {rightContent && <SideContent right>{rightContent}</SideContent>}\n </Container>\n )\n}\n\n// for usage in non-jsx contexts\n// eslint-disable-next-line react/jsx-props-no-spreading\nexport const createUINotification = (props: NotificationProps) => <UINotification {...props} />\n","import styled from \"styled-components\"\nimport { getSizeBy } from \"@netdata/netdata-ui\"\n\nexport const NodeIconContainer = styled.div`\n width: ${getSizeBy(5)};\n height: ${getSizeBy(5)};\n margin-right: ${getSizeBy(2)};\n display: flex;\n justify-content: center;\n align-items: center;\n`\n\nexport const NotificationLink = styled.a`\n &,\n &:hover {\n text-decoration: underline;\n color: inherit;\n }\n`\n","import React from \"react\"\nimport { Icon } from \"@netdata/netdata-ui\"\nimport { toast } from \"react-toastify\"\n\nimport { createUINotification } from \"components/ui-notification\"\n\nimport * as S from \"./styled\"\n\nexport const toastOptions = {\n position: toast.POSITION.BOTTOM_RIGHT,\n autoClose: 10000,\n pauseOnFocusLoss: false,\n}\n\nexport const showCloudInstallationProblemNotification = () => {\n const uiNotification = {\n header: \"Installation error\",\n text: \"The installer could not prepare the required dependencies to enable Netdata Cloud\"\n + \" functionality\",\n }\n const notificationComponent = createUINotification({\n ...uiNotification,\n error: true,\n leftContent: (\n <S.NodeIconContainer>\n <Icon name=\"gear\" size=\"large\" color=\"error\" />\n </S.NodeIconContainer>\n ),\n })\n toast.error(notificationComponent, toastOptions)\n}\n\nexport const showCloudConnectionProblemNotification = () => {\n const uiNotification = {\n header: \"Connection Problem\",\n text: (\n <S.NotificationLink\n href=\"https://learn.netdata.cloud/docs/agent/packaging/installer#automatic-one-line-installation-script\"\n target=\"_blank\"\n >\n To access Cloud install again your agent via the kickstart script\n </S.NotificationLink>\n ),\n }\n const notificationComponent = createUINotification({\n ...uiNotification,\n error: true,\n leftContent: (\n <S.NodeIconContainer>\n <Icon name=\"gear\" size=\"large\" color=\"error\" />\n </S.NodeIconContainer>\n ),\n })\n toast.error(notificationComponent, toastOptions)\n}\n","import {\n mergeAll, pipe, split, mergeRight,\n} from \"ramda\"\nimport { mapIndexed } from \"ramda-adjunct\"\n\nconst defaultUrlOptions = {\n hash: \"#\",\n theme: null,\n help: null,\n mode: \"live\", // 'live', 'print'\n update_always: false,\n pan_and_zoom: false,\n server: null,\n after: 0,\n before: 0,\n highlight: false,\n highlight_after: 0,\n highlight_before: 0,\n nowelcome: false,\n show_alarms: false,\n chart: null,\n family: null,\n alarm: null,\n alarm_unique_id: 0,\n alarm_id: 0,\n alarm_event_id: 0,\n alarm_when: 0,\n} as {[key: string]: unknown}\n\nconst isInvalidPair = ([key, value]: [string, string]) => (\n defaultUrlOptions[key] === undefined || value === undefined\n)\n\nconst parseQueryPair = ([key, value]: [string, string]): {[key: string] : unknown} => {\n if (isInvalidPair([key, value])) {\n return {}\n }\n return {\n [key]: decodeURIComponent(value),\n }\n}\n\nexport const parseUrl = pipe(\n split(\";\"),\n mapIndexed((value, index) => (\n (index === 0) ? { hash: value } : parseQueryPair((value.split(\"=\") as [string, string]))\n )),\n mergeAll,\n mergeRight(defaultUrlOptions),\n)\n\nconst urlParsed = parseUrl(document.location.hash)\n\nexport const isPrintMode = urlParsed.mode === \"print\"\n","import {\n call,\n put,\n takeEvery,\n select,\n spawn,\n take,\n delay,\n} from \"redux-saga/effects\"\nimport { channel } from \"redux-saga\"\nimport { Action } from \"redux-act\"\n\nimport { axiosInstance } from \"utils/api\"\nimport { alwaysEndWithSlash, serverDefault } from \"utils/server-detection\"\nimport { getFetchStream } from \"utils/netdata-sdk\"\nimport { isMainJs } from \"utils/env\"\nimport { fillMissingData, transformResults } from \"utils/fill-missing-data\"\nimport {\n showCloudInstallationProblemNotification, showCloudConnectionProblemNotification,\n} from \"components/notifications\"\nimport { selectGlobalPanAndZoom, selectSnapshot, selectRegistry } from \"domains/global/selectors\"\nimport { StateT as GlobalStateT } from \"domains/global/reducer\"\nimport { stopSnapshotModeAction } from \"domains/dashboard/actions\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\nimport { INFO_POLLING_FREQUENCY } from \"domains/global/constants\"\n\nimport {\n fetchDataAction,\n FetchDataPayload,\n fetchChartAction,\n FetchChartPayload,\n fetchDataForSnapshotAction,\n FetchDataForSnapshotPayload,\n fetchInfoAction,\n FetchInfoPayload,\n fetchDataCancelAction,\n} from \"./actions\"\nimport { ChartData } from \"./chart-types\"\n\nconst CONCURRENT_CALLS_LIMIT_METRICS = isMainJs ? 30 : 60\nconst CONCURRENT_CALLS_LIMIT_PRINT = 2\nconst CONCURRENT_CALLS_LIMIT_SNAPSHOTS = 1\n\nconst fetchDataResponseChannel = channel()\n\nexport function* watchFetchDataResponseChannel() {\n while (true) {\n const action = (yield take(fetchDataResponseChannel))\n\n // special case - if requested relative timeRange, and during request the mode has been changed\n // to absolute global-pan-and-zoom, cancel the store update\n // todo do xss check of data\n if (action.type === fetchDataAction.success.toString()) {\n const payload = (action.payload as FetchDataPayload)\n const { viewRange } = payload.fetchDataParams\n const [start, end] = viewRange\n const globalPanAndZoom = (yield select(\n selectGlobalPanAndZoom,\n )) as GlobalStateT[\"globalPanAndZoom\"]\n\n if (globalPanAndZoom\n && (start <= 0 || end <= 0) // check if they are not timestamps\n ) {\n yield put(fetchDataCancelAction({\n id: payload.id,\n }))\n // eslint-disable-next-line no-continue\n continue\n }\n }\n\n yield put(action)\n }\n}\n\n// todo construct a new version of key that will be safer to be used in future\n// (while keeping old key supported for some time)\n// perhaps the key could be passed as attribute to the chart, to avoid matching\nconst constructCompatibleKey = (dimensions: undefined | string, options: string) => (\n // strange transformations for backwards compatibility. old snapshot keys were encoded this way\n // that empty dimensions were actually \"null\" string\n `${dimensions === undefined\n ? \"null\"\n : encodeURIComponent(dimensions)\n },${encodeURIComponent(options)}`\n)\n\n// currently BE always transforms data as if `flip` was there\nconst IS_FLIP_RESPECTED_IN_COMPOSITE_CHARTS = false\n\nconst getGroupByValues = (groupBy) => {\n if (groupBy === \"chart\") return \"node\"\n if (groupBy === \"node\" || groupBy === \"dimension\") return groupBy\n return `label=${groupBy}`\n}\n\nconst [fetchMetrics$] = getFetchStream(\n isPrintMode ? CONCURRENT_CALLS_LIMIT_PRINT : CONCURRENT_CALLS_LIMIT_METRICS,\n)\nfunction* fetchDataSaga({ payload }: Action<FetchDataPayload>) {\n const {\n // props for api\n host, context, chart, format, points, group, gtime, options,\n after, before, dimensions, labels, postGroupBy, postAggregationMethod,\n aggrMethod, dimensionsAggrMethod, nodeIDs, httpMethod,\n groupBy = \"dimension\", // group by node, dimension, or label keys\n aggrGroups = [],\n // props for the store\n fetchDataParams, id, cancelTokenSource,\n } = payload\n\n const snapshot = yield select(selectSnapshot)\n if (snapshot) {\n // if reading snapshot\n const dimensionsWithUrlOptions = constructCompatibleKey(dimensions, options)\n const matchingKey = Object.keys(snapshot.data).find((snapshotKey) => (\n snapshotKey.startsWith(chart) && snapshotKey.includes(dimensionsWithUrlOptions)\n ))\n if (!matchingKey) {\n // eslint-disable-next-line no-console\n console.warn(`Could not find snapshot key for chart: ${chart} and id ${id}`)\n return\n }\n const data = snapshot.data[matchingKey]\n yield put(fetchDataAction.success({\n chartData: data,\n fetchDataParams,\n id,\n }))\n return\n }\n\n const url = isMainJs\n ? `${alwaysEndWithSlash(host)}api/v1/data`\n : host\n\n const agentOptionsOriginal = options.split(\"|\")\n const hasFlip = agentOptionsOriginal.includes(\"flip\")\n const shouldAddFakeFlip = !IS_FLIP_RESPECTED_IN_COMPOSITE_CHARTS && !hasFlip\n // if flip is not respected in composite-charts, send it always (like dygraph charts normally do)\n const agentOptions = shouldAddFakeFlip\n ? agentOptionsOriginal.concat(\"flip\") : agentOptionsOriginal\n\n const groupValues = [\n getGroupByValues(groupBy),\n postGroupBy && `label=${postGroupBy}`,\n ].filter(Boolean)\n\n const axiosOptions = httpMethod === \"POST\" ? {\n // used by cloud's room-overview\n data: {\n filter: {\n nodeIDs,\n context,\n dimensions: dimensions ? dimensions.split(/['|]/) : undefined,\n labels,\n },\n after,\n before,\n points,\n group,\n gtime,\n agent_options: agentOptions,\n ...(postAggregationMethod && { post_aggregation_methods: [postAggregationMethod] }),\n aggregations: [groupBy !== \"dimension\" && {\n method: dimensionsAggrMethod || \"sum\",\n groupBy: [\"chart\", ...groupValues],\n },\n groupBy !== \"chart\" && {\n method: aggrMethod,\n groupBy: groupValues,\n ...(aggrGroups.length && { labels: aggrGroups }),\n }].filter(Boolean),\n },\n } : {\n params: {\n chart,\n _: new Date().valueOf(),\n format,\n points,\n group,\n gtime,\n options,\n after,\n before,\n dimensions,\n },\n }\n\n const onSuccessCallback = (data: { [id: string]: unknown}) => {\n if (!data?.result) {\n fetchDataResponseChannel.put(fetchDataAction.failure({ id }))\n } else {\n const { fillMissingPoints } = fetchDataParams\n\n const transformedResults = transformResults(\n (data as unknown) as ChartData,\n format,\n shouldAddFakeFlip,\n )\n\n const chartData = {\n ...transformedResults,\n // @ts-ignore\n ...((\"post_aggregated_data\" in data.result) && {\n postAggregationMethod,\n groupBy,\n postGroupBy,\n aggrGroups,\n // @ts-ignore\n postAggregated: data.result.post_aggregated_data[postAggregationMethod],\n }),\n }\n\n fetchDataResponseChannel.put(fetchDataAction.success({\n chartData: fillMissingPoints\n ? fillMissingData(chartData as ChartData, fillMissingPoints)\n : chartData,\n fetchDataParams,\n id,\n }))\n }\n }\n\n const onErrorCallback = (error: Error) => {\n console.warn(\"fetch chart data failure\", error) // eslint-disable-line no-console\n fetchDataResponseChannel.put(fetchDataAction.failure({ id }))\n }\n\n fetchMetrics$.next({\n ...axiosOptions,\n method: httpMethod || \"GET\",\n url,\n onErrorCallback,\n onSuccessCallback,\n cancelTokenSource,\n })\n}\n\nconst [fetchForSnapshot$, resetFetchForSnapshot$] = getFetchStream(CONCURRENT_CALLS_LIMIT_SNAPSHOTS)\nfunction fetchDataForSnapshotSaga({ payload }: Action<FetchDataForSnapshotPayload>) {\n const {\n host, chart, format, points, group, gtime, options,\n after, before, dimensions, aggrMethod,\n groupBy,\n nodeIDs,\n chartLibrary, id,\n } = payload\n\n // backwards-compatibility, the keys look like this:\n // net_errors.stf0,dygraph,null,ms%7Cflip%7Cjsonwrap%7Cnonzero\n const chartDataUniqueID = `${chart},${chartLibrary},${constructCompatibleKey(\n dimensions,\n options,\n )}`\n\n const url = `${alwaysEndWithSlash(host)}api/v1/data`\n const params = {\n chart,\n _: new Date().valueOf(),\n format,\n points,\n group,\n gtime,\n options,\n after,\n before,\n dimensions,\n ...(aggrMethod && { aggr_method: aggrMethod }),\n ...(nodeIDs && { node_ids: nodeIDs.join(\",\") }),\n ...(groupBy && { groupBy }),\n }\n\n const onSuccessCallback = (data: unknown) => {\n fetchDataResponseChannel.put(fetchDataForSnapshotAction.success({\n snapshotData: data,\n id,\n }))\n // temporarly, until main.js finished rewrite\n // @ts-ignore\n window.chartUpdated({\n chartDataUniqueID,\n data,\n })\n }\n\n const onErrorCallback = () => {\n fetchDataResponseChannel.put(fetchDataForSnapshotAction.failure({ id }))\n // @ts-ignore\n window.chartUpdated({\n chartDataUniqueID,\n chart,\n data: null,\n })\n }\n\n fetchForSnapshot$.next({\n url,\n params,\n onErrorCallback,\n onSuccessCallback,\n })\n}\n\nfunction stopSnapshotModeSaga() {\n // any calls in the queue should stop when save-snapshot modal is closed\n resetFetchForSnapshot$.next()\n}\n\nfunction* fetchChartSaga({ payload }: Action<FetchChartPayload>) {\n const { chart, id, host } = payload\n\n const snapshot = yield select(selectSnapshot)\n if (snapshot) {\n yield put(fetchChartAction.success({\n chartMetadata: snapshot.charts.charts[chart],\n id,\n }))\n return\n }\n\n let response\n const url = isMainJs\n ? `${alwaysEndWithSlash(host)}api/v1/chart`\n : host.replace(\"/data\", \"/chart\")\n try {\n response = yield call(axiosInstance.get, url, {\n params: {\n chart,\n },\n })\n } catch (e) {\n console.warn(\"fetch chart details failure\") // eslint-disable-line no-console\n yield put(fetchChartAction.failure({ id }))\n return\n }\n yield put(fetchChartAction.success({\n chartMetadata: response.data,\n id,\n }))\n}\n\nfunction* fetchInfoSaga({ payload }: Action<FetchInfoPayload>) {\n const { poll } = payload\n let isCloudEnabled = false\n let isAgentClaimed = false\n let isCloudAvailable = false\n let isACLKAvailable = false\n\n try {\n const registry: GlobalStateT[\"registry\"] = yield select(selectRegistry)\n const wasCloudAvailable = registry?.isCloudAvailable\n const wasACLKAvailable = registry?.isACLKAvailable\n\n const { data } = yield call(axiosInstance.get, `${serverDefault}/api/v1/info`)\n isCloudAvailable = data?.[\"cloud-available\"] || false\n isCloudEnabled = data?.[\"cloud-enabled\"] || false\n isAgentClaimed = data?.[\"agent-claimed\"] || false\n isACLKAvailable = data?.[\"aclk-available\"] || false\n\n yield put(fetchInfoAction.success({\n isCloudAvailable, isCloudEnabled, isAgentClaimed, isACLKAvailable, fullInfoPayload: data,\n }))\n\n if (isCloudEnabled && (wasCloudAvailable === null) && !isCloudAvailable) {\n // show only once per session\n showCloudInstallationProblemNotification()\n }\n if (isCloudAvailable && isAgentClaimed && (wasACLKAvailable !== false) && !isACLKAvailable) {\n // show at session-init and if we see a change of isACLKAvailable from true to false\n showCloudConnectionProblemNotification()\n }\n // TODO: No success notification spec`ed?\n // else if (!wasACLKAvailable && isACLKAvailable) {\n // toast.success(\"Connected to the Cloud!\", {\n // position: \"bottom-right\",\n // type: toast.TYPE.SUCCESS,\n // autoClose: NOTIFICATIONS_TIMEOUT,\n // })\n // }\n } catch (e) {\n console.warn(\"fetch agent info failure\") // eslint-disable-line no-console\n yield put(fetchInfoAction.failure())\n }\n\n if (poll && isCloudEnabled && isAgentClaimed) {\n yield delay(INFO_POLLING_FREQUENCY)\n yield put(fetchInfoAction({ poll: true }))\n }\n}\n\n\nexport function* chartSagas() {\n yield takeEvery(fetchDataAction.request, fetchDataSaga)\n yield takeEvery(fetchChartAction.request, fetchChartSaga)\n yield takeEvery(fetchDataForSnapshotAction.request, fetchDataForSnapshotSaga)\n yield takeEvery(stopSnapshotModeAction, stopSnapshotModeSaga)\n yield takeEvery(fetchInfoAction.request, fetchInfoSaga)\n yield spawn(watchFetchDataResponseChannel)\n}\n","export const sidePanelTransitionTimeInSeconds = 0.2\n","import { sortBy, prop, last } from \"ramda\"\nimport { Action } from \"redux-act\"\nimport {\n call, delay, spawn, take, takeEvery, put,\n} from \"redux-saga/effects\"\n\nimport { axiosInstance } from \"utils/api\"\nimport { serverStatic } from \"utils/server-detection\"\nimport { name2id } from \"utils/name-2-id\"\n\nimport {\n startAlarmsAction, StartAlarmsPayload, fetchAllAlarmsAction, updateActiveAlarmsAction,\n} from \"./actions\"\nimport { AlarmLogs, AlarmLog, ActiveAlarms } from \"./types\"\n\nconst ALARMS_INITIALIZATION_DELAY = 1000\nconst ALARMS_UPDATE_EVERY = 10000 // the time in ms between alarm checks\nconst CHART_DIV_OFFSET = -50\n\n// firefox moves the alarms off-screen (above, outside the top of the screen)\n// if alarms are shown faster than: one per 500ms\nconst ALARMS_MS_BETWEEN_NOTIFICATIONS = 500\n\n// equal to old NETDATA.alarms.notifications\nconst areNotificationsAvailable = \"Notification\" in window\n\nconst notificationCallback = window.netdataAlarmsNotifCallback\n\n\n// todo this doesnt change in the session, but should be moved to the redux state anyway\nlet firstNotificationId = 0\nlet lastNotificationId = 0\n\n\nconst scrollToChart = (chartID: unknown): boolean => {\n if (typeof chartID === \"string\") {\n const chartElement = document.querySelector(`#chart_${name2id(chartID)}`)\n if (chartElement) {\n const offset = (chartElement as HTMLDivElement).offsetTop + CHART_DIV_OFFSET;\n (document.querySelector(\"html\") as HTMLElement).scrollTop = offset\n return true\n }\n }\n return false\n}\n\n// perhaps sagas are not the best place for this\nconst scrollToAlarm = (alarm: AlarmLog) => {\n if (typeof alarm === \"object\") {\n const hasFoundChart = scrollToChart(alarm.chart)\n if (hasFoundChart) {\n window.focus()\n }\n }\n}\n\nconst requestPermissions = () => {\n if (areNotificationsAvailable) {\n if (Notification.permission === \"default\") {\n Notification.requestPermission()\n }\n }\n}\n\nconst hasGivenNotificationPermissions = () => (areNotificationsAvailable\n && Notification.permission === \"granted\"\n)\n\nfunction* getLog(lastNotificationIdArg: number, serverDefault: string) {\n try {\n const { data } = yield call(\n axiosInstance.get,\n `${serverDefault}/api/v1/alarm_log?after=${lastNotificationIdArg}`,\n )\n // todo xss check\n return data\n } catch (error) {\n console.warn(\"Error fetching alarms log\", error) // eslint-disable-line no-console\n return null\n }\n}\n\ninterface NotificationConfig {\n notificationTitle: string\n notificationOptions: NotificationOptions\n notificationHandler: (event: Event) => void\n}\n// called \"notify\" in old codebase\nconst getNotification = (\n entry: AlarmLog, activeAlarms: ActiveAlarms, firstNotificationIdArg: number,\n): NotificationConfig | undefined => {\n if (entry.updated) {\n // has been updated by another alarm\n return\n }\n\n let valueString = entry.value_string\n const t = activeAlarms.alarms[`${entry.chart}.${entry.name}`]\n if (typeof t !== \"undefined\"\n && entry.status === t.status\n && typeof t.value_string !== \"undefined\"\n ) {\n valueString = t.value_string\n }\n\n const name = entry.name.replace(/_/g, \" \")\n let status = entry.status.toLowerCase()\n let title = `${name} = ${valueString}`\n const tag = entry.alarm_id\n let icon = \"images/banner-icon-144x144.png\"\n let interaction = false\n let show = true\n\n // switch/case left here to simplify refractor (it's very similar to old code)\n switch (entry.status) {\n case \"REMOVED\":\n show = false\n break\n\n case \"UNDEFINED\":\n return\n\n case \"UNINITIALIZED\":\n return\n\n case \"CLEAR\":\n if (entry.unique_id < firstNotificationIdArg) {\n // alarm is not current\n return\n }\n if (entry.old_status === \"UNINITIALIZED\" || entry.old_status === \"UNDEFINED\") {\n // alarm switch to CLEAR from old_status\n return\n }\n if (entry.no_clear_notification) {\n // alarm is CLEAR but has no_clear_notification flag\n return\n }\n title = `${name} back to normal (${valueString})`\n icon = \"images/check-mark-2-128-green.png\"\n interaction = false\n break\n\n case \"WARNING\":\n if (entry.old_status === \"CRITICAL\") {\n status = `demoted to ${entry.status.toLowerCase()}`\n }\n\n icon = \"images/alert-128-orange.png\"\n interaction = false\n break\n\n case \"CRITICAL\":\n if (entry.old_status === \"WARNING\") {\n status = `escalated to ${entry.status.toLowerCase()}`\n }\n\n icon = \"images/alert-128-red.png\"\n interaction = true\n break\n\n default:\n console.warn(`invalid alarm status ${entry.status}`) // eslint-disable-line no-console\n return\n }\n\n // filter recipients\n // if (show) {\n // show = NETDATA.alarms.recipientMatches(entry.recipient, NETDATA.alarms.recipients)\n // }\n\n\n if (show) {\n if (typeof notificationCallback === \"function\") {\n show = notificationCallback(entry)\n }\n\n if (show) {\n // show this notification\n // eslint-disable-next-line consistent-return\n return {\n notificationTitle: title,\n notificationOptions: {\n body: `${entry.hostname} - ${entry.chart} (${entry.family}) - ${status}: ${entry.info}`,\n tag: `${tag}`,\n requireInteraction: interaction,\n icon: serverStatic + icon,\n data: entry,\n },\n notificationHandler: (event: Event) => {\n event.preventDefault()\n if (event.target) {\n const { data } = event.target as Notification\n scrollToAlarm(data)\n }\n },\n }\n }\n }\n}\n\nfunction* notifyAll(serverDefault: string, activeAlarms: ActiveAlarms) {\n const alarmLogs: AlarmLogs = yield call(getLog, lastNotificationId, serverDefault)\n if (alarmLogs === null || typeof alarmLogs !== \"object\") {\n console.warn(\"invalid alarms log response\") // eslint-disable-line no-console\n return\n }\n\n if (alarmLogs.length === 0) {\n console.log(\"received empty alarm log\") // eslint-disable-line no-console\n return\n }\n\n const logsSorted = sortBy(prop(\"unique_id\"), alarmLogs)\n\n // eslint-disable-next-line camelcase\n const newLogs = logsSorted.filter(({ unique_id }) => unique_id > lastNotificationId)\n const notifications = newLogs\n .map((entry) => (getNotification(entry, activeAlarms, firstNotificationId)))\n .filter((x) => x !== undefined) as NotificationConfig[]\n\n for (let i = 0; i < notifications.length; i += 1) {\n const {\n notificationTitle, notificationOptions, notificationHandler,\n } = notifications[i]\n const notification = new Notification(\n notificationTitle,\n notificationOptions,\n )\n notification.onclick = notificationHandler\n\n yield delay(ALARMS_MS_BETWEEN_NOTIFICATIONS)\n }\n\n // todo put to redux store\n lastNotificationId = (last(logsSorted) as AlarmLog).unique_id\n\n if (typeof window.netdataAlarmsRemember === \"undefined\" || window.netdataAlarmsRemember) {\n localStorage.setItem(\"last_notification_id\", `${lastNotificationId}`)\n }\n}\n\n\nfunction* get(what: string, serverDefault: string) {\n const { data } = yield call(axiosInstance.get, `${serverDefault}/api/v1/alarms?${what}`)\n if (firstNotificationId === 0 && typeof data.latest_alarm_log_unique_id === \"number\") {\n firstNotificationId = data.latest_alarm_log_unique_id\n }\n return data\n}\n\nfunction* alarmsLoop(serverDefault: string) {\n while (true) {\n const activeAlarms = (yield call(get, \"active\", serverDefault)) as ActiveAlarms\n if (activeAlarms) {\n yield put(updateActiveAlarmsAction({ activeAlarms }))\n if (\n hasGivenNotificationPermissions()\n // timestamps in seconds\n && (activeAlarms.latest_alarm_log_unique_id > lastNotificationId)\n ) {\n yield call(notifyAll, serverDefault, activeAlarms)\n\n if (activeAlarms.status === false) {\n // Health monitoring is disabled on this netdata\n break\n }\n }\n }\n yield delay(ALARMS_UPDATE_EVERY)\n }\n}\n\nfunction* startAlarms() {\n // make sure we handle that action only once, we don't want multiple intervals/loops\n const { payload }: { payload: StartAlarmsPayload } = yield take(startAlarmsAction)\n const { serverDefault } = payload\n\n yield delay(ALARMS_INITIALIZATION_DELAY)\n\n lastNotificationId = +(localStorage.getItem(\"last_notification_id\") || lastNotificationId)\n requestPermissions()\n yield call(alarmsLoop, serverDefault)\n}\n\ntype FetchAllAlarmsPayload = {\n callback: (x: unknown) => void,\n serverDefault: string,\n}\nfunction* fetchAllAlarmsSaga({ payload }: Action<FetchAllAlarmsPayload>) {\n const { callback, serverDefault } = payload\n const allAlarms = yield call(get, \"all\", serverDefault)\n callback(allAlarms)\n}\n\nexport function* alarmsSagas() {\n yield spawn(startAlarms)\n yield takeEvery(fetchAllAlarmsAction.request, fetchAllAlarmsSaga)\n}\n","const allowedReferrerDomains = [\n \"\",\n \"https://www.google.com/\",\n \"https://duckduckgo.com/\",\n \"https://www.reddit.com/\",\n]\n\nexport const isAllowedReferrer = (referrer: string) => allowedReferrerDomains.includes(referrer)\n || referrer.endsWith(\".my-netdata.io/\")\n || referrer.startsWith(\"https://github.com/\")\n || referrer.endsWith(\"netdata.cloud/\")\n || referrer.startsWith(\"https://app.netdata.cloud/\")\n","import { uniq, filter } from \"ramda\"\nimport {\n spawn, take, put, takeEvery, call, delay, select,\n} from \"redux-saga/effects\"\nimport { channel } from \"redux-saga\"\nimport { AxiosResponse } from \"axios\"\nimport { Action } from \"redux-act\"\n\nimport { NETDATA_REGISTRY_SERVER } from \"utils/utils\"\nimport { axiosInstance } from \"utils/api\"\nimport { isDemo } from \"utils/is-demo\"\nimport { sidePanelTransitionTimeInSeconds } from \"components/space-panel/settings\"\nimport { fetchInfoAction } from \"domains/chart/actions\"\n\nimport {\n fetchHelloAction,\n FetchHelloPayload,\n windowFocusChangeAction,\n updatePersonUrlsAction,\n SetOptionAction,\n setOptionAction,\n setSpacePanelStatusAction,\n SetSpacePanelStatusActionPayload,\n setSpacePanelTransitionEndAction,\n HelloResponse,\n accessRegistrySuccessAction,\n} from \"./actions\"\nimport { alarmsSagas } from \"./alarms-sagas\"\nimport { MASKED_DATA } from \"./constants\"\nimport { selectFullInfoPayload } from \"./selectors\"\nimport { isAllowedReferrer } from \"./utils\"\nimport { InfoPayload } from \"./__mocks__/info-mock\"\n\nconst windowFocusChannel = channel()\n\nexport function listenToWindowFocus() {\n window.addEventListener(\"focus\", () => {\n windowFocusChannel.put(windowFocusChangeAction({ hasWindowFocus: true }))\n })\n window.addEventListener(\"blur\", () => {\n windowFocusChannel.put(windowFocusChangeAction({ hasWindowFocus: false }))\n })\n}\n\nexport function* watchWindowFocusChannel() {\n while (true) {\n const action = yield take(windowFocusChannel)\n yield put(action)\n }\n}\n\nfunction* waitForFullInfoPayload() {\n return (yield take(fetchInfoAction.success)).payload.fullInfoPayload\n}\n\nfunction* injectPosthog(machineGuid: string, personGuid?: string) {\n if (window.posthog) {\n return\n }\n const info: InfoPayload = (yield select(selectFullInfoPayload))\n || (yield call(waitForFullInfoPayload))\n || {}\n\n /* eslint-disable */\n // @ts-ignore\n !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(\".\");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement(\"script\")).type=\"text/javascript\",p.async=!0,p.src=s.api_host+\"/static/array.js\",(r=t.getElementsByTagName(\"script\")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a=\"posthog\",u.people=u.people||[],u.toString=function(t){var e=\"posthog\";return\"posthog\"!==a&&(e+=\".\"+a),t||(e+=\" (stub)\"),e},u.people.toString=function(){return u.toString(1)+\".people (stub)\"},o=\"capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags\".split(\" \"),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);\n /* eslint-enable */\n window.posthog.init(\"mqkwGT0JNFqO-zX2t0mW6Tec9yooaVu7xCBlXtHnt5Y\", {\n api_host: \"https://posthog.netdata.cloud\",\n loaded: (posthog: any) => {\n if (personGuid) {\n posthog.identify(personGuid)\n }\n },\n })\n const shouldMaskReferrer = !isDemo && !isAllowedReferrer(document.referrer)\n const MASKED = \"masked\"\n window.posthog.register(\n // remove properties with unavailable values\n filter((value) => value !== undefined && value !== null,\n {\n $ip: \"127.0.0.1\",\n $current_url: isDemo ? null : \"agent dashboard\",\n $pathname: isDemo ? null : \"netdata-dashboard\",\n $host: isDemo ? null : \"dashboard.netdata.io\",\n\n $initial_referring_domain: shouldMaskReferrer ? MASKED : null,\n $initial_referrer: shouldMaskReferrer ? MASKED : null,\n $referring_domain: shouldMaskReferrer ? MASKED : null,\n $referrer: shouldMaskReferrer ? MASKED : null,\n\n event_source: \"agent dashboard\",\n\n netdata_version: info.version,\n netdata_machine_guid: machineGuid,\n netdata_person_id: personGuid || \"Unavailable\",\n netdata_buildinfo: info[\"buildinfo\"],\n netdata_release_channel: info[\"release-channel\"],\n mirrored_host_count: info.mirrored_hosts?.length,\n alarms_normal: info.alarms?.normal,\n alarms_warning: info.alarms?.warning,\n alarms_critical: info.alarms.critical,\n host_os_name: info.os_name,\n host_os_id: info.os_id,\n host_os_id_like: info.os_id_like,\n host_os_version: info.os_version,\n host_os_version_id: info.os_version_id,\n host_os_detection: info.os_detection,\n system_cores_total: info.cores_total,\n system_total_disk_space: info.total_disk_space,\n system_cpu_freq: info.cpu_freq,\n system_ram_total: info.ram_total,\n system_kernel_name: info.kernel_name,\n system_kernel_version: info.kernel_version,\n system_architecture: info.architecture,\n system_virtualization: info.virtualization,\n system_virt_detection: info.virt_detection,\n system_container: info.container,\n system_container_detection: info.container_detection,\n container_os_name: info.container_os_name,\n container_os_id: info.container_os_id,\n container_os_id_like: info.container_os_id_like,\n container_os_version: info.container_os_version,\n container_os_version_id: info.container_os_version_id,\n host_collectors_count: info.collectors.length,\n host_cloud_enabled: info[\"cloud-enabled\"],\n host_cloud_available: info[\"cloud-available\"],\n host_agent_claimed: info[\"agent-claimed\"],\n host_aclk_available: info[\"aclk-available\"],\n host_aclk_implementation: info[\"aclk-implementation\"],\n host_allmetrics_json_used: info[\"allmetrics-json-used\"],\n host_allmetrics_prometheus_used: info[\"allmetrics-prometheus-used\"],\n host_allmetrics_shell_used: info[\"allmetrics-shell-used\"],\n host_charts_count: info[\"charts-count\"],\n host_dashboard_used: info[\"dashboard-used\"],\n host_metrics_count: info[\"metrics-count\"],\n host_notification_methods: info[\"notification-methods\"],\n config_memory_mode: info[\"memory-mode\"],\n config_exporting_enabled: info[\"exporting-enabled\"],\n config_exporting_connectors: info[\"exporting-connectors\"],\n config_hosts_available: info[\"hosts-available\"],\n config_https_enabled: info[\"https-enabled\"],\n config_multidb_disk_quota: info[\"multidb-disk-quota\"],\n config_page_cache_size: info[\"page-cache-size\"],\n config_stream_enabled: info[\"stream-enabled\"],\n config_web_enabled: info[\"web-enabled\"],\n // eslint-disable-next-line camelcase\n host_is_parent: info.host_labels?._is_parent,\n mirrored_hosts_reachable: info.mirrored_hosts_status\n .filter(({ reachable }) => reachable).length,\n mirrored_hosts_unreachable: info.mirrored_hosts_status\n .filter(({ reachable }) => !reachable).length,\n host_collectors: info.collectors,\n host_is_k8s_node: info.is_k8s_node,\n }),\n )\n}\n\nexport type PersonUrl = [\n string, // guid\n string, // url\n number, // last timestamp (ms)\n number, // accesses\n string // name\n]\n\ntype AccessRegistryResponse = null | {\n personGuid?: string\n registryServer: string\n urls?: PersonUrl[]\n}\n\ntype AccessRegistry = (args: {\n machineGuid: string\n maxRedirects: number\n name: string\n registryServer: string\n url: string\n}) => Promise<AccessRegistryResponse>\nconst accessRegistry: AccessRegistry = ({\n machineGuid, maxRedirects, name, registryServer, url,\n}) => axiosInstance.get(`${registryServer}/api/v1/registry`, {\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n params: {\n action: \"access\",\n machine: machineGuid,\n name,\n url,\n },\n withCredentials: true, // required for the cookie\n}).then(({ data }) => {\n // todo xss check\n const isRedirect = typeof data.registry === \"string\"\n\n let returnData = data\n if (typeof data.status !== \"string\" || data.status !== \"ok\") {\n // todo throw error (409 in old dashboard)\n returnData = null\n }\n\n if (returnData === null) {\n if (isRedirect && maxRedirects > 0) {\n return accessRegistry({\n maxRedirects: maxRedirects - 1,\n machineGuid,\n name,\n registryServer: data.registry,\n url,\n })\n }\n return { registryServer }\n }\n const urls = data.urls.filter((u: [string, string]) => u[1] !== MASKED_DATA)\n return {\n personGuid: data.person_guid || null,\n registryServer,\n urls,\n }\n}).catch(() => {\n // todo handle error in better way (410 in old dashboard)\n console.warn(\"error calling registry:\", registryServer) // eslint-disable-line no-console\n return null\n})\n\nexport interface RegistryMachine {\n guid: string\n url: string\n lastTimestamp: number\n accesses: number\n name: string\n alternateUrls: string[]\n}\n\ntype ParsePersonUrls = (\n personUrls: PersonUrl[]\n) => {\n registryMachines: { [key: string]: RegistryMachine }\n registryMachinesArray: RegistryMachine[]\n}\nexport const parsePersonUrls: ParsePersonUrls = (personUrls) => {\n // todo main.js is using registryMachines, but should use only the array\n const registryMachines: { [key: string]: RegistryMachine } = {}\n\n personUrls\n .slice()\n .reverse()\n .forEach(([guid, url, lastTimestamp, accesses, name]: PersonUrl) => {\n const existingObj = registryMachines[guid] || {\n lastTimestamp: 0,\n accesses: 0,\n alternateUrls: [],\n guid: \"\",\n url: \"\",\n name: \"\"\n }\n const isNewer = existingObj.lastTimestamp < lastTimestamp\n const extended: RegistryMachine = {\n guid: existingObj.guid || guid,\n url: isNewer ? url : existingObj.url,\n lastTimestamp: isNewer ? lastTimestamp : existingObj.lastTimestamp,\n accesses: existingObj.accesses + accesses,\n name: isNewer ? name : existingObj.name,\n alternateUrls: existingObj.alternateUrls.concat(url),\n }\n registryMachines[guid] = extended\n })\n\n const registryMachinesArray = uniq(\n // not sure if reverse is needed, but it was in old dashboard\n personUrls\n .slice()\n .reverse()\n .map(([guid]: PersonUrl) => guid),\n ).map((guid) => registryMachines[guid])\n return {\n registryMachines,\n registryMachinesArray,\n }\n}\n\nfunction* fetchHelloSaga({ payload }: Action<FetchHelloPayload>) {\n const { serverDefault } = payload\n const helloCallUrl = `${serverDefault}api/v1/registry?action=hello`\n let response: AxiosResponse<HelloResponse>\n try {\n response = yield call(axiosInstance.get, helloCallUrl, {\n headers: {\n \"Cache-Control\": \"no-cache, no-store\",\n Pragma: \"no-cache\",\n },\n withCredentials: true,\n })\n } catch (error) {\n console.warn(\"error accessing registry or Do-Not-Track is enabled\") // eslint-disable-line\n yield put(fetchHelloAction.failure())\n return\n }\n const cloudBaseURL = response.data.cloud_base_url\n const { hostname } = response.data\n const machineGuid = response.data.machine_guid\n const registryServer = response.data.registry\n const isUsingGlobalRegistry = registryServer === NETDATA_REGISTRY_SERVER\n\n yield put(fetchHelloAction.success({\n cloudBaseURL,\n hostname,\n isUsingGlobalRegistry,\n machineGuid,\n }))\n\n const name = isUsingGlobalRegistry ? MASKED_DATA : hostname\n const url = isUsingGlobalRegistry ? MASKED_DATA : serverDefault\n\n // now make access call - max_redirects, callback, etc...\n const accessRegistryResponse: AccessRegistryResponse = yield call(accessRegistry, {\n machineGuid,\n maxRedirects: 2,\n name,\n registryServer,\n url,\n })\n\n if (response.data.anonymous_statistics) {\n yield spawn(injectPosthog, response.data.machine_guid, accessRegistryResponse?.personGuid)\n }\n\n if (accessRegistryResponse?.urls && accessRegistryResponse?.personGuid) {\n const personUrls = parsePersonUrls(accessRegistryResponse.urls)\n const { registryMachines, registryMachinesArray } = personUrls\n yield put(updatePersonUrlsAction({\n personGuid: accessRegistryResponse.personGuid,\n registryMachines,\n registryMachinesArray,\n }))\n }\n\n yield put(accessRegistrySuccessAction({\n registryServer: accessRegistryResponse?.registryServer || registryServer,\n }))\n}\n\nconst constructOptionStorageKey = (key: string) => `options.${key}`\nfunction setOptionSaga({ payload }: Action<SetOptionAction>) {\n const { key, value } = payload\n if (key === \"stop_updates_when_focus_is_lost\") {\n // old dashboard was saving that property to localStorage, but was always ommiting it when\n // reading. it was only possible to persist this setting via url (update_always hash param)\n return\n }\n localStorage.setItem(constructOptionStorageKey(key), JSON.stringify(value))\n}\n\nfunction* spacePanelSaga({ payload }: Action<SetSpacePanelStatusActionPayload>) {\n if (payload.isActive) {\n document.body.className = \"with-panel\"\n } else {\n document.body.className = \"\"\n }\n yield delay(sidePanelTransitionTimeInSeconds * 1000)\n yield put(setSpacePanelTransitionEndAction({ isActive: payload.isActive }))\n}\n\nexport function* globalSagas() {\n yield spawn(listenToWindowFocus)\n yield spawn(watchWindowFocusChannel)\n yield takeEvery(fetchHelloAction.request, fetchHelloSaga)\n yield spawn(alarmsSagas)\n yield takeEvery(setOptionAction, setOptionSaga)\n yield takeEvery(setSpacePanelStatusAction, spacePanelSaga)\n}\n","/* eslint-disable camelcase */\n/* eslint-disable operator-linebreak */\nimport { take, takeEvery } from \"redux-saga/effects\"\nimport { Action } from \"redux-act\"\n\nimport {\n clearHighlightAction,\n SetGlobalChartUnderlayAction,\n setGlobalChartUnderlayAction,\n} from \"domains/global/actions\"\nimport {\n explicitlySignInAction,\n showSignInModalAction,\n ShowSignInModalAction,\n} from \"domains/dashboard/actions\"\nimport { setHashParams, getHashParams, removeHashParams } from \"utils/hash-utils\"\n\nexport const LOCAL_STORAGE_NEEDS_SYNC = \"LOCAL-STORAGE-NEEDS-SYNC\"\n\nfunction setGlobalChartUnderlaySaga({ payload }: Action<SetGlobalChartUnderlayAction>) {\n const { after, before } = payload\n if (window.urlOptions) {\n // additional check to prevent loop, after setting initial state from url\n if (window.urlOptions.after !== after || window.urlOptions.before !== before) {\n window.urlOptions.netdataHighlightCallback(true, after, before)\n }\n } else {\n // TODO: Consider a setting to control wether the component sets these hash params\n const hashParams = getHashParams()\n const highlight_after = Math.round(after).toString()\n const highlight_before = Math.round(before).toString()\n if (\n hashParams.highlight_after !== highlight_after ||\n hashParams.highlight_before !== highlight_before\n ) {\n setHashParams({ highlight_after, highlight_before })\n }\n }\n}\n\nfunction clearHighlightSaga() {\n if (window.urlOptions) {\n window.urlOptions.netdataHighlightCallback(false, 0, 0)\n } else {\n removeHashParams([\"highlight_after\", \"highlight_before\"])\n }\n}\n\nfunction* showSignInSaga({ payload }: Action<ShowSignInModalAction>) {\n if (window.showSignInModal) {\n window.showSignInModal()\n\n yield take(explicitlySignInAction)\n const { signInLinkHref } = payload\n window.localStorage.setItem(LOCAL_STORAGE_NEEDS_SYNC, \"true\")\n window.location.href = signInLinkHref\n }\n}\n\nexport function* mainJsSagas() {\n yield takeEvery(setGlobalChartUnderlayAction, setGlobalChartUnderlaySaga)\n yield takeEvery(clearHighlightAction, clearHighlightSaga)\n yield takeEvery(showSignInModalAction, showSignInSaga)\n}\n","import { spawn } from \"redux-saga/effects\"\n\nimport { chartSagas } from \"domains/chart/sagas\"\nimport { globalSagas } from \"domains/global/sagas\"\nimport { mainJsSagas } from \"domains/dashboard/sagas\"\n\nexport function* rootSaga() {\n yield spawn(globalSagas)\n yield spawn(chartSagas)\n yield spawn(mainJsSagas)\n}\n","import { compose, applyMiddleware, createStore } from \"redux\"\nimport createSagaMiddleware from \"redux-saga\"\nimport rootReducer from \"./root-reducer\"\nimport { rootSaga } from \"./root-saga\"\n\nconst sagaMiddleware = createSagaMiddleware()\n\nconst reduxDevTools = process.env.NODE_ENV === \"development\"\n && window.__REDUX_DEVTOOLS_EXTENSION__\n // @ts-ignore\n && window.__REDUX_DEVTOOLS_EXTENSION__({ name: \"Dashboard Charts\" })\n\nconst composeMiddlewaresWithDevTools = () => (reduxDevTools\n ? compose(applyMiddleware(sagaMiddleware), reduxDevTools)\n : compose(applyMiddleware(sagaMiddleware)))\n\nexport const configureStore = () => {\n const store = createStore(\n rootReducer,\n composeMiddlewaresWithDevTools(),\n )\n sagaMiddleware.run(rootSaga)\n return store\n}\n\nexport const store = configureStore()\n","import $ from \"jquery\"\n\nwindow.$ = $\nwindow.jQuery = $\n","let loadCssPromise: Promise<void>\n\ntype LoadCss = (href: string) => Promise<void>\nexport const loadCss: LoadCss = (href) => {\n if (loadCssPromise) {\n return loadCssPromise\n }\n return new Promise((resolve, reject) => {\n const fileRef = document.createElement(\"link\")\n fileRef.setAttribute(\"rel\", \"stylesheet\")\n fileRef.setAttribute(\"type\", \"text/css\")\n fileRef.setAttribute(\"href\", href)\n\n fileRef.onload = () => {\n resolve()\n }\n\n fileRef.onerror = () => {\n reject(Error(`Error loading css: ${href}`))\n }\n\n document.getElementsByTagName(\"head\")[0].appendChild(fileRef)\n })\n}\n","import classNames from \"classnames\"\nimport { Attributes } from \"./transformDataAttributes\"\n\nexport type ChartLibraryName =\n | \"dygraph\"\n | \"sparkline\"\n | \"peity\"\n | \"google\"\n // | \"d3\"\n | \"d3pie\"\n | \"easypiechart\"\n | \"gauge\"\n | \"textonly\"\n | \"groupbox\"\nexport interface ChartLibraryConfig {\n aspectRatio?: number\n format: string\n hasLegend: (attributes: Attributes) => boolean\n hasToolboxPanAndZoom?: boolean\n isLogScale?: (attributes: Attributes) => boolean\n options: (attributes: Attributes) => string\n trackColors: boolean\n pixelsPerPoint: (attributes: Attributes) => number\n xssRegexIgnore: RegExp\n containerClass: (attributes: Attributes) => string\n}\nexport type ChartLibrariesSettings = {\n [key in ChartLibraryName]: ChartLibraryConfig\n}\n\ntype IsDygraphSparkline = (attributes: Attributes) => boolean\nconst isDygraphSparkline: IsDygraphSparkline = (attributes) => (\n attributes.dygraphTheme === \"sparkline\"\n)\n\nexport const chartLibrariesSettings: ChartLibrariesSettings = {\n dygraph: {\n // initialize: window.NETDATA.dygraphInitialize,\n // create: window.NETDATA.dygraphChartCreate,\n // update: window.NETDATA.dygraphChartUpdate,\n // resize(state) {\n // if (typeof state.tmp.dygraph_instance !== \"undefined\"\n // && typeof state.tmp.dygraph_instance.resize === \"function\") {\n // state.tmp.dygraph_instance.resize()\n // }\n // },\n // setSelection: window.NETDATA.dygraphSetSelection,\n // clearSelection: window.NETDATA.dygraphClearSelection,\n hasToolboxPanAndZoom: true,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result.data$\"),\n format: \"json\",\n options(attributes: Attributes) {\n if (typeof this.isLogScale === \"function\") {\n // flip - in proper order (from oldest to newest)\n return `ms|flip${this.isLogScale(attributes) ? \"|abs\" : \"\"}`\n }\n return \"\"\n },\n hasLegend(attributes: Attributes) {\n // not using __hasLegendCache__ as in old-dashboard, because performance tweaks like this\n // probably won't be needed in react app\n const { legend = true } = attributes\n return !isDygraphSparkline(attributes) && Boolean(legend)\n },\n // autoresize(state) {\n // void (state)\n // return true\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: true,\n pixelsPerPoint: ((attributes: Attributes) => (isDygraphSparkline(attributes) ? 2 : 3)),\n // pixels_per_point(state) {\n // return (this.isSparkline(state) === false) ? 3 : 2\n // },\n isLogScale(attributes: Attributes) {\n return attributes.dygraphTheme === \"logscale\"\n },\n containerClass(attributes: Attributes) {\n return this.hasLegend(attributes)\n ? classNames(\n \"netdata-container-with-legend\",\n attributes.legendPosition === \"bottom\" && \"netdata-container-with-legend--bottom\",\n )\n : \"netdata-container\"\n },\n // container_class(state) {\n // if (this.legend(state) !== null) {\n // return \"netdata-container-with-legend\"\n // }\n // return \"netdata-container\"\n // },\n },\n sparkline: {\n // initialize: window.NETDATA.sparklineInitialize,\n // create: window.NETDATA.sparklineChartCreate,\n // update: window.NETDATA.sparklineChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"array\",\n options: () => \"flip|abs\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: false,\n pixelsPerPoint: () => 3,\n containerClass: () => \"netdata-container\",\n },\n peity: {\n // initialize: window.NETDATA.peityInitialize,\n // create: window.NETDATA.peityChartCreate,\n // update: window.NETDATA.peityChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"ssvcomma\",\n options: () => \"null2zero|flip|abs\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: false,\n pixelsPerPoint: () => 3,\n containerClass: () => \"netdata-container\",\n },\n google: {\n // initialize: window.NETDATA.googleInitialize,\n // create: window.NETDATA.googleChartCreate,\n // update: window.NETDATA.googleChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result.rows$\"),\n format: \"datatable\",\n options: () => \"\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 300\n // },\n trackColors: false,\n pixelsPerPoint: () => 4,\n containerClass: () => \"netdata-container\",\n },\n d3pie: {\n // initialize: window.NETDATA.d3pieInitialize,\n // create: window.NETDATA.d3pieChartCreate,\n // update: window.NETDATA.d3pieChartUpdate,\n // resize: null,\n // setSelection: window.NETDATA.d3pieSetSelection,\n // clearSelection: window.NETDATA.d3pieClearSelection,\n hasToolboxPanAndZoom: false,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result.data$\"),\n format: \"json\",\n hasLegend: () => false,\n options: () => \"objectrows|ms\",\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: false,\n pixelsPerPoint: () => 15,\n containerClass: () => \"netdata-container\",\n },\n // d3: {\n // initialize: window.NETDATA.d3Initialize,\n // create: window.NETDATA.d3ChartCreate,\n // update: window.NETDATA.d3ChartUpdate,\n // resize: null,\n // setSelection: undefined, // function(state, t) { void(state); return true; },\n // clearSelection: undefined, // function(state) { void(state); return true; },\n // toolboxPanAndZoom: null,\n // initialized: false,\n // enabled: true,\n // xssRegexIgnore: new RegExp(\"^/api/v1/data\\.result.data$\"),\n // format(state) {\n // void (state)\n // return \"json\"\n // },\n // options(state) {\n // void (state)\n // return \"\"\n // },\n // legend(state) {\n // void (state)\n // return null\n // },\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n // track_colors(state) {\n // void (state)\n // return false\n // },\n // pixels_per_point(state) {\n // void (state)\n // return 3\n // },\n // container_class(state) {\n // void (state)\n // return \"netdata-container\"\n // },\n // },\n easypiechart: {\n // initialize: window.NETDATA.easypiechartInitialize,\n // create: window.NETDATA.easypiechartChartCreate,\n // update: window.NETDATA.easypiechartChartUpdate,\n // resize: null,\n // setSelection: window.NETDATA.easypiechartSetSelection,\n // clearSelection: window.NETDATA.easypiechartClearSelection,\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"array\",\n options() {\n return \"absolute\"\n },\n hasLegend() {\n return false\n },\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: true,\n pixelsPerPoint: () => 3,\n aspectRatio: 100,\n containerClass: () => \"netdata-container-easypiechart\",\n },\n gauge: {\n // initialize: window.NETDATA.gaugeInitialize,\n // create: window.NETDATA.gaugeChartCreate,\n // update: window.NETDATA.gaugeChartUpdate,\n // resize: null,\n // setSelection: window.NETDATA.gaugeSetSelection,\n // clearSelection: window.NETDATA.gaugeClearSelection,\n hasToolboxPanAndZoom: false,\n // initialized: false,\n // enabled: true,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n format: \"array\",\n options: () => \"absolute\",\n hasLegend: () => false,\n // autoresize(state) {\n // void (state)\n // return false\n // },\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n trackColors: true,\n pixelsPerPoint: () => 3,\n aspectRatio: 60,\n containerClass: () => \"netdata-container-gauge\",\n },\n textonly: {\n // autoresize(state) {\n // void (state)\n // return false\n // },\n containerClass: () => \"netdata-container\",\n // create: window.NETDATA.textOnlyCreate,\n // enabled: true,\n format: \"array\",\n // initialized: true,\n // initialize(callback) {\n // callback()\n // },\n hasLegend: () => false,\n // max_updates_to_recreate(state) {\n // void (state)\n // return 5000\n // },\n options: () => \"absolute\",\n pixelsPerPoint: () => 3,\n trackColors: false,\n // update: window.NETDATA.textOnlyUpdate,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n },\n groupbox: {\n containerClass: () => \"netdata-container\",\n hasLegend: () => false,\n options: () => \"absolute\",\n format: \"json\",\n trackColors: false,\n pixelsPerPoint: () => 3,\n xssRegexIgnore: new RegExp(\"^/api/v1/data.result$\"),\n },\n}\n","import { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { chartLibrariesSettings } from \"domains/chart/utils/chartLibrariesSettings\"\n\nexport const getChartURLOptions = (\n attributes: Attributes, shouldEliminateZeroDimensions: boolean,\n) => {\n const {\n appendOptions,\n overrideOptions,\n } = attributes\n let ret = \"\"\n\n ret += overrideOptions\n ? overrideOptions.toString()\n : chartLibrariesSettings[attributes.chartLibrary].options(attributes)\n\n if (typeof appendOptions === \"string\") {\n ret += `|${encodeURIComponent(appendOptions)}`\n }\n\n ret += \"|jsonwrap\"\n\n if (shouldEliminateZeroDimensions) {\n ret += \"|nonzero\"\n }\n\n if (attributes.dimensionsAggrMethod === \"sum-of-abs\"\n || (!attributes.dimensionsAggrMethod && attributes.groupBy && attributes.groupBy !== \"dimension\")\n ) {\n ret += \"|absolute\"\n }\n\n return ret\n}\n","export const BIGGEST_INTERVAL_NUMBER = 2 ** 31 - 1\n","import React from \"react\"\n\nimport { Icon } from \"components/icon\"\n\ninterface Props {\n containerNode: HTMLElement\n hasEmptyData: boolean\n}\n\nexport const Loader = ({\n containerNode,\n hasEmptyData,\n}: Props) => {\n // below is 90% of original logic.\n // since it rerenders when IntersectionObserver turns the chart back on,\n // it's not that important to detect screen height and container sizes changes\n const screenHeight = window.screen.height\n\n // normally we want a font size, as tall as the element\n let h = containerNode.clientHeight\n\n // but give it some air, 20% let's say, or 5 pixels min\n const lost = Math.max(h * 0.2, 5)\n h -= lost\n\n // center the text, vertically\n let paddingTop = (lost - 5) / 2\n\n // but check the width too\n // it should fit 10 characters in it\n const w = containerNode.clientWidth / 10\n if (h > w) {\n paddingTop += (h - w) / 2\n h = w\n }\n\n // and don't make it too huge\n // 5% of the screen size is good\n if (h > screenHeight / 20) {\n paddingTop += (h - (screenHeight / 20)) / 2\n h = screenHeight / 20\n }\n\n const label = hasEmptyData ? \" empty\" : \" netdata\"\n const iconType = hasEmptyData ? \"noData\" : \"loading\"\n\n return (\n <div\n className=\"netdata-message icon\"\n style={{\n fontSize: h,\n paddingTop,\n }}\n >\n <Icon iconType={iconType} />\n {label}\n </div>\n )\n}\n","type GetPanAndZoomStep = (event: React.MouseEvent) => number\nexport const getPanAndZoomStep: GetPanAndZoomStep = (event) => {\n if (event.ctrlKey) {\n return window.NETDATA.options.current.pan_and_zoom_factor\n * window.NETDATA.options.current.pan_and_zoom_factor_multiplier_control\n } if (event.shiftKey) {\n return window.NETDATA.options.current.pan_and_zoom_factor\n * window.NETDATA.options.current.pan_and_zoom_factor_multiplier_shift\n } if (event.altKey) {\n return window.NETDATA.options.current.pan_and_zoom_factor\n * window.NETDATA.options.current.pan_and_zoom_factor_multiplier_alt\n }\n return window.NETDATA.options.current.pan_and_zoom_factor\n}\n","export const safeEqualCheck = (a: unknown, b: unknown) => {\n if (a === b) {\n return true\n }\n return Number.isNaN(a as number) && Number.isNaN(b as number)\n}\n","import { identity } from \"ramda\"\nimport {\n useCallback, useState, useMemo, useRef,\n} 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 } 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 convertUnits: Converter, intlNumberFormat: Intl.NumberFormat | null, valueDecimalDetail: number,\n) => (value: number | string | null) => {\n if (typeof value !== \"number\") {\n return \"-\"\n }\n\n const convertedValue = convertUnits(value)\n if (typeof convertedValue !== \"number\") {\n return convertedValue\n }\n\n if (intlNumberFormat !== null) {\n return intlNumberFormat.format(convertedValue)\n }\n\n let dmin\n let dmax\n if (valueDecimalDetail !== -1) {\n dmin = valueDecimalDetail\n dmax = valueDecimalDetail\n } else {\n dmin = 0\n const abs = (convertedValue < 0) ? -convertedValue : convertedValue\n if (abs > 1000) {\n dmax = 0\n } else if (abs > 10) {\n dmax = 1\n } else if (abs > 1) {\n dmax = 2\n } else if (abs > 0.1) {\n dmax = 2\n } else if (abs > 0.01) {\n dmax = 4\n } else if (abs > 0.001) {\n dmax = 5\n } else if (abs > 0.0001) {\n dmax = 6\n } else {\n dmax = 7\n }\n }\n\n return fastNumberFormat(dmin, dmax).format(convertedValue)\n}\n\ntype LegendFormatValue = (value: string | number | null) => string | number\n\ninterface Arguments {\n attributes: Attributes,\n data: ChartData,\n units: string,\n unitsCommon: string | undefined,\n unitsDesired: string,\n uuid: string,\n}\nexport const useFormatters = ({\n attributes,\n data,\n units,\n unitsCommon,\n unitsDesired,\n uuid,\n}: Arguments) => {\n const temperatureSetting = useSelector(selectTemperatureSetting)\n const secondsAsTimeSetting = useSelector(selectSecondsAsTimeSetting)\n\n // previously _unitsConversion\n const [convertUnits, setConvertUnits] = useState<Converter>(() => identity)\n\n // probably can also be removed\n const [min, setMin] = useState<number>()\n const [max, setMax] = useState<number>()\n\n // todo most of this state is not needed, that hook can be refractored\n const [unitsCurrent, setUnitsCurrent] = useState<string>(units)\n\n const [decimals, setDecimals] = useState<number>(-1)\n const [intlNumberFormat, setIntlNumberFormat] = useState<Intl.NumberFormat | null>(null)\n\n const {\n // \"valueDecimalDetail\" in old app\n decimalDigits = -1,\n } = attributes\n\n\n const legendFormatValue: LegendFormatValue = useMemo(() => (\n getLegendFormatValue(\n convertUnits, intlNumberFormat, decimalDigits,\n )\n ), [convertUnits, decimalDigits, intlNumberFormat])\n\n\n const legendFormatValueRef = useRef(legendFormatValue)\n const updateLegendFormatValueRef = (\n newConvertUnits: Converter, newIntlNumberFormat: any, newDecimalDigits: any,\n ) => {\n legendFormatValueRef.current = getLegendFormatValue(\n newConvertUnits, newIntlNumberFormat, newDecimalDigits,\n )\n }\n\n const legendFormatValueDecimalsFromMinMax = useCallback((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, newMin, newMax, units, unitsDesired, unitsCommon,\n (switchedUnits) => {\n setUnitsCurrent(switchedUnits)\n // that.legendSetUnitsString(that.units_current);\n // that.legendSetUnitsString just populates some DOM with unitsCurrent\n // on all occurences just take the unitsCurrent from this state\n }, temperatureSetting, secondsAsTimeSetting,\n )\n\n // as function, so useState() interpretes it properly\n setConvertUnits(() => newConvertUnits)\n\n const convertedMin = newConvertUnits(newMin)\n const convertedMax = newConvertUnits(newMax)\n\n if (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\n let newIntlNumberFormat = intlNumberFormat\n\n if (newDecimals !== decimals) {\n if (newDecimals < 0) {\n newIntlNumberFormat = null\n } else {\n newIntlNumberFormat = fastNumberFormat(\n newDecimals,\n newDecimals,\n )\n }\n setIntlNumberFormat(() => newIntlNumberFormat)\n setDecimals(newDecimals)\n }\n updateLegendFormatValueRef(newConvertUnits, newIntlNumberFormat, newDecimals)\n return legendFormatValueRef.current\n }, [\n decimals, decimalDigits, min, max, uuid, temperatureSetting,\n units, unitsDesired, unitsCommon, secondsAsTimeSetting,\n data.min, data.max, intlNumberFormat,\n ])\n\n\n return {\n legendFormatValue,\n legendFormatValueDecimalsFromMinMax,\n unitsCurrent,\n }\n}\n","const defaultColor = {\n r: 255,\n g: 0,\n b: 0,\n}\n\ntype ColorHex2Rgb = (hex: string) => {\n r: number,\n g: number,\n b: number\n}\nexport const colorHex2Rgb: ColorHex2Rgb = (hex) => {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i\n if (!hex) {\n return defaultColor\n }\n const hexFull = hex.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b)\n\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hexFull)\n if (!result) {\n console.warn(\"wrong color format:\", hex) // eslint-disable-line no-console\n }\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n } : defaultColor\n}\n","import styled from \"styled-components\"\nimport { getSizeBy } from \"@netdata/netdata-ui\"\n\nexport const LegendContainer = styled.div`\n margin-bottom: ${getSizeBy(3)};\n padding-left: 35px;\n`\n\nexport const LegendFirstRow = styled.div`\n margin-top: 4px;\n display: flex;\n justify-content: space-between;\n`\n\nexport const LegendSecondRow = styled.div`\n margin-top: 4px;\n display: flex;\n justify-content: space-between;\n`\n\nexport const LegendUnit = styled.div`\n`\n\nexport const DateTimeSeparator = styled.span`\n margin: 0 3px;\n`\n\nexport const LegendItems = styled.div`\n display: flex;\n flex-wrap: wrap;\n overflow: auto;\n max-height: 80px;\n`\n\nexport const DimensionItem = styled.div<{ color: string, isDisabled: boolean }>`\n display: flex;\n align-items: center;\n color: ${({ color }) => color};\n margin-right: 12px;\n cursor: pointer;\n opacity: ${({ isDisabled }) => (isDisabled ? 0.3 : null)};\n user-select: none;\n font-size: 11px;\n &:focus {\n outline: none;\n }\n`\n\n// toolbox is based on \"absolute\", so to make sure it's not put on top of dimension-item\n// let's put a transparent block as last in dimension-items container. Toolbox will soon be moved\n// to other place so it's temporary\nexport const DimensionItemToolboxPlaceholder = styled.div`\n width: 140px;\n height: 20px;\n`\n\nexport const DimensionIcon = styled.div<{ color: string }>`\n width: 14px;\n height: 7px;\n border-radius: 4px;\n overflow: hidden;\n background-color: ${({ color }) => color};\n`\n\nexport const DimensionLabel = styled.span`\n margin-left: 3px;\n`\n\nexport const DimensionValue = styled.span`\n margin-left: 5px;\n min-width: 30px;\n`\n\nexport const ToolboxContainer = styled.div`\n position: relative;\n touch-action: none;\n`\n","import React, { useCallback } from \"react\"\nimport { createSelector } from \"reselect\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\nimport { DimensionLabel } from \"./chart-legend-bottom.styled\"\n\nconst emptyObject = {}\n\nconst selector = createSelector(\n selectChartData,\n ({ dimension_names: dimensionNames, keys = emptyObject }) => ({\n dimensionNames,\n keys,\n })\n)\n\nconst LegendText = ({ id, index }) => {\n const { dimensionNames, keys } = useSelector(useCallback(state => selector(state, { id }), [id]))\n const { chart, node } = keys\n\n if (chart && node && Object.keys(keys).length === 2) {\n return (\n <DimensionLabel>\n {chart[index]}@{node[index]}\n </DimensionLabel>\n )\n }\n\n const name = dimensionNames[index]\n\n return <DimensionLabel>{name}</DimensionLabel>\n}\n\nexport default LegendText\n","import React, { Fragment, useRef, useEffect, useCallback } from \"react\"\nimport classNames from \"classnames\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\n\nimport { colorHex2Rgb } from \"utils/color-hex-2-rgb\"\nimport { useDateTime } from \"utils/date-time\"\n\nimport { legendResolutionTooltip, legendPluginModuleString } from \"../utils/legend-utils\"\n\nimport { ChartMetadata } from \"../chart-types\"\nimport LegendText from \"./legendText\"\n\ninterface Props {\n chartUuid: string\n chartMetadata: ChartMetadata\n chartLibrary: string\n colors: {\n [key: string]: string\n }\n hoveredRow: number\n hoveredX: number | null\n legendFormatValue: (value: number | string | null) => (number | string)\n onDimensionClick: (clickedDimensionName: string, event: React.MouseEvent) => void\n selectedDimensions: string[]\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewBefore: number\n}\n\nexport const ChartLegendRight = ({\n chartUuid,\n chartMetadata,\n chartLibrary,\n colors,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n onDimensionClick,\n selectedDimensions,\n showLatestOnBlur,\n unitsCurrent,\n viewBefore,\n}: Props) => {\n const chartData = useSelector(\n useCallback((state: any) => selectChartData(state, { id: chartUuid }), [chartUuid])\n )\n const { dimension_names: dimensionNames, dimension_ids: dimensionIds } = chartData\n\n // todo handle also this case:\n // const netdataLast = chartData.last_entry * 1000\n // const dataUpdateEvery = chartData.view_update_every * 1000\n // showUndefined = Math.abs(netdataLast - viewBefore) > dataUpdateEvery\n // (showUndefined also when difference between last and before is bigger than granularity)\n const showUndefined = hoveredRow === -1 && !showLatestOnBlur\n\n // todo support timezone\n const legendDate = new Date(hoveredX || viewBefore)\n\n // todo make a possibility to add chartLegened when there's not chartData\n // (if this situation is possible)\n\n // @ts-ignore ignoring because options.current has inconsistent structure\n const colorFillOpacity = window.NETDATA.options.current[\n `color_fill_opacity_${chartMetadata.chart_type}`\n ]\n\n const { localeDateString, localeTimeString } = useDateTime()\n\n const scrollbarRef = useRef(null)\n useEffect(() => {\n if (scrollbarRef.current) {\n window.Ps.initialize(scrollbarRef.current, {\n wheelSpeed: 0.2,\n wheelPropagation: true,\n swipePropagation: true,\n minScrollbarLength: null,\n maxScrollbarLength: null,\n useBothWheelAxes: false,\n suppressScrollX: true,\n suppressScrollY: false,\n scrollXMarginOffset: 0,\n scrollYMarginOffset: 0,\n theme: \"default\",\n })\n }\n }, [scrollbarRef])\n\n return (\n <div className={classNames(\n \"netdata-chart-legend\",\n `netdata-${chartLibrary}-legend`,\n )}\n >\n <span\n className=\"netdata-legend-title-date\"\n title={legendPluginModuleString(true, chartMetadata)}\n >\n {showUndefined\n ? legendPluginModuleString(false, chartMetadata)\n : localeDateString(legendDate)}\n </span>\n <br />\n <span\n className=\"netdata-legend-title-time\"\n title={legendResolutionTooltip(chartData, chartMetadata)}\n >\n {showUndefined\n ? chartMetadata.context.toString()\n : localeTimeString(legendDate)}\n </span>\n <br />\n <span className=\"netdata-legend-title-units\">{unitsCurrent}</span>\n <br />\n <div className=\"netdata-legend-series\" ref={scrollbarRef}>\n <div className=\"netdata-legend-series-content\">\n {dimensionIds.map((dimensionId, i) => {\n const dimensionName = dimensionNames[i]\n // todo dimension could be a separate component\n const color = colors[dimensionName]\n const rgb = colorHex2Rgb(color)\n\n const isSelected = selectedDimensions.length === 0\n || selectedDimensions.includes(dimensionName)\n\n let value\n if (showUndefined) {\n value = null\n } else if (hoveredRow !== -1) {\n const hoveredValueArray = chartData.result.data[hoveredRow]\n // [timestamp, valueDim1, valueDim2, ...]\n value = hoveredValueArray ? hoveredValueArray[i + 1] : null\n } else {\n value = chartData.view_latest_values[i]\n }\n\n return (\n <Fragment key={dimensionId}>\n {i !== 0 && <br />}\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <span\n title={dimensionName}\n className={classNames(\n \"netdata-legend-name\",\n isSelected ? \"selected\" : \"not-selected\",\n )}\n onClick={(event) => {\n onDimensionClick(dimensionName, event)\n }}\n role=\"button\"\n style={{ color }}\n tabIndex={0}\n >\n <table\n className={`netdata-legend-name-table-${chartMetadata.chart_type}`}\n style={{\n backgroundColor: `rgba(${rgb.r},${rgb.g},${rgb.b},${colorFillOpacity})`,\n }}\n >\n <tbody>\n <tr className=\"netdata-legend-name-tr\">\n <td className=\"netdata-legend-name-td\" />\n </tr>\n </tbody>\n </table>\n {\" \"}\n <LegendText id={chartUuid} index={i} />\n </span>\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\n <span\n title={dimensionName}\n className={classNames(\n \"netdata-legend-value\",\n !isSelected && \"hidden\",\n )}\n onClick={(event) => {\n onDimensionClick(dimensionName, event)\n }}\n role=\"button\"\n style={{ color }} // omitted !important during refractor, react doesn't support it\n tabIndex={0}\n >\n {legendFormatValue(\n value,\n )}\n </span>\n </Fragment>\n )\n })}\n </div>\n </div>\n </div>\n )\n}\n","import React, { useCallback } from \"react\"\nimport { useDateTime } from \"utils/date-time\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\nimport { legendPluginModuleString, legendResolutionTooltip } from \"domains/chart/utils/legend-utils\"\nimport { ChartMetadata } from \"../chart-types\"\nimport LegendText from \"./legendText\"\nimport * as S from \"./chart-legend-bottom.styled\"\ninterface Props {\n chartUuid: string\n chartMetadata: ChartMetadata\n chartLibrary: string\n colors: {\n [key: string]: string\n }\n hoveredRow: number\n hoveredX: number | null\n legendFormatValue: (value: number | string | null) => number | string\n onDimensionClick: (clickedDimensionName: string, event: React.MouseEvent) => void\n selectedDimensions: string[]\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewBefore: number\n legendToolbox: JSX.Element\n resizeHandler: React.ReactNode\n}\n\nexport const ChartTimeframe = ({\n chartMetadata,\n showUndefined,\n hoveredX,\n viewBefore,\n chartData,\n}: any) => {\n const { localeDateString, localeTimeString } = useDateTime()\n\n const legendDate = new Date(hoveredX || viewBefore)\n\n return (\n <div>\n <span title={legendPluginModuleString(true, chartMetadata)}>\n {showUndefined\n ? legendPluginModuleString(false, chartMetadata)\n : localeDateString(legendDate)}\n </span>\n <S.DateTimeSeparator>|</S.DateTimeSeparator>\n <span title={legendResolutionTooltip(chartData, chartMetadata)}>\n {showUndefined ? chartMetadata.context.toString() : localeTimeString(legendDate)}\n </span>\n </div>\n )\n}\n\nexport const ChartLegendBottom = ({\n chartUuid,\n chartMetadata,\n colors,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n onDimensionClick,\n selectedDimensions,\n showLatestOnBlur,\n unitsCurrent,\n viewBefore,\n legendToolbox,\n resizeHandler,\n}: Props) => {\n const showUndefined = hoveredRow === -1 && !showLatestOnBlur\n const chartData = useSelector(\n useCallback((state: any) => selectChartData(state, { id: chartUuid }), [chartUuid])\n )\n const { dimension_names: dimensionNames, dimension_ids: dimensionIds } = chartData\n\n return (\n <S.LegendContainer>\n <S.LegendFirstRow>\n <S.LegendUnit>{unitsCurrent}</S.LegendUnit>\n <ChartTimeframe\n chartMetadata={chartMetadata}\n showUndefined={showUndefined}\n hoveredX={hoveredX}\n viewBefore={viewBefore}\n chartData={chartData}\n />\n </S.LegendFirstRow>\n <S.LegendSecondRow>\n <S.LegendItems>\n {dimensionIds.map((dimensionId, i) => {\n const dimensionName = dimensionNames[i]\n const color = colors[dimensionName]\n\n const isSelected =\n selectedDimensions.length === 0 || selectedDimensions.includes(dimensionName)\n\n let value\n if (showUndefined) {\n value = null\n } else if (hoveredRow !== -1) {\n const hoveredValueArray = chartData.result.data[hoveredRow]\n // [timestamp, valueDim1, valueDim2, ...]\n value = hoveredValueArray ? hoveredValueArray[i + 1] : null\n } else {\n value = chartData.view_latest_values[i]\n }\n return (\n <S.DimensionItem\n color={color}\n onClick={event => {\n onDimensionClick(dimensionName, event)\n }}\n role=\"button\"\n tabIndex={0}\n isDisabled={!isSelected}\n key={dimensionId}\n >\n <S.DimensionIcon title={dimensionName} color={color} />\n <LegendText id={chartUuid} index={i} />\n <S.DimensionValue>{isSelected && legendFormatValue(value)}</S.DimensionValue>\n </S.DimensionItem>\n )\n })}\n <S.DimensionItemToolboxPlaceholder />\n </S.LegendItems>\n <S.ToolboxContainer>\n {legendToolbox}\n {resizeHandler}\n </S.ToolboxContainer>\n </S.LegendSecondRow>\n </S.LegendContainer>\n )\n}\n","import React, { useCallback } from \"react\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectChartData } from \"domains/chart/selectors\"\nimport { getNewSelectedDimensions } from \"domains/chart/utils/legend-utils\"\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport { ChartMetadata } from \"../chart-types\"\n\nimport { ChartLegendRight } from \"./chart-legend-right\"\nimport { ChartLegendBottom } from \"./chart-legend-bottom\"\n\ninterface Props {\n attributes: Attributes\n chartUuid: string\n chartMetadata: ChartMetadata\n chartLibrary: string\n colors: {\n [key: string]: string\n }\n hoveredRow: number\n hoveredX: number | null\n legendFormatValue: (value: number | string | null) => number | string\n selectedDimensions: string[]\n setSelectedDimensions: (selectedDimensions: string[]) => void\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewBefore: number\n legendToolbox: JSX.Element\n resizeHandler: React.ReactNode\n}\n\nexport const ChartLegend = ({\n attributes,\n chartUuid,\n chartMetadata,\n chartLibrary,\n colors,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n selectedDimensions,\n setSelectedDimensions,\n showLatestOnBlur,\n unitsCurrent,\n viewBefore,\n legendToolbox,\n resizeHandler,\n}: Props) => {\n const dimension_names = useSelector(\n useCallback((state: any) => selectChartData(state, { id: chartUuid }).dimension_names, [\n chartUuid,\n ])\n )\n\n const onDimensionClick = (clickedDimensionName: string, event: React.MouseEvent) => {\n event.preventDefault()\n const isModifierKeyPressed = event.shiftKey || event.ctrlKey\n const newSelectedDimensions = getNewSelectedDimensions({\n allDimensions: dimension_names,\n selectedDimensions,\n clickedDimensionName,\n isModifierKeyPressed,\n })\n setSelectedDimensions(newSelectedDimensions)\n }\n\n if (attributes.legendPosition === \"bottom\") {\n return (\n <ChartLegendBottom\n chartUuid={chartUuid}\n chartLibrary={chartLibrary}\n chartMetadata={chartMetadata}\n colors={colors}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n legendFormatValue={legendFormatValue}\n onDimensionClick={onDimensionClick}\n selectedDimensions={selectedDimensions}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewBefore={viewBefore}\n legendToolbox={legendToolbox}\n resizeHandler={resizeHandler}\n />\n )\n }\n\n return (\n <ChartLegendRight\n chartUuid={chartUuid}\n chartLibrary={chartLibrary}\n chartMetadata={chartMetadata}\n colors={colors}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n legendFormatValue={legendFormatValue}\n onDimensionClick={onDimensionClick}\n selectedDimensions={selectedDimensions}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewBefore={viewBefore}\n />\n )\n}\n","import React from \"react\"\n\nimport { ToolboxButton } from \"./toolbox-button\"\n\ntype ClickCallback = (event: React.MouseEvent) => void\ninterface Props {\n onToolboxLeftClick: ClickCallback\n onToolboxRightClick: ClickCallback\n onToolboxZoomInClick: ClickCallback\n onToolboxZoomOutClick: ClickCallback\n}\nexport const LegendToolbox = ({\n onToolboxLeftClick,\n onToolboxRightClick,\n onToolboxZoomInClick,\n onToolboxZoomOutClick,\n}: Props) => (\n <div className=\"netdata-legend-toolbox\">\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxLeftClick}\n iconType=\"left\"\n popoverTitle=\"Pan Left\"\n popoverContent=\"Pan the chart to the left. You can also <b>drag it</b> with your mouse or your\n finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>\"\n />\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxRightClick}\n iconType=\"right\"\n popoverTitle=\"Pan Right\"\n popoverContent=\"Pan the chart to the right. You can also <b>drag it</b> with your mouse or\n your finger (on touch devices).<br/><small>Help can be disabled from the settings.</small>\"\n />\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxZoomInClick}\n iconType=\"zoomIn\"\n popoverTitle=\"Chart Zoom In\"\n popoverContent=\"Zoom in the chart. You can also press SHIFT and select an area of the chart,\n or press SHIFT or ALT and use the mouse wheel or 2-finger touchpad scroll to zoom in or out.\n <br/><small>Help can be disabled from the settings.</small>\"\n />\n <ToolboxButton\n className=\"netdata-legend-toolbox-button\"\n onClick={onToolboxZoomOutClick}\n iconType=\"zoomOut\"\n popoverTitle=\"Chart Zoom Out\"\n popoverContent=\"Zoom out the chart. You can also press SHIFT or ALT and use the mouse wheel,\n or 2-finger touchpad scroll to zoom in or out.<br/><small>Help can be disabled from the\n settings.</small>\"\n />\n </div>\n)\n","/* eslint-disable no-nested-ternary */\nimport { always, memoizeWith } from \"ramda\"\nimport Color from \"color\"\n\nimport { ChartMetadata, DygraphData } from \"domains/chart/chart-types\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartLibraryConfig } from \"domains/chart/utils/chartLibrariesSettings\"\n\nexport const getDataForFakeStacked = (\n data: number[][],\n dimensionsVisibility: boolean[],\n): number[][] => data.map((point) => {\n const [timestamp, ...values] = point\n const rest: number[] = []\n let currentMin = 0\n let currentMax = 0\n values\n .map((value, i) => ({ isVisible: dimensionsVisibility[i], value }))\n // reverse because first dimensions should be \"on top\" (at least positive ones)\n .slice().reverse()\n .forEach(({ isVisible, value }) => {\n if (!isVisible) {\n rest.push(0) // push with value '0'. it won't be visible but needs to be present in array\n return\n }\n if (value >= 0) {\n currentMax += value\n rest.push(currentMax)\n } else {\n currentMin += value\n rest.push(currentMin)\n }\n })\n return [\n timestamp,\n ...rest,\n ]\n})\n\nconst isPercentage = (unit: string) => unit === \"percentage\"\n || unit === \"percent\"\n || unit.indexOf(\"%\") !== -1\n\nexport const getDygraphChartType = (\n attributes: Attributes, chartData: DygraphData, chartMetadata: ChartMetadata,\n chartSettings: ChartLibraryConfig,\n) => {\n const isLogScale = (chartSettings.isLogScale as ((a: Attributes) => boolean))(attributes)\n const {\n dygraphType: dygraphRequestedType = chartMetadata.chart_type,\n groupBy,\n } = attributes\n\n if (groupBy && groupBy !== \"dimension\" && isPercentage(chartMetadata.units)) {\n return \"line\"\n }\n\n // corresponds to state.tmp.dygraph_chart_type in old app\n let dygraphChartType = dygraphRequestedType\n if (dygraphChartType === \"stacked\" && chartData.dimensions === 1) {\n dygraphChartType = \"area\"\n }\n if (dygraphChartType === \"stacked\" && isLogScale) {\n dygraphChartType = \"area\"\n }\n return dygraphChartType\n}\n\nconst getBackgroundColor = memoizeWith(\n always(\"true\"),\n () => Color(window.NETDATA.themes.current.background),\n)\n// when in \"fakeStacked\" mode, we cannot use opacity for fill in charts, because the areas would\n// be visible under each other. So the darkening / whitening needs to be added directly to colors\n// (the colors are too saturated for areas and in stacked mode they were with 0.8 opacity)\nexport const transformColors = (colors: string[]) => (\n colors.map((color) => Color(color).mix(getBackgroundColor(), 0.2).hex())\n)\n\nexport const getDygraphFillAlpha = (\n isFakeStacked: boolean, dygraphChartType: string,\n) => (isFakeStacked\n ? window.NETDATA.options.current.color_fill_opacity_fake_stacked\n : dygraphChartType === \"stacked\"\n ? window.NETDATA.options.current.color_fill_opacity_stacked\n : window.NETDATA.options.current.color_fill_opacity_area)\n\n\n// https://github.com/danvk/dygraphs/blob/master/src/iframe-tarp.js#L1-L23\n// On mouseUp dygraphs put rectangles above all iframes so mouseUp can be properly intercepted.\n// this causes a problem with some analytics iframes that place themselves in regions where they\n// aren't visible anyway (for example hubspot iframe on Cloud), and this creates a problematic\n// horizontal scrollbar to appear. This function filters those \"rectangles\" (tarps) to omit\n// elements with unreachable \"left\" styles\nexport const hackDygraphIFrameTarps = (tarps: HTMLDivElement[]): HTMLDivElement[] => (\n tarps.filter((element: HTMLDivElement) => {\n const isOutsideReasonableViewport = Number(element.style.left.replace(\"px\", \"\")) > 10000\n if (isOutsideReasonableViewport) {\n element.parentNode!.removeChild(element)\n }\n return !isOutsideReasonableViewport\n })\n)\n","/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable function-paren-newline */\n/* eslint-disable comma-dangle */\nimport React, { useRef, useCallback } from \"react\"\nimport { useToggle } from \"react-use\"\n\nconst useProceededChart = (\n chartRef: any,\n propsRef: any\n): [boolean, React.Ref<HTMLElement>, (g: Dygraph) => void] => {\n const [proceeded, toggleProceeded] = useToggle(false)\n\n const ref = useRef<HTMLElement>(null)\n\n const updatePosition = useCallback((g: Dygraph) => {\n const { x } = g.getArea()\n const distance = g.toDomXCoord(propsRef.current.chartData.first_entry * 1000)\n const hasProceeded = distance > x\n toggleProceeded(hasProceeded)\n\n if (hasProceeded && ref.current) {\n const { height } = chartRef.current.getBoundingClientRect()\n ref.current.style.left = `${x}px`\n ref.current.style.right = `calc(100% - ${distance}px)`\n ref.current.style.top = `${height / 2}px`\n }\n }, [])\n\n return [proceeded, ref, updatePosition]\n}\n\nexport default useProceededChart\n","import { useRef } from \"react\"\nimport { useToggle } from \"react-use\"\n\nconst badgeTopMargin = \"40px\"\n\nconst defaultPositionTo = (ref, x, position, topMargin) => {\n ref.current.style.left = `${x}px`\n ref.current.style.right = `calc(100% - ${position}px)`\n ref.current.style.top = topMargin\n}\n\nexport default () => {\n const [isRendered, toggleIsRendered] = useToggle(false)\n\n const ref = useRef(null)\n\n const updatePosition = (isVisible, g, position, positionTo = defaultPositionTo) => {\n if (!isVisible) {\n toggleIsRendered(false)\n return\n }\n\n if (ref.current) {\n toggleIsRendered(true)\n const { x } = g.getArea()\n\n positionTo(ref, x, position, badgeTopMargin)\n }\n }\n\n return [isRendered, ref, updatePosition]\n}\n","import React, { forwardRef } from \"react\"\nimport styled from \"styled-components\"\n\nconst Container = styled.div`\n display: block;\n`\n\nconst ProceededChartDisclaimer = forwardRef((\n props: React.HTMLAttributes<HTMLElement>,\n ref: React.Ref<HTMLDivElement>,\n) => (\n <Container ref={ref} className=\"dygraph__history-tip\" data-testid=\"proceededChartDisclaimer\">\n <span className=\"dygraph__history-tip-content\">\n Want to extend your history of real-time metrics?\n <br />\n <a href=\"https://learn.netdata.cloud/guides/longer-metrics-storage/\" target=\"_blank\" rel=\"noopener noreferrer\" data-testid=\"proceededChartDisclaimer-configure\">\n Configure Netdata's \n <b>history</b>\n </a>\n or use the \n <a href=\"https://learn.netdata.cloud/docs/agent/database/engine/\" target=\"_blank\" rel=\"noopener noreferrer\" data-testid=\"proceededChartDisclaimer-engine\">DB engine</a>\n .\n </span>\n </Container>\n))\n\nexport default ProceededChartDisclaimer\n","import React, { forwardRef } from \"react\"\nimport styled from \"styled-components\"\n\nconst backgroundColorMap = {\n WARNING: \"#FFF8E1\",\n CRITICAL: \"#FFEBEF\",\n CLEAR: \"#E5F5E8\",\n}\nexport const getBackgroundColor = (status) => backgroundColorMap[status] || null\n\nconst borderColorMap = {\n WARNING: \"#FFC300\",\n CRITICAL: \"#F59B9B\",\n CLEAR: \"#68C47D\",\n}\nexport const getBorderColor = (status) => borderColorMap[status] || null\n\nconst textColorMap = {\n WARNING: \"#536775\",\n CRITICAL: \"#FF4136\",\n CLEAR: \"#00AB44\",\n}\nexport const getColor = (status) => textColorMap[status] || null\n\nconst Container = styled.div`\n position: absolute;\n margin-right: 10px;\n overflow: hidden;\n pointer-events: none;\n direction: rtl;\n z-index: 10; // higher than chart\n`\n\nconst Badge = styled.div`\n display: inline-block;\n border-radius: 36px;\n padding: 2px 12px;\n background: ${({ background }) => background};\n border: 1px solid ${({ border }) => border};\n color: ${({ color }) => color};\n font-size: 12px;\n font-weight: 700;\n direction: ltr;\n white-space: nowrap;\n`\n\nexport default forwardRef((\n { isVisible, status, label },\n ref,\n) => (\n <Container ref={ref}>\n {isVisible && (\n <Badge\n background={getBackgroundColor(status)}\n border={getBorderColor(status)}\n color={getColor(status)}\n >\n {label}\n </Badge>\n )}\n </Container>\n))\n","import React, { forwardRef } from \"react\"\nimport styled from \"styled-components\"\nimport { getColor } from \"@netdata/netdata-ui\"\n\nconst Container = styled.div`\n position: absolute;\n margin-right: 10px;\n overflow: hidden;\n pointer-events: none;\n direction: rtl;\n z-index: 10;\n`\n\nconst Badge = styled.div`\n display: inline-block;\n border-radius: 36px;\n padding: 2px 12px;\n background: ${getColor(\"mainBackground\")};\n border: 1px solid ${getColor(\"border\")};\n color: ${getColor(\"text\")};\n font-size: 12px;\n font-weight: 700;\n direction: ltr;\n white-space: nowrap;\n`\n\nconst minTimeframe = 15\nconst maxTimeframe = 180\n\nconst getMissingTime = total => {\n if (total < minTimeframe) return \" (Select at least 15 sec)\"\n if (total > maxTimeframe) return \" (Select up to 180 sec)\"\n return \"\"\n}\n\nconst NeutralPill = forwardRef((\n { isVisible, before, after },\n ref,\n) => {\n const total = (before - after) / 1000\n return (\n <Container ref={ref}>\n {isVisible && (\n <Badge>\n {Math.round(total)} sec.{getMissingTime(total)}\n </Badge>\n )}\n </Container>\n )\n})\n\nexport default NeutralPill\n","//@ts-nocheck\nimport { sortBy, reverse } from \"ramda\"\nimport React, {\n useLayoutEffect, useRef, useCallback, useState,\n} from \"react\"\nimport classNames from \"classnames\"\nimport { useUpdateEffect, useUnmount, useMount } from \"react-use\"\n// this version is needed because it contains a fix for handling constant value in the chart\n// ie. https://github.com/danvk/dygraphs/pull/909\nimport Dygraph from \"vendor/dygraph-c91c859.min\"\nimport \"dygraphs/src-es5/extras/smooth-plotter\"\nimport ResizeObserver from \"resize-observer-polyfill\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { AppStateT } from \"store/app-state\"\nimport { DygraphArea, NetdataDygraph } from \"types/vendor-overrides\"\nimport { TimeRange } from \"types/common\"\nimport { useDateTime } from \"utils/date-time\"\nimport { debounce } from \"utils/debounce\"\nimport { hasHashParam } from \"utils/hash-utils\"\n\nimport {\n selectCommonMin,\n selectCommonMax,\n selectGlobalChartUnderlay,\n selectGlobalSelectionMaster,\n selectSmoothPlot,\n selectSyncPanAndZoom,\n selectSpacePanelTransitionEndIsActive,\n selectAlarm,\n selectTimezoneSetting\n} from \"domains/global/selectors\"\nimport {\n resetGlobalPanAndZoomAction, setCommonMaxAction, setCommonMinAction,\n setGlobalPauseAction, resetGlobalPauseAction\n} from \"domains/global/actions\"\n\nimport { resetChartPanAndZoomAction } from \"domains/chart/actions\"\n\nimport { Attributes } from \"../../utils/transformDataAttributes\"\nimport {\n chartLibrariesSettings,\n ChartLibraryConfig,\n ChartLibraryName,\n} from \"../../utils/chartLibrariesSettings\"\nimport { ChartMetadata, DygraphData } from \"../../chart-types\"\nimport { selectResizeHeight } from \"../../selectors\"\n\nimport {\n getDygraphChartType, getDataForFakeStacked, transformColors, getDygraphFillAlpha,\n hackDygraphIFrameTarps,\n} from \"./dygraph/utils\"\nimport \"./dygraph-chart.css\"\n\nimport useProceededChart from \"../../hooks/use-proceeded-chart\"\nimport useDygraphBadge from \"../../hooks/useDygraphBadge\"\nimport ProceededChartDisclaimer from \"./proceeded-chart-disclaimer\"\nimport AlarmBadge, { getBorderColor } from \"./alarmBadge\"\nimport NeutralPill from \"./neutralPill\"\n\n// This is the threshold above which we assume chart shown duration has changed\nconst timeframeThreshold = 5000\nconst dygraphResizeDebounceTime = 500\n\ntype IsInRangeOfAvailableData = (props: {\n after: number, before: number, chartData: DygraphData,\n}) => boolean\nconst isInRangeOfAvailableData: IsInRangeOfAvailableData = ({ after, before, chartData }) => (\n after >= (chartData.first_entry * 1000) && before <= (chartData.last_entry * 1000)\n)\n\ninterface GetInitialDygraphOptions {\n attributes: Attributes,\n chartData: DygraphData,\n chartMetadata: ChartMetadata,\n chartSettings: ChartLibraryConfig,\n dimensionsVisibility: boolean[]\n hiddenLabelsElementId: string,\n isFakeStacked: boolean,\n orderedColors: string[],\n setMinMax: (minMax: TimeRange) => void\n shouldSmoothPlot: boolean,\n unitsCurrent: string,\n xAxisDateString: (d: Date) => string,\n xAxisTimeString: (d: Date) => string,\n}\nconst getInitialDygraphOptions = ({\n attributes,\n chartData,\n chartMetadata,\n chartSettings,\n dimensionsVisibility,\n hiddenLabelsElementId,\n isFakeStacked,\n orderedColors,\n setMinMax,\n shouldSmoothPlot,\n unitsCurrent,\n xAxisDateString,\n xAxisTimeString,\n}: GetInitialDygraphOptions) => {\n const isSparkline = attributes.dygraphTheme === \"sparkline\"\n const highlightCircleSize = isSparkline ? 3 : 4\n\n const isLogScale = (chartSettings.isLogScale as ((a: Attributes) => boolean))(attributes)\n const dygraphChartType = getDygraphChartType(attributes, chartData, chartMetadata, chartSettings)\n const {\n dygraphSmooth = dygraphChartType === \"line\"\n && !isSparkline,\n dygraphDrawAxis = true,\n legendPosition,\n } = attributes\n const isLegendOnBottom = legendPosition === \"bottom\"\n const {\n // destructuring with default values\n dygraphColors = orderedColors,\n dygraphRightGap = 5,\n dygraphShowRangeSelector = false,\n dygraphShowRoller = false,\n dygraphTitle = attributes.title || chartMetadata.title,\n dygraphTitleHeight = 19,\n dygraphLegend = \"always\",\n dygraphLabelsDiv = hiddenLabelsElementId,\n dygraphLabelsSeparateLine = true,\n dygraphIncludeZero = dygraphChartType === \"stacked\",\n dygraphShowZeroValues = true,\n dygraphShowLabelsOnHighLight = true,\n dygraphHideOverlayOnMouseOut = true,\n dygraphXRangePad = 0,\n dygraphYRangePad = 1,\n dygraphValueRange = [null, null],\n dygraphYLabelWidth = 12,\n // eslint-disable-next-line no-nested-ternary\n dygraphStrokeWidth = dygraphChartType === \"stacked\"\n ? 0.1\n : (dygraphSmooth === true\n ? 1.5\n : 0.7),\n\n dygraphStrokePattern,\n dygraphDrawPoints = false,\n dygraphDrawGapEdgePoints = true,\n dygraphConnectSeparatedPoints = false,\n dygraphPointSize = 1,\n dygraphStepPlot = false,\n dygraphStrokeBorderColor = window.NETDATA.themes.current.background,\n dygraphStrokeBorderWidth = 0,\n dygraphFillGraph = (dygraphChartType === \"area\" || dygraphChartType === \"stacked\"),\n dygraphFillAlpha = getDygraphFillAlpha(isFakeStacked, dygraphChartType),\n dygraphStackedGraph = dygraphChartType === \"stacked\" && !isFakeStacked,\n dygraphStackedGraphNanFill = \"none\",\n dygraphAxisLabelFontSize = 10,\n dygraphAxisLineColor = window.NETDATA.themes.current.axis,\n dygraphAxisLineWidth = 1.0,\n dygraphDrawGrid = true,\n dygraphGridLinePattern,\n dygraphGridLineWidth = 1.0,\n dygraphGridLineColor = window.NETDATA.themes.current.grid,\n dygraphMaxNumberWidth = 8,\n dygraphSigFigs,\n dygraphDigitsAfterDecimal = 2,\n dygraphHighlighCircleSize = highlightCircleSize,\n dygraphHighlightSeriesOpts,\n dygraphHighlightSeriesBackgroundAlpha,\n\n dygraphXPixelsPerLabel = 50,\n dygraphXAxisLabelWidth = 60,\n dygraphDrawXAxis = dygraphDrawAxis,\n dygraphYPixelsPerLabel = 15,\n dygraphYAxisLabelWidth = isLegendOnBottom ? 30 : 50,\n dygraphDrawYAxis = dygraphDrawAxis,\n } = attributes\n return {\n colors: isFakeStacked ? transformColors(reverse(dygraphColors)) : dygraphColors,\n\n // leave a few pixels empty on the right of the chart\n rightGap: isSparkline ? 0 : dygraphRightGap,\n showRangeSelector: dygraphShowRangeSelector,\n showRoller: dygraphShowRoller,\n title: isSparkline ? undefined : dygraphTitle,\n titleHeight: dygraphTitleHeight,\n legend: dygraphLegend, // we need this to get selection events\n labels: chartData.result.labels,\n labelsDiv: dygraphLabelsDiv,\n\n labelsSeparateLines: isSparkline ? true : dygraphLabelsSeparateLine,\n labelsShowZeroValues: isLogScale ? false : dygraphShowZeroValues,\n labelsKMB: false,\n labelsKMG2: false,\n showLabelsOnHighlight: dygraphShowLabelsOnHighLight,\n hideOverlayOnMouseOut: dygraphHideOverlayOnMouseOut,\n includeZero: dygraphIncludeZero,\n xRangePad: dygraphXRangePad,\n yRangePad: isSparkline ? 1 : dygraphYRangePad,\n valueRange: dygraphValueRange,\n ylabel: (isSparkline || isLegendOnBottom) ? undefined : unitsCurrent,\n yLabelWidth: (isSparkline || isLegendOnBottom) ? 0 : dygraphYLabelWidth,\n\n // the function to plot the chart\n plotter: (dygraphSmooth && shouldSmoothPlot) ? window.smoothPlotter : null,\n\n // The width of the lines connecting data points.\n // This can be used to increase the contrast or some graphs.\n strokeWidth: dygraphStrokeWidth,\n strokePattern: dygraphStrokePattern,\n\n // The size of the dot to draw on each point in pixels (see drawPoints).\n // A dot is always drawn when a point is \"isolated\",\n // i.e. there is a missing point on either side of it.\n // This also controls the size of those dots.\n drawPoints: dygraphDrawPoints,\n\n // Draw points at the edges of gaps in the data.\n // This improves visibility of small data segments or other data irregularities.\n drawGapEdgePoints: dygraphDrawGapEdgePoints,\n connectSeparatedPoints: isLogScale ? false : dygraphConnectSeparatedPoints,\n pointSize: dygraphPointSize,\n\n // enabling this makes the chart with little square lines\n stepPlot: dygraphStepPlot,\n\n // Draw a border around graph lines to make crossing lines more easily\n // distinguishable. Useful for graphs with many lines.\n strokeBorderColor: dygraphStrokeBorderColor,\n strokeBorderWidth: dygraphStrokeBorderWidth,\n fillGraph: dygraphFillGraph,\n fillAlpha: dygraphFillAlpha,\n stackedGraph: dygraphStackedGraph,\n stackedGraphNaNFill: dygraphStackedGraphNanFill,\n drawAxis: isSparkline ? false : dygraphDrawAxis,\n axisLabelFontSize: dygraphAxisLabelFontSize,\n axisLineColor: dygraphAxisLineColor,\n axisLineWidth: dygraphAxisLineWidth,\n drawGrid: isSparkline ? false : dygraphDrawGrid,\n gridLinePattern: dygraphGridLinePattern,\n gridLineWidth: dygraphGridLineWidth,\n gridLineColor: dygraphGridLineColor,\n maxNumberWidth: dygraphMaxNumberWidth,\n sigFigs: dygraphSigFigs,\n digitsAfterDecimal: dygraphDigitsAfterDecimal,\n highlightCircleSize: dygraphHighlighCircleSize,\n highlightSeriesOpts: dygraphHighlightSeriesOpts, // TOO SLOW: { strokeWidth: 1.5 },\n // TOO SLOW: (state.tmp.dygraph_chart_type === 'stacked')?0.7:0.5,\n highlightSeriesBackgroundAlpha: dygraphHighlightSeriesBackgroundAlpha,\n visibility: dimensionsVisibility,\n logscale: isLogScale,\n\n axes: {\n x: {\n pixelsPerLabel: dygraphXPixelsPerLabel,\n // unsufficient typings for Dygraph\n // @ts-ignore\n ticker: Dygraph.dateTicker,\n axisLabelWidth: dygraphXAxisLabelWidth,\n drawAxis: isSparkline ? false : dygraphDrawXAxis,\n axisLabelFormatter: (d: Date | number) => ((d as Date).toTimeString().startsWith(\"00:00:00\")\n ? xAxisDateString(d as Date)\n : xAxisTimeString(d as Date)\n ),\n },\n y: {\n logscale: isLogScale,\n pixelsPerLabel: dygraphYPixelsPerLabel,\n axisLabelWidth: dygraphYAxisLabelWidth,\n drawAxis: isSparkline ? false : dygraphDrawYAxis,\n // axisLabelFormatter is added on the updates\n axisLabelFormatter(y: Date | number) {\n const formatter = setMinMax([\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n this.axes_[0].extremeRange[0],\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n this.axes_[0].extremeRange[1],\n ]) as unknown as ((value: Date | number) => string)\n return formatter(y as number)\n },\n },\n },\n }\n}\n\ninterface Props {\n attributes: Attributes\n chartData: DygraphData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n chartLibrary: ChartLibraryName\n chartUuid: string\n colors: {\n [key: string]: string\n }\n dimensionsVisibility: boolean[]\n hasEmptyData: boolean\n hasLegend: boolean\n isRemotelyControlled: boolean\n onUpdateChartPanAndZoom: (arg: {\n after: number, before: number,\n callback: (after: number, before: number) => void,\n masterID: string,\n shouldNotExceedAvailableRange: boolean,\n }) => void\n orderedColors: string[]\n immediatelyDispatchPanAndZoom: () => void\n\n hoveredRow: number\n hoveredX: number | null\n setGlobalChartUnderlay: (arg: { after: number, before: number, masterID: string }) => void\n setHoveredX: (hoveredX: number | null, noMaster?: boolean) => void\n setMinMax: (minMax: TimeRange) => void\n unitsCurrent: string\n viewAfter: number\n viewBefore: number\n}\nexport const DygraphChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n chartLibrary,\n // colors,\n chartUuid,\n dimensionsVisibility,\n hasEmptyData,\n hasLegend,\n isRemotelyControlled,\n onUpdateChartPanAndZoom,\n orderedColors,\n immediatelyDispatchPanAndZoom,\n\n hoveredRow,\n hoveredX,\n setGlobalChartUnderlay,\n setHoveredX,\n setMinMax,\n unitsCurrent,\n viewAfter,\n viewBefore,\n}: Props) => {\n const globalChartUnderlay = useSelector(selectGlobalChartUnderlay)\n const selectedAlarm = useSelector(selectAlarm)\n const alarm = selectedAlarm?.chartId === chartData.id ? selectedAlarm : null\n\n const timezone = useSelector(selectTimezoneSetting)\n\n const { xAxisDateString, xAxisTimeString } = useDateTime()\n const chartSettings = chartLibrariesSettings[chartLibrary]\n const hiddenLabelsElementId = `${chartUuid}-hidden-labels-id`\n\n const dygraphChartType = getDygraphChartType(attributes, chartData, chartMetadata, chartSettings)\n // isFakeStacked - is a special mode for displaying stacked charts with both positive and negative\n // values. Dygraph.js doesn't support it so in this case we need to sum the values manually\n // and display the chart as \"area\" type, but with keeping all styling (fill etc.) properties\n // as in \"stacked\" type\n // because first values need to be \"on top\" (at least for positive values), the dimension order\n // needs to be reversed (in getDataForFakeStacked function and when assigning dimension colors)\n const isFakeStacked = chartData.min < 0 && dygraphChartType === \"stacked\"\n const dygraphFillAlpha = getDygraphFillAlpha(isFakeStacked, dygraphChartType)\n\n const chartElement = useRef<HTMLDivElement>(null)\n\n const updateChartPanOrZoom = useCallback(({\n after, before,\n callback,\n shouldNotExceedAvailableRange,\n }) => {\n onUpdateChartPanAndZoom({\n after,\n before,\n callback,\n masterID: chartUuid,\n shouldNotExceedAvailableRange,\n })\n }, [chartUuid, onUpdateChartPanAndZoom])\n\n // keep in ref to prevent additional updates\n const dygraphInstance = useRef<Dygraph | null>()\n // state.tmp.dygraph_user_action in old dashboard\n const latestIsUserAction = useRef(false)\n // state.tmp.dygraph_mouse_down in old dashboard\n const isMouseDown = useRef(false)\n // state.tmp.dygraph_highlight_after in old dashboard\n const dygraphHighlightAfter = useRef<null | number>(null)\n // state.dygraph_last_touch_move in old dashboard\n const dygraphLastTouchMove = useRef(0)\n // state.dygraph_last_touch_page_x in old dashboard\n const dygraphLastTouchPageX = useRef(0)\n // state.dygraph_last_touch_end in old dashboard\n const dygraphLastTouchEnd = useRef<undefined | number>()\n\n const dispatch = useDispatch()\n const isSyncPanAndZoom = useSelector(selectSyncPanAndZoom)\n\n const resetGlobalPanAndZoom = useCallback(() => {\n latestIsUserAction.current = false // prevent starting panAndZoom\n if (dygraphInstance.current) {\n // todo on toolbox reset click, do updateOptions({ dateWindow: null })\n // (issue existed also before rewrite)\n dygraphInstance.current.updateOptions({\n // reset dateWindow to the current\n // @ts-ignore external typings dont support null\n dateWindow: null,\n })\n }\n\n if (isSyncPanAndZoom) {\n dispatch(resetGlobalPanAndZoomAction())\n } else {\n dispatch(resetChartPanAndZoomAction({ id: chartUuid }))\n }\n }, [chartUuid, dispatch, isSyncPanAndZoom])\n\n const [isAlarmBadgeVisible, alarmBadgeRef, updateAlarmBadge] = useDygraphBadge() as any\n const [isHighlightBadgeVisible, highlightBadgeRef, updateHighlightBadge] = useDygraphBadge() as any\n\n // setGlobalChartUnderlay is using state from closure (chartData.after), so we need to have always\n // the newest callback. Unfortunately we cannot use Dygraph.updateOptions() (library restriction)\n // for interactionModel callbacks so we need to keep the callback in mutable ref\n const propsRef = useRef({\n alarm,\n chartData,\n globalChartUnderlay,\n hoveredX,\n immediatelyDispatchPanAndZoom,\n // put it to ref to prevent additional updateOptions() after creating dygraph\n resetGlobalPanAndZoom,\n setGlobalChartUnderlay,\n updateAlarmBadge,\n updateHighlightBadge,\n updateChartPanOrZoom,\n viewAfter,\n viewBefore,\n })\n\n const [\n isProceeded, precededChartRef, updatePrecededPosition,\n ] = useProceededChart(chartElement, propsRef)\n\n useLayoutEffect(() => {\n propsRef.current.alarm = alarm\n propsRef.current.chartData = chartData\n propsRef.current.hoveredX = hoveredX\n propsRef.current.immediatelyDispatchPanAndZoom = immediatelyDispatchPanAndZoom\n propsRef.current.globalChartUnderlay = globalChartUnderlay\n propsRef.current.resetGlobalPanAndZoom = resetGlobalPanAndZoom\n propsRef.current.setGlobalChartUnderlay = setGlobalChartUnderlay\n propsRef.current.updateAlarmBadge = updateAlarmBadge\n propsRef.current.updateHighlightBadge = updateHighlightBadge\n propsRef.current.updateChartPanOrZoom = updateChartPanOrZoom\n propsRef.current.viewAfter = viewAfter\n propsRef.current.viewBefore = viewBefore\n }, [alarm, chartData, globalChartUnderlay, hoveredX, immediatelyDispatchPanAndZoom,\n resetGlobalPanAndZoom, setGlobalChartUnderlay, updateAlarmBadge, updateHighlightBadge, updateChartPanOrZoom, viewAfter, viewBefore])\n\n const [localHighlight, setLocalHighlight] = useState<{before?: number, after?: number} | null>(null)\n\n const shouldSmoothPlot = useSelector(selectSmoothPlot)\n useLayoutEffect(() => {\n if (chartElement && chartElement.current && !dygraphInstance.current && !hasEmptyData) {\n const dygraphOptionsStatic = getInitialDygraphOptions({\n attributes,\n chartData,\n chartMetadata,\n chartSettings,\n dimensionsVisibility,\n hiddenLabelsElementId,\n isFakeStacked,\n orderedColors,\n setMinMax,\n shouldSmoothPlot,\n unitsCurrent,\n xAxisDateString,\n xAxisTimeString,\n })\n\n latestIsUserAction.current = false\n\n const dygraphOptions = {\n ...dygraphOptionsStatic,\n // set dateWindow on init - this is needed when chart is globalPanAndZoom-master\n // and user scrolls down/up so the chart hides and then unhides. This causes the chart\n // to re-create, but the data has additional padding which should be outside of\n // visible range\n dateWindow: [propsRef.current.viewAfter, propsRef.current.viewBefore],\n\n highlightCallback(\n event: MouseEvent, xval: number,\n ) {\n // todo\n // state.pauseChart()\n\n const newHoveredX = isMouseDown.current\n ? null\n : xval\n\n const currentHoveredX = propsRef.current.hoveredX\n if (newHoveredX !== currentHoveredX) {\n setHoveredX(newHoveredX)\n }\n },\n\n unhighlightCallback() {\n // todo\n // state.unpauseChart();\n if (propsRef.current.hoveredX !== null) {\n setHoveredX(null)\n }\n },\n drawCallback(dygraph: Dygraph) {\n // the user has panned the chart and this is called to re-draw the chart\n // 1. refresh this chart by adding data to it\n // 2. notify all the other charts about the update they need\n\n // to prevent an infinite loop (feedback), we use\n // state.tmp.dygraph_user_action\n // - when true, this is initiated by a user\n // - when false, this is feedback\n\n if (latestIsUserAction.current) {\n latestIsUserAction.current = false\n const xRange = dygraph.xAxisRange()\n const after = Math.round(xRange[0])\n const before = Math.round(xRange[1])\n\n if (isInRangeOfAvailableData({\n after, before, chartData: propsRef.current.chartData,\n })) {\n propsRef.current.updateChartPanOrZoom({ after, before })\n }\n }\n },\n zoomCallback: (minDate: number, maxDate: number) => {\n latestIsUserAction.current = true\n propsRef.current.updateChartPanOrZoom({ after: minDate, before: maxDate })\n },\n\n underlayCallback(canvas: CanvasRenderingContext2D, area: DygraphArea, g: Dygraph) {\n updatePrecededPosition(g)\n\n if (propsRef.current.alarm) {\n const { alarm: currentAlarm } = propsRef.current\n\n const alarmPosition = g.toDomXCoord(currentAlarm.when * 1000)\n const fillColor = getBorderColor(currentAlarm.status)\n const horizontalPadding = 3\n // use RAF, because dygraph doesn't provide any callback called after drawing the chart\n requestAnimationFrame(() => {\n canvas.fillStyle = fillColor\n const globalAlphaCache = canvas.globalAlpha\n canvas.globalAlpha = 0.7\n canvas.fillRect(alarmPosition - horizontalPadding, area.y, 2 * horizontalPadding, area.h)\n canvas.globalAlpha = globalAlphaCache\n })\n\n propsRef.current.updateAlarmBadge(\n propsRef.current.alarm,\n g,\n alarmPosition - horizontalPadding,\n )\n }\n\n const onMetricsCorralation = hasHashParam(\"metrics_correlation\")\n if (onMetricsCorralation && propsRef.current.globalChartUnderlay) {\n const { before, masterID } = propsRef.current.globalChartUnderlay\n\n if (masterID && masterID !== propsRef.current.chartData.id) {\n propsRef.current.updateHighlightBadge(false)\n } else {\n const horizontalPadding = 3\n\n propsRef.current.updateHighlightBadge(\n true,\n g,\n g.toDomXCoord(before),\n (pillRef, pillX, pillPosition, topMargin) => {\n pillRef.current.style.left = `${pillPosition + horizontalPadding}px`\n pillRef.current.style.top = topMargin\n }\n )\n }\n } else {\n propsRef.current.updateHighlightBadge(false)\n }\n\n // the chart is about to be drawn\n // this function renders global highlighted time-frame\n\n if (propsRef.current.globalChartUnderlay) {\n const { after, before } = propsRef.current.globalChartUnderlay\n\n if (after < before) {\n const HIGHLIGHT_HORIZONTAL_PADDING = 20\n const bottomLeft = g.toDomCoords(after, -HIGHLIGHT_HORIZONTAL_PADDING)\n const topRight = g.toDomCoords(before, HIGHLIGHT_HORIZONTAL_PADDING)\n\n const left = bottomLeft[0]\n const right = topRight[0]\n\n // eslint-disable-next-line no-param-reassign\n canvas.fillStyle = window.NETDATA.themes.current.highlight\n canvas.fillRect(left, area.y, right - left, area.h)\n }\n }\n },\n\n // interactionModel cannot be replaced with updateOptions(). we need to keep all changing\n // values and callbacks in mutable ref,\n interactionModel: {\n mousedown(event: MouseEvent, dygraph: Dygraph, context: any) {\n // Right-click should not initiate anything.\n if (event.button && event.button === 2) {\n return\n }\n\n latestIsUserAction.current = true\n isMouseDown.current = true\n context.initializeMouseDown(event, dygraph, context)\n\n // limit problematic dygraph's feature, more info above the function\n // eslint-disable-next-line no-param-reassign\n context.tarp.tarps = hackDygraphIFrameTarps(context.tarp.tarps)\n\n dispatch(setGlobalPauseAction())\n\n if (event.button && event.button === 1) {\n // middle mouse button\n\n if (event.shiftKey) {\n // panning\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startPan(event, dygraph, context)\n } else if (event.altKey || event.ctrlKey || event.metaKey) {\n // middle mouse button highlight\n dygraphHighlightAfter.current = dygraph.toDataXCoord(event.offsetX)\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n } else {\n // middle mouse button selection for zoom\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n }\n } else if (event.shiftKey) {\n // left mouse button selection for zoom (ZOOM)\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n } else if (event.altKey || event.ctrlKey || event.metaKey) {\n // left mouse button highlight\n dygraphHighlightAfter.current = dygraph.toDataXCoord(event.offsetX)\n // @ts-ignore\n Dygraph.startZoom(event, dygraph, context)\n } else {\n // left mouse button dragging (PAN)\n dygraphHighlightAfter.current = null\n // @ts-ignore\n Dygraph.startPan(event, dygraph, context)\n }\n },\n\n mousemove(event: MouseEvent, dygraph: Dygraph, context: any) {\n // if (state.tmp.dygraph_highlight_after !== null) {\n // else if (\n if (dygraphHighlightAfter.current !== null) {\n // highlight selection\n latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.moveZoom(event, dygraph, context)\n\n const onMetricsCorralation = hasHashParam(\"metrics_correlation\")\n if (onMetricsCorralation) {\n const before = dygraph.toDataXCoord(event.offsetX)\n const after = dygraphHighlightAfter.current\n if (before - after > 1000) { // more than a sec\n setLocalHighlight({\n after,\n before,\n })\n propsRef.current.updateHighlightBadge(\n true,\n dygraph,\n dygraph.toDomXCoord(before),\n (pillRef, pillX, pillPosition, topMargin) => {\n pillRef.current.style.left = `${pillPosition}px`\n pillRef.current.style.top = topMargin\n }\n )\n }\n }\n\n event.preventDefault()\n } else if (context.isPanning) {\n latestIsUserAction.current = true\n // eslint-disable-next-line no-param-reassign\n context.is2DPan = false\n // @ts-ignore\n Dygraph.movePan(event, dygraph, context)\n } else if (context.isZooming) {\n // @ts-ignore\n Dygraph.moveZoom(event, dygraph, context)\n }\n },\n\n mouseup(event: MouseEvent, dygraph: Dygraph, context: any) {\n isMouseDown.current = false\n if (dygraphHighlightAfter.current !== null) {\n const sortedRange = sortBy((x) => +x, [\n dygraphHighlightAfter.current,\n dygraph.toDataXCoord(event.offsetX),\n ])\n\n propsRef.current.setGlobalChartUnderlay({\n after: sortedRange[0],\n before: sortedRange[1],\n masterID: chartData.id,\n })\n dygraphHighlightAfter.current = null\n setLocalHighlight(null)\n // eslint-disable-next-line no-param-reassign\n context.isZooming = false\n\n // old dashboard code\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n dygraph.clearZoomRect_()\n // this call probably fixes the broken selection circle during highlighting\n // and forces underlayCallback to fire (and draw highlight-rect\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n dygraph.drawGraph_(false)\n } else if (context.isPanning) {\n\n latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.endPan(event, dygraph, context)\n propsRef.current.immediatelyDispatchPanAndZoom()\n } else if (context.isZooming) {\n\n latestIsUserAction.current = true\n // @ts-ignore\n Dygraph.endZoom(event, dygraph, context)\n propsRef.current.immediatelyDispatchPanAndZoom()\n }\n },\n\n wheel(event: WheelEvent, dygraph: Dygraph) {\n // Take the offset of a mouse event on the dygraph canvas and\n // convert it to a pair of percentages from the bottom left.\n // (Not top left, bottom is where the lower value is.)\n function offsetToPercentage(g: Dygraph, offsetX: number, offsetY: number) {\n // This is calculating the pixel offset of the leftmost date.\n const xOffset = g.toDomXCoord(g.xAxisRange()[0])\n const yar0 = g.yAxisRange(0)\n\n // This is calculating the pixel of the highest value. (Top pixel)\n const yOffset = g.toDomYCoord(yar0[1])\n\n // x y w and h are relative to the corner of the drawing area,\n // so that the upper corner of the drawing area is (0, 0).\n const x = offsetX - xOffset\n const y = offsetY - yOffset\n\n // This is computing the rightmost pixel, effectively defining the\n // width.\n // const w = g.toDomCoords(g.xAxisRange()[1], null)[0] - xOffset\n const w = g.toDomXCoord(g.xAxisRange()[1]) - xOffset\n\n // This is computing the lowest pixel, effectively defining the height.\n // const h = g.toDomCoords(null, yar0[0])[1] - yOffset\n const h = g.toDomYCoord(yar0[0]) - yOffset\n\n // Percentage from the left.\n const xPct = w === 0 ? 0 : (x / w)\n // Percentage from the top.\n const yPct = h === 0 ? 0 : (y / h)\n\n // The (1-) part below changes it from \"% distance down from the top\"\n // to \"% distance up from the bottom\".\n return [xPct, (1 - yPct)]\n }\n\n function adjustAxis(axis: [number, number], zoomInPercentage: number, bias: number) {\n const delta = axis[1] - axis[0]\n const increment = delta * zoomInPercentage\n const foo = [increment * bias, increment * (1 - bias)]\n\n return [axis[0] + foo[0], axis[1] - foo[1]]\n }\n\n // Adjusts [x, y] toward each other by zoomInPercentage%\n // Split it so the left/bottom axis gets xBias/yBias of that change and\n // tight/top gets (1-xBias)/(1-yBias) of that change.\n //\n // If a bias is missing it splits it down the middle.\n function zoomRange(g: Dygraph, zoomInPercentage: number, xBias: number, yBias: number) {\n const yAxes = g.yAxisRanges()\n const newYAxes = []\n for (let i = 0; i < yAxes.length; i += 1) {\n newYAxes[i] = adjustAxis(yAxes[i], zoomInPercentage, (yBias || 0.5))\n }\n\n return adjustAxis(g.xAxisRange(), zoomInPercentage, (xBias || 0.5))\n }\n\n if (event.altKey || event.shiftKey) {\n latestIsUserAction.current = true\n\n // http://dygraphs.com/gallery/interaction-api.js\n let normalDef\n // @ts-ignore\n if (typeof event.wheelDelta === \"number\" && !Number.isNaN(event.wheelDelta)) {\n // chrome\n // @ts-ignore\n normalDef = event.wheelDelta / 40\n } else {\n // firefox\n normalDef = event.deltaY * -1.2\n }\n\n const normal = (event.detail) ? event.detail * -1 : normalDef\n const percentage = normal / 50\n\n const percentages = offsetToPercentage(dygraph, event.offsetX, event.offsetY)\n const xPct = percentages[0]\n const yPct = percentages[1]\n\n const [after, before] = zoomRange(dygraph, percentage, xPct, yPct)\n\n propsRef.current.updateChartPanOrZoom({\n after,\n before,\n shouldNotExceedAvailableRange: true,\n callback: (updatedAfter: number, updatedBefore: number) => {\n dygraph.updateOptions({\n dateWindow: [updatedAfter, updatedBefore],\n })\n },\n })\n\n event.preventDefault()\n }\n },\n\n click(event: MouseEvent) {\n event.preventDefault()\n },\n\n dblclick() {\n dispatch(resetGlobalPauseAction({ forcePlay: false }))\n propsRef.current.resetGlobalPanAndZoom()\n },\n\n touchstart(event: TouchEvent, dygraph: Dygraph, context: any) {\n isMouseDown.current = true\n latestIsUserAction.current = true\n\n // todo\n // state.pauseChart()\n\n Dygraph.defaultInteractionModel.touchstart(event, dygraph, context)\n\n // we overwrite the touch directions at the end, to overwrite\n // the internal default of dygraph\n // eslint-disable-next-line no-param-reassign\n context.touchDirections = { x: true, y: false }\n\n dygraphLastTouchMove.current = 0\n\n if (typeof event.touches[0].pageX === \"number\") {\n dygraphLastTouchPageX.current = event.touches[0].pageX\n } else {\n dygraphLastTouchPageX.current = 0\n }\n },\n touchmove(event: TouchEvent, dygraph: Dygraph, context: any) {\n latestIsUserAction.current = true\n Dygraph.defaultInteractionModel.touchmove(event, dygraph, context)\n\n dygraphLastTouchMove.current = Date.now()\n },\n\n touchend(event: TouchEvent, dygraph: Dygraph, context: any) {\n isMouseDown.current = false\n latestIsUserAction.current = true\n Dygraph.defaultInteractionModel.touchend(event, dygraph, context)\n\n // if it didn't move, it is a selection\n if (dygraphLastTouchMove.current === 0 && dygraphLastTouchPageX.current !== 0\n && chartElement.current // this is just for TS\n ) {\n latestIsUserAction.current = false // prevent updating pan-and-zoom\n // internal api of dygraph\n // @ts-ignore\n // eslint-disable-next-line no-underscore-dangle\n const dygraphPlotter = dygraph.plotter_\n const pct = (dygraphLastTouchPageX.current - (\n dygraphPlotter.area.x + chartElement.current.getBoundingClientRect().left\n )) / dygraphPlotter.area.w\n\n const { current } = propsRef\n const t = Math.round(current.viewAfter\n + (current.viewBefore - current.viewAfter) * pct)\n // dont set \"master\" so the highlight is recalculated (to match existing row)\n setHoveredX(t, true)\n }\n\n // if it was double tap within double click time, reset the charts\n const now = Date.now()\n if (typeof dygraphLastTouchEnd.current !== \"undefined\") {\n if (dygraphLastTouchMove.current === 0) {\n const dt = now - dygraphLastTouchEnd.current\n if (dt <= window.NETDATA.options.current.double_click_speed) {\n propsRef.current.resetGlobalPanAndZoom()\n }\n }\n }\n\n // remember the timestamp of the last touch end\n dygraphLastTouchEnd.current = now\n propsRef.current.immediatelyDispatchPanAndZoom()\n },\n },\n }\n\n const data = isFakeStacked\n ? getDataForFakeStacked(chartData.result.data, dimensionsVisibility)\n : chartData.result.data\n const instance = new Dygraph((chartElement.current), data, dygraphOptions)\n dygraphInstance.current = instance\n }\n }, [attributes, chartData, chartMetadata, chartSettings, chartUuid, dimensionsVisibility,\n hasEmptyData, hiddenLabelsElementId, isFakeStacked,\n orderedColors, setHoveredX, setMinMax, shouldSmoothPlot, unitsCurrent,\n xAxisDateString, xAxisTimeString, updatePrecededPosition, dispatch])\n\n useUpdateEffect(() => {\n if (dygraphInstance.current) {\n const isSparkline = attributes.dygraphTheme === \"sparkline\"\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n dygraphInstance.current.updateOptions({\n ylabel: (isSparkline || isLegendOnBottom) ? undefined : unitsCurrent,\n })\n }\n }, [attributes, unitsCurrent])\n\n\n // immediately update when changing global chart underlay or currently showed alarm\n useUpdateEffect(() => {\n if (dygraphInstance.current) {\n dygraphInstance.current.updateOptions({})\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alarm, globalChartUnderlay])\n\n const spacePanelTransitionEndIsActive = useSelector(selectSpacePanelTransitionEndIsActive)\n useUpdateEffect(() => {\n if (dygraphInstance.current) {\n // dygraph always resizes on browser width change, but doesn't resize when the container\n // has different width.\n window.requestAnimationFrame(() => {\n if (dygraphInstance.current) {\n (dygraphInstance.current as NetdataDygraph).resize()\n }\n })\n }\n }, [spacePanelTransitionEndIsActive])\n\n // update data of the chart\n // first effect should only be made by new DygraphInstance()\n useUpdateEffect(() => {\n // dont update when there is no data - in this case we should still show old chart\n if (dygraphInstance.current && !hasEmptyData) {\n // todo support state.tmp.dygraph_force_zoom\n const forceDateWindow = [viewAfter, viewBefore]\n\n // in old dashboard, when chart needed to reset internal dateWindow state,\n // dateWindow was set to null, and new dygraph got the new dateWindow from results.\n // this caused small unsync between dateWindow of parent (master) and child charts\n // i also detected that forceDateWindow timestamps have slightly better performance (10%)\n // so if the chart needs to change local dateWindow, we'll always use timestamps instead of\n // null.\n\n const xAxisRange = dygraphInstance.current.xAxisRange()\n // eslint-disable-next-line max-len\n const hasChangedDuration = Math.abs((viewBefore - viewAfter) - (xAxisRange[1] - xAxisRange[0])) > timeframeThreshold\n\n // check if the time is relative\n const hasScrolledToTheFutureDuringPlayMode = viewBefore <= 0\n && (xAxisRange[1] > viewBefore)\n // if viewAfter is bigger than current dateWindow start, just reset dateWindow\n && (xAxisRange[0] > viewAfter)\n && !hasChangedDuration\n\n const optionsDateWindow = (isRemotelyControlled && !hasScrolledToTheFutureDuringPlayMode)\n ? { dateWindow: forceDateWindow }\n : {}\n\n const { dygraphColors = orderedColors } = attributes\n const file = isFakeStacked\n ? getDataForFakeStacked(chartData.result.data, dimensionsVisibility)\n : chartData.result.data\n\n const includeZero = dimensionsVisibility.length === 1 ||\n dimensionsVisibility.filter(x => x === true).length > 1\n\n dygraphInstance.current.updateOptions({\n ...optionsDateWindow,\n colors: isFakeStacked ? transformColors(reverse(dygraphColors)) : dygraphColors,\n file,\n labels: chartData.result.labels,\n fillAlpha: dygraphFillAlpha,\n ...(dygraphChartType === \"stacked\" ? { includeZero } : {}),\n stackedGraph: dygraphChartType === \"stacked\" && !isFakeStacked,\n // see explanation about reversing before isFakeStacked assignment\n visibility: isFakeStacked ? reverse(dimensionsVisibility) : dimensionsVisibility,\n })\n }\n }, [attributes, chartData.result, chartUuid, dimensionsVisibility, dygraphChartType,\n dygraphFillAlpha, hasEmptyData, isFakeStacked, isRemotelyControlled, orderedColors,\n viewAfter, viewBefore])\n\n useUpdateEffect(() => {\n if (!dygraphInstance.current) {\n return\n }\n\n const dygraphOptionsStatic = getInitialDygraphOptions({\n attributes,\n chartData,\n chartMetadata,\n chartSettings,\n dimensionsVisibility,\n hiddenLabelsElementId,\n isFakeStacked,\n orderedColors,\n setMinMax,\n shouldSmoothPlot,\n unitsCurrent,\n xAxisDateString,\n xAxisTimeString,\n })\n if (!hasEmptyData) dygraphInstance.current.updateOptions(dygraphOptionsStatic)\n }, [dygraphChartType, timezone])\n\n // set selection\n const currentSelectionMasterId = useSelector(selectGlobalSelectionMaster)\n useLayoutEffect(() => {\n if (dygraphInstance.current && currentSelectionMasterId !== chartUuid) {\n if (hoveredRow === -1) {\n // getSelection is 100 times faster that clearSelection\n if (dygraphInstance.current.getSelection() !== -1) {\n dygraphInstance.current.clearSelection()\n }\n return\n }\n dygraphInstance.current.setSelection(hoveredRow)\n }\n }, [chartData, chartUuid, currentSelectionMasterId, hoveredRow,\n viewAfter, viewBefore])\n\n\n // handle resizeHeight change\n const resizeHeight = useSelector(\n (state: AppStateT) => selectResizeHeight(state, { id: chartUuid }),\n )\n useLayoutEffect(() => {\n if (dygraphInstance.current) {\n (dygraphInstance.current as NetdataDygraph).resize()\n }\n }, [resizeHeight, chartData.dimension_names.length])\n\n\n const commonMinState = useSelector((state: AppStateT) => (\n attributes.commonMin\n ? selectCommonMin(state, attributes.commonMin)\n : undefined\n ))\n const commonMaxState = useSelector((state: AppStateT) => (\n attributes.commonMax\n ? selectCommonMax(state, attributes.commonMax)\n : undefined\n ))\n\n useLayoutEffect(() => {\n const { commonMin: commonMinKey, commonMax: commonMaxKey } = attributes\n\n if (\n dygraphInstance.current\n && (commonMinKey || commonMaxKey)\n ) {\n const extremes = (dygraphInstance.current as NetdataDygraph).yAxisExtremes()[0]\n const [currentMin, currentMax] = extremes\n\n const {\n dygraphValueRange = [null, null],\n } = attributes\n // if the user gave a valueRange, respect it\n const shouldUseCommonMin = dygraphValueRange[0] === null\n const shouldUseCommonMax = dygraphValueRange[1] === null\n\n\n let shouldUpdate = false\n let valueRange: number[] = [...extremes]\n\n // check if current extreme (painted by dygraph) is not more extreme than commonMin/Max\n // if yes - update the chart\n if (commonMinKey && shouldUseCommonMin) {\n if (commonMinState && commonMinState.currentExtreme < currentMin) {\n valueRange[0] = commonMinState.currentExtreme\n shouldUpdate = true\n }\n }\n if (commonMaxKey && shouldUseCommonMax) {\n if (commonMaxState && commonMaxState.currentExtreme > currentMax) {\n valueRange[1] = commonMaxState.currentExtreme\n shouldUpdate = true\n }\n }\n\n if (shouldUpdate) {\n dygraphInstance.current.updateOptions({ valueRange })\n const newExtremes = (dygraphInstance.current as NetdataDygraph).yAxisExtremes()[0]\n // get updated valueRange (rounded by dygraph)\n valueRange = [...newExtremes]\n }\n\n // if the value is different than the one stored in state, update redux state\n if (commonMinKey && shouldUseCommonMin\n && (valueRange[0] !== commonMinState?.charts[chartUuid])\n ) {\n dispatch(setCommonMinAction({ chartUuid, commonMinKey, value: valueRange[0] }))\n }\n if (commonMaxKey && shouldUseCommonMax\n && (valueRange[1] !== commonMaxState?.charts[chartUuid])\n ) {\n dispatch(setCommonMaxAction({ chartUuid, commonMaxKey, value: valueRange[1] }))\n }\n }\n }, [attributes, chartData.result, chartUuid, commonMinState, commonMaxState, dispatch])\n\n useLayoutEffect(() => {\n if (isProceeded && dygraphInstance.current) {\n updatePrecededPosition(dygraphInstance.current)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isProceeded])\n\n useUnmount(() => {\n if (dygraphInstance.current) {\n dygraphInstance.current.destroy()\n }\n })\n\n /**\n * resize with ResizeObserver\n */\n const resizeObserver = useRef<ResizeObserver>()\n useMount(() => {\n if (!attributes.detectResize) {\n return\n }\n // flag used to prevent first callback (and resize) on dygraph initial draw\n let hasOmitedFirstCallback = false\n const callbackDebounced = debounce(() => {\n if (!hasOmitedFirstCallback) {\n hasOmitedFirstCallback = true\n return\n }\n\n if (dygraphInstance.current) {\n (dygraphInstance.current as NetdataDygraph).resize()\n }\n }, dygraphResizeDebounceTime)\n\n resizeObserver.current = new ResizeObserver(() => {\n callbackDebounced()\n })\n resizeObserver.current.observe(chartElement.current as HTMLDivElement)\n })\n\n useUnmount(() => {\n dygraphInstance.current = null // clear it for debounce purposes\n if (resizeObserver.current) {\n resizeObserver.current.disconnect()\n }\n })\n\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n\n return (\n <>\n <div\n ref={chartElement}\n id={chartElementId}\n className={classNames(\n chartElementClassName,\n { \"dygraph-chart--legend-bottom\": isLegendOnBottom },\n )}\n />\n {isProceeded && hasLegend && (\n <ProceededChartDisclaimer ref={precededChartRef as React.Ref<HTMLDivElement>} />\n )}\n {alarm?.value && hasLegend && (\n // @ts-ignore\n <AlarmBadge isVisible={isAlarmBadgeVisible} ref={alarmBadgeRef} status={alarm.status} label={alarm.value} />\n )}\n {hasLegend && (\n // @ts-ignore\n <NeutralPill isVisible={isHighlightBadgeVisible} ref={highlightBadgeRef} {...globalChartUnderlay} {...localHighlight} />\n )}\n <div className=\"dygraph-chart__labels-hidden\" id={hiddenLabelsElementId} />\n </>\n )\n}\n","// https://gist.github.com/ca0v/73a31f57b397606c9813472f7493a940\n\nexport const debounce = <F extends (...args: any[]) => any>(func: F, waitFor: number) => {\n let timeout: ReturnType<typeof setTimeout> | null = null\n\n const debounced = (...args: Parameters<F>) => {\n if (timeout !== null) {\n clearTimeout(timeout)\n timeout = null\n }\n timeout = setTimeout(() => func(...args), waitFor)\n }\n\n return debounced as (...args: Parameters<F>) => ReturnType<F>\n}\n","import React, { useRef, useEffect, useState } from \"react\"\n// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport EasyPie from \"easy-pie-chart\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { ChartLibraryName } from \"domains/chart/utils/chartLibrariesSettings\"\nimport {\n always, cond, identity, T, sortBy, map, pipe,\n} from \"ramda\"\n\ntype GetPercentFromValueMinMax = (arg: {\n value: number | undefined\n min: number | undefined\n max: number | undefined\n isMinOverride: boolean\n isMaxOverride: boolean\n}) => number\nconst getPercentFromValueMinMax: GetPercentFromValueMinMax = ({\n value = 0, min = 0, max = 0,\n isMinOverride,\n isMaxOverride,\n}) => {\n /* eslint-disable no-param-reassign */\n // todo refractor old logic to readable functions\n // if no easyPiechart-min-value attribute\n if (!isMinOverride && min > 0) {\n min = 0\n }\n if (!isMaxOverride && max < 0) {\n max = 0\n }\n\n let pcent\n\n if (min < 0 && max > 0) {\n // it is both positive and negative\n // zero at the top center of the chart\n max = (-min > max) ? -min : max\n pcent = Math.round((value * 100) / max)\n } else if (value >= 0 && min >= 0 && max >= 0) {\n // clockwise\n pcent = Math.round(((value - min) * 100) / (max - min))\n if (pcent === 0) {\n pcent = 0.1\n }\n } else {\n // counter clockwise\n pcent = Math.round(((value - max) * 100) / (max - min))\n if (pcent === 0) {\n pcent = -0.1\n }\n }\n /* eslint-enable no-param-reassign */\n return pcent\n}\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n chartLibrary: ChartLibraryName\n chartUuid: string\n colors: {\n [key: string]: string\n }\n chartWidth: number\n dimensionsVisibility: boolean[]\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n onUpdateChartPanAndZoom: (arg: {\n after: number, before: number,\n callback: (after: number, before: number) => void,\n masterID: string,\n shouldNotExceedAvailableRange: boolean,\n }) => void\n orderedColors: string[]\n\n hoveredRow: number\n setGlobalChartUnderlay: (arg: { after: number, before: number, masterID: string }) => void\n setMinMax: (minMax: [number, number]) => void\n showUndefined: boolean\n unitsCurrent: string\n viewAfter: number\n viewBefore: number\n}\nexport const EasyPieChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n chartWidth,\n hoveredRow,\n legendFormatValue,\n orderedColors,\n setMinMax,\n showUndefined,\n unitsCurrent,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n const [chartInstance, setChartInstance] = useState()\n\n const valueIndex = hoveredRow === -1\n ? 0\n : (chartData.result.length - 1 - hoveredRow) // because data for easy-pie-chart are flipped\n const value = showUndefined ? null : chartData.result[valueIndex]\n\n const {\n // if this is set, then we're overriding commonMin\n easyPieChartMinValue: min = chartData.min, // todo replace with commonMin\n easyPieChartMaxValue: max = chartData.max, // todo replace with commonMax\n } = attributes\n\n // make sure the order is correct and that value is not outside those boundaries\n // (this check was present in old dashboard but perhaps it's not needed)\n const safeMinMax = pipe(\n map((x: number) => +x),\n sortBy(identity),\n ([_min, _max]: number[]) => [Math.min(_min, value || 0), Math.max(_max, value || 0)],\n )([min, max])\n\n useEffect(() => {\n setMinMax(safeMinMax as [number, number])\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [safeMinMax])\n\n const pcent = getPercentFromValueMinMax({\n value: showUndefined ? 0 : (value as number),\n min: safeMinMax[0],\n max: safeMinMax[1],\n isMinOverride: attributes.easyPieChartMinValue !== undefined,\n isMaxOverride: attributes.easyPieChartMaxValue !== undefined,\n })\n\n useEffect(() => {\n if (chartElement.current && !chartInstance) {\n const stroke = cond([\n [(v) => v < 3, always(2)],\n [T, identity],\n ])(Math.floor(chartWidth / 22))\n\n const {\n easyPieChartTrackColor = window.NETDATA.themes.current.easypiechart_track,\n easyPieChartScaleColor = window.NETDATA.themes.current.easypiechart_scale,\n easyPieChartScaleLength = 5,\n easyPieChartLineCap = \"round\",\n easyPieChartLineWidth = stroke,\n easyPieChartTrackWidth,\n easyPieChartSize = chartWidth,\n easyPieChartRotate = 0,\n easyPieChartAnimate = { duration: 500, enabled: true },\n easyPieChartEasing,\n } = attributes\n\n const newChartInstance = new EasyPie(chartElement.current, {\n barColor: orderedColors[0],\n trackColor: easyPieChartTrackColor,\n scaleColor: easyPieChartScaleColor,\n scaleLength: easyPieChartScaleLength,\n lineCap: easyPieChartLineCap,\n lineWidth: easyPieChartLineWidth,\n trackWidth: easyPieChartTrackWidth,\n size: easyPieChartSize,\n rotate: easyPieChartRotate,\n animate: easyPieChartAnimate,\n easing: easyPieChartEasing,\n })\n setChartInstance(newChartInstance)\n }\n }, [attributes, chartData, chartInstance, chartWidth, orderedColors])\n\n // update with value\n useEffect(() => {\n if (chartInstance) {\n const shouldUseAnimation = hoveredRow === -1 && !showUndefined\n\n if (shouldUseAnimation && !chartInstance.options.animate.enabled) {\n chartInstance.enableAnimation()\n } else if (!shouldUseAnimation && chartInstance.options.animate.enabled) {\n chartInstance.disableAnimation()\n }\n\n setTimeout(() => {\n // need to be in timeout to trigger animation properly\n chartInstance.update(pcent)\n }, 0)\n }\n }, [chartInstance, hoveredRow, pcent, showUndefined])\n\n const valueFontSize = (chartWidth * 2) / 3 / 5\n const valuetop = Math.round((chartWidth - valueFontSize - (chartWidth / 40)) / 2)\n\n const titleFontSize = Math.round((valueFontSize * 1.6) / 3)\n const titletop = Math.round(valuetop - (titleFontSize * 2) - (chartWidth / 40))\n\n const unitFontSize = Math.round(titleFontSize * 0.9)\n const unitTop = Math.round(valuetop + (valueFontSize + unitFontSize) + (chartWidth / 40))\n // to update, just label innerText and pcent are changed\n\n return (\n <div ref={chartElement} id={chartElementId} className={chartElementClassName}>\n <span\n className=\"easyPieChartLabel\"\n style={{\n fontSize: valueFontSize,\n top: valuetop,\n }}\n >\n {legendFormatValue(value)}\n </span>\n <span\n className=\"easyPieChartTitle\"\n style={{\n fontSize: titleFontSize,\n top: titletop,\n }}\n >\n {attributes.title || chartMetadata.title}\n </span>\n <span\n className=\"easyPieChartUnits\"\n style={{\n fontSize: unitFontSize,\n top: unitTop,\n }}\n >\n {unitsCurrent}\n </span>\n\n </div>\n )\n}\n","import React, {\n useRef, useEffect, useState,\n} from \"react\"\n// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport { Gauge } from \"gaugeJS\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { ChartLibraryName } from \"domains/chart/utils/chartLibrariesSettings\"\nimport {\n identity, sortBy, map, pipe, always,\n} from \"ramda\"\n\nconst isSetByUser = (x: undefined | number): x is number => (\n typeof x === \"number\"\n)\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n chartLibrary: ChartLibraryName\n chartUuid: string\n colors: {\n [key: string]: string\n }\n chartHeight: number\n chartWidth: number\n dimensionsVisibility: boolean[]\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n onUpdateChartPanAndZoom: (arg: {\n after: number, before: number,\n callback: (after: number, before: number) => void,\n masterID: string,\n shouldNotExceedAvailableRange: boolean,\n }) => void\n orderedColors: string[]\n\n hoveredRow: number\n hoveredX: number | null\n setGlobalChartUnderlay: (arg: { after: number, before: number, masterID: string }) => void\n setHoveredX: (hoveredX: number | null, noMaster?: boolean) => void\n setMinMax: (minMax: [number, number]) => void\n showUndefined: boolean\n unitsCurrent: string\n viewAfter: number\n viewBefore: number\n}\nexport const GaugeChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n chartUuid,\n chartHeight,\n chartWidth,\n hoveredRow,\n legendFormatValue,\n orderedColors,\n setMinMax,\n showUndefined,\n unitsCurrent,\n}: Props) => {\n const chartCanvasElement = useRef<HTMLCanvasElement>(null)\n const [chartInstance, setChartInstance] = useState()\n\n const valueIndex = hoveredRow === -1\n ? 0\n : (chartData.result.length - 1 - hoveredRow) // because data for easy-pie-chart are flipped\n const value = chartData.result[valueIndex]\n\n const {\n // if this is set, then we're overriding commonMin\n gaugeMinValue: minAttribute,\n gaugeMaxValue: maxAttribute,\n } = attributes\n\n const min = isSetByUser(minAttribute) ? minAttribute : chartData.min\n const max = isSetByUser(maxAttribute) ? maxAttribute : chartData.max\n // we should use minAttribute if it's existing\n // old app was using commonMin\n\n // make sure the order is correct and that value is not outside those boundaries\n // (this check was present in old dashboard but perhaps it's not needed)\n const [safeMin, safeMax] = pipe(\n // if they are attributes, make sure they're converted to numbers\n map((x: number) => +x),\n // make sure it is zero based\n // but only if it has not been set by the user\n ([_min, _max]: number[]) => [\n (!isSetByUser(minAttribute) && _min > 0) ? 0 : _min,\n (!isSetByUser(maxAttribute) && _max < 0) ? 0 : _max,\n ],\n // make sure min <= max\n sortBy(identity),\n ([_min, _max]: number[]) => [Math.min(_min, value), Math.max(_max, value)],\n )([min, max])\n // calling outside \"useEffect\" intentionally,\n // because it should update the values first, and only then render the chart in useEffect()\n useEffect(() => {\n setMinMax([safeMin, safeMax])\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [safeMin, safeMax])\n\n const pcent = pipe(\n always(((value - safeMin) * 100) / (safeMax - safeMin)),\n // bug fix for gauge.js 1.3.1\n // if the value is the absolute min or max, the chart is broken\n (_pcent: number) => Math.max(0.001, _pcent),\n (_pcent: number) => Math.min(99.999, _pcent),\n )()\n\n useEffect(() => {\n if (chartCanvasElement.current && !chartInstance) {\n const {\n gaugePointerColor = window.NETDATA.themes.current.gauge_pointer,\n gaugeStrokeColor = window.NETDATA.themes.current.gauge_stroke,\n gaugeStartColor = orderedColors[0],\n gaugeStopColor,\n gaugeGenerateGradient = false,\n } = attributes\n\n const options = {\n lines: 12, // The number of lines to draw\n angle: 0.14, // The span of the gauge arc\n lineWidth: 0.57, // The line thickness\n radiusScale: 1.0, // Relative radius\n pointer: {\n length: 0.85, // 0.9 The radius of the inner circle\n strokeWidth: 0.045, // The rotation offset\n color: gaugePointerColor, // Fill color\n },\n\n // If false, the max value of the gauge will be updated if value surpass max\n // If true, the min value of the gauge will be fixed unless you set it manually\n limitMax: true,\n limitMin: true,\n colorStart: gaugeStartColor,\n colorStop: gaugeStopColor,\n strokeColor: gaugeStrokeColor,\n generateGradient: (gaugeGenerateGradient === true), // gmosx:\n gradientType: 0,\n highDpiSupport: true, // High resolution support\n }\n\n const newChartInstance = new Gauge(chartCanvasElement.current).setOptions(options)\n\n // we will always feed a percentage (copied from old dashboard)\n newChartInstance.minValue = 0\n newChartInstance.maxValue = 100\n\n setChartInstance(newChartInstance)\n }\n }, [attributes, chartData, chartInstance, chartWidth, orderedColors])\n\n // update with value\n useEffect(() => {\n if (chartInstance) {\n // gauge animation\n const shouldUseAnimation = hoveredRow === -1 && !showUndefined\n // animation doesn't work in newest, 1.3.7 version!\n const speed = shouldUseAnimation ? 32 : 1000000000\n chartInstance.animationSpeed = speed\n setTimeout(() => {\n chartInstance.set(showUndefined ? 0 : pcent)\n }, 0)\n }\n }, [chartInstance, chartHeight, chartWidth, hoveredRow, pcent, showUndefined])\n\n const valueFontSize = Math.floor(chartHeight / 5)\n const valueTop = Math.round((chartHeight - valueFontSize) / 3.2)\n\n const titleFontSize = Math.round(valueFontSize / 2.1)\n const titleTop = 0\n\n const unitFontSize = Math.round(titleFontSize * 0.9)\n\n const minMaxFontSize = Math.round(valueFontSize * 0.75)\n return (\n <div\n id={chartElementId}\n className={chartElementClassName}\n >\n <canvas\n ref={chartCanvasElement}\n className=\"gaugeChart\"\n id={`gauge-${chartUuid}-canvas`}\n style={{\n width: chartWidth,\n height: chartHeight,\n }}\n />\n <span\n className=\"gaugeChartLabel\"\n style={{\n fontSize: valueFontSize,\n top: valueTop,\n }}\n >\n {legendFormatValue(showUndefined ? null : value)}\n </span>\n <span\n className=\"gaugeChartTitle\"\n style={{\n fontSize: titleFontSize,\n top: titleTop,\n }}\n >\n {attributes.title || chartMetadata.title}\n </span>\n <span\n className=\"gaugeChartUnits\"\n style={{\n fontSize: unitFontSize,\n }}\n >\n {unitsCurrent}\n </span>\n <span className=\"gaugeChartMin\" style={{ fontSize: minMaxFontSize }}>\n {legendFormatValue(showUndefined ? null : safeMin)}\n </span>\n <span className=\"gaugeChartMax\" style={{ fontSize: minMaxFontSize }}>\n {legendFormatValue(showUndefined ? null : safeMax)}\n </span>\n </div>\n )\n}\n","import {\n cond, identity, map, pipe, replace, splitEvery, T, toString,\n} from \"ramda\"\n\ntype NormalizeHex = (hex: string) => string\nexport const normalizeHex: NormalizeHex = pipe(\n toString,\n replace(/[^0-9a-f]/gi, \"\"),\n cond([\n [(str) => str.length < 6, (str) => str[0] + str[0] + str[1] + str[1] + str[2] + str[2]],\n [T, identity],\n ]),\n)\n\nexport const colorLuminance = (hex: string, lum: number = 0) => {\n const hexNormalized = normalizeHex(hex)\n\n // convert to decimal and change luminosity\n const rgb = pipe(\n // point-free version generates ts error\n (str: string) => splitEvery(2, str),\n map(\n pipe(\n (str: string) => parseInt(str, 16),\n (nr) => Math.round(\n Math.min(\n Math.max(0, nr + (nr * lum)),\n 255,\n ),\n ).toString(16),\n (str) => `00${str}`.substr(str.length),\n ),\n ),\n (x) => x.join(\"\"),\n )(hexNormalized)\n return `#${rgb}`\n}\n","/* eslint-disable indent */\n/* eslint-disable operator-linebreak */\n/* eslint-disable comma-dangle */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable consistent-return */\nimport \"jquery-sparkline\"\nimport React, { useRef, useEffect, useState } from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { colorLuminance } from \"domains/chart/utils/color-luminance\"\nimport { MS_IN_SECOND } from \"utils/utils\"\nimport { TimeRange } from \"types/common\"\n\nconst convertToTimestamp = (number: number) => {\n if (number > 0) {\n return number\n }\n return new Date().valueOf() + number // number is negative or zero\n}\n\ninterface TimeWindowCorrection {\n paddingLeftPercentage?: string\n widthRatio?: number\n}\nconst getForceTimeWindowCorrection = (\n chartData: EasyPieChartData,\n viewRange: TimeRange\n): TimeWindowCorrection => {\n const requestedAfter = convertToTimestamp(viewRange[0])\n const requestedBefore = convertToTimestamp(viewRange[1])\n const after = chartData.after * MS_IN_SECOND\n const before = chartData.before * MS_IN_SECOND\n\n const currentDuration = before - after\n const requestedDuration = requestedBefore - requestedAfter\n // don't do overrides when current (available) duration is bigger or only slightly lower\n // than requested duration\n const DURATION_CHANGE_TOLERANCE = 1.03\n if (currentDuration > requestedDuration / DURATION_CHANGE_TOLERANCE) {\n return {}\n }\n\n const widthRatio = currentDuration / requestedDuration\n\n const visibleDuration = requestedBefore - requestedAfter\n const paddingLeftPercentage = `${100 * ((after - requestedAfter) / visibleDuration)}%`\n\n return {\n paddingLeftPercentage,\n widthRatio,\n }\n}\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n dimensionsVisibility: boolean[]\n isRemotelyControlled: boolean\n orderedColors: string[]\n unitsCurrent: string\n viewAfterForCurrentData: number\n viewBeforeForCurrentData: number\n}\nexport const SparklineChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n orderedColors,\n unitsCurrent,\n viewAfterForCurrentData,\n viewBeforeForCurrentData,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n\n // update width, height automatically each time\n const [$chartElement, set$chartElement] = useState()\n const sparklineOptions = useRef<{ [key: string]: any }>()\n\n const { paddingLeftPercentage = undefined, widthRatio = 1 } = attributes.forceTimeWindow\n ? getForceTimeWindowCorrection(chartData, [viewAfterForCurrentData, viewBeforeForCurrentData])\n : {}\n\n const updateSparklineValues = () => {\n if (!$chartElement) return\n\n const { width, height } = chartContainerElement.getBoundingClientRect()\n // @ts-ignore\n $chartElement.sparkline(chartData.result, {\n ...sparklineOptions.current,\n width: Math.floor(width * widthRatio),\n height: Math.floor(height),\n })\n }\n\n // create chart\n useEffect(() => {\n const { sparklineLineColor = orderedColors[0] } = attributes\n const defaultFillColor =\n chartMetadata.chart_type === \"line\"\n ? window.NETDATA.themes.current.background\n : colorLuminance(sparklineLineColor, window.NETDATA.chartDefaults.fill_luminance)\n const chartTitle = attributes.title || chartMetadata.title\n\n const emptyStringIfDisable = (x: string | undefined) => (x === \"disable\" ? \"\" : x)\n\n const {\n sparklineType = \"line\",\n sparklineFillColor = defaultFillColor,\n sparklineDisableInteraction = false,\n sparklineDisableTooltips = false,\n sparklineDisableHighlight = false,\n sparklineHighlightLighten = 1.4,\n sparklineTooltipSuffix = ` ${unitsCurrent}`,\n sparklineNumberFormatter = (n: number) => n.toFixed(2),\n } = attributes\n\n const sparklineInitOptions = {\n type: sparklineType,\n lineColor: sparklineLineColor,\n fillColor: sparklineFillColor,\n chartRangeMin: attributes.sparklineChartRangeMin,\n chartRangeMax: attributes.sparklineChartRangeMax,\n composite: attributes.sparklineComposite,\n enableTagOptions: attributes.sparklineEnableTagOptions,\n tagOptionPrefix: attributes.sparklineTagOptionPrefix,\n tagValuesAttribute: attributes.sparklineTagValuesAttribute,\n\n disableHiddenCheck: attributes.sparklineDisableHiddenCheck,\n defaultPixelsPerValue: attributes.sparklineDefaultPixelsPerValue,\n spotColor: emptyStringIfDisable(attributes.sparklineSpotColor),\n minSpotColor: emptyStringIfDisable(attributes.sparklineMinSpotColor),\n maxSpotColor: emptyStringIfDisable(attributes.sparklineMaxSpotColor),\n spotRadius: attributes.sparklineSpotRadius,\n valueSpots: attributes.sparklineValueSpots,\n highlightSpotColor: attributes.sparklineHighlightSpotColor,\n highlightLineColor: attributes.sparklineHighlightLineColor,\n lineWidth: attributes.sparklineLineWidth,\n normalRangeMin: attributes.sparklineNormalRangeMin,\n normalRangeMax: attributes.sparklineNormalRangeMax,\n drawNormalOnTop: attributes.sparklineDrawNormalOnTop,\n xvalues: attributes.sparklineXvalues,\n chartRangeClip: attributes.sparklineChartRangeClip,\n chartRangeMinX: attributes.sparklineChartRangeMinX,\n chartRangeMaxX: attributes.sparklineChartRangeMaxX,\n disableInteraction: sparklineDisableInteraction,\n disableTooltips: sparklineDisableTooltips,\n disableHighlight: sparklineDisableHighlight,\n highlightLighten: sparklineHighlightLighten,\n highlightColor: attributes.sparklineHighlightColor,\n tooltipContainer: attributes.sparklineTooltipContainer,\n tooltipClassname: attributes.sparklineTooltipClassname,\n tooltipChartTitle: chartTitle,\n tooltipFormat: attributes.sparklineTooltipFormat,\n tooltipPrefix: attributes.sparklineTooltipPrefix,\n tooltipSuffix: sparklineTooltipSuffix,\n tooltipSkipNull: attributes.sparklineTooltipSkipNull,\n tooltipValueLookups: attributes.sparklineTooltipValueLookups,\n tooltipFormatFieldlist: attributes.sparklineTooltipFormatFieldlist,\n tooltipFormatFieldlistKey: attributes.sparklineTooltipFormatFieldlistKey,\n numberFormatter: sparklineNumberFormatter,\n numberDigitGroupSep: attributes.sparklineNumberDigitGroupSep,\n numberDecimalMark: attributes.sparklineNumberDecimalMark,\n numberDigitGroupCount: attributes.sparklineNumberDigitGroupCount,\n animatedZooms: attributes.sparklineAnimatedZooms,\n }\n sparklineOptions.current = sparklineInitOptions\n\n if (!chartElement.current || $chartElement) return\n\n set$chartElement(() => window.$(chartElement.current))\n }, [\n $chartElement,\n attributes,\n chartContainerElement,\n chartData.result,\n chartMetadata,\n orderedColors,\n unitsCurrent,\n widthRatio,\n ])\n\n const { sparklineOnHover } = attributes\n useEffect(() => {\n if (!$chartElement || !sparklineOnHover) return\n\n const onLeave = () => sparklineOnHover(null)\n const onChange = ({ sparklines: [sparkline] }: any) => {\n const { x, y } = sparkline.getCurrentRegionFields()\n sparklineOnHover({ x, y })\n }\n\n // @ts-ignore\n $chartElement.bind(\"sparklineRegionChange\", onChange).bind(\"mouseleave\", onLeave)\n return () => {\n // @ts-ignore\n $chartElement.unbind(\"sparklineRegionChange\", onChange).unbind(\"mouseleave\", onLeave)\n }\n }, [$chartElement, sparklineOnHover])\n\n // update chart\n useEffect(updateSparklineValues, [$chartElement, chartData.result])\n\n const style = paddingLeftPercentage\n ? {\n textAlign: \"initial\" as \"initial\", // :) typescript\n paddingLeft: paddingLeftPercentage,\n }\n : undefined\n\n return (\n <div ref={chartElement} id={chartElementId} className={chartElementClassName} style={style} />\n )\n}\n","import * as d3 from \"d3\"\n\nwindow.d3 = d3\n","let fetchPromise: Promise<string>\n\nconst GOOGLE_JS_API_SRC = \"https://www.google.com/jsapi\"\n\nexport const loadGoogleVisualizationApi = () => {\n if (fetchPromise) {\n return fetchPromise\n }\n fetchPromise = new Promise((resolve, reject) => {\n setTimeout(() => {\n const script = document.createElement(\"script\")\n script.type = \"text/javascript\"\n script.async = true\n script.src = GOOGLE_JS_API_SRC\n\n script.onerror = () => {\n reject(Error(\"error loading google.js api\"))\n }\n script.onload = () => {\n resolve(\"ok\")\n }\n\n const firstScript = document.getElementsByTagName(\"script\")[0] as HTMLScriptElement\n (firstScript.parentNode as Node).insertBefore(script, firstScript)\n }, 1000)\n }).then(() => new Promise((resolve) => {\n window.google.load(\"visualization\", \"1.1\", {\n packages: [\"corechart\", \"controls\"],\n callback: resolve,\n })\n }))\n return fetchPromise\n}\n","// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport \"jquery-sparkline\"\nimport React, {\n useRef, useEffect, useState,\n} from \"react\"\n\nimport \"../../utils/d3-loader\"\n// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport d3pie from \"vendor/d3pie-0.2.1-netdata-3\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport {\n ChartMetadata,\n D3pieChartData,\n} from \"domains/chart/chart-types\"\nimport { seconds4human } from \"domains/chart/utils/seconds4human\"\nimport { useDateTime } from \"utils/date-time\"\nimport { tail } from \"ramda\"\n\nconst emptyContent = {\n label: \"no data\",\n value: 100,\n color: \"#666666\",\n}\n\ntype GetDateRange = (arg: {\n chartData: D3pieChartData,\n index: number,\n localeDateString: (date: number | Date) => string,\n localeTimeString: (time: number | Date) => string,\n}) => string\nconst getDateRange: GetDateRange = ({\n chartData, index,\n localeDateString, localeTimeString,\n}) => {\n const dt = Math.round((chartData.before - chartData.after + 1) / chartData.points)\n const dtString = seconds4human(dt)\n\n const before = chartData.result.data[index].time\n const after = before - (dt * 1000)\n\n const d1 = localeDateString(after)\n const t1 = localeTimeString(after)\n const d2 = localeDateString(before)\n const t2 = localeTimeString(before)\n\n if (d1 === d2) {\n return `${d1} ${t1} to ${t2}, ${dtString}`\n }\n\n return `${d1} ${t1} to ${d2} ${t2}, ${dtString}`\n}\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: D3pieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n dimensionsVisibility: boolean[]\n hoveredRow: number\n hoveredX: number | null\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n orderedColors: string[]\n setMinMax: (minMax: [number, number]) => void\n showUndefined: boolean\n unitsCurrent: string\n}\nexport const D3pieChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n hoveredRow,\n hoveredX,\n legendFormatValue,\n orderedColors,\n setMinMax,\n unitsCurrent,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n\n const legendFormatValueRef = useRef(legendFormatValue)\n legendFormatValueRef.current = legendFormatValue\n\n const [d3pieInstance, setD3pieInstance] = useState()\n const d3pieOptions = useRef<{[key: string]: any}>()\n\n const { localeDateString, localeTimeString } = useDateTime()\n\n // create chart\n useEffect(() => {\n if (chartElement.current && !d3pieInstance) {\n // d3pieSetContent\n // todo this should be set in chart.tsx, when creating hook\n setMinMax([chartData.min, chartData.max])\n // index is ROW! it's !== 0 only when selection is made\n const index = 0\n const content = tail(chartData.result.labels).map((label, i) => {\n const value = chartData.result.data[index][label]\n const color = orderedColors[i]\n return {\n label,\n value,\n color,\n }\n }).filter((x) => x.value !== null && x.value > 0)\n const safeContent = content.length > 0 ? content : emptyContent\n\n const defaultTitle = attributes.title || chartMetadata.title\n const dateRange = getDateRange({\n chartData,\n index: 0,\n localeDateString,\n localeTimeString,\n })\n const {\n d3pieTitle = defaultTitle,\n d3pieSubtitle = unitsCurrent,\n d3pieFooter = dateRange,\n d3pieTitleColor = window.NETDATA.themes.current.d3pie.title,\n d3pieTitleFontsize = 12,\n d3pieTitleFontweight = \"bold\",\n d3pieTitleFont = \"arial\",\n d3PieSubtitleColor = window.NETDATA.themes.current.d3pie.subtitle,\n d3PieSubtitleFontsize = 10,\n d3PieSubtitleFontweight = \"normal\",\n d3PieSubtitleFont = \"arial\",\n d3PieFooterColor = window.NETDATA.themes.current.d3pie.footer,\n d3PieFooterFontsize = 9,\n d3PieFooterFontweight = \"bold\",\n d3PieFooterFont = \"arial\",\n d3PieFooterLocation = \"bottom-center\",\n\n d3PiePieinnerradius = \"45%\",\n d3PiePieouterradius = \"80%\",\n d3PieSortorder = \"value-desc\",\n d3PieSmallsegmentgroupingEnabled = false,\n d3PieSmallsegmentgroupingValue = 1,\n d3PieSmallsegmentgroupingValuetype = \"percentage\",\n d3PieSmallsegmentgroupingLabel = \"other\",\n d3PieSmallsegmentgroupingColor = window.NETDATA.themes.current.d3pie.other,\n\n d3PieLabelsOuterFormat = \"label-value1\",\n d3PieLabelsOuterHidewhenlessthanpercentage = null,\n d3PieLabelsOuterPiedistance = 15,\n d3PieLabelsInnerFormat = \"percentage\",\n d3PieLabelsInnerHidewhenlessthanpercentage = 2,\n\n d3PieLabelsMainLabelColor = window.NETDATA.themes.current.d3pie.mainlabel,\n d3PieLabelsMainLabelFont = \"arial\",\n d3PieLabelsMainLabelFontsize = 10,\n d3PieLabelsMainLabelFontweight = \"normal\",\n\n d3PieLabelsPercentageColor = window.NETDATA.themes.current.d3pie.percentage,\n d3PieLabelsPercentageFont = \"arial\",\n d3PieLabelsPercentageFontsize = 10,\n d3PieLabelsPercentageFontweight = \"bold\",\n\n d3PieLabelsValueColor = window.NETDATA.themes.current.d3pie.value,\n d3PieLabelsValueFont = \"arial\",\n d3PieLabelsValueFontsize = 10,\n d3PieLabelsValueFontweight = \"bold\",\n\n d3PieLabelsLinesEnabled = true,\n d3PieLabelsLinesStyle = \"curved\",\n d3PieLabelsLinesColor = \"segment\", // \"segment\" or a hex color\n\n d3PieLabelsTruncationEnabled = false,\n d3PieLabelsTruncationTruncatelength = 30,\n\n d3PieMiscColorsSegmentstroke = window.NETDATA.themes.current.d3pie.segment_stroke,\n d3PieMiscGradientEnabled = false,\n d3PieMiscColorsPercentage = 95,\n d3PieMiscGradientColor = window.NETDATA.themes.current.d3pie.gradient_color,\n\n d3PieCssprefix = null,\n } = attributes\n\n const { width, height } = chartContainerElement.getBoundingClientRect()\n\n const initialD3pieOptions = {\n header: {\n title: {\n text: d3pieTitle,\n color: d3pieTitleColor,\n fontSize: d3pieTitleFontsize,\n fontWeight: d3pieTitleFontweight,\n font: d3pieTitleFont,\n },\n subtitle: {\n text: d3pieSubtitle,\n color: d3PieSubtitleColor,\n fontSize: d3PieSubtitleFontsize,\n fontWeight: d3PieSubtitleFontweight,\n font: d3PieSubtitleFont,\n },\n titleSubtitlePadding: 1,\n },\n footer: {\n text: d3pieFooter,\n color: d3PieFooterColor,\n fontSize: d3PieFooterFontsize,\n fontWeight: d3PieFooterFontweight,\n font: d3PieFooterFont,\n location: d3PieFooterLocation,\n },\n size: {\n canvasHeight: Math.floor(height),\n canvasWidth: Math.floor(width),\n pieInnerRadius: d3PiePieinnerradius,\n pieOuterRadius: d3PiePieouterradius,\n },\n data: {\n // none, random, value-asc, value-desc, label-asc, label-desc\n sortOrder: d3PieSortorder,\n smallSegmentGrouping: {\n enabled: d3PieSmallsegmentgroupingEnabled,\n value: d3PieSmallsegmentgroupingValue,\n // percentage, value\n valueType: d3PieSmallsegmentgroupingValuetype,\n label: d3PieSmallsegmentgroupingLabel,\n color: d3PieSmallsegmentgroupingColor,\n },\n\n // REQUIRED! This is where you enter your pie data; it needs to be an array of objects\n // of this form: { label: \"label\", value: 1.5, color: \"#000000\" } - color is optional\n content: safeContent,\n },\n\n\n labels: {\n outer: {\n // label, value, percentage, label-value1, label-value2, label-percentage1,\n // label-percentage2\n format: d3PieLabelsOuterFormat,\n hideWhenLessThanPercentage: d3PieLabelsOuterHidewhenlessthanpercentage,\n pieDistance: d3PieLabelsOuterPiedistance,\n },\n inner: {\n // label, value, percentage, label-value1, label-value2, label-percentage1,\n // label-percentage2\n format: d3PieLabelsInnerFormat,\n hideWhenLessThanPercentage: d3PieLabelsInnerHidewhenlessthanpercentage,\n },\n mainLabel: {\n color: d3PieLabelsMainLabelColor, // or 'segment' for dynamic color\n font: d3PieLabelsMainLabelFont,\n fontSize: d3PieLabelsMainLabelFontsize,\n fontWeight: d3PieLabelsMainLabelFontweight,\n },\n percentage: {\n color: d3PieLabelsPercentageColor,\n font: d3PieLabelsPercentageFont,\n fontSize: d3PieLabelsPercentageFontsize,\n fontWeight: d3PieLabelsPercentageFontweight,\n decimalPlaces: 0,\n },\n value: {\n color: d3PieLabelsValueColor,\n font: d3PieLabelsValueFont,\n fontSize: d3PieLabelsValueFontsize,\n fontWeight: d3PieLabelsValueFontweight,\n },\n lines: {\n enabled: d3PieLabelsLinesEnabled,\n style: d3PieLabelsLinesStyle,\n color: d3PieLabelsLinesColor,\n },\n truncation: {\n enabled: d3PieLabelsTruncationEnabled,\n truncateLength: d3PieLabelsTruncationTruncatelength,\n },\n formatter(context: any) {\n if (context.part === \"value\") {\n return legendFormatValueRef.current(context.value)\n }\n if (context.part === \"percentage\") {\n return `${context.label}%`\n }\n\n return context.label\n },\n },\n effects: {\n load: {\n effect: \"none\", // none / default\n speed: 0, // commented in the d3pie code to speed it up\n },\n pullOutSegmentOnClick: {\n effect: \"bounce\", // none / linear / bounce / elastic / back\n speed: 400,\n size: 5,\n },\n highlightSegmentOnMouseover: true,\n highlightLuminosity: -0.2,\n },\n tooltips: {\n enabled: false,\n type: \"placeholder\", // caption|placeholder\n string: \"\",\n placeholderParser: null, // function\n styles: {\n fadeInSpeed: 250,\n backgroundColor: window.NETDATA.themes.current.d3pie.tooltip_bg,\n backgroundOpacity: 0.5,\n color: window.NETDATA.themes.current.d3pie.tooltip_fg,\n borderRadius: 2,\n font: \"arial\",\n fontSize: 12,\n padding: 4,\n },\n },\n misc: {\n colors: {\n background: \"transparent\", // transparent or color #\n // segments: state.chartColors(),\n segmentStroke: d3PieMiscColorsSegmentstroke,\n },\n gradient: {\n enabled: d3PieMiscGradientEnabled,\n percentage: d3PieMiscColorsPercentage,\n color: d3PieMiscGradientColor,\n },\n canvasPadding: {\n top: 5,\n right: 5,\n bottom: 5,\n left: 5,\n },\n pieCenterOffset: {\n x: 0,\n y: 0,\n },\n cssPrefix: d3PieCssprefix,\n },\n callbacks: {\n onload: null,\n onMouseoverSegment: null,\n onMouseoutSegment: null,\n onClickSegment: null,\n },\n }\n // eslint-disable-next-line new-cap\n const newD3pieInstance = new d3pie(chartElement.current, initialD3pieOptions)\n d3pieOptions.current = initialD3pieOptions\n setD3pieInstance(() => newD3pieInstance)\n }\n }, [attributes, chartContainerElement, chartData, chartMetadata, d3pieInstance, legendFormatValue,\n localeDateString, localeTimeString, orderedColors, setMinMax, unitsCurrent])\n\n // update chart\n useEffect(() => {\n if (d3pieInstance && d3pieOptions.current) {\n const dateRange = getDateRange({\n chartData,\n index: 0,\n localeDateString,\n localeTimeString,\n })\n const {\n d3pieSubtitle = unitsCurrent,\n d3pieFooter = dateRange,\n } = attributes\n\n\n const isHoveredButNoData = !!hoveredX && (hoveredRow === -1)\n const slot = chartData.result.data.length - hoveredRow - 1\n\n const index = (slot < 0 || slot >= chartData.result.data.length)\n ? 0\n : slot\n\n const content = tail(chartData.result.labels).map((label, i) => {\n const value = chartData.result.data[index][label]\n const color = orderedColors[i]\n return {\n label,\n value,\n color,\n }\n }).filter((x) => x.value !== null && x.value > 0)\n const safeContent = (content.length > 0 && !isHoveredButNoData)\n ? content\n : [emptyContent]\n\n d3pieInstance.options.header.subtitle.text = d3pieSubtitle\n d3pieInstance.options.footer.text = d3pieFooter\n\n d3pieInstance.options.data.content = safeContent\n d3pieInstance.destroy()\n d3pieInstance.recreate()\n }\n }, [attributes, chartData, d3pieInstance, hoveredRow, hoveredX, localeDateString,\n localeTimeString, orderedColors, unitsCurrent])\n\n return (\n <div ref={chartElement} id={chartElementId} className={chartElementClassName} />\n )\n}\n","// @ts-ignore \"declare module\" doesn't work properly when importing dashboard in cloud\nimport \"peity\"\nimport React, {\n useRef, useState, useLayoutEffect,\n} from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { colorLuminance } from \"domains/chart/utils/color-luminance\"\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n orderedColors: string[]\n}\nexport const PeityChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n orderedColors,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n\n // update width, height automatically each time\n const [$chartElement, set$chartElement] = useState()\n const peityOptions = useRef<{\n stroke: string,\n fill: string,\n strokeWidth: number,\n width: number,\n height: number,\n }>()\n\n\n // create chart\n useLayoutEffect(() => {\n if (chartElement.current && !$chartElement) {\n const $element = window.$(chartElement.current)\n\n const { width, height } = chartContainerElement.getBoundingClientRect()\n\n const {\n peityStrokeWidth = 1,\n } = attributes\n const peityInitOptions = {\n stroke: window.NETDATA.themes.current.foreground,\n strokeWidth: peityStrokeWidth,\n width: Math.floor(width),\n height: Math.floor(height),\n fill: window.NETDATA.themes.current.foreground,\n }\n\n set$chartElement(() => $element)\n peityOptions.current = peityInitOptions\n }\n }, [attributes, $chartElement, chartContainerElement])\n\n // update chart\n useLayoutEffect(() => {\n if ($chartElement && peityOptions.current) {\n const getFillOverride = () => (\n chartMetadata.chart_type === \"line\"\n ? window.NETDATA.themes.current.background\n : colorLuminance(orderedColors[0], window.NETDATA.chartDefaults.fill_luminance)\n )\n const updatedOptions = {\n ...peityOptions.current,\n stroke: orderedColors[0],\n // optimizatino from old dashboard, perhaps could be transformed to useMemo()\n fill: (orderedColors[0] === peityOptions.current.stroke)\n ? peityOptions.current.fill\n : getFillOverride(),\n }\n $chartElement.peity(\"line\", updatedOptions)\n peityOptions.current = updatedOptions\n }\n }, [$chartElement, chartData, chartMetadata, orderedColors])\n\n return (\n <div\n ref={chartElement}\n id={chartElementId}\n className={chartElementClassName}\n >\n {chartData.result}\n </div>\n )\n}\n","import React, {\n useRef, useState, useLayoutEffect,\n} from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata, EasyPieChartData } from \"domains/chart/chart-types\"\nimport { loadGoogleVisualizationApi } from \"domains/chart/utils/google-visualization-loader\"\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartMetadata: ChartMetadata\n chartElementClassName: string\n chartElementId: string\n orderedColors: string[]\n unitsCurrent: string\n}\nexport const GoogleChart = ({\n attributes,\n chartData,\n chartMetadata,\n chartElementClassName,\n chartElementId,\n orderedColors,\n unitsCurrent,\n}: Props) => {\n const chartElement = useRef<HTMLDivElement>(null)\n const googleChartInstance = useRef<\n google.visualization.AreaChart |\n google.visualization.LineChart>()\n\n const [hasApiBeenLoaded, setHasApiBeenLoaded] = useState(false)\n loadGoogleVisualizationApi()\n .then(() => {\n setHasApiBeenLoaded(true)\n })\n\n const googleOptions = useRef<{[key: string]: unknown}>()\n\n // update chart\n useLayoutEffect(() => {\n if (googleChartInstance.current && googleOptions.current) {\n const dataTable = new window.google.visualization.DataTable(chartData.result)\n googleChartInstance.current.draw(dataTable, googleOptions.current)\n }\n }, [chartData])\n\n // create chart\n useLayoutEffect(() => {\n if (chartElement.current && !googleOptions.current && hasApiBeenLoaded) {\n const dataTable = new window.google.visualization.DataTable(chartData.result)\n\n const {\n title = chartMetadata.title,\n } = attributes\n const chartType = chartMetadata.chart_type\n const areaOpacity = new Map([\n [\"area\", window.NETDATA.options.current.color_fill_opacity_area],\n [\"stacked\", window.NETDATA.options.current.color_fill_opacity_stacked],\n ]).get(chartType) || 0.3\n const initialGoogleOptions = {\n colors: orderedColors,\n\n // do not set width, height - the chart resizes itself\n // width: state.chartWidth(),\n // height: state.chartHeight(),\n lineWidth: chartType === \"line\" ? 2 : 1,\n title,\n fontSize: 11,\n hAxis: {\n // title: \"Time of Day\",\n // format:'HH:mm:ss',\n viewWindowMode: \"maximized\",\n slantedText: false,\n format: \"HH:mm:ss\",\n textStyle: {\n fontSize: 9,\n },\n gridlines: {\n color: \"#EEE\",\n },\n },\n vAxis: {\n title: unitsCurrent,\n viewWindowMode: (chartType === \"area\" || chartType === \"stacked\")\n ? \"maximized\"\n : \"pretty\",\n minValue: chartType === \"stacked\" ? undefined : -0.1,\n maxValue: chartType === \"stacked\" ? undefined : 0.1,\n direction: 1,\n textStyle: {\n fontSize: 9,\n },\n gridlines: {\n color: \"#EEE\",\n },\n },\n chartArea: {\n width: \"65%\",\n height: \"80%\",\n },\n focusTarget: \"category\",\n annotation: {\n 1: {\n style: \"line\",\n },\n },\n pointsVisible: false,\n titlePosition: \"out\",\n titleTextStyle: {\n fontSize: 11,\n },\n tooltip: {\n isHtml: false,\n ignoreBounds: true,\n textStyle: {\n fontSize: 9,\n },\n },\n curveType: \"function\" as \"function\",\n areaOpacity,\n isStacked: chartType === \"stacked\",\n }\n\n const googleInstance = [\"area\", \"stacked\"].includes(chartMetadata.chart_type)\n ? new window.google.visualization.AreaChart(chartElement.current)\n : new window.google.visualization.LineChart(chartElement.current)\n\n googleInstance.draw(dataTable, initialGoogleOptions)\n\n googleOptions.current = initialGoogleOptions\n googleChartInstance.current = googleInstance\n }\n }, [attributes, chartData.result, chartMetadata, chartElement, hasApiBeenLoaded, orderedColors,\n unitsCurrent])\n\n\n return (\n <div\n ref={chartElement}\n id={chartElementId}\n className={chartElementClassName}\n />\n )\n}\n","import React from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { EasyPieChartData } from \"domains/chart/chart-types\"\n\ninterface Props {\n attributes: Attributes\n chartData: EasyPieChartData\n chartElementClassName: string\n chartElementId: string\n}\nexport const TextOnly = ({\n attributes,\n chartData,\n chartElementClassName,\n chartElementId,\n}: Props) => {\n const { textOnlyDecimalPlaces = 1, textOnlyPrefix = \"\", textOnlySuffix = \"\" } = attributes\n\n // Round based on number of decimal places to show\n const precision = 10 ** textOnlyDecimalPlaces\n const value = Math.round(chartData.result[0] * precision) / precision\n\n const textContent = chartData.result.length === 0 ? \"\" : textOnlyPrefix + value + textOnlySuffix\n\n return (\n <div id={chartElementId} className={chartElementClassName}>\n {textContent}\n </div>\n )\n}\n","/* eslint-disable no-param-reassign */\n// @ts-nocheck\n\nexport const defaultCellSize = 11\nexport const defaultPadding = 1\nexport const defaultAspectRatio = Math.round(16 / 9)\n\nexport const getCellBoxSize = (cellSize = defaultCellSize, padding = defaultPadding) =>\n cellSize - padding\nexport const getRows = (data, aspectRatio = defaultAspectRatio) =>\n Math.sqrt(data.length / aspectRatio)\nexport const getColumns = (rows, aspectRatio = defaultAspectRatio) => rows * aspectRatio\n\nexport const getXPosition = (columns, index, cellSize = defaultCellSize) =>\n Math.floor(index % columns) * cellSize\nexport const getYPosition = (columns, index, cellSize = defaultCellSize) =>\n Math.floor(index / columns) * cellSize\n\nexport const getFullWidth = (columns, cellSize = defaultCellSize) => Math.ceil(columns) * cellSize\nexport const getFullHeight = (rows, cellSize = defaultCellSize, padding = defaultCellSize) =>\n Math.ceil(rows) * cellSize + padding\n\nexport const getOffsetPosition = (offset, cellSize = defaultCellSize) =>\n Math.floor(offset / cellSize)\n","/* eslint-disable object-curly-newline */\n/* eslint-disable no-param-reassign */\n// @ts-nocheck\nimport { getCellBoxSize, getXPosition, getYPosition, getOffsetPosition } from \"./utilities\"\n\nexport default (\n el,\n columns,\n total,\n { onMouseenter, onMouseout },\n { cellSize, cellPadding } = {}\n) => {\n let hoveredIndex = -1\n\n const getEvent = index => {\n const rect = el.getBoundingClientRect()\n const offsetX = getXPosition(columns, index, cellSize)\n const offsetY = getYPosition(columns, index, cellSize)\n const left = rect.left + offsetX\n const top = rect.top + offsetY\n const cellBoxSize = getCellBoxSize(cellSize, cellPadding)\n\n return {\n index,\n left,\n top,\n right: left + cellBoxSize,\n bottom: top + cellBoxSize,\n width: cellBoxSize,\n height: cellBoxSize,\n offsetX,\n offsetY,\n }\n }\n\n const mouseout = () => {\n onMouseout(getEvent(hoveredIndex))\n hoveredIndex = -1\n }\n\n const mousemove = e => {\n const { offsetX, offsetY } = e\n const x = getOffsetPosition(offsetX, cellSize)\n const y = getOffsetPosition(offsetY, cellSize)\n const nextHoveredIndex = y * columns + x\n\n if (nextHoveredIndex === hoveredIndex) return\n\n if (hoveredIndex !== -1) mouseout()\n\n if (nextHoveredIndex >= total) return\n\n onMouseenter(getEvent(nextHoveredIndex))\n hoveredIndex = nextHoveredIndex\n }\n\n el.addEventListener(\"mousemove\", mousemove)\n el.addEventListener(\"mouseout\", mouseout)\n return () => {\n el.removeEventListener(\"mousemove\", mousemove)\n el.removeEventListener(\"mouseout\", mouseout)\n }\n}\n","/* eslint-disable object-curly-newline */\n/* eslint-disable comma-dangle */\n/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable no-param-reassign */\n// @ts-nocheck\nimport { scaleLinear, extent } from \"d3\"\nimport {\n getCellBoxSize,\n getRows,\n getColumns,\n getXPosition,\n getYPosition,\n getFullWidth,\n getFullHeight,\n} from \"./utilities\"\nimport registerEvents from \"./events\"\n\nexport const getWidth = (data, { aspectRatio, cellSize } = {}) => {\n const rows = getRows(data, aspectRatio)\n const columns = getColumns(rows, aspectRatio)\n return getFullWidth(columns, cellSize)\n}\n\nconst getCanvasAttributes = (data, { aspectRatio, cellSize, padding } = {}) => {\n const rows = getRows(data, aspectRatio)\n const columns = getColumns(rows, aspectRatio)\n const width = getFullWidth(columns, cellSize)\n const height = getFullHeight(rows, cellSize, padding)\n\n return { width, height, columns: Math.ceil(columns) }\n}\n\nconst defaultColorRange = [\"rgba(198, 227, 246, 0.9)\", \"rgba(14, 154, 255, 0.9)\"]\n\nconst makeGetColor = (values, colorRange = defaultColorRange) =>\n scaleLinear()\n .domain(extent(values, value => value))\n .range(colorRange)\n\nexport default (el, { onMouseenter, onMouseout }, options = {}) => {\n const { cellSize, cellPadding, cellStroke = 2, lineWidth = 1, colorRange } = options\n const canvas = el.getContext(\"2d\")\n\n let activeBox = -1\n let deactivateBox = () => {}\n let activateBox = {}\n let clearEvents = () => {}\n\n const clear = () => {\n deactivateBox()\n clearEvents()\n canvas.clearRect(0, 0, el.width, el.height)\n canvas.beginPath()\n }\n\n const update = ({ data }) => {\n const { width, height, columns } = getCanvasAttributes(data, options)\n el.width = parseInt(width)\n el.height = parseInt(height)\n clear()\n clearEvents()\n const getColor = makeGetColor(data, colorRange)\n\n const drawBox = (value, index) => {\n canvas.fillStyle = getColor(value)\n\n const offsetX = getXPosition(columns, index, cellSize)\n const offsetY = getYPosition(columns, index, cellSize)\n\n if (lineWidth && cellStroke) {\n canvas.clearRect(\n offsetX - lineWidth,\n offsetY - lineWidth,\n getCellBoxSize(cellSize, cellPadding) + cellStroke,\n getCellBoxSize(cellSize, cellPadding) + cellStroke\n )\n }\n\n canvas.fillRect(\n offsetX,\n offsetY,\n getCellBoxSize(cellSize, cellPadding),\n getCellBoxSize(cellSize, cellPadding)\n )\n }\n\n data.forEach(drawBox)\n\n clearEvents = registerEvents(\n el,\n columns,\n data.length,\n {\n onMouseenter,\n onMouseout,\n },\n options\n )\n\n deactivateBox = () => {\n if (activeBox !== -1) drawBox(data[activeBox], activeBox)\n }\n\n activateBox = index => {\n deactivateBox()\n activeBox = index\n\n const offsetX = getXPosition(columns, index, cellSize)\n const offsetY = getYPosition(columns, index, cellSize)\n\n if (lineWidth && cellStroke) {\n canvas.lineWidth = lineWidth\n canvas.strokeStyle = \"#fff\"\n canvas.strokeRect(\n offsetX + lineWidth,\n offsetY + lineWidth,\n getCellBoxSize(cellSize, cellPadding) - cellStroke,\n getCellBoxSize(cellSize, cellPadding) - cellStroke\n )\n }\n }\n }\n\n return {\n clear,\n update,\n activateBox: index => activateBox(index),\n deactivateBox: () => deactivateBox(),\n }\n}\n","/* eslint-disable arrow-body-style */\n// @ts-nocheck\n\nexport default (el) => {\n return el.getBoundingClientRect().top / window.innerHeight > 0.5 ? \"top\" : \"bottom\"\n}\n","/* eslint-disable operator-linebreak */\n/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable react/jsx-fragments */\n// @ts-nocheck\nimport React, { useRef, useLayoutEffect, Fragment, useState, useCallback } from \"react\"\nimport { Drop } from \"@netdata/netdata-ui\"\nimport drawBoxes from \"./drawBoxes\"\nimport getAlign from \"./getAlign\"\n\ninterface GroupboxData {\n data: number[]\n labels: string[]\n}\n\ninterface GroupBoxProps {\n data: GroupboxData[]\n}\n\nconst aligns = {\n top: { bottom: \"top\" },\n bottom: { top: \"bottom\" },\n}\n\nconst GroupBox = ({ data, renderTooltip, ...options }: GroupBoxProps) => {\n const dataRef = useRef()\n const canvasRef = useRef()\n const boxesRef = useRef()\n\n const [hover, setHover] = useState(null)\n const dropHoverRef = useRef(false)\n const boxHoverRef = useRef(-1)\n const timeoutId = useRef()\n\n const close = () => {\n boxesRef.current.deactivateBox()\n setHover(null)\n dropHoverRef.current = false\n boxHoverRef.current = -1\n }\n\n const closeDrop = () =>\n requestAnimationFrame(() => {\n setHover(currentHover => {\n if (\n !dropHoverRef.current &&\n (boxHoverRef.current === -1 || boxHoverRef.current !== currentHover?.index)\n ) {\n close()\n }\n return currentHover\n })\n })\n\n useLayoutEffect(() => {\n boxesRef.current = drawBoxes(\n canvasRef.current,\n {\n onMouseenter: ({ index, ...rect }) => {\n boxHoverRef.current = index\n boxesRef.current.activateBox(index)\n timeoutId.current = setTimeout(() => {\n setHover({\n target: { getBoundingClientRect: () => rect },\n index,\n rect,\n })\n }, 600)\n },\n onMouseout: () => {\n boxHoverRef.current = -1\n clearTimeout(timeoutId.current)\n closeDrop()\n },\n },\n options\n )\n return () => boxesRef.current.clear()\n }, [])\n\n useLayoutEffect(() => {\n if (\n hover &&\n dataRef.current &&\n dataRef.current.labels[hover.index] !== data.labels[hover.index]\n ) {\n close()\n }\n dataRef.current = data\n boxesRef.current.update(data)\n }, [data])\n\n const onMouseEnter = useCallback(() => {\n dropHoverRef.current = true\n }, [])\n\n const onMouseLeave = useCallback(() => {\n dropHoverRef.current = false\n closeDrop()\n }, [])\n\n const align = hover && getAlign(hover.target)\n\n return (\n <Fragment>\n <canvas data-testid=\"groupBox\" ref={canvasRef} />\n {hover && renderTooltip && (\n <Drop\n align={aligns[align]}\n target={hover.target}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {renderTooltip(hover.index, align)}\n </Drop>\n )}\n </Fragment>\n )\n}\n\nexport default GroupBox\n","/* eslint-disable operator-linebreak */\n/* eslint-disable object-curly-newline */\n/* eslint-disable arrow-body-style */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/jsx-one-expression-per-line */\n// @ts-nocheck\nimport React, { useRef, useMemo } from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, TextMicro, Popover } from \"@netdata/netdata-ui\"\nimport GroupBox from \"./groupBox\"\nimport { getWidth } from \"./drawBoxes\"\nimport getAlign from \"./getAlign\"\n\ninterface GroupBoxWrapperProps {\n data: any\n title: string\n}\n\nconst Title = styled.span`\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow-x: hidden;\n`\n\nconst Label = styled(Flex).attrs({\n as: TextMicro,\n gap: 1,\n})`\n cursor: default;\n &:hover {\n font-weight: bold;\n }\n`\n\nconst GroupBoxWrapper = ({\n data,\n label,\n groupIndex,\n renderGroupPopover,\n renderBoxPopover,\n}: GroupBoxWrapperProps) => {\n const ref = useRef()\n const align = ref.current && getAlign(ref.current)\n\n const style = useMemo(() => ({ maxWidth: `${getWidth(data.data)}px` }), [data])\n\n const boxPopover =\n renderBoxPopover &&\n ((index, boxAlign) => renderBoxPopover({ group: label, groupIndex, align: boxAlign, index }))\n\n const groupPopover =\n renderGroupPopover && (() => renderGroupPopover({ group: label, groupIndex, align }))\n\n return (\n <Flex data-testid=\"groupBoxWrapper\" column alignItems=\"start\" gap={1} margin={[0, 4, 0, 0]}>\n <Popover content={groupPopover} align={align} plain>\n {({ isOpen, ref: popoverRef, ...rest }) => (\n <Label\n data-testid=\"groupBoxWrapper-title\"\n ref={el => {\n ref.current = el\n popoverRef(el)\n }}\n strong={isOpen}\n style={style}\n {...rest}\n >\n <Title>{label}</Title>\n {data.data.length > 3 && <span>({data.data.length})</span>}\n </Label>\n )}\n </Popover>\n <GroupBox data={data} renderTooltip={boxPopover} />\n </Flex>\n )\n}\n\nconst GroupBoxes = ({ data, labels, renderBoxPopover, renderGroupPopover }: any) => (\n <Flex data-testid=\"groupBoxes\" flexWrap overflow={{ vertical: \"auto\" }} flex>\n {labels.map((label, index) => {\n return data[index].data.length ? (\n <GroupBoxWrapper\n key={label}\n label={label}\n groupIndex={index}\n data={data[index]}\n renderGroupPopover={renderGroupPopover}\n renderBoxPopover={renderBoxPopover}\n />\n ) : null\n })}\n </Flex>\n)\n\nexport default GroupBoxes\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, TextNano } from \"@netdata/netdata-ui\"\n\ninterface LegendProps {\n children?: React.ReactNode\n}\n\nconst LinearColorScaleBar = styled(Flex).attrs({ width: \"120px\", height: \"12px\", round: true })`\n background: linear-gradient(to right, #c6e3f6, #0e9aff);\n`\n\nconst Legend = ({ children }: LegendProps) => (\n <Flex data-testid=\"groupBox-legend\" gap={4} alignItems=\"center\">\n <TextNano strong>{children}</TextNano>\n <Flex gap={2} alignItems=\"center\">\n <TextNano>0%</TextNano>\n <LinearColorScaleBar />\n <TextNano>100%</TextNano>\n </Flex>\n {/* <Flex gap={2} alignItems=\"center\">\n <TextNano strong>Alarms</TextNano>\n <Flex width=\"12px\" height=\"12px\" background=\"error\" round />\n </Flex>\n <Flex gap={2} alignItems=\"center\">\n <TextNano strong>Warnings</TextNano>\n <Flex width=\"12px\" height=\"12px\" background=\"warning\" round />\n </Flex> */}\n </Flex>\n)\n\nexport default Legend\n","// @ts-nocheck\n\nconst labels = {\n k8s_cluster_id: { icon: \"cluster\", title: \"Cluster Id\" },\n k8s_node_name: { icon: \"nodes_hollow\", title: \"Node\" },\n k8s_namespace: { icon: \"cluster_spaces\", title: \"Namespace\" },\n k8s_controller_kind: { icon: \"controller_kind\", title: \"Controller Kind\" },\n k8s_controller_name: { icon: \"controller_name\", title: \"Controller Name\" },\n k8s_pod_name: { icon: \"pod\", title: \"Pod Name\" },\n k8s_container_name: { icon: \"container\", title: \"Container\" },\n}\n\nexport const labelIds = Object.keys(labels)\n\nexport default (id) => {\n if (id in labels) return labels[id]\n // k8s_custom_label -> Custom Label\n const title = id.replace(/_./g, (word) => ` ${word[1].toUpperCase()}`).replace(/^k8s /, \"\")\n return { title, icon: \"node\" }\n}\n","/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Separator = () => <Flex height=\"1px\" width=\"100%\" background=\"separator\" />\n\nexport default Separator\n","/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { H5 } from \"@netdata/netdata-ui\"\n\nconst Header = props => (\n <H5 color=\"bright\" wordBreak=\"break-all\" data-testid=\"k8sPopover-header\" {...props} />\n)\n\nexport default Header\n","/* eslint-disable indent */\n/* eslint-disable implicit-arrow-linebreak */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex, Button, getColor } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\n\nexport const TabButton = styled(Button).attrs(({ active }) => ({\n flavour: \"borderless\",\n neutral: true,\n themeType: \"dark\",\n className: \"btn\",\n disabled: active,\n \"data-testid\": \"k8sPopoverChart-tab\",\n}))`\n &&& {\n height: initial;\n width: initial;\n padding: 2px 20px;\n ${({ active, theme }) => active && `border-bottom: 3px solid ${getColor(\"bright\")({ theme })};`}\n color: ${({ active, theme }) => getColor(active ? \"bright\" : \"separator\")({ theme })}\n }\n`\n\nconst Tabs = ({ value, onChange, ...rest }) => (\n <Flex data-testid=\"k8sPopoverChart-tabs\" {...rest}>\n <TabButton label=\"Context\" active={value === \"context\"} onClick={() => onChange(\"context\")} />\n <TabButton label=\"Metrics\" active={value === \"metrics\"} onClick={() => onChange(\"metrics\")} />\n </Flex>\n)\n\nexport default Tabs\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex, Button, H6, makeFlex } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\n\nconst ExpandButton = styled(makeFlex(Button)).attrs({\n icon: \"chevron_right_s\",\n label: \"More\",\n flavour: \"borderless\",\n neutral: true,\n themeType: \"dark\",\n className: \"btn\",\n alignItems: \"baseline\",\n gap: 1,\n direction: \"rowReverse\",\n})`\n &&& {\n padding: 0;\n margin: 0;\n font-weight: normal;\n height: initial;\n width: initial;\n\n svg {\n height: 6px;\n width: 6px;\n position: initial;\n }\n }\n`\n\nconst Section = ({ title, onExpand, children, noBorder }) => (\n <Flex\n gap={3}\n padding={[0, 0, 3]}\n border={!noBorder && { side: \"bottom\", color: \"separator\" }}\n column\n data-testid=\"k8sPopoverSection\"\n >\n <Flex justifyContent=\"between\" data-testid=\"k8sPopoverSection-header\">\n <H6 color=\"border\" wordBreak=\"break-all\">\n {title}\n </H6>\n {onExpand && <ExpandButton onClick={onExpand} />}\n </Flex>\n <Flex gap={4} column data-testid=\"k8sPopoverSection-content\">\n {children}\n </Flex>\n </Flex>\n)\n\nexport default Section\n","import {\n LOCALSTORAGE_HEIGHT_KEY_PREFIX,\n LOCALSTORAGE_HEIGHT_KEY_PREFIX_OLD,\n} from \"domains/chart/components/resize-handler\"\n\nimport { LEGEND_BOTTOM_SINGLE_LINE_HEIGHT } from \"domains/chart/utils/legend-utils\"\nimport { Attributes } from \"./transformDataAttributes\"\nimport { ChartLibraryConfig } from \"./chartLibrariesSettings\"\n\ntype GetPortalNodeStyles = (\n attributes: Attributes,\n chartSettings: ChartLibraryConfig,\n shouldAddSpecialHeight: boolean,\n) => {\n height: string | undefined,\n width: string | undefined,\n minWidth: string | undefined\n}\n\nconst oldDefaultHeights = [\"180px\", \"90px\"]\n\nconst getHeightFromLocalStorage = (heightID: string, isLegendOnBottom: boolean) => {\n const persitedHeight = localStorage.getItem(`${LOCALSTORAGE_HEIGHT_KEY_PREFIX}${heightID}`)\n if (persitedHeight) {\n if (Number.isNaN(Number(persitedHeight))) {\n return null\n }\n return `${isLegendOnBottom\n ? Number(persitedHeight) + LEGEND_BOTTOM_SINGLE_LINE_HEIGHT\n : persitedHeight\n }px`\n }\n\n // We'll support the old key for few months, so that user's custom heights will be working,\n // but we'll save any changes only to the new key.\n const persistedHeightOld = localStorage.getItem(\n `${LOCALSTORAGE_HEIGHT_KEY_PREFIX_OLD}${heightID}`,\n )\n if (persistedHeightOld) {\n if (oldDefaultHeights.includes(persistedHeightOld)) {\n // If saved value looks like `oldDefaultHeights`, then it is most likely an automatic value\n // from old dashboard. Don't import it anymore. On next resize the height will be persisted\n // to the new key.\n return null\n }\n return persistedHeightOld\n }\n return null\n}\n\nexport const getPortalNodeStyles: GetPortalNodeStyles = (\n attributes,\n chartSettings,\n shouldAddSpecialHeight,\n) => {\n let width\n if (typeof attributes.width === \"string\") {\n // eslint-disable-next-line prefer-destructuring\n width = attributes.width\n } else if (typeof attributes.width === \"number\") {\n width = `${attributes.width.toString()}px`\n }\n let height\n if (chartSettings.aspectRatio === undefined) {\n if (typeof attributes.height === \"string\") {\n // eslint-disable-next-line prefer-destructuring\n height = attributes.height\n } else if (typeof attributes.height === \"number\") {\n height = `${attributes.height.toString()}px`\n }\n }\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n\n const heightFromLocalStorage = attributes.heightId\n ? getHeightFromLocalStorage(attributes.heightId, isLegendOnBottom)\n : null\n\n if (heightFromLocalStorage) {\n // .replace() is for backwards compatibility - old dashboard was always doing\n // JSON.stringify when setting localStorage so many users have '\"180px\"' values set.\n // We can remove .replace() after some time\n height = heightFromLocalStorage.replace(/\"/g, \"\")\n }\n\n if (shouldAddSpecialHeight) {\n const heightOverriden = isLegendOnBottom\n ? window.innerHeight * 0.5\n : window.innerHeight * 0.4\n height = `${heightOverriden}px`\n }\n\n const chartDefaultsMinWidth = window.NETDATA.chartDefaults.min_width\n const minWidth = chartDefaultsMinWidth === null\n ? undefined\n : chartDefaultsMinWidth\n return {\n height,\n width,\n minWidth,\n }\n}\n","import {\n useEffect, useRef, useState, MutableRefObject,\n} from \"react\"\n\nconst globalIntersectionOptions = {\n root: null,\n rootMargin: \"0px\",\n threshold: undefined,\n}\n\ntype IntersectionCallback = (isVisible: boolean) => void\ntype Listener = {\n element: HTMLElement,\n callback: IntersectionCallback,\n}\nconst createGlobalIntersectionObserver = () => {\n let listeners: Listener[] = []\n const globalHandler = (entries: IntersectionObserverEntry[]) => {\n entries.forEach(({ isIntersecting, target }) => {\n const callback = listeners.find(({ element }) => element === target)?.callback\n if (callback) {\n callback(isIntersecting)\n }\n })\n }\n const globalObserver = new IntersectionObserver(globalHandler, globalIntersectionOptions)\n\n return {\n subscribe: (element: HTMLElement, callback: IntersectionCallback) => {\n globalObserver.observe(element)\n listeners = listeners.concat({ element, callback })\n },\n unsubscribe: (elementToUnsubscribe: HTMLElement) => {\n listeners = listeners.filter(({ element }) => element !== elementToUnsubscribe)\n },\n }\n}\nconst globalIntersectionObserver = createGlobalIntersectionObserver()\n\n\n// this hook is created for 2 reasons:\n// 1) to use the same IntersectionObserver for all charts (contrary to use-intersection from\n// react-use, which creates new observer for every hook)\n// 2) to update the isVisible state only when necessary (contrary to what \"use-in-view\" hook from\n// https://github.com/thebuilder/react-intersection-observer does)\nexport const useCommonIntersection = (\n element: HTMLElement,\n clonedChildrenRef: MutableRefObject<HTMLElement | undefined>,\n) => {\n const [isVisible, setIsVisible] = useState(false)\n const isVisibleRef = useRef(isVisible)\n // the ref is just to prevent most updates on init - charts are not visible on first intersection\n // observer callback, but it still tries to set the state. UseState does not bail out when\n // state doesn't change\n\n useEffect(() => {\n if (typeof IntersectionObserver === \"function\") {\n globalIntersectionObserver.subscribe(\n element,\n (newIsVisible) => {\n if (isVisibleRef.current !== newIsVisible) {\n if (clonedChildrenRef.current) {\n // eslint-disable-next-line no-param-reassign\n clonedChildrenRef.current.style.visibility = newIsVisible ? \"visible\" : \"hidden\"\n }\n\n isVisibleRef.current = newIsVisible\n // we need to mirror it in `use-state` to cause react update\n setIsVisible(newIsVisible)\n }\n },\n )\n }\n return () => {\n globalIntersectionObserver.unsubscribe(element)\n }\n }, [clonedChildrenRef, element])\n\n return isVisible\n}\n","import React from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\n\ninterface Props {\n attributes: Attributes\n}\n\n// rendered on init (for example when chart is not visible)\n// and when it's rendering after being hidden previously\nexport const InvisibleSearchableText = ({\n attributes,\n}: Props) => (\n <span style={{ position: \"absolute\", opacity: 0, width: 0 }}>\n {attributes.id}\n </span>\n)\n","import React, {\n useEffect, useLayoutEffect, useState, useRef,\n} from \"react\"\nimport { useDebounce } from \"react-use\"\nimport { forEachObjIndexed } from \"ramda\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\nimport { selectDestroyOnHide, selectIsAsyncOnScroll, selectAlarm } from \"domains/global/selectors\"\nimport { getPortalNodeStyles } from \"domains/chart/utils/get-portal-node-styles\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { chartLibrariesSettings } from \"domains/chart/utils/chartLibrariesSettings\"\nimport { useCommonIntersection } from \"hooks/use-common-intersection\"\n\nimport { clearChartStateAction } from \"../actions\"\n\nimport { InvisibleSearchableText } from \"./invisible-searchable-text\"\n\nconst SCROLL_DEBOUNCE_ASYNC = 750\nconst SCROLL_DEBOUNCE_SYNC = 100\n\nconst cloneWithCanvas = (element: HTMLElement) => {\n const cloned = element.cloneNode(true) as HTMLElement\n const clonedCanvases = cloned.querySelectorAll(\"canvas\")\n\n element.querySelectorAll(\"canvas\")\n .forEach((oldCanvas, index) => {\n const newCanvas = clonedCanvases[index]\n const context = newCanvas.getContext(\"2d\")\n\n newCanvas.width = oldCanvas.width\n newCanvas.height = oldCanvas.height\n\n if (context) {\n context.drawImage(oldCanvas, 0, 0)\n }\n })\n return cloned\n}\n\nconst shouldCleanChartStateAlways = localStorage.getItem(\"wipe-chart-state\")\n\ninterface Props {\n attributes: Attributes\n chartUuid: string\n children: any\n portalNode: HTMLElement\n}\nexport const DisableOutOfView = ({\n attributes,\n chartUuid,\n children,\n portalNode,\n}: Props) => {\n /* when unmounting, clear redux state for this chart */\n const dispatch = useDispatch()\n useEffect(() => { // eslint-disable-line arrow-body-style\n return () => {\n dispatch(clearChartStateAction({ id: chartUuid }))\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n\n /* separate functionality - adding custom styles to portalNode */\n const chartSettings = chartLibrariesSettings[attributes.chartLibrary]\n const [hasPortalNodeBeenStyled, setHasPortalNodeBeenStyled] = useState<boolean>(false)\n const isShowingAlarmOnChart = useSelector(selectAlarm)?.chartId === attributes.id\n useLayoutEffect(() => {\n if (hasPortalNodeBeenStyled) {\n return\n }\n const shouldAddSpecialHeight = isShowingAlarmOnChart\n && attributes.chartLibrary === \"dygraph\"\n && chartSettings.hasLegend(attributes)\n const styles = getPortalNodeStyles(attributes, chartSettings, shouldAddSpecialHeight)\n forEachObjIndexed((value, styleName) => {\n if (value) {\n portalNode.style.setProperty(styleName, value)\n }\n }, styles)\n // eslint-disable-next-line no-param-reassign\n portalNode.className = chartSettings.containerClass(attributes)\n setHasPortalNodeBeenStyled(true)\n }, [attributes, chartSettings, hasPortalNodeBeenStyled, isShowingAlarmOnChart, portalNode,\n setHasPortalNodeBeenStyled ])\n /* end of \"adding custom styles to portalNode\" */\n\n\n const destroyOnHide = useSelector(selectDestroyOnHide)\n\n const clonedChildrenRef = useRef<HTMLElement>()\n const isVisibleIntersection = useCommonIntersection(portalNode, clonedChildrenRef)\n\n // todo hook to scroll (observe on visible items) instead of changes in intersectionRatio\n // because intersectinnRatio maxes out on 1.0 when element is fully visible\n const isAsyncOnScroll = useSelector(selectIsAsyncOnScroll)\n const debounceTime = isAsyncOnScroll ? SCROLL_DEBOUNCE_ASYNC : SCROLL_DEBOUNCE_SYNC\n\n // \"should hide because of debounced scroll handler\"\n const [shouldHideDebounced, setShouldHideDebounced] = useState(!isVisibleIntersection)\n useDebounce(\n () => {\n // start rendering, when intersectionRatio is not 0 and it hasn't changed for 1500 ms\n setShouldHideDebounced(!isVisibleIntersection)\n },\n debounceTime,\n [isVisibleIntersection],\n )\n const shouldHide = isVisibleIntersection ? shouldHideDebounced : true\n\n const previousIsVisibleIntersection = useRef(isVisibleIntersection)\n if (clonedChildrenRef.current\n && previousIsVisibleIntersection.current !== isVisibleIntersection\n ) {\n previousIsVisibleIntersection.current = isVisibleIntersection\n }\n\n useEffect(() => {\n if (!isPrintMode && shouldHide && shouldCleanChartStateAlways) {\n dispatch(clearChartStateAction({ id: chartUuid }))\n }\n }, [chartUuid, dispatch, shouldHide])\n\n\n if (isPrintMode) {\n // we should show everything in this case\n return children\n }\n\n if (shouldHide) {\n // todo perhaps loader should be added here to both scenarios\n if (destroyOnHide) {\n return (\n <InvisibleSearchableText attributes={attributes} />\n )\n }\n\n if (!clonedChildrenRef.current) {\n const newClonedChildren = Array.from(portalNode.children)\n .map((child) => cloneWithCanvas(child as HTMLElement))\n\n const clonedChildrenContainer = document.createElement(\"div\")\n clonedChildrenContainer.style.visibility = \"hidden\"\n\n newClonedChildren.forEach((child) => {\n clonedChildrenContainer.appendChild(child)\n })\n\n clonedChildrenRef.current = clonedChildrenContainer\n }\n\n return (\n <>\n <InvisibleSearchableText attributes={attributes} />\n <div\n ref={(nodeElement) => {\n if (nodeElement && clonedChildrenRef.current) {\n nodeElement.appendChild(clonedChildrenRef.current)\n }\n }}\n />\n </>\n )\n }\n\n if (!destroyOnHide && clonedChildrenRef.current) {\n clonedChildrenRef.current = undefined\n }\n\n return children\n}\n","import React from \"react\"\n\nimport { Attributes } from \"../../utils/transformDataAttributes\"\nimport { ChartMetadata } from \"../../chart-types\"\nimport { ChartWithLoader, RenderCustomElementForDygraph } from \"../chart-with-loader\"\nimport { DisableOutOfView } from \"../disable-out-of-view\"\nimport { DropdownMenu } from \"../chart-dropdown\"\n\nexport type Props = {\n attributes: Attributes\n // warning! this is not the same as chartId in old dashboard\n // here, the chartID must be unique across all agents\n chartUuid: string\n uuid?: string\n portalNode: HTMLElement\n chartMetadata?: ChartMetadata | undefined\n dropdownMenu?: DropdownMenu\n renderCustomElementForDygraph?: RenderCustomElementForDygraph\n onAttributesChange?: any\n}\n\nexport const ChartContainer = ({\n attributes,\n chartMetadata,\n chartUuid,\n dropdownMenu,\n portalNode,\n renderCustomElementForDygraph,\n onAttributesChange,\n uuid,\n}: Props) => (\n <DisableOutOfView attributes={attributes} portalNode={portalNode} chartUuid={chartUuid}>\n <ChartWithLoader\n attributes={attributes}\n chartUuid={chartUuid}\n renderCustomElementForDygraph={renderCustomElementForDygraph}\n onAttributesChange={onAttributesChange}\n dropdownMenu={dropdownMenu}\n externalChartMetadata={chartMetadata}\n portalNode={portalNode}\n uuid={uuid}\n />\n </DisableOutOfView>\n)\n","/* eslint-disable max-len */\nimport { ChartsMetadata } from \"domains/global/types\"\nimport { AnyStringKeyT } from \"types/common\"\nimport { ChartEnriched } from \"domains/chart/chart-types\"\n\nexport interface Submenus {\n [submenus: string]: {\n charts: ChartEnriched[]\n height: number\n info: string | null\n priority: number\n title: string | null\n }\n}\n\nexport interface CorrelationMetadata {\n scoredCount?: number\n totalCount?: number\n averageScore?: number\n}\n\nexport interface Menu {\n // eslint-disable-next-line camelcase\n menu_pattern: string\n priority: number\n submenus: Submenus\n title: string\n icon: string\n info: string\n height: number\n correlationsMetadata?: CorrelationMetadata\n}\n\nexport interface Menus {\n [menu: string]: Menu\n}\n\nexport const options = {\n menus: {} as Menus,\n submenu_names: {} as {[family: string]: string},\n data: null as (ChartsMetadata | null),\n hostname: \"netdata_server\", // will be overwritten by the netdata server\n version: \"unknown\",\n release_channel: \"unknown\",\n hosts: [],\n\n duration: 0, // the default duration of the charts\n update_every: 1,\n\n chartsPerRow: 0,\n // chartsMinWidth: 1450,\n chartsHeight: 180,\n}\n\n\n// netdata standard information\nexport const netdataDashboard = {\n sparklines_registry: {} as {[key: string]: { count: number }},\n os: \"unknown\",\n\n menu: {},\n submenu: {} as {\n [family: string]: {\n info?: string | ((os: string) => string)\n title?: string\n }\n },\n context: {} as {\n [id: string]: {\n valueRange: string // examples: \"[0, 100]\", \"[null, null]\"\n height: number\n decimalDigits: number\n }},\n\n // generate a sparkline\n // used in the documentation\n sparkline(\n prefix: string, chart: string, dimension: string, units: string = \"\", suffix: string,\n ) {\n if (options.data === null || typeof options.data.charts === \"undefined\") {\n return \"\"\n }\n\n if (typeof options.data.charts[chart] === \"undefined\") {\n return \"\"\n }\n\n if (typeof options.data.charts[chart].dimensions === \"undefined\") {\n return \"\"\n }\n\n if (typeof options.data.charts[chart].dimensions[dimension] === \"undefined\") {\n return \"\"\n }\n\n let key = `${chart}.${dimension}`\n\n if (typeof this.sparklines_registry[key] === \"undefined\") {\n this.sparklines_registry[key] = { count: 1 }\n } else {\n this.sparklines_registry[key].count += 1\n }\n\n key = `${key}.${this.sparklines_registry[key].count}`\n\n return `${prefix}<div class=\"netdata-container\" data-netdata=\"${chart}\" data-after=\"-120\"\n data-width=\"25%\" data-height=\"15px\" data-chart-library=\"dygraph\"\n data-dygraph-theme=\"sparkline\" data-dimensions=\"${dimension}\"\n data-show-value-of-${dimension}-at=\"${key}\"></div>\n (<span id=\"${key}\" style=\"display: inline-block; min-width: 50px; text-align: right;\">\n X</span>${units})${suffix}`\n },\n\n gaugeChart(\n title: string, width: string, dimensions: string = \"\", colors: string = \"\",\n ) {\n return `${\"<div class=\\\"netdata-container\\\" data-netdata=\\\"CHART_UNIQUE_ID\\\"\"\n + \" data-dimensions=\\\"\"}${dimensions}\"`\n + \" data-chart-library=\\\"gauge\\\"\"\n + \" data-gauge-adjust=\\\"width\\\"\"\n + ` data-title=\"${title}\"`\n + ` data-width=\"${width}\"`\n + \" data-before=\\\"0\\\"\"\n + \" data-after=\\\"-CHART_DURATION\\\"\"\n + \" data-points=\\\"CHART_DURATION\\\"\"\n + ` data-colors=\"${colors}\"`\n + \" role=\\\"application\\\"></div>\"\n },\n\n anyAttribute(obj: AnyStringKeyT, attr: string, key: string, def: unknown) {\n if (typeof (obj[key]) !== \"undefined\") {\n const x = obj[key][attr]\n\n if (typeof (x) === \"undefined\") {\n return def\n }\n\n if (typeof (x) === \"function\") {\n return x(netdataDashboard.os)\n }\n\n return x\n }\n\n return def\n },\n\n menuTitle(chart: ChartEnriched) {\n if (chart.sectionTitle) {\n return chart.sectionTitle\n }\n if (typeof chart.menu_pattern !== \"undefined\") {\n const type = chart.type || chart.id.split(\".\")[0]\n return (`${this.anyAttribute(this.menu, \"title\", chart.menu_pattern, chart.menu_pattern)\n .toString()\n } ${type.slice(-(type.length - chart.menu_pattern.length - 1)).toString()}`)\n .replace(/_/g, \" \")\n }\n\n return (this.anyAttribute(this.menu, \"title\", chart.menu, chart.menu)).toString()\n .replace(/_/g, \" \")\n },\n\n menuIcon(chart: ChartEnriched) {\n if (typeof chart.menu_pattern !== \"undefined\") {\n return this.anyAttribute(this.menu, \"icon\", chart.menu_pattern,\n \"<i class=\\\"fas fa-puzzle-piece\\\"></i>\").toString()\n }\n\n return this.anyAttribute(this.menu, \"icon\", chart.menu, \"<i class=\\\"fas fa-puzzle-piece\\\"></i>\")\n },\n\n menuInfo(chart: ChartEnriched) {\n if (typeof chart.menu_pattern !== \"undefined\") {\n return this.anyAttribute(this.menu, \"info\", chart.menu_pattern, null)\n }\n\n return this.anyAttribute(this.menu, \"info\", chart.menu, null)\n },\n\n menuHeight(chart: ChartEnriched) {\n if (typeof chart.menu_pattern !== \"undefined\") {\n return this.anyAttribute(this.menu, \"height\", chart.menu_pattern, 1.0)\n }\n\n return this.anyAttribute(this.menu, \"height\", chart.menu, 1.0)\n },\n\n submenuTitle(menu: string, submenu: string) {\n const key = `${menu}.${submenu}`\n // console.log(key);\n const title = this.anyAttribute(this.submenu, \"title\", key, submenu)\n .toString().replace(/_/g, \" \") as string\n if (title.length > 28) {\n const a = title.substring(0, 13)\n const b = title.substring(title.length - 12, title.length)\n return `${a}...${b}`\n }\n return title\n },\n\n submenuInfo(menu: string, submenu: string) {\n const key = `${menu}.${submenu}`\n return this.anyAttribute(this.submenu, \"info\", key, null) as (string | null)\n },\n\n submenuHeight(menu: string, submenu: string, relative: number) {\n const key = `${menu}.${submenu}`\n return this.anyAttribute(this.submenu, \"height\", key, 1.0) * relative\n },\n\n contextInfo(id: string) {\n const x = this.anyAttribute(this.context, \"info\", id, null)\n\n if (x !== null) {\n return `<div class=\"shorten dashboard-context-info\"\n role=\"document\">${x}</div>`\n }\n return \"\"\n },\n\n contextValueRange(id: string) {\n if (typeof this.context[id] !== \"undefined\"\n && typeof this.context[id].valueRange !== \"undefined\"\n ) {\n try {\n return JSON.parse(this.context[id].valueRange)\n } catch (e) {\n return [null, null]\n }\n }\n return [null, null]\n },\n\n contextHeight(id: string, def: number) {\n if (typeof this.context[id] !== \"undefined\" && typeof this.context[id].height !== \"undefined\") {\n return def * this.context[id].height\n }\n return def\n },\n\n contextDecimalDigits(id: string, def: number) {\n if (typeof this.context[id] !== \"undefined\"\n && typeof this.context[id].decimalDigits !== \"undefined\"\n ) {\n return this.context[id].decimalDigits\n }\n return def\n },\n}\n\n// @ts-ignore\nwindow.netdataDashboard = netdataDashboard\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/destructuring-assignment */\n/* eslint-disable operator-linebreak */\n/* eslint-disable arrow-body-style */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { memo } from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, Text } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { useFormatters } from \"domains/chart/utils/formatters\"\nimport { netdataDashboard } from \"domains/dashboard/utils/netdata-dashboard\"\nimport { selectChartData } from \"domains/chart/selectors\"\n\nconst Title = styled(Text)`\n text-overflow: ellipsis;\n max-width: 120px;\n overflow-x: hidden;\n`\n\nconst getUnitSign = unit => {\n return unit === \"percentage\" ? \"%\" : ` ${unit.replace(/milliseconds/, \"ms\")}`\n}\n\nconst aggrMethods = {\n avg: \"Average\",\n sum: \"Sum\",\n min: \"Min\",\n max: \"Max\",\n}\nconst getAggregation = value => `${aggrMethods[value]}` || \"\"\n\nconst ChartValueContainer = memo(({ id, units, aggrMethod, displayedIndex }) => {\n const chartData = useSelector((state: AppStateT) => selectChartData(state, { id }))\n\n const value =\n typeof displayedIndex === \"number\"\n ? chartData.result[displayedIndex]\n : chartData.view_latest_values[0]\n\n const { legendFormatValue, unitsCurrent } = useFormatters({\n attributes: {},\n data: chartData,\n units,\n unitsCommon: null,\n unitsDesired: null,\n uuid: id,\n })\n\n const aggregation = getAggregation(aggrMethod)\n\n return (\n <Text\n wordBreak=\"keep-all\"\n color=\"bright\"\n margin={[0, 0, 0, \"auto\"]}\n data-testid=\"k8sPopoverChart-chartValue\"\n >\n {aggregation && (\n <Text margin={[0, 1, 0, 0]} color=\"separator\" data-testid=\"k8sPopoverChart-chartValue-aggr\">\n {aggregation}\n </Text>\n )}\n {legendFormatValue(value)}\n {getUnitSign(unitsCurrent)}\n </Text>\n )\n})\n\nconst ChartValue = ({ id, ...rest }) => {\n const chartData = useSelector((state: AppStateT) => selectChartData(state, { id }))\n\n if (!chartData || chartData.result.length === 0) return null\n return <ChartValueContainer id={id} {...rest} />\n}\n\nconst ChartOverview = ({ id, chartMetadata, aggrMethod, displayedIndex }) => {\n const { units, context } = chartMetadata\n const title = context.replace(/cgroup\\./, \"\")\n const icon = netdataDashboard.menuIcon(chartMetadata)\n\n return (\n <Flex gap={2} data-testid=\"k8sPopoverChart-overview\">\n <Text color=\"bright\" dangerouslySetInnerHTML={{ __html: icon }} />\n <Title color=\"bright\" data-testid=\"k8sPopoverChart-title\">\n {title}\n </Title>\n <ChartValue id={id} units={units} aggrMethod={aggrMethod} displayedIndex={displayedIndex} />\n </Flex>\n )\n}\n\nexport default memo(ChartOverview)\n","import React, { useMemo } from \"react\"\nimport Anchor from \"@/src/components/anchor\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport { useLocalStorage } from \"react-use\"\nimport { utmUrlSuffix } from \"utils/utils\"\nimport { utmParametersToString } from \"domains/global/selectors\"\n\nexport type UserStatus = \"LOGGED_IN\" | \"EXPIRED_LOGIN\" | \"UNKNOWN\"\nexport type NodeClaimedStatus = \"NOT_CLAIMED\" | \"CLAIMED\"\nexport type UserNodeAccess = \"NO_ACCESS\" | \"ACCESS_OK\"\ntype UserPreference = \"AGENT\" | \"CLOUD\" | \"UNDEFINED\"\nexport type NodeLiveness = \"LIVE\" | \"NOT_LIVE\"\ntype CTATYPE = \"NAVIGATE\" | \"REFRESH\"\n\nexport enum MigrationModalPromos {\n PROMO_SIGN_IN_CLOUD = \"PROMO_SIGN_IN_CLOUD\",\n PROMO_SIGN_UP_CLOUD = \"PROMO_SIGN_UP_CLOUD\",\n PROMO_IVNITED_TO_SPACE = \"PROMO_IVNITED_TO_SPACE\",\n PROMO_CLAIM_NODE = \"PROMO_CLAIM_NODE\",\n PROMO_TO_USE_NEW_DASHBAORD = \"PROMO_TO_USE_NEW_DASHBAORD\",\n FALLBACK_TO_AGENT = \"FALLBACK_TO_AGENT\",\n NO_INFO_FALLBACK_TO_AGENT = \"NO_INFO_FALLBACK_TO_AGENT\",\n}\n\ntype MigrationModalActions = {\n text: string\n action: CTATYPE\n toPath?: string\n userPreference?: UserPreference | \"DONT_SHOW\"\n}\n\ntype MigrationModalContent = {\n title: string\n text: {\n header: ((props: any) => React.ReactNode) | string\n bullets?: Array<string | ((props?: any) => React.ReactNode)>\n footer?: ((props: any) => React.ReactNode) | string\n }\n tickBoxOption: { text: string; prefrenceID: 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 prefrenceID: 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 prefrenceID: 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 prefrenceID: 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 prefrenceID: 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 prefrenceID: 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 prefrenceID: 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 prefrenceID: 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<MigrationModalPromos, (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] =\n useLocalStorage<UserPreference>(\"USER_SAVED_PREFERENCE\")\n\n const migrationModalPromo = useMemo<MigrationModalPromos>(() => {\n return Object.keys(modalStatusWithPromoFunctions).find(modalStatus => {\n return modalStatusWithPromoFunctions[modalStatus]({\n userStatus,\n nodeClaimedStatus,\n userNodeAccess,\n userSavedPreference,\n nodeLiveness,\n })\n }) as MigrationModalPromos\n }, [userStatus, nodeClaimedStatus, userNodeAccess, nodeLiveness, userSavedPreference])\n\n return {\n migrationModalPromoInfo: migrationmodalInfo[migrationModalPromo],\n migrationModalPromo,\n setUserPrefrence,\n userSavedPreference,\n }\n}\n\nexport default useMigrationModal\n","/* eslint-disable comma-dangle */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { useRef, useContext, useLayoutEffect, useState, memo, useMemo } from \"react\"\nimport { throttle } from \"throttle-debounce\"\nimport { ChartContainer } from \"domains/chart/components/chart-container\"\nimport { ThemeContext } from \"styled-components\"\nimport { Flex, getColor } from \"@netdata/netdata-ui\"\nimport ChartOverview from \"./chartOverview\"\n\nconst Chart = ({ groupLabel, postGroupLabel, id, attributes, relatedIndex }) => {\n const theme = useContext(ThemeContext)\n const chartContainerRef = useRef()\n const [displayedIndex, setDisplayedIndex] = useState()\n const setDisplayedIndexThrottled = useMemo(() => throttle(400, setDisplayedIndex), [])\n const [, repaint] = useState()\n\n useLayoutEffect(() => {\n repaint(true)\n }, [])\n\n const { chartMetadata, attributes: relatedChartAttributes } = attributes.relatedCharts[\n relatedIndex\n ]\n\n const chartAttributes = useMemo(\n () => ({\n id: chartMetadata.id,\n\n width: \"100%\",\n height: \"60px\",\n\n chartLibrary: \"sparkline\",\n sparklineLineWidth: \"2px\",\n sparklineLineColor: getColor(\"border\")({ theme }),\n sparklineFillColor: getColor(\"disabled\")({ theme }),\n sparklineSpotRadius: 0,\n sparklineDisableTooltips: true,\n sparklineOnHover: (event) => setDisplayedIndexThrottled(event?.x),\n\n httpMethod: \"POST\",\n host: attributes.host,\n nodeIDs: attributes.nodeIDs,\n dimensions: relatedChartAttributes.dimensions,\n aggrMethod: relatedChartAttributes.aggrMethod,\n\n labels: {\n k8s_cluster_id: [chartMetadata.chartLabels.k8s_cluster_id[0]],\n [attributes.groupBy]: [groupLabel],\n ...(postGroupLabel && { [attributes.postGroupBy]: [postGroupLabel] }),\n },\n }),\n [chartMetadata, attributes]\n )\n\n return (\n <Flex gap={2} column data-testid=\"k8sPopoverChart\">\n <div\n ref={chartContainerRef}\n style={{ height: \"60px\", width: \"100%\" }}\n data-testid=\"k8sPopoverChart-container\"\n >\n {chartContainerRef.current && (\n <ChartContainer\n chartUuid={id}\n attributes={chartAttributes}\n chartMetadata={chartMetadata}\n portalNode={chartContainerRef.current}\n />\n )}\n </div>\n <ChartOverview\n id={id}\n aggrMethod={chartAttributes.aggrMethod}\n chartMetadata={chartMetadata}\n displayedIndex={displayedIndex}\n />\n </Flex>\n )\n}\n\nexport default memo(Chart)\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport styled from \"styled-components\"\nimport { Text, Flex, Icon } from \"@netdata/netdata-ui\"\n\nconst ExternalButton = styled(Icon).attrs({\n margin: [0, 0, 0, \"auto\"],\n color: \"bright\",\n width: \"10px\",\n height: \"10px\",\n alignSelf: \"center\",\n name: \"nav_arrow_goto\",\n role: \"button\",\n title: \"Go to node\",\n \"data-testid\": \"k8sPopoverItem-externalButton\",\n})`\n cursor: pointer;\n`\n\nconst Item = ({ icon, title, secondary, onClick }) => (\n <Flex gap={1} alignItems=\"start\" data-testid=\"k8sPopoverItem\">\n <Flex width=\"22px\" height=\"22px\" data-testid=\"k8sPopoverItem-icon\">\n <Icon name={icon} color=\"bright\" margin={[0, 1, 0, 0]} width=\"22px\" height=\"22px\" />\n </Flex>\n <Text color=\"bright\" data-testid=\"k8sPopoverItem-title\">\n {title}\n </Text>\n {secondary && (\n <Text color=\"border\" wordBreak=\"break-all\" data-testid=\"k8sPopoverItem-detail\">\n {secondary}\n </Text>\n )}\n {onClick && <ExternalButton onClick={onClick} />}\n </Flex>\n)\n\nexport default Item\n","/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { useDateTime } from \"utils/date-time\"\nimport Item from \"./item\"\nimport Section from \"./section\"\n\nconst DateItem = ({ date, title }) => {\n const { localeDateString, localeTimeString } = useDateTime()\n\n return (\n <Item\n icon=\"around_clock\"\n title={title}\n secondary={`${localeDateString(date)} | ${localeTimeString(date)}`}\n />\n )\n}\n\nconst DateSection = ({ before, after }) => (\n <Section title=\"Time\">\n <DateItem title=\"From\" date={after} />\n <DateItem title=\"To\" date={before} />\n </Section>\n)\n\nexport default DateSection\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Section from \"./section\"\nimport Chart from \"./chart\"\nimport DateSection from \"./dateSection\"\n\nconst Metrics = ({ groupLabel, postGroupLabel, attributes, viewAfter, viewBefore }) => (\n <Flex gap={3} column width=\"100%\" data-testid=\"k8sPopoverMetrics\">\n <DateSection after={viewAfter} before={viewBefore} />\n <Section title=\"Metrics\" noBorder>\n <Flex gap={3} column data-testid=\"k8sPopoverMetrics-container\">\n {attributes.relatedCharts.map(({ chartMetadata }, index) => (\n <Chart\n key={chartMetadata.id}\n id={[groupLabel, postGroupLabel, attributes.id, chartMetadata.id].join(\"|\")}\n attributes={attributes}\n relatedIndex={index}\n groupLabel={groupLabel}\n postGroupLabel={postGroupLabel}\n />\n ))}\n </Flex>\n </Section>\n </Flex>\n)\n\nexport default Metrics\n","/* eslint-disable no-param-reassign */\n/* eslint-disable comma-dangle */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { memo } from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Item from \"./item\"\nimport Section from \"./section\"\nimport getLabel, { labelIds } from \"./getLabel\"\n\nconst LabelsSection = ({ labelId, items, onExpand, onItemClick, ...rest }) => {\n const { title, icon } = getLabel(labelId)\n const sliced = items.slice(0, 3)\n const expandable = items.length > 3\n\n const text = expandable ? `${title} (${items.length})` : title\n return (\n <Section title={text} onExpand={expandable && onExpand} {...rest}>\n {sliced.map((item) => (\n <Item\n key={item}\n icon={icon}\n title={item}\n onClick={onItemClick && (() => onItemClick(item))}\n />\n ))}\n </Section>\n )\n}\n\nconst getLabelIds = (chartLabels) => {\n chartLabels = { ...chartLabels }\n const predefinedLabelIds = labelIds.reduce((acc, labelId) => {\n if (!(labelId in chartLabels)) return acc\n\n delete chartLabels[labelId]\n return [...acc, labelId]\n }, [])\n\n return [...predefinedLabelIds, ...Object.keys(chartLabels)]\n}\n\nconst Context = ({ chartLabels, onExpand, onNodeClick }) => {\n const ids = getLabelIds(chartLabels)\n\n return (\n <Flex gap={3} column width=\"100%\" data-testid=\"k8sPopoverContext\">\n {ids.map((id, index) => (\n <LabelsSection\n key={id}\n labelId={id}\n items={chartLabels[id]}\n onExpand={() => onExpand(id)}\n noBorder={index === ids.length - 1}\n onItemClick={id === \"k8s_node_name\" && onNodeClick}\n />\n ))}\n </Flex>\n )\n}\n\nexport default memo(Context)\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React from \"react\"\nimport { Flex, Button, makeFlex } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\nimport Separator from \"./separator\"\nimport Header from \"./header\"\nimport Item from \"./item\"\nimport getLabel from \"./getLabel\"\n\nconst StyledButton = styled(makeFlex(Button)).attrs({\n flavour: \"borderless\",\n neutral: true,\n themeType: \"dark\",\n className: \"btn\",\n alignItems: \"start\",\n gap: 1,\n})`\n &&& {\n padding: 0;\n margin: 0;\n height: initial;\n width: initial;\n\n svg {\n height: 18px;\n width: 18px;\n position: initial;\n }\n }\n`\n\nconst List = ({ labelId, items, onBack, onItemClick }) => {\n const { title, icon } = getLabel(labelId)\n\n return (\n <Flex height=\"100%\" gap={3} data-testid=\"k8sPopoverList\" column>\n <Header>\n <StyledButton\n label={`${title} (${items.length})`}\n icon=\"chevron_left\"\n onClick={onBack}\n data-testid=\"k8sPopoverList-back\"\n />\n </Header>\n <Separator />\n <Flex\n gap={3}\n overflow={{ vertical: \"auto\", horizontal: \"hidden\" }}\n column\n data-testid=\"k8sPopoverList-container\"\n >\n {items.map((item) => (\n <Item\n key={item}\n icon={icon}\n title={item}\n onClick={onItemClick && (() => onItemClick(item))}\n />\n ))}\n </Flex>\n </Flex>\n )\n}\n\nexport default List\n","/* eslint-disable object-curly-newline */\n/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { useState } from \"react\"\nimport { Flex, DropContainer } from \"@netdata/netdata-ui\"\nimport Separator from \"./separator\"\nimport Header from \"./header\"\nimport Tabs from \"./tabs\"\nimport Metrics from \"./metrics\"\nimport Context from \"./context\"\nimport List from \"./list\"\n\nconst Container = (props) => (\n <DropContainer\n background={[\"transparent\", \"popover\"]}\n padding={[2, 4]}\n width=\"322px\"\n height=\"422px\"\n {...props}\n />\n)\n\nconst TabsContainer = ({ label, value, onChange, children }) => (\n <Flex height=\"100%\" column>\n <Header>{label}</Header>\n <Tabs value={value} onChange={onChange} margin={[4, 0, 0, 0]} />\n <Separator />\n <Flex gap={3} overflow={{ vertical: \"auto\", horizontal: \"hidden\" }} margin={[4, 0, 0, 0]}>\n {children}\n </Flex>\n </Flex>\n)\n\nconst Popover = ({\n title,\n groupLabel,\n postGroupLabel,\n chartLabels,\n attributes,\n viewBefore,\n viewAfter,\n ...rest\n}) => {\n const [view, setView] = useState(\"context\")\n\n const isLabelView = view !== \"context\" && view !== \"metrics\"\n\n const { onNodeClick } = attributes\n\n return (\n <Container data-testid=\"k8sPopover\" {...rest}>\n {isLabelView && (\n <List\n labelId={view}\n items={chartLabels[view]}\n attributes={attributes}\n onBack={() => setView(\"context\")}\n onItemClick={view === \"k8s_node_name\" && onNodeClick}\n />\n )}\n {!isLabelView && (\n <TabsContainer label={title} value={view} onChange={setView}>\n {view === \"context\" && (\n <Context chartLabels={chartLabels} onExpand={setView} onNodeClick={onNodeClick} />\n )}\n {view === \"metrics\" && (\n <Metrics\n groupLabel={groupLabel}\n postGroupLabel={postGroupLabel}\n attributes={attributes}\n viewAfter={viewAfter}\n viewBefore={viewBefore}\n />\n )}\n </TabsContainer>\n )}\n </Container>\n )\n}\n\nexport default Popover\n","/* eslint-disable arrow-body-style */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable comma-dangle */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\nimport React, { useMemo } from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { ChartMetadata } from \"domains/chart/chart-types\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes.ts\"\nimport { ChartTimeframe } from \"domains/chart/components/chart-legend-bottom\"\nimport GroupBoxes from \"domains/chart/components/lib-charts/group-box-chart/groupBoxes\"\nimport Legend from \"domains/chart/components/lib-charts/group-box-chart/legend\"\nimport getLabel from \"./getLabel\"\nimport transform from \"./transform\"\nimport Popover from \"./popover\"\n\ninterface Props {\n chartData: any\n chartMetadata: ChartMetadata\n attributes: Attributes\n viewAfter: number\n viewBefore: number\n hoveredRow: number\n hoveredX: number | null\n showUndefined: boolean\n}\n\nconst Kubernetes = ({\n chartData,\n chartMetadata,\n attributes,\n viewAfter,\n viewBefore,\n hoveredRow,\n hoveredX,\n showUndefined,\n}: Props) => {\n const { filteredRows } = attributes\n const { data: groupBoxData, labels, chartLabels } = useMemo(\n () => transform(chartData, filteredRows),\n [filteredRows, chartData]\n )\n\n const {\n id,\n result: { data },\n groupBy,\n postGroupBy,\n } = chartData\n\n const renderBoxPopover = ({ groupIndex, index, align }) => {\n const label = groupBoxData[groupIndex].labels[index]\n const { title } = getLabel(postGroupBy)\n\n return (\n <Popover\n align={align}\n title={`${title}: ${label}`}\n groupLabel={labels[groupIndex]}\n postGroupLabel={label}\n chartLabels={groupBoxData[groupIndex].chartLabels[index]}\n attributes={attributes}\n viewBefore={viewBefore}\n viewAfter={viewAfter}\n />\n )\n }\n\n const renderGroupPopover = ({ groupIndex, align }) => {\n const label = labels[groupIndex]\n const { title } = getLabel(groupBy)\n\n return (\n <Popover\n align={align}\n title={`${title}: ${label}`}\n groupLabel={label}\n chartLabels={chartLabels[groupIndex]}\n attributes={attributes}\n viewBefore={viewBefore}\n viewAfter={viewAfter}\n />\n )\n }\n\n const groupedBoxesData = useMemo(() => {\n return groupBoxData.map((groupedBox) => {\n return {\n labels: groupedBox.labels,\n data:\n hoveredRow === -1 || hoveredRow > data.length || !(hoveredRow in data)\n ? groupedBox.postAggregated\n : groupedBox.indexes.map((index) => data[hoveredRow][index + 1]) || [],\n }\n })\n }, [data, groupBoxData, hoveredRow])\n\n return (\n <Flex column width=\"100%\" height=\"100%\" gap={4} padding={[4, 2]}>\n <GroupBoxes\n data={groupedBoxesData}\n labels={labels}\n renderBoxPopover={renderBoxPopover}\n renderGroupPopover={renderGroupPopover}\n />\n <Flex data-testid=\"legend-container\" justifyContent=\"between\">\n <Legend>{id}</Legend>\n <ChartTimeframe\n chartMetadata={chartMetadata}\n showUndefined={showUndefined}\n hoveredX={hoveredX}\n viewBefore={viewBefore}\n chartData={chartData}\n />\n </Flex>\n </Flex>\n )\n}\n\nexport default Kubernetes\n","/* eslint-disable arrow-body-style */\n/* eslint-disable object-curly-newline */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable comma-dangle */\n/* eslint-disable react/prop-types */\n// @ts-nocheck\n\nexport default (chartData, filteredRows) => {\n const { keys, labels: labelValues, groupBy, postGroupBy, aggrGroups, postAggregated } = chartData\n const groupValues = keys[groupBy]\n const postGroupValues = keys[postGroupBy]\n const indexes = filteredRows || [...Array(groupValues.length)].map((v, index) => index)\n\n const postGroupData = indexes.reduce((acc: any, index: number) => {\n const groupValue = groupValues[index]\n if (!(groupValue in acc)) {\n acc[groupValue] = {\n labels: [],\n indexes: [],\n chartLabels: [],\n postAggregated: [],\n }\n }\n const boxes = acc[groupValue]\n boxes.indexes.push(index)\n boxes.labels.push(postGroupValues[index])\n boxes.postAggregated.push(postAggregated[index])\n\n const chartLabels = aggrGroups.reduce((labelsAcc, label) => {\n return labelValues[label][index]\n ? { ...labelsAcc, [label]: labelValues[label][index] }\n : labelsAcc\n }, {})\n boxes.chartLabels.push(chartLabels)\n return acc\n }, {})\n\n const labels = Object.keys(postGroupData).sort(\n (a, b) => postGroupData[b].indexes.length - postGroupData[a].indexes.length\n )\n\n const groupData = labels.map((label) => postGroupData[label])\n\n const groupChartLabels = groupData.map((boxes) => {\n return aggrGroups.reduce((acc, label) => {\n const groupLabels = new Set(\n boxes.chartLabels.reduce((accChartLabels, chartLabels) => {\n return chartLabels[label] ? [...accChartLabels, ...chartLabels[label]] : accChartLabels\n }, [])\n )\n return groupLabels.size === 0 ? acc : { ...acc, [label]: Array.from(groupLabels) }\n }, {})\n })\n\n return { labels, data: groupData, chartLabels: groupChartLabels }\n}\n","import React, { useCallback } from \"react\"\nimport classNames from \"classnames\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { setGlobalChartUnderlayAction, setGlobalPanAndZoomAction } from \"domains/global/actions\"\nimport { selectSyncPanAndZoom } from \"domains/global/selectors\"\nimport { setChartPanAndZoomAction } from \"domains/chart/actions\"\nimport { useShowValueOutside } from \"hooks/use-show-value-outside\"\n\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport {\n ChartData, ChartMetadata, DygraphData, EasyPieChartData, D3pieChartData,\n} from \"../chart-types\"\nimport { chartLibrariesSettings, ChartLibraryName } from \"../utils/chartLibrariesSettings\"\n\nimport { DygraphChart } from \"./lib-charts/dygraph-chart\"\nimport { EasyPieChart } from \"./lib-charts/easy-pie-chart\"\nimport { GaugeChart } from \"./lib-charts/gauge-chart\"\nimport { SparklineChart } from \"./lib-charts/sparkline-chart\"\nimport { D3pieChart } from \"./lib-charts/d3pie-chart\"\nimport { PeityChart } from \"./lib-charts/peity-chart\"\nimport { GoogleChart } from \"./lib-charts/google-chart\"\nimport { TextOnly } from \"./lib-charts/text-only\"\nimport { KubernetesGroupBoxes } from \"./lib-charts/group-box-chart\"\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: ChartData\n chartMetadata: ChartMetadata\n chartLibrary: ChartLibraryName\n colors: {\n [key: string]: string\n }\n chartUuid: string\n chartHeight: number\n chartWidth: number\n dimensionsVisibility: boolean[]\n hasEmptyData: boolean\n isRemotelyControlled: boolean\n legendFormatValue: ((v: number | string | null) => number | string)\n orderedColors: string[]\n hoveredX: number | null\n onUpdateChartPanAndZoom: (arg: { after: number, before: number, masterID: string }) => void\n immediatelyDispatchPanAndZoom: () => void\n\n hoveredRow: number\n setHoveredX: (hoveredX: number | null, noMaster?: boolean) => void\n setMinMax: (minMax: [number, number]) => void\n showLatestOnBlur: boolean\n unitsCurrent: string\n viewAfterForCurrentData: number,\n viewBeforeForCurrentData: number,\n}\n\nexport const AbstractChart = ({\n attributes,\n chartContainerElement,\n chartData,\n chartMetadata,\n chartLibrary,\n colors,\n chartUuid,\n chartHeight,\n chartWidth,\n dimensionsVisibility,\n hasEmptyData,\n isRemotelyControlled,\n legendFormatValue,\n orderedColors,\n hoveredRow,\n hoveredX,\n onUpdateChartPanAndZoom,\n immediatelyDispatchPanAndZoom,\n setHoveredX,\n setMinMax,\n showLatestOnBlur,\n unitsCurrent,\n viewAfterForCurrentData,\n viewBeforeForCurrentData,\n}: Props) => {\n const dispatch = useDispatch()\n\n const isSyncPanAndZoom = useSelector(selectSyncPanAndZoom)\n const setGlobalChartUnderlay = useCallback(({ after, before, masterID }) => {\n dispatch(setGlobalChartUnderlayAction({ after, before, masterID }))\n\n // freeze charts\n // don't send masterID, so no padding is applied\n if (isSyncPanAndZoom) {\n dispatch(setGlobalPanAndZoomAction({\n after: viewAfterForCurrentData,\n before: viewBeforeForCurrentData,\n }))\n } else {\n dispatch(setChartPanAndZoomAction({\n after: viewAfterForCurrentData,\n before: viewBeforeForCurrentData,\n id: chartUuid,\n }))\n }\n }, [chartUuid, dispatch, isSyncPanAndZoom, viewAfterForCurrentData, viewBeforeForCurrentData])\n\n const chartSettings = chartLibrariesSettings[chartLibrary]\n const { hasLegend } = chartSettings\n const chartElementClassName = hasLegend(attributes)\n ? classNames(\n `netdata-chart-with-legend-${attributes.legendPosition || \"right\"}`,\n `netdata-${chartLibrary}-chart-with-legend-right`,\n )\n : classNames(\n \"netdata-chart\",\n `netdata-${chartLibrary}-chart`,\n )\n const chartElementId = `${chartLibrary}-${chartUuid}-chart`\n const showUndefined = hoveredRow === -1 && !showLatestOnBlur\n\n useShowValueOutside({\n attributes, chartData, chartSettings, hoveredRow, legendFormatValue, showUndefined,\n })\n\n if (chartLibrary === \"easypiechart\") {\n return (\n <EasyPieChart\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n chartLibrary={chartLibrary}\n chartWidth={chartWidth}\n colors={colors}\n chartUuid={chartUuid}\n dimensionsVisibility={dimensionsVisibility}\n isRemotelyControlled={isRemotelyControlled}\n // easyPieChart doesnt support resizing, so lets just create new one when\n // container size changes\n key={chartWidth}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n hoveredRow={hoveredRow}\n onUpdateChartPanAndZoom={onUpdateChartPanAndZoom}\n setGlobalChartUnderlay={setGlobalChartUnderlay}\n setMinMax={setMinMax}\n showUndefined={showUndefined}\n unitsCurrent={unitsCurrent}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n />\n )\n }\n\n if (chartLibrary === \"gauge\") {\n return (\n <GaugeChart\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n chartLibrary={chartLibrary}\n chartHeight={chartHeight}\n chartWidth={chartWidth}\n colors={colors}\n chartUuid={chartUuid}\n dimensionsVisibility={dimensionsVisibility}\n isRemotelyControlled={isRemotelyControlled}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n onUpdateChartPanAndZoom={onUpdateChartPanAndZoom}\n setGlobalChartUnderlay={setGlobalChartUnderlay}\n setHoveredX={setHoveredX}\n setMinMax={setMinMax}\n showUndefined={showUndefined}\n unitsCurrent={unitsCurrent}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n />\n )\n }\n\n if (chartLibrary === \"sparkline\") {\n return (\n <SparklineChart\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n dimensionsVisibility={dimensionsVisibility}\n isRemotelyControlled={isRemotelyControlled}\n orderedColors={orderedColors}\n unitsCurrent={unitsCurrent}\n viewAfterForCurrentData={viewAfterForCurrentData}\n viewBeforeForCurrentData={viewBeforeForCurrentData}\n />\n )\n }\n\n if (chartLibrary === \"d3pie\") {\n return (\n <D3pieChart\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData as D3pieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n dimensionsVisibility={dimensionsVisibility}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n isRemotelyControlled={isRemotelyControlled}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n setMinMax={setMinMax}\n showUndefined={showUndefined}\n unitsCurrent={unitsCurrent}\n />\n )\n }\n\n if (chartLibrary === \"peity\") {\n return (\n <PeityChart\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n orderedColors={orderedColors}\n />\n )\n }\n\n if (chartLibrary === \"google\") {\n return (\n <GoogleChart\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n orderedColors={orderedColors}\n unitsCurrent={unitsCurrent}\n />\n )\n }\n\n if (chartLibrary === \"textonly\") {\n return (\n <TextOnly\n attributes={attributes}\n chartData={chartData as EasyPieChartData}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n />\n )\n }\n\n if (chartLibrary === \"groupbox\") {\n return (\n <KubernetesGroupBoxes\n chartData={chartData}\n chartMetadata={chartMetadata}\n attributes={attributes}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n showUndefined={showUndefined}\n />\n )\n }\n\n return (\n <DygraphChart\n attributes={attributes}\n chartData={chartData as DygraphData}\n chartMetadata={chartMetadata}\n chartElementClassName={chartElementClassName}\n chartElementId={chartElementId}\n chartLibrary={chartLibrary}\n colors={colors}\n chartUuid={chartUuid}\n dimensionsVisibility={dimensionsVisibility}\n hasEmptyData={hasEmptyData}\n hasLegend={hasLegend(attributes)}\n isRemotelyControlled={isRemotelyControlled}\n orderedColors={orderedColors}\n immediatelyDispatchPanAndZoom={immediatelyDispatchPanAndZoom}\n hoveredRow={hoveredRow}\n hoveredX={hoveredX}\n onUpdateChartPanAndZoom={onUpdateChartPanAndZoom}\n setGlobalChartUnderlay={setGlobalChartUnderlay}\n setHoveredX={setHoveredX}\n setMinMax={setMinMax}\n unitsCurrent={unitsCurrent}\n viewAfter={viewAfterForCurrentData}\n viewBefore={viewBeforeForCurrentData}\n />\n )\n}\n","import { useEffect, useRef } from \"react\"\nimport { isEmpty } from \"ramda\"\nimport { useMount } from \"react-use\"\n\nimport { ChartData, DygraphData } from \"domains/chart/chart-types\"\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartLibraryConfig } from \"domains/chart/utils/chartLibrariesSettings\"\n\n\ninterface UseShowValueOutsideArgument {\n attributes: Attributes\n chartData: ChartData\n chartSettings: ChartLibraryConfig\n hoveredRow: number\n legendFormatValue: ((v: number | string | null) => number | string)\n showUndefined: boolean\n}\n\n// example of the attribute:\n// show-value-of-iowait-at: \"system.cpu.iowait.1\"\n\nexport const useShowValueOutside = ({\n attributes,\n chartData,\n chartSettings,\n hoveredRow,\n legendFormatValue,\n showUndefined,\n}: UseShowValueOutsideArgument) => {\n // a ref to store found elements, just once per lifetime of component\n const showValueAttributesNodes = useRef<(HTMLElement | null)[]>([])\n\n // find the nodes that will have populated values\n useMount(() => {\n const { showValueOf } = attributes\n // showValueOf will be undefined if not used, but additional isEmpty check can prevent\n // regression performance issue in the future\n if (!showValueOf || isEmpty(showValueOf)) {\n return\n }\n const dimensionNames = chartData.dimension_names\n const dimensionIds = chartData.dimension_ids\n dimensionNames.forEach((dimensionName, i) => {\n const userElementId = showValueOf[`show-value-of-${dimensionName.toLowerCase()}`]\n || showValueOf[`show-value-of-${dimensionIds[i].toLowerCase()}-at`]\n\n // if element is not found, just add null\n showValueAttributesNodes.current = showValueAttributesNodes.current.concat(\n document.getElementById(userElementId),\n )\n })\n })\n\n useEffect(() => {\n if (showValueAttributesNodes.current.length) {\n const chartSettingCallOptions = chartSettings.options(attributes)\n const isFlipped = chartSettingCallOptions.includes(\"flip\")\n\n // \"objectrows\" is for d3pie, which has different data format\n if (chartData.format === \"json\" && !chartSettingCallOptions.includes(\"objectrows\")) {\n const { data } = (chartData as DygraphData).result\n const valueIndex = hoveredRow === -1\n ? (data.length - 1)\n : (hoveredRow) // because data for easy-pie-chart are flipped\n\n // yes, \"flipped\" value means chronological order (from oldest to newest) :)\n const rowIndex = isFlipped ? valueIndex : (data.length - valueIndex - 1)\n const row = data[rowIndex]\n\n chartData.dimension_names.forEach((dimensionName, dimensionIndex) => {\n const value = (showUndefined || !row)\n ? \"\"\n : legendFormatValue(row[dimensionIndex + 1])\n const element = showValueAttributesNodes.current[dimensionIndex]\n if (element) {\n element.innerText = `${value}`\n }\n })\n }\n }\n }, [attributes, chartData, chartSettings, hoveredRow, legendFormatValue, showUndefined])\n}\n","import { __, prop } from \"ramda\"\nimport React, { useEffect, useState, useCallback, useMemo, memo, useContext } from \"react\"\nimport { ThemeContext } from \"styled-components\"\nimport { useDebouncedCallback } from \"use-debounce\"\n\nimport {\n requestCommonColorsAction,\n setDefaultAfterAction,\n setGlobalPanAndZoomAction,\n setGlobalSelectionAction,\n} from \"domains/global/actions\"\nimport {\n createSelectAssignedColors,\n selectGlobalSelection,\n selectSyncPanAndZoom,\n selectSyncSelection,\n selectUnitsScalingMethod,\n} from \"domains/global/selectors\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { TimeRange } from \"types/common\"\nimport { MS_IN_SECOND, isTimestamp } from \"utils/utils\"\n\nimport { setChartPanAndZoomAction } from \"domains/chart/actions\"\n\nimport { getPanAndZoomStep } from \"../utils/get-pan-and-zoom-step\"\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport { chartLibrariesSettings } from \"../utils/chartLibrariesSettings\"\nimport { useFormatters } from \"../utils/formatters\"\nimport { ChartData, ChartMetadata } from \"../chart-types\"\n\nimport { ChartLegend } from \"./chart-legend\"\nimport { LegendToolbox } from \"./legend-toolbox\"\nimport { ResizeHandler } from \"./resize-handler\"\nimport { AbstractChart } from \"./abstract-chart\"\n\ninterface GlobalPanAndZoomState {\n after: number // timestamp in ms\n before: number // timestamp in ms\n masterID?: string\n shouldForceTimeRange?: boolean\n}\n\ninterface Props {\n attributes: Attributes\n chartContainerElement: HTMLElement\n chartData: ChartData\n chartMetadata: ChartMetadata\n chartHeight: number\n chartUuid: string\n chartWidth: number\n defaultAfter: number\n globalPanAndZoom: null | GlobalPanAndZoomState\n hasEmptyData: boolean\n isRemotelyControlled: boolean\n viewRangeForCurrentData: TimeRange\n viewRange: TimeRange\n selectedDimensions: string[]\n setSelectedDimensions: (newState: string[]) => void\n showLatestOnBlur: boolean\n}\n\nexport const Chart = memo(\n ({\n attributes,\n attributes: { chartLibrary },\n chartContainerElement,\n chartData,\n chartMetadata,\n chartHeight,\n chartUuid,\n chartWidth,\n defaultAfter,\n globalPanAndZoom,\n hasEmptyData,\n isRemotelyControlled,\n viewRangeForCurrentData,\n viewRange,\n selectedDimensions,\n setSelectedDimensions,\n showLatestOnBlur,\n }: Props) => {\n const themeContext = useContext(ThemeContext)\n const unitsScalingMethod = useSelector(selectUnitsScalingMethod)\n const chartSettings = chartLibrariesSettings[chartLibrary]\n const { hasLegend } = chartSettings\n const {\n units = chartMetadata.units,\n unitsCommon,\n unitsDesired = unitsScalingMethod,\n } = attributes\n\n // we need to have empty selectedDimensions work as {all enabled}, in case\n // new dimensions show up (when all are enabled, the new dimensions should also auto-enable)\n const dimensionsVisibility = useMemo(\n () =>\n chartData.dimension_names.map(dimensionName =>\n selectedDimensions.length === 0 ? true : selectedDimensions.includes(dimensionName)\n ),\n [chartData.dimension_names, selectedDimensions]\n )\n\n const shouldDisplayToolbox =\n hasLegend(attributes) && window.NETDATA.options.current.legend_toolbox\n\n const shouldDisplayResizeHandler =\n shouldDisplayToolbox &&\n window.NETDATA.options.current.resize_charts && // legacy way of turning off for print mode\n !attributes.hideResizeHandler\n\n const dispatch = useDispatch()\n const allDimensionNames = useMemo(() => {\n // metadata and chartData dimensions match each other, but we need to first parse\n // dimensions from metadata, to keep the same order (when browser parsers dimensions object,\n // it sorts them in *some* way which is hard to reproduce). And people can get used to colors\n // so let's keep them as they were before\n const dimensionNamesFromMetadata = Object.values(chartMetadata.dimensions).map(x => x.name)\n const additionalDimensionNamesFromData = chartData.dimension_names.filter(\n x => !dimensionNamesFromMetadata.includes(x)\n )\n return dimensionNamesFromMetadata.concat(additionalDimensionNamesFromData)\n }, [chartData.dimension_names, chartMetadata.dimensions])\n useEffect(() => {\n dispatch(\n requestCommonColorsAction({\n chartContext: chartMetadata.context,\n chartUuid,\n colorsAttribute: attributes.colors,\n commonColorsAttribute: attributes.commonColors,\n dimensionNames: allDimensionNames,\n })\n )\n }, [\n allDimensionNames,\n attributes.colors,\n attributes.commonColors,\n chartMetadata.context,\n chartUuid,\n dispatch,\n ])\n\n const { legendFormatValue, legendFormatValueDecimalsFromMinMax, unitsCurrent } = useFormatters({\n attributes,\n data: chartData,\n units,\n unitsCommon,\n unitsDesired,\n uuid: chartUuid,\n })\n\n const [localHoveredX, setLocalHoveredX] = useState<number | null>(null)\n\n const isSyncSelection = useSelector(selectSyncSelection)\n const handleSetHoveredX = useCallback(\n (newHoveredX, noMaster) => {\n if (isSyncSelection) {\n const action = noMaster\n ? { chartUuid: null, hoveredX: newHoveredX }\n : { chartUuid, hoveredX: newHoveredX }\n dispatch(setGlobalSelectionAction(action))\n } else {\n setLocalHoveredX(newHoveredX)\n }\n },\n [chartUuid, dispatch, isSyncSelection]\n )\n const globalHoveredX = useSelector(selectGlobalSelection)\n const hoveredX = isSyncSelection ? globalHoveredX : localHoveredX\n\n // time-frames for requested data (even when request is pending)\n const viewAfter = isTimestamp(viewRange[0]) ? viewRange[0] : chartData.after * MS_IN_SECOND\n const viewBefore = isTimestamp(viewRange[1]) ? viewRange[1] : chartData.before * MS_IN_SECOND\n\n const viewAfterForCurrentData = isTimestamp(viewRangeForCurrentData[0])\n ? viewRangeForCurrentData[0]\n : chartData.after * MS_IN_SECOND\n const viewBeforeForCurrentData = isTimestamp(viewRangeForCurrentData[1])\n ? viewRangeForCurrentData[1]\n : chartData.before * MS_IN_SECOND // when 'before' is 0 or negative\n\n const netdataFirst = chartData.first_entry * MS_IN_SECOND\n const netdataLast = chartData.last_entry * MS_IN_SECOND\n\n // old dashboard persists min duration based on first chartWidth, i assume it's a bug\n // and will update fixedMinDuration when width changes\n const fixedMinDuration = useMemo(\n () => Math.round((chartWidth / 30) * chartMetadata.update_every * MS_IN_SECOND),\n [chartMetadata.update_every, chartWidth]\n )\n\n const isSyncPanAndZoom = useSelector(selectSyncPanAndZoom)\n\n const setGlobalPanAndZoomDebounced = useDebouncedCallback(\n newGlobalPanAndZoom => {\n dispatch(setGlobalPanAndZoomAction(newGlobalPanAndZoom))\n },\n 400 // corresponds to global_pan_sync_time in old dashboard\n )\n\n const immediatelyDispatchPanAndZoom = useCallback(() => {\n setGlobalPanAndZoomDebounced.flush()\n }, [setGlobalPanAndZoomDebounced])\n\n /**\n * pan-and-zoom handler (both for toolbox and mouse events)\n */\n const handleUpdateChartPanAndZoom = useCallback(\n ({\n after,\n before,\n callback,\n shouldFlushImmediately = false,\n shouldForceTimeRange,\n shouldNotExceedAvailableRange,\n }) => {\n if (before < after) {\n return\n }\n let minDuration = fixedMinDuration\n\n const currentDuraton = Math.round(viewBefore - viewAfter)\n\n let afterForced = Math.round(after)\n let beforeForced = Math.round(before)\n const viewUpdateEvery = chartData.view_update_every * MS_IN_SECOND\n\n if (shouldNotExceedAvailableRange) {\n const first = netdataFirst + viewUpdateEvery\n const last = netdataLast + viewUpdateEvery\n // first check \"before\"\n if (beforeForced > last) {\n afterForced -= before - last\n beforeForced = last\n }\n\n if (afterForced < first) {\n afterForced = first\n }\n }\n\n // align them to update_every\n // stretching them further away\n afterForced -= afterForced % viewUpdateEvery\n beforeForced += viewUpdateEvery - (beforeForced % viewUpdateEvery)\n\n // the final wanted duration\n let wantedDuration = beforeForced - afterForced\n\n // to allow panning, accept just a point below our minimum\n if (currentDuraton - viewUpdateEvery < minDuration) {\n minDuration = currentDuraton - viewUpdateEvery\n }\n\n // we do it, but we adjust to minimum size and return false\n // when the wanted size is below the current and the minimum\n // and we zoom\n let doCallback = true\n if (wantedDuration < currentDuraton && wantedDuration < minDuration) {\n minDuration = fixedMinDuration\n\n const dt = (minDuration - wantedDuration) / 2\n beforeForced += dt\n afterForced -= dt\n wantedDuration = beforeForced - afterForced\n doCallback = false\n }\n\n const tolerance = viewUpdateEvery * 2\n const movement = Math.abs(beforeForced - viewBefore)\n\n if (\n Math.abs(currentDuraton - wantedDuration) <= tolerance &&\n movement <= tolerance &&\n doCallback\n ) {\n return\n }\n\n if (isSyncPanAndZoom) {\n setGlobalPanAndZoomDebounced.callback({\n after: afterForced,\n before: beforeForced,\n masterID: chartUuid,\n shouldForceTimeRange,\n })\n if (shouldFlushImmediately) {\n setGlobalPanAndZoomDebounced.flush()\n }\n } else {\n dispatch(\n setChartPanAndZoomAction({\n after: afterForced,\n before: beforeForced,\n id: chartUuid,\n shouldForceTimeRange,\n })\n )\n }\n\n if (doCallback && typeof callback === \"function\") {\n callback(afterForced, beforeForced)\n }\n },\n [\n chartData.view_update_every,\n chartUuid,\n dispatch,\n fixedMinDuration,\n isSyncPanAndZoom,\n netdataFirst,\n netdataLast,\n setGlobalPanAndZoomDebounced,\n viewAfter,\n viewBefore,\n ]\n )\n\n /**\n * toolbox handlers\n */\n const handleToolBoxPanAndZoom = useCallback(\n (after: number, before: number) => {\n const newAfter = Math.max(after, netdataFirst)\n const newBefore = Math.min(before, netdataLast)\n handleUpdateChartPanAndZoom({\n after: newAfter,\n before: newBefore,\n shouldForceTimeRange: true,\n shouldFlushImmediately: true,\n })\n },\n [handleUpdateChartPanAndZoom, netdataFirst, netdataLast]\n )\n\n const handleToolboxLeftClick = useCallback(\n (event: React.MouseEvent) => {\n const step = (viewBefore - viewAfter) * getPanAndZoomStep(event)\n const newBefore = viewBefore - step\n const newAfter = viewAfter - step\n if (newAfter >= netdataFirst) {\n handleToolBoxPanAndZoom(newAfter, newBefore)\n }\n },\n [handleToolBoxPanAndZoom, netdataFirst, viewAfter, viewBefore]\n )\n\n const handleToolboxRightClick = useCallback(\n (event: React.MouseEvent) => {\n const timeWindow = viewBefore - viewAfter\n const step = timeWindow * getPanAndZoomStep(event)\n const newBefore = Math.min(viewBefore + step, netdataLast)\n const newAfter = newBefore - timeWindow\n handleToolBoxPanAndZoom(newAfter, newBefore)\n },\n [handleToolBoxPanAndZoom, netdataLast, viewAfter, viewBefore]\n )\n\n const handleToolboxZoomInClick = useCallback(\n (event: React.MouseEvent) => {\n const panAndZoomStep = getPanAndZoomStep(event) * 0.8\n if (!globalPanAndZoom) {\n dispatch(\n setDefaultAfterAction({\n after: Math.round(defaultAfter / (panAndZoomStep + 1)),\n })\n )\n return\n }\n // if visible time range is much bigger than available time range in history, first zoom-in\n // should just fit to available range\n if (viewBefore - viewAfter > (netdataLast - netdataFirst) * 1.2) {\n handleToolBoxPanAndZoom(netdataFirst, netdataLast)\n return\n }\n const dt = ((viewBefore - viewAfter) * panAndZoomStep) / 2\n const newAfter = viewAfter + dt\n const newBefore = viewBefore - dt\n handleToolBoxPanAndZoom(newAfter, newBefore)\n },\n [\n defaultAfter,\n dispatch,\n globalPanAndZoom,\n handleToolBoxPanAndZoom,\n netdataFirst,\n netdataLast,\n viewAfter,\n viewBefore,\n ]\n )\n\n const handleToolboxZoomOutClick = useCallback(\n (event: React.MouseEvent) => {\n const panAndZoomStep = getPanAndZoomStep(event) * 0.8\n if (!globalPanAndZoom) {\n dispatch(\n setDefaultAfterAction({\n after: Math.round(defaultAfter * (panAndZoomStep + 1)),\n })\n )\n return\n }\n const dt =\n ((viewBefore - viewAfter) / (1.0 - panAndZoomStep * 0.8) - (viewBefore - viewAfter)) / 2\n const newAfter = viewAfter - dt\n const newBefore = viewBefore + dt\n handleToolBoxPanAndZoom(newAfter, newBefore)\n },\n [defaultAfter, dispatch, globalPanAndZoom, handleToolBoxPanAndZoom, viewAfter, viewBefore]\n )\n\n /**\n * assign colors\n */\n const selectAssignedColors = useMemo(\n () =>\n createSelectAssignedColors({\n chartContext: chartMetadata.context,\n chartUuid,\n colorsAttribute: attributes.colors,\n commonColorsAttribute: attributes.commonColors,\n }),\n [attributes.colors, attributes.commonColors, chartMetadata, chartUuid]\n )\n const colors = useSelector(selectAssignedColors)\n const orderedColors = useMemo(\n () => chartData.dimension_names.map(prop(__, colors)),\n [chartData, colors]\n )\n\n if (!colors) {\n return <span /> // wait for createSelectAssignedColors reducer result to come back\n }\n\n const isTimeVisible = hoveredX && hoveredX >= viewAfter && hoveredX <= viewBefore\n const viewUpdateEvery = chartData.view_update_every * MS_IN_SECOND\n const hoveredRow = isTimeVisible\n ? Math.floor(((hoveredX as number) - chartData.after * MS_IN_SECOND) / viewUpdateEvery)\n : -1\n\n const isLegendOnBottom = attributes.legendPosition === \"bottom\"\n\n const legendToolbox = (\n <LegendToolbox\n onToolboxLeftClick={handleToolboxLeftClick}\n onToolboxRightClick={handleToolboxRightClick}\n onToolboxZoomInClick={handleToolboxZoomInClick}\n onToolboxZoomOutClick={handleToolboxZoomOutClick}\n />\n )\n\n const resizeHandler = shouldDisplayResizeHandler && (\n <ResizeHandler\n chartContainerElement={chartContainerElement}\n chartUuid={chartUuid}\n heightId={attributes.heightId}\n isLegendOnBottom={isLegendOnBottom}\n />\n )\n\n return (\n <>\n <AbstractChart\n // remount on theme change\n key={themeContext.name}\n attributes={attributes}\n chartContainerElement={chartContainerElement}\n chartData={chartData}\n chartMetadata={chartMetadata}\n chartLibrary={chartLibrary}\n colors={colors}\n chartUuid={chartUuid}\n chartHeight={chartHeight}\n chartWidth={chartWidth}\n dimensionsVisibility={dimensionsVisibility}\n hasEmptyData={hasEmptyData}\n onUpdateChartPanAndZoom={handleUpdateChartPanAndZoom}\n immediatelyDispatchPanAndZoom={immediatelyDispatchPanAndZoom}\n isRemotelyControlled={isRemotelyControlled}\n legendFormatValue={legendFormatValue}\n orderedColors={orderedColors}\n hoveredX={hoveredX}\n hoveredRow={hoveredRow}\n setHoveredX={handleSetHoveredX}\n setMinMax={([min, max]) => legendFormatValueDecimalsFromMinMax(min, max)}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewAfterForCurrentData={viewAfterForCurrentData}\n viewBeforeForCurrentData={viewBeforeForCurrentData}\n />\n {hasLegend(attributes) && (\n <ChartLegend\n attributes={attributes}\n chartUuid={chartUuid}\n chartMetadata={chartMetadata}\n chartLibrary={chartLibrary}\n colors={colors}\n hoveredX={hoveredX}\n hoveredRow={hoveredRow}\n legendFormatValue={legendFormatValue}\n selectedDimensions={selectedDimensions}\n setSelectedDimensions={setSelectedDimensions}\n showLatestOnBlur={showLatestOnBlur}\n unitsCurrent={unitsCurrent}\n viewBefore={viewBefore}\n legendToolbox={legendToolbox}\n resizeHandler={resizeHandler}\n />\n )}\n {shouldDisplayToolbox && !isLegendOnBottom && legendToolbox}\n {!isLegendOnBottom && resizeHandler}\n </>\n )\n }\n)\n","import styled from \"styled-components\"\nimport { getColor, Icon } from \"@netdata/netdata-ui\"\n\nexport const DropdownItem = styled.div`\n display: flex;\n flex-direction: start;\n align-items: center;\n color: ${getColor([\"neutral\", \"limedSpruce\"])};\n white-space: nowrap;\n & > svg use {\n fill: ${getColor([\"neutral\", \"limedSpruce\"])};\n }\n`\n\nexport const DropdownItemLabel = styled.span`\n margin-left: 12px;\n`\n\nexport const DotsBtn = styled(Icon)`\n width: 6px;\n height: 10px;\n cursor: pointer;\n & use {\n fill: ${getColor([\"neutral\", \"limedSpruce\"])};\n & :hover {\n fill: ${getColor([\"neutral\", \"regentgrey\"])};\n }\n }\n`\n","import React, { useState, ReactNode } from \"react\"\n\nimport { Attributes } from \"domains/chart/utils/transformDataAttributes\"\nimport { ChartMetadata } from \"domains/chart/chart-types\"\n\nimport { List, SimpleListItem } from \"@rmwc/list\"\nimport { MenuSurface, MenuSurfaceAnchor } from \"@rmwc/menu\"\n\nimport * as S from \"./styled\"\n\ninterface DropdownMenuCallbackProps {\n attributes: Attributes,\n chartMetadata: ChartMetadata,\n chartID: string,\n}\n\nexport type DropdownMenu = {\n icon: ReactNode,\n label: string,\n onClick: (dropdownMenuCallbackProps: DropdownMenuCallbackProps) => void,\n}[]\n\ninterface Props {\n attributes: Attributes\n chartID: string\n chartMetadata: ChartMetadata\n dropdownMenu: DropdownMenu\n}\n\nexport const ChartDropdown = ({\n attributes,\n chartID,\n chartMetadata,\n dropdownMenu,\n}: Props) => {\n const [isOpen, setIsOpen] = useState(false)\n\n const handleClose = () => {\n setIsOpen(false)\n }\n\n return (\n <>\n <S.DotsBtn\n name=\"dots_2x3\"\n onClick={() => {\n setIsOpen(true)\n }}\n />\n <MenuSurfaceAnchor>\n <MenuSurface open={isOpen} onClose={handleClose}>\n <List>\n {dropdownMenu.map(({ icon, label, onClick }) => (\n <SimpleListItem\n key={label}\n text={(\n <S.DropdownItem>\n {icon}\n <S.DropdownItemLabel>\n {label}\n </S.DropdownItemLabel>\n </S.DropdownItem>\n )}\n onClick={() => {\n onClick({ attributes, chartMetadata, chartID })\n handleClose()\n }}\n />\n ))}\n </List>\n </MenuSurface>\n </MenuSurfaceAnchor>\n </>\n )\n}\n","import { prop } from \"ramda\"\nimport styled, { keyframes } from \"styled-components\"\n\nimport { getColor } from \"@netdata/netdata-ui\"\n\nconst circleAnimation = keyframes`\n 0% {\n opacity: .1;\n }\n 50% {\n opacity: .5;\n }\n 100% {\n opacity: .1;\n }\n`\n\n\nexport const SpinnerContainer = styled.div<{ top: number, right: number }>`\n position: absolute;\n top: ${prop(\"top\")}px;\n right: ${prop(\"right\")}px;\n display: flex;\n`\n\nexport const Circle = styled.div<{ size: number }>`\n width: ${prop(\"size\")}px;\n height: ${prop(\"size\")}px;\n background: ${getColor(\"border\")};\n border-radius: 50%;\n animation: 1s linear infinite both ${circleAnimation};\n`\n\nexport const Circle2 = styled(Circle)<{ spaceBetween: number }>`\n animation-delay: .3s; \n margin-left: ${prop(\"spaceBetween\")}px;\n`\n\nexport const Circle3 = styled(Circle)<{ spaceBetween: number }>`\n animation-delay: .6s; \n margin-left: ${prop(\"spaceBetween\")}px;\n`\n","import React from \"react\"\n\nimport * as S from \"./styled\"\n\ninterface Props {\n chartLibrary: string\n}\nexport const ChartSpinner = ({\n chartLibrary,\n}: Props) => {\n const top = chartLibrary === \"dygraph\" ? 33 : 0\n const right = chartLibrary === \"dygraph\" ? 8 : 0\n const size = chartLibrary === \"dygraph\" ? 10 : 7\n const spaceBetween = chartLibrary === \"dygraph\" ? 4 : 2\n return (\n <S.SpinnerContainer top={top} right={right}>\n <S.Circle size={size} />\n <S.Circle2 size={size} spaceBetween={spaceBetween} />\n <S.Circle3 size={size} spaceBetween={spaceBetween} />\n </S.SpinnerContainer>\n )\n}\n","import styled from \"styled-components\"\n\nimport { chartDropdownZIndex } from \"styles/z-index\"\n\nexport const ChartDropdownContainer = styled.div`\n position: absolute;\n top: 0;\n left: 40px;\n width: 20px;\n height: 20px;\n z-index: ${chartDropdownZIndex};\n`\n","export const notificationsZIndex = \"z-index: 50;\"\n\nexport const chartDropdownZIndex = 10\n\nexport const spacesBarZIndex = 8\n\nexport const spacePanelZIndex = 6\n\nexport const appHeaderZIndex = 5\n\n// the same as in cloud\nexport const portalSidebarZIndex = \"z-index: 35;\"\nexport const customDropdownZIndex = \"z-index: 45;\"\nexport const dialogsZIndex = 60\n","import { cond, always, T } from \"ramda\"\nimport axios from \"axios\"\nimport React, { useEffect, useState, useMemo, useLayoutEffect } from \"react\"\nimport { useThrottle, useUpdateEffect, useUnmount, useDebounce } from \"react-use\"\n\nimport { AppStateT } from \"store/app-state\"\nimport { useSelector, useDispatch } from \"store/redux-separate-context\"\n\nimport {\n selectGlobalPanAndZoom,\n selectGlobalSelection,\n selectShouldEliminateZeroDimensions,\n selectPanAndZoomDataPadding,\n selectSnapshot,\n selectSpacePanelTransitionEndIsActive,\n selectDefaultAfter,\n} from \"domains/global/selectors\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { CHART_UNMOUNTED } from \"utils/netdata-sdk\"\nimport { getCorrectedPoints } from \"utils/fill-missing-data\"\n\nimport { fallbackUpdateTimeInterval, panAndZoomDelay } from \"../../constants\"\nimport { getChartURLOptions } from \"../../utils/get-chart-url-options\"\nimport { chartLibrariesSettings } from \"../../utils/chartLibrariesSettings\"\nimport { Attributes } from \"../../utils/transformDataAttributes\"\nimport { getChartPixelsPerPoint } from \"../../utils/get-chart-pixels-per-point\"\nimport { useFetchNewDataClock } from \"../../hooks/use-fetch-new-data-clock\"\n\nimport { fetchChartAction, fetchDataAction } from \"../../actions\"\nimport {\n selectChartData,\n selectChartFetchDataParams,\n makeSelectChartMetadataRequest,\n selectChartPanAndZoom,\n selectChartIsFetchingData,\n selectChartViewRange,\n} from \"../../selectors\"\nimport {\n ChartData,\n ChartMetadata,\n D3pieChartData,\n DygraphData,\n EasyPieChartData,\n} from \"../../chart-types\"\n\nimport { Loader } from \"../loader\"\nimport { Chart } from \"../chart\"\nimport { ChartDropdown, DropdownMenu } from \"../chart-dropdown\"\nimport { ChartSpinner } from \"../chart-spinner/chart-spinner\"\n\nimport * as S from \"./styled\"\nimport \"./chart-with-loader.css\"\n\nexport type RenderCustomElementForDygraph = (selectedChartConfiguration: {\n attributes: Attributes\n onAttributesChange: any\n chartMetadata: ChartMetadata\n chartID: string\n chartData: ChartData | null\n}) => JSX.Element\n\nconst dimensionsAggrMethodMap = {\n \"sum-of-abs\": \"sum\",\n}\n\nconst emptyArray = [] as any\n\nexport type Props = {\n attributes: Attributes\n chartUuid: string\n uuid?: string\n dropdownMenu?: DropdownMenu\n externalChartMetadata?: ChartMetadata\n portalNode: HTMLElement\n renderCustomElementForDygraph?: RenderCustomElementForDygraph\n onAttributesChange?: any\n}\n\nexport const ChartWithLoader = ({\n attributes,\n chartUuid,\n uuid,\n dropdownMenu,\n externalChartMetadata,\n portalNode,\n renderCustomElementForDygraph,\n onAttributesChange,\n}: Props) => {\n /**\n * fetch chart details\n */\n const { host = serverDefault, id, nodeIDs } = attributes\n const dispatch = useDispatch()\n const selectChartMetadataRequest = useMemo(makeSelectChartMetadataRequest, [])\n const { chartMetadata, isFetchingDetails } = useSelector((state: AppStateT) =>\n selectChartMetadataRequest(state, { chartId: id, id: chartUuid })\n )\n const actualChartMetadata = externalChartMetadata || chartMetadata\n useEffect(() => {\n if (!chartMetadata && !isFetchingDetails && !externalChartMetadata) {\n dispatch(\n fetchChartAction.request({\n chart: id,\n id: chartUuid,\n host,\n nodeIDs,\n })\n )\n }\n }, [\n id,\n chartUuid,\n dispatch,\n host,\n isFetchingDetails,\n chartMetadata,\n externalChartMetadata,\n nodeIDs,\n uuid,\n ])\n\n // todo local state option\n const globalPanAndZoom = useSelector(selectGlobalPanAndZoom)\n const chartPanAndZoom = useSelector((state: AppStateT) =>\n selectChartPanAndZoom(state, { id: chartUuid })\n )\n const panAndZoom = chartPanAndZoom || globalPanAndZoom\n\n const isPanAndZoomMaster =\n (!!globalPanAndZoom && globalPanAndZoom.masterID === chartUuid) || Boolean(chartPanAndZoom)\n const shouldForceTimeRange = panAndZoom?.shouldForceTimeRange || false\n\n // (isRemotelyControlled === false) only during globalPanAndZoom, when chart is panAndZoomMaster\n // and when no toolbox is used at that time\n const isRemotelyControlled = !panAndZoom || !isPanAndZoomMaster || shouldForceTimeRange // used when zooming/shifting in toolbox\n\n const fetchDataParams = useSelector((state: AppStateT) =>\n selectChartFetchDataParams(state, { id: chartUuid })\n )\n const viewRange = useSelector((state: AppStateT) =>\n selectChartViewRange(state, { id: chartUuid })\n )\n const chartData = useSelector((state: AppStateT) => selectChartData(state, { id: chartUuid }))\n const isFetchingData = useSelector((state: AppStateT) =>\n selectChartIsFetchingData(state, { id: chartUuid })\n )\n\n const hoveredX = useSelector(selectGlobalSelection)\n\n // periodical update of newest data\n // default to 2000ms. When chartMetadata has been fetched, use chartMetadata.update_every\n // if chartData has been fetched, use chartData.view_update_every instead\n // todo add support to \"data-update-every\" attribute\n const viewUpdateEvery = cond([\n [always(!!chartData), () => (chartData as ChartData).view_update_every * 1000],\n [\n always(!!actualChartMetadata),\n () => (actualChartMetadata as ChartMetadata).update_every * 1000,\n ],\n [T, always(fallbackUpdateTimeInterval)],\n ])()\n const [shouldFetch, setShouldFetch] = useFetchNewDataClock({\n areCriteriaMet: !panAndZoom && !hoveredX,\n preferedIntervalTime: viewUpdateEvery,\n })\n\n const panAndZoomThrottled = useThrottle(panAndZoom, panAndZoomDelay)\n useEffect(() => {\n setShouldFetch(true)\n }, [panAndZoomThrottled, setShouldFetch])\n\n const defaultAfter = useSelector(selectDefaultAfter)\n // when after/before changes, don't wait for next interval, just fetch immediately\n useUpdateEffect(() => {\n setShouldFetch(true)\n }, [\n attributes.after,\n attributes.before,\n defaultAfter,\n attributes.dimensions,\n attributes.aggrMethod,\n attributes.groupBy,\n ])\n\n const { before: initialBefore = window.NETDATA.chartDefaults.before } = attributes\n\n // attributes.after should be now used only for old custom dashboard\n // and in the future for setting timeframe per-chart\n const liveModeAfter = attributes.after || defaultAfter\n\n const chartSettings = chartLibrariesSettings[attributes.chartLibrary]\n const { hasLegend } = chartSettings\n\n // todo optimize by using resizeObserver (optionally)\n const boundingClientRect = portalNode.getBoundingClientRect()\n\n // from old dashboard\n const chartWidth = boundingClientRect.width - (hasLegend(attributes) ? 140 : 0)\n const chartHeight = boundingClientRect.height\n\n const isShowingSnapshot = Boolean(useSelector(selectSnapshot))\n const shouldEliminateZeroDimensions =\n useSelector(selectShouldEliminateZeroDimensions) || isShowingSnapshot\n const shouldUsePanAndZoomPadding = useSelector(selectPanAndZoomDataPadding)\n\n const { CancelToken } = axios\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const cancelTokenSource = useMemo(() => CancelToken.source(), [])\n useUnmount(() => {\n cancelTokenSource.cancel(CHART_UNMOUNTED)\n })\n\n /**\n * spinner state\n * show spinner when it's fetching for more than 2 seconds\n * hide spinner immediately when it's not fetching\n */\n const [shouldShowSpinnerDebounced, setShouldShowSpinnerDebounced] = useState(false)\n const shouldShowSpinner = shouldShowSpinnerDebounced && isFetchingData\n useDebounce(\n () => {\n if (isFetchingData) {\n setShouldShowSpinnerDebounced(true)\n }\n },\n 2000,\n [isFetchingData]\n )\n useEffect(() => {\n if (!isFetchingData && shouldShowSpinnerDebounced) {\n setShouldShowSpinnerDebounced(false)\n }\n }, [isFetchingData, shouldShowSpinnerDebounced])\n\n /**\n * fetch data\n */\n useEffect(() => {\n if (shouldFetch && actualChartMetadata && !isFetchingData) {\n // todo can be overriden by main.js\n const forceDataPoints = window.NETDATA.options.force_data_points\n\n let after\n let before\n let newViewRange\n let pointsMultiplier = 1\n\n if (panAndZoom) {\n if (isPanAndZoomMaster) {\n after = Math.round(panAndZoom.after / 1000)\n before = Math.round(panAndZoom.before / 1000)\n\n newViewRange = [after, before]\n\n if (shouldUsePanAndZoomPadding) {\n const requestedPadding = Math.round((before - after) / 2)\n after -= requestedPadding\n before += requestedPadding\n pointsMultiplier = 2\n }\n } else {\n after = Math.round(panAndZoom.after / 1000)\n before = Math.round(panAndZoom.before / 1000)\n pointsMultiplier = 1\n }\n } else {\n // no panAndZoom\n before = initialBefore\n after = liveModeAfter\n pointsMultiplier = 1\n }\n\n newViewRange = (newViewRange || [after, before]).map(x => x * 1000) as [number, number]\n\n const dataPoints =\n attributes.points ||\n Math.round(chartWidth / getChartPixelsPerPoint({ attributes, chartSettings }))\n const points = forceDataPoints || dataPoints * pointsMultiplier\n\n const shouldForceTimeWindow = attributes.forceTimeWindow || Boolean(defaultAfter)\n // if we want to add fake points, we need first need to request less\n // to have the desired frequency\n // this will be removed when Agents will support forcing time-window between points\n const correctedPoints = shouldForceTimeWindow\n ? getCorrectedPoints({\n after,\n before,\n firstEntry: actualChartMetadata.first_entry,\n points,\n })\n : null\n\n const group = attributes.method || window.NETDATA.chartDefaults.method\n setShouldFetch(false)\n dispatch(\n fetchDataAction.request({\n // properties to be passed to API\n host,\n context: actualChartMetadata.context,\n chart: actualChartMetadata.id,\n format: chartSettings.format,\n points: correctedPoints || points,\n group,\n gtime: attributes.gtime || 0,\n options: getChartURLOptions(attributes, shouldEliminateZeroDimensions),\n after: after || null,\n before: before || null,\n dimensions: attributes.dimensions,\n labels: attributes.labels,\n postGroupBy: attributes.postGroupBy,\n postAggregationMethod: attributes.postAggregationMethod,\n aggrMethod: attributes.aggrMethod,\n aggrGroups: attributes.aggrGroups,\n // @ts-ignore\n dimensionsAggrMethod:\n dimensionsAggrMethodMap[attributes.dimensionsAggrMethod] ||\n attributes.dimensionsAggrMethod,\n nodeIDs,\n httpMethod: attributes.httpMethod,\n groupBy: attributes.groupBy,\n\n // properties for the reducer\n fetchDataParams: {\n // we store it here so it is only available when data is fetched\n // those params should be synced with data\n fillMissingPoints: correctedPoints ? points - correctedPoints : undefined,\n isRemotelyControlled,\n viewRange: newViewRange,\n },\n id: chartUuid,\n cancelTokenSource,\n })\n )\n }\n }, [\n attributes,\n actualChartMetadata,\n chartSettings,\n chartUuid,\n chartWidth,\n defaultAfter,\n dispatch,\n hasLegend,\n host,\n initialBefore,\n isFetchingData,\n isPanAndZoomMaster,\n isRemotelyControlled,\n liveModeAfter,\n panAndZoom,\n portalNode,\n setShouldFetch,\n shouldEliminateZeroDimensions,\n shouldUsePanAndZoomPadding,\n shouldFetch,\n cancelTokenSource,\n nodeIDs,\n uuid,\n ])\n\n useSelector(selectSpacePanelTransitionEndIsActive)\n\n const externalSelectedDimensions = attributes?.selectedDimensions\n const [selectedDimensions, setSelectedDimensions] = useState<string[]>(\n externalSelectedDimensions || emptyArray\n )\n\n useLayoutEffect(() => {\n if (externalSelectedDimensions) {\n setSelectedDimensions(externalSelectedDimensions)\n }\n }, [externalSelectedDimensions])\n\n useLayoutEffect(() => {\n setSelectedDimensions(externalSelectedDimensions || emptyArray)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [attributes?.groupBy])\n\n const customElementForDygraph = useMemo(\n () =>\n renderCustomElementForDygraph &&\n renderCustomElementForDygraph({\n onAttributesChange,\n attributes,\n chartMetadata: actualChartMetadata as ChartMetadata,\n chartData,\n chartID: id,\n }),\n [\n onAttributesChange,\n renderCustomElementForDygraph,\n attributes,\n id,\n actualChartMetadata,\n chartData,\n ]\n )\n\n // eslint-disable-next-line max-len\n const hasEmptyData =\n (chartData as DygraphData | D3pieChartData | null)?.result?.data?.length === 0 ||\n (chartData as EasyPieChartData | null)?.result?.length === 0\n\n if (!chartData || !actualChartMetadata) {\n return (\n <>\n <Loader\n // Loader should remount when that flag is changed, because inside\n // there's an oldschool bootstrap icon which doesn't handle updates well\n key={`${hasEmptyData}`}\n hasEmptyData={hasEmptyData}\n containerNode={portalNode}\n />\n {shouldShowSpinner && <ChartSpinner chartLibrary={attributes.chartLibrary} />}\n </>\n )\n }\n\n return (\n <>\n {hasEmptyData && (\n <Loader key={`${hasEmptyData}`} hasEmptyData={hasEmptyData} containerNode={portalNode} />\n )}\n <Chart\n attributes={attributes}\n chartContainerElement={portalNode}\n chartData={chartData}\n chartMetadata={actualChartMetadata}\n chartUuid={chartUuid}\n chartHeight={chartHeight}\n chartWidth={chartWidth}\n defaultAfter={defaultAfter}\n globalPanAndZoom={globalPanAndZoom}\n hasEmptyData={hasEmptyData}\n isRemotelyControlled={fetchDataParams.isRemotelyControlled}\n // view range that updates only when data is fetched\n viewRangeForCurrentData={fetchDataParams.viewRange}\n // view range that updates when requesting and fetching of data\n viewRange={viewRange!}\n selectedDimensions={selectedDimensions}\n setSelectedDimensions={setSelectedDimensions}\n showLatestOnBlur={!panAndZoom}\n />\n {shouldShowSpinner && <ChartSpinner chartLibrary={attributes.chartLibrary} />}\n {dropdownMenu && dropdownMenu.length > 0 && (\n <S.ChartDropdownContainer>\n <ChartDropdown\n dropdownMenu={dropdownMenu}\n chartID={id}\n attributes={attributes}\n chartMetadata={actualChartMetadata}\n />\n </S.ChartDropdownContainer>\n )}\n {customElementForDygraph}\n </>\n )\n}\n","import { useEffect, useState } from \"react\"\nimport { useInterval } from \"react-use\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport {\n selectHasWindowFocus,\n selectStopUpdatesWhenFocusIsLost,\n selectGlobalPause,\n} from \"domains/global/selectors\"\nimport { BIGGEST_INTERVAL_NUMBER } from \"utils/biggest-interval-number\"\nimport { isPrintMode } from \"domains/dashboard/utils/parse-url\"\n\ntype UseFetchNewDataClock = (arg: {\n areCriteriaMet: boolean\n preferedIntervalTime: number\n}) => [boolean, (shouldFetch: boolean) => void]\nexport const useFetchNewDataClock: UseFetchNewDataClock = ({\n areCriteriaMet,\n preferedIntervalTime,\n}) => {\n const hasWindowFocus = useSelector(selectHasWindowFocus)\n const stopUpdatesWhenFocusIsLost = useSelector(selectStopUpdatesWhenFocusIsLost)\n const globalPause = useSelector(selectGlobalPause)\n\n const shouldBeUpdating = !(!hasWindowFocus && stopUpdatesWhenFocusIsLost) && !globalPause\n\n const [shouldFetch, setShouldFetch] = useState<boolean>(true)\n const [shouldFetchImmediatelyAfterFocus, setShouldFetchImmediatelyAfterFocus] = useState(false)\n\n useEffect(() => {\n if (shouldFetchImmediatelyAfterFocus && shouldBeUpdating) {\n setShouldFetchImmediatelyAfterFocus(false)\n setShouldFetch(true)\n }\n }, [shouldFetchImmediatelyAfterFocus, setShouldFetchImmediatelyAfterFocus, shouldBeUpdating])\n\n // don't use setInterval when we loose focus\n const intervalTime =\n (shouldBeUpdating || !shouldFetchImmediatelyAfterFocus) && !isPrintMode\n ? preferedIntervalTime\n : BIGGEST_INTERVAL_NUMBER\n useInterval(() => {\n if (areCriteriaMet) {\n if (!shouldBeUpdating) {\n setShouldFetchImmediatelyAfterFocus(true)\n return\n }\n setShouldFetch(true)\n }\n // when there's no focus, don't ask for updated data\n }, intervalTime)\n return [shouldFetch, setShouldFetch]\n}\n","import { Attributes } from \"./transformDataAttributes\"\nimport { ChartLibraryConfig } from \"./chartLibrariesSettings\"\n\ntype GetChartPixelsPerPoint = (arg: {\n attributes: Attributes,\n chartSettings: ChartLibraryConfig,\n}) => number\n\nexport const getChartPixelsPerPoint: GetChartPixelsPerPoint = ({\n attributes, chartSettings,\n}) => {\n const {\n pixelsPerPoint: pixelsPerPointAttribute,\n } = attributes\n if (typeof pixelsPerPointAttribute === \"number\") {\n return pixelsPerPointAttribute\n }\n const pixelsPerPointSetting = chartSettings.pixelsPerPoint(attributes)\n\n return Math.max(...[\n pixelsPerPointSetting,\n window.NETDATA.options.current.pixels_per_point,\n ].filter((px) => typeof px === \"number\"))\n}\n","import { prop, pick } from \"ramda\"\nimport { createSelector } from \"reselect\"\n\nimport { AppStateT } from \"store/app-state\"\n\nimport { storeKey } from \"./constants\"\n\nconst selectDashboardDomain = (state: AppStateT) => state[storeKey]\n\nexport const selectIsSnapshotMode = createSelector(\n selectDashboardDomain,\n prop(\"isSnapshotMode\"),\n)\n\nexport const selectSnapshotOptions = createSelector(\n selectDashboardDomain,\n pick([\"snapshotCharts\", \"snapshotDataPoints\"]),\n)\n","import React, { useEffect } from \"react\"\n\nimport { MS_IN_SECOND } from \"utils/utils\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { selectIsSnapshotMode, selectSnapshotOptions } from \"domains/dashboard/selectors\"\nimport { selectGlobalPanAndZoom } from \"domains/global/selectors\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { TimeRangeObjT } from \"types/common\"\n\nimport { Attributes } from \"../utils/transformDataAttributes\"\nimport { fetchDataForSnapshotAction } from \"../actions\"\nimport { chartLibrariesSettings } from \"../utils/chartLibrariesSettings\"\nimport { getChartURLOptions } from \"../utils/get-chart-url-options\"\n\ninterface SnapshotLoaderProps {\n attributes: Attributes\n chartUuid: string\n}\nconst SnapshotLoader = ({\n attributes,\n chartUuid,\n}: SnapshotLoaderProps) => {\n const host = attributes.host || serverDefault\n const { snapshotDataPoints } = useSelector(selectSnapshotOptions)\n const group = attributes.method || window.NETDATA.chartDefaults.method\n const { chartLibrary } = attributes\n const chartSettings = chartLibrariesSettings[chartLibrary]\n\n const globalPanAndZoom = useSelector(selectGlobalPanAndZoom)\n const after = (globalPanAndZoom as TimeRangeObjT).after / MS_IN_SECOND\n const before = (globalPanAndZoom as TimeRangeObjT).before / MS_IN_SECOND\n\n const dispatch = useDispatch()\n useEffect(() => {\n dispatch(fetchDataForSnapshotAction.request({\n // properties to be passed to API\n host,\n context: attributes.id,\n chart: attributes.id,\n format: chartSettings.format,\n points: snapshotDataPoints as number,\n group,\n gtime: attributes.gtime || 0,\n // for snapshots, always eliminate zero dimensions\n options: getChartURLOptions(attributes, true),\n after: after || null,\n before: before || null,\n dimensions: attributes.dimensions,\n aggrMethod: attributes.aggrMethod,\n nodeIDs: attributes.nodeIDs,\n chartLibrary,\n id: chartUuid,\n groupBy: attributes.groupBy,\n }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }) // todo fetch based on state\n return null\n}\n\n\ninterface SnapshotLoaderContainerProps {\n attributes: Attributes\n chartUuid: string\n}\nexport const SnapshotLoaderContainer = ({\n attributes,\n chartUuid,\n}: SnapshotLoaderContainerProps) => {\n const isSnapshotMode = useSelector(selectIsSnapshotMode)\n if (!isSnapshotMode) {\n return null\n }\n return <SnapshotLoader attributes={attributes} chartUuid={chartUuid} />\n}\n","import React, { memo } from \"react\"\nimport { createPortal } from \"react-dom\"\n\nimport { getAttributes } from \"../utils/transformDataAttributes\"\nimport { ChartWithLoader } from \"./chart-with-loader\"\nimport { DisableOutOfView } from \"./disable-out-of-view\"\nimport { SnapshotLoaderContainer } from \"./snapshot-loader\"\n\nconst getNodesArray = () => Array.from(document.querySelectorAll(\"[data-netdata]\"))\n\nexport const Portals = memo(() => {\n const nodes = getNodesArray()\n return (\n <>\n {nodes.map((node, index) => {\n const attributesMapped = getAttributes(node)\n const chartId = `${attributesMapped.id}-${index}`\n return (\n createPortal(\n <>\n <DisableOutOfView\n attributes={attributesMapped}\n chartUuid={chartId}\n portalNode={(node as HTMLElement)}\n >\n <ChartWithLoader\n attributes={attributesMapped}\n // todo change to uuid generator (when we disconnect dashboard.js)\n chartUuid={chartId}\n portalNode={(node as HTMLElement)}\n />\n </DisableOutOfView>\n <SnapshotLoaderContainer\n attributes={attributesMapped}\n chartUuid={chartId}\n />\n </>,\n node,\n )\n )\n })}\n </>\n )\n})\n","import { useEffect, useState } from \"react\"\n\nimport { axiosInstance } from \"utils/api\"\n\nexport const useHttp = <T = unknown>(\n url: string | undefined,\n shouldMakeCall : boolean = true,\n isExternal?: boolean,\n) => {\n const [isFetching, setIsFetching] = useState(false)\n const [isError, setIsError] = useState(false)\n const [data, setData] = useState<T | null>(null)\n useEffect(() => {\n if (shouldMakeCall && url) {\n const options = isExternal\n ? { headers: null, withCredentials: false }\n : {}\n\n setIsFetching(true)\n axiosInstance.get(url, options)\n .then((r) => {\n if (r.data) {\n setData(r.data)\n setIsError(false)\n setIsFetching(false)\n }\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.warn(`error fetching ${url}`, error)\n setIsError(true)\n setIsFetching(false)\n })\n }\n }, [isExternal, shouldMakeCall, url])\n // force triple instead of array\n return [data, isFetching, isError] as [T | null, boolean, boolean]\n}\n","import { ReactNode, useEffect, useRef } from \"react\"\nimport { createPortal } from \"react-dom\"\n\nconst modalRoot = document.getElementById(\"modal-root\") as HTMLElement\n\ntype Props = {\n children: ReactNode\n}\nexport const ModalPortal = ({ children }: Props) => {\n const element = useRef(document.createElement(\"div\"))\n useEffect(() => {\n modalRoot.appendChild(element.current)\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n modalRoot.removeChild(element.current)\n }\n }, [])\n\n return createPortal(children, element.current)\n}\n","import React, { useRef, useEffect } from \"react\"\nimport classNames from \"classnames\"\n\nimport { useSelector } from \"store/redux-separate-context\"\nimport { ModalPortal } from \"domains/dashboard/components/modal-portal\"\nimport {\n selectAmountOfCharts, selectAmountOfFetchedCharts, selectNameOfAnyFetchingChart,\n} from \"domains/chart/selectors\"\n\nimport \"./print-modal.scss\"\n\nconst TIMEOUT_DURATION_TO_MAKE_SURE_ALL_CHARTS_HAVE_BEEN_RENDERED = 1000\n\nexport const PrintModal = () => {\n const printModalElement = useRef<HTMLDivElement>(null)\n const isFetchingMetrics = true\n\n useEffect(() => {\n // todo replace bootstrap with newer solution (custom or react-compatible library)\n if (printModalElement.current) {\n const $element = window.$(printModalElement.current)\n $element.modal(\"show\")\n }\n }) // render just once\n\n const amountOfCharts = useSelector(selectAmountOfCharts)\n const amountOfFetchedCharts = useSelector(selectAmountOfFetchedCharts)\n const nameOfAnyFetchingChart = useSelector(selectNameOfAnyFetchingChart)\n\n const percentage = amountOfCharts === 0\n ? 0\n : (amountOfFetchedCharts / amountOfCharts) * 100\n\n useEffect(() => {\n if (percentage === 100) {\n setTimeout(() => {\n // in case browser will not be able to close the window\n window.$(printModalElement.current).modal(\"hide\")\n window.print()\n window.close()\n }, TIMEOUT_DURATION_TO_MAKE_SURE_ALL_CHARTS_HAVE_BEEN_RENDERED)\n }\n }, [percentage])\n\n\n const progressBarText = nameOfAnyFetchingChart\n && `${Math.round(percentage)}%, ${nameOfAnyFetchingChart}`\n\n\n return (\n <ModalPortal>\n <div\n ref={printModalElement}\n className=\"modal fade\"\n id=\"printModal\"\n tabIndex={-1}\n role=\"dialog\"\n aria-labelledby=\"printModalLabel\"\n data-keyboard=\"false\"\n data-backdrop=\"static\"\n >\n <div className=\"modal-dialog modal-lg\" role=\"document\">\n <div className=\"modal-content\">\n <div className=\"modal-header\">\n <button\n type=\"button\"\n className={classNames(\n \"close\",\n { \"print-modal__close-button--disabled\": isFetchingMetrics },\n )}\n data-dismiss=\"modal\"\n aria-label=\"Close\"\n >\n <span aria-hidden=\"true\">×</span>\n </button>\n <h4 className=\"modal-title\" id=\"printModalLabel\">\n Preparing dashboard for printing...\n </h4>\n </div>\n <div className=\"modal-body\">\n Please wait while we initialize and render all the charts on the dashboard.\n <div\n className=\"progress progress-striped active\"\n style={{ height: \"2em\" }}\n >\n <div\n id=\"printModalProgressBar\"\n className=\"progress-bar progress-bar-info\"\n role=\"progressbar\"\n aria-valuenow={percentage}\n aria-valuemin={0}\n aria-valuemax={100}\n style={{\n minWidth: \"2em\",\n width: `${percentage}%`,\n }}\n >\n <span\n id=\"printModalProgressBarText\"\n style={{\n paddingLeft: 10,\n paddingTop: 4,\n fontSize: \"1.2em\",\n textAlign: \"left\",\n width: \"100%\",\n position: \"absolute\",\n display: \"block\",\n color: \"black\",\n }}\n >\n {progressBarText}\n </span>\n </div>\n </div>\n The print dialog will appear as soon as we finish rendering the page.\n </div>\n <div className=\"modal-footer\" />\n </div>\n </div>\n </div>\n </ModalPortal>\n )\n}\n","import styled from \"styled-components\"\nimport { getSizeBy, getColor } from \"@netdata/netdata-ui\"\n\nexport const SocialMediaContainer = styled.div`\n width: 185px;\n padding: ${getSizeBy(2)};\n background: ${getColor(\"borderSecondary\")};\n\n font-size: 12px;\n margin-bottom: ${getSizeBy(3)};\n`\n\nexport const FirstRow = styled.div`\n display: flex;\n justify-content: space-between;\n`\n\nexport const GithubCopy = styled.div`\n\n`\n\nexport const GithubCopyLine = styled.div`\n\n`\n\nexport const SocialMediaLink = styled.a`\n &, &:hover {\n color: ${getColor(\"main\")};\n }\n`\n\nexport const GithubStarQuestion = styled(SocialMediaLink)``\n\nexport const GithubIcon = styled(SocialMediaLink)`\n font-size: 24px;\n`\n\nexport const TwitterIcon = styled(SocialMediaLink)`\n font-size: 17px;\n`\n\nexport const FacebookIcon = styled(SocialMediaLink)`\n font-size: 23px;\n`\n\nexport const Separator = styled.div`\n margin-top: ${getSizeBy(2)};\n border-top: 1px solid ${getColor(\"separator\")};\n\n`\nexport const SecondRow = styled.div`\n margin-top: ${getSizeBy(2)};\n display: flex;\n align-items: center;\n justify-content: space-between;\n`\n\nexport const SecondRowText = styled.span`\n font-size: 10px;\n`\n","import React from \"react\"\n\nimport * as S from \"./styled\"\n\nexport const SidebarSocialMedia = () => (\n <S.SocialMediaContainer>\n <S.FirstRow>\n <S.GithubCopy>\n <S.GithubCopyLine>\n Do you like Netdata?\n </S.GithubCopyLine>\n <S.GithubStarQuestion href=\"https://github.com/netdata/netdata/\" target=\"_blank\">\n Give us a star!\n </S.GithubStarQuestion>\n </S.GithubCopy>\n <S.GithubIcon href=\"https://github.com/netdata/netdata/\" target=\"_blank\">\n <i className=\"fab fa-github\" />\n </S.GithubIcon>\n </S.FirstRow>\n <S.Separator />\n <S.SecondRow>\n <S.SecondRowText>\n And share the word!\n </S.SecondRowText>\n <S.TwitterIcon href=\"https://twitter.com/linuxnetdata/\" target=\"_blank\">\n <i className=\"fab fa-twitter\" />\n </S.TwitterIcon>\n <S.FacebookIcon href=\"https://www.facebook.com/linuxnetdata/\" target=\"_blank\">\n <i className=\"fab fa-facebook\" />\n </S.FacebookIcon>\n </S.SecondRow>\n </S.SocialMediaContainer>\n)\n","import React, { useRef } from \"react\"\nimport { createPortal } from \"react-dom\"\n\ninterface Props {\n children: React.ReactNode\n}\nexport const SidebarSocialMediaPortal = ({\n children,\n}: Props) => {\n const element = useRef(document.querySelector(\"#sidebar-end-portal-container\"))\n return createPortal(children, element.current!)\n}\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { ToastContainer, ToastContainerProps } from \"react-toastify\"\nimport \"react-toastify/dist/ReactToastify.min.css\"\n\nimport { getColor } from \"@netdata/netdata-ui\"\n\nimport { notificationsZIndex } from \"styles/z-index\"\n\nconst WrappedToastContainer = ({\n className,\n ...rest\n}: ToastContainerProps & { className?: string }) => (\n <div className={className}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <ToastContainer {...rest} closeButton={false} />\n </div>\n)\n\nexport const NotificationsContainer = styled(WrappedToastContainer)<ToastContainerProps>`\n .Toastify__toast-container {\n position: fixed;\n width: unset;\n min-width: 400px;\n max-width: 500px;\n ${notificationsZIndex};\n color: ${getColor([\"neutral\", \"limedSpruce\"])};\n }\n .Toastify__toast {\n padding: 0;\n padding-top: 5px;\n }\n .Toastify__toast--error {\n background: ${getColor([\"red\", \"lavender\"])};\n border: 1px solid ${getColor(\"error\")};\n }\n .Toastify__toast--warning {\n }\n .Toastify__toast--success {\n background: ${getColor([\"green\", \"frostee\"])};\n border: 1px solid ${getColor(\"success\")};\n }\n .Toastify__toast-body {\n }\n .Toastify__progress-bar {\n bottom: unset;\n top: 0;\n }\n .Toastify__progress-bar--success {\n background-color: ${getColor(\"success\")};\n }\n .Toastify__progress-bar--error {\n background-color: ${getColor(\"error\")};\n }\n`\n","import React from \"react\"\nimport { Icon, Flex } from \"@netdata/netdata-ui\"\n\nconst Item = ({ icon, children, hasBorder }) => (\n <Flex\n gap={2}\n border={hasBorder && { side: \"right\", color: \"separator\" }}\n alignItems=\"center\"\n padding={[0, 3, 0, 0]}\n height=\"100%\"\n >\n {!!icon && <Icon name={icon} color=\"bright\" height=\"15px\" />}\n {children}\n </Flex>\n)\n\nexport default Item\n","import React from \"react\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport Item from \"../item\"\nimport { useSelector } from \"@/src/store/redux-separate-context\"\n\nconst hostNameSelector = state => {\n const snapshot = state.global.snapshot\n const data = state.global.chartsMetadata.data\n\n if (!snapshot && !data) return \"\"\n return snapshot ? snapshot.hostname : data.hostname\n}\n\nconst Node = () => {\n const hostname = useSelector(hostNameSelector)\n\n return (\n <Item icon=\"node_hollow\">\n <Text data-testid={`header-nodename-${hostname}`} color=\"bright\" strong truncate>\n {hostname}\n </Text>\n </Item>\n )\n}\n\nexport default Node\n","import React from \"react\"\nimport { Flex, TextSmall } from \"@netdata/netdata-ui\"\n\nconst tooltipBackground = [\"neutral\", \"black\"]\n\nconst CustomTooltip = ({ children, isBasic }) => (\n <Flex\n padding={[1.5, 2]}\n margin={[2]}\n background={tooltipBackground}\n round={1}\n {...(!isBasic && { width: { max: \"300px\" } })}\n >\n <TextSmall color=\"bright\">{children}</TextSmall>\n </Flex>\n)\n\nexport default CustomTooltip\n","import React from \"react\"\nimport CustomTooltip from \"@/src/components/tooltips/customTooltip\"\n\nconst getContent = (content, { isBasic }) => {\n const contentNode = typeof content === \"function\" ? content() : content\n if (typeof content === \"string\" || isBasic) {\n return <CustomTooltip isBasic={isBasic}>{contentNode}</CustomTooltip>\n }\n return contentNode\n}\n\nexport default getContent\n","import React, { useCallback } from \"react\"\nimport { Tooltip as BaseTooltip } from \"@netdata/netdata-ui\"\nimport getContent from \"./getContent\"\n\nconst Tooltip = ({ children, content, isBasic, ...rest }) => {\n const getTooltipContent = useCallback(() => getContent(content, { isBasic }), [content, isBasic])\n return (\n <BaseTooltip plain animation content={getTooltipContent} {...rest}>\n {children}\n </BaseTooltip>\n )\n}\n\nexport default Tooltip\n","import React, { useCallback } from \"react\"\nimport { Flex, Button } from \"@netdata/netdata-ui\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport { setGlobalPauseAction } from \"domains/global/actions\"\nimport { useDispatch } from \"store/redux-separate-context\"\n\nconst Options = () => {\n const dispatch = useDispatch()\n const onClick = useCallback(() => dispatch(setGlobalPauseAction()), [dispatch])\n return (\n <Flex gap={2} data-testid=\"header-options-button\">\n <Tooltip content=\"Import a Netdata snapshot\" align=\"bottom\" plain>\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n data-toggle=\"modal\"\n data-target=\"#loadSnapshotModal\"\n icon=\"download\"\n />\n </Tooltip>\n <Tooltip content=\"Export a Netdata snapshot\" align=\"bottom\" plain>\n <Button\n onClick={onClick}\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n data-toggle=\"modal\"\n data-target=\"#saveSnapshotModal\"\n icon=\"upload\"\n />\n </Tooltip>\n <Tooltip content=\"Print the dashboard\" align=\"bottom\" plain>\n <Button\n flavour=\"borderless\"\n neutral\n themeType=\"dark\"\n data-toggle=\"modal\"\n data-target=\"#printPreflightModal\"\n icon=\"print\"\n />\n </Tooltip>\n </Flex>\n )\n}\n\nexport default Options\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Dropdown = styled(Flex).attrs({\n padding: [4],\n background: \"dropdown\",\n round: 1,\n overflow: { vertical: \"auto\" },\n margin: [4, 0, 0],\n width: 110,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\n\nexport default Dropdown\n","import styled from \"styled-components\"\nimport React, { useRef } from \"react\"\nimport { useMedia, useToggle } from \"react-use\"\nimport { Drop, Flex, Icon, Pill, Text } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectLacksProtoBufSupport } from \"domains/global/selectors\"\n\nimport Dropdown from \"./dropdown\"\n\nconst PillContainer = styled(Flex)`\n white-space: nowrap;\n`\n\nconst Link = styled(Text).attrs({ as: \"a\", color: \"success\", target: \"_blank\" })``\n\nconst breakpoint = \"(min-width: 1400px)\"\n\nconst ProtoBuf = () => {\n const [isOpen, toggle] = useToggle()\n const lacksProtoBufSupport = useSelector(selectLacksProtoBufSupport)\n\n const ref = useRef()\n\n const isLargeEnough = useMedia(breakpoint)\n\n const close = () => {\n toggle(false)\n }\n if (!lacksProtoBufSupport) return null\n\n return (\n <Flex flex={false}>\n <PillContainer ref={ref}>\n <Pill\n data-testid=\"header-options-button\"\n onClick={toggle}\n flavour=\"warning\"\n icon=\"warning_triangle_hollow\"\n >\n {isLargeEnough ? \"NOT MONITORED IN CLOUD\" : \"\"}\n </Pill>\n </PillContainer>\n {ref.current && isOpen && (\n <Drop\n target={ref.current}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n animation\n >\n <Dropdown>\n <Flex background=\"modalTabsBackground\" padding={[4]}>\n <Flex width={14} flex={false} alignItems=\"start\">\n <Flex padding={[2.5]} round=\"50%\" background=\"warningText\">\n <Icon color=\"warningBackground\" name=\"informationPress\" />\n </Flex>\n </Flex>\n <Flex>\n <Text>\n It will not be possible to monitor this node from Netdata Cloud after 1st of\n March. <br /> <br />\n This node does not have proto-buf support. In order to learn how to apply\n proto-buf support to your nodes{\" \"}\n <Link href=\"https://www.netdata.cloud/blog/netdata-clouds-new-architecture\">\n read our documentation.\n </Link>\n <br />\n <br /> If you are not interested in monitoring this node from Netdata Cloud, you\n can{\" \"}\n <Link href=\"https://learn.netdata.cloud/docs/agent/claim#remove-and-reconnect-a-node\">\n unclaim it.\n </Link>\n </Text>\n </Flex>\n </Flex>\n </Dropdown>\n </Drop>\n )}\n </Flex>\n )\n}\n\nexport default ProtoBuf\n","import React from \"react\"\nimport { Button } from \"@netdata/netdata-ui\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nimport { useHttp } from \"hooks/use-http\"\n\nconst NETDATA_LATEST_VERSION_URL = \"https://api.github.com/repos/netdata/netdata/releases/latest\"\nconst NETDATA_LATEST_GCS_VERSION_URL =\n \"https://www.googleapis.com/storage/v1/b/netdata-nightlies/o/latest-version.txt\"\n\nconst transformGcsVersionResponse = data => data.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\")\n\nconst transformGithubResponse = data => data?.tag_name.replace(/(\\r\\n|\\n|\\r| |\\t)/gm, \"\")\n\nconst versionsMatch = (v1, v2) => {\n if (v1 === v2) {\n return true\n }\n let s1 = v1.split(\".\")\n let s2 = v2.split(\".\")\n // Check major version\n let n1 = parseInt(s1[0].substring(1, 2), 10)\n let n2 = parseInt(s2[0].substring(1, 2), 10)\n if (n1 < n2) return false\n if (n1 > n2) return true\n\n // Check minor version\n n1 = parseInt(s1[1], 10)\n n2 = parseInt(s2[1], 10)\n if (n1 < n2) return false\n if (n1 > n2) return true\n\n // Split patch: format could be e.g. 0-22-nightly\n s1 = s1[2].split(\"-\")\n s2 = s2[2].split(\"-\")\n\n n1 = parseInt(s1[0], 10)\n n2 = parseInt(s2[0], 10)\n if (n1 < n2) return false\n if (n1 > n2) return true\n\n n1 = s1.length > 1 ? parseInt(s1[1], 10) : 0\n n2 = s2.length > 1 ? parseInt(s2[1], 10) : 0\n if (n1 < n2) return false\n return true\n}\n\nconst VersionControl = ({ currentVersion, releaseChannel }) => {\n const isStableReleaseChannel = releaseChannel === \"stable\"\n const [githubVersion] = useHttp(NETDATA_LATEST_VERSION_URL, isStableReleaseChannel, true)\n\n const [gcsVersionResponse] = useHttp(NETDATA_LATEST_GCS_VERSION_URL, !isStableReleaseChannel)\n const [mediaLinkResponse] = useHttp(gcsVersionResponse?.mediaLink, Boolean(gcsVersionResponse))\n\n const latestVersion = isStableReleaseChannel\n ? transformGithubResponse(githubVersion)\n : mediaLinkResponse\n ? transformGcsVersionResponse(mediaLinkResponse)\n : null\n\n if (!latestVersion) {\n return null\n }\n const isNewVersionAvailable = !versionsMatch(currentVersion, latestVersion)\n\n return (\n <Tooltip content={isNewVersionAvailable ? \"Need help?\" : \"Check Version\"} align=\"bottom\" plain>\n <Button\n data-testid=\"header-version-control-button\"\n flavour=\"borderless\"\n themeType=\"dark\"\n small\n neutral={!isNewVersionAvailable}\n warning={isNewVersionAvailable}\n name={isNewVersionAvailable ? \"update_pending\" : \"update\"}\n icon={isNewVersionAvailable ? \"update_pending\" : \"update\"}\n data-toggle=\"modal\"\n data-target=\"#updateModal\"\n />\n </Tooltip>\n )\n}\n\nexport default VersionControl\n","import React from \"react\"\nimport VersionControl from \"components/app-header/components/versionControl\"\nimport { useSelector } from \"@/src/store/redux-separate-context\"\n\nconst versionSelector = state => {\n const { data } = state.global.chartsMetadata\n\n if (!data) return null\n\n const { version, release_channel: releaseChannel } = data\n return {\n version,\n releaseChannel,\n }\n}\n\nconst Version = () => {\n const data = useSelector(versionSelector)\n return (\n data && <VersionControl currentVersion={data.version} releaseChannel={data.releaseChannel} />\n )\n}\n\nexport default Version\n","import { useState, useCallback } from \"react\"\n\n/**\n * @example\n * const [value, toggle, toggleOn, toggleOff] = useToggle(false);\n *\n * @param {Boolean} initialValue\n */\n\nconst useToggle = (initialValue = false) => {\n const [value, setToggle] = useState(!!initialValue)\n const toggle = useCallback(() => setToggle(oldValue => !oldValue), [])\n const toggleOn = useCallback(() => setToggle(true), [])\n const toggleOff = useCallback(() => setToggle(false), [])\n\n return [value, toggle, toggleOn, toggleOff]\n}\n\nexport default useToggle\n","import { useEffect, useState } from \"react\"\n\nconst useLocalStorage = (key, defaultValue) => {\n const [value, setValue] = useState(() => getValueFromStorage(key, defaultValue))\n\n useEffect(() => localStorage.setItem(key, JSON.stringify(value)), [key, value])\n\n return [value, setValue]\n}\n\nconst getValueFromStorage = (key, defaultValue = \"\") =>\n JSON.parse(localStorage.getItem(key)) ?? defaultValue\n\nexport default useLocalStorage\n","import styled from \"styled-components\"\nimport { getColor, getSizeBy, Icon } from \"@netdata/netdata-ui\"\nimport { Menu } from \"@rmwc/menu\"\n\nexport const RootContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n`\n\nexport const StyledMenu = styled(Menu)``\n\nexport const DropdownContainer = styled.div`\n cursor: pointer;\n color: ${getColor(\"bright\")};\n .mdc-menu-surface {\n border-radius: 0;\n .mdc-list {\n padding: 0;\n }\n .mdc-list-item {\n padding: 0 ${getSizeBy(5)} 0 ${getSizeBy(5)};\n font-size: 14px;\n height: ${getSizeBy(6)};\n }\n }\n`\n\nexport const ListContainer = styled.div`\n padding: ${getSizeBy(3)} 0;\n`\n\nexport const OpenerIcon = styled(Icon)`\n flex-shrink: 0;\n flex-grow: 0;\n margin-left: ${({ noMargin }) => (noMargin ? \"unset\" : \"16px\")};\n fill: ${getColor(\"bright\")};\n width: 10px;\n height: 5px;\n`\n","import styled from \"styled-components\"\nimport { getColor, getSizeBy, Icon, Drop } from \"@netdata/netdata-ui\"\nimport { Dropdown } from \"@/src/components/mdx-components/dropdown\"\nimport { dialogsZIndex, customDropdownZIndex } from \"@/src/styles/z-index\"\n\nexport const PickerBox = styled.div`\n display: flex;\n position: relative;\n min-width: ${getSizeBy(102)};\n min-height: ${getSizeBy(43)};\n flex-direction: column;\n align-items: flex-end;\n background-color: ${getColor(\"mainBackground\")};\n color: ${getColor(\"text\")};\n z-index: ${dialogsZIndex};\n border-radius: 8px;\n`\n\nexport const StyledTimePeriod = styled.span`\n margin-top: ${getSizeBy(3)};\n cursor: pointer;\n width: 187px;\n height: ${getSizeBy(2)};\n &:first-of-type {\n margin-top: ${getSizeBy(1)};\n }\n &:last-of-type {\n margin-bottom: ${getSizeBy(1)};\n }\n & > span:hover {\n color: ${getColor(\"textLite\")};\n }\n`\nexport const StyledCustomTimePeriod = styled.span`\n margin: ${getSizeBy(1)} ${getSizeBy(3)} 0;\n color: ${({ isSelected, theme }) => getColor(isSelected ? \"primary\" : \"text\")({ theme })};\n cursor: pointer;\n &:first-of-type {\n margin-top: 0;\n }\n &:hover {\n color: ${getColor(\"textLite\")};\n }\n`\n\nexport const StyledDropdown = styled(Dropdown)`\n width: 88px;\n height: 32px;\n padding-top: 8px;\n padding-bottom: 8px;\n padding-left: 8px;\n padding-right: 7px;\n border: 1px solid ${getColor(\"border\")};\n box-sizing: border-box;\n border-radius: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ${getColor(\"text\")};\n .mdc-menu-surface--anchor {\n .mdc-menu-surface--open {\n ${customDropdownZIndex}\n margin-top: ${getSizeBy(2)};\n background: ${getColor(\"mainBackground\")};\n border-radius: 4px;\n }\n }\n .mdc-list {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n`\nexport const DropdownIcon = styled(Icon)`\n fill: ${getColor(\"text\")};\n width: 12px;\n height: 12px;\n`\n\nexport const CustomInput = styled.input`\n border: 1px solid ${getColor(\"border\")};\n color: inherit;\n background: ${getColor(\"mainBackground\")};\n box-sizing: border-box;\n border-radius: 4px;\n padding: 4px;\n width: 32px;\n height: 32px;\n margin-left: 10px;\n margin-right: 10px;\n outline: none;\n &:focus {\n border: 1px solid ${getColor(\"primary\")};\n }\n`\nexport const StyledDrop = styled(Drop).attrs({\n background: \"mainBackground\",\n round: 2,\n margin: [4, 0, 0],\n border: { side: \"all\", color: \"elementBackground\" },\n animation: true,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\nexport const StyledHR = styled.hr`\n border: none;\n margin: 0;\n border-left: 1px solid ${getColor(\"borderSecondary\")};\n height: 284px;\n`\n","import React, { useRef } from \"react\"\nimport { List } from \"@rmwc/list\"\nimport { MenuSurfaceAnchor, MenuSurface } from \"@rmwc/menu\"\nimport { RootContainer, ListContainer, DropdownContainer, OpenerIcon } from \"./styled\"\n\nexport const Dropdown = ({\n title,\n children,\n className,\n renderTitle,\n isOpen = false,\n onMenuToggle,\n anchorCorner = \"bottomStart\",\n renderOpener,\n}) => {\n const ref = useRef()\n\n const handleOpenState = () => {\n onMenuToggle(!isOpen)\n }\n\n const handleClose = () => {\n onMenuToggle(false)\n }\n\n return (\n <DropdownContainer className={className}>\n <MenuSurfaceAnchor>\n <MenuSurface ref={ref} open={isOpen} onClose={handleClose} anchorCorner={anchorCorner}>\n {typeof children === \"function\" ? (\n isOpen && (\n <ListContainer>\n <List>{children({ maxHeight: ref.current?.root.ref.style.maxHeight })}</List>\n </ListContainer>\n )\n ) : (\n <ListContainer>\n <List>{children}</List>\n </ListContainer>\n )}\n </MenuSurface>\n <RootContainer onClick={handleOpenState}>\n {title || (renderTitle && renderTitle())}\n {renderOpener ? (\n renderOpener()\n ) : (\n <OpenerIcon name=\"triangle_down\" noMargin={Boolean(renderTitle)} />\n )}\n </RootContainer>\n </MenuSurfaceAnchor>\n </DropdownContainer>\n )\n}\n","import React, { memo, useCallback } from \"react\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport { StyledTimePeriod } from \"./styled\"\n\nconst TimePeriod = ({ value, period, resolution, isSelected, setTimeRange, tagging }) => {\n const onClick = useCallback(\n () => setTimeRange(value, resolution),\n [value, resolution, setTimeRange]\n )\n return (\n <StyledTimePeriod\n key={value}\n onClick={onClick}\n data-ga={`date-picker::click-quick-selector::${tagging}::${-value}`}\n data-testid=\"timePeriod-value\"\n >\n <Text color={isSelected ? \"primary\" : \"text\"}>{period}</Text>\n </StyledTimePeriod>\n )\n}\n\nexport default memo(TimePeriod)\n","import { format, formatDistanceStrict, parse, getTime, getUnixTime, add, isMatch } from \"date-fns\"\n\nconst MINUTE = 60\nconst HOUR = MINUTE * 60\nconst DAY = HOUR * 24\nconst MONTH = 30 * DAY\n\nexport const maxTimePeriodInUnix = 94694400\nexport const dateResolutions = [\"minutes\", \"hours\", \"days\", \"months\"]\n\nconst resolutionsMapping = {\n minutes: MINUTE,\n hours: HOUR,\n days: DAY,\n months: MONTH,\n}\n\nexport const getCustomTimePeriod = (after, resolution) =>\n Math.round(after / resolutionsMapping[resolution])\n\nexport const parseInputPeriod = (timeCorrection, resolution) => {\n const customRange = add(new Date(0), {\n [resolution]: timeCorrection,\n })\n return -getUnixTime(customRange)\n}\n\nconst focusTaggingMap = {\n startDate: \"start\",\n endDate: \"finish\",\n}\n\nexport const getFocusTagging = focusedInput => focusTaggingMap[focusedInput]\n\nexport const timePeriods = [\n { period: \"Last 5 minutes\", value: -5 * MINUTE, resolution: \"minutes\" },\n { period: \"Last 15 minutes\", value: -15 * MINUTE, resolution: \"minutes\" },\n { period: \"Last 30 minutes\", value: -30 * MINUTE, resolution: \"minutes\" },\n { period: \"Last 2 hours\", value: -2 * HOUR, resolution: \"hours\" },\n { period: \"Last 6 hours\", value: -6 * HOUR, resolution: \"hours\" },\n { period: \"Last 12 hours\", value: -12 * HOUR, resolution: \"hours\" },\n { period: \"Last Day\", value: -DAY, resolution: \"days\" },\n { period: \"Last 2 Days\", value: -2 * DAY, resolution: \"days\" },\n { period: \"Last 7 Days\", value: -7 * DAY, resolution: \"days\" },\n]\n\nexport const formatDates = (startDate, endDate) => {\n const formattedStartDate = format(startDate, \"MMMM d yyyy, H:mm:ss\")\n const formattedEndDate = format(endDate, \"MMMM d yyyy, H:mm:ss\")\n return {\n formattedStartDate,\n formattedEndDate,\n }\n}\n\nexport const formatOffset = offset => {\n if (!offset) return \"+00:00\"\n const splitOffset = offset.toString().split(\".\")\n const mathSign = splitOffset[0] > 0 ? \"+\" : \"-\"\n const absoluteNumber = Math.abs(splitOffset[0]).toString()\n const firstPart = `${mathSign}${absoluteNumber.padStart(2, 0)}`\n return splitOffset.length > 1\n ? `${firstPart}:${String(splitOffset[1] * 0.6).padEnd(2, 0)}`\n : `${firstPart}:00`\n}\n\nexport const getDateWithOffset = (date, utcOffset) => {\n const formattedDate = isMatch(date, \"MMMM d yyyy, H:mm\")\n ? date\n : parse(date, \"MMMM d yyyy, H:mm\", Date.now())\n return parse(`${formattedDate} ${formatOffset(utcOffset)}`, \"MMMM d yyyy, H:mm xxx\", Date.now())\n}\n\nexport const getTimePeriod = (startDate, endDate) =>\n formatDistanceStrict(getTime(startDate), getTime(endDate))\n","import React from \"react\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport TimePeriod from \"./timePeriod\"\nimport { timePeriods } from \"./utils\"\n\nconst TimePeriods = ({ handleTimePeriodChange, selectedDate, tagging }) => (\n <Flex\n column\n justifyContent=\"start\"\n alignItems=\"start\"\n height={{ max: \"240px\" }}\n overflow={{ vertical: \"scroll\" }}\n data-testid=\"timePeriods\"\n >\n {timePeriods.map(({ period, value, resolution }) => (\n <TimePeriod\n key={value}\n value={value}\n period={period}\n resolution={resolution}\n setTimeRange={handleTimePeriodChange}\n isSelected={selectedDate === value}\n tagging={tagging}\n />\n ))}\n </Flex>\n)\n\nexport default TimePeriods\n","import React, { useCallback, useEffect, useState } from \"react\"\nimport { isValid, add, getUnixTime } from \"date-fns\"\nimport { Flex, Text } from \"@netdata/netdata-ui\"\nimport {\n getCustomTimePeriod,\n parseInputPeriod,\n dateResolutions,\n maxTimePeriodInUnix,\n} from \"./utils\"\nimport { StyledDropdown, DropdownIcon, CustomInput, StyledCustomTimePeriod } from \"./styled\"\n\nconst CustomTimePeriod = ({ handleTimePeriodChange, value, resolution, tagging }) => {\n const getInputValue = () => (value <= 0 ? getCustomTimePeriod(-value, resolution) : 0)\n const [inputValue, setInputValue] = useState(getInputValue)\n const [isDropdownOpen, toggleDropdown] = useState(false)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => setInputValue(getInputValue()), [value])\n\n const onChange = useCallback(e => setInputValue(e.target.value), [])\n\n const onBlur = useCallback(\n e => {\n const currentValue = Number(e.currentTarget.value)\n const isValidInput =\n !Number.isNaN(currentValue) && Number.isInteger(currentValue) && currentValue > 0\n const timePeriod = add(new Date(0), {\n [resolution]: currentValue,\n })\n const isValidTimePeriod =\n isValidInput && isValid(timePeriod) && getUnixTime(timePeriod) <= maxTimePeriodInUnix\n if (isValidTimePeriod)\n return handleTimePeriodChange(parseInputPeriod(currentValue, resolution), resolution)\n return value <= 0 ? setInputValue(getCustomTimePeriod(-value, resolution)) : setInputValue(0)\n },\n [resolution, value, handleTimePeriodChange]\n )\n\n const onChangeResolution = useCallback(\n newResolution => {\n return () => {\n handleTimePeriodChange(parseInputPeriod(inputValue, newResolution), newResolution)\n toggleDropdown(false)\n }\n },\n [inputValue, handleTimePeriodChange]\n )\n\n const renderTitle = () => (\n <Flex alignItems=\"center\" flexWrap={false} width=\"100%\">\n <Text padding={[0, 4, 0, 0]}>{resolution}</Text>\n <DropdownIcon name=\"triangle_down\" />\n </Flex>\n )\n return (\n <Flex\n justifyContent=\"start\"\n alignItems=\"center\"\n height={8}\n data-ga={`date-picker::click-last-integer::${tagging}`}\n data-testid=\"customTimePeriod\"\n >\n <Text>Last</Text>\n <CustomInput\n value={inputValue}\n onChange={onChange}\n onBlur={onBlur}\n data-ga={`date-picker::click-last-integer::${tagging}::${inputValue}`}\n data-testid=\"timePeriod-timeInput\"\n />\n <StyledDropdown\n isOpen={isDropdownOpen}\n onMenuToggle={toggleDropdown}\n renderTitle={renderTitle}\n renderOpener={() => null}\n >\n {() =>\n dateResolutions.map(dateResolution => (\n <StyledCustomTimePeriod\n key={dateResolution}\n onClick={onChangeResolution(dateResolution)}\n data-ga={`date-picker::click-last-time-${dateResolution}::${tagging}`}\n data-testid=\"timePeriod-option\"\n >\n {dateResolution}\n </StyledCustomTimePeriod>\n ))\n }\n </StyledDropdown>\n </Flex>\n )\n}\n\nexport default CustomTimePeriod\n","import React from \"react\"\nimport DatePickerLib from \"react-datepicker\"\nimport \"react-datepicker/dist/react-datepicker.css\"\n\nconst DatePicker = ({\n selected,\n selectsStart = false,\n selectsEnd = false,\n startDate,\n endDate,\n onChange,\n minDate,\n maxDate,\n dateFormat = \"MM/dd/yyyy\",\n open = false,\n startOpen = false,\n inline = false,\n selectsRange = false,\n monthsShown = 1,\n showPopperArrow = true,\n calendarContainer = null,\n}) => (\n <DatePickerLib\n selected={selected}\n onChange={onChange}\n selectsStart={selectsStart}\n selectsEnd={selectsEnd}\n startDate={startDate}\n endDate={endDate}\n minDate={minDate}\n maxDate={maxDate}\n dateFormat={dateFormat}\n open={open}\n startOpen={startOpen}\n inline={inline}\n selectsRange={selectsRange}\n monthsShown={monthsShown}\n showPopperArrow={showPopperArrow}\n calendarContainer={calendarContainer}\n />\n)\n\nexport default DatePicker\n","import { getColor, getRgbColor } from \"@netdata/netdata-ui\"\nimport styled from \"styled-components\"\n\nexport const StyledDateInput = styled.input`\n width: 100%;\n text-align: center;\n border: 1px solid ${getColor(\"border\")};\n color: inherit;\n background: ${getColor(\"mainBackground\")};\n box-sizing: border-box;\n border-radius: 4px;\n padding: 4px;\n height: 32px;\n margin-left: 20px;\n margin-right: 20px;\n outline: none;\n &:focus {\n border: 1px solid ${getColor(\"primary\")};\n }\n`\nexport const StyledCalendar = styled.div`\n background: ${getColor(\"mainBackground\")};\n border: 0;\n .react-datepicker {\n &__navigation {\n top: 8px;\n &-icon::before {\n border-color: ${getColor(\"text\")};\n }\n }\n &__header {\n background: ${getColor(\"mainBackground\")};\n border: 0;\n .react-datepicker__current-month {\n color: ${getColor(\"main\")};\n font-weight: normal;\n }\n .react-datepicker__day-name {\n color: ${getColor(\"textLite\")};\n }\n }\n &__day {\n color: ${getColor(\"main\")};\n &:hover {\n background: ${getColor(\"elementBackground\")};\n }\n &--disabled {\n color: ${getColor(\"textLite\")};\n &:hover {\n background: inherit;\n }\n }\n &--keyboard-selected,\n &--keyboard-selected:hover {\n color: ${getColor(\"main\")};\n background: inherit;\n border-radius: inherit;\n }\n &--selected,\n &--selected:hover {\n color: ${getColor(\"bright\")};\n background: ${getColor(\"primary\")};\n border-radius: 8px;\n }\n &--in-selecting-range,\n &--in-range {\n color: ${getColor(\"primary\")};\n background: ${getColor(\"elementBackground\")};\n border-radius: 0;\n }\n &--selecting-range-start,\n &--range-start {\n color: ${getColor(\"bright\")};\n background: ${getColor(\"primary\")};\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n &:hover {\n color: ${getColor(\"bright\")};\n background: ${getRgbColor([\"green\", \"netdata\"], 0.8)};\n border-radius: 0;\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n }\n }\n &--selecting-range-end,\n &--range-end {\n color: ${getColor(\"bright\")};\n background: ${getColor(\"primary\")};\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n &:hover {\n color: ${getColor(\"bright\")};\n background: ${getRgbColor([\"green\", \"netdata\"], 0.8)};\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n }\n }\n }\n }\n`\n","import React, { useState, useEffect, useCallback } from \"react\"\nimport { format, isValid, getTime } from \"date-fns\"\nimport { getDateWithOffset } from \"./utils\"\nimport { StyledDateInput } from \"../datePicker/styled\"\nimport { useDateTime } from \"@/src/utils/date-time\"\n\nconst DatePickerInput = ({\n name = \"\",\n value = \"\",\n onDatesChange,\n onFocus,\n placeholderText = \"\",\n}) => {\n const { utcOffset } = useDateTime()\n const [inputValue, setInputValue] = useState(\"\")\n const onChange = useCallback(e => {\n const date = e.target.value\n setInputValue(date)\n }, [])\n const setFormattedValue = useCallback(value => {\n if (isValid(value)) {\n const formattedDate = format(value, \"MMMM d yyyy, H:mm\")\n setInputValue(formattedDate)\n }\n }, [])\n const onBlur = useCallback(\n e => {\n const parsedDate = getDateWithOffset(e.target.value, utcOffset)\n const isValidDate = isValid(parsedDate) && getTime(parsedDate) > 0\n if (isValidDate) {\n const timestamp = getTime(parsedDate)\n onDatesChange(timestamp, () => setFormattedValue(value))\n } else setFormattedValue(value)\n },\n [value, utcOffset, onDatesChange, setFormattedValue]\n )\n\n useEffect(() => setFormattedValue(value), [value, setFormattedValue])\n\n return (\n <StyledDateInput\n type=\"text\"\n name={name}\n value={value ? inputValue : placeholderText}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n placeholder={placeholderText}\n data-testid=\"datePicker-input\"\n />\n )\n}\n\nexport default DatePickerInput\n","import { useDateTime } from \"@/src/utils/date-time\"\nimport { useCallback } from \"react\"\n\nconst useLocaleDate = () => {\n const { localeTimeString, localeDateString } = useDateTime()\n return useCallback(\n date => {\n return `${localeDateString(date, { locale: \"en-us\", long: false })} ${localeTimeString(date, {\n secs: false,\n })}`\n },\n [localeTimeString, localeDateString]\n )\n}\n\nexport default useLocaleDate\n","import { useMemo } from \"react\"\nimport { toDate } from \"date-fns\"\nimport useLocaleDate from \"./useLocaleDate\"\n\nexport const convertTimestampToDate = (timestamp, getLocaleDate) => {\n if (timestamp > 0) {\n return toDate(new Date(getLocaleDate(timestamp)))\n } else if (timestamp || timestamp === 0)\n return toDate(new Date(getLocaleDate(new Date().valueOf() + timestamp * 1000)))\n return null\n}\n\nconst useConvertedDates = (startDate, endDate) => {\n const getLocaleDate = useLocaleDate()\n return useMemo(\n () => [\n convertTimestampToDate(startDate, getLocaleDate),\n convertTimestampToDate(endDate, getLocaleDate),\n ],\n [startDate, endDate, getLocaleDate]\n )\n}\n\nexport default useConvertedDates\n","import { Flex } from \"@netdata/netdata-ui\"\nimport React, { useCallback } from \"react\"\nimport { getTime, isBefore, format } from \"date-fns\"\nimport { useDateTime } from \"@/src/utils/date-time\"\nimport DatePicker from \"../datePicker/datePickerLib\"\nimport DatePickerInput from \"./datePickerInput\"\nimport useConvertedDates, { convertTimestampToDate } from \"./useConvertedDate\"\nimport useLocaleDate from \"./useLocaleDate\"\nimport { getDateWithOffset } from \"./utils\"\nimport { StyledCalendar } from \"../datePicker/styled\"\n\nconst DatePickerWrapper = ({\n startDate,\n setStartDate,\n endDate,\n setEndDate,\n onDatesChange,\n onInputFocus,\n}) => {\n const getLocaleDate = useLocaleDate()\n const [convertedStartDate, convertedEndDate] = useConvertedDates(startDate, endDate)\n const { utcOffset } = useDateTime()\n const setValidStartDate = useCallback(\n (startDate, setPreviousValue) =>\n isBefore(convertTimestampToDate(startDate, getLocaleDate), convertedEndDate)\n ? setStartDate(startDate)\n : setPreviousValue(),\n [convertedEndDate, getLocaleDate, setStartDate]\n )\n\n const setValidEndDate = useCallback(\n (endDate, setPreviousValue) =>\n isBefore(convertedStartDate, convertTimestampToDate(endDate, getLocaleDate))\n ? setEndDate(endDate)\n : setPreviousValue(),\n [convertedStartDate, getLocaleDate, setEndDate]\n )\n\n const onChange = useCallback(\n dates => {\n const [startDate, endDate] = dates\n\n const startDateWithOffset = startDate\n ? getDateWithOffset(format(startDate, \"MMMM d yyyy, H:mm\"), utcOffset)\n : startDate\n const endDateWithOffset = endDate\n ? getDateWithOffset(format(endDate, \"MMMM d yyyy, H:mm\"), utcOffset)\n : endDate\n\n const startDateTimestamp = getTime(startDateWithOffset) || null\n const endDateTimestamp = getTime(endDateWithOffset) || null\n\n onDatesChange(startDateTimestamp, endDateTimestamp)\n },\n [utcOffset, onDatesChange]\n )\n\n return (\n <Flex\n column\n justifyContent=\"center\"\n alignItems=\"center\"\n flex={{ grow: 1 }}\n gap={3}\n margin={[0, 0, 0, 7]}\n data-testid=\"datePicker-wrapper\"\n >\n <DatePicker\n selected={convertedStartDate}\n onChange={onChange}\n startDate={convertedStartDate}\n endDate={convertedEndDate}\n maxDate={new Date()}\n minDate={new Date(\"1/1/2018\")}\n inline\n selectsRange\n monthsShown={2}\n dateFormat=\"MMMM d yyyy, H:mm\"\n showPopperArrow={false}\n calendarContainer={StyledCalendar}\n />\n <Flex justifyContent=\"around\" alignItems=\"center\" width=\"100%\">\n <DatePickerInput\n name=\"startDate\"\n value={convertedStartDate}\n onDatesChange={setValidStartDate}\n onFocus={onInputFocus}\n placeholderText=\"Select a start date\"\n />\n <DatePickerInput\n name=\"endDate\"\n value={convertedEndDate}\n onDatesChange={setValidEndDate}\n onFocus={onInputFocus}\n placeholderText=\"Select an end date\"\n />\n </Flex>\n </Flex>\n )\n}\n\nexport default DatePickerWrapper\n","import React, { useMemo } from \"react\"\nimport { Flex, Icon, TextSmall } from \"@netdata/netdata-ui\"\nimport { formatDates, getTimePeriod } from \"./utils\"\nimport useConvertedDates from \"./useConvertedDate\"\n\nconst PeriodIndication = ({ startDate, endDate }) => {\n const [convertedStart, convertedEnd] = useConvertedDates(startDate, endDate)\n\n const { formattedStartDate, formattedEndDate } = useMemo(\n () => formatDates(convertedStart, convertedEnd),\n [convertedStart, convertedEnd]\n )\n const timePeriod = useMemo(\n () => getTimePeriod(convertedStart, convertedEnd),\n [convertedStart, convertedEnd]\n )\n\n return (\n <Flex alignItems=\"center\" justifyContent=\"between\" gap={2}>\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={1.5}>\n <TextSmall strong whiteSpace=\"nowrap\">\n From\n </TextSmall>\n <TextSmall whiteSpace=\"nowrap\" data-testid=\"periodIndication-from\">\n {formattedStartDate}\n </TextSmall>\n </Flex>\n <Icon name=\"arrow_left\" size=\"small\" color=\"textLite\" rotate={2} />\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={1.5}>\n <TextSmall strong whiteSpace=\"nowrap\">\n To\n </TextSmall>\n <TextSmall whiteSpace=\"nowrap\" data-testid=\"periodIndication-to\">\n {formattedEndDate}\n </TextSmall>\n </Flex>\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={2}>\n <TextSmall whiteSpace=\"nowrap\">/</TextSmall>\n <TextSmall color=\"textLite\" whiteSpace=\"nowrap\" data-testid=\"periodIndication-period\">\n {timePeriod}\n </TextSmall>\n </Flex>\n </Flex>\n )\n}\n\nexport default PeriodIndication\n","import moment from \"moment\"\n\nexport const SECONDS = 1000\nexport const MINUTE = SECONDS * 60\nexport const HOUR = MINUTE * 60\nexport const DAY = HOUR * 24\nexport const MONTH = DAY * 30\n\nconst resolutionMap = [\n { value: DAY, unit: \"d\" },\n { value: HOUR, unit: \"h\" },\n { value: MINUTE, unit: \"min\" },\n { value: MINUTE, unit: \"min\" },\n { value: SECONDS, unit: \"s\" },\n]\n\nexport const getStartDate = start =>\n start < 0 ? moment(new Date()).add(start, \"seconds\") : moment(start)\nexport const getEndDate = end => (!end ? moment(new Date()) : moment(end))\nexport const getIsSameDate = (startDate, endDate) => startDate.isSame(endDate, \"day\")\nexport const getDuration = (startDate, endDate) => moment.duration(startDate.diff(endDate))\n\nconst getResolution = (value, resolution) => (value > 1 ? `${Math.floor(value)}${resolution}` : \"\")\n\nexport const getGranularDuration = duration => {\n let seconds = Math.abs(duration)\n const showSeconds = seconds < MINUTE\n return resolutionMap.reduce((acc, { value, unit }) => {\n if (value === SECONDS && !showSeconds) return acc\n acc = acc + getResolution(seconds / value, unit)\n seconds = seconds % value\n return acc\n }, \"\")\n}","import styled from \"styled-components\"\nimport { Flex, getColor } from \"@netdata/netdata-ui\"\n\nconst Container = styled(Flex)`\n cursor: pointer;\n\n &:hover * {\n color: ${getColor(\"textLite\")};\n fill: ${getColor(\"textLite\")};\n }\n`\n\nexport default Container\n","import React from \"react\"\nimport { Flex, TextSmall, Icon } from \"@netdata/netdata-ui\"\nimport { useDateTime } from \"utils/date-time\"\n\nconst DateBox = ({ isPlaying, startDate, endDate, isSameDate }) => {\n const { localeTimeString, localeDateString } = useDateTime()\n return (\n <Flex gap={2}>\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n {localeDateString(startDate, { long: false })} •{\" \"}\n <TextSmall color={isPlaying ? \"accent\" : \"textFocus\"} whiteSpace=\"nowrap\">\n {localeTimeString(startDate, { secs: false })}\n </TextSmall>\n </TextSmall>\n <Icon name=\"arrow_left\" color={isPlaying ? \"accent\" : \"textFocus\"} size=\"small\" rotate={2} />\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n {!isSameDate && `${localeDateString(endDate, { long: false })} • `}\n <TextSmall color={isPlaying ? \"accent\" : \"textFocus\"} whiteSpace=\"nowrap\">\n {localeTimeString(endDate, { secs: false })}\n </TextSmall>\n </TextSmall>\n </Flex>\n )\n}\n\nexport default DateBox\n","import React from \"react\"\nimport { Flex, TextSmall } from \"@netdata/netdata-ui\"\n\nconst DurationBox = ({ isPlaying, duration }) => {\n return (\n <Flex gap={1}>\n <Flex width=\"24px\" justifyContent=\"center\">\n {isPlaying && (\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n • last\n </TextSmall>\n )}\n </Flex>\n <TextSmall color=\"text\" whiteSpace=\"nowrap\">\n {duration}\n </TextSmall>\n </Flex>\n )\n}\n\nexport default DurationBox\n","import React, { useState, useMemo, useEffect, forwardRef } from \"react\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport { useSelector as useDashboardSelector } from \"store/redux-separate-context\"\nimport { selectGlobalPanAndZoom } from \"domains/global/selectors\"\nimport {\n getStartDate,\n getEndDate,\n getIsSameDate,\n getDuration,\n MINUTE,\n getGranularDuration,\n} from \"./utils\"\nimport Container from \"./container\"\nimport DateBox from \"./dateBox\"\nimport DurationBox from \"./durationBox\"\n\nconst PickerAccessorElement = forwardRef(\n (\n { onClick, start = 15 * MINUTE, end, isPlaying, isPickerOpen, setRangeValues, tagging },\n ref\n ) => {\n const [timeframe, setTimeframe] = useState()\n const startDate = getStartDate(start)\n const endDate = getEndDate(end)\n const globalPanAndZoom = useDashboardSelector(selectGlobalPanAndZoom)\n useEffect(() => {\n const after = getDuration(startDate, endDate).as(\"seconds\")\n if (!isPlaying && timeframe !== after) setTimeframe(Math.round(after))\n if (isPlaying && timeframe && !!globalPanAndZoom) {\n setRangeValues({ start: Math.round(timeframe) })\n setTimeframe(null)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [startDate, endDate, timeframe, isPlaying])\n\n const isSameDate = useMemo(() => getIsSameDate(startDate, endDate), [startDate, endDate])\n const duration = useMemo(\n () => getGranularDuration(getDuration(startDate, endDate).as(\"milliseconds\")),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isPlaying, startDate, endDate]\n )\n\n return (\n <Tooltip\n content={isPickerOpen ? () => {} : \"Select a predefined or a custom timeframe\"}\n align=\"bottom\"\n plain\n >\n <Container\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={1}\n height=\"100%\"\n width={{ min: \"380px\" }}\n onMouseDown={onClick}\n padding={[0, 1]}\n ref={ref}\n data-ga={`date-picker::click-time::${tagging}`}\n data-testid=\"datePicker-accessorElement\"\n >\n <DateBox\n isPlaying={isPlaying}\n endDate={endDate}\n startDate={startDate}\n isSameDate={isSameDate}\n />\n <DurationBox isPlaying={isPlaying} duration={duration} />\n </Container>\n </Tooltip>\n )\n }\n)\n\nexport default PickerAccessorElement\n","import React, { useState, useEffect, useMemo, useRef, useCallback } from \"react\"\nimport { Button, Flex } from \"@netdata/netdata-ui\"\nimport useToggle from \"hooks/useToggle\"\nimport useLocalStorage from \"hooks/useLocalStorage\"\nimport TimePeriods from \"./timePeriods\"\nimport CustomTimePeriod from \"./customTimePeriod\"\nimport DatePickerWrapper from \"./datePickerWrapper\"\nimport { getFocusTagging } from \"./utils\"\nimport PeriodIndication from \"./periodIndication\"\nimport AccessorElement from \"./accessorElement\"\nimport { PickerBox, StyledDrop, StyledHR } from \"./styled\"\n\nexport const reportEvent = (\n eventCategory,\n eventAction,\n eventLabel,\n eventValue,\n event = \"gaCustomEvent\"\n) => {\n if (window.dataLayer) {\n const eventData = { event, eventCategory, eventAction, eventLabel, eventValue }\n window.dataLayer.push(eventData)\n }\n}\n\nconst DatePickerDrop = ({\n onChange,\n values: { start: initialStartDate, end: initialEndDate } = {},\n defaultValue = -60 * 15,\n tagging = \"\",\n isPlaying,\n}) => {\n const [startDate, setStartDate] = useState(initialStartDate)\n const [endDate, setEndDate] = useState(initialStartDate)\n const [resolution, setResolution] = useLocalStorage(\"resolution\", \"minutes\")\n const [focusedInput, setFocusedInput] = useState(\"startDate\")\n const [isOpen, toggle, , close] = useToggle()\n const ref = useRef()\n\n const setDates = useCallback(({ startDate, endDate }) => {\n setStartDate(startDate)\n setEndDate(endDate)\n }, [])\n\n useEffect(() => {\n setDates({\n startDate: initialStartDate,\n endDate: initialEndDate,\n })\n }, [initialStartDate, initialEndDate, setDates])\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const clearChanges = useCallback(() => setDates({ startDate: defaultValue, endDate: 0 }), [])\n\n const onInputFocus = useCallback(e => {\n if (!e.target.name) return\n setFocusedInput(e.target.name)\n }, [])\n\n const togglePicker = useCallback(\n e => {\n e.stopPropagation()\n toggle()\n },\n [toggle]\n )\n\n const applyChanges = () => {\n onChange({\n start: startDate,\n end: endDate,\n })\n close()\n }\n\n const focusTagging = useMemo(() => getFocusTagging(focusedInput), [focusedInput])\n\n const isValidTimePeriod = startDate !== null && endDate !== null && startDate !== endDate\n const isApplyDisabled = startDate === initialStartDate && endDate === initialEndDate\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const consistentDefaultValue = useMemo(() => defaultValue, [])\n const isClearDisabled = startDate === consistentDefaultValue\n\n const handleTimePeriodChange = useCallback(\n (time, resolution) => {\n setResolution(resolution)\n setDates({\n startDate: time,\n endDate: 0,\n })\n },\n [setDates, setResolution]\n )\n const onDatepickerChange = (startDate, endDate) => {\n setDates({ startDate, endDate })\n const date = focusTagging === \"finish\" ? endDate || startDate : startDate || endDate\n reportEvent(\"date-picker\", \"click-date-picker\", tagging, String(date))\n }\n\n const pickerDrop =\n ref.current && isOpen ? (\n <StyledDrop\n target={ref.current}\n canHideTarget={false}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n >\n <PickerBox data-testid=\"datePicker\">\n <Flex justifyContent=\"between\" alignItems=\"center\" width=\"100%\" padding={[6, 6, 0, 6]}>\n <Flex column gap={3} margin={[0, 7, 0, 0]}>\n <TimePeriods\n handleTimePeriodChange={handleTimePeriodChange}\n selectedDate={startDate}\n tagging={tagging}\n />\n <CustomTimePeriod\n handleTimePeriodChange={handleTimePeriodChange}\n value={startDate}\n resolution={resolution}\n tagging={tagging}\n />\n </Flex>\n <StyledHR />\n <DatePickerWrapper\n startDate={startDate}\n endDate={endDate}\n setStartDate={setStartDate}\n setEndDate={setEndDate}\n onDatesChange={onDatepickerChange}\n onInputFocus={onInputFocus}\n />\n </Flex>\n <Flex\n alignItems=\"center\"\n justifyContent={isValidTimePeriod ? \"between\" : \"end\"}\n width=\"100%\"\n padding={[5, 6]}\n gap={2}\n >\n {isValidTimePeriod && <PeriodIndication startDate={startDate} endDate={endDate} />}\n <Flex alignItems=\"center\" justifyContent=\"center\" gap={4}>\n <Button\n label=\"Clear\"\n flavour=\"hollow\"\n onClick={clearChanges}\n disabled={isClearDisabled}\n data-ga={`date-picker::click-clear::${tagging}-${focusTagging}`}\n data-testid=\"datePicker-clear\"\n />\n <Button\n label=\"Apply\"\n onClick={applyChanges}\n disabled={!isValidTimePeriod || isApplyDisabled}\n data-ga={`date-picker::click-apply::${tagging}-${focusTagging}`}\n data-testid=\"datePicker-apply\"\n />\n </Flex>\n </Flex>\n </PickerBox>\n </StyledDrop>\n ) : null\n\n return (\n <>\n <AccessorElement\n onClick={togglePicker}\n tagging={tagging}\n isPickerOpen={isOpen}\n isPlaying={isPlaying}\n setRangeValues={onChange}\n start={initialStartDate}\n end={initialEndDate}\n ref={ref}\n />\n {pickerDrop}\n </>\n )\n}\n\nexport default DatePickerDrop\n","import React, { memo, useEffect, useMemo } from \"react\"\nimport {\n useDispatch as useDashboardDispatch,\n useSelector as useDashboardSelector,\n} from \"store/redux-separate-context\"\nimport {\n resetGlobalPanAndZoomAction,\n setGlobalPanAndZoomAction,\n setDefaultAfterAction,\n} from \"domains/global/actions\"\nimport { selectDefaultAfter, selectGlobalPanAndZoom } from \"domains/global/selectors\"\nimport { setHashParams } from \"utils/hash-utils\"\nimport DatePickerDrop from \"./datePickerDrop\"\n\nconst ReduxDatePickerContainer = memo(({ tagging, isPlaying }) => {\n const dashboardDispatch = useDashboardDispatch()\n\n const globalPanAndZoom = useDashboardSelector(selectGlobalPanAndZoom)\n const isGlobalPanAndZoom = Boolean(globalPanAndZoom)\n\n const defaultAfter = useDashboardSelector(selectDefaultAfter)\n const pickedValues = useMemo(\n () =>\n isGlobalPanAndZoom\n ? { start: globalPanAndZoom.after, end: globalPanAndZoom.before }\n : {\n start: defaultAfter,\n end: 0,\n },\n [isGlobalPanAndZoom, globalPanAndZoom, defaultAfter]\n )\n\n function handlePickedValuesChange(params) {\n const { start, end } = params\n if (start < 0) {\n // live mode\n dashboardDispatch(\n // changes the default value, so it becomes inconsistent\n setDefaultAfterAction({\n after: start,\n })\n )\n if (isGlobalPanAndZoom) {\n dashboardDispatch(resetGlobalPanAndZoomAction())\n }\n } else {\n // global-pan-and-zoom mode\n dashboardDispatch(\n setGlobalPanAndZoomAction({\n after: start,\n before: end,\n })\n )\n }\n }\n\n useEffect(() => {\n const { start, end } = pickedValues\n setHashParams({ after: start.toString(), before: end.toString() })\n }, [pickedValues])\n return (\n <DatePickerDrop\n values={pickedValues}\n defaultValue={defaultAfter}\n onChange={handlePickedValuesChange}\n tagging={tagging}\n isPlaying={isPlaying}\n />\n )\n})\n\nexport default ReduxDatePickerContainer\n","import styled from \"styled-components\"\nimport { Flex, getRgbColor } from \"@netdata/netdata-ui\"\n\nconst getBackground = ({ theme, isPlaying }) => {\n const { name } = theme\n\n const background =\n name === \"Dark\"\n ? getRgbColor(isPlaying ? [\"green\", \"netdata\"] : [\"neutral\", \"tuna\"], isPlaying ? 0.3 : 1)\n : getRgbColor(isPlaying ? [\"green\", \"frostee\"] : [\"neutral\", \"blackhaze\"])\n\n return background({ theme })\n}\n\nconst Container = styled(Flex)`\n background: ${getBackground};\n`\n\nexport default Container\n","import styled from \"styled-components\"\nimport { Pill, getColor } from \"@netdata/netdata-ui\"\n\nconst getHoverColor = ({ isPlaying }) =>\n getColor(isPlaying ? [\"green\", \"chateau\"] : [\"neutral\", \"iron\"])\n\nconst StyledPill = styled(Pill).attrs(({ isPlaying }) => ({\n flavour: isPlaying ? \"success\" : \"neutral\",\n}))`\n &:hover {\n background: ${getHoverColor};\n border-color: ${getHoverColor};\n }\n`\n\nexport default StyledPill\n","import React, { useMemo } from \"react\"\nimport { useDispatch } from \"store/redux-separate-context\"\nimport { resetGlobalPauseAction, setGlobalPauseAction } from \"domains/global/actions\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport StyledPill from \"./styledPill\"\n\nconst getIcon = (isPlaying, isForcePlaying) => {\n if (!isPlaying) return \"pauseSolid\"\n return isForcePlaying ? \"forcePlay\" : \"playSolid\"\n}\n\nconst PlayPausePill = ({ isPlaying, isForcePlaying }) => {\n const dispatch = useDispatch()\n\n const onPlay = () => dispatch(resetGlobalPauseAction({ forcePlay: false }))\n const onPause = () => dispatch(setGlobalPauseAction())\n const icon = useMemo(() => getIcon(isPlaying, isForcePlaying), [isPlaying, isForcePlaying])\n\n return (\n <Tooltip content={isPlaying ? \"Click to pause\" : \"Click to play\"} align=\"bottom\" plain>\n <StyledPill icon={icon} onClick={isPlaying ? onPause : onPlay} isPlaying={isPlaying}>\n {isPlaying ? \"Playing\" : \"Paused\"}\n </StyledPill>\n </Tooltip>\n )\n}\n\nexport default PlayPausePill\n","import React, { useCallback, forwardRef } from \"react\"\nimport styled from \"styled-components\"\nimport { getColor, Flex, Icon, Text } from \"@netdata/netdata-ui\"\n\nexport const PanelRowContainer = styled(Flex)`\n cursor: pointer;\n\n &:hover {\n background: ${getColor(\"selected\")};\n }\n\n ${props => props.selected && `background: ${getColor(\"selected\")(props)};`}\n`\n\nconst MenuItem = forwardRef(\n (\n {\n disabled,\n children,\n Wrapper = Text,\n onClick,\n testid,\n icon,\n padding = [2, 3],\n margin = [0],\n round = 0,\n actions,\n selected,\n width = \"100%\",\n },\n ref\n ) => {\n const click = useCallback(() => {\n if (disabled) return\n if (onClick) onClick()\n }, [onClick, disabled])\n\n return (\n <PanelRowContainer\n ref={ref}\n flexWrap={false}\n justifyContent=\"between\"\n alignItems=\"center\"\n padding={padding}\n margin={margin}\n round={round}\n onClick={click}\n data-testid={testid}\n width={width}\n selected={selected}\n disabled={disabled}\n >\n <Flex alignItems=\"center\" gap={3} flex basis=\"\">\n {typeof icon === \"string\" ? (\n <Icon name={icon} disabled={disabled} color=\"text\" height=\"16px\" width=\"16px\" />\n ) : (\n icon\n )}\n <Wrapper opacity={disabled ? \"medium\" : undefined} width=\"150px\">\n {children}\n </Wrapper>\n </Flex>\n {actions}\n </PanelRowContainer>\n )\n }\n)\n\nexport default MenuItem\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex, H4, Collapsible } from \"@netdata/netdata-ui\"\n\nexport const DefaultListHeader = styled(H4).attrs({ padding: [0], margin: [0] })`\n cursor: pointer;\n`\n\nconst SectionHandle = ({ toggleOpen, label, testid, Header = DefaultListHeader }) => (\n <Header data-testid={testid} onClick={toggleOpen}>\n {label}\n </Header>\n)\n\nconst ItemsList = ({ isOpen = false, toggleOpen, label, children, testid, Header }) => (\n <Flex column>\n <SectionHandle Header={Header} toggleOpen={toggleOpen} label={label} testid={testid} />\n <Collapsible open={isOpen}>{children}</Collapsible>\n </Flex>\n)\n\nexport default ItemsList\n","import React from \"react\"\nimport { Flex, TextSmall } from \"@netdata/netdata-ui\"\n\nconst PlayOptionsTooltip = () => (\n <Flex\n padding={[1, 2]}\n margin={[1]}\n background={[\"neutral\", \"black\"]}\n round={1}\n justifyContent=\"center\"\n width={{ max: \"320px\" }}\n >\n <TextSmall color=\"bright\">\n Play to refresh and have live content, pause to see historical, or force play to keep\n refreshing even when the tab loses focus at the expense of some system performance.\n </TextSmall>\n </Flex>\n)\n\nexport default PlayOptionsTooltip\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nexport const Divider = styled(Flex).attrs({\n bacgkround: \"disabled\",\n height: \"1px\",\n margin: [2, 6],\n})``\n","import React, { memo, Fragment } from \"react\"\nimport styled from \"styled-components\"\nimport { useToggle } from \"react-use\"\nimport { Flex, Icon, Drop } from \"@netdata/netdata-ui\"\nimport { MenuItem } from \"@/src/components/menus\"\nimport { useDispatch } from \"store/redux-separate-context\"\nimport { resetGlobalPauseAction, setGlobalPauseAction } from \"domains/global/actions\"\nimport Tooltip from \"@/src/components/tooltips\"\nimport PlayOptionsTooltip from \"./playOptionsTooltip\"\n\nconst MenuButton = styled(Flex).attrs({ padding: [1], role: \"button\" })`\n cursor: pointer;\n`\n\nconst Dropdown = styled(Flex).attrs({\n column: true,\n padding: [2],\n background: \"dropdown\",\n round: 1,\n overflow: { vertical: \"auto\" },\n margin: [2, 0, 0],\n width: 40,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\n\nconst PlayOptions = ({ target }) => {\n const dispatch = useDispatch()\n const [isOpen, toggle] = useToggle()\n\n const close = () => toggle(false)\n\n const onPlay = () => {\n dispatch(resetGlobalPauseAction({ forcePlay: false }))\n close()\n }\n\n const onPause = () => {\n dispatch(setGlobalPauseAction())\n close()\n }\n\n const onForcePlay = () => {\n dispatch(resetGlobalPauseAction({ forcePlay: true }))\n close()\n }\n\n return (\n <Fragment>\n {!isOpen ? (\n <Tooltip content={<PlayOptionsTooltip />} align=\"bottom\" plain>\n <MenuButton onClick={toggle} width=\"auto\">\n <Icon name=\"chevron_down\" color=\"text\" width=\"12px\" height=\"12px\" />\n </MenuButton>\n </Tooltip>\n ) : (\n <MenuButton onClick={toggle} width=\"auto\">\n <Icon name=\"chevron_down\" color=\"text\" width=\"12px\" height=\"12px\" />\n </MenuButton>\n )}\n {target.current && isOpen && (\n <Drop\n target={target.current}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n animation\n >\n <Dropdown>\n <MenuItem round={1} icon=\"playOutline\" onClick={onPlay}>\n Play\n </MenuItem>\n <MenuItem round={1} icon=\"pauseOutline\" onClick={onPause}>\n Pause\n </MenuItem>\n <MenuItem round={1} icon=\"forcePlayOutline\" onClick={onForcePlay}>\n Force Play\n </MenuItem>\n </Dropdown>\n </Drop>\n )}\n </Fragment>\n )\n}\n\nconst MemoizedPlayOptions = memo(PlayOptions)\n\nexport default MemoizedPlayOptions\n","import React, { useMemo, useRef } from \"react\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport {\n selectHasWindowFocus,\n selectStopUpdatesWhenFocusIsLost,\n selectGlobalPanAndZoom,\n selectGlobalPause,\n selectGlobalSelection,\n} from \"domains/global/selectors\"\nimport { ReduxDatePickerContainer } from \"components/date-picker\"\nimport Item from \"../item\"\nimport Container from \"./container\"\nimport PlayPausePill from \"./playPausePill\"\nimport PlayOptions from \"./playOptions\"\n\nconst tagging = \"global-view\"\n\nconst GlobalControls = () => {\n const ref = useRef()\n const hasWindowFocus = useSelector(selectHasWindowFocus)\n const stopUpdatesWhenFocusIsLost = useSelector(selectStopUpdatesWhenFocusIsLost)\n const globalPanAndZoom = useSelector(selectGlobalPanAndZoom)\n const hoveredX = useSelector(selectGlobalSelection)\n const globalPause = useSelector(selectGlobalPause)\n\n const isPlaying = useMemo(\n () =>\n Boolean(\n (hasWindowFocus || !stopUpdatesWhenFocusIsLost) &&\n !globalPanAndZoom &&\n !hoveredX &&\n !globalPause\n ),\n [hasWindowFocus, stopUpdatesWhenFocusIsLost, globalPanAndZoom, hoveredX, globalPause]\n )\n\n return (\n <Item hasBorder>\n <Container\n isPlaying={isPlaying}\n padding={[2, 2]}\n round\n height=\"100%\"\n alignItems=\"center\"\n gap={1}\n ref={ref}\n >\n <PlayPausePill isPlaying={isPlaying} isForcePlaying={!stopUpdatesWhenFocusIsLost} />\n <PlayOptions target={ref} />\n <ReduxDatePickerContainer isPlaying={isPlaying} tagging={tagging} />\n </Container>\n </Item>\n )\n}\n\nexport default GlobalControls\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst hollowColors = {\n warning: \"#FFF8E1\",\n error: \"#FFEBEF\",\n}\n\nconst StyledPill = styled(Flex).attrs(({ round = 999, hollow, background }) => ({\n padding: [0.5, 2],\n round,\n border: hollow ? { side: \"all\", color: background, size: \"1px\" } : false,\n}))`\n background: ${({ background, hollow }) => (hollow ? hollowColors[background] : background)};\n cursor: pointer;\n`\n\nexport default StyledPill\n","import React, { forwardRef } from \"react\"\nimport { TextMicro } from \"@netdata/netdata-ui\"\nimport StyledPill from \"./styled\"\n\nconst Pill = forwardRef(({ children, background, color, hollow, ...rest }, ref) => (\n <StyledPill background={background} hollow={hollow} ref={ref} {...rest}>\n <TextMicro color={hollow ? background : color} strong>\n {children}\n </TextMicro>\n </StyledPill>\n))\n\nexport default Pill\n","import React, { useMemo } from \"react\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { selectActiveAlarms } from \"domains/global/selectors\"\nimport Item from \"./item\"\nimport Pill from \"./pill\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nconst pillProps = {\n \"data-toggle\": \"modal\",\n \"data-target\": \"#alarmsModal\",\n}\n\nconst Alarms = () => {\n const activeAlarms = useSelector(selectActiveAlarms)\n\n const alarms = useMemo(() => (activeAlarms ? Object.values(activeAlarms.alarms) : []), [\n activeAlarms,\n ])\n\n const { critical, warning } = useMemo(\n () =>\n alarms.reduce(\n (acc, { status }) => {\n if (status === \"CRITICAL\") acc.critical = acc.critical + 1\n if (status === \"WARNING\") acc.warning = acc.warning + 1\n return acc\n },\n { critical: 0, warning: 0 }\n ),\n [alarms]\n )\n\n return (\n <Item icon=\"alarm\">\n <Tooltip\n content={\n critical\n ? `${critical} critical alert${critical.length > 1 ? \"s\" : \"\"}`\n : \"No critical alerts\"\n }\n align=\"bottom\"\n plain\n >\n <Pill background=\"error\" hollow {...pillProps}>\n {critical}\n </Pill>\n </Tooltip>\n <Tooltip\n content={\n warning ? `${warning} warning alert${warning.length > 1 ? \"s\" : \"\"}` : \"No warning alerts\"\n }\n align=\"bottom\"\n plain\n >\n <Pill background=\"warning\" hollow {...pillProps}>\n {warning}\n </Pill>\n </Tooltip>\n </Item>\n )\n}\n\nexport default Alarms\n","import React from \"react\"\nimport { Button, News as AgentNews } from \"@netdata/netdata-ui\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nconst News = () => {\n return (\n <AgentNews app=\"agent\">\n {({ toggle, upToDate }) => (\n <Tooltip content=\"News\" align=\"bottom\" plain>\n <Button\n data-testid=\"header-news-button\"\n themeType=\"dark\"\n name=\"news\"\n icon=\"insights\"\n flavour=\"borderless\"\n neutral={upToDate}\n warning={!upToDate}\n onClick={toggle}\n />\n </Tooltip>\n )}\n </AgentNews>\n )\n}\n\nexport default News\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Dropdown = styled(Flex).attrs({\n column: true,\n padding: [2],\n background: \"dropdown\",\n round: 1,\n overflow: { vertical: \"auto\" },\n margin: [2, 0, 0],\n width: 80,\n})`\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n`\n\nexport default Dropdown\n","import styled from \"styled-components\"\nimport { TextInput } from \"@netdata/netdata-ui\"\n\nconst SearchInput = styled(TextInput)`\n & input {\n background: transparent;\n }\n\n & > label {\n margin-bottom: 0;\n }\n`\nexport default SearchInput\n","import React, { forwardRef } from \"react\"\nimport SearchInput from \"./searchInput\"\n\nconst Search = forwardRef(({ value, onChange }, ref) => (\n <SearchInput inputRef={ref} value={value} onChange={onChange} placeholder=\"Search\" metaShrinked />\n))\n\nexport default Search\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Container = styled(Flex).attrs({\n column: true,\n padding: [2, 0, 0],\n overflow: { vertical: \"auto\" },\n height: { max: \"320px\" },\n})``\n\nexport default Container\n","import styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\n\nconst Wrapper = styled(Flex).attrs({\n justifyContent: \"between\",\n alignItems: \"center\",\n width: \"100%\",\n gap: 2,\n})``\n\nexport default Wrapper\n","import React, { useCallback } from \"react\"\nimport { Text } from \"@netdata/netdata-ui\"\nimport { MenuItem } from \"@/src/components/menus\"\nimport Wrapper from \"./wrapper\"\n\nconst OffsetItem = ({ name, offset, utc, onSelect }) => {\n const onClick = useCallback(() => onSelect(utc), [utc, onSelect])\n\n return (\n <MenuItem round={1} onClick={onClick} Wrapper={Wrapper}>\n <Text color=\"text\">{name}</Text>\n <Text color=\"textLite\" whiteSpace=\"nowrap\">\n UTC {offset}\n </Text>\n </MenuItem>\n )\n}\n\nexport default OffsetItem\n","export const timezones = [\n {\n value: \"Dateline Standard Time\",\n abbr: \"DST\",\n text: \"International Date Line West\",\n utc: [\"Etc/GMT+12\"],\n },\n {\n value: \"UTC-11\",\n abbr: \"U\",\n text: \"Coordinated Universal Time-11\",\n utc: [\"Etc/GMT+11\", \"Pacific/Midway\", \"Pacific/Niue\", \"Pacific/Pago_Pago\"],\n },\n {\n value: \"Hawaiian Standard Time\",\n abbr: \"HST\",\n text: \"Hawaii\",\n utc: [\n \"Etc/GMT+10\",\n \"Pacific/Honolulu\",\n \"Pacific/Johnston\",\n \"Pacific/Rarotonga\",\n \"Pacific/Tahiti\",\n ],\n },\n {\n value: \"Alaskan Standard Time\",\n abbr: \"AKDT\",\n text: \"Alaska\",\n utc: [\n \"America/Anchorage\",\n \"America/Juneau\",\n \"America/Nome\",\n \"America/Sitka\",\n \"America/Yakutat\",\n ],\n },\n {\n value: \"Pacific Standard Time (Mexico)\",\n abbr: \"PDT\",\n text: \"Baja California\",\n utc: [\"America/Santa_Isabel\"],\n },\n {\n value: \"Pacific Standard Time\",\n abbr: \"PST\",\n text: \"Pacific Time (US & Canada)\",\n utc: [\n \"America/Dawson\",\n \"America/Los_Angeles\",\n \"America/Tijuana\",\n \"America/Vancouver\",\n \"America/Whitehorse\",\n \"PST8PDT\",\n ],\n },\n {\n value: \"US Mountain Standard Time\",\n abbr: \"UMST\",\n text: \"Arizona\",\n utc: [\n \"America/Creston\",\n \"America/Dawson_Creek\",\n \"America/Hermosillo\",\n \"America/Phoenix\",\n \"Etc/GMT+7\",\n ],\n },\n {\n value: \"Mountain Standard Time (Mexico)\",\n abbr: \"MDT\",\n text: \"Chihuahua, La Paz, Mazatlan\",\n utc: [\"America/Chihuahua\", \"America/Mazatlan\"],\n },\n {\n value: \"Mountain Standard Time\",\n abbr: \"MDT\",\n text: \"Mountain Time (US & Canada)\",\n utc: [\n \"America/Boise\",\n \"America/Cambridge_Bay\",\n \"America/Denver\",\n \"America/Edmonton\",\n \"America/Inuvik\",\n \"America/Ojinaga\",\n \"America/Yellowknife\",\n \"MST7MDT\",\n ],\n },\n {\n value: \"Central America Standard Time\",\n abbr: \"CAST\",\n text: \"Central America\",\n utc: [\n \"America/Belize\",\n \"America/Costa_Rica\",\n \"America/El_Salvador\",\n \"America/Guatemala\",\n \"America/Managua\",\n \"America/Tegucigalpa\",\n \"Etc/GMT+6\",\n \"Pacific/Galapagos\",\n ],\n },\n {\n value: \"Central Standard Time\",\n abbr: \"CDT\",\n text: \"Central Time (US & Canada)\",\n utc: [\n \"America/Chicago\",\n \"America/Indiana/Knox\",\n \"America/Indiana/Tell_City\",\n \"America/Matamoros\",\n \"America/Menominee\",\n \"America/North_Dakota/Beulah\",\n \"America/North_Dakota/Center\",\n \"America/North_Dakota/New_Salem\",\n \"America/Rainy_River\",\n \"America/Rankin_Inlet\",\n \"America/Resolute\",\n \"America/Winnipeg\",\n \"CST6CDT\",\n ],\n },\n {\n value: \"Central Standard Time (Mexico)\",\n abbr: \"CDT\",\n text: \"Guadalajara, Mexico City, Monterrey\",\n utc: [\n \"America/Bahia_Banderas\",\n \"America/Cancun\",\n \"America/Merida\",\n \"America/Mexico_City\",\n \"America/Monterrey\",\n ],\n },\n {\n value: \"Canada Central Standard Time\",\n abbr: \"CCST\",\n text: \"Saskatchewan\",\n utc: [\"America/Regina\", \"America/Swift_Current\"],\n },\n {\n value: \"SA Pacific Standard Time\",\n abbr: \"SPST\",\n text: \"Bogota, Lima, Quito\",\n utc: [\n \"America/Bogota\",\n \"America/Cayman\",\n \"America/Coral_Harbour\",\n \"America/Eirunepe\",\n \"America/Guayaquil\",\n \"America/Jamaica\",\n \"America/Lima\",\n \"America/Panama\",\n \"America/Rio_Branco\",\n \"Etc/GMT+5\",\n ],\n },\n {\n value: \"Eastern Standard Time\",\n abbr: \"EDT\",\n text: \"Eastern Time (US & Canada)\",\n utc: [\n \"America/Detroit\",\n \"America/Havana\",\n \"America/Indiana/Petersburg\",\n \"America/Indiana/Vincennes\",\n \"America/Indiana/Winamac\",\n \"America/Iqaluit\",\n \"America/Kentucky/Monticello\",\n \"America/Louisville\",\n \"America/Montreal\",\n \"America/Nassau\",\n \"America/New_York\",\n \"America/Nipigon\",\n \"America/Pangnirtung\",\n \"America/Port-au-Prince\",\n \"America/Thunder_Bay\",\n \"America/Toronto\",\n \"EST5EDT\",\n ],\n },\n {\n value: \"US Eastern Standard Time\",\n abbr: \"UEDT\",\n text: \"Indiana (East)\",\n utc: [\"America/Indiana/Marengo\", \"America/Indiana/Vevay\", \"America/Indianapolis\"],\n },\n {\n value: \"Venezuela Standard Time\",\n abbr: \"VST\",\n text: \"Caracas\",\n utc: [\"America/Caracas\"],\n },\n {\n value: \"Paraguay Standard Time\",\n abbr: \"PYT\",\n text: \"Asuncion\",\n utc: [\"America/Asuncion\"],\n },\n {\n value: \"Atlantic Standard Time\",\n abbr: \"ADT\",\n text: \"Atlantic Time (Canada)\",\n utc: [\n \"America/Glace_Bay\",\n \"America/Goose_Bay\",\n \"America/Halifax\",\n \"America/Moncton\",\n \"America/Thule\",\n \"Atlantic/Bermuda\",\n ],\n },\n {\n value: \"Central Brazilian Standard Time\",\n abbr: \"CBST\",\n text: \"Cuiaba\",\n utc: [\"America/Campo_Grande\", \"America/Cuiaba\"],\n },\n {\n value: \"SA Western Standard Time\",\n abbr: \"SWST\",\n text: \"Georgetown, La Paz, Manaus, San Juan\",\n utc: [\n \"America/Anguilla\",\n \"America/Antigua\",\n \"America/Aruba\",\n \"America/Barbados\",\n \"America/Blanc-Sablon\",\n \"America/Boa_Vista\",\n \"America/Curacao\",\n \"America/Dominica\",\n \"America/Grand_Turk\",\n \"America/Grenada\",\n \"America/Guadeloupe\",\n \"America/Guyana\",\n \"America/Kralendijk\",\n \"America/La_Paz\",\n \"America/Lower_Princes\",\n \"America/Manaus\",\n \"America/Marigot\",\n \"America/Martinique\",\n \"America/Montserrat\",\n \"America/Port_of_Spain\",\n \"America/Porto_Velho\",\n \"America/Puerto_Rico\",\n \"America/Santo_Domingo\",\n \"America/St_Barthelemy\",\n \"America/St_Kitts\",\n \"America/St_Lucia\",\n \"America/St_Thomas\",\n \"America/St_Vincent\",\n \"America/Tortola\",\n \"Etc/GMT+4\",\n ],\n },\n {\n value: \"Pacific SA Standard Time\",\n abbr: \"PSST\",\n text: \"Santiago\",\n utc: [\"America/Santiago\", \"Antarctica/Palmer\"],\n },\n {\n value: \"Newfoundland Standard Time\",\n abbr: \"NDT\",\n text: \"Newfoundland\",\n utc: [\"America/St_Johns\"],\n },\n {\n value: \"E. South America Standard Time\",\n abbr: \"ESAST\",\n text: \"Brasilia\",\n utc: [\"America/Sao_Paulo\"],\n },\n {\n value: \"Argentina Standard Time\",\n abbr: \"AST\",\n text: \"Buenos Aires\",\n utc: [\n \"America/Argentina/La_Rioja\",\n \"America/Argentina/Rio_Gallegos\",\n \"America/Argentina/Salta\",\n \"America/Argentina/San_Juan\",\n \"America/Argentina/San_Luis\",\n \"America/Argentina/Tucuman\",\n \"America/Argentina/Ushuaia\",\n \"America/Buenos_Aires\",\n \"America/Catamarca\",\n \"America/Cordoba\",\n \"America/Jujuy\",\n \"America/Mendoza\",\n ],\n },\n {\n value: \"SA Eastern Standard Time\",\n abbr: \"SEST\",\n text: \"Cayenne, Fortaleza\",\n utc: [\n \"America/Araguaina\",\n \"America/Belem\",\n \"America/Cayenne\",\n \"America/Fortaleza\",\n \"America/Maceio\",\n \"America/Paramaribo\",\n \"America/Recife\",\n \"America/Santarem\",\n \"Antarctica/Rothera\",\n \"Atlantic/Stanley\",\n \"Etc/GMT+3\",\n ],\n },\n {\n value: \"Greenland Standard Time\",\n abbr: \"GDT\",\n text: \"Greenland\",\n utc: [\"America/Godthab\"],\n },\n {\n value: \"Montevideo Standard Time\",\n abbr: \"MST\",\n text: \"Montevideo\",\n utc: [\"America/Montevideo\"],\n },\n {\n value: \"Bahia Standard Time\",\n abbr: \"BST\",\n text: \"Salvador\",\n utc: [\"America/Bahia\"],\n },\n {\n value: \"UTC-02\",\n abbr: \"U\",\n text: \"Coordinated Universal Time-02\",\n utc: [\"America/Noronha\", \"Atlantic/South_Georgia\", \"Etc/GMT+2\"],\n },\n {\n value: \"Mid-Atlantic Standard Time\",\n abbr: \"MDT\",\n text: \"Mid-Atlantic - Old\",\n utc: [],\n },\n {\n value: \"Azores Standard Time\",\n abbr: \"ADT\",\n text: \"Azores\",\n utc: [\"America/Scoresbysund\", \"Atlantic/Azores\"],\n },\n {\n value: \"Cape Verde Standard Time\",\n abbr: \"CVST\",\n text: \"Cape Verde Is.\",\n utc: [\"Atlantic/Cape_Verde\", \"Etc/GMT+1\"],\n },\n {\n value: \"Morocco Standard Time\",\n abbr: \"MDT\",\n text: \"Casablanca\",\n utc: [\"Africa/Casablanca\", \"Africa/El_Aaiun\"],\n },\n {\n value: \"UTC\",\n abbr: \"UTC\",\n text: \"Coordinated Universal Time\",\n utc: [\"America/Danmarkshavn\", \"Etc/GMT\"],\n },\n {\n value: \"GMT Standard Time\",\n abbr: \"GMT\",\n text: \"Edinburgh, London\",\n utc: [\"Europe/Isle_of_Man\", \"Europe/Guernsey\", \"Europe/Jersey\", \"Europe/London\"],\n },\n {\n value: \"GMT Standard Time\",\n abbr: \"GDT\",\n text: \"Dublin, Lisbon\",\n utc: [\n \"Atlantic/Canary\",\n \"Atlantic/Faeroe\",\n \"Atlantic/Madeira\",\n \"Europe/Dublin\",\n \"Europe/Lisbon\",\n ],\n },\n {\n value: \"Greenwich Standard Time\",\n abbr: \"GST\",\n text: \"Monrovia, Reykjavik\",\n utc: [\n \"Africa/Abidjan\",\n \"Africa/Accra\",\n \"Africa/Bamako\",\n \"Africa/Banjul\",\n \"Africa/Bissau\",\n \"Africa/Conakry\",\n \"Africa/Dakar\",\n \"Africa/Freetown\",\n \"Africa/Lome\",\n \"Africa/Monrovia\",\n \"Africa/Nouakchott\",\n \"Africa/Ouagadougou\",\n \"Africa/Sao_Tome\",\n \"Atlantic/Reykjavik\",\n \"Atlantic/St_Helena\",\n ],\n },\n {\n value: \"W. Europe Standard Time\",\n abbr: \"WEDT\",\n text: \"Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna\",\n utc: [\n \"Arctic/Longyearbyen\",\n \"Europe/Amsterdam\",\n \"Europe/Andorra\",\n \"Europe/Berlin\",\n \"Europe/Busingen\",\n \"Europe/Gibraltar\",\n \"Europe/Luxembourg\",\n \"Europe/Malta\",\n \"Europe/Monaco\",\n \"Europe/Oslo\",\n \"Europe/Rome\",\n \"Europe/San_Marino\",\n \"Europe/Stockholm\",\n \"Europe/Vaduz\",\n \"Europe/Vatican\",\n \"Europe/Vienna\",\n \"Europe/Zurich\",\n ],\n },\n {\n value: \"Central Europe Standard Time\",\n abbr: \"CEDT\",\n text: \"Belgrade, Bratislava, Budapest, Ljubljana, Prague\",\n utc: [\n \"Europe/Belgrade\",\n \"Europe/Bratislava\",\n \"Europe/Budapest\",\n \"Europe/Ljubljana\",\n \"Europe/Podgorica\",\n \"Europe/Prague\",\n \"Europe/Tirane\",\n ],\n },\n {\n value: \"Romance Standard Time\",\n abbr: \"RDT\",\n text: \"Brussels, Copenhagen, Madrid, Paris\",\n utc: [\"Africa/Ceuta\", \"Europe/Brussels\", \"Europe/Copenhagen\", \"Europe/Madrid\", \"Europe/Paris\"],\n },\n {\n value: \"Central European Standard Time\",\n abbr: \"CEDT\",\n text: \"Sarajevo, Skopje, Warsaw, Zagreb\",\n utc: [\"Europe/Sarajevo\", \"Europe/Skopje\", \"Europe/Warsaw\", \"Europe/Zagreb\"],\n },\n {\n value: \"W. Central Africa Standard Time\",\n abbr: \"WCAST\",\n text: \"West Central Africa\",\n utc: [\n \"Africa/Algiers\",\n \"Africa/Bangui\",\n \"Africa/Brazzaville\",\n \"Africa/Douala\",\n \"Africa/Kinshasa\",\n \"Africa/Lagos\",\n \"Africa/Libreville\",\n \"Africa/Luanda\",\n \"Africa/Malabo\",\n \"Africa/Ndjamena\",\n \"Africa/Niamey\",\n \"Africa/Porto-Novo\",\n \"Africa/Tunis\",\n \"Etc/GMT-1\",\n ],\n },\n {\n value: \"Namibia Standard Time\",\n abbr: \"NST\",\n text: \"Windhoek\",\n utc: [\"Africa/Windhoek\"],\n },\n {\n value: \"GTB Standard Time\",\n abbr: \"GDT\",\n text: \"Athens, Bucharest\",\n utc: [\"Asia/Nicosia\", \"Europe/Athens\", \"Europe/Bucharest\", \"Europe/Chisinau\"],\n },\n {\n value: \"Middle East Standard Time\",\n abbr: \"MEDT\",\n text: \"Beirut\",\n utc: [\"Asia/Beirut\"],\n },\n {\n value: \"Egypt Standard Time\",\n abbr: \"EST\",\n text: \"Cairo\",\n utc: [\"Africa/Cairo\"],\n },\n {\n value: \"Syria Standard Time\",\n abbr: \"SDT\",\n text: \"Damascus\",\n utc: [\"Asia/Damascus\"],\n },\n {\n value: \"E. Europe Standard Time\",\n abbr: \"EEDT\",\n text: \"E. Europe\",\n utc: [\n \"Asia/Nicosia\",\n \"Europe/Athens\",\n \"Europe/Bucharest\",\n \"Europe/Chisinau\",\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Nicosia\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\",\n ],\n },\n {\n value: \"South Africa Standard Time\",\n abbr: \"SAST\",\n text: \"Harare, Pretoria\",\n utc: [\n \"Africa/Blantyre\",\n \"Africa/Bujumbura\",\n \"Africa/Gaborone\",\n \"Africa/Harare\",\n \"Africa/Johannesburg\",\n \"Africa/Kigali\",\n \"Africa/Lubumbashi\",\n \"Africa/Lusaka\",\n \"Africa/Maputo\",\n \"Africa/Maseru\",\n \"Africa/Mbabane\",\n \"Etc/GMT-2\",\n ],\n },\n {\n value: \"FLE Standard Time\",\n abbr: \"FDT\",\n text: \"Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius\",\n utc: [\n \"Europe/Helsinki\",\n \"Europe/Kiev\",\n \"Europe/Mariehamn\",\n \"Europe/Riga\",\n \"Europe/Sofia\",\n \"Europe/Tallinn\",\n \"Europe/Uzhgorod\",\n \"Europe/Vilnius\",\n \"Europe/Zaporozhye\",\n ],\n },\n {\n value: \"Turkey Standard Time\",\n abbr: \"TDT\",\n text: \"Istanbul\",\n utc: [\"Europe/Istanbul\"],\n },\n {\n value: \"Israel Standard Time\",\n abbr: \"JDT\",\n text: \"Jerusalem\",\n utc: [\"Asia/Jerusalem\"],\n },\n {\n value: \"Libya Standard Time\",\n abbr: \"LST\",\n text: \"Tripoli\",\n utc: [\"Africa/Tripoli\"],\n },\n {\n value: \"Jordan Standard Time\",\n abbr: \"JST\",\n text: \"Amman\",\n utc: [\"Asia/Amman\"],\n },\n {\n value: \"Arabic Standard Time\",\n abbr: \"AST\",\n text: \"Baghdad\",\n utc: [\"Asia/Baghdad\"],\n },\n {\n value: \"Kaliningrad Standard Time\",\n abbr: \"KST\",\n text: \"Kaliningrad\",\n utc: [\"Europe/Kaliningrad\"],\n },\n {\n value: \"Arab Standard Time\",\n abbr: \"AST\",\n text: \"Kuwait, Riyadh\",\n utc: [\"Asia/Aden\", \"Asia/Bahrain\", \"Asia/Kuwait\", \"Asia/Qatar\", \"Asia/Riyadh\"],\n },\n {\n value: \"E. Africa Standard Time\",\n abbr: \"EAST\",\n text: \"Nairobi\",\n utc: [\n \"Africa/Addis_Ababa\",\n \"Africa/Asmera\",\n \"Africa/Dar_es_Salaam\",\n \"Africa/Djibouti\",\n \"Africa/Juba\",\n \"Africa/Kampala\",\n \"Africa/Khartoum\",\n \"Africa/Mogadishu\",\n \"Africa/Nairobi\",\n \"Antarctica/Syowa\",\n \"Etc/GMT-3\",\n \"Indian/Antananarivo\",\n \"Indian/Comoro\",\n \"Indian/Mayotte\",\n ],\n },\n {\n value: \"Moscow Standard Time\",\n abbr: \"MSK\",\n text: \"Moscow, St. Petersburg, Volgograd, Minsk\",\n utc: [\"Europe/Kirov\", \"Europe/Moscow\", \"Europe/Simferopol\", \"Europe/Volgograd\", \"Europe/Minsk\"],\n },\n {\n value: \"Samara Time\",\n abbr: \"SAMT\",\n text: \"Samara, Ulyanovsk, Saratov\",\n utc: [\"Europe/Astrakhan\", \"Europe/Samara\", \"Europe/Ulyanovsk\"],\n },\n {\n value: \"Iran Standard Time\",\n abbr: \"IDT\",\n text: \"Tehran\",\n utc: [\"Asia/Tehran\"],\n },\n {\n value: \"Arabian Standard Time\",\n abbr: \"AST\",\n text: \"Abu Dhabi, Muscat\",\n utc: [\"Asia/Dubai\", \"Asia/Muscat\", \"Etc/GMT-4\"],\n },\n {\n value: \"Azerbaijan Standard Time\",\n abbr: \"ADT\",\n text: \"Baku\",\n utc: [\"Asia/Baku\"],\n },\n {\n value: \"Mauritius Standard Time\",\n abbr: \"MST\",\n text: \"Port Louis\",\n utc: [\"Indian/Mahe\", \"Indian/Mauritius\", \"Indian/Reunion\"],\n },\n {\n value: \"Georgian Standard Time\",\n abbr: \"GET\",\n text: \"Tbilisi\",\n utc: [\"Asia/Tbilisi\"],\n },\n {\n value: \"Caucasus Standard Time\",\n abbr: \"CST\",\n text: \"Yerevan\",\n utc: [\"Asia/Yerevan\"],\n },\n {\n value: \"Afghanistan Standard Time\",\n abbr: \"AST\",\n text: \"Kabul\",\n utc: [\"Asia/Kabul\"],\n },\n {\n value: \"West Asia Standard Time\",\n abbr: \"WAST\",\n text: \"Ashgabat, Tashkent\",\n utc: [\n \"Antarctica/Mawson\",\n \"Asia/Aqtau\",\n \"Asia/Aqtobe\",\n \"Asia/Ashgabat\",\n \"Asia/Dushanbe\",\n \"Asia/Oral\",\n \"Asia/Samarkand\",\n \"Asia/Tashkent\",\n \"Etc/GMT-5\",\n \"Indian/Kerguelen\",\n \"Indian/Maldives\",\n ],\n },\n {\n value: \"Yekaterinburg Time\",\n abbr: \"YEKT\",\n text: \"Yekaterinburg\",\n utc: [\"Asia/Yekaterinburg\"],\n },\n {\n value: \"Pakistan Standard Time\",\n abbr: \"PKT\",\n text: \"Islamabad, Karachi\",\n utc: [\"Asia/Karachi\"],\n },\n {\n value: \"India Standard Time\",\n abbr: \"IST\",\n text: \"Chennai, Kolkata, Mumbai, New Delhi\",\n utc: [\"Asia/Kolkata\"],\n },\n {\n value: \"Sri Lanka Standard Time\",\n abbr: \"SLST\",\n text: \"Sri Jayawardenepura\",\n utc: [\"Asia/Colombo\"],\n },\n {\n value: \"Nepal Standard Time\",\n abbr: \"NST\",\n text: \"Kathmandu\",\n utc: [\"Asia/Kathmandu\"],\n },\n {\n value: \"Central Asia Standard Time\",\n abbr: \"CAST\",\n text: \"Nur-Sultan (Astana)\",\n utc: [\n \"Antarctica/Vostok\",\n \"Asia/Almaty\",\n \"Asia/Bishkek\",\n \"Asia/Qyzylorda\",\n \"Asia/Urumqi\",\n \"Etc/GMT-6\",\n \"Indian/Chagos\",\n ],\n },\n {\n value: \"Bangladesh Standard Time\",\n abbr: \"BST\",\n text: \"Dhaka\",\n utc: [\"Asia/Dhaka\", \"Asia/Thimphu\"],\n },\n {\n value: \"Myanmar Standard Time\",\n abbr: \"MST\",\n text: \"Yangon (Rangoon)\",\n utc: [\"Asia/Rangoon\", \"Indian/Cocos\"],\n },\n {\n value: \"SE Asia Standard Time\",\n abbr: \"SAST\",\n text: \"Bangkok, Hanoi, Jakarta\",\n utc: [\n \"Antarctica/Davis\",\n \"Asia/Bangkok\",\n \"Asia/Hovd\",\n \"Asia/Jakarta\",\n \"Asia/Phnom_Penh\",\n \"Asia/Pontianak\",\n \"Asia/Saigon\",\n \"Asia/Vientiane\",\n \"Etc/GMT-7\",\n \"Indian/Christmas\",\n ],\n },\n {\n value: \"N. Central Asia Standard Time\",\n abbr: \"NCAST\",\n text: \"Novosibirsk\",\n utc: [\"Asia/Novokuznetsk\", \"Asia/Novosibirsk\", \"Asia/Omsk\"],\n },\n {\n value: \"China Standard Time\",\n abbr: \"CST\",\n text: \"Beijing, Chongqing, Hong Kong, Urumqi\",\n utc: [\"Asia/Hong_Kong\", \"Asia/Macau\", \"Asia/Shanghai\"],\n },\n {\n value: \"North Asia Standard Time\",\n abbr: \"NAST\",\n text: \"Krasnoyarsk\",\n utc: [\"Asia/Krasnoyarsk\"],\n },\n {\n value: \"Singapore Standard Time\",\n abbr: \"MPST\",\n text: \"Kuala Lumpur, Singapore\",\n utc: [\n \"Asia/Brunei\",\n \"Asia/Kuala_Lumpur\",\n \"Asia/Kuching\",\n \"Asia/Makassar\",\n \"Asia/Manila\",\n \"Asia/Singapore\",\n \"Etc/GMT-8\",\n ],\n },\n {\n value: \"W. Australia Standard Time\",\n abbr: \"WAST\",\n text: \"Perth\",\n utc: [\"Antarctica/Casey\", \"Australia/Perth\"],\n },\n {\n value: \"Taipei Standard Time\",\n abbr: \"TST\",\n text: \"Taipei\",\n utc: [\"Asia/Taipei\"],\n },\n {\n value: \"Ulaanbaatar Standard Time\",\n abbr: \"UST\",\n text: \"Ulaanbaatar\",\n utc: [\"Asia/Choibalsan\", \"Asia/Ulaanbaatar\"],\n },\n {\n value: \"North Asia East Standard Time\",\n abbr: \"NAEST\",\n text: \"Irkutsk\",\n utc: [\"Asia/Irkutsk\"],\n },\n {\n value: \"Japan Standard Time\",\n abbr: \"JST\",\n text: \"Osaka, Sapporo, Tokyo\",\n utc: [\"Asia/Dili\", \"Asia/Jayapura\", \"Asia/Tokyo\", \"Etc/GMT-9\", \"Pacific/Palau\"],\n },\n {\n value: \"Korea Standard Time\",\n abbr: \"KST\",\n text: \"Seoul\",\n utc: [\"Asia/Pyongyang\", \"Asia/Seoul\"],\n },\n {\n value: \"Cen. Australia Standard Time\",\n abbr: \"CAST\",\n text: \"Adelaide\",\n utc: [\"Australia/Adelaide\", \"Australia/Broken_Hill\"],\n },\n {\n value: \"AUS Central Standard Time\",\n abbr: \"ACST\",\n text: \"Darwin\",\n utc: [\"Australia/Darwin\"],\n },\n {\n value: \"E. Australia Standard Time\",\n abbr: \"EAST\",\n text: \"Brisbane\",\n utc: [\"Australia/Brisbane\", \"Australia/Lindeman\"],\n },\n {\n value: \"AUS Eastern Standard Time\",\n abbr: \"AEST\",\n text: \"Canberra, Melbourne, Sydney\",\n utc: [\"Australia/Melbourne\", \"Australia/Sydney\"],\n },\n {\n value: \"West Pacific Standard Time\",\n abbr: \"WPST\",\n text: \"Guam, Port Moresby\",\n utc: [\n \"Antarctica/DumontDUrville\",\n \"Etc/GMT-10\",\n \"Pacific/Guam\",\n \"Pacific/Port_Moresby\",\n \"Pacific/Saipan\",\n \"Pacific/Truk\",\n ],\n },\n {\n value: \"Tasmania Standard Time\",\n abbr: \"TST\",\n text: \"Hobart\",\n utc: [\"Australia/Currie\", \"Australia/Hobart\"],\n },\n {\n value: \"Yakutsk Standard Time\",\n abbr: \"YST\",\n text: \"Yakutsk\",\n utc: [\"Asia/Chita\", \"Asia/Khandyga\", \"Asia/Yakutsk\"],\n },\n {\n value: \"Central Pacific Standard Time\",\n abbr: \"CPST\",\n text: \"Solomon Is., New Caledonia\",\n utc: [\n \"Antarctica/Macquarie\",\n \"Etc/GMT-11\",\n \"Pacific/Efate\",\n \"Pacific/Guadalcanal\",\n \"Pacific/Kosrae\",\n \"Pacific/Noumea\",\n \"Pacific/Ponape\",\n ],\n },\n {\n value: \"Vladivostok Standard Time\",\n abbr: \"VST\",\n text: \"Vladivostok\",\n utc: [\"Asia/Sakhalin\", \"Asia/Ust-Nera\", \"Asia/Vladivostok\"],\n },\n {\n value: \"New Zealand Standard Time\",\n abbr: \"NZST\",\n text: \"Auckland, Wellington\",\n utc: [\"Antarctica/McMurdo\", \"Pacific/Auckland\"],\n },\n {\n value: \"UTC+12\",\n abbr: \"U\",\n text: \"Coordinated Universal Time+12\",\n utc: [\n \"Etc/GMT-12\",\n \"Pacific/Funafuti\",\n \"Pacific/Kwajalein\",\n \"Pacific/Majuro\",\n \"Pacific/Nauru\",\n \"Pacific/Tarawa\",\n \"Pacific/Wake\",\n \"Pacific/Wallis\",\n ],\n },\n {\n value: \"Fiji Standard Time\",\n abbr: \"FST\",\n text: \"Fiji\",\n utc: [\"Pacific/Fiji\"],\n },\n {\n value: \"Magadan Standard Time\",\n abbr: \"MST\",\n text: \"Magadan\",\n utc: [\"Asia/Anadyr\", \"Asia/Kamchatka\", \"Asia/Magadan\", \"Asia/Srednekolymsk\"],\n },\n {\n value: \"Kamchatka Standard Time\",\n abbr: \"KDT\",\n text: \"Petropavlovsk-Kamchatsky - Old\",\n utc: [\"Asia/Kamchatka\"],\n },\n {\n value: \"Tonga Standard Time\",\n abbr: \"TST\",\n text: \"Nuku'alofa\",\n utc: [\"Etc/GMT-13\", \"Pacific/Enderbury\", \"Pacific/Fakaofo\", \"Pacific/Tongatapu\"],\n },\n {\n value: \"Samoa Standard Time\",\n abbr: \"SST\",\n text: \"Samoa\",\n utc: [\"Pacific/Apia\"],\n },\n]\n","import { timezones } from \"./timezones\"\n\nconst digitizeOffset = parsedOffset => {\n if (!parsedOffset) return \"+0\"\n const splitOffset = parsedOffset.split(\":\")\n return splitOffset.length > 1\n ? `${splitOffset[0]}${(splitOffset[1] / 60).toString().substr(1)}`\n : splitOffset[0]\n}\n\nconst normalizeOffset = parsedOffset => (parsedOffset ? parsedOffset.replace(\"−\", \"-\") : \"\")\n\nconst now = new Date()\nexport const timezoneList = () => {\n const memoized = {}\n return timezones.reduce((acc, timezone) => {\n const { utc } = timezone\n\n try {\n // We use 'fr' locale because it is the only one that returns back the UTC offset (dd/mm/yyyy, UTC-x) \n // so we can parse it later and digitize it.\n const dateString = new Intl.DateTimeFormat(\"fr\", {\n timeZone: utc[0],\n timeZoneName: \"short\",\n }).format(now)\n\n const [parsedOffset] = dateString.match(/[−+].+/) || []\n const normalizedOffset = normalizeOffset(parsedOffset)\n\n if (memoized[normalizedOffset])\n return acc.concat({ ...timezone, offset: memoized[normalizedOffset] })\n\n const digitizedOffset = digitizeOffset(normalizedOffset)\n\n memoized[normalizedOffset] = digitizedOffset\n return acc.concat({ ...timezone, offset: digitizedOffset })\n } catch (e) {\n return acc\n }\n }, [])\n}\n\nexport const timezonesById = timezones =>\n timezones.reduce((acc, { utc, ...timezone }) => {\n utc.forEach(item => (acc[item] = { ...timezone, utc: item }))\n return acc\n }, {})\n\nexport const getDefaultTimezone = () => {\n const dateFormat = new Intl.DateTimeFormat(\"default\", {})\n const usedOptions = dateFormat.resolvedOptions()\n return usedOptions\n}\n","import React, { useRef, useState, useEffect, useMemo, useCallback } from \"react\"\nimport { useToggle } from \"react-use\"\nimport { Drop, Flex, Text, Icon } from \"@netdata/netdata-ui\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { setOptionAction } from \"@/src/domains/global/actions\"\nimport { selectTimezoneSetting } from \"domains/global/selectors\"\nimport { MenuItem } from \"@/src/components/menus\"\nimport Item from \"../item\"\nimport Dropdown from \"./dropdown\"\nimport Search from \"./search\"\nimport Container from \"./container\"\nimport Wrapper from \"./wrapper\"\nimport OffsetItem from \"./offsetItem\"\nimport { getDefaultTimezone, timezoneList, timezonesById } from \"./utils\"\nimport { getHashParams } from \"utils/hash-utils\"\n\nconst timezones = timezoneList().sort((a, b) => a.offset - b.offset)\nconst byId = timezonesById(timezones)\n\nconst getTimezone = (selectedTimezone, timezoneHash) => {\n const timezone = timezoneHash\n ? timezoneHash\n : selectedTimezone === \"default\"\n ? getDefaultTimezone().timeZone\n : selectedTimezone\n\n return byId[timezone in byId ? timezone : getDefaultTimezone().timeZone] || {}\n}\n\nconst Timezone = () => {\n const [value, setValue] = useState(\"\")\n const [isOpen, toggle] = useToggle()\n\n const ref = useRef()\n const inputRef = useRef()\n\n const { updateUtcParam } = window.urlOptions\n\n useEffect(() => {\n if (!inputRef.current || !isOpen) return\n inputRef.current.focus()\n }, [isOpen])\n\n const dispatch = useDispatch()\n const selectedTimezone = useSelector(selectTimezoneSetting)\n\n const selectedOffset = useMemo(() => {\n const { utc: timezoneHash = \"\" } = getHashParams()\n const { offset = \"\", utc = \"\" } = getTimezone(selectedTimezone, timezoneHash)\n\n if (timezoneHash !== utc) updateUtcParam(utc)\n if (selectedTimezone !== utc) dispatch(setOptionAction({ key: \"timezone\", value: utc }))\n\n dispatch(setOptionAction({ key: \"utcOffset\", value: parseFloat(offset) }))\n\n return offset\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedTimezone])\n\n const zones = useMemo(() => {\n if (!value) return timezones\n return timezones.filter(\n ({ text, offset }) =>\n text.toUpperCase().includes(value.toUpperCase()) || offset.includes(value)\n )\n }, [value])\n\n const close = () => {\n toggle(false)\n setValue(\"\")\n }\n\n const onSelect = useCallback(utc => {\n updateUtcParam(utc)\n dispatch(setOptionAction({ key: \"timezone\", value: utc }))\n close()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const onChange = useCallback(e => setValue(e.target.value), [])\n\n return (\n <Item hasBorder>\n <MenuItem round={1} onClick={toggle} ref={ref} Wrapper={Wrapper}>\n <Flex gap={1}>\n <Text color=\"textLite\" whiteSpace=\"nowrap\">\n UTC {selectedOffset}\n </Text>\n </Flex>\n <Icon name=\"chevron_down\" color=\"text\" width=\"12px\" height=\"12px\" />\n </MenuItem>\n {ref.current && isOpen && (\n <Drop\n target={ref.current}\n align={{ top: \"bottom\", left: \"left\" }}\n onEsc={close}\n onClickOutside={close}\n animation\n >\n <Dropdown>\n <Search value={value} onChange={onChange} ref={inputRef} />\n <Container>\n {zones.map(({ text, offset, utc }) => (\n <OffsetItem\n key={text}\n name={text}\n offset={offset}\n utc={utc[0]}\n onSelect={onSelect}\n />\n ))}\n </Container>\n </Dropdown>\n </Drop>\n )}\n </Item>\n )\n}\n\nexport default Timezone\n","import React, { useCallback, useEffect, useState, useRef } from \"react\"\nimport styled from \"styled-components\"\nimport { useSelector, useDispatch } from \"store/redux-separate-context\"\nimport { useLocalStorage } from \"react-use\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { sendToChildIframe, useListenToPostMessage } from \"utils/post-message\"\nimport { getIframeSrc, NETDATA_REGISTRY_SERVER } from \"utils/utils\"\nimport useUserNodeAccessMessage from \"hooks/use-user-node-access\"\nimport { selectRegistry, selectCloudBaseUrl } from \"domains/global/selectors\"\nimport { LOCAL_STORAGE_NEEDS_SYNC } from \"domains/dashboard/sagas\"\nimport { setOfflineAction } from \"@/src/domains/dashboard/actions\"\nimport { SIGN_IN_IFRAME_ID } from \"components/header/constants\"\n\nconst IframeContainer = styled(Flex).attrs({ position: \"absolute\" })`\n display: none;\n`\nconst Iframe = ({ signedIn }) => {\n const [rendered, setRendered] = useState(false)\n const signInMsg = useRef()\n const ref = useRef()\n\n const [lsValue, , removeLsValue] = useLocalStorage(LOCAL_STORAGE_NEEDS_SYNC)\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n const registry = useSelector(selectRegistry)\n\n const dispatch = useDispatch()\n\n const { origin, pathname } = window.location\n const nameParam = encodeURIComponent(registry.hostname)\n const originParam = encodeURIComponent(origin + pathname)\n\n const signInIframeUrl = getIframeSrc(\n cloudBaseURL,\n `sign-in?id=${registry.machineGuid}&name=${nameParam}&origin=${originParam}`\n )\n\n useListenToPostMessage(\"hello-from-sign-in\", msg => {\n signInMsg.current = msg\n })\n\n useUserNodeAccessMessage()\n\n const onLoad = useCallback(() => {\n setRendered(true)\n setTimeout(() => dispatch(setOfflineAction({ offline: signInMsg.current === undefined })), 500)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n useEffect(() => {\n const handler = e => {\n if (!e?.target) return\n if (e.target.src === signInIframeUrl && !rendered) onLoad()\n }\n\n window.addEventListener(\"DOMFrameContentLoaded\", handler)\n return () => window.removeEventListener(\"DOMFrameContentLoaded\", handler)\n }, [signInIframeUrl, rendered, onLoad])\n\n useEffect(() => {\n if (!signedIn || !ref.current) return\n if (!registry.registryServer || registry.registryServer === NETDATA_REGISTRY_SERVER) return\n if (!lsValue) return\n\n removeLsValue()\n\n const { registryMachinesArray } = registry\n if (registryMachinesArray && registryMachinesArray.length > 0) {\n sendToChildIframe(ref.current, {\n type: \"synced-private-registry\",\n payload: registryMachinesArray,\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [signedIn, registry, lsValue])\n\n return (\n <IframeContainer as=\"iframe\" id={SIGN_IN_IFRAME_ID} src={signInIframeUrl} onLoad={onLoad} />\n )\n}\n\nexport default Iframe\n","import { useCallback, useState } from \"react\"\nimport { useLocalStorage } from \"react-use\"\nimport { useDispatch } from \"react-redux\"\nimport { useListenToPostMessage } from \"@/src/utils/post-message\"\nimport { isSignedInAction } from \"@/src/domains/dashboard/actions\"\n\nconst useCheckSignInStatus = () => {\n const dispatch = useDispatch()\n const [value, setValue] = useLocalStorage(\"has-sign-in-history\")\n const [hasSignedInBefore, setHasSignedInBefore] = useState(value)\n\n const onMessage = useCallback(isNew => {\n if (isNew) {\n setHasSignedInBefore(isNew)\n setValue(isNew)\n }\n dispatch(isSignedInAction({ isSignedIn: isNew }))\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const [signedIn] = useListenToPostMessage(\"is-signed-in\", onMessage)\n\n return [signedIn, hasSignedInBefore]\n}\n\nexport default useCheckSignInStatus\n","import React from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { Button } from \"@netdata/netdata-ui\"\nimport SignInButton from \"components/auth/signIn\"\nimport SignInIframe from \"components/auth/signIn/iframe\"\nimport useCheckSignInStatus from \"components/auth/signIn/useCheckSignInStatus\"\nimport { selectIsCloudEnabled } from \"domains/global/selectors\"\nimport Tooltip from \"@/src/components/tooltips\"\n\nconst SignIn = () => {\n const [signedIn] = useCheckSignInStatus()\n const cloudEnabled = useSelector(selectIsCloudEnabled)\n\n return (\n cloudEnabled && (\n <Tooltip\n content=\"Sign in to Netdata to monitor all your nodes at once, have composite charts, custom dashboards, use intelligent features and more\"\n align=\"bottom\"\n plain\n >\n <div>\n <SignInIframe signedIn={signedIn} />\n {!signedIn && (\n <SignInButton utmParameters={{ content: \"topbar\" }}>\n {({ isRegistry, link, offline, onSignIn }) => (\n <Button\n data-testid=\"header-signin\"\n label=\"Sign in\"\n disabled={offline}\n {...(isRegistry ? { as: \"a\", href: link } : { onClick: onSignIn })}\n />\n )}\n </SignInButton>\n )}\n </div>\n </Tooltip>\n )\n )\n}\n\nexport default SignIn\n","import React from \"react\"\nimport styled from \"styled-components\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport Node from \"./node\"\nimport Options from \"./options\"\nimport ProtoBuf from \"./protoBuf\"\nimport Version from \"./version\"\nimport GlobalControls from \"./globalControls\"\nimport Alarms from \"./alarms\"\nimport News from \"./news\"\nimport Timezone from \"./timezone\"\nimport SignIn from \"./signIn\"\nimport { CloudConnectionStatus } from \"./ACLK\"\nconst Wrapper = styled(Flex).attrs({\n as: \"header\",\n position: \"relative\",\n justifyContent: \"between\",\n background: \"panel\",\n zIndex: 20,\n width: \"100%\",\n padding: [2, 4, 2, 4],\n})`\n pointer-events: all;\n`\n\nconst Header = () => (\n <Wrapper>\n <Flex alignItems=\"center\" gap={3}>\n <Node />\n </Flex>\n <Flex justifyContent=\"end\" alignItems=\"center\" gap={3}>\n <CloudConnectionStatus />\n <Version />\n <News />\n <Options />\n <ProtoBuf />\n <Timezone />\n <GlobalControls />\n <Alarms />\n <SignIn />\n </Flex>\n </Wrapper>\n)\n\nexport default Header\n","import styled from \"styled-components\"\nimport { Button } from \"@netdata/netdata-ui\"\n\nconst ExpandButton = styled(Button)`\n&& {\n > .button-icon {\n width: 6px;\n height: 9px;\n }\n`\nexport default ExpandButton\n","import React from \"react\"\nimport { useSelector } from \"react-redux\"\nimport { Flex } from \"@netdata/netdata-ui\"\nimport { selectCloudBaseUrl } from \"domains/global/selectors\"\nimport { getIframeSrc } from \"@/src/utils\"\n\n\nconst SignOut = ({ flavour = \"default\", ...rest }) => {\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n\n return (\n <Flex\n alignItems=\"center\"\n as=\"iframe\"\n src={`${getIframeSrc(cloudBaseURL, \"sign-out\")}?type=${flavour}`}\n border={{ side: \"all\", size: \"0px\" }}\n width={{ max: \"128px\" }}\n height={{ max: \"40px\" }}\n {...rest}\n />\n )\n}\n\nexport default SignOut\n","import React, { useMemo } from \"react\"\nimport { ThemeProvider } from \"styled-components\"\nimport { createSelector } from \"reselect\"\nimport { useToggle } from \"react-use\"\nimport { Flex, Button, DarkTheme, Text, Layer } from \"@netdata/netdata-ui\"\nimport { useSelector } from \"store/redux-separate-context\"\nimport { MenuItem } from \"components/menus\"\nimport SignOut from \"components/auth/signOut\"\nimport SignIn from \"components/auth/signIn\"\n\nconst SignInItem = () => {\n const onClick = (e, link) => {\n e.stopPropagation()\n window.open(link, \"_blank\", \"noopener,noreferrer\")\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.open(link, \"_blank\")\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 prefrenceID = migrationModalPromoInfo?.tickBoxOption.prefrenceID || \"\"\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 prefrenceID is changing.\n * For that reason we acces the localStorage directly\n */\n const [, savePromoRemindMeSelection] = useLocalStorage(prefrenceID)\n const hasPromoSelectionSaved = localStorage.getItem(prefrenceID)\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\"\n\n// support legacy code\nwindow.Ps = Ps\n\nconst App: React.FC = () => {\n const store = useStore()\n useEffect(() => {\n // todo\n // @ts-ignore\n window.NETDATA.alarms = {}\n // @ts-ignore\n window.NETDATA.pause = callback => {\n callback()\n }\n netdataCallback(store)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n const [refreshHelper, setRefreshHelper] = useState<number>()\n // this is temporary, we will not need it when main.js will be fully refactored\n const haveDOMReadyForParsing = refreshHelper !== undefined\n // a workaround - each time parseDom is run, the portals are rerendered\n const parseDom = useRef(() => {\n setRefreshHelper(Math.random())\n })\n\n useEffect(() => {\n if (haveDOMReadyForParsing) {\n const loadOverlay = document.getElementById(\"loadOverlay\")\n if (loadOverlay) {\n loadOverlay.style.display = \"none\"\n }\n }\n }, [haveDOMReadyForParsing])\n\n const { localeDateString, localeTimeString } = useDateTime()\n useEffect(() => {\n updateLocaleFunctions({\n localeDateString,\n localeTimeString,\n })\n }, [localeDateString, localeTimeString])\n\n useRegistry(true)\n useAlarms(true)\n useInfo(true)\n\n const [hasFetchDependencies, setHasFetchDependencies] = useState(false)\n useLayoutEffect(() => {\n Promise.all([\n loadCss(serverStatic + window.NETDATA.themes.current.bootstrap_css),\n loadCss(serverStatic + window.NETDATA.themes.current.dashboard_css),\n ]).then(() => {\n setHasFetchDependencies(true)\n })\n }, [])\n\n const chartsMetadata = useChartsMetadata()\n const cloudBaseURL = useSelector(selectCloudBaseUrl)\n\n // @ts-ignore\n window.NETDATA.parseDom = parseDom.current\n\n const hasFetchedInfo = useSelector(selectHasFetchedInfo)\n const theme = useSelector(selectTheme)\n useAlarmFromUrl()\n\n return (\n <ThemeProvider theme={mapTheme(theme)}>\n {hasFetchDependencies && (\n // this needs to render after dynamic css files are loaded, otherwise netdata-ui\n // styling will have smaller priority than bootstrap css\n <NotificationsContainer />\n )}\n {chartsMetadata && cloudBaseURL && hasFetchedInfo && haveDOMReadyForParsing && (\n <Layout printMode={isPrintMode}>\n <MigrationManager />\n {hasFetchDependencies && (\n <>\n <Portals key={refreshHelper} />\n <SidebarSocialMediaPortal>\n <SidebarSocialMedia />\n </SidebarSocialMediaPortal>\n {isPrintMode && <PrintModal />}\n </>\n )}\n </Layout>\n )}\n </ThemeProvider>\n )\n}\n\nexport default App\n","import { useEffect } from \"react\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { fetchHelloAction } from \"domains/global/actions\"\nimport { selectRegistry } from \"domains/global/selectors\"\n\nexport const useRegistry = (shouldUseRegistry: boolean) => {\n const registry = useSelector(selectRegistry)\n\n const dispatch = useDispatch()\n useEffect(() => {\n if (shouldUseRegistry && !registry.isFetchingHello && !registry.hasFetchedHello\n && !registry.isHelloCallError\n ) {\n dispatch(fetchHelloAction.request({\n serverDefault,\n }))\n }\n }, [dispatch, registry, shouldUseRegistry])\n}\n","import { useEffect } from \"react\"\n\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { startAlarmsAction } from \"domains/global/actions\"\nimport { selectHasStartedAlarms } from \"domains/global/selectors\"\nimport { serverDefault } from \"utils/server-detection\"\n\nexport const useAlarms = (shouldUseAlarms: boolean) => {\n const hasStartedAlarms = useSelector(selectHasStartedAlarms)\n\n const dispatch = useDispatch()\n useEffect(() => {\n if (shouldUseAlarms && !hasStartedAlarms) {\n dispatch(startAlarmsAction({\n serverDefault,\n }))\n }\n }, [dispatch, hasStartedAlarms, shouldUseAlarms])\n}\n","import { useEffect } from \"react\"\nimport { useDispatch, useSelector } from \"store/redux-separate-context\"\nimport { fetchInfoAction } from \"domains/chart/actions\"\nimport { selectRegistry } from \"domains/global/selectors\"\n\nexport const useInfo = (shouldUseInfo: boolean) => {\n const registry = useSelector(selectRegistry)\n const hasStartedInfo = registry?.hasStartedInfo || false\n const dispatch = useDispatch()\n useEffect(() => {\n if (shouldUseInfo && !hasStartedInfo) {\n dispatch(fetchInfoAction.request({\n poll: false,\n }))\n }\n }, [dispatch, hasStartedInfo, shouldUseInfo])\n}\n","import { useHttp } from \"hooks/use-http\"\nimport { serverDefault } from \"utils/server-detection\"\nimport { ChartsMetadata } from \"domains/global/types\"\n\nexport const useChartsMetadata = () => {\n const [chartsMetadata] = useHttp<ChartsMetadata>(`${serverDefault}api/v1/charts`)\n return chartsMetadata\n}\n","import { useMount } from \"react-use\"\n\nimport { useDispatch } from \"store/redux-separate-context\"\nimport { getHashParams } from \"utils/hash-utils\"\nimport { setAlarmAction, setGlobalPanAndZoomAction } from \"domains/global/actions\"\nimport { alarmStatuses } from \"domains/global/constants\"\n\nexport default () => {\n const dispatch = useDispatch()\n useMount(() => {\n const params = getHashParams()\n const alarmWhen = params[\"alarm_when\"]\n if (alarmWhen) {\n const alarmTime = Number(alarmWhen)\n\n const alarmStatus = params[\"alarm_status\"]\n const alarmChart = params[\"alarm_chart\"]\n const alarmValue = params[\"alarm_value\"]\n if (!alarmStatuses.includes(alarmStatus) || !alarmChart || !alarmValue) {\n return\n }\n\n dispatch(setAlarmAction({\n alarm: {\n chartId: alarmChart,\n status: alarmStatus,\n value: alarmValue,\n when: alarmTime,\n },\n }))\n const PADDING = 1000 * 60 * 5\n dispatch(setGlobalPanAndZoomAction({\n after: alarmTime * 1000 - PADDING,\n before: alarmTime * 1000 + PADDING,\n }))\n }\n })\n}\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Provider } from \"react-redux\"\n\nimport { store } from \"store\"\n\n// resolved in craco.config\n// @ts-ignore\nimport App from \"App\"\n\nimport \"./index.css\"\n\n// todo for static-dashboard:\n// 1) wait for the whole page to load, then render\n// 2) when the whole page is loaded, check window.NETDATA.options set by user and override initial\n// options settings\n\nReactDOM.render(\n <Provider store={store}>\n <App />\n </Provider>,\n document.getElementById(\"root\")\n)\n","/*! @license Copyright 2017 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */\n// SPDX-License-Identifier: MIT\n!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var e;e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this,e.Dygraph=t()}}(function(){return function t(e,a,i){function n(o,s){if(!a[o]){if(!e[o]){var l=\"function\"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var h=new Error(\"Cannot find module '\"+o+\"'\");throw h.code=\"MODULE_NOT_FOUND\",h}var u=a[o]={exports:{}};e[o][0].call(u.exports,function(t){var a=e[o][1][t];return n(a||t)},u,u.exports,t,e,a,i)}return a[o].exports}for(var r=\"function\"==typeof require&&require,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(t,e,a){function i(){throw new Error(\"setTimeout has not been defined\")}function n(){throw new Error(\"clearTimeout has not been defined\")}function r(t){if(d===setTimeout)return setTimeout(t,0);if((d===i||!d)&&setTimeout)return d=setTimeout,setTimeout(t,0);try{return d(t,0)}catch(e){try{return d.call(null,t,0)}catch(e){return d.call(this,t,0)}}}function o(t){if(c===clearTimeout)return clearTimeout(t);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function s(){v&&g&&(v=!1,g.length?f=g.concat(f):_=-1,f.length&&l())}function l(){if(!v){var t=r(s);v=!0;for(var e=f.length;e;){for(g=f,f=[];++_<e;)g&&g[_].run();_=-1,e=f.length}g=null,v=!1,o(t)}}function h(t,e){this.fun=t,this.array=e}function u(){}var d,c,p=e.exports={};!function(){try{d=\"function\"==typeof setTimeout?setTimeout:i}catch(t){d=i}try{c=\"function\"==typeof clearTimeout?clearTimeout:n}catch(t){c=n}}();var g,f=[],v=!1,_=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)e[a-1]=arguments[a];f.push(new h(t,e)),1!==f.length||v||r(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},p.title=\"browser\",p.browser=!0,p.env={},p.argv=[],p.version=\"\",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.prependListener=u,p.prependOnceListener=u,p.listeners=function(t){return[]},p.binding=function(t){throw new Error(\"process.binding is not supported\")},p.cwd=function(){return\"/\"},p.chdir=function(t){throw new Error(\"process.chdir is not supported\")},p.umask=function(){return 0}},{}],2:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./bars\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i,n,r,o=[],s=a.get(\"logscale\"),l=0;l<t.length;l++)i=t[l][0],r=t[l][e],s&&null!==r&&(r[0]<=0||r[1]<=0||r[2]<=0)&&(r=null),null!==r?(n=r[1],null===n||isNaN(n)?o.push([i,n,[n,n]]):o.push([i,n,[r[0],r[2]]])):o.push([i,null,[null,null]]);return o},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s,l,h,u=[];for(n=0,o=0,r=0,s=0,l=0;l<t.length;l++){if(i=t[l][1],h=t[l][2],u[l]=t[l],null===i||isNaN(i)||(n+=h[0],o+=i,r+=h[1],s+=1),l-e>=0){var d=t[l-e];null===d[1]||isNaN(d[1])||(n-=d[2][0],o-=d[1],r-=d[2][1],s-=1)}u[l]=s?[t[l][0],1*o/s,[1*n/s,1*r/s]]:[t[l][0],null,[null,null]]}return u},a.default=r,e.exports=a.default},{\"./bars\":5}],3:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./bars\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i,n,r,o,s=[],l=a.get(\"sigma\"),h=a.get(\"logscale\"),u=0;u<t.length;u++)i=t[u][0],o=t[u][e],h&&null!==o&&(o[0]<=0||o[0]-l*o[1]<=0)&&(o=null),null!==o?(n=o[0],null===n||isNaN(n)?s.push([i,n,[n,n,n]]):(r=l*o[1],s.push([i,n,[n-r,n+r,o[1]]]))):s.push([i,null,[null,null,null]]);return s},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s,l,h,u,d,c=[],p=a.get(\"sigma\");for(i=0;i<t.length;i++){for(s=0,u=0,l=0,n=Math.max(0,i-e+1);n<i+1;n++)null===(r=t[n][1])||isNaN(r)||(l++,s+=r,u+=Math.pow(t[n][2][2],2));l?(h=Math.sqrt(u)/l,d=s/l,c[i]=[t[i][0],d,[d-p*h,d+p*h]]):(o=1==e?t[i][1]:null,c[i]=[t[i][0],o,[o,o]])}return c},a.default=r,e.exports=a.default},{\"./bars\":5}],4:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./bars\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i,n,r,o,s,l,h,u,d=[],c=a.get(\"sigma\"),p=a.get(\"logscale\"),g=0;g<t.length;g++)i=t[g][0],r=t[g][e],p&&null!==r&&(r[0]<=0||r[1]<=0)&&(r=null),null!==r?(o=r[0],s=r[1],null===o||isNaN(o)?d.push([i,o,[o,o,o,s]]):(l=s?o/s:0,h=s?c*Math.sqrt(l*(1-l)/s):1,u=100*h,n=100*l,d.push([i,n,[n-u,n+u,o,s]]))):d.push([i,null,[null,null,null,null]]);return d},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s=[],l=a.get(\"sigma\"),h=a.get(\"wilsonInterval\"),u=0,d=0;for(r=0;r<t.length;r++){u+=t[r][2][2],d+=t[r][2][3],r-e>=0&&(u-=t[r-e][2][2],d-=t[r-e][2][3]);var c=t[r][0],p=d?u/d:0;if(h)if(d){var g=p<0?0:p,f=d,v=l*Math.sqrt(g*(1-g)/f+l*l/(4*f*f)),_=1+l*l/d;i=(g+l*l/(2*d)-v)/_,n=(g+l*l/(2*d)+v)/_,s[r]=[c,100*g,[100*i,100*n]]}else s[r]=[c,0,[0,0]];else o=d?l*Math.sqrt(p*(1-p)/d):1,s[r]=[c,100*p,[100*(p-o),100*(p+o)]]}return s},a.default=r,e.exports=a.default},{\"./bars\":5}],5:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"./datahandler\"),r=i(n),o=t(\"../dygraph-layout\"),s=i(o),l=function(){r.default.call(this)};l.prototype=new r.default,l.prototype.extractSeries=function(t,e,a){},l.prototype.rollingAverage=function(t,e,a){},l.prototype.onPointsCreated_=function(t,e){for(var a=0;a<t.length;++a){var i=t[a],n=e[a];n.y_top=NaN,n.y_bottom=NaN,n.yval_minus=r.default.parseFloat(i[2][0]),n.yval_plus=r.default.parseFloat(i[2][1])}},l.prototype.getExtremeYValues=function(t,e,a){for(var i,n=null,r=null,o=t.length-1,s=0;s<=o;s++)if(null!==(i=t[s][1])&&!isNaN(i)){var l=t[s][2][0],h=t[s][2][1];l>i&&(l=i),h<i&&(h=i),(null===r||h>r)&&(r=h),(null===n||l<n)&&(n=l)}return[n,r]},l.prototype.onLineEvaluated=function(t,e,a){for(var i,n=0;n<t.length;n++)i=t[n],i.y_top=s.default.calcYNormal_(e,i.yval_minus,a),i.y_bottom=s.default.calcYNormal_(e,i.yval_plus,a)},a.default=l,e.exports=a.default},{\"../dygraph-layout\":13,\"./datahandler\":6}],6:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){},n=i;n.X=0,n.Y=1,n.EXTRAS=2,n.prototype.extractSeries=function(t,e,a){},n.prototype.seriesToPoints=function(t,e,a){for(var i=[],r=0;r<t.length;++r){var o=t[r],s=o[1],l=null===s?null:n.parseFloat(s),h={x:NaN,y:NaN,xval:n.parseFloat(o[0]),yval:l,name:e,idx:r+a,canvasx:NaN,canvasy:NaN};i.push(h)}return this.onPointsCreated_(t,i),i},n.prototype.onPointsCreated_=function(t,e){},n.prototype.rollingAverage=function(t,e,a){},n.prototype.getExtremeYValues=function(t,e,a){},n.prototype.onLineEvaluated=function(t,e,a){},n.parseFloat=function(t){return null===t?NaN:t},a.default=i,e.exports=a.default},{}],7:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"./datahandler\"),r=(i(n),t(\"./default\")),o=i(r),s=function(){};s.prototype=new o.default,s.prototype.extractSeries=function(t,e,a){for(var i,n,r,o,s,l,h=[],u=a.get(\"logscale\"),d=0;d<t.length;d++)i=t[d][0],r=t[d][e],u&&null!==r&&(r[0]<=0||r[1]<=0)&&(r=null),null!==r?(o=r[0],s=r[1],null===o||isNaN(o)?h.push([i,o,[o,s]]):(l=s?o/s:0,n=100*l,h.push([i,n,[o,s]]))):h.push([i,null,[null,null]]);return h},s.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n=[],r=0,o=0;for(i=0;i<t.length;i++){r+=t[i][2][0],o+=t[i][2][1],i-e>=0&&(r-=t[i-e][2][0],o-=t[i-e][2][1]);var s=t[i][0],l=o?r/o:0;n[i]=[s,100*l]}return n},a.default=s,e.exports=a.default},{\"./datahandler\":6,\"./default\":8}],8:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./datahandler\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(){};r.prototype=new n.default,r.prototype.extractSeries=function(t,e,a){for(var i=[],n=a.get(\"logscale\"),r=0;r<t.length;r++){var o=t[r][0],s=t[r][e];n&&s<=0&&(s=null),i.push([o,s])}return i},r.prototype.rollingAverage=function(t,e,a){e=Math.min(e,t.length);var i,n,r,o,s,l=[];if(1==e)return t;for(i=0;i<t.length;i++){for(o=0,s=0,n=Math.max(0,i-e+1);n<i+1;n++)null===(r=t[n][1])||isNaN(r)||(s++,o+=t[n][1]);l[i]=s?[t[i][0],o/s]:[t[i][0],null]}return l},r.prototype.getExtremeYValues=function(t,e,a){for(var i,n=null,r=null,o=t.length-1,s=0;s<=o;s++)null===(i=t[s][1])||isNaN(i)||((null===r||i>r)&&(r=i),(null===n||i<n)&&(n=i));return[n,r]},a.default=r,e.exports=a.default},{\"./datahandler\":6}],9:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=t(\"./dygraph\"),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=function(t,e,a,i){if(this.dygraph_=t,this.layout=i,this.element=e,this.elementContext=a,this.height=t.height_,this.width=t.width_,!n.isCanvasSupported(this.element))throw\"Canvas is not supported.\";this.area=i.getPlotArea();var r=this.dygraph_.canvas_ctx_;r.beginPath(),r.rect(this.area.x,this.area.y,this.area.w,this.area.h),r.clip(),r=this.dygraph_.hidden_ctx_,r.beginPath(),r.rect(this.area.x,this.area.y,this.area.w,this.area.h),r.clip()};s.prototype.clear=function(){this.elementContext.clearRect(0,0,this.width,this.height)},s.prototype.render=function(){this._updatePoints(),this._renderLineChart()},s._getIteratorPredicate=function(t){return t?s._predicateThatSkipsEmptyPoints:null},s._predicateThatSkipsEmptyPoints=function(t,e){return null!==t[e].yval},s._drawStyledLine=function(t,e,a,i,r,o,l){var h=t.dygraph,u=h.getBooleanOption(\"stepPlot\",t.setName);n.isArrayLike(i)||(i=null);var d=h.getBooleanOption(\"drawGapEdgePoints\",t.setName),c=t.points,p=t.setName,g=n.createIterator(c,0,c.length,s._getIteratorPredicate(h.getBooleanOption(\"connectSeparatedPoints\",p))),f=i&&i.length>=2,v=t.drawingContext;v.save(),f&&v.setLineDash&&v.setLineDash(i);var _=s._drawSeries(t,g,a,l,r,d,u,e);s._drawPointsOnLine(t,_,o,e,l),f&&v.setLineDash&&v.setLineDash([]),v.restore()},s._drawSeries=function(t,e,a,i,n,r,o,s){var l,h,u=null,d=null,c=null,p=[],g=!0,f=t.drawingContext;f.beginPath(),f.strokeStyle=s,f.lineWidth=a;for(var v=e.array_,_=e.end_,y=e.predicate_,x=e.start_;x<_;x++){if(h=v[x],y){for(;x<_&&!y(v,x);)x++;if(x==_)break;h=v[x]}if(null===h.canvasy||h.canvasy!=h.canvasy)o&&null!==u&&(f.moveTo(u,d),f.lineTo(h.canvasx,d)),u=d=null;else{if(l=!1,r||null===u){e.nextIdx_=x,e.next(),c=e.hasNext?e.peek.canvasy:null;var m=null===c||c!=c;l=null===u&&m,r&&(!g&&null===u||e.hasNext&&m)&&(l=!0)}null!==u?a&&(o&&(f.moveTo(u,d),f.lineTo(h.canvasx,d)),f.lineTo(h.canvasx,h.canvasy)):f.moveTo(h.canvasx,h.canvasy),(n||l)&&p.push([h.canvasx,h.canvasy,h.idx]),u=h.canvasx,d=h.canvasy}g=!1}return f.stroke(),p},s._drawPointsOnLine=function(t,e,a,i,n){for(var r=t.drawingContext,o=0;o<e.length;o++){var s=e[o];r.save(),a.call(t.dygraph,t.dygraph,t.setName,r,s[0],s[1],i,n,s[2]),r.restore()}},s.prototype._updatePoints=function(){for(var t=this.layout.points,e=t.length;e--;)for(var a=t[e],i=a.length;i--;){var n=a[i];n.canvasx=this.area.w*n.x+this.area.x,n.canvasy=this.area.h*n.y+this.area.y}},s.prototype._renderLineChart=function(t,e){var a,i,r=e||this.elementContext,o=this.layout.points,s=this.layout.setNames;this.colors=this.dygraph_.colorsMap_;var l=this.dygraph_.getOption(\"plotter\"),h=l;n.isArrayLike(h)||(h=[h]);var u={};for(a=0;a<s.length;a++){i=s[a];var d=this.dygraph_.getOption(\"plotter\",i);d!=l&&(u[i]=d)}for(a=0;a<h.length;a++)for(var c=h[a],p=a==h.length-1,g=0;g<o.length;g++)if(i=s[g],!t||i==t){var f=o[g],v=c;if(i in u){if(!p)continue;v=u[i]}var _=this.colors[i],y=this.dygraph_.getOption(\"strokeWidth\",i);r.save(),r.strokeStyle=_,r.lineWidth=y,v({points:f,setName:i,drawingContext:r,color:_,strokeWidth:y,dygraph:this.dygraph_,axis:this.dygraph_.axisPropertiesForSeries(i),plotArea:this.area,seriesIndex:g,seriesCount:o.length,singleSeriesName:t,allSeriesPoints:o}),r.restore()}},s._Plotters={linePlotter:function(t){s._linePlotter(t)},fillPlotter:function(t){s._fillPlotter(t)},errorPlotter:function(t){s._errorPlotter(t)}},s._linePlotter=function(t){var e=t.dygraph,a=t.setName,i=t.strokeWidth,r=e.getNumericOption(\"strokeBorderWidth\",a),o=e.getOption(\"drawPointCallback\",a)||n.Circles.DEFAULT,l=e.getOption(\"strokePattern\",a),h=e.getBooleanOption(\"drawPoints\",a),u=e.getNumericOption(\"pointSize\",a);r&&i&&s._drawStyledLine(t,e.getOption(\"strokeBorderColor\",a),i+2*r,l,h,o,u),s._drawStyledLine(t,t.color,i,l,h,o,u)},s._errorPlotter=function(t){var e=t.dygraph,a=t.setName;if(e.getBooleanOption(\"errorBars\")||e.getBooleanOption(\"customBars\")){e.getBooleanOption(\"fillGraph\",a)&&console.warn(\"Can't use fillGraph option with error bars\");var i,r=t.drawingContext,o=t.color,l=e.getNumericOption(\"fillAlpha\",a),h=e.getBooleanOption(\"stepPlot\",a),u=t.points,d=n.createIterator(u,0,u.length,s._getIteratorPredicate(e.getBooleanOption(\"connectSeparatedPoints\",a))),c=NaN,p=NaN,g=[-1,-1],f=n.toRGB_(o),v=\"rgba(\"+f.r+\",\"+f.g+\",\"+f.b+\",\"+l+\")\";r.fillStyle=v,r.beginPath();for(var _=function(t){return null===t||void 0===t||isNaN(t)};d.hasNext;){var y=d.next();!h&&_(y.y)||h&&!isNaN(p)&&_(p)?c=NaN:(i=[y.y_bottom,y.y_top],h&&(p=y.y),isNaN(i[0])&&(i[0]=y.y),isNaN(i[1])&&(i[1]=y.y),i[0]=t.plotArea.h*i[0]+t.plotArea.y,i[1]=t.plotArea.h*i[1]+t.plotArea.y,isNaN(c)||(h?(r.moveTo(c,g[0]),r.lineTo(y.canvasx,g[0]),r.lineTo(y.canvasx,g[1])):(r.moveTo(c,g[0]),r.lineTo(y.canvasx,i[0]),r.lineTo(y.canvasx,i[1])),r.lineTo(c,g[1]),r.closePath()),g=i,c=y.canvasx)}r.fill()}},s._fastCanvasProxy=function(t){var e=[],a=null,i=null,n=0,r=function(t){if(!(e.length<=1)){for(var a=e.length-1;a>0;a--){var i=e[a];if(2==i[0]){var n=e[a-1];n[1]==i[1]&&n[2]==i[2]&&e.splice(a,1)}}for(var a=0;a<e.length-1;){var i=e[a];2==i[0]&&2==e[a+1][0]?e.splice(a,1):a++}if(e.length>2&&!t){var r=0;2==e[0][0]&&r++;for(var o=null,s=null,a=r;a<e.length;a++){var i=e[a];if(1==i[0])if(null===o&&null===s)o=a,s=a;else{var l=i[2];l<e[o][2]?o=a:l>e[s][2]&&(s=a)}}var h=e[o],u=e[s];e.splice(r,e.length-r),o<s?(e.push(h),e.push(u)):o>s?(e.push(u),e.push(h)):e.push(h)}}},o=function(a){r(a);for(var o=0,s=e.length;o<s;o++){var l=e[o];1==l[0]?t.lineTo(l[1],l[2]):2==l[0]&&t.moveTo(l[1],l[2])}e.length&&(i=e[e.length-1][1]),n+=e.length,e=[]},s=function(t,n,r){var s=Math.round(n);if(null===a||s!=a){var l=a-i>1,h=s-a>1;o(l||h),a=s}e.push([t,n,r])};return{moveTo:function(t,e){s(2,t,e)},lineTo:function(t,e){s(1,t,e)},stroke:function(){o(!0),t.stroke()},fill:function(){o(!0),t.fill()},beginPath:function(){o(!0),t.beginPath()},closePath:function(){o(!0),t.closePath()},_count:function(){return n}}},s._fillPlotter=function(t){if(!t.singleSeriesName&&0===t.seriesIndex){for(var e=t.dygraph,a=e.getLabels().slice(1),i=a.length;i>=0;i--)e.visibility()[i]||a.splice(i,1);if(function(){for(var t=0;t<a.length;t++)if(e.getBooleanOption(\"fillGraph\",a[t]))return!0;return!1}())for(var r,l,h=t.plotArea,u=t.allSeriesPoints,d=u.length,c=e.getBooleanOption(\"stackedGraph\"),p=e.getColors(),g={},f=function(t,e,a,i){if(t.lineTo(e,a),c)for(var n=i.length-1;n>=0;n--){var r=i[n];t.lineTo(r[0],r[1])}},v=d-1;v>=0;v--){var _=t.drawingContext,y=a[v];if(e.getBooleanOption(\"fillGraph\",y)){var x=e.getNumericOption(\"fillAlpha\",y),m=e.getBooleanOption(\"stepPlot\",y),b=p[v],w=e.axisPropertiesForSeries(y),A=1+w.minyval*w.yscale;A<0?A=0:A>1&&(A=1),A=h.h*A+h.y;var O,D=u[v],E=n.createIterator(D,0,D.length,s._getIteratorPredicate(e.getBooleanOption(\"connectSeparatedPoints\",y))),L=NaN,T=[-1,-1],S=n.toRGB_(b),P=\"rgba(\"+S.r+\",\"+S.g+\",\"+S.b+\",\"+x+\")\";_.fillStyle=P,_.beginPath();var C,M=!0;(D.length>2*e.width_||o.default.FORCE_FAST_PROXY)&&(_=s._fastCanvasProxy(_));for(var N,F=[];E.hasNext;)if(N=E.next(),n.isOK(N.y)||m){if(c){if(!M&&C==N.xval)continue;M=!1,C=N.xval,r=g[N.canvasx];var k;k=void 0===r?A:l?r[0]:r,O=[N.canvasy,k],m?-1===T[0]?g[N.canvasx]=[N.canvasy,A]:g[N.canvasx]=[N.canvasy,T[0]]:g[N.canvasx]=N.canvasy}else O=isNaN(N.canvasy)&&m?[h.y+h.h,A]:[N.canvasy,A];isNaN(L)?(_.moveTo(N.canvasx,O[1]),_.lineTo(N.canvasx,O[0])):(m?(_.lineTo(N.canvasx,T[0]),_.lineTo(N.canvasx,O[0])):_.lineTo(N.canvasx,O[0]),c&&(F.push([L,T[1]]),l&&r?F.push([N.canvasx,r[1]]):F.push([N.canvasx,O[1]]))),T=O,L=N.canvasx}else f(_,L,T[1],F),F=[],L=NaN,null===N.y_stacked||isNaN(N.y_stacked)||(g[N.canvasx]=h.h*N.y_stacked+h.y);l=m,O&&N&&(f(_,N.canvasx,O[1],F),F=[]),_.fill()}}}},a.default=s,e.exports=a.default},{\"./dygraph\":18,\"./dygraph-utils\":17}],10:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}Object.defineProperty(a,\"__esModule\",{value:!0});var r=t(\"./dygraph-tickers\"),o=n(r),s=t(\"./dygraph-interaction-model\"),l=i(s),h=t(\"./dygraph-canvas\"),u=i(h),d=t(\"./dygraph-utils\"),c=n(d),p={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:.5,highlightSeriesBackgroundColor:\"rgb(255, 255, 255)\",labelsSeparateLines:!1,labelsShowZeroValues:!0,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:!0,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:\"white\",axisTickSize:3,axisLabelFontSize:14,rightGap:5,showRoller:!1,xValueParser:void 0,delimiter:\",\",sigma:2,errorBars:!1,fractions:!1,wilsonInterval:!0,customBars:!1,fillGraph:!1,fillAlpha:.15,connectSeparatedPoints:!1,stackedGraph:!1,stackedGraphNaNFill:\"all\",hideOverlayOnMouseOut:!0,legend:\"onmouseover\",stepPlot:!1,xRangePad:0,yRangePad:null,drawAxesAtZero:!1,titleHeight:28,xLabelHeight:18,yLabelWidth:18,axisLineColor:\"black\",axisLineWidth:.3,gridLineWidth:.3,axisLabelWidth:50,gridLineColor:\"rgb(128,128,128)\",interactionModel:l.default.defaultModel,animatedZooms:!1,showRangeSelector:!1,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:\"#808FAB\",rangeSelectorPlotFillGradientColor:\"white\",rangeSelectorPlotFillColor:\"#A7B1C4\",rangeSelectorBackgroundStrokeColor:\"gray\",rangeSelectorBackgroundLineWidth:1,rangeSelectorPlotLineWidth:1.5,rangeSelectorForegroundStrokeColor:\"black\",rangeSelectorForegroundLineWidth:1,rangeSelectorAlpha:.6,showInRangeSelector:null,plotter:[u.default._fillPlotter,u.default._errorPlotter,u.default._linePlotter],plugins:[],axes:{x:{pixelsPerLabel:70,axisLabelWidth:60,axisLabelFormatter:c.dateAxisLabelFormatter,valueFormatter:c.dateValueFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.dateTicker},y:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:c.numberValueFormatter,axisLabelFormatter:c.numberAxisLabelFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:o.numericTicks},y2:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:c.numberValueFormatter,axisLabelFormatter:c.numberAxisLabelFormatter,drawAxis:!0,drawGrid:!1,independentTicks:!1,ticker:o.numericTicks}}};a.default=p,e.exports=a.default},{\"./dygraph-canvas\":9,\"./dygraph-interaction-model\":12,\"./dygraph-tickers\":16,\"./dygraph-utils\":17}],11:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph\"),n=function(t){return t&&t.__esModule?t:{default:t}}(i),r=function(t){this.container=t};r.prototype.draw=function(t,e){this.container.innerHTML=\"\",void 0!==this.date_graph&&this.date_graph.destroy(),this.date_graph=new n.default(this.container,t,e)},r.prototype.setSelection=function(t){var e=!1;t.length&&(e=t[0].row),this.date_graph.setSelection(e)},r.prototype.getSelection=function(){var t=[],e=this.date_graph.getSelection();if(e<0)return t;for(var a=this.date_graph.layout_.points,i=0;i<a.length;++i)t.push({row:e,column:i+1});return t},a.default=r,e.exports=a.default},{\"./dygraph\":18}],12:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r={};r.maybeTreatMouseOpAsClick=function(t,e,a){a.dragEndX=n.dragGetX_(t,a),a.dragEndY=n.dragGetY_(t,a);var i=Math.abs(a.dragEndX-a.dragStartX),o=Math.abs(a.dragEndY-a.dragStartY);i<2&&o<2&&void 0!==e.lastx_&&-1!=e.lastx_&&r.treatMouseOpAsClick(e,t,a),a.regionWidth=i,a.regionHeight=o},r.startPan=function(t,e,a){var i,r;a.isPanning=!0;var o=e.xAxisRange();if(e.getOptionForAxis(\"logscale\",\"x\")?(a.initialLeftmostDate=n.log10(o[0]),a.dateRange=n.log10(o[1])-n.log10(o[0])):(a.initialLeftmostDate=o[0],a.dateRange=o[1]-o[0]),a.xUnitsPerPixel=a.dateRange/(e.plotter_.area.w-1),e.getNumericOption(\"panEdgeFraction\")){var s=e.width_*e.getNumericOption(\"panEdgeFraction\"),l=e.xAxisExtremes(),h=e.toDomXCoord(l[0])-s,u=e.toDomXCoord(l[1])+s,d=e.toDataXCoord(h),c=e.toDataXCoord(u);a.boundedDates=[d,c];var p=[],g=e.height_*e.getNumericOption(\"panEdgeFraction\");for(i=0;i<e.axes_.length;i++){r=e.axes_[i];var f=r.extremeRange,v=e.toDomYCoord(f[0],i)+g,_=e.toDomYCoord(f[1],i)-g,y=e.toDataYCoord(v,i),x=e.toDataYCoord(_,i);p[i]=[y,x]}a.boundedValues=p}for(a.is2DPan=!1,a.axes=[],i=0;i<e.axes_.length;i++){r=e.axes_[i];var m={},b=e.yAxisRange(i);e.attributes_.getForAxis(\"logscale\",i)?(m.initialTopValue=n.log10(b[1]),m.dragValueRange=n.log10(b[1])-n.log10(b[0])):(m.initialTopValue=b[1],m.dragValueRange=b[1]-b[0]),m.unitsPerPixel=m.dragValueRange/(e.plotter_.area.h-1),a.axes.push(m),r.valueRange&&(a.is2DPan=!0)}},r.movePan=function(t,e,a){a.dragEndX=n.dragGetX_(t,a),a.dragEndY=n.dragGetY_(t,a);var i=a.initialLeftmostDate-(a.dragEndX-a.dragStartX)*a.xUnitsPerPixel;a.boundedDates&&(i=Math.max(i,a.boundedDates[0]));var r=i+a.dateRange;if(a.boundedDates&&r>a.boundedDates[1]&&(i-=r-a.boundedDates[1],r=i+a.dateRange),e.getOptionForAxis(\"logscale\",\"x\")?e.dateWindow_=[Math.pow(n.LOG_SCALE,i),Math.pow(n.LOG_SCALE,r)]:e.dateWindow_=[i,r],a.is2DPan)for(var o=a.dragEndY-a.dragStartY,s=0;s<e.axes_.length;s++){var l=e.axes_[s],h=a.axes[s],u=o*h.unitsPerPixel,d=a.boundedValues?a.boundedValues[s]:null,c=h.initialTopValue+u;d&&(c=Math.min(c,d[1]));var p=c-h.dragValueRange;d&&p<d[0]&&(c-=p-d[0],p=c-h.dragValueRange),e.attributes_.getForAxis(\"logscale\",s)?l.valueRange=[Math.pow(n.LOG_SCALE,p),Math.pow(n.LOG_SCALE,c)]:l.valueRange=[p,c]}e.drawGraph_(!1)},r.endPan=r.maybeTreatMouseOpAsClick,r.startZoom=function(t,e,a){a.isZooming=!0,a.zoomMoved=!1},r.moveZoom=function(t,e,a){a.zoomMoved=!0,a.dragEndX=n.dragGetX_(t,a),a.dragEndY=n.dragGetY_(t,a);var i=Math.abs(a.dragStartX-a.dragEndX),r=Math.abs(a.dragStartY-a.dragEndY);a.dragDirection=i<r/2?n.VERTICAL:n.HORIZONTAL,e.drawZoomRect_(a.dragDirection,a.dragStartX,a.dragEndX,a.dragStartY,a.dragEndY,a.prevDragDirection,a.prevEndX,a.prevEndY),a.prevEndX=a.dragEndX,a.prevEndY=a.dragEndY,a.prevDragDirection=a.dragDirection},r.treatMouseOpAsClick=function(t,e,a){for(var i=t.getFunctionOption(\"clickCallback\"),n=t.getFunctionOption(\"pointClickCallback\"),r=null,o=-1,s=Number.MAX_VALUE,l=0;l<t.selPoints_.length;l++){var h=t.selPoints_[l],u=Math.pow(h.canvasx-a.dragEndX,2)+Math.pow(h.canvasy-a.dragEndY,2);!isNaN(u)&&(-1==o||u<s)&&(s=u,o=l)}var d=t.getNumericOption(\"highlightCircleSize\")+2;if(s<=d*d&&(r=t.selPoints_[o]),r){var c={cancelable:!0,point:r,canvasx:a.dragEndX,canvasy:a.dragEndY};if(t.cascadeEvents_(\"pointClick\",c))return;n&&n.call(t,e,r)}var c={cancelable:!0,xval:t.lastx_,pts:t.selPoints_,canvasx:a.dragEndX,canvasy:a.dragEndY};t.cascadeEvents_(\"click\",c)||i&&i.call(t,e,t.lastx_,t.selPoints_)},r.endZoom=function(t,e,a){e.clearZoomRect_(),a.isZooming=!1,r.maybeTreatMouseOpAsClick(t,e,a);var i=e.getArea();if(a.regionWidth>=10&&a.dragDirection==n.HORIZONTAL){var o=Math.min(a.dragStartX,a.dragEndX),s=Math.max(a.dragStartX,a.dragEndX);o=Math.max(o,i.x),s=Math.min(s,i.x+i.w),o<s&&e.doZoomX_(o,s),a.cancelNextDblclick=!0}else if(a.regionHeight>=10&&a.dragDirection==n.VERTICAL){var l=Math.min(a.dragStartY,a.dragEndY),h=Math.max(a.dragStartY,a.dragEndY);l=Math.max(l,i.y),h=Math.min(h,i.y+i.h),l<h&&e.doZoomY_(l,h),a.cancelNextDblclick=!0}a.dragStartX=null,a.dragStartY=null},r.startTouch=function(t,e,a){t.preventDefault(),t.touches.length>1&&(a.startTimeForDoubleTapMs=null);for(var i=[],n=0;n<t.touches.length;n++){var r=t.touches[n];i.push({pageX:r.pageX,pageY:r.pageY,dataX:e.toDataXCoord(r.pageX),dataY:e.toDataYCoord(r.pageY)})}if(a.initialTouches=i,1==i.length)a.initialPinchCenter=i[0],a.touchDirections={x:!0,y:!0};else if(i.length>=2){a.initialPinchCenter={pageX:.5*(i[0].pageX+i[1].pageX),pageY:.5*(i[0].pageY+i[1].pageY),dataX:.5*(i[0].dataX+i[1].dataX),dataY:.5*(i[0].dataY+i[1].dataY)};var o=180/Math.PI*Math.atan2(a.initialPinchCenter.pageY-i[0].pageY,i[0].pageX-a.initialPinchCenter.pageX);o=Math.abs(o),o>90&&(o=90-o),a.touchDirections={x:o<67.5,y:o>22.5}}a.initialRange={x:e.xAxisRange(),y:e.yAxisRange()}},r.moveTouch=function(t,e,a){a.startTimeForDoubleTapMs=null;var i,n=[];for(i=0;i<t.touches.length;i++){var r=t.touches[i];n.push({pageX:r.pageX,pageY:r.pageY})}var o,s=a.initialTouches,l=a.initialPinchCenter;o=1==n.length?n[0]:{pageX:.5*(n[0].pageX+n[1].pageX),pageY:.5*(n[0].pageY+n[1].pageY)};var h={pageX:o.pageX-l.pageX,pageY:o.pageY-l.pageY},u=a.initialRange.x[1]-a.initialRange.x[0],d=a.initialRange.y[0]-a.initialRange.y[1];h.dataX=h.pageX/e.plotter_.area.w*u,h.dataY=h.pageY/e.plotter_.area.h*d;var c,p;if(1==n.length)c=1,p=1;else if(n.length>=2){var g=s[1].pageX-l.pageX;c=(n[1].pageX-o.pageX)/g;var f=s[1].pageY-l.pageY;p=(n[1].pageY-o.pageY)/f}c=Math.min(8,Math.max(.125,c)),p=Math.min(8,Math.max(.125,p));var v=!1;if(a.touchDirections.x&&(e.dateWindow_=[l.dataX-h.dataX+(a.initialRange.x[0]-l.dataX)/c,l.dataX-h.dataX+(a.initialRange.x[1]-l.dataX)/c],v=!0),a.touchDirections.y)for(i=0;i<1;i++){var _=e.axes_[i],y=e.attributes_.getForAxis(\"logscale\",i);y||(_.valueRange=[l.dataY-h.dataY+(a.initialRange.y[0]-l.dataY)/p,l.dataY-h.dataY+(a.initialRange.y[1]-l.dataY)/p],v=!0)}if(e.drawGraph_(!1),v&&n.length>1&&e.getFunctionOption(\"zoomCallback\")){var x=e.xAxisRange();e.getFunctionOption(\"zoomCallback\").call(e,x[0],x[1],e.yAxisRanges())}},r.endTouch=function(t,e,a){if(0!==t.touches.length)r.startTouch(t,e,a);else if(1==t.changedTouches.length){var i=(new Date).getTime(),n=t.changedTouches[0];a.startTimeForDoubleTapMs&&i-a.startTimeForDoubleTapMs<500&&a.doubleTapX&&Math.abs(a.doubleTapX-n.screenX)<50&&a.doubleTapY&&Math.abs(a.doubleTapY-n.screenY)<50?e.resetZoom():(a.startTimeForDoubleTapMs=i,a.doubleTapX=n.screenX,a.doubleTapY=n.screenY)}};var o=function(t,e,a){return t<e?e-t:t>a?t-a:0},s=function(t,e){var a=n.findPos(e.canvas_),i={left:a.x,right:a.x+e.canvas_.offsetWidth,top:a.y,bottom:a.y+e.canvas_.offsetHeight},r={x:n.pageX(t),y:n.pageY(t)},s=o(r.x,i.left,i.right),l=o(r.y,i.top,i.bottom);return Math.max(s,l)};r.defaultModel={mousedown:function(t,e,a){if(!t.button||2!=t.button){a.initializeMouseDown(t,e,a),t.altKey||t.shiftKey?r.startPan(t,e,a):r.startZoom(t,e,a);var i=function(t){if(a.isZooming){s(t,e)<100?r.moveZoom(t,e,a):null!==a.dragEndX&&(a.dragEndX=null,a.dragEndY=null,e.clearZoomRect_())}else a.isPanning&&r.movePan(t,e,a)},o=function t(o){a.isZooming?null!==a.dragEndX?r.endZoom(o,e,a):r.maybeTreatMouseOpAsClick(o,e,a):a.isPanning&&r.endPan(o,e,a),n.removeEvent(document,\"mousemove\",i),n.removeEvent(document,\"mouseup\",t),a.destroy()};e.addAndTrackEvent(document,\"mousemove\",i),e.addAndTrackEvent(document,\"mouseup\",o)}},willDestroyContextMyself:!0,touchstart:function(t,e,a){r.startTouch(t,e,a)},touchmove:function(t,e,a){r.moveTouch(t,e,a)},touchend:function(t,e,a){r.endTouch(t,e,a)},dblclick:function(t,e,a){if(a.cancelNextDblclick)return void(a.cancelNextDblclick=!1);var i={canvasx:a.dragEndX,canvasy:a.dragEndY,cancelable:!0};e.cascadeEvents_(\"dblclick\",i)||t.altKey||t.shiftKey||e.resetZoom()}},r.nonInteractiveModel_={mousedown:function(t,e,a){a.initializeMouseDown(t,e,a)},mouseup:r.maybeTreatMouseOpAsClick},r.dragIsPanInteractionModel={mousedown:function(t,e,a){a.initializeMouseDown(t,e,a),r.startPan(t,e,a)},mousemove:function(t,e,a){a.isPanning&&r.movePan(t,e,a)},mouseup:function(t,e,a){a.isPanning&&r.endPan(t,e,a)}},a.default=r,e.exports=a.default},{\"./dygraph-utils\":17}],13:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=function(t){this.dygraph_=t,this.points=[],this.setNames=[],this.annotations=[],this.yAxes_=null,this.xTicks_=null,this.yTicks_=null};r.prototype.addDataset=function(t,e){this.points.push(e),this.setNames.push(t)},r.prototype.getPlotArea=function(){return this.area_},r.prototype.computePlotArea=function(){var t={x:0,y:0};t.w=this.dygraph_.width_-t.x-this.dygraph_.getOption(\"rightGap\"),t.h=this.dygraph_.height_;var e={chart_div:this.dygraph_.graphDiv,reserveSpaceLeft:function(e){var a={x:t.x,y:t.y,w:e,h:t.h};return t.x+=e,t.w-=e,a},reserveSpaceRight:function(e){var a={x:t.x+t.w-e,y:t.y,w:e,h:t.h};return t.w-=e,a},reserveSpaceTop:function(e){var a={x:t.x,y:t.y,w:t.w,h:e};return t.y+=e,t.h-=e,a},reserveSpaceBottom:function(e){var a={x:t.x,y:t.y+t.h-e,w:t.w,h:e};return t.h-=e,a},chartRect:function(){return{x:t.x,y:t.y,w:t.w,h:t.h}}};this.dygraph_.cascadeEvents_(\"layout\",e),this.area_=t},r.prototype.setAnnotations=function(t){this.annotations=[];for(var e=this.dygraph_.getOption(\"xValueParser\")||function(t){return t},a=0;a<t.length;a++){var i={};if(!t[a].xval&&void 0===t[a].x)return void console.error(\"Annotations must have an 'x' property\");if(t[a].icon&&(!t[a].hasOwnProperty(\"width\")||!t[a].hasOwnProperty(\"height\")))return void console.error(\"Must set width and height when setting annotation.icon property\");n.update(i,t[a]),i.xval||(i.xval=e(i.x)),this.annotations.push(i)}},r.prototype.setXTicks=function(t){this.xTicks_=t},r.prototype.setYAxes=function(t){this.yAxes_=t},r.prototype.evaluate=function(){this._xAxis={},this._evaluateLimits(),this._evaluateLineCharts(),this._evaluateLineTicks(),this._evaluateAnnotations()},r.prototype._evaluateLimits=function(){var t=this.dygraph_.xAxisRange();this._xAxis.minval=t[0],this._xAxis.maxval=t[1];var e=t[1]-t[0];this._xAxis.scale=0!==e?1/e:1,this.dygraph_.getOptionForAxis(\"logscale\",\"x\")&&(this._xAxis.xlogrange=n.log10(this._xAxis.maxval)-n.log10(this._xAxis.minval),this._xAxis.xlogscale=0!==this._xAxis.xlogrange?1/this._xAxis.xlogrange:1);for(var a=0;a<this.yAxes_.length;a++){var i=this.yAxes_[a];i.minyval=i.computedValueRange[0],i.maxyval=i.computedValueRange[1],i.yrange=i.maxyval-i.minyval,i.yscale=0!==i.yrange?1/i.yrange:1,this.dygraph_.getOption(\"logscale\")&&(i.ylogrange=n.log10(i.maxyval)-n.log10(i.minyval),i.ylogscale=0!==i.ylogrange?1/i.ylogrange:1,isFinite(i.ylogrange)&&!isNaN(i.ylogrange)||console.error(\"axis \"+a+\" of graph at \"+i.g+\" can't be displayed in log scale for range [\"+i.minyval+\" - \"+i.maxyval+\"]\"))}},r.calcXNormal_=function(t,e,a){return a?(n.log10(t)-n.log10(e.minval))*e.xlogscale:(t-e.minval)*e.scale},r.calcYNormal_=function(t,e,a){if(a){var i=1-(n.log10(e)-n.log10(t.minyval))*t.ylogscale;return isFinite(i)?i:NaN}return 1-(e-t.minyval)*t.yscale},r.prototype._evaluateLineCharts=function(){for(var t=this.dygraph_.getOption(\"stackedGraph\"),e=this.dygraph_.getOptionForAxis(\"logscale\",\"x\"),a=0;a<this.points.length;a++){for(var i=this.points[a],n=this.setNames[a],o=this.dygraph_.getOption(\"connectSeparatedPoints\",n),s=this.dygraph_.axisPropertiesForSeries(n),l=this.dygraph_.attributes_.getForSeries(\"logscale\",n),h=0;h<i.length;h++){var u=i[h];u.x=r.calcXNormal_(u.xval,this._xAxis,e);var d=u.yval;t&&(u.y_stacked=r.calcYNormal_(s,u.yval_stacked,l),\nnull===d||isNaN(d)||(d=u.yval_stacked)),null===d&&(d=NaN,o||(u.yval=NaN)),u.y=r.calcYNormal_(s,d,l)}this.dygraph_.dataHandler_.onLineEvaluated(i,s,l)}},r.prototype._evaluateLineTicks=function(){var t,e,a,i,n,r;for(this.xticks=[],t=0;t<this.xTicks_.length;t++)e=this.xTicks_[t],a=e.label,r=!(\"label_v\"in e),n=r?e.v:e.label_v,(i=this.dygraph_.toPercentXCoord(n))>=0&&i<1&&this.xticks.push({pos:i,label:a,has_tick:r});for(this.yticks=[],t=0;t<this.yAxes_.length;t++)for(var o=this.yAxes_[t],s=0;s<o.ticks.length;s++)e=o.ticks[s],a=e.label,r=!(\"label_v\"in e),n=r?e.v:e.label_v,(i=this.dygraph_.toPercentYCoord(n,t))>0&&i<=1&&this.yticks.push({axis:t,pos:i,label:a,has_tick:r})},r.prototype._evaluateAnnotations=function(){var t,e={};for(t=0;t<this.annotations.length;t++){var a=this.annotations[t];e[a.xval+\",\"+a.series]=a}if(this.annotated_points=[],this.annotations&&this.annotations.length)for(var i=0;i<this.points.length;i++){var n=this.points[i];for(t=0;t<n.length;t++){var r=n[t],o=r.xval+\",\"+r.name;o in e&&(r.annotation=e[o],this.annotated_points.push(r))}}},r.prototype.removeAllDatasets=function(){delete this.points,delete this.setNames,delete this.setPointsLengths,delete this.setPointsOffsets,this.points=[],this.setNames=[],this.setPointsLengths=[],this.setPointsOffsets=[]},a.default=r,e.exports=a.default},{\"./dygraph-utils\":17}],14:[function(t,e,a){(function(t){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=null;if(void 0!==t);a.default=i,e.exports=a.default}).call(this,t(\"_process\"))},{_process:1}],15:[function(t,e,a){(function(i){\"use strict\";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var r=t(\"./dygraph-utils\"),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(r),s=t(\"./dygraph-default-attrs\"),l=n(s),h=t(\"./dygraph-options-reference\"),u=(n(h),function(t){this.dygraph_=t,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get(\"highlightSeriesOpts\")||{},this.reparseSeries()});if(u.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1},u.axisToIndex_=function(t){if(\"string\"==typeof t){if(u.AXIS_STRING_MAPPINGS_.hasOwnProperty(t))return u.AXIS_STRING_MAPPINGS_[t];throw\"Unknown axis : \"+t}if(\"number\"==typeof t){if(0===t||1===t)return t;throw\"Dygraphs only supports two y-axes, indexed from 0-1.\"}if(t)throw\"Unknown axis : \"+t;return 0},u.prototype.reparseSeries=function(){var t=this.get(\"labels\");if(t){this.labels_=t.slice(1),this.yAxes_=[{series:[],options:{}}],this.xAxis_={options:{}},this.series_={};for(var e=this.user_.series||{},a=0;a<this.labels_.length;a++){var i=this.labels_[a],n=e[i]||{},r=u.axisToIndex_(n.axis);this.series_[i]={idx:a,yAxis:r,options:n},this.yAxes_[r]?this.yAxes_[r].series.push(i):this.yAxes_[r]={series:[i],options:{}}}var s=this.user_.axes||{};o.update(this.yAxes_[0].options,s.y||{}),this.yAxes_.length>1&&o.update(this.yAxes_[1].options,s.y2||{}),o.update(this.xAxis_.options,s.x||{})}},u.prototype.get=function(t){var e=this.getGlobalUser_(t);return null!==e?e:this.getGlobalDefault_(t)},u.prototype.getGlobalUser_=function(t){return this.user_.hasOwnProperty(t)?this.user_[t]:null},u.prototype.getGlobalDefault_=function(t){return this.global_.hasOwnProperty(t)?this.global_[t]:l.default.hasOwnProperty(t)?l.default[t]:null},u.prototype.getForAxis=function(t,e){var a,i;if(\"number\"==typeof e)a=e,i=0===a?\"y\":\"y2\";else{if(\"y1\"==e&&(e=\"y\"),\"y\"==e)a=0;else if(\"y2\"==e)a=1;else{if(\"x\"!=e)throw\"Unknown axis \"+e;a=-1}i=e}var n=-1==a?this.xAxis_:this.yAxes_[a];if(n){var r=n.options;if(r.hasOwnProperty(t))return r[t]}if(\"x\"!==e||\"logscale\"!==t){var o=this.getGlobalUser_(t);if(null!==o)return o}var s=l.default.axes[i];return s.hasOwnProperty(t)?s[t]:this.getGlobalDefault_(t)},u.prototype.getForSeries=function(t,e){if(e===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(t))return this.highlightSeries_[t];if(!this.series_.hasOwnProperty(e))throw\"Unknown series: \"+e;var a=this.series_[e],i=a.options;return i.hasOwnProperty(t)?i[t]:this.getForAxis(t,a.yAxis)},u.prototype.numAxes=function(){return this.yAxes_.length},u.prototype.axisForSeries=function(t){return this.series_[t].yAxis},u.prototype.axisOptions=function(t){return this.yAxes_[t].options},u.prototype.seriesForAxis=function(t){return this.yAxes_[t].series},u.prototype.seriesNames=function(){return this.labels_},void 0!==i);a.default=u,e.exports=a.default}).call(this,t(\"_process\"))},{\"./dygraph-default-attrs\":10,\"./dygraph-options-reference\":14,\"./dygraph-utils\":17,_process:1}],16:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"./dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=function(t,e,a,i,n,r){return o(t,e,a,function(t){return\"logscale\"!==t&&i(t)},n,r)};a.numericLinearTicks=r;var o=function(t,e,a,i,r,o){var s,l,h,u,c=i(\"pixelsPerLabel\"),p=[];if(o)for(s=0;s<o.length;s++)p.push({v:o[s]});else{if(i(\"logscale\")){u=Math.floor(a/c);var g=n.binarySearch(t,d,1),f=n.binarySearch(e,d,-1);-1==g&&(g=0),-1==f&&(f=d.length-1);var v=null;if(f-g>=u/4){for(var _=f;_>=g;_--){var y=d[_],x=Math.log(y/t)/Math.log(e/t)*a,m={v:y};null===v?v={tickValue:y,pixel_coord:x}:Math.abs(x-v.pixel_coord)>=c?v={tickValue:y,pixel_coord:x}:m.label=\"\",p.push(m)}p.reverse()}}if(0===p.length){var b,w,A=i(\"labelsKMG2\");A?(b=[1,2,4,8,16,32,64,128,256],w=16):(b=[1,2,5,10,20,50,100],w=10);var O,D,E,L=Math.ceil(a/c),T=Math.abs(e-t)/L,S=Math.floor(Math.log(T)/Math.log(w)),P=Math.pow(w,S);for(l=0;l<b.length&&(O=P*b[l],D=Math.floor(t/O)*O,E=Math.ceil(e/O)*O,u=Math.abs(E-D)/O,!(a/u>c));l++);for(D>E&&(O*=-1),s=0;s<=u;s++)h=D+s*O,p.push({v:h})}}var C=i(\"axisLabelFormatter\");for(s=0;s<p.length;s++)void 0===p[s].label&&(p[s].label=C.call(r,p[s].v,0,i,r));return p};a.numericTicks=o;var s=function(t,e,a,i,n,r){var o=c(t,e,a,i);return o>=0?g(t,e,o,i,n):[]};a.dateTicker=s;var l={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29};a.Granularity=l;var h={DATEFIELD_Y:0,DATEFIELD_M:1,DATEFIELD_D:2,DATEFIELD_HH:3,DATEFIELD_MM:4,DATEFIELD_SS:5,DATEFIELD_MS:6,NUM_DATEFIELDS:7},u=[];u[l.MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:1,spacing:1},u[l.TWO_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:2,spacing:2},u[l.FIVE_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:5,spacing:5},u[l.TEN_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:10,spacing:10},u[l.FIFTY_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:50,spacing:50},u[l.HUNDRED_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:100,spacing:100},u[l.FIVE_HUNDRED_MILLISECONDLY]={datefield:h.DATEFIELD_MS,step:500,spacing:500},u[l.SECONDLY]={datefield:h.DATEFIELD_SS,step:1,spacing:1e3},u[l.TWO_SECONDLY]={datefield:h.DATEFIELD_SS,step:2,spacing:2e3},u[l.FIVE_SECONDLY]={datefield:h.DATEFIELD_SS,step:5,spacing:5e3},u[l.TEN_SECONDLY]={datefield:h.DATEFIELD_SS,step:10,spacing:1e4},u[l.THIRTY_SECONDLY]={datefield:h.DATEFIELD_SS,step:30,spacing:3e4},u[l.MINUTELY]={datefield:h.DATEFIELD_MM,step:1,spacing:6e4},u[l.TWO_MINUTELY]={datefield:h.DATEFIELD_MM,step:2,spacing:12e4},u[l.FIVE_MINUTELY]={datefield:h.DATEFIELD_MM,step:5,spacing:3e5},u[l.TEN_MINUTELY]={datefield:h.DATEFIELD_MM,step:10,spacing:6e5},u[l.THIRTY_MINUTELY]={datefield:h.DATEFIELD_MM,step:30,spacing:18e5},u[l.HOURLY]={datefield:h.DATEFIELD_HH,step:1,spacing:36e5},u[l.TWO_HOURLY]={datefield:h.DATEFIELD_HH,step:2,spacing:72e5},u[l.SIX_HOURLY]={datefield:h.DATEFIELD_HH,step:6,spacing:216e5},u[l.DAILY]={datefield:h.DATEFIELD_D,step:1,spacing:864e5},u[l.TWO_DAILY]={datefield:h.DATEFIELD_D,step:2,spacing:1728e5},u[l.WEEKLY]={datefield:h.DATEFIELD_D,step:7,spacing:6048e5},u[l.MONTHLY]={datefield:h.DATEFIELD_M,step:1,spacing:2629817280},u[l.QUARTERLY]={datefield:h.DATEFIELD_M,step:3,spacing:216e5*365.2524},u[l.BIANNUAL]={datefield:h.DATEFIELD_M,step:6,spacing:432e5*365.2524},u[l.ANNUAL]={datefield:h.DATEFIELD_Y,step:1,spacing:864e5*365.2524},u[l.DECADAL]={datefield:h.DATEFIELD_Y,step:10,spacing:315578073600},u[l.CENTENNIAL]={datefield:h.DATEFIELD_Y,step:100,spacing:3155780736e3};var d=function(){for(var t=[],e=-39;e<=39;e++)for(var a=Math.pow(10,e),i=1;i<=9;i++){var n=a*i;t.push(n)}return t}(),c=function(t,e,a,i){for(var n=i(\"pixelsPerLabel\"),r=0;r<l.NUM_GRANULARITIES;r++){if(a/p(t,e,r)>=n)return r}return-1},p=function(t,e,a){var i=u[a].spacing;return Math.round(1*(e-t)/i)},g=function(t,e,a,i,r){var o=i(\"axisLabelFormatter\"),s=i(\"labelsUTC\"),d=s?n.DateAccessorsUTC:n.DateAccessorsLocal,c=u[a].datefield,p=u[a].step,g=u[a].spacing,f=new Date(t),v=[];v[h.DATEFIELD_Y]=d.getFullYear(f),v[h.DATEFIELD_M]=d.getMonth(f),v[h.DATEFIELD_D]=d.getDate(f),v[h.DATEFIELD_HH]=d.getHours(f),v[h.DATEFIELD_MM]=d.getMinutes(f),v[h.DATEFIELD_SS]=d.getSeconds(f),v[h.DATEFIELD_MS]=d.getMilliseconds(f);var _=v[c]%p;a==l.WEEKLY&&(_=d.getDay(f)),v[c]-=_;for(var y=c+1;y<h.NUM_DATEFIELDS;y++)v[y]=y===h.DATEFIELD_D?1:0;var x=[],m=d.makeDate.apply(null,v),b=m.getTime();if(a<=l.HOURLY)for(b<t&&(b+=g,m=new Date(b));b<=e;)x.push({v:b,label:o.call(r,m,a,i,r)}),b+=g,m=new Date(b);else for(b<t&&(v[c]+=p,m=d.makeDate.apply(null,v),b=m.getTime());b<=e;)(a>=l.DAILY||d.getHours(m)%p==0)&&x.push({v:b,label:o.call(r,m,a,i,r)}),v[c]+=p,m=d.makeDate.apply(null,v),b=m.getTime();return x};a.getDateAxis=g},{\"./dygraph-utils\":17}],17:[function(t,e,a){\"use strict\";function i(t,e,a){t.removeEventListener(e,a,!1)}function n(t){return t=t||window.event,t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,t.cancel=!0,t.returnValue=!1,!1}function r(t,e,a){var i,n,r;if(0===e)i=a,n=a,r=a;else{var o=Math.floor(6*t),s=6*t-o,l=a*(1-e),h=a*(1-e*s),u=a*(1-e*(1-s));switch(o){case 1:i=h,n=a,r=l;break;case 2:i=l,n=a,r=u;break;case 3:i=l,n=h,r=a;break;case 4:i=u,n=l,r=a;break;case 5:i=a,n=l,r=h;break;case 6:case 0:i=a,n=u,r=l}}return i=Math.floor(255*i+.5),n=Math.floor(255*n+.5),r=Math.floor(255*r+.5),\"rgb(\"+i+\",\"+n+\",\"+r+\")\"}function o(t){var e=t.getBoundingClientRect(),a=window,i=document.documentElement;return{x:e.left+(a.pageXOffset||i.scrollLeft),y:e.top+(a.pageYOffset||i.scrollTop)}}function s(t){return!t.pageX||t.pageX<0?0:t.pageX}function l(t){return!t.pageY||t.pageY<0?0:t.pageY}function h(t,e){return s(t)-e.px}function u(t,e){return l(t)-e.py}function d(t){return!!t&&!isNaN(t)}function c(t,e){return!!t&&(null!==t.yval&&(null!==t.x&&void 0!==t.x&&(null!==t.y&&void 0!==t.y&&!(isNaN(t.x)||!e&&isNaN(t.y)))))}function p(t,e){var a=Math.min(Math.max(1,e||2),21);return Math.abs(t)<.001&&0!==t?t.toExponential(a-1):t.toPrecision(a)}function g(t){return t<10?\"0\"+t:\"\"+t}function f(t,e,a,i){var n=g(t)+\":\"+g(e);if(a&&(n+=\":\"+g(a),i)){var r=\"\"+i;n+=\".\"+(\"000\"+r).substring(r.length)}return n}function v(t,e){var a=e?tt:$,i=new Date(t),n=a.getFullYear(i),r=a.getMonth(i),o=a.getDate(i),s=a.getHours(i),l=a.getMinutes(i),h=a.getSeconds(i),u=a.getMilliseconds(i),d=\"\"+n,c=g(r+1),p=g(o),v=3600*s+60*l+h+.001*u,_=d+\"/\"+c+\"/\"+p;return v&&(_+=\" \"+f(s,l,h,u)),_}function _(t,e){var a=Math.pow(10,e);return Math.round(t*a)/a}function y(t,e,a,i,n){for(var r=!0;r;){var o=t,s=e,l=a,h=i,u=n;if(r=!1,null!==h&&void 0!==h&&null!==u&&void 0!==u||(h=0,u=s.length-1),h>u)return-1;null!==l&&void 0!==l||(l=0);var d,c=function(t){return t>=0&&t<s.length},p=parseInt((h+u)/2,10),g=s[p];if(g==o)return p;if(g>o){if(l>0&&(d=p-1,c(d)&&s[d]<o))return p;t=o,e=s,a=l,i=h,n=p-1,r=!0,c=p=g=d=void 0}else{if(!(g<o))return-1;if(l<0&&(d=p+1,c(d)&&s[d]>o))return p;t=o,e=s,a=l,i=p+1,n=u,r=!0,c=p=g=d=void 0}}}function x(t){var e,a;if((-1==t.search(\"-\")||-1!=t.search(\"T\")||-1!=t.search(\"Z\"))&&(a=m(t))&&!isNaN(a))return a;if(-1!=t.search(\"-\")){for(e=t.replace(\"-\",\"/\",\"g\");-1!=e.search(\"-\");)e=e.replace(\"-\",\"/\");a=m(e)}else 8==t.length?(e=t.substr(0,4)+\"/\"+t.substr(4,2)+\"/\"+t.substr(6,2),a=m(e)):a=m(t);return a&&!isNaN(a)||console.error(\"Couldn't parse \"+t+\" as a date\"),a}function m(t){return new Date(t).getTime()}function b(t,e){if(void 0!==e&&null!==e)for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return t}function w(t,e){if(void 0!==e&&null!==e)for(var a in e)e.hasOwnProperty(a)&&(null===e[a]?t[a]=null:A(e[a])?t[a]=e[a].slice():!function(t){return\"object\"==typeof Node?t instanceof Node:\"object\"==typeof t&&\"number\"==typeof t.nodeType&&\"string\"==typeof t.nodeName}(e[a])&&\"object\"==typeof e[a]?(\"object\"==typeof t[a]&&null!==t[a]||(t[a]={}),w(t[a],e[a])):t[a]=e[a]);return t}function A(t){var e=typeof t;return(\"object\"==e||\"function\"==e&&\"function\"==typeof t.item)&&null!==t&&\"number\"==typeof t.length&&3!==t.nodeType}function O(t){return\"object\"==typeof t&&null!==t&&\"function\"==typeof t.getTime}function D(t){for(var e=[],a=0;a<t.length;a++)A(t[a])?e.push(D(t[a])):e.push(t[a]);return e}function E(){return document.createElement(\"canvas\")}function L(t){try{var e=window.devicePixelRatio,a=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return void 0!==e?e/a:1}catch(t){return 1}}function T(t,e,a,i){e=e||0,a=a||t.length,this.hasNext=!0,this.peek=null,this.start_=e,this.array_=t,this.predicate_=i,this.end_=Math.min(t.length,e+a),this.nextIdx_=e-1,this.next()}function S(t,e,a,i){return new T(t,e,a,i)}function P(t,e,a,i){var n,r=0,o=(new Date).getTime();if(t(r),1==e)return void i();var s=e-1;!function l(){r>=e||et.call(window,function(){var e=(new Date).getTime(),h=e-o;n=r,r=Math.floor(h/a);var u=r-n;r+u>s||r>=s?(t(s),i()):(0!==u&&t(r),l())})}()}function C(t,e){var a={};if(t)for(var i=1;i<t.length;i++)a[t[i]]=!0;var n=function(t){for(var e in t)if(t.hasOwnProperty(e)&&!at[e])return!0;return!1};for(var r in e)if(e.hasOwnProperty(r))if(\"highlightSeriesOpts\"==r||a[r]&&!e.series){if(n(e[r]))return!0}else if(\"series\"==r||\"axes\"==r){var o=e[r];for(var s in o)if(o.hasOwnProperty(s)&&n(o[s]))return!0}else if(!at[r])return!0;return!1}function M(t){for(var e=0;e<t.length;e++){var a=t.charAt(e);if(\"\\r\"===a)return e+1<t.length&&\"\\n\"===t.charAt(e+1)?\"\\r\\n\":a;if(\"\\n\"===a)return e+1<t.length&&\"\\r\"===t.charAt(e+1)?\"\\n\\r\":a}return null}function N(t,e){if(null===e||null===t)return!1;for(var a=t;a&&a!==e;)a=a.parentNode;return a===e}function F(t,e){return e<0?1/Math.pow(t,-e):Math.pow(t,e)}function k(t){var e=nt.exec(t);if(!e)return null;var a=parseInt(e[1],10),i=parseInt(e[2],10),n=parseInt(e[3],10);return e[4]?{r:a,g:i,b:n,a:parseFloat(e[4])}:{r:a,g:i,b:n}}function R(t){var e=k(t);if(e)return e;var a=document.createElement(\"div\");a.style.backgroundColor=t,a.style.visibility=\"hidden\",document.body.appendChild(a);var i=window.getComputedStyle(a,null).backgroundColor;return document.body.removeChild(a),k(i)}function I(t){try{(t||document.createElement(\"canvas\")).getContext(\"2d\")}catch(t){return!1}return!0}function H(t,e,a){var i=parseFloat(t);if(!isNaN(i))return i;if(/^ *$/.test(t))return null;if(/^ *nan *$/i.test(t))return NaN;var n=\"Unable to parse '\"+t+\"' as a number\";return void 0!==a&&void 0!==e&&(n+=\" on line \"+(1+(e||0))+\" ('\"+a+\"') of CSV.\"),console.error(n),null}function Y(t,e){var a=e(\"sigFigs\");if(null!==a)return p(t,a);var i,n=e(\"digitsAfterDecimal\"),r=e(\"maxNumberWidth\"),o=e(\"labelsKMB\"),s=e(\"labelsKMG2\");if(i=0!==t&&(Math.abs(t)>=Math.pow(10,r)||Math.abs(t)<Math.pow(10,-n))?t.toExponential(n):\"\"+_(t,n),o||s){var l,h=[],u=[];o&&(l=1e3,h=rt),s&&(o&&console.warn(\"Setting both labelsKMB and labelsKMG2. Pick one!\"),l=1024,h=ot,u=st);for(var d=Math.abs(t),c=F(l,h.length),g=h.length-1;g>=0;g--,c/=l)if(d>=c){i=_(t/c,n)+h[g];break}if(s){var f=String(t.toExponential()).split(\"e-\");2===f.length&&f[1]>=3&&f[1]<=24&&(i=f[1]%3>0?_(f[0]/F(10,f[1]%3),n):Number(f[0]).toFixed(2),i+=u[Math.floor(f[1]/3)-1])}}return i}function X(t,e,a){return Y.call(this,t,a)}function V(t,e,a){var i=a(\"labelsUTC\"),n=i?tt:$,r=n.getFullYear(t),o=n.getMonth(t),s=n.getDate(t),l=n.getHours(t),h=n.getMinutes(t),u=n.getSeconds(t),d=n.getMilliseconds(t);if(e>=G.Granularity.DECADAL)return\"\"+r;if(e>=G.Granularity.MONTHLY)return lt[o]+\" \"+r;if(0===3600*l+60*h+u+.001*d||e>=G.Granularity.DAILY)return g(s)+\" \"+lt[o];if(e<G.Granularity.SECONDLY){var c=\"\"+d;return g(u)+\".\"+(\"000\"+c).substring(c.length)}return e>G.Granularity.MINUTELY?f(l,h,u,0):f(l,h,u,d)}function Z(t,e){return v(t,e(\"labelsUTC\"))}Object.defineProperty(a,\"__esModule\",{value:!0}),a.removeEvent=i,a.cancelEvent=n,a.hsvToRGB=r,a.findPos=o,a.pageX=s,a.pageY=l,a.dragGetX_=h,a.dragGetY_=u,a.isOK=d,a.isValidPoint=c,a.floatFormat=p,a.zeropad=g,a.hmsString_=f,a.dateString_=v,a.round_=_,a.binarySearch=y,a.dateParser=x,a.dateStrToMillis=m,a.update=b,a.updateDeep=w,a.isArrayLike=A,a.isDateLike=O,a.clone=D,a.createCanvas=E,a.getContextPixelRatio=L,a.Iterator=T,a.createIterator=S,a.repeatAndCleanup=P,a.isPixelChangingOptionList=C,a.detectLineDelimiter=M,a.isNodeContainedBy=N,a.pow=F,a.toRGB_=R,a.isCanvasSupported=I,a.parseFloat_=H,a.numberValueFormatter=Y,a.numberAxisLabelFormatter=X,a.dateAxisLabelFormatter=V,a.dateValueFormatter=Z;var B=t(\"./dygraph-tickers\"),G=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(B);a.LOG_SCALE=10;var W=Math.log(10);a.LN_TEN=W;var U=function(t){return Math.log(t)/W};a.log10=U;var z=function(t,e,a){var i=U(t),n=U(e),r=i+a*(n-i);return Math.pow(10,r)};a.logRangeFraction=z;var j=[2,2];a.DOTTED_LINE=j;var K=[7,3];a.DASHED_LINE=K;var q=[7,2,2,2];a.DOT_DASH_LINE=q;a.HORIZONTAL=1;a.VERTICAL=2;var Q=function(t){return t.getContext(\"2d\")};a.getContext=Q;var J=function(t,e,a){t.addEventListener(e,a,!1)};a.addEvent=J;var $={getFullYear:function(t){return t.getFullYear()},getMonth:function(t){return t.getMonth()},getDate:function(t){return t.getDate()},getHours:function(t){return t.getHours()},getMinutes:function(t){return t.getMinutes()},getSeconds:function(t){return t.getSeconds()},getMilliseconds:function(t){return t.getMilliseconds()},getDay:function(t){return t.getDay()},makeDate:function(t,e,a,i,n,r,o){return new Date(t,e,a,i,n,r,o)}};a.DateAccessorsLocal=$;var tt={getFullYear:function(t){return t.getUTCFullYear()},getMonth:function(t){return t.getUTCMonth()},getDate:function(t){return t.getUTCDate()},getHours:function(t){return t.getUTCHours()},getMinutes:function(t){return t.getUTCMinutes()},getSeconds:function(t){return t.getUTCSeconds()},getMilliseconds:function(t){return t.getUTCMilliseconds()},getDay:function(t){return t.getUTCDay()},makeDate:function(t,e,a,i,n,r,o){return new Date(Date.UTC(t,e,a,i,n,r,o))}};a.DateAccessorsUTC=tt,T.prototype.next=function(){if(!this.hasNext)return null;for(var t=this.peek,e=this.nextIdx_+1,a=!1;e<this.end_;){if(!this.predicate_||this.predicate_(this.array_,e)){this.peek=this.array_[e],a=!0;break}e++}return this.nextIdx_=e,a||(this.hasNext=!1,this.peek=null),t};var et=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();a.requestAnimFrame=et;var at={annotationClickHandler:!0,annotationDblClickHandler:!0,annotationMouseOutHandler:!0,annotationMouseOverHandler:!0,axisLineColor:!0,axisLineWidth:!0,clickCallback:!0,drawCallback:!0,drawHighlightPointCallback:!0,drawPoints:!0,drawPointCallback:!0,drawGrid:!0,fillAlpha:!0,gridLineColor:!0,gridLineWidth:!0,hideOverlayOnMouseOut:!0,highlightCallback:!0,highlightCircleSize:!0,interactionModel:!0,labelsDiv:!0,labelsKMB:!0,labelsKMG2:!0,labelsSeparateLines:!0,labelsShowZeroValues:!0,legend:!0,panEdgeFraction:!0,pixelsPerYLabel:!0,pointClickCallback:!0,pointSize:!0,rangeSelectorPlotFillColor:!0,rangeSelectorPlotFillGradientColor:!0,rangeSelectorPlotStrokeColor:!0,rangeSelectorBackgroundStrokeColor:!0,rangeSelectorBackgroundLineWidth:!0,rangeSelectorPlotLineWidth:!0,rangeSelectorForegroundStrokeColor:!0,rangeSelectorForegroundLineWidth:!0,rangeSelectorAlpha:!0,showLabelsOnHighlight:!0,showRoller:!0,strokeWidth:!0,underlayCallback:!0,unhighlightCallback:!0,zoomCallback:!0},it={DEFAULT:function(t,e,a,i,n,r,o){a.beginPath(),a.fillStyle=r,a.arc(i,n,o,0,2*Math.PI,!1),a.fill()}};a.Circles=it;var nt=/^rgba?\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})(?:,\\s*([01](?:\\.\\d+)?))?\\)$/,rt=[\"K\",\"M\",\"B\",\"T\",\"Q\"],ot=[\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"],st=[\"m\",\"u\",\"n\",\"p\",\"f\",\"a\",\"z\",\"y\"],lt=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]},{\"./dygraph-tickers\":16}],18:[function(t,e,a){(function(i){\"use strict\";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}function o(t){var e=t[0],a=e[0];if(\"number\"!=typeof a&&!x.isDateLike(a))throw new Error(\"Expected number or date but got \"+typeof a+\": \"+a+\".\");for(var i=1;i<e.length;i++){var n=e[i];if(null!==n&&void 0!==n&&(\"number\"!=typeof n&&!x.isArrayLike(n)))throw new Error(\"Expected number or array but got \"+typeof n+\": \"+n+\".\")}}Object.defineProperty(a,\"__esModule\",{value:!0});var s=function(){function t(t,e){var a=[],i=!0,n=!1,r=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(a.push(o.value),!e||a.length!==e);i=!0);}catch(t){n=!0,r=t}finally{try{!i&&s.return&&s.return()}finally{if(n)throw r}}return a}return function(e,a){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,a);throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}}(),l=t(\"./dygraph-layout\"),h=r(l),u=t(\"./dygraph-canvas\"),d=r(u),c=t(\"./dygraph-options\"),p=r(c),g=t(\"./dygraph-interaction-model\"),f=r(g),v=t(\"./dygraph-tickers\"),_=n(v),y=t(\"./dygraph-utils\"),x=n(y),m=t(\"./dygraph-default-attrs\"),b=r(m),w=t(\"./dygraph-options-reference\"),A=(r(w),t(\"./iframe-tarp\")),O=r(A),D=t(\"./datahandler/default\"),E=r(D),L=t(\"./datahandler/bars-error\"),T=r(L),S=t(\"./datahandler/bars-custom\"),P=r(S),C=t(\"./datahandler/default-fractions\"),M=r(C),N=t(\"./datahandler/bars-fractions\"),F=r(N),k=t(\"./datahandler/bars\"),R=r(k),I=t(\"./plugins/annotations\"),H=r(I),Y=t(\"./plugins/axes\"),X=r(Y),V=t(\"./plugins/chart-labels\"),Z=r(V),B=t(\"./plugins/grid\"),G=r(B),W=t(\"./plugins/legend\"),U=r(W),z=t(\"./plugins/range-selector\"),j=r(z),K=t(\"./dygraph-gviz\"),q=r(K),Q=function(t,e,a){this.__init__(t,e,a)};Q.NAME=\"Dygraph\",Q.VERSION=\"2.1.0\",Q.DEFAULT_ROLL_PERIOD=1,Q.DEFAULT_WIDTH=480,Q.DEFAULT_HEIGHT=320,Q.ANIMATION_STEPS=12,Q.ANIMATION_DURATION=200,Q.Plotters=d.default._Plotters,Q.addedAnnotationCSS=!1,Q.prototype.__init__=function(t,e,a){if(this.is_initial_draw_=!0,this.readyFns_=[],null!==a&&void 0!==a||(a={}),a=Q.copyUserAttrs_(a),\"string\"==typeof t&&(t=document.getElementById(t)),!t)throw new Error(\"Constructing dygraph with a non-existent div!\");this.maindiv_=t,this.file_=e,this.rollPeriod_=a.rollPeriod||Q.DEFAULT_ROLL_PERIOD,this.previousVerticalX_=-1,this.fractions_=a.fractions||!1,this.dateWindow_=a.dateWindow||null,this.annotations_=[],t.innerHTML=\"\",\"\"===t.style.width&&a.width&&(t.style.width=a.width+\"px\"),\"\"===t.style.height&&a.height&&(t.style.height=a.height+\"px\"),\"\"===t.style.height&&0===t.clientHeight&&(t.style.height=Q.DEFAULT_HEIGHT+\"px\",\"\"===t.style.width&&(t.style.width=Q.DEFAULT_WIDTH+\"px\")),this.width_=t.clientWidth||a.width||0,this.height_=t.clientHeight||a.height||0,a.stackedGraph&&(a.fillGraph=!0),this.user_attrs_={},x.update(this.user_attrs_,a),this.attrs_={},x.updateDeep(this.attrs_,b.default),this.boundaryIds_=[],this.setIndexByName_={},this.datasetIndex_=[],this.registeredEvents_=[],this.eventListeners_={},this.attributes_=new p.default(this),this.createInterface_(),this.plugins_=[];for(var i=Q.PLUGINS.concat(this.getOption(\"plugins\")),n=0;n<i.length;n++){var r,o=i[n];r=void 0!==o.activate?o:new o;var s={plugin:r,events:{},options:{},pluginOptions:{}},l=r.activate(this);for(var h in l)l.hasOwnProperty(h)&&(s.events[h]=l[h]);this.plugins_.push(s)}for(var n=0;n<this.plugins_.length;n++){var u=this.plugins_[n];for(var h in u.events)if(u.events.hasOwnProperty(h)){var d=u.events[h],c=[u.plugin,d];h in this.eventListeners_?this.eventListeners_[h].push(c):this.eventListeners_[h]=[c]}}this.createDragInterface_(),this.start_()},Q.prototype.cascadeEvents_=function(t,e){if(!(t in this.eventListeners_))return!1;var a={dygraph:this,cancelable:!1,defaultPrevented:!1,preventDefault:function(){if(!a.cancelable)throw\"Cannot call preventDefault on non-cancelable event.\";a.defaultPrevented=!0},propagationStopped:!1,stopPropagation:function(){a.propagationStopped=!0}};x.update(a,e);var i=this.eventListeners_[t];if(i)for(var n=i.length-1;n>=0;n--){var r=i[n][0],o=i[n][1];if(o.call(r,a),a.propagationStopped)break}return a.defaultPrevented},Q.prototype.getPluginInstance_=function(t){for(var e=0;e<this.plugins_.length;e++){var a=this.plugins_[e];if(a.plugin instanceof t)return a.plugin}return null},Q.prototype.isZoomed=function(t){var e=!!this.dateWindow_;if(\"x\"===t)return e;var a=this.axes_.map(function(t){return!!t.valueRange}).indexOf(!0)>=0;if(null===t||void 0===t)return e||a;if(\"y\"===t)return a;throw new Error(\"axis parameter is [\"+t+\"] must be null, 'x' or 'y'.\")},Q.prototype.toString=function(){var t=this.maindiv_;return\"[Dygraph \"+(t&&t.id?t.id:t)+\"]\"},Q.prototype.attr_=function(t,e){return e?this.attributes_.getForSeries(t,e):this.attributes_.get(t)},Q.prototype.getOption=function(t,e){return this.attr_(t,e)},Q.prototype.getNumericOption=function(t,e){return this.getOption(t,e)},Q.prototype.getStringOption=function(t,e){return this.getOption(t,e)},Q.prototype.getBooleanOption=function(t,e){return this.getOption(t,e)},Q.prototype.getFunctionOption=function(t,e){return this.getOption(t,e)},Q.prototype.getOptionForAxis=function(t,e){return this.attributes_.getForAxis(t,e)},Q.prototype.optionsViewForAxis_=function(t){var e=this;return function(a){var i=e.user_attrs_.axes;return i&&i[t]&&i[t].hasOwnProperty(a)?i[t][a]:(\"x\"!==t||\"logscale\"!==a)&&(void 0!==e.user_attrs_[a]?e.user_attrs_[a]:(i=e.attrs_.axes,i&&i[t]&&i[t].hasOwnProperty(a)?i[t][a]:\"y\"==t&&e.axes_[0].hasOwnProperty(a)?e.axes_[0][a]:\"y2\"==t&&e.axes_[1].hasOwnProperty(a)?e.axes_[1][a]:e.attr_(a)))}},Q.prototype.rollPeriod=function(){return this.rollPeriod_},Q.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},Q.prototype.xAxisExtremes=function(){var t=this.getNumericOption(\"xRangePad\")/this.plotter_.area.w;if(0===this.numRows())return[0-t,1+t];var e=this.rawData_[0][0],a=this.rawData_[this.rawData_.length-1][0];if(t){var i=a-e;e-=i*t,a+=i*t}return[e,a]},Q.prototype.yAxisExtremes=function(){var t=this.gatherDatasets_(this.rolledSeries_,null),e=t.extremes,a=this.axes_;this.computeYAxisRanges_(e);var i=this.axes_;return this.axes_=a,i.map(function(t){return t.extremeRange})},Q.prototype.yAxisRange=function(t){if(void 0===t&&(t=0),t<0||t>=this.axes_.length)return null;var e=this.axes_[t];return[e.computedValueRange[0],e.computedValueRange[1]]},Q.prototype.yAxisRanges=function(){for(var t=[],e=0;e<this.axes_.length;e++)t.push(this.yAxisRange(e));return t},Q.prototype.toDomCoords=function(t,e,a){return[this.toDomXCoord(t),this.toDomYCoord(e,a)]},Q.prototype.toDomXCoord=function(t){if(null===t)return null;var e=this.plotter_.area,a=this.xAxisRange();return e.x+(t-a[0])/(a[1]-a[0])*e.w},Q.prototype.toDomYCoord=function(t,e){var a=this.toPercentYCoord(t,e);if(null===a)return null;var i=this.plotter_.area;return i.y+a*i.h},Q.prototype.toDataCoords=function(t,e,a){return[this.toDataXCoord(t),this.toDataYCoord(e,a)]},Q.prototype.toDataXCoord=function(t){if(null===t)return null;var e=this.plotter_.area,a=this.xAxisRange();if(this.attributes_.getForAxis(\"logscale\",\"x\")){var i=(t-e.x)/e.w;return x.logRangeFraction(a[0],a[1],i)}return a[0]+(t-e.x)/e.w*(a[1]-a[0])},Q.prototype.toDataYCoord=function(t,e){if(null===t)return null;var a=this.plotter_.area,i=this.yAxisRange(e);if(void 0===e&&(e=0),this.attributes_.getForAxis(\"logscale\",e)){var n=(t-a.y)/a.h;return x.logRangeFraction(i[1],i[0],n)}return i[0]+(a.y+a.h-t)/a.h*(i[1]-i[0])},Q.prototype.toPercentYCoord=function(t,e){if(null===t)return null;void 0===e&&(e=0);var a,i=this.yAxisRange(e);if(this.attributes_.getForAxis(\"logscale\",e)){var n=x.log10(i[0]),r=x.log10(i[1]);a=(r-x.log10(t))/(r-n)}else a=(i[1]-t)/(i[1]-i[0]);return a},Q.prototype.toPercentXCoord=function(t){if(null===t)return null;var e,a=this.xAxisRange();if(!0===this.attributes_.getForAxis(\"logscale\",\"x\")){var i=x.log10(a[0]),n=x.log10(a[1]);e=(x.log10(t)-i)/(n-i)}else e=(t-a[0])/(a[1]-a[0]);return e},Q.prototype.numColumns=function(){return this.rawData_?this.rawData_[0]?this.rawData_[0].length:this.attr_(\"labels\").length:0},Q.prototype.numRows=function(){return this.rawData_?this.rawData_.length:0},Q.prototype.getValue=function(t,e){return t<0||t>this.rawData_.length?null:e<0||e>this.rawData_[t].length?null:this.rawData_[t][e]},Q.prototype.createInterface_=function(){var t=this.maindiv_;this.graphDiv=document.createElement(\"div\"),this.graphDiv.style.textAlign=\"left\",this.graphDiv.style.position=\"relative\",t.appendChild(this.graphDiv),this.canvas_=x.createCanvas(),this.canvas_.style.position=\"absolute\",this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=x.getContext(this.canvas_),this.hidden_ctx_=x.getContext(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new h.default(this);var e=this;this.mouseMoveHandler_=function(t){e.mouseMove_(t)},this.mouseOutHandler_=function(t){var a=t.target||t.fromElement,i=t.relatedTarget||t.toElement;x.isNodeContainedBy(a,e.graphDiv)&&!x.isNodeContainedBy(i,e.graphDiv)&&e.mouseOut_(t)},this.addAndTrackEvent(window,\"mouseout\",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,\"mousemove\",this.mouseMoveHandler_),this.resizeHandler_||(this.resizeHandler_=function(t){e.resize()},this.addAndTrackEvent(window,\"resize\",this.resizeHandler_))},Q.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+\"px\",this.graphDiv.style.height=this.height_+\"px\";var t=this.getNumericOption(\"pixelRatio\"),e=t||x.getContextPixelRatio(this.canvas_ctx_);this.canvas_.width=this.width_*e,this.canvas_.height=this.height_*e,this.canvas_.style.width=this.width_+\"px\",this.canvas_.style.height=this.height_+\"px\",1!==e&&this.canvas_ctx_.scale(e,e);var a=t||x.getContextPixelRatio(this.hidden_ctx_);this.hidden_.width=this.width_*a,this.hidden_.height=this.height_*a,this.hidden_.style.width=this.width_+\"px\",this.hidden_.style.height=this.height_+\"px\",1!==a&&this.hidden_ctx_.scale(a,a)},Q.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var t=this.plugins_.length-1;t>=0;t--){var e=this.plugins_.pop();e.plugin.destroy&&e.plugin.destroy()}this.removeTrackedEvents_(),x.removeEvent(window,\"mouseout\",this.mouseOutHandler_),x.removeEvent(this.mouseEventElement_,\"mousemove\",this.mouseMoveHandler_),x.removeEvent(window,\"resize\",this.resizeHandler_),this.resizeHandler_=null,function t(e){for(;e.hasChildNodes();)t(e.firstChild),e.removeChild(e.firstChild)}(this.maindiv_);var a=function(t){for(var e in t)\"object\"==typeof t[e]&&(t[e]=null)};a(this.layout_),a(this.plotter_),a(this)},Q.prototype.createPlotKitCanvas_=function(t){var e=x.createCanvas();return e.style.position=\"absolute\",e.style.top=t.style.top,e.style.left=t.style.left,\ne.width=this.width_,e.height=this.height_,e.style.width=this.width_+\"px\",e.style.height=this.height_+\"px\",e},Q.prototype.createMouseEventElement_=function(){return this.canvas_},Q.prototype.setColors_=function(){var t=this.getLabels(),e=t.length-1;this.colors_=[],this.colorsMap_={};for(var a=this.getNumericOption(\"colorSaturation\")||1,i=this.getNumericOption(\"colorValue\")||.5,n=Math.ceil(e/2),r=this.getOption(\"colors\"),o=this.visibility(),s=0;s<e;s++)if(o[s]){var l=t[s+1],h=this.attributes_.getForSeries(\"color\",l);if(!h)if(r)h=r[s%r.length];else{var u=s%2?n+(s+1)/2:Math.ceil((s+1)/2),d=1*u/(1+e);h=x.hsvToRGB(d,a,i)}this.colors_.push(h),this.colorsMap_[l]=h}},Q.prototype.getColors=function(){return this.colors_},Q.prototype.getPropertiesForSeries=function(t){for(var e=-1,a=this.getLabels(),i=1;i<a.length;i++)if(a[i]==t){e=i;break}return-1==e?null:{name:t,column:e,visible:this.visibility()[e-1],color:this.colorsMap_[t],axis:1+this.attributes_.axisForSeries(t)}},Q.prototype.createRollInterface_=function(){var t=this,e=this.roller_;e||(this.roller_=e=document.createElement(\"input\"),e.type=\"text\",e.style.display=\"none\",e.className=\"dygraph-roller\",this.graphDiv.appendChild(e));var a=this.getBooleanOption(\"showRoller\")?\"block\":\"none\",i=this.getArea(),n={top:i.y+i.h-25+\"px\",left:i.x+1+\"px\",display:a};e.size=\"2\",e.value=this.rollPeriod_,x.update(e.style,n),e.onchange=function(){return t.adjustRoll(e.value)}},Q.prototype.createDragInterface_=function(){var t={isZooming:!1,isPanning:!1,is2DPan:!1,dragStartX:null,dragStartY:null,dragEndX:null,dragEndY:null,dragDirection:null,prevEndX:null,prevEndY:null,prevDragDirection:null,cancelNextDblclick:!1,initialLeftmostDate:null,xUnitsPerPixel:null,dateRange:null,px:0,py:0,boundedDates:null,boundedValues:null,tarp:new O.default,initializeMouseDown:function(t,e,a){t.preventDefault?t.preventDefault():(t.returnValue=!1,t.cancelBubble=!0);var i=x.findPos(e.canvas_);a.px=i.x,a.py=i.y,a.dragStartX=x.dragGetX_(t,a),a.dragStartY=x.dragGetY_(t,a),a.cancelNextDblclick=!1,a.tarp.cover()},destroy:function(){var t=this;if((t.isZooming||t.isPanning)&&(t.isZooming=!1,t.dragStartX=null,t.dragStartY=null),t.isPanning){t.isPanning=!1,t.draggingDate=null,t.dateRange=null;for(var e=0;e<a.axes_.length;e++)delete a.axes_[e].draggingValue,delete a.axes_[e].dragValueRange}t.tarp.uncover()}},e=this.getOption(\"interactionModel\"),a=this;for(var i in e)e.hasOwnProperty(i)&&this.addAndTrackEvent(this.mouseEventElement_,i,function(e){return function(i){e(i,a,t)}}(e[i]));if(!e.willDestroyContextMyself){var n=function(e){t.destroy()};this.addAndTrackEvent(document,\"mouseup\",n)}},Q.prototype.drawZoomRect_=function(t,e,a,i,n,r,o,s){var l=this.canvas_ctx_;r==x.HORIZONTAL?l.clearRect(Math.min(e,o),this.layout_.getPlotArea().y,Math.abs(e-o),this.layout_.getPlotArea().h):r==x.VERTICAL&&l.clearRect(this.layout_.getPlotArea().x,Math.min(i,s),this.layout_.getPlotArea().w,Math.abs(i-s)),t==x.HORIZONTAL?a&&e&&(l.fillStyle=\"rgba(128,128,128,0.33)\",l.fillRect(Math.min(e,a),this.layout_.getPlotArea().y,Math.abs(a-e),this.layout_.getPlotArea().h)):t==x.VERTICAL&&n&&i&&(l.fillStyle=\"rgba(128,128,128,0.33)\",l.fillRect(this.layout_.getPlotArea().x,Math.min(i,n),this.layout_.getPlotArea().w,Math.abs(n-i)))},Q.prototype.clearZoomRect_=function(){this.currentZoomRectArgs_=null,this.canvas_ctx_.clearRect(0,0,this.width_,this.height_)},Q.prototype.doZoomX_=function(t,e){this.currentZoomRectArgs_=null;var a=this.toDataXCoord(t),i=this.toDataXCoord(e);this.doZoomXDates_(a,i)},Q.prototype.doZoomXDates_=function(t,e){var a=this,i=this.xAxisRange(),n=[t,e],r=this.getFunctionOption(\"zoomCallback\");this.doAnimatedZoom(i,n,null,null,function(){r&&r.call(a,t,e,a.yAxisRanges())})},Q.prototype.doZoomY_=function(t,e){var a=this;this.currentZoomRectArgs_=null;for(var i=this.yAxisRanges(),n=[],r=0;r<this.axes_.length;r++){var o=this.toDataYCoord(t,r),l=this.toDataYCoord(e,r);n.push([l,o])}var h=this.getFunctionOption(\"zoomCallback\");this.doAnimatedZoom(null,null,i,n,function(){if(h){var t=a.xAxisRange(),e=s(t,2),i=e[0],n=e[1];h.call(a,i,n,a.yAxisRanges())}})},Q.zoomAnimationFunction=function(t,e){return(1-Math.pow(1.5,-t))/(1-Math.pow(1.5,-e))},Q.prototype.resetZoom=function(){var t=this,e=this.isZoomed(\"x\"),a=this.isZoomed(\"y\"),i=e||a;if(this.clearSelection(),i){var n=this.xAxisExtremes(),r=s(n,2),o=r[0],l=r[1],h=this.getBooleanOption(\"animatedZooms\"),u=this.getFunctionOption(\"zoomCallback\");if(!h)return this.dateWindow_=null,this.axes_.forEach(function(t){t.valueRange&&delete t.valueRange}),this.drawGraph_(),void(u&&u.call(this,o,l,this.yAxisRanges()));var d=null,c=null,p=null,g=null;e&&(d=this.xAxisRange(),c=[o,l]),a&&(p=this.yAxisRanges(),g=this.yAxisExtremes()),this.doAnimatedZoom(d,c,p,g,function(){t.dateWindow_=null,t.axes_.forEach(function(t){t.valueRange&&delete t.valueRange}),u&&u.call(t,o,l,t.yAxisRanges())})}},Q.prototype.doAnimatedZoom=function(t,e,a,i,n){var r,o,s=this,l=this.getBooleanOption(\"animatedZooms\")?Q.ANIMATION_STEPS:1,h=[],u=[];if(null!==t&&null!==e)for(r=1;r<=l;r++)o=Q.zoomAnimationFunction(r,l),h[r-1]=[t[0]*(1-o)+o*e[0],t[1]*(1-o)+o*e[1]];if(null!==a&&null!==i)for(r=1;r<=l;r++){o=Q.zoomAnimationFunction(r,l);for(var d=[],c=0;c<this.axes_.length;c++)d.push([a[c][0]*(1-o)+o*i[c][0],a[c][1]*(1-o)+o*i[c][1]]);u[r-1]=d}x.repeatAndCleanup(function(t){if(u.length)for(var e=0;e<s.axes_.length;e++){var a=u[t][e];s.axes_[e].valueRange=[a[0],a[1]]}h.length&&(s.dateWindow_=h[t]),s.drawGraph_()},l,Q.ANIMATION_DURATION/l,n)},Q.prototype.getArea=function(){return this.plotter_.area},Q.prototype.eventToDomCoords=function(t){if(t.offsetX&&t.offsetY)return[t.offsetX,t.offsetY];var e=x.findPos(this.mouseEventElement_);return[x.pageX(t)-e.x,x.pageY(t)-e.y]},Q.prototype.findClosestRow=function(t){for(var e=1/0,a=-1,i=this.layout_.points,n=0;n<i.length;n++)for(var r=i[n],o=r.length,s=0;s<o;s++){var l=r[s];if(x.isValidPoint(l,!0)){var h=Math.abs(l.canvasx-t);h<e&&(e=h,a=l.idx)}}return a},Q.prototype.findClosestPoint=function(t,e){for(var a,i,n,r,o,s,l,h=1/0,u=this.layout_.points.length-1;u>=0;--u)for(var d=this.layout_.points[u],c=0;c<d.length;++c)r=d[c],x.isValidPoint(r)&&(i=r.canvasx-t,n=r.canvasy-e,(a=i*i+n*n)<h&&(h=a,o=r,s=u,l=r.idx));return{row:l,seriesName:this.layout_.setNames[s],point:o}},Q.prototype.findStackedPoint=function(t,e){for(var a,i,n=this.findClosestRow(t),r=0;r<this.layout_.points.length;++r){var o=this.getLeftBoundary_(r),s=n-o,l=this.layout_.points[r];if(!(s>=l.length)){var h=l[s];if(x.isValidPoint(h)){var u=h.canvasy;if(t>h.canvasx&&s+1<l.length){var d=l[s+1];if(x.isValidPoint(d)){var c=d.canvasx-h.canvasx;if(c>0){var p=(t-h.canvasx)/c;u+=p*(d.canvasy-h.canvasy)}}}else if(t<h.canvasx&&s>0){var g=l[s-1];if(x.isValidPoint(g)){var c=h.canvasx-g.canvasx;if(c>0){var p=(h.canvasx-t)/c;u+=p*(g.canvasy-h.canvasy)}}}(0===r||u<e)&&(a=h,i=r)}}}return{row:n,seriesName:this.layout_.setNames[i],point:a}},Q.prototype.mouseMove_=function(t){var e=this.layout_.points;if(void 0!==e&&null!==e){var a=this.eventToDomCoords(t),i=a[0],n=a[1],r=this.getOption(\"highlightSeriesOpts\"),o=!1;if(r&&!this.isSeriesLocked()){var s;s=this.getBooleanOption(\"stackedGraph\")?this.findStackedPoint(i,n):this.findClosestPoint(i,n),o=this.setSelection(s.row,s.seriesName)}else{var l=this.findClosestRow(i);o=this.setSelection(l)}var h=this.getFunctionOption(\"highlightCallback\");h&&o&&h.call(this,t,this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}},Q.prototype.getLeftBoundary_=function(t){if(this.boundaryIds_[t])return this.boundaryIds_[t][0];for(var e=0;e<this.boundaryIds_.length;e++)if(void 0!==this.boundaryIds_[e])return this.boundaryIds_[e][0];return 0},Q.prototype.animateSelection_=function(t){void 0===this.fadeLevel&&(this.fadeLevel=0),void 0===this.animateId&&(this.animateId=0);var e=this.fadeLevel,a=t<0?e:10-e;if(a<=0)return void(this.fadeLevel&&this.updateSelection_(1));var i=++this.animateId,n=this,r=function(){0!==n.fadeLevel&&t<0&&(n.fadeLevel=0,n.clearSelection())};x.repeatAndCleanup(function(e){n.animateId==i&&(n.fadeLevel+=t,0===n.fadeLevel?n.clearSelection():n.updateSelection_(n.fadeLevel/10))},a,30,r)},Q.prototype.updateSelection_=function(t){this.cascadeEvents_(\"select\",{selectedRow:-1===this.lastRow_?void 0:this.lastRow_,selectedX:-1===this.lastx_?void 0:this.lastx_,selectedPoints:this.selPoints_});var e,a=this.canvas_ctx_;if(this.getOption(\"highlightSeriesOpts\")){a.clearRect(0,0,this.width_,this.height_);var i=1-this.getNumericOption(\"highlightSeriesBackgroundAlpha\"),n=x.toRGB_(this.getOption(\"highlightSeriesBackgroundColor\"));if(i){if(void 0===t)return void this.animateSelection_(1);i*=t,a.fillStyle=\"rgba(\"+n.r+\",\"+n.g+\",\"+n.b+\",\"+i+\")\",a.fillRect(0,0,this.width_,this.height_)}this.plotter_._renderLineChart(this.highlightSet_,a)}else if(this.previousVerticalX_>=0){var r=0,o=this.attr_(\"labels\");for(e=1;e<o.length;e++){var s=this.getNumericOption(\"highlightCircleSize\",o[e]);s>r&&(r=s)}var l=this.previousVerticalX_;a.clearRect(l-r-1,0,2*r+2,this.height_)}if(this.selPoints_.length>0){var h=this.selPoints_[0].canvasx;for(a.save(),e=0;e<this.selPoints_.length;e++){var u=this.selPoints_[e];if(!isNaN(u.canvasy)){var d=this.getNumericOption(\"highlightCircleSize\",u.name),c=this.getFunctionOption(\"drawHighlightPointCallback\",u.name),p=this.plotter_.colors[u.name];c||(c=x.Circles.DEFAULT),a.lineWidth=this.getNumericOption(\"strokeWidth\",u.name),a.strokeStyle=p,a.fillStyle=p,c.call(this,this,u.name,a,h,u.canvasy,p,d,u.idx)}}a.restore(),this.previousVerticalX_=h}},Q.prototype.setSelection=function(t,e,a){this.selPoints_=[];var i=!1;if(!1!==t&&t>=0){t!=this.lastRow_&&(i=!0),this.lastRow_=t;for(var n=0;n<this.layout_.points.length;++n){var r=this.layout_.points[n],o=t-this.getLeftBoundary_(n);if(o>=0&&o<r.length&&r[o].idx==t){var s=r[o];null!==s.yval&&this.selPoints_.push(s)}else for(var l=0;l<r.length;++l){var s=r[l];if(s.idx==t){null!==s.yval&&this.selPoints_.push(s);break}}}}else this.lastRow_>=0&&(i=!0),this.lastRow_=-1;return this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=-1,void 0!==e&&(this.highlightSet_!==e&&(i=!0),this.highlightSet_=e),void 0!==a&&(this.lockedSet_=a),i&&this.updateSelection_(void 0),i},Q.prototype.mouseOut_=function(t){this.getFunctionOption(\"unhighlightCallback\")&&this.getFunctionOption(\"unhighlightCallback\").call(this,t),this.getBooleanOption(\"hideOverlayOnMouseOut\")&&!this.lockedSet_&&this.clearSelection()},Q.prototype.clearSelection=function(){if(this.cascadeEvents_(\"deselect\",{}),this.lockedSet_=!1,this.fadeLevel)return void this.animateSelection_(-1);this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=-1,this.lastRow_=-1,this.highlightSet_=null},Q.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var t=0;t<this.layout_.points.length;t++)for(var e=this.layout_.points[t],a=0;a<e.length;a++)if(e[a].x==this.selPoints_[0].x)return e[a].idx;return-1},Q.prototype.getHighlightSeries=function(){return this.highlightSet_},Q.prototype.isSeriesLocked=function(){return this.lockedSet_},Q.prototype.loadedEvent_=function(t){this.rawData_=this.parseCSV_(t),this.cascadeDataDidUpdateEvent_(),this.predraw_()},Q.prototype.addXTicks_=function(){var t;t=this.dateWindow_?[this.dateWindow_[0],this.dateWindow_[1]]:this.xAxisExtremes();var e=this.optionsViewForAxis_(\"x\"),a=e(\"ticker\")(t[0],t[1],this.plotter_.area.w,e,this);this.layout_.setXTicks(a)},Q.prototype.getHandlerClass_=function(){return this.attr_(\"dataHandler\")?this.attr_(\"dataHandler\"):this.fractions_?this.getBooleanOption(\"errorBars\")?F.default:M.default:this.getBooleanOption(\"customBars\")?P.default:this.getBooleanOption(\"errorBars\")?T.default:E.default},Q.prototype.predraw_=function(){var t=new Date;this.dataHandler_=new(this.getHandlerClass_()),this.layout_.computePlotArea(),this.computeYAxes_(),this.is_initial_draw_||(this.canvas_ctx_.restore(),this.hidden_ctx_.restore()),this.canvas_ctx_.save(),this.hidden_ctx_.save(),this.plotter_=new d.default(this,this.hidden_,this.hidden_ctx_,this.layout_),this.createRollInterface_(),this.cascadeEvents_(\"predraw\"),this.rolledSeries_=[null];for(var e=1;e<this.numColumns();e++){var a=this.dataHandler_.extractSeries(this.rawData_,e,this.attributes_);this.rollPeriod_>1&&(a=this.dataHandler_.rollingAverage(a,this.rollPeriod_,this.attributes_)),this.rolledSeries_.push(a)}this.drawGraph_();var i=new Date;this.drawingTimeMs_=i-t},Q.PointType=void 0,Q.stackPoints_=function(t,e,a,i){for(var n=null,r=null,o=null,s=-1,l=0;l<t.length;++l){var h=t[l],u=h.xval;void 0===e[u]&&(e[u]=0);var d=h.yval;isNaN(d)||null===d?\"none\"==i?d=0:(!function(e){if(!(s>=e))for(var a=e;a<t.length;++a)if(o=null,!isNaN(t[a].yval)&&null!==t[a].yval){s=a,o=t[a];break}}(l),d=r&&o&&\"none\"!=i?r.yval+(o.yval-r.yval)*((u-r.xval)/(o.xval-r.xval)):r&&\"all\"==i?r.yval:o&&\"all\"==i?o.yval:0):r=h;var c=e[u];n!=u&&(c+=d,e[u]=c),n=u,h.yval_stacked=c,c>a[1]&&(a[1]=c),c<a[0]&&(a[0]=c)}},Q.prototype.gatherDatasets_=function(t,e){var a,i,n,r,o,s,l=[],h=[],u=[],d={},c=t.length-1;for(a=c;a>=1;a--)if(this.visibility()[a-1]){if(e){s=t[a];var p=e[0],g=e[1];for(n=null,r=null,i=0;i<s.length;i++)s[i][0]>=p&&null===n&&(n=i),s[i][0]<=g&&(r=i);null===n&&(n=0);for(var f=n,v=!0;v&&f>0;)f--,v=null===s[f][1];null===r&&(r=s.length-1);var _=r;for(v=!0;v&&_<s.length-1;)_++,v=null===s[_][1];f!==n&&(n=f),_!==r&&(r=_),l[a-1]=[n,r],s=s.slice(n,r+1)}else s=t[a],l[a-1]=[0,s.length-1];var y=this.attr_(\"labels\")[a],x=this.dataHandler_.getExtremeYValues(s,e,this.getBooleanOption(\"stepPlot\",y)),m=this.dataHandler_.seriesToPoints(s,y,l[a-1][0]);this.getBooleanOption(\"stackedGraph\")&&(o=this.attributes_.axisForSeries(y),void 0===u[o]&&(u[o]=[]),Q.stackPoints_(m,u[o],x,this.getBooleanOption(\"stackedGraphNaNFill\"))),d[y]=x,h[a]=m}return{points:h,extremes:d,boundaryIds:l}},Q.prototype.drawGraph_=function(){var t=new Date,e=this.is_initial_draw_;this.is_initial_draw_=!1,this.layout_.removeAllDatasets(),this.setColors_(),this.attrs_.pointSize=.5*this.getNumericOption(\"highlightCircleSize\");var a=this.gatherDatasets_(this.rolledSeries_,this.dateWindow_),i=a.points,n=a.extremes;this.boundaryIds_=a.boundaryIds,this.setIndexByName_={};for(var r=this.attr_(\"labels\"),o=0,s=1;s<i.length;s++)this.visibility()[s-1]&&(this.layout_.addDataset(r[s],i[s]),this.datasetIndex_[s]=o++);for(var s=0;s<r.length;s++)this.setIndexByName_[r[s]]=s;if(this.computeYAxisRanges_(n),this.layout_.setYAxes(this.axes_),this.addXTicks_(),this.layout_.evaluate(),this.renderGraph_(e),this.getStringOption(\"timingName\")){var l=new Date;console.log(this.getStringOption(\"timingName\")+\" - drawGraph: \"+(l-t)+\"ms\")}},Q.prototype.renderGraph_=function(t){this.cascadeEvents_(\"clearChart\"),this.plotter_.clear();var e=this.getFunctionOption(\"underlayCallback\");e&&e.call(this,this.hidden_ctx_,this.layout_.getPlotArea(),this,this);var a={canvas:this.hidden_,drawingContext:this.hidden_ctx_};this.cascadeEvents_(\"willDrawChart\",a),this.plotter_.render(),this.cascadeEvents_(\"didDrawChart\",a),this.lastRow_=-1,this.canvas_.getContext(\"2d\").clearRect(0,0,this.width_,this.height_);var i=this.getFunctionOption(\"drawCallback\");if(null!==i&&i.call(this,this,t),t)for(this.readyFired_=!0;this.readyFns_.length>0;){var n=this.readyFns_.pop();n(this)}},Q.prototype.computeYAxes_=function(){var t,e,a;for(this.axes_=[],t=0;t<this.attributes_.numAxes();t++)e={g:this},x.update(e,this.attributes_.axisOptions(t)),this.axes_[t]=e;for(t=0;t<this.axes_.length;t++)if(0===t)e=this.optionsViewForAxis_(\"y\"+(t?\"2\":\"\")),(a=e(\"valueRange\"))&&(this.axes_[t].valueRange=a);else{var i=this.user_attrs_.axes;i&&i.y2&&(a=i.y2.valueRange)&&(this.axes_[t].valueRange=a)}},Q.prototype.numAxes=function(){return this.attributes_.numAxes()},Q.prototype.axisPropertiesForSeries=function(t){return this.axes_[this.attributes_.axisForSeries(t)]},Q.prototype.computeYAxisRanges_=function(t){for(var e,a,i,n,r,o=function(t){return isNaN(parseFloat(t))},s=this.attributes_.numAxes(),l=0;l<s;l++){var h=this.axes_[l],u=this.attributes_.getForAxis(\"logscale\",l),d=this.attributes_.getForAxis(\"includeZero\",l),c=this.attributes_.getForAxis(\"independentTicks\",l);i=this.attributes_.seriesForAxis(l),e=!0,n=.1;var p=this.getNumericOption(\"yRangePad\");if(null!==p&&(e=!1,n=p/this.plotter_.area.h),0===i.length)h.extremeRange=[0,1];else{for(var g,f,v=1/0,_=-1/0,y=0;y<i.length;y++)t.hasOwnProperty(i[y])&&(g=t[i[y]][0],null!==g&&(v=Math.min(g,v)),null!==(f=t[i[y]][1])&&(_=Math.max(f,_)));d&&!u&&(v>0&&(v=0),_<0&&(_=0)),v==1/0&&(v=0),_==-1/0&&(_=1),a=_-v,0===a&&(0!==_?a=Math.abs(_):(_=1,a=1));var m=_,b=v;e&&(u?(m=_+n*a,b=v):(m=_+n*a,b=v-n*a,b<0&&v>=0&&(b=0),m>0&&_<=0&&(m=0))),h.extremeRange=[b,m]}if(h.valueRange){var w=o(h.valueRange[0])?h.extremeRange[0]:h.valueRange[0],A=o(h.valueRange[1])?h.extremeRange[1]:h.valueRange[1];h.computedValueRange=[w,A]}else h.computedValueRange=h.extremeRange;if(!e)if(w=h.computedValueRange[0],A=h.computedValueRange[1],w===A&&(w-=.5,A+=.5),u){var O=n/(2*n-1),D=(n-1)/(2*n-1);h.computedValueRange[0]=x.logRangeFraction(w,A,O),h.computedValueRange[1]=x.logRangeFraction(w,A,D)}else a=A-w,h.computedValueRange[0]=w-a*n,h.computedValueRange[1]=A+a*n;if(c){h.independentTicks=c;var E=this.optionsViewForAxis_(\"y\"+(l?\"2\":\"\")),L=E(\"ticker\");h.ticks=L(h.computedValueRange[0],h.computedValueRange[1],this.plotter_.area.h,E,this),r||(r=h)}}if(void 0===r)throw'Configuration Error: At least one axis has to have the \"independentTicks\" option activated.';for(var l=0;l<s;l++){var h=this.axes_[l];if(!h.independentTicks){for(var E=this.optionsViewForAxis_(\"y\"+(l?\"2\":\"\")),L=E(\"ticker\"),T=r.ticks,S=r.computedValueRange[1]-r.computedValueRange[0],P=h.computedValueRange[1]-h.computedValueRange[0],C=[],M=0;M<T.length;M++){var N=(T[M].v-r.computedValueRange[0])/S,F=h.computedValueRange[0]+N*P;C.push(F)}h.ticks=L(h.computedValueRange[0],h.computedValueRange[1],this.plotter_.area.h,E,this,C)}}},Q.prototype.detectTypeFromString_=function(t){var e=!1,a=t.indexOf(\"-\");a>0&&\"e\"!=t[a-1]&&\"E\"!=t[a-1]||t.indexOf(\"/\")>=0||isNaN(parseFloat(t))?e=!0:8==t.length&&t>\"19700101\"&&t<\"20371231\"&&(e=!0),this.setXAxisOptions_(e)},Q.prototype.setXAxisOptions_=function(t){t?(this.attrs_.xValueParser=x.dateParser,this.attrs_.axes.x.valueFormatter=x.dateValueFormatter,this.attrs_.axes.x.ticker=_.dateTicker,this.attrs_.axes.x.axisLabelFormatter=x.dateAxisLabelFormatter):(this.attrs_.xValueParser=function(t){return parseFloat(t)},this.attrs_.axes.x.valueFormatter=function(t){return t},this.attrs_.axes.x.ticker=_.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},Q.prototype.parseCSV_=function(t){var e,a,i=[],n=x.detectLineDelimiter(t),r=t.split(n||\"\\n\"),o=this.getStringOption(\"delimiter\");-1==r[0].indexOf(o)&&r[0].indexOf(\"\\t\")>=0&&(o=\"\\t\");var s=0;\"labels\"in this.user_attrs_||(s=1,this.attrs_.labels=r[0].split(o),this.attributes_.reparseSeries());for(var l,h=!1,u=this.attr_(\"labels\").length,d=!1,c=s;c<r.length;c++){var p=r[c];if(c,0!==p.length&&\"#\"!=p[0]){var g=p.split(o);if(!(g.length<2)){var f=[];if(h||(this.detectTypeFromString_(g[0]),l=this.getFunctionOption(\"xValueParser\"),h=!0),f[0]=l(g[0],this),this.fractions_)for(a=1;a<g.length;a++)e=g[a].split(\"/\"),2!=e.length?(console.error('Expected fractional \"num/den\" values in CSV data but found a value \\''+g[a]+\"' on line \"+(1+c)+\" ('\"+p+\"') which is not of this form.\"),f[a]=[0,0]):f[a]=[x.parseFloat_(e[0],c,p),x.parseFloat_(e[1],c,p)];else if(this.getBooleanOption(\"errorBars\"))for(g.length%2!=1&&console.error(\"Expected alternating (value, stdev.) pairs in CSV data but line \"+(1+c)+\" has an odd number of values (\"+(g.length-1)+\"): '\"+p+\"'\"),a=1;a<g.length;a+=2)f[(a+1)/2]=[x.parseFloat_(g[a],c,p),x.parseFloat_(g[a+1],c,p)];else if(this.getBooleanOption(\"customBars\"))for(a=1;a<g.length;a++){var v=g[a];/^ *$/.test(v)?f[a]=[null,null,null]:(e=v.split(\";\"),3==e.length?f[a]=[x.parseFloat_(e[0],c,p),x.parseFloat_(e[1],c,p),x.parseFloat_(e[2],c,p)]:console.warn('When using customBars, values must be either blank or \"low;center;high\" tuples (got \"'+v+'\" on line '+(1+c)))}else for(a=1;a<g.length;a++)f[a]=x.parseFloat_(g[a],c,p);if(i.length>0&&f[0]<i[i.length-1][0]&&(d=!0),f.length!=u&&console.error(\"Number of columns in line \"+c+\" (\"+f.length+\") does not agree with number of labels (\"+u+\") \"+p),0===c&&this.attr_(\"labels\")){var _=!0;for(a=0;_&&a<f.length;a++)f[a]&&(_=!1);if(_){console.warn(\"The dygraphs 'labels' option is set, but the first row of CSV data ('\"+p+\"') appears to also contain labels. Will drop the CSV labels and use the option labels.\");continue}}i.push(f)}}}return d&&(console.warn(\"CSV is out of order; order it correctly to speed loading.\"),i.sort(function(t,e){return t[0]-e[0]})),i},Q.prototype.parseArray_=function(t){if(0===t.length)return console.error(\"Can't plot empty data set\"),null;if(0===t[0].length)return console.error(\"Data set cannot contain an empty row\"),null;o(t);var e;if(null===this.attr_(\"labels\")){for(console.warn(\"Using default labels. Set labels explicitly via 'labels' in the options parameter\"),this.attrs_.labels=[\"X\"],e=1;e<t[0].length;e++)this.attrs_.labels.push(\"Y\"+e);this.attributes_.reparseSeries()}else{var a=this.attr_(\"labels\");if(a.length!=t[0].length)return console.error(\"Mismatch between number of labels (\"+a+\") and number of columns in array (\"+t[0].length+\")\"),null}if(x.isDateLike(t[0][0])){this.attrs_.axes.x.valueFormatter=x.dateValueFormatter,this.attrs_.axes.x.ticker=_.dateTicker,this.attrs_.axes.x.axisLabelFormatter=x.dateAxisLabelFormatter;var i=x.clone(t);for(e=0;e<t.length;e++){if(0===i[e].length)return console.error(\"Row \"+(1+e)+\" of data is empty\"),null;if(null===i[e][0]||\"function\"!=typeof i[e][0].getTime||isNaN(i[e][0].getTime()))return console.error(\"x value in row \"+(1+e)+\" is not a Date\"),null;i[e][0]=i[e][0].getTime()}return i}return this.attrs_.axes.x.valueFormatter=function(t){return t},this.attrs_.axes.x.ticker=_.numericTicks,this.attrs_.axes.x.axisLabelFormatter=x.numberAxisLabelFormatter,t},Q.prototype.parseDataTable_=function(t){var e=t.getNumberOfColumns(),a=t.getNumberOfRows(),i=t.getColumnType(0);if(\"date\"==i||\"datetime\"==i)this.attrs_.xValueParser=x.dateParser,this.attrs_.axes.x.valueFormatter=x.dateValueFormatter,this.attrs_.axes.x.ticker=_.dateTicker,this.attrs_.axes.x.axisLabelFormatter=x.dateAxisLabelFormatter;else{if(\"number\"!=i)throw new Error(\"only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '\"+i+\"')\");this.attrs_.xValueParser=function(t){return parseFloat(t)},this.attrs_.axes.x.valueFormatter=function(t){return t},this.attrs_.axes.x.ticker=_.numericTicks,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var n,r,o=[],s={},l=!1;for(n=1;n<e;n++){var h=t.getColumnType(n);if(\"number\"==h)o.push(n);else{if(\"string\"!=h||!this.getBooleanOption(\"displayAnnotations\"))throw new Error(\"Only 'number' is supported as a dependent type with Gviz. 'string' is only supported if displayAnnotations is true\");var u=o[o.length-1];s.hasOwnProperty(u)?s[u].push(n):s[u]=[n],l=!0}}var d=[t.getColumnLabel(0)];for(n=0;n<o.length;n++)d.push(t.getColumnLabel(o[n])),this.getBooleanOption(\"errorBars\")&&(n+=1);this.attrs_.labels=d,e=d.length;var c=[],p=!1,g=[];for(n=0;n<a;n++){var f=[];if(void 0!==t.getValue(n,0)&&null!==t.getValue(n,0)){if(\"date\"==i||\"datetime\"==i?f.push(t.getValue(n,0).getTime()):f.push(t.getValue(n,0)),this.getBooleanOption(\"errorBars\"))for(r=0;r<e-1;r++)f.push([t.getValue(n,1+2*r),t.getValue(n,2+2*r)]);else{for(r=0;r<o.length;r++){var v=o[r];if(f.push(t.getValue(n,v)),l&&s.hasOwnProperty(v)&&null!==t.getValue(n,s[v][0])){var y={};y.series=t.getColumnLabel(v),y.xval=f[0],y.shortText=function(t){var e=String.fromCharCode(65+t%26);for(t=Math.floor(t/26);t>0;)e=String.fromCharCode(65+(t-1)%26)+e.toLowerCase(),t=Math.floor((t-1)/26);return e}(g.length),y.text=\"\";for(var m=0;m<s[v].length;m++)m&&(y.text+=\"\\n\"),y.text+=t.getValue(n,s[v][m]);g.push(y)}}for(r=0;r<f.length;r++)isFinite(f[r])||(f[r]=null)}c.length>0&&f[0]<c[c.length-1][0]&&(p=!0),c.push(f)}else console.warn(\"Ignoring row \"+n+\" of DataTable because of undefined or null first column.\")}p&&(console.warn(\"DataTable is out of order; order it correctly to speed loading.\"),c.sort(function(t,e){return t[0]-e[0]})),this.rawData_=c,g.length>0&&this.setAnnotations(g,!0),this.attributes_.reparseSeries()},Q.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_(\"dataDidUpdate\",{})},Q.prototype.start_=function(){var t=this.file_;if(\"function\"==typeof t&&(t=t()),x.isArrayLike(t))this.rawData_=this.parseArray_(t),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if(\"object\"==typeof t&&\"function\"==typeof t.getColumnRange)this.parseDataTable_(t),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if(\"string\"==typeof t){var e=x.detectLineDelimiter(t);if(e)this.loadedEvent_(t);else{var a;a=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject(\"Microsoft.XMLHTTP\");var i=this;a.onreadystatechange=function(){4==a.readyState&&(200!==a.status&&0!==a.status||i.loadedEvent_(a.responseText))},a.open(\"GET\",t,!0),a.send(null)}}else console.error(\"Unknown data format: \"+typeof t)},Q.prototype.updateOptions=function(t,e){void 0===e&&(e=!1);var a=t.file,i=Q.copyUserAttrs_(t);\"rollPeriod\"in i&&(this.rollPeriod_=i.rollPeriod),\"dateWindow\"in i&&(this.dateWindow_=i.dateWindow);var n=x.isPixelChangingOptionList(this.attr_(\"labels\"),i);x.updateDeep(this.user_attrs_,i),this.attributes_.reparseSeries(),a?(this.cascadeEvents_(\"dataWillUpdate\",{}),this.file_=a,e||this.start_()):e||(n?this.predraw_():this.renderGraph_(!1))},Q.copyUserAttrs_=function(t){var e={};for(var a in t)t.hasOwnProperty(a)&&\"file\"!=a&&t.hasOwnProperty(a)&&(e[a]=t[a]);return e},Q.prototype.resize=function(t,e){if(!this.resize_lock){this.resize_lock=!0,null===t!=(null===e)&&(console.warn(\"Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.\"),t=e=null);var a=this.width_,i=this.height_;t?(this.maindiv_.style.width=t+\"px\",this.maindiv_.style.height=e+\"px\",this.width_=t,this.height_=e):(this.width_=this.maindiv_.clientWidth,this.height_=this.maindiv_.clientHeight),a==this.width_&&i==this.height_||(this.resizeElements_(),this.predraw_()),this.resize_lock=!1}},Q.prototype.adjustRoll=function(t){this.rollPeriod_=t,this.predraw_()},Q.prototype.visibility=function(){for(this.getOption(\"visibility\")||(this.attrs_.visibility=[]);this.getOption(\"visibility\").length<this.numColumns()-1;)this.attrs_.visibility.push(!0);return this.getOption(\"visibility\")},Q.prototype.setVisibility=function(t,e){var a=this.visibility(),i=!1;if(Array.isArray(t)||(null!==t&&\"object\"==typeof t?i=!0:t=[t]),i)for(var n in t)t.hasOwnProperty(n)&&(n<0||n>=a.length?console.warn(\"Invalid series number in setVisibility: \"+n):a[n]=t[n]);else for(var n=0;n<t.length;n++)\"boolean\"==typeof t[n]?n>=a.length?console.warn(\"Invalid series number in setVisibility: \"+n):a[n]=t[n]:t[n]<0||t[n]>=a.length?console.warn(\"Invalid series number in setVisibility: \"+t[n]):a[t[n]]=e;this.predraw_()},Q.prototype.size=function(){return{width:this.width_,height:this.height_}},Q.prototype.setAnnotations=function(t,e){if(this.annotations_=t,!this.layout_)return void console.warn(\"Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html\");this.layout_.setAnnotations(this.annotations_),e||this.predraw_()},Q.prototype.annotations=function(){return this.annotations_},Q.prototype.getLabels=function(){var t=this.attr_(\"labels\");return t?t.slice():null},Q.prototype.indexFromSetName=function(t){return this.setIndexByName_[t]},Q.prototype.getRowForX=function(t){for(var e=0,a=this.numRows()-1;e<=a;){var i=a+e>>1,n=this.getValue(i,0);if(n<t)e=i+1;else if(n>t)a=i-1;else{if(e==i)return i;a=i}}return null},Q.prototype.ready=function(t){this.is_initial_draw_?this.readyFns_.push(t):t.call(this,this)},Q.prototype.addAndTrackEvent=function(t,e,a){x.addEvent(t,e,a),this.registeredEvents_.push({elem:t,type:e,fn:a})},Q.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var t=0;t<this.registeredEvents_.length;t++){var e=this.registeredEvents_[t];x.removeEvent(e.elem,e.type,e.fn)}this.registeredEvents_=[]},Q.PLUGINS=[U.default,X.default,j.default,Z.default,H.default,G.default],Q.GVizChart=q.default,Q.DASHED_LINE=x.DASHED_LINE,Q.DOT_DASH_LINE=x.DOT_DASH_LINE,Q.dateAxisLabelFormatter=x.dateAxisLabelFormatter,Q.toRGB_=x.toRGB_,Q.findPos=x.findPos,Q.pageX=x.pageX,Q.pageY=x.pageY,Q.dateString_=x.dateString_,Q.defaultInteractionModel=f.default.defaultModel,Q.nonInteractiveModel=Q.nonInteractiveModel_=f.default.nonInteractiveModel_,Q.Circles=x.Circles,Q.Plugins={Legend:U.default,Axes:X.default,Annotations:H.default,ChartLabels:Z.default,Grid:G.default,RangeSelector:j.default},Q.DataHandlers={DefaultHandler:E.default,BarsHandler:R.default,CustomBarsHandler:P.default,DefaultFractionHandler:M.default,ErrorBarsHandler:T.default,FractionsBarsHandler:F.default},Q.startPan=f.default.startPan,Q.startZoom=f.default.startZoom,Q.movePan=f.default.movePan,Q.moveZoom=f.default.moveZoom,Q.endPan=f.default.endPan,Q.endZoom=f.default.endZoom,Q.numericLinearTicks=_.numericLinearTicks,Q.numericTicks=_.numericTicks,Q.dateTicker=_.dateTicker,Q.Granularity=_.Granularity,Q.getDateAxis=_.getDateAxis,Q.floatFormat=x.floatFormat,a.default=Q,e.exports=a.default}).call(this,t(\"_process\"))},{\"./datahandler/bars\":5,\"./datahandler/bars-custom\":2,\"./datahandler/bars-error\":3,\"./datahandler/bars-fractions\":4,\"./datahandler/default\":8,\"./datahandler/default-fractions\":7,\"./dygraph-canvas\":9,\"./dygraph-default-attrs\":10,\"./dygraph-gviz\":11,\"./dygraph-interaction-model\":12,\"./dygraph-layout\":13,\"./dygraph-options\":15,\"./dygraph-options-reference\":14,\"./dygraph-tickers\":16,\"./dygraph-utils\":17,\"./iframe-tarp\":19,\"./plugins/annotations\":20,\"./plugins/axes\":21,\"./plugins/chart-labels\":22,\"./plugins/grid\":23,\"./plugins/legend\":24,\"./plugins/range-selector\":25,_process:1}],19:[function(t,e,a){\"use strict\";function i(){this.tarps=[]}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"./dygraph-utils\"),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(n);i.prototype.cover=function(){for(var t=document.getElementsByTagName(\"iframe\"),e=0;e<t.length;e++){var a=t[e],i=r.findPos(a),n=i.x,o=i.y,s=a.offsetWidth,l=a.offsetHeight,h=document.createElement(\"div\");h.style.position=\"absolute\",h.style.left=n+\"px\",h.style.top=o+\"px\",h.style.width=s+\"px\",h.style.height=l+\"px\",h.style.zIndex=999,document.body.appendChild(h),this.tarps.push(h)}},i.prototype.uncover=function(){for(var t=0;t<this.tarps.length;t++)this.tarps[t].parentNode.removeChild(this.tarps[t]);this.tarps=[]},a.default=i,e.exports=a.default},{\"./dygraph-utils\":17}],20:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){this.annotations_=[]};i.prototype.toString=function(){return\"Annotations Plugin\"},i.prototype.activate=function(t){return{clearChart:this.clearChart,didDrawChart:this.didDrawChart}},i.prototype.detachLabels=function(){for(var t=0;t<this.annotations_.length;t++){var e=this.annotations_[t];e.parentNode&&e.parentNode.removeChild(e),this.annotations_[t]=null}this.annotations_=[]},i.prototype.clearChart=function(t){this.detachLabels()},i.prototype.didDrawChart=function(t){var e=t.dygraph,a=e.layout_.annotated_points;if(a&&0!==a.length)for(var i=t.canvas.parentNode,n=function(t,a,i){return function(n){var r=i.annotation;r.hasOwnProperty(t)?r[t](r,i,e,n):e.getOption(a)&&e.getOption(a)(r,i,e,n)}},r=t.dygraph.getArea(),o={},s=0;s<a.length;s++){var l=a[s];if(!(l.canvasx<r.x||l.canvasx>r.x+r.w||l.canvasy<r.y||l.canvasy>r.y+r.h)){var h=l.annotation,u=6;h.hasOwnProperty(\"tickHeight\")&&(u=h.tickHeight);var d=document.createElement(\"div\");d.style.fontSize=e.getOption(\"axisLabelFontSize\")+\"px\"\n;var c=\"dygraph-annotation\";h.hasOwnProperty(\"icon\")||(c+=\" dygraphDefaultAnnotation dygraph-default-annotation\"),h.hasOwnProperty(\"cssClass\")&&(c+=\" \"+h.cssClass),d.className=c;var p=h.hasOwnProperty(\"width\")?h.width:16,g=h.hasOwnProperty(\"height\")?h.height:16;if(h.hasOwnProperty(\"icon\")){var f=document.createElement(\"img\");f.src=h.icon,f.width=p,f.height=g,d.appendChild(f)}else l.annotation.hasOwnProperty(\"shortText\")&&d.appendChild(document.createTextNode(l.annotation.shortText));var v=l.canvasx-p/2;d.style.left=v+\"px\";var _=0;if(h.attachAtBottom){var y=r.y+r.h-g-u;o[v]?y-=o[v]:o[v]=0,o[v]+=u+g,_=y}else _=l.canvasy-g-u;d.style.top=_+\"px\",d.style.width=p+\"px\",d.style.height=g+\"px\",d.title=l.annotation.text,d.style.color=e.colorsMap_[l.name],d.style.borderColor=e.colorsMap_[l.name],h.div=d,e.addAndTrackEvent(d,\"click\",n(\"clickHandler\",\"annotationClickHandler\",l)),e.addAndTrackEvent(d,\"mouseover\",n(\"mouseOverHandler\",\"annotationMouseOverHandler\",l)),e.addAndTrackEvent(d,\"mouseout\",n(\"mouseOutHandler\",\"annotationMouseOutHandler\",l)),e.addAndTrackEvent(d,\"dblclick\",n(\"dblClickHandler\",\"annotationDblClickHandler\",l)),i.appendChild(d),this.annotations_.push(d);var x=t.drawingContext;if(x.save(),x.strokeStyle=h.hasOwnProperty(\"tickColor\")?h.tickColor:e.colorsMap_[l.name],x.lineWidth=h.hasOwnProperty(\"tickWidth\")?h.tickWidth:e.getOption(\"strokeWidth\"),x.beginPath(),h.attachAtBottom){var y=_+g;x.moveTo(l.canvasx,y),x.lineTo(l.canvasx,y+u)}else x.moveTo(l.canvasx,l.canvasy),x.lineTo(l.canvasx,l.canvasy-2-u);x.closePath(),x.stroke(),x.restore()}}},i.prototype.destroy=function(){this.detachLabels()},a.default=i,e.exports=a.default},{}],21:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=t(\"../dygraph-utils\"),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(i),r=function(){this.xlabels_=[],this.ylabels_=[]};r.prototype.toString=function(){return\"Axes Plugin\"},r.prototype.activate=function(t){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}},r.prototype.layout=function(t){var e=t.dygraph;if(e.getOptionForAxis(\"drawAxis\",\"y\")){var a=e.getOptionForAxis(\"axisLabelWidth\",\"y\")+2*e.getOptionForAxis(\"axisTickSize\",\"y\");t.reserveSpaceLeft(a)}if(e.getOptionForAxis(\"drawAxis\",\"x\")){var i;i=e.getOption(\"xAxisHeight\")?e.getOption(\"xAxisHeight\"):e.getOptionForAxis(\"axisLabelFontSize\",\"x\")+2*e.getOptionForAxis(\"axisTickSize\",\"x\"),t.reserveSpaceBottom(i)}if(2==e.numAxes()){if(e.getOptionForAxis(\"drawAxis\",\"y2\")){var a=e.getOptionForAxis(\"axisLabelWidth\",\"y2\")+2*e.getOptionForAxis(\"axisTickSize\",\"y2\");t.reserveSpaceRight(a)}}else e.numAxes()>2&&e.error(\"Only two y-axes are supported at this time. (Trying to use \"+e.numAxes()+\")\")},r.prototype.detachLabels=function(){function t(t){for(var e=0;e<t.length;e++){var a=t[e];a.parentNode&&a.parentNode.removeChild(a)}}t(this.xlabels_),t(this.ylabels_),this.xlabels_=[],this.ylabels_=[]},r.prototype.clearChart=function(t){this.detachLabels()},r.prototype.willDrawChart=function(t){function e(t){return Math.round(t)+.5}function a(t){return Math.round(t)-.5}var i=this,r=t.dygraph;if(r.getOptionForAxis(\"drawAxis\",\"x\")||r.getOptionForAxis(\"drawAxis\",\"y\")||r.getOptionForAxis(\"drawAxis\",\"y2\")){var o,s,l,h=t.drawingContext,u=t.canvas.parentNode,d=r.width_,c=r.height_,p=function(t){return{position:\"absolute\",fontSize:r.getOptionForAxis(\"axisLabelFontSize\",t)+\"px\",width:r.getOptionForAxis(\"axisLabelWidth\",t)+\"px\"}},g={x:p(\"x\"),y:p(\"y\"),y2:p(\"y2\")},f=function(t,e,a){var i=document.createElement(\"div\"),r=g[\"y2\"==a?\"y2\":e];n.update(i.style,r);var o=document.createElement(\"div\");return o.className=\"dygraph-axis-label dygraph-axis-label-\"+e+(a?\" dygraph-axis-label-\"+a:\"\"),o.innerHTML=t,i.appendChild(o),i};h.save();var v=r.layout_,_=t.dygraph.plotter_.area,y=function(t){return function(e){return r.getOptionForAxis(e,t)}};if(r.getOptionForAxis(\"drawAxis\",\"y\")){if(v.yticks&&v.yticks.length>0){var x=r.numAxes(),m=[y(\"y\"),y(\"y2\")];v.yticks.forEach(function(t){if(void 0!==t.label){s=_.x;var e=\"y1\",a=m[0];1==t.axis&&(s=_.x+_.w,-1,e=\"y2\",a=m[1]);var n=a(\"axisLabelFontSize\");l=_.y+t.pos*_.h,o=f(t.label,\"y\",2==x?e:null);var r=l-n/2;r<0&&(r=0),r+n+3>c?o.style.bottom=\"0\":o.style.top=r+\"px\",0===t.axis?(o.style.left=_.x-a(\"axisLabelWidth\")-a(\"axisTickSize\")+\"px\",o.style.textAlign=\"right\"):1==t.axis&&(o.style.left=_.x+_.w+a(\"axisTickSize\")+\"px\",o.style.textAlign=\"left\"),o.style.width=a(\"axisLabelWidth\")+\"px\",u.appendChild(o),i.ylabels_.push(o)}});var b=this.ylabels_[0],w=r.getOptionForAxis(\"axisLabelFontSize\",\"y\");parseInt(b.style.top,10)+w>c-w&&(b.style.top=parseInt(b.style.top,10)-w/2+\"px\")}var A;if(r.getOption(\"drawAxesAtZero\")){var O=r.toPercentXCoord(0);(O>1||O<0||isNaN(O))&&(O=0),A=e(_.x+O*_.w)}else A=e(_.x);h.strokeStyle=r.getOptionForAxis(\"axisLineColor\",\"y\"),h.lineWidth=r.getOptionForAxis(\"axisLineWidth\",\"y\"),h.beginPath(),h.moveTo(A,a(_.y)),h.lineTo(A,a(_.y+_.h)),h.closePath(),h.stroke(),2==r.numAxes()&&(h.strokeStyle=r.getOptionForAxis(\"axisLineColor\",\"y2\"),h.lineWidth=r.getOptionForAxis(\"axisLineWidth\",\"y2\"),h.beginPath(),h.moveTo(a(_.x+_.w),a(_.y)),h.lineTo(a(_.x+_.w),a(_.y+_.h)),h.closePath(),h.stroke())}if(r.getOptionForAxis(\"drawAxis\",\"x\")){if(v.xticks){var D=y(\"x\");v.xticks.forEach(function(t){if(void 0!==t.label){s=_.x+t.pos*_.w,l=_.y+_.h,o=f(t.label,\"x\"),o.style.textAlign=\"center\",o.style.top=l+D(\"axisTickSize\")+\"px\";var e=s-D(\"axisLabelWidth\")/2;e+D(\"axisLabelWidth\")>d&&(e=d-D(\"axisLabelWidth\"),o.style.textAlign=\"right\"),e<0&&(e=0,o.style.textAlign=\"left\"),o.style.left=e+\"px\",o.style.width=D(\"axisLabelWidth\")+\"px\",u.appendChild(o),i.xlabels_.push(o)}})}h.strokeStyle=r.getOptionForAxis(\"axisLineColor\",\"x\"),h.lineWidth=r.getOptionForAxis(\"axisLineWidth\",\"x\"),h.beginPath();var E;if(r.getOption(\"drawAxesAtZero\")){var O=r.toPercentYCoord(0,0);(O>1||O<0)&&(O=1),E=a(_.y+O*_.h)}else E=a(_.y+_.h);h.moveTo(e(_.x),E),h.lineTo(e(_.x+_.w),E),h.closePath(),h.stroke()}h.restore()}},a.default=r,e.exports=a.default},{\"../dygraph-utils\":17}],22:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};i.prototype.toString=function(){return\"ChartLabels Plugin\"},i.prototype.activate=function(t){return{layout:this.layout,didDrawChart:this.didDrawChart}};var n=function(t){var e=document.createElement(\"div\");return e.style.position=\"absolute\",e.style.left=t.x+\"px\",e.style.top=t.y+\"px\",e.style.width=t.w+\"px\",e.style.height=t.h+\"px\",e};i.prototype.detachLabels_=function(){for(var t=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],e=0;e<t.length;e++){var a=t[e];a&&(a.parentNode&&a.parentNode.removeChild(a))}this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};var r=function(t,e,a,i,n){var r=document.createElement(\"div\");r.style.position=\"absolute\",r.style.left=1==a?\"0px\":e.x+\"px\",r.style.top=e.y+\"px\",r.style.width=e.w+\"px\",r.style.height=e.h+\"px\",r.style.fontSize=t.getOption(\"yLabelWidth\")-2+\"px\";var o=document.createElement(\"div\");o.style.position=\"absolute\",o.style.width=e.h+\"px\",o.style.height=e.w+\"px\",o.style.top=e.h/2-e.w/2+\"px\",o.style.left=e.w/2-e.h/2+\"px\",o.className=\"dygraph-label-rotate-\"+(1==a?\"right\":\"left\");var s=document.createElement(\"div\");return s.className=i,s.innerHTML=n,o.appendChild(s),r.appendChild(o),r};i.prototype.layout=function(t){this.detachLabels_();var e=t.dygraph,a=t.chart_div;if(e.getOption(\"title\")){var i=t.reserveSpaceTop(e.getOption(\"titleHeight\"));this.title_div_=n(i),this.title_div_.style.fontSize=e.getOption(\"titleHeight\")-8+\"px\";var o=document.createElement(\"div\");o.className=\"dygraph-label dygraph-title\",o.innerHTML=e.getOption(\"title\"),this.title_div_.appendChild(o),a.appendChild(this.title_div_)}if(e.getOption(\"xlabel\")){var s=t.reserveSpaceBottom(e.getOption(\"xLabelHeight\"));this.xlabel_div_=n(s),this.xlabel_div_.style.fontSize=e.getOption(\"xLabelHeight\")-2+\"px\";var o=document.createElement(\"div\");o.className=\"dygraph-label dygraph-xlabel\",o.innerHTML=e.getOption(\"xlabel\"),this.xlabel_div_.appendChild(o),a.appendChild(this.xlabel_div_)}if(e.getOption(\"ylabel\")){var l=t.reserveSpaceLeft(0);this.ylabel_div_=r(e,l,1,\"dygraph-label dygraph-ylabel\",e.getOption(\"ylabel\")),a.appendChild(this.ylabel_div_)}if(e.getOption(\"y2label\")&&2==e.numAxes()){var h=t.reserveSpaceRight(0);this.y2label_div_=r(e,h,2,\"dygraph-label dygraph-y2label\",e.getOption(\"y2label\")),a.appendChild(this.y2label_div_)}},i.prototype.didDrawChart=function(t){var e=t.dygraph;this.title_div_&&(this.title_div_.children[0].innerHTML=e.getOption(\"title\")),this.xlabel_div_&&(this.xlabel_div_.children[0].innerHTML=e.getOption(\"xlabel\")),this.ylabel_div_&&(this.ylabel_div_.children[0].children[0].innerHTML=e.getOption(\"ylabel\")),this.y2label_div_&&(this.y2label_div_.children[0].children[0].innerHTML=e.getOption(\"y2label\"))},i.prototype.clearChart=function(){},i.prototype.destroy=function(){this.detachLabels_()},a.default=i,e.exports=a.default},{}],23:[function(t,e,a){\"use strict\";Object.defineProperty(a,\"__esModule\",{value:!0});var i=function(){};i.prototype.toString=function(){return\"Gridline Plugin\"},i.prototype.activate=function(t){return{willDrawChart:this.willDrawChart}},i.prototype.willDrawChart=function(t){function e(t){return Math.round(t)+.5}function a(t){return Math.round(t)-.5}var i,n,r,o,s=t.dygraph,l=t.drawingContext,h=s.layout_,u=t.dygraph.plotter_.area;if(s.getOptionForAxis(\"drawGrid\",\"y\")){for(var d=[\"y\",\"y2\"],c=[],p=[],g=[],f=[],v=[],r=0;r<d.length;r++)g[r]=s.getOptionForAxis(\"drawGrid\",d[r]),g[r]&&(c[r]=s.getOptionForAxis(\"gridLineColor\",d[r]),p[r]=s.getOptionForAxis(\"gridLineWidth\",d[r]),v[r]=s.getOptionForAxis(\"gridLinePattern\",d[r]),f[r]=v[r]&&v[r].length>=2);o=h.yticks,l.save(),o.forEach(function(t){if(t.has_tick){var r=t.axis;g[r]&&(l.save(),f[r]&&l.setLineDash&&l.setLineDash(v[r]),l.strokeStyle=c[r],l.lineWidth=p[r],i=e(u.x),n=a(u.y+t.pos*u.h),l.beginPath(),l.moveTo(i,n),l.lineTo(i+u.w,n),l.stroke(),l.restore())}}),l.restore()}if(s.getOptionForAxis(\"drawGrid\",\"x\")){o=h.xticks,l.save();var v=s.getOptionForAxis(\"gridLinePattern\",\"x\"),f=v&&v.length>=2;f&&l.setLineDash&&l.setLineDash(v),l.strokeStyle=s.getOptionForAxis(\"gridLineColor\",\"x\"),l.lineWidth=s.getOptionForAxis(\"gridLineWidth\",\"x\"),o.forEach(function(t){t.has_tick&&(i=e(u.x+t.pos*u.w),n=a(u.y+u.h),l.beginPath(),l.moveTo(i,n),l.lineTo(i,u.y),l.closePath(),l.stroke())}),f&&l.setLineDash&&l.setLineDash([]),l.restore()}},i.prototype.destroy=function(){},a.default=i,e.exports=a.default},{}],24:[function(t,e,a){\"use strict\";function i(t,e,a){if(!t||t.length<=1)return'<div class=\"dygraph-legend-line\" style=\"border-bottom-color: '+e+';\"></div>';var i,n,r,o,s,l=0,h=0,u=[];for(i=0;i<=t.length;i++)l+=t[i%t.length];if((s=Math.floor(a/(l-t[0])))>1){for(i=0;i<t.length;i++)u[i]=t[i]/a;h=u.length}else{for(s=1,i=0;i<t.length;i++)u[i]=t[i]/l;h=u.length+1}var d=\"\";for(n=0;n<s;n++)for(i=0;i<h;i+=2)r=u[i%u.length],o=i<t.length?u[(i+1)%u.length]:0,d+='<div class=\"dygraph-legend-dash\" style=\"margin-right: '+o+\"em; padding-left: \"+r+'em;\"></div>';return d}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"../dygraph-utils\"),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(n),o=function(){this.legend_div_=null,this.is_generated_div_=!1};o.prototype.toString=function(){return\"Legend Plugin\"},o.prototype.activate=function(t){var e,a=t.getOption(\"labelsDiv\");return a&&null!==a?e=\"string\"==typeof a||a instanceof String?document.getElementById(a):a:(e=document.createElement(\"div\"),e.className=\"dygraph-legend\",t.graphDiv.appendChild(e),this.is_generated_div_=!0),this.legend_div_=e,this.one_em_width_=10,{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};var s=function(t){var e=document.createElement(\"span\");e.setAttribute(\"style\",\"margin: 0; padding: 0 0 0 1em; border: 0;\"),t.appendChild(e);var a=e.offsetWidth;return t.removeChild(e),a},l=function(t){return t.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\")};o.prototype.select=function(t){var e=t.selectedX,a=t.selectedPoints,i=t.selectedRow,n=t.dygraph.getOption(\"legend\");if(\"never\"===n)return void(this.legend_div_.style.display=\"none\");if(\"follow\"===n){var r=t.dygraph.plotter_.area,s=this.legend_div_.offsetWidth,l=t.dygraph.getOptionForAxis(\"axisLabelWidth\",\"y\"),h=a[0].x*r.w+50,u=a[0].y*r.h-50;h+s+1>r.w&&(h=h-100-s-(l-r.x)),t.dygraph.graphDiv.appendChild(this.legend_div_),this.legend_div_.style.left=l+h+\"px\",this.legend_div_.style.top=u+\"px\"}var d=o.generateLegendHTML(t.dygraph,e,a,this.one_em_width_,i);this.legend_div_.innerHTML=d,this.legend_div_.style.display=\"\"},o.prototype.deselect=function(t){\"always\"!==t.dygraph.getOption(\"legend\")&&(this.legend_div_.style.display=\"none\");var e=s(this.legend_div_);this.one_em_width_=e;var a=o.generateLegendHTML(t.dygraph,void 0,void 0,e,null);this.legend_div_.innerHTML=a},o.prototype.didDrawChart=function(t){this.deselect(t)},o.prototype.predraw=function(t){if(this.is_generated_div_){t.dygraph.graphDiv.appendChild(this.legend_div_);var e=t.dygraph.getArea(),a=this.legend_div_.offsetWidth;this.legend_div_.style.left=e.x+e.w-a-1+\"px\",this.legend_div_.style.top=e.y+\"px\"}},o.prototype.destroy=function(){this.legend_div_=null},o.generateLegendHTML=function(t,e,a,n,s){var h={dygraph:t,x:e,series:[]},u={},d=t.getLabels();if(d)for(var c=1;c<d.length;c++){var p=t.getPropertiesForSeries(d[c]),g=t.getOption(\"strokePattern\",d[c]),f={dashHTML:i(g,p.color,n),label:d[c],labelHTML:l(d[c]),isVisible:p.visible,color:p.color};h.series.push(f),u[d[c]]=f}if(void 0!==e){var v=t.optionsViewForAxis_(\"x\"),_=v(\"valueFormatter\");h.xHTML=_.call(t,e,v,d[0],t,s,0);for(var y=[],x=t.numAxes(),c=0;c<x;c++)y[c]=t.optionsViewForAxis_(\"y\"+(c?1+c:\"\"));var m=t.getOption(\"labelsShowZeroValues\"),b=t.getHighlightSeries();for(c=0;c<a.length;c++){var w=a[c],f=u[w.name];if(f.y=w.yval,0===w.yval&&!m||isNaN(w.canvasy))f.isVisible=!1;else{var p=t.getPropertiesForSeries(w.name),A=y[p.axis-1],O=A(\"valueFormatter\"),D=O.call(t,w.yval,A,w.name,t,s,d.indexOf(w.name));r.update(f,{yHTML:D}),w.name==b&&(f.isHighlighted=!0)}}}return(t.getOption(\"legendFormatter\")||o.defaultFormatter).call(t,h)},o.defaultFormatter=function(t){var e=t.dygraph;if(!0!==e.getOption(\"showLabelsOnHighlight\"))return\"\";var a,i=e.getOption(\"labelsSeparateLines\");if(void 0===t.x){if(\"always\"!=e.getOption(\"legend\"))return\"\";a=\"\";for(var n=0;n<t.series.length;n++){var r=t.series[n];r.isVisible&&(\"\"!==a&&(a+=i?\"<br/>\":\" \"),a+=\"<span style='font-weight: bold; color: \"+r.color+\";'>\"+r.dashHTML+\" \"+r.labelHTML+\"</span>\")}return a}a=t.xHTML+\":\";for(var n=0;n<t.series.length;n++){var r=t.series[n];if(r.isVisible){i&&(a+=\"<br>\");a+=\"<span\"+(r.isHighlighted?' class=\"highlight\"':\"\")+\"> <b><span style='color: \"+r.color+\";'>\"+r.labelHTML+\"</span></b>: \"+r.yHTML+\"</span>\"}}return a},a.default=o,e.exports=a.default},{\"../dygraph-utils\":17}],25:[function(t,e,a){\"use strict\";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(a,\"__esModule\",{value:!0});var n=t(\"../dygraph-utils\"),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e.default=t,e}(n),o=t(\"../dygraph-interaction-model\"),s=i(o),l=t(\"../iframe-tarp\"),h=i(l),u=function(){this.hasTouchInterface_=\"undefined\"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};u.prototype.toString=function(){return\"RangeSelector Plugin\"},u.prototype.activate=function(t){return this.dygraph_=t,this.getOption_(\"showRangeSelector\")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},u.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},u.prototype.getOption_=function(t,e){return this.dygraph_.getOption(t,e)},u.prototype.setDefaultOption_=function(t,e){this.dygraph_.attrs_[t]=e},u.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_(\"animatedZooms\")&&(console.warn(\"Animated zooms and range selector are not compatible; disabling animatedZooms.\"),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},u.prototype.addToGraph_=function(){var t=this.graphDiv_=this.dygraph_.graphDiv;t.appendChild(this.bgcanvas_),t.appendChild(this.fgcanvas_),t.appendChild(this.leftZoomHandle_),t.appendChild(this.rightZoomHandle_)},u.prototype.removeFromGraph_=function(){var t=this.graphDiv_;t.removeChild(this.bgcanvas_),t.removeChild(this.fgcanvas_),t.removeChild(this.leftZoomHandle_),t.removeChild(this.rightZoomHandle_),this.graphDiv_=null},u.prototype.reserveSpace_=function(t){this.getOption_(\"showRangeSelector\")&&t.reserveSpaceBottom(this.getOption_(\"rangeSelectorHeight\")+4)},u.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},u.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},u.prototype.updateVisibility_=function(){var t=this.getOption_(\"showRangeSelector\");if(t)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var e=this.dygraph_;setTimeout(function(){e.width_=0,e.resize()},1)}return t},u.prototype.resize_=function(){function t(t,e,a,i){var n=i||r.getContextPixelRatio(e);t.style.top=a.y+\"px\",t.style.left=a.x+\"px\",t.width=a.w*n,t.height=a.h*n,t.style.width=a.w+\"px\",t.style.height=a.h+\"px\",1!=n&&e.scale(n,n)}var e=this.dygraph_.layout_.getPlotArea(),a=0;this.dygraph_.getOptionForAxis(\"drawAxis\",\"x\")&&(a=this.getOption_(\"xAxisHeight\")||this.getOption_(\"axisLabelFontSize\")+2*this.getOption_(\"axisTickSize\")),this.canvasRect_={x:e.x,y:e.y+e.h+a+4,w:e.w,h:this.getOption_(\"rangeSelectorHeight\")};var i=this.dygraph_.getNumericOption(\"pixelRatio\");t(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,i),t(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,i)},u.prototype.createCanvases_=function(){this.bgcanvas_=r.createCanvas(),this.bgcanvas_.className=\"dygraph-rangesel-bgcanvas\",this.bgcanvas_.style.position=\"absolute\",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.getContext(this.bgcanvas_),this.fgcanvas_=r.createCanvas(),this.fgcanvas_.className=\"dygraph-rangesel-fgcanvas\",this.fgcanvas_.style.position=\"absolute\",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor=\"default\",this.fgcanvas_ctx_=r.getContext(this.fgcanvas_)},u.prototype.createZoomHandles_=function(){var t=new Image;t.className=\"dygraph-rangesel-zoomhandle\",t.style.position=\"absolute\",t.style.zIndex=10,t.style.visibility=\"hidden\",t.style.cursor=\"col-resize\",t.width=9,t.height=16,t.src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=\",this.isMobileDevice_&&(t.width*=2,t.height*=2),this.leftZoomHandle_=t,this.rightZoomHandle_=t.cloneNode(!1)},u.prototype.initInteraction_=function(){var t,e,a,i,n,o,l,u,d,c,p,g,f,v,_=this,y=document,x=0,m=null,b=!1,w=!1,A=!this.isMobileDevice_,O=new h.default;t=function(t){var e=_.dygraph_.xAxisExtremes(),a=(e[1]-e[0])/_.canvasRect_.w;return[e[0]+(t.leftHandlePos-_.canvasRect_.x)*a,e[0]+(t.rightHandlePos-_.canvasRect_.x)*a]},e=function(t){return r.cancelEvent(t),b=!0,x=t.clientX,m=t.target?t.target:t.srcElement,\"mousedown\"!==t.type&&\"dragstart\"!==t.type||(r.addEvent(y,\"mousemove\",a),r.addEvent(y,\"mouseup\",i)),_.fgcanvas_.style.cursor=\"col-resize\",O.cover(),!0},a=function(t){if(!b)return!1;r.cancelEvent(t);var e=t.clientX-x;if(Math.abs(e)<4)return!0;x=t.clientX;var a,i=_.getZoomHandleStatus_();m==_.leftZoomHandle_?(a=i.leftHandlePos+e,a=Math.min(a,i.rightHandlePos-m.width-3),a=Math.max(a,_.canvasRect_.x)):(a=i.rightHandlePos+e,a=Math.min(a,_.canvasRect_.x+_.canvasRect_.w),a=Math.max(a,i.leftHandlePos+m.width+3));var o=m.width/2;return m.style.left=a-o+\"px\",_.drawInteractiveLayer_(),A&&n(),!0},i=function(t){return!!b&&(b=!1,O.uncover(),r.removeEvent(y,\"mousemove\",a),r.removeEvent(y,\"mouseup\",i),_.fgcanvas_.style.cursor=\"default\",A||n(),!0)},n=function(){try{var e=_.getZoomHandleStatus_();if(_.isChangingRange_=!0,e.isZoomed){var a=t(e);_.dygraph_.doZoomXDates_(a[0],a[1])}else _.dygraph_.resetZoom()}finally{_.isChangingRange_=!1}},o=function(t){var e=_.leftZoomHandle_.getBoundingClientRect(),a=e.left+e.width/2;e=_.rightZoomHandle_.getBoundingClientRect();var i=e.left+e.width/2;return t.clientX>a&&t.clientX<i},l=function(t){return!(w||!o(t)||!_.getZoomHandleStatus_().isZoomed)&&(r.cancelEvent(t),w=!0,x=t.clientX,\"mousedown\"===t.type&&(r.addEvent(y,\"mousemove\",u),r.addEvent(y,\"mouseup\",d)),!0)},u=function(t){if(!w)return!1;r.cancelEvent(t);var e=t.clientX-x;if(Math.abs(e)<4)return!0;x=t.clientX;var a=_.getZoomHandleStatus_(),i=a.leftHandlePos,n=a.rightHandlePos,o=n-i;i+e<=_.canvasRect_.x?(i=_.canvasRect_.x,n=i+o):n+e>=_.canvasRect_.x+_.canvasRect_.w?(n=_.canvasRect_.x+_.canvasRect_.w,i=n-o):(i+=e,n+=e);var s=_.leftZoomHandle_.width/2;return _.leftZoomHandle_.style.left=i-s+\"px\",_.rightZoomHandle_.style.left=n-s+\"px\",_.drawInteractiveLayer_(),A&&c(),!0},d=function(t){return!!w&&(w=!1,r.removeEvent(y,\"mousemove\",u),r.removeEvent(y,\"mouseup\",d),A||c(),!0)},c=function(){try{_.isChangingRange_=!0,_.dygraph_.dateWindow_=t(_.getZoomHandleStatus_()),_.dygraph_.drawGraph_(!1)}finally{_.isChangingRange_=!1}},p=function(t){if(!b&&!w){var e=o(t)?\"move\":\"default\";e!=_.fgcanvas_.style.cursor&&(_.fgcanvas_.style.cursor=e)}},g=function(t){\"touchstart\"==t.type&&1==t.targetTouches.length?e(t.targetTouches[0])&&r.cancelEvent(t):\"touchmove\"==t.type&&1==t.targetTouches.length?a(t.targetTouches[0])&&r.cancelEvent(t):i(t)},f=function(t){\"touchstart\"==t.type&&1==t.targetTouches.length?l(t.targetTouches[0])&&r.cancelEvent(t):\"touchmove\"==t.type&&1==t.targetTouches.length?u(t.targetTouches[0])&&r.cancelEvent(t):d(t)},v=function(t,e){for(var a=[\"touchstart\",\"touchend\",\"touchmove\",\"touchcancel\"],i=0;i<a.length;i++)_.dygraph_.addAndTrackEvent(t,a[i],e)},this.setDefaultOption_(\"interactionModel\",s.default.dragIsPanInteractionModel),this.setDefaultOption_(\"panEdgeFraction\",1e-4);var D=window.opera?\"mousedown\":\"dragstart\";this.dygraph_.addAndTrackEvent(this.leftZoomHandle_,D,e),this.dygraph_.addAndTrackEvent(this.rightZoomHandle_,D,e),this.dygraph_.addAndTrackEvent(this.fgcanvas_,\"mousedown\",l),this.dygraph_.addAndTrackEvent(this.fgcanvas_,\"mousemove\",p),this.hasTouchInterface_&&(v(this.leftZoomHandle_,g),v(this.rightZoomHandle_,g),v(this.fgcanvas_,f))},u.prototype.drawStaticLayer_=function(){var t=this.bgcanvas_ctx_;t.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);try{this.drawMiniPlot_()}catch(t){console.warn(t)}this.bgcanvas_ctx_.lineWidth=this.getOption_(\"rangeSelectorBackgroundLineWidth\"),t.strokeStyle=this.getOption_(\"rangeSelectorBackgroundStrokeColor\"),t.beginPath(),t.moveTo(.5,.5),t.lineTo(.5,this.canvasRect_.h-.5),t.lineTo(this.canvasRect_.w-.5,this.canvasRect_.h-.5),t.lineTo(this.canvasRect_.w-.5,.5),t.stroke()},u.prototype.drawMiniPlot_=function(){var t=this.getOption_(\"rangeSelectorPlotFillColor\"),e=this.getOption_(\"rangeSelectorPlotFillGradientColor\"),a=this.getOption_(\"rangeSelectorPlotStrokeColor\");if(t||a){var i=this.getOption_(\"stepPlot\"),n=this.computeCombinedSeriesAndLimits_(),r=n.yMax-n.yMin,o=this.bgcanvas_ctx_,s=this.dygraph_.xAxisExtremes(),l=Math.max(s[1]-s[0],1e-30),h=(this.canvasRect_.w-.5)/l,u=(this.canvasRect_.h-.5)/r,d=this.canvasRect_.w-.5,c=this.canvasRect_.h-.5,p=null,g=null;o.beginPath(),o.moveTo(.5,c);for(var f=0;f<n.data.length;f++){var v=n.data[f],_=null!==v[0]?(v[0]-s[0])*h:NaN,y=null!==v[1]?c-(v[1]-n.yMin)*u:NaN;(i||null===p||Math.round(_)!=Math.round(p))&&(isFinite(_)&&isFinite(y)?(null===p?o.lineTo(_,c):i&&o.lineTo(_,g),o.lineTo(_,y),p=_,g=y):(null!==p&&(i?(o.lineTo(_,g),o.lineTo(_,c)):o.lineTo(p,c)),p=g=null))}if(o.lineTo(d,c),o.closePath(),t){var x=this.bgcanvas_ctx_.createLinearGradient(0,0,0,c);e&&x.addColorStop(0,e),x.addColorStop(1,t),this.bgcanvas_ctx_.fillStyle=x,o.fill()}a&&(this.bgcanvas_ctx_.strokeStyle=a,this.bgcanvas_ctx_.lineWidth=this.getOption_(\"rangeSelectorPlotLineWidth\"),o.stroke())}},u.prototype.computeCombinedSeriesAndLimits_=function(){var t,e=this.dygraph_,a=this.getOption_(\"logscale\"),i=e.numColumns(),n=e.getLabels(),o=new Array(i),s=!1,l=e.visibility(),h=[];for(t=1;t<i;t++){var u=this.getOption_(\"showInRangeSelector\",n[t]);h.push(u),null!==u&&(s=!0)}if(s)for(t=1;t<i;t++)o[t]=h[t-1];else for(t=1;t<i;t++)o[t]=l[t-1];var d=[],c=e.dataHandler_,p=e.attributes_;for(t=1;t<e.numColumns();t++)if(o[t]){var g=c.extractSeries(e.rawData_,t,p);e.rollPeriod()>1&&(g=c.rollingAverage(g,e.rollPeriod(),p)),d.push(g)}var f=[];for(t=0;t<d[0].length;t++){for(var v=0,_=0,y=0;y<d.length;y++){var x=d[y][t][1];null===x||isNaN(x)||(_++,v+=x)}f.push([d[0][t][0],v/_])}var m=Number.MAX_VALUE,b=-Number.MAX_VALUE;for(t=0;t<f.length;t++){var w=f[t][1];null!==w&&isFinite(w)&&(!a||w>0)&&(m=Math.min(m,w),b=Math.max(b,w))}if(a)for(b=r.log10(b),b+=.25*b,m=r.log10(m),t=0;t<f.length;t++)f[t][1]=r.log10(f[t][1]);else{var A,O=b-m;A=O<=Number.MIN_VALUE?.25*b:.25*O,b+=A,m-=A}return{data:f,yMin:m,yMax:b}},u.prototype.placeZoomHandles_=function(){var t=this.dygraph_.xAxisExtremes(),e=this.dygraph_.xAxisRange(),a=t[1]-t[0],i=Math.max(0,(e[0]-t[0])/a),n=Math.max(0,(t[1]-e[1])/a),r=this.canvasRect_.x+this.canvasRect_.w*i,o=this.canvasRect_.x+this.canvasRect_.w*(1-n),s=Math.max(this.canvasRect_.y,this.canvasRect_.y+(this.canvasRect_.h-this.leftZoomHandle_.height)/2),l=this.leftZoomHandle_.width/2;this.leftZoomHandle_.style.left=r-l+\"px\",this.leftZoomHandle_.style.top=s+\"px\",this.rightZoomHandle_.style.left=o-l+\"px\",this.rightZoomHandle_.style.top=this.leftZoomHandle_.style.top,this.leftZoomHandle_.style.visibility=\"visible\",this.rightZoomHandle_.style.visibility=\"visible\"},u.prototype.drawInteractiveLayer_=function(){var t=this.fgcanvas_ctx_;t.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);var e=this.canvasRect_.w-1,a=this.canvasRect_.h-1,i=this.getZoomHandleStatus_();if(t.strokeStyle=this.getOption_(\"rangeSelectorForegroundStrokeColor\"),t.lineWidth=this.getOption_(\"rangeSelectorForegroundLineWidth\"),i.isZoomed){var n=Math.max(1,i.leftHandlePos-this.canvasRect_.x),r=Math.min(e,i.rightHandlePos-this.canvasRect_.x);t.fillStyle=\"rgba(240, 240, 240, \"+this.getOption_(\"rangeSelectorAlpha\").toString()+\")\",t.fillRect(0,0,n,this.canvasRect_.h),t.fillRect(r,0,this.canvasRect_.w-r,this.canvasRect_.h),t.beginPath(),t.moveTo(1,1),t.lineTo(n,1),t.lineTo(n,a),t.lineTo(r,a),t.lineTo(r,1),t.lineTo(e,1),t.stroke()}else t.beginPath(),t.moveTo(1,1),t.lineTo(1,a),t.lineTo(e,a),t.lineTo(e,1),t.stroke()},u.prototype.getZoomHandleStatus_=function(){var t=this.leftZoomHandle_.width/2,e=parseFloat(this.leftZoomHandle_.style.left)+t,a=parseFloat(this.rightZoomHandle_.style.left)+t;return{leftHandlePos:e,rightHandlePos:a,isZoomed:e-1>this.canvasRect_.x||a+1<this.canvasRect_.x+this.canvasRect_.w}},a.default=u,e.exports=a.default},{\"../dygraph-interaction-model\":12,\"../dygraph-utils\":17,\"../iframe-tarp\":19}]},{},[18])(18)});\n//# sourceMappingURL=dist/dygraph.min.js.map\n","import { ChartData, ChartMetadata } from \"../chart-types\"\nimport { seconds4human } from \"./seconds4human\"\n\nexport const LEGEND_BOTTOM_SINGLE_LINE_HEIGHT = 80\n\nexport const legendPluginModuleString = (withContext: boolean, chartMetadata: ChartMetadata) => {\n let str = \" \"\n let context = \"\"\n\n if (withContext && typeof chartMetadata.context === \"string\") {\n // eslint-disable-next-line prefer-destructuring\n context = chartMetadata.context\n }\n\n if (typeof chartMetadata.plugin === \"string\" && chartMetadata.plugin !== \"\") {\n str = chartMetadata.plugin\n\n if (str.endsWith(\".plugin\")) {\n str = str.substring(0, str.length - 7)\n }\n\n if (typeof chartMetadata.module === \"string\" && chartMetadata.module !== \"\") {\n str += `:${chartMetadata.module}`\n }\n\n if (withContext && context !== \"\") {\n str += `, ${context}`\n }\n } else if (withContext && context !== \"\") {\n str = context\n }\n return str\n}\n\nexport const legendResolutionTooltip = (chartData: ChartData, chartMetadata: ChartMetadata) => {\n const collected = chartMetadata.update_every\n // todo if there's no data (but maybe there wont be situation like this), then use \"collected\"\n const viewed = chartData.view_update_every\n if (collected === viewed) {\n return `resolution ${seconds4human(collected)}`\n }\n\n return `resolution ${seconds4human(viewed)}, collected every ${seconds4human(collected)}`\n}\n\ntype GetNewSelectedDimensions = (arg: {\n allDimensions: string[],\n selectedDimensions: string[],\n clickedDimensionName: string,\n isModifierKeyPressed: boolean,\n}) => string[]\n\nexport const getNewSelectedDimensions: GetNewSelectedDimensions = ({\n allDimensions,\n selectedDimensions,\n clickedDimensionName,\n isModifierKeyPressed,\n}) => {\n // when selectedDimensions is empty, then all dimensions should be enabled\n // let's narrow this case now\n const enabledDimensions = selectedDimensions.length === 0 ? allDimensions : selectedDimensions\n const isCurrentlySelected = enabledDimensions.includes(clickedDimensionName)\n\n let newSelectedDimensions: string[]\n if (!isModifierKeyPressed\n && ((isCurrentlySelected && enabledDimensions.length > 1) || !isCurrentlySelected)\n ) {\n newSelectedDimensions = [clickedDimensionName]\n } else if (isCurrentlySelected) { // modifier key pressed\n newSelectedDimensions = enabledDimensions.filter(\n (dimension) => dimension !== clickedDimensionName,\n )\n } else { // modifier key pressed\n newSelectedDimensions = enabledDimensions.concat(clickedDimensionName)\n }\n\n if (newSelectedDimensions.length === allDimensions.length) {\n return []\n }\n return newSelectedDimensions\n}\n","/* eslint-disable comma-dangle */\n/* eslint-disable implicit-arrow-linebreak */\nimport { omit, pipe, mergeDeepLeft } from \"ramda\"\n\ntype HashParams = { [param: string]: string }\nconst fragmentParamsSeparatorRegEx = /[&;]/\nconst fragmentParamsSeparator = \";\"\n\nexport const getHashParams = (\n hash = decodeURIComponent(window.location.hash.substr(1))\n): HashParams => {\n if (hash.length === 0) {\n return {}\n }\n const params = hash.split(fragmentParamsSeparatorRegEx)\n const response = params.reduce((acc: HashParams, current) => {\n const parts = current.split(\"=\")\n const [param, value] = parts\n acc[param] = value\n return acc\n }, {})\n return response\n}\n\nexport const makeHashFromObject = (params: { [paramKey: string]: string }) => {\n const entries = Object.entries(params)\n if (entries.length === 0) {\n return \"\"\n }\n return entries\n .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)\n .join(fragmentParamsSeparator)\n}\n\nexport const getFilteredHash = (\n excludedParams: string[],\n hash = decodeURIComponent(window.location.hash.substr(1))\n) => {\n const filteredParams = omit(excludedParams, getHashParams(hash))\n return makeHashFromObject(filteredParams)\n}\n\nexport const getUniqueParamsHash = pipe(getHashParams, makeHashFromObject)\n\nexport const setHashParams = (params: { [paramKey: string]: string }) => {\n const allParams = getHashParams()\n const allParamsResult = mergeDeepLeft(params, allParams)\n window.history.replaceState(window.history.state, \"\", `#${makeHashFromObject(allParamsResult)}`)\n}\n\nexport const getHashParam = (\n param: string,\n hash = decodeURIComponent(window.location.hash.substr(1))\n): string => getHashParams(hash)[param]\n\nexport const hasHashParam = (\n param: string,\n hash = decodeURIComponent(window.location.hash.substr(1))\n): boolean => getHashParams(hash)[param] !== undefined\n\nexport const removeHashParams = (params: string[]) => {\n window.history.replaceState(window.history.state, \"\", `#${getFilteredHash(params)}`)\n}\n","import { useEffect, useCallback, useState } from \"react\"\n\ntype IframesMessageType =\n | \"spaces\"\n | \"workspaces\"\n | \"hello-from-spaces-bar\"\n | \"hello-from-space-panel\"\n | \"hello-from-sign-in\"\n | \"is-signed-in\"\n | \"streamed-hosts-data\"\n | \"has-focus\"\n | \"iframe-focus-change\"\n | \"synced-private-registry\"\n | \"set-is-logout-dropdown-opened\"\n | \"user-node-access\"\n | \"request-refresh-access\"\n\ninterface IframesMessage<T = unknown> {\n type: IframesMessageType\n payload: T\n}\n\nexport const sendToChildIframe = (\n htmlIframeElement: HTMLIFrameElement | string,\n message: IframesMessage\n) => {\n const iframeElement =\n typeof htmlIframeElement === \"string\"\n ? (document.getElementById(htmlIframeElement) as HTMLIFrameElement)\n : htmlIframeElement\n\n if (iframeElement.contentWindow) {\n iframeElement.contentWindow.postMessage(message, \"*\")\n }\n}\n\nexport const useListenToPostMessage = <T>(\n messageType: IframesMessageType,\n callback?: (newMessage: T) => void,\n defaultState?: T | (() => T)\n): [T | undefined, () => void] => {\n const [lastMessage, setLastMessage] = useState<T | undefined>(defaultState)\n const handleMessage = useCallback(\n message => {\n const data = message.data as IframesMessage<T>\n if (data.type === messageType) {\n setLastMessage(data.payload)\n if (callback) {\n callback(data.payload)\n }\n }\n },\n [callback, messageType]\n )\n const resetMesssage = useCallback(() => {\n setLastMessage(defaultState as T)\n }, [defaultState])\n useEffect(() => {\n window.addEventListener(\"message\", handleMessage)\n return () => {\n window.removeEventListener(\"message\", handleMessage)\n }\n }, [handleMessage, messageType])\n return [lastMessage, resetMesssage]\n}\n","export const isMainJs = process.env.REACT_APP_IS_MAIN_DASHBOARD\nexport const isTestingEnv = process.env.NODE_ENV === \"test\"\nexport const isDevelopmentEnv = process.env.NODE_ENV === \"development\"\n","export const storeKey = \"dashboard\"\n","import { useCallback, useMemo } from \"react\"\nimport { useDispatch, useSelector } from \"react-redux\"\nimport { createSelector } from \"reselect\"\nimport { useLocalStorage } from \"react-use\"\nimport { showSignInModalAction } from \"domains/dashboard/actions\"\nimport { selectSignInUrl, selectRegistry } from \"domains/global/selectors\"\nimport { NETDATA_REGISTRY_SERVER } from \"utils/utils\"\n\nconst isRegistrySelector = createSelector(\n selectRegistry,\n ({ registryServer }) => registryServer === NETDATA_REGISTRY_SERVER\n)\n\nconst offlineSelector = createSelector(\n ({ dashboard }) => dashboard,\n ({ offline }) => offline\n)\n\nconst SignIn = ({ children, utmParameters }) => {\n const [hasSignedInBefore] = useLocalStorage(\"has-sign-in-history\")\n const signInUrl = useSelector(state => selectSignInUrl(utmParameters)(state))\n const isRegistry = useSelector(isRegistrySelector)\n const offline = useSelector(offlineSelector)\n\n const dispatch = useDispatch()\n\n const link = useMemo(() => {\n const { href } = window.location\n const redirectURI = encodeURIComponent(href)\n return `${signInUrl}&redirect_uri=${redirectURI}`\n }, [signInUrl])\n\n const onSignIn = useCallback(\n () =>\n dispatch(\n showSignInModalAction({\n signInLinkHref: link,\n })\n ),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [link]\n )\n\n return useMemo(\n () =>\n typeof children === \"function\"\n ? children({ isRegistry, link, onSignIn, offline, hasSignedInBefore })\n : children,\n [children, isRegistry, link, onSignIn, offline, hasSignedInBefore]\n )\n}\n\nexport default SignIn\n","import { createContext } from \"react\"\nimport {\n createDispatchHook, createSelectorHook, ReactReduxContextValue,\n useSelector as useSelectorOriginal,\n useDispatch as useDispatchOriginal,\n} from \"react-redux\"\n\nconst shouldUseDefaultContext = process.env.REACT_APP_SHOULD_USE_DEFAULT_CONTEXT\n\nexport const dashboardReduxContext = shouldUseDefaultContext\n ? undefined\n : createContext<ReactReduxContextValue>(undefined as any)\n\nexport const useSelector = dashboardReduxContext\n ? createSelectorHook(dashboardReduxContext)\n : useSelectorOriginal\nexport const useDispatch = dashboardReduxContext\n ? createDispatchHook(dashboardReduxContext)\n : useDispatchOriginal\n","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 { 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 { 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","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"],"sourceRoot":""}
\ No newline at end of file |