"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[82522],{175522(e,t,l){l.d(t,{A:()=>a,Q:()=>r});var n=l(416348);const a="_",r=[n.ZM,n.Je]},137625(e,t,l){l.d(t,{A:()=>c});var n=l(296540),a=l(353899),r=l(132196),o=l(372737),i=l(566723),s=l(916537);const c=({children:e=null,title:t,titleValues:l,message:c,messageValues:m,handleConfirm:E=()=>null,handleClose:d=()=>null,handleCancel:u,isOpen:A,buttonVariant:_="primary",cancelButtonVariant:p="tertiary",cancelButtonMessage:O="COMMON_ACTION_CANCEL",buttonMessage:C="COMMON_ACTION_CONFIRM",buttonDisabled:v=!1,position:b="top",offset:g,showHeaderClose:h=!1,contentClassName:I="",body:N,titleBody:T,className:M,rootClose:f=!1,footerActions:R})=>{const w=(0,n.useCallback)(e=>{A&&(e.stopPropagation(),e.key===o.U.ENTER?E():e.key===o.U.ESCAPE&&d(!1))},[A,E,d]);(0,n.useEffect)(()=>(window.addEventListener("keydown",w,!0),()=>{window.removeEventListener("keydown",w,!0)}),[w]);const S=(0,n.useCallback)(()=>{d(!1),u?.()},[d,u]),D=(0,n.useCallback)(()=>{d(!1),E()},[d,E]),y=(0,n.useMemo)(()=>[{text:n.createElement(s.sA,{id:O}),variant:p,onClick:S},{text:n.createElement(s.sA,{id:C}),disabled:v,variant:_,onClick:D}],[C,_,O,p,S,D,v]),k=(0,n.useCallback)(()=>{d(!1)},[d]),P=r.AH`
    ${t?"":`margin-top: ${i.xO}`}
  `;return n.createElement(a.A,{title:t?n.createElement(s.sA,{id:t,values:l}):T||null,...c?{body:n.createElement(n.Fragment,null,n.createElement(s.sA,{id:c,values:m}),N)}:{body:N},position:b,portal:!0,offset:g,actions:R||y,showHeaderClose:h,contentClassName:r.AH`
        ${P}
        ${I}
      `,onRequestClose:k,isOpen:A,allowOverflow:!0,rootClose:f,className:M},e)}},923515(e,t,l){l.d(t,{A:()=>o});var n=l(296540),a=l(916537),r=l(180524);const o=({isMeshing:e,isNotReady:t,children:l,hidden:o})=>n.createElement(r.A,{description:o?void 0:t?n.createElement(a.sA,{id:"COMMON_SUPERVISOR_DEVICE_STATE_NOT_AVAILABLE"}):e?n.createElement(a.sA,{id:"COMMON_DEVICE_SUPERVISOR_MESHING_DISABLED_TOOLTIP"}):void 0},n.createElement("span",null,l))},124229(e,t,l){l.d(t,{D:()=>v});var n=l(296540),a=l(592563),r=l(951272),o=l(429252),i=l.n(o),s=l(916537),c=l(816260),m=l(284428),E=l(100946),d=l(438628),u=l(294303),A=l(566723),_=l(945132);const p={heartbeat_interval:"COMMON_HEARTBEAT",silence_threshold:"COMMON_SILENCE_THRESHOLD",power_off_duration:"COMMON_POWER_OFF_DURATION"},O={heartbeat_interval:"COMMON_HEARTBEAT_TOOLTIP",silence_threshold:"COMMON_SILENCE_THRESHOLD_TOOLTIP",power_off_duration:"COMMON_POWER_OFF_DURATION_TOOLTIP"},C=(0,n.memo)(({field:e})=>{const{values:t,setFieldValue:l}=(0,r.j7)(),a=(0,m.mQ)(),o=e.split(".").pop(),i=t.powerSupervisor.settings[o]/_.gG,C=c.KP[o]/_.gG,v=c.Av[o]/_.gG;return n.createElement(u.A,{gap:A.kc,width:"100%"},n.createElement(u.A,{width:"100%"},n.createElement(E.A,{style:{width:"100%"},value:i,onChange:t=>l(e,Number(t)*_.gG),minValue:C,maxValue:v,label:n.createElement(s.sA,{id:p[o]}),labelProps:{tooltipMessage:n.createElement(s.sA,{id:O[o]}),isTooltipDisabled:a},isDisabled:a})),n.createElement(u.A,{style:{maxWidth:"105px"}},n.createElement(d.A,{type:"number",value:i,variant:"secondary",contentAfter:n.createElement(s.sA,{id:"COMMON_UNIT_MIN"}),onChange:t=>{l(e,Number(t.target.value)*_.gG)},min:C,max:v,disabled:a})))}),v=()=>{const{values:e,setFieldValue:t}=(0,r.j7)(),l=(0,n.useMemo)(()=>i()((0,r.O6)(e,"powerSupervisor.settings"),c.R4),[e]),o=(0,m.mQ)();return n.createElement(u.A,{flexDirection:"column",gap:A.kc,alignItems:"flex-start"},n.createElement(C,{field:"powerSupervisor.settings.heartbeat_interval"}),n.createElement(C,{field:"powerSupervisor.settings.silence_threshold"}),n.createElement(a.A,{onClick:()=>{t("powerSupervisor.settings.heartbeat_interval",c.R4.heartbeat_interval),t("powerSupervisor.settings.silence_threshold",c.R4.silence_threshold),t("powerSupervisor.settings.power_off_duration",c.R4.power_off_duration)},fontSize:"medium",isDisabled:l||o},n.createElement(s.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})))}},92069(e,t,l){l.d(t,{be:()=>o,i3:()=>r,r8:()=>a});var n=l(816260);const a="powerForm",r="new",o={id:r,site_id:"",enabled:!1,client_mac:"",power_sources:[],settings:n.R4}},540446(e,t,l){l.d(t,{A:()=>i});var n=l(296540),a=l(86571),r=l(689965),o=l(346241);const i=(0,n.memo)(({mac:e,object:t})=>n.createElement(r.A,{type:r.I.ACCORDION,items:[{id:"systemPerformance",openByDefault:!1,label:n.createElement(a.A,{id:"DEVICE_PROPERTY_SYSTEM_STATISTICS"}),renderContent:()=>n.createElement(o.A,{mac:e,object:t})}]}))},949810(e,t,l){l.d(t,{A:()=>h});var n=l(296540),a=l(217439),r=l(822336),o=l(823858),i=l(618983),s=l(71479),c=l(566723),m=l(294303),E=l(916537),d=l(170163),u=l(780811),A=l(837612),_=l(799552),p=l(377588),O=l(406816);const C=(0,s.A)("div")`
  display: flex;
  flex-direction: column;
