File: //opt/netdata/usr/local/local/share/netdata/web/v3/6370.13bf8e994af2aa8ff829.chunk.js
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"8b1701d6db299c2b7259bc89c3ef365137725d5e"};var n=(new t.Error).stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="595babc8-edf7-43fd-820f-aa12e6cd3924",t._sentryDebugIdIdentifier="sentry-dbid-595babc8-edf7-43fd-820f-aa12e6cd3924")}catch(t){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[6370],{20675(t,n,e){"use strict";e.r(n),e.d(n,{default:()=>y});e(74423);var o=e(96540),r=e(38429),i=e(7960),s=e(63474),l=e(57591),c=e(41766),f=e(70027),u=e(59917),h=e(74848);const a=(0,i.A)(()=>Promise.all([e.e(6210),e.e(5269)]).then(e.bind(e,25269)),"FlowsCountryMap"),d=(0,i.A)(()=>Promise.all([e.e(2492),e.e(2882),e.e(4550),e.e(4795),e.e(82),e.e(4398)]).then(e.bind(e,60082)),"FlowsGeoMap"),x=(0,i.A)(()=>Promise.all([e.e(3341),e.e(9163)]).then(e.bind(e,39163)),"FlowsGlobe"),y=(0,o.memo)(t=>{let{flowView:n,flowRows:e,flowColumns:i,flowGroupByKeys:y,flowTimeseries:g,flowMapFlows:p,visibleItems:w,selectedFn:_,selectedNodeIds:m}=t;const k=t=>!w||w.includes(t),b=(0,o.useMemo)(()=>(0,l.Kk)(e||[],y||[],"bytes",i||{}),[e,y,i]);if("table-sankey"===n){const t=(y?.length||0)>=2,n=e?.length>0;return t||n?(0,h.jsxs)(r.Flex,{flex:!0,column:!0,overflow:"auto",gap:2,children:[k("flows-sankey")&&t&&(0,h.jsx)(r.Flex,{column:!0,height:{min:"300px"},flex:!0,children:(0,h.jsx)(c.A,{data:b,groupByKeys:y,columns:i,height:"100%"})}),k("flows-table")&&n&&(0,h.jsx)(r.Flex,{column:!0,flex:!0,height:{min:"200px"},children:(0,h.jsx)(f.A,{rows:e,columns:i,fnName:_,height:"100%"})})]}):(0,h.jsx)(r.Flex,{flex:!0,alignItems:"center",justifyContent:"center",children:(0,h.jsx)(r.Text,{color:"textLite",children:"No flow data"})})}return"timeseries"===n?(0,l.pv)(g)?(0,h.jsx)(r.Flex,{flex:!0,column:!0,overflow:"auto",children:(0,h.jsx)(r.Flex,{column:!0,height:{min:"300px"},flex:!0,children:(0,h.jsx)(u.A,{chart:g,nodeIds:m,fn:_,height:320})})}):(0,h.jsx)(r.Flex,{flex:!0,alignItems:"center",justifyContent:"center",children:(0,h.jsx)(r.Text,{color:"textLite",children:"No timeseries data"})}):"country-map"===n?p?.length?(0,h.jsx)(o.Suspense,{fallback:(0,h.jsx)(s.Ui,{}),children:(0,h.jsx)(r.Flex,{flex:!0,column:!0,overflow:"auto",children:(0,h.jsx)(r.Flex,{column:!0,height:{min:"400px"},flex:!0,children:(0,h.jsx)(a,{flows:p,height:"100%"})})})}):(0,h.jsx)(r.Flex,{flex:!0,alignItems:"center",justifyContent:"center",children:(0,h.jsx)(r.Text,{color:"textLite",children:"No map data"})}):"state-map"===n||"city-map"===n?p?.length?(0,h.jsx)(o.Suspense,{fallback:(0,h.jsx)(s.F$,{}),children:(0,h.jsx)(r.Flex,{flex:!0,column:!0,overflow:"auto",children:(0,h.jsx)(r.Flex,{column:!0,height:{min:"400px"},flex:!0,children:(0,h.jsx)(d,{flows:p,view:n,columns:i,height:"100%"})})})}):(0,h.jsx)(r.Flex,{flex:!0,alignItems:"center",justifyContent:"center",children:(0,h.jsx)(r.Text,{color:"textLite",children:"No map data"})}):"globe"===n?p?.length?(0,h.jsx)(o.Suspense,{fallback:(0,h.jsx)(s.F$,{}),children:(0,h.jsx)(r.Flex,{flex:!0,column:!0,overflow:"auto",children:(0,h.jsx)(r.Flex,{column:!0,height:{min:"400px"},flex:!0,children:(0,h.jsx)(x,{flows:p,columns:i,height:"100%"})})})}):(0,h.jsx)(r.Flex,{flex:!0,alignItems:"center",justifyContent:"center",children:(0,h.jsx)(r.Text,{color:"textLite",children:"No map data"})}):(0,h.jsx)(r.Flex,{flex:!0,alignItems:"center",justifyContent:"center",children:(0,h.jsx)(r.Text,{color:"textLite",children:"No flow data"})})})},19818(t,n,e){"use strict";function o(t){return t.depth}function r(t,n){return t.sourceLinks.length?t.depth:n-1}e.d(n,{kb:()=>o,pD:()=>r})},72704(t,n,e){"use strict";function o(t,n){let e=0;if(void 0===n)for(let o of t)(o=+o)&&(e+=o);else{let o=-1;for(let r of t)(r=+n(r,++o,t))&&(e+=r)}return e}function r(t,n){let e;if(void 0===n)for(const o of t)null!=o&&(e<o||void 0===e&&o>=o)&&(e=o);else{let o=-1;for(let r of t)null!=(r=n(r,++o,t))&&(e<r||void 0===e&&r>=r)&&(e=r)}return e}e.d(n,{A:()=>g});var i=e(19818);function s(t){return function(){return t}}function l(t,n){return f(t.source,n.source)||t.index-n.index}function c(t,n){return f(t.target,n.target)||t.index-n.index}function f(t,n){return t.y0-n.y0}function u(t){return t.value}function h(t){return t.index}function a(t){return t.nodes}function d(t){return t.links}function x(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function y({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const o of n.sourceLinks)o.y0=t+o.width/2,t+=o.width;for(const o of n.targetLinks)o.y1=e+o.width/2,e+=o.width}}function g(){let t,n,e,g=0,p=0,w=1,_=1,m=24,k=8,b=h,v=i.pD,j=a,L=d,M=6;function F(){const i={nodes:j.apply(null,arguments),links:L.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,r]of t.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const o=new Map(t.map((n,e)=>[b(n,e,t),n]));for(const[e,r]of n.entries()){r.index=e;let{source:t,target:n}=r;"object"!==typeof t&&(t=r.source=x(o,t)),"object"!==typeof n&&(n=r.target=x(o,n)),t.sourceLinks.push(r),n.targetLinks.push(r)}if(null!=e)for(const{sourceLinks:r,targetLinks:i}of t)r.sort(e),i.sort(e)}(i),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(o(n.sourceLinks,u),o(n.targetLinks,u)):n.fixedValue}(i),function({nodes:t}){const n=t.length;let e=new Set(t),o=new Set,r=0;for(;e.size;){for(const t of e){t.depth=r;for(const{target:n}of t.sourceLinks)o.add(n)}if(++r>n)throw new Error("circular link");e=o,o=new Set}}(i),function({nodes:t}){const n=t.length;let e=new Set(t),o=new Set,r=0;for(;e.size;){for(const t of e){t.height=r;for(const{source:n}of t.targetLinks)o.add(n)}if(++r>n)throw new Error("circular link");e=o,o=new Set}}(i),function(e){const i=function({nodes:t}){const e=r(t,t=>t.depth)+1,o=(w-g-m)/(e-1),i=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(v.call(null,n,e))));n.layer=t,n.x0=g+t*o,n.x1=n.x0+m,i[t]?i[t].push(n):i[t]=[n]}if(n)for(const r of i)r.sort(n);return i}(e);t=Math.min(k,(_-p)/(r(i,t=>t.length)-1)),function(n){const e=function(t,n){let e;if(void 0===n)for(const o of t)null!=o&&(e>o||void 0===e&&o>=o)&&(e=o);else{let o=-1;for(let r of t)null!=(r=n(r,++o,t))&&(e>r||void 0===e&&r>=r)&&(e=r)}return e}(n,n=>(_-p-(n.length-1)*t)/o(n,u));for(const o of n){let n=p;for(const r of o){r.y0=n,r.y1=n+r.value*e,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*e}n=(_-n+t)/(o.length+1);for(let t=0;t<o.length;++t){const e=o[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}N(o)}}(i);for(let t=0;t<M;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/M);A(i,n,e),T(i,n,e)}}(i),y(i),i}function T(t,e,o){for(let r=1,i=t.length;r<i;++r){const i=t[r];for(const t of i){let n=0,o=0;for(const{source:e,value:i}of t.targetLinks){let r=i*(t.layer-e.layer);n+=D(e,t)*r,o+=r}if(!(o>0))continue;let r=(n/o-t.y0)*e;t.y0+=r,t.y1+=r,E(t)}void 0===n&&i.sort(f),I(i,o)}}function A(t,e,o){for(let r=t.length-2;r>=0;--r){const i=t[r];for(const t of i){let n=0,o=0;for(const{target:e,value:i}of t.sourceLinks){let r=i*(e.layer-t.layer);n+=P(t,e)*r,o+=r}if(!(o>0))continue;let r=(n/o-t.y0)*e;t.y0+=r,t.y1+=r,E(t)}void 0===n&&i.sort(f),I(i,o)}}function I(n,e){const o=n.length>>1,r=n[o];S(n,r.y0-t,o-1,e),C(n,r.y1+t,o+1,e),S(n,_,n.length-1,e),C(n,p,0,e)}function C(n,e,o,r){for(;o<n.length;++o){const i=n[o],s=(e-i.y0)*r;s>1e-6&&(i.y0+=s,i.y1+=s),e=i.y1+t}}function S(n,e,o,r){for(;o>=0;--o){const i=n[o],s=(i.y1-e)*r;s>1e-6&&(i.y0-=s,i.y1-=s),e=i.y0-t}}function E({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(c);for(const{target:{targetLinks:n}}of t)n.sort(l)}}function N(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(c),e.sort(l)}function D(n,e){let o=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:i}of n.sourceLinks){if(r===e)break;o+=i+t}for(const{source:t,width:r}of e.targetLinks){if(t===n)break;o-=r}return o}function P(n,e){let o=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:r,width:i}of e.targetLinks){if(r===n)break;o+=i+t}for(const{target:t,width:r}of n.sourceLinks){if(t===e)break;o-=r}return o}return F.update=function(t){return y(t),t},F.nodeId=function(t){return arguments.length?(b="function"===typeof t?t:s(t),F):b},F.nodeAlign=function(t){return arguments.length?(v="function"===typeof t?t:s(t),F):v},F.nodeSort=function(t){return arguments.length?(n=t,F):n},F.nodeWidth=function(t){return arguments.length?(m=+t,F):m},F.nodePadding=function(n){return arguments.length?(k=t=+n,F):k},F.nodes=function(t){return arguments.length?(j="function"===typeof t?t:s(t),F):j},F.links=function(t){return arguments.length?(L="function"===typeof t?t:s(t),F):L},F.linkSort=function(t){return arguments.length?(e=t,F):e},F.size=function(t){return arguments.length?(g=p=0,w=+t[0],_=+t[1],F):[w-g,_-p]},F.extent=function(t){return arguments.length?(g=+t[0][0],w=+t[1][0],p=+t[0][1],_=+t[1][1],F):[[g,p],[w,_]]},F.iterations=function(t){return arguments.length?(M=+t,F):M},F}},18754(t,n,e){"use strict";e.d(n,{A:()=>m});var o=Math.PI,r=2*o,i=1e-6,s=r-i;function l(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function c(){return new l}l.prototype=c.prototype={constructor:l,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,o){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+o)},bezierCurveTo:function(t,n,e,o,r,i){this._+="C"+ +t+","+ +n+","+ +e+","+ +o+","+(this._x1=+r)+","+(this._y1=+i)},arcTo:function(t,n,e,r,s){t=+t,n=+n,e=+e,r=+r,s=+s;var l=this._x1,c=this._y1,f=e-t,u=r-n,h=l-t,a=c-n,d=h*h+a*a;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(d>i)if(Math.abs(a*f-u*h)>i&&s){var x=e-l,y=r-c,g=f*f+u*u,p=x*x+y*y,w=Math.sqrt(g),_=Math.sqrt(d),m=s*Math.tan((o-Math.acos((g+d-p)/(2*w*_)))/2),k=m/_,b=m/w;Math.abs(k-1)>i&&(this._+="L"+(t+k*h)+","+(n+k*a)),this._+="A"+s+","+s+",0,0,"+ +(a*x>h*y)+","+(this._x1=t+b*f)+","+(this._y1=n+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,l,c,f){t=+t,n=+n,f=!!f;var u=(e=+e)*Math.cos(l),h=e*Math.sin(l),a=t+u,d=n+h,x=1^f,y=f?l-c:c-l;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+d:(Math.abs(this._x1-a)>i||Math.abs(this._y1-d)>i)&&(this._+="L"+a+","+d),e&&(y<0&&(y=y%r+r),y>s?this._+="A"+e+","+e+",0,1,"+x+","+(t-u)+","+(n-h)+"A"+e+","+e+",0,1,"+x+","+(this._x1=a)+","+(this._y1=d):y>i&&(this._+="A"+e+","+e+",0,"+ +(y>=o)+","+x+","+(this._x1=t+e*Math.cos(c))+","+(this._y1=n+e*Math.sin(c))))},rect:function(t,n,e,o){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +o+"h"+-e+"Z"},toString:function(){return this._}};const f=c;var u=Array.prototype.slice;function h(t){return function(){return t}}function a(t){return t[0]}function d(t){return t[1]}function x(t){return t.source}function y(t){return t.target}function g(t){var n=x,e=y,o=a,r=d,i=null;function s(){var s,l=u.call(arguments),c=n.apply(this,l),h=e.apply(this,l);if(i||(i=s=f()),t(i,+o.apply(this,(l[0]=c,l)),+r.apply(this,l),+o.apply(this,(l[0]=h,l)),+r.apply(this,l)),s)return i=null,s+""||null}return s.source=function(t){return arguments.length?(n=t,s):n},s.target=function(t){return arguments.length?(e=t,s):e},s.x=function(t){return arguments.length?(o="function"===typeof t?t:h(+t),s):o},s.y=function(t){return arguments.length?(r="function"===typeof t?t:h(+t),s):r},s.context=function(t){return arguments.length?(i=null==t?null:t,s):i},s}function p(t,n,e,o,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+o)/2,e,n,r,o,r)}function w(t){return[t.source.x1,t.y0]}function _(t){return[t.target.x0,t.y1]}function m(){return g(p).source(w).target(_)}},99238(t){t.exports=function(){return!0}}}]);