"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[48775],{53715:(e,t,n)=>{n.d(t,{A:()=>y});var a=n(469733),r=n(296540),l=n(927099),i=n(758649),c=n(71479),o=n(132196),s=n(398300),m=n(566723),E=n(845030),d=n(699784),A=n(360113);const u=(0,c.A)(i.A)`
  height: 24px;
  display: block;
  padding: 0;
`,_=o.AH`
  margin-left: ${m.kc};
  overflow: hidden;
`,p=o.AH`
  display: inline-block !important;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
`,y=(0,r.memo)(({uplinkMac:e,uplinkName:t,label:n="COMMON_DEVICE"})=>{const i=(0,a.useDispatch)(),c=(0,r.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),i((0,E.XP)({type:s.H.DEVICE,id:e}))},[i,e]);return r.createElement(A.A,null,r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(d.sA,{id:n})),r.createElement(u,{variant:"link",size:"medium",onClick:c,wrapClassName:_,contentClassName:p},t))})},55949:(e,t,n)=>{n.d(t,{A:()=>te});var a=n(469733),r=n(296540),l=n(6510),i=n(271856),c=n(217439),o=n(162420),s=n(71479),m=n(566723),E=n(699784),d=n(360113);const A=(0,s.A)(o.A)`
  margin-left: ${m.YC};
`,u="COMMON_INACTIVE",_="COMMON_ACTIVE",p=()=>r.createElement(i.A,{description:r.createElement(E.sA,{id:"DEVICE_PROPERTY_UPLINK_HIGH_AVAILABILITY_MODE_ACTIVE_TOOLTIP"}),width:280,position:"top",style:{display:"inline"}},r.createElement(A,{size:"original",isActive:!0})),y=({isActiveHighAvailability:e})=>r.createElement(d.A,null,r.createElement(c.A,{variant:"body-primary"},r.createElement(E.sA,{id:"COMMON_MODE"})),r.createElement(c.A,{variant:"body-secondary"},r.createElement(r.Fragment,null,r.createElement(E.sA,{id:e?_:u}),e?r.createElement(p,null):null)));var C=n(258117),O=n(294303);const I=({isActiveHighAvailability:e,secondaryPortAvailabilityLacpState:t})=>r.createElement(O.A,{height:"100%",flexDirection:"column"},r.createElement(y,{isActiveHighAvailability:e}),r.createElement(C.A,{portSpeed:t?.speed}));var M=n(86571),v=n(689965),g=n(927806),h=n(532419),N=n(855913),b=n(150556),S=n(782558),f=n(123786),x=n(336549),w=n(120401),T=n(53715),k=n(325898),P=n(927099),D=n(963070),R=n(132196),H=n(396660),z=n(38937),L=n(934645),V=n(951106),F=n(691294),U=n(661282);var W=n(628291),Y=n(879905),B=n(596441),X=n(398300),$=n(6176),G=n(845030),j=n(170459);const K=(0,s.A)("div")`
  height: 100%;
  > div + div {
    margin-top: 16px;
  }
`,q=R.AH`
  th {
    padding-right: 0;
  }
`,J=R.AH`
  :hover {
    cursor: pointer;
  }

  td {
    padding-right: 25px;
  }
