"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[80099,89965],{86571:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(296540),a=n(217439),l=n(699784);const i=({id:e,children:t,values:n})=>r.createElement(a.A,{color:"text-1",weight:"bold",size:"medium"},e?r.createElement(l.sA,{id:e,values:n}):null,t)},205830:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(296540),a=n(217439),l=n(83438),i=n(566723),o=n(294303),c=n(699784),m=n(780811),d=n(360113);const s=({sys_stats:e,flexProps:t,withTooltip:n,compact:s=!1})=>{const E=(0,m.eiG)(e);return E?r.createElement(d.A,{flexProps:t,compact:s},r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(c.sA,{id:"COMMON_LOAD_AVERAGE"})),n?r.createElement(o.A,{alignItems:"center",gap:i.YC},r.createElement(a.A,{color:"text-3",size:"medium"},E),r.createElement(l.A,{description:r.createElement(c.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE_TOOLTIP"}),placement:"top left"})):r.createElement(a.A,{color:"text-3",size:"medium"},E)):null}},224948:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(296540),a=n(217439),l=n(71479),i=n(566723),o=n(294303),c=n(689965);const m=(0,l.A)("div")`
  margin-right: ${i.kc};
`,d=(0,l.A)("div")`
  margin-left: ${i.kc};
`,s=({icon:e,closeIcon:t,nested:n,children:l,...i})=>r.createElement(c.A,{nested:n,...i},r.createElement(o.A,null,r.createElement(m,null,e),r.createElement(a.A,{size:"medium"},l),t?r.createElement(d,null,t):null))},269611:(e,t,n)=>{n.d(t,{n:()=>o});var r=n(469733),a=n(602197),l=n(532419),i=n(211368);const o=(e,t)=>{const n=(0,r.useSelector)(l.CC),o=t.uplink_mac?n.find(({mac:e})=>e===t.uplink_mac):void 0,c=Boolean(t.signal);return i.q[e]===a.g.CONNECTED&&o&&c?o:void 0}},360113:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),a=n(71479),l=n(566723),i=n(294303);const o=(0,a.A)(i.A,{shouldForwardProp:e=>!["valueMaxWidth","keyMinWidth","compact"].includes(e)})`
  &:not(:last-child) {
    ${({compact:e})=>e?"":`margin-bottom: ${l.kc};`}
  }
  & > {
    &:nth-child(1) {
      min-width: ${({keyMinWidth:e})=>e}px;
    }
    &:nth-child(2) {
      max-width: ${({valueMaxWidth:e})=>e}px;
    }
  }
`,c=({children:e,valueMaxWidth:t=215,keyMinWidth:n=0,flexProps:a={},compact:i=!1})=>r.createElement(o,{width:"100%",justifyContent:"space-between",gap:l.kc,height:i?void 0:24,valueMaxWidth:t,keyMinWidth:n,compact:i,...a},e)},580099:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ue});var r=n(296540),a=n(566723),l=n(927099),i=n(777916),o=n(231755),c=n(71479);const m=e=>{let t=parseFloat(`${e}`);return t?(t=Math.min(45,Math.max(t,5)),t=(t-5)/40*99,`${0===t?"0":t.toPrecision(2)}`):""};var d=n(838891),s=n(137298),E=n(294303),A=n(699784),p=n(780811),u=n(360113),g=n(258117),h=n(32753),y=n(205830);const _=(0,c.A)(o.A)`
  margin-top: ${a.kc};
  margin-bottom: ${a.Ln};
`,b=(0,c.A)("div")`
  margin-bottom: ${a.kc};
`;var I;!function(e){e.STATION="station",e.ACCESS_POINT="access_point"}(I||(I={}));const O=({activeItem:e,ubbDeviceType:t,pendingAdoption:n})=>{const{mac:a,ip:o,link_capacity:c,uptime:O,has_temperature:x,general_temperature:C,uplink:v}=e,{rssi:T,tx_rate:f,tx_packets:N,rx_rate:D,tx_bytes:R,"tx_bytes-r":k,rx_packets:P,rx_bytes:$,"rx_bytes-r":M}=v||{},w=M+k;return r.createElement(E.A,{flexDirection:"column"},a&&r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"COMMON_MAC_ADDRESS"})),r.createElement(l.A,{color:"tertiary",size:"body"},a)),o&&r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"COMMON_IP_ADDRESS"})),r.createElement(l.A,{color:"tertiary",size:"body"},o)),!n&&r.createElement(r.Fragment,null,void 0!==c&&c>0&&r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_CAPACITY"})),r.createElement(i.A,{type:"bytes",color:"tertiary",size:"body",input:(0,s.N8)(c),options:"bitrate"})),x&&!!C&&r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"COMMON_TEMPERATURE"})),r.createElement(l.A,{color:"tertiary",size:"body"},r.createElement(A.sA,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_VALUE",values:{temperature:C}}))),O&&r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"COMMON_UPTIME"})),r.createElement(i.A,{type:"uptime",color:"tertiary",size:"body",input:O})),r.createElement(h.A,{systemStatsMem:e["system-stats"]?.mem}),r.createElement(y.A,{sys_stats:e.sys_stats,withTooltip:!0}),!!v&&r.createElement(r.Fragment,null,r.createElement(_,{orientation:"horizontal"}),r.createElement(b,null,r.createElement(l.A,{color:"primary",weight:"bold",size:"body"},r.createElement(A.sA,{id:(0,p.Daf)(e)?"DEVICE_PROPERTY_DEVICE_WIRELESS":"DEVICE_PROPERTY_DEVICE_WIRED"}))),t===I.STATION&&r.createElement(r.Fragment,null,void 0!==T?r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"COMMON_SIGNAL"})),r.createElement(l.A,{color:"tertiary",size:"body"},m(T)," (",(0,d.A)(T),r.createElement(A.sA,{id:"COMMON_UNIT_DBM"}),")")):null,void 0!==f?r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_RATE"})),r.createElement(i.A,{type:"bytes",color:"tertiary",size:"body",input:(0,s.Zz)(f),options:"bitrate"})):null,void 0!==D?r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"COMMON_RX_RATE"})),r.createElement(i.A,{type:"bytes",color:"tertiary",size:"body",input:(0,s.Zz)(D),options:"bitrate"})):null),t===I.ACCESS_POINT&&r.createElement(g.A,{uplink:v}),r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"DEVICE_PROPERTIES_LABEL_DOWN_PKTS_BYTES"})),r.createElement(l.A,{color:"tertiary",size:"body"},P&&$?r.createElement(r.Fragment,null,P.toLocaleString()," / ",r.createElement(i.A,{type:"bytes",input:$,color:"tertiary",size:"body"})):"0.00 / 0.00")),r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"DEVICE_PROPERTIES_LABEL_UP_PKTS_BYTES"})),r.createElement(l.A,{color:"tertiary",size:"body"},N&&R?r.createElement(r.Fragment,null,N.toLocaleString()," / ",r.createElement(i.A,{type:"bytes",input:R,color:"tertiary",size:"body"})):"0.00 / 0.00")),r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"COMMON_ACTIVITY"})),r.createElement(i.A,{type:"bytes",color:"tertiary",size:"body",input:w,options:"bitrate"})))))};var x=n(128195),C=n(564985),v=n(837612);const T=(0,c.A)("div")`
  &:not(:last-child) {
    margin-bottom: ${({theme:{spacing:e}})=>e["spacing-l"]};
  }
