"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[62458],{143053(e,t,n){n.d(t,{X:()=>r,o:()=>l});var a=n(742920),o=n(286388);const r=()=>({icon:a.C.danger,message:"COMMON_LOG_API_ERROR"}),l={[o.DU.RISK]:[],[o.DU.ACTION]:[],[o.DU.DIRECTION]:[],[o.DU.PROTOCOL]:[],[o.DU.POLICY]:[],[o.DU.POLICY_TYPE]:[],[o.DU.SERVICE]:[],[o.DU.SOURCE_HOST]:[],[o.DU.SOURCE_MAC]:[],[o.DU.SOURCE_IP]:[],[o.DU.SOURCE_PORT]:[],[o.DU.SOURCE_NETWORK_ID]:[],[o.DU.SOURCE_DOMAIN]:[],[o.DU.SOURCE_ZONE_ID]:[],[o.DU.SOURCE_REGION]:[],[o.DU.DESTINATION_HOST]:[],[o.DU.DESTINATION_MAC]:[],[o.DU.DESTINATION_IP]:[],[o.DU.DESTINATION_PORT]:[],[o.DU.DESTINATION_NETWORK_ID]:[],[o.DU.DESTINATION_DOMAIN]:[],[o.DU.DESTINATION_ZONE_ID]:[],[o.DU.DESTINATION_REGION]:[],[o.DU.IN_NETWORK_ID]:[],[o.DU.OUT_NETWORK_ID]:[],[o.DU.NEXT_AI_QUERY]:[],[o.DU.EXCEPT_FOR]:[],[o.DU.SEARCH_TEXT]:"",[o.DU.TIMESTAMP_FROM]:0,[o.DU.TIMESTAMP_TO]:0,[o.DU.PAGE_NUMBER]:0,[o.DU.PAGE_SIZE]:0,[o.DU.SKIP_COUNT]:!1}},263130(e,t,n){n.d(t,{A:()=>m});var a=n(822336),o=n(296540),r=n(217439),l=n(71479),i=n(382389),d=n(566723),c=n(294303);const s=(0,l.A)(r.A)`
  line-height: 20px;
