"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[60366],{177445(e,i,t){t.d(i,{A:()=>o});var s=t(602086),n=t(977872),r=t(223597),a=t(34118);const o=({client:{id:e,type:i,status:t,blocked:o},props:d,children:l})=>{const c=(0,s.useMemo)(()=>i===r.sK.VPN?r.N7.VPN:i===r.sK.TELEPORT?r.N7.TELEPORT:o?r.N7.BLOCKED:t===r.S2.OFFLINE?r.N7.OFFLINE:r.N7.ACTIVE,[i,o,t]),m=(0,n.d4)((0,s.useMemo)(()=>(0,a.kV)(e,d,c),[e,d,c]));return l((0,s.useMemo)(()=>m,[m]))}},54052(e,i,t){t.d(i,{A:()=>a});var s=t(602086),n=t(977872),r=t(670830);const a=({mac:e,props:i,children:t})=>t((0,n.d4)((0,s.useMemo)(()=>(0,r.eu)(e,i),[e,i])))},756594(e,i,t){t.d(i,{Ay:()=>_,v$:()=>p});var s=t(274934),n=t(977872),r=t(125799),a=t(247816),o=t(409844),d=t(82939),l=t(408402),c=t(470070),m=t(897166),h=t(309130);const u=(0,a.A)("div")`
  pointer-events: none;
`,A=o.AH`
  opacity: ${h.xN};
`,x=({warning:e,children:i})=>{return e?(0,s.jsx)(l.A,{condition:!!e,wrapper:(t=e,e=>(0,s.jsx)(r.A,{description:(0,d.Kg)(t)?(0,s.jsx)(c.sA,{id:t}):t,portal:!0,isInteractive:!(0,d.Kg)(t),children:(0,s.jsx)(u,{children:e})})),children:i}):(0,s.jsx)(s.Fragment,{children:i});var t},p=({disabled:e,children:i})=>e?(0,s.jsx)(u,{className:A,style:{width:"100%"},children:i}):(0,s.jsx)(s.Fragment,{children:i}),_=({disableWithWarning:e,children:i})=>{const t=(0,n.d4)(m.EL);return(0,s.jsx)(x,{warning:e,children:e?(0,s.jsx)("div",{className:t?void 0:A,children:i}):i})}},398658(e,i,t){t.d(i,{A:()=>c});var s=t(274934),n=t(814557),r=t(938984),a=t(897688),o=t(263705),d=t(309130),l=t(470070);const c=()=>{const{themeName:e}=(0,o.u)();return(0,s.jsx)(a.A,{style:{backgroundColor:n.Ay[`desktop-color-green-06-${e}`],marginRight:d.YC},children:(0,s.jsx)(r.A,{size:"small",color:"neutral-inverse",children:(0,s.jsx)(l.sA,{id:"COMMON_MESH"})})})}},348871(e,i,t){t.d(i,{Ay:()=>M,KK:()=>N,gJ:()=>E});var s=t(274934),n=t(938984),r=t(814557),a=t(247816),o=t(586566),d=t(61322),l=t(345272),c=t(756594),m=t(470070),h=t(561614),u=t(726831),A=t(186086),x=t(398658),p=t(793442),_=t(100978),j=t(865655),g=t(421314);const N={CHANNEL:220,MIMO:40,STANDARD:55,CLIENTS:66},E=(0,a.A)(_.A)`
  height: ${d.I.ROW_HEIGHT-1}px;
  border-bottom: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};
  align-items: center;
  justify-content: space-between;