`,f=(0,c.A)(l.A)`
  margin-bottom: 4px;
`,N=(0,c.A)("div")`
  margin-bottom: 16px;
`,D=({activeItem:e})=>(0,v.YP)(e)?r.createElement(T,null,r.createElement(f,{weight:"bold",size:"body"},r.createElement(A.sA,{id:"COMMON_RADIO_BAND_NA"})),r.createElement(x.A,{activeItem:e,radioType:C.sx.RADIO_NA}),r.createElement(N,null),r.createElement(f,{weight:"bold",size:"body"},r.createElement(A.sA,{id:"DEVICE_HEADER_RADIO60G_SHORT"})),r.createElement(x.A,{activeItem:e,radioType:C.sx.RADIO_AD})):null;var R=n(86571),k=n(998837);const P=(0,c.A)("div",{shouldForwardProp:e=>"color"!==e})`
  padding: ${a.YC};
  border-radius: ${a.YC};
  border: 1px solid ${({color:e})=>e};
  color: ${({color:e})=>e};
  line-height: ${a.xO};
`,$=(0,r.memo)(()=>r.createElement(P,{color:(0,k.u)().motifPalette.warning},r.createElement(l.A,{color:"inherit",size:"caption",uppercase:!0,weight:"bold"},r.createElement(A.sA,{id:"COMMON_DEVICE_STATE_CONNECTION_INTERRUPTED"}))));var M=n(689965),w=n(154628),z=n(768195),S=n(602197),L=n(211368),V=n(328787),B=n(770804),W=n(186169),Y=n(888170),U=n(217439),F=n(823858),G=n(574137),K=n(38937),H=n(6510),X=n(224948),j=n(876250),Q=n(6176),q=n(17437);const Z=q.i7`
  0% {
    width: 5%;
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 0;
  }  
