"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[57935],{188481(e,i,t){var s;t.d(i,{s:()=>s}),function(e){e.STANDARD="standard",e.USB="usb",e.LAN="lan",e.WAN="wan",e.RJ45="rj45",e.SURGE="surge"}(s||(s={}))},170427(e,i,t){t.d(i,{A:()=>x});var s=t(274934),n=t(938984),r=t(247816),o=t(309130),l=t(304151),c=t(100978);const a=(0,r.A)(n.A)`
  white-space: nowrap;
`,d=(0,r.A)(c.A)`
  align-items: center;
`,A=(0,r.A)(c.A)`
  width: ${o.Ln};
  justify-content: flex-start;
`,x=({indicator:e,description:i,isSingleLine:t,tooltipDescription:n})=>(0,s.jsxs)(d,{marginRight:t?o.kc:0,children:[(0,s.jsx)(A,{children:e}),(0,s.jsx)(a,{size:"small",color:"text-3",children:i}),n?(0,s.jsx)(l.A,{description:n}):null]})},883717(e,i,t){t.d(i,{A:()=>v,T:()=>M});var s=t(274934),n=t(602086),r=t(977872),o=t(814557),l=t(248887),c=t(18391),a=t(760055),d=t(31881),A=t(920391),x=t(692972),h=t(247816),u=t(263705),j=t(513458),p=t(442175),O=t(309130),E=t(100978),_=t(470070),m=t(940229),T=t(576024),C=t(469890),S=t(956978),P=t(754924),I=t(940563),b=t(977782),g=t(291508),D=t(170427);const R=(0,h.A)("div")`
  display: grid;
  grid-template-columns: repeat(3, minmax(min-content, 1fr));
  gap: ${O.YC};
  margin-top: ${O.kc};
`,N=(0,h.A)(E.A)`
  gap: ${O.kc};
  row-gap: ${O.YC};
  flex-wrap: wrap;
`,M=(0,h.A)(j.A,(0,g.A)("borderColor"))`
  flex-shrink: 0;
  border-radius: 0;
  border: ${({borderColor:e,theme:{themeName:i}})=>e&&`1px solid ${(0,m.oX)(e,i)}`};
