"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[43811],{705228(e,t,l){l.d(t,{VT:()=>i,i9:()=>n,ng:()=>o,nt:()=>r});var a=l(888170);const n=l(132196).AH`
  font-size: ${a.Ay["font-size-m"]};
  font-weight: normal;
  border-radius: 0;
`,r=112,i=20,o=345},143811(e,t,l){l.d(t,{A:()=>J});var a=l(469733),n=l(296540),r=l(951272),i=l(284428),o=l(566723),s=l(602021),c=l(766624),d=l(294303),u=l(955161),p=l(429252),m=l.n(p),h=l(79760),g=l(438628),v=l(916537);const f=e=>{if(e)return"string"==typeof e?n.createElement(n.Fragment,null,e):"object"!=typeof e||!(0,n.isValidElement)(e)||e},b=(0,n.memo)(({autoComplete:e="nope",label:t=null,labelValues:l={},placeholder:a=null,placeholderValues:r={},translatePlaceholder:i=!0,helperMessage:o=null,forwardedRef:s,value:c,onBlur:d,onChange:u,dirty:p,touched:m,invalid:h,...b})=>{const{formatMessage:C}=(0,v.tz)();return n.createElement(g.A,{ref:s,...t?{label:"string"==typeof t?C({id:t},l):t}:{},placeholder:a&&i?C({id:a},r).toString():a,helperMessage:o&&C({id:o},r),autoComplete:e,onChange:u,onBlur:d,value:c,invalid:f(h),...b})}),C=(0,n.memo)(({field:{name:e,value:t,onBlur:l,onChange:a},form:{dirty:i,errors:o,touched:s,submitCount:c},autoComplete:d="off",disabled:u=!1,...p})=>{const m=(0,h.t$)(e,o,s,c);return n.createElement(b,{id:e,name:e,value:t,onBlur:l,onChange:a,disabled:u,autoComplete:d,invalid:m,dirty:i,touched:(0,r.O6)(s,e)??!1,...p})},(e,t)=>{const{field:{name:l,value:a},form:{dirty:n,errors:i,submitCount:o,touched:s}}=e;return Object.entries(e).length===Object.entries(t).length&&!Object.entries(t).some(([t,c])=>{switch(t){case"form":{const e=(0,r.O6)(i,l),t=(0,r.O6)(c.errors,l);return!(t===e||e?.props?.id&&t?.props?.id&&t?.props?.id===e?.props?.id&&e?.props?.values&&t?.props?.values&&m()(t?.props?.values,e?.props?.values))||c.submitCount!==o||(0,r.O6)(c.touched,l)!==(0,r.O6)(s,l)||c.dirty!==n}case"field":return c?.value!==a;case"labelValues":case"placeholderValues":return!1;default:return c!==e[t]}})});var A=l(125510);const E=({field:{name:e,onBlur:t},form:{setFieldValue:l,values:a},type:i,className:o,id:s,value:c,disabled:d,onChange:u,children:p,isLabelCentered:m=!0,customFormFieldValue:h,...g})=>{const v=h?.()||(0,r.O6)(a,e),f=(0,n.useCallback)(t=>{l(e,t?[...v,c]:v.filter(e=>e!==c))},[e,v,l,c]);return n.createElement(A.A,{isSelected:v.includes(c),id:s!==e?s:`${e}-${c}`,name:e,onBlur:t,onChange:u||f,label:p,isLabelCentered:m,isDisabled:d,...g})};var y=l(436017),k=l(71479);const O=(0,k.A)(y.A)`
  display: inline-flex !important;

  --form-checkbox-size: 100%;

  input[type='checkbox'] {
    border: none !important;

    &::before {
      content: none !important;
    }
  }
