"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[347],{243322(e,t,n){n.d(t,{A:()=>l});var r=n(217439);const l=(0,n(71479).A)(r.A)`
  white-space: nowrap;
`},224948(e,t,n){n.d(t,{A:()=>E});var r=n(296540),l=n(217439),a=n(71479),i=n(566723),o=n(294303),c=n(689965);const m=(0,a.A)("div")`
  margin-right: ${i.kc};
`,s=(0,a.A)("div")`
  margin-left: ${i.kc};
`,E=({icon:e,closeIcon:t,nested:n,children:a,...i})=>r.createElement(c.A,{nested:n,...i},r.createElement(o.A,null,r.createElement(m,null,e),r.createElement(l.A,{size:"medium"},a),t?r.createElement(s,null,t):null))},689965(e,t,n){n.d(t,{A:()=>u,I:()=>r});var r,l=n(296540),a=n(822336),i=n(963724),o=n(71479),c=n(825032),m=n(566723),s=n(294303),E=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(r||(r={}));const d=(0,o.A)(s.A,(0,E.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.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}})=>a.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,A=(0,o.A)(i.A,(0,E.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.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||a.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;
      > div {
        padding: 0 ${m.Ln} ${m.Ln};
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:n,padding:a,flex:i,width:o,nested:c,...m})=>"items"in m?l.createElement(A,{marginBottom:t,margin:n,padding:a,flex:i,nested:c,...m}):l.createElement(d,{nested:c,width:o,marginBottom:t,margin:n,padding:a,flex:i,isButtonList:e===r.BUTTON_LIST,...m},m.children)},551753(e,t,n){n.d(t,{A:()=>p});var r=n(822336),l=n(296540),a=n(758649),i=n(217439),o=n(162420),c=n(823858),m=n(793336),s=n(382389),E=n(46119),d=n(916537),A=n(224948),u=n(294303);const p=(0,l.memo)(({children:e,customIcon:t,link:n,nested:p,extra:_,variant:I="warning",...g})=>{const{themeName:h}=(0,s.u)(),C=(0,l.useMemo)(()=>{switch(I){case"warning":return l.createElement(c.A,{size:"original",color:r.Ay[`desktop-color-orange-06-${h}`],variant:"fill"});case"info":return l.createElement(o.A,{isActive:!0,size:"original",variant:"fill"});case"custom":return t;default:return l.createElement(m.A,{size:"medium",color:r.Ay[`desktop-color-red-06-${h}`],variant:"fill"})}},[I,h,t]),O=(0,l.useCallback)(()=>{E.A.open(n)},[n]);return l.createElement(A.A,{icon:C,nested:p,...g},l.createElement(u.A,{flexDirection:"column",alignItems:"flex-start"},l.createElement(i.A,null,e),l.createElement(i.A,null,n?l.createElement(a.A,{type:"button",variant:"inline",onClick:O},l.createElement(d.sA,{id:"COMMON_LEARN_MORE"})):null),_))})},86571(e,t,n){n.d(t,{A:()=>i});var r=n(296540),l=n(217439),a=n(916537);const i=({id:e,children:t,values:n})=>r.createElement(l.A,{color:"text-1",weight:"bold",size:"medium"},e?r.createElement(a.sA,{id:e,values:n}):null,t)},78853(e,t,n){n.d(t,{A:()=>g});var r,l=n(592563),a=n(296540),i=n(469733),o=n(217439),c=n(187483),m=n(916537),s=n(689965),E=n(86571),d=n(801081);!function(e){e.OPEN_MODAL="openModal"}(r||(r={}));const A=(0,d.Mz)(c.zn,e=>void 0!==e[r.OPEN_MODAL]);var u=n(856632),p=n(957866);const _=({uidbDevice:e})=>{const t=(0,i.useSelector)(c.zn),n=t?.[r.OPEN_MODAL];return n?a.createElement(l.A,{onClick:()=>n(e)},a.createElement(o.A,{size:"medium",color:"inherit"},a.createElement(m.sA,{id:"DEVICE_SHOW_DETAILS"}))):null},I=({shortname:e})=>{(0,p.A)();const t=(0,i.useSelector)((0,a.useMemo)(()=>(0,u.$E)(e),[e]));return t?.compliance?a.createElement(s.A,{type:s.I.ACCORDION,items:[{id:"compliance",label:a.createElement(E.A,{id:"COMMON_COMPLIANCE"}),renderContent:()=>a.createElement(_,{uidbDevice:t}),openByDefault:!0}]}):null},g=({shortname:e})=>(0,i.useSelector)(A)?a.createElement(I,{shortname:e}):null},128195(e,t,n){n.d(t,{A:()=>E});var r=n(296540),l=n(178233),a=n(294303),i=n(678515),o=n(916537),c=n(170459),m=n(321235);const s=({activeItem:{radio_table:e,radio_table_stats:t,type:n,model:s,vap_table:E,stat:d},radioType:A,radioName:u,hideChUtil:p=!1,hideRadio:_=!1})=>{const{formatMessage:I}=(0,o.tz)(),{radio:g,radioStats:h}=(0,r.useMemo)(()=>({radio:e?.find(({radio:e,name:t})=>e===A&&(!u||t===u)),radioStats:t?.find(({radio:e})=>e===A)}),[e,t,u,A]),{channelUtilization:C,transmitPower:O}=(0,r.useMemo)(()=>({channelUtilization:(0,c.Lm)(t,h),transmitPower:(0,c.ZJ)(t,h,I)}),[t,h,I]),{totalPacketsRx:x,totalBytesRx:M,droppedPercentageRx:T,retryPercentageRx:N,totalPacketsTx:y,totalBytesTx:v,droppedPercentageTx:b,retryPercentageTx:R}=(0,r.useMemo)(()=>(({totalPackets:e,totalBytes:t,droppedPercentage:n,retryPercentage:r},{totalPackets:l,totalBytes:a,droppedPercentage:i,retryPercentage:o})=>({totalPacketsRx:e,totalBytesRx:t,droppedPercentageRx:n,retryPercentageRx:r,totalPacketsTx:l,totalBytesTx:a,droppedPercentageTx:i,retryPercentageTx:o}))((0,c.GI)(n,g,"rx",d),(0,c.GI)(n,g,"tx",d)),[n,g,d]);return r.createElement(a.A,{flexDirection:"column"},_?null:r.createElement(m.A,{id:"COMMON_CHANNEL"},g?r.createElement(i.A,{radio_table:e,radio_table_stats:t,model:s,vap_table:E,radio:g,hidePowerInfo:!0,textSize:"medium",textColor:"text-3"}):r.createElement(o.sA,{id:"COMMON_FALLBACK"})),r.createElement(m.A,{id:"DEVICE_PROPERTIES_LABEL_TX_EIRP"},O||r.createElement(o.sA,{id:"COMMON_FALLBACK"})),r.createElement(m.A,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES"},y??r.createElement(o.sA,{id:"COMMON_FALLBACK"})," /"," ",v??r.createElement(o.sA,{id:"COMMON_FALLBACK"})),r.createElement(m.A,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES"},x??r.createElement(o.sA,{id:"COMMON_FALLBACK"})," /"," ",M??r.createElement(o.sA,{id:"COMMON_FALLBACK"})),r.createElement(m.A,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED"},(0,l.l)(R)," / ",(0,l.l)(b)),r.createElement(m.A,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED"},(0,l.l)(N)," / ",(0,l.l)(T)),!p&&C?r.createElement(m.A,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION"},`${C.total}% / ${C.selfRx}% / ${C.selfTx}%`):null)},E=({activeItem:e,...t})=>e?.radio_table?.length?r.createElement(s,{activeItem:e,...t}):null},94313(e,t,n){n.d(t,{A:()=>u});var r=n(296540),l=n(71479),a=n(132196),i=n(311785),o=n(916537),c=n(566723),m=n(294303),s=n(243322);const E=(0,l.A)(m.A,(0,i.A)("alignLeft"))`
  ${({alignLeft:e})=>e?"max-width: 288px;":"max-width: 100%; justify-content: center;"}
  gap: ${c.YC};
  align-items: center;