`,f=(e,i)=>e===b.s.PASSTHROUGH?1:e===b.s.PASSIVE?2:e===b.s.POE?3:e===b.s.POE_PLUS?4:e===b.s.POE_PLUS_PLUS?5:6,v=({deviceMac:e,isSingleLine:i=!1,hidePoe:t=!1,hideDisabled:h=!1,hideDisconnected:j=!1,displayedSpeedList:O})=>{const{themeName:E}=(0,u.u)(),g=(0,r.d4)((0,n.useMemo)(()=>(0,P.tG)(e),[e])),{type:v,model:y}=g;return(0,n.useMemo)(()=>{const e=(0,T.MB)(g),n=(0,S.NuO)(g),r=(0,C._L)(g,n),u=h||(0,S.m_j)(g)||(0,S.Syn)(g)||(0,S.Fp0)(g),P=i?N:R,y=Array.from(r).sort(f).map(e=>{switch(!0){case e===b.s.POE_PLUS_PLUS_PLUS:return(0,s.jsx)(D.A,{description:(0,s.jsx)(_.sA,{id:"COMMON_DEVICE_POE_MODE_POE_PLUS_PLUS_PLUS"}),indicator:(0,s.jsx)(l.A,{color:o.Ay[`desktop-color-neutral-08-${E}`]})},e);case e===b.s.POE_PLUS_PLUS:return(0,s.jsx)(D.A,{description:(0,s.jsx)(_.sA,{id:"COMMON_DEVICE_POE_MODE_POE_PLUS_PLUS"}),indicator:(0,s.jsx)(c.A,{color:o.Ay[`desktop-color-neutral-08-${E}`]})},e);case e===b.s.POE_PLUS:return(0,s.jsx)(D.A,{description:(0,s.jsx)(_.sA,{id:"COMMON_DEVICE_POE_MODE_POE_PLUS"}),indicator:(0,s.jsx)(a.A,{color:o.Ay[`desktop-color-neutral-08-${E}`]})},e);case e===b.s.PASSTHROUGH||e===b.s.PASSIVE||e===b.s.POE:return(0,s.jsx)(D.A,{description:(0,s.jsx)(_.sA,{id:e===b.s.PASSIVE?"COMMON_DEVICE_POE_MODE_PASSIVE":"COMMON_DEVICE_POE_MODE_POE"}),indicator:(0,s.jsx)(d.A,{color:o.Ay[`desktop-color-neutral-08-${E}`]})},e);default:return null}});return(0,s.jsxs)(P,{children:[e.filter(e=>!O||O.includes(e)).sort((e,i)=>e-i).map(e=>(0,s.jsx)(D.A,{description:(0,p.ir)(e),indicator:(0,s.jsx)(M,{color:(0,m.oX)((I.A[e]??I.A.DEFAULT).background,E)})},e)),j?null:(0,s.jsx)(D.A,{description:(0,s.jsx)(_.sA,{id:"COMMON_DISCONNECTED"}),indicator:(0,s.jsx)(M,{color:(0,m.oX)(I.A.DEFAULT.background,E)})},"disconnected"),u?null:(0,s.jsx)(D.A,{description:(0,s.jsx)(_.sA,{id:"COMMON_DISABLED"}),indicator:(0,s.jsx)(M,{color:"transparent",borderColor:I.A.DEFAULT.background}),isSingleLine:i},"disabled"),t?null:y,!(0,S.Tbi)({type:v})||(0,S.Syn)(g)||(0,S.Fp0)(g)?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(D.A,{description:(0,s.jsx)(_.sA,{id:"COMMON_AGGREGATING"}),indicator:(0,s.jsx)(x.A,{color:o.Ay[`desktop-color-neutral-08-${E}`]})},"aggregating"),(0,s.jsx)(D.A,{indicator:(0,s.jsx)(A.A,{}),description:(0,s.jsx)(_.sA,{id:"DEVICE_PORT_STATE_MIRROR"}),tooltipDescription:(0,s.jsx)(_.sA,{id:"DEVICE_PORT_STATE_MIRROR_TOOLTIP"})},"mirror")]})]})},[y,t,h,O,E])}},648175(e,i,t){t.d(i,{A:()=>r});var s=t(274934),n=t(642687);const r=({children:e,...i})=>(0,s.jsx)(n.A,{variant:"secondary-emphasis",...i,children:e})},732025(e,i,t){t.d(i,{A:()=>c});var s=t(274934),n=t(602086),r=t(376892),o=t(535322),l=t(560151);const c=(0,n.memo)(({mac:e,object:i})=>(0,s.jsx)(o.A,{type:o.I.ACCORDION,items:[{id:"systemPerformance",openByDefault:!1,label:(0,s.jsx)(r.A,{id:"DEVICE_PROPERTY_SYSTEM_STATISTICS"}),renderContent:()=>(0,s.jsx)(l.A,{mac:e,object:i})}]}))},682662(e,i,t){t.d(i,{A:()=>v});var s=t(274934),n=t(602086),r=t(814557),o=t(977872),l=t(675709),c=t(938984),a=t(95032),d=t(975020),A=t(811114),x=t(912294),h=t(164815),u=t(380047),j=t(187075),p=t(245505),O=t(247816),E=t(669439),_=t(590979),m=t(254585),T=t(291508),C=t(586566),S=t(449339),P=t(309130),I=t(589650),b=t(100978),g=t(205521),D=t(470070),R=t(188481),N=t(565527);const M=(0,O.A)("div",(0,T.A)("cellSize","isEnabled","outletType","marginSize","verticalGap","centerIcon"))`
  width: ${({cellSize:e})=>e||"20px"};
  height: ${({cellSize:e})=>e||"20px"};
  align-items: center;
  border-radius: 2px;
  color: ${({theme:{themeName:e}})=>e===N.S.DARK?"#000":"#fff"};
  justify-content: center;
  display: flex;
  position: relative;

  ${({centerIcon:e,verticalGap:i})=>e&&i&&`transform: translateY(calc(50% + ${i} / 2))`};

  &:not(:first-child) {
    margin-left: ${({marginSize:e})=>e||"10px"};
  }

  div:last-child {
    right: -15px;
  }

  ${({outletType:e,isEnabled:i,theme:{themeName:t,motifPalette:{uBlue01:s}}})=>{switch(e){case R.s.RJ45:return`\n          background-color: ${s};\n          border: 1px solid ${r.Ay[`desktop-color-ublue-03-${t}`]};\n        `;case R.s.WAN:return`\n          background-color: ${r.Ay[`desktop-color-neutral-03-${t}`]};\n        `;default:return`\n          background-color: ${i?r.Ay[`desktop-color-green-06-${t}`]:r.Ay[`desktop-color-neutral-05-${t}`]};\n        `}}}
