"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[3041,89965],{203041:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Y});var r=n(469733),i=n(296540),o=n(217439),a=n(282556),l=n(398300),d=n(689965),m=n(845030),c=n(699784),s=n(73300),N=n(184683),g=n(249738),u=n(731971),E=n(513035),h=n(620637),p=n(705145),A=n(718073),T=n(903216),O=n(668995),C=n(601242),I=n(455155),_=n(596421),L=n(323030),$=n(703447),f=n(274750),k=n(618489),S=n(469987),w=n(71479),x=n(566723),b=n(294303);const y=(0,w.A)(b.A)`
  flex-direction: column;
  gap: ${x.kc};
`,P=(0,w.A)(b.A)`
  justify-content: space-between;
  gap: ${x.Er};
  white-space: nowrap;
`,B=(0,w.A)(b.A)`
  gap: ${x.YC};
  align-items: center;
  width: 100%;
  overflow: hidden;
`,M=(0,w.A)(b.A)`
  margin-top: ${x.Ln};
`;function R(e=[]){return e.slice(0,N.iw)}const v=(e,t)=>n=>i.createElement(P,{key:JSON.stringify(n)},i.createElement(B,null,i.createElement(L.A,{countryCode:n[E.Cs.MOST_FREQUENT_REGION],width:f.mS,height:f.lz}),i.createElement(p.A,{size:"medium",color:"text-2",isTruncated:!0},i.createElement(A.A,{description:n[E.Cs.DESTINATION]},i.createElement(_.A,null,n[E.Cs.DESTINATION])))),i.createElement(k.es,{size:"medium",color:"text-3",onClick:()=>{t([((0,h.isValidIp)(n[E.Cs.DESTINATION])?S.QA:S.tS)([n[E.Cs.DESTINATION]])])}},e.format(n[E.Cs.COUNT]||0))),F=(e,t,n)=>r=>i.createElement(P,{key:JSON.stringify(r)},i.createElement(B,null,i.createElement($.A,{client:{fingerprint:r[E.ng.CLIENT_FINGERPRINT],icon_filename:r[E.ng.ICON_FILENAME],icon_resolutions:r[E.ng.ICON_RESOLUTIONS]},width:f.pC,height:f.sh}),i.createElement(k.es,{size:"medium",color:"text-2",isTruncated:!0,onClick:n(r[E.ng.CLIENT_MAC])},r[E.ng.CLIENT_NAME]||r[E.ng.CLIENT_MAC]||i.createElement(c.sA,{id:"COMMON_UNKNOWN"}))),i.createElement(k.es,{size:"medium",color:"text-3",onClick:()=>{t([(0,S.Tt)([r[E.ng.CLIENT_MAC]])])}},e.format(r[E.ng.COUNT]||0))),U=(e,t)=>n=>i.createElement(P,{key:JSON.stringify(n)},i.createElement(p.A,{size:"medium",color:"text-2",isTruncated:!0},n[E.B9.POLICY_NAME]),i.createElement(k.es,{size:"medium",color:"text-3",onClick:()=>{t([(0,S.DC)([n[E.B9.POLICY_TYPE]])])}},e.format(n[E.B9.COUNT]||0))),z=(e,t,n)=>r=>i.createElement(P,{key:JSON.stringify(r)},i.createElement(B,null,i.createElement($.A,{client:{fingerprint:r[E.S6.CLIENT_FINGERPRINT],icon_filename:r[E.S6.ICON_FILENAME],icon_resolutions:r[E.S6.ICON_RESOLUTIONS]},width:f.pC,height:f.sh}),i.createElement(p.A,{size:"medium",color:"text-2",isTruncated:!0,onClick:n(r[E.S6.CLIENT_MAC])},r[E.S6.CLIENT_NAME]||r[E.S6.CLIENT_MAC]||i.createElement(c.sA,{id:"COMMON_UNKNOWN"}))),i.createElement(k.es,{size:"medium",color:"text-3",onClick:()=>{t([(0,S.Tt)([r[E.S6.CLIENT_MAC]])])}},e.format(r[E.S6.COUNT]||0))),D=(e,t)=>n=>i.createElement(P,{key:JSON.stringify(n)},i.createElement(B,null,i.createElement(L.A,{countryCode:n[E.rL.REGION],width:f.mS,height:f.lz}),i.createElement(p.A,{size:"medium",color:"text-1",isTruncated:!0},n[E.rL.REGION]?i.createElement(c.sA,{id:`COUNTRY_${n[E.rL.REGION]}`,defaultMessage:n[E.rL.REGION]}):i.createElement(c.sA,{id:"COMMON_UNKNOWN"}))),i.createElement(k.es,{size:"medium",color:"text-3",onClick:()=>{t([(0,S.$D)([n[E.rL.REGION]])])}},e.format(n[E.rL.COUNT]||0))),Y=({activeItem:{flowsOverviewType:e}})=>{const t=(0,r.useDispatch)(),n=(0,r.useSelector)(a.zi),h=(0,r.useSelector)(s.jz),A=(0,r.useSelector)((0,i.useMemo)(()=>(0,u.v)(h),[h])),_=(0,i.useMemo)(()=>new Intl.NumberFormat(n,{notation:"standard"}),[n]),L=(0,i.useCallback)(e=>()=>{t((0,m.XP)({type:l.H.CLIENT,id:e}))},[t]),$=(0,i.useCallback)(e=>{t((0,g.p)(e))},[t]),k=(0,i.useMemo)(()=>({[E.rN.TOP_DESTINATIONS]:R(A[E.gl.TOP_ALL_COUNT_BY_DESTINATION]).map(v(_,$)),[E.rN.TOP_CLIENTS]:R(A[E.gl.TOP_ALL_COUNT_BY_CLIENT]).map(F(_,$,L)),[E.rN.TOP_APPS]:R(A[E.gl.TOP_ALL_TRAFFIC_BY_APPLICATION]).map(e=>{return t=(0,C.HH)((0,O.h)(e[E.YF.CATEGORY_ID],e[E.YF.APPLICATION_ID])),i.createElement(P,{key:JSON.stringify(e)},i.createElement(B,null,i.createElement(I.A,{iconFileName:t?.iconFileName,dimension:f.H2}),i.createElement(p.A,{size:"medium",color:"text-1",isTruncated:!0},t?.name||i.createElement(c.sA,{id:"COMMON_UNKNOWN"}))),i.createElement(p.A,{size:"medium",color:"text-3"},(0,T.FI)(e[E.YF.BYTES]||0)));var t}),[E.rN.TOP_TRIGGERED_POLICIES]:R(A[E.gl.TOP_BLOCKED_COUNT_BY_POLICY]).map(U(_,$)),[E.rN.TOP_AFFECTED_CLIENTS]:R(A[E.gl.TOP_BLOCKED_COUNT_BY_CLIENT]).map(z(_,$,L)),[E.rN.TOP_AFFECTED_REGIONS]:R(A[E.gl.TOP_BLOCKED_COUNT_BY_REGION]).map(D(_,$))}),[A,_,$,L])[e];return i.createElement(d.A,null,i.createElement(y,null,k),k.length===N.iw?i.createElement(M,null,i.createElement(o.A,{size:"medium",color:"text-3"},i.createElement(c.sA,{id:"COMMON_TABLE_FOOTER",values:{length:N.iw}}))):null)}},249738:(e,t,n)=>{n.d(t,{p:()=>d});var r=n(469733),i=n(165126),o=n(716654),a=n(95636),l=n(469987);const d=e=>(t,n)=>{(0,r.batch)(()=>{t((0,l.z7)((0,i.A)((0,o.bq)(n()),a.x))),t((0,l.BN)(!1)),e.forEach(t)})}},274750:(e,t,n)=>{n.d(t,{H2:()=>c,hG:()=>i,je:()=>s,lz:()=>a,mS:()=>o,pC:()=>d,sh:()=>m,xu:()=>l});var r=n(822336);const i=5,o=16,a=16,l={borderRadius:r.Ay["desktop-radius-base"]},d=20,m=20,c=20,s=">=4.2.6"},455155:(e,t,n)=>{n.d(t,{A:()=>m});var r=n(469733),i=n(296540),o=n(130851),a=n(765562);const l={};const d=(0,n(71479).A)("img",{shouldForwardProp:e=>"dimension"!==e})`
  ${({dimension:e=22})=>`\n    height: ${e}px;\n    width: ${e}px;\n  `}
