"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[12965],{7476(e,t,i){i.d(t,{A:()=>A});var l=i(274934),o=i(602086),n=i(977872),r=i(596603),s=i(470070),d=i(94411),a=i(158402),c=i(720770),u=i(916297),h=i(855470);const A=({columns:e,columnLabels:t,tableType:i,hidden:A=[]})=>{const p=(0,n.wA)(),{initialColumns:m=[],initialColumnSnapshot:f={}}=(0,d.A)(i)||{initialColumns:[],initialColumnSnapshot:{}},b=(0,o.useMemo)(()=>Object.values(e),[e]),x=(0,o.useMemo)(()=>b.every(e=>m.includes(e)),[m,b]),$=(0,o.useCallback)(()=>{const e=x?[...(0,c.A)()]:b;p((0,a.yT)(i,{initialColumns:e,initialColumnSnapshot:x?Object.keys(f).reduce((e,t)=>(e[t]=!1,e),{...f}):e.reduce((e,t)=>(e[t]=!0,e),{...f})}))},[p,x,i,b,f]),g=(0,o.useCallback)(e=>t=>{const l=t?[...m,e]:m.filter(t=>t!==e);p((0,a.yT)(i,{initialColumns:l,initialColumnSnapshot:Object.keys(f).reduce((e,t)=>(e[t]=l.includes(t),e),{...f})}))},[p,m,i,f]),I=(0,o.useMemo)(()=>{const e=[{id:u.M,isSelected:x,label:(0,l.jsx)(s.sA,{id:"COMMON_ALL"}),onChange:$}],i=b.length;for(let o=0;o<i;o+=1){const i=b[o];A.includes(i)||e.push({id:i,isSelected:m.includes(i),label:t?.[i]?(0,l.jsx)(s.sA,{id:t[i]}):i,onChange:g(i)})}return e},[g,m,b,A,t,x,$]);return(0,l.jsx)(h.g,{children:I.map(({id:e,label:t,onChange:i,isSelected:o})=>(0,l.jsx)(r.A,{id:e,label:t,onChange:i,isSelected:o},e))})}},855470(e,t,i){i.d(t,{g:()=>r});var l=i(247816),o=i(309130),n=i(100978);const r=(0,l.A)(n.A)`
  flex-direction: column;
  gap: ${o.kc};
  padding-top: ${o.xO};
  > div:first-child > label:first-child {
    margin-bottom: ${o.xO};
  }
`},916297(e,t,i){i.d(t,{M:()=>l});const l="COLUMN_VISIBILITY_SHOW_ALL_FIELDS_ID"},444971(e,t,i){i.d(t,{A:()=>r});var l=i(602086),o=i(977872),n=i(677982);const r=({leftFilterPageId:e,leftFilterColumnsId:t})=>(0,o.d4)((0,l.useMemo)(()=>(0,n.$R)(e,t),[e,t]))},696766(e,t,i){i.d(t,{CW:()=>d,Ot:()=>c,kp:()=>a});var l=i(814557),o=i(247816),n=i(309130),r=i(100978),s=i(291508);const d=(0,o.A)(r.A,(0,s.A)("hasOverflow"))`
  width: 180px;
  position: relative;
  border: 1px solid
    ${({theme:{themeName:e}})=>l.Ay[`desktop-color-neutral-03-${e}`]};
  border-radius: ${l.Ay["desktop-radius-base"]};
  gap: ${n.kc};
  flex-direction: column;
  padding: ${({hasOverflow:e})=>e?`${n.kc} 0 ${n.kc} ${n.kc}`:n.kc};
  margin-bottom: ${n.xO};
`,a=(0,o.A)(r.A)`
  flex-direction: column;
  overflow: auto;
  padding-bottom: ${n.fS};
  > div:nth-child(2) > div:first-child > label {
    padding-left: 0;
  }
  > span:first-child {
    margin-bottom: ${n.YC};
  }