`,f=(0,O.A)("div",(0,T.A)("iconRotation"))`
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  svg {
    ${({iconRotation:e})=>e?`transform: rotate(${e});`:""}
    max-width: 100%;
    max-height: 100%;
  }
`,v=({activeItemMac:e,cellData:i,marginSize:t,cellSize:r,verticalGap:O,iconRotation:T,centerIcon:N,showBatteryPowered:v,tooltipPlacement:y,disableOnPortClick:L,iconSize:w,isBatteryMode:U,tooltipOverride:k,disableTooltip:z,isEU:$,offline:V})=>{const G=(0,o.wA)(),F=(0,o.d4)(m.oI),W=(0,C.TT)(i,"POWER_METER"),{outletType:B=R.s.STANDARD,index:Y,name:H,outlet_power:X,outlet_current:J,outlet_voltage:K,outlet_power_factor:q,cycle_enabled:Q,relay_state:Z,surgeType:ee}=i,ie=[R.s.STANDARD,R.s.USB].includes(B),te=(0,n.useMemo)(()=>{if(!z)return k||(B===R.s.RJ45?ee?(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:ee===l.ME.IN?"DEVICE_SURGE_IN":"DEVICE_SURGE_OUT"})}):null:B===R.s.WAN?(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"DEVICE_PROPERTIES_OUTLET_TOOLTIP_WAN_NO_STATUS_INFO"})}):(0,s.jsxs)(b.A,W&&B===R.s.STANDARD?{flexDirection:"column",justifyContent:"space-between",minWidth:180,children:[(0,s.jsxs)(b.A,{justifyContent:"space-between",children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_AC_OUTLET"})}),(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:Y})]}),(0,s.jsxs)(b.A,{justifyContent:"space-between",alignItems:"center",gap:P.kc,children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_NAME"})}),(0,s.jsx)(a.A,{size:"inherit",color:"inherit",isTruncated:!0,children:H})]}),(0,s.jsxs)(b.A,{justifyContent:"space-between",children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_POWER"})}),(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:Number(X||0).toFixed(2)}})})]}),(0,s.jsxs)(b.A,{justifyContent:"space-between",children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_CURRENT"})}),(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:Number(J||0).toFixed(2)}})})]}),(0,s.jsxs)(b.A,{justifyContent:"space-between",children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_VOLTAGE"})}),(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:Number(K||0).toFixed(2)}})})]}),(0,s.jsxs)(b.A,{justifyContent:"space-between",children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_POWER_FACTOR"})}),(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:Number(q||0).toFixed(2)})]})]}:{flexDirection:"column",justifyContent:"space-between",minWidth:180,children:[(0,s.jsxs)(b.A,{justifyContent:"space-between",children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_OUTLET"})}),(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:Y})]}),(0,s.jsxs)(b.A,{justifyContent:"space-between",alignItems:"center",gap:P.kc,children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"COMMON_NAME"})}),(0,s.jsx)(a.A,{size:"inherit",color:"inherit",isTruncated:!0,children:H})]}),(0,s.jsxs)(b.A,{justifyContent:"space-between",children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"DEVICE_PROPERTIES_OUTLET_CTL_POWER_CYCLE_ENABLED"})}),(0,s.jsx)(Q?u.A:h.A,{})]}),(0,s.jsxs)(b.A,{justifyContent:"space-between",children:[(0,s.jsx)(c.A,{size:"inherit",color:"inherit",children:(0,s.jsx)(D.sA,{id:"DEVICE_PROPERTIES_OUTLET_RELAY_STATE"})}),(0,s.jsx)(Z?u.A:h.A,{})]})]}))},[z,k,B,W,Y,H,X,J,K,q,Q,Z,ee]),se=(0,n.useMemo)(()=>{const e=$?j.A:A.A;switch(B){case R.s.STANDARD:return(0,s.jsx)(v?p.A:e,{size:w});case R.s.SURGE:return(0,s.jsx)(e,{size:w});case R.s.USB:return(0,s.jsx)(d.A,{size:w});case R.s.LAN:return null;case R.s.WAN:return(0,s.jsx)(x.A,{size:w});default:return null}},[$,B,v,w]),ne=(0,n.useCallback)(i=>{i?.preventDefault?.(),i?.stopPropagation?.(),L||ie&&G((0,g.XP)({type:S.H.DEVICE,id:e,tab:F,subId:String(Y),subPanel:I.uY.OUTLETS}))},[G,F,e,ie,Y,L]),re=v&&B===R.s.STANDARD;return(0,s.jsx)(E.A,{description:te,placement:y,children:(0,s.jsx)(M,{isEnabled:!(!Z||B===R.s.SURGE&&U||V),outletType:B||R.s.STANDARD,marginSize:t,cellSize:r,verticalGap:O,centerIcon:N,onClick:ne,..._.A.addDataTestId(_.A.TestId.SIDE_PANEL_TRIGGER),children:(0,s.jsx)(f,{iconRotation:re?void 0:T,children:se})})})}},773351(e,i,t){t.d(i,{A:()=>S});var s=t(274934),n=t(602086),r=t(938984),o=t(814557),l=t(600191),c=t(343954),a=t(247816),d=t(309130),A=t(100978),x=t(470070),h=t(708861),u=t(956978),j=t(434521),p=t(251323),O=t(332522),E=t(713053);const _=(0,a.A)("div")`
  display: flex;
  flex-direction: column;
