"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[33068],{13994:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(296540),r=a(112142),i=a(66706),o=a(71479),l=a(132196),s=a(294303);const c=l.AH`
  overflow: visible;
`,m=(0,o.A)(s.A,{shouldForwardProp:e=>!["innerColor","outerColor"].includes(e)})`
  g {
    transition: unset;
  }
  circle {
    &:first-child {
      ${({outerColor:e})=>e?`fill: ${e};`:""}
    }
    &:last-child {
      ${({innerColor:e})=>e?`fill: ${e};`:""}
    }
  }
`,_=({chartWidth:e,chartHeight:t,top:a,left:r,innerColor:o,outerColor:l="#fff"})=>n.createElement(m,{position:"absolute",top:0,left:0,zIndex:2,innerColor:o,outerColor:l,pointerEvents:"none"},n.createElement("svg",{width:e,height:t,className:c},r&&a&&n.createElement(i.A,{hasAnimation:!1,x:r,y:a}))),E=({topA:e,leftA:t,topB:a,leftB:r})=>n.createElement(s.A,{zIndex:1,borderLeft:"2px dashed white",top:Math.min(e,a),height:Math.max(e,a)-Math.min(e,a),left:(t+r)/2-1,position:"absolute"}),d=({width:e,topA:t,leftA:a,topB:i,leftB:o,chartWidth:l,chartHeight:s,hidden:c,description:m,innerColor:d,tooltipRenderCondition:u,tooltipProps:T={},useSideSwapping:p=!0})=>c?null:n.createElement(n.Fragment,null,u?n.createElement(r.A,{width:e,left:p?a+(a<Math.round(l/2)?8:-8):a-8,top:(t+i)/(i?2:1),description:m,hidden:c,topMargin:4,tooltipProps:{maxWidth:"auto",...!T.position&&p&&a&&l&&{position:a<Math.round(l/2)?"right":"left"},portal:!0,...T}}):null,o&&i?n.createElement(E,{topA:t,topB:i,leftA:a,leftB:o}):null,n.createElement(_,{chartWidth:l,chartHeight:s,top:t,left:a,innerColor:d}))},79100:(e,t,a)=>{a.d(t,{Ay:()=>A,N1:()=>E,pd:()=>p});var n=a(340936),r=a(296540),i=a(822336),o=a(936344),l=a(217439),s=a(71479),c=a(566723),m=a(294303),_=a(577962);const E=24,d=[0,0,0,0],u=s.A.div`
  position: absolute;
`,T=(0,s.A)(l.A)`
  white-space: nowrap;