`,m=(0,i.memo)(({iconFileName:e,dimension:t,style:n={}})=>{const m=(0,r.useSelector)(o.p);return i.createElement(d,{src:l[e]||encodeURI(`${a.A.dpiPath}${e}`),dimension:t,onLoad:({target:t})=>{l[e]=t.src},onError:({currentTarget:e})=>{e.src=`${m}/dpiFallback.svg`},style:n})})},618489:(e,t,n)=>{n.d(t,{$6:()=>d,GJ:()=>E,IT:()=>c,NP:()=>u,Nt:()=>s,es:()=>g,yJ:()=>N,z1:()=>m});var r=n(822336),i=n(705145),o=n(71479),a=n(566723),l=n(294303);const d=(0,o.A)(l.A)`
  width: 100%;
  > div {
    max-width: ${({flowsOverviewTopByRegionSupported:e})=>100/(e?4:3)}%;
  }
  gap: ${a.Ln};
`,m=(0,o.A)(l.A)`
  width: 100%;
  min-width: 230px;
  padding: ${a.Ln};
  border: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};
  border-radius: ${r.Ay["desktop-radius-base"]};
`,c=(0,o.A)(l.A)`
  width: 100%;
  flex-direction: column;
  gap: ${a.YC};
`,s=(0,o.A)(l.A,{shouldForwardProp:e=>"header"!==e})`
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: ${a.Er};
  white-space: nowrap;
  ${({header:e=!1})=>e?`margin-bottom: ${a.kc};`:""}
