"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[88439],{79786:(e,t,o)=>{o.d(t,{m:()=>i});var n=o(349785),r=o(296540),l=o(59116),a=o(870893);function i({schema:e,defaultValues:t,presets:o}){const i=(0,r.useMemo)(()=>o?(0,l.A)(o,e=>e.defaultValues):{},[o]),s=(0,r.useMemo)(()=>({...t,...i}),[i,t]),c=(0,n.mN)({resolver:(0,a.u)(e),shouldFocusError:!0,defaultValues:s,shouldUseNativeValidation:!1,mode:"onTouched"}),d=(0,r.useRef)(s);d.current=s;const m=(0,r.useCallback)((...e)=>{const[t,...o]=e;return c.reset(t?{...t,...i}:d.current,...o)},[i,c]);return{...c,reset:m,formState:{...c.formState,isDirty:!!Object.keys(c.formState.dirtyFields).length,isSubmitting:c.formState.isSubmitting},handleSubmit:(...e)=>c.handleSubmit(e[0],(t,...o)=>{const n=Object.keys(t)[0];if(n)try{const e=document.getElementsByName(n)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...o)})}}},143985:(e,t,o)=>{o.d(t,{B:()=>a});var n=o(407814),r=o(620637),l=o(263963);const a=n.Yj({message:(0,l.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>(0,r.isValidIpv4)(e),{message:(0,l.rn)("COMMON_VALIDATION_VALID_IPV4")})},188738:(e,t,o)=>{o.d(t,{A:()=>p});var n=o(436331),r=o(349785),l=o(296540),a=o(704025),i=o(317672),s=o(349665),c=o(199582),d=o(263963),m=o(284428);const p=function({control:e,name:t,label:o,options:p,tooltip:u,tooltipProps:f,placeholder:A,renderOption:v,onChange:g,onAfterChange:h,searchable:E,portal:I,maxHeight:b,disableValidationMessage:S,[c.L]:C}){const y=(0,m.mQ)(),N=(0,d.L_)();return l.createElement(r.xI,{control:e,name:t,render:({field:e,fieldState:c,formState:d})=>l.createElement(s.A,{gap:2},o?l.createElement(i.A,{htmlFor:t,tooltip:u,tooltipProps:{portal:!0,...f}},o):null,l.createElement(n.A,{variant:"secondary",width:"100%",renderOption:v??a.i,options:p,...e,disabled:y,onChange:(t,o)=>{const n=g?g(o,{field:e,fieldState:c,formState:d}):e.onChange(o);return h?.(o),n},value:e.value??"",invalid:c.invalid&&!S?N((0,r.Jt)(d.errors,t)?.message)||!0:void 0,placeholder:A,searchable:E,portal:I,"data-testid":C,maxHeight:b}))})}},242366:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(296540),r=o(566723),l=o(294303);const a=(0,n.forwardRef)((e,t)=>n.createElement(l.A,{ref:t,flexDirection:"column",gap:r.kc,width:"100%",...e}))},263130:(e,t,o)=>{o.d(t,{A:()=>d});var n=o(296540),r=o(927099),l=o(71479),a=o(998837),i=o(566723),s=o(294303);const c=(0,l.A)(r.A)`
  line-height: 20px;
`,d=({icon:e,description:t,action:o,footer:r,background:l,...d})=>{const m=(0,a.u)().motifPalette.neutral01;return n.createElement(s.A,{flexGrow:1,borderRadius:i.YC,padding:i.kc,background:l||m,gap:i.kc,flexDirection:"column",...d},n.createElement(s.A,{flexGrow:1,gap:i.kc},e,t?n.createElement(c,{size:"body"},t):null,o?n.createElement(s.A,{marginLeft:"auto"},n.createElement(c,{size:"body"},o)):null),r)}},284428:(e,t,o)=>{o.d(t,{Im:()=>s,iL:()=>c,mQ:()=>a,pv:()=>l,q:()=>i});var n=o(296540),r=o(451449);function l(){return(0,n.useContext)(r.I)}function a(){return l().fields}function i(){return l().tooltipPopovers}function s(){return l().tooltipIcons}function c(){return l().labels}},303303:(e,t,o)=>{o.d(t,{XK:()=>a,m9:()=>i});var n=o(407814),r=o(383653),l=o(263963);const a=n.Yj().ip({version:"v6",message:(0,l.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}).refine(e=>!(e&&e.includes("%")),{message:(0,l.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),i=a.refine(e=>!(0,r.m0)(e),{message:(0,l.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_IPV4_MAPPED_IPV6_INVALID")}).refine(e=>!(0,r.aN)(e),{message:(0,l.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_MULTICAST_INVALID")})},317672:(e,t,o)=>{o.d(t,{A:()=>c});var n=o(296540),r=o(498577),l=o(284428),a=o(566723),i=o(766624),s=o(294303);const c=({tooltip:e,htmlFor:t,children:o,labelProps:c,wrapperProps:d,tooltipProps:m})=>{const p=(0,l.iL)();return n.createElement(s.A,{alignItems:"center",gap:a.YC,...d},n.createElement(r.A,{htmlFor:t,color:"tertiary",...c,style:{opacity:p?a.xN:void 0,...c?.style}},o),e?n.createElement(i.A,{description:e,...m}):null)}},329109:(e,t,o)=>{o.d(t,{A:()=>d});var n=o(296540),r=o(691441),l=o(71479),a=o(132196),i=o(373229);const s=(0,l.A)("div")`
  height: 66px;
