"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[69735],{618965(t,e,i){i.d(e,{A:()=>m});var n=i(602086),o=i(125799),a=i(43009),r=(0,n.memo)(t=>{const{motif:e,width:i=194,left:r=0,top:d=0,hidden:s,topMargin:c,tooltipProps:l={},portal:m,...p}=t,{motif:u}=(0,a.A)(e),h=null!=m?m:l.portal;return n.createElement("div",{style:{position:"absolute",left:r,top:d}},n.createElement(o.A,{motif:u,width:i,animate:!1,isHoverable:!1,offset:c?c+10:l.offset,...p,...l,portal:h,isOpen:h?!s:void 0},n.createElement("div",null)))},(t,e)=>Boolean(e.hidden));function d(t){return null!==t&&("string"==typeof t?"%"===t.slice(-1):!isNaN(t))}(0,i(455642).A)(".tooltipContainer__Q9Q7ZKPc{opacity:1;pointer-events:none}.tooltipContainer__Q9Q7ZKPc.animated__Q9Q7ZKPc{transition-duration:.1s;transition-property:opacity;transition-timing-function:cubic-bezier(.25,0,.25,1)}.tooltipContainer__Q9Q7ZKPc.interactive__Q9Q7ZKPc{pointer-events:auto}.tooltipContainer__Q9Q7ZKPc.interactive__Q9Q7ZKPc.hidden__Q9Q7ZKPc{pointer-events:none}.tooltipContainer__Q9Q7ZKPc.hidden__Q9Q7ZKPc{opacity:0}");var s=i(999803),c=i(495132);const l=(0,s.c)({tooltipContainer:"tooltipContainer__Q9Q7ZKPc",animated:"animated__Q9Q7ZKPc",interactive:"interactive__Q9Q7ZKPc",hidden:"hidden__Q9Q7ZKPc"});var m=(0,n.memo)(n.forwardRef((t,e)=>{const{className:i,isAnimated:o=!0,delay:a,hidden:s=!1,top:m=0,left:p=0,isInteractive:u,message:h,title:g,description:v,children:f,...b}=t,{currentState:x,onStart:A,onComplete:_}=(0,c.T)(s,a),[S,I]=(0,n.useState)(!0),[C,$]=(0,n.useState)({top:m,left:p,message:h,title:g,description:v,children:f});(0,n.useEffect)(()=>{I(!1)},[]),(0,n.useEffect)(()=>{s!==x&&(s?_:A)(s)},[s,x,A,_]),(0,n.useEffect)(()=>{s||$({top:m,left:p,message:h,title:g,description:v,children:f})},[s,m,p,h,g,v,f]);const Q=!x&&d(p)&&d(m)&&!S;return n.createElement("div",{"data-testid":"svgtooltip",ref:e,className:l.concat(i)("tooltipContainer",!Q&&"hidden",u&&"interactive",o&&"animated")},n.createElement(r,{hidden:x,top:C.top,left:C.left,isInteractive:u,message:C.message,title:C.title,description:C.description,...b},C.children))}))},752104(t,e,i){i.d(e,{A:()=>o,Q:()=>a});var n=i(765567);const o="_",a=[n.ZM,n.Je]},535322(t,e,i){i.d(e,{A:()=>h,I:()=>n});var n,o=i(274934),a=i(814557),r=i(158885),d=i(247816),s=i(565527),c=i(309130),l=i(100978),m=i(291508);!function(t){t.ACCORDION="accordion",t.BUTTON_LIST="buttonList"}(n||(n={}));const p=(0,d.A)(l.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:t,nested:e,theme:{themeName:i}})=>t||a.Ay[i===s.S.DARK?`desktop-color-neutral-${e?"00":"01"}-${s.S.DARK}`:`desktop-color-neutral-${e?"01":"00"}-${s.S.LIGHT}`]};
  padding: ${({isButtonList:t,padding:e})=>e||(t?`0 ${c.Ln}`:c.Ln)};
  margin-bottom: ${({marginBottom:t})=>t||c.Ln};
  ${({margin:t})=>t?`margin: ${t};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:t="100%"})=>t};
  flex: ${({flex:t=0})=>t};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:t})=>t?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:t}})=>a.Ay[`desktop-border-divider-${t}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,u=(0,d.A)(r.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:t,nested:e,theme:{themeName:i}})=>t||a.Ay[i===s.S.DARK?`desktop-color-neutral-${e?"00":"01"}-${s.S.DARK}`:`desktop-color-neutral-${e?"01":"00"}-${s.S.LIGHT}`]};
  margin-bottom: ${({theme:t,marginBottom:e})=>e||t.spacing["spacing-l"]};
  ${({margin:t})=>t?`margin: ${t};`:""}
  ${({padding:t})=>t?`padding: ${t};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:t=0})=>t};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:t,theme:{themeName:e}})=>t||a.Ay[e===s.S.DARK?`desktop-color-neutral-01-${s.S.DARK}`:`desktop-color-neutral-00-${s.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${c.Ln} ${c.Ln};
      }
    }
  }