`,M=({channel:e,ht:i,radio:t,mimo:r,standard:a,disabled:d,mac:M,children:O,is_device_afc_supported:C,afc_enabled:y,afc_done:I,afc_initialize_timeout_at:T,is_device_outdoor_mode_supported:f,has_enabled_6Ghz:b,is_disabled_all_6ghz_radios:w,isMesh:L})=>{let D=null;const v=(0,o.gR)({afc_initialize_timeout_at:T});return t===h.sx.RADIO_6E&&f&&C&&d&&w&&b?D=(0,s.jsx)(m.sA,{id:"DEVICE_TRANSMIT_POWER_DISABLED_6GHZ_WARNING",values:{link:(0,s.jsx)(A.A,{mac:M,children:(0,s.jsx)(m.sA,{id:"COMMON_CLICK_TO_ENABLE"})}),br:m.br}}):t===h.sx.RADIO_6E&&f&&C&&y&&void 0!==I&&!I&&!v&&!d&&b?D=(0,s.jsx)(m.sA,{id:"DEVICE_DID_NOT_RECEIVE_AFC_RESPONSE_WARNING",values:{link:(0,s.jsx)(p.A,{id:"COMMON_LEARN_MORE",href:u.A.afcArticle})}}):d&&(D=(0,s.jsx)(m.sA,{id:"DEVICE_RADIO_DISABLED_WARNING",values:{link:(0,s.jsx)(j.A,{mac:M,band:t,children:(0,s.jsx)(m.sA,{id:"COMMON_CLICK_TO_ENABLE"})})}})),(0,s.jsx)(c.Ay,{disableWithWarning:D,children:(0,s.jsxs)(E,{width:"100%",children:[(0,s.jsxs)(_.A,{width:N.CHANNEL,children:[(0,s.jsx)(n.A,{weight:"bold",children:(0,s.jsx)(m.sA,void 0!==e?{id:"COMMON_CHANNEL_RADIO_CHANNEL",values:{channel:e}}:{id:"COMMON_FALLBACK"})}),(0,s.jsxs)(g.A,{size:"medium",children:[" (",t&&l.A[t.toUpperCase()]?.frequency||(0,s.jsx)(m.sA,{id:"COMMON_FALLBACK"}),", ",i||(0,s.jsx)(m.sA,{id:"COMMON_FALLBACK"})," ",(0,s.jsx)(m.sA,{id:"COMMON_UNIT_MHZ"}),")"]}),L?(0,s.jsx)(x.A,{}):null]}),(0,s.jsx)(_.A,{width:N.MIMO,children:(0,s.jsx)(n.A,{children:r||(0,s.jsx)(m.sA,{id:"COMMON_FALLBACK"})})}),(0,s.jsx)(_.A,{width:N.STANDARD,children:(0,s.jsx)(n.A,{children:a||(0,s.jsx)(m.sA,{id:"COMMON_FALLBACK"})})}),O]})})}},347500(e,i,t){t.d(i,{A:()=>o});var s=t(274934),n=t(602086),r=t(898809),a=t(254590);const o=({startTimestamp:e,uptimeParams:i})=>{const t=(0,n.useRef)(null),o=(0,n.useRef)(null),d=(0,n.useCallback)(i=>{t.current&&(t.current.innerText=e?(0,r.Ay)(Math.floor(Date.now()/1e3)-e,i).join(" "):a.L,o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d(i)},1e3))},[e]);return(0,n.useEffect)(()=>(e&&d(i),()=>{o.current&&clearTimeout(o.current)}),[e,i,d]),(0,s.jsx)("span",{ref:t})}},535322(e,i,t){t.d(i,{A:()=>A,I:()=>s});var s,n=t(274934),r=t(814557),a=t(158885),o=t(247816),d=t(565527),l=t(309130),c=t(100978),m=t(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(s||(s={}));const h=(0,o.A)(c.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:i,theme:{themeName:t}})=>e||r.Ay[t===d.S.DARK?`desktop-color-neutral-${i?"00":"01"}-${d.S.DARK}`:`desktop-color-neutral-${i?"01":"00"}-${d.S.LIGHT}`]};
  padding: ${({isButtonList:e,padding:i})=>i||(e?`0 ${l.Ln}`:l.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||l.Ln};
  ${({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  `:""}
`,u=(0,o.A)(a.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:i,theme:{themeName:t}})=>e||r.Ay[t===d.S.DARK?`desktop-color-neutral-${i?"00":"01"}-${d.S.DARK}`:`desktop-color-neutral-${i?"01":"00"}-${d.S.LIGHT}`]};
  margin-bottom: ${({theme:e,marginBottom:i})=>i||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:i}})=>e||r.Ay[i===d.S.DARK?`desktop-color-neutral-01-${d.S.DARK}`:`desktop-color-neutral-00-${d.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${l.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${l.Ln} ${l.Ln};
      }
    }
  }
