"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[11673],{35332(e,t,a){a.d(t,{aQ:()=>o,bB:()=>c});var s=a(197003),r=a(158402),i=a(352210),n=a(608958);const A=e=>({error:e,type:n.ID}),c=()=>e=>{s.K.post("/api/logout").then(()=>e((0,r.oX)()))},o=e=>async t=>{await t({type:n.V8});try{return await s.K.post("/api/login",{strict:!0,...e}),t(async e=>e({type:n.FE}))}catch(e){const{response:a}=e;if(400===a?.status&&a?.data)switch(a.data?.meta?.msg){case i.ApiString.apiErrUbic2faTokenRequired:return t(((e=!1)=>({type:n.HH,payload:{require2Fa:e}}))(!0));case i.ApiString.apiErrInvalid2FAToken:return t(A("COMMON_VALIDATION_INVALID_2FA_TOKEN"))}return t(A(400===a?.status?"COMMON_VALIDATION_INVALID_USERNAME_OR_PASSWORD":"COMMON_NOTICE_REQUEST_ERROR"))}}},864578(e,t,a){a.r(t),a.d(t,{default:()=>M});var s=a(274934),r=a(602086),i=a(977872),n=a(938984),A=a(98499),c=a(599110),o=a(160182),d=a(643747),l=a(482748),O=a(607856),p=a(222102),u=a(892450),E=a(573534),_=a(172205);const h=(0,p.Mz)(e=>e[_.U.SHARED][E.N.LOADER_ADAPTER],e=>e[u.V.REASONS]);var N=a(100978),T=a(35332),g=a(470070),x=a(897166),I=a(590979),R=a(813209),f=a(722545),C=a(143050),k=a(247816),S=a(309130);const D=(0,k.A)(f.A)`
  margin-right: ${S.Ln};
  height: 24px;
  width: 24px;
`,j=(0,k.A)(C.A)`
  margin-right: ${S.kc};
  height: 16px;
  width: 16px;
`,m=(0,k.A)(R.A)`
  left: 50px;
`,M=()=>{const e=(0,i.wA)(),t=(0,i.d4)(h),a=(0,i.d4)(x.AF),p=(0,i.d4)(x.LF),u=(0,r.useCallback)(()=>{a&&O.u.setItem(l.lP.HOTSPOT_LOGOUT_SITE_NAME,p),e((0,T.bB)())},[e,a,p]),E=(0,r.useCallback)(()=>(0,s.jsx)(N.A,{...I.A.addDataTestId(I.A.TestId.HEADER_USERICON),children:(0,s.jsx)(D,{actionable:!0})}),[]);return(0,s.jsxs)(o.A,{size:"classic",title:(0,s.jsx)(n.A,{size:"xlarge-1",weight:"regular",color:"text-3",children:(0,s.jsx)(g.sA,{id:"COMMON_NETWORK"})}),icon:(0,s.jsx)(d.A,{size:"full"}),children:[t.length?(0,s.jsx)(m,{isLoading:!0,placement:"bottom"}):null,(0,s.jsx)(N.A,{children:(0,s.jsx)(A.A,{renderToggle:E,size:"small",align:"bottomCenter",toggleOffset:8,children:(0,s.jsxs)(N.A,{alignContent:"center",children:[(0,s.jsx)(j,{isActive:!0}),(0,s.jsx)(c.A,{type:"button",variant:"inline",onClick:u,...I.A.addDataTestId(I.A.TestId.HEADER_SIGNOUT_BUTTON),children:(0,s.jsx)(g.sA,{id:"COMMON_HEADER_USER_PROFILE_SIGN_OUT"})})]})})})]})}},197003(e,t,a){a.d(t,{K:()=>A,o:()=>n});var s=a(989181),r=a.n(s);const i=r().create({baseURL:"/",withCredentials:!0,xsrfCookieName:"csrf_token",xsrfHeaderName:"X-Csrf-Token"}),n=r().create();i.interceptors.response.use(e=>e.data&&e.data instanceof ArrayBuffer?e:{...e,data:e.data.data,meta:e.data.meta});const A=i}}]);