"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[52491],{857301(e,t,n){n.d(t,{$:()=>a,D:()=>l});const a="reportWifiExperience",l=[{value:"DROPPED_CONNECTIVITY",label:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_REASON_DROPPED_CONNECTIVITY"},{value:"POOR_LATENCY",label:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_REASON_POOR_LATENCY"},{value:"POOR_THROUGHPUT",label:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_REASON_POOR_THROUGHPUT"}]},175522(e,t,n){n.d(t,{A:()=>l,Q:()=>r});var a=n(416348);const l="_",r=[a.ZM,a.Je]},216211(e,t,n){n.d(t,{e:()=>u});var a=n(296540),l=n(956347),r=n(469733),i=n(15095),c=n(627440),o=n(431247),s=n(293016),m=n(649413),d=n(497470);const u=()=>{const e=(0,r.useDispatch)(),t=(0,l.W6)(),n=(0,i.A)(`${c.VO.PORTS}`);return{handleGoToPortsPage:(0,a.useCallback)((a,l,r)=>{if(a)if(e((0,d.gU)(!0)),e((0,d.U)((0,m.HN)(s.F7.DEVICE,[a]))),e((0,d.E1)(!0)),r&&e((0,d.IU)(!0)),l){const t=(0,o.FS)(a,l);e((0,d.Ao)([t]))}else e((0,d.Ao)([]));t.push(n)},[n,t,e])}}},243322(e,t,n){n.d(t,{A:()=>l});var a=n(217439);const l=(0,n(71479).A)(a.A)`
  white-space: nowrap;
`},224948(e,t,n){n.d(t,{A:()=>d});var a=n(296540),l=n(217439),r=n(71479),i=n(566723),c=n(294303),o=n(689965);const s=(0,r.A)("div")`
  margin-right: ${i.kc};
`,m=(0,r.A)("div")`
  margin-left: ${i.kc};
`,d=({icon:e,closeIcon:t,nested:n,children:r,...i})=>a.createElement(o.A,{nested:n,...i},a.createElement(c.A,null,a.createElement(s,null,e),a.createElement(l.A,{size:"medium"},r),t?a.createElement(m,null,t):null))},22169(e,t,n){n.d(t,{A:()=>s});var a=n(296540),l=n(217439),r=n(916537),i=n(115829),c=n(39705),o=n(294303);const s=({ipv6:e,size:t="inherit",color:n="inherit"})=>{const s=e?.[0];return s?a.createElement(o.A,{width:"100%",justifyContent:"flex-end"},a.createElement(i.A,{flexProps:{justifyContent:"flex-end",alignItems:"center"},color:n,size:t},s),e?.length>1?a.createElement(c.A,{items:e,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>a.createElement(a.Fragment,null,e),renderMultipleItemsSummary:()=>null}):null):a.createElement(l.A,{size:t,color:n},a.createElement(r.sA,{id:"COMMON_FALLBACK"}))}},689965(e,t,n){n.d(t,{A:()=>A,I:()=>a});var a,l=n(296540),r=n(822336),i=n(963724),c=n(71479),o=n(825032),s=n(566723),m=n(294303),d=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const u=(0,c.A)(m.A,(0,d.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===o.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,E=(0,c.A)(i.A,(0,d.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===o.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||r.Ay[t===o.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${s.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${s.Ln} ${s.Ln};
      }
    }
  }
`,A=({type:e,marginBottom:t,margin:n,padding:r,flex:i,width:c,nested:o,...s})=>"items"in s?l.createElement(E,{marginBottom:t,margin:n,padding:r,flex:i,nested:o,...s}):l.createElement(u,{nested:o,width:c,marginBottom:t,margin:n,padding:r,flex:i,isButtonList:e===a.BUTTON_LIST,...s},s.children)},369702(e,t,n){n.d(t,{A:()=>r});var a=n(296540),l=n(74750);const r=({children:e,...t})=>a.createElement(l.A,{variant:"secondary-emphasis",...t},e)},107748(e,t,n){n.d(t,{A:()=>A});var a=n(296540),l=n(469733),r=n(968906),i=n(398300),c=n(845030),o=n(951106),s=n(691294),m=n(6510),d=n(94313),u=n(623771);const E=({uplinkDevice:e,client:t,maxWidth:n})=>{const s=(0,l.useDispatch)(),E=(0,m.Q)(e),A=(0,o.f2)(t,e),p=(0,a.useCallback)(()=>{s((0,c.XP)({type:i.H.DEVICE,id:e?.mac}))},[s,e?.mac]);return E?a.createElement(d.A,{messageId:"COMMON_CONNECTED_TO",buttonEl:a.createElement(u.A,{...r.A.addDataTestId(r.A.TestId.SIDE_PANEL_TRIGGER),onClick:p,name:E,port:A,size:"medium",maxWidth:n||195,separatePortNumber:!0,isFullWidth:!0})}):null},A=({uplinkDevice:e,client:t,maxWidth:n})=>t.status===s.S2.ONLINE?a.createElement(E,{uplinkDevice:e,client:t,maxWidth:n}):null},137625(e,t,n){n.d(t,{A:()=>s});var a=n(296540),l=n(353899),r=n(132196),i=n(372737),c=n(566723),o=n(916537);const s=({children:e=null,title:t,titleValues:n,message:s,messageValues:m,handleConfirm:d=()=>null,handleClose:u=()=>null,handleCancel:E,isOpen:A,buttonVariant:p="primary",cancelButtonVariant:_="tertiary",cancelButtonMessage:g="COMMON_ACTION_CANCEL",buttonMessage:O="COMMON_ACTION_CONFIRM",buttonDisabled:I=!1,position:C="top",offset:h,showHeaderClose:N=!1,contentClassName:M="",body:v,titleBody:x,className:k,rootClose:f=!1,footerActions:T})=>{const b=(0,a.useCallback)(e=>{A&&(e.stopPropagation(),e.key===i.U.ENTER?d():e.key===i.U.ESCAPE&&u(!1))},[A,d,u]);(0,a.useEffect)(()=>(window.addEventListener("keydown",b,!0),()=>{window.removeEventListener("keydown",b,!0)}),[b]);const R=(0,a.useCallback)(()=>{u(!1),E?.()},[u,E]),L=(0,a.useCallback)(()=>{u(!1),d()},[u,d]),y=(0,a.useMemo)(()=>[{text:a.createElement(o.sA,{id:g}),variant:_,onClick:R},{text:a.createElement(o.sA,{id:O}),disabled:I,variant:p,onClick:L}],[O,p,g,_,R,L,I]),P=(0,a.useCallback)(()=>{u(!1)},[u]),S=r.AH`
    ${t?"":`margin-top: ${c.xO}`}
  `;return a.createElement(l.A,{title:t?a.createElement(o.sA,{id:t,values:n}):x||null,...s?{body:a.createElement(a.Fragment,null,a.createElement(o.sA,{id:s,values:m}),v)}:{body:v},position:C,portal:!0,offset:h,actions:T||y,showHeaderClose:N,contentClassName:r.AH`
        ${S}
        ${M}
      `,onRequestClose:P,isOpen:A,allowOverflow:!0,rootClose:f,className:k},e)}},819127(e,t,n){n.d(t,{A:()=>i});var a=n(296540),l=n(766624),r=n(530813);const i=function({items:e,getItemKey:t,renderItem:n,maxItemCount:i,renderShowMore:c,showListMarkers:o,title:s,position:m,isInteractive:d,cursorType:u,listGap:E,iconProps:A}){return a.createElement(l.A,{title:s,position:m,isInteractive:d,cursorType:u,description:a.createElement(r.A,{items:e,getItemKey:t,renderItem:n,maxItemCount:i,listGap:E,renderShowMore:c,showListMarkers:o}),iconProps:A})}},39705(e,t,n){n.d(t,{A:()=>s});var a=n(296540),l=n(705145),r=n(916537),i=n(115829),c=n(424135),o=n(819127);const s=function({items:e,renderMultipleItemsSummary:t,renderListItem:n,renderNoItems:s,getItemKey:m,enabled:d=!0,showListMarkers:u,cursorType:E,isInteractive:A}){const p=d?"inherit":"disabled";return e.length>1?a.createElement(c.A,{tooltip:a.createElement(o.A,{items:e,getItemKey:m,renderItem:n,showListMarkers:u,isInteractive:A,cursorType:E})},a.createElement(i.A,{color:p,cursorType:E},t(e))):1===e.length?a.createElement(i.A,{color:p,cursorType:E},n(e[0])):s?a.createElement(a.Fragment,null,s()):a.createElement(l.A,{isTruncated:!0,color:p},a.createElement(r.sA,{id:"COMMON_FALLBACK"}))}},424135(e,t,n){n.d(t,{A:()=>i});var a=n(296540),l=n(566723),r=n(294303);const i=({children:e,tooltip:t})=>a.createElement(r.A,{maxWidth:"100%",overflow:"hidden",gap:l.YC,alignItems:"center"},e?a.createElement(r.A,{flex:1,overflow:"hidden"},e):null,t)},561173(e,t,n){n.d(t,{v:()=>V,A:()=>K});var a=n(296540),l=n(469733),r=n(951272),i=n(325898),c=n(23835),o=n(217439),s=n(705145),m=n(888170),d=n(617147),u=n(618983),E=n(71479),A=n(852866),p=n(628291),_=n(38937),g=n(6510),O=n(362412),I=n(825032),C=n(566723),h=n(801081),N=n(962315),M=n(429252),v=n.n(M),x=n(189601),k=n(532419);const f=["satisfaction"];var T=n(294303),b=n(6176),R=n(703447),L=n(916537),y=n(857301),P=n(951106),S=n(765562);const w=(0,E.A)(o.A)`
  margin-top: ${C.Ln};
  line-height: 20px;
`,D=(0,E.A)(T.A)`
  background: ${({theme:e})=>m.Ay[e.themeName===I.S.DARK?"grey-1":"white-10"]};
  border-radius: 8px;
  padding: ${C.kc};
`,z=(0,E.A)(o.A)`
  margin-left: ${C.YC};
`,W=(0,E.A)(R.A)`
  vertical-align: middle;
  width: 40px;
  height: 40px;
`,$=(0,E.A)(b.A)`
  vertical-align: middle;
`,F=(0,E.A)(T.A)`
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding-bottom: ${({theme:{spacing:e}})=>e["spacing-s"]};
`,B=(0,E.A)(O.A)`
  margin-top: ${C.Ln};
`,U=(0,E.A)(c.A)`
  margin-top: ${C.Ln};
`;var V;!function(e){e.UNIFI_CLIENT="unifiClient",e.CLIENT="client",e.AP="ap"}(V||(V={}));const H=(e,t)=>{switch(e){case V.CLIENT:case V.UNIFI_CLIENT:return(0,P.tn)(t);case V.AP:return(0,g.Q)(t);default:return null}},G=({isSuccess:e,isError:t})=>e?a.createElement(T.A,{gap:C.YC,alignItems:"center",justifyContent:"center",marginBottom:C.Ln},a.createElement(u.A,{size:"original",variant:"fill",color:m.Ay["color-success"]}),a.createElement(o.A,{size:"medium"},a.createElement(L.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_SUBMIT_SUCCESS"}))):t?a.createElement(T.A,{gap:C.YC,alignItems:"center",justifyContent:"center",marginBottom:C.Ln},a.createElement(u.A,{size:"original",variant:"fill",color:m.Ay["color-danger"]}),a.createElement(o.A,{size:"medium"},a.createElement(L.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_SUBMIT_ERROR"}))):null,K=({item:e,experienceGraphType:t,hideModal:n})=>{const{formatMessage:c}=(0,L.tz)(),{motif:m}=(0,i.A)(),{dirty:u,errors:E,isSubmitting:g,handleSubmit:O,setFieldValue:I,status:M={},values:b}=(0,r.j7)(),{isSuccess:R,isError:K}=M,X=y.D.map(({value:e,label:t})=>({value:e,label:c({id:t})})),j=(0,a.useCallback)((e,t)=>{I("reason",t)},[I]),Y=(0,a.useCallback)((e,t)=>{I(e.target.name,t)},[I]),Q=(0,a.useCallback)(e=>{O?.(e)},[O]),q="uplink_mac"in e&&e.uplink_mac,Z="sw_port"in e&&e.sw_port,J=(0,a.useMemo)(()=>{return q&&Z?(e=q,t=Z,(0,x.WY)((e,t)=>v()((0,N.A)(e,f),(0,N.A)(t,f)))((0,h.Mz)((0,k.bw)(e,["port_table"]),e=>e?.port_table?.[t]||{}),e=>e)):()=>{};var e,t},[q,Z]),ee=(0,l.useSelector)(J),te=(0,a.useMemo)(()=>{const{satisfaction:t}="type"in e?(0,P.FX)(ee,e.type,"wifi_experience_score"in e?e.wifi_experience_score:void 0):e;return t},[e,ee]);return a.createElement(d.A,{isOpen:!0,onRequestClose:n,title:a.createElement(L.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_HEADER"}),size:"small",actions:R||K?[]:[{text:a.createElement(L.sA,{id:"COMMON_ACTION_CANCEL"}),onClick:n},{text:a.createElement(L.sA,{id:"COMMON_ACTION_SUBMIT"}),variant:"primary",onClick:Q,disabled:!u||g,loader:g?"spinner":null}],...R||K?{footer:a.createElement(G,{isSuccess:R,isError:K})}:{}},a.createElement("iframe",{title:"unifi-experts-corner",width:"100%",height:"200",src:S.A.wifiPerformanceTipsVideo,frameBorder:"0"}),a.createElement(w,{color:"text-3",size:"medium"},a.createElement(L.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_SUBTITLE"})),a.createElement(D,{marginTop:C.Ln,gap:C.kc},a.createElement(T.A,{justifyContent:"center",alignItems:"center",flexShrink:0,flexGrow:0},((e,t)=>{switch(e){case V.CLIENT:case V.UNIFI_CLIENT:return a.createElement(W,{client:t,alt:H(e,t)});case V.AP:return a.createElement($,{model:t.model});default:return null}})(t,e)),a.createElement(T.A,{flexDirection:"column",overflow:"hidden"},a.createElement(s.A,{size:"medium",isTruncated:!0},(0,A.c)(H(t,e),30)),te&&-1!==te?a.createElement(o.A,{size:"medium"},a.createElement(L.sA,{id:"COMMON_WIFI_EXP"}),":",a.createElement(z,{weight:"bold",size:"medium",style:{color:(0,p.L)(te,m)}},a.createElement(L.sA,{id:(0,_.gd)(te)}))):null)),a.createElement(F,null,a.createElement(B,{width:"100%",placeholder:c({id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_PROBLEM_LABEL"}),options:X,variant:"secondary",onChange:j,value:b.reason}),a.createElement(U,{variant:"secondary",name:"comment",height:80,maxHeight:200,maxWidth:"100%",minWidth:349,full:!0,value:b.comment,onChange:Y,placeholder:c({id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_COMMENT_LABEL"}),invalid:E&&E.comment})))}},551753(e,t,n){n.d(t,{A:()=>p});var a=n(822336),l=n(296540),r=n(758649),i=n(217439),c=n(162420),o=n(823858),s=n(793336),m=n(382389),d=n(46119),u=n(916537),E=n(224948),A=n(294303);const p=(0,l.memo)(({children:e,customIcon:t,link:n,nested:p,extra:_,variant:g="warning",...O})=>{const{themeName:I}=(0,m.u)(),C=(0,l.useMemo)(()=>{switch(g){case"warning":return l.createElement(o.A,{size:"original",color:a.Ay[`desktop-color-orange-06-${I}`],variant:"fill"});case"info":return l.createElement(c.A,{isActive:!0,size:"original",variant:"fill"});case"custom":return t;default:return l.createElement(s.A,{size:"medium",color:a.Ay[`desktop-color-red-06-${I}`],variant:"fill"})}},[g,I,t]),h=(0,l.useCallback)(()=>{d.A.open(n)},[n]);return l.createElement(E.A,{icon:C,nested:p,...O},l.createElement(A.A,{flexDirection:"column",alignItems:"flex-start"},l.createElement(i.A,null,e),l.createElement(i.A,null,n?l.createElement(r.A,{type:"button",variant:"inline",onClick:h},l.createElement(u.sA,{id:"COMMON_LEARN_MORE"})):null),_))})},373934(e,t,n){n.d(t,{A:()=>i});var a=n(296540),l=n(758649),r=n(216211);const i=({mac:e,port:t,children:n})=>{const{handleGoToPortsPage:i}=(0,r.e)(),c=(0,a.useCallback)(n=>{n.stopPropagation(),i(e,+t)},[i,e,t]);return a.createElement(l.A,{type:"button",size:"inherit",variant:"inline",onClick:c},n)}},533520(e,t,n){n.d(t,{x:()=>l});var a=n(296540);const l=({mac:e,detailedStates:t,uplinkDisplayName:n,portNumber:l,uplinkMac:r,PortPowerLimitExceededWarning:i,UplinkNearPowerLimitWarning:c,DeviceNearPowerLimitWarning:o=null})=>{switch(!0){case t.port_power_limit_exceeded:return a.createElement(i,{uplinkDisplayName:n,portNumber:l,uplinkMac:r});case t.uplink_near_power_limit:return a.createElement(c,{uplinkMac:r,uplinkDisplayName:n});case t.device_near_power_limit:return o?a.createElement(o,{mac:e}):null;default:return null}}},660950(e,t,n){n.d(t,{A:()=>c});var a=n(296540),l=n(852866),r=n(916537),i=n(373934);const c=({uplinkMac:e,portNumber:t,uplinkDisplayName:n})=>a.createElement(r.sA,{id:"DEVICE_POE_PORT_OUT_OF_POWER",values:{portName:a.createElement(i.A,{mac:e,port:t},`${(0,l.c)(n)} ${(0,r.tz)().formatMessage({id:"COMMON_PORT"})} ${t}`)}})},146784(e,t,n){n.d(t,{A:()=>E});var a=n(296540),l=n(349424),r=n(217439),i=n(383653),c=n(568560),o=n(22169),s=n(294303),m=n(916537),d=n(348466),u=n(360113);const E=(0,a.memo)(({ipv6_address:e=[],wan_dhcpv6_pd_size:t})=>{const{globalAddresses:n,linkLocalAddress:E}=(0,a.useMemo)(()=>{const t=[];let n=null;for(let a=0;a<e.length;a+=1){const r=e[a];new l.Address6(r).isLinkLocal()?n=r?.split(d.Ed)?.[0]:t.push(r.split(d.Ed)?.[0])}return{globalAddresses:t,linkLocalAddress:n}},[e]);return n.length?a.createElement(a.Fragment,null,a.createElement(u.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(m.sA,{id:"COMMON_IPV6_ADDRESS"})),a.createElement(c.A,{ipv6:n,size:"medium",color:"text-3"})),t?a.createElement(u.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(m.sA,{id:"COMMON_IPV6_PREFIX"})),a.createElement(s.A,{flex:"1",minWidth:"0",justifyContent:"flex-end"},a.createElement(o.A,{ipv6:[`${(0,i.Gh)(n[0],t)}/${t}`],color:"text-3",size:"medium"}))):null,E?a.createElement(u.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(m.sA,{id:"COMMON_IPV6_LINK_LOCAL"})),a.createElement(c.A,{ipv6:[E],size:"medium",color:"text-3"})):null):null})},94313(e,t,n){n.d(t,{A:()=>A});var a=n(296540),l=n(71479),r=n(132196),i=n(311785),c=n(916537),o=n(566723),s=n(294303),m=n(243322);const d=(0,l.A)(s.A,(0,i.A)("alignLeft"))`
  ${({alignLeft:e})=>e?"max-width: 288px;":"max-width: 100%; justify-content: center;"}
  gap: ${o.YC};
  align-items: center;
`,u=r.AH`
  max-width: 50%;
`,E=r.AH`
  flex: 0 1 auto;
  min-width: 0;
`,A=({messageId:e,messageValues:t,buttonEl:n,alignLeft:l=!0,color:r="text-3",variant:i="body-primary"})=>a.createElement(d,{alignLeft:l},a.createElement(m.A,{variant:i,color:r},t?a.createElement(s.A,{maxWidth:288,whiteSpace:"nowrap",paddingRight:o.YC},a.createElement(c.sA,{id:e,values:t})):a.createElement(c.sA,{id:e})),n?a.createElement(s.A,{className:l?E:u},n):null)},532988(e,t,n){n.d(t,{A:()=>O});var a=n(469733),l=n(296540),r=n(217439),i=n(968906),c=n(90757),o=n(566723),s=n(294303),m=n(398300),d=n(623771),u=n(845030),E=n(916537),A=n(532419),p=n(413146),_=n(94313),g=n(932752);const O=({last_uplink_mac:e,last_uplink_name:t,last_uplink_remote_port:n,disconnected_at:O,disabled:I,separatePortNumber:C,maxWidth:h})=>{const{formatMessage:N}=(0,E.tz)(),M=(0,a.useDispatch)(),v=(0,a.useSelector)(A.CC),x=(0,g.Z)(e,v),k=(0,g.z)(t,n,x,N,C),f=(0,l.useCallback)(()=>{I||M((0,u.XP)({type:m.H.DEVICE,id:e}))},[I,M,e]);return l.createElement(l.Fragment,null,x?l.createElement(_.A,{messageId:"COMMON_DEVICE_LAST_CONNECTED_TO",messageValues:{deviceWithPort:l.createElement(s.A,{width:"100%",overflow:"hidden",paddingLeft:o.YC},l.createElement(d.A,{onClick:f,disabled:I,...i.A.addDataTestId(i.A.TestId.SIDE_PANEL_TRIGGER),name:k,port:n,separatePortNumber:C,maxWidth:h}))}}):null,O?l.createElement("div",null,l.createElement(r.A,{color:"text-3"},l.createElement(p.A,{date:(0,c.gH)(O)}))):null)}},932752(e,t,n){n.d(t,{Z:()=>l,z:()=>r});var a=n(6510);const l=(e,t)=>e?t.find(({mac:t})=>t===e):void 0,r=(e,t,n,l,r)=>{const i=!r&&t?` ${l({id:"DEVICE_PROPERTIES_PORT_WITH_NUMBER"},{port:t})}`:"";return e?`${e}${i}`:n?`${(0,a.Q)(n)}${i}`:l({id:"COMMON_FALLBACK"})}},782558(e,t,n){n.d(t,{A:()=>o});var a=n(296540),l=n(217439),r=n(137298),i=n(916537),c=n(360113);const o=({rx_rate:e})=>e>0?a.createElement(c.A,null,a.createElement(l.A,{color:"text-2",size:"medium"},a.createElement(i.sA,{id:"COMMON_RX_RATE"})),a.createElement(l.A,{color:"text-3",size:"medium"},(0,r.Up)(e))):null},150556(e,t,n){n.d(t,{A:()=>o});var a=n(296540),l=n(217439),r=n(137298),i=n(916537),c=n(360113);const o=({tx_rate:e})=>e>0?a.createElement(c.A,null,a.createElement(l.A,{color:"text-2",size:"medium"},a.createElement(i.sA,{id:"COMMON_TX_RATE"})),a.createElement(l.A,{color:"text-3",size:"medium"},(0,r.Up)(e))):null},360113(e,t,n){n.d(t,{A:()=>s});var a=n(296540),l=n(71479),r=n(566723),i=n(294303),c=n(311785);const o=(0,l.A)(i.A,(0,c.A)("valueMaxWidth","keyMinWidth","compact"))`
  &:not(:last-child) {
    ${({compact:e})=>e?"":`margin-bottom: ${r.kc};`}
  }
  & > {
    &:nth-child(1) {
      min-width: ${({keyMinWidth:e})=>e}px;
    }
    &:nth-child(2) {
      max-width: ${({valueMaxWidth:e})=>e}px;
    }
  }
`,s=({children:e,valueMaxWidth:t=215,keyMinWidth:n=0,flexProps:l={},compact:i=!1})=>a.createElement(o,{width:"100%",justifyContent:"space-between",gap:r.kc,height:i?void 0:24,valueMaxWidth:t,keyMinWidth:n,compact:i,...l},e)},187550(e,t,n){n.d(t,{B:()=>T,i:()=>k});var a=n(822336),l=n(469733),r=n(296540),i=n(823858),c=n(382389),o=n(614054),s=n(6510),m=n(660950),d=n(533520),u=n(224948),E=n(532419),A=n(71479),p=n(852866),_=n(566723),g=n(294303),O=n(795537),I=n(916537);const C=(0,A.A)("div")`
  margin-bottom: ${_.kc};
`,h=({uplinkMac:e,uplinkDisplayName:t})=>r.createElement(g.A,{flexDirection:"column",alignItems:"flex-start"},r.createElement(C,null,r.createElement(I.sA,{id:"DEVICE_POE_ALMOST_OUT_OF_POWER",values:{deviceName:r.createElement(O.A,{mac:e},(0,p.c)(t))}})),r.createElement(O.A,{mac:e},r.createElement(I.sA,{id:"DEVICE_POE_VIEW_DETAILS"}))),N=({children:e})=>r.createElement(u.A,{icon:r.createElement(i.A,{size:"original",color:a.Ay[`desktop-color-orange-06-${(0,c.u)().themeName}`],variant:"fill"})},e),M=e=>r.createElement(N,null,r.createElement(m.A,{...e})),v=e=>r.createElement(N,null,r.createElement(h,{...e})),x=({uplink:e,mac:t,detailed_states:n})=>{const a=(0,l.useSelector)((0,r.useMemo)(()=>(0,E.tG)(e.uplink_mac),[e.uplink_mac]));return r.createElement(d.x,{mac:t,uplinkMac:a.mac,uplinkDisplayName:(0,s.Q)(a),portNumber:e.uplink_remote_port,detailedStates:n,PortPowerLimitExceededWarning:M,UplinkNearPowerLimitWarning:v})},k=({uplink:e,mac:t,detailed_states:n})=>(0,o.w)(n)?r.createElement(x,{uplink:e,mac:t,detailed_states:n}):null,f=({uplinkMac:e,...t})=>{const n=(0,l.useSelector)((0,r.useMemo)(()=>(0,E.tG)(e),[e]));return r.createElement(d.x,{...t,uplinkMac:e,uplinkDisplayName:(0,s.Q)(n),PortPowerLimitExceededWarning:M,UplinkNearPowerLimitWarning:v})},T=({detailedStates:e,...t})=>(0,o.w)(e)?r.createElement(f,{detailedStates:e,...t}):null},952491(e,t,n){n.r(t),n.d(t,{default:()=>se});var a=n(296540),l=n(691294),r=n(187550),i=n(743891),c=n(469733),o=n(962926),s=n(217439),m=n(132196),d=n(523275),u=n(566723),E=n(294303),A=n(107748),p=n(703447),_=n(532419),g=n(239417),O=n(705145),I=n(71479),C=n(369702),h=n(916537),N=n(413786),M=n(873010),v=n(187483);const x=(0,I.A)(E.A)`
  > div {
    align-items: center;
    &:first-child {
      flex: 1;
    }
  }
`,k=({activeItem:e})=>{const{formatMessage:t}=(0,h.tz)(),n=(0,c.useSelector)(v.TP),{Icon:l,redirectCallback:r,id:i}=(0,a.useMemo)(()=>({Icon:M.m8[e.product_line],redirectCallback:M.VF[e.product_line],id:M.dn[e.product_line]}),[e.product_line]);return Boolean(e.product_line)&&e.product_line!==N.p1.NETWORK?a.createElement(x,{gap:u.kc},e.unifi_device_info?.view_in_application&&r?a.createElement(C.A,{width:"full",onClick:()=>{window.location.href=n.replace("network",r(e.mac)).replace(/\/$/,"")}},a.createElement(l,{width:20,height:20,variant:"flat"}),a.createElement(O.A,{isTruncated:!0,variant:"inherit"},a.createElement(h.sA,{id:"UNIFI_DEVICE_CLIENT_LABEL_VIEW_IN",values:{application:t({id:i})}}))):null):null};var f=n(532988),T=n(309447),b=n(563931),R=n(968906),L=n(180524),y=n(776309),P=n(126457),S=n(561173);const w=({activeItem:e})=>{const t=(0,c.useDispatch)(),n=(0,a.useCallback)(()=>{t((0,P.to)({modalType:y.A.REPORT_WIFI_EXPERIENCE,modalProps:{item:e,experienceGraphType:S.v.UNIFI_CLIENT}}))},[e,t]);return e.status===l.S2.ONLINE&&e.type===l.sK.WIRELESS?a.createElement(E.A,{alignItems:"center",width:u.ED},a.createElement(L.A,{description:a.createElement(h.sA,{id:"COMMON_REPORT_AN_ISSUE"})},a.createElement(T.A,{variant:"tertiary-neutral",size:"small",onPress:n,...R.A.addDataTestId(R.A.TestId.MODAL_TRIGGER)},a.createElement(b.A,{size:"logo",isActive:!0})))):null},D=m.AH`
  margin-bottom: ${u.Ln};
  margin-top: ${u.Ln};
`,z=({activeItem:e})=>{const t=(0,c.useSelector)((0,a.useMemo)(()=>(0,g.OF)(e.fingerprint),[e.fingerprint])),n=(0,c.useSelector)((0,a.useMemo)(()=>e.uplink_mac?(0,_.bw)(e.uplink_mac,["type","name","model","mac"]):d.A,[e.uplink_mac])),r=(0,a.useMemo)(()=>e.status===l.S2.ONLINE&&e.type===l.sK.WIRELESS?160:void 0,[e.status,e.type]);return a.createElement(o.A,{className:D,sections:[a.createElement(E.A,{flexDirection:"column",gap:u.kc},a.createElement(E.A,{gap:u.kc},a.createElement(p.A,{client:e,grid:!0,width:40,height:40}),a.createElement(E.A,{flex:1,flexDirection:"column"},a.createElement("div",null,a.createElement(s.A,{color:e.status===l.S2.ONLINE?"text-1":"text-3",weight:"bold"},e.display_name||e.name||t?.fingerprint_device_name)),a.createElement(E.A,null,e.status===l.S2.ONLINE?a.createElement(A.A,{client:e,uplinkDevice:n,maxWidth:r}):e.last_seen?a.createElement(f.A,{last_uplink_mac:e.last_uplink?.uplink_mac,last_uplink_name:e.last_uplink?.uplink_device_name,last_uplink_remote_port:e.last_uplink?.uplink_remote_port,disconnected_at:e.last_seen,disabled:e.disabled,separatePortNumber:!0}):null)),a.createElement(w,{activeItem:e})),a.createElement(k,{activeItem:e}))]})};var W=n(777916),$=n(943887),F=n(38937),B=n(146784),U=n(689965),V=n(907157),H=n(951106),G=n(150556),K=n(782558),X=n(360113);const j=({activeItem:e})=>{const{formatMessage:t}=(0,h.tz)(),n=(0,c.useSelector)((0,a.useMemo)(()=>(0,g.OF)(e.fingerprint),[e.fingerprint]));return a.createElement(U.A,null,e.network_name?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_NETWORK"})),a.createElement(s.A,{color:"text-3",size:"medium"},e.network_name)):null,e.type===l.sK.WIRELESS&&e.essid?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_WIFI_NAME"})),a.createElement(s.A,{color:"text-3",size:"medium"},e.essid)):null,e.type===l.sK.WIRELESS&&(e.radio||e.channel||e.channel_width)?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_CHANNEL"})),a.createElement(s.A,{color:"text-3",size:"medium"},e.channel,e.radio||e.channel_width?` (${[e.radio?t({id:(0,$.dI)(e.radio)}):null,e.channel_width?`${e.channel_width} ${t({id:"COMMON_UNIT_MHZ"})}`:null].filter(Boolean).join(", ")})`:null)):null,a.createElement(V.A,{mac:e.mac,props:["signal"]},({signal:e=null})=>e?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_SIGNAL"})),a.createElement(E.A,{alignItems:"center"},a.createElement(s.A,{size:"medium",color:(0,F.b5)(e)},e," ",a.createElement(h.sA,{id:"COMMON_UNIT_DBM"})))):null),e.type===l.sK.WIRELESS&&Number.isInteger(e.rate_imbalance)?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"CLIENTS_HEADER_AP_SIGNAL_BALANCE"})),a.createElement(s.A,{color:"text-3",size:"medium"},a.createElement(h.sA,{id:Math.abs(e.rate_imbalance??0)<=40?"COMMON_GOOD":"COMMON_POOR"}))):null,e.type===l.sK.WIRELESS&&e.radio_proto?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_STANDARD"})),a.createElement(s.A,{color:"text-3",size:"medium"},(0,H.z0)(e.radio_proto))):null,e.type===l.sK.WIRELESS&&e.mimo?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_MIMO"})," ",a.createElement(h.sA,{id:"COMMON_CONFIGURATION"})),a.createElement(s.A,{color:"text-3",size:"medium"},(0,H.iP)(e.mimo))):null,a.createElement(V.A,{mac:e.mac,props:["tx_rate"]},({tx_rate:e=0})=>a.createElement(G.A,{tx_rate:e})),a.createElement(V.A,{mac:e.mac,props:["rx_rate"]},({rx_rate:e=0})=>a.createElement(K.A,{rx_rate:e})),e.ip?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_IP_ADDRESS"})),a.createElement(s.A,{color:"text-3",size:"medium"},e.ip)):null,a.createElement(B.A,{ipv6_address:e.ipv6_address}),e.mac?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_MAC_ADDRESS"})),a.createElement(s.A,{color:"text-3",size:"medium"},e.mac)):null,n?.fingerprint_device_name?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_MODEL"})),a.createElement(O.A,{style:{maxWidth:"250px"},color:"text-3",size:"medium",isTruncated:!0},n.fingerprint_device_name)):null,n?.fingerprint_device_os?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"CLIENTS_HEADER_OS"})),a.createElement(O.A,{color:"text-3",size:"medium",isTruncated:!0},n.fingerprint_device_os)):null,a.createElement(V.A,{mac:e.mac,props:["tx_packets","tx_bytes"]},({tx_packets:e=0,tx_bytes:t=0})=>e&&t?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_ACTIVITY_DOWN_PKTS_BYTES"})),a.createElement(s.A,{color:"text-3",size:"medium"},e," / ",a.createElement(W.A,{type:"bytes",size:"body",input:t,color:"tertiary"}))):null),a.createElement(V.A,{mac:e.mac,props:["rx_packets","rx_bytes"]},({rx_packets:e=0,rx_bytes:t=0})=>e&&t?a.createElement(X.A,null,a.createElement(s.A,{color:"text-2",size:"medium"},a.createElement(h.sA,{id:"COMMON_ACTIVITY_UP_PKTS_BYTES"})),a.createElement(s.A,{color:"text-3",size:"medium"},e," / ",a.createElement(W.A,{type:"bytes",size:"body",input:t,color:"tertiary"}))):null))};var Y=n(822336),Q=n(592563),q=n(624070),Z=n(382389),J=n(6510),ee=n(691189),te=n(742920),ne=n(551753),ae=n(137625),le=n(675359),re=n(54087),ie=n(294201);const ce=({uplink_remote_port:e,name:t,mac:n,model:l,ups_device:r})=>{const i=(0,c.useDispatch)(),[o,s]=(0,a.useState)(!1),m=(0,a.useCallback)(()=>{i((0,ee.Xj)(ie.A.OUTLET_CTL,re.CMD_PATH,{mac:r.mac,outlet_table:[{index:e}]})).catch(({msg:e})=>{i((0,le.ox)({icon:te.C.danger,message:e||"COMMON_NOTICE_REQUEST_ERROR"}))})},[i,r.mac,e]),d=(0,a.useCallback)(()=>{s(!1)},[]),u=(0,a.useCallback)(()=>{s(!0)},[]),E=(0,a.useMemo)(()=>(0,J.Q)({name:t,mac:n,model:l}),[t,l,n]),A=(0,c.useSelector)((0,a.useMemo)(()=>(0,_.uC)(r.mac),[r.mac]));return a.createElement(ne.A,{variant:"custom",customIcon:a.createElement(q.A,{color:Y.Ay[`desktop-color-aqua-06-${(0,Z.u)().themeName}`],variant:"fill",size:"original"})},a.createElement(h.sA,{id:A?"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_ON_BATTERY_POWER":"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_ON_AC_POWER",values:{deviceName:E,action:a.createElement(ae.A,{title:"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_TITLE",titleValues:{deviceName:E},message:"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_MESSAGE",handleClose:d,handleConfirm:m,buttonVariant:"danger",buttonMessage:"COMMON_ACTION_PROCEED",isOpen:o},a.createElement(Q.A,{type:"button",fontSize:"medium",onPress:u},a.createElement(h.sA,{id:"COMMON_CLICK_HERE"})))}}))},oe=(0,a.memo)(({uplink_remote_port:e,name:t,mac:n,model:l,ups_device:r,graceful_shutdown_triggered_at:i})=>i&&e&&r&&Object.keys(r).length?a.createElement(ce,{uplink_remote_port:e,name:t,mac:n,model:l,ups_device:r,graceful_shutdown_triggered_at:i}):null),se=({activeItem:e})=>a.createElement(a.Fragment,null,a.createElement(z,{activeItem:e}),a.createElement(oe,{name:e.name,mac:e.mac,model:e.model,graceful_shutdown_triggered_at:e.graceful_shutdown_triggered_at,ups_device:e.ups_device,uplink_remote_port:e.last_uplink?.uplink_remote_port}),e.type===l.sK.WIRED&&e.detailed_states?a.createElement(r.B,{mac:e.mac,uplinkMac:e.uplink_mac,portNumber:e.sw_port,detailedStates:e.detailed_states}):null,a.createElement(i.A,{activeItem:e,isWired:e.type===l.sK.WIRED||e.is_wired}),a.createElement(j,{activeItem:e}))},766624(e,t,n){n.d(t,{A:()=>o});var a=n(296540),l=n(271856),r=n(709690),i=n(284428),c=n(566723);const o=({description:e,isInteractive:t,portal:n=!0,cursorType:o,title:s,position:m,width:d,iconProps:u,disabled:E=!1})=>{const A=(0,i.Im)()||E,p=(0,i.q)();return a.createElement(l.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:o,title:s,position:m,width:d,disableHover:p},a.createElement(r.A,{isActive:!0,size:"original",opacity:A?c.xN:void 0,...u}))}},568560(e,t,n){n.d(t,{A:()=>p});var a=n(296540),l=n(469733),r=n(217439),i=n(895795),c=n(383653),o=n(742920),s=n(115829),m=n(39705),d=n(294303),u=n(675359),E=n(916537),A=n(348466);const p=({ipv6:e=[],enabled:t=!0,size:n="inherit",color:p="inherit",showOnlyPrefix:_=!1})=>{const g=(0,l.useDispatch)(),O=(0,a.useCallback)(e=>{navigator.clipboard.writeText(e).then(()=>{g((0,u.ox)({icon:o.C.success,message:"COMMON_COPIED_TO_CLIPBOARD"}))})},[g]),I=(0,a.useCallback)((e,t)=>{t.stopPropagation(),t.preventDefault(),O(e)},[O]),C=(0,a.useMemo)(()=>(e=>{const t=e=>(0,c.G8)(e)?0:(0,c.ZV)(e)?1:2;return e.sort((e,n)=>t(e)-t(n))})(e||[]).map(e=>{const[t,n]=e.split(A.Ed);return _?`${(0,c.Gh)(t,Number(n))}/${n}`:(0,c.z2)(e)}),[e,_]),h=C?.[0];return h?a.createElement(d.A,{maxWidth:"100%",justifyContent:"flex-end"},a.createElement(s.A,{enabled:t,flexProps:{justifyContent:"flex-end",alignItems:"center"},color:t?p:"disabled",size:n},h),C?.length>1?a.createElement(m.A,{items:C,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>a.createElement(a.Fragment,null,e,a.createElement(i.A,{size:"original",actionable:!0,onClick:t=>I(e,t)})),renderMultipleItemsSummary:()=>null}):a.createElement(i.A,{size:"original",actionable:!0,onClick:e=>I(h,e)})):a.createElement(r.A,{size:n,color:t?p:"disabled"},a.createElement(E.sA,{id:"COMMON_FALLBACK"}))}},280258(e,t,n){n.d(t,{H:()=>a});const a=""},372737(e,t,n){var a;n.d(t,{U:()=>a}),function(e){e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight",e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape",e.BACKSPACE="Backspace",e.DELETE="Delete",e.TAB="Tab"}(a||(a={}))},451449(e,t,n){n.d(t,{I:()=>a});const a=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},284428(e,t,n){n.d(t,{Im:()=>o,iL:()=>s,mQ:()=>i,pv:()=>r,q:()=>c});var a=n(296540),l=n(451449);function r(){return(0,a.useContext)(l.I)}function i(){return r().fields}function c(){return r().tooltipPopovers}function o(){return r().tooltipIcons}function s(){return r().labels}},362412(e,t,n){n.d(t,{A:()=>d});var a=n(296540),l=n(469733),r=n(436331),i=n(805837),c=n(282556),o=n(71265);const s=e=>a.createElement(r.A,{renderOption:i.q,...e}),m=e=>a.createElement(s,{...e});m.Sorted=e=>{const t=(0,l.useSelector)(c.zi),n=(0,a.useMemo)(()=>(0,o.k)(t),[t]);return a.createElement(s,{...e,sortBy:n})};const d=m},71265(e,t,n){n.d(t,{R:()=>d,k:()=>u});var a=n(280258),l=n(190497),r=n(953048),i=n(175522),c=n(936621),o=n(742525);const s=[...new Set([a.H,i.Q.join(i.A),r.Zt,c.F,l.nc,o.Vr])],m={numeric:!0,sensitivity:"base"},d=(e,t)=>{const n=[];for(let a=e;a<=t;a+=1)n.push({value:a,label:String(a)});return n},u=e=>({value:t,label:n},{value:a,label:l})=>s.includes(t?.toString())||s.includes(a?.toString())?1/0:n?.toString().localeCompare(l?.toString(),e,m)??-1},614054(e,t,n){n.d(t,{w:()=>a});const a=e=>!!e&&Object.values(e).some(Boolean)}}]);