`,d=a.AH`
  max-width: 50%;
`,A=a.AH`
  flex: 0 1 auto;
  min-width: 0;
`,u=({messageId:e,messageValues:t,buttonEl:n,alignLeft:l=!0,color:a="text-3",variant:i="body-primary"})=>r.createElement(E,{alignLeft:l},r.createElement(s.A,{variant:i,color:a},t?r.createElement(m.A,{maxWidth:288,whiteSpace:"nowrap",paddingRight:c.YC},r.createElement(o.sA,{id:e,values:t})):r.createElement(o.sA,{id:e})),n?r.createElement(m.A,{className:l?A:d},n):null)},708019(e,t,n){n.d(t,{A:()=>c});var r=n(296540),l=n(370969),a=n(780811),i=n(94313),o=n(762334);const c=({type:e,name:t,mac:n,uplink:c,state:m,model:s,disabled:E,alignLeft:d})=>(0,o.n)(m,c)?r.createElement(i.A,{messageId:(0,a.E4T)({model:s})?"COMMON_CONNECTED_TO":"DEVICE_MESHING_TO",alignLeft:d,buttonEl:r.createElement(l.E,{device:{type:e,name:t,mac:n,uplink:c},size:"medium",disabled:E})}):null},762334(e,t,n){n.d(t,{n:()=>o});var r=n(469733),l=n(602197),a=n(532419),i=n(211368);const o=(e,t)=>{const n=(0,r.useSelector)(a.CC),o=t.uplink_mac?n.find(({mac:e})=>e===t.uplink_mac):void 0,c=Boolean(t.signal);return i.q[e]===l.g.CONNECTED&&o&&c?o:void 0}},321235(e,t,n){n.d(t,{A:()=>s});var r=n(296540),l=n(217439),a=n(705145),i=n(71479),o=n(916537),c=n(360113);const m=(0,i.A)(l.A)`
  white-space: nowrap;
