"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[51706],{22169:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),l=n(217439),a=n(699784),i=n(115829),s=n(39705),c=n(294303);const o=({ipv6:e,size:t="inherit",color:n="inherit"})=>{const o=e?.[0];return o?r.createElement(c.A,{width:"100%",justifyContent:"flex-end"},r.createElement(i.A,{flexProps:{justifyContent:"flex-end",alignItems:"center"},color:n,size:t},o),e?.length>1?r.createElement(s.A,{items:e,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>r.createElement(r.Fragment,null,e),renderMultipleItemsSummary:()=>null}):null):r.createElement(l.A,{size:t,color:n},r.createElement(a.sA,{id:"COMMON_FALLBACK"}))}},32753:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),l=n(927099),a=n(699784),i=n(780811),s=n(360113);const c=({systemStatsMem:e,compact:t=!1})=>{const n=(0,i.HBQ)(e);return n?r.createElement(s.A,{compact:t},r.createElement(l.A,{color:"secondary",size:"body"},r.createElement(a.sA,{id:"DEVICE_PROPERTY_OVERVIEW_MEMORY_USAGE"})),r.createElement(l.A,{color:"tertiary",size:"body"},n,"%")):null}},39705:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),l=n(705145),a=n(699784),i=n(115829),s=n(424135),c=n(819127);const o=function({items:e,renderMultipleItemsSummary:t,renderListItem:n,renderNoItems:o,getItemKey:m,enabled:d=!0,showListMarkers:u,cursorType:E,isInteractive:p}){const A=d?"inherit":"disabled";return e.length>1?r.createElement(s.A,{tooltip:r.createElement(c.A,{items:e,getItemKey:m,renderItem:n,showListMarkers:u,isInteractive:p,cursorType:E})},r.createElement(i.A,{color:A,cursorType:E},t(e))):1===e.length?r.createElement(i.A,{color:A,cursorType:E},n(e[0])):o?r.createElement(r.Fragment,null,o()):r.createElement(l.A,{isTruncated:!0,color:A},r.createElement(a.sA,{id:"COMMON_FALLBACK"}))}},146784:(e,t,n)=>{n.d(t,{A:()=>E});var r=n(296540),l=n(349424),a=n(217439),i=n(383653),s=n(568560),c=n(22169),o=n(294303),m=n(699784),d=n(348466),u=n(360113);const E=(0,r.memo)(({ipv6_address:e=[],wan_dhcpv6_pd_size:t})=>{const{globalAddresses:n,linkLocalAddress:E}=(0,r.useMemo)(()=>{const t=[];let n=null;for(let r=0;r<e.length;r+=1){const a=e[r];new l.Address6(a).isLinkLocal()?n=a?.split(d.Ed)?.[0]:t.push(a.split(d.Ed)?.[0])}return{globalAddresses:t,linkLocalAddress:n}},[e]);return n.length?r.createElement(r.Fragment,null,r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(m.sA,{id:"COMMON_IPV6_ADDRESS"})),r.createElement(s.A,{ipv6:n,size:"medium",color:"text-3"})),t?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(m.sA,{id:"COMMON_IPV6_PREFIX"})),r.createElement(o.A,{flex:"1",minWidth:"0",justifyContent:"flex-end"},r.createElement(c.A,{ipv6:[`${(0,i.Gh)(n[0],t)}/${t}`],color:"text-3",size:"medium"}))):null,E?r.createElement(u.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(m.sA,{id:"COMMON_IPV6_LINK_LOCAL"})),r.createElement(s.A,{ipv6:[E],size:"medium",color:"text-3"})):null):null})},187550:(e,t,n)=>{n.d(t,{B:()=>w,i:()=>N});var r=n(469733),l=n(296540),a=n(823858),i=n(998837),s=n(614054),c=n(6510),o=n(660950),m=n(533520),d=n(224948),u=n(532419),E=n(71479),p=n(852866),A=n(566723),g=n(294303),h=n(795537),M=n(699784);const I=(0,E.A)("div")`
  margin-bottom: ${A.kc};
