"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[57760],{35627(e,t,n){n.d(t,{B:()=>c,T:()=>m});var a=n(801081),r=n(25553),i=n(87485),l=n(248951);const o=(0,r.uh)((0,l.P)()),c=(0,a.Mz)(o,i.kh),s=(0,r.uh)((0,l.L)()),m=(0,a.Mz)(s,i.kh)},343651(e,t,n){n.d(t,{A:()=>E,g:()=>A});var a=n(296540),r=n(469733),i=n(956347),l=n(118835),o=n(627440),c=n(15095),s=n(845030),m=n(398300),d=n(800081),u=n(337263);const A=()=>{const e=(0,r.useDispatch)(),t=(0,i.W6)(),n=(0,c.A)(`${o.VO.CLIENTS}/${l.M.MAIN}`);return{navigateToApClients:(0,a.useCallback)((a,r,i)=>{a&&e((0,u.ai)(a)),r&&e((0,u.t6)(r)),i&&e((0,u.BG)([d.Os[i[0]]??d.KM,d.Os[i[1]]??d.Uc])),t.push(n)},[e,t,n]),openClientPropertyPanel:(0,a.useCallback)(t=>{setTimeout(()=>{e((0,s.XP)({type:m.H.CLIENT,id:t}))},250)},[e])}},E=A},104154(e,t,n){n.d(t,{A:()=>o});var a=n(296540),r=n(469733),i=n(691294),l=n(239417);const o=({client:{id:e,type:t,status:n,blocked:o},props:c,children:s})=>{const m=(0,a.useMemo)(()=>t===i.sK.VPN?i.N7.VPN:t===i.sK.TELEPORT?i.N7.TELEPORT:o?i.N7.BLOCKED:n===i.S2.OFFLINE?i.N7.OFFLINE:i.N7.ACTIVE,[t,o,n]);return s((0,r.useSelector)((0,a.useMemo)(()=>(0,l.kV)(e,c,m),[e,c,m])))}},907157(e,t,n){n.d(t,{A:()=>l});var a=n(296540),r=n(469733),i=n(435325);const l=({mac:e,props:t,children:n})=>n((0,r.useSelector)((0,a.useMemo)(()=>(0,i.eu)(e,t),[e,t])))},118835(e,t,n){var a;n.d(t,{M:()=>a}),function(e){e.MAIN="main",e.DHCP="dhcp",e.HOTSPOT="hotspot"}(a||(a={}))},522453(e,t,n){n.d(t,{Ay:()=>h,v$:()=>p});var a=n(296540),r=n(469733),i=n(271856),l=n(71479),o=n(132196),c=n(811822),s=n(955161),m=n(916537),d=n(602021),u=n(566723);const A=(0,l.A)("div")`
  pointer-events: none;
`,E=o.AH`
  opacity: ${u.xN};
`,_=({warning:e,children:t})=>{return e?a.createElement(s.A,{condition:!!e,wrapper:(n=e,e=>a.createElement(i.A,{description:(0,c.Kg)(n)?a.createElement(m.sA,{id:n}):n,portal:!0,isInteractive:!(0,c.Kg)(n)},a.createElement(A,null,e)))},t):a.createElement(a.Fragment,null,t);var n},p=({disabled:e,children:t})=>e?a.createElement(A,{className:E,style:{width:"100%"}},t):a.createElement(a.Fragment,null,t),h=({disableWithWarning:e,children:t})=>{const n=(0,r.useSelector)(d.EL);return a.createElement(_,{warning:e},e?a.createElement("div",{className:n?void 0:E},t):t)}},811015(e,t,n){n.d(t,{A:()=>d});var a=n(296540),r=n(822336),i=n(705145),l=n(57527),o=n(71479),c=n(566723),s=n(916537);const m=(0,o.A)(l.A)`
  background-color: ${({theme:{themeName:e}})=>r.Ay[`desktop-color-green-06-${e}`]};
  margin-right: ${c.YC};