`,s=({id:e,color:t,values:n,children:l})=>r.createElement(c.A,null,r.createElement(m,{color:"text-2",size:"medium"},r.createElement(o.sA,{id:e,values:n})),r.createElement(a.A,{color:t||"text-3",size:"medium",isTruncated:!0},l))},144367(e,t,n){n.d(t,{A:()=>A});var r=n(296540),l=n(777916),a=n(217439),i=n(83438),o=n(137298),c=n(566723),m=n(294303),s=n(916537),E=n(780811),d=n(360113);const A=({capacity:e,activeItem:t,withTooltip:n=!1})=>{const A=e??t?.link_capacity??((0,E.YdF)(t)&&t?.peer_ubb?.link_capacity),u=A&&A>0?r.createElement(l.A,{size:"body",type:"bytes",color:"tertiary",input:(0,o.N8)(A),options:"bitrate"}):null;return u?r.createElement(d.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(s.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_CAPACITY"})),n?r.createElement(m.A,{alignItems:"center",gap:c.YC},u,r.createElement(i.A,{description:r.createElement(s.sA,{id:"DEVICE_PROPERTY_OVERVIEW_CAPACITY_TOOLTIP"}),placement:"top start"})):u):null}},806720(e,t,n){n.d(t,{A:()=>_});var r,l=n(469733),a=n(296540),i=n(217439),o=n(916537),c=n(213583);!function(e){e.MM="mm",e.CM="cm",e.M="m",e.KM="km",e.MI="mi",e.FT="ft"}(r||(r={}));const m={[r.MM]:"COMMON_UNIT_DISTANCE_MM",[r.CM]:"COMMON_UNIT_DISTANCE_CM",[r.M]:"COMMON_UNIT_DISTANCE_M",[r.KM]:"COMMON_UNIT_DISTANCE_KM",[r.MI]:"COMMON_UNIT_DISTANCE_MI",[r.FT]:"COMMON_UNIT_DISTANCE_FT"},s=[c.A.US.numericCode,c.A.GB.numericCode,c.A.CA.numericCode,c.A.LR.numericCode,c.A.MM.numericCode],E=(e,t)=>a.createElement(a.Fragment,null,`${e} `,a.createElement(o.sA,{id:m[t]})),d=(e,t,n=0,l=[r.MM,r.CM,r.M,r.KM,r.MI,r.FT])=>((e,t,n,l)=>{if((e=>s.includes(e))(e)){if(t.includes(r.FT)&&l<1610)return E((3.2808399*l).toFixed(n),r.FT);if(t.includes(r.MI))return E((.000621371192*l).toFixed(n),r.MI)}else{if(t.includes(r.MM)&&l<.01)return E((1e3*l).toFixed(n),r.MM);if(t.includes(r.CM)&&l<1)return E((100*l).toFixed(n),r.CM);if(t.includes(r.M)&&l<1e3)return E(l.toFixed(n),r.M);if(t.includes(r.KM))return E((l/1e3).toFixed(n),r.KM)}return a.createElement(a.Fragment,null,`${l}`)})(e,l,n,t);var A=n(302167),u=n(780811),p=n(360113);const _=({distance:e,activeItem:t})=>{const n=(0,l.useSelector)(A.ZZ),r=e??t?.distance??((0,u.YdF)(t)&&t?.peer_ubb?.distance);return r?a.createElement(p.A,null,a.createElement(i.A,{color:"text-2",size:"medium"},a.createElement(o.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_DISTANCE"})),a.createElement(i.A,{color:"text-3",size:"medium"},d(n,r))):null}},205830(e,t,n){n.d(t,{A:()=>E});var r=n(296540),l=n(217439),a=n(83438),i=n(566723),o=n(294303),c=n(916537),m=n(780811),s=n(360113);const E=({sys_stats:e,flexProps:t,withTooltip:n,compact:E=!1})=>{const d=(0,m.eiG)(e);return d?r.createElement(s.A,{flexProps:t,compact:E},r.createElement(l.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(l.A,{color:"text-3",size:"medium"},d),r.createElement(a.A,{description:r.createElement(c.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE_TOOLTIP"}),placement:"top start"})):r.createElement(l.A,{color:"text-3",size:"medium"},d)):null}},32753(e,t,n){n.d(t,{A:()=>c});var r=n(296540),l=n(217439),a=n(916537),i=n(780811),o=n(360113);const c=({systemStatsMem:e,compact:t=!1})=>{const n=(0,i.HBQ)(e);return n?r.createElement(o.A,{compact:t},r.createElement(l.A,{color:"text-2",size:"medium"},r.createElement(a.sA,{id:"DEVICE_PROPERTY_OVERVIEW_MEMORY_USAGE"})),r.createElement(l.A,{color:"text-3",size:"medium"},n,"%")):null}},999063(e,t,n){n.d(t,{A:()=>c});var r=n(296540),l=n(217439),a=n(90757),i=n(916537),o=n(360113);const c=({uptime:e,compact:t=!1})=>e>0?r.createElement(o.A,{compact:t},r.createElement(l.A,{color:"text-2",size:"medium"},r.createElement(i.sA,{id:"COMMON_UPTIME"})),r.createElement(l.A,{color:"text-3",size:"medium"},(0,a.Ay)(e))):null},258117(e,t,n){n.d(t,{A:()=>A});var r=n(296540),l=n(325898),a=n(217439),i=n(71479),o=n(903216),c=n(294303),m=n(916537),s=n(360113),E=n(863489);const d=(0,i.A)(c.A)`
  .tooltip-position-fixer {
    margin-right: -14px;
  }