`,_=({uplinkMac:e,uplinkDisplayName:t})=>l.createElement(g.A,{flexDirection:"column",alignItems:"flex-start"},l.createElement(I,null,l.createElement(M.sA,{id:"DEVICE_POE_ALMOST_OUT_OF_POWER",values:{deviceName:l.createElement(h.A,{mac:e},(0,p.c)(t))}})),l.createElement(h.A,{mac:e},l.createElement(M.sA,{id:"DEVICE_POE_VIEW_DETAILS"}))),C=({children:e})=>l.createElement(d.A,{icon:l.createElement(a.A,{size:"original",color:(0,i.u)().motifPalette.warning,variant:"fill"})},e),k=e=>l.createElement(C,null,l.createElement(o.A,{...e})),v=e=>l.createElement(C,null,l.createElement(_,{...e})),O=({uplink:e,mac:t,detailed_states:n})=>{const a=(0,r.useSelector)((0,l.useMemo)(()=>(0,u.tG)(e.uplink_mac),[e.uplink_mac]));return l.createElement(m.x,{mac:t,uplinkMac:a.mac,uplinkDisplayName:(0,c.Q)(a),portNumber:e.uplink_remote_port,detailedStates:n,PortPowerLimitExceededWarning:k,UplinkNearPowerLimitWarning:v})},N=({uplink:e,mac:t,detailed_states:n})=>(0,s.w)(n)?l.createElement(O,{uplink:e,mac:t,detailed_states:n}):null,f=({uplinkMac:e,...t})=>{const n=(0,r.useSelector)((0,l.useMemo)(()=>(0,u.tG)(e),[e]));return l.createElement(m.x,{...t,uplinkMac:e,uplinkDisplayName:(0,c.Q)(n),PortPowerLimitExceededWarning:k,UplinkNearPowerLimitWarning:v})},w=({detailedStates:e,...t})=>(0,s.w)(e)?l.createElement(f,{detailedStates:e,...t}):null},258117:(e,t,n)=>{n.d(t,{A:()=>E});var r=n(296540),l=n(325898),a=n(927099),i=n(71479),s=n(903216),c=n(294303),o=n(699784),m=n(360113),d=n(863489);const u=(0,i.A)(c.A)`
  .tooltip-position-fixer {
    margin-right: -14px;
  }
`,E=({uplink:e,portSpeed:t})=>{const n=Number(t||e?.speed),{motif:i}=(0,l.A)();return n>0?r.createElement(m.A,null,r.createElement(a.A,{color:"secondary",size:"body"},r.createElement(o.sA,{id:"COMMON_EXPERIENCE"})),r.createElement(u,{alignItems:"center"},r.createElement(a.A,{style:{color:(0,d.xe)(n,i,!1)},size:"body"},(0,s.ir)(n)))):null}},373934:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(296540),l=n(758649),a=n(216211);const i=({mac:e,port:t,children:n})=>{const{handleGoToPortsPage:i}=(0,a.e)(),s=(0,r.useCallback)(n=>{n.stopPropagation(),i(e,+t)},[i,e,t]);return r.createElement(l.A,{type:"button",size:"inherit",variant:"inline",onClick:s},n)}},424135:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(296540),l=n(566723),a=n(294303);const i=({children:e,tooltip:t})=>r.createElement(a.A,{maxWidth:"100%",overflow:"hidden",gap:l.YC,alignItems:"center"},r.createElement(a.A,{flex:1,overflow:"hidden"},e),t)},430942:(e,t,n)=>{n.d(t,{A:()=>E});var r=n(956347),l=n(296540),a=n(217439),i=n(998837),s=n(15095),c=n(534464),o=n(369702),m=n(627440),d=n(699784),u=n(789585);const E=({mac:e})=>{const t=(0,r.W6)(),n=(0,s.A)(m.VO.AIRVIEW),E=(0,u.mX)(),p=(0,l.useCallback)(()=>{E(e),t.push(n)},[t,e,n,E]);return l.createElement(o.A,{className:(0,c.gM)((0,i.u)().themeName),onClick:p,width:"full"},l.createElement(a.A,{variant:"inherit"},l.createElement(d.sA,{id:"COMMON_AIRVIEW"})))}},530813:(e,t,n)=>{n.d(t,{A:()=>E,d:()=>u});var r=n(296540),l=n(217439),a=n(705145),i=n(71479),s=n(311785),c=n(566723),o=n(699784),m=n(795097),d=n(294303);const u=(0,i.A)(m.A,(0,s.A)("showListMarkers","gap"))`
  padding-left: ${({showListMarkers:e})=>e?c.Ln:0};
  display: flex;
  flex-direction: column;
  gap: ${({gap:e})=>e??c.YC};

  > li {
    list-style-type: ${({showListMarkers:e})=>e?"disc":"none"};
  }
