"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[62003],{79786:(e,t,n)=>{n.d(t,{m:()=>c});var r=n(349785),i=n(296540),a=n(59116),l=n(870893);function c({schema:e,defaultValues:t,presets:n}){const c=(0,i.useMemo)(()=>n?(0,a.A)(n,e=>e.defaultValues):{},[n]),s=(0,i.useMemo)(()=>({...t,...c}),[c,t]),o=(0,r.mN)({resolver:(0,l.u)(e),shouldFocusError:!0,defaultValues:s,shouldUseNativeValidation:!1,mode:"onTouched"}),E=(0,i.useRef)(s);E.current=s;const m=(0,i.useCallback)((...e)=>{const[t,...n]=e;return o.reset(t?{...t,...c}:E.current,...n)},[c,o]);return{...o,reset:m,formState:{...o.formState,isDirty:!!Object.keys(o.formState.dirtyFields).length,isSubmitting:o.formState.isSubmitting},handleSubmit:(...e)=>o.handleSubmit(e[0],(t,...n)=>{const r=Object.keys(t)[0];if(r)try{const e=document.getElementsByName(r)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...n)})}}},86571:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(296540),i=n(217439),a=n(699784);const l=({id:e,children:t,values:n})=>r.createElement(i.A,{color:"text-1",weight:"bold",size:"medium"},e?r.createElement(a.sA,{id:e,values:n}):null,t)},95069:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),i=n(566723),a=n(203157),l=n(294303);const c=({matchOpposite:e,enabled:t=!0,children:n})=>r.createElement(l.A,{alignItems:"center",gap:i.YC,maxWidth:"100%"},e?r.createElement(a.A,{enabled:t}):null,n)},212545:(e,t,n)=>{n.d(t,{QK:()=>_,_O:()=>m,f9:()=>A,qj:()=>E});var r=n(602034),i=n(625769),a=n(907011),l=n(749631),c=n(735447),s=n(153085),o=n(848576);const E=20,m=[24,8,0,1,6,3,4,5,13,11,7,17],_={0:"COMMON_DPI_CATEGORIES_INSTANT_MESSAGING",1:"COMMON_DPI_CATEGORIES_P2P",3:"COMMON_DPI_CATEGORIES_FILE_TRANSFER",4:"COMMON_DPI_CATEGORIES_STREAMING_MEDIA",5:"COMMON_DPI_CATEGORIES_MAIL_AND_COLLABORATION",6:"COMMON_DPI_CATEGORIES_VOICE_OVER_IP",7:"COMMON_DPI_CATEGORIES_DATABASE",8:"COMMON_DPI_CATEGORIES_GAMES",9:"COMMON_DPI_CATEGORIES_NETWORK_MANAGEMENT",10:"COMMON_DPI_CATEGORIES_REMOTE_ACCESS_TERMINALS",11:"COMMON_DPI_CATEGORIES_BYPASS_PROXIES_AND_TUNNELS",12:"COMMON_DPI_CATEGORIES_STOCK_MARKET",13:"COMMON_DPI_CATEGORIES_WEB",14:"COMMON_DPI_CATEGORIES_SECURITY_UPDATE",15:"COMMON_DPI_CATEGORIES_WEB_IM",17:"COMMON_DPI_CATEGORIES_BUSINESS",23:"COMMON_DPI_CATEGORIES_PRIVATE_PROTOCOL",24:"COMMON_DPI_CATEGORIES_SOCIAL_NETWORK",255:"COMMON_DPI_CATEGORIES_UNKNOWN"},A=(e,t=!1)=>[{label:"COMMON_APP",value:o.Kl.APP,image:l.A},{label:"COMMON_APP_GROUP",value:o.Kl.APP_CATEGORY,image:s.A},{label:"COMMON_DOMAIN_NAME",value:o.Kl.DOMAIN,image:a.A},{label:"COMMON_IP_ADDRESS",value:o.Kl.IP,image:i.A},...e?[{label:"COMMON_REGION",value:o.Kl.REGION,image:c.A}]:[],{label:"COMMON_INTERNET",value:o.Kl.INTERNET,image:a.A},...t?[]:[{label:"COMMON_LOCAL_NETWORK",value:o.Kl.LOCAL_NETWORK,image:r.A}]]},281851:(e,t,n)=>{var r;n.d(t,{P:()=>r}),function(e){e.NETWORK_CONFIG="network_config",e.SIMPLE_APP_BLOCK="simple_app_block",e.CUSTOM_FIREWALL_RULE="custom_firewall_rule",e.NAT_RULE="nat_rule",e.CONSOLE_SETTING_DIRECT_CONNECTION="console_setting_direct_connection",e.WAN_CONFIG="wan_config",e.PORT_FORWARD="port_forward",e.OBJECT_FIREWALL_RULE="object_firewall_rule",e.OBJECT_ACL_RULE="object_acl_rule",e.OBJECT_QOS_RULE="object_qos_rule",e.OBJECT_PBR="object_pbr"}(r||(r={}))},329109:(e,t,n)=>{n.d(t,{A:()=>E});var r=n(296540),i=n(691441),a=n(71479),l=n(132196),c=n(373229);const s=(0,a.A)("div")`
  height: 66px;