`,c=a.AH`
  padding: 0px !important;
`,d=({isDirty:e,onFormSubmit:t,onFormCancel:o,isInvalid:l,...a})=>e?n.createElement(r.A,null,n.createElement(i.A,{isDirty:e,onFormCancel:o,onFormSubmit:t,isInvalid:l,className:c,...a})):n.createElement(s,null)},349665:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(296540),r=o(705228),l=o(294303);const a=({maxWidth:e,...t})=>n.createElement(l.A,{flexDirection:"column",width:"100%",maxWidth:"settingsGridContent"===e?r.ng:e,...t})},373229:(e,t,o)=>{o.d(t,{A:()=>c});var n=o(296540),r=o(758649),l=o(71479),a=o(566723),i=o(699784);const s=(0,l.A)("footer",{shouldForwardProp:e=>"hasFormResetButton"!==e})`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${a.S2} ${a.fS};
  gap: ${a.kc};
`,c=({allowCancel:e,isDirty:t,isInvalid:o,isSubmitting:l,onFormSubmit:a,onFormReset:c,onFormCancel:d,className:m,submitButtonText:p,customButton:u,applyButton:f,applyButtonFirst:A,hideCancelButton:v,form:g})=>{const h=(0,n.useMemo)(()=>f||n.createElement(r.A,{name:"submit",variant:"primary",type:"submit",onClick:a,disabled:!t||o||l,form:g},n.createElement(i.sA,{id:p||"COMMON_ACTION_APPLY_CHANGES"})),[f,g,t,o,l,a,p]);return n.createElement(s,{className:m,hasFormResetButton:!!c},A?h:u,v?null:n.createElement(r.A,{name:"cancel",variant:"default",type:"button",onClick:d,disabled:!e&&!t},n.createElement(i.sA,{id:"COMMON_ACTION_CANCEL"})),c?n.createElement(r.A,{name:"reset",variant:"default",type:"button",onClick:c,disabled:!t},n.createElement(i.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULTS"})):null,A?u:h)}},451449:(e,t,o)=>{o.d(t,{I:()=>n});const n=(0,o(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},454195:(e,t,o)=>{o.d(t,{b:()=>n});const n=32},464265:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(469733),r=o(296540),l=o(792072);const a=e=>(0,n.useSelector)((0,r.useMemo)(()=>(0,l.jN)(e),[e]))},504716:(e,t,o)=>{o.r(t),o.d(t,{default:()=>l});var n=o(296540),r=o(465802);const l=({activeItem:e})=>n.createElement(r.A,{key:e?._id,activeItem:e})},553432:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(296540),r=o(454195),l=o(566723),a=o(294303);const i=e=>n.createElement(a.A,{paddingTop:l.YC,paddingBottom:l.YC,gap:l.Ln,rowGap:l.YC,flexWrap:"wrap",minHeight:r.b,alignItems:"center",...e})},610356:(e,t,o)=>{o.d(t,{A:()=>d});var n=o(349785),r=o(296540),l=o(54227),a=o(566723),i=o(766624),s=o(294303),c=o(284428);const d=(0,r.forwardRef)(function({control:e,name:t,children:o,tooltip:d,tooltipProps:m,value:p,onCheck:u,...f},A){const v=(0,c.mQ)();return r.createElement(n.xI,{control:e,name:t,render:({field:e})=>r.createElement(s.A,{gap:a.YC,alignItems:"center",ref:A,...f},r.createElement(l.A,{id:e.name,onChange:({target:{checked:t}})=>{t&&(e.onChange(p),u?.())},checked:e.value===p,disabled:v,value:e.value},o),d?r.createElement(i.A,{description:d,...m}):null)})})},641777:(e,t,o)=>{o.d(t,{A:()=>a});var n=o(296540),r=o(284428),l=o(451449);const a=({isDisabled:e,isAdditive:t=!0,children:o})=>{const a=(0,r.pv)(),i=(0,n.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),s=(0,n.useMemo)(()=>({fields:t?i.fields||a.fields:i.fields,labels:t?i.labels||a.labels:i.labels,tooltipIcons:t?i.tooltipIcons||a.tooltipIcons:i.tooltipIcons,tooltipPopovers:t?i.tooltipPopovers||a.tooltipPopovers:i.tooltipPopovers}),[t,i.fields,i.labels,i.tooltipIcons,i.tooltipPopovers,a.fields,a.labels,a.tooltipIcons,a.tooltipPopovers]);return n.createElement(l.I.Provider,{value:s},o)}},704025:(e,t,o)=>{o.d(t,{i:()=>a});var n=o(296540),r=o(271856),l=o(805837);const a=e=>n.createElement(r.A,{description:e.option&&"tooltipDescription"in e.option?e.option.tooltipDescription:null,position:"left",portal:!0},n.createElement(l.q,{...e}))},705228:(e,t,o)=>{o.d(t,{KA:()=>i,VT:()=>a,i9:()=>r,ng:()=>s,nt:()=>l});var n=o(888170);const r=o(132196).AH`
  font-size: ${n.Ay["font-size-m"]};
  font-weight: normal;
  border-radius: 0;