`,m=({icon:e,description:t,action:n,footer:r,background:l,...m})=>{const{themeName:u}=(0,i.u)();return o.createElement(c.A,{flexGrow:1,borderRadius:d.YC,padding:d.kc,background:l||a.Ay[`desktop-color-neutral-01-${u}`],gap:d.kc,flexDirection:"column",...m},o.createElement(c.A,{flexGrow:1,gap:d.kc},e,t?o.createElement(s,{size:"medium"},t):null,n?o.createElement(c.A,{marginLeft:"auto"},o.createElement(s,{size:"medium"},n)):null),r)}},689965(e,t,n){n.d(t,{A:()=>E,I:()=>a});var a,o=n(296540),r=n(822336),l=n(963724),i=n(71479),d=n(825032),c=n(566723),s=n(294303),m=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const u=(0,i.A)(s.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.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}})=>r.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,A=(0,i.A)(l.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.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||r.Ay[t===d.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${c.Ln} ${c.Ln};
      }
    }
  }
`,E=({type:e,marginBottom:t,margin:n,padding:r,flex:l,width:i,nested:d,...c})=>"items"in c?o.createElement(A,{marginBottom:t,margin:n,padding:r,flex:l,nested:d,...c}):o.createElement(u,{nested:d,width:i,marginBottom:t,margin:n,padding:r,flex:l,isButtonList:e===a.BUTTON_LIST,...c},c.children)},307982(e,t,n){n.r(t),n.d(t,{default:()=>H});var a,o=n(469733),r=n(296540),l=n(208288);!function(e){e.ALL="ALL",e.FILTERED="FILTERED"}(a||(a={}));var i=n(716654),d=n(165126),c=n(758649),s=n(424815),m=n(282556),u=n(845030),A=n(916537),E=n(469987),g=n(602021),D=n(198494),h=n(286388),p=n(516693),O=n(691189),T=n(742920),f=n(887831);const I=`${n(655773).gI}/export`;var C=n(143053),_=n(71479),U=n(566723),S=n(294303);const N=(0,_.A)(S.A)`
  gap: ${U.kc};
  width: 100%;
  justify-content: flex-end;
  padding: ${U.S2} ${U.Ln};
`,L=(0,r.memo)(({calendarValue:e,flowsDownloadMode:t})=>{const n=(0,o.useDispatch)(),l=(0,o.useSelector)(i.uK),_=(0,o.useSelector)(i.cd),U=(0,r.useCallback)(()=>{n((0,u.K5)())},[n]),S=(0,o.useSelector)(m.zi),L=(0,o.useSelector)(D.BQ),R=(0,o.useSelector)(g.hq),k=(0,r.useMemo)(()=>new Intl.DateTimeFormat(S,{hourCycle:L,timeZone:R,month:"short",day:"numeric",year:"numeric"}),[L,R,S]),{timestampFrom:b,timestampTo:$}=(0,r.useMemo)(()=>({timestampFrom:new Date(e?.start.toString()).getTime(),timestampTo:new Date(e?.end.toString()).getTime()}),[e?.start,e?.end]),w=(0,r.useCallback)(()=>{n(((e={},t={})=>(0,O.vB)(p.aC,null,null,f.A.POST,I,e,e.data,{failureToast:{icon:T.C.danger,message:"COMMON_NOTICE_REQUEST_ERROR"},fetchConfig:{headers:{"Content-Type":"application/json"},getAllPostData:!0},...t}))({data:{...(0,d.A)(t===a.FILTERED?l:C.o,[h.DU.PAGE_NUMBER,h.DU.PAGE_SIZE]),[h.DU.TIMESTAMP_FROM]:b,[h.DU.TIMESTAMP_TO]:$}},{onBeforeCall:()=>{n((0,E.mh)(!0))}})).then(e=>{(0,s.P)(`${k.format(b)}_${k.format($)}.csv`,e)}).finally(()=>{n((0,E.mh)(!1))})},[n,b,$,l,k,t]);return r.createElement(N,null,r.createElement(c.A,{type:"button",variant:"default",size:"medium",onClick:U},r.createElement(A.sA,{id:"COMMON_ACTION_CANCEL"})),r.createElement(c.A,{type:"button",variant:"primary",size:"medium",onClick:w,disabled:!b||!$||_,loader:_?"spinner":void 0},r.createElement(A.sA,{id:"COMMON_DOWNLOAD"})))});var R=n(497336),k=n.n(R),b=n(54227),$=n(217439),w=n(74750),x=n(901732),M=n(162420),y=n(149188),v=n(89603),P=n(689965),F=n(263130),B=n(367464),V=n(389017),z=n(896297),K=n(822336);const W=(0,_.A)(S.A)`
  width: 100%;
  flex-direction: column;
  padding-top: ${U.YC};
  gap: ${U.xO};
`,G=(0,_.A)(S.A)`
  gap: ${U.Ln};
`,j=(0,_.A)(S.A)`
  flex-direction: column;
  gap: ${U.YC};
`,Y=(0,_.A)(S.A)`
  width: 100%;
  align-items: center;
  gap: ${U.xO};
  background-color: ${({theme:{themeName:e}})=>K.Ay[`desktop-color-neutral-02-${e}`]};
  height: 32px;
  padding: 0 ${U.kc};
  border-radius: ${K.Ay["desktop-radius-base"]};
  > :last-child {
    margin-left: auto;
  }
  color: ${({theme:{themeName:e}})=>K.Ay[`desktop-color-text-1-${e}`]};
  font-size: 14px;
`,Z=({calendarValue:e,setCalendarValue:t,flowsDownloadMode:n,setFlowsDownloadMode:d,flowsInInitialState:c})=>{const[s,m]=(0,r.useState)(!1),u=(0,o.useSelector)(i.cd),E=(0,r.useCallback)(e=>{m(e)},[]),g=(0,r.useCallback)(e=>{e&&t(e)},[t]),D=(0,z.A)(),h=(0,V.A)(),{maxValue:p,minValue:O}=(0,r.useMemo)(()=>({maxValue:(0,l.A)(k()(new Date),"CalendarDateTime"),minValue:(0,l.A)(new Date(0),"CalendarDateTime")}),[]),T=(0,r.useMemo)(()=>[{id:a.ALL,children:r.createElement(A.sA,{id:"FLOWS_ALL_FLOWS"}),onChange:()=>{d(a.ALL)},checked:n===a.ALL},{id:a.FILTERED,children:r.createElement(A.sA,{id:"FLOWS_FILTERED_FLOWS"}),onChange:()=>{d(a.FILTERED)},checked:n===a.FILTERED}],[n,d]),f=(0,r.useMemo)(()=>[[e?.start.day,e?.start.month,e?.start.year].filter(Boolean).join(" / "),[e?.end.day,e?.end.month,e?.end.year].filter(Boolean).join(" / ")].join(" - "),[e?.start.day,e?.start.month,e?.start.year,e?.end.day,e?.end.month,e?.end.year]);return r.createElement(P.A,null,r.createElement(W,null,r.createElement(j,null,r.createElement($.A,{size:"small",color:u?"disabled":"text-3"},r.createElement(A.sA,{id:"COMMON_DATE_RANGE"})),r.createElement(x.X,{isDisabled:u,isOpen:s,value:e,"aria-label":"Flows Download Date Range Picker",localizationTexts:h,onChange:g,onOpenChange:E,presets:D,minValue:O,maxValue:p},r.createElement(w.A,{style:{width:"100%",...B.e,...u?{pointerEvents:"none",opacity:.3}:{}}},r.createElement(Y,null,r.createElement(y.A,{size:"original"}),f,r.createElement(v.A,{size:"original"}))))),c?null:r.createElement(G,null,T.map(({id:e,children:t,checked:n,onChange:a})=>r.createElement(b.A,{key:e,id:e,checked:n,disabled:u,onChange:a},t))),u?r.createElement(F.A,{icon:r.createElement(M.A,{size:"original",variant:"fill",isActive:!0}),description:r.createElement(A.sA,{id:"FLOWS_DOWNLOAD_ALERT"})}):null))},X=(0,_.A)(S.A)`
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
`,H=()=>{const e=(0,o.useSelector)(i._S),{startDate:t,endDate:n}=(0,o.useSelector)(i.tT),[d,c]=(0,r.useState)({start:(0,l.A)(t,"CalendarDateTime"),end:(0,l.A)(n,"CalendarDateTime")}),[s,m]=(0,r.useState)(e?a.ALL:a.FILTERED);return(0,r.useEffect)(()=>{m(e?a.ALL:a.FILTERED)},[e]),r.createElement(X,null,r.createElement(Z,{calendarValue:d,setCalendarValue:c,flowsDownloadMode:s,setFlowsDownloadMode:m,flowsInInitialState:e}),r.createElement(L,{calendarValue:d,flowsDownloadMode:s}))}},424815(e,t,n){n.d(t,{P:()=>o});var a=n(348466);function o(e,t,n){const o=URL.createObjectURL(t),r=document.createElement("a");r.id=n,r.href=o,r.download=e.replaceAll(/[^A-Za-z0-9_\-.]/g,a.jr),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(o)}},383149(e,t,n){n.d(t,{A:()=>o});var a=n(885205);const o=function(e,t){return!(null==e||!e.length)&&(0,a.A)(e,t,0)>-1}},887809(e,t,n){n.d(t,{A:()=>a});const a=function(e,t,n){for(var a=-1,o=null==e?0:e.length;++a<o;)if(n(t,e[a]))return!0;return!1}},458043(e,t,n){n.d(t,{A:()=>c});var a=n(8300),o=n(383149),r=n(887809),l=n(45572),i=n(552789),d=n(764099);const c=function(e,t,n,c){var s=-1,m=o.A,u=!0,A=e.length,E=[],g=t.length;if(!A)return E;n&&(t=(0,l.A)(t,(0,i.A)(n))),c?(m=r.A,u=!1):t.length>=200&&(m=d.A,u=!1,t=new a.A(t));e:for(;++s<A;){var D=e[s],h=null==n?D:n(D);if(D=c||0!==D?D:0,u&&h==h){for(var p=g;p--;)if(t[p]===h)continue e;E.push(D)}else m(t,h,c)||E.push(D)}return E}},144757(e,t,n){n.d(t,{A:()=>i});var a=n(458043),o=n(187671),r=n(224326),l=n(153533);const i=(0,r.A)(function(e,t){return(0,l.A)(e)?(0,a.A)(e,(0,o.A)(t,1,l.A,!0)):[]})}}]);