`,A=({uplink:e,portSpeed:t})=>{const n=Number(t||e?.speed),{motif:i}=(0,l.A)();return n>0?r.createElement(s.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(m.sA,{id:"COMMON_EXPERIENCE"})),r.createElement(d,{alignItems:"center"},r.createElement(a.A,{style:{color:(0,E.xe)(n,i,!1)},size:"medium"},(0,o.ir)(n)))):null}},360113(e,t,n){n.d(t,{A:()=>m});var r=n(296540),l=n(71479),a=n(566723),i=n(294303),o=n(311785);const c=(0,l.A)(i.A,(0,o.A)("valueMaxWidth","keyMinWidth","compact"))`
  &:not(:last-child) {
    ${({compact:e})=>e?"":`margin-bottom: ${a.kc};`}
  }
  & > {
    &:nth-child(1) {
      min-width: ${({keyMinWidth:e})=>e}px;
    }
    &:nth-child(2) {
      max-width: ${({valueMaxWidth:e})=>e}px;
    }
  }
`,m=({children:e,valueMaxWidth:t=215,keyMinWidth:n=0,flexProps:l={},compact:i=!1})=>r.createElement(c,{width:"100%",justifyContent:"space-between",gap:a.kc,height:i?void 0:24,valueMaxWidth:t,keyMinWidth:n,compact:i,...l},e)},328787(e,t,n){n.d(t,{A:()=>d});var r=n(469733),l=n(296540),a=n(149133),i=n(855019),o=n(551753),c=n(916537),m=n(532419),s=n(765562);const E=({adopted:e})=>l.createElement(o.A,{link:s.A.virtualNetworkConnectivity},l.createElement(c.sA,{id:e?"DEVICE_FALLBACK_IP_ADOPTED_WITH_UNIFI_GATEWAY_WARNING":"DEVICE_FALLBACK_IP_NOT_ADOPTED_WARNING",values:{bold:l.createElement("strong",null,l.createElement(c.sA,{id:e?"DEVICE_WARNING_FALLBACK_IP":"DEVICE_WARNING_ADOPTION_FAILED"}))}})),d=({ip:e,adopted:t,config_network:n})=>(0,r.useSelector)(m.m9)&&(0,a.W5)(e)&&n?.type===i.NL.DHCP?l.createElement(E,{adopted:t}):null},580099(e,t,n){n.r(t),n.d(t,{default:()=>pe});var r=n(296540),l=n(566723),a=n(217439),i=n(777916),o=n(231755),c=n(71479);var m=n(838891),s=n(137298),E=n(294303),d=n(916537),A=n(780811),u=n(360113),p=n(258117),_=n(32753),I=n(205830);const g=(0,c.A)(o.A)`
  margin-top: ${l.kc};
  margin-bottom: ${l.Ln};
