"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[53857],{486061(e,t,n){n.d(t,{VT:()=>i,i9:()=>r,ng:()=>a,nt:()=>s});var o=n(241365);const r=n(409844).AH`
  font-size: ${o.Ay["font-size-m"]};
  font-weight: normal;
  border-radius: 0;
`,s=112,i=20,a=345},531984(e,t,n){n.d(t,{w:()=>i});var o=n(602086),r=n(977872),s=n(205521);const i=e=>{const t=(0,r.wA)();(0,o.useEffect)(()=>{t((0,s.SQ)(e))},[t,e])}},762542(e,t,n){n.d(t,{y:()=>r});var o=n(531984);const r=e=>(0,o.w)(e.formState.isDirty)},612389(e,t,n){n.d(t,{A:()=>m});var o=n(274934),r=n(814557),s=n(938984),i=n(247816),a=n(263705),l=n(309130),d=n(100978);const c=(0,i.A)(s.A)`
  line-height: 20px;
`,m=({icon:e,description:t,action:n,footer:s,background:i,...m})=>{const{themeName:u}=(0,a.u)();return(0,o.jsxs)(d.A,{flexGrow:1,borderRadius:l.YC,padding:l.kc,background:i||r.Ay[`desktop-color-neutral-01-${u}`],gap:l.kc,flexDirection:"column",...m,children:[(0,o.jsxs)(d.A,{flexGrow:1,gap:l.kc,children:[e,t?(0,o.jsx)(c,{size:"medium",children:t}):null,n?(0,o.jsx)(d.A,{marginLeft:"auto",children:(0,o.jsx)(c,{size:"medium",children:n})}):null]}),s]})}},753959(e,t,n){n.d(t,{A:()=>l});var o=n(274934),r=n(814557),s=n(853777),i=n(263705),a=n(612389);const l=({children:e,icon:t,background:n,...l})=>{const{themeName:d}=(0,i.u)();return(0,o.jsx)(a.A,{icon:t||(0,o.jsx)(s.A,{variant:"fill",size:"original",color:r.Ay[`desktop-color-ublue-06-${d}`]}),description:e,background:n,...l})}},535322(e,t,n){n.d(t,{A:()=>A,I:()=>o});var o,r=n(274934),s=n(814557),i=n(158885),a=n(247816),l=n(565527),d=n(309130),c=n(100978),m=n(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(o||(o={}));const u=(0,a.A)(c.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||s.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
  padding: ${({isButtonList:e,padding:t})=>t||(e?`0 ${d.Ln}`:d.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||d.Ln};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>s.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,p=(0,a.A)(i.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||s.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||s.Ay[t===l.S.DARK?`desktop-color-neutral-01-${l.S.DARK}`:`desktop-color-neutral-00-${l.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${d.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${d.Ln} ${d.Ln};
      }
    }
  }
