"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[59806],{946118:(t,e,a)=>{a.r(e),a.d(e,{default:()=>$});var o,s,i=a(956347),c=a(469733),n=a(296540);!function(t){t.LOCATION="location",t.ROUTE_MATCH="routeMatch"}(o||(o={})),function(t){t.HISTORY="history",t.DISPATCH="dispatch",t.LOCATION="location",t.ROUTE_MATCH="routeMatch"}(s||(s={}));var r=a(398300),h=a(845030),u=a(627440),T=a(596731),p=a(959341);const S=t=>new RegExp(`(?:^|/)${t}/[^/]+$`),E=t=>new RegExp(`(?:^|\\/)${t}\\/([^/]+.*)$`),O=t=>Boolean(t)&&/^[A-Za-z0-9]+$/.test(t)&&/[A-Za-z]/.test(t)&&/\d/.test(t),C=[[({location:{pathname:t},routeMatch:{params:e}})=>t===(0,i.tW)(`${T.Si[u.VO.SETTINGS]}/security/cybersecure`,e),({history:t,routeMatch:{params:e}})=>{t.push((0,i.tW)(`${T.Si[u.VO.SETTINGS]}/${p.bB}/${p.Uy.CYBERSECURE}`,e))}],[({location:{pathname:t},routeMatch:{params:e}})=>t===(0,i.tW)(`${T.Si[u.VO.SETTINGS]}/security/intrusion-prevention`,e),({history:t,routeMatch:{params:e}})=>{t.push((0,i.tW)(`${T.Si[u.VO.SETTINGS]}/${p.bB}/${p.Uy.CYBERSECURE}`,e))}],[({location:{pathname:t}})=>S(p._L).test(t),({dispatch:t,history:e,location:{pathname:a},routeMatch:{params:o}})=>{const s=E(p._L).exec(a)?.[1];O(s)&&(e.push((0,i.tW)(`${T.Si[u.VO.SETTINGS]}/${p._L}`,o)),setTimeout(()=>{t((0,h.XP)({type:r.H.WIFI,id:s}))},250))}],[({location:{pathname:t}})=>S(p.Cs).test(t),({dispatch:t,history:e,location:{pathname:a},routeMatch:{params:o}})=>{const s=E(p.Cs).exec(a)?.[1];O(s)&&(e.push((0,i.tW)(`${T.Si[u.VO.SETTINGS]}/${p.Cs}`,o)),setTimeout(()=>{t((0,h.XP)({type:r.H.NETWORK,id:s}))},250))}]],$=(0,n.memo)(()=>{const t=(0,i.zy)(),e=(0,i.W5)(),a=(0,i.W6)(),r=(0,c.useDispatch)();return(0,n.useEffect)(()=>{C.forEach(([i,c])=>{i({[o.LOCATION]:t,[o.ROUTE_MATCH]:e})&&c({[s.HISTORY]:a,[s.DISPATCH]:r,[s.LOCATION]:t,[s.ROUTE_MATCH]:e})})},[t,e,a,r]),null})}}]);