`,h=(0,c.A)("div")`
  margin-bottom: ${l.kc};
`;var C;!function(e){e.STATION="station",e.ACCESS_POINT="access_point"}(C||(C={}));const O=({activeItem:e,ubbDeviceType:t,pendingAdoption:n})=>{const{mac:l,ip:o,link_capacity:c,uptime:O,has_temperature:x,general_temperature:M,uplink:T}=e,{rssi:N,tx_rate:y,tx_packets:v,rx_rate:b,tx_bytes:R,"tx_bytes-r":f,rx_packets:P,rx_bytes:D,"rx_bytes-r":L}=T||{},k=L+f;return r.createElement(E.A,{flexDirection:"column"},l?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"COMMON_MAC_ADDRESS"})),r.createElement(a.A,{color:"text-3",size:"medium"},l)):null,o?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"COMMON_IP_ADDRESS"})),r.createElement(a.A,{color:"text-3",size:"medium"},o)):null,n?null:r.createElement(r.Fragment,null,void 0!==c&&c>0?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_CAPACITY"})),r.createElement(i.A,{type:"bytes",color:"tertiary",size:"body",input:(0,s.N8)(c),options:"bitrate"})):null,x&&M?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"COMMON_TEMPERATURE"})),r.createElement(a.A,{color:"text-3",size:"medium"},r.createElement(d.sA,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_VALUE",values:{temperature:M}}))):null,O?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"COMMON_UPTIME"})),r.createElement(i.A,{type:"uptime",color:"tertiary",size:"body",input:O})):null,r.createElement(_.A,{systemStatsMem:e["system-stats"]?.mem}),r.createElement(I.A,{sys_stats:e.sys_stats,withTooltip:!0}),T?r.createElement(r.Fragment,null,r.createElement(g,{orientation:"horizontal"}),r.createElement(h,null,r.createElement(a.A,{color:"text-1",weight:"bold",size:"medium"},r.createElement(d.sA,{id:(0,A.Daf)(e)?"DEVICE_PROPERTY_DEVICE_WIRELESS":"DEVICE_PROPERTY_DEVICE_WIRED"}))),t===C.STATION?r.createElement(r.Fragment,null,void 0!==N?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"COMMON_SIGNAL"})),r.createElement(a.A,{color:"text-3",size:"medium"},(e=>{let t=Number.parseFloat(`${e}`);return t?(t=Math.min(45,Math.max(t,5)),t=(t-5)/40*99,`${0===t?"0":t.toPrecision(2)}`):""})(N)," (",(0,m.A)(N),r.createElement(d.sA,{id:"COMMON_UNIT_DBM"}),")")):null,void 0!==y?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_RATE"})),r.createElement(i.A,{type:"bytes",color:"tertiary",size:"body",input:(0,s.Zz)(y),options:"bitrate"})):null,void 0!==b?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"COMMON_RX_RATE"})),r.createElement(i.A,{type:"bytes",color:"tertiary",size:"body",input:(0,s.Zz)(b),options:"bitrate"})):null):null,t===C.ACCESS_POINT?r.createElement(p.A,{uplink:T}):null,r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"DEVICE_PROPERTIES_LABEL_DOWN_PKTS_BYTES"})),r.createElement(a.A,{color:"text-3",size:"medium"},P&&D?r.createElement(r.Fragment,null,P.toLocaleString()," / ",r.createElement(i.A,{type:"bytes",input:D,color:"tertiary",size:"body"})):"0.00 / 0.00")),r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"DEVICE_PROPERTIES_LABEL_UP_PKTS_BYTES"})),r.createElement(a.A,{color:"text-3",size:"medium"},v&&R?r.createElement(r.Fragment,null,v.toLocaleString()," / ",r.createElement(i.A,{type:"bytes",input:R,color:"tertiary",size:"body"})):"0.00 / 0.00")),r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"COMMON_ACTIVITY"})),r.createElement(i.A,{type:"bytes",color:"tertiary",size:"body",input:k,options:"bitrate"}))):null))};var x=n(128195),M=n(564985),T=n(837612);const N=(0,c.A)("div")`
  &:not(:last-child) {
    margin-bottom: ${({theme:{spacing:e}})=>e["spacing-l"]};
  }