`,o=l.AH`
  padding: 0px !important;
`,E=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:a,...l})=>e?r.createElement(i.A,null,r.createElement(c.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:a,className:o,...l})):r.createElement(s,null)},373229:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),i=n(758649),a=n(71479),l=n(566723),c=n(699784);const s=(0,a.A)("footer",{shouldForwardProp:e=>"hasFormResetButton"!==e})`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${l.S2} ${l.fS};
  gap: ${l.kc};
`,o=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:a,onFormSubmit:l,onFormReset:o,onFormCancel:E,className:m,submitButtonText:_,customButton:A,applyButton:O,applyButtonFirst:d,hideCancelButton:u,form:N})=>{const p=(0,r.useMemo)(()=>O||r.createElement(i.A,{name:"submit",variant:"primary",type:"submit",onClick:l,disabled:!t||n||a,form:N},r.createElement(c.sA,{id:_||"COMMON_ACTION_APPLY_CHANGES"})),[O,N,t,n,a,l,_]);return r.createElement(s,{className:m,hasFormResetButton:!!o},d?p:A,u?null:r.createElement(i.A,{name:"cancel",variant:"default",type:"button",onClick:E,disabled:!e&&!t},r.createElement(c.sA,{id:"COMMON_ACTION_CANCEL"})),o?r.createElement(i.A,{name:"reset",variant:"default",type:"button",onClick:o,disabled:!t},r.createElement(c.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULTS"})):null,d?A:p)}},384960:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(296540),i=n(705145),a=n(566723),l=n(958979),c=n(294303);const s=({region:e})=>{const t=(0,r.useMemo)(()=>l.Ay.find(t=>t.value===e),[e]);return t?r.createElement(c.A,{alignItems:"center",gap:a.kc},r.createElement(c.A,{width:16,height:16,padding:"2px"},t.image()),r.createElement(i.A,{variant:"inherit",isTruncated:!0},t.label)):null}},454195:(e,t,n)=>{n.d(t,{b:()=>r});const r=32},455155:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(469733),i=n(296540),a=n(130851),l=n(765562);const c={};const s=(0,n(71479).A)("img",{shouldForwardProp:e=>"dimension"!==e})`
  ${({dimension:e=22})=>`\n    height: ${e}px;\n    width: ${e}px;\n  `}
