"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[13931],{927017(e,t,s){s.d(t,{A:()=>a});var i=s(602086),n=s(716155);const a=(0,s(302405).w)(e=>(0,i.createElement)("svg",(0,n.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,i.createElement)("path",{d:"M9.724 15 3 7.917 9.724 5 16 7.917 9.724 15Z",fill:"currentColor",className:e.twotonedclassname}),(0,i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.063 8a.479.479 0 0 1-.035.648.53.53 0 0 1-.773-.044A7.453 7.453 0 0 0 9.585 6a7.472 7.472 0 0 0-5.673 2.601.527.527 0 0 1-.766.046A.476.476 0 0 1 3.11 8a8.474 8.474 0 0 1 6.476-3 8.475 8.475 0 0 1 6.476 3Zm-2.454 2.531a.455.455 0 0 1-.056.592c-.229.228-.614.172-.813-.082a4 4 0 0 0-6.433.167c-.126.18-.386.217-.541.062-.246-.246-.293-.633-.075-.903A4.99 4.99 0 0 1 9.586 8.5c1.651 0 3.115.8 4.023 2.031ZM9.636 15a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z",fill:"currentColor",className:e.baseclassname}),(0,i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.418 7.597c.267.275.244.71-.027.98-.315.316-.833.282-1.148-.033A6.97 6.97 0 0 0 10.298 6.5a6.945 6.945 0 0 0-4.934 2.043c-.315.316-.833.35-1.148.035-.27-.271-.294-.706-.028-.981A8.478 8.478 0 0 1 10.298 5c2.407 0 4.574.998 6.12 2.597Zm-4.58 5.903a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm2.099-2.468c.25-.25.286-.647.049-.907A4.98 4.98 0 0 0 10.298 8.5c-1.45 0-2.764.626-3.681 1.616-.24.26-.206.658.043.91.33.333.887.263 1.226-.06A3.476 3.476 0 0 1 10.299 10c.94 0 1.787.367 2.415.968.338.323.892.394 1.223.064Z",fill:"currentColor",className:e.fillclassname})))},747483(e,t,s){var i,n,a,r,o,l;s.d(t,{CF:()=>a,MZ:()=>o,cb:()=>r,oe:()=>n,y1:()=>i,zt:()=>l}),function(e){e.AP="ap",e.CLIENT="client",e.APP="app"}(i||(i={})),function(e){e.MODEL="model",e.NAME="name",e.TYPE="type"}(n||(n={})),function(e){e.AP_DETAILS="ap_details",e.MAC="mac",e.RECEIVED_BYTES="received_bytes",e.SATISFACTION="satisfaction",e.TOTAL_BYTES="total_bytes",e.TRANSMITTED_BYTES="transmitted_bytes",e.TYPE="type"}(a||(a={})),function(e){e.DISPLAY_NAME="display_name",e.FINGERPRINT="fingerprint",e.MAC="mac",e.RECEIVED_BYTES="received_bytes",e.SATISFACTION="satisfaction",e.TOTAL_BYTES="total_bytes",e.TRANSMITTED_BYTES="transmitted_bytes",e.TYPE="type"}(r||(r={})),function(e){e.APPLICATION="application",e.CATEGORY="category",e.CLIENT_COUNT="client_count",e.RECEIVED_BYTES="received_bytes",e.TOTAL_BYTES="total_bytes",e.TRANSMITTED_BYTES="transmitted_bytes",e.TYPE="type"}(o||(o={})),function(e){e.USAGE_BY="usage_by"}(l||(l={}))},536442(e,t,s){s.d(t,{L6:()=>A,Rz:()=>x,_S:()=>p,df:()=>m,nH:()=>u,pn:()=>j,uS:()=>h,uc:()=>_});var i=s(505817),n=s(775250),a=s(247816),r=s(565527),o=s(309130),l=s(100978),d=s(291508),c=s(866725);const A=(0,a.A)(l.A)`
  width: 100%;
  gap: ${c.g1}px;
`,m=(0,a.A)(l.A)`
  width: 100%;
  gap: ${c.ur}px;
`,x=(0,a.A)(l.A)`
  flex-direction: column;
  gap: ${o.kc};
  > span {
    cursor: pointer;
    white-space: nowrap;
  }
`,_=(0,a.A)(l.A)`
  width: ${c.Yk}px;
  position: relative;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
`,h=(0,a.A)(l.A,(0,d.A)("dimension","outlineOverride","header"))`
  position: relative;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: 8px;
  margin-bottom: ${o.YC};
  ${({theme:{themeName:e},dimension:t=c.Yk,outlineOverride:s,header:n})=>`\n    border: ${c.jo}px solid ${i.Ay[s||`desktop-color-ublue-${e===r.S.DARK?"02":"04"}-${e}`]};\n    background: ${e===r.S.DARK?i.Ay["desktop-color-depth-bg-2-dark"]:i.Ay["desktop-color-neutral-00-light"]};\n    width: ${t}px;\n    min-width: ${t}px;\n    height: ${t}px;\n    min-height: ${t}px;\n      ${n?`&:after {\n              content: '${n}';\n              font-size: 10px;\n              color: ${i.Ay[`desktop-color-text-3-${e}`]};\n              position: absolute;\n              top: -${o.kc};\n              background: ${i.Ay[`desktop-color-neutral-01-${e}`]};\n              border-radius: ${i.Ay["desktop-radius-base"]};\n              padding: 0 ${o.YC};\n            }`:""}\n  `}
`,u=e=>(0,a.A)(e,(0,d.A)("margin"))`
  ${({device:e,client:t})=>e?"\n        width: 100%;\n        height: 100%;\n        margin: 0 auto;\n      ":t?"max-width: 80%; max-height: 80%;":""};
  ${({margin:e})=>`\n    ${e?`margin: ${e} !important;`:""};\n  `}
`,p=(0,a.A)("div")`
  position: absolute;
  top: -${c.Yk/2}px;
  left: -${c.Yk/2}px;
  width: ${c.Yk}px;
  height: ${c.Yk}px;
  z-index: 1;
`,j=(0,a.A)(n.A)`
  width: calc(${c.Yk}px + ${c.Yk/2/2}px);
`},866725(e,t,s){s.d(t,{P4:()=>o,WC:()=>c,Yk:()=>n,f$:()=>l,g1:()=>r,jo:()=>i,oT:()=>d,ur:()=>a});const i=2,n=40,a=16,r=2*a,o=16,l=2*i,d=24,c={cursorType:"pointer",portal:!0,width:252}},791732(e,t,s){s.d(t,{A:()=>x});var i=s(274934),n=s(602086),a=s(505817),r=s(247816),o=s(565527),l=s(291508),d=s(866725),c=s(409844);const A=(0,r.A)("svg",(0,l.A)("dimension"))`
  position: absolute;
  border-radius: 8px;
  ${({dimension:e=d.Yk})=>`\n    width: ${e}px;\n    height: ${e}px;\n  `}
`,m=(0,r.A)("rect",(0,l.A)("offset","totalLength","dimension","strokeDashOffset"))`
  ${({theme:{themeName:e},offset:t,totalLength:s,dimension:i=d.Yk,strokeDashOffset:n=d.P4})=>`\n    stroke: ${a.Ay[`desktop-color-ublue-${e===o.S.DARK?"04":"06"}-${e}`]};\n    stroke-dasharray: 0, ${4*i};\n    ${t&&s?`animation: ${((e,t)=>c.i7` 0% { stroke-dasharray: 0, ${e}; } 100% { stroke-dasharray: ${e*t}, ${e*(1-t)}; }`)(s,t)} 0.75s linear 0.15s forwards;`:""}\n    width: ${i}px;\n    height: ${i}px;\n    stroke-dashoffset: -${n};\n  `};
  fill: none;
  stroke-width: ${d.f$}px;
`,x=(0,n.memo)(({offset:e,dimension:t,strokeDashOffset:s})=>(0,i.jsx)(A,{dimension:t,children:(0,i.jsx)(m,{x:"0",y:"0",rx:"8",totalLength:4*d.Yk-14,offset:100*e/100,dimension:t,strokeDashOffset:s})}))},411897(e,t,s){s.d(t,{K5:()=>d,Se:()=>o,UI:()=>r,zd:()=>l});var i=s(247816),n=s(309130),a=s(100978);const r=(0,i.A)(a.A)`
  flex-direction: column;
  gap: ${n.kc};
`,o=(0,i.A)(a.A)`
  flex-direction: column;
  gap: ${n.YC};
`,l=(0,i.A)(a.A)`
  width: 100%;
  justify-content: space-between;
`,d=(0,i.A)(a.A)`
  align-items: center;
  gap: ${n.YC};
`},22372(e,t,s){s.d(t,{D:()=>i});const i="2x"},555672(e,t,s){s.d(t,{A:()=>h});var i=s(274934),n=s(505817),a=s(602086),r=s(977872),o=s(247816),l=s(409844),d=s(222102),c=s(430328),A=s(773434),m=s(291508);const x=l.i7`
  0% {
    opacity: 0.0;
    transform: scale(0.3);
  }
  // fadein
  20% {
    opacity: 0.8;
  }
  // grow
  70% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  // fadeout
  100% {
    opacity: 0.0;
    transform: scale(1.0);
  }
`,_=(0,o.A)("div",(0,m.A)("size","animationName","delay"))`
  position: absolute;
  border-radius: 50%;
  ${({size:e,theme:{themeName:t},delay:s,animationName:i})=>`\n    width: ${e}px;\n    height: ${e}px;\n    background: ${n.Ay[`desktop-color-ublue-03-${t}`]};\n    animation-delay: ${s}ms;\n    animation-name: ${i};\n  `}
  animation-duration: ${2e3}ms;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0, 0.3, 0.1, 0);
  z-index: -1;
  opacity: 0;
  transform: scale(0);