`,y=(0,c.A)(a.A)`
  margin-bottom: 4px;
`,v=(0,c.A)("div")`
  margin-bottom: 16px;
`,b=({activeItem:e})=>(0,T.YP)(e)?r.createElement(N,null,r.createElement(y,{weight:"bold",size:"medium"},r.createElement(d.sA,{id:"COMMON_RADIO_BAND_NA"})),r.createElement(x.A,{activeItem:e,radioType:M.sx.RADIO_NA}),r.createElement(v,null),r.createElement(y,{weight:"bold",size:"medium"},r.createElement(d.sA,{id:"DEVICE_HEADER_RADIO60G_SHORT"})),r.createElement(x.A,{activeItem:e,radioType:M.sx.RADIO_AD})):null;var R=n(86571),f=n(822336),P=n(382389),D=n(311785);const L=(0,c.A)("div",(0,D.A)("color"))`
  padding: ${l.YC};
  border-radius: ${l.YC};
  border: 1px solid ${({color:e})=>e};
  color: ${({color:e})=>e};
  line-height: ${l.xO};
`,k=(0,r.memo)(()=>{const{themeName:e}=(0,P.u)();return r.createElement(L,{color:f.Ay[`desktop-color-orange-06-${e}`]},r.createElement(a.A,{style:{textTransform:"uppercase"},color:"inherit",size:"small",weight:"bold"},r.createElement(d.sA,{id:"COMMON_DEVICE_STATE_CONNECTION_INTERRUPTED"})))});var S=n(689965),z=n(154628),$=n(768195),V=n(602197),w=n(211368),B=n(708019),F=n(328787),W=n(186169),Y=n(888170),U=n(823858),K=n(574137),G=n(38937),H=n(6510),X=n(224948),j=n(876250),Z=n(6176),Q=n(17437);const q=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",(0,D.A)("linkAnimationColor"))`
  animation: ${q} 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",(0,D.A)("color","left","right","height"))`
  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);
`,le=({color:e,model:t,flipped:n=!1})=>{const[l,a]=(0,r.useState)(!1),i=(0,r.useMemo)(()=>((e,t)=>{switch(e){case $.W4.UBB:return{left:t?12:16,height:29};case $.W4.UBBXG:return{left:t?12:17,height:29};default:return}})(t,n),[t,n]),o=(0,r.useCallback)(()=>{a(!0)},[]);return r.createElement(E.A,{position:"relative"},l&&i?r.createElement(re,{color:e||W.A["blue-0"],...i}):null,r.createElement(Z.A,{width:29,height:29,model:t,variant:n?j.Hx.RIGHT_NOPADDING:j.Hx.LEFT_NOPADDING,onLoadCallback:o}))},ae=(0,c.A)("div")`
  align-self: stretch;
  border-right: solid 1px ${({theme:{themeName:e}})=>f.Ay[`desktop-color-neutral-03-${e}`]};
  width: 1px;