`,J=q.i7`
  0% {
    opacity: 1;
  }
  30% {
    opacity: 1;
  }  
  50% {
    opacity: 0;
  }
`,ee=(0,c.A)("div")`
  position: relative;
  width: 100%;
  height: 3px;
  background-color: ${({theme:e})=>e.colors.neutralBackground};
`,te=(0,c.A)("div")`
  animation: ${Z} 5s infinite;
  width: 100%;
  opacity: 1;
  height: 5px;
  margin-top: -1px;
  position: absolute;
  background-image: linear-gradient(
    to right,
    ${({linkAnimationColor:e})=>e},
    transparent 30%,
    transparent 70%,
    ${({linkAnimationColor:e})=>e}
  );
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;

  &:after {
    content: '';
    display: block;
    background-color: ${({linkAnimationColor:e})=>e};
    width: 100%;
    position: absolute;
    border-radius: 3px;
    height: 100%;
    opacity: 0;
    animation: ${J} 5s infinite;
  }
`,ne=({color:e})=>r.createElement(ee,null,r.createElement(te,{linkAnimationColor:e})),re=(0,c.A)("div",{shouldForwardProp:e=>!["color","left","right","height"].includes(e)})`
  position: absolute;
  ${({left:e})=>e?`left: ${e}px`:""};
  ${({right:e})=>e?`right: ${e}px`:""};
  ${({height:e})=>e?`height: ${e}px`:""};
  width: 1px;
  border-radius: 1px;
  background-image: radial-gradient(transparent 0%, ${({color:e})=>e} 60%, transparent 100%);
  filter: drop-shadow(0px 0px 0.5px ${({color:e})=>e}) opacity(0.6);
`,ae=({color:e,model:t,flipped:n=!1})=>{const[a,l]=(0,r.useState)(!1),i=(0,r.useMemo)(()=>((e,t)=>{switch(e){case z.W4.UBB:return{left:t?12:16,height:29};case z.W4.UBBXG:return{left:t?12:17,height:29};default:return}})(t,n),[t,n]),o=(0,r.useCallback)(()=>{l(!0)},[]);return r.createElement(E.A,{position:"relative"},a&&i?r.createElement(re,{color:e||W.A["blue-0"],...i}):null,r.createElement(Q.A,{width:29,height:29,model:t,variant:n?j.Hx.RIGHT_NOPADDING:j.Hx.LEFT_NOPADDING,onLoadCallback:o}))},le=(0,c.A)("div")`
  align-self: stretch;
  border-right: solid 1px
    ${({theme:{motifPalette:{neutral03:e}}})=>e};
  width: 1px;