`,A=({type:e,marginBottom:i,margin:t,padding:r,flex:a,width:o,nested:d,...l})=>"items"in l?(0,n.jsx)(u,{marginBottom:i,margin:t,padding:r,flex:a,nested:d,...l}):(0,n.jsx)(h,{nested:d,width:o,marginBottom:i,margin:t,padding:r,flex:a,isButtonList:e===s.BUTTON_LIST,...l,children:l.children})},660366(e,i,t){t.d(i,{A:()=>V});var s=t(274934),n=t(977872),r=t(602086),a=t(43009),o=t(263705),d=t(409844),l=t(59612),c=t(820633),m=t(309130),h=t(100978),u=t(535322),A=t(897166),x=t(570801),p=t(222102),_=t(656466),j=t(401042);const g=({queryParams:e},{queryParams:i})=>e?.mac===i?.mac;var N=t(290454);const E="clientsDailySatisfaction",M=`${N.w}/client/:mac:/24hr-satisfaction`,O="mac",C=e=>(0,p.Mz)((e=>(0,p.Mz)((e=>({models:i})=>(0,_.JC)(E,i,{queryParams:{mac:e}},{idField:O,compareFunction:g}))(e),e=>(0,j.kh)(e)[0]))(e),e=>e?.historical_scores||[]);var y=t(29472);const I=(e,i={},t={})=>(0,y.An)([{model:E,payload:i=>[{...i,[O]:e}]}],M.replace(":mac:",e),{queryParams:{mac:e},...i},{idField:O,compareFunction:g,...t}),T=({queryParams:e},{queryParams:i})=>e?.mac===i?.mac,f="clientsDailyActivity",b=`${N.w}/client/:mac:/24hr-activity`,w="mac",L=e=>(0,p.Mz)((e=>(0,p.Mz)((e=>({models:i})=>(0,_.JC)(f,i,{queryParams:{mac:e}},{idField:w,compareFunction:T}))(e),e=>(0,j.kh)(e)[0]))(e),e=>e?.historical_activity||[]),D=(e,i={},t={})=>(0,y.An)([{model:f,payload:i=>[{...i,[w]:e}]}],b.replace(":mac:",e),{queryParams:{mac:e},...i},{idField:w,compareFunction:T,...t});var v=t(831433),R=t(223597),S=t(128066),H=t(938984),$=t(331472),k=t(348871),F=t(470070),K=t(177445);const z=({signal:e})=>(0,s.jsx)(h.A,{alignItems:"center",justifyContent:"flex-end",children:(0,s.jsxs)(H.A,{size:"medium",color:(0,$.b5)(e),children:[e," ",(0,s.jsx)(F.sA,{id:"COMMON_UNIT_DBM"})]})}),P=({radio:e,channel:i,channel_width:t,mimo:n,radio_proto:r,signal:a,children:o})=>e||i||t?(0,s.jsx)(k.Ay,{radio:e,channel:i,ht:t,mimo:n?(0,v.iP)(n):null,standard:r?(0,v.z0)(r):null,children:a?(0,s.jsx)(z,{signal:a}):o}):null,B=({activeItem:e,activeItem:{radio:i,channel:t,channel_width:n,mimo:r,radio_proto:a}})=>"is_mlo"in e&&e.is_mlo?(0,s.jsx)(K.A,{client:e,props:["mlo_details"],children:({mlo_details:e=[]})=>(0,s.jsx)(h.A,{flexDirection:"column",children:e.map(({channel_width:e,...i})=>(0,s.jsx)(P,{channel_width:+e,...i},i.radio))})}):(0,s.jsx)(P,{radio:i,channel:t,channel_width:n,mimo:r,radio_proto:a,children:(0,s.jsx)(K.A,{client:e,props:["signal"],children:({signal:e=null})=>e?(0,s.jsx)(z,{signal:e}):null})});var W=t(646077);const G=d.AH`
  &:empty {
    display: none;
  }