`,h=(0,a.memo)(({size:e,mac:t})=>(0,r.d4)((0,a.useMemo)(()=>(e=>(0,c.WY)()((0,d.Mz)(({models:t})=>t[A.G.SESSION_METADATA]?.byId?.[e],e=>Boolean(e)),e=>e))(t),[t]))?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_,{size:e,animationName:x,delay:-500}),(0,i.jsx)(_,{size:e,animationName:x,delay:-1500})]}):null)},589252(e,t,s){s.d(t,{A:()=>l});var i=s(274934),n=s(977872),a=s(897166),r=s(633144),o=s(100978);const l=({allowReadOnly:e,...t})=>{const s=(0,n.d4)(a.EL)&&!e;return(0,i.jsx)(o.A,{alignItems:"center",children:(0,i.jsx)(r.A,{size:"medium",type:"button",...t,disabled:s||t.isDisabled})})}},275247(e,t,s){s.d(t,{A:()=>l});var i=s(274934),n=s(179102),a=s(320509),r=s(470070),o=s(664092);const l=({rx_rate:e})=>e>0?(0,i.jsxs)(o.A,{children:[(0,i.jsx)(n.A,{color:"text-2",size:"medium",children:(0,i.jsx)(r.sA,{id:"COMMON_RX_RATE"})}),(0,i.jsx)(n.A,{color:"text-3",size:"medium",children:(0,a.Up)(e)})]}):null},206945(e,t,s){s.d(t,{A:()=>l});var i=s(274934),n=s(179102),a=s(320509),r=s(470070),o=s(664092);const l=({tx_rate:e})=>e>0?(0,i.jsxs)(o.A,{children:[(0,i.jsx)(n.A,{color:"text-2",size:"medium",children:(0,i.jsx)(r.sA,{id:"COMMON_TX_RATE"})}),(0,i.jsx)(n.A,{color:"text-3",size:"medium",children:(0,a.Up)(e)})]}):null},241615(e,t,s){s.d(t,{A:()=>O});var i=s(274934),n=s(602086),a=s(247816),r=s(293668),o=s(309130),l=s(179102),d=s(100978),c=s(470070),A=s(664092);const m=({id:e,isDisabledRadio:t})=>(0,i.jsx)(d.A,{marginBottom:t?0:o.kc,children:(0,i.jsxs)(A.A,{children:[(0,i.jsx)(l.A,{weight:"bold",size:"medium",children:(0,i.jsx)(c.sA,{id:e})}),t?(0,i.jsx)(l.A,{color:"text-3",size:"medium",children:(0,i.jsx)(c.sA,{id:"COMMON_DISABLED"})}):null]})});var x=s(535322),_=s(561614),h=s(175650),u=s(662986);const p=({radio_table_item:e,type:t,stat:s})=>{const{retryPercentage:a,droppedPercentage:r}=(0,n.useMemo)(()=>(0,h.GI)(t,e,"tx",s),[e,t,s]);return(0,i.jsxs)(A.A,{children:[(0,i.jsx)(l.A,{color:"text-2",size:"medium",children:(0,i.jsx)(c.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED"})}),(0,i.jsxs)(l.A,{color:"text-3",size:"medium",children:[(0,u.l)(a)," / ",(0,u.l)(r)]})]})},j=({radio_table_item:e,type:t,stat:s})=>{const{totalPackets:a,totalBytes:r}=(0,n.useMemo)(()=>(0,h.GI)(t,e,"tx",s),[t,e,s]);return(0,i.jsxs)(A.A,{children:[(0,i.jsx)(l.A,{color:"text-2",size:"medium",children:(0,i.jsx)(c.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES"})}),(0,i.jsxs)(l.A,{color:"text-3",size:"medium",children:[a??(0,i.jsx)(c.sA,{id:"COMMON_FALLBACK"})," /"," ",r??(0,i.jsx)(c.sA,{id:"COMMON_FALLBACK"})]})]})},E=({radio_table_stats:e,radio_table_stats_item:t})=>{const{formatMessage:s}=(0,c.tz)(),a=(0,n.useMemo)(()=>(0,h.ZJ)(e,t,s),[e,t,s]);return a?(0,i.jsxs)(A.A,{children:[(0,i.jsx)(l.A,{color:"text-2",size:"medium",children:(0,i.jsx)(c.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_EIRP"})}),(0,i.jsx)(l.A,{color:"text-3",size:"medium",children:a})]}):null},C=({radio_table_item:e,type:t,stat:s})=>{const{retryPercentage:a,droppedPercentage:r}=(0,n.useMemo)(()=>(0,h.GI)(t,e,"rx",s),[e,t,s]);return(0,i.jsxs)(A.A,{children:[(0,i.jsx)(l.A,{color:"text-2",size:"medium",children:(0,i.jsx)(c.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED"})}),(0,i.jsxs)(l.A,{color:"text-3",size:"medium",children:[(0,u.l)(a)," / ",(0,u.l)(r)]})]})},T=({radio_table_item:e,type:t,stat:s})=>{const{totalPackets:a,totalBytes:r}=(0,n.useMemo)(()=>(0,h.GI)(t,e,"rx",s),[t,e,s]);return(0,i.jsxs)(A.A,{children:[(0,i.jsx)(l.A,{color:"text-2",size:"medium",children:(0,i.jsx)(c.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES"})}),(0,i.jsxs)(l.A,{color:"text-3",size:"medium",children:[a??(0,i.jsx)(c.sA,{id:"COMMON_FALLBACK"})," /"," ",r??(0,i.jsx)(c.sA,{id:"COMMON_FALLBACK"})]})]})},g=({radio_table_stats:e,radio_table_item:t,flexProps:s})=>{const a=(0,n.useMemo)(()=>(0,h.Lm)(e,t),[e,t]);return a?(0,i.jsxs)(A.A,{flexProps:s,children:[(0,i.jsx)(l.A,{color:"text-2",size:"medium",children:(0,i.jsx)(c.sA,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION"})}),(0,i.jsx)(l.A,{color:"text-3",size:"medium",children:`${a.total}% / ${a.selfRx}% / ${a.selfTx}%`})]}):null};var y=s(376892);const b=(0,a.A)(d.A)`
  &:not(:last-child) {
    margin-bottom: ${o.Ln};
  }
