"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[68283],{682e3(t,e,a){var n;a.d(e,{L:()=>n}),function(t){t.XS="XS",t.S="S",t.SM="SM",t.M="M",t.ML="ML",t.L="L",t.XL="XL",t.XXL="XXL"}(n||(n={}))},588769(t,e,a){a.d(e,{A:()=>s,G:()=>r});var n=a(682e3);const o={[n.L.XS]:{FROM:0,TO:374},[n.L.S]:{FROM:375,TO:567},[n.L.SM]:{FROM:568,TO:767},[n.L.M]:{FROM:768,TO:1023},[n.L.ML]:{FROM:1024,TO:1199},[n.L.L]:{FROM:1200,TO:1919},[n.L.XL]:{FROM:1920,TO:2559},[n.L.XXL]:{FROM:2560,TO:1/0}},r=600,s={...o,DASHBOARD:{LAYOUT:{MOBILE:"(max-width: 767px)",DESKTOP:"(min-width: 768px)"},CHART:{MOBILE:"(max-width: 1419px)",DESKTOP:"(min-width: 1420px)"},BAND_SELECTOR:{MOBILE:"(max-width: 1119px)",DESKTOP:"(min-width: 1120px)"}},SIDE_NAVIGATION_BREAKPOINT_UP:`(min-width: ${r+1}px)`,SIDE_NAVIGATION_BREAKPOINT_DOWN:`(max-width: ${r}px)`,VIEWPORT_XS:`(max-width: ${o[n.L.XS].TO}px)`,VIEWPORT_S:`(min-width: ${o[n.L.S].FROM}px) and (max-width: ${o[n.L.S].TO}px)`,VIEWPORT_SM:`(min-width: ${o[n.L.SM].FROM}px) and (max-width: ${o[n.L.SM].TO}px)`,VIEWPORT_M:`(min-width: ${o[n.L.M].FROM}px) and (max-width: ${o[n.L.M].TO}px)`,VIEWPORT_ML:`(min-width: ${o[n.L.ML].FROM}px) and (max-width: ${o[n.L.ML].TO}px)`,VIEWPORT_L:`(min-width: ${o[n.L.L].FROM}px) and (max-width: ${o[n.L.L].TO}px)`,VIEWPORT_XL:`(min-width: ${o[n.L.XL].FROM}px) and (max-width: ${o[n.L.XL].TO}px)`,VIEWPORT_XXL:`(min-width: ${o[n.L.XXL].FROM}px)`,VIEWPORT_XS_UP:`(min-width: ${o[n.L.S].FROM}px)`,VIEWPORT_S_UP:`(min-width: ${o[n.L.SM].FROM}px)`,VIEWPORT_SM_UP:`(min-width: ${o[n.L.M].FROM}px)`,VIEWPORT_M_UP:`(min-width: ${o[n.L.ML].FROM}px)`,VIEWPORT_ML_UP:`(min-width: ${o[n.L.L].FROM}px)`,VIEWPORT_L_UP:`(min-width: ${o[n.L.XL].FROM}px)`,VIEWPORT_XL_UP:`(min-width: ${o[n.L.XXL].FROM}px)`,VIEWPORT_S_DOWN:`(max-width: ${o[n.L.S].TO}px)`,VIEWPORT_SM_DOWN:`(max-width: ${o[n.L.SM].TO}px)`,VIEWPORT_M_DOWN:`(max-width: ${o[n.L.M].TO}px)`,VIEWPORT_ML_DOWN:`(max-width: ${o[n.L.ML].TO}px)`,VIEWPORT_L_DOWN:`(max-width: ${o[n.L.L].TO}px)`,VIEWPORT_XL_DOWN:`(max-width: ${o[n.L.XL].TO}px)`,VIEWPORT_XXL_DOWN:`(max-width: ${o[n.L.XXL].TO}px)`}},333542(t,e,a){a.d(e,{AL:()=>i,Lt:()=>s,Nk:()=>d,w1:()=>l});var n=a(274934),o=a(470070),r=a(504155);const s=142,i=20,l=30,d=[{id:r.Bo.ALL,label:(0,n.jsx)(o.sA,{id:"COMMON_ALL"})},{id:r.Bo.NG,label:(0,n.jsx)(o.sA,{id:"COMMON_RADIO_BAND_NG"})},{id:r.Bo.NA,label:(0,n.jsx)(o.sA,{id:"COMMON_RADIO_BAND_NA"})},{id:r.Bo.SIXE,label:(0,n.jsx)(o.sA,{id:"COMMON_RADIO_BAND_6E"})}]},535322(t,e,a){a.d(e,{A:()=>m,I:()=>n});var n,o=a(274934),r=a(814557),s=a(158885),i=a(247816),l=a(565527),d=a(309130),c=a(100978),u=a(291508);!function(t){t.ACCORDION="accordion",t.BUTTON_LIST="buttonList"}(n||(n={}));const _=(0,i.A)(c.A,(0,u.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:t,nested:e,theme:{themeName:a}})=>t||r.Ay[a===l.S.DARK?`desktop-color-neutral-${e?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${e?"01":"00"}-${l.S.LIGHT}`]};
  padding: ${({isButtonList:t,padding:e})=>e||(t?`0 ${d.Ln}`:d.Ln)};
  margin-bottom: ${({marginBottom:t})=>t||d.Ln};
  ${({margin:t})=>t?`margin: ${t};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:t="100%"})=>t};
  flex: ${({flex:t=0})=>t};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:t})=>t?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:t}})=>r.Ay[`desktop-border-divider-${t}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,T=(0,i.A)(s.A,(0,u.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:t,nested:e,theme:{themeName:a}})=>t||r.Ay[a===l.S.DARK?`desktop-color-neutral-${e?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${e?"01":"00"}-${l.S.LIGHT}`]};
  margin-bottom: ${({theme:t,marginBottom:e})=>e||t.spacing["spacing-l"]};
  ${({margin:t})=>t?`margin: ${t};`:""}
  ${({padding:t})=>t?`padding: ${t};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:t=0})=>t};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:t,theme:{themeName:e}})=>t||r.Ay[e===l.S.DARK?`desktop-color-neutral-01-${l.S.DARK}`:`desktop-color-neutral-00-${l.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${d.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${d.Ln} ${d.Ln};
      }
    }
  }