`,U={},q=({activeItem:e,motif:i})=>{const{motifPalette:{text04:t}}=(0,o.u)(),{satisfaction:n,translationKey:a}=(0,r.useMemo)(()=>(0,v.eg)(e.type,e.wifi_experience_score)||{satisfaction:0,translationKey:"COMMON_UNKNOWN"},[e.type,e.wifi_experience_score]);return(0,s.jsx)(W.hW,{score:n,scoreTranslationKey:n>0?a:"COMMON_NO_EXP",headerTranslationKey:"COMMON_WIFI_EXP",color:e.status===R.S2.OFFLINE||e.blocked?t:(0,l.L)(n,i),hideScore:0===n})},V=({activeItem:e,isWired:i=!1,hideChannels:t=!1})=>{const o=(0,n.wA)(),{motif:d}=(0,a.A)(),l=(0,n.d4)(A.hq),p=(0,n.d4)(c.zi),_=(0,n.d4)(x.BQ),j=(0,n.d4)((0,r.useMemo)(()=>(i?L:C)(e.mac),[e.mac,i])),g=e.wired_rate_mbps,N=(0,r.useMemo)(()=>i?(0,S.mQ)(j,d,g):(0,S.l9)(j,d),[j,d,i,g]);return(0,r.useEffect)(()=>{(!U[e.mac]||Date.now()-U[e.mac]>=3e5)&&o((i?D:I)(e.mac)).then(()=>{U[e.mac]=Date.now()})},[o,e.mac,i]),(0,s.jsxs)(u.A,{children:[i?(0,s.jsx)(W.pm,{wiredRateMbps:g,motif:d}):(0,s.jsx)(q,{activeItem:e,motif:d}),(0,s.jsxs)(h.A,{flexDirection:"column",marginTop:m.Ln,children:[(0,s.jsx)(W.dC,{stackedBarItems:N,labelTranslationKey:i?"COMMON_WIRED_EXPERIENCE":"COMMON_WIFI_EXP",siteTimezone:l,language:p,selfHourCycle:_,hideScore:i,wiredRateMbps:g}),(0,s.jsx)(W.XG,{siteTimezone:l,selfHourCycle:_,language:p,startTime:j[0]?.timestamp})]}),(0,s.jsxs)(h.A,{width:"100%",justifyContent:"space-between",marginTop:m.YC,children:[(0,s.jsx)(W.ZP,{activeItem:e}),(0,s.jsx)(W.FN,{status:e.status,assoc_time:"assoc_time"in e?e.assoc_time:void 0,last_seen:"last_seen"in e?e.last_seen:void 0})]}),e.status!==R.S2.ONLINE||i||t?null:(0,s.jsx)(h.A,{width:"100%",marginTop:m.Ln,className:G,children:(0,s.jsx)(B,{activeItem:e})})]})}},646077(e,i,t){t.d(i,{FN:()=>v,XG:()=>b,ZP:()=>w,dC:()=>f,hW:()=>y,kD:()=>R,mb:()=>C,pm:()=>I});var s=t(274934),n=t(814557),r=t(602086),a=t(125799),o=t(367551),d=t(938984),l=t(95032),c=t(247816),m=t(442175),h=t(898809),u=t(455425),A=t(309130),x=t(347500),p=t(907488),_=t(100978),j=t(470070),g=t(54052),N=t(177445),E=t(223597),M=t(128066);const O=(0,c.A)(_.A)`
  > div > div {
    height: 8px;
    margin: 0;
    div {
      height: inherit !important;
    }
  }
`,C=(0,c.A)(l.A)`
  :hover {
    color: ${({theme:{themeName:e}})=>n.Ay[`desktop-color-ublue-06-${e}`]};
  }
