"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[20200],{849267(e,t,l){l.r(t),l.d(t,{default:()=>sa});var a=l(296540),n=l(956347),r=l(136048),c=l(592510),s=l(834959),i=l(604482),o=l(413357),m=l(422969),u=l(860923),d=l(105540),E=l(627440),A=l(596731),C=l(469733),p=l(415331),O=l(568977);const h=e=>{const t=(0,C.useSelector)(O.mJ);return a.createElement(p.A,{routes:t,...e})};var S=l(670180),b=l(257143),g=l(457311),T=l(71177),I=l(736388),N=l(15095),_=l(235163),k=l(595369),M=l(190615),f=l(916537);const L=[{icon:a.createElement(M.A,{size:"original"}),label:a.createElement(f.sA,{id:"COMMON_FLOWS"}),id:S.H.FLOWS},{icon:a.createElement(k.A,{size:"original"}),label:a.createElement(f.sA,{id:"COMMON_ACTIVITY"}),id:S.H.ACTIVITY}],D=(0,a.memo)(({insightsRoute:e})=>{const t=(0,n.W6)(),l=(0,C.useSelector)(O.mJ),r=(0,N.A)(`${E.VO.INSIGHTS}/${S.H.FLOWS}`),c=(0,N.A)(`${E.VO.INSIGHTS}/${S.H.ACTIVITY}`),s=(0,a.useCallback)(({id:e})=>{switch(e){case S.H.FLOWS:t.push(r);break;case S.H.ACTIVITY:t.push(c)}},[t,r,c]),i=(0,a.useMemo)(()=>L.filter(({id:e})=>l[e][E.o9.NAVIGATION][E.mx.AVAILABLE]),[l]);return a.createElement(_.A,{tabs:i,selectedTab:e,onSelectTab:s})});var v;!function(e){e.FLOWS="flows"}(v||(v={}));var w=l(46685),y=l(861878),R=l(17441),$=l(9535),P=l(445054),F=l(580176),W=l(716654),H=l(968906),x=l(451723),z=l(398300),Y=l(845030);const U=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),t=(0,a.useCallback)(()=>{e((0,Y.XP)({id:z.H.FLOWS_DOWNLOAD,type:z.H.FLOWS_DOWNLOAD}))},[e]);return(0,x.A)().isFlowsDownloadAvailable?a.createElement(y.A,{onPress:t,labelId:"COMMON_DOWNLOAD",...H.A.addDataTestId(H.A.TestId.SIDE_PANEL_TRIGGER)}):null});var Z=l(264863),B=l(267094),j=l(238761),V=l(758649),G=l(928085),X=l(39512),K=l(445535),q=l(196010),J=l(765051),Q=l(277517),ee=l(302167),te=l(792072),le=l(959341),ae=l(71479),ne=l(294303);const re=(0,ae.A)(ne.A)`
  > div:first-child > div {
    width: fit-content;
  }
`,ce=()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(W.zB),{areAllFlowsSupported:l,areAllFlowsEnabled:n}=(0,x.A)(),r=(0,C.useSelector)(te.Ty),c=(0,C.useSelector)(Q.YX),s=(0,C.useSelector)(ee.fu),i=(0,G.A)(`${le.bB}/${le.Uy.SSL_INSPECTION}`),o=(0,a.useCallback)(t=>()=>{e((0,X.A)(t))},[e]),m=(0,a.useCallback)(()=>{e((0,g.oz)({...s,enabled_allowed_traffic:!0})).then(()=>{e((0,X.A)(J.L1.ALL_FLOWS))})},[e,s]),u=(0,a.useMemo)(()=>[{id:J.L1.ALL_FLOWS,label:"FLOWS_ALL_FLOWS",available:l,disabled:!n,description:s.enabled_allowed_traffic?null:a.createElement("span",null,a.createElement(f.sA,{id:"COMMON_FLOWS_BLOCKED_TRAFFIC_ONLY",values:{link:a.createElement(V.A,{variant:"inline",type:"button",size:"small",onClick:m},a.createElement(f.sA,{id:"COMMON_CHANGE_TO_ALL_TRAFFIC"}))}}))},{id:J.L1.BLOCKED,label:"COMMON_BLOCKED",available:!0,disabled:!1,description:null},{id:J.L1.THREATS,label:"COMMON_THREATS",available:!0,disabled:!1,description:null},{id:J.L1.NEXT_AI,label:"COMMON_NEXT_AI",available:r,disabled:!c,description:c?null:a.createElement(f.sA,{id:"FLOWS_NEXT_AI_DISABLED_TOOLTIP",values:{link:a.createElement(q.A,{to:i},a.createElement(f.sA,{id:"FLOWS_VIEW_INSPECTION_SETTINGS"}))}})}].filter(({available:e})=>e).map(({id:e,label:l,disabled:n,description:r})=>({id:e,children:a.createElement(f.sA,{id:l}),onChange:o(e),checked:t===e,disabled:n,tooltipProps:{description:r}})),[t,o,l,r,s.enabled_allowed_traffic,m,c,i,n]);return a.createElement(K.A,{label:a.createElement(f.sA,{id:"COMMON_FLOWS"}),hasPaddedContent:!0},a.createElement(re,null,a.createElement(j.A,{items:u,spacing:"flush"})))};var se=l(436017),ie=l(217439),oe=l(644659),me=l(469987);const ue=()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(W.Lw),l=(0,C.useSelector)(oe.t),n=(0,a.useCallback)(({target:{checked:t}})=>{e((0,me.dU)(t))},[e]);return l?a.createElement(K.A,null,a.createElement(se.A,{onChange:n,checked:t,full:!0,size:"small"},a.createElement(ie.A,{size:"small",color:"text-1",weight:"bold"},a.createElement(f.sA,{id:"FLOWS_FLOW_SUMMARY"})))):null};var de=l(764784),Ee=l(822336),Ae=l(566723);const Ce=(0,ae.A)(ne.A)`
  width: 100%;
  justify-content: space-between;
  border-radius: ${Ee.Ay["desktop-radius-global"]};
  padding: ${Ae.kc};
  background: ${({theme:{themeName:e}})=>Ee.Ay[`desktop-color-neutral-01-${e}`]};
  gap: ${Ae.kc};