`;var Q;!function(e){e.NAME="name",e.EXPERIENCE_INFO="experienceInfo"}(Q||(Q={}));const Z=[{id:Q.NAME,sortable:!0,minWidth:120,label:r.createElement(E.sA,{id:"DEVICE_MESH_CHILDREN"}),renderCell:e=>r.createElement(O.A,{alignItems:"center",justifyContent:"center"},r.createElement(O.A,{alignItems:"center",justifyContent:"center",minWidth:25,maxWidth:25,height:25},e?r.createElement($.A,{model:e.model,height:25}):null),r.createElement(P.A,{truncate:!0,color:"inherit",size:"body",style:{width:"110px",paddingLeft:m.YC,paddingRight:m.YC}},(0,l.Q)(e))),compare:(0,H.l0)(V.tn)},{id:Q.EXPERIENCE_INFO,label:r.createElement(E.sA,{id:"COMMON_EXPERIENCE"}),renderCell:({experienceInfo:e})=>e,minWidth:75,sortable:!0,compare:(0,H.l0)((e,t,n)=>((e,t)=>{const n="is_wired"in e?e.is_wired:void 0,{satisfaction:a,known:r}=(0,V.FX)(void 0,e.type,"wifi_experience_score"in e?e.wifi_experience_score:void 0),l=!n&&a>0&&r;let i;switch(e.status===F.S2.ONLINE&&(i=l?(0,z.gd)(a):(0,z.gd)(U.MO)),i){case"COMMON_EXPERIENCE_EXCELLENT":return L.Ig;case"COMMON_GOOD":return L.Bd;case"COMMON_POOR":return L.IR;default:return(0,L.k)(t)}})(e,n))}],ee=({downlinks:e})=>{const t=(0,a.useDispatch)(),{motif:n}=(0,k.A)(),l=(0,r.useMemo)(()=>e.map(({downlinkDevice:e})=>{const{averageSatisfaction:t,naNumSta:a,ngNumSta:l}=(0,j.VM)(e);return{id:e._id,name:e.name,experienceInfo:r.createElement(O.A,{alignItems:"center",whiteSpace:"nowrap"},a+l!==0&&t?r.createElement(P.A,{size:"body",style:{color:(0,W.L)(t,n)}},r.createElement(E.sA,{id:(0,z.gd)(t)})):r.createElement(P.A,{size:"body",color:"disabled"},r.createElement(E.sA,{id:"COMMON_NO_CLIENTS"}))),mac:e.mac,model:e.model,type:e.type}}),[e,n]),{rowLimit:i,renderFooter:c}=(0,Y.A)(l.length,{defaultCount:10}),o=(0,r.useCallback)(({mac:e})=>{t((0,G.XP)({type:X.H.DEVICE,id:e}))},[t]);return l.length>0?r.createElement(K,null,r.createElement(D.A,{items:l,truncateHeaderCells:!0,disableColumnFilters:!0,headerRowClassName:q,rowClassName:J,columns:Z,initialSortBy:Q.NAME,renderFooter:()=>c,rowHeight:B.I.ROW_HEIGHT,onRowClick:o,rowOffset:0,rowLimit:i})):null},te=({activeItem:e,activeItem:{downlink_table:t,uplink:n}})=>{const i=(0,a.useSelector)(h.ID),c=(t||[]).reduce((e,t)=>{const n=i.find(({mac:e})=>e===t.ap_mac||e===t.mac);return n?.mac&&t.radio?e.concat({downlink:t,downlinkDevice:n}):e},[]),{downlink:o,downlinkDevice:s}=c[0]||{downlink:void 0,downlinkDevice:void 0},m=(0,g.q$)(e)||{},{lacp_state:E}=m,d=(0,g.oL)(E),A=(0,g.rX)(E);return r.createElement(r.Fragment,null,n?.mac?r.createElement(v.A,{type:v.I.ACCORDION,items:[{id:"uplink",label:r.createElement(M.A,{id:"wire"===n.type?"COMMON_PARENT_DEVICE":"COMMON_MESH_PARENT"}),openByDefault:!0,renderContent:()=>r.createElement(N.A,{activeItem:e,devices:i})}]}):null,"wire"===n?.type&&n?.mac&&E?.length>1?r.createElement(v.A,{type:v.I.ACCORDION,items:[{id:"highAvailability",label:r.createElement(M.A,{id:"COMMON_HIGH_AVAILABILITY"}),openByDefault:!0,renderContent:()=>r.createElement(I,{isActiveHighAvailability:A,secondaryPortAvailabilityLacpState:d})}]}):null,c.length>0?r.createElement(v.A,{type:v.I.ACCORDION,items:[{id:"uplink",label:r.createElement(M.A,{id:c.length>1?"DEVICE_MESH_CHILDREN":"DEVICE_MESH_CHILD"}),openByDefault:!0,renderContent:()=>1===c.length?r.createElement(O.A,{height:"100%",flexDirection:"column"},r.createElement(T.A,{uplinkMac:s?.mac,uplinkName:(0,l.Q)(s)}),r.createElement(x.A,{signal:o.signal}),r.createElement(b.A,{tx_rate:o.tx_rate}),r.createElement(S.A,{rx_rate:o.rx_rate}),r.createElement(w.A,{rx_bytes:o.rx_bytes,rx_packets:o.rx_packets}),r.createElement(f.A,{tx_bytes:o.tx_bytes,tx_packets:o.tx_packets})):r.createElement(ee,{downlinks:c})}]}):null)}},120401:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(296540),r=n(927099),l=n(777916),i=n(137298),c=n(699784),o=n(360113);const s=(0,a.memo)(({rx_packets:e,rx_bytes:t})=>a.createElement(o.A,null,a.createElement(r.A,{color:"secondary",size:"body"},a.createElement(c.sA,{id:"COMMON_DOWN_PKTS_BYTES"})),a.createElement(r.A,{color:"tertiary",size:"body"},e&&t?a.createElement(a.Fragment,null,a.createElement(l.A,{size:"body",type:"number",input:e,color:"tertiary"})," / ",(0,i.z3)(t)):"- / -")))},123786:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(296540),r=n(927099),l=n(777916),i=n(137298),c=n(699784),o=n(360113);const s=(0,a.memo)(({tx_packets:e,tx_bytes:t})=>a.createElement(o.A,null,a.createElement(r.A,{color:"secondary",size:"body"},a.createElement(c.sA,{id:"COMMON_UP_PKTS_BYTES"})),a.createElement(r.A,{color:"tertiary",size:"body"},e&&t?a.createElement(a.Fragment,null,a.createElement(l.A,{size:"body",type:"number",input:e,color:"tertiary"})," / ",(0,i.z3)(t)):"- / -")))},134333:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(296540),r=n(927099),l=n(71479),i=n(582724);const c=(0,l.A)(r.A)`
  white-space: nowrap;
  margin-right: 12px;