`,h=({type:t,marginBottom:e,margin:i,padding:a,flex:r,width:d,nested:s,...c})=>"items"in c?(0,o.jsx)(u,{marginBottom:e,margin:i,padding:a,flex:r,nested:s,...c}):(0,o.jsx)(p,{nested:s,width:d,marginBottom:e,margin:i,padding:a,flex:r,isButtonList:t===n.BUTTON_LIST,...c,children:c.children})},924337(t,e,i){i.d(e,{Ay:()=>b,eY:()=>v,t8:()=>f});var n=i(274934),o=i(602086),a=i(383061),r=i(938984),d=i(409844),s=i(237887),c=i(309130),l=i(100978),m=i(535322),p=i(470070),u=i(262457),h=i(754005);const g=d.AH`
  width: unset;
`,v="group",f=({activeItem:t,addGroupOption:e})=>{const{formatMessage:i}=(0,p.tz)(),{switchId:r,setSwitchId:d}=(0,u.y)(),c=(0,o.useCallback)(t=>d(t.id),[d]),l=[...e?[{id:v,label:i({id:"COMMON_GROUP"})}]:[],...Object.keys(t.devicesData).map((t,e)=>({id:t,label:i({id:"COMMON_SWITCH_N"},{n:e+1})}))];return l.length>h.e?(0,n.jsx)(s.A,{variant:"secondary",width:"100%",portal:!0,options:l.map(({id:t,label:e})=>({value:t,label:e})),value:r,onChange:({value:t})=>{d(t)},placeholder:i({id:"SETTINGS_TRAFFIC_ROUTES_INTERFACE_SELECT"})}):(0,n.jsx)(a.A,{tabs:l,onSelectTab:c,selectedTab:r,variant:"filter",className:g})},b=t=>(0,n.jsx)(m.A,{children:(0,n.jsxs)(l.A,{flexDirection:"column",height:"100%",gap:c.Ln,alignItems:"start",children:[(0,n.jsx)(r.A,{weight:"bold",size:"medium",children:(0,n.jsx)(p.sA,{id:"COMMON_STACKED_SWITCHES"})}),(0,n.jsx)(f,{...t})]})})},754005(t,e,i){i.d(e,{e:()=>n});const n=5},613851(t,e,i){i.r(e),i.d(e,{default:()=>b});var n=i(274934),o=i(602086),a=i(412160),r=i(262457),d=i(113592),s=i(320018),c=i(376892),l=i(535322),m=i(532565),p=i(100978),u=i(309130),h=i(560151),g=i(924337);const v=(0,o.memo)(({activeItem:t})=>{const{switchId:e}=(0,r.y)(),i=t.devicesData[e];return i?(0,n.jsx)(l.A,{type:l.I.ACCORDION,items:[{id:"systemPerformance",openByDefault:!1,label:(0,n.jsx)(c.A,{id:"DEVICE_PROPERTY_SYSTEM_STATISTICS"}),renderContent:()=>(0,n.jsxs)(p.A,{flexDirection:"column",gap:u.kc,alignItems:"start",children:[(0,n.jsx)(g.t8,{activeItem:t}),(0,n.jsx)(h.A,{mac:i.mac,object:m.qv.SW})]})}]}):null}),f=({activeItem:t})=>{const{switchId:e}=(0,r.y)(),i=t.devicesData[e],c=(0,o.useMemo)(()=>Object.keys(t.devicesData).filter(e=>t.devicesData[e]),[t.devicesData]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.A,{mac:i?.mac,model:i?.model,logType:d.F.DEVICE,ignoreActionableValues:[a.dl.DEVICE],label:"COMMON_HISTORY",macs:c}),(0,n.jsx)(v,{activeItem:t})]})},b=({activeItem:t})=>(0,n.jsx)(r.u,{initialSwitchId:Object.keys(t.devicesData)[0],children:(0,n.jsx)(f,{activeItem:t})})},262457(t,e,i){i.d(e,{u:()=>r,y:()=>d});var n=i(274934),o=i(602086);const a=(0,o.createContext)({}),r=({children:t,initialSwitchId:e})=>{const[i,r]=(0,o.useState)(e),d=(0,o.useMemo)(()=>({switchId:i,setSwitchId:r}),[i]);return(0,n.jsx)(a.Provider,{value:d,children:t})},d=()=>(0,o.useContext)(a)},696049(t,e,i){i.d(e,{H:()=>n});const n=""},237887(t,e,i){i.d(e,{A:()=>p});var n=i(274934),o=i(602086),a=i(977872),r=i(693371),d=i(767822),s=i(820633),c=i(308111);const l=t=>(0,n.jsx)(r.A,{renderOption:d.q,...t}),m=t=>(0,n.jsx)(l,{...t});m.Sorted=t=>{const e=(0,a.d4)(s.zi),i=(0,o.useMemo)(()=>(0,c.k)(e),[e]);return(0,n.jsx)(l,{...t,sortBy:i})};const p=m},308111(t,e,i){i.d(e,{R:()=>m,k:()=>p});var n=i(696049),o=i(350068),a=i(177173),r=i(752104),d=i(64222),s=i(332530);const c=[...new Set([n.H,r.Q.join(r.A),a.Zt,d.F,o.nc,s.Vr])],l={numeric:!0,sensitivity:"base"},m=(t,e)=>{const i=[];for(let n=t;n<=e;n+=1)i.push({value:n,label:String(n)});return i},p=t=>({value:e,label:i},{value:n,label:o})=>c.includes(e?.toString())||c.includes(n?.toString())?1/0:i?.toString().localeCompare(o?.toString(),t,l)??-1}}]);