`,y=({score:e,headerTranslationKey:i,scoreTranslationKey:t,color:n,hideScore:r})=>(0,s.jsxs)(_.A,{justifyContent:"space-between",children:[(0,s.jsx)(d.A,{color:"text-1",size:"medium",weight:"bold",children:(0,s.jsx)(j.sA,{id:i})}),(0,s.jsxs)(d.A,{size:"medium",style:{color:n},children:[(0,s.jsx)(j.sA,{id:t}),e>=0&&e<=100&&!r?(0,s.jsxs)(s.Fragment,{children:[" (",e,"%)"]}):null]})]}),I=({wiredRateMbps:e,motif:i})=>(0,s.jsxs)(_.A,{justifyContent:"space-between",children:[(0,s.jsx)(d.A,{size:"medium",weight:"bold",children:(0,s.jsx)(j.sA,{id:"COMMON_WIRED_EXPERIENCE"})}),(0,s.jsx)(d.A,{size:"medium",...e>0?{style:{color:(0,M.xe)(e,i)}}:{color:"disabled"},children:e>0?(0,m.ir)(e):(0,s.jsx)(j.sA,{id:"COMMON_FALLBACK"})})]}),T=({color:e,tooltipColor:i,labelTranslationKey:t,scoreTranslationKey:n,score:r,hideScore:a=!1,wiredRateMbps:o,not_reported:l,from:c,to:m})=>(0,s.jsxs)(_.A,{flexDirection:"column",whiteSpace:"nowrap",children:[(0,s.jsxs)(_.A,{justifyContent:"space-between",children:[(0,s.jsx)(d.A,{weight:"bold",color:"text-1",children:(0,s.jsx)(j.sA,{id:t})}),(0,s.jsxs)(d.A,{style:{color:i||e},children:[(0,s.jsx)(j.sA,{id:l?"COMMON_NOT_REPORTED":n,values:{value:o?o<1e3?o:o/1e3:0}}),r>=0&&r<=100&&!l&&!a?(0,s.jsxs)(s.Fragment,{children:[" (",r,"%)"]}):null]})]}),(0,s.jsxs)(_.A,{justifyContent:"space-between",children:[(0,s.jsx)(_.A,{marginRight:A.Ln,children:(0,s.jsx)(d.A,{color:"text-1",children:(0,s.jsx)(j.sA,{id:"COMMON_TIME"})})}),(0,s.jsxs)(d.A,{children:[c," - ",m]})]})]}),f=(0,r.memo)(({stackedBarItems:e,siteTimezone:i,language:t,selfHourCycle:n,hideScore:r=!1,wiredRateMbps:a,labelTranslationKey:d})=>(0,s.jsx)(O,{children:(0,s.jsx)(o.A,{items:e,rounded:!0,itemTooltip:({score:e,color:o,tooltipColor:l,translationKey:c,timestamp:m,nextTimestamp:h,not_reported:u})=>({animate:!1,delay:.2,message:(0,s.jsx)(T,{color:o,tooltipColor:l,labelTranslationKey:d,scoreTranslationKey:c,score:e,hideScore:r,not_reported:u,wiredRateMbps:a,from:new Intl.DateTimeFormat(t,{timeZone:i,hourCycle:n,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(m),to:new Intl.DateTimeFormat(t,{timeZone:i,hourCycle:n,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(h)}),width:"auto",maxWidth:"auto"})})})),b=({siteTimezone:e,selfHourCycle:i,startTime:t,language:n})=>(0,s.jsxs)(_.A,{justifyContent:"space-between",marginBottom:A.kc,children:[(0,s.jsx)(d.A,{color:"text-3",size:"small",children:new Intl.DateTimeFormat(n,{timeZone:e,hourCycle:i,hour:"numeric",minute:"2-digit"}).format(t||Date.now()-432e5)}),(0,s.jsx)(d.A,{color:"text-3",size:"small",children:new Intl.DateTimeFormat(n,{timeZone:e,hourCycle:i,hour:"numeric",minute:"2-digit"}).format(t?t+432e5:Date.now())}),(0,s.jsx)(d.A,{color:"text-3",size:"small",children:(0,s.jsx)(j.sA,{id:"COMMON_NOW"})})]}),w=({activeItem:e,isUnifiDeviceClient:i=!1})=>{const t=(0,r.useMemo)(()=>i?g.A:N.A,[i]);return(0,s.jsx)(t,{mac:e.mac,client:e,props:["tx_bytes-r","rx_bytes-r"],children:({"tx_bytes-r":e=0,"rx_bytes-r":i=0})=>(0,s.jsxs)(_.A,{children:[(0,s.jsx)(p.A,{style:{marginRight:"6px"},bytesPerSecond:e,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),(0,s.jsx)(p.A,{bytesPerSecond:i,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})]})})},L=e=>[h.Au.HOURS,h.Au.MINUTES,Math.floor((Date.now()-new Date(1e3*e).getTime())/u.jU)<1?h.Au.SECONDS:h.Au.DAYS],D=(0,r.memo)(({id:e,startTimestamp:i})=>(0,s.jsx)(a.A,{width:100,description:(0,s.jsx)(l.A,{size:"small",color:"text-1",isCentered:!0,style:{width:"100%"},children:(0,s.jsx)(j.sA,{id:e})}),children:(0,s.jsx)(d.A,{size:"medium",color:"text-2",children:(0,s.jsx)(x.A,{startTimestamp:i,uptimeParams:L(i)})})})),v=(0,r.memo)(({status:e,assoc_time:i,last_seen:t})=>e===E.S2.ONLINE&&i?(0,s.jsx)(D,{id:"COMMON_UPTIME",startTimestamp:i}):e===E.S2.OFFLINE&&t?(0,s.jsx)(D,{id:"COMMON_LAST_SEEN",startTimestamp:t}):null),R=({uptime:e,last_seen:i})=>e>=0?(0,s.jsx)(a.A,{description:(0,s.jsx)(j.sA,{id:"COMMON_UPTIME"}),children:(0,s.jsx)(d.A,{size:"medium",children:(0,h.Ay)(e)})}):i?(0,s.jsxs)(_.A,{width:"100%",whiteSpace:"nowrap",justifyContent:"flex-end",children:[(0,s.jsx)(d.A,{size:"medium",children:(0,s.jsx)(j.sA,{id:"COMMON_LAST_SEEN"})})," ",(0,s.jsx)(d.A,{size:"medium",color:"inherit",children:(0,s.jsx)(x.A,{startTimestamp:i,uptimeParams:L(i)})})]}):null},61322(e,i,t){t.d(i,{I:()=>s});const s={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,i,t,s){return Math.min((s||this.ROW_HEIGHT)*e+(t??this.HEADER_HEIGHT),(s||this.ROW_HEIGHT)*i+(t??this.HEADER_HEIGHT))},getEditContainerHeight(e,i,t){return Math.min((t||this.EDIT_FIELD_HEIGHT)*e,(t||this.EDIT_FIELD_HEIGHT)*i)}}}}]);