`,p=(0,r.memo)(({axisItems:e,paddingBottom:t,alignItems:a="flex-end"})=>r.createElement(m.A,{flexDirection:"column",justifyContent:"space-between",alignItems:a,flex:"0 0 16px",paddingBottom:t},e.filter(({label:e})=>void 0!==e).map(({label:e})=>r.createElement(T,{size:"small",color:"text-3",key:String(e)},e)))),A=({height:e=100,maxY:t=_.Rg,xAxis:a,y2Axis:l,tooltipContainerRef:s,chartRef:T,children:A})=>{const{width:S=0,height:R=0}=(0,n.A)({ref:T}),h=(0,r.useMemo)(()=>[{value:t+.01},{value:t,label:t},{value:t/2,label:Math.round(t/2)},{value:0,label:0}],[t]);return r.createElement(m.A,{gap:c.Ln,width:0,flex:1,height:"100%",flexDirection:"column"},r.createElement(m.A,{flexDirection:"row",justifyContent:"space-between",gap:c.kc},r.createElement(p,{axisItems:h,paddingBottom:E}),r.createElement(m.A,{flex:1,overflowX:"hidden",minHeight:e+E,height:e+E,position:"relative",ref:T,paddingBottom:E},r.createElement(u,{ref:s}),r.createElement(o.A,{xAxis:a,yAxis:h.map(({value:e})=>({value:e})),y2Axis:l,width:S,height:R,margin:d,renderXLabel:e=>r.createElement("tspan",{fontSize:i.Ay["desktop-font-size-small"]},e.label),renderYLabel:(e,t)=>r.createElement("tspan",{fontSize:i.Ay["desktop-font-size-small"],y:0===t?10:void 0},e.label)},A))))}},229817:(e,t,a)=>{a.d(t,{A:()=>_});var n=a(469733),r=a(296540),i=a(705145),o=a(566723),l=a(294303),s=a(703447),c=a(951106),m=a(239417);const _=({mac:e})=>{const t=(0,n.useSelector)(m.GB).find(t=>"mac"in t&&t.mac===e)||{};return r.createElement(l.A,{gap:o.kc,alignItems:"center"},r.createElement(l.A,{maxWidth:16,maxHeight:16},r.createElement(s.A,{client:{mac:e,...t}})),r.createElement(i.A,{variant:"inherit",isTruncated:!0},(0,c.tn)(t||{})||e))}},233847:(e,t,a)=>{a.d(t,{Lr:()=>o,Qi:()=>s,XT:()=>l,m1:()=>i});var n=a(661867),r=a(290480);const i=(e,t)=>{switch(t){case r.Bo.NA:return{[r.Ss.TX_RETRIES]:e.tx_retries_na,[r.Ss.RX_CRYPTS]:e.rx_crypts_na,[r.Ss.RX_DROPPED]:e.rx_dropped_na,[r.Ss.RX_ERRORS]:e.rx_errors_na,[r.Ss.RX_FRAGS]:e.rx_frags_na,[r.Ss.TX_DROPPED]:e.tx_dropped_na,[r.Ss.TX_ERRORS]:e.tx_errors_na,[r.Ss.WIFI_TX_DROPPED]:e.wifi_tx_dropped_na,[r.Ss.WIFI_TX_ATTEMPTS]:e.wifi_tx_attempts_na};case r.Bo.NG:return{[r.Ss.TX_RETRIES]:e.tx_retries_ng,[r.Ss.RX_CRYPTS]:e.rx_crypts_ng,[r.Ss.RX_DROPPED]:e.rx_dropped_ng,[r.Ss.RX_ERRORS]:e.rx_errors_ng,[r.Ss.RX_FRAGS]:e.rx_frags_ng,[r.Ss.TX_DROPPED]:e.tx_dropped_ng,[r.Ss.TX_ERRORS]:e.tx_errors_ng,[r.Ss.WIFI_TX_DROPPED]:e.wifi_tx_dropped_ng,[r.Ss.WIFI_TX_ATTEMPTS]:e.wifi_tx_attempts_ng};case r.Bo.SIXE:return{[r.Ss.TX_RETRIES]:e.tx_retries_6e,[r.Ss.RX_CRYPTS]:e.rx_crypts_6e,[r.Ss.RX_DROPPED]:e.rx_dropped_6e,[r.Ss.RX_ERRORS]:e.rx_errors_6e,[r.Ss.RX_FRAGS]:e.rx_frags_6e,[r.Ss.TX_DROPPED]:e.tx_dropped_6e,[r.Ss.TX_ERRORS]:e.tx_errors_6e,[r.Ss.WIFI_TX_DROPPED]:e.wifi_tx_dropped_6e,[r.Ss.WIFI_TX_ATTEMPTS]:e.wifi_tx_attempts_6e};case r.Bo.ALL:return{[r.Ss.TX_RETRIES]:e.tx_retries_6e+e.tx_retries_na+e.tx_retries_ng,[r.Ss.RX_CRYPTS]:e.rx_crypts_6e+e.rx_crypts_na+e.rx_crypts_ng,[r.Ss.RX_DROPPED]:e.rx_dropped_6e+e.rx_dropped_na+e.rx_dropped_ng,[r.Ss.RX_ERRORS]:e.rx_errors_6e+e.rx_errors_na+e.rx_errors_ng,[r.Ss.RX_FRAGS]:e.rx_frags_6e+e.rx_frags_na+e.rx_frags_ng,[r.Ss.TX_DROPPED]:e.tx_dropped_6e+e.tx_dropped_na+e.tx_dropped_ng,[r.Ss.TX_ERRORS]:e.tx_errors_6e+e.tx_errors_na+e.tx_errors_ng,[r.Ss.WIFI_TX_DROPPED]:e.wifi_tx_dropped_6e+e.wifi_tx_dropped_na+e.wifi_tx_dropped_ng,[r.Ss.WIFI_TX_ATTEMPTS]:e.wifi_tx_attempts_6e+e.wifi_tx_attempts_na+e.wifi_tx_attempts_ng};default:return{[r.Ss.TX_RETRIES]:0,[r.Ss.RX_CRYPTS]:0,[r.Ss.RX_DROPPED]:0,[r.Ss.RX_ERRORS]:0,[r.Ss.RX_FRAGS]:0,[r.Ss.TX_DROPPED]:0,[r.Ss.TX_ERRORS]:0,[r.Ss.WIFI_TX_DROPPED]:0,[r.Ss.WIFI_TX_ATTEMPTS]:0}}},o=(e,t)=>{switch(t){case r.Bo.NA:return{[r.Ss.RX_BYTES]:e.rx_bytes_na,[r.Ss.TX_BYTES]:e.tx_bytes_na,[r.Ss.RX_PACKETS]:e.tx_packets_na,[r.Ss.TX_PACKETS]:e.rx_packets_na};case r.Bo.NG:return{[r.Ss.RX_BYTES]:e.rx_bytes_ng,[r.Ss.TX_BYTES]:e.tx_bytes_ng,[r.Ss.RX_PACKETS]:e.rx_packets_ng,[r.Ss.TX_PACKETS]:e.rx_packets_ng};case r.Bo.SIXE:return{[r.Ss.RX_BYTES]:e.rx_bytes_6e,[r.Ss.TX_BYTES]:e.tx_bytes_6e,[r.Ss.RX_PACKETS]:e.rx_packets_6e,[r.Ss.TX_PACKETS]:e.rx_packets_6e};case r.Bo.ALL:return{[r.Ss.RX_BYTES]:e.rx_bytes_6e+e.rx_bytes_na+e.rx_bytes_ng,[r.Ss.TX_BYTES]:e.tx_bytes_6e+e.tx_bytes_na+e.tx_bytes_ng,[r.Ss.RX_PACKETS]:e.rx_packets_6e+e.rx_packets_na+e.rx_packets_ng,[r.Ss.TX_PACKETS]:e.tx_packets_6e+e.tx_packets_na+e.tx_packets_ng};default:return{[r.Ss.RX_BYTES]:0,[r.Ss.TX_BYTES]:0,[r.Ss.RX_PACKETS]:0,[r.Ss.TX_PACKETS]:0}}},l=(e,t)=>{switch(t){case r.Bo.NA:return{[r.Ss.CU_TOTAL]:e.cu_total_na,[r.Ss.NUM_STA]:e.num_sta_na};case r.Bo.NG:return{[r.Ss.CU_TOTAL]:e.cu_total_ng,[r.Ss.NUM_STA]:e.num_sta_ng};case r.Bo.SIXE:return{[r.Ss.CU_TOTAL]:e.cu_total_6e,[r.Ss.NUM_STA]:e.num_sta_6e};case r.Bo.ALL:return{[r.Ss.NUM_STA]:e.num_sta_6e+e.num_sta_na+e.num_sta_ng,[r.Ss.CU_TOTAL]:(0,n._i)([e.cu_total_6e,e.cu_total_na,e.cu_total_ng])};default:return{[r.Ss.CU_TOTAL]:0,[r.Ss.NUM_STA]:0}}},s=(e,t,a)=>({start:Math.ceil(e.getTime()/a)*a,end:Math.floor(Math.min((new Date).getTime(),t.getTime())/a)*a})},234185:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(296540),r=a(309447),i=a(718073),o=a(777411),l=a(699784);const s=({...e})=>n.createElement(i.A,{description:n.createElement(l.sA,{id:"COMMON_EXPAND"})},n.createElement(r.A,{variant:"tertiary-neutral",...e},n.createElement(o.A,{size:"original"})))},280062:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(296540),r=a(699784),i=a(842916);const o=({radio:e,suffix:t})=>i.U[e]?n.createElement(n.Fragment,null,n.createElement(r.sA,{id:i.U[e]}),t?n.createElement("span",null," ",t):null):n.createElement(r.sA,{id:"COMMON_FALLBACK"})},282637:(e,t,a)=>{a.d(t,{Ay:()=>s,In:()=>o,Wx:()=>l,Zo:()=>i});var n=a(296540),r=a(294303);const i=({color:e})=>n.createElement(r.A,{width:8,height:2,background:e}),o=({color:e})=>n.createElement(r.A,{width:8,height:5,background:e,borderRadius:1}),l=({color:e})=>n.createElement(r.A,{alignItems:"center",gap:2},n.createElement(r.A,{width:4,height:2,background:e}),n.createElement(r.A,{width:4,height:2,background:e})),s=i},343651:(e,t,a)=>{a.d(t,{A:()=>u,g:()=>d});var n=a(469733),r=a(956347),i=a(296540),o=a(118835),l=a(627440),s=a(15095),c=a(845030),m=a(398300),_=a(800081),E=a(337263);const d=()=>{const e=(0,n.useDispatch)(),t=(0,r.W6)(),a=(0,s.A)(`${l.VO.CLIENTS}/${o.M.MAIN}`);return{navigateToApClients:(0,i.useCallback)((n,r,i)=>{n&&e((0,E.ai)(n)),r&&e((0,E.t6)(r)),i&&e((0,E.BG)([_.Os[i[0]]??_.KM,_.Os[i[1]]??_.Uc])),t.push(a)},[e,t,a]),openClientPropertyPanel:(0,i.useCallback)(t=>{setTimeout(()=>{e((0,c.XP)({type:m.H.CLIENT,id:t}))},250)},[e])}},u=d},365468:(e,t,a)=>{a.d(t,{ON:()=>n,U0:()=>r,XO:()=>i,ug:()=>o});const n=64,r=100,i=40,o=50},386753:(e,t,a)=>{a.d(t,{t:()=>s});var n=a(801081),r=(a(853699),a(290480)),i=a(814803),o=a(656372),l=(a(661867),a(402150));const s=(e,t)=>(0,n.Mz)((0,i.UO)(e,t),t=>t.map(({time:t,duration:a,mem:n,cpu:i,...s})=>({time:t,duration:a,mem:n,cpu:i,...(0,l.Px)(o.l_,e===r.TE.ALL,s)})))},433068:(e,t,a)=>{a.d(t,{A:()=>ze});var n=a(296540),r=a(777916),i=a(217439),o=a(67753),l=a(781376),s=a(104030),c=a(71479),m=a(137273),_=a(469733),E=a(998837),d=a(822336),u=a(489934),T=a(255905),p=a(915462),A=a(664967),S=a(311785),R=a(566723),h=a(280062),x=a(294303),I=a(699784),O=a(290480),g=a(780811),D=a(837612),M=a(170459),L=a(584916),f=a(661867),C=a(964238),N=a(49249),P=a(633297),X=a(340936),w=a(577962),y=a(991295),v=a(572112),b=a(779005),F=a(853699),W=a(562640),U=a(842916),$=a(365468);const k=({id:e,color:t,backgroundColor:a,opacity:r=.12})=>n.createElement("defs",null,n.createElement("pattern",{id:e,patternUnits:"userSpaceOnUse",width:"1",height:"1"},n.createElement("rect",{width:"1",height:"1",fill:a}),n.createElement("rect",{width:"1",height:"1",fill:t,opacity:r})));var B=a(801081),Y=a(656372),H=a(402150),z=a(386753);var V=a(79100),G=a(233847),K=a(800828),j=a(178233);const q=({timestamp:e,interval:t,airtime:a,interference:r,thisAp:i})=>n.createElement(x.A,{width:"100%",flexDirection:"column",gap:R.kc},e&&t?n.createElement(y.XF,{timestamp:e,interval:t}):null,n.createElement(x.A,{flexDirection:"column"},n.createElement(y.m0,{translationId:"COMMON_AIRTIME",value:(0,j.A)(Math.round(a)),valueWeight:"bold",valueColor:U.x[W.i.AIRTIME]}),n.createElement(y.m0,{translationId:"COMMON_INTERFERENCE",value:(0,j.A)(Math.round(r)),valueColor:U.x[W.i.INTERFERENCE]}),n.createElement(y.m0,{translationId:"COMMON_THIS_AP",value:(0,j.A)(Math.round(i)),valueColor:U.x[W.i.THIS_AP]}))),Z=({timestamp:e,interval:t,values:{[W.i.AIRTIME]:a=0,[W.i.INTERFERENCE]:r=0,[W.i.THIS_AP]:i=0}})=>n.createElement(q,{timestamp:e,interval:t,airtime:a,interference:r,thisAp:i}),J={[W.i.THIS_AP]:!0,[W.i.INTERFERENCE]:!0},Q=({dataRange:e,radio:t,mac:a=O.TE.ALL,maxY:r=w.Rg,preset:i=O.sw.ONE_DAY,customBackgroundColor:o})=>{const l=(0,n.useRef)(null),s=(0,n.useRef)(null),{width:c=0,height:m=0}=(0,X.A)({ref:s}),{grain:u}=(0,n.useMemo)(()=>(0,F.$V)(e.startDate,e.endDate,!0,!0),[e.endDate,e.startDate]),{start:T,end:p}=(0,n.useMemo)(()=>(0,G.Qi)(e.startDate,e.endDate,u),[e.endDate,u,e.startDate]),A=(0,K.A)(T,p,c,!1,i),{motifPalette:S,themeName:R}=(0,E.u)(),h=o||d.Ay[`desktop-color-mainbody-bg-${R}`],x=(0,n.useRef)({minTop:0,maxTop:0}),{availableChartData:I,...g}=(0,_.useSelector)(((e,t,a)=>(0,B.Mz)((0,z.t)(e,t),e=>{const n=(0,Y.Io)(t.startDate,t.endDate),r={};return{...e.reduce((e,{time:t,duration:i,...o})=>{const l=(0,H.aN)(o,a),s=l[O.Ss.CU_TOTAL]>100?(e[W.i.AIRTIME][e[W.i.AIRTIME].length-1]||{}).y:l[O.Ss.CU_TOTAL]||0,c=l[O.Ss.CU_INTERF]||0,m=(l[O.Ss.CU_SELF_RX]||0)+(l[O.Ss.CU_SELF_TX]||0);!r[W.i.AIRTIME]&&s&&(r[W.i.AIRTIME]=!0),!r[W.i.INTERFERENCE]&&c&&(r[W.i.INTERFERENCE]=!0),!r[W.i.THIS_AP]&&m&&(r[W.i.THIS_AP]=!0);const _={[W.i.AIRTIME]:s,[W.i.INTERFERENCE]:c,[W.i.THIS_AP]:m,[O.Ss.DURATION]:F.UE[n]?.grain||i};return e[W.i.AIRTIME].push({x:t,y:s,custom:_}),e[W.i.THIS_AP].push({x:t,y:m,custom:_}),e[W.i.INTERFERENCE].push({x:t,y:c,custom:_}),e},{[W.i.AIRTIME]:[],[W.i.THIS_AP]:[],[W.i.INTERFERENCE]:[]}),availableChartData:r}}))(a,e,t)),D=(0,n.useMemo)(()=>c>v.A[b.L.ML].FROM?4:1,[c]),M=(0,n.useMemo)(()=>{const e=g[W.i.AIRTIME]?.length||0,t=Math.min(e,$.ON*D),a=(p-T)/t,{[W.i.AIRTIME]:n,[W.i.INTERFERENCE]:r,[W.i.THIS_AP]:i}=g,o=i.map((e,t)=>({...e,y:e.y+r[t].y}));return{[W.i.AIRTIME]:(0,P.Hf)(n,u),[W.i.INTERFERENCE]:(0,P.Hf)(r,u),[W.i.THIS_AP]:(0,P.Hf)(o,u),interval:a}},[g,p,D,T,u]),L=(0,n.useCallback)(({top:e,left:t,x:a,hidden:r,custom:i={}},o)=>{const l=Object.entries(I).find(([e,t])=>J[e]&&t&&!!i?.[e])?.[0]||W.i.THIS_AP,s=[i[W.i.INTERFERENCE],i[W.i.THIS_AP]+i[W.i.INTERFERENCE]].filter(Boolean),_=s.length?Math.min(...s):0,E=s.length?Math.max(...s):0;x.current={maxTop:m-Math.round(E*m/w.Rg),minTop:m-Math.round(_*m/w.Rg)};const T=(0,f.lZ)(x.current.maxTop,x.current.minTop,e);return n.createElement(y.JM,{top:e,left:t,hidden:r,chartWidth:c,chartHeight:m,timestamp:a,interval:u,tooltipTopPositionCompensator:T,lineStart:x.current.maxTop,lineEnd:x.current.minTop,values:i,innerColor:d.Ay[`desktop-color-${U.x[o]}-${R}`],tooltipRenderCondition:l===o,zIndex:N.A["desktop-zindex-modal"],TooltipComponent:Z})},[m,c,u,S]),j=(0,n.useCallback)(e=>t=>L(t,e),[L]),q=(0,n.useCallback)((e,t,a)=>n.createElement(n.Fragment,null,I[W.i.THIS_AP]?n.createElement(C.A,{data:M[W.i.THIS_AP],maxY:a,mouseData:t,getCoordinates:e,lineColor:d.Ay[`desktop-color-${U.x[W.i.THIS_AP]}-${R}`],variant:"gradientArea",interpolation:"linear",hideMissingDataLine:!0,tooltipPortal:l?l.current:void 0,renderTooltip:j(W.i.THIS_AP),customGradientId:`${W.i.THIS_AP}-area-${R}`,renderCustomGradient:()=>n.createElement(k,{id:`${W.i.THIS_AP}-area-${R}`,color:d.Ay[`desktop-color-${U.x[W.i.THIS_AP]}-${R}`],backgroundColor:h})}):null,I[W.i.INTERFERENCE]?n.createElement(C.A,{data:M[W.i.INTERFERENCE],maxY:a,mouseData:t,getCoordinates:e,lineColor:d.Ay[`desktop-color-${U.x[W.i.INTERFERENCE]}-${R}`],variant:"gradientArea",interpolation:"linear",hideMissingData:!0,hideMissingDataLine:!0,tooltipPortal:l?l.current:void 0,renderTooltip:j(W.i.INTERFERENCE),customGradientId:`${W.i.INTERFERENCE}-area-${R}`,renderCustomGradient:()=>n.createElement(k,{id:`${W.i.INTERFERENCE}-area-${R}`,color:d.Ay[`desktop-color-${U.x[W.i.INTERFERENCE]}-${R}`],backgroundColor:h})}):null),[S,j,M]);return n.createElement(V.Ay,{maxY:r,xAxis:A,tooltipContainerRef:l,chartRef:s},q)};var ee,te=a(885529),ae=a(424226),ne=a(195462),re=a(282556),ie=a(924012);!function(e){e[e.DOWNLOAD=O.Ss.RX_RATE]="DOWNLOAD",e[e.UPLOAD=O.Ss.TX_RATE]="UPLOAD",e[e.TX_RETRIES=O.Ss.TX_RETRIES]="TX_RETRIES",e[e.CLIENTS=O.Ss.NUM_STA]="CLIENTS"}(ee||(ee={}));const oe=(e,t,a)=>(0,B.Mz)((0,z.t)(e,t),e=>{const{grain:n}=(0,F.$V)(t.startDate,t.endDate,!0,!0),r={};return{...e.reduce((e,{time:t,duration:i,...o})=>{const l=n||i,s=l/1e3,c=((e,t)=>{switch(t){case O.Bo.NA:return{[O.Ss.NUM_STA]:e.num_sta_na,[O.Ss.RX_BYTES]:e.rx_bytes_na,[O.Ss.TX_BYTES]:e.tx_bytes_na,[O.Ss.TX_RETRIES]:e.tx_retries_na,[O.Ss.WIFI_TX_ATTEMPTS]:e.wifi_tx_attempts_na,[O.Ss.WIFI_TX_DROPPED]:e.wifi_tx_dropped_na};case O.Bo.NG:return{[O.Ss.NUM_STA]:e.num_sta_ng,[O.Ss.RX_BYTES]:e.rx_bytes_ng,[O.Ss.TX_BYTES]:e.tx_bytes_ng,[O.Ss.TX_RETRIES]:e.tx_retries_ng,[O.Ss.WIFI_TX_ATTEMPTS]:e.wifi_tx_attempts_ng,[O.Ss.WIFI_TX_DROPPED]:e.wifi_tx_dropped_ng};case O.Bo.SIXE:return{[O.Ss.NUM_STA]:e.num_sta_6e,[O.Ss.RX_BYTES]:e.rx_bytes_6e,[O.Ss.TX_BYTES]:e.tx_bytes_6e,[O.Ss.TX_RETRIES]:e.tx_retries_6e,[O.Ss.WIFI_TX_ATTEMPTS]:e.wifi_tx_attempts_6e,[O.Ss.WIFI_TX_DROPPED]:e.wifi_tx_dropped_6e};case O.Bo.ALL:return{[O.Ss.NUM_STA]:e.num_sta_na+e.num_sta_ng+e.num_sta_6e,[O.Ss.RX_BYTES]:e.rx_bytes_na+e.rx_bytes_ng+e.rx_bytes_6e,[O.Ss.TX_BYTES]:e.tx_bytes_na+e.tx_bytes_ng+e.tx_bytes_6e,[O.Ss.TX_RETRIES]:e.tx_retries_na+e.tx_retries_ng+e.tx_retries_6e,[O.Ss.WIFI_TX_ATTEMPTS]:e.wifi_tx_attempts_na+e.wifi_tx_attempts_ng+e.wifi_tx_attempts_6e,[O.Ss.WIFI_TX_DROPPED]:e.wifi_tx_dropped_na+e.wifi_tx_dropped_ng+e.wifi_tx_dropped_6e};default:return{[O.Ss.NUM_STA]:0,[O.Ss.RX_BYTES]:0,[O.Ss.TX_BYTES]:0,[O.Ss.TX_RETRIES]:0,[O.Ss.WIFI_TX_ATTEMPTS]:0,[O.Ss.WIFI_TX_DROPPED]:0}}})(o,a),m=(c[O.Ss.TX_BYTES]||0)/s,_=(c[O.Ss.RX_BYTES]||0)/s,E=(0,f.lD)(c[O.Ss.TX_RETRIES],c[O.Ss.WIFI_TX_ATTEMPTS],c[O.Ss.WIFI_TX_DROPPED]),d=c[O.Ss.NUM_STA];!r[ee.DOWNLOAD]&&_&&(r[ee.DOWNLOAD]=!0),!r[ee.UPLOAD]&&m&&(r[ee.UPLOAD]=!0),!r[ee.TX_RETRIES]&&E&&(r[ee.TX_RETRIES]=!0),!r[ee.CLIENTS]&&d&&(r[ee.CLIENTS]=!0);const u={[ee.DOWNLOAD]:_,[ee.UPLOAD]:m,[ee.TX_RETRIES]:E,[ee.CLIENTS]:d,[O.Ss.DURATION]:l};return e[ee.DOWNLOAD].push({x:t,y:_,custom:u}),e[ee.UPLOAD].push({x:t,y:m,custom:u}),e[ee.TX_RETRIES].push({x:t,y:E,custom:u}),e[ee.CLIENTS].push({x:t,y:d,custom:u}),e},{[ee.DOWNLOAD]:[],[ee.UPLOAD]:[],[ee.TX_RETRIES]:[],[ee.CLIENTS]:[]}),availableChartData:r}});var le=a(282637),se=a(670),ce=a(438369),me=a(137298);const _e={[ee.DOWNLOAD]:"aqua-06",[ee.UPLOAD]:"purple-06",[ee.TX_RETRIES]:"orange-06",[ee.CLIENTS]:"neutral-04"},Ee=({timestamp:e,values:{[ee.DOWNLOAD]:t=0,[ee.UPLOAD]:a=0,[ee.TX_RETRIES]:r=0,[ee.CLIENTS]:o=0},interval:l})=>{const{themeName:s}=(0,E.u)();return n.createElement(x.A,{width:"100%",flexDirection:"column",gap:R.kc},n.createElement(y.XF,{timestamp:e,interval:l}),n.createElement(x.A,{flexDirection:"column"},n.createElement(y.m0,{translationId:"COMMON_DOWNLOAD",value:n.createElement(n.Fragment,null,n.createElement(se.A.Icon,{size:"small"}),n.createElement(i.A,{size:"small",color:"traffic-down"},(0,me.zX)(t))),valueColor:_e[ee.DOWNLOAD],pip:n.createElement(le.Ay,{color:d.Ay[`desktop-color-${_e[ee.DOWNLOAD]}-${s}`]})}),n.createElement(y.m0,{translationId:"COMMON_UPLOAD",value:n.createElement(n.Fragment,null,n.createElement(ce.A.Icon,{size:"small"}),n.createElement(i.A,{size:"small",color:"traffic-up"},(0,me.zX)(a))),valueColor:_e[ee.UPLOAD],pip:n.createElement(le.Ay,{color:d.Ay[`desktop-color-${_e[ee.UPLOAD]}-${s}`]})}),n.createElement(y.m0,{translationId:"COMMON_TX_RETRIES",value:(0,j.A)(Math.round(r)),valueColor:_e[ee.TX_RETRIES],pip:n.createElement(le.Wx,{color:d.Ay[`desktop-color-${_e[ee.TX_RETRIES]}-${s}`]})}),n.createElement(y.m0,{translationId:"COMMON_CLIENTS",value:o,valueColor:_e[ee.CLIENTS],pip:n.createElement(le.In,{color:d.Ay[`desktop-color-${_e[ee.CLIENTS]}-${s}`]})})))},de={[ee.DOWNLOAD]:!0,[ee.UPLOAD]:!0,[ee.TX_RETRIES]:!0},ue={[ee.UPLOAD]:!0,[ee.DOWNLOAD]:!0},Te=({dataRange:e,radio:t,mac:a=O.TE.ALL,maxY:r=w.Rg,preset:i=O.sw.ONE_DAY})=>{const o=(0,n.useRef)(null),l=(0,n.useRef)(null),{width:s=0,height:c=0}=(0,X.A)({ref:l}),{grain:m}=(0,n.useMemo)(()=>(0,F.$V)(e.startDate,e.endDate,!0,!0),[e.endDate,e.startDate]),{start:u,end:T}=(0,n.useMemo)(()=>(0,G.Qi)(e.startDate,e.endDate,m),[e.endDate,m,e.startDate]),p=(0,K.A)(u,T,s,!1,i),{motifPalette:A,themeName:S}=(0,E.u)(),h=(0,_.useSelector)(re.zi),I=(0,n.useRef)({minTop:0,maxTop:0}),{availableChartData:g,...D}=(0,_.useSelector)(oe(a,e,t)),{maxY2Value:M,maxClientY:L,...v}=(0,n.useMemo)(()=>{const{[ee.DOWNLOAD]:e,[ee.UPLOAD]:t,[ee.TX_RETRIES]:a,[ee.CLIENTS]:n}=D,r=D[ee.DOWNLOAD]?.length||0,i=Math.min(r,64),o=(T-u)/i,l=n.reduce((e,{y:t})=>Math.max(e,t),0),s=l<35?40:100*Math.ceil((l+1)/100),c=100/s,_=Math.max(...e.map(e=>e.y),...t.map(e=>e.y));return{[ee.DOWNLOAD]:(0,P.Hf)(e,m),[ee.UPLOAD]:(0,P.Hf)(t,m),[ee.TX_RETRIES]:(0,P.Hf)(a,m),[ee.CLIENTS]:(0,ie.OF)(n.map(e=>({...e,num_sta:Math.round(e.y*c)})),u,o,c,i,4),interval:o,maxY2Value:_,maxClientY:s}},[D,T,u,m]),b=(0,n.useMemo)(()=>(0,ne.Y)(Math.ceil(1.1*M),3).map(({value:e},t)=>{const a=Intl.NumberFormat(h,{notation:"compact"}).formatToParts(+e);return t?{value:e,label:a.filter(e=>"compact"!==e.type).map(e=>e.value).join("")}:{value:e,label:a[a.length-1].value}}),[h,M]),W=(0,n.useMemo)(()=>[{value:L,label:n.createElement("g",{transform:"translate(0 -10)"},n.createElement(ae.A,null))},{value:L/2,label:Math.round(L/2)},{value:0,label:0}],[L]),U=(0,n.useCallback)(({top:e,left:t,x:a,hidden:r,custom:i={}},o)=>{const l=Object.entries(g).find(([e,t])=>de[e]&&t&&!!i?.[e])?.[0]||ee.DOWNLOAD,_=Number(b[0]?.value),E=Object.entries({[ee.DOWNLOAD]:i[ee.DOWNLOAD]||0,[ee.UPLOAD]:i[ee.UPLOAD]||0,[ee.TX_RETRIES]:i[ee.TX_RETRIES]||0}).reduce((e,[t,a])=>(e.push(ue[t]?a/_*100:a),e),[]).filter(Boolean),u=E.length?Math.min(...E):0,T=E.length?Math.max(...E):0;I.current={maxTop:c-Math.round(T*c/w.Rg),minTop:c-Math.round(u*c/w.Rg)};const p=(0,f.lZ)(I.current.maxTop,I.current.minTop,e);return n.createElement(y.JM,{top:e,left:t,hidden:r,chartWidth:s,chartHeight:c,timestamp:a,interval:m,tooltipTopPositionCompensator:p,lineStart:I.current.maxTop,lineEnd:I.current.minTop,values:i,innerColor:d.Ay[`desktop-color-${_e[o]}-${S}`],tooltipRenderCondition:l===o,TooltipComponent:Ee,zIndex:N.A["desktop-zindex-modal"]})},[c,s,m,A]),$=(0,n.useCallback)(e=>t=>U(t,e),[U]),k=(0,n.useCallback)((e,t,a,i,l)=>n.createElement(n.Fragment,null,g[ee.CLIENTS]?n.createElement(te.A,{data:v[ee.CLIENTS].length?v[ee.CLIENTS]:[],getCoordinates:e,color:d.Ay[`desktop-color-${_e[ee.CLIENTS]}-${S}`],hideStroke:!0,disableHoverHighlight:!0,width:l.width,height:l.height,stackedBarSpacing:1,variant:"stacked",barFullWidth:!0,key:v[ee.CLIENTS].length+r}):null,g[ee.DOWNLOAD]?n.createElement(C.A,{data:v[ee.DOWNLOAD],forY2Axis:!0,maxY:r,mouseData:t,getCoordinates:e,lineColor:d.Ay[`desktop-color-${_e[ee.DOWNLOAD]}-${S}`],variant:"line",interpolation:"linear",hideMissingDataLine:!0,tooltipPortal:o?o.current:void 0,renderTooltip:$(ee.DOWNLOAD)}):null,g[ee.UPLOAD]?n.createElement(C.A,{data:v[ee.UPLOAD],forY2Axis:!0,maxY:r,mouseData:t,getCoordinates:e,lineColor:d.Ay[`desktop-color-${_e[ee.UPLOAD]}-${S}`],variant:"line",interpolation:"linear",hideMissingDataLine:!0,tooltipPortal:o?o.current:void 0,renderTooltip:$(ee.UPLOAD)}):null,g[ee.TX_RETRIES]?n.createElement(C.A,{data:v[ee.TX_RETRIES],maxY:r,mouseData:t,getCoordinates:e,lineColor:d.Ay[`desktop-color-${_e[ee.TX_RETRIES]}-${S}`],variant:"line",dashed:!0,interpolation:"linear",hideMissingDataLine:!0,tooltipPortal:o?o.current:void 0,renderTooltip:$(ee.TX_RETRIES)}):null),[A,$,v]);return n.createElement(x.A,{flexDirection:"row",justifyContent:"space-between",gap:R.kc},n.createElement(V.Ay,{maxY:r,xAxis:p,y2Axis:b,tooltipContainerRef:o,chartRef:l},k),n.createElement(V.pd,{axisItems:W,paddingBottom:V.N1,alignItems:"flex-start"}))};var pe=a(592510),Ae=a(367032),Se=a(6510),Re=a(6802),he=a(773412),xe=a(718073),Ie=a(132196);const Oe=(0,c.A)(he.A)`
  width: 100%;
  max-width: 100%;
  margin: 0;