`,O=(0,n.memo)(({radio_table:e,radio_table_stats:t,type:s,stat:a,support_wifi6e:o})=>{const l=(0,n.useMemo)(()=>[...e||[]].sort(h.j3),[e]);return l.length?(0,i.jsx)(x.A,{type:x.I.ACCORDION,items:[{id:"airStats",label:(0,i.jsx)(y.A,{id:"DEVICE_PROPERTY_AIR_STATS"}),openByDefault:!0,renderContent:()=>l.map(({radio:n,name:l})=>{const c=t?.find(e=>e.radio===n&&e.name===l),A=e?.find(e=>e.radio===n&&e.name===l),x=(0,h.Ww)(A);return n!==_.sx.RADIO_6E||o?(0,i.jsxs)(b,{flexDirection:"column",children:[(0,i.jsx)(m,{id:(0,r.dI)(n),isDisabledRadio:x}),x?void 0:(0,i.jsxs)(d.A,{height:"100%",flexDirection:"column",children:[(0,i.jsx)(E,{radio_table_stats:t,radio_table_stats_item:c}),(0,i.jsx)(j,{radio_table_item:A,type:s,stat:a}),(0,i.jsx)(T,{radio_table_item:A,type:s,stat:a}),(0,i.jsx)(p,{radio_table_item:A,type:s,stat:a}),(0,i.jsx)(C,{radio_table_item:A,type:s,stat:a}),(0,i.jsx)(g,{radio_table_stats:t,radio_table_item:A})]})]},`${n}-${l}`):null})}]}):null})},686318(e,t,s){s.d(t,{S:()=>D});var i=s(274934),n=s(977872),a=s(602086),r=s(645759),o=s(247816),l=s(244081),d=s(724081),c=s(376892),A=s(535322),m=s(904614),x=s(561614),_=s(393482),h=s(222102),u=s(254585),p=s(910577),j=s(544691);const E=(0,h.Mz)(j.K8,p.Ag,u.gm,(e,t,s)=>e.filter(({device_macs:e,for_wlanconf:t})=>e.includes(s)&&!t).map(e=>{const s=[];return((t||[]).filter(t=>t?.ap_group_ids?.includes(e._id))||[]).forEach(t=>{(t?.wlan_bands||[]).forEach(i=>{s.push({...t,id:`${t._id}-${e._id}-${i}`,wlan_band:i})}),s.length||s.push({...t,id:t._id+e._id})}),{...e,id:e._id,children:s}}));var C=s(548941),T=s(775250),g=s(927017),y=s(408402),b=s(470070),O=s(220700);const M=(0,o.A)(g.A)`
  margin-right: 7px;
  margin-bottom: 2px;