`,pe=(0,a.memo)(()=>(0,x.A)().showExternalDiskMessage?a.createElement(Ce,null,a.createElement(de.A,{size:"original",variant:"fill",isActive:!0}),a.createElement(ie.A,{size:"medium"},a.createElement(f.sA,{id:"COMMON_FLOWS_ADD_STORAGE_MESSAGE"}))):null);var Oe=l(64741),he=l(961630),Se=l(874807),be=l(382915),ge=l(597073),Te=l(513587),Ie=l(584916);const Ne={opacity:.5,pointerEvents:"none"},_e=(0,ae.A)(ne.A)`
  background: ${({theme:{themeName:e}})=>Ee.Ay[`desktop-color-neutral-01-${e}`]};
  border-radius: ${Ee.Ay["desktop-radius-base"]};
  padding: ${Ae.kc};
  cursor: pointer;
  align-items: center;
  height: ${Ae.fS};
`,ke=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),[t,l]=(0,a.useState)(!1),n=(0,C.useSelector)(W.tT),r=(0,Te.A)(),c=(0,a.useCallback)(()=>{r&&(e((0,me.bD)({...n,endDate:new Date})),l(!0),setTimeout(()=>{l(!1)},750))},[e,n,r]);return a.createElement(_e,null,a.createElement(ge.A,{size:"original",style:{...t||n.preset===Ie.j?Ne:{}},onClick:c,actionable:!0}))});var Me=l(361485);const fe=(0,ae.A)(ne.A)`
  > div:first-child {
    width: 100%;
  }
  align-items: center;
  gap: ${Ae.YC};
`,Le=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),{formatMessage:t}=(0,f.tz)(),l=(0,C.useSelector)(W.xM),[n,r]=(0,a.useState)(l||Me.X),c=(0,a.useCallback)(t=>{e((0,me.lB)(t))},[e]),s=(0,a.useMemo)(()=>(0,Oe.A)(e=>{c(e)},Me.i),[c]),i=(0,a.useCallback)(()=>{r(Me.X),s(Me.X),s.flush()},[s]),o=(0,a.useCallback)((e,t)=>{r(t),s(t)},[s]),m=(0,a.useCallback)((e,t)=>{s(t),s.flush()},[s]),u=(0,a.useMemo)(()=>t({id:"COMMON_SEARCH"}),[t]);return(0,a.useEffect)(()=>{r(l)},[l]),a.createElement(fe,null,a.createElement(he.A,{onAddTag:Se.P1,onRemoveTag:Se.P1,onReset:i,onChange:o,value:n,placeholder:u,onSubmit:m,width:be.Em}),a.createElement(ke,null))});var De=l(969072),ve=l(27075),we=l(180524),ye=l(286388),Re=l(311785);const $e=(0,ae.A)(ne.A)`
  align-items: center;
  gap: ${Ae.YC};
`,Pe=(0,ae.A)(ne.A,(0,Re.A)("isActive"))`
  padding: ${"1px 7px"};
  cursor: pointer;
  border-radius: ${Ee.Ay["desktop-radius-base"]};
  border: 1px solid
    ${({theme:{themeName:e},isActive:t})=>Ee.Ay[`desktop-color-${t?"ublue-06":"neutral-03"}-${e}`]};
  border-radius: ${Ee.Ay["desktop-radius-base"]};
`,Fe=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(W.ti),l=(0,a.useCallback)(l=>()=>{e((0,me.th)(t.includes(l)?t.filter(e=>e!==l):[...t,l]))},[e,t]);return a.createElement($e,null,a.createElement(we.A,{description:a.createElement(f.sA,{id:"COMMON_ALLOWED"})},a.createElement(Pe,{isActive:t.includes(ye.HI.ALLOWED),onClick:l(ye.HI.ALLOWED)},a.createElement(ve.A,{size:"original"}))),a.createElement(we.A,{description:a.createElement(f.sA,{id:"COMMON_BLOCKED"})},a.createElement(Pe,{isActive:t.includes(ye.HI.BLOCKED),onClick:l(ye.HI.BLOCKED)},a.createElement(De.A,{size:"original"}))))});var We=l(323406),He=l(471113);const xe=(0,a.memo)(({flowsRisk:e,flowsRisks:t})=>{const l=(0,C.useDispatch)(),n=(0,a.useMemo)(()=>t.includes(e),[e,t]),r=(0,a.useCallback)(()=>{l((0,me.Ce)(n?t.filter(t=>t!==e):[...t,e]))},[l,e,t,n]);return a.createElement(we.A,{description:a.createElement(f.sA,{id:We.r$[e]})},a.createElement(He.zn,{isActive:n,flowsRisk:e,onClick:r},a.createElement(He.Di,null),a.createElement(He.Di,null),a.createElement(He.Di,null)))}),ze=(0,ae.A)(ne.A,(0,Re.A)("fullWidth"))`
  width: 100%;
  align-items: center;
  gap: ${Ae.YC};
  > div {
    width: ${({fullWidth:e})=>e?"100%":"auto"};
  }