`,c=(0,o.A)(r.A)`
  align-items: center;
  justify-content: space-between;
  position: absolute;
  bottom: 0;
  min-height: 36px;
  background-color: ${({theme:{themeName:e}})=>l.Ay[`desktop-color-neutral-00-${e}`]};
  width: calc(100% - (${n.Er}));
  padding-bottom: ${n.Ln};
`},645648(e,t,i){i.d(t,{A:()=>k});var l=i(274934),o=i(590979),n=i(602086),r=i(977872),s=i(877986),d=i(25202),a=i(222361),c=i(252445),u=i(158402),h=i(107178),A=i(814557),p=i(247816),m=i(309130),f=i(100978),b=i(291508);const x=(0,p.A)(f.A,(0,b.A)("leftFilterPanelOpen","buttonTop"))`
  position: absolute;
  z-index: 10;
  cursor: pointer;
  border: 1px solid
    ${({theme:{themeName:e}})=>A.Ay[`desktop-color-divider-border-${e}`]};
  border-radius: ${A.Ay["desktop-radius-base"]};
  top: ${({buttonTop:e})=>e??m.xO};
  right: ${({leftFilterPanelOpen:e})=>e?"-11":"-14"}px;
  background: ${({theme:{themeName:e}})=>A.Ay[`desktop-color-neutral-01-${e}`]};
  > div:first-child {
    width: 18px;
    height: 32px;
  }
  svg {
    left: ${({leftFilterPanelOpen:e})=>e?"0":"4"}px;
    position: relative;
    color: ${({theme:{themeName:e}})=>A.Ay[`desktop-color-neutral-07-${e}`]};
  }
`,$=({leftFilterPageId:e,buttonTop:t})=>{const i=(0,r.wA)(),o=(0,h.A)(e),A=(0,n.useCallback)(()=>{i(o?(0,c.MZ)(e):(0,c.lF)(e)),i((0,u.ZN)(e,{[a.d.PANEL_OPEN]:!o}))},[i,o,e]);return(0,l.jsx)(x,{leftFilterPanelOpen:o,buttonTop:t,onClick:A,children:(0,l.jsx)(o?s.A:d.A,{size:"small",actionable:!0,omitSvgMargin:!0})})},g=(0,p.A)(f.A)`
  width: 100%;
  height: 100%;
  flex-direction: row;
  position: relative;
`,I=(0,p.A)(f.A,(0,b.A)("leftFilterPanelOpen"))`
  position: relative;
  padding-top: ${m.xO};
  ${({leftFilterPanelOpen:e,theme:{themeName:t}})=>e?`\n        border-right: 1px solid ${A.Ay[`desktop-color-divider-border-${t}`]};\n        padding-left: ${m.xO};\n      `:""}
`,k=({children:e,content:t,leftFilterPageId:i,buttonTop:n,leftFilterContentContainerClassname:r,...s})=>{const d=(0,h.A)(i);return(0,l.jsxs)(g,{...s,children:[(0,l.jsxs)(I,{leftFilterPanelOpen:d,className:r,...o.A.addDataTestId(o.A.TestId.LEFT_FILTER),children:[i?(0,l.jsx)($,{leftFilterPageId:i,buttonTop:n}):null,d?t:null]}),e]})}},692(e,t,i){i.d(t,{A:()=>I});var l=i(274934),o=i(602086),n=i(887041),r=i(239875),s=i(147328),d=i(590979),a=i(977872),c=i(677982);var u=i(444971),h=i(39279),A=i(247816),p=i(309130),m=i(100978),f=i(291508);const b=(0,A.A)(m.A,(0,f.A)("isLeftFilterEditorOpen","isLeftFilterColumnsOpen"))`
  ${({isLeftFilterEditorOpen:e,isLeftFilterColumnsOpen:t})=>e||t?`padding-right: ${p.xO};`:""}