`,ge=Ie.AH`
  min-width: 246px;
`,De=({selfRx:e=0,selfTx:t=0,interference:a=0,total:r=0,showTooltip:i})=>{const{themeName:o}=(0,E.u)(),l=(0,n.useMemo)(()=>[{color:d.Ay[`desktop-color-${U.x[W.i.THIS_AP]}-${o}`],value:e+t},{color:d.Ay[`desktop-color-${U.x[W.i.INTERFERENCE]}-${o}`],value:a}],[e,t,a,o]);return n.createElement(xe.A,{className:ge,description:i?n.createElement(q,{airtime:r,interference:a,thisAp:t+e}):void 0},n.createElement(Oe,{items:l,height:8,rounded:!0}))};var Me=a(592563),Le=a(758649),fe=a(984652),Ce=a(582724),Ne=a(239417),Pe=a(939703),Xe=a(343651),we=a(229817);const ye=[{dBm:-90,color:"red-05"},{dBm:-75,color:"orange-06"},{dBm:-60,color:"lime-05"},{dBm:-45,color:"green-04"},{dBm:-30,color:"green-06"}].sort((e,t)=>e.dBm-t.dBm),ve=c.A.div`
  min-height: 16px;
  display: flex;
  background-color: ${({color:e,inactive:t,theme:{themeName:a}})=>(0,Pe.b_)(d.Ay[`desktop-color-${e}-${a}`],t?.1:1)};
  border-radius: ${d.Ay["desktop-radius-base"]};
  flex: 1;
  align-items: center;
  justify-content: center;
  user-select: none;