`,f=e=>t=>(0,i.jsx)(C.A,{description:(0,i.jsx)(i.Fragment,{children:e.map(e=>(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(b.sA,{id:"COMMON_BSSID"})," ",e]},e))}),width:167,portal:!0,children:t}),N=[{id:"name",label:(0,i.jsx)(b.sA,{id:"DEVICE_PROPERTIES_AP_GROUP_TABLE_HEADER_NAME"}),renderCell:({name:e,attr_no_delete:t,children:s,wlan_band:n,bssids:a})=>s?(0,i.jsx)(T.A,{isTruncated:!0,color:"inherit",size:"medium",children:(0,O.K5)({attr_no_delete:t})?(0,i.jsxs)(i.Fragment,{children:[e," (",(0,i.jsx)(b.sA,{id:"COMMON_DEFAULT"}),")"]}):e}):(0,i.jsx)(y.A,{condition:!!a?.length,wrapper:f(a||[]),children:(0,i.jsxs)(T.A,{isTruncated:!0,color:"inherit",size:"medium",children:[n===m._$.NG?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(M,{}),e," (",(0,i.jsx)(b.sA,{id:"COMMON_RADIO_BAND_NG"}),")"]}):null,n===m._$.NA?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(M,{}),e," (",(0,i.jsx)(b.sA,{id:"COMMON_RADIO_BAND_NA"}),")"]}):null,n===m._$.AX?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(M,{}),e," (",(0,i.jsx)(b.sA,{id:"COMMON_RADIO_BAND_6E"}),")"]}):null]})})}],I=(0,o.A)("div")`
  table thead {
    display: none;
  }
