File: //opt/netdata/usr/local/share/netdata/web/v3/6370.cbccb866528e4af1f18b.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:"9f9973293dea885c0484e86d9a5d6e44ba9e045b"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="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,e,n){"use strict";n.r(e),n.d(e,{default:()=>y});n(74423);var o=n(96540),r=n(38429),i=n(7960),s=n(63474),l=n(57591),c=n(41766),f=n(70027),u=n(59917),h=n(74848);const a=(0,i.A)(()=>Promise.all([n.e(6210),n.e(5269)]).then(n.bind(n,25269)),"FlowsCountryMap"),d=(0,i.A)(()=>Promise.all([n.e(2492),n.e(2882),n.e(4550),n.e(4795),n.e(82),n.e(4398)]).then(n.bind(n,60082)),"FlowsGeoMap"),x=(0,i.A)(()=>Promise.all([n.e(3341),n.e(9163)]).then(n.bind(n,39163)),"FlowsGlobe"),y=(0,o.memo)(t=>{let{flowView:e,flowRows:n,flowColumns:i,flowGroupByKeys:y,flowTimeseries:g,flowMapFlows:p,visibleItems:w,selectedFn:_,selectedNodeIds:m}=t;const k=t=>!w||w.includes(t),v=(0,o.useMemo)(()=>(0,l.Kk)(n||[],y||[],"bytes",i||{}),[n,y,i]);if("table-sankey"===e){const t=(y?.length||0)>=2,e=n?.length>0;return t||e?(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:v,groupByKeys:y,columns:i,height:"100%"})}),k("flows-table")&&e&&(0,h.jsx)(r.Flex,{column:!0,flex:!0,height:{min:"200px"},children:(0,h.jsx)(f.A,{rows:n,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"===e?(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"===e?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"===e||"city-map"===e?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:e,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"===e?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,e,n){"use strict";function o(t){return t.depth}function r(t,e){return t.sourceLinks.length?t.depth:e-1}n.d(e,{kb:()=>o,pD:()=>r})},72704(t,e,n){"use strict";function o(t,e){let n=0;if(void 0===e)for(let o of t)(o=+o)&&(n+=o);else{let o=-1;for(let r of t)(r=+e(r,++o,t))&&(n+=r)}return n}function r(t,e){let n;if(void 0===e)for(const o of t)null!=o&&(n<o||void 0===n&&o>=o)&&(n=o);else{let o=-1;for(let r of t)null!=(r=e(r,++o,t))&&(n<r||void 0===n&&r>=r)&&(n=r)}return n}n.d(e,{A:()=>g});var i=n(19818);function s(t){return function(){return t}}function l(t,e){return f(t.source,e.source)||t.index-e.index}function c(t,e){return f(t.target,e.target)||t.index-e.index}function f(t,e){return t.y0-e.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,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function y({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const o of e.sourceLinks)o.y0=t+o.width/2,t+=o.width;for(const o of e.targetLinks)o.y1=n+o.width/2,n+=o.width}}function g(){let t,e,n,g=0,p=0,w=1,_=1,m=24,k=8,v=h,b=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:e}){for(const[n,r]of t.entries())r.index=n,r.sourceLinks=[],r.targetLinks=[];const o=new Map(t.map((e,n)=>[v(e,n,t),e]));for(const[n,r]of e.entries()){r.index=n;let{source:t,target:e}=r;"object"!==typeof t&&(t=r.source=x(o,t)),"object"!==typeof e&&(e=r.target=x(o,e)),t.sourceLinks.push(r),e.targetLinks.push(r)}if(null!=n)for(const{sourceLinks:r,targetLinks:i}of t)r.sort(n),i.sort(n)}(i),function({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(o(e.sourceLinks,u),o(e.targetLinks,u)):e.fixedValue}(i),function({nodes:t}){const e=t.length;let n=new Set(t),o=new Set,r=0;for(;n.size;){for(const t of n){t.depth=r;for(const{target:e}of t.sourceLinks)o.add(e)}if(++r>e)throw new Error("circular link");n=o,o=new Set}}(i),function({nodes:t}){const e=t.length;let n=new Set(t),o=new Set,r=0;for(;n.size;){for(const t of n){t.height=r;for(const{source:e}of t.targetLinks)o.add(e)}if(++r>e)throw new Error("circular link");n=o,o=new Set}}(i),function(n){const i=function({nodes:t}){const n=r(t,t=>t.depth)+1,o=(w-g-m)/(n-1),i=new Array(n);for(const e of t){const t=Math.max(0,Math.min(n-1,Math.floor(b.call(null,e,n))));e.layer=t,e.x0=g+t*o,e.x1=e.x0+m,i[t]?i[t].push(e):i[t]=[e]}if(e)for(const r of i)r.sort(e);return i}(n);t=Math.min(k,(_-p)/(r(i,t=>t.length)-1)),function(e){const n=function(t,e){let n;if(void 0===e)for(const o of t)null!=o&&(n>o||void 0===n&&o>=o)&&(n=o);else{let o=-1;for(let r of t)null!=(r=e(r,++o,t))&&(n>r||void 0===n&&r>=r)&&(n=r)}return n}(e,e=>(_-p-(e.length-1)*t)/o(e,u));for(const o of e){let e=p;for(const r of o){r.y0=e,r.y1=e+r.value*n,e=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*n}e=(_-e+t)/(o.length+1);for(let t=0;t<o.length;++t){const n=o[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}N(o)}}(i);for(let t=0;t<M;++t){const e=Math.pow(.99,t),n=Math.max(1-e,(t+1)/M);A(i,e,n),T(i,e,n)}}(i),y(i),i}function T(t,n,o){for(let r=1,i=t.length;r<i;++r){const i=t[r];for(const t of i){let e=0,o=0;for(const{source:n,value:i}of t.targetLinks){let r=i*(t.layer-n.layer);e+=D(n,t)*r,o+=r}if(!(o>0))continue;let r=(e/o-t.y0)*n;t.y0+=r,t.y1+=r,E(t)}void 0===e&&i.sort(f),I(i,o)}}function A(t,n,o){for(let r=t.length-2;r>=0;--r){const i=t[r];for(const t of i){let e=0,o=0;for(const{target:n,value:i}of t.sourceLinks){let r=i*(n.layer-t.layer);e+=P(t,n)*r,o+=r}if(!(o>0))continue;let r=(e/o-t.y0)*n;t.y0+=r,t.y1+=r,E(t)}void 0===e&&i.sort(f),I(i,o)}}function I(e,n){const o=e.length>>1,r=e[o];S(e,r.y0-t,o-1,n),C(e,r.y1+t,o+1,n),S(e,_,e.length-1,n),C(e,p,0,n)}function C(e,n,o,r){for(;o<e.length;++o){const i=e[o],s=(n-i.y0)*r;s>1e-6&&(i.y0+=s,i.y1+=s),n=i.y1+t}}function S(e,n,o,r){for(;o>=0;--o){const i=e[o],s=(i.y1-n)*r;s>1e-6&&(i.y0-=s,i.y1-=s),n=i.y0-t}}function E({sourceLinks:t,targetLinks:e}){if(void 0===n){for(const{source:{sourceLinks:t}}of e)t.sort(c);for(const{target:{targetLinks:e}}of t)e.sort(l)}}function N(t){if(void 0===n)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(c),n.sort(l)}function D(e,n){let o=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:r,width:i}of e.sourceLinks){if(r===n)break;o+=i+t}for(const{source:t,width:r}of n.targetLinks){if(t===e)break;o-=r}return o}function P(e,n){let o=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:r,width:i}of n.targetLinks){if(r===e)break;o+=i+t}for(const{target:t,width:r}of e.sourceLinks){if(t===n)break;o-=r}return o}return F.update=function(t){return y(t),t},F.nodeId=function(t){return arguments.length?(v="function"===typeof t?t:s(t),F):v},F.nodeAlign=function(t){return arguments.length?(b="function"===typeof t?t:s(t),F):b},F.nodeSort=function(t){return arguments.length?(e=t,F):e},F.nodeWidth=function(t){return arguments.length?(m=+t,F):m},F.nodePadding=function(e){return arguments.length?(k=t=+e,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?(n=t,F):n},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,e,n){"use strict";n.d(e,{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,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,o){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+o)},bezierCurveTo:function(t,e,n,o,r,i){this._+="C"+ +t+","+ +e+","+ +n+","+ +o+","+(this._x1=+r)+","+(this._y1=+i)},arcTo:function(t,e,n,r,s){t=+t,e=+e,n=+n,r=+r,s=+s;var l=this._x1,c=this._y1,f=n-t,u=r-e,h=l-t,a=c-e,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=e);else if(d>i)if(Math.abs(a*f-u*h)>i&&s){var x=n-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/_,v=m/w;Math.abs(k-1)>i&&(this._+="L"+(t+k*h)+","+(e+k*a)),this._+="A"+s+","+s+",0,0,"+ +(a*x>h*y)+","+(this._x1=t+v*f)+","+(this._y1=e+v*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,l,c,f){t=+t,e=+e,f=!!f;var u=(n=+n)*Math.cos(l),h=n*Math.sin(l),a=t+u,d=e+h,x=1^f,y=f?l-c:c-l;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+a+","+d:(Math.abs(this._x1-a)>i||Math.abs(this._y1-d)>i)&&(this._+="L"+a+","+d),n&&(y<0&&(y=y%r+r),y>s?this._+="A"+n+","+n+",0,1,"+x+","+(t-u)+","+(e-h)+"A"+n+","+n+",0,1,"+x+","+(this._x1=a)+","+(this._y1=d):y>i&&(this._+="A"+n+","+n+",0,"+ +(y>=o)+","+x+","+(this._x1=t+n*Math.cos(c))+","+(this._y1=e+n*Math.sin(c))))},rect:function(t,e,n,o){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +o+"h"+-n+"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 e=x,n=y,o=a,r=d,i=null;function s(){var s,l=u.call(arguments),c=e.apply(this,l),h=n.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?(e=t,s):e},s.target=function(t){return arguments.length?(n=t,s):n},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,e,n,o,r){t.moveTo(e,n),t.bezierCurveTo(e=(e+o)/2,n,e,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}}}]);