`,v=(0,s.A)("div")`
  margin-top: ${c.Ln};
  padding-top: ${c.Ln};
  border-top: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};

  div:first-child {
    margin-bottom: ${c.xO};
  }
`,b=(0,s.A)(o.A)`
  color: ${({theme:{themeName:e}})=>r.Ay[`desktop-color-orange-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,g=(0,s.A)(i.A)`
  color: ${({theme:{themeName:e}})=>r.Ay[`desktop-color-green-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,h=({activeItem:e,activeItem:{outlet_table:t,outlet_ac_power_budget:l,outlet_ac_power_consumption:r,port_table:o},hidePorts:i,noDivider:s,gap:h=c.xO,legend:I,verticalLegend:N,tooltipPlacement:T="bottom end"})=>{const{usedPower:M,maxPower:f}=(0,n.useMemo)(()=>(0,d.hf)({outlet_table:t,outlet_ac_power_budget:l,outlet_ac_power_consumption:r}),[t,l,r]),R=(0,u.Tl7)(e)||(0,u.kYz)(e);return n.createElement(C,null,n.createElement(m.A,{justifyContent:"center",gap:h,alignItems:N?"center":void 0},n.createElement(m.A,{flexDirection:"column"},n.createElement(p.A,{disableOnPortClick:!0,activeItem:e,tooltipPlacement:T,isEU:(0,u.goQ)(e),offline:(0,u.aK8)((0,A.S9)(e))})),o&&!i?n.createElement("div",null,n.createElement(_.A,{activeItem:e,portSizeOverride:"19px",disableOnPortClick:R})):null,N),N?null:I||n.createElement(O.Ay,{activeItem:e,noTopBorder:s}),M>f?n.createElement(v,null,n.createElement(m.A,{justifyContent:"space-between"},n.createElement(b,null),n.createElement(a.A,{size:"small"},n.createElement(E.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_WARNING"}))),n.createElement(m.A,{justifyContent:"space-between"},n.createElement(g,null),n.createElement(a.A,{size:"small"},n.createElement(E.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_INFO"})))):null)}},863189(e,t,l){l.d(t,{Ay:()=>_,u6:()=>A});var n=l(822336),a=l(296540),r=l(808326),o=l(71479),i=l(382389),s=l(566723),c=l(294303),m=l(916537),E=l(406816);const d=()=>{const{themeName:e,motifPalette:{lime06:t,uBlue01:l}}=(0,i.u)();return a.createElement(a.Fragment,null,a.createElement(E.Jv,{icon:a.createElement(E.RH,{status:"positive"}),label:a.createElement(a.Fragment,null,a.createElement(m.sA,{id:"COMMON_ENABLED"})," / ",a.createElement(m.sA,{id:"COMMON_MEDIA_GE"}))}),a.createElement(E.Jv,{icon:a.createElement(E.RH,{color:t}),label:a.createElement(m.sA,{id:"COMMON_MEDIA_FE"})}),a.createElement(E.Jv,{icon:a.createElement(E.RH,{color:n.Ay[`desktop-color-neutral-05-${e}`]}),label:a.createElement(m.sA,{id:"DEVICE_NOT_POWERED"})}),a.createElement(E.Jv,{icon:a.createElement(r.A,{color:n.Ay[`desktop-color-neutral-08-${e}`]}),label:a.createElement(m.sA,{id:"DEVICE_BATTERY_BACKED"})}),a.createElement(E.Jv,{icon:a.createElement(E.RH,{borderColor:n.Ay[`desktop-color-ublue-03-${e}`],background:l}),label:a.createElement(m.sA,{id:"DEVICE_SURGE_NETWORK"})}))},u=(0,o.A)(E.cs)`
  grid-template-columns: repeat(4, minmax(min-content, 0.5fr));
`,A=()=>a.createElement(u,{noTopBorder:!0},a.createElement(d,null)),_=()=>a.createElement(c.A,{flexDirection:"column",gap:s.YC},a.createElement(d,null))},575177(e,t,l){l.r(t),l.d(t,{default:()=>_});var n=l(296540),a=l(86571),r=l(689965),o=l(87250),i=l(780811),s=l(275357),c=l(949810),m=l(540739),E=l(13739),d=l(540446),u=l(943089),A=l(863189);const _=({activeItem:e,activeItem:{mac:t,model:l}})=>n.createElement(n.Fragment,null,n.createElement(r.A,null,n.createElement(c.A,{activeItem:e,hidePorts:(0,i.kYz)(e)||(0,i.vqp)(e),noDivider:!0,...(0,i.vqp)(e)?{legend:n.createElement(A.u6,null)}:{}})),n.createElement(r.A,{type:r.I.ACCORDION,items:[{id:"outlets",openByDefault:!0,label:n.createElement(a.A,{id:"COMMON_OUTLETS"}),renderContent:()=>n.createElement(u.A,{activeItem:e,hidePorts:!0})}]}),n.createElement(E.A,{mac:t,model:l,logType:m.F.DEVICE,ignoreActionableValues:[s.dl.DEVICE],label:"COMMON_HISTORY",hideClientTabs:!0}),n.createElement(d.A,{mac:t,object:o.qv.SW}))},280258(e,t,l){l.d(t,{H:()=>n});const n=""},362412(e,t,l){l.d(t,{A:()=>E});var n=l(296540),a=l(469733),r=l(436331),o=l(805837),i=l(282556),s=l(71265);const c=e=>n.createElement(r.A,{renderOption:o.q,...e}),m=e=>n.createElement(c,{...e});m.Sorted=e=>{const t=(0,a.useSelector)(i.zi),l=(0,n.useMemo)(()=>(0,s.k)(t),[t]);return n.createElement(c,{...e,sortBy:l})};const E=m},71265(e,t,l){l.d(t,{R:()=>E,k:()=>d});var n=l(280258),a=l(190497),r=l(953048),o=l(175522),i=l(936621),s=l(742525);const c=[...new Set([n.H,o.Q.join(o.A),r.Zt,i.F,a.nc,s.Vr])],m={numeric:!0,sensitivity:"base"},E=(e,t)=>{const l=[];for(let n=e;n<=t;n+=1)l.push({value:n,label:String(n)});return l},d=e=>({value:t,label:l},{value:n,label:a})=>c.includes(t?.toString())||c.includes(n?.toString())?1/0:l?.toString().localeCompare(a?.toString(),e,m)??-1}}]);