`,m=({type:t,marginBottom:e,margin:a,padding:r,flex:s,width:i,nested:l,...d})=>"items"in d?(0,o.jsx)(T,{marginBottom:e,margin:a,padding:r,flex:s,nested:l,...d}):(0,o.jsx)(_,{nested:l,width:i,marginBottom:e,margin:a,padding:r,flex:s,isButtonList:t===n.BUTTON_LIST,...d,children:d.children})},806775(t,e,a){a.d(e,{A:()=>x});var n=a(274934),o=a(602086),r=a(558948),s=a(816113),i=a(535322),l=a(758654),d=a(561614),c=a(309130),u=a(100978),_=a(376892);const T=(0,l.uQ)([d.sx.RADIO_6E,d.sx.RADIO_NA,d.sx.RADIO_NG]).orderByRadio,m=({device:t})=>(0,n.jsx)(i.A,{type:i.I.ACCORDION,items:[{id:"airtime-insights",openByDefault:!0,label:(0,n.jsx)(_.A,{id:"DEVICE_KEY_METRICS"}),renderContent:()=>(0,n.jsx)(u.A,{flexDirection:"column",gap:c.Ln,children:t.radio_table?.sort(T)?.map((e,a,o)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.default,{radioTableEntry:e,device:t,showBand:!0},e.name),a!==o.length-1?(0,n.jsx)(r.A,{}):null]}))})}]}),x=(0,o.memo)(({device:t})=>t.radio_table?.length?(0,n.jsx)(m,{device:t}):null)},759868(t,e,a){a.d(e,{A:()=>wt});var n=a(274934),o=a(602086),r=a(535322),s=a(977872),i=a(100978),l=a(309130),d=a(991331),c=a(938984),u=a(263705),_=a(239875),T=a(528116),m=a(470070),x=a(504155),p=a(201459),A=a(333462),S=a(222102),R=a(17211),h=a(25855),C=a(416233),D=a(610407),O=a(744220);const M=(t,e,a)=>(0,S.Mz)((0,O.U)(t,a),t=>{const a=(0,R.Au)(e);return t.map(({time:t,duration:e,mem:n,cpu:o,...r})=>({cpu:o,mem:n,time:t,duration:e,rx_crypts_6e:r[a[h.L.RX_CRYPTS_6E]]||0,rx_crypts_na:r[a[h.L.RX_CRYPTS_NA]]||0,rx_crypts_ng:r[a[h.L.RX_CRYPTS_NG]]||0,rx_frags_6e:r[a[h.L.RX_FRAGS_6E]]||0,rx_frags_na:r[a[h.L.RX_FRAGS_NA]]||0,rx_frags_ng:r[a[h.L.RX_FRAGS_NG]]||0,rx_errors_6e:r[a[h.L.RX_ERRORS_6E]]||0,rx_errors_na:r[a[h.L.RX_ERRORS_NA]]||0,rx_errors_ng:r[a[h.L.RX_ERRORS_NG]]||0,...(0,D.Px)(C.l_,!1,r)}))});var L=a(186446),g=a(813776),E=a(662986),f=a(750562);const X=({statsKey:t})=>{const{motifPalette:e}=(0,u.u)();switch(t){case x.Ss.RX_BYTES:case x.Ss.TX_BYTES:case x.Ss.TX_RETRIES:return(0,n.jsx)(f.Wx,{color:e[p.tD[t]]});default:return(0,n.jsx)(f.Zo,{color:e[p.tD[t]]})}},I=({timestamp:t,values:e,interval:a})=>{const{cpu:o,mem:r}=e||{};return(0,n.jsxs)(i.A,{width:"100%",flexDirection:"column",gap:l.YC,children:[(0,n.jsx)(g.XF,{timestamp:t,interval:a}),(0,n.jsx)(g.m0,{translationId:"COMMON_CPU",value:(0,E.A)(Math.round(o)),pip:(0,n.jsx)(X,{statsKey:x.Ss.CPU})}),(0,n.jsx)(g.m0,{translationId:"COMMON_MEMORY",value:(0,E.A)(Math.round(r)),pip:(0,n.jsx)(X,{statsKey:x.Ss.MEM})})]})};var P=a(90745),v=a(333542),j=a(721327);const N=({mac:t,radioNames:e,dataRange:a})=>{const r=(0,s.d4)((0,o.useMemo)(()=>M(t,e,a),[t,e,a])),S=(0,o.useRef)({minTop:0,maxTop:0}),{motifPalette:R}=(0,u.u)(),h=(0,o.useRef)(null),C=(0,o.useRef)(null),{width:D=0,height:O=0}=(0,_.A)({ref:C}),E=(0,o.useMemo)(()=>(0,T.$V)(a.startDate,a.endDate,!0,!0),[a.endDate,a.startDate]),{start:f,end:X}=(0,o.useMemo)(()=>(0,A.Qi)(a.startDate,a.endDate,E.grain),[a.endDate,E.grain,a.startDate]),N=(0,P.A)(f,X,D,!1,a.preset),{cpuData:b,memData:w}=(0,o.useMemo)(()=>r.reduce((t,{time:e,mem:a,cpu:n})=>{const o={[x.Ss.CPU]:n,[x.Ss.MEM]:a};return t.cpuData.push({x:e,y:n,custom:o}),t.memData.push({x:e,y:a,custom:o}),t},{cpuData:[],memData:[]}),[r]),F=(0,o.useCallback)(({top:t,left:e,x:a,hidden:o,custom:r},s)=>{const i=(0,L.xn)(r||{}),l=(0,L.Jn)(i),d=(0,L.zR)(i);s!==l&&s!==d||(S.current={maxTop:s===l?t||0:S.current.maxTop||0,minTop:s===d?t||0:S.current.minTop||0});const c=(0,L.lZ)(S.current.maxTop,S.current.minTop,t);return(0,n.jsx)(g.JM,{top:t,left:e,hidden:o,chartWidth:D,chartHeight:O,timestamp:a,tooltipTopPositionCompensator:c,values:r,innerColor:R[p.tD[s]],tooltipRenderCondition:s===l,interval:E.grain,TooltipComponent:I})},[D,O,R,E.grain]),U=(0,o.useCallback)(t=>e=>F(e,t),[F]),y=(0,o.useCallback)((t,e,a)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{data:b,maxY:a,mouseData:e,getCoordinates:t,lineColor:R[p.tD[x.Ss.CPU]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:h?h.current:void 0,renderTooltip:U(x.Ss.CPU)}),(0,n.jsx)(d.A,{data:w,maxY:a,mouseData:e,getCoordinates:t,lineColor:R[p.tD[x.Ss.MEM]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:h?h.current:void 0,renderTooltip:U(x.Ss.MEM)})]}),[b,w,U,R]);return(0,n.jsxs)(i.A,{gap:l.kc,flexDirection:"column",children:[(0,n.jsx)(i.A,{alignItems:"center",gap:l.xO,children:(0,n.jsx)(c.A,{weight:"bold",children:(0,n.jsx)(m.sA,{id:"COMMON_SYSTEM_UTILIZATION"})})}),(0,n.jsx)(i.A,{flexDirection:"row",justifyContent:"space-between",gap:l.kc,children:(0,n.jsx)(j.Ay,{height:v.Lt,xAxis:N,tooltipContainerRef:h,chartRef:C,children:y})})]})};var b=a(927027),w=a(820633),F=a(159253);const U=({timestamp:t,values:e,interval:a})=>{const{tx_bytes:r,rx_bytes:d,tx_packets:c,rx_packets:u}=e||{},_=(0,s.d4)(w.zi),T=(0,o.useMemo)(()=>Intl.NumberFormat(_,{notation:"compact"}),[_]);return(0,n.jsxs)(i.A,{width:"100%",flexDirection:"column",gap:l.YC,children:[(0,n.jsx)(g.XF,{timestamp:t,interval:a}),(0,n.jsx)(g.m0,{translationId:"COMMON_TX_PACKETS",value:T.format(c),pip:(0,n.jsx)(X,{statsKey:x.Ss.TX_PACKETS})}),(0,n.jsx)(g.m0,{translationId:"COMMON_RX_PACKETS",value:T.format(u),pip:(0,n.jsx)(X,{statsKey:x.Ss.RX_PACKETS})}),(0,n.jsx)(g.m0,{translationId:"COMMON_UPLOAD_TRAFFIC",value:(0,F.CB)(r).toString(),pip:(0,n.jsx)(X,{statsKey:x.Ss.TX_BYTES})}),(0,n.jsx)(g.m0,{translationId:"COMMON_DOWNLOAD_TRAFFIC",value:(0,F.CB)(d).toString(),pip:(0,n.jsx)(X,{statsKey:x.Ss.RX_BYTES})})]})},y=({mac:t,radio:e,radioNames:a,dataRange:r})=>{const S=(0,s.d4)((0,o.useMemo)(()=>M(t,a,r),[t,a,r])),R=(0,s.d4)(w.zi),h=(0,o.useRef)({minTop:0,maxTop:0}),{motifPalette:C}=(0,u.u)(),D=(0,o.useRef)(null),O=(0,o.useRef)(null),{width:E=0,height:f=0}=(0,_.A)({ref:O}),X=(0,o.useMemo)(()=>(0,T.$V)(r.startDate,r.endDate,!0,!0),[r.endDate,r.startDate]),{start:I,end:N}=(0,o.useMemo)(()=>(0,A.Qi)(r.startDate,r.endDate,X.grain),[r.endDate,X.grain,r.startDate]),y=(0,P.A)(I,N,E,!1,r.preset),{uploadBytesData:B,downloadBytesData:k,downloadPacketsData:$,uploadPacketsData:Y,maxValue:K,maxValue2:V}=(0,o.useMemo)(()=>S.reduce((t,{time:a,mem:n,cpu:o,duration:r,...s})=>{const i=(0,A.Lr)(s,e),l={[x.Ss.RX_PACKETS]:i[x.Ss.RX_PACKETS],[x.Ss.TX_PACKETS]:i[x.Ss.TX_PACKETS],[x.Ss.RX_BYTES]:i[x.Ss.RX_BYTES],[x.Ss.TX_BYTES]:i[x.Ss.TX_BYTES]};return t.maxValue=Math.max(t.maxValue,i[x.Ss.RX_PACKETS],i[x.Ss.TX_PACKETS]),t.maxValue2=Math.max(t.maxValue2,i[x.Ss.RX_BYTES],i[x.Ss.TX_BYTES]),t.downloadBytesData.push({x:a,y:i[x.Ss.RX_BYTES],custom:l}),t.uploadBytesData.push({x:a,y:i[x.Ss.TX_BYTES],custom:l}),t.downloadPacketsData.push({x:a,y:i[x.Ss.RX_PACKETS],custom:l}),t.uploadPacketsData.push({x:a,y:i[x.Ss.TX_PACKETS],custom:l}),t},{downloadBytesData:[],uploadBytesData:[],downloadPacketsData:[],uploadPacketsData:[],maxValue:p.Rg,maxValue2:p.Rg}),[S,e]),W=(0,F.CB)(V||1),H=(0,o.useCallback)(({top:t,left:e,x:a,hidden:o,custom:r},s)=>{const i=Math.ceil(K+.1*K),l=Math.ceil(W.bytes+.1*W.bytes),d=(0,L.xn)({[x.Ss.RX_BYTES]:(r?.rx_bytes||0)/l,[x.Ss.TX_BYTES]:(r?.tx_bytes||0)/l,[x.Ss.RX_PACKETS]:(r?.rx_packets||0)/i,[x.Ss.TX_PACKETS]:(r?.tx_packets||0)/i}),c=(0,L.Jn)(d),u=(0,L.zR)(d),_=f-v.w1,T=_-v.AL;h.current={maxTop:_-Math.round(d[c]*T),minTop:_-Math.round(d[u]*T)};const m=(0,L.lZ)(h.current.maxTop,h.current.minTop,t)||0;return(0,n.jsx)(g.JM,{top:t,left:e,hidden:o,chartWidth:E,chartHeight:f,timestamp:a,tooltipTopPositionCompensator:m,lineStart:h.current.maxTop,lineEnd:h.current.minTop,values:r,innerColor:C[p.tD[s]],tooltipRenderCondition:s===c,interval:X.grain,TooltipComponent:U})},[K,W.bytes,f,E,C,X.grain]),G=(0,o.useCallback)(t=>e=>H(e,t),[H]),z=(0,o.useMemo)(()=>(0,b.Y)(Math.ceil(K+.1*K),3).map(({value:t},e)=>{const a=Intl.NumberFormat(R,{notation:"compact"}).formatToParts(+t);return!e&&a.some(t=>"compact"===t.type)?{value:t,label:a.filter(t=>"compact"===t.type).map(t=>t.value).join("")}:{value:t,label:Intl.NumberFormat(R,{notation:"compact"}).formatToParts(+t).filter(t=>"compact"!==t.type).map(t=>t.value).join("")}}),[R,K]),J=(0,o.useMemo)(()=>{const t=(0,F.CB)(W.bytes,W.power).value;return(0,b.Y)(Math.ceil(W.bytes+.1*W.bytes),3).map(({value:e},a)=>{if(!a)return{value:e,label:W.unit};const n=(0,F.CB)(+e,W.power).value;let o;return o=t<10?n.toFixed(1):Math.round(n).toString(),{value:e,label:`${o}`}})},[W]),Q=(0,o.useCallback)((t,e,a)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{data:k,maxY:a,mouseData:e,getCoordinates:t,lineColor:C[p.tD[x.Ss.RX_BYTES]],variant:"gradientArea",interpolation:"linear",dashed:!0,allowCustomDots:!0,tooltipPortal:D?D.current:void 0,renderTooltip:G(x.Ss.RX_BYTES)}),(0,n.jsx)(d.A,{data:B,maxY:a,mouseData:e,getCoordinates:t,lineColor:C[p.tD[x.Ss.TX_BYTES]],variant:"gradientArea",interpolation:"linear",dashed:!0,allowCustomDots:!0,tooltipPortal:D?D.current:void 0,renderTooltip:G(x.Ss.TX_BYTES)}),(0,n.jsx)(d.A,{data:$,maxY:a,forY2Axis:!0,mouseData:e,getCoordinates:t,lineColor:C[p.tD[x.Ss.RX_PACKETS]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:D?D.current:void 0,renderTooltip:G(x.Ss.RX_PACKETS)}),(0,n.jsx)(d.A,{data:Y,maxY:a,forY2Axis:!0,mouseData:e,getCoordinates:t,lineColor:C[p.tD[x.Ss.TX_PACKETS]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:D?D.current:void 0,renderTooltip:G(x.Ss.TX_PACKETS)})]}),[k,$,C,G,B,Y]);return(0,n.jsxs)(i.A,{gap:l.kc,flexDirection:"column",children:[(0,n.jsx)(i.A,{alignItems:"center",gap:l.xO,children:(0,n.jsx)(c.A,{weight:"bold",children:(0,n.jsx)(m.sA,{id:"COMMON_CLIENT_ACTIVITY"})})}),(0,n.jsxs)(i.A,{flexDirection:"row",justifyContent:"space-between",gap:l.kc,children:[(0,n.jsx)(j.Ay,{height:v.Lt,xAxis:y,yAxis:J,y2Axis:z,tooltipContainerRef:D,chartRef:O,children:Q}),(0,n.jsx)(j.pd,{axisItems:z,paddingBottom:j.N1,alignItems:"flex-start"})]})]})},B=({timestamp:t,values:e,interval:a})=>{const{rx_crypts:r,rx_dropped:d,rx_errors:c,rx_frags:u,tx_dropped:_,tx_errors:T,wifi_tx_dropped:m,tx_retries:p}=e||{},A=(0,s.d4)(w.zi),S=(0,o.useMemo)(()=>Intl.NumberFormat(A,{notation:"compact"}),[A]);return(0,n.jsxs)(i.A,{width:"100%",flexDirection:"column",gap:l.YC,children:[(0,n.jsx)(g.XF,{timestamp:t,interval:a}),(0,n.jsx)(g.m0,{translationId:"COMMON_TX_RETRIES",value:(0,E.A)(Math.round(p)),pip:(0,n.jsx)(X,{statsKey:x.Ss.TX_RETRIES})}),(0,n.jsx)(g.m0,{translationId:"COMMON_WIFI_TX_DROPPED",value:(0,E.A)(m),pip:(0,n.jsx)(X,{statsKey:x.Ss.WIFI_TX_DROPPED})}),(0,n.jsx)(g.m0,{translationId:"COMMON_TX_DROPS",value:S.format(_),pip:(0,n.jsx)(X,{statsKey:x.Ss.TX_DROPPED})}),(0,n.jsx)(g.m0,{translationId:"COMMON_TX_ERRORS",value:S.format(T),pip:(0,n.jsx)(X,{statsKey:x.Ss.TX_ERRORS})}),(0,n.jsx)(g.m0,{translationId:"COMMON_RX_DROPS",value:S.format(d),pip:(0,n.jsx)(X,{statsKey:x.Ss.RX_DROPPED})}),(0,n.jsx)(g.m0,{translationId:"COMMON_RX_ERRORS",value:S.format(c),pip:(0,n.jsx)(X,{statsKey:x.Ss.RX_ERRORS})}),(0,n.jsx)(g.m0,{translationId:"COMMON_RX_FRAGS",value:S.format(u),pip:(0,n.jsx)(X,{statsKey:x.Ss.RX_FRAGS})}),(0,n.jsx)(g.m0,{translationId:"COMMON_RX_CRYPTS",value:S.format(r),pip:(0,n.jsx)(X,{statsKey:x.Ss.RX_CRYPTS})})]})},k=({mac:t,radio:e,radioNames:a,dataRange:r})=>{const S=(0,s.d4)((0,o.useMemo)(()=>M(t,a,r),[t,a,r])),R=(0,o.useRef)({minTop:0,maxTop:0}),{motifPalette:h}=(0,u.u)(),C=(0,o.useRef)(null),D=(0,o.useRef)(null),{width:O=0,height:E=0}=(0,_.A)({ref:D}),f=(0,o.useMemo)(()=>(0,T.$V)(r.startDate,r.endDate,!0,!0),[r.endDate,r.startDate]),{start:X,end:I}=(0,o.useMemo)(()=>(0,A.Qi)(r.startDate,r.endDate,f.grain),[r.endDate,f.grain,r.startDate]),N=(0,s.d4)(w.zi),F=(0,P.A)(X,I,O,!1,r?.preset||r.preset),{rxCryptsData:U,rxDroppedData:y,rxErrorsData:k,rxFragsData:$,txDroppedData:Y,txErrorsData:K,wifiTxDroppedData:V,maxValue:W,txRetriesData:H}=(0,o.useMemo)(()=>({...S.reduce((t,{time:a,mem:n,cpu:o,duration:r,...s})=>{const i=(0,A.m1)(s,e),l=(0,L.lD)(i[x.Ss.TX_RETRIES],i[x.Ss.WIFI_TX_ATTEMPTS],i[x.Ss.WIFI_TX_DROPPED]),d=(0,L.wd)(i[x.Ss.WIFI_TX_ATTEMPTS],i[x.Ss.WIFI_TX_DROPPED]),c={[x.Ss.TX_RETRIES]:l,[x.Ss.TX_DROPPED]:i[x.Ss.TX_DROPPED]||0,[x.Ss.TX_ERRORS]:i[x.Ss.TX_ERRORS]||0,[x.Ss.RX_DROPPED]:i[x.Ss.RX_DROPPED]||0,[x.Ss.RX_ERRORS]:i[x.Ss.RX_ERRORS]||0,[x.Ss.RX_FRAGS]:i[x.Ss.RX_FRAGS]||0,[x.Ss.RX_CRYPTS]:i[x.Ss.RX_CRYPTS]||0,[x.Ss.WIFI_TX_DROPPED]:d||0};return t.maxValue=Math.max(t.maxValue,i[x.Ss.RX_CRYPTS]||0,i[x.Ss.RX_DROPPED]||0,i[x.Ss.RX_ERRORS]||0,i[x.Ss.RX_FRAGS]||0,i[x.Ss.TX_DROPPED]||0,i[x.Ss.TX_ERRORS]||0),t.txRetriesData.push({x:a,y:l,custom:c}),t.rxCryptsData.push({x:a,y:i[x.Ss.RX_CRYPTS]||0,custom:c}),t.rxDroppedData.push({x:a,y:i[x.Ss.RX_DROPPED]||0,custom:c}),t.rxErrorsData.push({x:a,y:i[x.Ss.RX_ERRORS]||0,custom:c}),t.rxFragsData.push({x:a,y:i[x.Ss.RX_FRAGS]||0,custom:c}),t.txDroppedData.push({x:a,y:i[x.Ss.TX_DROPPED]||0,custom:c}),t.txErrorsData.push({x:a,y:i[x.Ss.TX_ERRORS]||0,custom:c}),t.wifiTxDroppedData.push({x:a,y:d,custom:c}),t},{rxCryptsData:[],rxDroppedData:[],rxErrorsData:[],rxFragsData:[],txDroppedData:[],txErrorsData:[],wifiTxDroppedData:[],txRetriesData:[],maxValue:10})}),[S,e]),G=(0,o.useMemo)(()=>(0,b.Y)(Math.ceil(W+.1*W),3).map(({value:t},e)=>{const a=Intl.NumberFormat(N,{notation:"compact"}).formatToParts(+t);return e||"compact"!==a.at(-1)?.type?{value:t,label:a.filter(t=>"compact"!==t.type).map(t=>t.value).join("")}:{value:t,label:a.at(-1).value}}),[N,W]),z=(0,o.useCallback)(({top:t,left:e,x:a,hidden:o,custom:r},s)=>{const i=Number(G[0].value),l=(0,L.xn)(r||{});Object.keys(l).forEach(t=>{[x.Ss.TX_RETRIES,x.Ss.WIFI_TX_DROPPED].includes(t)?l[t]/=100:l[t]/=i});const d=(0,L.Jn)(l),c=(0,L.zR)(l),u=E-v.w1,_=u-v.AL;R.current={maxTop:u-Math.round(l[d]*_),minTop:u-Math.round(l[c]*_)};const T=(0,L.lZ)(R.current.maxTop,R.current.minTop,t);return(0,n.jsx)(g.JM,{top:t,left:e,hidden:o,chartWidth:O,chartHeight:E,timestamp:a,tooltipTopPositionCompensator:T,lineStart:R.current.maxTop,lineEnd:R.current.minTop,values:r,innerColor:h[p.tD[s]],tooltipRenderCondition:s===d,interval:f.grain,TooltipComponent:B})},[G,E,O,h,f.grain]),J=(0,o.useCallback)(t=>e=>z(e,t),[z]),Q=(0,o.useCallback)((t,e,a)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{data:H,maxY:a,mouseData:e,getCoordinates:t,lineColor:h[p.tD[x.Ss.TX_RETRIES]],variant:"line",dashed:!0,interpolation:"linear",allowCustomDots:!0,tooltipPortal:C?C.current:void 0,renderTooltip:J(x.Ss.TX_RETRIES)}),(0,n.jsx)(d.A,{data:V,maxY:a,mouseData:e,getCoordinates:t,lineColor:h[p.tD[x.Ss.WIFI_TX_DROPPED]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:C?C.current:void 0,renderTooltip:J(x.Ss.WIFI_TX_DROPPED)}),(0,n.jsx)(d.A,{data:U,forY2Axis:!0,maxY:a,mouseData:e,getCoordinates:t,lineColor:h[p.tD[x.Ss.RX_CRYPTS]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:C?C.current:void 0,renderTooltip:J(x.Ss.RX_CRYPTS)}),(0,n.jsx)(d.A,{data:y,forY2Axis:!0,maxY:a,mouseData:e,getCoordinates:t,lineColor:h[p.tD[x.Ss.RX_DROPPED]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:C?C.current:void 0,renderTooltip:J(x.Ss.RX_DROPPED)}),(0,n.jsx)(d.A,{data:k,forY2Axis:!0,maxY:a,mouseData:e,getCoordinates:t,lineColor:h[p.tD[x.Ss.RX_ERRORS]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:C?C.current:void 0,renderTooltip:J(x.Ss.RX_ERRORS)}),(0,n.jsx)(d.A,{data:$,forY2Axis:!0,maxY:a,mouseData:e,getCoordinates:t,lineColor:h[p.tD[x.Ss.RX_FRAGS]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:C?C.current:void 0,renderTooltip:J(x.Ss.RX_FRAGS)}),(0,n.jsx)(d.A,{data:K,forY2Axis:!0,maxY:a,mouseData:e,getCoordinates:t,lineColor:h[p.tD[x.Ss.TX_ERRORS]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:C?C.current:void 0,renderTooltip:J(x.Ss.TX_ERRORS)}),(0,n.jsx)(d.A,{data:Y,forY2Axis:!0,maxY:a,mouseData:e,getCoordinates:t,lineColor:h[p.tD[x.Ss.TX_DROPPED]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:C?C.current:void 0,renderTooltip:J(x.Ss.TX_DROPPED)})]}),[J,U,y,k,$,h,Y,K,H,V]);return(0,n.jsxs)(i.A,{gap:l.kc,flexDirection:"column",children:[(0,n.jsx)(i.A,{alignItems:"center",gap:l.xO,children:(0,n.jsx)(c.A,{weight:"bold",children:(0,n.jsx)(m.sA,{id:"COMMON_NETWORK_PERFORMANCE"})})}),(0,n.jsxs)(i.A,{flexDirection:"row",justifyContent:"space-between",gap:l.kc,children:[(0,n.jsx)(j.Ay,{height:v.Lt,xAxis:F,y2Axis:G,tooltipContainerRef:C,chartRef:D,children:Q}),(0,n.jsx)(j.pd,{axisItems:G,paddingBottom:j.N1,alignItems:"flex-start"})]})]})};var $=a(960940),Y=a(920679),K=a(419284),V=a(565527);const W={[V.S.DARK]:(0,K.J2)("#9B9DA7",.25),[V.S.LIGHT]:(0,K.J2)("#B6B9C4",.25)};var H=a(588769),G=a(682e3),z=a(811686);const J=({timestamp:t,values:e,interval:a})=>{const{num_sta:o,cu_total:r}=e||{};return(0,n.jsxs)(i.A,{width:"100%",flexDirection:"column",gap:l.YC,children:[(0,n.jsx)(g.XF,{timestamp:t,interval:a}),(0,n.jsx)(g.m0,{translationId:"COMMON_AIRTIME",value:(0,E.A)(Math.round(r)),pip:(0,n.jsx)(X,{statsKey:x.Ss.CU_TOTAL})}),(0,n.jsx)(g.m0,{translationId:"COMMON_CLIENTS",value:o,pip:(0,n.jsx)(X,{statsKey:x.Ss.NUM_STA})})]})},Q=({mac:t,radio:e,radioNames:a,dataRange:r})=>{const S=(0,s.d4)((0,o.useMemo)(()=>M(t,a,r),[t,a,r])),R=(0,o.useRef)(null),{themeName:h,motifPalette:C}=(0,u.u)(),D=(0,o.useRef)({minTop:0,maxTop:0}),O=(0,o.useRef)(null),E=(0,o.useRef)(null),{width:f=0,height:X=0}=(0,_.A)({ref:E}),I=(0,o.useMemo)(()=>(0,T.$V)(r.startDate,r.endDate,!0,!0),[r.endDate,r.startDate]),{start:N,end:U}=(0,o.useMemo)(()=>(0,A.Qi)(r.startDate,r.endDate,I.grain),[r.endDate,I.grain,r.startDate]),y=(0,s.d4)(w.zi),B=(0,o.useMemo)(()=>Intl.NumberFormat(y,{notation:"compact"}),[y]),k=(0,P.A)(N,U,f,!1,r.preset),K=(0,o.useMemo)(()=>f>H.A[G.L.ML].FROM?4:1,[f]),V=(0,o.useMemo)(()=>S.reduce((t,{num_sta_6e:e,num_sta_na:a,num_sta_ng:n})=>Math.max(t,e+a+n),0),[S]),Q=V<z.XO?z.ug:100*Math.ceil((V+1)/100),{clientCountData:Z,clientStackedCountData:q,cuTotalData:tt}=(0,o.useMemo)(()=>{const t=Math.min(S.length,z.ON*K),a=(U-N)/t,n=V>z.U0,{maxValue:o,clientCountData:r,cuTotalData:s}=S.reduce((t,{time:a,mem:n,cpu:o,duration:r,...s},i)=>{const l=(0,A.XT)(s,e),d=l[x.Ss.CU_TOTAL]>100?(t.cuTotalData.at(-1)||{}).y:l[x.Ss.CU_TOTAL],c={[x.Ss.CU_TOTAL]:l[x.Ss.CU_TOTAL],[x.Ss.NUM_STA]:l[x.Ss.NUM_STA]};return t.maxValue=Math.max(t.maxValue),t.cuTotalData.push({x:a,y:d,custom:c}),i!==S.length-1&&t.clientCountData.push({x:a,y:l[x.Ss.NUM_STA],num_sta:l[x.Ss.NUM_STA]}),t},{clientCountData:[],maxValue:p.Rg,cuTotalData:[]}),i=(0,F.CB)(o||1),l=i.bytes/Q,d=n?[]:(0,F.OF)(r,N,a,l,t);return{maxByteValue:i,clientCountData:r.map(t=>({...t,y:t.y*l})),clientStackedCountData:d,cuTotalData:s}},[S,U,V,Q,K,e,N]),et=(0,o.useCallback)(({top:t,left:e,x:a,hidden:o,custom:r},s)=>{const i=(0,L.xn)({[x.Ss.CU_TOTAL]:r?.cu_total||0}),l=(0,L.Jn)(i),d=(0,L.zR)(i);s!==l&&s!==d||(D.current={maxTop:s===l?t||0:D.current.maxTop||0,minTop:s===d?t||0:D.current.minTop||0});const c=(0,L.lZ)(D.current.maxTop,D.current.minTop,t);return(0,n.jsx)(g.JM,{top:t,left:e,hidden:o,chartWidth:f,chartHeight:X,timestamp:a,tooltipTopPositionCompensator:c,values:r,innerColor:C[p.tD[s]],tooltipRenderCondition:s===x.Ss.CU_TOTAL,interval:I.grain,TooltipComponent:J})},[f,X,C,I.grain]),at=(0,o.useCallback)(t=>e=>et(e,t),[et]),nt=(0,o.useMemo)(()=>(0,b.Y)(Q,3).map(({value:t},e)=>({value:t,label:0===e?(0,n.jsx)("g",{transform:"translate(0 -10)",children:(0,n.jsx)(Y.A,{})}):(t||0===t)&&B.format(+t)||null})),[B,Q]),ot=(0,o.useCallback)((t,e,a,o,r)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)($.A,{data:q.length?q:Z,getCoordinates:t,color:W[h],hideStroke:!0,disableHoverHighlight:!0,width:r.width,height:r.height,stackedBarSpacing:1,variant:q.length?"stacked":"grouped",barFullWidth:!0,mouseData:e,tooltipPortal:R.current||void 0},q.length+Q),(0,n.jsx)(d.A,{data:tt,maxY:a,mouseData:e,getCoordinates:t,lineColor:C[p.tD[x.Ss.CU_TOTAL]],variant:"line",interpolation:"linear",allowCustomDots:!0,tooltipPortal:O?O.current:void 0,renderTooltip:at(x.Ss.CU_TOTAL)})]}),[Z,q,tt,Q,at,C,h]);return(0,n.jsxs)(i.A,{gap:l.kc,flexDirection:"column",children:[(0,n.jsx)(i.A,{alignItems:"center",gap:l.xO,children:(0,n.jsx)(c.A,{weight:"bold",children:(0,n.jsx)(m.sA,{id:"COMMON_CLIENT_HISTORY"})})}),(0,n.jsxs)(i.A,{flexDirection:"row",justifyContent:"space-between",gap:l.kc,children:[(0,n.jsx)(j.Ay,{height:v.Lt,xAxis:k,tooltipContainerRef:O,chartRef:E,children:ot}),(0,n.jsx)(j.pd,{axisItems:nt,paddingBottom:j.N1,alignItems:"flex-start"})]}),(0,n.jsx)("div",{ref:R,style:{position:"absolute"}})]})};var Z,q=a(927316),tt=a(724081),et=a(244081),at=a(814557),nt=a(89498),ot=a(142667);!function(t){t[t.TOTAL_MULTICAST=x.Ss.TOTAL_MULTICAST]="TOTAL_MULTICAST",t[t.TOTAL_TX_MULTICAST=x.Ss.TOTAL_TX_MULTICAST]="TOTAL_TX_MULTICAST",t[t.TX_PACKETS=x.Ss.TX_PACKETS]="TX_PACKETS",t[t.RX_PACKETS=x.Ss.RX_PACKETS]="RX_PACKETS",t[t.CU_SELF_RX=x.Ss.CU_SELF_RX]="CU_SELF_RX",t[t.CU_SELF_TX=x.Ss.CU_SELF_TX]="CU_SELF_TX",t[t.CU_INTERF=x.Ss.CU_INTERF]="CU_INTERF"}(Z||(Z={}));var rt=a(773954);const st="purple-06";var it=a(950486),lt=a(735239);const dt=({timestamp:t,values:{[Z.TOTAL_MULTICAST]:e=0,[Z.TOTAL_TX_MULTICAST]:a=0,[Z.TX_PACKETS]:o=0,[Z.CU_INTERF]:r=0},interval:s})=>{const{themeName:d}=(0,u.u)(),{formatNumber:_}=(0,m.tz)(),T=(0,it.T)(e,r);return(0,n.jsxs)(i.A,{width:"100%",flexDirection:"column",gap:l.kc,children:[(0,n.jsx)(g.XF,{timestamp:t,interval:s}),(0,n.jsx)(g.m0,{translationId:"DEVICE_TOTAL_TX_PKTS",value:_(o,{notation:"compact"}),valueWeight:"bold"}),(0,n.jsx)(g.m0,{translationId:"COMMON_MULTICAST",pip:(0,n.jsx)(f.Ay,{color:at.Ay[`desktop-color-${st}-${d}`]}),value:(0,n.jsxs)("span",{children:[_(a,{notation:"compact"})," (",(0,E.A)(Math.round(e)),")"]})}),T===lt.t.WARNING?(0,n.jsx)(c.A,{size:"small",color:"notice",children:(0,n.jsx)(m.sA,{id:"COMMON_HIGH_MULTICAST_DESCRIPTION"})}):null,T===lt.t.HEALTHY?(0,n.jsx)(c.A,{size:"small",color:"text-2",children:(0,n.jsx)(m.sA,{id:"COMMON_HEALTHY_MULTICAST_DESCRIPTION"})}):null]})},ct=({dataRange:t,radio:e,mac:a=x.TE.ALL,maxY:r=p.Rg,preset:R=x.sw.ONE_DAY})=>{const{themeName:h}=(0,u.u)(),D=(0,o.useRef)(null),O=(0,o.useRef)(null),{width:M=0,height:E=0}=(0,_.A)({ref:O}),{grain:f}=(0,o.useMemo)(()=>(0,T.$V)(t.startDate,t.endDate,!0,!0),[t.endDate,t.startDate]),{start:X,end:I}=(0,o.useMemo)(()=>(0,A.Qi)(t.startDate,t.endDate,f),[t.endDate,f,t.startDate]),N=(0,P.A)(X,I,M,!1,R),{availableChartData:b,...w}=(0,s.d4)(((t,e,a)=>(0,S.Mz)((0,rt.t)(t,e),t=>{const n=(0,C.Io)(e.startDate,e.endDate),o={};return{...t.reduce((t,{time:e,duration:r,...s})=>{const i=((t,e)=>{switch(e){case x.Bo.NA:return{[Z.TOTAL_MULTICAST]:t.total_mcast_bcast_na,[Z.TOTAL_TX_MULTICAST]:t.total_tx_mcast_bcast_na,[Z.TX_PACKETS]:t.tx_packets_na,[Z.RX_PACKETS]:t.rx_packets_na,[Z.CU_SELF_RX]:t.cu_self_rx_na,[Z.CU_SELF_TX]:t.cu_self_tx_na,[Z.CU_INTERF]:t.cu_interf_na};case x.Bo.NG:return{[Z.TOTAL_MULTICAST]:t.total_mcast_bcast_ng,[Z.TOTAL_TX_MULTICAST]:t.total_tx_mcast_bcast_ng,[Z.TX_PACKETS]:t.tx_packets_ng,[Z.RX_PACKETS]:t.rx_packets_ng,[Z.CU_SELF_RX]:t.cu_self_rx_ng,[Z.CU_SELF_TX]:t.cu_self_tx_ng,[Z.CU_INTERF]:t.cu_interf_ng};case x.Bo.SIXE:return{[Z.TOTAL_MULTICAST]:t.total_mcast_bcast_6e,[Z.TOTAL_TX_MULTICAST]:t.total_tx_mcast_bcast_6e,[Z.TX_PACKETS]:t.tx_packets_6e,[Z.RX_PACKETS]:t.rx_packets_6e,[Z.CU_SELF_RX]:t.cu_self_rx_6e,[Z.CU_SELF_TX]:t.cu_self_tx_6e,[Z.CU_INTERF]:t.cu_interf_6e};case x.Bo.ALL:return{[Z.TOTAL_MULTICAST]:t.total_mcast_bcast_na+t.total_mcast_bcast_ng+t.total_mcast_bcast_6e,[Z.TOTAL_TX_MULTICAST]:t.total_tx_mcast_bcast_na+t.total_tx_mcast_bcast_ng+t.total_tx_mcast_bcast_6e,[Z.TX_PACKETS]:t.tx_packets_na+t.tx_packets_ng+t.tx_packets_6e,[Z.RX_PACKETS]:t.rx_packets_na+t.rx_packets_ng+t.rx_packets_6e,[Z.CU_SELF_RX]:t.cu_self_rx_na+t.cu_self_rx_ng+t.cu_self_rx_6e,[Z.CU_SELF_TX]:t.cu_self_tx_na+t.cu_self_tx_ng+t.cu_self_tx_6e,[Z.CU_INTERF]:t.cu_interf_na+t.cu_interf_ng+t.cu_interf_6e};default:return{[Z.TOTAL_MULTICAST]:0,[Z.TOTAL_TX_MULTICAST]:0,[Z.TX_PACKETS]:0,[Z.RX_PACKETS]:0,[Z.CU_SELF_RX]:0,[Z.CU_SELF_TX]:0,[Z.CU_INTERF]:0}}})(s,a),l=i[Z.TX_PACKETS],d=i[x.Ss.CU_INTERF],c=(0,L.Wo)(i[Z.TOTAL_MULTICAST],i[Z.TX_PACKETS],i[Z.RX_PACKETS]),u=i[x.Ss.CU_SELF_RX],_=i[x.Ss.CU_SELF_TX],m=i[x.Ss.TOTAL_TX_MULTICAST];return!o[Z.TOTAL_MULTICAST]&&i[Z.TOTAL_MULTICAST]&&(o[Z.TOTAL_MULTICAST]=!0),t[Z.TOTAL_MULTICAST].push({x:e,y:c,custom:{[Z.TOTAL_MULTICAST]:c,[Z.TOTAL_TX_MULTICAST]:m,[Z.TX_PACKETS]:l,[x.Ss.DURATION]:T.UE[n]?.grain||r,[Z.CU_SELF_RX]:u,[Z.CU_SELF_TX]:_,[Z.CU_INTERF]:d}}),t},{[Z.TOTAL_MULTICAST]:[]}),availableChartData:o}}))(a,t,e)),{...F}=(0,o.useMemo)(()=>{const t=Math.min(w[Z.TOTAL_MULTICAST]?.length||0,64),e=(I-X)/t;return{[Z.TOTAL_MULTICAST]:(0,nt.Hf)(w[Z.TOTAL_MULTICAST],f),interval:e}},[w,I,X,f]),U=(0,o.useCallback)(({top:t,left:e,x:a,hidden:o,custom:r={}})=>(0,n.jsx)(ot.A,{width:g.E,topA:t,leftA:e,topB:t,chartWidth:M,chartHeight:E,hidden:o,description:(0,n.jsx)(dt,{timestamp:a,values:r,interval:f}),innerColor:at.Ay[`desktop-color-${st}-${h}`],tooltipRenderCondition:!0}),[M,E,f,h]),y=(0,o.useCallback)((t,e)=>(0,n.jsx)(n.Fragment,{children:b[Z.TOTAL_MULTICAST]?(0,n.jsx)(d.A,{data:F[Z.TOTAL_MULTICAST],maxY:r,mouseData:e,getCoordinates:t,lineColor:at.Ay[`desktop-color-${st}-${h}`],variant:"line",interpolation:"linear",hideMissingDataLine:!0,tooltipPortal:D?D.current:void 0,renderTooltip:U}):null}),[h,U,F]);return b[Z.TOTAL_MULTICAST]?(0,n.jsxs)(i.A,{gap:l.kc,flexDirection:"column",children:[(0,n.jsx)(i.A,{alignItems:"center",gap:l.xO,children:(0,n.jsx)(c.A,{weight:"bold",children:(0,n.jsx)(m.sA,{id:"COMMON_MULTICAST"})})}),(0,n.jsx)(i.A,{flexDirection:"row",justifyContent:"space-between",gap:l.kc,children:(0,n.jsx)(j.Ay,{height:v.Lt-j.N1,maxY:r,xAxis:N,tooltipContainerRef:D,chartRef:O,children:y})})]}):null};var ut=a(846371),_t=a(496253),Tt=a.n(_t),mt=a(387447),xt=a(775113),pt=a(898826),At=a(780597),St=a.n(At),Rt=a(229083),ht=a(172205),Ct=a(198792);const Dt=t=>t[ht.U.AP_SIDE_PANEL_STATS],Ot=(0,S.Mz)(Dt,t=>t[Ct.e.DATE_RANGE]),Mt=(0,S.Mz)(Dt,t=>t[Ct.e.RADIO]);var Lt=a(135803);const gt=()=>{const{formatMessage:t}=(0,m.tz)(),e=(0,s.wA)(),[a,r]=(0,o.useState)(!1),i=(0,s.d4)(Ot),d=(0,o.useCallback)(t=>{e((0,Lt.$z)({...t}))},[e]),c=(0,o.useMemo)(()=>({startsAtLabel:t({id:"COMMON_STARTS_AT"}),endsAtLabel:t({id:"COMMON_ENDS_AT"}),applyButton:t({id:"COMMON_ACTION_APPLY"}),cancelButton:t({id:"COMMON_ACTION_CANCEL"})}),[t]),{startValue:u,endValue:_}=(0,o.useMemo)(()=>i.startDate&&i.endDate?{startValue:(0,xt.A)(i.startDate,"CalendarDateTime"),endValue:(0,xt.A)(St()(i.endDate,1),"CalendarDateTime")}:{},[i.endDate,i.startDate]),[T,x]=(0,o.useState)({start:u,end:_}),[p,A]=(0,o.useState)(!1),S=(0,o.useCallback)(t=>{x(t),A(Boolean(t))},[]),R=(0,o.useCallback)(t=>{t&&!T&&Boolean(u)&&Boolean(_)&&x({start:u,end:_}),t||p||x(null),r(t)},[p,u,_,T,r]),h=(0,o.useCallback)(()=>{r(!1)},[]),C=(0,o.useCallback)(()=>{A(!1),x(null)},[]),D=(0,o.useCallback)(t=>{t&&(0,Rt.Q)(t)&&d({startDate:new Date(t.start.toString()),endDate:new Date(t.end.toString())}),h()},[d,h]),{maxValue:O,minValue:M}=(0,o.useMemo)(()=>({maxValue:(0,xt.A)(Tt()(new Date),"CalendarDateTime"),minValue:(0,xt.A)(new Date(0),"CalendarDateTime")}),[]);(0,o.useEffect)(()=>{const{startDate:t,endDate:e}=i;t&&e?x({start:(0,xt.A)(t,"CalendarDateTime"),end:(0,xt.A)(St()(e,1),"CalendarDateTime")}):(x(null),A(!1))},[i]);const L=(0,o.useMemo)(()=>({start:(0,xt.A)(i.startDate,"CalendarDateTime"),end:(0,xt.A)(i.endDate,"CalendarDateTime")}),[i.endDate,i.startDate]),g=(0,o.useMemo)(()=>({isOpen:a,value:T,defaultValue:L,localizationTexts:c,onOpenChange:R,onCancel:h,onChange:S,onClear:C,onSave:D,minValue:M,maxValue:O,isClearable:!0,shouldCloseOnSelect:!1,presets:[],"aria-label":"AP Side Panel Stats Calendar"}),[a,T,L,c,R,h,S,C,D,M,O]);return(0,n.jsx)(mt.X,{...g,children:(0,n.jsx)(pt.A,{variant:"secondary-neutral",style:{borderRadius:l.kc},children:(0,n.jsx)(ut.A,{})})})};var Et=a(247816),ft=a(383061),Xt=a(956978);const It=(0,Et.A)(ft.A)`
  width: auto;
  flex: none;
  & > div {
    margin: unset;
  }