`,o=(0,l.A)(r.A)`
  text-align: right;
`,s=({condition:e,definition:t,hideOnEmpty:n,placeholder:r="...",value:l})=>(0,i.A)(e,l||!n?a.createElement(a.Fragment,null,a.createElement(c,{color:"secondary"},t),a.createElement(o,{color:"tertiary"},l)):null,{placeholder:a.createElement(a.Fragment,null,a.createElement(c,{color:"secondary"},t),a.createElement(o,{color:"tertiary"},r))})},285947:(e,t,n)=>{n.d(t,{EA:()=>s,G6:()=>E,Km:()=>c,ME:()=>l,Nq:()=>u,Sl:()=>d,Up:()=>m,bc:()=>A,ne:()=>o,pE:()=>i,t1:()=>r});var a=n(294591);const r=({security:e})=>e===a.Hs.WEP,l=({security:e})=>e===a.Hs.WPA_ENTERPRISE,i=({security:e})=>e===a.Hs.WPA_PERSONAL,c=({wpa_enc:e})=>e===a.Jl.AUTO,o=({security:e})=>e===a.Hs.HOTSPOT_2_OSEN,s=({mac_filter_enabled:e})=>e,m=(e,t)=>e&&[...new Set(e.filter(({is_guest:e})=>t?!!e:!e).map(({name:e})=>e))],E=e=>{switch(e){case a.Tl.PAP:case a.Tl.CHAP:case a.Tl.MSCHAP:case a.Tl.MSCHAP_V2:return 2;case a.Tl.SIM:case a.Tl.USIM:case a.Tl.CERTIFICATE:case a.Tl.USERNAME_PASSWORD:return 5;default:return}},d=e=>{switch(e){case a.Tl.PAP:case a.Tl.SIM:return 1;case a.Tl.CHAP:case a.Tl.USIM:return 2;case a.Tl.MSCHAP:return 3;case a.Tl.MSCHAP_V2:return 4;case a.Tl.CERTIFICATE:return 6;case a.Tl.USERNAME_PASSWORD:return 7;default:return}},A=e=>{const t=`${e.auth_id}:${e.auth_val}`;if(Object.values(a.Tl).includes(t))return t};function u(e){return Object.values(a.Ir).includes(e?.attr_hidden_id)}},298523:(e,t,n)=>{n.d(t,{A:()=>_});var a=n(469733),r=n(296540),l=n(927099),i=n(592510),c=n(566723),o=n(134333),s=n(294303),m=n(699784),E=n(180830),d=n(328403),A=n(360113),u=n(785160);const _=({mac:e,compact:t=!1})=>{const n=(0,a.useSelector)((0,r.useMemo)(()=>(0,E.a5)(e),[e])),_=(0,r.useMemo)(()=>(n||[]).filter(({for_wlanconf:e})=>!e).map(({name:e})=>e).sort(),[n]);return _.length?r.createElement(A.A,{compact:t},r.createElement(o.A,{value:r.createElement(s.A,{gap:c.YC},1===_.length?r.createElement(l.A,{size:"body",color:"tertiary"},_[0]):r.createElement(r.Fragment,null,r.createElement(l.A,{size:"body",color:"tertiary"},r.createElement(m.sA,{id:"COMMON_MULTIPLE"})),r.createElement(u.A,{list:_}))),condition:[(0,d.Yo)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})],definition:r.createElement(l.A,{size:"body"},r.createElement(m.sA,{id:"COMMON_AP_GROUPS"}))})):null}},319736:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(296540),r=n(927099),l=n(888170),i=n(178233),c=n(38937),o=n(699784),s=n(564985),m=n(170459),E=n(360113);const d={[s.sx.RADIO_NG]:"2.4",[s.sx.RADIO_NA]:"5",[s.sx.RADIO_6E]:"6",[s.sx.RADIO_AD]:"60"},A=(e,t=" / ")=>a.createElement("div",null,e.map((n,o)=>a.createElement(a.Fragment,{key:`${n}-pos-${String(o)}`},(e=>{const t=Math.min(e,100);return a.createElement(r.A,{size:"body",style:{color:l.Ay[`color-${(0,c.b5)(t)}`]}},(0,i.l)(t))})(n),o!==e.length-1?t:null))),u=(0,a.memo)(({satisfaction:e,vap_table:t,radio_table:n,radio_table_stats:l})=>{const i=(0,a.useMemo)(()=>void 0!==e&&(0,c.Oq)(e),[e]),{na:u,ng:_,sixe:p,naNumSta:y,ngNumSta:C,sixeNumSta:O}=(0,a.useMemo)(()=>(0,m.VM)({vap_table:t,radio_table:n,radio_table_stats:l,satisfaction:e}),[e,t,n,l]),I=[{radio:s.sx.RADIO_NG,satisfaction:_,numSta:C},{radio:s.sx.RADIO_NA,satisfaction:u,numSta:y},{radio:s.sx.RADIO_6E,satisfaction:p,numSta:O}].filter(({satisfaction:e,numSta:t})=>((e,t)=>0!==e&&!!t)(e,t));return i&&0!==I.length?a.createElement(E.A,null,a.createElement(r.A,{color:"secondary",size:"body"},a.createElement(o.sA,{id:"DEVICE_WIFI_EXPERIENCE",values:{band:I.map(({radio:e})=>d[e]).join("/")}})),A(I.map(({satisfaction:e})=>e))):null})},329708:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(296540),r=n(927099),l=n(6510),i=n(699784),c=n(360113);const o=({model:e})=>a.createElement(c.A,null,a.createElement(r.A,{color:"secondary",size:"body"},a.createElement(i.sA,{id:"COMMON_MODEL"})),a.createElement(r.A,{color:"tertiary",size:"body"},(0,l.Lm)(e)))},496520:(e,t,n)=>{n.d(t,{A:()=>O});var a=n(469733),r=n(296540),l=n(217439),i=n(592510),c=n(566723),o=n(115829),s=n(59372),m=n(134333),E=n(785160),d=n(294303),A=n(699784),u=n(285947),_=n(632169),p=n(328403),y=n(360113);const C=({wifiNetworks:e,compact:t=!1})=>{const n=(0,r.useMemo)(()=>(0,u.Up)(e,!1).sort(),[e]);return n.length?r.createElement(y.A,{compact:t},r.createElement(m.A,{value:1===n.length?r.createElement(d.A,{flex:1,overflow:"hidden"},r.createElement(o.A,{size:"medium",color:"text-3"},n[0])):r.createElement(d.A,{gap:c.YC},r.createElement(l.A,{size:"medium",color:"text-3"},r.createElement(A.sA,{id:"COMMON_MULTIPLE"})),r.createElement(E.A,{list:n})),condition:[(0,p.Yo)(void 0,{crudCacheStrategy:{type:i.e.CACHE}}),(0,_.uy)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})],definition:r.createElement(l.A,{size:"medium"},r.createElement(A.sA,{id:"COMMON_WIFI_NAME"}))})):null},O=()=>{const e=(0,a.useSelector)(s.ad);return r.createElement(C,{wifiNetworks:e})}},589694:(e,t,n)=>{n.d(t,{A:()=>_});var a=n(469733),r=n(296540),l=n(271856),i=n(217439),c=n(592510),o=n(59372),s=n(134333),m=n(699784),E=n(285947),d=n(632169),A=n(328403),u=n(360113);const _=()=>{const e=(0,a.useSelector)(o.ad),t=(0,r.useMemo)(()=>(0,E.Up)(e,!0).sort(),[e]);return t.length?r.createElement(u.A,null,r.createElement(s.A,{value:t.length>1?r.createElement(l.A,{width:120,description:t.join(", ")},r.createElement(i.A,{size:"medium",color:"text-3"},r.createElement(m.sA,{id:"COMMON_MULTIPLE"}))):r.createElement(i.A,{size:"medium",color:"text-3"},t[0]),condition:[(0,A.Yo)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}),(0,d.uy)(void 0,{crudCacheStrategy:{type:c.e.CACHE}})],definition:r.createElement(i.A,{size:"medium"},r.createElement(m.sA,{id:"DEVICE_PROPERTY_OVERVIEW_MEMBERSHIP_HOTSPOT"})),hideOnEmpty:!0})):null}},785160:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(296540),r=n(271856),l=n(162420),i=n(795097);const c=({list:e})=>{const t=(0,a.useMemo)(()=>e.map(e=>a.createElement("li",{key:e},e)),[e]);return a.createElement(r.A,{key:e.join("-"),description:a.createElement(i.A,null,t),portal:!0},a.createElement(l.A,{isActive:!0,size:"original"}))}},855913:(e,t,n)=>{n.d(t,{A:()=>I});var a=n(469733),r=n(296540),l=n(294303),i=n(699784),c=n(927806),o=n(768195),s=n(532419),m=n(150556),E=n(782558),d=n(123786),A=n(336549),u=n(927099),_=n(360113);const p=({activeItem:e,devices:t})=>{const{poe_power:n}=(0,c.$Y)({device:e,devices:t})||{poe_power:void 0};return r.createElement(_.A,null,r.createElement(u.A,{color:"secondary",size:"body"},r.createElement(i.sA,{id:"DEVICE_PROPERTY_UPLINK_POWER"})),r.createElement(u.A,{color:"tertiary",size:"body"},r.createElement(i.sA,{...+n>0?{id:"COMMON_UNIT_WATTS_SHORT",values:{value:n}}:{id:"COMMON_FALLBACK"}})))};var y=n(258117),C=n(120401),O=n(53715);const I=({activeItem:e,devices:t})=>{const{formatMessage:n}=(0,i.tz)(),u=(0,a.useSelector)((0,r.useMemo)(()=>(0,s.I4)(e.mac),[e.mac])),_=(0,c.q$)(e)||{};return r.createElement(l.A,{height:"100%",flexDirection:"column"},u?.mac?r.createElement(O.A,{uplinkMac:u.mac,uplinkName:(0,c.Jz)(e,u,n),label:"COMMON_DEVICE"}):null,_.type===o.au.WIRE?r.createElement(r.Fragment,null,r.createElement(y.A,{uplink:_}),r.createElement(p,{activeItem:e,devices:t})):r.createElement(r.Fragment,null,r.createElement(A.A,{signal:_.signal}),r.createElement(m.A,{tx_rate:_.tx_rate}),r.createElement(E.A,{rx_rate:_.rx_rate})),r.createElement(C.A,{rx_packets:_.rx_packets,rx_bytes:_.rx_bytes}),r.createElement(d.A,{tx_packets:_.tx_packets,tx_bytes:_.tx_bytes}))}}}]);