`,Ye=(0,a.memo)(({fullWidth:e})=>{const t=(0,C.useSelector)(W.IG);return a.createElement(ze,{fullWidth:e},a.createElement(xe,{flowsRisk:ye.GD.LOW,flowsRisks:t}),a.createElement(xe,{flowsRisk:ye.GD.MEDIUM,flowsRisks:t}),a.createElement(xe,{flowsRisk:ye.GD.HIGH,flowsRisks:t}))}),Ue=(0,ae.A)(ne.A)`
  align-items: center;
  gap: ${Ae.xO};
`,Ze=()=>{const e=(0,C.useSelector)(W.lX);return a.createElement(K.A,{label:a.createElement(f.sA,{id:"FLOWS_RISK"})},a.createElement(Ue,null,a.createElement(Ye,{fullWidth:!e}),e?a.createElement(Fe,null):null))};var Be=l(753103),je=l(966425),Ve=l(314370);const Ge=({id:e})=>a.createElement(K.A,{id:Ve.j1[e],label:a.createElement(f.sA,{id:Ve.ZC[e]}),initialExpanded:!1},a.createElement(je.A,{id:e})),Xe=()=>a.createElement(Ge,{id:Be.Z.SOURCE_ZONE}),Ke=()=>a.createElement(Ge,{id:Be.Z.SOURCE_REGION}),qe=()=>a.createElement(Ge,{id:Be.Z.SOURCE_PORT}),Je=()=>a.createElement(Ge,{id:Be.Z.SOURCE}),Qe=()=>a.createElement(Ge,{id:Be.Z.SOURCE_NETWORK}),et=()=>a.createElement(Ge,{id:Be.Z.SOURCE_MAC}),tt=()=>a.createElement(Ge,{id:Be.Z.SOURCE_IP}),lt=()=>a.createElement(Ge,{id:Be.Z.SERVICE}),at=()=>a.createElement(Ge,{id:Be.Z.PROTOCOL}),nt=()=>a.createElement(Ge,{id:Be.Z.POLICY_TYPE}),rt=()=>a.createElement(Ge,{id:Be.Z.POLICY}),ct=()=>{const e=(0,C.useSelector)(te.Ty),t=(0,C.useSelector)(Q.YX);return e&&t?a.createElement(Ge,{id:Be.Z.NEXT_AI_QUERY}):null},st=()=>a.createElement(Ge,{id:Be.Z.INTERFACE_OUT}),it=()=>a.createElement(Ge,{id:Be.Z.INTERFACE_IN}),ot=()=>a.createElement(Ge,{id:Be.Z.DESTINATION_ZONE}),mt=()=>a.createElement(Ge,{id:Be.Z.DESTINATION_REGION}),ut=()=>a.createElement(Ge,{id:Be.Z.DESTINATION_PORT}),dt=()=>a.createElement(Ge,{id:Be.Z.DESTINATION}),Et=()=>a.createElement(Ge,{id:Be.Z.DESTINATION_NETWORK}),At=()=>a.createElement(Ge,{id:Be.Z.DESTINATION_MAC}),Ct=()=>a.createElement(Ge,{id:Be.Z.DESTINATION_IP}),pt=()=>a.createElement(B.A,null,a.createElement(Je,null),a.createElement(Xe,null),a.createElement(Qe,null),a.createElement(et,null),a.createElement(tt,null),a.createElement(qe,null),a.createElement(Ke,null),a.createElement(dt,null),a.createElement(ot,null),a.createElement(Et,null),a.createElement(At,null),a.createElement(Ct,null),a.createElement(ut,null),a.createElement(mt,null),a.createElement(lt,null),a.createElement(at,null),a.createElement(it,null),a.createElement(st,null),a.createElement(rt,null),a.createElement(nt,null),a.createElement(ct,null));var Ot=l(958178),ht=l(609950),St=l(388287),bt=l(160087);const gt=(0,ae.A)(bt.s)``,Tt=(0,ae.A)(ne.A)`
  width: 100%;
  align-items: center;
  justify-content: space-between;
`,It=(0,ae.A)(ne.A)`
  width: 100%;
  height: 120px;
`,Nt=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(oe.t),l=(0,C.useSelector)(Ot.o),n=(0,C.useSelector)(W.FW),r=(0,a.useCallback)(({target:{checked:t}})=>{e((0,me.BN)(t))},[e]);return t||l?a.createElement(gt,null,a.createElement(Tt,null,a.createElement(se.A,{onChange:r,checked:n,full:!0,size:"small"},a.createElement(ie.A,{size:"small",color:"text-1",weight:"bold"},a.createElement(f.sA,{id:t?"FLOWS_ON_MAP":"FLOWS_GEO_MAP"})))),a.createElement(It,null,a.createElement(t?St.A:ht.A,{minimized:!0}))):null});var _t=l(156372),kt=l(407652),Mt=l(872797),ft=l(961390),Lt=l(275737);const Dt={[ye.ss.INCOMING]:a.createElement(Lt.A,{size:"original"}),[ye.ss.OUTGOING]:a.createElement(ft.A,{size:"original"}),[ye.ss.LOCAL]:a.createElement(Mt.A,{size:"original"})},vt=(0,ae.A)(ne.A)`
  justify-content: space-between;
  align-items: center;
  width: 100%;
`,wt=(0,ae.A)(ne.A)`
  align-items: center;
  gap: ${Ae.YC};
`,yt=(0,ae.A)(ne.A,(0,Re.A)("isActive"))`
  padding: 1px 7px;
  cursor: pointer;
  border-radius: ${Ee.Ay["desktop-radius-base"]};
  border: 1px solid
    ${({theme:{themeName:e},isActive:t})=>Ee.Ay[`desktop-color-${t?"ublue-06":"neutral-03"}-${e}`]};
  border-radius: ${Ee.Ay["desktop-radius-base"]};