`,ie=({activeItem:e,activeItem:{peer_ubb:t,led_override_color:n,model:o},pendingAdoption:c})=>{const m=(0,z.Gy)(e),s=(0,G.b5)(m),A=!c&&(0,z.hk)(e),u=!c&&(0,z.Q9)(e),p=(0,r.useMemo)(()=>!c&&!A||"destructive"===s?Y.Ay["color-danger"]:c||"notice"===s?Y.Ay["color-warning"]:Y.Ay["color-success"],[s,A,c]);return r.createElement(r.Fragment,null,r.createElement(S.A,null,r.createElement(E.A,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:l.kc},r.createElement(E.A,{minWidth:48,maxWidth:48,height:"100%",alignItems:"center",justifyContent:"center"},r.createElement(Z.A,{model:o,size:j.Xh.MEDIUM,width:"100%"})),r.createElement(E.A,{flexDirection:"column"},r.createElement(a.A,{weight:"bold",size:"medium",color:"text-1"},(0,H.Q)(e)),r.createElement(E.A,{flexDirection:"row",alignItems:"center"},r.createElement(a.A,{size:"medium"},A?r.createElement(r.Fragment,null,r.createElement(d.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_QUALITY"}),": ",r.createElement(i.A,{type:"percent",input:m/100,style:{color:W.A.getGradientColor(m/100)}})):null,!A&&c?r.createElement(d.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_INACTIVE"}):null,A||c?null:r.createElement(d.sA,{id:"DEVICE_PROPERTY_OVERVIEW_NO_LINK"})))),r.createElement(ae,null),r.createElement(E.A,{flex:"0 1 137px",gap:l.kc,justifyContent:"space-between",alignItems:"center"},r.createElement(le,{color:n,model:o}),r.createElement(ne,{color:p}),r.createElement(le,{flipped:!0,color:t?.led_override_color,model:o})))),c||u?r.createElement(X.A,{icon:r.createElement(U.A,{size:"original",variant:"fill",color:K.PA.warning})},r.createElement(a.A,null,r.createElement(d.sA,{id:c?"DEVICE_UBB_LINK_INACTIVE_WARNING_MESSAGE":"DEVICE_UBB_LINK_DOWN_WARNING_MESSAGE"}))):null)};var oe=n(999063);const ce=({activeItem:e})=>{const t=(0,z.Gy)(e);return t>0?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.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),se=n(144367);const Ee=({throughput:e})=>void 0!==e&&Number.isFinite(e)?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(d.sA,{id:"COMMON_LINK_SPEED"})),r.createElement(i.A,{size:"body",type:"bytes",color:"tertiary",input:e,options:"bitrate"})):null,de=({activeItem:e,activeItem:{p2p_stats:t,peer_ubb:n}})=>r.createElement(Ee,{throughput:t?.throughput??((0,A.YdF)(e)&&n?.p2p_stats?.throughput)}),Ae=({activeItem:e,activeItem:{uptime:t}})=>r.createElement(S.A,null,r.createElement(E.A,{height:"100%",flexDirection:"column"},r.createElement(oe.A,{uptime:t}),r.createElement(me.A,{activeItem:e}),r.createElement(de,{activeItem:e}),r.createElement(ce,{activeItem:e}),r.createElement(se.A,{activeItem:e})));var ue=n(78853);const pe=({activeItem:e,activeItem:{name:t,mac:n,adopted:a,peer_ubb:i,ip:o,config_network:c,uplink:m,radio_table:s,type:u,shortname:p,state:_,model:I}})=>{const g=(0,T.YP)(e),h=i&&(!(0,z.hI)(e)||!g);return r.createElement(r.Fragment,null,r.createElement(ie,{activeItem:e}),r.createElement(F.A,{ip:o,adopted:a,config_network:c}),r.createElement(E.A,{flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",gap:l.YC},w.q[_]===V.g.ADOPTION_FAILED?r.createElement(k,null):null,m?.type===$.au.WIRELESS?r.createElement(B.A,{uplink:m,type:u,name:t,state:_,mac:n,model:I,alignLeft:!1}):null),g?r.createElement(r.Fragment,null,r.createElement(Ae,{activeItem:e}),[e,i].filter(Boolean).map(e=>({id:(0,z.zX)(e)?"accessPoint":"station",openByDefault:!0,label:r.createElement(R.A,null,r.createElement(d.sA,{id:(0,z.zX)(e)?"DEVICE_TYPE_UBB_AP":"DEVICE_TYPE_UBB_STATION"})," ",i?.uplink?r.createElement(d.sA,{id:(0,A.Daf)(e)?"COMMON_WIRELESS":"COMMON_WIRED"}):null),renderContent:()=>r.createElement(O,{activeItem:e,ubbDeviceType:(0,z.zX)(e)?C.ACCESS_POINT:C.STATION,pendingAdoption:h})})).map(e=>r.createElement(S.A,{type:S.I.ACCORDION,items:[e],key:e.id})),!h&&s?.length?r.createElement(S.A,{type:S.I.ACCORDION,items:[{id:"radios",openByDefault:!0,label:r.createElement(R.A,{id:"DEVICE_HEADER_AIR_STATS"}),renderContent:()=>r.createElement(b,{activeItem:e})}]}):null,r.createElement(ue.A,{shortname:p})):null)}},957866(e,t,n){n.d(t,{A:()=>c});var r=n(296540),l=n(469733),a=n(765562),i=n(79871),o=n(856632);const c=()=>{const e=(0,l.useDispatch)(),t=(0,l.useSelector)(o.eo);return(0,r.useEffect)(()=>{t||(async()=>{const t=await fetch(a.A.fingerprintPublicDatabasePath),n=await t.json();e((0,i.$)(n))})()},[t,e]),t}},856632(e,t,n){n.d(t,{$E:()=>s,eo:()=>c});var r=n(801081),l=n(523275),a=n(840279),i=n(919952);const o=e=>e[i.U.UIDB]||(0,l.A)(),c=(0,r.Mz)(o,({version:e})=>Boolean(e)),m=(0,r.Mz)(o,({devices:e})=>e||(0,a.A)()),s=e=>(0,r.Mz)(m,t=>t.find(({shortnames:t})=>e&&(t||[]).includes(e))||(0,l.A)());(0,r.Mz)(m,e=>{const t=new Map;for(let n=0;n<e.length;n+=1){const r=e[n].power?.baseConsumption;if(void 0!==r){const{shortnames:l}=e[n];for(let e=0;e<(l||[]).length;e+=1)t.set(l[e],r)}}return t})},383149(e,t,n){n.d(t,{A:()=>l});var r=n(885205);const l=function(e,t){return!(null==e||!e.length)&&(0,r.A)(e,t,0)>-1}},887809(e,t,n){n.d(t,{A:()=>r});const r=function(e,t,n){for(var r=-1,l=null==e?0:e.length;++r<l;)if(n(t,e[r]))return!0;return!1}},458043(e,t,n){n.d(t,{A:()=>m});var r=n(8300),l=n(383149),a=n(887809),i=n(45572),o=n(552789),c=n(764099);const m=function(e,t,n,m){var s=-1,E=l.A,d=!0,A=e.length,u=[],p=t.length;if(!A)return u;n&&(t=(0,i.A)(t,(0,o.A)(n))),m?(E=a.A,d=!1):t.length>=200&&(E=c.A,d=!1,t=new r.A(t));e:for(;++s<A;){var _=e[s],I=null==n?_:n(_);if(_=m||0!==_?_:0,d&&I==I){for(var g=p;g--;)if(t[g]===I)continue e;u.push(_)}else E(t,I,m)||u.push(_)}return u}},144757(e,t,n){n.d(t,{A:()=>o});var r=n(458043),l=n(187671),a=n(224326),i=n(153533);const o=(0,a.A)(function(e,t){return(0,i.A)(e)?(0,r.A)(e,(0,l.A)(t,1,i.A,!0)):[]})}}]);