`,A=({type:e,marginBottom:t,margin:n,padding:s,flex:i,width:a,nested:l,...d})=>"items"in d?(0,r.jsx)(p,{marginBottom:t,margin:n,padding:s,flex:i,nested:l,...d}):(0,r.jsx)(u,{nested:l,width:a,marginBottom:t,margin:n,padding:s,flex:i,isButtonList:e===o.BUTTON_LIST,...d,children:d.children})},597750(e,t,n){n.d(t,{A:()=>i});var o=n(274934),r=n(486061),s=n(100978);const i=({maxWidth:e,label:t,children:n,...i})=>(0,o.jsxs)(s.A,{flexDirection:"column",width:"100%",maxWidth:"settingsGridContent"===e?r.ng:e,...i,children:[t,n]})},164487(e,t,n){n.d(t,{A:()=>d});var o=n(274934),r=n(632622),s=n(184931),i=n(309130),a=n(304151),l=n(100978);const d=({tooltip:e,htmlFor:t,children:n,labelProps:d,wrapperProps:c,tooltipProps:m})=>{const u=(0,s.iL)();return(0,o.jsxs)(l.A,{alignItems:"center",gap:i.YC,...c,children:[(0,o.jsx)(r.A,{as:"label",htmlFor:t,color:"tertiary",...d,style:{opacity:u?i.xN:void 0,...d?.style},children:n}),e?(0,o.jsx)(a.A,{description:e,...m}):null]})}},89469(e,t,n){n.d(t,{A:()=>a});var o=n(274934),r=n(602086),s=n(309130),i=n(100978);const a=(0,r.forwardRef)((e,t)=>(0,o.jsx)(i.A,{ref:t,flexDirection:"column",gap:s.kc,width:"100%",...e}))},787481(e,t,n){n.d(t,{A:()=>a});var o=n(274934),r=n(833466),s=n(309130),i=n(100978);const a=e=>(0,o.jsx)(i.A,{paddingTop:s.YC,paddingBottom:s.YC,gap:s.Ln,rowGap:s.YC,flexWrap:"wrap",minHeight:r.b,alignItems:"center",...e})},199742(e,t,n){n.d(t,{A:()=>d});var o=n(274934),r=n(602086),s=n(558948),i=n(309130),a=n(100978),l=n(535322);const d=({actions:e})=>(0,o.jsx)(l.A,{marginBottom:"none",children:(0,o.jsx)(a.A,{flexDirection:"column",gap:i.kc,width:"100%",children:e.filter(Boolean).map((e,t,n)=>(0,o.jsxs)(r.Fragment,{children:[e,t<n.length-1?(0,o.jsx)(a.A,{width:"100%",flexDirection:"column",paddingTop:i.YC,paddingBottom:i.YC,children:(0,o.jsx)(s.A,{orientation:"horizontal"})}):null]},[t,e.toString()].join()))})})},963428(e,t,n){n.d(t,{A:()=>c});var o=n(274934),r=n(977872),s=n(602086),i=n(954702),a=n(669439),l=n(897166),d=n(100978);const c=(0,s.forwardRef)(({allowReadOnly:e,disabledReason:t,...n},s)=>{const c=(0,r.d4)(l.EL)&&!e;return(0,o.jsx)(d.A,{alignItems:"center",children:(0,o.jsx)(a.A,{description:t,placement:"left",children:(0,o.jsx)(i.A,{fontSize:"medium",type:"button",...n,isDisabled:c||n.isDisabled||!!t,ref:s})})})})},756782(e,t,n){n.d(t,{A:()=>f});var o=n(274934),r=n(814557),s=n(602086),i=n(938984),a=n(247816),l=n(309130),d=n(590979),c=n(147045),m=n(291508),u=n(304151),p=n(100978),A=n(535322),g=n(89469);const h=(0,a.A)(A.A,(0,m.A)("isOutlined"))`
  border: ${({theme:{themeName:e},isOutlined:t})=>`1px solid ${t?r.Ay[`desktop-color-ublue-06-${e}`]:"transparent"}`};
`,f=({children:e,title:t,tooltip:n,tooltipProps:r,[c.L]:a,titleAction:m,isOutlined:A})=>{const f=(e=>s.Children.toArray(e).length>0)(e);return(0,o.jsx)(h,{marginBottom:"none",...d.A.addDataTestId(a??""),isOutlined:A,children:(0,o.jsxs)(p.A,{flexDirection:"column",...f&&{gap:l.Ln},width:"100%",children:[t?(0,o.jsxs)(p.A,{alignItems:"center",gap:l.YC,justifyContent:"space-between",width:"100%",children:[(0,o.jsxs)(p.A,{gap:l.YC,alignItems:"center",children:[(0,o.jsx)(i.A,{variant:"heading-medium",children:t}),n?(0,o.jsx)(u.A,{description:n,portal:!0,...r}):null]}),m?(0,o.jsx)(p.A,{children:m}):null]}):null,f?(0,o.jsx)(g.A,{children:e}):null]})})}},480562(e,t,n){n.d(t,{i:()=>i});var o=n(274934),r=n(125799),s=n(767822);const i=e=>(0,o.jsx)(r.A,{description:e.option&&"tooltipDescription"in e.option?e.option.tooltipDescription:null,position:"left",portal:!0,children:(0,o.jsx)(s.q,{...e})})},341699(e,t,n){n.d(t,{HV:()=>s,pm:()=>i,vF:()=>r});var o=n(726831);const r=e=>`${o.A.fabricsOrchestration}?orchestrationId=${e?.template_id||""}&orgId=${e?.organization_id||""}`,s=e=>`${o.A.fabricsDeviceTemplates}/${e?.template_id||""}?orgId=${e?.organization_id||""}`,i=()=>`${o.A.fabricsOrchestration}`},594492(e,t,n){n.d(t,{A:()=>m});var o=n(274934),r=n(602086),s=n(599110),i=n(247816),a=n(309130),l=n(470070),d=n(291508);const c=(0,i.A)("footer",(0,d.A)("hasFormResetButton"))`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${a.S2} ${a.fS};
  gap: ${a.kc};