`,$={[m._$.NG]:x.sx.RADIO_NG,[m._$.NA]:x.sx.RADIO_NA,[m._$.AX]:x.sx.RADIO_6E},R=({vap_table:e=[],radio_table:t=[]})=>{const s=(0,n.d4)(E),o=(0,a.useMemo)(()=>t?.reduce((e,t)=>(e[t.radio]=t,e),{}),[t]),c=(0,a.useMemo)(()=>s.map(t=>({...t,children:(t.children||[]).filter(e=>e.wlan_band&&o?.[$[e.wlan_band]]).map(t=>({...t,bssids:e?.filter(e=>t.wlan_band&&e.wlanconf_id===t._id&&e.radio===$[t.wlan_band]).map(e=>e?.bssid||"")}))})),[s,o,e]);return(0,d.A)([(0,_.Yo)(void 0,{crudCacheStrategy:{type:l.e.CACHE}})],(0,i.jsx)(I,{children:(0,i.jsx)(r.A,{truncateHeaderCells:!0,items:c,columns:N,disableColumnFilters:!0,disableSelection:!0,disableTextPointer:!0})}))},D=(0,a.memo)(({vap_table:e,radio_table:t})=>e?.length?(0,i.jsx)(A.A,{type:A.I.ACCORDION,items:[{id:"apGroups",label:(0,i.jsx)(c.A,{id:"COMMON_AP_GROUPS"}),renderContent:()=>(0,i.jsx)(R,{vap_table:e,radio_table:t}),openByDefault:!0}]}):null)},326084(e,t,s){s.d(t,{A:()=>D});var i=s(274934),n=s(977872),a=s(602086),r=s(713035),o=s(244081),l=s(820633),d=s(724081),c=s(999396),A=s(309130),m=s(907488),x=s(100978),_=s(535322),h=s(549059),u=s(897166),p=s(570801),j=s(956978),E=s(222102),C=s(15989),T=s(401042);const g=({queryParams:e},{queryParams:t})=>e?.mac===t?.mac,y="deviceDailyTxRetries",b=(0,T.T7)("device/:mac:/24hr-tx-retries"),O="mac";var M=s(29472),f=s(128066),N=s(103202),I=s(646077);const $={},R=({stat:e,mac:t,uplink:s,uptime:o,last_seen:d,deviceState:h})=>{const R=(0,n.wA)(),{motif:D}=(0,r.A)(),S=(0,n.d4)(u.hq),w=(0,n.d4)(l.zi),z=(0,n.d4)(p.BQ),L=(0,a.useMemo)(()=>(0,f.lD)(e),[e]),{translationKey:P,textColor:k}=(0,a.useMemo)(()=>(0,f.QS)(D,L),[L,D]),v=(0,a.useMemo)(()=>(0,j.aK8)(h),[h]),Y=(0,n.d4)((0,a.useMemo)(()=>(e=>(0,E.Mz)((e=>(0,E.Mz)((e=>({models:t})=>(0,C.JC)(y,t,{queryParams:{mac:e}},{idField:O,compareFunction:g}))(e),e=>(0,T.kh)(e)[0]))(e),e=>e?.historical_scores||[]))(t),[t])),B=(0,a.useMemo)(()=>(0,f.bW)(Y,D),[Y,D]),F=(0,a.useMemo)(()=>B.every(({not_reported:e})=>e),[B]);return(0,a.useEffect)(()=>{(!$[t]||Date.now()-$[t]>=3e5)&&R(((e,t={},s={})=>(0,M.An)([{model:y,payload:t=>[{...t,[O]:e}]}],b.replace(":mac:",e),{queryParams:{mac:e},...t},{idField:O,compareFunction:g,...s}))(t)).then(()=>{$[t]=Date.now()})},[R,t]),(0,i.jsxs)(_.A,{children:[(0,i.jsx)(I.hW,{score:L,headerTranslationKey:"COMMON_TX_RETRIES",scoreTranslationKey:F?"COMMON_FALLBACK":P,hideScore:F,color:F?N.PC[D][c.Jm.NOT_REPORTED]:k}),(0,i.jsxs)(x.A,{flexDirection:"column",marginTop:A.Ln,gap:A.YC,children:[(0,i.jsx)(I.dC,{stackedBarItems:B,labelTranslationKey:"COMMON_TX_RETRIES",siteTimezone:S,language:w,selfHourCycle:z}),(0,i.jsx)(I.XG,{siteTimezone:S,selfHourCycle:z,language:w,startTime:Y[0]?.timestamp})]}),(0,i.jsxs)(x.A,{width:"100%",justifyContent:"space-between",children:[(0,i.jsx)(x.A,{children:s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.A,{style:{marginRight:"6px"},bytesPerSecond:v?0:s["rx_bytes-r"]||0,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),(0,i.jsx)(m.A,{bytesPerSecond:v?0:s["tx_bytes-r"]||0,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})]}):null}),v?null:(0,i.jsx)(I.kD,{uptime:o,last_seen:d})]})]})},D=e=>(0,d.A)([(0,h.P)(void 0,{crudCacheStrategy:{type:o.e.CACHE}})],(0,i.jsx)(R,{...e}))},781964(e,t,s){s.d(t,{A:()=>c,c:()=>d});var i=s(274934),n=s(602086),a=s(179102),r=s(331472),o=s(470070),l=s(664092);const d=({signal:e,color:t,size:s})=>(0,i.jsxs)(a.A,{size:s||"medium",color:t||(0,r.b5)(e),children:[e," ",(0,i.jsx)(o.sA,{id:"COMMON_UNIT_DBM"})]}),c=(0,n.memo)(e=>(0,i.jsxs)(l.A,{children:[(0,i.jsx)(a.A,{color:"text-2",size:"medium",children:(0,i.jsx)(o.sA,{id:"COMMON_SIGNAL"})}),(0,i.jsx)(d,{...e})]}))},352879(e,t,s){s.d(t,{A:()=>q});var i=s(274934),n=s(977872),a=s(602086),r=s(548941),o=s(179102),l=s(590979),d=s(244081),c=s(724081),A=s(101134),m=s(449339),x=s(309130),_=s(555672),h=s(589252),u=s(100978),p=s(650632),j=s(535322),E=s(205521),C=s(104997),T=s(470070),g=s(22372),y=s(791732),b=s(866725),O=s(536442),M=s(34118),f=s(239627),N=s(747483),I=s(269984),$=s(775250),R=s(266824),D=s(442175),S=s(345272),w=s(964978),z=s(122109),L=s(411897),P=s(223597),k=s(781964),v=s(454384),Y=s(436910),B=s(805521),F=s(609553),K=s(587083),G=s(507598),U=s(882355);const{startDate:H,endDate:V}=Y.E[U.l.ONE_DAY].getRange(new Date),X=(0,a.memo)(({mac:e})=>{const t=(0,n.wA)(),s=H.getTime(),r=V.getTime(),l=(0,n.d4)((0,a.useMemo)(()=>(0,K.Fr)({start:s,end:r,includeUnidentified:!0,mac:e}),[e,s,r])),c=(0,a.useMemo)(()=>(l?.usage_by_app||[]).reduce((e,{total_bytes:t,category:s,application:i})=>e+((0,B.ez)((0,v.h)(s,i)).toLowerCase()!==F.HV?t:0),0)||0,[l?.usage_by_app]);return(0,a.useEffect)(()=>{t((0,G.m)({start:s,end:r,includeUnidentified:!0,mac:e},void 0,{crudCacheStrategy:{type:d.e.CACHE}}))},[t,r,e,s]),(0,i.jsxs)(L.zd,{children:[(0,i.jsx)(o.A,{size:"small",color:"text-1",children:(0,i.jsx)(T.sA,{id:"COMMON_24H_INTERNET_ACTIVITY"})}),(0,i.jsx)(o.A,{size:"small",color:"text-2",children:(0,D.FI)(c)})]})}),Z=({client:e})=>{const{navigateToApClients:t,openClientPropertyPanel:s}=(0,I.A)(),n=(0,a.useCallback)(()=>{t(),s(e.mac)},[t,s,e.mac]);return(0,i.jsxs)(L.UI,{children:[(0,i.jsx)(L.Se,{children:(0,i.jsxs)(L.K5,{children:[(0,i.jsx)(p.A,{size:g.D,width:b.oT,height:b.oT,client:e}),(0,i.jsx)($.A,{size:"medium",weight:"bold",color:"text-1",isTruncated:!0,children:e.display_name||(0,i.jsx)(T.sA,{id:"COMMON_UNKNOWN"})})]})}),(0,i.jsxs)(L.Se,{children:[(0,i.jsxs)(L.zd,{children:[(0,i.jsx)(o.A,{size:"small",color:"text-1",children:(0,i.jsxs)($.A,{variant:"caption",color:"text-1",isTruncated:!0,children:[(0,i.jsx)(T.sA,void 0!==e.channel?{id:"COMMON_CHANNEL_RADIO_CHANNEL",values:{channel:e.channel}}:{id:"COMMON_FALLBACK"})," (",e.radio&&S.A[e.radio.toUpperCase()]?.frequency||(0,i.jsx)(T.sA,{id:"COMMON_FALLBACK"}),", ",e.channel_width||(0,i.jsx)(T.sA,{id:"COMMON_FALLBACK"})," ",(0,i.jsx)(T.sA,{id:"COMMON_UNIT_MHZ"}),")"]})}),void 0!==e.signal?(0,i.jsx)(k.c,{signal:e.signal,size:"small"}):(0,i.jsx)(T.sA,{id:"COMMON_FALLBACK"})]}),(0,i.jsxs)(L.zd,{children:[(0,i.jsx)(o.A,{size:"small",color:"text-1",children:(0,i.jsx)(T.sA,{id:"COMMON_DOWNLOAD"})}),(0,i.jsxs)(L.K5,{children:[(0,i.jsx)(z.A.Icon,{size:"small"}),(0,i.jsx)(o.A,{size:"small",color:"traffic-down",children:(0,D.FI)(e["rx_bytes-r"]||0)})]})]}),(0,i.jsxs)(L.zd,{children:[(0,i.jsx)(o.A,{size:"small",color:"text-1",children:(0,i.jsx)(T.sA,{id:"COMMON_UPLOAD"})}),(0,i.jsxs)(L.K5,{children:[(0,i.jsx)(w.A.Icon,{size:"small"}),(0,i.jsx)(o.A,{size:"small",color:"traffic-up",children:(0,D.FI)(e["tx_bytes-r"]||0)})]})]}),e.status===P.S2.ONLINE?(0,i.jsx)(X,{mac:e.mac}):null]}),(0,i.jsx)(L.Se,{children:(0,i.jsx)(L.zd,{children:(0,i.jsx)(R.A,{onPress:n,children:(0,i.jsx)(T.sA,{id:"COMMON_VIEW_IN_CLIENTS"})})})})]})},W=({headerTranslationKey:e,scoreTranslationKey:t,onSeeAllClick:s})=>{const n=(0,A.A)(C.VO.CLIENTS);return(0,i.jsxs)(u.A,{justifyContent:"space-between",children:[(0,i.jsx)(o.A,{color:"text-1",size:"medium",weight:"bold",children:(0,i.jsx)(T.sA,{id:e})}),(0,i.jsx)(h.A,{allowReadOnly:!0,to:n,onClick:s,children:(0,i.jsx)(T.sA,{id:t})})]})},q=({mac:e})=>{const t=(0,n.wA)(),{navigateToApClients:s}=(0,I.g)(),o=(0,n.d4)((0,a.useMemo)(()=>(0,M.A5)(e),[e])),A=(0,a.useCallback)(e=>()=>{t((0,E.XP)({type:m.H.CLIENT,id:e}))},[t]),h=(0,a.useCallback)(()=>{s([e],[])},[e,s]),C=o.length;return(0,c.A)([(0,f.$3)(void 0,{crudCacheStrategy:{type:d.e.CACHE}})],C>0?(0,i.jsxs)(j.A,{children:[(0,i.jsx)(W,{headerTranslationKey:"DEVICE_HEADER_MOST_ACTIVE_CLIENTS",scoreTranslationKey:"COMMON_SEE_ALL",onSeeAllClick:h}),(0,i.jsx)(u.A,{flexDirection:"column",marginTop:x.Ln,children:(0,i.jsx)(u.A,{flexDirection:"row",justifyContent:C>=7?"space-between":void 0,gap:C<7?x.kc:void 0,children:o.sort((e,t)=>t.usage_bytes-e.usage_bytes).slice(0,7).map(e=>(0,i.jsx)(r.A,{width:240,description:e?(0,i.jsx)(Z,{client:e}):null,portal:!0,isInteractive:!0,children:(0,i.jsxs)(O.uc,{onClick:A(e[N.cb.MAC]),...l.A.addDataTestId(l.A.TestId.SIDE_PANEL_TRIGGER),children:[(0,i.jsx)(O._S,{children:(0,i.jsx)(_.A,{size:2*b.Yk,mac:e[N.cb.MAC]})}),(0,i.jsxs)(O.uS,{children:[(0,a.createElement)((0,O.nH)(p.A),{client:e,width:b.oT,height:b.oT,size:g.D}),(0,i.jsx)(y.A,{offset:o?.[0]?.usage_bytes?e.usage_bytes/o[0].usage_bytes:0})]}),(0,i.jsx)(O.pn,{size:"xsmall",color:"text-3",isCentered:!0,isTruncated:!0,style:{width:`${b.Yk}px`},children:e?.display_name})]})},e.mac))})})]}):null)}}}]);