`;const E=function({items:e,getItemKey:t,renderItem:n,maxItemCount:i=20,renderShowMore:s,showListMarkers:m,listGap:E}){return r.createElement(d.A,{flexDirection:"column",gap:c.YC},r.createElement(u,{showListMarkers:m,gap:E},e.slice(0,i).map((e,l)=>r.createElement("li",{key:t(e,l)},r.createElement(a.A,{variant:"inherit",isTruncated:!0},n(e))))),i&&e.length>i?s?s(e):r.createElement(l.A,{variant:"inherit"},r.createElement(o.sA,{id:"COMMON_X_MORE",values:{count:e.length-i}})):null)}},533520:(e,t,n)=>{n.d(t,{x:()=>l});var r=n(296540);const l=({mac:e,detailedStates:t,uplinkDisplayName:n,portNumber:l,uplinkMac:a,PortPowerLimitExceededWarning:i,UplinkNearPowerLimitWarning:s,DeviceNearPowerLimitWarning:c=null})=>{switch(!0){case t.port_power_limit_exceeded:return r.createElement(i,{uplinkDisplayName:n,portNumber:l,uplinkMac:a});case t.uplink_near_power_limit:return r.createElement(s,{uplinkMac:a,uplinkDisplayName:n});case t.device_near_power_limit:return!!c&&r.createElement(c,{mac:e});default:return null}}},568560:(e,t,n)=>{n.d(t,{A:()=>A});var r=n(469733),l=n(296540),a=n(217439),i=n(895795),s=n(383653),c=n(742920),o=n(115829),m=n(39705),d=n(294303),u=n(675359),E=n(699784),p=n(348466);const A=({ipv6:e=[],enabled:t=!0,size:n="inherit",color:A="inherit",showOnlyPrefix:g=!1})=>{const h=(0,r.useDispatch)(),M=(0,l.useCallback)(e=>{navigator.clipboard.writeText(e).then(()=>{h((0,u.ox)({icon:c.C.success,message:"COMMON_COPIED_TO_CLIPBOARD"}))})},[h]),I=(0,l.useCallback)((e,t)=>{t.stopPropagation(),t.preventDefault(),M(e)},[M]),_=(0,l.useMemo)(()=>(e=>{const t=e=>(0,s.G8)(e)?0:(0,s.ZV)(e)?1:2;return e.sort((e,n)=>t(e)-t(n))})(e||[]).map(e=>{const[t,n]=e.split(p.Ed);return g?`${(0,s.Gh)(t,Number(n))}/${n}`:(0,s.z2)(e)}),[e,g]),C=_?.[0];return C?l.createElement(d.A,{maxWidth:"100%",justifyContent:"flex-end"},l.createElement(o.A,{enabled:t,flexProps:{justifyContent:"flex-end",alignItems:"center"},color:t?A:"disabled",size:n},C),_?.length>1?l.createElement(m.A,{items:_,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>l.createElement(l.Fragment,null,e,l.createElement(i.A,{size:"original",actionable:!0,onClick:t=>I(e,t)})),renderMultipleItemsSummary:()=>null}):l.createElement(i.A,{size:"original",actionable:!0,onClick:e=>I(C,e)})):l.createElement(a.A,{size:n,color:t?A:"disabled"},l.createElement(E.sA,{id:"COMMON_FALLBACK"}))}},614054:(e,t,n)=>{n.d(t,{w:()=>r});const r=e=>!!e&&Object.values(e).some(Boolean)},656883:(e,t,n)=>{n.d(t,{n:()=>a});var r=n(458112),l=n(744742);const a=e=>(0,l.pb)({name:r.T.RADIOS,value:e})},660950:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(296540),l=n(852866),a=n(699784),i=n(373934);const s=({uplinkMac:e,portNumber:t,uplinkDisplayName:n})=>r.createElement(a.sA,{id:"DEVICE_POE_PORT_OUT_OF_POWER",values:{portName:r.createElement(i.A,{mac:e,port:t},`${(0,l.c)(n)} ${(0,a.tz)().formatMessage({id:"COMMON_PORT"})} ${t}`)}})},789585:(e,t,n)=>{n.d(t,{Ay:()=>v,mX:()=>C,xN:()=>k});var r=n(469733),l=n(296540),a=n(844356),i=n(6510),s=n(249304),c=n(6176),o=n(699784),m=n(290480),d=n(157766),u=n(789768),E=n(837612),p=n(602197),A=n(267509),g=n(600446),h=n(190497),M=n(656883),I=n(652628);const _=(e,t,n)=>{const r=(0,E.kG)(e);return r===p.g.CONNECTED?"":r===p.g.ADOPTION_FAILED?` (${n({id:"COMMON_DEVICE_STATE_CONNECTION_INTERRUPTED"})})`:` (${(0,E.F1)({model:t},r,n)})`},C=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(g.W);return(0,l.useCallback)(n=>{const r={...t,[A.dp.SSID]:h.nc,[A.dp.DEVICE]:n,[A.dp.MACS]:[n]};e((0,M.n)(r)),e((0,u.yT)(s.l.RADIOS,{filters:r})),e((0,d.OI)(""===n?m.TE.ALL:String(n)))},[e,t])},k=(e,t)=>e.disabled&&!t.disabled?1:!e.disabled&&t.disabled?-1:void 0,v=e=>{const{formatMessage:t}=(0,o.tz)(),n=(0,r.useSelector)(g.W),s=(0,r.useSelector)(I.tW),m=[{value:"",label:`${t({id:"COMMON_ALL_APS"})} (${s.length})`,image:l.createElement(a.A,{size:"original"})},...s.map(({name:n,model:r,mac:a,state:s})=>({value:a,label:`${(0,i.Q)({name:n,model:r,mac:a})}${_(s,r,t)}`,image:l.createElement(c.A,{width:20,height:20,model:r}),disabled:!!e&&!e(a)}))];return{selectAp:C(),aps:m,currentAp:n?.[A.dp.DEVICE]}}},795097:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(71479),l=n(566723);const a=(0,r.A)("ul")`
  padding-left: ${l.Er};
  margin-bottom: 0;
  margin-top: 0;
