(window.webpackJsonpunifiNetworkUi=window.webpackJsonpunifiNetworkUi||[]).push([[1],{2821:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3),r=a(1671),c=a(5),s=a(34);const o=Object(i.c)(c.a)`
  border-bottom: 1px ${({theme:e})=>e.colors.border} solid;
  box-sizing: border-box;

  @media ${s.a.VIEWPORT_M_UP} {
    padding: 0 ${({theme:e})=>e.space[4]}px;
  }
`,d=Object(i.c)(r.a)`
  bottom: -1px;
`;t.a=({isLoading:e,children:t,...a})=>l.a.createElement(o,Object.assign({},a,{flex:"none",className:"base-control-panel",position:"relative",alignItems:"center",justifyContent:"space-between",height:50}),t,l.a.createElement(d,{isLoading:e,placement:"bottom"}))},2822:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3),r=a(5),c=a(1),s=a(47),o=a(481),d=a(2821),u=a(2823),O=a(2832),b=a(31),m=a(179);const E=Object(i.c)(s.a,{shouldForwardProp:e=>"addMargin"!==e})`
  font-size: 14px;
  ${({addMargin:e})=>e&&"margin-left: 50%;"}
  position: absolute;
  transform: translateX(-50%);
  left: 50%;
`;t.a=({routes:e=[],hideFilterButton:t=!1,isLoading:a,children:n,filterTitleLabel:i,filtersActive:s,title:T,leftContent:v,isDisplayOptionsDisabled:p})=>{const _=(null==e?void 0:e.length)>1,I=!_&&1===e.length;return l.a.createElement(d.a,{isLoading:a},v&&v,_&&l.a.createElement(u.a,{routes:e}),I&&l.a.createElement(E,{weight:"bold"},e[0].label),T&&l.a.createElement(E,{weight:"bold",addMargin:t&&!v},l.a.createElement(c.b,{id:T})),l.a.createElement(r.a,{height:"100%",flex:_||T||I?"none":1,alignItems:"center",justifyContent:"flex-end",marginLeft:"auto"},n,!t&&l.a.createElement(m.a,{condition:p,wrapper:e=>l.a.createElement(o.a,{position:"bottom",width:"208px",portal:!0,message:l.a.createElement(b.p,null,l.a.createElement(c.b,{id:"COMMON_DISPLAY_OPTS_DISABLED"}))},e)},l.a.createElement(O.a,{disabled:p,filterTitleLabel:i,filtersActive:s}))))}},2823:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3),r=a(25),c=a(807);var s=({items:e,...t})=>{const{params:a,path:n}=Object(r.n)(),i=Object(r.l)(),s=Object(r.k)(),o=e.find(({path:e})=>e===n)||((e,{pathname:t})=>e.find(({path:e})=>new RegExp(e.replace(/\/:\w+\?.*/g,"/?.*").replace(/:\w+/g,"\\w+").replace(/\//g,"\\$&")).test(t)))(e,i);return l.a.createElement(c.a,Object.assign({tabs:e,selectedTab:null==o?void 0:o.id,onSelectTab:({path:e,params:t={}})=>s.push(Object(r.i)(e,{...a,...t}))},t))};const o=Object(i.c)(s)`
  height: 100%;
  position: absolute;
  left: 0;
  right: 0;
  div,
  button {
    height: 100% !important;
  }
`;t.a=({routes:e})=>{const t=Object(n.useMemo)(()=>e&&e.map(({id:e,label:t,disabled:a,path:n,...l})=>({id:e,label:t,disabled:"function"==typeof a?a(l):a,path:n})),[e]);return t?l.a.createElement(o,{selectedTabBold:!0,items:t}):null}},2824:function(e,t,a){"use strict";a.d(t,"b",(function(){return n.a})),a.d(t,"a",(function(){return r})),a.d(t,"d",(function(){return c})),a.d(t,"e",(function(){return O})),a.d(t,"c",(function(){return b.a}));a(2821);var n=a(2828),l=a(3),i=a(173);var r=Object(l.c)(i.a)`
  padding-left: ${({theme:e})=>e.space[3]}px;
  padding-right: ${({theme:e})=>e.space[3]}px;
  color: ${({theme:e})=>e.colors.subtlerText};
  &:hover {
    color: ${({theme:e})=>e.colors.mediumText};
  }
`;var c=Object(l.c)("span")`
  border-right: 1px ${({theme:e})=>e.colors.border} solid;
  margin: 0 ${({theme:e})=>e.space[4]}px;
  position: relative;
  height: 100%;
  display: block;
`,s=a(0),o=a.n(s),d=a(807);const u=l.a`
  align-items: center;
  display: flex;
  height: 100%;
  width: auto;
  justify-content: flex-end;
  overflow-x: unset;

  > div {
    margin: initial;
  }
`;function O(e){return o.a.createElement(d.a,Object.assign({className:u},e))}a(2823),a(2822);var b=a(2826)},2826:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3),r=a(1),c=a(47),s=a(2600);const o=Object(i.c)(c.a)`
  line-height: 24px;
  color: ${({theme:e})=>e.motifPalette.text01};
`,d=Object(i.c)("div",{shouldForwardProp:e=>"toggleStyle"!==e})`
  justify-content: space-between;
  margin-top: ${({toggleStyle:e})=>{var t;return null!==(t=null==e?void 0:e.marginTop)&&void 0!==t?t:8}}px;
  margin-right: ${({toggleStyle:e})=>{var t;return null!==(t=null==e?void 0:e.marginRight)&&void 0!==t?t:0}}px;
  margin-bottom: ${({toggleStyle:e})=>{var t;return null!==(t=null==e?void 0:e.marginBottom)&&void 0!==t?t:0}}px;
  margin-left: ${({toggleStyle:e})=>{var t;return null!==(t=null==e?void 0:e.marginLeft)&&void 0!==t?t:0}}px;
  width: auto !important;

  label {
    margin-left: 0;
  }
`;t.a=({checked:e,disabled:t,id:a,onChange:n,text:i,toggleStyle:c})=>l.a.createElement(d,{toggleStyle:c},l.a.createElement(s.a,{checked:e,id:a,onChange:n,disabled:t},"string"==typeof i?l.a.createElement(o,{size:"body"},l.a.createElement(r.b,{id:i})):i))},2828:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(1),r=a(4),c=a(20);const s=e=>{var t;return null===(t=null==e?void 0:e.filters)||void 0===t?void 0:t.isFilterOpen};var o=a(1192),d=a(3),u=a(2769),O=a(3116),b=a(3108),m=a(464),E=a(3059);const T=Object(d.c)(E.a)`
  padding: 24px;
`;var v=({columns:e,columnLabels:t,tableType:a,hidden:s=[]})=>{var o;const d=Object(r.useDispatch)(),u=(null===(o=Object(r.useSelector)(Object(c.B)(a)))||void 0===o?void 0:o.initialColumns)||[],O=Object(n.useMemo)(()=>Object.values(e).every(e=>u.includes(e)),[u]),b=Object(n.useCallback)(()=>{const t=O||(null==u?void 0:u.length)?[]:Object.values(e);d(Object(c.L)(a,{initialColumns:t},!0))},[d,O,a,u]),m=Object(n.useMemo)(()=>[{full:!0,id:"showAllFields",checked:O||!!(null==u?void 0:u.length)&&"mixed",children:l.a.createElement(i.b,{id:"COMMON_ALL"}),onChange:b}].concat(Object.values(e).filter(e=>!s.includes(e)).map(e=>({full:!0,id:e,checked:u.includes(e),children:(null==t?void 0:t[e])?l.a.createElement(i.a,{id:t[e]}):e,onChange:({target:{checked:t}})=>{const n=t?[...u,e]:u.filter(t=>t!==e);d(Object(c.L)(a,{initialColumns:n},!0))}}))),[u,a]);return l.a.createElement(T,{spacing:"flush",items:m,variant:"list"})};const p=Object(d.c)(u.a)`
  width: 258px !important;
`;var _;!function(e){e.COLUMNS="columns",e.FILTERS="filters"}(_||(_={}));var I=({filterTitleLabel:e,isOpen:t,onClose:a,columnTabProps:s,renderFilterDrawerContent:o,footerProps:d,side:u="left"})=>{var E;const[T,I]=Object(n.useState)(_.FILTERS),{tableType:g}=s||{tableType:null},h=Object(r.useDispatch)(),f=(null===(E=Object(r.useSelector)(Object(c.B)(g)))||void 0===E?void 0:E.initialColumns)||[],j=d&&T===_.COLUMNS,C=Object(n.useMemo)(()=>{var e,t;return j&&Object(m.a)(null===(t=null===(e=null===c.c||void 0===c.c?void 0:c.c.tables)||void 0===e?void 0:e[g])||void 0===t?void 0:t.initialColumns,f)},[j,g,f]),N=Object(n.useCallback)(()=>{var e,t,a;const n=[...null!==(a=null===(t=null===(e=null===c.c||void 0===c.c?void 0:c.c.tables)||void 0===e?void 0:e[g])||void 0===t?void 0:t.initialColumns)&&void 0!==a?a:[]];h(Object(c.L)(g,{initialColumns:n},!0))},[h,g]),S=Object(n.useCallback)(({id:e})=>I(e),[I]),A=s?l.a.createElement(O.a,{onSelectTab:S,tabs:[{id:_.FILTERS,label:l.a.createElement(i.b,{id:"COMMON_CONTROL_PANEL_FILTERS"}),render:o},{id:_.COLUMNS,label:l.a.createElement(i.b,{id:"COMMON_CONTROL_PANEL_COLUMNS"}),render:()=>l.a.createElement(v,{columns:s.columns,hidden:s.hidden,columnLabels:s.columnLabels,tableType:g})}]}):o(),L=Object(n.useMemo)(()=>j?{label:l.a.createElement(i.b,{id:"COMMON_CONTROL_PANEL_FILTER_FOOTER_RESTORE_COLUMNS"}),onClick:N,disabled:C}:d,[j,d,C,N]),R=Object(n.useCallback)(()=>{a(),I(_.FILTERS)},[a,I]);return l.a.createElement(p,{in:t,renderHeader:()=>null,onClose:a,side:u},t&&l.a.createElement(b.a,{footerProps:L,headerProps:{label:e},onClose:R},A))},g=a(2822);t.a=Object(i.e)(({routes:e=[],hideFilterButton:t=!1,isLoading:a,children:i,filterFooterProps:d,columnTabProps:u,renderFilterDrawerContent:O,filterTitleLabel:b,filtersActive:m,title:E,onClose:T,intl:v,leftContent:p,isDisplayOptionsDisabled:_})=>{var h;const f=Object(r.useDispatch)(),j=Object(r.useSelector)(s),C=(null===(h=Object(r.useSelector)(Object(c.B)(null==u?void 0:u.tableType)))||void 0===h?void 0:h.initialColumns)||[],N=v.formatMessage({id:b||"COMMON_CONTROL_PANEL_FILTER_TITLE"});Object(n.useEffect)(()=>()=>{f(Object(o.b)(!1))},[]);const S=Object(n.useCallback)(()=>{f(Object(o.b)(!1)),null==T||T(),(null==u?void 0:u.tableType)&&f(Object(c.L)(u.tableType,{initialColumns:C}))},[f,T,null==u?void 0:u.tableType,C]);return l.a.createElement(l.a.Fragment,null,l.a.createElement(I,{isOpen:j,filterTitleLabel:N,onClose:S,columnTabProps:u,renderFilterDrawerContent:()=>j&&O,footerProps:d,side:"right"}),l.a.createElement(g.a,{leftContent:p,routes:e,hideFilterButton:t,isLoading:a,filterTitleLabel:N,filtersActive:m,title:E,isDisplayOptionsDisabled:_},i))})},2832:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3),r=a(4),c=a(3117),s=a(34),o=a(5),d=a(1192);const u=Object(i.c)(c.a,{shouldForwardProp:e=>"disabled"!==e})`
  pointer-events: ${({disabled:e})=>e?"none":"auto"};
  opacity: ${({disabled:e})=>e?.45:1};
  cursor: ${({disabled:e})=>e?"default":"pointer"};
  padding: 0 8px 0 0;
  z-index: 5;

  // Hides the text element on smaller screens
  button div > span {
    display: none;
  }

  button svg {
    margin-right: 0;
  }

  button {
    padding: 0 8px;
  }

  @media ${s.a.VIEWPORT_M_UP} {
    button {
      padding: 0 16px;
    }

    button svg {
      margin-right: 4px;
    }

    button div > span {
      display: inline-block;
    }
  }
`;t.a=({filterTitleLabel:e,filtersActive:t,items:a,disabled:n})=>{const i=Object(r.useDispatch)();return l.a.createElement(o.a,{height:"100%"},l.a.createElement(u,{disabled:n,title:e,onClick:()=>!n&&i(Object(d.b)(!0)),filtersActive:t}),a)}},2833:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=(e,t)=>{const a=Object.keys(e||{}),n=Object.keys(t||{});return a.length===n.length&&n.every(a=>e[a]&&e[a].length===t[a].length&&t[a].every(t=>e[a].includes(t)))}},2839:function(e,t,a){"use strict";var n=a(3104),l=a(3);const i=Object(l.c)(n.a)`
  li > div:nth-child(2) > div > div {
    padding: 0 0 10px;
    label > div:last-child > div:first-child > span {
      display: block;
      max-width: 85%;
    }
  }
`;t.a=i},2840:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return r}));const n=/[\p{Z}\p{S}\p{C}]+/u,l=/[\u0300-\u036f]/g;const i=e=>{let t=""+e;return t=function(e){let t=e;return e.normalize&&(t=e.normalize("NFD").replace(l,"")),t}(t).toLowerCase(),t.split(n)},r=(e,t)=>{const a=t.length;for(let n=0;n<a;n+=1){const[a,l]=t[n];if(e.some(e=>e[a]===l))return{id:`${a}::${l}`,label:l}}}},2841:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3);const r=Object(i.c)("div")`
  width: 100%;
  table:after {
    content: '';
    display: block;
    position: absolute;
    right: -32px;
    width: 32px;
    height: 1px;
  }
`;t.a=({children:e})=>l.a.createElement(r,null,e)},2843:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3071),r=a(3072),c=a(3094),s=a(3),o=a(4),d=a(1),u=a(2607),O=a(1199),b=a(190),m=a(142),E=a(62),T=a(34),v=a(757),p=a(751);const _=Object(s.c)("div")`
  // Raise above tabs in wifi scanner and wifi speed-test
  z-index: 1;
  margin-left: 16px;
  max-width: 280px;
  width: 100%;
  @media ${T.a.VIEWPORT_M_UP} {
    max-width: 320px;
  }

  @media ${T.a.VIEWPORT_L_UP} {
    max-width: 420px;
  }
`,I=()=>l.a.createElement(u.a,null,l.a.createElement("style",null,"\n        .multi-search-fix {\n          z-index: 25;\n        }\n    ")),g=Object(s.c)(i.a)`
  &[aria-selected='true'] {
    background: ${({theme:e})=>e.motifPalette.neutral02};
  }
`,h=Object(s.c)(r.a)`
  &[aria-selected='true'] {
    background: ${({theme:e})=>e.motifPalette.neutral02};
  }
`,f=e=>{const t=new Set,a=e.length;for(let n=0;n<a;n+=1){const{result:a}=e[n];a.forEach(e=>{const a=e.id||e;t.add(a)})}return t};function j(e,t){return{index:e.map(({field:e})=>e),query:t,enrich:!0}}t.a=Object(d.e)(({intl:e,lsKey:t,getInitialSuggestions:a,searchModelName:i,searchIndex:r,enabledColumns:s,records:d,recordIdKey:u})=>{var T;const C=Object(o.useDispatch)(),N=Object(o.useSelector)(E.f),S=Object(o.useSelector)(E.e),A=Object(o.useSelector)(E.b),L=Object(n.useMemo)(()=>Object(m.e)(N,S,A),[A,S,N]),R=`${b.a.PERSIST}:${b.a.NETWORK}.${L||b.a.LOCAL}.${t}`,M=null===(T=null===window||void 0===window?void 0:window.localStorage)||void 0===T?void 0:T.getItem(R),F=Object(o.useSelector)(Object(p.b)(i)),[y,D]=Object(n.useState)(()=>M?JSON.parse(M):a()),[w,P]=Object(n.useState)({value:"",searchResults:[]}),x=Object(n.useRef)(new Set(d.map(e=>e[u]))),k=e=>{const{id:t,tag:a}=e,n=y.filter(e=>e.id!==t),l=[{id:t,label:a},...n].slice(0,6);D(l),b.b.setItem(R,JSON.stringify(l))};Object(n.useEffect)(()=>{d.forEach(e=>{r.add(e)});const e=new Set(d.map(e=>e[u]));x.current.forEach(t=>!e.has(t)&&r.remove(t)),x.current=e},[u,d,r]);Object(n.useEffect)(()=>{F.length&&F.forEach(e=>{const{fsQuery:t,result:a}=e,n=r.search(t),l=f(n);Object(O.a)(a,l)||C(Object(v.h)({...e,result:l,label:""+t.query,modelName:i}))})},[C,d]);const V=y.map(({id:e,label:t})=>({id:e,label:l.a.createElement(h,{label:t,onRemove:t=>{t.stopPropagation(),(e=>{const t=y.filter(t=>t.id!==e);D(t),b.b.setItem(R,JSON.stringify(t))})(e)}})}));return l.a.createElement(_,null,l.a.createElement(I,null),l.a.createElement(c.a,{dropdownPortalClassName:"multi-search-fix",selectOnEnter:!0,onAddTag:e=>{var t;const a=null===(t=w.searchResults)||void 0===t?void 0:t.find(({id:t})=>t===e);if(w.searchResults.length>0&&a&&(C(Object(v.e)({modelName:i,id:a.id,fsQuery:a.fsQuery,result:a.result,label:a.tag})),k(a),P(e=>({...e,searchResults:[]}))),0===w.searchResults.length&&e){const[t,a]=e.split("::"),n=r.search({query:a,index:"all"===t?s:[t]});C(Object(v.e)({modelName:i,id:e,fsQuery:j(n,a),result:f(n),label:a})),k({id:e,tag:a})}},onChange:(e,t)=>{const a=r.search(t,d.length||100,{index:s,enrich:!0}),n=f(a),c=F.map(({result:e})=>e),o=c.concat(n),b=Object(O.b)(...o),m=[{id:"all::"+t,label:l.a.createElement(g,{label:l.a.createElement(l.a.Fragment,null,t),count:b.size}),fsQuery:j(a,t),tag:""+t,result:n,modelName:i}],E=((e,t,a)=>{const n={},l=e.length;for(let i=0;i<l;i+=1){const{field:l,result:r}=e[i];n[l]=new Set;const c=r.length;for(let e=0;e<c;e+=1)t.has(r[e].doc[a])&&n[l].add(r[e].doc[l])}return n})(a,b,u),T=[];Object.keys(E).forEach(e=>{E[e].forEach(t=>{const a={query:t,index:[e]},n=r.search(a),l=Object(O.b)(...c,new Set(n[0].result));T.push({id:`${e}::${t}`,fsQuery:a,query:t,count:l.size,result:l})})}),T.sort((e,t)=>t.count-e.count),T.slice(0,5).forEach(({query:e,count:t,id:a,result:n,fsQuery:r})=>{m.push({id:a,label:l.a.createElement(g,{label:l.a.createElement(l.a.Fragment,null,e),count:t,className:"test"}),fsQuery:r,tag:""+e,result:new Set(n),modelName:i})}),P(""===t?{value:"",searchResults:[]}:{value:t,searchResults:m})},onClear:()=>{P(e=>({...e,value:""}))},onReset:()=>{P({searchResults:[],value:""}),C(Object(v.g)(i))},onRemoveTag:e=>{C(Object(v.f)(i,e))},overflowTitleLabel:e.formatMessage({id:"MULTI_SEARCH_OVERFLOW_LABEL"}),overflowTranslations:{singular:"{0} "+e.formatMessage({id:"MULTI_SEARCH_OVERFLOW_SINGULAR"}),plural:"{0} "+e.formatMessage({id:"MULTI_SEARCH_OVERFLOW_PLURAL"})},removeTagLabel:e.formatMessage({id:"MULTI_SEARCH_REMOVE_TERM"}),recentTerms:V,recentTermsLabel:e.formatMessage({id:"MULTI_SEARCH_RECENT_TERMS_LABEL"}),recentTermsTitle:e.formatMessage({id:"MULTI_SEARCH_RECENT_TERMS_TITLE"}),resetButton:e.formatMessage({id:"COMMON_ACTION_RESET"}),searchResults:w.searchResults,searchResultsLabel:e.formatMessage({id:"MULTI_SEARCH_RESULTS"}),tags:F,value:w.value,width:440}))})},3098:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),i=a(4),r=a(1661),c=a(2663),s=a(867),o=a(6),d=a(89),u=a(16),O=a(256),b=a(22),m=a(20),E=a(123),T=a(362),v=a(8),p=a(157),_=a(3),I=a(2769),g=a(2763),h=a(2618),f=a(2666),j=a(99),C=a(75),N=a(612);const S=Object(_.c)(I.a)`
  > div {
    overflow: auto;
  }
`,A=Object(_.c)(g.a)`
  border: 0;
  box-shadow: none;
`;var L=({isOpen:e,onClose:t,containerRef:a})=>{const s=Object(i.useSelector)(u.selectLocaleSettings),o=Object(i.useSelector)(m.J),d=Object(i.useSelector)(c.b),O=Object(i.useSelector)(c.a),b=Object(i.useSelector)(C.d),T=Object(i.useDispatch)(),v=Object(j.d)(o,s,b),_=Object(n.useMemo)(()=>l.a.createElement(h.a,{start:O.start,end:O.end,timezone:v}),[O,v]),I=Object(i.useSelector)(Object(m.B)(E.a.ALERTS));Object(f.a)(a,()=>{e&&t()},[a,e]);const g=l.a.createElement(S,{header:_,in:e,onClose:t,width:303},e&&l.a.createElement(A,{showInputs:!0,numberOfMonths:2,onRangeSelected:({startDate:e,endDate:t})=>{const a=Object(j.i)(e,v),n=Object(j.b)(t,v);T(Object(N.h)({startDate:a,endDate:n})),T(Object(r.a)({isAscending:null==I?void 0:I.isAscending,timestampFrom:a.getTime(),timestampTo:n.getTime()}))},alerts:d,initialStartDate:Object(j.a)(Date.parse(O.start),v),initialEndDate:Object(j.a)(Date.parse(O.end),v)}));return(null==a?void 0:a.current)?Object(p.createPortal)(g,a.current):g},R=a(10),M=a(495),F=a(1),y=a(2824),D=a(2833),w=a(179),P=a(481),x=a(31),k=a(2832),V=a(751),Y=a(1192),W=a(398),U=a(194);const B=e=>Object(W.h)({name:U.a.ACTIVITY,value:e});var $=a(641),H=a(2839),G=a(226),z=a(1687),K=a(2632);var Q=({onChangeActivityFilter:e,filters:t})=>{const a=Object(i.useSelector)(c.g),r=Object(n.useCallback)((e,a)=>{var n;return null===(n=t[e])||void 0===n?void 0:n.includes(a)},[t]),s=(e,t)=>{var n;return null===(n=(a||[]).map(a=>Object(z.b)({[e]:[t]},a)).filter(e=>e.every(Boolean)))||void 0===n?void 0:n.length},o=Object(n.useMemo)(()=>Object(D.a)(t,K.a),[t]),d=Object(n.useCallback)(({target:{checked:t}})=>{const a=t?Object(M.a)(K.a):{};e(a)},[e]),u=Object(n.useMemo)(()=>Object.values(G.a).map(e=>({key:e,id:e,children:l.a.createElement(F.b,{id:"NOTIFICATIONS_FILTER_NOTIFICATION_TYPE_"+e.toUpperCase()}),labelProps:{state:e,count:s(G.d.ALERT_TYPE,e)}})),[s,$.a,r,t]),O=Object(n.useMemo)(()=>Object.values(G.b).map(e=>({key:e,id:e,children:l.a.createElement(F.b,{id:"NOTIFICATIONS_TABLE_CATEGORY_"+e.toUpperCase()}),labelProps:{count:s(G.d.CATEGORY_TYPE,e)}})),[s,$.a,r,t]),b=Object(n.useMemo)(()=>Object.values(G.c).map(e=>({key:e,id:e,children:l.a.createElement(F.b,{id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_"+e.toUpperCase()}),labelProps:{count:s(G.d.DEVICE_TYPE,e)}})),[s,$.a,r,t]),m=Object(n.useMemo)(()=>[{id:G.d.ALERT_TYPE,openByDefault:!0,label:l.a.createElement(F.b,{id:"NOTIFICATIONS_FILTER_HEADER_NOTIFICATION_TYPE"}),options:u},{id:G.d.CATEGORY_TYPE,label:l.a.createElement(F.b,{id:"NOTIFICATIONS_FILTER_HEADER_CATEGORY_TYPE"}),options:O},{id:G.d.DEVICE_TYPE,label:l.a.createElement(F.b,{id:"NOTIFICATIONS_FILTER_HEADER_DEVICE_TYPE"}),options:b}],[u,O,b]);return l.a.createElement(l.a.Fragment,null,l.a.createElement(y.c,{checked:o,onChange:d,id:"showAllAlerts",text:"NOTIFICATIONS_FILTER_SHOW_ALL_NOTIFICATIONS",toggleStyle:{marginTop:28,marginRight:24,marginBottom:16,marginLeft:24}}),l.a.createElement(H.a,{onChange:(t,a)=>e(a),selectedIds:t,multiOpen:!0,items:m}))},q=a(2850),J=a(2843),X=a(190),Z=a(2840);const ee=["id","search_category","search_severity","search_device","search_event_text"],te=new q.Document({tokenize:"reverse",cache:500,encode:Z.a,document:{store:ee,id:"id",index:ee}});var ae=l.a.memo(Object(F.e)(({intl:e})=>{const t=Object(i.useSelector)(Object(c.e)(e));return l.a.createElement(J.a,{lsKey:X.a.ACTIVITY_SEARCH,getInitialSuggestions:()=>((e,t)=>[Object(Z.b)(e,[["search_category",t.formatMessage({id:"NOTIFICATIONS_TABLE_CATEGORY_PERFORMANCE"})],["search_category",t.formatMessage({id:"NOTIFICATIONS_TABLE_CATEGORY_SOFTWARE_UPDATE"})],["search_category",t.formatMessage({id:"NOTIFICATIONS_TABLE_CATEGORY_TOPOLOGY"})]]),Object(Z.b)(e,[["search_severity",t.formatMessage({id:"NOTIFICATIONS_FILTER_NOTIFICATION_TYPE_WARNING"})],["search_severity",t.formatMessage({id:"NOTIFICATIONS_FILTER_NOTIFICATION_TYPE_INFO"})]]),Object(Z.b)(e,[["search_device",t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_GATEWAY"})],["search_device",t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_SWITCH"})],["search_device",t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_ACCESS_POINT"})],["search_device",t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_SMART_POWER"})]])].filter(e=>e))(t,e),searchModelName:"activity",searchIndex:te,enabledColumns:ee,recordIdKey:"id",records:t})}));var ne=Object(F.e)(({onCalendarClick:e,intl:t})=>{const a=Object(i.useDispatch)(),r=t.formatMessage({id:"COMMON_CONTROL_PANEL_FILTER_TITLE"}),c=Object(i.useSelector)(K.b),s=Object(n.useMemo)(()=>Object(D.a)(c,K.a),[c]),o=!!Object(i.useSelector)(Object(V.b)("activity")).length,d=Object(n.useCallback)(e=>{a(B(e)),a(Object(m.L)(E.a.ALERTS,{filters:e}))},[a]),u=Object(n.useCallback)(()=>{d(Object(M.a)(K.a))},[d]);return Object(n.useEffect)(()=>{o&&a(Object(Y.b)(!1))},[a,o]),l.a.createElement(y.b,{title:"ACTIVITY_SECTION_NOTIFICATIONS",isLoading:!1,renderFilterDrawerContent:l.a.createElement(Q,{onChangeActivityFilter:d,filters:c}),filterFooterProps:{label:l.a.createElement(F.b,{id:"COMMON_CONTROL_PANEL_FILTER_FOOTER_RESTORE_DEFAULTS"}),onClick:u,disabled:s},filtersActive:!s,hideFilterButton:!0,leftContent:l.a.createElement(ae,null)},l.a.createElement(y.a,{onClick:()=>e(!0)},l.a.createElement(R.o,null)),l.a.createElement(w.a,{condition:o,wrapper:e=>l.a.createElement(P.a,{position:"bottom",width:"208px",portal:!0,message:l.a.createElement(x.p,null,l.a.createElement(F.b,{id:"COMMON_DISPLAY_OPTS_DISABLED"}))},e)},l.a.createElement(k.a,{disabled:o,filterTitleLabel:r,filtersActive:!s})))}),le=a(1670),ie=a(47),re=a(5),ce=a(622),se=a(42),oe=a(29);var de;!function(e){e.SEVERITY="severity",e.NAME="name",e.EVENT="event",e.TIMESTAMP="timestamp"}(de||(de={}));var ue=a(884),Oe=a(173),be=a(25),me=a(101),Ee=a(62),Te=a(107),ve=a(792);const pe=Object(_.c)("span")`
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
`;var _e=({activityListTableItem:e})=>{const{id:t,event:a,parameters:n}=e,r=Object(be.k)(),c=Object(b.a)("/devices"),s=Object(b.a)("/clients"),o=Object(b.a)("/devices/properties/:mac/"+Te.a.OVERVIEW),d=Object(b.a)("/clients/properties/:mac/"+Te.a.OVERVIEW),u=Object(b.a)("/devices/properties/:mac/settings"),O=Object(b.a)("/settings/networks/form/:networkId"),m=Object(b.a)("/settings/wifi/network/form/:WlanId"),E=Object(b.a)("/settings/wifi/hotspot/form/:HotspotId"),T=Object(i.useSelector)(Ee.b),v=new RegExp(/\{(.*?)\}/),p=Object.keys(n),_=["VERSION","AMOUNT","TOTAL","TIME_FRAME"];return l.a.createElement(ie.a,{color:"inherit",size:"body"},((t,a,i,b)=>{var v;const p="VIEW_IMPROVEMENTS"===(null===(v=null==n?void 0:n.ACTION)||void 0===v?void 0:v.id)?a.replace(/.$/,""):a;return i.length?l.a.createElement("div",null,null==p?void 0:p.split(b).reduce((a,b,v)=>{var p,I,g,h,f;return v?a.concat(i.includes(b)?_.includes(b)?"VERSION"===b?Object(ve.b)(null===(p=null==n?void 0:n[b])||void 0===p?void 0:p.name):null===(I=null==n?void 0:n[b])||void 0===I?void 0:I.name:"VIEW_IMPROVEMENTS"!==(null===(g=null==n?void 0:n[b])||void 0===g?void 0:g.id)&&l.a.createElement(Oe.a,{key:`${t}${v}`,variant:"inline",name:"ACTION"===b?null===(h=null==n?void 0:n[b])||void 0===h?void 0:h.id:b,onClick:t=>((e,t)=>{var a,l,i,b,v,p,_,I,g,h;e.preventDefault();const{mac:f}=t,{name:j}=e.currentTarget;switch(j){case ce.e.CLIENT:return t.unifi_device_fingerprint_icon_filename?r.push(o.replace(":mac",null===(a=null==n?void 0:n.CLIENT)||void 0===a?void 0:a.id)):r.push(d.replace(":mac",null===(l=null==n?void 0:n.CLIENT)||void 0===l?void 0:l.id));case ce.e.DEVICE:return r.push(o.replace(":mac",null===(i=null==n?void 0:n.DEVICE)||void 0===i?void 0:i.id));case ce.e.DEVICE_POWER:return r.push(o.replace(":mac",null===(b=null==n?void 0:n.DEVICE_POWER)||void 0===b?void 0:b.id));case ce.e.DEVICE_FROM:return r.push(o.replace(":mac",null===(v=null==n?void 0:n.DEVICE_FROM)||void 0===v?void 0:v.id));case ce.e.DEVICE_TO:return r.push(o.replace(":mac",null===(p=null==n?void 0:n.DEVICE_TO)||void 0===p?void 0:p.id));case ce.e.ADMIN:return r.push("");case ce.e.USER:return window.location.href=T.replace("network","users/users"),null;case ce.e.NETWORK:return r.push(O.replace(":networkId",null===(_=null==n?void 0:n.NETWORK)||void 0===_?void 0:_.id));case ce.e.WLAN:return r.push(m.replace(":WlanId",null===(I=null==n?void 0:n.WLAN)||void 0===I?void 0:I.id));case ce.a.ADOPT_DEVICE_NOW:return r.push(o.replace(":mac",f));case ce.a.VIEW_YOUR_DEVICES:return r.push(c);case ce.a.VIEW_ALL_CLIENTS:case ce.a.VIEW_CONNECTED_USERS_AND_DEVICES:return r.push(s);case ce.a.ENABLE_DHCP_AUTO_SCALING:return r.push(O.replace(":networkId",null===(g=null==n?void 0:n.NETWORK)||void 0===g?void 0:g.id));case ce.a.INSTALL_FIRMWARE_NOW:return r.push(o.replace(":mac",f));case ce.a.LEARN_MORE_ABOUT_THREAT_BLOCKING:return window.open(me.a.threatManagementWiki,"_blank");case ce.a.REVIEW_HOTSPOT:return r.push(E.replace(":HotspotId",null===(h=null==n?void 0:n.WLAN)||void 0===h?void 0:h.id));case ce.a.VIEW_ULTE_USAGE_AND_LIMIT_INFO:return r.push(o.replace(":mac",f));case ce.a.VIEW_ULTE_USAGE_OR_INCREASE:return r.push(u.replace(":mac",f));default:return null}})(t,e)},l.a.createElement(pe,null,null===(f=null==n?void 0:n[b])||void 0===f?void 0:f.name)):b):[b]},[])):a})(t,a,p,v))};var Ie=({category:e})=>{switch(e){case ce.b.PERFORMANCE:return l.a.createElement(F.b,{id:"NOTIFICATIONS_TABLE_CATEGORY_PERFORMANCE"});case ce.b.SOFTWARE_UPDATE:return l.a.createElement(F.b,{id:"NOTIFICATIONS_TABLE_CATEGORY_SOFTWARE_UPDATE"});case ce.b.SYSTEM:return l.a.createElement(F.b,{id:"NOTIFICATIONS_TABLE_CATEGORY_SYSTEM"});case ce.b.TOPOLOGY:return l.a.createElement(F.b,{id:"NOTIFICATIONS_TABLE_CATEGORY_TOPOLOGY"});default:return l.a.createElement(F.b,{id:"COMMON_HYPHEN"})}},ge=a(2599),he=a(126),fe=a(318),je=a(351),Ce=a(604);const Ne=Object(_.c)(ge.a)`
  margin: 0 !important;
`,Se=Object(_.c)("img")`
  max-width: 100%;
  height: inherit;
  object-fit: contain;
`;var Ae=({name:e,fingerprintSource:t,deviceFingerprintId:a,unifiDeviceFingerprintIconFilename:i,unifiDeviceFingerprintIconResolutions:r})=>{const[c,s]=Object(n.useState)(null),{src:o,srcSet:d}=Object(n.useMemo)(()=>{if(i&&(null==r?void 0:r.length)){const e=Object(Ce.e)({icon_filename:i,icon_resolutions:r},!1,"2x");if((null==e?void 0:e.src)&&(null==e?void 0:e.srcSet))return{src:e.src,srcSet:e.srcSet}}const e=Object(Ce.d)({sourceId:fe.b.includes(t)?t:0,deviceId:a||0}),n=je.b.STANDARD.map((t,a)=>`${e[t]} ${2**a}x`).join(",");return{src:Object(Ce.b)(n),srcSet:n}},[t,a,i,r]);return Object(n.useEffect)(()=>{const t=new Image;t.onload=()=>s(l.a.createElement(Se,{src:o,srcSet:d})),t.onerror=()=>s(l.a.createElement(Ne,{name:e||"unknown",size:"small"})),t.src=o},[]),l.a.createElement(l.a.Fragment,null,c)};const Le=Object(_.c)(ge.a)`
  margin: 0 !important;
`,Re=Object(_.c)("img")`
  max-width: 100%;
  height: inherit;
  object-fit: contain;
`;var Me=({activityListTableItem:{key:e,name:t,category:a,device_fingerprint_id:n,fingerprint_source:r,unifi_device_fingerprint_icon_filename:c,unifi_device_fingerprint_icon_resolutions:s}})=>{const o=Object(i.useSelector)(he.a);return c&&(null==s?void 0:s.length)||[n,r].some(e=>!Number.isNaN(Math.sign(e))&&Math.sign(e)>=0)?l.a.createElement(Ae,{name:t,deviceFingerprintId:n,fingerprintSource:r,unifiDeviceFingerprintIconFilename:c,unifiDeviceFingerprintIconResolutions:s}):a===ce.b.SYSTEM?e.includes("FAILED")?l.a.createElement(R.W,{size:"large"}):l.a.createElement(R.U,{size:"large"}):e===ce.c.BULK_FIRMWARE_UPDATE_AVAILABLE?l.a.createElement(Re,{src:o+"/device/multiDevice/standard@2x.png"}):l.a.createElement(Le,{name:t||"unknown",size:"small"})};const Fe=(e,t)=>(e?(e=>Object(oe.differenceInSeconds)(new Date,e))(t):(e=>Object(oe.differenceInMinutes)(new Date,e))(t))||1,ye=({timestamp:e})=>{const t=(e=>Object(oe.isAfter)(e,Object(oe.subMinutes)(new Date,1)))(e),a=(e=>Object(oe.isAfter)(e,Object(oe.subHours)(new Date,1)))(e),[r,c]=Object(n.useState)(Fe(t,e)),s=Object(n.useRef)(null),o=Object(n.useRef)(null),d=Object(i.useSelector)(m.E),O=Object(i.useSelector)(m.J),b=Object(i.useSelector)(u.selectLocaleSettings),E=Object(i.useSelector)(C.d),T=Object(j.d)(O,b,E),v=()=>{s.current&&(s.current.stopTimeout(),s.current=null)},p=()=>{o.current&&(clearTimeout(o.current),o.current=null)};return Object(n.useEffect)(()=>{if(t||a){const n=new Date(e).getMilliseconds();let l=null;t?l=1e3-n:a&&(l=s.current?0:6e4-n),v(),p(),o.current=setTimeout(()=>{c(Fe(t,e)),s.current=((e,t)=>{let a=Date.now()-t,n=null;const l=()=>{const i=Date.now()-a,r=Math.max(1,1+Math.round(i/t));null==e||e();const c=t*r;a+=c,n=setTimeout(l,c-i)};return n=setTimeout(l,t),{stopTimeout:()=>{clearTimeout(n),n=null}}})(()=>{c(Fe(t,e))},1e3*(t?.25:60))},l)}else v(),p();return()=>{v(),p()}},[t,a,e]),Object(n.useEffect)(()=>v,[]),t?l.a.createElement(F.b,{id:"NOTIFICATION_DATE_TIME_SECONDS_AGO",values:{seconds:r}}):a?l.a.createElement(F.b,{id:"NOTIFICATION_DATE_TIME_MINUTES_AGO",values:{minutes:r}}):(e=>Object(oe.isSameDay)(e,new Date))(e)?l.a.createElement(F.b,{id:"NOTIFICATION_DATE_TIME_TODAY",values:{time:Object(j.e)(e,T,d)}}):l.a.createElement(l.a.Fragment,null,Object(j.e)(e,T,"MMM D, YYYY "+d))},De=[{id:de.SEVERITY,minWidth:100,renderLabel:()=>l.a.createElement(F.b,{id:"NOTIFICATIONS_TABLE_HEADER_CATEGORY"}),renderCell:({severity:e,category:t})=>{var a;return l.a.createElement(l.a.Fragment,null,l.a.createElement(re.a,{alignItems:"center",justifyContent:"center",marginRight:8},l.a.createElement(ue.a,{status:null===(a=e||ce.d.INFO)||void 0===a?void 0:a.toLowerCase()})),l.a.createElement(ie.a,{color:"inherit",size:"body",truncate:!0},l.a.createElement(Ie,{category:t})))}},{id:de.EVENT,minWidth:240,label:l.a.createElement(F.b,{id:"NOTIFICATIONS_TABLE_HEADER_EVENT_DETAILS"}),renderCell:e=>l.a.createElement(l.a.Fragment,null,l.a.createElement(re.a,{alignItems:"center",justifyContent:"center",width:"100%",height:32,minWidth:32,maxWidth:32,marginRight:8},l.a.createElement(Me,{activityListTableItem:e})),l.a.createElement(ie.a,{color:"inherit",size:"body",truncate:!0},l.a.createElement(_e,{activityListTableItem:e})))},{compare:Object(se.b)(({timestamp:e})=>e),id:de.TIMESTAMP,sortable:!0,minWidth:140,label:l.a.createElement(F.b,{id:"COMMON_DATE_TIME"}),renderCell:({timestamp:e})=>l.a.createElement(ie.a,{color:"inherit",size:"body",truncate:!0},l.a.createElement(ye,{timestamp:e}))}];var we=a(236),Pe=a(1195),xe=a(2841);const ke=e=>{var t;return(null===(t=null==e?void 0:e.activity)||void 0===t?void 0:t.pageNumber)||1},Ve=e=>{var t,a;return null!==(a=null===(t=null==e?void 0:e.activity)||void 0===t?void 0:t.batchIndex)&&void 0!==a?a:0};var Ye=a(2757),We=a(757);var Ue=()=>{const e=Object(i.useSelector)(c.g),t=Object(i.useDispatch)(),a=Object(i.useSelector)(Object(V.b)("activity")),n=()=>{const e=Object(M.a)(K.a);t(B(e)),t(Object(m.L)(E.a.ALERTS,{filters:e}))},r=()=>{const e=document.querySelector("input[role=combobox]");e&&e.focus(),t(Object(We.g)("activity"))};return l.a.createElement(re.a,{width:"100%",flexDirection:"column"},l.a.createElement(()=>{switch(!0){case!!a.length:return l.a.createElement(Ye.a,{icon:"noNotifications",maxWidth:386,detailPadding:35,title:l.a.createElement(F.b,{id:"COMMON_NO_MATCH"}),details:l.a.createElement(F.b,{id:"NOTIFICATIONS_FILTER_NO_CONTENT_FOUND_DETAIL"}),button:l.a.createElement(Oe.a,{variant:"primary"},l.a.createElement(F.b,{id:"COMMON_REMOVE_FILTERS"})),onClick:r});case!!e:return l.a.createElement(Ye.a,{icon:"noNotifications",maxWidth:386,detailPadding:35,title:l.a.createElement(F.b,{id:"COMMON_NO_MATCH"}),details:l.a.createElement(F.b,{id:"NOTIFICATIONS_FILTER_NO_CONTENT_FOUND_DETAIL"}),button:l.a.createElement(Oe.a,{variant:"primary"},l.a.createElement(F.b,{id:"COMMON_BUTTON_RESET_DISPLAY_OPTION"})),onClick:n});default:return l.a.createElement(Ye.a,{icon:"noNotifications",maxWidth:386,detailPadding:35,title:l.a.createElement(F.b,{id:"NOTIFICATIONS_NO_CONTENT_TITLE"}),details:l.a.createElement(F.b,{id:"NOTIFICATIONS_NO_CONTENT_DETAIL"})})}},null))};const Be=[{value:"25",default:!0},{value:"50"},{value:"100"}];var $e=()=>{const e=Object(i.useSelector)(c.f),t=Object(i.useSelector)(c.d),a=Object(i.useSelector)(c.c),s=Object(i.useSelector)(ke),o=Object(i.useSelector)(Ve),d=Object(i.useSelector)(Object(m.B)(we.a.ALERTS)),u=Object(n.useMemo)(()=>{var e;return(null==d?void 0:d.rowsPerPage)||Number((null===(e=Be.find(e=>null==e?void 0:e.default))||void 0===e?void 0:e.value)||Be[0].value)},[null==d?void 0:d.rowsPerPage]),O=Object(i.useDispatch)(),{sortBy:b,isAscending:E}=Object(i.useSelector)(Object(m.B)(we.a.ALERTS))||{sortBy:"timestamp",isAscending:!1},T=Object(n.useRef)(),v=Object(i.useSelector)(c.a);Object(n.useEffect)(()=>{(null==t?void 0:t.length)<(null==a?void 0:a.total_element_count)&&u*s>250*(o+1)-100&&(O(Object(r.a)({isAscending:E,timestampFrom:Date.parse(v.start),timestampTo:Date.parse(v.end),pageNumber:o+1})),O(Object(N.g)(o+1)))},[u,s,o,null==a?void 0:a.total_element_count,null==t?void 0:t.length,v,O,E]);const p=Object(n.useCallback)((e,t)=>{O(Object(m.L)(we.a.ALERTS,{sortBy:e.id,isAscending:t}))},[O]),_=Object(n.useCallback)(({from:t,rowsPerPage:a})=>l.a.createElement(xe.a,null,l.a.createElement(le.a,{ref:T,items:e,rowLimit:a,rowOffset:t,onSort:p,columns:De,rowHeight:34,initialSortBy:b,initiallySortAscending:E,disableColumnFilters:!0})),[e,E,b,p]);return(null==e?void 0:e.length)?l.a.createElement(Pe.a,{section:"ACTIVITY_SECTION_NOTIFICATIONS",itemCount:null==e?void 0:e.length,totalItems:null==a?void 0:a.total_element_count,tableType:we.a.ALERTS,onRenderTable:_,onPageChanged:e=>{O(Object(N.i)(e))},pageNumber:s,rowOptions:Be}):l.a.createElement(Ue,null)};t.default=({match:{path:e}})=>{const[t,a]=Object(n.useState)(!1),p=Object(n.createRef)(),_=Object(n.useCallback)((e=!1)=>a(e),[a]),I=Object(i.useSelector)(c.a),g=Object(i.useSelector)(Object(m.B)(E.a.ALERTS));return Object(b.g)([Object(O.c)("activity"),Object(O.c)("eventStrings"),Object(d.fetchClients)(void 0,{crudCacheStrategy:{type:v.a.CACHE}}),Object(o.fetchDevices)(void 0,{crudCacheStrategy:{type:v.a.CACHE}}),Object(r.a)({isAscending:null==g?void 0:g.isAscending,timestampFrom:Date.parse(I.start),timestampTo:Date.parse(I.end)},void 0,{crudCacheStrategy:{type:v.a.CACHE}}),Object(u.fetchSettings)({type:v.a.CACHE})],l.a.createElement(s.a,{mainPanelClassName:"ActivityMainPanel"},l.a.createElement(ne,{onCalendarClick:()=>_(!0)}),l.a.createElement("div",{ref:p},l.a.createElement(L,{isOpen:t,onClose:()=>_(),containerRef:p})),l.a.createElement(T.a,{path:""+e,render:()=>l.a.createElement($e,null)})),{trackingName:"activity-page"})}}}]);