`,x=({field:{name:e,onChange:t,value:l},afterChange:a=null,form:r,checked:i=!1,...o})=>{const s=(0,n.useCallback)(e=>{t(e),a&&a(e.currentTarget.checked)},[a,t]);return n.createElement(O,{checked:!(!i&&!l),id:e,name:e,size:"medium",value:"true",onChange:s,...o})};var M=l(143401);const w=({label:e,field:{name:t,value:l},form:{setFieldValue:a},type:r,checked:i=!1,disabled:s,containerStyle:c,...d})=>{const u=(0,n.useCallback)((e,l)=>{a(t,l)},[t,a]),{formatMessage:p}=(0,v.tz)();return n.createElement(M.A,{onChange:u,label:e&&p({id:e}),value:l,disabled:s,containerStyle:{opacity:s?o.xN:void 0,...c},...d})};var S=l(23835);const T=({field:{name:e,value:t},form:{setFieldValue:l,errors:a,touched:r,submitCount:i},...o})=>{const s=(0,n.useCallback)(({target:{value:t}})=>{l(e,t)},[e,l]);return n.createElement(S.A,{value:t,onChange:s,invalid:(0,h.t$)(e,a,r,i),...o})};var I=l(802);const N=({field:{name:e},form:{setFieldValue:t},onChange:l,type:a,...r})=>{const i=(0,n.useCallback)(({target:{value:l}})=>{t(e,l)},[t,e]);return n.createElement(I.A,{onChange:l||i,...r})};var L=l(877500),V=l(54227),$=l(311785);const F=(0,k.A)(V.A,(0,$.A)("vertical"))`
  > :first-child {
    flex: none;
  }

  ${({vertical:e})=>e?"":`\n          display: inline-flex !important;\n          vertical-align: middle;\n\n          > div:first-child {\n            margin-right: ${o.kc};\n          }\n\n          input {\n            margin-right: ${o.kc};\n          }\n        `}
`,B=({field:{name:e},form:{setFieldValue:t,values:l},id:a,value:r,checked:i,...o})=>{const s=(0,n.useCallback)(({currentTarget:{checked:l}})=>{l&&t(e,r)},[e,t,r]);return n.createElement(F,{checked:i??(0,L.A)(l,e)===(void 0===r||r),id:void 0!==r?`${e}-${r}`:e,name:e,onChange:s,...o})};var P=l(836645),_=l(412933),z=l(119745),W=l(314714),D=l(86838);const H=(0,k.A)(z.A)`
  > div > div > div > div {
    align-items: flex-start;
  }
`,j=(0,k.A)(d.A)`
  label:not(:last-child) {
    margin-right: 16px;
  }
`,G=(0,k.A)("div")`
  width: 100%;
`,U=({field:{name:e,value:t,onBlur:l},form:{errors:i,touched:o,setFieldValue:c,submitCount:d},disabled:u,full:p,id:m,inputProps:g,invalid:f,label:b,options:C,placeholder:A,searchEmptyMessage:E,translateLabel:y,translateLabelValues:k,translateOptions:O,translatePlaceholder:x,translateSearchEmptyMessage:M,validated:w,validationMessage:S,width:T,onChange:I,afterChange:N=null,responsiveField:L=!1,value:V,searchable:$=!0,...F})=>{const{formatMessage:B}=(0,v.tz)(),P=void 0!==V?V:t,z=(0,a.useSelector)(s.EL),U=(0,n.useMemo)(()=>({id:null!=m?m:e,name:e,onBlur:l,autoComplete:"off",...g}),[m,g,e,l]),R=(0,n.useMemo)(()=>O?(C||[]).map(({label:e,values:t,...l})=>({...l,label:B({id:e},t||{})})):C,[B,C,O]),q=(0,n.useCallback)((t,l)=>{c(e,l)},[e,c]),Q=w&&(0,h.If)(e,i,o,d),Y=S||(0,r.O6)(i,e);let J=b;"string"==typeof J&&y&&(J=B({id:J},k||{}));let K=B({id:"COMMON_SELECT"});A&&(K=x?B({id:A}):A);let X=B({id:"COMMON_NO_RESULTS"});E&&(X=M?B({id:E}):E);const Z=f??Q,ee=(0,n.useCallback)((e,t=[])=>{I?I((0,_.cC)(e)?P:e,t):q(e,t),N&&N(t)},[P,I,q,N]);return L&&R.length&&R.length<2?n.createElement(j,{flexWrap:"wrap"},R.map(t=>n.createElement(W.A,{checked:P?.includes(t.value),id:e,onChange:({currentTarget:{checked:e}})=>{const l=P.filter(e=>e!==t.value);e&&l.push(t.value),I?I(t,l):q(t,l)},key:`${e}-${t.value}`},t.label))):n.createElement(G,null,n.createElement(H,{disabled:null!=u?u:z,inputProps:U,label:J,options:R,placeholder:K,searchEmptyMessage:X,value:P,width:p?"100%":T,invalid:Z,onChange:ee,searchable:$||L&&R.length>5,...F}),w&&Z?n.createElement(D.A,{isInvalid:!0,style:{padding:0},label:Z&&Y}):null)};var R=l(362412);const q=(0,k.A)(d.A)`
  label:not(:last-child) {
    margin-right: 16px;
  }