`,Rt=()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(W._K),l=(0,a.useCallback)(l=>()=>{e((0,me.A6)(t.includes(l)?t.filter(e=>e!==l):[...t,l]))},[e,t]);return a.createElement(K.A,null,a.createElement(vt,null,a.createElement(ie.A,{size:"small",color:"text-1",weight:"bold"},a.createElement(f.sA,{id:"COMMON_DIRECTION"})),a.createElement(wt,null,kt.XC.map(e=>a.createElement(we.A,{key:e,description:a.createElement(f.sA,{id:_t.Z[e]})},a.createElement(yt,{isActive:t.includes(e),onClick:l(e)},Dt[e]))))))};var $t=l(149188),Pt=l(801081),Ft=l(48369),Wt=l.n(Ft),Ht=l(720548);const xt=(0,Pt.Mz)(W.tT,({startDate:e,endDate:t})=>Ht.w.map(l=>{return a=l.getRange(new Date),{...l,id:l.id,range:a,selected:Wt()(e,a.startDate)&&Wt()(t,a.endDate)};var a}));var zt=l(50746),Yt=l(250639),Ut=l(496507),Zt=l(979106);(0,ae.A)(ne.A)`
  width: 100%;
`;const Bt=(0,ae.A)(Zt.A)`
  min-height: ${Ae.fS};
  > div > button:last-of-type {
    padding: 0;
  }
`,jt=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(W.tT),l=(0,C.useSelector)(xt),[n,r]=(0,a.useState)(null===t.preset?Ie.j:t.preset),[c,s]=(0,a.useState)(null===t.preset?{startDate:t.startDate,endDate:t.endDate}:null),i=(0,a.useCallback)(({id:t})=>{const a=l.find(e=>e.id===t);a?e((0,me.bD)({...a.getRange(new Date),preset:t})):c&&e((0,me.bD)({...c,preset:Ie.j})),r(t)},[c,e,l]),o=(0,a.useCallback)(()=>{i({id:Ut.U.ONE_MONTH})},[i]),m=(0,a.useCallback)(e=>{s(e),r(Ie.j)},[]),u=(0,a.useMemo)(()=>t.preset===Ie.j,[t.preset]),d=(0,a.useCallback)(()=>{e((0,me.Rh)(Yt.J.HEADER))},[e]),E=(0,a.useMemo)(()=>({id:Ie.j,label:a.createElement(zt.A,{currentFlowsCalendarId:Yt.J.HEADER,onRangeSelected:m,onClear:o},a.createElement($t.A,{size:"original",actionable:!0,isActive:u,onClick:d}))}),[u,d,o,m]);(0,a.useEffect)(()=>{t.preset===Ie.j&&n!==Ie.j&&r(Ie.j)},[t.preset,n]);const A=(0,a.useMemo)(()=>[...l.map(({id:e,message:t,messageValues:l})=>({id:e,label:a.createElement(f.sA,{id:t,values:l})})),E],[l,E]);return a.createElement(Bt,{tabs:A,selectedTab:n,onSelectTab:i,variant:"filter",stretched:!0})});var Vt=l(592563),Gt=l(256856),Xt=l(316144),Kt=l(922751),qt=l(532419),Jt=l(171073);const Qt=(0,ae.A)(ne.A)`
  align-items: center;
  gap: ${Ae.kc};
  justify-content: center;
  padding: ${Ae.YC};
  border-radius: ${Ee.Ay["desktop-radius-base"]};
  border: 1px solid ${({theme:{themeName:e}})=>Ee.Ay[`desktop-color-neutral-02-${e}`]};
`,el=(0,ae.A)(ne.A)`
  align-items: center;
  gap: ${Ae.YC};
  white-space: nowrap;
`,tl=()=>{const e=(0,n.W6)(),t=(0,C.useSelector)(te.$c),{isAvailable:l,isSubscribed:r,unavailabilityReason:s,redirect:i}=(0,Kt.g)(),o=(0,C.useSelector)(qt.$x),u=(0,G.A)(`${le.bB}/${le.Uy.CYBERSECURE}`),d=(0,Xt.Ad)(o),E=(0,a.useCallback)(()=>{e.push(u)},[e,u]);return(0,m.A)([(0,T.m)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}),(0,Jt.Uc)(void 0,{crudCacheStrategy:{type:c.e.CACHE}})],t?a.createElement(Qt,null,a.createElement(we.A,{description:r?null:a.createElement(f.sA,{id:"FLOWS_CYBERSECURE_TOOLTIP"})},a.createElement(el,null,a.createElement(Gt.A,{size:"original",isActive:r}),a.createElement(ie.A,{size:"medium",color:"inherit"},a.createElement(f.sA,{id:r?d?"COMMON_CYBERSECURE_ENTERPRISE":"COMMON_CYBERSECURE":"COMMON_CYBERSECURE_ENHANCED"})))),r?a.createElement(Vt.A,{type:"button",fontSize:"medium",onPress:E},a.createElement(ie.A,{size:"medium",color:"inherit"},a.createElement(f.sA,{id:"COMMON_ACTIVE"}))):a.createElement(we.A,{description:l?void 0:s},a.createElement("span",null,a.createElement(Vt.A,{type:"button",fontSize:"medium",onPress:i,isDisabled:!l},a.createElement(f.sA,{id:"COMMON_ACTIVATE"}))))):null)};var ll=l(429252),al=l.n(ll),nl=l(314714),rl=l(523275),cl=l(77247),sl=l(67716),il=l(518089),ol=l(42222),ml=l(198494),ul=l(415246),dl=l(789768),El=l(362412);const Al=(0,ae.A)(ne.A)`
  flex-direction: column;
  gap: ${Ae.kc};