`,m=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:i,onFormSubmit:a,onFormReset:d,onFormCancel:m,className:u,submitButtonText:p,customButton:A,applyButton:g,applyButtonFirst:h,hideCancelButton:f,form:I})=>{const _=(0,r.useMemo)(()=>g||(0,o.jsx)(s.A,{name:"submit",variant:"primary",type:"submit",onClick:a,disabled:!t||n||i,form:I,children:(0,o.jsx)(l.sA,{id:p||"COMMON_ACTION_APPLY_CHANGES"})}),[g,I,t,n,i,a,p]);return(0,o.jsxs)(c,{className:u,hasFormResetButton:!!d,children:[h?_:A,f?null:(0,o.jsx)(s.A,{name:"cancel",variant:"default",type:"button",onClick:m,disabled:!e&&!t,children:(0,o.jsx)(l.sA,{id:"COMMON_ACTION_CANCEL"})}),d?(0,o.jsx)(s.A,{name:"reset",variant:"default",type:"button",onClick:d,disabled:!t,children:(0,o.jsx)(l.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})}):null,h?A:_]})}},115114(e,t,n){n.d(t,{A:()=>c});var o=n(274934),r=n(232932),s=n(247816),i=n(409844),a=n(594492);const l=(0,s.A)("div")`
  height: 66px;
`,d=i.AH`
  padding: 0px !important;