`,o=(0,i.memo)(({iconFileName:e,dimension:t,style:n={}})=>{const o=(0,r.useSelector)(a.p);return i.createElement(s,{src:c[e]||encodeURI(`${l.A.dpiPath}${e}`),dimension:t,onLoad:({target:t})=>{c[e]=t.src},onError:({currentTarget:e})=>{e.src=`${o}/dpiFallback.svg`},style:n})})},465543:(e,t,n)=>{n.d(t,{w:()=>l});var r=n(469733),i=n(296540),a=n(845030);const l=e=>{const t=(0,r.useDispatch)();(0,i.useEffect)(()=>{t((0,a.SQ)(e))},[t,e])}},564328:(e,t,n)=>{n.d(t,{Fw:()=>a,Ql:()=>r,pN:()=>i,vB:()=>l});const r="createSimpleAppBlock",i="mac",a="appId",l="simpleAppBlockId"},566341:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),i=n(566723),a=n(203157),l=n(294303);const c=({content:e})=>r.createElement(l.A,{gap:i.YC,alignItems:"center"},r.createElement(a.A,{enabled:!0})," ",e)},701041:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),i=n(39705),a=n(384960),l=n(699784);const c=({regions:e})=>r.createElement(i.A,{items:e,getItemKey:e=>e,renderListItem:e=>r.createElement(a.A,{region:e}),renderMultipleItemsSummary:e=>r.createElement(r.Fragment,null,e.length," ",r.createElement(l.sA,{id:"COMMON_REGIONS"}))})},722900:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(469733),i=n(296540),a=n(115829),l=n(424135),c=n(39705),s=n(95069),o=n(819127),E=n(699784),m=n(711748),_=n(16914),A=n(406306),O=n(348466);const d=({ips:e=[],ip_group_id:t,matching_target_type:n,match_opposite_ips:d})=>{const u=(0,r.useSelector)(m.O9);if(n===_.qv.OBJECT){const e=u.find(e=>e._id===t);return e?i.createElement(s.A,{matchOpposite:d},i.createElement(l.A,{tooltip:i.createElement(o.A,{items:e.group_members,getItemKey:e=>e,renderItem:e=>e,showListMarkers:!0,cursorType:"pointer"})},i.createElement(a.A,{variant:"inherit"},e.name))):i.createElement(E.sA,{id:"COMMON_FALLBACK"})}return i.createElement(s.A,{matchOpposite:d},i.createElement(c.A,{items:e,renderListItem:e=>e,getItemKey:e=>e,cursorType:"pointer",renderMultipleItemsSummary:e=>{const t=e.some(e=>e.includes(O.Ed));return i.createElement(E.sA,{id:t?"SETTINGS_SUBNET_COUNT":"SETTINGS_IP_COUNT",values:{count:(0,A.TR)(e)}})}}))}},789367:(e,t,n)=>{var r;n.d(t,{K:()=>r}),function(e){e.ALL="all",e.ACL_RULES="acl-rules",e.DNS_RECORDS="dns-records",e.FIREWALL="firewall",e.NAT_RULES="nat-rules",e.POLICY_BASED_ROUTES="policy-based-routes",e.PORT_FORWARDING="port-forwarding",e.QOS_RULES="qos-rules",e.STATIC_ROUTES="static-routes"}(r||(r={}))},793729:(e,t,n)=>{n.d(t,{r:()=>i});var r=n(281851);const i=[r.P.OBJECT_FIREWALL_RULE,r.P.OBJECT_ACL_RULE,r.P.OBJECT_QOS_RULE]},821580:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),i=n(454195),a=n(566723),l=n(294303);const c=e=>r.createElement(l.A,{paddingTop:a.YC,paddingBottom:a.YC,gap:a.Ln,rowGap:a.YC,flexWrap:"wrap",minHeight:i.b,alignItems:"center",...e})},853801:(e,t,n)=>{n.d(t,{y:()=>a});var r=n(349785),i=n(465543);const a=e=>{const t=(0,r.lN)(e);return(0,i.w)(t.isDirty)}},862003:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ee});var r=n(296540),i=n(348466),a=n(689965),l=n(86571),c=n(963070),s=n(699784),o=n(566341);const E="field",m=(e,t)=>[{id:E,label:r.createElement(s.sA,{id:e}),renderCell:e=>t?r.createElement(o.A,{content:e[E]}):e[E]}],_=({list:e=[],columnName:t,showMatchOppositeIcon:n})=>{const i=e.map(e=>({field:e}));return r.createElement(c.A,{idField:E,items:i,columns:m(t,n),disableColumnFilters:!0,disableHover:!0})},A=(0,r.memo)(({list:e,columnName:t,title:n,showMatchOppositeIcon:i})=>e?.length>1?r.createElement(a.A,{type:a.I.ACCORDION,items:[{id:n,label:r.createElement(l.A,{id:n}),renderContent:()=>r.createElement(_,{list:e,columnName:t,showMatchOppositeIcon:i}),openByDefault:!0}]}):null);var O=n(469733),d=n(705145),u=n(281851),N=n(189643),p=n(714610),T=n(321235),I=n(920497),C=n(885003),S=n(793729),M=n(791403),R=n(758649),g=n(928085),h=n(398300),P=n(196010),L=n(294303),v=n(845030),y=n(959341);const G=({policy:e})=>{const t=(0,O.useDispatch)(),n=(0,g.A)(y.wE);return r.createElement(L.A,null,e.origin_id?r.createElement(R.A,{variant:"inline",onClick:()=>{t((0,v.XP)({type:h.H.WAN,id:e.origin_id}))},size:"medium"},r.createElement(s.sA,{id:"SETTINGS_OPEN_IN_INTERNET_SETTINGS"})):r.createElement(R.A,{variant:"inline",component:P.A,to:n,size:"medium"},r.createElement(s.sA,{id:"SETTINGS_OPEN_IN_INTERNET_SETTINGS"})))};var D=n(564328);const f=({policy:e})=>{const t=(0,g.A)(`${y.bB}/${y.Uy.CYBERSECURE}?${D.vB}=${e.origin_id}`);return r.createElement(L.A,null,r.createElement(R.A,{variant:"inline",component:P.A,to:t,size:"medium"},r.createElement(s.sA,{id:"SETTINGS_SECURITY_OPEN_SIMPLE_APP_BLOCKING"})))};var b=n(363370),F=n(789367);const U=({policy:e})=>{const t=(0,O.useDispatch)();return e.origin_id?r.createElement(L.A,null,r.createElement(R.A,{variant:"inline",onClick:()=>{t((0,v.XP)({type:h.H.PORT_FORWARDING_POLICY,id:e.origin_id}))},size:"medium"},r.createElement(s.sA,{id:"SETTINGS_OPEN_PORT_FORWARDING_POLICY"}))):r.createElement(L.A,null,r.createElement(b.A,{to:`${y.E0}?${y.XU}=${F.K.PORT_FORWARDING}`},r.createElement(s.sA,{id:"SETTINGS_OPEN_PORT_FORWARDING_SETTINGS"})))},w=({policy:e})=>{const t=(0,g.A)(e.origin_id?`${y.Cs}/${e.origin_id}`:y.Cs);return r.createElement(L.A,null,r.createElement(R.A,{variant:"inline",component:P.A,to:t,size:"medium"},r.createElement(s.sA,{id:e.origin_id?"SETTINGS_OPEN_NETWORK_SETTINGS":"SETTINGS_CONFIGURE_IN_NETWORK_SETTINGS"})))},B=({policy:e})=>{const t=(0,O.useDispatch)();return r.createElement(L.A,null,r.createElement(R.A,{variant:"inline",size:"medium",onClick:()=>{t((0,v.XP)({type:h.H.NAT_POLICY,id:e.origin_id}))}},r.createElement(s.sA,{id:"SETTINGS_SECURITY_OPEN_NAT_POLICY"})))},K=({policy:e})=>{const t=(0,O.useDispatch)();return r.createElement(L.A,null,r.createElement(R.A,{variant:"inline",size:"medium",onClick:()=>{t((0,v.XP)({type:h.H.CUSTOM_FIREWALL_POLICY,id:e.origin_id}))}},r.createElement(s.sA,{id:"SETTINGS_SECURITY_CONFIGURE_FIREWALL_POLICY"})))},Y=()=>{const e=(0,g.A)(y.WT);return r.createElement(L.A,null,r.createElement(R.A,{variant:"inline",size:"medium",component:P.A,to:e},r.createElement(s.sA,{id:"SETTINGS_SECURITY_OPEN_CONSOLE_SETTINGS"})))},k=({policy:e})=>{switch(e.origin_type){case u.P.NETWORK_CONFIG:return r.createElement(w,{policy:e});case u.P.SIMPLE_APP_BLOCK:return r.createElement(f,{policy:e});case u.P.CUSTOM_FIREWALL_RULE:return r.createElement(K,{policy:e});case u.P.NAT_RULE:return r.createElement(B,{policy:e});case u.P.CONSOLE_SETTING_DIRECT_CONNECTION:return r.createElement(Y,null);case u.P.WAN_CONFIG:return r.createElement(G,{policy:e});case u.P.PORT_FORWARD:return r.createElement(U,{policy:e});default:return e.origin_type&&S.r.includes(e.origin_type)?r.createElement(M.A,{policy:e}):null}};var W=n(271856),$=n(515289),x=n(902146),z=n(16914),H=n(856064);const V=(e,t)=>e&&e!==z.rl.ANY?1===t.split(i.KE).length?t:t.split(i.KE).length>1?H.s9:H.Cd:H.u4,Q=(e,t)=>{const n=t?r.createElement(s.sA,{id:x.F[t]}):e;return r.createElement(W.A,{description:n,portal:!0},r.createElement($.A,{label:n,maxWidth:H.ym,style:H.cq}))},j=({activeItem:e})=>{const t=(0,O.useSelector)(p.Cw),{action:n,ip_version:i,index:l,protocol:c,match_ip_sec:E,match_ip_sec_type:m,connection_state_type:_,connection_states:A,source:{zone_id:S,port_matching_type:M,port:R="",match_opposite_ips:g,match_opposite_ports:h},source:P,destination:{zone_id:L,port_matching_type:v,port:y="",match_opposite_ips:G,match_opposite_ports:D},destination:f}=e,b=t.find(e=>e._id===S),F=b?Q(b.name,b.zone_key):H.Cd,U=t.find(e=>e._id===L),w=U?Q(U.name,U.zone_key):H.Cd,B=V(M,R),K=h?r.createElement(o.A,{content:B}):B,Y=V(v,y),W=D?r.createElement(o.A,{content:Y}):Y,$=((e,t=[])=>{if(e===z.kU.ALL)return["COMMON_ALL"];if(e===z.kU.RESPOND_ONLY)return["SETTINGS_SECURITY_RETURN_TRAFFIC"];if(e===z.kU.CUSTOM){const e=[];return t.includes(z.KN.ESTABLISHED)&&e.push("SETTINGS_SECURITY_ESTABLISHED"),t.includes(z.KN.INVALID)&&e.push("SETTINGS_SECURITY_INVALID"),t.includes(z.KN.NEW)&&e.push("COMMON_NEW"),t.includes(z.KN.RELATED)&&e.push("SETTINGS_SECURITY_RELATED"),e}return[]})(_,A),x=$.length?$.map((e,t)=>r.createElement(r.Fragment,{key:e},t>0?", ":null,r.createElement(s.sA,{id:e}))):r.createElement(s.sA,{id:"COMMON_FALLBACK"});return r.createElement(a.A,null,r.createElement(T.A,{id:"COMMON_SOURCE_ZONE"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},F)),r.createElement(T.A,{id:"COMMON_SOURCE"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},r.createElement(I.A,{source:P,sourceMatchOppositeIps:g}))),r.createElement(T.A,{id:"SETTINGS_SECURITY_SOURCE_PORT"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},K)),r.createElement(T.A,{id:"COMMON_ACTION"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},r.createElement(s.sA,{id:H.Zn[n]}))),r.createElement(T.A,{id:"COMMON_DESTINATION_ZONE"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},w)),r.createElement(T.A,{id:"COMMON_DESTINATION"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},r.createElement(C.A,{destination:f,destinationMatchOppositeIps:G}))),r.createElement(T.A,{id:"SETTINGS_SECURITY_DESTINATION_PORT"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},W)),r.createElement(T.A,{id:"COMMON_IP_VERSION"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},r.createElement(s.sA,{id:H.jU[i]}))),r.createElement(T.A,{id:"COMMON_PROTOCOL"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},r.createElement(s.sA,{id:(0,N.Wi)(c)}))),r.createElement(T.A,{id:"COMMON_CONNECTION_STATE"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},x)),E?r.createElement(T.A,{id:"COMMON_MATCH_IPSEC"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},(J=m,(j=E)&&J===z.kz.MATCH_IPSEC?r.createElement(s.sA,{id:"SETTINGS_SECURITY_ENCRYPTED"}):j&&J===z.kz.MATCH_NON_IPSEC?r.createElement(s.sA,{id:"SETTINGS_SECURITY_NOT_ENCRYPTED"}):H.Cd))):null,r.createElement(T.A,{id:"COMMON_ID"},r.createElement(d.A,{variant:"inherit",isTruncated:!0},l)),e.origin_type&&![u.P.NETWORK_CONFIG,u.P.PORT_FORWARD].includes(e.origin_type)?r.createElement(k,{policy:e}):null);var j,J};var J=n(858931),X=n(853801),q=n(897502),Z=n(79786),ee=n(821580),te=n(691189);const ne="firewall-policies/predefined",re=`/v2/api/site/{site}/${ne}`;var ie=n(414783),ae=n(329109),le=n(407814);const ce=le.Ik({logging:le.zM().default(!1)}),se="pred-firewall-policy-form",oe=({activeItem:e})=>{const t=(0,g.A)(`${y.bB}/${y.Uy.TRAFFIC_LOGGING}`),n=(0,O.useDispatch)(),i=(0,Z.m)({defaultValues:{logging:e.logging},schema:ce});(0,X.y)(i),(0,r.useEffect)(()=>{i.reset({logging:e.logging})},[e._id,e.logging]);const l=i.handleSubmit(async({logging:t})=>{await n(((e,t={},n={})=>(0,te.vL)(ne,e.id,`${re}/${e.id}`,e,t,n))({id:e.origin_id,logging:t})),n((0,ie.fn)())});return r.createElement("form",{onSubmit:l,id:se},r.createElement(a.A,null,r.createElement(ee.A,null,r.createElement(q.A,{control:i.control,name:"logging",tooltipProps:{portal:!0,isInteractive:!0},tooltip:r.createElement(s.sA,{id:"SETTINGS_SECURITY_SYSLOG_LOGGING_DESCRIPTION",values:{link:r.createElement(P.A,{to:t,style:{whiteSpace:"nowrap"}},r.createElement(s.sA,{id:"SETTINGS_SECURITY_SYSLOG_LOGGING_DESCRIPTION_LINK_TEXT"}))}})},r.createElement(s.sA,{id:"COMMON_SYSLOG_LOGGING"})))),r.createElement(ae.A,{onFormCancel:()=>i.reset(),isDirty:i.formState.isDirty,hideCancelButton:!i.formState.isDirty,form:se,isSubmitting:i.formState.isSubmitting,applyButton:r.createElement(J.A,{type:"submit",variant:"primary",form:se,loader:i.formState.isSubmitting?"loading":void 0},r.createElement(s.sA,{id:"COMMON_ACTION_APPLY_CHANGES"}))}))},Ee=({activeItem:{source:{ips:e=[],port:t="",match_opposite_ips:n,match_opposite_ports:a},destination:{ips:l=[],port:c="",match_opposite_ips:s,match_opposite_ports:o},origin_id:E,origin_type:m},activeItem:_})=>r.createElement(r.Fragment,null,r.createElement(j,{activeItem:_}),r.createElement(A,{list:e,columnName:"SETTINGS_IP_ADDRESS_SUBNET",title:"COMMON_SOURCE",showMatchOppositeIcon:n}),r.createElement(A,{list:t.split(i.KE),columnName:"COMMON_PORT",title:"SETTINGS_SECURITY_SOURCE_PORTS",showMatchOppositeIcon:a}),r.createElement(A,{list:l,columnName:"SETTINGS_IP_ADDRESS_SUBNET",title:"COMMON_DESTINATION",showMatchOppositeIcon:s}),r.createElement(A,{list:c.split(i.KE),columnName:"COMMON_PORT",title:"SETTINGS_SECURITY_DESTINATION_PORTS",showMatchOppositeIcon:o}),E&&void 0===m?r.createElement(oe,{activeItem:_}):null)},885003:(e,t,n)=>{n.d(t,{A:()=>T});var r=n(296540),i=n(39705),a=n(699784),l=n(16914),c=n(701041),s=n(713590),o=n(722900),E=n(705145),m=n(601242),_=n(566723),A=n(455155),O=n(802123),d=n(294303);const u=({app_ids:e})=>{if(!e?.length)return r.createElement(a.sA,{id:"COMMON_FALLBACK"});if(1===e.length){const{name:t,iconFileName:n}=(0,m.HH)(e[0]);return t&&n?r.createElement(d.A,{alignItems:"center",gap:_.YC,maxWidth:"100%",overflow:"hidden"},r.createElement(A.A,{iconFileName:n}),r.createElement(E.A,{color:"inherit",size:"inherit",isTruncated:!0,style:{flex:1}},t)):r.createElement(a.sA,{id:"COMMON_FALLBACK"})}return r.createElement(O.A,{enabled:!0,neverShowListMarkers:!0,tooltipItems:e.map(e=>{const{name:t,iconFileName:n}=(0,m.HH)(e);return t&&n?r.createElement(d.A,{key:e,width:"100%",maxWidth:"100%",alignItems:"center",gap:_.YC},r.createElement(A.A,{iconFileName:n}),r.createElement(E.A,{color:"inherit",size:"inherit",isTruncated:!0,style:{flex:1}},t)):r.createElement(a.sA,{id:"COMMON_FALLBACK"})}),label:r.createElement(r.Fragment,null,e.length," ",r.createElement(a.sA,{id:"COMMON_APPS"}))})};var N=n(212545);const p=({app_category_ids:e})=>e?.length?1===e.length?r.createElement(E.A,{variant:"inherit",isTruncated:!0},r.createElement(a.sA,{id:N.QK[e[0]]})):r.createElement(O.A,{enabled:!0,neverShowListMarkers:!0,tooltipItems:e.map(e=>r.createElement(a.sA,{id:N.QK[e]})),label:r.createElement(r.Fragment,null,e.length," ",r.createElement(a.sA,{id:"COMMON_CATEGORIES"}))}):r.createElement(a.sA,{id:"COMMON_FALLBACK"}),T=({destination:e,destinationMatchOppositeIps:t})=>{switch(e.matching_target){case l.$P.ANY:return r.createElement(a.sA,{id:"COMMON_ANY"});case l.$P.NETWORK:return r.createElement(s.A,{network_ids:e.network_ids||[]});case l.$P.IP:return r.createElement(o.A,{ip_group_id:e.ip_group_id,ips:e.ips||[],matching_target_type:e.matching_target_type,match_opposite_ips:t});case l.$P.APP:return r.createElement(u,{app_ids:e.app_ids||[]});case l.$P.APP_CATEGORY:return r.createElement(p,{app_category_ids:e.app_category_ids||[]});case l.$P.WEB:return r.createElement(i.A,{items:e.web_domains||[],getItemKey:e=>e,renderListItem:e=>e,renderMultipleItemsSummary:e=>r.createElement(a.sA,{id:"COMMON_DOMAIN_COUNT",values:{count:e.length}})});case l.$P.REGION:return r.createElement(c.A,{regions:e.regions});default:return r.createElement(a.sA,{id:"COMMON_FALLBACK"})}}},897502:(e,t,n)=>{n.d(t,{A:()=>E});var r=n(349785),i=n(296540),a=n(314714),l=n(566723),c=n(766624),s=n(294303),o=n(284428);const E=function({control:e,name:t,children:n,tooltip:E,tooltipProps:m,onToggle:_,renderCheckbox:A,inputClassName:O}){const d=(0,o.mQ)();return i.createElement(r.xI,{control:e,name:t,render:({field:e})=>{const t=i.createElement(a.A,{id:e.name,onChange:({target:{checked:t}})=>{e.onChange(t),_?.(t)},checked:!!e.value,disabled:d,inputClassName:O},n);return i.createElement(s.A,{gap:l.YC,alignItems:"center"},A?A(t,e):t,E?i.createElement(c.A,{description:E,...m}):null)}})}},920497:(e,t,n)=>{n.d(t,{A:()=>A});var r=n(296540),i=n(699784),a=n(346070),l=n(16914),c=n(713590),s=n(524803),o=n(802123);const E=({macs:e})=>e.length?e.length>1?r.createElement(o.A,{enabled:!0,label:r.createElement(i.sA,{id:"SETTINGS_MAC_COUNT",values:{count:e.length}}),tooltipItems:e}):(0,s.Po)(e[0],!0,"pointer"):r.createElement(i.sA,{id:"COMMON_FALLBACK"});var m=n(722900),_=n(527927);const A=({source:e,sourceMatchOppositeIps:t})=>{if(Array.isArray(e)&&e.length){switch(e[0].type){case a.Q.CLIENT:return r.createElement(_.A,{client_macs:e.map(e=>e.client_mac)||[]});case a.Q.NETWORK:return r.createElement(c.A,{network_ids:e.map(e=>e.network_id)||[]});default:return null}}if(n=e,Array.isArray(n)||!("matching_target"in n))return null;var n;switch(e.matching_target){case l.M0.ANY:return r.createElement(i.sA,{id:"COMMON_ANY"});case l.M0.NETWORK:return r.createElement(c.A,{network_ids:e.network_ids||[]});case l.M0.CLIENT:return r.createElement(_.A,{client_macs:e.client_macs||[]});case l.M0.IP:return r.createElement(m.A,{ip_group_id:e.ip_group_id,ips:e.ips,matching_target_type:e.matching_target_type,match_opposite_ips:t});case l.M0.MAC:return r.createElement(E,{macs:e.macs});default:return r.createElement(i.sA,{id:"COMMON_FALLBACK"})}}},958979:(e,t,n)=>{n.d(t,{Ay:()=>s,PN:()=>l,xn:()=>c});var r=n(296540),i=n(323030),a=n(646255);const l=15,c=150,s=a.A.map(({countryCode:e,countryName:t})=>({image:()=>r.createElement(i.A,{countryCode:e,width:"auto",height:"100%",style:{borderRadius:"50%",objectFit:"cover",aspectRatio:"1 / 1"}}),label:t,value:e}))}}]);