`,d=()=>a.createElement(m,null,a.createElement(i.A,{size:"small",color:"neutral-inverse"},a.createElement(s.sA,{id:"COMMON_MESH"})))},66648(e,t,n){n.d(t,{Ay:()=>g,KK:()=>N,gJ:()=>O});var a=n(296540),r=n(217439),i=n(822336),l=n(71479),o=n(860631),c=n(596441),s=n(943805),m=n(522453),d=n(916537),u=n(564985),A=n(765562),E=n(861951),_=n(811015),p=n(349107),h=n(294303),C=n(720572),M=n(115829);const N={CHANNEL:220,MIMO:40,STANDARD:55,CLIENTS:66},O=(0,l.A)(h.A)`
  height: ${c.I.ROW_HEIGHT-1}px;
  border-bottom: ${({theme:{themeName:e}})=>i.Ay[`desktop-border-divider-${e}`]};
  align-items: center;
  justify-content: space-between;
`,g=({channel:e,ht:t,radio:n,mimo:i,standard:l,disabled:c,mac:g,children:b,is_device_afc_supported:T,afc_enabled:y,afc_done:f,afc_initialize_timeout_at:I,is_device_outdoor_mode_supported:w,has_enabled_6Ghz:v,is_disabled_all_6ghz_radios:S,isMesh:L})=>{let D=null;const x=(0,o.gR)({afc_initialize_timeout_at:I});return n===u.sx.RADIO_6E&&w&&T&&c&&S&&v?D=a.createElement(d.sA,{id:"DEVICE_TRANSMIT_POWER_DISABLED_6GHZ_WARNING",values:{link:a.createElement(E.A,{mac:g},a.createElement(d.sA,{id:"COMMON_CLICK_TO_ENABLE"})),br:d.br}}):n===u.sx.RADIO_6E&&w&&T&&y&&void 0!==f&&!f&&!x&&!c&&v?D=a.createElement(d.sA,{id:"DEVICE_DID_NOT_RECEIVE_AFC_RESPONSE_WARNING",values:{link:a.createElement(p.A,{id:"COMMON_LEARN_MORE",href:A.A.afcArticle})}}):c&&(D=a.createElement(d.sA,{id:"DEVICE_RADIO_DISABLED_WARNING",values:{link:a.createElement(C.A,{mac:g,band:n},a.createElement(d.sA,{id:"COMMON_CLICK_TO_ENABLE"}))}})),a.createElement(m.Ay,{disableWithWarning:D},a.createElement(O,{width:"100%"},a.createElement(h.A,{width:N.CHANNEL},a.createElement(r.A,{weight:"bold"},a.createElement(d.sA,void 0!==e?{id:"COMMON_CHANNEL_RADIO_CHANNEL",values:{channel:e}}:{id:"COMMON_FALLBACK"})),a.createElement(M.A,{size:"medium"}," (",n&&s.A[n.toUpperCase()]?.frequency||a.createElement(d.sA,{id:"COMMON_FALLBACK"}),", ",t||a.createElement(d.sA,{id:"COMMON_FALLBACK"})," ",a.createElement(d.sA,{id:"COMMON_UNIT_MHZ"}),")"),L?a.createElement(_.A,null):null),a.createElement(h.A,{width:N.MIMO},a.createElement(r.A,null,i||a.createElement(d.sA,{id:"COMMON_FALLBACK"}))),a.createElement(h.A,{width:N.STANDARD},a.createElement(r.A,null,l||a.createElement(d.sA,{id:"COMMON_FALLBACK"}))),b))}},939701(e,t,n){n.d(t,{A:()=>l});var a=n(296540),r=n(916537),i=n(170459);const l=({name:e,radio_table:t,radio_table_stats:n})=>{const l=(0,i.ry)({name:e,radio_table:t,radio_table_stats:n});return a.createElement(a.Fragment,null,l&&"auto"!==l?l:a.createElement(r.sA,{id:"COMMON_AUTO"}))}},424095(e,t,n){n.d(t,{A:()=>l});var a=n(296540),r=n(90757),i=n(573531);const l=({startTimestamp:e,uptimeParams:t})=>{const n=(0,a.useRef)(null),l=(0,a.useRef)(null),o=(0,a.useCallback)(t=>{n.current&&(n.current.innerText=e?(0,r.Ay)(Math.floor(Date.now()/1e3)-e,t).join(" "):i.L,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{o(t)},1e3))},[e]);return(0,a.useEffect)(()=>(e&&o(t),()=>{l.current&&clearTimeout(l.current)}),[e,t,o]),a.createElement("span",{ref:n})}},757760(e,t,n){n.d(t,{A:()=>x});var a=n(822336),r=n(469733),i=n(296540),l=n(217439),o=n(424226),c=n(382389),s=n(592563),m=n(943887),d=n(928085),u=n(566723),A=n(939701),E=n(66648),_=n(59372),p=n(196010),h=n(294303),C=n(916537),M=n(564985),N=n(780811),O=n(837612),g=n(170459),b=n(768195),T=n(532419),y=n(959341),f=n(343651),I=n(128736),w=n(422969),v=n(248951),S=n(592510),L=n(231460);const D=({uplink:e,mac:t,type:n,radio_table:w=[],radio_table_stats:v=[],vap_table:S=[],hideChannelInfo:D,deviceState:x,support_wifi6e:R,hideClientColumn:k,is_device_afc_supported:z,afc_enabled:K,afc_done:F,afc_initialize_timeout_at:P,is_device_outdoor_mode_supported:B,paddingBottom:$,isMloUplinkConnection:H=!1})=>{const{themeName:W}=(0,c.u)(),U=(0,r.useSelector)(_.YG),G=(0,d.A)(y._L),{navigateToApClients:j}=(0,f.g)(),V=(0,i.useMemo)(()=>!!x&&(0,O.wk)(x),[x]),Z=(0,i.useMemo)(()=>!!x&&(0,O.C1)(x),[x]),X=(0,i.useMemo)(()=>(0,N.bgh)(w),[w]),Y=(0,i.useMemo)(()=>(0,N.v0B)(w),[w]).length===X.length,q=(0,r.useSelector)(_.dA),J=(0,r.useSelector)((0,i.useMemo)(()=>(0,T.KI)(t),[t])),Q=(0,i.useCallback)(t=>e?.type===b.au.WIRELESS&&t===e?.radio,[e?.type,e?.radio]),ee=(0,i.useCallback)(e=>{j([t],[e])},[t,j]),te=(0,i.useMemo)(()=>[...w].sort(g.j3).map(({radio:e,ht:n,radio_caps:a,is_11ax:r,is_11be:l,name:c,tx_power_mode:d})=>{if(!e||e===M.sx.RADIO_6E&&!R)return null;const _=d===M.PB.DISABLED,{bw:p,num_sta:C=0}=v.find(e=>e.name===c)||{};return i.createElement(E.Ay,{key:`${e}-${c}`,radio:e,channel:i.createElement(A.A,{name:c,radio_table:w,radio_table_stats:v}),ht:(0,g.Aq)({radio:e,ht:n},{bw:p}),mimo:(0,g.e7)(a),standard:(0,m.lT)({radio:e,is_11ax:r,is_11be:l}),disabled:_,mac:t,is_device_afc_supported:z,afc_enabled:K,afc_done:F,afc_initialize_timeout_at:P,is_device_outdoor_mode_supported:B,is_disabled_all_6ghz_radios:Y,has_enabled_6Ghz:q||J,isMesh:Q(e)&&!H},k?null:i.createElement(h.A,{width:E.KK.CLIENTS,flexDirection:"row",gap:u.YC,alignItems:"center"},i.createElement(s.A,{onPress:()=>ee(e)},i.createElement(o.A,{size:"original"}),i.createElement(L.mb,null,C))))}),[w,R,v,t,z,K,F,P,B,Y,q,J,Q,k,ee,H]);return(0,N.r$V)({type:n})||!(te.length>0)||D&&!1!==U?null:i.createElement(h.A,{marginTop:u.Ln,flexDirection:"column",paddingBottom:$},D?null:te,!1===U&&V&&!Z&&S.length?i.createElement(h.A,{borderBottom:`1px solid ${a.Ay[`desktop-color-neutral-03-${W}`]}`,alignItems:"flex-start",gap:u.kc,paddingTop:u.kc,paddingBottom:u.kc},i.createElement(I.A,{color:a.Ay[`desktop-color-orange-06-${W}`],variant:"fill",size:"original"}),i.createElement(l.A,{size:"medium"},i.createElement(C.sA,{id:"COMMON_6GHZ_BAND_NOT_UTILIZED",values:{link:i.createElement(p.A,{to:G},i.createElement(C.sA,{id:"COMMON_LINK_WIFI_SETTINGS"}))}}))):null)},x=e=>(0,w.A)([(0,v.P)(void 0,{crudCacheStrategy:{type:S.e.CACHE}})],i.createElement(D,{...e}))},231460(e,t,n){n.d(t,{FN:()=>D,XG:()=>w,ZP:()=>v,dC:()=>I,hW:()=>T,kD:()=>x,mb:()=>b,pm:()=>y});var a=n(822336),r=n(296540),i=n(271856),l=n(773412),o=n(217439),c=n(705145),s=n(71479),m=n(903216),d=n(90757),u=n(945132),A=n(566723),E=n(424095),_=n(11001),p=n(294303),h=n(916537),C=n(907157),M=n(104154),N=n(691294),O=n(863489);const g=(0,s.A)(p.A)`
  > div > div {
    height: 8px;
    margin: 0;
    div {
      height: inherit !important;
    }
  }
