"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[57445],{15532:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(296540),l=n(927099),r=n(699784),c=n(360113);const i=({has_fan:e,fan_level:t})=>e&&Number.isFinite(t)?a.createElement(c.A,null,a.createElement(l.A,{color:"secondary",size:"body"},a.createElement(r.sA,{id:"DEVICE_PROPERTY_OVERVIEW_FAN_LEVEL"})),a.createElement(l.A,{color:"tertiary",size:"body"},t)):null},45481:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(296540),l=n(271856),r=n(927099),c=n(888170),i=n(823858),o=n(699784),m=n(360113);const s=({has_temperature:e,overheating:t,general_temperature:n})=>e&&Number.isFinite(n)?a.createElement(m.A,null,a.createElement(r.A,{color:"secondary",size:"body"},a.createElement(o.sA,{id:"COMMON_TEMPERATURE"})),a.createElement(r.A,{color:"tertiary",size:"body"},a.createElement(a.Fragment,null,a.createElement(o.sA,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_VALUE",values:{temperature:n}}),t?a.createElement(l.A,{description:a.createElement(o.sA,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_OVERHEATING"}),width:180,position:"left",className:"ml-1",style:{display:"inline-block",verticalAlign:"text-bottom"}},a.createElement(i.A,{style:{color:c.Ay["color-danger"]}})):null))):null},328787:(e,t,n)=>{n.d(t,{A:()=>_});var a=n(469733),l=n(296540),r=n(149133),c=n(855019),i=n(551753),o=n(699784),m=n(532419),s=n(765562);const E=({adopted:e})=>l.createElement(i.A,{link:s.A.virtualNetworkConnectivity},l.createElement(o.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(o.sA,{id:e?"DEVICE_WARNING_FALLBACK_IP":"DEVICE_WARNING_ADOPTION_FAILED"}))}})),_=({ip:e,adopted:t,config_network:n})=>(0,a.useSelector)(m.m9)&&(0,r.W5)(e)&&n?.type===c.NL.DHCP?l.createElement(E,{adopted:t}):null},383929:(e,t,n)=>{n.d(t,{A:()=>f});var a=n(296540),l=n(860631),r=n(146784),c=n(294303),i=n(689965),o=n(217439),m=n(360113),s=n(699784);const E=({gnss:e})=>{const t=e?.cable_delay_ns;return t?a.createElement(m.A,null,a.createElement(o.A,{color:"text-2",size:"medium"},a.createElement(s.sA,{id:"DEVICE_SMA_SIGNAL_VALUE_LABEL"})),a.createElement(o.A,{color:"text-3",size:"medium"},t," ",a.createElement(s.sA,{id:"COMMON_UNIT_NANOSECONDS_SHORT"}))):null},_=({gnss:e})=>{const t="string"==typeof e?.antenna_detected&&"yes"===e?.antenna_detected.toLowerCase()||"boolean"==typeof e?.antenna_detected&&e?.antenna_detected;return e?a.createElement(m.A,null,a.createElement(o.A,{color:"text-2",size:"medium"},a.createElement(s.sA,{id:"DEVICE_SMA_SIGNAL_LABEL"})),a.createElement(o.A,{color:"text-3",size:"medium"},a.createElement(s.sA,{id:t?"COMMON_DETECTED":"COMMON_NOT_DETECTED"}))):null};var A=n(999063),d=n(45481),u=n(32753),p=n(723544),I=n(507976),v=n(400242),O=n(15532),N=n(500045);const f=({ip:e,lan_ip:t,ipv6:n,mac:o,displayable_version:m,uptime:s,has_temperature:f,has_fan:C,overheating:D,general_temperature:g,fan_level:h,systemStatsMem:M,fan_table:T,local_uplink_port:y,gnss:b,switch_caps:L})=>a.createElement(i.A,null,a.createElement(c.A,{height:"100%",flexDirection:"column"},a.createElement(I.A,{local_uplink_port:y}),a.createElement(v.A,{ip:e,lan_ip:t}),a.createElement(r.A,{ipv6_address:n}),a.createElement(p.A,{mac:o}),a.createElement(N.A,{displayable_version:m}),a.createElement(A.A,{uptime:s}),a.createElement(d.A,{has_temperature:f,overheating:D,general_temperature:g}),T?null:a.createElement(O.A,{has_fan:C,fan_level:h}),a.createElement(u.A,{systemStatsMem:M}),(0,l.k2)(L?.feature_caps)?a.createElement(a.Fragment,null,a.createElement(_,{gnss:b}),a.createElement(E,{gnss:b})):null))},418328:(e,t,n)=>{n.d(t,{A:()=>g});var a=n(296540),l=n(325898),r=n(271856),c=n(822336),i=n(773412),o=n(84385),m=n(217439),s=n(823858),E=n(71479),_=n(998837),A=n(178233),d=n(566723),u=n(294303),p=n(532114),I=n(699784),v=n(757167),O=n(53765);const N=(0,E.A)(u.A)`
  justify-content: space-between;
`,f=(0,E.A)(o.A)`
  margin: 0 6px;
  height: 10px;
`,C=(0,E.A)(s.A)`
  margin: 0 6px;
`,D=({index:e,item:t})=>a.createElement(O.m,null,a.createElement(O.Y,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:""}},e+1),t.temp?Object.entries(t.temp).map(([e,t])=>a.createElement(O.Y,{id:"DEVICE_TEMPERATURE_SENSOR",values:{index:+e+1},key:e},t?.toFixed(1)||a.createElement(I.sA,{id:"COMMON_FALLBACK"})," ",a.createElement(I.sA,{id:"COMMON_UNIT_CELSIUS"}))):null,t.fanSpeed?a.createElement(O.Y,{id:"DEVICE_FAN_SPEED"},t.fanSpeed," ",a.createElement(I.sA,{id:"COMMON_UNIT_RPM"})):null),g=({psuTable:e=[],marginBottom:t})=>{const{motifPalette:{neutral00:n,warning:o},motifPalette:s}=(0,_.u)(),{motif:E}=(0,l.A)(),{formatMessage:O}=(0,I.tz)(),g=(0,a.useMemo)(()=>e.map(({power:t,power_capacity:l,temp:_,fan:d,present:g,online:h,label:M},T)=>{const y=l||550,b=Math.ceil(parseFloat(t)/y*100),L={variant:(0,v.NH)(b),value:b,temp:_,fanSpeed:d?.[0],online:h,present:g},P=e?.[T]?.power;return a.createElement(u.A,{flexDirection:"column",key:M},a.createElement(N,null,a.createElement(m.A,{color:"text-2",size:"medium"},a.createElement(I.sA,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:T+1}})),a.createElement(u.A,{justifyContent:"space-between",alignItems:"center"},L.present?a.createElement(a.Fragment,null,L.online||L.value?null:a.createElement(r.A,{description:O({id:"DEVICE_USW_MC_PSU_OFFLINE_TOOLTIP"},{index:T+1}),portal:!0},a.createElement(C,{size:"original",variant:"fill",color:o,fill:n})),L.online?a.createElement(a.Fragment,null,a.createElement(m.A,{color:"text-3",size:"medium"},a.createElement(I.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:`${Math.ceil(parseFloat(P))}/${y}`}})),a.createElement(f,{orientation:"vertical",color:s.neutral04}),a.createElement(p.A,{size:"medium",colorOverride:L.value?s[L.variant]:c.Ay[`desktop-color-text-3-${E}`]},(0,A.A)(L.value))):null):a.createElement(m.A,{color:"text-3",size:"medium"},a.createElement(I.sA,{id:"DEVICE_NOT_INSTALLED"})))),a.createElement(r.A,{description:L.present?a.createElement(D,{index:T,item:L}):null,width:250},a.createElement(i.A,{items:[L],rounded:!0})))}),[e]);return a.createElement(u.A,{flexDirection:"column",marginBottom:t??d.kI,gap:d.kc},g)}},507976:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(296540),l=n(927099),r=n(699784),c=n(360113);const i=({local_uplink_port:e})=>e?a.createElement(c.A,null,a.createElement(l.A,{color:"secondary",size:"body"},a.createElement(r.sA,{id:"COMMON_CONNECTED_VIA"})),a.createElement(l.A,{color:"tertiary",size:"body"},a.createElement(r.sA,{id:"COMMON_LOCAL_UPLINK_PORT",values:{portIdx:e}}))):null},532114:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(217439);const l=(0,n(71479).A)(a.A,{shouldForwardProp:e=>"colorOverride"!==e})`
  ${({colorOverride:e})=>e?`color: ${e} !important`:""};
`},720282:(e,t,n)=>{n.d(t,{A:()=>R});var a=n(296540),l=n(231755),r=n(566723),c=n(86571),i=n(294303),o=n(689965),m=n(271856),s=n(822336),E=n(217439),_=n(920360),A=n(823858),d=n(71479),u=n(311785),p=n(699784);const I=1,v=2,O=4;var N,f=n(53765);!function(e){e.ORANGE="orange",e.RED="red"}(N||(N={}));const C=(e,t)=>(e.index||0)-(t.index||0),D=(0,d.A)(_.A)`
  color: ${({theme:e})=>s.Ay[`desktop-color-neutral-00-${e.themeName}`]};
`,g=(0,d.A)(A.A,(0,u.A)("color"))`
  color: ${({theme:e,color:t})=>s.Ay[`desktop-color-${t}-06-${e.themeName}`]};
`,h=(0,d.A)(i.A)`
  width: ${r.S2};
  height: ${r.S2};
  border-radius: 4px;
  background-color: ${({theme:e})=>s.Ay[`desktop-color-green-06-${e.themeName}`]};
`,M=(0,d.A)(h)`
  background-color: ${({theme:e})=>s.Ay[`desktop-color-neutral-03-${e.themeName}`]};
`,T=({fan:{index:e,speed:t}})=>a.createElement(f.m,null,a.createElement(f.Y,{id:"DEVICE_FAN"},e),a.createElement(f.Y,{id:"DEVICE_LEVEL"},t)),y=({fan:e})=>a.createElement(m.A,{description:a.createElement(T,{fan:e}),width:100},a.createElement(h,{justifyContent:"center",alignItems:"center"},a.createElement(D,null))),b=({index:e,messageId:t,color:n=N.ORANGE})=>a.createElement(m.A,{description:a.createElement(p.sA,{id:t,values:{index:e}}),width:199},a.createElement(M,{justifyContent:"center",alignItems:"center"},a.createElement(g,{color:n,size:"original",variant:"fill"}))),L=({fan:e})=>{switch(!0){case!e.present:return a.createElement(b,{index:e.index,messageId:"DEVICE_FAN_UNAVAILABLE",color:N.RED});case!!(e.critical_state&I):return a.createElement(b,{index:e.index,messageId:"DEVICE_FAN_SPEED_TOO_HIGH"});case!!(e.critical_state&v):return a.createElement(b,{index:e.index,messageId:"DEVICE_FAN_STOPPED"});case!!(e.critical_state&O):return a.createElement(b,{index:e.index,messageId:"DEVICE_FAN_UNAVAILABLE",color:N.RED});default:return a.createElement(y,{fan:e})}},P=({fan:e})=>a.createElement(i.A,{flexDirection:"column",justifyContent:"center",alignItems:"center"},a.createElement(L,{fan:e}),a.createElement(E.A,{size:"small",color:"text-3"},e.present&&void 0!==e.speed?e.speed:a.createElement(p.sA,{id:"COMMON_FALLBACK"}))),S=({fan_table:e})=>a.createElement(i.A,{flexDirection:"row",justifyContent:"center",gap:r.S2},e.sort(C).map(e=>a.createElement(P,{key:e.index,fan:e})));var x=n(418328);const R=({psu_table:e=[],fan_table:t=[]})=>e.length>0?a.createElement(o.A,{type:o.I.ACCORDION,items:[{id:"powerSource",openByDefault:!0,label:a.createElement(c.A,{id:t.length?"DEVICE_HEADER_POWER_AND_FAN_UTILIZATION":"DEVICE_HEADER_POWER_UTILIZATION"}),renderContent:()=>a.createElement(i.A,{flexDirection:"column",gap:r.Ln},a.createElement(x.A,{psuTable:e,marginBottom:0}),t.length?a.createElement(a.Fragment,null,a.createElement(l.A,null),a.createElement(S,{fan_table:t})):null)}]}):null},772317:(e,t,n)=>{n.d(t,{A:()=>h});var a,l=n(592563),r=n(296540),c=n(469733),i=n(217439),o=n(187483),m=n(699784),s=n(689965),E=n(86571),_=n(801081);!function(e){e.OPEN_MODAL="openModal"}(a||(a={}));const A=(0,_.Mz)(o.zn,e=>void 0!==e[a.OPEN_MODAL]);var d=n(523275),u=n(840279),p=n(919952);const I=e=>e[p.U.UIDB]||(0,d.A)(),v=(0,_.Mz)(I,({version:e})=>Boolean(e)),O=(0,_.Mz)(I,({devices:e})=>e||(0,u.A)());var N=n(765562),f=n(79871);const C=()=>{const e=(0,c.useDispatch)(),t=(0,c.useSelector)(v);return(0,r.useEffect)(()=>{t||(async()=>{const t=await fetch(N.A.fingerprintPublicDatabasePath),n=await t.json();e((0,f.$)(n))})()},[t,e]),t},D=({uidbDevice:e})=>{const t=(0,c.useSelector)(o.zn),n=t?.[a.OPEN_MODAL];return n?r.createElement(l.A,{onClick:()=>n(e)},r.createElement(i.A,{size:"medium",color:"inherit"},r.createElement(m.sA,{id:"DEVICE_SHOW_DETAILS"}))):null},g=({shortname:e})=>{const t=(0,c.useSelector)((e=>(0,_.Mz)(O,t=>t.find(t=>t.shortnames?.includes(e))||(0,d.A)()))(e));return C(),t?.compliance?r.createElement(s.A,{type:s.I.ACCORDION,items:[{id:"compliance",label:r.createElement(E.A,{id:"COMMON_COMPLIANCE"}),renderContent:()=>r.createElement(D,{uidbDevice:t}),openByDefault:!0}]}):null},h=({shortname:e})=>(0,c.useSelector)(A)?r.createElement(g,{shortname:e}):null},857445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>P});var a=n(296540),l=n(860631),r=n(578819),c=n(780811),i=n(927806),o=n(889879),m=n(999589),s=n(469733),E=n(592510),_=n(582724),A=n(551753),d=n(699784),u=n(944373),p=n(37e3),I=n(532419),v=n(120964);const O=({activeItem:e,activeItem:{mac:t,mclag_group_id:n,version:l}})=>{const r=(0,s.useSelector)(u.D),c=(0,s.useSelector)(I.ID);return(0,a.useMemo)(()=>{const e=r.find(({_id:e})=>e===n);if(!e)return!1;const a=Object.values(e.peers).find(e=>e!==t),i=c.find(({mac:e})=>e===a);return!!i&&Boolean((0,m.valid)(i.version)&&(0,m.valid)(l)&&(0,m.coerce)(i.version).compare((0,m.coerce)(l)))},[r,t,n,l])?a.createElement(A.A,{extra:a.createElement(v.A,{device:e})},a.createElement(d.sA,{id:"DEVICE_VERSION_MISMATCH_TEXT",values:{bold:a.createElement("strong",null,a.createElement(d.sA,{id:"DEVICE_VERSION_MISMATCH_BOLD"}))}})):null},N=({activeItem:e})=>(0,_.A)([(0,p.J4)(void 0,{crudCacheStrategy:{type:E.e.CACHE}})],a.createElement(O,{activeItem:e}));var f=n(768941),C=n(356927);const D=({port_table:e,model:t})=>{const n=(0,c.czF)({model:t}),l=e?.[0]?.is_uplink,r=e?.slice(1,5).some(e=>e.speed>C.A[f.n5.PORTSPEED_HALF_1000].speed);return n&&l&&r?a.createElement(A.A,{variant:"info"},a.createElement(d.sA,{id:"DEVICE_SWITCH_FLEX_XG_UPLINK_WARNING",values:{b:d.b}})):null};var g=n(328787),h=n(720282),M=n(13524),T=n(442728),y=n(812454),b=n(383929),L=n(772317);const P=({activeItem:e,activeItem:{adopted:t,model:n,mac:m,type:s,port_table:E,detailed_states:{device_near_power_limit:_,device_near_effective_power_limit:A}={device_near_power_limit:!1,device_near_effective_power_limit:!1},total_used_power:d,total_max_power:u,ip:p,config_network:I,deviceState:v,switch_caps:O,lan_ip:f,ipv6:C,uptime:P,displayable_version:S,has_temperature:x,overheating:R,general_temperature:w,has_fan:V,fan_level:F,"system-stats":k,psu_table:U,fan_table:z,gnss:W,shortname:B}})=>{const $=(0,a.useMemo)(()=>(0,c.aK8)(v),[v]),{port_idx:H}=(0,i.q$)(e)||{};return a.createElement(a.Fragment,null,a.createElement(y.A,{activeItem:e,showPortOverview:!0}),a.createElement(g.A,{ip:p,adopted:t,config_network:I}),(0,l.tT)(O?.feature_caps)?a.createElement(N,{activeItem:e}):null,a.createElement(D,{port_table:E,model:n}),$?null:a.createElement(a.Fragment,null,(0,r.b0)(E)?a.createElement(o.A,{type:s,mac:m,model:n,device_near_power_limit:_,device_near_effective_power_limit:A,total_used_power:d,total_max_power:u,isPoeAdapter:(0,l.Y6)(e)}):null,a.createElement(T.A,{activeItem:e})),a.createElement(h.A,{psu_table:U,fan_table:z}),a.createElement(b.A,{ip:p,lan_ip:f,ipv6:C,mac:m,displayable_version:S,uptime:P,has_temperature:x,has_fan:V,overheating:R,general_temperature:w,fan_level:F,fan_table:z,systemStatsMem:k?.mem,local_uplink_port:H,gnss:W,switch_caps:O}),$?null:a.createElement(M.A,{activeItem:e}),a.createElement(L.A,{shortname:B}))}}}]);