`,Q=({field:{name:e,value:t,onBlur:l},form:{errors:i,touched:o,setFieldValue:c,submitCount:d},disabled:u,full:p,id:m,inputProps:g,invalid:f,label:b,multi:C,options:A,placeholder:E,searchEmptyMessage:y,translateLabel:k,translateLabelValues:O,translateOptions:x,translatePlaceholder:M,translateSearchEmptyMessage:w,validated:S,validationMessage:T,width:I,sortedDropdown:N=!1,onChange:L,afterChange:V=null,responsiveField:$=!1,...F})=>{const B=(0,a.useSelector)(s.EL),{formatMessage:P}=(0,v.tz)(),_=(0,n.useMemo)(()=>({id:null!=m?m:e,name:e,onBlur:l,autoComplete:"off",...g}),[m,g,e,l]),z=(0,n.useMemo)(()=>x?(A||[]).map(({label:e,values:t,...l})=>({...l,label:P({id:e},t||{})})):A,[P,A,x]),H=(0,n.useCallback)((t,l)=>c(e,l),[e,c]),j=S&&(0,h.If)(e,i,o,d),G=T||(0,r.O6)(i,e);let U=b;"string"==typeof U&&k&&(U=P({id:U},O||{}));let Q=P({id:"COMMON_SELECT"});E&&(Q=M?P({id:E}):E);let Y=P({id:"COMMON_NO_RESULTS"});y&&(Y=w?P({id:y}):y);const J=f??j;return C&&$&&z.length&&z.length<4?n.createElement(q,{flexWrap:"wrap"},z.map(l=>n.createElement(W.A,{checked:t?.includes(l.value),id:e,onChange:({currentTarget:{checked:e}})=>{const a=t.filter(e=>e!==l.value);e&&a.push(l.value),L?L(l,a):H(l,a)},key:`${e}-${l.value}`},l.label))):n.createElement(n.Fragment,null,n.createElement(N?R.A.Sorted:R.A,{disabled:null!=u?u:B,inputProps:_,label:U,multi:C,options:z,placeholder:Q,searchEmptyMessage:Y,value:t,width:p?"100%":I,invalid:J,searchable:F.searchable||$&&z.length>5,onChange:(e,t)=>{L?L(e,t):H(e,t),V&&V(t)},...F}),S&&J&&G?n.createElement(D.A,{isInvalid:!0,style:{padding:0},label:G}):null)},Y=({field:{name:e,onChange:t,value:l},afterChange:a,form:r,type:i,checked:o,...s})=>{const c=(0,n.useCallback)(e=>{t(e),a&&a(e.currentTarget.checked)},[a,t]);return n.createElement(W.A,{checked:o??l,id:e,value:"true",onChange:c,...s})},J=({allowReadOnly:e=!1,fast:t=!1,type:l="text",id:p,name:m,tooltipMessage:h,searchText:g,searchTags:v,searchIgnore:f,disabled:b,tooltipProps:A,...y})=>{const k=(0,a.useSelector)(s.EL),O=(e=>{switch(e){case"checkbox":return x;case"realCheckbox":return Y;case"dropdown":return Q;case"multiInlineDropdown":return U;case"radio":return B;case"textarea":return T;case"toggleBox":return E;case"timeInput":return w;case"picklist":return P.A;case"slider":return N;default:return C}})(l),M=t?r.B0:r.D0,S=Boolean(h)&&("realCheckbox"===l||"radio"===l),I=(0,i.mQ)();return n.createElement(u.A,{condition:S,wrapper:e=>n.createElement(d.A,{alignItems:"center"},e)},n.createElement(M,{component:O,type:l,name:m,id:p||m,disabled:!e&&(k||b||I),size:"body",...y}),S?n.createElement(d.A,{paddingLeft:o.YC},n.createElement(c.A,{description:h,portal:!0,disabled:!(e||!k&&!b),...A})):null)}},317672(e,t,l){l.d(t,{A:()=>c});var a=l(296540),n=l(498577),r=l(284428),i=l(566723),o=l(766624),s=l(294303);const c=({tooltip:e,htmlFor:t,children:l,labelProps:c,wrapperProps:d,tooltipProps:u})=>{const p=(0,r.iL)();return a.createElement(s.A,{alignItems:"center",gap:i.YC,...d},a.createElement(n.A,{htmlFor:t,color:"tertiary",...c,style:{opacity:p?i.xN:void 0,...c?.style}},l),e?a.createElement(o.A,{description:e,...u}):null)}},662297(e,t,l){l.d(t,{A:()=>O});var a=l(296540),n=l(217439),r=l(888170),i=l(318195),o=l(86838),s=l(71479),c=l(132196),d=l(311785),u=l(454195),p=l(566723),m=l(916537),h=l(705228),g=l(294303),v=l(317672);const f=(e,t,l)=>c.AH`
  width: ${l?"100%":`${h.ng}px`};
  max-width: 100%;
  ${e&&`box-shadow: inset 0 0 0 1px ${r.Ay["red-1"]};`}
  ${!t&&"display: none;"}