`,N=(0,o.A)(l.A)`
  gap: ${a.YC};
  align-items: center;
  width: 100%;
  overflow: hidden;
`,g=(0,o.A)(i.A)`
  width: fit-content;
  cursor: pointer;
  &:hover {
    color: ${({theme:{themeName:e}})=>r.Ay[`desktop-color-ublue-06-${e}`]};
  }
`,u=(0,o.A)(l.A)`
  gap: 2px;
`,E=(0,o.A)(l.A,{shouldForwardProp:e=>"color"!==e})`
  width: 4px;
  height: 4px;
  background-color: ${({color:e,theme:{themeName:t}})=>e||r.Ay[`desktop-color-neutral-02-${t}`]};
  border-radius: 1px;
`},668995:(e,t,n)=>{n.d(t,{h:()=>r});const r=(e,t)=>(e<<16)+t},689965:(e,t,n)=>{n.d(t,{A:()=>g,I:()=>r});var r,i=n(296540),o=n(822336),a=n(427853),l=n(71479),d=n(825032),m=n(566723),c=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(r||(r={}));const s=(0,l.A)(c.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||o.Ay[n===d.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>o.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,N=(0,l.A)(a.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||o.Ay[n===d.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||o.Ay[t===d.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${m.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${m.Ln} ${m.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,g=({type:e,marginBottom:t,margin:n,padding:o,flex:a,width:l,nested:d,...m})=>"items"in m?i.createElement(N,{marginBottom:t,margin:n,padding:o,flex:a,nested:d,...m}):i.createElement(s,{nested:d,width:l,marginBottom:t,margin:n,padding:o,flex:a,isButtonList:e===r.BUTTON_LIST,...m},m.children)},731971:(e,t,n)=>{n.d(t,{v:()=>d});var r=n(801081),i=n(25553),o=n(87485),a=n(146398);const l=e=>(0,r.Mz)((0,i.uh)((0,a.X)(e)),e=>e),d=e=>(0,r.Mz)(l(e),o.i6)}}]);