`;var x=i(961231),$=i(614209);const g=(0,o.forwardRef)(({children:e,isLeftFilterEditorOpen:t,isLeftFilterColumnsOpen:i,isMaximized:n,maximizedId:r},s)=>{const d=(0,o.useMemo)(()=>({[x.A.IS_MAXIMIZED]:n,[x.A.MAXIMIZED_ID]:r}),[n,r]);return(0,l.jsx)($.A.Provider,{value:d,children:(0,l.jsx)(b,{ref:s,isLeftFilterEditorOpen:t,isLeftFilterColumnsOpen:i,children:e})})}),I=({children:e,tabs:t,columns:i,editor:A,footer:p,leftFilterPageId:m,leftFilterColumnsId:f})=>{const{height:b=0,ref:x}=(0,r.A)(),$=(0,o.useRef)(null),I=(0,s.A)($),k=(e=>(0,a.d4)((0,o.useMemo)(()=>(0,c.tR)(e),[e])))(m),O=(0,u.A)({leftFilterPageId:m,leftFilterColumnsId:f});return(0,l.jsx)(n.A,{children:o=>(0,l.jsxs)(g,{ref:x,isLeftFilterEditorOpen:k,isLeftFilterColumnsOpen:O,...o,children:[(0,l.jsxs)(h.fy,{height:b,children:[t,(0,l.jsxs)(h.yE,{ref:$,...d.A.addDataTestId(d.A.TestId.LEFT_FILTER_PANEL_CONTENT),children:[e,(0,l.jsx)(h.Ot,{hasOverflow:I,children:p})]}),I?(0,l.jsxs)(h.sN,{...d.A.addDataTestId(d.A.TestId.LEFT_FILTER_PANEL_FOOTER),children:[(0,l.jsx)(h.d$,{}),p]}):null]}),A&&k?(0,l.jsx)(h._G,{children:A}):null,i&&O?(0,l.jsx)(h.o2,{isLeftFilterEditorOpen:k,children:i}):null]})})}},39279(e,t,i){i.d(t,{Ot:()=>m,T_:()=>u,_G:()=>b,d$:()=>f,fy:()=>c,o2:()=>h,sN:()=>p,yE:()=>A});var l=i(814557),o=i(247816),n=i(419284),r=i(309130),s=i(100978),d=i(66420),a=i(291508);const c=(0,o.A)(s.A,(0,a.A)("height"))`
  flex-direction: column;
  flex: 0 0 auto;
  width: calc(${d.b}px + ${r.Ln});
  height: ${({height:e})=>e?`${e}px`:"auto"};
  position: relative;
  background-color: ${({theme:{themeName:e}})=>l.Ay[`desktop-color-neutral-00-${e}`]};
  z-index: 1;
  padding-bottom: ${r.kc};
  gap: ${r.kc};
`,u=(0,o.A)(s.A)`
  flex-direction: column;
  width: ${d.b}px;
`,h=(0,o.A)(s.A,(0,a.A)("isLeftFilterEditorOpen"))`
  width: fit-content;
  ${({isLeftFilterEditorOpen:e})=>e?`margin-left: ${r.YC};`:""}
`,A=(0,o.A)(s.A)`
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  gap: ${r.kc};
  // buffer for the last element to be fully visible
  padding-bottom: ${r.Ln};
  scrollbar-gutter: stable;
`,p=(0,o.A)(s.A)`
  width: calc(100% - ${r.xO});
  position: absolute;
  bottom: 0;
  flex-direction: column;
  justify-content: center;
  min-height: 36px;
  background-color: ${({theme:{themeName:e}})=>l.Ay[`desktop-color-neutral-00-${e}`]};
`,m=(0,o.A)(s.A,(0,a.A)("hasOverflow"))`
  ${({hasOverflow:e})=>e?"opacity: 0;":""}
`,f=(0,o.A)("div")`
  position: absolute;
  top: -${r.kc};
  width: 100%;
  height: 8px;
  background: linear-gradient(
    180deg,
    ${({theme:{themeName:e}})=>(0,n.b_)(l.Ay[`desktop-color-neutral-00-${e}`],0)} 0%,
    ${({theme:{themeName:e}})=>(0,n.b_)(l.Ay[`desktop-color-neutral-00-${e}`],8)}
      100%
  );