`,b=(0,s.A)(c.A)`
  :hover {
    color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-ublue-06-${e}`]};
  }
`,T=({score:e,headerTranslationKey:t,scoreTranslationKey:n,color:a,hideScore:i})=>r.createElement(p.A,{justifyContent:"space-between"},r.createElement(o.A,{color:"text-1",size:"medium",weight:"bold"},r.createElement(h.sA,{id:t})),r.createElement(o.A,{size:"medium",style:{color:a}},r.createElement(h.sA,{id:n}),e>=0&&e<=100&&!i?r.createElement(r.Fragment,null," (",e,"%)"):null)),y=({wiredRateMbps:e,motif:t})=>r.createElement(p.A,{justifyContent:"space-between"},r.createElement(o.A,{size:"medium",weight:"bold"},r.createElement(h.sA,{id:"COMMON_WIRED_EXPERIENCE"})),r.createElement(o.A,{size:"medium",...e>0?{style:{color:(0,O.xe)(e,t)}}:{color:"disabled"}},e>0?(0,m.ir)(e):r.createElement(h.sA,{id:"COMMON_FALLBACK"}))),f=({color:e,tooltipColor:t,labelTranslationKey:n,scoreTranslationKey:a,score:i,hideScore:l=!1,wiredRateMbps:c,not_reported:s,from:m,to:d})=>r.createElement(p.A,{flexDirection:"column",whiteSpace:"nowrap"},r.createElement(p.A,{justifyContent:"space-between"},r.createElement(o.A,{weight:"bold",color:"text-1"},r.createElement(h.sA,{id:n})),r.createElement(o.A,{style:{color:t||e}},r.createElement(h.sA,{id:s?"COMMON_NOT_REPORTED":a,values:{value:c?c<1e3?c:c/1e3:0}}),i>=0&&i<=100&&!s&&!l?r.createElement(r.Fragment,null," (",i,"%)"):null)),r.createElement(p.A,{justifyContent:"space-between"},r.createElement(p.A,{marginRight:A.Ln},r.createElement(o.A,{color:"text-1"},r.createElement(h.sA,{id:"COMMON_TIME"}))),r.createElement(o.A,null,m," - ",d))),I=(0,r.memo)(({stackedBarItems:e,siteTimezone:t,language:n,selfHourCycle:a,hideScore:i=!1,wiredRateMbps:o,labelTranslationKey:c})=>r.createElement(g,null,r.createElement(l.A,{items:e,rounded:!0,itemTooltip:({score:e,color:l,tooltipColor:s,translationKey:m,timestamp:d,nextTimestamp:u,not_reported:A})=>({animate:!1,delay:.2,message:r.createElement(f,{color:l,tooltipColor:s,labelTranslationKey:c,scoreTranslationKey:m,score:e,hideScore:i,not_reported:A,wiredRateMbps:o,from:new Intl.DateTimeFormat(n,{timeZone:t,hourCycle:a,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(d),to:new Intl.DateTimeFormat(n,{timeZone:t,hourCycle:a,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(u)}),width:"auto",maxWidth:"auto"})}))),w=({siteTimezone:e,selfHourCycle:t,startTime:n,language:a})=>r.createElement(p.A,{justifyContent:"space-between",marginBottom:A.kc},r.createElement(o.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(a,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(n||Date.now()-432e5)),r.createElement(o.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(a,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(n?n+432e5:Date.now())),r.createElement(o.A,{color:"text-3",size:"small"},r.createElement(h.sA,{id:"COMMON_NOW"}))),v=({activeItem:e,isUnifiDeviceClient:t=!1})=>{const n=(0,r.useMemo)(()=>t?C.A:M.A,[t]);return r.createElement(n,{mac:e.mac,client:e,props:["tx_bytes-r","rx_bytes-r"]},({"tx_bytes-r":e=0,"rx_bytes-r":t=0})=>r.createElement(p.A,null,r.createElement(_.A,{style:{marginRight:"6px"},bytesPerSecond:e,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),r.createElement(_.A,{bytesPerSecond:t,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})))},S=e=>[d.Au.HOURS,d.Au.MINUTES,Math.floor((Date.now()-new Date(1e3*e).getTime())/u.jU)<1?d.Au.SECONDS:d.Au.DAYS],L=(0,r.memo)(({id:e,startTimestamp:t})=>r.createElement(i.A,{width:100,description:r.createElement(c.A,{size:"small",color:"text-1",isCentered:!0,style:{width:"100%"}},r.createElement(h.sA,{id:e}))},r.createElement(o.A,{size:"medium",color:"text-2"},r.createElement(E.A,{startTimestamp:t,uptimeParams:S(t)})))),D=(0,r.memo)(({status:e,assoc_time:t,last_seen:n})=>e===N.S2.ONLINE&&t?r.createElement(L,{id:"COMMON_UPTIME",startTimestamp:t}):e===N.S2.OFFLINE&&n?r.createElement(L,{id:"COMMON_LAST_SEEN",startTimestamp:n}):null),x=({uptime:e,last_seen:t})=>e>=0?r.createElement(i.A,{description:r.createElement(h.sA,{id:"COMMON_UPTIME"})},r.createElement(o.A,{size:"medium"},(0,d.Ay)(e))):t?r.createElement(p.A,{width:"100%",whiteSpace:"nowrap",justifyContent:"flex-end"},r.createElement(o.A,{size:"medium"},r.createElement(h.sA,{id:"COMMON_LAST_SEEN"}))," ",r.createElement(o.A,{size:"medium",color:"inherit"},r.createElement(E.A,{startTimestamp:t,uptimeParams:S(t)}))):null},59372(e,t,n){n.d(t,{FH:()=>d,YG:()=>A,ad:()=>m,dA:()=>u});var a=n(801081),r=n(960407),i=n(35627),l=n(294591),o=n(477544),c=n(532419),s=n(180830);const m=(0,a.Mz)(s.K8,o.Ag,r.gm,(e,t,n)=>e.filter(({device_macs:e})=>e.includes(n)).reduce((e,{_id:n})=>[...e,...t.filter(({ap_group_ids:e})=>(e||[]).includes(n))],[])),d=(0,a.Mz)(m,e=>e.every(({enabled:e})=>!1===e)),u=(0,a.Mz)(m,e=>e.some(({enabled:e,wlan_bands:t})=>e&&(t||[]).includes(l._$.AX))),A=(0,a.Mz)(r.gm,c.vh,i.B,s.K8,(e,t,n,a)=>{if(!t.includes(e))return null;const r=a.filter(({device_macs:t})=>t.includes(e));return n.filter(({configuration:{ap_group_ids:e}})=>r.some(({_id:t})=>e?.includes(t))).some(({configuration:{wlan_bands:e}})=>e.includes(l._$.AX))})}}]);