`},819127:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(296540),l=n(766624),a=n(530813);const i=function({items:e,getItemKey:t,renderItem:n,maxItemCount:i,renderShowMore:s,showListMarkers:c,title:o,position:m,isInteractive:d,cursorType:u,listGap:E}){return r.createElement(l.A,{title:o,position:m,isInteractive:d,cursorType:u,description:r.createElement(a.A,{items:e,getItemKey:t,renderItem:n,maxItemCount:i,listGap:E,renderShowMore:s,showListMarkers:c})})}},844356:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(296540),l=n(629318);const a=(0,n(51946).w)(e=>(0,r.createElement)("svg",(0,l.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,r.createElement)("path",{d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",fill:"currentColor",className:e.twotonedclassname}),(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 10c0-3.86-3.14-7-7-7s-7 3.14-7 7 3.14 7 7 7 7-3.14 7-7ZM2 10a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10.5 0c0-1.379-1.121-2.5-2.5-2.5A2.502 2.502 0 0 0 7.5 10c0 1.379 1.121 2.5 2.5 2.5s2.5-1.121 2.5-2.5Zm-6 0a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0Z",fill:"currentColor",className:e.baseclassname}),(0,r.createElement)("path",{d:"M10 2a8 8 0 0 0-8 8 8 8 0 1 0 16 0 8 8 0 0 0-8-8Zm0 11.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z",fill:"currentColor",className:e.fillclassname}),(0,r.createElement)("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z",fill:"currentColor",className:e.fillclassname})))}}]);