`,c=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:s,...i})=>e?(0,o.jsx)(r.A,{children:(0,o.jsx)(a.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:s,className:d,...i})}):(0,o.jsx)(l,{})},458875(e,t,n){n.r(t),n.d(t,{default:()=>s});var o=n(274934),r=n(156269);const s=({activeItem:e})=>(0,o.jsx)(r.A,{activeItem:e},e?._id)},420174(e,t,n){n.d(t,{H5:()=>i,ZS:()=>a});var o=n(274934),r=n(602086);const s=(0,r.createContext)(void 0),i=()=>{const e=(0,r.useContext)(s);return void 0===e?{sharedName:"",setSharedName:()=>{}}:e},a=({children:e})=>{const[t,n]=(0,r.useState)(""),i=(0,r.useMemo)(()=>({sharedName:t,setSharedName:n}),[t]);return(0,o.jsx)(s.Provider,{value:i,children:e})}},833466(e,t,n){n.d(t,{b:()=>o});const o=32},436417(e,t,n){n.d(t,{m:()=>a});var o=n(602086),r=n(42220),s=n(369289),i=n(721533);function a({schema:e,defaultValues:t,presets:n}){const a=(0,o.useMemo)(()=>n?(0,s.A)(n,e=>e.defaultValues):{},[n]),l=(0,o.useMemo)(()=>({...t,...a}),[a,t]),d=(0,r.mN)({resolver:(0,i.u)(e),shouldFocusError:!0,defaultValues:l,shouldUseNativeValidation:!1,mode:"onTouched"}),c=(0,o.useRef)(l);c.current=l;const m=(0,o.useCallback)((...e)=>{const[t,...n]=e;return d.reset(t?{...t,...a}:c.current,...n)},[a,d]);return{...d,reset:m,formState:{...d.formState,isDirty:!!Object.keys(d.formState.dirtyFields).length,isSubmitting:d.formState.isSubmitting},handleSubmit:(...e)=>d.handleSubmit(e[0],(t,...n)=>{const o=Object.keys(t)[0];if(o)try{const e=document.getElementsByName(o)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...n)})}}},877840(e,t,n){n.d(t,{A:()=>a});var o=n(274934),r=n(602086),s=n(184931),i=n(712642);const a=({isDisabled:e,isAdditive:t=!0,children:n})=>{const a=(0,s.pv)(),l=(0,r.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),d=(0,r.useMemo)(()=>({fields:t?l.fields||a.fields:l.fields,labels:t?l.labels||a.labels:l.labels,tooltipIcons:t?l.tooltipIcons||a.tooltipIcons:l.tooltipIcons,tooltipPopovers:t?l.tooltipPopovers||a.tooltipPopovers:l.tooltipPopovers}),[t,l.fields,l.labels,l.tooltipIcons,l.tooltipPopovers,a.fields,a.labels,a.tooltipIcons,a.tooltipPopovers]);return(0,o.jsx)(i.I.Provider,{value:d,children:n})}},260334(e,t,n){n.d(t,{L_:()=>c,MS:()=>d,rn:()=>l});var o=n(602086),r=n(949812),s=n(765282),i=n(470070);const a="{::}",l=(e,t)=>`${e}${a}${JSON.stringify(t??{})}`,d=(e,t)=>{if("string"!=typeof t)return;const[n,...o]=t.split(a);if(!n||!o.length)return t;let r={};try{r=Object.fromEntries(Object.entries(JSON.parse(o.join(a))).map(([t,n])=>[t,"string"==typeof n?d(e,n):n]))}catch{}return e.formatMessage({id:n},r)};function c(){const{formatMessage:e}=(0,i.tz)();return(0,o.useCallback)(t=>d({formatMessage:e},t),[e])}r.pJ((e,t)=>e.message?{message:e.message}:e.code===s.eq.too_small&&"string"===e.type?{message:l("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===s.eq.too_big&&"string"===e.type?{message:l("COMMON_MAX_CHARS",{name:l("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===s.eq.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:l("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===s.eq.too_small&&"array"===e.type?{message:l("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===s.eq.invalid_type&&"undefined"===e.received?{message:l("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===s.eq.invalid_type&&"number"===e.expected?{message:l("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},689941(e,t,n){n.d(t,{A:()=>u});var o=n(274934),r=n(693371),s=n(42220),i=n(480562),a=n(164487),l=n(597750),d=n(147045),c=n(260334),m=n(184931);const u=function({control:e,name:t,label:n,options:u,tooltip:p,tooltipProps:A,placeholder:g,renderOption:h,onChange:f,onAfterChange:I,searchable:_,searchableProps:v,portal:x,maxHeight:S,disableValidationMessage:b,isReadOnly:E,[d.L]:N}){const T=(0,m.mQ)(),C=(0,c.L_)();return(0,o.jsx)(s.xI,{control:e,name:t,render:({field:e,fieldState:d,formState:c})=>(0,o.jsxs)(l.A,{gap:2,children:[n?(0,o.jsx)(a.A,{htmlFor:t,tooltip:p,tooltipProps:{portal:!0,...A},children:n}):null,(0,o.jsx)(r.A,{variant:"secondary",width:"100%",renderOption:h??i.i,options:u,...e,readOnly:E,disabled:T,onChange:(t,n)=>{const o=f?f(n,{field:e,fieldState:d,formState:c}):e.onChange(n);return I?.(n),o},value:e.value??"",invalid:d.invalid&&!b?C((0,s.Jt)(c.errors,t)?.message)||!0:void 0,placeholder:g,searchable:_,searchableProps:v,portal:x,"data-testid":N,maxHeight:S})]})})}},16805(e,t,n){n.d(t,{A:()=>d});var o=n(274934),r=n(42220),s=n(843615),i=n(309130),a=n(260334),l=n(184931);const d=function({control:e,name:t,label:n,placeholder:d,tooltip:c,tooltipProps:m,contentAfter:u,arrowSize:p,min:A,max:g,step:h,value:f,iconBefore:I,onAfterChange:_,onChange:v}){const x=(0,l.mQ)(),S=(0,a.L_)();return(0,o.jsx)(r.xI,{control:e,name:t,render:({field:{ref:e,...a},fieldState:l,formState:b})=>(0,o.jsx)(s.A,{type:"number",variant:"secondary",width:"100%",...a,value:f??a.value??"",onChange:e=>{v?v(e,b):a.onChange(e.target.value?.length?+e.target.value:null),_?.(e)},disabled:x,invalid:l.invalid?S((0,r.Jt)(b.errors,t)?.message)||!0:void 0,labelTooltip:c,labelTooltipProps:{style:{opacity:x?i.xN:void 0,...m?.style},...m},label:n,placeholder:d,arrowSize:p,contentAfter:u,iconBefore:I,step:h,min:A,max:g})})}},482609(e,t,n){n.d(t,{A:()=>m});var o=n(274934),r=n(602086),s=n(42220),i=n(956976),a=n(309130),l=n(304151),d=n(100978),c=n(184931);const m=(0,r.forwardRef)(function({control:e,name:t,children:n,tooltip:r,tooltipProps:m,value:u,onCheck:p,...A},g){const h=(0,c.mQ)();return(0,o.jsx)(s.xI,{control:e,name:t,render:({field:e})=>(0,o.jsxs)(d.A,{gap:a.YC,alignItems:"center",ref:g,...A,children:[(0,o.jsx)(i.A,{id:e.name,onChange:({target:{checked:t}})=>{t&&(e.onChange(u),p?.())},checked:e.value===u,disabled:h,value:e.value,children:n}),r?(0,o.jsx)(l.A,{description:r,...m}):null]})})})},891326(e,t,n){n.d(t,{A:()=>m});var o=n(274934),r=n(42220),s=n(335220),i=n(409844),a=n(164487),l=n(260334),d=n(184931);const c=i.AH`
  flex-direction: column;
  > span {
    position: static;
    transform: none;
  }