`,m=(0,a.A)("div")`
  margin-top: ${d.Ln};
  padding-top: ${d.Ln};
  border-top: ${({theme:{themeName:e}})=>o.Ay[`desktop-border-divider-${e}`]};

  div:first-child {
    margin-bottom: ${d.xO};
  }
`,T=(0,a.A)(l.A)`
  color: ${({theme:{themeName:e}})=>o.Ay[`desktop-color-orange-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,C=(0,a.A)(c.A)`
  color: ${({theme:{themeName:e}})=>o.Ay[`desktop-color-green-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,S=({activeItem:e,activeItem:{outlet_table:i,outlet_ac_power_budget:t,outlet_ac_power_consumption:o,port_table:l},hidePorts:c,noDivider:a,gap:S=d.xO,legend:P,verticalLegend:I,tooltipPlacement:b="bottom end"})=>{const{usedPower:g,maxPower:D}=(0,n.useMemo)(()=>(0,h.hf)({outlet_table:i,outlet_ac_power_budget:t,outlet_ac_power_consumption:o}),[i,t,o]),R=(0,u.Tl7)(e)||(0,u.kYz)(e);return(0,s.jsxs)(_,{children:[(0,s.jsxs)(A.A,{justifyContent:"center",gap:S,alignItems:I?"center":void 0,children:[(0,s.jsx)(A.A,{flexDirection:"column",children:(0,s.jsx)(O.A,{disableOnPortClick:!0,activeItem:e,tooltipPlacement:b,isEU:(0,u.goQ)(e),offline:(0,u.aK8)((0,j.S9)(e))})}),l&&!c?(0,s.jsx)("div",{children:(0,s.jsx)(p.A,{activeItem:e,portSizeOverride:"19px",disableOnPortClick:R})}):null,I]}),I?null:P||(0,s.jsx)(E.Ay,{activeItem:e,noTopBorder:a}),g>D?(0,s.jsxs)(m,{children:[(0,s.jsxs)(A.A,{justifyContent:"space-between",children:[(0,s.jsx)(T,{}),(0,s.jsx)(r.A,{size:"small",children:(0,s.jsx)(x.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_WARNING"})})]}),(0,s.jsxs)(A.A,{justifyContent:"space-between",children:[(0,s.jsx)(C,{}),(0,s.jsx)(r.A,{size:"small",children:(0,s.jsx)(x.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_INFO"})})]})]}):null]})}},231083(e,i,t){t.d(i,{A:()=>c});var s=t(274934),n=t(602086),r=t(648175),o=t(470070),l=t(850352);const c=({mac:e})=>{const{handleGoToPortsPage:i}=(0,l.e)(),t=(0,n.useCallback)(()=>{i(e)},[i,e]);return(0,s.jsx)(r.A,{onClick:t,width:"full",children:(0,s.jsx)(o.sA,{id:"COMMON_PORT_MANAGER"})})}},613609(e,i,t){t.d(i,{A:()=>h});var s=t(274934),n=t(247816),r=t(309130),o=t(100978),l=t(535322),c=t(883717),a=t(251323),d=t(231083);const A=(0,n.A)(o.A)`
  > div {
    width: 100%;
  }
`,x=({activeItem:e,activeItem:{port_table:i,mac:t},showFullScreenDiagramButton:n,disableOnPortClick:l,isStacking:A,multipleDisplayedDevicesData:x})=>{const h=0!==(i||[]).length;return(0,s.jsxs)(s.Fragment,{children:[h?(0,s.jsxs)(o.A,{position:"relative",flexDirection:"column",children:[(0,s.jsx)(o.A,{flexDirection:"column",justifyContent:"center",children:A?(x||[]).map(e=>(0,s.jsx)(a.A,{activeItem:e,disableOnPortClick:n||l,isStacking:!0})):(0,s.jsx)(a.A,{activeItem:e,disableOnPortClick:n||l})}),(0,s.jsx)(c.A,{deviceMac:t})]}):null,n&&h?(0,s.jsx)(o.A,{paddingTop:r.Ln,justifyContent:"center",children:(0,s.jsx)(d.A,{mac:t})}):null]})},h=({useBubbleWrapper:e=!0,...i})=>e?(0,s.jsx)(A,{children:(0,s.jsx)(l.A,{flex:"unset",children:(0,s.jsx)(x,{...i})})}):(0,s.jsx)(x,{...i})},469318(e,i,t){t.r(i),t.d(i,{default:()=>h});var s=t(274934),n=t(376892),r=t(535322),o=t(532565),l=t(412160),c=t(613609),a=t(773351),d=t(113592),A=t(320018),x=t(732025);const h=({activeItem:e,activeItem:{mac:i,model:t}})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.A,{type:r.I.ACCORDION,items:[{id:"portsOverview",openByDefault:!0,label:(0,s.jsx)(n.A,{id:"DEVICE_PROPERTY_HEADER_PORTS"}),renderContent:()=>(0,s.jsx)(c.A,{activeItem:e,showFullScreenDiagramButton:!0,useBubbleWrapper:!1})}]}),(0,s.jsx)(r.A,{type:r.I.ACCORDION,items:[{id:"outletOverview",openByDefault:!0,label:(0,s.jsx)(n.A,{id:"COMMON_OUTLETS"}),renderContent:()=>(0,s.jsx)(a.A,{activeItem:e,hidePorts:!0})}]}),(0,s.jsx)(A.A,{mac:i,model:t,logType:d.F.DEVICE,ignoreActionableValues:[l.dl.DEVICE],label:"COMMON_HISTORY"}),(0,s.jsx)(x.A,{mac:i,object:o.qv.GW})]})}}]);