"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[74758],{689965(e,t,n){n.d(t,{A:()=>u,I:()=>l});var l,r=n(296540),i=n(822336),a=n(963724),m=n(71479),c=n(825032),o=n(566723),E=n(294303),d=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(l||(l={}));const A=(0,m.A)(E.A,(0,d.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===c.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}})=>i.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,s=(0,m.A)(a.A,(0,d.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===c.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||i.Ay[t===c.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${o.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${o.Ln} ${o.Ln};
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:n,padding:i,flex:a,width:m,nested:c,...o})=>"items"in o?r.createElement(s,{marginBottom:t,margin:n,padding:i,flex:a,nested:c,...o}):r.createElement(A,{nested:c,width:m,marginBottom:t,margin:n,padding:i,flex:a,isButtonList:e===l.BUTTON_LIST,...o},o.children)},574758(e,t,n){n.r(t),n.d(t,{default:()=>ne});var l=n(296540),r=n(94998),i=n(725842),a=n(71479),m=n(294303);const c=(0,a.A)(m.A)`
  flex-direction: column;
`;var o=n(705145),E=n(469733),d=n(822336),A=n(382389),s=n(968906),u=n(689965),I=n(6176),N=n(845030),T=n(398300),_=n(262690),C=n(6510),O=n(566723);const p=(0,a.A)(m.A)`
  width: 100%;
  justify-content: space-between;
  align-items: center;
`,h=(0,a.A)(m.A)`
  flex-direction: column;
  gap: ${O.YC};
  align-items: center;
  cursor: pointer;
  width: 30%;
  > p {
    max-width: 100%;
  }
`;var M=n(963565),D=n(925338);const S=({[r.bE.TYPE]:e,[r.bE.FROM_ENDPOINT]:{[r.AX.DEVICE_NAME]:t,[r.AX.DEVICE_MODEL]:n,[r.AX.DEVICE_MAC]:i},[r.bE.TO_ENDPOINT]:{[r.AX.DEVICE_NAME]:a,[r.AX.DEVICE_MODEL]:m,[r.AX.DEVICE_MAC]:c}})=>{const O=(0,E.useDispatch)(),{themeName:S}=(0,A.u)(),b=(0,l.useCallback)(e=>()=>{O((0,N.XP)({type:T.H.DEVICE,id:e}))},[O]),g=(0,l.useMemo)(()=>{switch(e){case r.U7.SUCCESS_ROAMING:return d.Ay[`desktop-color-green-06-${S}`];case r.U7.FAILED_ROAMING:return d.Ay[`desktop-color-red-06-${S}`];default:return""}},[e,S]);return l.createElement(u.A,null,l.createElement(p,null,l.createElement(h,{onClick:b(i),...s.A.addDataTestId(s.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(I.A,{width:_.b3,height:_.SI,model:n}),l.createElement(o.A,{isTruncated:!0,size:"small",color:"text-1"},(0,C.Q)({name:t,model:n,mac:i}))),l.createElement(M.A,{roamingColor:g,direction:D.P.RIGHT,hidePercentage:!0}),l.createElement(h,{onClick:b(c),...s.A.addDataTestId(s.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(I.A,{width:_.b3,height:_.SI,model:m}),l.createElement(o.A,{isTruncated:!0,size:"small",color:"text-1"},(0,C.Q)({name:a,model:m,mac:c})))))};var b=n(217439),g=n(592563),L=n(180524),x=n(198494),f=n(602021),k=n(282556),z=n(916537),R=n(568294);const P=(0,a.A)(m.A)`
  flex-direction: column;
  gap: ${O.kc};
`,y=(0,a.A)(m.A)`
  justify-content: space-between;
  white-space: nowrap;
  > :nth-child(2) {
    max-width: 70%;
  }
  gap: ${O.Er};
  overflow: hidden;
`,$=({[r.bE.TIME]:e,[r.bE.ENDPOINT]:{[r.AX.WLAN_NAME]:t,[r.AX.WLAN_ID]:n},[r.bE.FROM_ENDPOINT]:{[r.AX.DEVICE_NAME]:i,[r.AX.DEVICE_MAC]:a,[r.AX.DEVICE_MODEL]:m,[r.AX.RSSI]:c,[r.AX.CHANNEL]:d,[r.AX.BAND]:A,[r.AX.CHANNEL_WIDTH]:I,[r.AX.WLAN_NAME]:_,[r.AX.WLAN_ID]:O},[r.bE.TO_ENDPOINT]:{[r.AX.DEVICE_NAME]:p,[r.AX.DEVICE_MAC]:h,[r.AX.DEVICE_MODEL]:M,[r.AX.RSSI]:D,[r.AX.CHANNEL]:S,[r.AX.BAND]:$,[r.AX.CHANNEL_WIDTH]:G,[r.AX.WLAN_NAME]:X,[r.AX.WLAN_ID]:w},[r.bE.CLIENT]:{[r.Sf.NAME]:F,[r.Sf.MAC]:H,[r.Sf.HOSTNAME]:V,[r.Sf.IP]:B}})=>{const{formatMessage:W}=(0,z.tz)(),v=(0,E.useDispatch)(),U=(0,E.useSelector)(k.zi),Y=(0,E.useSelector)(f.hq),Q=(0,E.useSelector)(x.BQ),j=(0,l.useMemo)(()=>new Intl.DateTimeFormat(U,{timeZone:Y,hourCycle:Q,weekday:"short",day:"numeric",month:"short",hour:"numeric",minute:"numeric",year:"numeric"}),[U,Y,Q]),K=(0,l.useCallback)(e=>()=>{v((0,N.XP)({type:T.H.CLIENT,id:e}))},[v]),q=(0,l.useCallback)(e=>()=>{v((0,N.XP)({type:T.H.DEVICE,id:e}))},[v]),Z=(0,l.useCallback)(e=>()=>{v((0,N.XP)({type:T.H.WIFI,id:e}))},[v]),J=(0,l.useMemo)(()=>(0,R.Mw)({channel:d,band:A,channelWidth:I,rssi:c,formatMessage:W,separator:" | "}),[d,A,I,c,W]),ee=(0,l.useMemo)(()=>(0,R.Mw)({channel:S,band:$,channelWidth:G,rssi:D,formatMessage:W,separator:" | "}),[S,$,G,D,W]),te=(0,l.useMemo)(()=>t||_||X,[t,_,X]),ne=(0,l.useMemo)(()=>(0,C.Q)({name:i,model:m,mac:a}),[i,m,a]),le=(0,l.useMemo)(()=>(0,C.Q)({name:p,model:M,mac:h}),[p,M,h]);return l.createElement(u.A,null,l.createElement(P,null,e?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"COMMON_DATE_TIME"})),l.createElement(b.A,{size:"medium",color:"text-3"},j.format(e))):null,F?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_CLIENT_NAME"})),l.createElement(g.A,{type:"button",fontSize:"medium",onClick:K(H),...s.A.addDataTestId(s.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(o.A,{isTruncated:!0,size:"medium",color:"inherit"},F))):null,V?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_CLIENT_HOSTNAME"})),l.createElement(b.A,{size:"medium",color:"text-3"},V)):null,B?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"COMMON_CLIENT_IP_ADDRESS"})),l.createElement(b.A,{size:"medium",color:"text-3"},B)):null,H?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_CLIENT_MAC_ADDRESS"})),l.createElement(b.A,{size:"medium",color:"text-3"},H)):null,te?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"COMMON_WIFI_NAME"})),l.createElement(g.A,{type:"button",fontSize:"medium",onClick:Z(n||O||w),...s.A.addDataTestId(s.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(o.A,{isTruncated:!0,size:"medium",color:"inherit"},te))):null,ne?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_ROAMED_FROM"})),l.createElement(g.A,{type:"button",fontSize:"medium",onClick:q(a),...s.A.addDataTestId(s.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(o.A,{isTruncated:!0,size:"medium",color:"inherit"},ne))):null,J?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_PRIOR_CONNECTION"})),l.createElement(L.A,{description:J},l.createElement(o.A,{size:"medium",color:"text-3",isTruncated:!0},J))):null,c&&D?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_ROAMING_DECISION"})),l.createElement(b.A,{size:"medium",color:"text-3"},l.createElement(z.sA,{id:"COMMON_DBM_FROM_TO",values:{from:c,to:D}}))):null,le?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"COMMON_CONNECTED_TO"})),l.createElement(g.A,{type:"button",fontSize:"medium",onClick:q(h),...s.A.addDataTestId(s.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(o.A,{isTruncated:!0,size:"medium",color:"inherit"},le))):null,ee?l.createElement(y,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_CONNECTION_INFO"})),l.createElement(L.A,{description:ee},l.createElement(o.A,{size:"medium",color:"text-3",isTruncated:!0},ee))):null))},G=({[r.bE.TIME]:e,[r.bE.ENDPOINT]:t,[r.bE.FROM_ENDPOINT]:n,[r.bE.TO_ENDPOINT]:i,[r.bE.CLIENT]:a,[r.bE.TYPE]:m})=>l.createElement(l.Fragment,null,l.createElement(S,{from_endpoint:n,to_endpoint:i,type:m}),l.createElement($,{time:e,endpoint:t,from_endpoint:n,to_endpoint:i,client:a})),X=(0,a.A)(m.A)`
  flex-direction: column;
  gap: ${O.kc};
`,w=(0,a.A)(m.A)`
  gap: 2px;
`,F=(e,t)=>Number.isFinite(e)?e>=80?d.Ay[`desktop-color-green-05-${t}`]:e>=60?d.Ay[`desktop-color-orange-06-${t}`]:d.Ay[`desktop-color-red-06-${t}`]:d.Ay[`desktop-color-neutral-03-${t}`];var H=n(311785);const V=(0,a.A)(m.A)`
  flex-direction: column;
  gap: ${O.YC};
  width: 100%;
`,B=(0,a.A)(m.A,(0,H.A)("percentage"))`
  width: 100%;
  height: ${O.Ln};
  padding-left: ${O.YC};
  border-radius: ${d.Ay["desktop-radius-base"]};
  background: ${({percentage:e,theme:{themeName:t}})=>F(e,t)};
`,W=({id:e,percentage:t})=>l.createElement(V,null,l.createElement(B,{percentage:t},l.createElement(b.A,{size:"small",color:"text-2-oncolor-alpha"},l.createElement(z.sA,{id:e}))),l.createElement(b.A,{size:"small",style:{color:F(t,(0,A.u)().themeName)}},t,"%")),v={[r.Ct.ASSOCIATION_RATIO]:"COMMON_ASSOC",[r.Ct.AUTHENTICATION_RATIO]:"COMMON_AUTH",[r.Ct.DHCP_RATIO]:"COMMON_DHCP",[r.Ct.DNS_RATIO]:"COMMON_DNS"},U=Object.keys(v),Y=Object.entries(v),Q=({[r.bE.STATISTICS]:e})=>l.createElement(u.A,null,l.createElement(X,null,l.createElement(b.A,{size:"small",color:"text-2"},l.createElement(z.sA,{id:"COMMON_WIFI_CONNECTIVITY"})),l.createElement(w,null,Y.map(([t,n])=>l.createElement(W,{key:n,id:n,percentage:e[t]||0}))))),j=(0,a.A)(m.A)`
  flex-direction: column;
  gap: ${O.kc};
`,K=(0,a.A)(m.A)`
  justify-content: space-between;
  white-space: nowrap;
  > :nth-child(2) {
    max-width: 70%;
  }
  gap: ${O.Er};
  overflow: hidden;
`,q=({[r.bE.TIME]:e,[r.bE.ENDPOINT]:{[r.AX.DEVICE_MAC]:t,[r.AX.DEVICE_NAME]:n,[r.AX.WLAN_NAME]:i,[r.AX.WLAN_ID]:a},[r.bE.CLIENT]:{[r.Sf.NAME]:m,[r.Sf.MAC]:c,[r.Sf.HOSTNAME]:d,[r.Sf.IP]:A},[r.bE.STATISTICS]:I})=>{const _=(0,E.useDispatch)(),C=(0,E.useSelector)(k.zi),O=(0,E.useSelector)(f.hq),p=(0,E.useSelector)(x.BQ),h=(0,l.useMemo)(()=>new Intl.DateTimeFormat(C,{timeZone:O,hourCycle:p,weekday:"short",day:"numeric",month:"short",hour:"numeric",minute:"numeric",year:"numeric"}),[C,O,p]),M=(0,l.useCallback)(e=>()=>{_((0,N.XP)({type:T.H.CLIENT,id:e}))},[_]),D=(0,l.useCallback)(e=>()=>{_((0,N.XP)({type:T.H.DEVICE,id:e}))},[_]),S=(0,l.useCallback)(e=>()=>{_((0,N.XP)({type:T.H.WIFI,id:e}))},[_]),L=(0,l.useMemo)(()=>U.find(e=>!I[e]),[I]);return l.createElement(u.A,null,l.createElement(j,null,e?l.createElement(K,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"COMMON_DATE_TIME"})),l.createElement(b.A,{size:"medium",color:"text-3"},h.format(e))):null,L?l.createElement(K,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"ROAMING_FAILURE_STEP"})),l.createElement(b.A,{size:"medium",color:"text-3"},l.createElement(z.sA,{id:v[L]}))):null,m?l.createElement(K,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_CLIENT_NAME"})),l.createElement(g.A,{type:"button",fontSize:"medium",onClick:M(c),...s.A.addDataTestId(s.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(o.A,{isTruncated:!0,size:"medium",color:"inherit"},m))):null,d?l.createElement(K,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_CLIENT_HOSTNAME"})),l.createElement(b.A,{size:"medium",color:"text-3"},d)):null,A?l.createElement(K,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"COMMON_CLIENT_IP_ADDRESS"})),l.createElement(b.A,{size:"medium",color:"text-3"},A)):null,c?l.createElement(K,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"LOGS_CLIENT_MAC_ADDRESS"})),l.createElement(b.A,{size:"medium",color:"text-3"},c)):null,n?l.createElement(K,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"COMMON_AP"})),l.createElement(b.A,{size:"medium",color:"text-3"},l.createElement(g.A,{type:"button",fontSize:"medium",onClick:D(t),...s.A.addDataTestId(s.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(o.A,{isTruncated:!0,size:"medium",color:"inherit"},n)))):null,i?l.createElement(K,null,l.createElement(b.A,{size:"medium",color:"text-2"},l.createElement(z.sA,{id:"COMMON_WIFI_NAME"})),l.createElement(g.A,{type:"button",fontSize:"medium",onClick:S(a),...s.A.addDataTestId(s.A.TestId.SIDE_PANEL_TRIGGER)},l.createElement(o.A,{isTruncated:!0,size:"medium",color:"inherit"},i))):null))};var Z=n(64749);const J=({[r.bE.ENDPOINT]:{[r.AX.DEVICE_MAC]:e},[r.bE.CLIENT]:{[r.Sf.MAC]:t}})=>{const n=(0,E.useDispatch)(),i=(0,l.useCallback)(()=>{(0,E.batch)(()=>{n((0,Z.TU)([r.U7.FAILED_CONNECTION])),n((0,Z.Jw)([t])),n((0,Z.T9)([e])),n((0,Z.q)([e])),n((0,Z.p0)(!0)),n((0,N.K5)())})},[n,t,e]);return l.createElement(u.A,null,l.createElement(g.A,{style:{width:"fit-content"},type:"button",fontSize:"medium",onClick:i},l.createElement(z.sA,{id:"ROAMING_VIEW_ALL_ATTEMPTS"})))},ee=({[r.bE.TIME]:e,[r.bE.ENDPOINT]:t,[r.bE.CLIENT]:n,[r.bE.STATISTICS]:i})=>l.createElement(l.Fragment,null,l.createElement(Q,{statistics:i}),l.createElement(q,{time:e,endpoint:t,client:n,statistics:i}),l.createElement(J,{endpoint:t,client:n}));var te=n(808210);const ne=({activeItem:{[te.b.ROAMING]:{[r.bE.TYPE]:e,[r.bE.TIME]:t,[r.bE.ENDPOINT]:n,[r.bE.FROM_ENDPOINT]:a,[r.bE.TO_ENDPOINT]:m,[r.bE.CLIENT]:o,[r.bE.STATISTICS]:E},[te.b.ROAMING_TOPOLOGY]:{[i.mO.EDGES]:d=[]}}})=>{const A=(0,l.useMemo)(()=>{switch(e){case r.U7.SUCCESS_ROAMING:case r.U7.FAILED_ROAMING:return l.createElement(G,{time:t,endpoint:n,from_endpoint:a,to_endpoint:m,client:o,edges:d,type:e});case r.U7.FAILED_CONNECTION:return l.createElement(ee,{time:t,endpoint:n,client:o,statistics:E});default:return null}},[e,t,n,d,a,m,o,E]);return l.createElement(c,null,A)}}}]);