`,m=function({control:e,name:t,label:n,placeholder:i,resize:m,rows:u,tooltip:p}){const A=(0,d.mQ)(),g=(0,l.L_)();return(0,o.jsx)(r.xI,{control:e,name:t,render:({field:e,fieldState:l,formState:d})=>(0,o.jsx)(s.A,{variant:"secondary",width:"100%",...e,disabled:A??e.disabled,value:e.value?.toString(),invalid:l.invalid?g((0,r.Jt)(d.errors,t)?.message)||!0:void 0,className:c,label:n?(0,o.jsx)(a.A,{htmlFor:t,tooltip:p,children:n}):void 0,placeholder:i,resize:m,rows:u})})}},635891(e,t,n){n.d(t,{A:()=>c});var o=n(274934),r=n(42220),s=n(843615),i=n(95032),a=n(309130),l=n(260334),d=n(184931);const c=function({control:e,name:t,label:n,placeholder:c,tooltip:m,tooltipProps:u,autoFocus:p,motif:A,onChange:g,onBlur:h,onAfterChange:f,onPaste:I,onKeyDown:_,passwordToggle:v,type:x,helperMessage:S,autoComplete:b,contentBefore:E,contentAfter:N,onFocus:T,value:C,invalid:O}){const j=(0,d.mQ)(),L=(0,d.Im)(),D=(0,d.q)(),M=(0,l.L_)();return(0,o.jsx)(r.xI,{control:e,name:t,render:({field:e,fieldState:l,formState:d})=>(0,o.jsx)(s.A,{type:x||(v?"password":"text"),variant:"secondary",width:"100%",autoFocus:p,...e,onChange:t=>{g?g(t,e,d):e.onChange(t),f?.(t)},onBlur:t=>{h?h(t,e,d):e.onBlur()},onFocus:T,onPaste:I,disabled:j,value:C??e.value?.toString(),invalid:O||(l.invalid?(0,o.jsxs)(i.A,{variant:"inherit",style:{overflowWrap:"break-word"},children:[M((0,r.Jt)(d.errors,t)?.message)||!0," "]}):void 0),label:n,placeholder:c,labelTooltip:m,labelTooltipProps:{style:{opacity:L?a.xN:void 0,pointerEvents:D?"none":void 0,...u?.style},...u},motif:A,passwordToggle:v,helperMessage:S,autoComplete:b,onKeyDown:_,contentBefore:E,contentAfter:N})})}},59564(e,t,n){n.d(t,{Z:()=>a});var o=n(241792),r=n(745454),s=n(640708),i=n(260334);const a=o.Yj({message:(0,i.rn)("COMMON_VALIDATION_VALID_IPV4_IPV6")}).refine(e=>(0,r.isValidIpv6)(e)||(0,r.isValidIpv4)(e),{message:(0,i.rn)("COMMON_VALIDATION_VALID_IPV4_IPV6")}).refine(e=>!(0,s.m0)(e),{message:(0,i.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_IPV4_MAPPED_IPV6_INVALID")}).refine(e=>!(0,s.aN)(e),{message:(0,i.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_MULTICAST_INVALID")})},149450(e,t,n){n.d(t,{B:()=>a,b:()=>i});var o=n(241792),r=n(745454),s=n(260334);const i=o.Yj({message:(0,s.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>!e||(0,r.isValidIpv4)(e),{message:(0,s.rn)("COMMON_VALIDATION_VALID_IPV4")}),a=o.Yj({message:(0,s.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>(0,r.isValidIpv4)(e),{message:(0,s.rn)("COMMON_VALIDATION_VALID_IPV4")})},199220(e,t,n){n.d(t,{Jh:()=>a,XK:()=>i,m9:()=>l});var o=n(241792),r=n(640708),s=n(260334);const i=o.Yj().ip({version:"v6",message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}).refine(e=>!e||!e.includes("%"),{message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),a=o.KC([o.Yj().ip({version:"v6",message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),o.eu("")]).optional().refine(e=>!e||!e.includes("%"),{message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),l=i.refine(e=>!(0,r.m0)(e),{message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_IPV4_MAPPED_IPV6_INVALID")}).refine(e=>!(0,r.aN)(e),{message:(0,s.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_MULTICAST_INVALID")})},509927(e,t,n){n.d(t,{V:()=>i});var o=n(602086),r=n(603606);const s=e=>{const t=(0,o.useRef)(e);return(0,o.useEffect)(()=>{t.current=e},[e]),(0,o.useCallback)((...e)=>t.current(...e),[])};function i(e,t){const n=(0,o.useRef)([]),[,i]=(0,o.useState)(0),[a,l]=(0,o.useState)(null);(0,o.useEffect)(()=>{const e=setInterval(()=>{n.current.length&&t?.estimatedDurationMs&&i(e=>e+1)},1e3);return()=>clearInterval(e)},[t?.estimatedDurationMs]);const d=t?.dedupe??!1,c=s(t?.onSuccess||(()=>{})),m=s(t?.onError||(()=>{})),u=(0,o.useCallback)((...o)=>{if(d&&n.current.length)return Promise.reject();const s=(async()=>e(...o))();return n.current.push({promise:s,startedAt:Date.now()}),i(e=>e+1),s.then(e=>(c?.(e),l(e),e)).catch(async e=>{if(t?.delayOnErrorMs&&await(0,r.u)(t.delayOnErrorMs),l(null),!m)throw e;m(e)}).finally(async()=>{n.current=n.current.filter(e=>e.promise!==s),i(e=>e+1)})},[e,d,m,c,t?.delayOnErrorMs]),p=n.current.at(-1),A=p&&t?.estimatedDurationMs?Math.min((Date.now()-p.startedAt)/t.estimatedDurationMs,.9):void 0;return{execute:u,isLoading:!!n.current.length,lastData:a,estimatedProgress:A}}},871808(e,t,n){n.d(t,{A:()=>i});var o=n(602086),r=n(977872),s=n(167933);const i=e=>(0,r.d4)((0,o.useMemo)(()=>(0,s.jN)(e),[e]))},292027(e,t,n){n.d(t,{A:()=>h});var o=n(274934),r=n(199742),s=n(977872),i=n(159469),a=n(464920),l=n(509927),d=n(963428),c=n(700444),m=n(470070);const u=({onResume:e,disabledReason:t})=>{const n=(0,s.wA)(),r=(0,l.V)(()=>e(),{onError:e=>{const t=(0,a.F)(e)?e:void 0;return n((0,c.ox)({icon:i.C.danger,message:"SETTINGS_POLICY_RESUME_FAILURE",values:{count:1},errorMessage:t?.msg,errorValues:t}))}});return(0,o.jsx)(d.A,{onPress:r.execute,isDisabled:r.isLoading,disabledReason:t,children:(0,o.jsx)(m.sA,{id:"COMMON_ACTION_RESUME"})})};var p=n(404056),A=n(146215);const g=({name:e,onPause:t,disabledReason:n})=>{const r=(0,s.wA)(),u=(0,l.V)(()=>t(),{onError:e=>{const t=(0,a.F)(e)?e:void 0;return r((0,c.ox)({icon:i.C.danger,message:"SETTINGS_POLICY_PAUSE_FAILURE",values:{count:1},errorMessage:t?.msg,errorValues:t}))}});return(0,o.jsx)(A.A,{trigger:(0,o.jsx)(d.A,{isDisabled:u.isLoading,disabledReason:n,children:(0,o.jsx)(m.sA,{id:"COMMON_ACTION_PAUSE"})}),confirmButtonVariant:"emphasis",title:(0,o.jsx)(m.sA,{id:"SETTINGS_SECURITY_PAUSE_POLICY_TITLE",values:{count:1}}),message:(0,o.jsx)(m.sA,{id:"SETTINGS_SECURITY_PAUSE_FIREWALL_POLICY_MESSAGE_SINGLE",values:{name:e}}),onConfirm:()=>u.execute()})},h=({enabled:e,name:t,onPause:n,pauseDisabledReason:s,onResume:i,resumeDisabledReason:a,onRemove:l,removeDisabledReason:d,removeAdditionalMessage:c})=>(0,o.jsx)(r.A,{actions:[e?(0,o.jsx)(g,{name:t,onPause:n,disabledReason:s}):(0,o.jsx)(u,{onResume:i,disabledReason:a}),(0,o.jsx)(p.A,{name:t,onRemove:l,disabledReason:d,additionalMessage:c})]})},404056(e,t,n){n.d(t,{A:()=>A});var o=n(274934),r=n(977872),s=n(159469),i=n(464920),a=n(509927),l=n(963428),d=n(146215),c=n(700444),m=n(470070),u=n(100978),p=n(309130);const A=({onRemove:e,name:t,disabledReason:n,additionalMessage:A})=>{const g=(0,r.wA)(),h=(0,a.V)(()=>e(),{onError:e=>{const t=(0,i.F)(e)?e:void 0;return g((0,c.ox)({icon:s.C.danger,message:"SETTINGS_POLICY_DELETE_FAILURE",values:{count:1},errorMessage:t?.msg,errorValues:t}))}});return(0,o.jsx)(d.A,{trigger:(0,o.jsx)(l.A,{variant:"destructive",disabledReason:n,children:(0,o.jsx)(m.sA,{id:"COMMON_ACTION_REMOVE"})}),title:(0,o.jsx)(m.sA,{id:"SETTINGS_SECURITY_REMOVE_POLICY_TITLE",values:{count:1}}),message:A?(0,o.jsxs)(u.A,{flexDirection:"column",gap:p.kc,children:[(0,o.jsx)(m.sA,{id:"SETTINGS_SECURITY_REMOVE_FIREWALL_POLICY_SINGLE_MESSAGE",values:{name:t}}),A]}):(0,o.jsx)(m.sA,{id:"SETTINGS_SECURITY_REMOVE_FIREWALL_POLICY_SINGLE_MESSAGE",values:{name:t}}),onConfirm:()=>h.execute()})}},603606(e,t,n){n.d(t,{u:()=>o});const o=e=>new Promise(t=>{setTimeout(t,e)})}}]);