`,b=(0,o.A)(s.A)`
  width: 248px;
  border: 1px solid
    ${({theme:{themeName:e}})=>l.Ay[`desktop-color-neutral-03-${e}`]};
  border-radius: ${l.Ay["desktop-radius-base"]};
  padding: ${r.xO} ${r.kc};
  background: ${({theme:{themeName:e}})=>l.Ay[`desktop-color-neutral-01-${e}`]};
`},614209(e,t,i){i.d(t,{A:()=>n});var l=i(602086),o=i(961231);const n=(0,l.createContext)({[o.A.IS_MAXIMIZED]:!1,[o.A.MAXIMIZED_ID]:null})},961231(e,t,i){var l;i.d(t,{A:()=>l}),function(e){e.IS_MAXIMIZED="isMaximized",e.MAXIMIZED_ID="maximizedId"}(l||(l={}))},300842(e,t,i){i.d(t,{A:()=>h});var l=i(274934),o=i(602086),n=i(814557),r=i(602569),s=i(693839),d=i(263705),a=i(613056),c=i(614209),u=i(961231);const h=({id:e,label:t,initialExpanded:i=!0,hasPaddedContent:h=!1,isStatic:A=!1,isEditorOpen:p=!1,children:m})=>{const{themeName:f}=(0,d.u)(),[b,x]=(0,o.useState)(i),{[u.A.IS_MAXIMIZED]:$,[u.A.MAXIMIZED_ID]:g}=(0,o.useContext)(c.A),I=(0,o.useCallback)(e=>{x(e)},[x]),k=(0,o.useMemo)(()=>A?r.A:s.A,[A]),O=(0,o.useMemo)(()=>({background:p?n.Ay[`desktop-color-neutral-01-${f}`]:"inherit"}),[p,f]),{isLocked:v,isFullHeight:C,isHidden:F,hasDivider:L}=(0,o.useMemo)(()=>({isLocked:$&&g===e,isFullHeight:$&&g===e,isHidden:$&&g!==e,hasDivider:!($&&g===e)}),[$,g,e]);return t?(0,l.jsx)(k,{label:t,size:"small",isExpanded:b,onExpandedChange:I,hasPaddedContent:h,style:O,isLocked:v,isFullHeight:C,isHidden:F,hasDivider:L,children:b?m:null}):(0,l.jsx)(a.s,{children:m})}},613056(e,t,i){i.d(t,{s:()=>s});var l=i(814557),o=i(247816),n=i(309130),r=i(100978);const s=(0,o.A)(r.A)`
  border-bottom: 1px solid
    ${({theme:{themeName:e}})=>l.Ay[`desktop-color-neutral-02-${e}`]};
  padding: ${n.kc};
  flex-direction: column;
  width: 100%;
  position: relative;
  gap: ${n.kc};
`},501454(e,t,i){i.d(t,{A:()=>n});var l=i(274934),o=i(14084);const n=({onClear:e,labelId:t="COMMON_ACTION_CLEAR_FILTERS",disabled:i})=>(0,l.jsx)(o.A,{onPress:e,labelId:t,disabled:i})},14084(e,t,i){i.d(t,{A:()=>a});var l=i(274934),o=i(938984),n=i(954702),r=i(470070),s=i(147045);const d=i(409844).AH`
  justify-content: flex-start;
`,a=({onPress:e,labelId:t,disabled:i,[s.L]:a})=>(0,l.jsx)(n.A,{type:"button",onPress:e,isDisabled:i,className:d,...a&&{[s.L]:a},children:(0,l.jsx)(o.A,{size:"medium",color:"inherit",children:(0,l.jsx)(r.sA,{id:t})})})},147328(e,t,i){i.d(t,{A:()=>o});var l=i(602086);const o=e=>{const[t,i]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{const t=()=>{e.current&&i(e.current.scrollHeight>e.current.clientHeight)};t();const l=new ResizeObserver(t);return e.current&&l.observe(e.current),()=>{l.disconnect()}},[e]),t}}}]);