`,Cl=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),{formatMessage:t}=(0,f.tz)(),l=(0,C.useSelector)(W.zB),n=(0,C.useSelector)(te.Ty),r=(0,C.useSelector)(Q.YX),{areAllFlowsSupported:c,areAllFlowsEnabled:s}=(0,x.A)(),i=(0,a.useMemo)(()=>[...c?[{value:J.L1.ALL_FLOWS,label:t({id:"FLOWS_ALL_FLOWS"}),disabled:!s}]:[],{value:J.L1.BLOCKED,label:t({id:"COMMON_BLOCKED"})},{value:J.L1.THREATS,label:t({id:"COMMON_THREATS"})},...n?[{value:J.L1.NEXT_AI,label:t({id:"COMMON_NEXT_AI"}),disabled:!r}]:[]],[t,n,r,c,s]),o=(0,a.useCallback)(({value:t})=>{e((0,X.A)(t))},[e]);return a.createElement(Al,null,a.createElement(ie.A,{size:"small",color:"text-1"},a.createElement(f.sA,{id:"COMMON_CUSTOMIZE_COLUMNS"})),a.createElement(El.A,{options:i,variant:"secondary",width:"100%",value:l,onChange:o}))}),pl=(0,ae.A)(il.CW)``,Ol=(0,ae.A)(il.kp)`
  gap: ${Ae.kc};
  > label:first-child {
    margin-bottom: ${Ae.xO};
  }