`,be=({item:e={},onSegmentSelect:t})=>n.createElement(x.A,{flexDirection:"column",alignItems:"flex-start",gap:R.YC},(e.clients||[]).slice(0,5).map(e=>n.createElement(we.A,{key:e.mac,mac:e.mac})),(e.clients||[]).length>5?n.createElement(Le.A,{variant:"inline",size:"small",onClick:()=>t(e)},n.createElement(i.A,{size:"small",color:"inherit"},n.createElement(I.sA,{id:"COMMON_VIEW_ALL"}))):null),Fe=({item:e={},item:{clients:t=[],dBm:a,color:r}={},onSegmentSelect:o})=>n.createElement(x.A,{flexDirection:"column",gap:R.YC,width:"100%",position:"relative"},n.createElement(xe.A,{description:t.length>0?n.createElement(be,{item:e,onSegmentSelect:o}):null},n.createElement(Me.A,{onPress:(0,n.useCallback)(()=>o(e),[o,e]),isDisabled:!t.length},n.createElement(ve,{color:r,inactive:!t.length},t.length>0?n.createElement(i.A,{size:"small",color:"neutral-inverse"},t.length):null))),n.createElement(x.A,{flex:1,alignItems:"center",justifyContent:"center"},n.createElement(i.A,{size:"small",color:"text-3"},a))),We=({clients:e=[],onSegmentSelect:t})=>{const a=(0,n.useMemo)(()=>ye.map((t,a)=>{const n=[t.dBm,ye[a+1]?.dBm||1/0];return{...t,clients:e.filter(e=>e.signal>=n[0]&&e.signal<n[1]),range:n}}),[e]);return n.createElement(x.A,{flexDirection:"column",gap:R.YC},n.createElement(i.A,{size:"small",color:"text-3"},n.createElement(I.sA,{id:"DEVICE_ACTIVE_CLIENT_DISTRIBUTION"})),n.createElement(x.A,{gap:2},a.map(e=>n.createElement(Fe,{key:e.dBm,item:e,onSegmentSelect:t}))))},Ue=({mac:e,band:t})=>{const a=(0,_.useSelector)((0,n.useMemo)(()=>(0,Ne.A5)(e),[e])),r=(0,n.useMemo)(()=>t?a.filter(e=>e.radio===t):a,[a,t]),{navigateToApClients:i}=(0,Xe.A)(),o=(0,n.useCallback)(a=>{i([e],[t],a?.range)},[i,e,t]);return(0,Ce.A)([(0,fe.$3)(void 0,{crudCacheStrategy:{type:pe.e.CACHE}})],n.createElement(We,{clients:r,onSegmentSelect:o}))};var $e=a(234185),ke=a(6176);const Be=A.E[L.l.ONE_DAY].getRange(new Date),Ye=(0,c.A)(x.A,(0,S.A)("isOnline"))`
  opacity: ${({isOnline:e})=>e?1:.5};