`,l=112,a=20,i=256,s=345},766624:(e,t,o)=>{o.d(t,{A:()=>s});var n=o(296540),r=o(271856),l=o(709690),a=o(284428),i=o(566723);const s=({description:e,isInteractive:t,portal:o=!0,cursorType:s,title:c,position:d,width:m,iconProps:p,disabled:u=!1})=>{const f=(0,a.Im)()||u,A=(0,a.q)();return n.createElement(r.A,{description:e,portal:o,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:s,title:c,position:d,width:m,disableHover:A},n.createElement(l.A,{isActive:!0,size:"original",opacity:f?i.xN:void 0,...p}))}},823084:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(296540),r=o(162420),l=o(998837),a=o(263130);const i=({children:e,icon:t,background:o,...i})=>{const{motifPalette:{uBlue06:s}}=(0,l.u)();return n.createElement(a.A,{icon:t||n.createElement(r.A,{variant:"fill",size:"original",color:s}),description:e,background:o,...i})}},853801:(e,t,o)=>{o.d(t,{y:()=>l});var n=o(349785),r=o(465543);const l=e=>{const t=(0,n.lN)(e);return(0,r.w)(t.isDirty)}},895424:(e,t,o)=>{o.d(t,{A:()=>d});var n=o(349785),r=o(296540),l=o(438628),a=o(705145),i=o(566723),s=o(263963),c=o(284428);const d=function({control:e,name:t,label:o,placeholder:d,tooltip:m,tooltipProps:p,autoFocus:u,motif:f,onChange:A,onBlur:v,onAfterChange:g,onPaste:h,onKeyDown:E,passwordToggle:I,type:b,helperMessage:S,autoComplete:C,contentBefore:y,contentAfter:N,onFocus:_,value:P,invalid:T}){const D=(0,c.mQ)(),w=(0,c.Im)(),k=(0,c.q)(),x=(0,s.L_)();return r.createElement(n.xI,{control:e,name:t,render:({field:e,fieldState:s,formState:c})=>r.createElement(l.A,{type:b||(I?"password":"text"),variant:"secondary",width:"100%",autoFocus:u,...e,onChange:t=>{A?A(t,e,c):e.onChange(t),g?.(t)},onBlur:t=>{v?v(t,e,c):e.onBlur()},onFocus:_,onPaste:h,disabled:D,value:P??e.value?.toString(),invalid:T||(s.invalid?r.createElement(a.A,{variant:"inherit",style:{overflowWrap:"break-word"}},x((0,n.Jt)(c.errors,t)?.message)||!0," "):void 0),label:o,placeholder:d,labelTooltip:m,labelTooltipProps:{style:{opacity:w?i.xN:void 0,pointerEvents:k?"none":void 0,...p?.style},...p},motif:f,passwordToggle:I,helperMessage:S,autoComplete:C,onKeyDown:E,contentBefore:y,contentAfter:N})})}}}]);