`,hl=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),t=(0,a.useRef)(null),l=(0,cl.A)(t),n=(0,C.useSelector)(W.bB),r=(0,C.useSelector)(W.zB),c=(0,a.useCallback)(({target:{checked:t,name:l}})=>{e((0,me.jo)(t?[...n,l]:n.filter(e=>e!==l)))},[e,n]),s=(0,a.useMemo)(()=>al()(n,kt.RI[r]),[n,r]),{tablePresets:o}=(0,C.useSelector)(ml.Gm),{sizes:m}=(0,a.useMemo)(()=>o[r],[o,r]),u=(0,a.useMemo)(()=>al()(m,(0,rl.A)()),[m]),d=(0,C.useSelector)(W.mE),E=(0,a.useCallback)(({target:{ariaChecked:t}})=>{switch(t){case"true":return e((0,me.jo)([])),null;case"false":case"mixed":return e((0,me.jo)(d)),null;default:return null}},[e,d]),A=(0,a.useCallback)(()=>{e((0,F.Zi)(i.g1.INSIGHTS))},[e]),p=(0,a.useCallback)(()=>{(0,C.batch)(()=>{s||e((0,me.jo)(kt.RI[r])),u||e((0,dl.dR)({[ul.lR.TABLE_PRESETS]:{...o,[r]:{...o[r],sizes:(0,rl.A)()}}}))})},[e,r,s,o,u]),O=(0,a.useMemo)(()=>!!n.length&&(n.length===d.length||"mixed"),[n.length,d.length]),h=(0,a.useMemo)(()=>s&&u,[s,u]);return a.createElement(pl,{hasOverflow:l},a.createElement(Cl,null),a.createElement(Ol,null,a.createElement(nl.A,{id:"flows-all-columns",checked:O,onChange:E},a.createElement(ie.A,{size:"medium",color:"text-2"},a.createElement(f.sA,{id:"COMMON_ALL"}))),d.map(e=>a.createElement(nl.A,{key:e,id:e,checked:n.includes(e),name:e,onChange:c},a.createElement(ie.A,{size:"medium",color:"text-2"},a.createElement(f.sA,{id:ol.eu[e]})))),a.createElement(il.Ot,null,a.createElement(sl.d$,null),a.createElement(Vt.A,{type:"button",onPress:p,isDisabled:h},a.createElement(ie.A,{size:"medium",color:"inherit"},a.createElement(f.sA,{id:"COMMON_ACTION_RESTORE"}))),a.createElement(Vt.A,{type:"button",onPress:A},a.createElement(ie.A,{size:"medium",color:"inherit"},a.createElement(f.sA,{id:"COMMON_ACTION_DONE"}))))))}),Sl=(0,a.memo)(()=>a.createElement(hl,null));var bl=l(54227),gl=l(705145),Tl=l(177846),Il=l(260411),Nl=l(120205);const _l=(0,ae.A)(ne.A)`
  flex-direction: row;
  gap: ${Ae.Ln};
  > label {
    max-width: 50%;
    p {
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
`;var kl=l(903216);const Ml=(0,ae.A)(ne.A)`
  width: 8px;
  height: 3px;
  background: ${({theme:{themeName:e}})=>Ee.Ay[`desktop-color-purple-06-${e}`]};
`,fl=e=>a.createElement(Ml,{...e}),Ll=(0,ae.A)(ne.A)`
  width: 8px;
  height: 8px;
  background: linear-gradient(
    to bottom,
    ${({theme:{themeName:e}})=>Ee.Ay[`desktop-color-aqua-06-${e}`]} 37.5%,
    transparent 37.5%,
    transparent 62.5%,
    ${({theme:{themeName:e}})=>Ee.Ay[`desktop-color-purple-06-${e}`]} 62.5%,
    ${({theme:{themeName:e}})=>Ee.Ay[`desktop-color-purple-06-${e}`]} 100%
  );
`,Dl=e=>a.createElement(Ll,{...e}),vl=(0,ae.A)(ne.A)`
  width: 8px;
  height: 3px;
  background: ${({theme:{themeName:e}})=>Ee.Ay[`desktop-color-aqua-06-${e}`]};
`,wl=e=>a.createElement(vl,{...e});var yl=l(86747),Rl=l(792542);const $l=(0,Pt.Mz)(Rl.Sm,e=>e.reduce((e,t)=>e+t["rx_byte-r"]*t.interval_seconds,0)),Pl=(0,Pt.Mz)(Rl.Sm,e=>e.reduce((e,t)=>e+t["tx_byte-r"]*t.interval_seconds,0)),Fl=(0,ae.A)(ne.A)`
  border: 1px solid ${({theme:{themeName:e}})=>Ee.Ay[`desktop-color-neutral-03-${e}`]};
  border-radius: ${Ee.Ay["desktop-radius-base"]};
  padding: ${Ae.kc};
  gap: ${Ae.kc};
  width: 100%;
  flex-direction: column;
`,Wl=(0,ae.A)(ne.A)`
  justify-content: space-between;
  width: 100%;
  align-items: center;
`;var Hl=l(895),xl=l(89716),zl=l(888964),Yl=l(703447);const Ul=({total_bytes:e},{total_bytes:t})=>t-e,Zl=({client:e,client:{mac:t,name:l}})=>({id:t,type:"CHECKBOX",checkboxProps:{symbol:a.createElement(Yl.A,{client:e,width:20,height:20})},title:l,children:[]}),Bl=(0,a.memo)(({queryParams:e,label:t})=>{const l=(0,a.useRef)(void 0),n=(0,C.useDispatch)(),r=(0,C.useSelector)(Tl.Wq),c=(0,C.useSelector)((0,a.useMemo)(()=>(0,xl.WY)(e),[e])),s=(0,a.useMemo)(()=>{return l.current?(e=[l.current,...c]).filter((e=>({mac:t},l)=>e.findIndex((e=>t=>t.mac===e)(t))===l)(e)):c;var e},[c,l]),i=(0,a.useMemo)(()=>s.sort(Ul).map(Zl),[s]),o=(0,a.useMemo)(()=>c.map(({mac:e})=>e),[c]),m=(0,a.useMemo)(()=>r.length===o.length?"all":new Set(r),[o.length,r]),u=(0,a.useCallback)(e=>{n((0,Il._b)("all"===e?o:Array.from(e)))},[n,o]),d=(0,a.useCallback)(e=>{n((0,Il._b)(Array.from(e)))},[n]),E=(0,a.useCallback)(()=>{n((0,Il._b)([]))},[n]);return(0,a.useEffect)(()=>{const e=c.find(({mac:e})=>r.includes(e));e&&(l.current=e)},[c,r]),a.createElement(K.A,{id:zl.R.ACTIVITY_CLIENTS,label:t},a.createElement(Hl.A,{id:zl.R.ACTIVITY_CLIENTS,items:i,selectedKeys:m,onSelectionChange:u,onSelectAll:d,onDeselectAll:E}))});var jl=l(767974),Vl=l(668995),Gl=l(601242),Xl=l(455155),Kl=l(175522);const ql=({total_bytes:e},{total_bytes:t})=>t-e,Jl=({category:e,application:t})=>(({name:l,iconFileName:n})=>({id:[e,t].join(Kl.A),type:"CHECKBOX",title:l,checkboxProps:{symbol:a.createElement(Xl.A,{iconFileName:n,dimension:20})},children:[]}))((0,Gl.HH)((0,Vl.h)(e,t))),Ql=(0,a.memo)(({queryParams:e,label:t})=>{const l=(0,C.useDispatch)(),n=(0,C.useSelector)(Tl.Uz),r=(0,C.useSelector)((0,a.useMemo)(()=>(0,xl.mH)(e),[e])),c=(0,a.useMemo)(()=>r.sort(ql).map(Jl),[r]),s=(0,a.useMemo)(()=>n.length===r.length?"all":new Set(n.map(e=>[e[jl.wA.CAT],e[jl.wA.APP]].join(Kl.A))),[n,r.length]),i=(0,a.useCallback)(e=>{l((0,Il.yJ)("all"===e?n:Array.from(e).map(e=>(([e,t])=>({[jl.wA.CAT]:+e,[jl.wA.APP]:+t}))(e.toString().split(Kl.A)))))},[l,n]),o=(0,a.useCallback)(e=>{l((0,Il.yJ)((e&&"all"!==e?r.filter(({category:t,application:l})=>e.has([t,l].join(Kl.A))):r).map(({category:e,application:t})=>({[jl.wA.CAT]:e,[jl.wA.APP]:t}))))},[l,r]),m=(0,a.useCallback)(()=>{l((0,Il.yJ)([]))},[l]);return a.createElement(K.A,{id:zl.R.ACTIVITY_APPS,label:t},a.createElement(Hl.A,{id:zl.R.ACTIVITY_APPS,items:c,selectedKeys:s,onSelectionChange:i,onSelectAll:o,onDeselectAll:m}))}),ea=(0,a.memo)(()=>{const e=(0,C.useSelector)(Tl.Bw),t=(0,C.useSelector)(Tl.nc),l=(0,a.useMemo)(()=>({start:e.startDate.getTime(),end:e.endDate.getTime(),includeUnidentified:!0}),[e]);return(0,a.useMemo)(()=>{switch(t){case Nl.f.CLIENTS:return a.createElement(Bl,{queryParams:l,label:a.createElement(f.sA,{id:"COMMON_CLIENTS"})});case Nl.f.APPS:return a.createElement(Ql,{queryParams:l,label:a.createElement(f.sA,{id:"COMMON_APPLICATIONS"})});default:return null}},[t,l])}),ta=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(Tl.ij),l=(0,a.useCallback)(()=>{e((0,Il.qx)())},[e]);return a.createElement(R.A,null,a.createElement($.A,{onClear:l,disabled:t}))});var la=l(992149),aa=l(739177);const na=(0,a.memo)(()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(Tl.Bw),[l,n]=(0,a.useState)(null===t.preset?Ie.j:t.preset),[r,c]=(0,a.useState)(null===t.preset?{startDate:t.startDate,endDate:t.endDate}:null),s=(0,a.useCallback)(({id:t})=>{const l=aa.i8.find(e=>e.id===t);l?e((0,Il.Xy)({...l.getRange(new Date),preset:t})):r&&e((0,Il.Xy)({...r,preset:Ie.j})),n(t)},[r,e]),i=(0,a.useCallback)(t=>{c(t),e((0,Il.Xy)({...t,preset:Ie.j})),n(Ie.j)},[e]),o=(0,a.useMemo)(()=>aa.i8.map(({id:e,message:t,messageValues:l})=>({id:e,label:a.createElement(f.sA,{id:t,values:l})})).concat({id:Ie.j,label:a.createElement($t.A,null)}),[]);return a.createElement(Z.A,null,a.createElement(la.A,{presets:o,selectedPreset:l,range:t,onSelectTab:s,onSelectCustomRange:i,showCalendar:l===Ie.j}))}),ra={[S.H.FLOWS]:{footer:a.createElement(()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(W._S),l=(0,P.A)({leftFilterPageId:i.g1.INSIGHTS,leftFilterColumnsId:v.FLOWS}),n=(0,a.useCallback)(()=>{e((0,w.A)())},[e]),r=(0,a.useCallback)(()=>{e((0,F.GD)({leftFilterPageId:i.g1.INSIGHTS,leftFilterColumnsId:v.FLOWS}))},[e]);return a.createElement(R.A,null,a.createElement($.A,{onClear:n,disabled:t}),a.createElement(U,null),a.createElement(y.A,{onPress:r,labelId:"COMMON_CUSTOMIZE_COLUMNS",disabled:l}))},null),columns:a.createElement(Sl,null),children:a.createElement(()=>(0,C.useSelector)(W.x7)?a.createElement(a.Fragment,{key:S.H.FLOWS},a.createElement(Z.A,null,a.createElement(tl,null),a.createElement(pe,null),a.createElement(B.A,null,a.createElement(Le,null),a.createElement(Ze,null))),a.createElement(B.A,null,a.createElement(Z.A,null,a.createElement(jt,null),a.createElement(ue,null),a.createElement(ce,null),a.createElement(Nt,null),a.createElement(Rt,null)),a.createElement(pt,null))):null,null)},[S.H.ACTIVITY]:{footer:a.createElement(ta,null),columns:void 0,children:a.createElement(a.Fragment,{key:S.H.ACTIVITY},a.createElement(()=>{const e=(0,C.useDispatch)(),{formatMessage:t}=(0,f.tz)(),l=(0,C.useSelector)(Tl.Vn),n=(0,C.useSelector)(Tl.mE),r=(0,C.useSelector)($l),c=(0,C.useSelector)(Pl),s=(0,a.useCallback)(({target:{checked:t}})=>{e((0,Il.dm)(t))},[e]),i=(0,a.useCallback)(({value:t})=>{e((0,Il.YO)(t))},[e]),o=(0,a.useMemo)(()=>[{value:yl.u.INTERNET_ACTIVITY,image:a.createElement(Dl,null),label:t({id:"COMMON_INTERNET_ACTIVITY"}),additionalInfo:(0,kl.FI)(r+c)},{value:yl.u.DOWNLOAD,image:a.createElement(wl,null),label:t({id:"COMMON_DOWNLOAD"}),additionalInfo:(0,kl.FI)(r)},{value:yl.u.UPLOAD,image:a.createElement(fl,null),label:t({id:"COMMON_UPLOAD"}),additionalInfo:(0,kl.FI)(c)}],[t,r,c]);return a.createElement(Z.A,null,a.createElement(Fl,null,a.createElement(Wl,null,a.createElement(ie.A,{size:"small",weight:"bold",color:"text-2"},a.createElement(f.sA,{id:"COMMON_STATS"})),a.createElement(se.A,{style:{width:"auto"},onChange:s,checked:l,full:!0,size:"small"})),l?a.createElement(El.A,{style:{whiteSpace:"nowrap"},options:o,width:"100%",variant:"secondary",value:n,onChange:i}):null))},null),a.createElement(na,null),a.createElement(()=>{const e=(0,C.useDispatch)(),t=(0,C.useSelector)(Tl.nc),l=(0,a.useCallback)(t=>()=>{e((0,Il.P7)(t))},[e]),n=(0,a.useMemo)(()=>[{id:Nl.f.APPS,children:a.createElement(f.sA,{id:"COMMON_APPLICATIONS"}),onChange:l(Nl.f.APPS),checked:t===Nl.f.APPS},{id:Nl.f.CLIENTS,children:a.createElement(f.sA,{id:"COMMON_CLIENTS"}),onChange:l(Nl.f.CLIENTS),checked:t===Nl.f.CLIENTS}],[t,l]);return a.createElement(Z.A,null,a.createElement(K.A,{label:a.createElement(f.sA,{id:"ACTIVITY_ANCHOR_BY"}),hasPaddedContent:!0},a.createElement(_l,null,n.map(({id:e,checked:t,onChange:l,children:n})=>a.createElement(bl.A,{key:e,id:e,checked:t,onChange:l},a.createElement(gl.A,{isTruncated:!0,color:"inherit",size:"inherit"},n))))))},null),a.createElement(ea,null))}},ca=(0,a.memo)(({insightsRoute:e})=>{const{footer:t,columns:l,children:n}=(0,a.useMemo)(()=>ra[e],[e]),r=(0,a.useMemo)(()=>{if(e===S.H.FLOWS)return v.FLOWS},[e]);return a.createElement(I.A,{leftFilterPageId:i.g1.INSIGHTS,leftFilterColumnsId:r,tabs:a.createElement(D,{insightsRoute:e}),footer:t,columns:l},n)}),sa=({match:{path:e,params:t,params:{section:l=S.H.FLOWS}}})=>(0,m.A)([(0,g.Uc)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}),(0,T.m)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}),(0,o.Zi)(s.B.FLOWS),(0,o.Zi)(s.B.COUNTRIES),(0,o.Zi)(s.B.ACTIVITY),(0,o.Zi)(s.B.HOTSPOT)],a.createElement(u.A,null,a.createElement(d.A,{leftFilterPageId:i.g1.INSIGHTS,content:a.createElement(ca,{insightsRoute:l})},a.createElement(a.Suspense,{fallback:null},a.createElement(n.dO,null,a.createElement(r.F,{path:b.K[S.H.FLOWS],render:e=>a.createElement(h,{id:S.H.FLOWS,...e})}),a.createElement(r.F,{path:b.K[S.H.ACTIVITY],render:e=>a.createElement(h,{id:S.H.ACTIVITY,...e})}),a.createElement(r.F,{exact:!0,path:A.Si[E.VO.INSIGHTS]},a.createElement(n.rd,{to:(0,n.tW)(e,{...t,section:S.H.FLOWS})})))))),{trackingName:E.VO.INSIGHTS})},720548(e,t,l){l.d(t,{w:()=>r});var a=l(664967),n=l(496507);const r=[a.E[n.U.ONE_HOUR],a.E[n.U.ONE_DAY],a.E[n.U.ONE_WEEK],a.E[n.U.ONE_MONTH]]},518089(e,t,l){l.d(t,{CW:()=>i,Ot:()=>m,kp:()=>o});var a=l(822336),n=l(71479),r=l(566723),c=l(294303),s=l(311785);const i=(0,n.A)(c.A,(0,s.A)("hasOverflow"))`
  width: 180px;
  position: relative;
  border: 1px solid ${({theme:{themeName:e}})=>a.Ay[`desktop-color-neutral-03-${e}`]};
  border-radius: ${a.Ay["desktop-radius-base"]};
  gap: ${r.kc};
  flex-direction: column;
  padding: ${({hasOverflow:e})=>e?`${r.kc} 0 ${r.kc} ${r.kc}`:r.kc};
  margin-bottom: ${r.xO};
`,o=(0,n.A)(c.A)`
  flex-direction: column;
  overflow: auto;
  padding-bottom: ${r.fS};
  > div:nth-child(2) > div:first-child > label {
    padding-left: 0;
  }
  > span:first-child {
    margin-bottom: ${r.YC};
  }
`,m=(0,n.A)(c.A)`
  align-items: center;
  justify-content: space-between;
  position: absolute;
  bottom: 0;
  min-height: 36px;
  background-color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-neutral-00-${e}`]};
  width: calc(100% - (${r.Er}));
  padding-bottom: ${r.Ln};
`},235163(e,t,l){l.d(t,{A:()=>C});var a=l(296540),n=l(979106),r=l(968906),c=l(383725),s=l(67716),i=l(71479),o=l(566723);const m=(0,i.A)("div")`
  > nav > button {
    display: flex;
    flex-direction: row;
    gap: ${o.YC};
  }
`;var u=l(132196);const d=u.AH`
  height: 32px;
`,E=u.AH`
  padding: ${o.YC} !important;
`,A=u.AH`
  padding: ${o.YC} ${o.Ln} !important;
`,C=({selectedTab:e,tabs:t,...l})=>{const i=t.length<=2,o=(0,a.useMemo)(()=>i?t:t.map(t=>e===t.id?t:{...t,label:void 0}),[t,e,i]);return o.length>1?a.createElement(s.T_,{...r.A.addDataTestId(c.b.LEFT_FILTER_PANEL_TABS)},a.createElement(m,null,a.createElement(n.A,{variant:"capsule",stretched:!0,className:d,tabsClassName:d,tabClassName:E,selectedTabClassName:i?void 0:A,tabs:o,selectedTab:e,...l}))):null}},992149(e,t,l){l.d(t,{A:()=>A});var a=l(296540),n=l(469733),r=l(979106),c=l(208522),s=l(208288),i=l(874807),o=l(566723),m=l(294303),u=l(602021),d=l(778085);const E=(0,l(71479).A)(d.A)`
  [data-uic-component='RangeCalendar.Container'] {
    padding: 0;
  }
`,A=({presets:e=[],selectedPreset:t,range:l,onSelectTab:d=i.P1,onSelectCustomRange:A=i.P1,showCalendar:C=!1})=>{const p=(0,n.useSelector)(u.hq),O=(0,a.useMemo)(()=>(0,s.A)(new Date,"ZonedDateTime",p),[p]),h=(0,a.useMemo)(()=>(0,c.A)({start:(0,s.A)(l?.startDate,"ZonedDateTime",p),end:(0,s.A)(l?.endDate,"ZonedDateTime",p)}),[l,p]),S=(0,a.useCallback)(({start:e,end:t})=>{A({startDate:e.toDate(p),endDate:t.toDate(p)})},[A,p]);return a.createElement("div",null,e.length?a.createElement(r.A,{variant:"filter",tabs:e,selectedTab:t,onSelectTab:d,stretched:!0}):null,C?a.createElement(m.A,{marginTop:o.xO},a.createElement(E,{value:h,onChange:S,maxValue:O})):null)}}}]);