`,Pt=({device:t})=>{const e=(0,s.wA)(),a=(0,s.d4)(Mt),r=(0,Xt.J2F)(t),i=(0,o.useMemo)(()=>t?.radio_table?.map(({radio:t})=>t)||[],[t?.radio_table]),l=(0,o.useMemo)(()=>v.Nk.filter(t.mac===x.TE.ALL?({id:t})=>t!==x.Bo.SIXE||r:({id:t})=>i.includes(t)||t===x.Bo.ALL),[i,r,t.mac]),d=(0,o.useCallback)(({id:t})=>{e((0,Lt.jO)(t))},[e]);return(0,n.jsx)(It,{variant:"filter",selectedTab:a,onSelectTab:d,tabs:l})};var vt=a(406677);const jt=(t,e)=>{const a=(0,vt.w)(t,e);return a<=1?x.sw.ONE_DAY:a<=7?x.sw.ONE_WEEK:x.sw.ONE_MONTH},Nt=({device:t})=>{const e=(0,s.wA)(),{startDate:a,endDate:r}=(0,s.d4)(Ot),d=(0,s.d4)(Mt),c=(0,q.M1)(t.radio_table),u=d===x.Bo.ALL?c:{[d]:c[d]},_=(0,o.useMemo)(()=>({startDate:a,endDate:r,preset:jt(a,r)}),[a,r]);return(0,o.useEffect)(()=>{d===x.Bo.ALL||c[d]||e((0,Lt.jO)(x.Bo.ALL))},[e,c,d]),(0,tt.A)([(0,C.e9)({start:a,end:r,mac:t.mac},c,{crudCacheStrategy:{type:et.e.CACHE},idField:e=>e._id||`${t.mac}-${d}-${d===x.Bo.ALL?x.Bo.ALL:c[d]}-latest`})],(0,n.jsxs)(i.A,{flexDirection:"column",gap:l.Ln,children:[(0,n.jsxs)(i.A,{alignItems:"center",justifyContent:"space-between",children:[(0,n.jsx)(Pt,{device:t}),(0,n.jsx)(gt,{})]}),(0,n.jsx)(ct,{dataRange:_,radio:d,mac:t.mac,preset:_.preset}),(0,n.jsx)(N,{mac:t.mac,radioNames:u,dataRange:_}),(0,n.jsx)(Q,{mac:t.mac,radio:d,radioNames:u,dataRange:_}),(0,n.jsx)(y,{mac:t.mac,radio:d,radioNames:u,dataRange:_}),(0,n.jsx)(k,{mac:t.mac,radio:d,radioNames:u,dataRange:_})]}),{renderKey:`${a.getTime()}-${r.getTime()}`,trackingName:"ap-side-panel-stats"})};var bt=a(376892);const wt=(0,o.memo)(({device:t})=>{const e=(0,o.useMemo)(()=>[{id:"ap-stats-insights",label:(0,n.jsx)(bt.A,{id:"COMMON_STATS"}),renderContent:()=>(0,n.jsx)(Nt,{device:t})}],[t]);return(0,n.jsx)(r.A,{type:r.I.ACCORDION,items:e})})},761801(t,e,a){a.d(e,{A:()=>s});var n=a(274934),o=a(470070),r=a(581883);const s=({radio:t,suffix:e})=>r.U[t]?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.sA,{id:r.U[t]}),e?(0,n.jsxs)("span",{children:[" ",e]}):null]}):(0,n.jsx)(o.sA,{id:"COMMON_FALLBACK"})},142667(t,e,a){a.d(e,{A:()=>S});var n=a(274934),o=a(618965),r=a(844993),s=a(247816),i=a(100978),l=a(291508);const d=(0,s.A)(i.A,(0,l.A)("innerColor","outerColor"))`
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  g {
    transition: unset;
  }
  circle {
    &:first-child {
      ${({outerColor:t})=>t?`fill: ${t};`:""}
    }
    &:last-child {
      ${({innerColor:t})=>t?`fill: ${t};`:""}
      r: 4.5;
    }
  }