`,He=({radioTableEntry:e,radioTableEntry:{radio:t,name:a},device:c,device:{radio_table_stats:A,vap_table:S,mac:L},showBand:C,showDeviceHeader:N,isInWindow:P=!1})=>{const{themeName:X}=(0,E.u)(),w=(0,_.useDispatch)(),[y,v]=(0,n.useState)(!1),b=(A||[]).find(e=>e.radio===t&&e.name===a)||{},{selfRx:F=0,selfTx:W=0,interference:U=0,total:$=0}=(0,M.Lm)(A,b)||{},k=(0,g.sc7)((0,D.S9)(c)),{tx_mcast:B=0,rx_mcast:H=0,tx_bcast:z=0,rx_bcast:V=0,tx_packets:G=0,rx_packets:K=0,bssid:j,bw:q}=(S||[]).find(e=>e.radio===t&&e.radio_name===a)||{},Z=(0,M.TP)((0,f.Wo)(B+H+z+V,G,K),W,F,U);return(0,n.useEffect)(()=>{w((0,Y.e9)({start:Be.startDate,end:Be.endDate,mac:L},(0,M.M1)(c.radio_table),{crudCacheStrategy:{type:pe.e.CACHE}}))},[b]),n.createElement(x.A,{flexDirection:"column",gap:R.kc},N?n.createElement(x.A,{justifyContent:"space-between",alignItems:"center"},n.createElement(x.A,{gap:R.YC},n.createElement(ke.A,{model:c.model,width:20,height:20}),n.createElement(i.A,{size:"medium",color:"text-1"},(0,Se.Lm)(c.model))),P?null:n.createElement($e.A,{onClick:()=>v(!0),isDisabled:y})):null,n.createElement(Ye,{isOnline:k,gap:R.YC,justifyContent:"flex-start",flexDirection:"column",minWidth:"fit-content",flex:1,marginTop:!N&&P?R.Ln:0},n.createElement(x.A,{justifyContent:"space-between",gap:R.kc},n.createElement(x.A,{flex:"1 1 auto",alignItems:"center",gap:R.kc,whiteSpace:"nowrap"},C?n.createElement(o.A,{variant:"small",color:k?"text-1":"text-3"},n.createElement(h.A,{radio:t})):null,b?.channel?n.createElement(i.A,{color:"text-3",size:"small"},n.createElement(I.sA,{id:"COMMON_CHANNEL"}),": ",b.channel," (",(0,M.Aq)(e,{bw:q})," ",n.createElement(I.sA,{id:"COMMON_UNIT_MHZ"}),")"):null),n.createElement(x.A,{gap:R.kc,alignItems:"center"},(0,M.Ww)(e)?n.createElement(i.A,{color:"text-3",size:"small"},n.createElement(I.sA,{id:"COMMON_DISABLED"})):j?n.createElement(i.A,{color:"text-3",size:"small"},n.createElement(I.sA,{id:"COMMON_BSSID"}),": ",j):null,N||P?null:n.createElement($e.A,{onClick:()=>v(!0),isDisabled:y}))),n.createElement(x.A,{flexDirection:"column",gap:R.kc,width:"100%"},n.createElement(De,{selfRx:F,selfTx:W,interference:U,total:$,showTooltip:!!b?.channel}),k?n.createElement(x.A,{gap:R.kc,flexDirection:"column"},void 0!==b?.cu_total?n.createElement(x.A,{flex:"1 1 auto",whiteSpace:"nowrap"},n.createElement(i.A,{color:"text-3",size:"medium"},n.createElement(I.sA,{id:"DEVICE_LIVE_AIRTIME"}),": ",n.createElement(r.A,{size:"body",color:"tertiary",type:"percent",weight:"bold",input:Math.min(b.cu_total,100)/100}))):null,Z===M.tH.WARNING?n.createElement(m.A,{type:"warning",text:n.createElement(i.A,{size:"medium",color:"text-2"},n.createElement(I.sA,{id:"DEVICE_MULTICAST_WARNING"}))}):null):null,n.createElement(x.A,{paddingBottom:R.kc},n.createElement(Q,{radio:t,mac:L,dataRange:Be,preset:O.sw.ONE_DAY,customBackgroundColor:P?d.Ay[`desktop-color-window-bg-${X}`]:void 0})),n.createElement(Ue,{mac:L,band:t}),n.createElement(Te,{radio:t,mac:L,dataRange:Be,preset:O.sw.ONE_DAY}))),P?null:n.createElement(l.p.Root,{isOpen:y,onOpenChange:v},n.createElement(s.A,null,n.createElement(T.A.Provider,{value:Ae.J},n.createElement(p.A.Provider,{value:Ae.J},n.createElement(E.a,{theme:Re.Ay},n.createElement(u.A,{motif:Ae.J.motif},n.createElement(He,{radioTableEntry:e,device:c,isInWindow:!0,showDeviceHeader:!0,showBand:!0}))))))))},ze=He},572112:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(779005);const r={[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}},i={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)"}}},o={...r,...i,SIDE_NAVIGATION_BREAKPOINT_UP:"(min-width: 601px)",SIDE_NAVIGATION_BREAKPOINT_DOWN:"(max-width: 600px)",VIEWPORT_XS:`(max-width: ${r[n.L.XS].TO}px)`,VIEWPORT_S:`(min-width: ${r[n.L.S].FROM}px) and (max-width: ${r[n.L.S].TO}px)`,VIEWPORT_SM:`(min-width: ${r[n.L.SM].FROM}px) and (max-width: ${r[n.L.SM].TO}px)`,VIEWPORT_M:`(min-width: ${r[n.L.M].FROM}px) and (max-width: ${r[n.L.M].TO}px)`,VIEWPORT_ML:`(min-width: ${r[n.L.ML].FROM}px) and (max-width: ${r[n.L.ML].TO}px)`,VIEWPORT_L:`(min-width: ${r[n.L.L].FROM}px) and (max-width: ${r[n.L.L].TO}px)`,VIEWPORT_XL:`(min-width: ${r[n.L.XL].FROM}px) and (max-width: ${r[n.L.XL].TO}px)`,VIEWPORT_XXL:`(min-width: ${r[n.L.XXL].FROM}px)`,VIEWPORT_XS_UP:`(min-width: ${r[n.L.S].FROM}px)`,VIEWPORT_S_UP:`(min-width: ${r[n.L.SM].FROM}px)`,VIEWPORT_SM_UP:`(min-width: ${r[n.L.M].FROM}px)`,VIEWPORT_M_UP:`(min-width: ${r[n.L.ML].FROM}px)`,VIEWPORT_ML_UP:`(min-width: ${r[n.L.L].FROM}px)`,VIEWPORT_L_UP:`(min-width: ${r[n.L.XL].FROM}px)`,VIEWPORT_XL_UP:`(min-width: ${r[n.L.XXL].FROM}px)`,VIEWPORT_S_DOWN:`(max-width: ${r[n.L.S].TO}px)`,VIEWPORT_SM_DOWN:`(max-width: ${r[n.L.SM].TO}px)`,VIEWPORT_M_DOWN:`(max-width: ${r[n.L.M].TO}px)`,VIEWPORT_ML_DOWN:`(max-width: ${r[n.L.ML].TO}px)`,VIEWPORT_L_DOWN:`(max-width: ${r[n.L.L].TO}px)`,VIEWPORT_XL_DOWN:`(max-width: ${r[n.L.XL].TO}px)`,VIEWPORT_XXL_DOWN:`(max-width: ${r[n.L.XXL].TO}px)`}},632017:(e,t,a)=>{a.d(t,{P:()=>l});var n=a(572112),r=a(546391),i=a(584916);const o=e=>e>=n.A.XXL.TO?25:e>=n.A.L.TO?13:e>=n.A.M.TO?7:4,l={[i.l.ONE_HOUR]:{frequency:o,label:({index:e,value:t,selfHourCycle:a,documentWidth:n,formatMessage:r,siteTimezone:i,language:l})=>e!==o(n)-1?new Intl.DateTimeFormat(l,{hourCycle:a,hour:"numeric",timeZone:i,minute:"numeric"}).format(t):r({id:"COMMON_NOW"})},[i.l.ONE_DAY]:{frequency:o,label:({index:e,value:t,use24HourTime:a,selfHourCycle:n,siteTimezone:r,language:i,documentWidth:l,formatMessage:s})=>e!==o(l)-1?new Intl.DateTimeFormat(i,{hourCycle:n,hour:"numeric",minute:"numeric",timeZone:r,...a&&{minute:"numeric"}}).format(t).toUpperCase():s({id:"COMMON_NOW"})},[i.l.ONE_WEEK]:{frequency:()=>7,label:({value:e,language:t})=>new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)},[i.l.ONE_MONTH]:{frequency:(e,t)=>Math.ceil(t/(e>=n.A.XXL.TO?1:e>=n.A.M.TO?2:4)),label:({value:e,language:t})=>new Intl.DateTimeFormat(t,{month:"short",day:"numeric"}).format(e)},[i.l.TWELVE_HOURS]:{frequency:()=>12,label:({value:e,selfHourCycle:t,siteTimezone:a,language:n})=>new Intl.DateTimeFormat(n,{hourCycle:t,hour:"numeric",timeZone:a}).format(e)},[i.l.SIX_HOURS]:{frequency:()=>6,label:({value:e,selfHourCycle:t,siteTimezone:a,language:n})=>new Intl.DateTimeFormat(n,{hourCycle:t,hour:"numeric",timeZone:a}).format(e)},[i.l.THIRTY_MINUTES]:{frequency:()=>6,label:({value:e,selfHourCycle:t,siteTimezone:a,language:n})=>new Intl.DateTimeFormat(n,{hourCycle:t,hour:"numeric",minute:"numeric",timeZone:a}).format(e)},[i.j]:{frequency:()=>10,label:({value:e,selfHourCycle:t,siteTimezone:a,language:n})=>new Intl.DateTimeFormat(n,{hourCycle:t,timeZone:a,month:"short",day:"numeric",hour:"numeric",minute:"numeric"}).format(e).replace(r.sO,e=>e.toUpperCase())}}},638334:(e,t,a)=>{a.d(t,{I:()=>i,w:()=>r});var n=a(945132);const r=(e,t)=>Math.floor(Math.abs(new Date(t).getTime()-new Date(e).getTime())/n.jU),i=(e,t)=>Math.floor(Math.abs(t-e)/n.jU)},779005:(e,t,a)=>{var n;a.d(t,{L:()=>n}),function(e){e.XS="XS",e.S="S",e.SM="SM",e.M="M",e.ML="ML",e.L="L",e.XL="XL",e.XXL="XXL"}(n||(n={}))},800828:(e,t,a)=>{a.d(t,{A:()=>u});var n=a(469733),r=a(296540),i=a(195462),o=a(282556),l=a(638334),s=a(632017),c=a(699784),m=a(602021),_=a(198494),E=a(584916),d=a(290480);const u=(e,t,a,u=!1,T=d.sw.ONE_DAY)=>{const p=s.P[E.j],{formatMessage:A}=(0,c.tz)(),S=(0,n.useSelector)(m.hq),R=(0,n.useSelector)(o.zi),h=(0,n.useSelector)(_.BQ),x=(0,n.useSelector)(_.jc),I=(0,l.I)(e,t);return(0,r.useMemo)(()=>{return n=e,r=t,(e=>(0,i.v)([n,r],(s.P[e]??p).frequency(a,I)).map((t,n)=>({label:u?void 0:(s.P[e]??p).label({index:n,value:t,selfHourCycle:h,use24HourTime:x,documentWidth:a,siteTimezone:S,language:R,formatMessage:A}),value:t})))(T);var n,r},[e,t,T,p,a,I,u,h,x,S,R,A])}},853699:(e,t,a)=>{a.d(t,{$V:()=>l,UE:()=>o,Vi:()=>s});var n=a(741494),r=a.n(n),i=a(874734);const o={NONE:{url:null,grain:null,grainInSeconds:null,translationKey:null},MINUTES:{url:i.FE.MINUTES,grain:3e5,grainInSeconds:300,translationKey:"GRANULARITY_5_MINUTES"},HOURLY:{url:i.FE.HOURLY,grain:36e5,grainInSeconds:3600,translationKey:"GRANULARITY_HOURLY"},DAILY:{url:i.FE.DAILY,grain:864e5,grainInSeconds:86400,translationKey:"GRANULARITY_DAILY"},MONTHLY:{url:i.FE.MONTHLY,grain:2592e6,grainInSeconds:2592e3,translationKey:"GRANULARITY_MONTHLY"}},l=(e,t,a,n)=>{const i=r()(t,e);return a&&(i<1||n&&i<=1)?o.MINUTES:i<=7?o.HOURLY:i<120?o.DAILY:o.MONTHLY},s=(e,t)=>{switch(e){case i.FE.DAILY:return`1${t({id:"COMMON_UNIT_D"})}`;case i.FE.HOURLY:return`1${t({id:"COMMON_UNIT_H"})}`;case i.FE.MINUTES:return`5${t({id:"COMMON_UNIT_MIN"})}`;default:return""}}},991295:(e,t,a)=>{a.d(t,{E:()=>u,JM:()=>A,XF:()=>p,m0:()=>T});var n=a(469733),r=a(296540),i=a(217439),o=a(282556),l=a(945132),s=a(566723),c=a(13994),m=a(294303),_=a(699784),E=a(602021),d=a(198494);const u=199,T=({translationId:e,value:t,pip:a,valueWeight:n,valueColor:o="text-3"})=>r.createElement(m.A,{justifyContent:"space-between"},r.createElement(m.A,{gap:s.YC,alignItems:"center"},a,r.createElement(i.A,{size:"small",color:"text-1"},r.createElement(_.sA,{id:e}))),r.createElement(i.A,{size:"small",color:o,weight:n},t)),p=({timestamp:e,interval:t})=>{const a=(0,n.useSelector)(E.hq),c=(0,n.useSelector)(o.zi),_=(0,n.useSelector)(d.BQ),u=t>=l.jU;return r.createElement(m.A,{justifyContent:"space-between",whiteSpace:"nowrap",gap:s.Ln},r.createElement(i.A,{size:"small",color:"text-2"},new Intl.DateTimeFormat(c,{day:u?"numeric":void 0,month:u?"short":void 0,hour:"numeric",minute:"numeric",hourCycle:_,timeZone:a}).format(e||0)," - ",new Intl.DateTimeFormat(c,{day:u?"numeric":void 0,month:u?"short":void 0,hour:"numeric",minute:"numeric",hourCycle:_,timeZone:a}).format((e||0)+Number(t))))};function A({top:e,left:t,chartWidth:a,chartHeight:n,innerColor:i,hidden:o,timestamp:l,values:s,lineStart:_,lineEnd:E,interval:d,tooltipTopPositionCompensator:T,tooltipRenderCondition:p,zIndex:A,TooltipComponent:S}){return r.createElement(r.Fragment,null,r.createElement(c.A,{width:u,topA:e,leftA:t,topB:T,leftB:_&&E?void 0:t,chartWidth:a,chartHeight:n,hidden:o,description:r.createElement(S,{timestamp:l,values:s,interval:d}),innerColor:i,tooltipRenderCondition:p,tooltipProps:{zIndex:A}}),p&&!o&&_&&E?r.createElement(m.A,{zIndex:1,borderLeft:"2px dashed white",top:Math.min(_,E),height:Math.abs(_-E),left:t-1,position:"absolute"}):null)}}}]);