`,ie=({activeItem:e,activeItem:{peer_ubb:t,led_override_color:n,model:l},pendingAdoption:o})=>{const c=(0,w.Gy)(e),m=(0,K.b5)(c),d=!o&&(0,w.hk)(e),s=!o&&(0,w.Q9)(e),p=(0,r.useMemo)(()=>!o&&!d||"danger"===m?Y.Ay["color-danger"]:o||"warning"===m?Y.Ay["color-warning"]:Y.Ay["color-success"],[m,d,o]);return r.createElement(r.Fragment,null,r.createElement(M.A,null,r.createElement(E.A,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.kc},r.createElement(E.A,{minWidth:48,maxWidth:48,height:"100%",alignItems:"center",justifyContent:"center"},r.createElement(Q.A,{model:l,size:j.Xh.MEDIUM,width:"100%"})),r.createElement(E.A,{flexDirection:"column"},r.createElement(U.A,{weight:"bold",size:"medium",color:"text-1"},(0,H.Q)(e)),r.createElement(E.A,{flexDirection:"row",alignItems:"center"},r.createElement(U.A,{size:"medium"},d?r.createElement(r.Fragment,null,r.createElement(A.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_QUALITY"}),": ",r.createElement(i.A,{type:"percent",input:c/100,style:{color:W.A.getGradientColor(c/100)}})):null,!d&&o?r.createElement(A.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_INACTIVE"}):null,d||o?null:r.createElement(A.sA,{id:"DEVICE_PROPERTY_OVERVIEW_NO_LINK"})))),r.createElement(le,null),r.createElement(E.A,{flex:"0 1 137px",gap:a.kc,justifyContent:"space-between",alignItems:"center"},r.createElement(ae,{color:n,model:l}),r.createElement(ne,{color:p}),r.createElement(ae,{flipped:!0,color:t?.led_override_color,model:l})))),o||s?r.createElement(X.A,{icon:r.createElement(F.A,{size:"original",variant:"fill",color:G.PA.warning})},r.createElement(U.A,null,r.createElement(A.sA,{id:o?"DEVICE_UBB_LINK_INACTIVE_WARNING_MESSAGE":"DEVICE_UBB_LINK_DOWN_WARNING_MESSAGE"}))):null)};var oe=n(999063);const ce=({activeItem:e})=>{const t=(0,w.Gy)(e);return t>0?r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_QUALITY"})),r.createElement(i.A,{size:"body",type:"percent",input:t/100,style:{color:W.A.getGradientColor(t/100)},color:"tertiary"})):null};var me=n(806720),de=n(144367);const se=({throughput:e})=>void 0!==e&&Number.isFinite(e)?r.createElement(u.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(A.sA,{id:"COMMON_LINK_SPEED"})),r.createElement(i.A,{size:"body",type:"bytes",color:"tertiary",input:e,options:"bitrate"})):null,Ee=({activeItem:e,activeItem:{p2p_stats:t,peer_ubb:n}})=>r.createElement(se,{throughput:t?.throughput??((0,p.YdF)(e)&&n?.p2p_stats?.throughput)}),Ae=({activeItem:e,activeItem:{uptime:t}})=>r.createElement(M.A,null,r.createElement(E.A,{height:"100%",flexDirection:"column"},r.createElement(oe.A,{uptime:t}),r.createElement(me.A,{activeItem:e}),r.createElement(Ee,{activeItem:e}),r.createElement(ce,{activeItem:e}),r.createElement(de.A,{activeItem:e})));var pe=n(772317);const ue=({activeItem:e,activeItem:{name:t,mac:n,adopted:l,peer_ubb:i,ip:o,config_network:c,uplink:m,radio_table:d,type:s,shortname:u,state:g}})=>{const h=(0,v.YP)(e),y=i&&(!(0,w.hI)(e)||!h);return r.createElement(r.Fragment,null,r.createElement(ie,{activeItem:e}),r.createElement(V.A,{ip:o,adopted:l,config_network:c}),r.createElement(E.A,{flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",gap:a.YC},L.q[g]===S.g.ADOPTION_FAILED&&r.createElement($,null),m?.type===z.au.WIRELESS?r.createElement(B.A,{uplink:m,type:s,name:t,state:g,mac:n}):null),h?r.createElement(r.Fragment,null,r.createElement(Ae,{activeItem:e}),[e,i].filter(Boolean).map(e=>({id:(0,w.zX)(e)?"accessPoint":"station",openByDefault:!0,label:r.createElement(R.A,null,r.createElement(A.sA,{id:(0,w.zX)(e)?"DEVICE_TYPE_UBB_AP":"DEVICE_TYPE_UBB_STATION"})," ",i?.uplink?r.createElement(A.sA,{id:(0,p.Daf)(e)?"COMMON_WIRELESS":"COMMON_WIRED"}):null),renderContent:()=>r.createElement(O,{activeItem:e,ubbDeviceType:(0,w.zX)(e)?I.ACCESS_POINT:I.STATION,pendingAdoption:y})})).map(e=>r.createElement(M.A,{type:M.I.ACCORDION,items:[e],key:e.id})),!y&&d?.length?r.createElement(M.A,{type:M.I.ACCORDION,items:[{id:"radios",openByDefault:!0,label:r.createElement(R.A,{id:"DEVICE_HEADER_AIR_STATS"}),renderContent:()=>r.createElement(D,{activeItem:e})}]}):null,r.createElement(pe.A,{shortname:u})):null)}},689965:(e,t,n)=>{n.d(t,{A:()=>A,I:()=>r});var r,a=n(296540),l=n(822336),i=n(427853),o=n(71479),c=n(825032),m=n(566723),d=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(r||(r={}));const s=(0,o.A)(d.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||l.Ay[n===c.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>l.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,E=(0,o.A)(i.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||l.Ay[n===c.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||l.Ay[t===c.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${m.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${m.Ln} ${m.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,A=({type:e,marginBottom:t,margin:n,padding:l,flex:i,width:o,nested:c,...m})=>"items"in m?a.createElement(E,{marginBottom:t,margin:n,padding:l,flex:i,nested:c,...m}):a.createElement(s,{nested:c,width:o,marginBottom:t,margin:n,padding:l,flex:i,isButtonList:e===r.BUTTON_LIST,...m},m.children)},770804:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(296540),a=n(217439),l=n(71479),i=n(132196),o=n(566723),c=n(370969),m=n(294303),d=n(699784),s=n(269611);const E=(0,l.A)(m.A,{shouldForwardProp:e=>"alignLeft"!==e})`
  ${({alignLeft:e})=>e?"max-width: 288px;":"max-width: 100%; justify-content: center;"}
  gap: ${o.kc};
  align-items: center;
`,A=i.AH`
  max-width: 50%;
`,p=i.AH`
  flex: 0 1 auto;
  min-width: 0;
`,u=({type:e,name:t,mac:n,uplink:l,state:i,alignLeft:o,smallText:u,disabled:g})=>(0,s.n)(i,l)?r.createElement(E,{alignLeft:o},r.createElement(a.A,{size:u?"small":"medium",color:"text-2"},r.createElement(d.sA,{id:"DEVICE_MESHING_TO"})),r.createElement(m.A,{className:o?p:A},r.createElement(c.E,{device:{type:e,name:t,mac:n,uplink:l},size:u?"small":"medium",disabled:g,maxWidth:120}))):null},999063:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),a=n(927099),l=n(90757),i=n(699784),o=n(360113);const c=({uptime:e,compact:t=!1})=>e>0?r.createElement(o.A,{compact:t},r.createElement(a.A,{color:"secondary",size:"body"},r.createElement(i.sA,{id:"COMMON_UPTIME"})),r.createElement(a.A,{color:"tertiary",size:"body"},(0,l.Ay)(e))):null}}]);