`,c=a(409844).AH`
  overflow: visible;
`,u=({chartWidth:t,chartHeight:e,top:a,left:o,innerColor:s,outerColor:i="#fff"})=>(0,n.jsx)(d,{innerColor:s,outerColor:i,children:(0,n.jsx)("svg",{width:t,height:e,className:c,children:o&&a?(0,n.jsx)(r.A,{hasAnimation:!1,x:o,y:a}):null})});var _=a(814557);const T=(0,s.A)(i.A,(0,l.A)("topA","topB","leftA","leftB","chartHeight","useFullHeightConnector"))`
  z-index: 1;
  border-left: 1px dashed
    ${({theme:{themeName:t}})=>_.Ay[`desktop-color-neutral-10-${t}`]};
  position: absolute;
  ${({topA:t,topB:e,leftA:a,leftB:n,chartHeight:o,useFullHeightConnector:r})=>`\n     top: ${r&&o?20:Math.min(t||0,e)}px;\n     height: ${r&&o?o-50:Math.max(t||0,e)-Math.min(t||0,e)}px;\n     left: ${((a||0)+n)/2-1}px;\n   `}
`,m=({topA:t,leftA:e,topB:a,leftB:o,chartHeight:r,useFullHeightConnector:s})=>(0,n.jsx)(T,{topA:t,topB:a,leftA:e,leftB:o,chartHeight:r,useFullHeightConnector:s}),x=(t,e,a)=>a?(t||0)+((t||0)<Math.round(e/2)?8:-8):(t||0)-8,p=(t,e)=>((t||0)+(e||0))/(e?2:1),A=(t,e,a,n)=>({maxWidth:"auto",...!n?.position&&a&&t&&e&&{position:t<Math.round(e/2)?"right":"left"},portal:!0,...n}),S=({width:t,topA:e,leftA:a,topB:r,leftB:s,chartWidth:i,chartHeight:l,hidden:d,description:c,innerColor:_,tooltipRenderCondition:T,tooltipProps:S={},useSideSwapping:R=!0,useFullHeightConnector:h=!1})=>d?null:(0,n.jsxs)(n.Fragment,{children:[T?(0,n.jsx)(o.A,{width:t,left:x(a,i,R),top:p(e,r),description:c,hidden:d,topMargin:4,tooltipProps:A(a,i,R,S)}):null,s&&r?(0,n.jsx)(m,{topA:e,topB:r,leftA:a,leftB:s,chartHeight:l,useFullHeightConnector:h}):null,(0,n.jsx)(u,{chartWidth:i,chartHeight:l,top:e,left:a,innerColor:_})]})},638990(t,e,a){var n;a.d(e,{Z:()=>n}),function(t){t.AIRVIEW="AIRVIEW"}(n||(n={}))},239875(t,e,a){a.d(e,{A:()=>r});var n=a(602086);function o(t,e,a){return t[e]?t[e][0]?t[e][0][a]:t[e][a]:"contentBoxSize"===e?t.contentRect["inlineSize"===a?"width":"height"]:void 0}const r=function(t={}){const e=t.onResize,a=(0,n.useRef)(void 0);a.current=e;const r=t.round||Math.round,s=(0,n.useRef)(void 0),[i,l]=(0,n.useState)({width:void 0,height:void 0}),d=(0,n.useRef)(!1);(0,n.useEffect)(()=>(d.current=!1,()=>{d.current=!0}),[]);const c=(0,n.useRef)({width:void 0,height:void 0}),u=function(t,e){const a=(0,n.useRef)(null),o=(0,n.useRef)(null);o.current=e;const r=(0,n.useRef)(null),s=(0,n.useCallback)(()=>{const e=o.current,n=r.current||(e?e instanceof Element?e:e.current:null);a.current&&a.current.element===n&&a.current.subscriber===t||(a.current&&a.current.cleanup&&a.current.cleanup(),a.current={element:n,subscriber:t,cleanup:n?t(n):void 0})},[t]);return(0,n.useEffect)(()=>{s()},[s]),(0,n.useEffect)(()=>()=>{a.current&&a.current.cleanup&&(a.current.cleanup(),a.current=null)},[]),(0,n.useCallback)(t=>{r.current=t,s()},[s])}((0,n.useCallback)(e=>(s.current&&s.current.box===t.box&&s.current.round===r||(s.current={box:t.box,round:r,instance:new ResizeObserver(e=>{const n=e[0],s="border-box"===t.box?"borderBoxSize":"device-pixel-content-box"===t.box?"devicePixelContentBoxSize":"contentBoxSize",i=o(n,s,"inlineSize"),u=o(n,s,"blockSize"),_=i?r(i):void 0,T=u?r(u):void 0;if(c.current.width!==_||c.current.height!==T){const t={width:_,height:T};c.current.width=_,c.current.height=T,a.current?a.current(t):d.current||l(t)}})}),s.current.instance.observe(e,{box:t.box}),()=>{s.current&&s.current.instance.unobserve(e)}),[t.box,r]),t.ref);return(0,n.useMemo)(()=>({ref:u,width:i.width,height:i.height}),[u,i.width,i.height])}},735239(t,e,a){var n;a.d(e,{t:()=>n}),function(t){t.NONE="none",t.HEALTHY="healthy",t.WARNING="warning"}(n||(n={}))},950486(t,e,a){a.d(e,{T:()=>o});var n=a(735239);const o=(t=0,e=0)=>e>=80&&t>=30?n.t.WARNING:e>=50&&t>=15?n.t.HEALTHY:n.t.NONE},571829(t,e,a){a.d(e,{I:()=>o});var n=a(561614);const o=[n.sx.RADIO_NG,n.sx.RADIO_NA,n.sx.RADIO_6E,n.sx.RADIO_AD]},758654(t,e,a){a.d(e,{Rm:()=>s,fU:()=>r,uQ:()=>o});var n=a(571829);const o=t=>{const e=(e,a)=>t.indexOf(e)-t.indexOf(a);return{orderRadios:e,orderByRadio:(t,a)=>e(t.radio,a.radio)}},{orderRadios:r,orderByRadio:s}=o(n.I)},927027(t,e,a){a.d(e,{Y:()=>o,v:()=>r});var n=a(752572);const o=(t,e,a=!1)=>{const o=e-1;let r=Math.ceil(t);if(Number.isNaN(r))return[];const s=r%o;return 0!==s&&(r+=o-s),(0,n.A)(e,t=>{return{value:e=t?Math.ceil(t*(r/o)):0,label:a?t%2==0&&String(e)||null:String(e)};var e}).reverse()},r=(t,e)=>{const[a]=t,n=[a],o=t.length-1;for(let a=1;a<e-1;a+=1){const r=a*o/(e-1),s=Math.floor(r).toFixed();n[a]=Math.round(t[s]+(t[Math.ceil(r).toFixed()]-t[s])*(+r-+s))}return n[e-1]=t[o],n}}}]);