`,b=c.AH`
  vertical-align: top;
`,C=e=>c.AH`
  div[class*='toggleWrap'] {
    ${e&&"width: 100%;"}
  }

  label > div[class*='selectorLabel'] {
    /* A bug in UIC causes the need for this override. If you can remove this without PickLists overflowing horizontally, please do. https://ui.slack.com/archives/GF9JUGVEV/p1739435275590989 */
    width: calc(100% - 24px) !important;
  }
`,A=(0,s.A)("div",(0,d.A)("disabled","isFullWidth"))`
  ${({isFullWidth:e})=>e&&"width: 100%;"}

  ${({disabled:e})=>e&&`\n  opacity: ${p.xN};\n  pointer-events: none;\n  cursor: default;\n`}
`,E={padding:0},y={margin:0},k={keys:["label","additionalInfo"]},O=({name:e,options:t,onChange:l,value:r,disabled:s=!1,label:d,invalid:p,triggerButtonText:h="COMMON_EDIT_SELECTIONS",triggerButtonHeight:O,translateTriggerButtonText:x=!0,alwaysShowTriggerButtonText:M=!1,popoverClassName:w="",placement:S="bottom start",isWindowed:T,isFullWidth:I=!1,tooltipVisibility:N,maxSelections:L=null,isDefaultOpen:V=!1,onCheckConfirm:$,isSelectAllVisible:F,onCheckSelectAllConfirm:B,onChangeSelectAll:P,onOpenChange:_,truncateLabels:z,selectAllText:W,siteGroups:D,showSiteGroups:H,tooltipDescription:j,chipClassName:G,imageWidth:U,searchOptions:R,tooltipProps:q})=>{const{formatMessage:Q}=(0,m.tz)(),Y=(r?.length||0)>0,[J,K]=(0,a.useState)(V),X=(0,a.useMemo)(()=>({...k,...R}),[R]);return a.createElement(A,{disabled:s,isFullWidth:I},d?a.createElement(v.A,{htmlFor:e,tooltip:j,tooltipProps:q},"string"==typeof d?a.createElement(m.sA,{id:d}):d):null,a.createElement(i.A.Popover,{isOpen:J,options:t,value:r,onOpenChange:e=>{_?.(e),K(e)},searchOptions:X,onCheckConfirm:$,onCheckSelectAllConfirm:B,onChangeSelectAll:P,isSelectAllVisible:F,onSave:l,searchPlaceholder:Q({id:"COMMON_SEARCH"}),saveButtonText:Q({id:"COMMON_ACTION_SAVE"}),cancelButtonText:Q({id:"COMMON_ACTION_CANCEL"}),className:(0,c.cx)(C(I),w),placement:S,isWindowed:T,maxSelections:W&&null===L?void 0:L,tooltipVisibility:N,truncateLabels:z,selectAllText:W?Q({id:W}):void 0,siteGroups:D,showSiteGroups:H,imageWidth:U,renderToggle:()=>a.createElement(i.A.Trigger,{options:t,chipClassName:(0,c.cx)(b,G),chipContainerClassName:f(!!p,Y,I),editSelectionsButtonStyle:y,maxLines:6,overflowBehavior:"truncate",editSelectionsButtonText:Y&&!M?a.createElement(n.A,{size:"medium",color:"inherit"},M,a.createElement(m.sA,{id:"COMMON_ACTION_EDIT"})," (",r?.length||0,")"):a.createElement(g.A,{height:O??u.b,alignItems:"center"},x&&"string"==typeof h?a.createElement(m.sA,{id:h}):h)})}),p?a.createElement(o.A,{isInvalid:!0,style:E,label:p}):null)}},836645(e,t,l){l.d(t,{A:()=>c});var a=l(469733),n=l(296540),r=l(79760),i=l(602021),o=l(662297);const s=[],c=({field:e,form:t,list:l,onChange:c,value:d,validationMessage:u,disabled:p,...m})=>{const h=(0,a.useSelector)(i.EL),g=(0,n.useCallback)(l=>{t&&e&&t.setFieldValue(e.name,l)},[t,e]),v=t&&e?(0,r.t$)(e.name,t.errors,t.touched,t.submitCount):void 0;return n.createElement(o.A,{value:d||e?.value||l||s,onChange:c||g,disabled:p||h,name:e?.name,invalid:u||v,...m})}},766624(e,t,l){l.d(t,{A:()=>s});var a=l(296540),n=l(271856),r=l(709690),i=l(284428),o=l(566723);const s=({description:e,isInteractive:t,portal:l=!0,cursorType:s,title:c,position:d,width:u,iconProps:p,disabled:m=!1})=>{const h=(0,i.Im)()||m,g=(0,i.q)();return a.createElement(n.A,{description:e,portal:l,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:s,title:c,position:d,width:u,disableHover:g},a.createElement(r.A,{isActive:!0,size:"original",opacity:h?o.xN:void 0,...p}))}},454195(e,t,l){l.d(t,{b:()=>a});const a=32},451449(e,t,l){l.d(t,{I:()=>a});const a=(0,l(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},284428(e,t,l){l.d(t,{Im:()=>s,iL:()=>c,mQ:()=>i,pv:()=>r,q:()=>o});var a=l(296540),n=l(451449);function r(){return(0,a.useContext)(n.I)}function i(){return r().fields}function o(){return r().tooltipPopovers}function s(){return r().tooltipIcons}function c(){return r().labels}},79760(e,t,l){l.d(t,{F6:()=>s,If:()=>i,LE:()=>c,t$:()=>o});var a=l(296540),n=l(951272),r=l(916537);const i=(e,t,l,a)=>{const r=(0,n.O6)(t,e);return!(!((0,n.O6)(l,e)||a>0)||!r)};function o(e,t,l,o){if(!i(e,t,l,o))return null;if(!e.length)return null;const s=(0,n.O6)(t,e);return s?(0,a.isValidElement)(s)||"string"==typeof s?s:a.createElement(r.sA,{...s.props}):null}const s=(e,t,l,a,n)=>!(!(a?.[e]||n>0)||!l?.[e]?.[t]),c=(e,t)=>{const l={...e},a=Object.keys(l),n=a.filter(e=>l[e]!==t[e]);return a.forEach(e=>{n.includes(e)||delete l[e],"object"==typeof n[e]&&(l[e]=c(n[e],t[e]))}),l}}}]);