"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[50457],{275463(e,t,n){n.d(t,{L:()=>i});var a=n(801081),l=n(25553),r=n(87485),_=n(896291);const o=(0,l.uh)((0,_.N)()),i=(0,a.Mz)(o,r.i6)},226776(e,t,n){n.d(t,{y:()=>r});var a=n(691189);const l=`${n(771805).w}/hotspot/info`,r=(e={},t={})=>(0,a.Kd)("hotspotInfo",l,"hotspotInfoId",e,t)},668478(e,t,n){n.d(t,{_:()=>s});var a=n(801081),l=n(25553),r=n(87485),_=n(226776);const o=(0,l.uh)((0,_.y)()),i=(0,a.Mz)(o,r.i6),s=(0,a.Mz)(i,({show_hotspot_manager:e=!1})=>e)},983105(e,t,n){n.d(t,{J:()=>i});var a=n(801081),l=n(25553),r=n(87485),_=n(314385);const o=(0,l.uh)((0,_.T)()),i=(0,a.Mz)(o,r.kh)},230741(e,t,n){n.d(t,{G:()=>o});var a=n(614476),l=n(546391),r=n(263963),_=n(379040);const o=a.Ay.string().min(1).max(_.IF).regex(l.Aq,{message:(0,r.rn)("SETTINGS_RADIUS_SHARED_SECRET_VALIDATION")})},217884(e,t,n){var a;n.d(t,{b:()=>a}),function(e){e.MASTER="MASTER",e.BACKUP="BACKUP",e.MEMBER="MEMBER"}(a||(a={}))},374976(e,t,n){n.d(t,{J6:()=>a,_y:()=>l}),n(217884);const a=(e,t)=>e.filter(e=>{if(!e.stacking_group_id)return!0;const n=t.find(t=>t._id===e.stacking_group_id);if(!n)return!0;const a=n.units.find(e=>1===e.index);return a?.mac===e.mac}),l=(e,t,n)=>{if(!t||!n)return e;const a=n.find(e=>e._id===t);return a?.name||e}},332977(e,t,n){n.d(t,{JT:()=>_,W1:()=>o,sg:()=>i});var a=n(801081),l=n(25553),r=n(28193);const _=(0,a.Mz)(({models:e})=>(0,l.Lt)((0,r.H)(),e),e=>e?.data??{wpa3_supported:!1,"6ghz_band_supported":!1}),o=(0,a.Mz)(_,({wpa3_supported:e})=>e),i=(0,a.Mz)(_,e=>e["6ghz_band_supported"])},285947(e,t,n){n.d(t,{EA:()=>s,G6:()=>c,Km:()=>o,ME:()=>r,Nq:()=>m,Sl:()=>A,Up:()=>E,bc:()=>d,ne:()=>i,pE:()=>_,t1:()=>l});var a=n(294591);const l=({security:e})=>e===a.Hs.WEP,r=({security:e})=>e===a.Hs.WPA_ENTERPRISE,_=({security:e})=>e===a.Hs.WPA_PERSONAL,o=({wpa_enc:e})=>e===a.Jl.AUTO,i=({security:e})=>e===a.Hs.HOTSPOT_2_OSEN,s=({mac_filter_enabled:e})=>e,E=(e,t)=>e&&[...new Set(e.filter(({is_guest:e})=>t?!!e:!e).map(({name:e})=>e))],c=e=>{switch(e){case a.Tl.PAP:case a.Tl.CHAP:case a.Tl.MSCHAP:case a.Tl.MSCHAP_V2:return 2;case a.Tl.SIM:case a.Tl.USIM:case a.Tl.CERTIFICATE:case a.Tl.USERNAME_PASSWORD:return 5;default:return}},A=e=>{switch(e){case a.Tl.PAP:case a.Tl.SIM:return 1;case a.Tl.CHAP:case a.Tl.USIM:return 2;case a.Tl.MSCHAP:return 3;case a.Tl.MSCHAP_V2:return 4;case a.Tl.CERTIFICATE:return 6;case a.Tl.USERNAME_PASSWORD:return 7;default:return}},d=e=>{const t=`${e.auth_id}:${e.auth_val}`;if(Object.values(a.Tl).includes(t))return t};function m(e){return Object.values(a.Ir).includes(e?.attr_hidden_id)}},35627(e,t,n){n.d(t,{B:()=>i,T:()=>E});var a=n(801081),l=n(25553),r=n(87485),_=n(248951);const o=(0,l.uh)((0,_.P)()),i=(0,a.Mz)(o,r.kh),s=(0,l.uh)((0,_.L)()),E=(0,a.Mz)(s,r.kh)},985432(e,t,n){var a,l,r,_;n.d(t,{A:()=>a,LM:()=>l,aH:()=>r}),function(e){e.OFF="off",e.AUTO="auto",e.CUSTOM="custom"}(a||(a={})),function(e){e.ALL="all",e.SPECIFIC="specific",e.GROUP="group"}(l||(l={})),function(e){e.ALL="all",e.SPECIFIC="specific",e.NONE="none"}(r||(r={})),function(e){e.LOW="low",e.MEDIUM="medium",e.HIGH="high"}(_||(_={}))},325734(e,t,n){n.d(t,{A:()=>c});var a=n(296540),l=n(758649),r=n(566723),_=n(795097),o=n(823084),i=n(294303),s=n(260844),E=n(916537);const c=({list:e,messageId:t})=>{const[n,c]=(0,a.useState)(!1),A=n?e.length:3;return a.createElement(s.A,{in:!0},a.createElement(o.A,null,a.createElement(i.A,{flexDirection:"column",gap:r.YC,alignItems:"flex-start"},a.createElement(E.sA,{id:t,values:{count:e.length}}),a.createElement(_.A,null,e.slice(0,A).map((e,t)=>a.createElement("li",{key:`${e} + ${t+1}`},e))),e.length>3?a.createElement(l.A,{type:"button",onClick:()=>c(e=>!e),variant:"inline"},a.createElement(E.sA,n?{id:"COMMON_SHOW_LESS"}:{id:"COMMON_SHOW_X_MORE",values:{value:e.length-3}})):null)))}},118835(e,t,n){var a;n.d(t,{M:()=>a}),function(e){e.MAIN="main",e.DHCP="dhcp",e.HOTSPOT="hotspot"}(a||(a={}))},465543(e,t,n){n.d(t,{w:()=>_});var a=n(296540),l=n(469733),r=n(845030);const _=e=>{const t=(0,l.useDispatch)();(0,a.useEffect)(()=>{t((0,r.SQ)(e))},[t,e])}},853801(e,t,n){n.d(t,{y:()=>r});var a=n(349785),l=n(465543);const r=e=>{const t=(0,a.lN)(e);return(0,l.w)(t.isDirty)}},989512(e,t,n){n.d(t,{A:()=>c});var a=n(296540),l=n(705145),r=n(71479),_=n(6510);const o=(0,r.A)("span")`
  white-space: nowrap;
`;var i=n(294303),s=n(6176);const E=(0,r.A)(s.A)`
  float: left;
`,c=({defaultName:e="",device:{model:t,name:n,mac:r}={},width:s=25,height:c=25,leftOffset:A=0})=>a.createElement(i.A,{alignItems:"center",marginLeft:A,width:"100%",maxWidth:"100%"},a.createElement(i.A,{marginRight:8,flex:`0 0 ${s}px`,width:s,height:c},a.createElement(E,{model:t,width:s,height:c})),a.createElement(l.A,{isTruncated:!0,size:"medium",color:"text-2"},a.createElement(o,null,(0,_.Q)({model:t,name:n,mac:r})||e)))},152408(e,t,n){n.d(t,{A:()=>s});var a=n(296540),l=n(162420),r=n(916537),_=n(765562),o=n(349107),i=n(263130);const s=({feature:e,isAlternativeTranslation:t})=>a.createElement(i.A,{icon:a.createElement(l.A,{size:"original",isActive:!0,variant:"fill"}),description:a.createElement(r.sA,{id:t?"SETTINGS_LOW_PERFORMANCE_GATEWAY_WARNING_ALTERNATIVE_TEXT":"SETTINGS_LOW_PERFORMANCE_GATEWAY_WARNING",values:{feature:(0,r.tz)().formatMessage({id:e}),link:a.createElement(o.A,{href:_.A.storeCloudGateways,id:"SETTINGS_CLOUD_GATEWAY"})}})})},823084(e,t,n){n.d(t,{A:()=>i});var a=n(822336),l=n(296540),r=n(162420),_=n(382389),o=n(263130);const i=({children:e,icon:t,background:n,...i})=>{const{themeName:s}=(0,_.u)();return l.createElement(o.A,{icon:t||l.createElement(r.A,{variant:"fill",size:"original",color:a.Ay[`desktop-color-ublue-06-${s}`]}),description:e,background:n,...i})}},975280(e,t,n){n.d(t,{A:()=>i});var a=n(822336),l=n(296540),r=n(823858),_=n(382389),o=n(263130);const i=({children:e,...t})=>{const{themeName:n}=(0,_.u)();return l.createElement(o.A,{icon:l.createElement(r.A,{variant:"fill",size:"original",color:a.Ay[`desktop-color-orange-06-${n}`]}),description:e,...t})}},260844(e,t,n){n.d(t,{A:()=>i});var a=n(296540),l=n(573510),r=n(132196),_=n(566723);const o=(e,t)=>r.AH`
  &-appear,
  &-enter {
    opacity: 0;
    display: flex !important;
    transform: translateY(-${_.xO});
  }
  &-appear-active,
  &-enter-active {
    display: flex !important;
    ${e&&`flex-direction: ${e};`}
    ${t&&`padding: ${t};`}
    opacity: 1;
    transform: translateY(0px);
    transition:
      opacity 150ms ease-in-out,
      transform 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
  }
  &-appear-done,
  &-enter-done {
    display: flex !important;
    ${e&&`flex-direction: ${e};`}
    ${t&&`padding: ${t};`}
    opacity: 1;
  }
  &-exit {
    display: flex !important;
    opacity: 0;
    height: 0;
    box-sizing: border-box;
    margin: ${_.xO} 0 0 !important;
    & > * {
      display: none;
    }
  }
  &-exit-active {
    display: flex !important;
    margin: 0 !important;
    transition: margin 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
  }
  &-exit-done {
    display: none;
  }
`,i=(0,a.memo)(({timeout:e=300,in:t=!1,flexDirection:n,padding:r=`0 0 ${_.fS}`,wrap:i=!1,children:s,...E})=>{const c=(0,a.useMemo)(()=>a.Children.map(s,(r,_)=>a.createElement(l.A,{appear:t,in:t,timeout:e,classNames:o(n,void 0),mountOnEnter:!0,...E},null===r?a.createElement("div",null):r)),[s,n,t,E,e]);return i?a.createElement(l.A,{appear:t,in:t,timeout:e,classNames:o(n,r),mountOnEnter:!0,...E},a.createElement("div",null,s)):a.createElement(a.Fragment,null,c)})},695008(e,t,n){n.d(t,{A:()=>I});var a=n(469733),l=n(296540),r=n(349373),_=n(6510),o=n(566723),i=n(115829),s=n(294303),E=n(6176),c=n(916537),A=n(374976),d=n(538535),m=n(532419);const I=({enabled:e,mac:t})=>{const n=(0,a.useSelector)((0,m.tG)(t)),I=(0,a.useSelector)(d.D5);return n?.mac?l.createElement(r.A,{symbol:l.createElement(s.A,{alignItems:"center",opacity:e?void 0:o.xN},l.createElement(E.A,{width:20,height:20,model:n.model}))},l.createElement(i.A,{enabled:e},(0,A._y)((0,_.Q)(n),n.stacking_group_id,I)||l.createElement(c.sA,{id:"COMMON_FALLBACK"}))):null}},352998(e,t,n){n.d(t,{A:()=>A});var a=n(469733),l=n(296540),r=n(705145),_=n(6510),o=n(566723),i=n(294303),s=n(6176),E=n(916537),c=n(532419);const A=({enabled:e,mac:t})=>{const n=(0,a.useSelector)(c.ID).find(e=>e.mac===t);return n?l.createElement(i.A,{gap:o.kc,alignItems:"center"},l.createElement(i.A,{alignItems:"center",opacity:e?void 0:o.xN},l.createElement(s.A,{width:20,height:20,model:n.model})),l.createElement(r.A,{isTruncated:!0,variant:"inherit"},(0,_.Q)(n)||l.createElement(E.sA,{id:"COMMON_FALLBACK"}))):null}},545512(e,t,n){n.d(t,{A:()=>s});var a=n(296540),l=n(566723),r=n(294303),_=n(951106),o=n(115829),i=n(703447);const s=({defaultName:e="",client:t=null,width:n=25,height:s=25,alt:E})=>a.createElement(r.A,{alignItems:"center",gap:l.kc},a.createElement(i.A,{client:t,width:n,height:s,alt:E}),a.createElement(o.A,{variant:"inherit"},(0,_.tn)(t)||e))},876773(e,t,n){n.d(t,{A:()=>_});var a=n(296540),l=n(758649),r=n(196010);const _=e=>a.createElement(l.A,{component:r.A,variant:"inline",size:"medium",...e})},363370(e,t,n){n.d(t,{A:()=>_});var a=n(296540),l=n(928085),r=n(876773);const _=e=>{const t=(0,l.A)(e.to);return a.createElement(r.A,{...e,to:t})}},821580(e,t,n){n.d(t,{A:()=>o});var a=n(296540),l=n(454195),r=n(566723),_=n(294303);const o=e=>a.createElement(_.A,{paddingTop:r.YC,paddingBottom:r.YC,gap:r.Ln,rowGap:r.YC,flexWrap:"wrap",minHeight:l.b,alignItems:"center",...e})},121931(e,t,n){n.d(t,{A:()=>i});var a=n(822336),l=n(296540),r=n(382389),_=n(566723),o=n(294303);const i=(0,l.forwardRef)((e,t)=>{const{themeName:n}=(0,r.u)();return l.createElement(o.A,{ref:t,flexDirection:"column",padding:_.kc,width:"100%",background:a.Ay[`desktop-color-neutral-01-${n}`],...e})})},704025(e,t,n){n.d(t,{i:()=>_});var a=n(296540),l=n(271856),r=n(805837);const _=e=>a.createElement(l.A,{description:e.option&&"tooltipDescription"in e.option?e.option.tooltipDescription:null,position:"left",portal:!0},a.createElement(r.q,{...e}))},128736(e,t,n){n.d(t,{A:()=>o});var a=n(822336),l=n(296540),r=n(823858),_=n(382389);const o=e=>{const{themeName:t}=(0,_.u)();return l.createElement(r.A,{size:"original",variant:"fill",color:a.Ay[`desktop-color-orange-06-${t}`],...e})}},998386(e,t,n){n.d(t,{HV:()=>r,pm:()=>_,vF:()=>l});var a=n(765562);const l=e=>`${a.A.fabricsOrchestration}?orchestrationId=${e?.template_id||""}&orgId=${e?.organization_id||""}`,r=e=>`${a.A.fabricsDeviceTemplates}/${e?.template_id||""}?orgId=${e?.organization_id||""}`,_=()=>`${a.A.fabricsOrchestration}`},450457(e,t,n){n.r(t),n.d(t,{default:()=>lo});var a=n(296540),l=n(469733),r=n(349785),_=n(962315),o=n(592510),i=n(853801),s=n(883840),E=n(30247),c=n(675291),A=n(169568),d=n(464265),m=n(641777),I=n(79786),S=n(398300),T=n(566723),N=n(865650),O=n(40622),u=n(930167),p=n(48925),P=n(294303),R=n(845030),C=n(916537),D=n(35627),M=n(248951),b=n(285947),F=n(632169),L=n(11041),f=n(358980),g=n(302167),v=n(609695),h=n(446367),G=n(366188),y=n(602021),W=n(198494),U=n(668478),V=n(226776),w=n(598796),z=n(532419),H=n(103595),k=n(984652),x=n(180830),B=n(328403),Y=n(959341),K=n(294591);const $=(e,t)=>{if(!e)return K.ns.DISABLED;if((0,N.tw)(e))return K.ns.OPTIONAL;if((0,N.C1)(e))return K.ns.REQUIRED;if(e===O.r.OPEN){if(t===O.I.ENHANCED_OPEN)return K.ns.REQUIRED;if(t===O.I.ENHANCED_OPEN_TRANSITION)return K.ns.OPTIONAL}return K.ns.DISABLED},j=[O.r.OPEN,O.r.WEP],X=e=>!j.includes(e),q=[O.r.OPEN,O.r.WPA23_PERSONAL,O.r.WPA23_ENTERPRISE,O.r.WPA3_PERSONAL,O.r.WPA3_ENTERPRISE],Q=[O.r.OPEN,O.r.WPA3_PERSONAL,O.r.WPA3_ENTERPRISE],J=[O.r.OPEN,O.r.WPA2_PERSONAL,O.r.WPA2_ENTERPRISE],Z=[O.r.WPA3_PERSONAL,O.r.WPA3_ENTERPRISE],ee=[O.r.WPA2_ENTERPRISE,O.r.WPA3_ENTERPRISE],te=[O.r.WPA2_PERSONAL],ne=[O.r.WPA3_PERSONAL,O.r.WPA3_ENTERPRISE,O.r.WPA23_PERSONAL,O.r.WPA23_ENTERPRISE],ae=[O.r.WPA2_ENTERPRISE,O.r.WPA23_ENTERPRISE,O.r.WPA3_ENTERPRISE,O.r.HOTSPOT_2_OSEN],le=[O.r.OPEN,O.r.WEP,O.r.HOTSPOT_2_OSEN,O.r.WPA1_ENTERPRISE,O.r.WPA2_ENTERPRISE,O.r.WPA12_ENTERPRISE,O.r.WPA23_ENTERPRISE,O.r.WPA3_ENTERPRISE],re=(e,t)=>{if(t!==e.getValues("securityProtocol")){if(e.setValue("securityProtocol",t,{shouldDirty:!0}),e.setValue("pmf_mode",$(t,e.getValues("security_mode")),{shouldDirty:!0}),t===O.r.OPEN){const t=e.getValues("wlan_bands"),n=1===t?.length&&t.includes(K._$.AX);e.setValue("security_mode",n?O.I.ENHANCED_OPEN:O.I.OPEN,{shouldDirty:!0}),n&&e.setValue("pmf_mode",K.ns.REQUIRED,{shouldDirty:!0})}(0,N.eP)(t)&&e.setValue("ccmp_encryption_enabled",!0,{shouldDirty:!0}),Z.includes(t)||e.setValue("mlo_enabled",!1,{shouldDirty:!0}),X(t)||e.setValue("fast_roaming_enabled",!1,{shouldDirty:!0}),le.includes(t)&&e.clearErrors("password")}},_e=[O.r.WPA2_ENTERPRISE,O.r.WPA2_PERSONAL,O.r.WPA23_PERSONAL,O.r.WPA23_ENTERPRISE,O.r.WPA3_PERSONAL,O.r.WPA3_ENTERPRISE],oe=e=>e===O.r.WPA23_PERSONAL||e===O.r.WPA3_PERSONAL,ie=e=>(0,N.ME)(e)||(0,N.pE)(e)||e===O.r.HOTSPOT_2_OSEN,se=e=>e===O.r.HOTSPOT_2_OSEN||(0,N.ME)(e);var Ee;!function(e){e.CAPTIVE_PORTAL="captive_portal",e.PASSPOINT="passpoint"}(Ee||(Ee={}));var ce=n(614476),Ae=n(263963),de=n(546391),me=n(870443);const Ie=/[A-Z]+/,Se=/[a-z]+/,Te=/\d+/,Ne=/[^A-Za-z0-9]+/,Oe=e=>me.A.string().label("COMMON_PASSWORD").matches(de.Mv,{message:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_VALIDATION_WPA_PASSWORD"})}).test("isBrazilCompatible",a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_VALIDATION_PASSWORD_STRICT"}),t=>!e||t&&t.length>=8&&Ie.test(t)&&Se.test(t)&&Te.test(t)&&Ne.test(t)).matches(de.hU,{message:({value:e})=>{const t=[...new Set(e?.match(de.lc)?.join("").split(""))].slice(0,10);return a.createElement(C.sA,{id:"SETTINGS_PASSWORD_CONTAINS_INVALID_CHARACTERS",values:{characters:t}})}}),ue=ce.Ay.string().min(8,{message:(0,Ae.rn)("SETTINGS_WIFI_FORM_VALIDATION_WPA_PASSWORD")}).max(63,{message:(0,Ae.rn)("SETTINGS_WIFI_FORM_VALIDATION_WPA_PASSWORD")}).superRefine((e,t)=>{if(de.hU.test(e))return;const n=[...new Set(e?.match(de.lc)?.join("").split(""))].slice(0,10);t.addIssue({code:ce.Ay.ZodIssueCode.custom,message:(0,Ae.rn)("SETTINGS_PASSWORD_CONTAINS_INVALID_CHARACTERS",{characters:n.join("")})})}),pe=e=>ue.refine(t=>!e||Ie.test(t)&&Se.test(t)&&Te.test(t)&&Ne.test(t),{message:(0,Ae.rn)("SETTINGS_WIFI_FORM_VALIDATION_PASSWORD_STRICT")});var Pe=n(143985),Re=n(19607),Ce=n(189643),De=n(508086),Me=n(983329);const be=({countryCode:e,broadcastingDevices:t})=>!t.every(t=>(0,Me.Zd)({security:K.Hs.OPEN},t,{countryCode:e}));var Fe=n(985432);const Le=255,fe={[K._$.NG]:1,[K._$.NA]:3,[K._$.AX]:3};var ge,ve=n(689956),he=n(945132);!function(e){e.ALL="all",e.GROUP="group",e.SPECIFIC="specific"}(ge||(ge={}));const Ge=60;var ye;!function(e){e[e.DEFAULT=3600]="DEFAULT",e[e.DISABLED=0]="DISABLED",e[e.MAX=he.CW]="MAX",e[e.MIN=60]="MIN"}(ye||(ye={}));const We=["multicast_to_unicast_enabled","mdns_proxy","private_preshared_keys","multicast_and_broadcast_blocker","mlo_enabled","band_steering_enabled","hide_ssid_enabled","client_device_isolation_enabled","proxy_arp_enabled","bss_transition_enabled","uapsd_enabled","fast_roaming_enabled","wifi_speed_limit","dtim_period","schedule","minimum_data_rate_control","high_security_192_bit_mode_enabled","group_rekey_interval","das_dac_coa_enabled","radius_mac_authentication","nas_id","ccmp_encryption_enabled","wep_key","wep_key_index","radius_profile_id","sae_anti_clogging_threshold","sae_sync_time","mac_address_filter","securityProtocol","pmf_mode","advertise_device_name_in_beacon","dns_assistance"],Ue=["private_preshared_keys","wlan_bands","mlo_enabled","proxy_arp_enabled","bss_transition_enabled","band_steering_enabled","fast_roaming_enabled","pmf_mode","group_rekey_interval","advertise_device_name_in_beacon"],Ve=(e,t)=>{switch(e?.type){case ge.ALL:return new Set(t.apGroups.find(Me.K5)?.device_macs||[]);case ge.SPECIFIC:return new Set(e.ap_macs);case ge.GROUP:{const n=new Set(e.group_ids??[]);return new Set(t.apGroups.filter(({_id:e})=>n.has(e)).flatMap(e=>e?.device_macs||[]))}default:return new Set}},we=ce.Ay.object({vlan_bridging:ce.Ay.union([ce.Ay.object({enabled:ce.Ay.literal(!1).optional().default(!1)}),ce.Ay.object({enabled:ce.Ay.literal(!0),networkconf_ids:ce.Ay.array(ce.Ay.string()).min(1,{message:(0,Ae.rn)("COMMON_VALIDATION_NETWORK")})})]),devices:ce.Ay.union([ce.Ay.object({type:ce.Ay.enum([Fe.LM.ALL])}),ce.Ay.object({type:ce.Ay.enum([Fe.LM.SPECIFIC]),macs:ce.Ay.array(ce.Ay.string()).min(1,{message:(0,Ae.rn)("SETTINGS_COMMON_DEVICE_REQUIRED")})}),ce.Ay.object({type:ce.Ay.enum([Fe.LM.GROUP]),group_ids:ce.Ay.array(ce.Ay.string()).min(1)})]),services:ce.Ay.union([ce.Ay.object({type:ce.Ay.enum([Fe.aH.ALL])}),ce.Ay.object({type:ce.Ay.enum([Fe.aH.NONE])}),ce.Ay.object({type:ce.Ay.enum([Fe.aH.SPECIFIC]),predefined_ids:ce.Ay.array(ce.Ay.string()).optional(),custom:ce.Ay.array(ce.Ay.object({address:ce.Ay.string(),name:ce.Ay.string()})).optional()}).refine(e=>e.predefined_ids?.length||e.custom?.length,{message:(0,Ae.rn)("SETTINGS_VALIDATION_ADD_ONE_SERVICE"),path:["custom"]})])}),ze=ce.z.object({name:ce.z.string().optional(),start_days_of_week:ce.z.array(ce.z.nativeEnum(K.wd)),start_hour:ce.z.number(),start_minute:ce.z.number(),duration_minutes:ce.z.number()}),He=ce.z.discriminatedUnion("localProfile",[ce.z.object({localProfile:ce.z.literal(!0)}),ce.z.object({localProfile:ce.z.literal(!1),profile_id:ce.z.string({required_error:(0,Ae.rn)("SETTINGS_RADIUS_SERVER_REQUIRED")})})]),ke=ce.z.union([ce.z.object({enabled:ce.z.literal(!0),profile:He,format:ce.z.nativeEnum(K.VZ)}),ce.z.object({enabled:ce.z.literal(!1).optional()})]).optional(),xe=ce.z.union([ce.z.object({enabled:ce.z.literal(!0),format:ce.z.nativeEnum(K.VZ)}),ce.z.object({enabled:ce.z.literal(!1).optional()})]).optional();var Be,Ye;!function(e){e.OFF="off",e.ON="on"}(Be||(Be={})),function(e){e.STANDARD="standard",e.HOTSPOT="hotspot",e.IOT="iot"}(Ye||(Ye={}));const Ke=(e,t,n,a,l,r)=>{const _=a?ce.z.string().optional():ue;return ce.z.intersection(ce.z.intersection(ce.z.object({name:ce.z.string().min(1).max(32,(0,Ae.rn)("COMMON_MAX_CHARS",{max:32,name:(0,Ae.rn)("COMMON_NAME")})).refine(e=>new Blob([e]).size<=32,{message:(0,Ae.rn)("COMMON_VALIDATION_BYTE_LENGTH",{max:32,name:(0,Ae.rn)("COMMON_NAME")})}),broadcasting_aps:ce.z.union([ce.z.object({type:ce.z.literal(ge.ALL)}),ce.z.object({type:ce.z.literal(ge.GROUP),group_ids:ce.z.array(ce.z.string()).min(1,(0,Ae.rn)("SETTINGS_WIFI_FORM_ADVANCED_AP_GROUPS_VALIDATION_MIN"))}),ce.z.object({type:ce.z.literal(ge.SPECIFIC),ap_macs:ce.z.array(ce.z.string()).min(1,(0,Ae.rn)("SETTINGS_WIFI_FORM_ADVANCED_DEVICES_VALIDATION_MIN"))})])}),ce.z.union([ce.z.object({mode:ce.z.literal(Ye.STANDARD)}),ce.z.object({mode:ce.z.literal(Ye.IOT)}),ce.z.object({mode:ce.z.literal(Ye.HOTSPOT),hotspot:ce.z.union([ce.z.object({type:ce.z.literal(Ee.CAPTIVE_PORTAL)}),ce.z.object({type:ce.z.literal(Ee.PASSPOINT),venue_name:ce.z.string().min(1),venue_type:ce.z.string(),network_type:ce.z.nativeEnum(K.KX),type_availability_ipv4:ce.z.nativeEnum(K.WL),type_availability_ipv6:ce.z.nativeEnum(K.i2),capabilities:ce.z.array(ce.z.object({protocol:ce.z.union([ce.z.literal(Ce.aS.ICMP),ce.z.literal(Ce.aS.TCP_UDP),ce.z.literal(Ce.aS.TCP),ce.z.literal(Ce.aS.UDP),ce.z.literal(Ce.aS.ESP)]),port:ce.z.coerce.number().int().min(1).max(65535).optional(),status:ce.z.nativeEnum(K.ab)})).optional(),nai_realm_list:ce.z.array(ce.z.object({name:ce.z.string(),eap_method:ce.z.nativeEnum(K.B8),sub_methods:ce.z.array(ce.z.nativeEnum(K.Tl)).optional().default([]),status:ce.z.boolean().optional(),encoding:ce.z.number().optional()})),roaming_consortium_list:ce.z.array(ce.z.object({name:ce.z.string(),oid:ce.z.string()})).optional(),cellular_network_list:ce.z.array(ce.z.object({name:ce.z.string().optional(),country_code:ce.z.string().optional(),mcc:ce.z.string().min(3).max(3),mnc:ce.z.string().min(2).max(3)})).optional(),domain_name_list:ce.z.array(ce.z.string()).optional(),operator_friendly_name:ce.z.string().max(128).optional(),wan_metrics:ce.z.union([ce.z.object({enabled:ce.z.literal(!1).optional().default(!1)}),ce.z.object({enabled:ce.z.literal(!0),info:ce.z.nativeEnum(K.XD).optional(),symmetric_link:ce.z.boolean().optional(),at_capacity:ce.z.boolean().optional(),load_measurement:ce.z.union([ce.z.object({enabled:ce.z.literal(!1).optional().default(!1)}),ce.z.object({enabled:ce.z.literal(!0),value:ce.z.number().int().min(0).max(99999)})]),downlink_speed:ce.z.number().int().min(0).max(1e9).optional().nullable().transform(e=>e??void 0),uplink_speed:ce.z.number().int().min(0).max(1e9).optional().nullable().transform(e=>e??void 0),downlink_load:ce.z.number().int().min(0).optional().nullable().transform(e=>e??void 0),uplink_load:ce.z.number().int().min(0).optional().nullable().transform(e=>e??void 0)})]).optional().default({enabled:!1})}).refine(e=>e.roaming_consortium_list?.length||e.nai_realm_list?.length,{path:["nai_realm_list"],message:(0,Ae.rn)("SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_VALIDATION")})])})])),ce.z.intersection(ce.z.object({advanced:ce.z.nativeEnum(s.C)}),ce.z.intersection(ce.z.union([ce.z.object({securityProtocol:ce.z.union([ce.z.literal(O.r.OPEN),ce.z.literal(O.r.WEP),ce.z.literal(O.r.WPA1_PERSONAL),ce.z.literal(O.r.WPA12_PERSONAL),ce.z.literal(O.r.WPA2_PERSONAL),ce.z.literal(O.r.WPA23_PERSONAL),ce.z.literal(O.r.WPA3_PERSONAL)]),radius_mac_authentication:ke}),ce.z.object({securityProtocol:ce.z.union([ce.z.literal(O.r.WPA1_ENTERPRISE),ce.z.literal(O.r.WPA12_ENTERPRISE),ce.z.literal(O.r.WPA2_ENTERPRISE),ce.z.literal(O.r.WPA23_ENTERPRISE),ce.z.literal(O.r.WPA3_ENTERPRISE),ce.z.literal(O.r.HOTSPOT_2_OSEN)]),radius_mac_authentication:xe,radius_profile:He,high_security_192_bit_mode_enabled:ce.z.boolean().optional().default(!1)})]),ce.z.intersection(ce.z.object({advertise_device_name_in_beacon:ce.z.boolean().optional().default(!1),dns_assistance:ce.z.union([ce.z.object({mode:ce.z.literal(K.J7.OFF)}),ce.z.object({mode:ce.z.literal(K.J7.AUTO)}),ce.z.object({mode:ce.z.literal(K.J7.MANUAL),servers:ce.z.array(Pe.B).min(1)})]).default({mode:K.J7.OFF}),multicast_to_unicast_enabled:ce.z.boolean().optional().default(!1),multicast_and_broadcast_blocker:ce.z.union([ce.z.object({enabled:ce.z.literal(!0),exceptions:ce.z.array(Re.V)}),ce.z.object({enabled:ce.z.literal(!1).optional().default(!1)})]).optional().default({enabled:!1}),band_steering_enabled:ce.z.boolean().optional().default(!1),hide_ssid_enabled:ce.z.boolean().optional().default(!1),proxy_arp_enabled:ce.z.boolean().optional().default(!1),bss_transition_enabled:ce.z.boolean().optional().default(!1),fast_roaming_enabled:ce.z.boolean().optional().default(!1),wifi_speed_limit:ce.z.discriminatedUnion("enabled",[ce.z.object({enabled:ce.z.literal(!1).optional().default(!1)}),ce.z.object({enabled:ce.z.literal(!0),profile_id:ce.z.string().optional().refine(e=>!!e,{message:(0,Ae.rn)("SETTINGS_VALIDATION_PROFILE_REQUIRED")})})]).optional().default({enabled:!1}),dtim_period:ce.z.union([ce.z.object({auto:ce.z.literal(!0)}),ce.z.object({auto:ce.z.literal(!1),[K._$.NG]:ce.z.number().int().min(1).max(Le),[K._$.NA]:ce.z.number().int().min(1).max(Le),[K._$.AX]:ce.z.number().int().min(1).max(Le)})]).optional().default({auto:!0}),wlan_bands:ce.z.array(ce.z.nativeEnum(K._$)).min(1,{message:(0,Ae.rn)("SETTINGS_WIFI_FORM_GENERAL_FIELD_WLAN_BANDS_MIN_SELECTED")}),schedule:ce.z.union([ce.z.object({mode:ce.z.literal(Be.OFF).optional().default(Be.OFF)}),ce.z.object({mode:ce.z.literal(Be.ON),value:ce.z.array(ze,{message:(0,Ae.rn)("SETTINGS_BLACKOUT_SCHEDULE_VALIDATION")}).min(1,{message:(0,Ae.rn)("SETTINGS_BLACKOUT_SCHEDULE_VALIDATION")})})]).optional().default({mode:Be.OFF}),group_rekey_interval:ce.z.union([ce.z.object({enabled:ce.z.literal(!1).optional().default(!1)}),ce.z.object({enabled:ce.z.literal(!0),value:ce.z.number().min(ye.MIN).max(ye.MAX)})]).optional().default({enabled:!1}),das_dac_coa_enabled:ce.z.boolean().optional().default(!1),mdns_proxy:ce.z.union([ce.z.object({mode:ce.z.literal(Fe.A.OFF).optional().default(Fe.A.OFF)}),ce.z.object({mode:ce.z.literal(Fe.A.AUTO)}),ce.z.object({mode:ce.z.literal(Fe.A.CUSTOM),rules:ce.z.array(we).min(1,{message:(0,Ae.rn)("SETTINGS_ERROR_EMPTY_MDNS_SERVICES_ONE")})})]).optional().default({mode:Fe.A.AUTO}),uapsd_enabled:ce.z.boolean().optional(),minimum_data_rate_control:ce.z.union([ce.z.object({enabled:ce.z.literal(!1).optional().default(!1)}),ce.z.object({enabled:ce.z.literal(!0),values:ce.z.object({ng:ce.z.number().int(),na:ce.z.number().int()})})]).optional().default({enabled:!1}),pmf_mode:ce.z.nativeEnum(K.ns).optional(),nas_id:ce.z.union([ce.z.object({type:ce.z.union([ce.z.literal(K.EC.AP_MAC),ce.z.literal(K.EC.AP_NAME),ce.z.literal(K.EC.BSSID),ce.z.literal(K.EC.SITE_NAME)])}),ce.z.object({type:ce.z.literal(K.EC.CUSTOM),value:ce.z.string().min(1).max(48)})]).optional(),mac_address_filter:ce.z.union([ce.z.object({enabled:ce.z.literal(!0),type:ce.z.nativeEnum(K.QN),mac_addresses:ce.z.array(ce.z.string()).min(1,{message:(0,Ae.rn)("SETTINGS_WIFI_FORM_ADVANCED_MAC_ADDRESS_FILTER_VALIDATION")}).max(512)}),ce.z.object({enabled:ce.z.literal(!1).optional()})]).optional(),ccmp_encryption_enabled:ce.z.boolean().optional(),client_device_isolation_enabled:ce.z.boolean().optional()}),ce.z.union([ce.z.intersection(ce.z.object({securityProtocol:ce.z.literal(O.r.WPA2_PERSONAL)}),ce.z.union([ce.z.object({private_preshared_keys:ce.z.object({enabled:ce.z.literal(!1)}).optional().default({enabled:!1}),network_id:ce.z.string(),password:_}),ce.z.object({private_preshared_keys:ce.z.object({enabled:ce.z.literal(!0),items:ce.z.array(ce.z.object({password:_,network_id:ce.z.string()})).min(1,{message:(0,Ae.rn)("SETTINGS_WIFI_PPSK_VALIDATION_AT_LEAST_ONE_KEY")})})})])),ce.z.union([ce.z.object({securityProtocol:ce.z.literal(O.r.OPEN),network_id:ce.z.string(),security_mode:ce.z.literal(O.I.ENHANCED_OPEN),pmf_mode:ce.z.literal(K.ns.REQUIRED)}),ce.z.object({securityProtocol:ce.z.literal(O.r.OPEN),network_id:ce.z.string(),security_mode:ce.z.literal(O.I.ENHANCED_OPEN_TRANSITION),pmf_mode:ce.z.union([ce.z.literal(K.ns.REQUIRED),ce.z.literal(K.ns.OPTIONAL)])}),ce.z.object({securityProtocol:ce.z.literal(O.r.OPEN),network_id:ce.z.string(),security_mode:ce.z.literal(O.I.OPEN).optional().default(O.I.OPEN)})]),ce.z.object({securityProtocol:ce.z.literal(O.r.WPA1_PERSONAL),network_id:ce.z.string(),password:_}),ce.z.object({securityProtocol:ce.z.literal(O.r.WPA12_PERSONAL),ccmp_encryption_enabled:ce.z.boolean(),network_id:ce.z.string(),password:_}),ce.z.object({securityProtocol:ce.z.literal(O.r.WPA23_PERSONAL),network_id:ce.z.string(),password:_,sae_sync_time:ce.z.number().int().min(1).max(Ge),sae_anti_clogging:ce.z.number().int().min(1).max(Ge)}),ce.z.object({securityProtocol:ce.z.literal(O.r.WPA3_PERSONAL),mlo_enabled:ce.z.boolean().optional().default(!1),pmf_mode:ce.z.literal(K.ns.REQUIRED),network_id:ce.z.string(),password:_,sae_sync_time:ce.z.number().int().min(1).max(Ge),sae_anti_clogging:ce.z.number().int().min(1).max(Ge)}),ce.z.object({securityProtocol:ce.z.union([ce.z.literal(O.r.HOTSPOT_2_OSEN),ce.z.literal(O.r.WPA1_ENTERPRISE),ce.z.literal(O.r.WPA2_ENTERPRISE),ce.z.literal(O.r.WPA23_ENTERPRISE)]),network_id:ce.z.string()}),ce.z.object({securityProtocol:ce.z.literal(O.r.WPA12_ENTERPRISE),network_id:ce.z.string(),ccmp_encryption_enabled:ce.z.boolean()}),ce.z.object({securityProtocol:ce.z.literal(O.r.WEP),network_id:ce.z.string(),wep_key:ce.z.object({password:ce.z.string().regex(de.TV,{message:(0,Ae.rn)("SETTINGS_WIFI_FORM_VALIDATION_WEP_PASSWORD")}),index:ce.z.number().int().min(1).max(4)})}),ce.z.object({securityProtocol:ce.z.literal(O.r.WPA3_ENTERPRISE),pmf_mode:ce.z.literal(K.ns.REQUIRED),network_id:ce.z.string(),mlo_enabled:ce.z.boolean().optional().default(!1)})])).refine(e=>!(e.band_steering_enabled&&"wlan_bands"in e&&e.wlan_bands.length<2),{path:["wlan_bands"],message:(0,Ae.rn)("SETTINGS_WIFI_FORM_ADVANCED_BAND_STEERING_DISABLED_BANDS")})))).superRefine((a,l)=>{const r=Ve(a.broadcasting_aps,{apGroups:n}),_=t.filter(e=>r.has(e.mac)),o=be({broadcastingDevices:_,countryCode:e});"password"in a&&(pe(o).safeParse(a.password).success||l.addIssue({code:ce.z.ZodIssueCode.custom,message:(0,Ae.rn)("SETTINGS_WIFI_FORM_VALIDATION_PASSWORD_STRICT"),path:["password"]})),"securityProtocol"in a&&a.securityProtocol===O.r.OPEN&&o&&l.addIssue({code:ce.z.ZodIssueCode.custom,message:(0,Ae.rn)("SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_OPEN_DISABLED_REGULATIONS_VALIDATION"),path:["securityProtocol"]})}).superRefine((e,t)=>{if(!("securityProtocol"in e&&(0,N.ME)(e.securityProtocol)&&"radius_profile"in e&&"mdns_proxy"in e))return;const{mode:n}=e.mdns_proxy;if(n!==Fe.A.AUTO&&n!==Fe.A.CUSTOM)return;const a=e.radius_profile,_=a.localProfile?r:a.profile_id,o=l.find(({_id:e})=>e===_);o?.vlan_wlan_mode===ve.z.ENABLED&&t.addIssue({code:ce.z.ZodIssueCode.custom,message:(0,Ae.rn)("SETTINGS_WIFI_MDNS_RADIUS_VLAN_WARNING"),path:["mdns_proxy","mode"]})}).superRefine((e,t)=>{"securityProtocol"in e&&"wlan_bands"in e&&1===e.wlan_bands.length&&e.wlan_bands.includes(K._$.AX)&&!Q.includes(e.securityProtocol)&&t.addIssue({code:ce.z.ZodIssueCode.custom,message:(0,Ae.rn)("SETTINGS_SECURITY_PROTOCOL_NOT_SUPPORTED_BY_6GHZ_ONLY",{protocol:(0,Ae.rn)(De.z[e.securityProtocol])}),path:["securityProtocol"]})})};var $e=n(592563),je=n(332431),Xe=n(188738),qe=n(897502),Qe=n(454195),Je=n(242366),Ze=n(821580),et=n(705228),tt=n(415658),nt=n(968906),at=n(823084);const lt=({form:e})=>{const t=(0,l.useDispatch)(),n=(0,r.FH)({control:e.control,name:"wifi_speed_limit.enabled"}),_=(0,l.useSelector)(y.EL),o=(0,l.useSelector)(L._E),i=(0,a.useMemo)(()=>o.filter(e=>!(0,tt.b)(e)).map(e=>({label:e.name,value:e._id})),[o]);return a.createElement(Je.A,null,a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"wifi_speed_limit.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_BANDWIDTH_PROFILE_DESC"})},a.createElement(C.sA,{id:"COMMON_WIFI_SPEED_LIMIT"}))),n?a.createElement(a.Fragment,null,i.length?a.createElement(P.A,{alignItems:"flex-start",gap:T.kc},a.createElement(Xe.A,{control:e.control,name:"wifi_speed_limit.profile_id",options:i,label:a.createElement(C.sA,{id:"COMMON_PROFILE"}),...nt.A.addDataTestId(nt.A.TestId.WIFI_BANDWIDTH_PROFILE)}),a.createElement(P.A,{height:Qe.b+et.VT,alignItems:"center",paddingTop:et.VT},a.createElement($e.A,{type:"button",isDisabled:_,fontSize:"medium",onPress:()=>{t((0,R.XP)({type:S.H.WIFI_SPEED_LIMIT_PROFILE,id:Y.R6}))},...nt.A.addDataTestId(nt.A.TestId.SIDE_PANEL_TRIGGER)},a.createElement(C.sA,{id:"COMMON_NEW"})))):a.createElement(a.Fragment,null,a.createElement(at.A,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_BANDWIDTH_LIMITS_INFORMATION"})),a.createElement("div",null,a.createElement($e.A,{type:"button",isDisabled:_,fontSize:"medium",onPress:()=>{t((0,R.XP)({type:S.H.WIFI_SPEED_LIMIT_PROFILE,id:Y.R6}))},...nt.A.addDataTestId(nt.A.TestId.SIDE_PANEL_TRIGGER)},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_BANDWIDTH_PROFILE_ADD"}))),a.createElement(je.Ay,{noMargin:!0,form:e,name:"wifi_speed_limit.profile_id"}))):null)};var rt=n(38455),_t=n(880880),ot=n(280044),it=n(317672),st=n(349665),Et=n(553432),ct=n(610356),At=n(504779),dt=n(156211),mt=n(438794);const It=e=>{switch(e){case ge.SPECIFIC:return K.qq.DEVICES;case ge.GROUP:return K.qq.GROUPS;default:return K.qq.ALL}},St=e=>e?.mode===Fe.A.CUSTOM&&e.rules?.flatMap(e=>"specific"===e.devices.type&&e.devices.macs||[])||[],Tt=({form:e,existingRecord:t})=>{const n=(0,r.FH)({control:e.control}),l=(0,a.useMemo)(()=>(0,mt.k)(n),[n]);return(0,a.useMemo)(()=>({_id:t?._id,ap_group_mode:It(n?.broadcasting_aps?.type),ap_group_ids:n?.broadcasting_aps?.type===ge.GROUP?n?.broadcasting_aps?.group_ids:[],ap_specific_macs:n?.broadcasting_aps?.type===ge.SPECIFIC?n?.broadcasting_aps?.ap_macs:[],private_preshared_keys_enabled:!!l.private_preshared_keys?.enabled,wlan_bands:"wlan_bands"in n&&n.wlan_bands||[]}),[l,n,t?._id])},Nt=({form:e,existingRecord:t,autoDefaultValues:n})=>{const _=(0,r.FH)({control:e.control,name:"mode"}),o=Tt({existingRecord:t,form:e}),i=(0,l.useSelector)(u.b),E=(0,a.useMemo)(()=>{if(_===Ye.IOT)return;const e={...o,wlan_bands:[K._$.NG]};return(0,_t.zY)((0,rt.d)(e,i),{type:ot.p.SSID_LIMIT_EXCEEDED})},[o,i,_]);return a.createElement(r.xI,{control:e.control,name:"mode",render:({field:t})=>a.createElement(st.A,null,a.createElement(it.A,null,a.createElement(C.sA,{id:"COMMON_APPLICATION"})),a.createElement(Et.A,null,a.createElement(ct.A,{control:e.control,name:"mode",value:Ye.STANDARD,onCheck:()=>{if(e.getValues("advanced")===s.C.AUTO&&(0,dt.D)(e,n),!e.getValues("mlo_enabled")){const t=e.getValues("wlan_bands")||[];re(e,t.includes(K._$.AX)&&1===t.length?O.r.WPA3_PERSONAL:t.includes(K._$.AX)?O.r.WPA23_PERSONAL:O.r.WPA2_PERSONAL)}}},a.createElement(C.sA,{id:"COMMON_STANDARD"})),a.createElement(ct.A,{control:e.control,name:"mode",value:Ye.HOTSPOT,onCheck:()=>{if(e.setValue("advanced",s.C.MANUAL,{shouldTouch:!0}),e.getValues("hotspot.type")===Ee.CAPTIVE_PORTAL&&(e.setValue("client_device_isolation_enabled",!0,{shouldDirty:!0}),re(e,O.r.OPEN)),e.getValues("hotspot.type")===Ee.PASSPOINT&&!(0,N.ME)(e.getValues("securityProtocol"))){const t=e.getValues("wlan_bands")||[];re(e,t.includes(K._$.AX)?O.r.WPA3_ENTERPRISE:O.r.WPA2_ENTERPRISE)}}},a.createElement(C.sA,{id:"COMMON_HOTSPOT"})),a.createElement(At.A,{reason:t.value!==Ye.IOT&&E?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_DEVICES_TABLE_LIMIT_REACHED_FOR_BAND",values:{band:E.band}}):null},a.createElement(ct.A,{control:e.control,name:"mode",value:Ye.IOT,onCheck:()=>{re(e,O.r.WPA2_PERSONAL),e.setValue("wlan_bands",[K._$.NG],{shouldDirty:!0}),e.setValue("band_steering_enabled",!1,{shouldDirty:!0}),e.setValue("proxy_arp_enabled",!1,{shouldDirty:!0}),e.setValue("bss_transition_enabled",!1,{shouldDirty:!0}),e.setValue("fast_roaming_enabled",!1,{shouldDirty:!0}),e.setValue("dtim_period.auto",!0,{shouldDirty:!0}),e.setValue("group_rekey_interval.enabled",!1,{shouldDirty:!0}),e.setValue("advertise_device_name_in_beacon",!1,{shouldDirty:!0}),e.setValue("dns_assistance.mode",K.J7.OFF,{shouldDirty:!0})}},a.createElement(C.sA,{id:"SETTINGS_IOT"})))))})};var Ot=n(429252),ut=n.n(Ot),pt=n(705145),Pt=n(686716),Rt=n(834042),Ct=n(649192),Dt=n(284428),Mt=n(766624),bt=n(99451);const Ft={[K.wd.SUNDAY]:K.wd.MONDAY,[K.wd.MONDAY]:K.wd.TUESDAY,[K.wd.TUESDAY]:K.wd.WEDNESDAY,[K.wd.WEDNESDAY]:K.wd.THURSDAY,[K.wd.THURSDAY]:K.wd.FRIDAY,[K.wd.FRIDAY]:K.wd.SATURDAY,[K.wd.SATURDAY]:K.wd.SUNDAY},Lt=e=>Ft[e];const ft={[K.wd.MONDAY]:"COMMON_DAY_SHORT_MONDAY",[K.wd.TUESDAY]:"COMMON_DAY_SHORT_TUESDAY",[K.wd.WEDNESDAY]:"COMMON_DAY_SHORT_WEDNESDAY",[K.wd.THURSDAY]:"COMMON_DAY_SHORT_THURSDAY",[K.wd.FRIDAY]:"COMMON_DAY_SHORT_FRIDAY",[K.wd.SATURDAY]:"COMMON_DAY_SHORT_SATURDAY",[K.wd.SUNDAY]:"COMMON_DAY_SHORT_SUNDAY"},gt=[K.wd.MONDAY,K.wd.TUESDAY,K.wd.WEDNESDAY,K.wd.THURSDAY,K.wd.FRIDAY,K.wd.SATURDAY,K.wd.SUNDAY],vt=({form:e})=>{const{formatMessage:t}=(0,C.tz)(),{use24HourTime:n}=(0,l.useSelector)(W.tg),_=(0,Dt.mQ)(),o=(0,a.useRef)(null),i=(0,r.FH)({control:e.control,name:"schedule.mode"}),{field:s}=(0,r.as)({control:e.control,name:"schedule.value"}),E=(0,a.useMemo)(()=>((e,t,n)=>{const a=e.flatMap(e=>function(e){return(e.start_days_of_week||[]).flatMap(t=>function(e){const t=[];let n=e.duration_minutes,a=e.start_hour*Rt.t+e.start_minute,l=e.start_day_of_week;for(;n>0;){const r=Math.min(Rt.pi*Rt.t,a+n)-a;if(r<=0)break;t.push({...e,start_day_of_week:l,start_hour:Math.floor(a/Rt.t),start_minute:a%Rt.t,duration_minutes:r}),n-=r,a=0,l=Lt(l)}return t}({...e,start_day_of_week:t}))}(e));return gt.map(e=>({id:e,label:t({id:ft[e]}),isReadOnly:n,scheduledEvents:a.filter(({start_day_of_week:t})=>t===e).map(t=>{const n=new bt.gX(t.start_hour,t.start_minute);let a=n.copy().add({minutes:t.duration_minutes});return 0===a.hour&&0===a.minute&&(a=a.set({hour:23,minute:59})),{id:`${e}-${t.start_hour}-${t.start_minute}`,label:t.name,isAllDay:23===a.hour&&59===a.minute&&0===n.hour&&0===n.minute,startTime:n,endTime:a}}).filter((e,t,n)=>n.findIndex(t=>t.id===e.id)===t)}))})(s.value||[],t,_),[s.value,t,_]),c=(0,a.useMemo)(()=>({ERROR_START_AFTER_END:t({id:"SETTINGS_START_TIME_CANNOT_BE_AFTER_END_TIME"}),ERROR_START_EQUALS_END:t({id:"SETTINGS_START_TIME_CANNOT_BE_SAME_AS_END_TIME"}),GENERAL_ALL_DAY:t({id:"COMMON_ALL_DAY"}),POPOVER_CANCEL_BUTTON:t({id:"COMMON_ACTION_CANCEL"}),POPOVER_DELETE_BUTTON:t({id:"COMMON_ACTION_DELETE"}),POPOVER_ENDS_AT_LABEL:t({id:"COMMON_ENDS_AT"}),POPOVER_EVENT_PLACEHOLDER:t({id:"COMMON_EVENT"}),POPOVER_SAVE_BUTTON:t({id:"COMMON_ACTION_SAVE"}),POPOVER_STARTS_AT_LABEL:t({id:"COMMON_STARTS_AT"})}),[t]),A=(0,a.useCallback)(e=>{const t=e.flatMap(e=>(e.scheduledEvents||[]).map(t=>({name:t.label,start_days_of_week:[e.id],start_hour:t.startTime.hour,start_minute:t.startTime.minute,duration_minutes:Math.round((t.endTime.hour||24)*Rt.t+t.endTime.minute+(23===t.endTime.hour&&59===t.endTime.minute?1:0)-(t.startTime.hour*Rt.t+t.startTime.minute))})));ut()(s.value||[],t)||s.onChange(t)},[s]);return a.createElement(P.A,{flexDirection:"column"},a.createElement(Je.A,{width:"100%",gap:T.Ln},a.createElement(P.A,{width:"100%",justifyContent:"space-between",alignItems:"center",height:Qe.b},a.createElement(P.A,{gap:T.YC,alignItems:"center"},a.createElement(pt.A,{size:"medium",color:_?"disabled":void 0},a.createElement(C.sA,{id:"COMMON_WIFI_BLACKOUT_SCHEDULE"})),a.createElement(Mt.A,{description:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_SCHEDULER_DESCRIPTION"})})),a.createElement(P.A,null,a.createElement(Ct.A,{form:e,name:"schedule.mode",variant:"capsule",tabs:[{id:Be.OFF,label:a.createElement(C.sA,{id:"COMMON_OFF"})},{id:Be.ON,label:a.createElement(C.sA,{id:"COMMON_ON"})}],onAfterChange:()=>setTimeout(()=>o.current?.scrollIntoView({behavior:"smooth"}),100)}))),i===Be.ON?a.createElement("div",null,a.createElement(P.A,{opacity:_?T.xN:void 0,width:"100%",flexDirection:"column"},a.createElement(Pt.A,{data:E,size:"compact",timeFormat:n?24:12,onChange:A,minuteInterval:15,localizationTexts:c})),a.createElement(je.Ay,{form:e,name:"schedule.value"})):null),a.createElement("div",{ref:o}))};var ht=n(314714),Gt=n(132196);const yt=Gt.AH`
  overflow-x: hidden;
`,Wt=function({control:e,name:t,value:n,children:l,tooltip:_,tooltipProps:o,onToggle:i}){const s=(0,Dt.mQ)();return a.createElement(r.xI,{control:e,name:t,render:({field:e})=>a.createElement(P.A,{gap:T.YC,alignItems:"center",maxWidth:"100%"},a.createElement(ht.A,{id:e.name,name:e.name,onChange:({target:{checked:t}})=>{const a=t?[...e.value||[],n]:(e.value||[]).filter(e=>e!==n);e.onChange(a),i?.(a)},checked:e.value?.includes(n),disabled:s,value:n,className:yt,labelClassName:yt,textClassName:yt},l),_?a.createElement(Mt.A,{description:_,...o}):null)})},Ut={[K._$.NG]:"COMMON_RADIO_BAND_NG",[K._$.NA]:"COMMON_RADIO_BAND_NA",[K._$.AX]:"COMMON_RADIO_BAND_6E"};var Vt=n(170459);const wt=[K._$.NG,K._$.NA,K._$.AX],zt=({form:e,existingRecord:t})=>{const n=(0,l.useSelector)(x.K8),_=(0,l.useSelector)(z.kx),o=(0,l.useSelector)(u.b),i=Tt({form:e,existingRecord:t}),E=(0,r.FH)({control:e.control,name:"mode"}),c=(0,r.FH)({control:e.control,name:"wlan_bands"}),A=(0,r.FH)({control:e.control,name:"securityProtocol"});return a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_WI_FI_BAND_VALUE_NA_TOOLTIP"})},a.createElement(C.sA,{id:"COMMON_RADIO_BAND"})),a.createElement(At.A,{reason:E===Ye.IOT?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_WLAN_BANDS_DISABLED"}):null},a.createElement(Ze.A,null,wt.map(l=>{const r=c.includes(l)?void 0:((e,t)=>(0,_t.Ly)(e,{type:ot.p.SSID_LIMIT_EXCEEDED,band:t})?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_DEVICES_TABLE_LIMIT_REACHED_FOR_BAND",values:{band:t}}):t===K._$.AX?(0,_t.Ly)(e,{type:ot.p.WLAN_BAND_REGION_BLOCKED,band:t})?a.createElement(C.sA,{id:"SETTINGS_WIFI_6GHZ_REGION_BLOCKED"}):(0,_t.Ly)(e,{type:ot.p.WLAN_BAND_NOT_SUPPORTED,band:t})?a.createElement(C.sA,{id:"SETTINGS_WIFI_6GHZ_NO_WPA3_SUPPORT"}):(0,_t.Ly)(e,{type:ot.p.PPSK_NOT_SUPPORTED_WITH_BAND,band:t})?a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_6GHZ_DISABLED"}):(0,_t.Ly)(e,{type:ot.p.NO_DEVICE_SUPPORTS_BAND,band:t})?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_DEVICES_TABLE_NO_6G_IN_AP"}):void 0:void 0)((0,rt.d)((0,_t.uc)(i,[l]),o),l);return a.createElement(At.A,{key:l,reason:r},a.createElement(Wt,{control:e.control,name:"wlan_bands",value:l,onToggle:a=>{a.length<2&&(e.setValue("mlo_enabled",!1),e.setValue("band_steering_enabled",!1),a.includes(K._$.AX))&&(e.setValue("advanced",s.C.MANUAL),Q.includes(A)||e.setValue("securityProtocol",O.r.WPA3_PERSONAL));const l=Ve(e.getValues("broadcasting_aps"),{apGroups:n}),r=_.some(({mac:e,radio_table:t,support_wifi6e:n})=>l.has(e)&&(0,Vt.bV)({radio_table:t,support_wifi6e:n})),o=(i={mlo_enabled:e.getValues("mlo_enabled"),securityProtocol:e.getValues("securityProtocol"),wlan_bands:a},E={securityProtocol:e.getFieldState("securityProtocol").isTouched},c=!!t,d=r,i.mlo_enabled?(0,N.Ni)(i.securityProtocol):i.securityProtocol===O.r.OPEN?O.r.OPEN:c&&i.wlan_bands?.includes(K._$.AX)&&q.includes(i.securityProtocol)?i.securityProtocol:c||E.securityProtocol||!i.wlan_bands?.includes(K._$.AX)||1!==i.wlan_bands.length?i.wlan_bands?.includes(K._$.AX)?(0,N.Ow)(i.securityProtocol):c||E.securityProtocol||!d?i.securityProtocol:O.r.WPA23_PERSONAL:(0,N.Ni)(i.securityProtocol));var i,E,c,d;re(e,o),o===O.r.OPEN&&1===a.length&&a.includes(K._$.AX)&&(e.setValue("security_mode",O.I.ENHANCED_OPEN),e.setValue("pmf_mode",K.ns.REQUIRED)),e.trigger("wlan_bands")}},a.createElement(C.sA,{id:Ut[l]})))}))),a.createElement(je.Ay,{form:e,name:"wlan_bands"}))};var Ht=n(895424),kt=n(222190);const xt=({form:e})=>a.createElement(a.Fragment,null,a.createElement(Ht.A,{control:e.control,name:"wep_key.password",passwordToggle:!0,type:"password",label:a.createElement(C.sA,{id:"COMMON_PASSWORD"})}),a.createElement(P.A,{width:100},a.createElement(kt.A,{control:e.control,name:"wep_key.index",min:1,max:4,step:1,label:a.createElement(C.sA,{id:"COMMON_KEY_INDEX"}),tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_GENERAL_FIELD_WEP_IDX_DESCRIPTION"})}))),Bt=({form:e})=>a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"uapsd_enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_UAPSD_LABEL_DESC"})},a.createElement(C.sA,{id:"COMMON_UAPSD"})));var Yt=n(332977);const Kt=[O.r.WEP,O.r.WPA12_PERSONAL,O.r.WPA12_ENTERPRISE,O.r.WPA1_PERSONAL,O.r.WPA1_ENTERPRISE,O.r.HOTSPOT_2_OSEN],$t=[O.r.OPEN,O.r.WEP,O.r.WPA12_PERSONAL,O.r.WPA12_ENTERPRISE,O.r.WPA1_PERSONAL,O.r.WPA1_ENTERPRISE,O.r.WPA2_PERSONAL,O.r.WPA2_ENTERPRISE,O.r.WPA23_PERSONAL,O.r.WPA23_ENTERPRISE,O.r.WPA3_PERSONAL,O.r.WPA3_ENTERPRISE,O.r.HOTSPOT_2_OSEN],jt=({form:e,existingRecord:t,initialSecurityProtocol:n})=>{const{formatMessage:_}=(0,C.tz)(),o=(0,l.useSelector)(Yt.W1),i=(0,l.useSelector)(x.K8),s=(0,l.useSelector)(z.n4),E=(0,l.useSelector)(g.AP),c=(0,r.FH)({control:e.control,name:"wlan_bands"}),A=(0,a.useMemo)(()=>c||[],[c]),d=(0,r.FH)({control:e.control,name:"securityProtocol"})||O.r.OPEN,m=(0,r.FH)({control:e.control,name:"private_preshared_keys.enabled"})||!1,I=(0,r.FH)({control:e.control,name:"mode"})||Ye.STANDARD,S=(0,r.FH)({control:e.control,name:"mlo_enabled"})||!1,T=(0,r.FH)({control:e.control,name:"hotspot.type"}),N=(0,r.FH)({control:e.control,name:"broadcasting_aps"}),u=t?.attr_hidden_id===K.Ir.UID,p=A.includes(K._$.AX),P=Ve(N,{apGroups:i}),R=s.filter(({mac:e})=>P.has(e)),D=be({countryCode:E,broadcastingDevices:R}),M=(0,a.useMemo)(()=>$t.flatMap(e=>{const t=d===e,a=n===e;if(!t&&(ne.includes(e)&&!o||ae.includes(e)&&u||Kt.includes(e)&&!a))return[];const l=t?void 0:((e,t,n)=>e===O.r.OPEN&&n.isStrictSecurity?t({id:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_OPEN_DISABLED_REGULATIONS_TOOLTIP"}):n.is6GhzEnabled&&!q.includes(e)||n.is6GhzEnabled&&1===n.wlan_bands.length&&!Q.includes(e)?t({id:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_DISABLED_6GHZ"},{protocol:t({id:De.z[e]})}):n.mlo_enabled&&!Z.includes(e)?t({id:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_DISABLED_MLO"},{protocol:t({id:De.z[e]})}):n.mode!==Ye.IOT||J.includes(e)?n.hotspot_type!==Ee.PASSPOINT||ee.includes(e)?n.private_preshared_keys_enabled&&!te.includes(e)?t({id:"SETTINGS_WIFI_FORM_PPSK_FEATURE_DISABLED"},{feature:t({id:De.z[e]})}):void 0:t({id:"SETTINGS_WIFI_FORM_PASSPOINT_FEATURE_DISABLED"},{feature:t({id:De.z[e]})}):t({id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED"},{feature:t({id:De.z[e]})}))(e,_,{isStrictSecurity:D,is6GhzEnabled:p,hotspot_type:T,mlo_enabled:S,mode:I,private_preshared_keys_enabled:m,wlan_bands:A});return[{value:e,disabled:!!l,tooltipDescription:l,label:_({id:De.z[e]})}]}),[_,o,T,n,p,m,D,u,S,I,d,A]);return a.createElement(st.A,{...nt.A.addDataTestId(nt.A.TestId.WIFI_SECURITY_PROTOCOLS)},a.createElement(Xe.A,{control:e.control,name:"securityProtocol",label:a.createElement(C.sA,{id:"COMMON_SECURITY_PROTOCOL"}),options:M,onChange:t=>re(e,t),disableValidationMessage:!0}))},Xt=({form:e})=>a.createElement(P.A,{width:130},a.createElement(kt.A,{control:e.control,name:"sae_sync_time",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_SAE_SYNC_TIME_DESC"}),label:a.createElement(C.sA,{id:"COMMON_SAE_SYNC_TIME"}),min:1,max:Ge})),qt=({form:e})=>a.createElement(P.A,{width:130},a.createElement(kt.A,{control:e.control,name:"sae_anti_clogging",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_SAE_ANTI_CLOGGING_DESC"}),label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA3_SAE_ANTI_CLOGGING"}),min:1,max:Ge}));var Qt=n(758649),Jt=n(264184);const Zt=({form:e,root:t})=>{const n=(0,Dt.mQ)(),_=(0,l.useDispatch)(),o=(0,l.useSelector)(v.selectAllRadiusProfiles),i=(0,l.useSelector)(v.selectDefaultRadiusProfileId),s=(0,a.useMemo)(()=>o.map(({_id:e,name:t})=>({label:t,value:e})),[o]),E=(0,a.useMemo)(()=>s.filter(({value:e})=>e!==i),[s,i]),c=(0,r.FH)({control:e.control,name:`${t}.localProfile`}),A=(0,a.useCallback)(()=>{_((0,R.XP)({type:S.H.CUSTOM_RADIUS_PROFILE,id:Y.R6}))},[_]);return a.createElement(a.Fragment,null,a.createElement(Et.A,null,a.createElement(ct.A,{control:e.control,name:`${t}.localProfile`,onCheck:()=>{"radius_profile"===t&&e.setValue("das_dac_coa_enabled",!1,{shouldDirty:!0})},value:!0},a.createElement(C.sA,{id:"COMMON_LOCAL"})),a.createElement(ct.A,{control:e.control,name:`${t}.localProfile`,value:!1},a.createElement(C.sA,{id:"COMMON_EXTERNAL_RADIUS_SERVER"}))),c?null:a.createElement(a.Fragment,null,E.length?a.createElement(P.A,{gap:T.kc},a.createElement(Xe.A,{control:e.control,name:`${t}.profile_id`,options:E,label:a.createElement(C.sA,{id:"COMMON_RADIUS_PROFILE"}),tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_PROFILE_DESC"}),onChange:n=>{e.setValue(`${t}.profile_id`,n,{shouldDirty:!0});const a=o.find(({_id:e})=>e===n);"radius_profile"===t&&a&&(0,Jt.NM)(a)&&!a.accounting_enabled&&e.setValue("das_dac_coa_enabled",!1,{shouldDirty:!0})}}),a.createElement(Qt.A,{type:"button",size:"medium",variant:"inline",onClick:A,disabled:n,style:{marginTop:20},...nt.A.addDataTestId(nt.A.TestId.SIDE_PANEL_TRIGGER)},a.createElement(C.sA,{id:"COMMON_NEW"}))):a.createElement(P.A,{flexDirection:"column",gap:T.kc,alignItems:"flex-start"},a.createElement(je.Ay,{form:e,name:`${t}.profile_id`}),a.createElement(Qt.A,{type:"button",size:"medium",variant:"inline",onClick:A,disabled:n,...nt.A.addDataTestId(nt.A.TestId.SIDE_PANEL_TRIGGER)},a.createElement(C.sA,{id:"SETTINGS_VPN_CONNECT_RADIUS_SERVER"})))))},en=[{value:K.VZ.NONE_LOWER,label:"aabbccddeeff"},{value:K.VZ.HYPHEN_LOWER,label:"aa-bb-cc-dd-ee-ff"},{value:K.VZ.COLON_LOWER,label:"aa:bb:cc:dd:ee:ff"},{value:K.VZ.NONE_UPPER,label:"AABBCCDDEEFF"},{value:K.VZ.HYPHEN_UPPER,label:"AA-BB-CC-DD-EE-FF"},{value:K.VZ.COLON_UPPER,label:"AA:BB:CC:DD:EE:FF"}],tn=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"private_preshared_keys.enabled"}),n=(0,r.FH)({control:e.control,name:"radius_mac_authentication.enabled"}),l=(0,r.FH)({control:e.control,name:"securityProtocol"});return a.createElement(a.Fragment,null,a.createElement(At.A,{reason:t?a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_RADIUS_MAC_AUTH_DISABLED"}):null},a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"radius_mac_authentication.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_MAC_AUTHENTICATION_DESC"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_MAC_AUTHENTICATION_LABEL"})))),n?a.createElement(a.Fragment,null,l===O.r.HOTSPOT_2_OSEN||(0,N.ME)(l)?null:a.createElement(Zt,{form:e,root:"radius_mac_authentication.profile"}),a.createElement(Xe.A,{control:e.control,name:"radius_mac_authentication.format",options:en,label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_MAC_ADDRESS_FORMAT_LABEL"})})):null)},nn=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"mode"});return a.createElement(Ze.A,null,a.createElement(At.A,{reason:t===Ye.IOT?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED",values:{feature:a.createElement(C.sA,{id:"COMMON_PROXY_ARP"})}}):null},a.createElement(qe.A,{control:e.control,name:"proxy_arp_enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PROXY_ARP_LABEL_DESC"})},a.createElement(C.sA,{id:"COMMON_PROXY_ARP"}))))};var an=n(41343),ln=n(784045),rn=n(424815),_n=n(786649),on=n(959207);const sn=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"private_preshared_keys.items"}),n=(0,l.useSelector)(G.Ct),{formatMessage:_}=(0,C.tz)(),o=(0,a.useCallback)(()=>{const a=new Map;n.forEach(e=>a.set(e._id,e));const l=(t||[]).flatMap(e=>{const t=a.get(e.network_id);if(!t)return[];const n=(0,on.nz)(t)?"":t.vlan,l=(0,on.nz)(t)?_({id:"SETTINGS_NATIVE_NETWORK"}):t.name;return[[n,e.password,l]]}),r=[_({id:"COMMON_VLAN_ID"}),_({id:"COMMON_PASSWORD"}),_({id:"COMMON_NETWORK"})],o=new Blob([(0,_n.l)([r,...(0,ln.A)(l,[e=>e[0],e=>e[1]])])],{type:"text/csv"});(0,rn.P)(`${e.getValues("name")||"wifi"}-ppsk.csv`,o)},[n,t,_,e]);return a.createElement($e.A,{type:"button",fontSize:"medium",onClick:o},a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_DOWNLOAD_CSV"}))},En=(e,t,n,l,r)=>e?null:n.includes(K._$.AX)||(0,N.tw)(t)||(0,N.C1)(t)||l===Ye.HOTSPOT&&r===Ee.PASSPOINT||(0,N.ME)(t)||t===O.r.OPEN?a.createElement(C.sA,{id:"SETTINGS_WIFI_PRE_SHARED_KEYS_DISABLED"}):null;var cn,An=n(744809),dn=n.n(An),mn=n(588915),In=n(258840),Sn=n(822336),Tn=n(271856),Nn=n(963070),On=n(823858),un=n(382389),pn=n(596441),Pn=n(573531),Rn=n(115829),Cn=n(938325),Dn=n(49992);!function(e){e.NO_NETWORK_FOUND_FOR_VLAN="NO_NETWORK_FOUND_FOR_VLAN",e.PARSE_ERROR="PARSE_ERROR",e.INVALID_PASSWORD="INVALID_PASSWORD"}(cn||(cn={}));const Mn={[cn.NO_NETWORK_FOUND_FOR_VLAN]:"SETTINGS_WIFI_PPSK_UPLOAD_ERROR_NO_NETWORK_FOUND",[cn.PARSE_ERROR]:"SETTINGS_WIFI_PPSK_UPLOAD_ERROR_PARSE",[cn.INVALID_PASSWORD]:"SETTINGS_WIFI_PPSK_UPLOAD_ERROR_INVALID_PASSWORD"},bn=({errors:e})=>{const{themeName:t}=(0,un.u)();return e.length?a.createElement(Tn.A,{description:a.createElement(P.A,{flexDirection:"column",gap:T.Ln},e.map(e=>a.createElement(pt.A,{variant:"inherit"},a.createElement(C.sA,{id:Mn[e]})))),portal:!0},a.createElement(On.A,{variant:"fill",color:Sn.Ay[`desktop-color-orange-06-${t}`],size:"original"})):null},Fn=[{id:"index",label:null,renderCell:({index:e})=>a.createElement(a.Fragment,null,e+1),growthFactor:1},{id:"network",growthFactor:100,label:a.createElement(C.sA,{id:"COMMON_NETWORK"}),renderCell:({network:e,errors:t})=>a.createElement(Rn.A,{color:t.length?"disabled":"inherit"},e&&(0,on.nz)(e)?a.createElement(C.sA,{id:"SETTINGS_NATIVE_NETWORK"}):e?.name||Pn.L)},{id:"vlanId",growthFactor:40,label:a.createElement(C.sA,{id:"COMMON_VLAN_ID"}),renderCell:({vlanId:e,errors:t})=>a.createElement(pt.A,{isTruncated:!0,size:"inherit",color:t.length?"disabled":"inherit"},e||Pn.L)},{id:"password",growthFactor:100,label:a.createElement(C.sA,{id:"COMMON_PASSWORD"}),renderCell:({password:e,errors:t})=>a.createElement(Rn.A,{color:t.length?"disabled":"inherit"},e)},{id:"errors",label:null,renderCell:({errors:e})=>a.createElement(bn,{errors:e}),growthFactor:1}],Ln=ce.z.tuple([ce.z.coerce.number(),ce.z.string()]).rest(ce.z.unknown()),fn=({onDismiss:e,onSubmit:t,fileData:n,form:_})=>{const o=(0,l.useSelector)(G.L4),i=(0,a.useMemo)(()=>o.filter(e=>!(0,on.uH)(e)),[o]),s=(0,r.FH)({control:_.control,name:"broadcasting_aps"}),E=(0,l.useSelector)(g.AP),c=(0,l.useSelector)(x.K8),A=(0,l.useSelector)(z.n4),d=(0,a.useMemo)(()=>Ve(s,{apGroups:c}),[c,s]),m=(0,a.useMemo)(()=>A.filter(e=>d.has(e.mac)),[A.length,d]),I=be({broadcastingDevices:m,countryCode:E}),S=(0,a.useMemo)(()=>{const e=i.find(on.nz),t=new Map;return i.forEach(e=>{const n=(0,Cn.mM)(e.vlan,(0,on.nz)(e));t.set(n,e)}),n.flatMap((n,a)=>{const l=Ln.safeParse(n);if(l.error&&0===a)return[];if(l.error)return[{id:a.toString(),index:a,vlanId:null,password:null,network:null,errors:[cn.PARSE_ERROR]}];const r=l.data[0]?t.get(l.data[0]):e;if(!r)return[{id:a.toString(),index:a,vlanId:l.data[0],password:l.data[1],network:null,errors:[cn.NO_NETWORK_FOUND_FOR_VLAN]}];const _=l.data[1],o=Oe(I).isValidSync(_);return[{id:a.toString(),index:a,vlanId:l.data[0],password:_,network:r,errors:o?[]:[cn.INVALID_PASSWORD]}]})},[n,I,i]);return a.createElement(Dn.Ay,{initialValues:{},onDismiss:e,onSubmit:()=>{t(S.flatMap(({password:e,network:t,errors:n})=>t&&!n.length&&e?[{network_id:t._id,password:e}]:[]))},title:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_UPLOAD"}),submitAction:a.createElement(Qt.A,{type:"submit",variant:"primary"},a.createElement(C.sA,{id:"COMMON_ACTION_APPLY"}))},a.createElement(P.A,{gap:T.Ln,flexDirection:"column"},a.createElement(at.A,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_UPLOAD_INFORMATION"})),a.createElement(P.A,{height:pn.I.getHeight(S.length,8.5,pn.I.ROW_HEIGHT),paddingBottom:T.Ln,overflowY:"auto"},a.createElement(Nn.A,{idField:"id",columns:Fn,items:S,disableColumnFilters:!0}))))},gn=({form:e})=>{const t=(0,Dt.mQ)(),[n,l]=(0,a.useState)(null),r=(0,a.useCallback)(async({target:{files:e},currentTarget:t})=>{const n=e?.[0];if(!n)return;const a=await(0,In.Gu)(n),{data:r}=dn().parse(a);l(r),t.value=""},[]);return a.createElement(a.Fragment,null,a.createElement(mn.A,{disabled:t,name:"file",variant:"inline",onChange:r,accept:"text/csv",size:"medium"},a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_UPLOAD_CSV"})),n?a.createElement(fn,{fileData:n,onDismiss:()=>{l(null)},onSubmit:t=>{e.setValue("private_preshared_keys.items",t,{shouldDirty:!0,shouldTouch:!0}),l(null)},form:e}):null)};var vn=n(438628),hn=n(805837),Gn=n(217439),yn=n(369596);const Wn=Gt.AH`
  color: unset !important;
`,Un=Gt.AH`
  color: currentColor !important;
`,Vn=[{getNewFieldIndex:()=>0,id:"network_id"},{getNewFieldIndex:()=>1,id:"password"}],wn=[{id:"network",width:112,growthFactor:0,label:a.createElement(C.sA,{id:"COMMON_NETWORK"}),renderCell:({network:e})=>e&&(0,on.nz)(e)?a.createElement(C.sA,{id:"SETTINGS_NATIVE_NETWORK"}):e?.name||Pn.L},{id:"vlan",width:36,growthFactor:0,label:a.createElement(C.sA,{id:"COMMON_ID"}),renderCell:({vlan:e,network:t})=>t&&(0,on.nz)(t)?Pn.L:e||Pn.L},{id:"password",growthFactor:1,label:a.createElement(C.sA,{id:"COMMON_PASSWORD"}),renderCell:({password:e})=>a.createElement(vn.A,{name:"empty-password",type:"password",value:e,disabled:!0,passwordToggle:!0,iconClassName:Un,inputClassName:Wn})},{id:"id",label:null,renderCell:()=>null,width:50,growthFactor:0}],zn=me.A.string().label("COMMON_NETWORK").required(),Hn=({form:e,children:t})=>{const{formatMessage:n}=(0,C.tz)(),_=(0,Dt.mQ)(),o=(0,Ae.L_)(),{field:i,fieldState:s,formState:E}=(0,r.as)({control:e.control,name:"private_preshared_keys.items"}),c=(0,r.FH)({control:e.control,name:"broadcasting_aps"}),A=(0,l.useSelector)(g.AP),d=(0,l.useSelector)(G.RR),m=(0,l.useSelector)(z.n4),I=(0,l.useSelector)(x.K8),S=(0,a.useMemo)(()=>d.filter(e=>!(0,on.uH)(e)),[d]),T=(0,a.useMemo)(()=>S.find(e=>(0,on.nz)(e)),[S]),N=(0,a.useMemo)(()=>((e,t)=>[{id:"network_id",name:"network_id",type:"dropdown",portal:!0,options:e.map(e=>({value:e._id,label:(0,on.nz)(e)?t({id:"SETTINGS_NATIVE_NETWORK"}):e.name,additionalInfo:(0,on.nz)(e)?void 0:a.createElement(Gn.A,{variant:"caption"},e.vlan)})),label:"COMMON_NETWORK",validated:!0,inline:!0,renderOption:hn.q},{id:"password",name:"password",type:"password",label:"COMMON_PASSWORD",validated:!0,variant:"secondary",passwordToggle:!0,inline:!0}])(S,n),[S,n]),O=(0,a.useMemo)(()=>(0,ln.A)((i.value||[]).map(({network_id:e,password:t},n)=>{const a=S.find(({_id:t})=>t===e);return{id:n.toString(),index:n,network:a,network_id:e,password:t,vlan:(0,Cn.mM)(a?.vlan,!!a&&(0,on.nz)(a))}}),[e=>e.vlan,e=>e.password]),[i.value,S]),u=(0,a.useMemo)(()=>Ve(c,{apGroups:I}),[I,c]),p=(0,a.useMemo)(()=>m.filter(e=>u.has(e.mac)),[m,u]),P=be({broadcastingDevices:p,countryCode:A}),R=(0,a.useMemo)(()=>(e=>{const t=t=>e.test({name:"isPasswordUnique",message:a.createElement(C.sA,{id:"SETTINGS_EACH_PASSWORD_MUST_BE_UNIQUE"}),test:(e,n)=>{const a=t??n.parent,l=a.list.filter(({password:t})=>t===e).length;return a.editActive?l<=1:!l}});return me.A.lazy(e=>me.A.object().shape({editActive:me.A.boolean(),network_id:me.A.string().when("editActive",{is:!1,then:zn}),password:me.A.string().when("editActive",{is:!1,then:t()}),list:me.A.array().when("editActive",{is:!0,then:me.A.array().of(me.A.object().shape({network_id:zn,password:t(e)}))})}))})(Oe(P)),[P]);return a.createElement(yn.A,{isDisabledOverride:_,editable:!_,invalid:s.invalid&&s?.error?.message?o((0,r.Jt)(E.errors,"private_preshared_keys.items")?.message):null,fieldName:"list",idField:"id",editColumns:Vn,columns:wn,initialValues:{list:O,editActive:!1,network_id:T?._id,password:""},isWindowTable:!0,newFields:N,validationSchema:R,onAddItem:({network_id:e,password:t})=>i.onChange([{network_id:e,password:t},...i.value||[]]),onRemoveItem:({index:e})=>i.onChange((i.value||[]).filter((t,n)=>n!==e)),onEditSubmit:e=>i.onChange(e.map(({network_id:e,password:t})=>({network_id:e,password:t})))},t)};var kn=n(621690),xn=n(951272),Bn=n(74750),Yn=n(742920);function Kn(e,t){try{return t()}catch{return e}}const $n="0123456789",jn="abcdefghijklmnopqrstuvwxyz",Xn=jn+jn.toUpperCase()+$n,qn=`${jn+jn.toUpperCase()+$n}!@#$%^&*()_+`;var Qn;!function(e){e.NUMERIC="NUMERIC",e.ALPHANUMERIC="ALPHANUMERIC",e.COMPLEX="COMPLEX"}(Qn||(Qn={}));var Jn,Zn=n(121931),ea=n(147606),ta=n(143811),na=n(675359),aa=n(257801),la=n(634229),ra=n(348466);!function(e){e.EXISTING="EXISTING",e.NEW="NEW"}(Jn||(Jn={}));const _a=/^\d+$/,oa=e=>(0,an.A)(e.split(ra.KE).map(e=>e.trim()).flatMap(e=>{const t=e.split(ra.jr);if(1===t.length){if(!_a.test(t[0]))throw new Error("Invalid characters");const e=Number(t[0]);if(e>aa.C.MAX_VLAN||e<aa.C.MIN_VLAN)throw new Error("Invalid value of single VLAN");return[e]}if(2===t.length){const[t,n]=e.split(ra.jr);if(!_a.test(t)||!_a.test(n))throw new Error("Invalid characters");const a=Number(t),l=Number(n);if(a>=l||l>aa.C.MAX_VLAN||a<aa.C.MIN_VLAN)throw new Error("Invalid value of VLAN range");return(0,kn.A)(Number(t),Number(n)+1)}throw new Error("Invalid range")})),ia=[Qn.NUMERIC,Qn.ALPHANUMERIC,Qn.COMPLEX],sa={[Qn.NUMERIC]:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_COMPLEXITY_NUMERIC",[Qn.ALPHANUMERIC]:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_COMPLEXITY_ALPHANUMERIC",[Qn.COMPLEX]:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_COMPLEXITY_COMPLEX"},Ea={[Qn.NUMERIC]:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_COMPLEXITY_NUMERIC_TOOLTIP",[Qn.ALPHANUMERIC]:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_COMPLEXITY_ALPHANUMERIC_TOOLTIP",[Qn.COMPLEX]:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_COMPLEXITY_COMPLEX_TOOLTIP"},ca=({onDismiss:e,onSubmit:t,initialValues:n})=>{const r=(0,l.useDispatch)(),{formatMessage:_}=(0,C.tz)(),o=(0,l.useSelector)(G.Ct),i=(0,l.useSelector)(G.RR),s=(0,a.useMemo)(()=>i.filter(e=>!(0,on.uH)(e)).map(e=>({label:(0,on.nz)(e)?_({id:"SETTINGS_NATIVE_NETWORK"}):e.name,value:e._id,additionalInfo:!(0,on.nz)(e)&&e.vlan?e.vlan.toString():void 0})),[_,i]),E=(0,a.useMemo)(()=>({network_type:Jn.EXISTING,network_ids:[],length:10,password_prefix:"",complexity:Qn.NUMERIC,template_id:"",vlan_ids:"",...n}),[n]),c=(0,a.useCallback)(async e=>{const n=[];let a=e.network_ids;if(e.network_type===Jn.NEW)try{const t=await r((0,la.rN)(e.template_id,oa(e.vlan_ids)));await r((0,la.Sk)(void 0,{resolveWithExisting:!1})),a=t.map(({networkconf_id:e})=>e)}catch{return void r((0,na.ox)({type:Yn.C.danger,message:"SETTINGS_WIFI_PPSK_GENERATE_NETWORKS_FAILED"}))}t(a.map(t=>{const a=((e,t,n,a)=>{const l=e===Qn.NUMERIC?$n:e===Qn.ALPHANUMERIC?Xn:qn;for(let e=0;e<100;e+=1){let e="";for(let a=t.length;a<n;a+=1)e+=l.charAt(Math.floor(Math.random()*l.length));const r=`${t}${e}`;if(!a.includes(r))return r}throw new Error("Failed to generate a unique password, tried 100 times but only came up with duplicates")})(e.complexity,e.password_prefix,e.length,n);return n.push(a),{network_id:t,password:a}}))},[r,t]),A=(0,a.useMemo)(()=>i.filter(e=>!(0,on.uH)(e)).map(e=>({label:e.name,value:e._id})),[i]);return a.createElement(xn.l1,{initialValues:E,onDismiss:e,onSubmit:c,header:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS"}),validationSchema:(d=o,me.A.object().shape({network_ids:me.A.array().when("network_type",{is:Jn.EXISTING,then:me.A.array().required(a.createElement(C.sA,{id:"COMMON_VALIDATION_NETWORK"})).min(1,a.createElement(C.sA,{id:"COMMON_VALIDATION_NETWORK"}))}),vlan_ids:me.A.string().when("network_type",{is:Jn.NEW,then:me.A.string().required(a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_VLAN_IDS_VALIDATION",values:{min:aa.C.MIN_VLAN,max:aa.C.MAX_VLAN}})).test({name:"isValidVlanRange",test:(e,t)=>{const n=Kn(null,()=>oa(e));if(!n?.length)return t.createError({message:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_VLAN_IDS_VALIDATION",values:{min:aa.C.MIN_VLAN,max:aa.C.MAX_VLAN}})});const l=d.find(e=>n.includes(e.vlan));return!l||t.createError({message:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_VLAN_ALREADY_USED",values:{network:l.name,vlan:l.vlan}})})}}).test("isNumberOfVlansWithinRange",a.createElement(C.sA,{id:"SETTINGS_VLAN_COUNT_EXCEEDS_MAX",values:{limit:255}}),e=>{const t=Kn(null,()=>oa(e));return!t?.length||t.length+d.length<=255})}),template_id:me.A.string().when("network_type",{is:Jn.NEW,then:me.A.string().required(a.createElement(C.sA,{id:"SETTINGS_VALIDATION_SELECT_A_NETWORK"}))}),length:me.A.number().label("SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_LENGTH").integer().max(63).test({name:"isLengthValid",test:(e,t)=>{const n=Math.min(63,Math.max(8,(t.parent.password_prefix||"").length+4));return e&&e>=n||t.createError({message:a.createElement(C.sA,{id:"COMMON_VALIDATION_MIN",values:{min:n,name:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_LENGTH"})}})})}}).required(),password_prefix:me.A.string().label("SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_PREFIX").max(28)}))},({submitForm:t,values:n,isValid:l,isSubmitting:r})=>{const _=Kn([],()=>oa(n.vlan_ids));return a.createElement(Zn.A,null,a.createElement(Je.A,null,a.createElement(Et.A,null,a.createElement(ta.A,{type:"radio",name:"network_type",value:Jn.EXISTING},a.createElement(C.sA,{id:"COMMON_EXISTING"})),a.createElement(ta.A,{type:"radio",name:"network_type",value:Jn.NEW},a.createElement(C.sA,{id:"COMMON_NEW"}))),n.network_type===Jn.EXISTING?a.createElement(ta.A,{type:"picklist",name:"network_ids",truncateLabels:!0,isFullWidth:!0,options:s,triggerButtonText:"COMMON_SELECT",label:a.createElement(C.sA,{id:"COMMON_NETWORKS"}),selectAllText:"COMMON_ACTION_SELECT_ALL"}):null,n.network_type===Jn.NEW?a.createElement(a.Fragment,null,a.createElement(ta.A,{name:"vlan_ids",variant:"secondary",label:a.createElement(C.sA,{id:"SETTINGS_VLAN_IDS"}),placeholder:"COMMON_PLACEHOLDER_EG",placeholderValues:{value:"1-3, 7-10"},width:"100%"}),a.createElement(P.A,{width:"100%",flexDirection:"column"},a.createElement(ta.A,{name:"template_id",variant:"secondary",type:"dropdown",options:A,renderOption:hn.q,validated:!0,label:a.createElement(it.A,{htmlFor:"template_id",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_VLAN_CONFIGURATION_DESCRIPTION"})},a.createElement(C.sA,{id:"SETTINGS_VLAN_CONFIGURATION"})),full:!0}))):null,a.createElement(pt.A,{variant:"heading-medium"},a.createElement(C.sA,{id:"SETTINGS_PASSWORDS"})),a.createElement(ta.A,{type:"text",variant:"secondary",name:"password_prefix",width:"100%",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_PREFIX"}),labelTooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_PREFIX_TOOLTIP"}),labelTooltipProps:{portal:!0}}),a.createElement(ta.A,{type:"number",variant:"secondary",name:"length",width:"100%",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_LENGTH"}),labelTooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_LENGTH_TOOLTIP"}),labelTooltipProps:{portal:!0}}),a.createElement(st.A,null,a.createElement(it.A,{htmlFor:"complexity"},a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS_COMPLEXITY"})),a.createElement(Et.A,{gap:T.kc},ia.map(e=>a.createElement(ta.A,{type:"radio",name:"complexity",value:e,tooltipMessage:a.createElement(C.sA,{id:Ea[e]}),key:e},a.createElement(C.sA,{id:sa[e]}))))),a.createElement(P.A,{gap:T.kc},l&&_?.length&&n.network_type===Jn.NEW?a.createElement(ea.A,{title:a.createElement(C.sA,{id:"COMMON_ARE_YOU_SURE"}),message:a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_CONFIRM_MESSAGE",values:{count:_?.length||0}}),onConfirm:()=>{t()},trigger:a.createElement(Bn.A,{type:"button",size:"small",isPending:r},a.createElement(On.A,{size:"medium",variant:"fill"}),a.createElement(C.sA,{id:"COMMON_ACTION_CREATE"}))}):a.createElement(Bn.A,{type:"button",size:"small",onPress:()=>{t()},isPending:r},a.createElement(C.sA,{id:"COMMON_ACTION_CREATE"})),a.createElement(Bn.A,{type:"button",variant:"tertiary-neutral",size:"small",onPress:e},a.createElement(C.sA,{id:"COMMON_ACTION_CANCEL"})))))});var d},Aa=({form:e})=>{const t=(0,Dt.mQ)(),n=(0,l.useSelector)(x.K8),_=(0,l.useSelector)(g.AP),o=(0,l.useSelector)(z.n4),i=(0,r.FH)({control:e.control,name:"private_preshared_keys.enabled"}),s=(0,r.FH)({control:e.control,name:"private_preshared_keys.items"})||[],E=(0,r.FH)({control:e.control,name:"wlan_bands"})||[],c=(0,r.FH)({control:e.control,name:"securityProtocol"}),A=(0,r.FH)({control:e.control,name:"hotspot.type"}),d=(0,r.FH)({control:e.control,name:"mode"}),[m,I]=(0,a.useState)(!1);return a.createElement(Je.A,null,a.createElement(Ze.A,null,a.createElement(At.A,{reason:En(i,c,E,d,A)},a.createElement(qe.A,{control:e.control,name:"private_preshared_keys.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_PRIVATE_PRE_SHARED_KEYS_TOOLTIP"}),onToggle:t=>{if(!t)return;const a=e.getValues("private_preshared_keys.items");if(a?.length)return;const l=Ve(e.getValues("broadcasting_aps"),{apGroups:n}),r=o.filter(e=>l.has(e.mac)),i=be({broadcastingDevices:r,countryCode:_}),s=pe(i).safeParse(e.getValues("password"));s.success&&e.setValue("private_preshared_keys.items",[{password:s.data,network_id:e.getValues("network_id")}],{shouldDirty:!0,shouldTouch:!0})}},a.createElement(C.sA,{id:"COMMON_PRIVATE_PRE_SHARED_KEYS"})))),i?a.createElement(a.Fragment,null,a.createElement(Hn,{form:e}),a.createElement(P.A,{gap:T.xO},s.length?a.createElement($e.A,{type:"button",variant:"destructive",fontSize:"medium",isDisabled:t,onClick:()=>{e.setValue("private_preshared_keys.items",[],{shouldDirty:!0,shouldTouch:!0})}},a.createElement(C.sA,{id:"COMMON_ACTION_CLEAR"})):null,a.createElement($e.A,{isDisabled:t,type:"button",fontSize:"medium",onClick:()=>I(!0)},a.createElement(C.sA,{id:"SETTINGS_WIFI_PPSK_GENERATE_PASSWORDS"})),s.length?a.createElement(sn,{form:e}):null,a.createElement(gn,{form:e})),m?a.createElement(ca,{onDismiss:()=>{I(!1)},onSubmit:t=>{e.setValue("private_preshared_keys.items",[...s,...t],{shouldDirty:!0,shouldTouch:!0}),I(!1)},initialValues:{network_ids:(0,an.A)(s.map(({network_id:e})=>e))}}):null):null)};var da=n(975280);const ma={[K.ns.REQUIRED]:"COMMON_REQUIRED",[K.ns.OPTIONAL]:"COMMON_OPTIONAL",[K.ns.DISABLED]:"COMMON_DISABLED"},Ia=[K.ns.REQUIRED,K.ns.OPTIONAL,K.ns.DISABLED],Sa=(e,t,n)=>{if(t===O.r.OPEN&&n===O.I.OPEN)return!1;if(t===O.r.OPEN&&n===O.I.ENHANCED_OPEN)return e===K.ns.REQUIRED;if(t===O.r.OPEN&&n===O.I.ENHANCED_OPEN_TRANSITION)return e===K.ns.OPTIONAL;switch(e){case K.ns.OPTIONAL:return!(0,N.C1)(t);case K.ns.DISABLED:return!(0,N.tw)(t)&&!(0,N.C1)(t);default:return!0}},Ta=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"pmf_mode"}),n=(0,r.FH)({control:e.control,name:"securityProtocol"}),l=(0,r.FH)({control:e.control,name:"security_mode"}),_=(0,r.FH)({control:e.control,name:"mode"}),o=(0,Dt.mQ)();return a.createElement(Je.A,null,a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PROTECTED_MANAGEMENT_FRAMES_LABEL_DESC"})},a.createElement(C.sA,{id:"COMMON_PMF"})),a.createElement(At.A,{reason:_===Ye.IOT?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED",values:{feature:a.createElement(C.sA,{id:"COMMON_PMF"})}}):null},a.createElement(Et.A,{...nt.A.addDataTestId(nt.A.TestId.WIFI_PMF_MODE)},Ia.map(t=>a.createElement(m.A,{isDisabled:!Sa(t,n,l),key:t},a.createElement(ct.A,{value:t,control:e.control,name:"pmf_mode"},a.createElement(C.sA,{id:ma[t]})))))),a.createElement(je.Ay,{form:e,name:"pmf_mode"})),o?null:a.createElement(a.Fragment,null,t!==K.ns.DISABLED&&[O.r.WPA2_PERSONAL,O.r.WPA2_ENTERPRISE,O.r.WPA23_PERSONAL,O.r.WPA23_ENTERPRISE].includes(n)?a.createElement(da.A,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_PMF_ALERT"})):(0,N.C1)(n)?a.createElement(da.A,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA3_ALERT"})):null))},Na=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"securityProtocol"}),n=(0,r.FH)({control:e.control,name:"private_preshared_keys.enabled"}),l=!(0,N.pE)(t)||n;return a.createElement(m.A,{isDisabled:l},a.createElement(Ht.A,{type:"password",passwordToggle:!0,control:e.control,name:"password",value:l?"":void 0,label:a.createElement(C.sA,{id:"COMMON_PASSWORD"}),helperMessage:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_GENERAL_FIELD_X_PASSPHRASE_HINT"}),autoComplete:"new-password"}))},Oa={[K.KX.PRIVATE_NETWORK]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE_PRIVATE_NETWORK",[K.KX.PRIVATE_NETWORK_WITH_GUEST_ACCESS]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE_PRIVATE_NETWORK_WITH_GUEST_ACCESS",[K.KX.CHARGEABLE_PUBLIC_NETWORK]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE_CHARGEABLE_PUBLIC_NETWORK",[K.KX.FREE_PUBLIC_NETWORK]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE_FREE_PUBLIC_NETWORK",[K.KX.PERSONAL_DEVICE_NETWORK]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE_PERSONAL_DEVICE_NETWORK",[K.KX.EMERGENCY_SERVICES_ONLY_NETWORK]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE_EMERGENCY_SERVICES_ONLY_NETWORK",[K.KX.TEST_OR_EXPERIMENTAL]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE_TEST_OR_EXPERIMENTAL",[K.KX.WILDCARD]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE_WILDCARD"},ua={[K.WL.UNAVAILABLE]:"COMMON_UNAVAILABLE",[K.WL.PUBLIC_IPV4]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_PUBLIC_IPV4",[K.WL.DOUBLE_NAT_IPV4]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_DOUBLE_NAT_IPV4",[K.WL.SINGLE_NAT_IPV4]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_SINGLE_NAT_IPV4",[K.WL.PORT_RESTRICTED_DOUBLE_NAT_IPV4]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_DOUBLE_NAT_IPV4_PORT_RESTRICTED",[K.WL.PORT_RESTRICTED_SINGLE_NAT_IPV4]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_SINGLE_NAT_IPV4_PORT_RESTRICTED",[K.WL.PORT_RESTRICTED_IPV4]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_PORT_RESTRICTED",[K.WL.UNKNOWN]:"COMMON_UNKNOWN"},pa={[K.i2.UNAVAILABLE]:"COMMON_UNAVAILABLE",[K.i2.AVAILABLE]:"COMMON_AVAILABLE",[K.i2.UNKNOWN]:"COMMON_UNKNOWN"},Pa={[K.ab.OPEN]:"COMMON_ALLOW",[K.ab.CLOSED]:"COMMON_ACTION_BLOCK",[K.ab.UNKNOWN]:"COMMON_UNKNOWN"},Ra={[K.sp.UNSPECIFIED]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED",[K.sp.ASSEMBLY]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_ASSEMBLY",[K.sp.BUSINESS]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_BUSINESS",[K.sp.EDUCATIONAL]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_EDUCATIONAL",[K.sp.FACTORY_AND_INDUSTRIAL]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_FACTORY_AND_INDUSTRIAL",[K.sp.INSTITUTIONAL]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_INSTITUTIONAL",[K.sp.MERCANTILE]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_MERCANTILE",[K.sp.RESIDENTIAL]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_RESIDENTIAL",[K.sp.STORAGE]:"COMMON_STORAGE",[K.sp.UTILITY_AND_MISCELLANEOUS]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UTILITY_AND_MISCELLANEOUS",[K.sp.VEHICULAR]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_VEHICULAR",[K.sp.OUTDOOR]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_OUTDOOR"},Ca={[K.B8.EAP_TLS]:"EAP-TLS",[K.B8.EAP_SIM]:"EAP-SIM",[K.B8.EAP_TTLS]:"EAP-TTLS",[K.B8.EAP_AKA_AUTH]:"EAP-AKA Authentication",[K.B8.EAP_AKA_PRIM]:"EAP-AKA'"},Da={[K.Tl.PAP]:"COMMON_PAP",[K.Tl.CHAP]:"COMMON_CHAP",[K.Tl.MSCHAP]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_SUB_METHOD_MSCHAP",[K.Tl.MSCHAP_V2]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_SUB_METHOD_MSCHAP_V2",[K.Tl.SIM]:"COMMON_SIM",[K.Tl.USIM]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_SUB_METHOD_USIM",[K.Tl.CERTIFICATE]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_SUB_METHOD_CERTIFICATE",[K.Tl.USERNAME_PASSWORD]:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_SUB_METHOD_USERNAME_PASSWORD"},Ma={[K.sp.UNSPECIFIED]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED",overrideGroupLabel:!0}],[K.sp.ASSEMBLY]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_ARENA"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_STADIUM"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_PASSENGER_TERMINAL"},{type:4,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_AMPHITHEATER"},{type:5,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_AUDITORIUM"},{type:6,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_MEETING_ROOM"},{type:7,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_THEATER"},{type:8,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_WORSHIP_PLACE"},{type:9,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_CONVENTION_CENTER"},{type:10,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_LIBRARY"},{type:11,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_MUSEUM"},{type:12,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_EXHIBIT_HALL"},{type:13,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_CONVENTION_CENTER"}],[K.sp.BUSINESS]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_PROFESSIONAL_OFFICE"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_DOCTOR_OR_DENTIST_OFFICE"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_BANK"},{type:4,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_FIRE_STATION"},{type:5,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_POLICE_STATION"},{type:6,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_POST_OFFICE"},{type:7,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_PROFESSIONAL_OFFICE"},{type:8,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_BANK"},{type:9,label:"COMMON_OTHER"}],[K.sp.EDUCATIONAL]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_SCHOOL_K_12"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_DAYCARE_FACILITY"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNIVERSITY_OR_COLLEGE"},{type:4,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_SCHOOL_K_12"},{type:5,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNIVERSITY_OR_COLLEGE"},{type:6,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_LIBRARY"},{type:7,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_MUSEUM"},{type:8,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_RESEARCH_LAB"},{type:9,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_RESEARCH_LAB"},{type:10,label:"COMMON_OTHER"}],[K.sp.FACTORY_AND_INDUSTRIAL]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_FACTORY"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_INDUSTRIAL_PLANT"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_POWER_PLANT"},{type:4,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_POWER_PLANT"},{type:5,label:"COMMON_OTHER"}],[K.sp.INSTITUTIONAL]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_HOSPITAL"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_LONG_TERM_CARE_FACILITY"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_PRISON"},{type:4,label:"COMMON_OTHER"}],[K.sp.MERCANTILE]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_RETAIL_STORE"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_GROCERY_MARKET"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_AUTOMOTIVE_SERVICE_STATION"},{type:4,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_SHOPPING_MALL"},{type:5,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_GAS_STATION"},{type:6,label:"COMMON_OTHER"}],[K.sp.RESIDENTIAL]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_PRIVATE_RESIDENCE"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_HOTEL_OR_MOTEL"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_DORMITORY"},{type:4,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_BOARDING_HOUSE"},{type:5,label:"COMMON_OTHER"}],[K.sp.STORAGE]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_WAREHOUSE"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_SELF_STORAGE_FACILITY"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_FREIGHT_DEPOT"},{type:4,label:"COMMON_OTHER"}],[K.sp.UTILITY_AND_MISCELLANEOUS]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_TELECOMMUNICATIONS_BUILDING"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_POWER_PLANT"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_WATER_TREATMENT_PLANT"},{type:4,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_WASTEWATER_PLANT"},{type:5,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_NATURAL_GAS_FACILITY"},{type:6,label:"COMMON_OTHER"}],[K.sp.VEHICULAR]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_AUTOMOBILE_OR_TRUCK"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_AIRPLANE"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_TRAIN"},{type:4,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_SHIP_OR_BOAT"},{type:5,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_BUS"},{type:6,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_RECREATIONAL_VEHICLE"},{type:7,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_MOTORCYCLE_OR_SCOOTER"},{type:8,label:"COMMON_OTHER"}],[K.sp.OUTDOOR]:[{type:0,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_UNSPECIFIED"},{type:1,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_PARK"},{type:2,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_CAMPGROUND"},{type:3,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_GROUP_PICNIC_AREA"},{type:4,label:"COMMON_OTHER"}]};var ba=n(100946),Fa=n(178233);const La=[{value:K.XD.UP,label:"COMMON_UP"},{value:K.XD.DOWN,label:"COMMON_DOWN"},{value:K.XD.TEST,label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_TEST"}],fa=({form:e})=>{const{formatMessage:t}=(0,C.tz)(),n=(0,r.FH)({control:e.control,name:"hotspot.wan_metrics.enabled"}),l=(0,r.FH)({control:e.control,name:"hotspot.wan_metrics.load_measurement.enabled"});return a.createElement(a.Fragment,null,a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"hotspot.wan_metrics.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_METRICS_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_METRICS"}))),n?a.createElement(a.Fragment,null,a.createElement(Xe.A,{label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_METRICS"}),control:e.control,name:"hotspot.wan_metrics.info",options:La.map(e=>({...e,label:t({id:e.label})}))}),a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"hotspot.wan_metrics.symmetric_link",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_SYMMETRIC_LINK_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_SYMMETRIC_LINK"}))),a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"hotspot.wan_metrics.at_capacity",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_AT_CAPACITY_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_AT_CAPACITY"}))),a.createElement(kt.A,{contentAfter:a.createElement(C.sA,{id:"COMMON_SPEED_METRICS_MBPS"}),control:e.control,name:"hotspot.wan_metrics.downlink_speed",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_DOWNLOAD_SPEED"}),tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_DOWNLOAD_SPEED_TOOLTIP"})}),a.createElement(kt.A,{contentAfter:a.createElement(C.sA,{id:"COMMON_SPEED_METRICS_MBPS"}),control:e.control,name:"hotspot.wan_metrics.uplink_speed",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_UPLOAD_SPEED"}),tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_UPLOAD_SPEED_TOOLTIP"})}),a.createElement(r.xI,{control:e.control,name:"hotspot.wan_metrics.downlink_load",render:({field:e})=>a.createElement(P.A,{height:Qe.b,justifyContent:"center",width:"100%",flexDirection:"column"},a.createElement(ba.A,{value:e.value||0,minValue:0,maxValue:100,step:1,onChange:t=>e.onChange(t),labelEnd:(0,Fa.A)(e.value||0),label:a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_DOWNLOAD_LOAD_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_DOWNLOAD_LOAD"}))}))}),a.createElement(r.xI,{control:e.control,name:"hotspot.wan_metrics.uplink_load",render:({field:e})=>a.createElement(P.A,{height:Qe.b,justifyContent:"center",width:"100%",flexDirection:"column"},a.createElement(ba.A,{value:e.value||0,minValue:0,maxValue:100,step:1,onChange:t=>e.onChange(t),labelEnd:(0,Fa.A)(e.value||0),label:a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_UPLOAD_LOAD_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_UPLOAD_LOAD"}))}))}),a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"hotspot.wan_metrics.load_measurement.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_LOAD_MEASUREMENT_DURATION_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_WAN_LOAD_MEASUREMENT_DURATION"}))),l?a.createElement(P.A,{width:"180px"},a.createElement(kt.A,{control:e.control,name:"hotspot.wan_metrics.load_measurement.value",contentAfter:a.createElement(C.sA,{id:"COMMON_UNIT_SECONDS"})})):null):null)};function ga({group:e,type:t}){if("number"==typeof e&&"number"==typeof t)return`${e}:${t}`}function va(e){if(!e)return;const[t,n]=e.split(":").map(Number);return{group:t,type:n}}const ha=Object.values(K.sp).filter(e=>"number"==typeof e),Ga=e=>ha.flatMap(t=>Ma[t]?.map(({label:n,type:a,overrideGroupLabel:l})=>({value:ga({group:t,type:a}),label:l?e({id:n}):`${e({id:Ra[t]})} - ${e({id:n})}`}))),ya=/^[0-9A-Fa-f]{6,30}$/,Wa=me.A.string().required().label("COMMON_NAME").min(1).max(128),Ua=me.A.string().required(a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_ROAMING_CONSORTIUM_LIST_ORGANIZATION_IDENTIFIER_VALIDATION"})).label("SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_ROAMING_CONSORTIUM_LIST_ORGANIZATION_IDENTIFIER").test("isHexStringOfCorrectLength",a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_ROAMING_CONSORTIUM_LIST_ORGANIZATION_IDENTIFIER_VALIDATION"}),e=>e&&ya.test(e)),Va=me.A.array().of(me.A.object().shape({name:Wa,oid:Ua})),wa=me.A.object().shape({name:me.A.string().when("editActive",{is:!1,then:me.A.string().required().label("COMMON_NAME").min(1).max(128)}),oid:me.A.string().when("editActive",{is:!1,then:Ua}),roaming_consortium_list:me.A.array().when("editActive",{is:!0,then:Va})}),za=[{name:"name",label:"COMMON_NAME",type:"text",inline:!0},{name:"oid",label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_ROAMING_CONSORTIUM_LIST_ORGANIZATION_IDENTIFIER",type:"text",inline:!0}],Ha=({form:e})=>{const t=(0,Ae.L_)(),{field:n,fieldState:l,formState:_}=(0,r.as)({control:e.control,name:"hotspot.roaming_consortium_list"}),o=n.value??[],i=o.map((e,t)=>({...e,index:t,id:t.toString()}));return a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_ROAMING_CONSORTIUM_LIST_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_ROAMING_CONSORTIUM_LIST"})),a.createElement(yn.A,{fieldName:"roaming_consortium_list",initialValues:{editActive:!1,roaming_consortium_list:i,oid:"",name:""},newFields:za,isWindowTable:!0,invalid:l.invalid&&l?.error?.message?t((0,r.Jt)(_.errors,"hotspot.roaming_consortium_list")?.message):null,fieldLabels:{oid:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_ROAMING_CONSORTIUM_LIST_ORGANIZATION_IDENTIFIER",name:"COMMON_NAME"},onAddItem:({oid:e,name:t})=>n.onChange([...o,{oid:e,name:t}]),onRemoveItem:({index:e})=>n.onChange(o.filter((t,n)=>n!==e)),items:i,onEditSubmit:e=>{n.onChange(e.map(({name:e,oid:t})=>({name:e,oid:t})))},columns:[{id:"name",label:a.createElement(C.sA,{id:"COMMON_NAME"})},{id:"oid",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_ROAMING_CONSORTIUM_LIST_ORGANIZATION_IDENTIFIER"})}],validationSchema:wa}))};var ka=n(56016),xa=n(617147),Ba=n(71479),Ya=n(17437),Ka=n(413089),$a=n(311785),ja=n(836645);const Xa=me.A.object().shape({name:me.A.string().required().label("COMMON_NAME").min(1).max(128),eap_method:me.A.number().required().label("SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_EAP_METHOD"),sub_methods:me.A.array().of(me.A.string()).required().label("SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_SUB_METHODS")}),qa=Object.values(K.Tl),Qa=Object.values(K.B8).filter(e=>"number"==typeof e).map(e=>({value:e,label:Ca[e]||Pn.L})),Ja=(0,Ba.A)(xa.A,(0,$a.A)("splitActions"))`
  ${({splitActions:e})=>e&&Ya.AH`
      & > footer > div {
        width: 100%;
        & > div:first-child {
          margin-right: auto;
        }
      }
    `}
`,Za=({initialValues:e,disabled:t,onDismiss:n,onSave:l,onRemove:r,title:_})=>{const{formatMessage:o}=(0,C.tz)();return a.createElement(xn.l1,{initialValues:{name:e?.name||"",eap_method:e?.eap_method,sub_methods:e?.sub_methods||[]},onSubmit:e=>l(e),validationSchema:Xa},({values:e,setFieldValue:l,handleSubmit:i})=>a.createElement(Ja,{isOpen:!0,onRequestClose:()=>n(),title:_,size:"small",splitActions:!!r,actions:[r&&{type:"button",text:a.createElement(Gn.A,{size:"inherit",color:"red-06"},a.createElement(C.sA,{id:"COMMON_ACTION_REMOVE"})),onClick:r},{type:"button",text:a.createElement(C.sA,{id:"COMMON_ACTION_CANCEL"}),onClick:n},{type:"submit",variant:"primary",text:a.createElement(C.sA,{id:"COMMON_ACTION_SAVE"}),onClick:()=>i()}].filter(Ka.z)},a.createElement(P.A,{flexDirection:"column",gap:T.Ln,paddingBottom:T.fS},a.createElement(ta.A,{label:a.createElement(C.sA,{id:"COMMON_NAME"}),name:"name",variant:"secondary",disabled:t,full:!0}),a.createElement(P.A,{flexDirection:"column",width:"100%"},a.createElement(ta.A,{type:"dropdown",options:Qa,label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_EAP_METHOD"}),name:"eap_method",variant:"secondary",disabled:t,full:!0,autoSize:!0,validated:!0})),a.createElement(ja.A,{label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_SUB_METHODS",options:qa.map(e=>({value:e,label:o({id:Da[e]||"COMMON_FALLBACK"})})),list:e.sub_methods,onChange:e=>{l("sub_methods",e)},isFullWidth:!0,triggerButtonText:"COMMON_SELECT",disabled:t}))))},el=({form:e})=>{const t=(0,Dt.mQ)(),[n,l]=(0,a.useState)(!1),[_,o]=(0,a.useState)(null),{field:i}=(0,r.as)({control:e.control,name:"hotspot.nai_realm_list"}),s=i?.value||[],E=s.map((e,t)=>({...e,id:t.toString(),index:t})),c=null!==_?s[_]:void 0;return a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS"})),a.createElement(P.A,{gap:T.YC,flexDirection:"column",width:"100%"},E.length?a.createElement(P.A,{height:pn.I.getHeight(E.length,10,pn.I.ROW_HEIGHT),width:"100%"},a.createElement(ka.A,{disableColumnFilters:!0,columns:[{id:"name",label:a.createElement(C.sA,{id:"COMMON_NAME"}),renderCell:({name:e})=>e}],items:E,renderHoverContent:({index:e})=>a.createElement(Qt.A,{type:"button",variant:"link",onClick:()=>o(e)},a.createElement(C.sA,{id:"COMMON_ACTION_EDIT"}))})):null,a.createElement(P.A,{minHeight:Qe.b,alignItems:"center"},a.createElement($e.A,{type:"button",fontSize:"medium",onClick:()=>{l(!0)}},a.createElement(C.sA,{id:"COMMON_ACTION_ADD"})))),a.createElement(je.Ay,{form:e,name:"hotspot.nai_realm_list"}),n?a.createElement(Za,{title:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_ADD"}),disabled:t,onDismiss:()=>{l(!1)},onSave:({name:e,eap_method:t,sub_methods:n})=>{i.onChange([...s,{name:e,eap_method:t,sub_methods:n}]),l(!1)}}):null,c?a.createElement(Za,{title:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NAI_REALMS_EDIT"}),disabled:t,onDismiss:()=>{o(null)},initialValues:{eap_method:c.eap_method,sub_methods:c.sub_methods,name:c.name},onRemove:()=>{o(null),i.onChange(s.filter((e,t)=>t!==_))},onSave:({name:e,eap_method:t,sub_methods:n})=>{i.onChange(s.map((a,l)=>_===l?{name:e,eap_method:t,sub_methods:n}:a)),o(null)}}):null)},tl=me.A.object().shape({domain_name:me.A.string().required(a.createElement(C.sA,{id:"COMMON_DOMAIN_VALIDATION"})).label("COMMON_DOMAIN_NAME").min(1).max(128).test("isValidDomainName",a.createElement(C.sA,{id:"COMMON_DOMAIN_VALIDATION"}),e=>e&&de.V2.test(e))}),nl=({form:e})=>{const{field:t}=(0,r.as)({control:e.control,name:"hotspot.domain_name_list"}),n=(t.value||[]).map(e=>({domain_name:e})),l=n.map((e,t)=>({...e,index:t,id:t.toString()}));return a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_DOMAIN_LIST_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_DOMAIN_LIST"})),a.createElement(yn.A,{fieldName:"list",editable:!1,initialValues:{editActive:!1,list:l,domain_name:""},newFields:[{name:"domain_name",type:"text",inline:!0}],isWindowTable:!0,fieldLabels:{domain_name:"COMMON_DOMAIN_NAME"},onAddItem:({domain_name:e})=>t.onChange([...n.map(({domain_name:e})=>e),e]),onRemoveItem:({index:e})=>t.onChange(n.filter((t,n)=>n!==e).map(({domain_name:e})=>e)),items:l,columns:[{id:"domain_name",label:a.createElement(C.sA,{id:"COMMON_DOMAIN_NAME"}),renderCell:({domain_name:e})=>e}],validationSchema:tl}))};var al=n(901371);const ll=me.A.object().shape({ip_protocol:me.A.string().required().label("SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_PROTOCOL"),port:me.A.number().when("protocol",{is:e=>Ce.sk.includes(e),then:me.A.number().integer().min(al.DV).max(al.JX).label("COMMON_PORT")})}),rl=({form:e})=>{const{field:t}=(0,r.as)({control:e.control,name:"hotspot.capabilities"}),n=t.value||[],l=n.map((e,t)=>({...e,index:t,id:t.toString()}));return a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_CONNECTION_CAPABILITY_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_CONNECTION_CAPABILITY"})),a.createElement(yn.A,{validationSchema:ll,initialValues:{editActive:!1,capab:l,protocol:Ce.aS.ICMP,status:K.ab.OPEN,port:""},fieldName:"capab",allowSubmitInitial:!0,editable:!1,newFields:({protocol:e})=>{return t=Ce.sk.includes(e),[{name:"protocol",type:"dropdown",label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_PROTOCOL",options:[Ce.aS.ICMP,Ce.aS.TCP_UDP,Ce.aS.TCP,Ce.aS.UDP,Ce.aS.ESP].map(e=>({value:e,label:(0,Ce.Wi)(e)})),translateOptions:!0,inline:!0},{name:"status",type:"dropdown",label:"COMMON_ACTION",options:[K.ab.OPEN,K.ab.CLOSED].map(e=>({value:e,label:Pa[e]})),translateOptions:!0,inline:!0},...t?[{name:"port",type:"text",label:"COMMON_PORT",inline:!0}]:[]];var t},isWindowTable:!0,fieldLabels:{protocol:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_PROTOCOL",port:"COMMON_PORT",status:"COMMON_ACTION"},onAddItem:({status:e,protocol:a,port:l})=>t.onChange([...n,{protocol:a,status:e,port:Ce.sk.includes(a)?l:void 0}]),onRemoveItem:({index:e})=>t.onChange(n.filter((t,n)=>n!==e)),items:l,idField:"id",columns:[{id:"protocol",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_PROTOCOL"}),renderCell:({protocol:e})=>a.createElement(C.sA,{id:(0,Ce.Wi)(e)})},{id:"status",label:a.createElement(C.sA,{id:"COMMON_ACTION"}),renderCell:({status:e})=>a.createElement(C.sA,{id:Pa[e]||"COMMON_FALLBACK"})},{id:"port",label:a.createElement(C.sA,{id:"COMMON_PORT"}),renderCell:({port:e})=>e||Pn.L}]}))},_l=[{id:"mcc",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_MCC"}),renderCell:({mcc:e})=>e},{id:"mnc",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_MNC"}),renderCell:({mnc:e})=>e}],ol=/^\d{2,3}$/,il=/^\d{3}$/,sl=me.A.string().required().label("SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_MCC").test("isNumeric",a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_MCC_VALIDATION"}),e=>il.test(e)),El=me.A.string().required().label("SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_MNC").test("isNumeric",a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_MNC_VALIDATION"}),e=>ol.test(e)),cl=me.A.object({editActive:me.A.boolean(),mcc:me.A.string().when("editActive",{is:!1,then:sl}),mnc:me.A.string().when("editActive",{is:!1,then:El}),cellular_network_list:me.A.array().when("editActive",{is:!0,then:me.A.array().of(me.A.object({mcc:sl,mnc:El}))})}),Al=[{label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_MCC",name:"mcc",variant:"secondary",inline:!0},{label:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_MNC",name:"mnc",variant:"secondary",inline:!0}],dl=({form:e})=>{const{field:t,fieldState:n,formState:l}=(0,r.as)({control:e.control,name:"hotspot.cellular_network_list"}),_=(0,Ae.L_)(),o=(0,a.useMemo)(()=>t.value||[],[t.value]),i=(0,a.useMemo)(()=>o.map((e,t)=>({...e,id:t.toString(),index:t})),[o]);return a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_3GPP_CELLULAR_NETWORK_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_3GPP_CELLULAR_NETWORK"})),a.createElement(yn.A,{isWindowTable:!0,columns:_l,fieldName:"cellular_network_list",invalid:n.invalid&&n?.error?.message?_((0,r.Jt)(l.errors,"hotspot.cellular_network_list")?.message):null,initialValues:{cellular_network_list:i,editActive:!1,mcc:"",mnc:""},idField:"id",newFields:Al,validationSchema:cl,onAddItem:({mcc:e,mnc:n})=>t.onChange([...o,{mcc:e,mnc:n}]),onRemoveItem:({index:e})=>t.onChange(o.filter((t,n)=>n!==e)),onEditSubmit:e=>t.onChange(e.map(({mcc:e,mnc:t})=>({mcc:e,mnc:t})))}))},ml=[K.KX.FREE_PUBLIC_NETWORK,K.KX.CHARGEABLE_PUBLIC_NETWORK,K.KX.PRIVATE_NETWORK_WITH_GUEST_ACCESS,K.KX.PERSONAL_DEVICE_NETWORK,K.KX.EMERGENCY_SERVICES_ONLY_NETWORK,K.KX.TEST_OR_EXPERIMENTAL,K.KX.WILDCARD].map(e=>({value:e,label:Oa[e]||"COMMON_FALLBACK"})),Il=[K.WL.UNAVAILABLE,K.WL.PUBLIC_IPV4,K.WL.PORT_RESTRICTED_IPV4,K.WL.SINGLE_NAT_IPV4,K.WL.DOUBLE_NAT_IPV4,K.WL.PORT_RESTRICTED_SINGLE_NAT_IPV4,K.WL.PORT_RESTRICTED_DOUBLE_NAT_IPV4].map(e=>({value:e,label:ua[e]||"COMMON_FALLBACK"})),Sl=[K.i2.AVAILABLE,K.i2.UNAVAILABLE].map(e=>({value:e,label:pa[e]||"COMMON_FALLBACK"})),Tl=({form:e})=>{const{formatMessage:t}=(0,C.tz)();return a.createElement(p.A,{title:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT"})},a.createElement(Ht.A,{control:e.control,name:"hotspot.venue_name",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_NAME"})}),a.createElement(Xe.A,{control:e.control,name:"hotspot.venue_type",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_TYPE"}),tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_VENUE_TYPE_TOOLTIP"}),options:Ga(t)}),a.createElement(Xe.A,{control:e.control,name:"hotspot.network_type",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE"}),tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_NETWORK_TYPE_TOOLTIP"}),options:ml.map(e=>({value:e.value,label:t({id:e.label})}))}),a.createElement(Xe.A,{control:e.control,name:"hotspot.type_availability_ipv4",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_V4"}),tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_V4_TOOLTIP"}),options:Il.map(e=>({value:e.value,label:t({id:e.label})}))}),a.createElement(Xe.A,{control:e.control,name:"hotspot.type_availability_ipv6",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_V6"}),tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_IP_ADDRESS_TYPE_AVAILABILITY_V6_TOOLTIP"}),options:Sl.map(e=>({value:e.value,label:t({id:e.label})}))}),a.createElement(el,{form:e}),a.createElement(Ha,{form:e}),a.createElement(dl,{form:e}),a.createElement(nl,{form:e}),a.createElement(Ht.A,{control:e.control,name:"hotspot.operator_friendly_name",label:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT_OPERATOR_FRIENDLY_NAME"})}),a.createElement(fa,{form:e}),a.createElement(rl,{form:e}))},Nl=({form:e})=>{const{formatMessage:t}=(0,C.tz)(),n=(0,l.useSelector)(G.ye),r=(0,a.useMemo)(()=>n.map(e=>(0,on.nz)(e)?{label:t({id:"SETTINGS_NATIVE_NETWORK"}),value:e._id}:{label:e.name,value:e._id,additionalInfo:a.createElement(a.Fragment,null,e.vlan)}),[t,n]),_=(0,a.useCallback)(t=>{const a=e.getValues("network_id"),l=n.find(e=>e._id===a),r=n.find(e=>e._id===t);e.setValue("network_id",String(t),{shouldDirty:!0}),l&&r&&!(0,on.B5)(l)&&(0,on.B5)(r)&&(e.getValues("advanced")===s.C.AUTO&&e.setValue("advanced",s.C.MANUAL,{shouldDirty:!0}),e.setValue("mode",Ye.HOTSPOT,{shouldDirty:!0}),e.setValue("hotspot.type",Ee.CAPTIVE_PORTAL,{shouldDirty:!0}),e.setValue("client_device_isolation_enabled",!0,{shouldDirty:!0}),e.setValue("securityProtocol",O.r.OPEN,{shouldDirty:!0}))},[e,n]);return a.createElement(Xe.A,{options:r,control:e.control,name:"network_id",label:a.createElement(C.sA,{id:"COMMON_NETWORK"}),onChange:_,...nt.A.addDataTestId(nt.A.TestId.NETWORKCONF_ID)})},Ol=Object.values(K.EC),ul={[K.EC.AP_MAC]:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_NAS_ID_AP_MAC",[K.EC.SITE_NAME]:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_NAS_ID_SITE_NAME",[K.EC.AP_NAME]:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_NAS_ID_AP_NAME",[K.EC.BSSID]:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_NAS_ID_BSSID",[K.EC.CUSTOM]:"COMMON_CUSTOM"},pl=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"nas_id.type"});return a.createElement(a.Fragment,null,a.createElement(st.A,null,a.createElement(it.A,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_NAS_ID"})),a.createElement(Et.A,null,Ol.map(t=>a.createElement(ct.A,{key:t,value:t,name:"nas_id.type",control:e.control},a.createElement(C.sA,{id:ul[t]}))))),t===K.EC.CUSTOM?a.createElement(Ht.A,{name:"nas_id.value",control:e.control}):null)},Pl=({form:e})=>a.createElement(Ht.A,{control:e.control,name:"name",label:a.createElement(C.sA,{id:"COMMON_NAME"})}),Rl=({form:e})=>a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"multicast_to_unicast_enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_MULTICAST_ENHANCEMENT_DESC"})},a.createElement(C.sA,{id:"SETTINGS_MULTICAST_TO_UNICAST"})));var Cl=n(6510),Dl=n(523265),Ml=n(530813),bl=n(153933),Fl=n(734616),Ll=n(57527);const fl=({id:e,enabled:t})=>{const n=(0,l.useSelector)(G.Ct).find(t=>t._id===e);return n?a.createElement(Ll.A,null,a.createElement(Rn.A,{color:t?void 0:"disabled"},(0,on.nz)(n)?a.createElement(C.sA,{id:"SETTINGS_NATIVE_NETWORK"}):n.name)):null};var gl=n(344344),vl=n(231755),hl=n(747280),Gl=n(62170),yl=n(21803),Wl=n(6176),Ul=n(38671);const Vl=me.A.object().shape({name:me.A.string().label("SETTINGS_WIFI_FORM_ADVANCED_AP_GROUPS_TABLE_NAME").required(),device_macs:me.A.array().of(me.A.string())});var wl=n(956347),zl=n(892145),Hl=n(985370),kl=n(162420),xl=n(928085),Bl=n(855926),Yl=n(776309),Kl=n(705426),$l=n(126457),jl=n(477544),Xl=n(396660),ql=n(149133),Ql=n(780811),Jl=n(837612);const Zl=e=>e.isDeviceDisabled?"disabled":"positive"!==(0,Jl.Nf)(e)?"text-3":"inherit";var er=n(559478);const tr=({device:e,isDeviceDisabled:t})=>{const{formatMessage:n}=(0,C.tz)(),l=(0,Cl.Q)(e);return a.createElement(P.A,{alignItems:"center",gap:T.kc,maxWidth:"100%",overflow:"hidden"},a.createElement(Tn.A,{description:(0,Jl.F1)(e,(0,Jl.S9)(e),n),portal:!0,style:{width:"fit-content"}},a.createElement(er.A,{status:(0,Jl.Nf)(e)})),a.createElement(P.A,{alignItems:"center",gap:T.YC,flexGrow:1,flexShrink:1,flexBasis:0,overflow:"hidden"},a.createElement(Wl.A,{model:e.model,width:20,height:20}),a.createElement(Tn.A,{noWrap:!0,description:l,width:"auto"},a.createElement(pt.A,{size:"inherit",color:Zl({...e,isDeviceDisabled:t}),isTruncated:!0,style:{flex:1}},l))))},nr=[{compare:(0,Xl.l0)(e=>(0,Cl.Q)(e)),growthFactor:124,id:"name",label:a.createElement(C.sA,{id:"COMMON_NAME"}),renderCell:e=>a.createElement(tr,{device:e,isDeviceDisabled:e.isDeviceDisabled}),sortable:!0},{compare:(0,Xl.l0)(e=>(0,Cl.Lm)(e.model)),growthFactor:60,id:"model",label:a.createElement(C.sA,{id:"COMMON_MODEL"}),renderCell:e=>{const t=(0,Cl.Lm)(e.model);return a.createElement(Rn.A,{size:"inherit",color:Zl(e),style:{maxWidth:110}},t)},sortable:!0},{compare:(0,Xl.l0)(e=>(0,ql.GQ)((0,Ql.Wcd)(e))),growthFactor:60,id:"ip",label:a.createElement(C.sA,{id:"COMMON_IP_ADDRESS"}),renderCell:e=>a.createElement(Rn.A,{size:"inherit",color:Zl(e)},(0,Ql.Wcd)(e)||a.createElement(C.sA,{id:"COMMON_FALLBACK"})),sortable:!0}],ar=(0,Ba.A)(Kl.A,(0,$a.A)("isDisabled"))`
  width: 576px;

  header {
    height: 52px;

    svg {
      display: none;
    }
  }

  > div {
    padding: ${T.fS};
  }

  ${({isDisabled:e})=>!e&&"& > footer > div {\n      width: 100%;\n\n      & > div:first-child {\n        margin-right: auto;\n      }\n    }"}
`,lr=(0,Ba.A)("div")`
  table {
    tr:hover {
      background: ${({theme:{motifPalette:{hoverUi01:e}}})=>e} !important;
    }
  }
`,rr=(0,Ba.A)(P.A)`
  margin-left: ${T.xO};
`,_r=(0,Ba.A)("div")`
  margin-left: ${T.kc};
`,or=(0,Ba.A)(zl.A)`
  margin-top: ${T.Er};
`,ir=({existingRecord:e,onDismiss:t,onDelete:n})=>{const{formatMessage:r}=(0,C.tz)(),_=(0,xl.A)(Y._L),o=(0,l.useDispatch)(),i=(0,wl.W6)(),s=(0,l.useSelector)(z.kx),E=(0,l.useSelector)(g.AP),c=(0,l.useSelector)(u.b),A=(0,l.useSelector)(jl.Ag),d=(0,l.useSelector)(y.EL),{values:m,isSubmitting:I,isValid:S,handleSubmit:N,setFieldValue:O}=(0,xn.j7)(),[p,R]=(0,a.useState)(""),D=d||e?.attr_no_delete,M=(0,a.useMemo)(()=>A.filter(t=>e?._id&&t.ap_group_mode===K.qq.GROUPS&&t.ap_group_ids?.includes(e._id)),[e?._id,A]),b=(0,a.useMemo)(()=>{const t=p.toLowerCase();return s.filter(({_id:e,name:n,model:a,mac:l,ip:r})=>[e,n,a,l,r,(0,Cl.Lm)(a)].some((e="")=>e?.toLowerCase?.().indexOf(t)>=0)).map(t=>{const n=c.apGroups.map(n=>e?._id!==n._id?n:{...n,device_macs:[...n.device_macs||[],t.mac]}),a=!A.some(e=>(0,_t.Ly)((0,rt.d)(e,{...c,apGroups:n}),{deviceMac:t.mac})),l=m.device_macs.includes(t.mac),r=!l&&M.some(({security:e})=>e===K.Hs.OPEN&&be({countryCode:E,broadcastingDevices:[t]}));return{...t,disabled:!l&&(!a||r),isDeviceDisabled:!l&&!a}})},[p,s,c,A,m.device_macs,M,e?._id,E]),L=(0,a.useCallback)(e=>O("device_macs",e.filter(e=>!b.find(t=>e===t.mac)?.isDeviceDisabled||m.device_macs.includes(e))),[O,b,m.device_macs]),f=(0,a.useCallback)(({isDeviceDisabled:e})=>e?"disabled":"",[]),v=`${Math.min(32*(s.length+1)+1+10,225)}px`,h=(0,a.useCallback)(()=>{if(!e)return;const a=A.filter(({ap_group_ids:t})=>t?.includes(e._id)),l=a.filter(t=>t._id!==e._id).length>0;o((0,$l.to)({modalType:l?Yl.A.CONFIRM_AP_GROUP_MULTI_REMOVE:Yl.A.CONFIRM_REMOVE,modalProps:{name:e.name,wlans:a,canRemoveWlans:A.length>a.length,onConfirm:async r=>{const s=a.some(({_id:t})=>t===e._id)&&"remove"===r,E=[];l&&a.forEach(t=>{E.push(o("remove"!==r?(0,F._1)(t._id,{...t,ap_group_ids:(t.ap_group_ids||[]).filter(t=>t!==e._id),enabled:!1},{}):(0,F.Ux)(t._id,void 0,{failureToast:void 0})))});try{await Promise.all(E),o((0,B.vS)(e._id)).then(()=>{t(),l&&s&&i.push(_),n?.()}).catch(e=>{o((0,na.ox)({errorMessage:e.msg,errorValues:e,icon:Yn.C.danger,message:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUP_REMOVE_FAILED"}))})}catch(e){o((0,na.ox)({errorMessage:e.msg,errorValues:e,icon:Yn.C.danger,message:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUP_REMOVE_FAILED"}))}}}}))},[e,A,o,t,n,i,_]);return a.createElement(ar,{size:"small",isOpen:!0,title:a.createElement(C.sA,e?{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUPS_EDIT_HEADER",values:{name:e.name}}:{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUPS_CREATE_NEW"}),actions:[...!D&&e&&n?[{disabled:I,text:a.createElement(Gn.A,{color:"red-06",size:"medium"},a.createElement(C.sA,{id:"COMMON_ACTION_REMOVE"})),type:"button",variant:"default",onClick:h}]:[],{disabled:I,text:a.createElement(C.sA,{id:"COMMON_ACTION_CANCEL"}),type:"button",variant:"default",onClick:t},{disabled:D||I||!S,text:a.createElement(C.sA,{id:"COMMON_ACTION_SAVE_CHANGES"}),type:"button",variant:"primary",onClick:()=>N()}],onRequestClose:t,isDisabled:!!D&&!e},a.createElement(P.A,{justifyContent:"space-between",alignItems:"center",marginBottom:T.Er,gap:T.Ln},a.createElement(ta.A,{name:"name",label:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUPS_TABLE_NAME",full:!0,disabled:D,variant:"secondary"}),a.createElement(or,{iconBefore:a.createElement(Hl.A,{size:"small"}),onChange:(e,t)=>R(t),onClear:()=>R(""),placeholder:r({id:"COMMON_SEARCH"}),value:p,full:!0,variant:"secondary"})),p||b.length?a.createElement(lr,{...nt.A.addDataTestId(nt.A.TestId.APS_TABLE),style:{minHeight:v}},a.createElement(Bl.A,{vertical:!0},a.createElement(Nn.A,{columns:nr,items:b,idField:"mac",disableColumnFilters:!0,truncateHeaderCells:!0,multiSelectMode:!0,selectedIds:m.device_macs,onChangeSelection:L,disableSelection:D,rowClassName:f,headerHeight:32,renderFooter:b.length?void 0:()=>a.createElement(rr,{alignItems:"center"},a.createElement(kl.A,{isActive:!0,size:"original"}),a.createElement(_r,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_DEVICES_TABLE_SEARCH_EMPTY"})))}))):a.createElement(P.A,null,a.createElement("div",null,a.createElement(kl.A,{isActive:!0})),a.createElement(_r,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_DEVICES_TABLE_EMPTY"}))))},sr={name:"",device_macs:[],for_wlanconf:!1},Er=({existingRecord:e,onDismiss:t,onDelete:n,onSave:r})=>{const _=(0,l.useDispatch)(),o=(0,a.useCallback)((n,{setSubmitting:a})=>{const l={...e||sr,...n,device_macs:n.device_macs.filter(Ka.z)};_(e?._id?(0,B.Cy)({_id:e._id,...l}):(0,B.tp)(l)).then(e=>{_((0,B.Yo)()),t(),r?.(e)}).catch(e=>{const t=(0,Ul.F)(e)?e:void 0;_((0,na.ox)({errorMessage:t?.msg,errorValues:t,icon:Yn.C.danger,message:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUP_SAVE_FAILED"})),a(!1)})},[e,_,t,r]),i=(0,a.useMemo)(()=>({name:e?.name||"",device_macs:e?.device_macs||[]}),[e?.device_macs,e?.name]);return a.createElement(xn.l1,{enableReinitialize:!0,initialValues:i,validationSchema:Vl,onSubmit:o},a.createElement(ir,{existingRecord:e,onDismiss:t,onDelete:n}))};var cr=n(983105),Ar=n(721084),dr=n(275463),mr=n(755667);const Ir=({onDismiss:e,onSubmit:t,existingRule:n,wifiForm:_})=>{const{formatMessage:o}=(0,C.tz)(),i=(0,l.useSelector)(z.kx),s=(0,l.useSelector)(x.K8),E=(0,l.useSelector)(cr.J),c=(0,l.useSelector)(dr.L),A=(0,l.useSelector)(z.m9),d=(0,Dl.A)(w.Xj.MDNS_SERVICE_LIST_WIFI),m=(0,a.useMemo)(()=>new Set(d?.limitations?.flatMap(e=>e.device_macs??[])||[]),[d]),S=(0,a.useMemo)(()=>s.find(Me.K5),[s]),N=S?.device_macs?.length||0,O=(0,r.FH)({control:_.control,name:"broadcasting_aps"}),u=(0,a.useMemo)(()=>Ve(O,{apGroups:s}),[s,O]),{themeName:p}=(0,un.u)(),[R,D]=(0,a.useState)(!1),M=(0,I.m)({schema:we,defaultValues:n??{devices:{type:Fe.LM.ALL},vlan_bridging:{enabled:!1,networkconf_ids:[]},services:{type:Fe.aH.ALL}}}),b=(0,r.FH)({control:M.control,name:"devices"}),F=(0,r.FH)({control:M.control,name:"devices.group_ids"}),L=(0,r.FH)({control:M.control,name:"services.type"}),f=(0,r.FH)({control:M.control,name:"services.custom"}),g=(0,r.FH)({control:M.control,name:"vlan_bridging.enabled"}),v=(0,a.useMemo)(()=>s.filter(e=>!!F?.includes(e._id)||!e.for_wlanconf&&!e.attr_no_delete&&(O.type===ge.ALL||O.type===ge.GROUP&&O.group_ids?.includes(e._id))).map(e=>({value:e._id,label:e.name||e._id})),[s,O,F]),h=A&&c?.mdns_enabled_for!==Ar.w.NONE,G=(0,a.useMemo)(()=>i.filter(e=>!m.has(e.mac)&&u.has(e.mac)||b.type===Fe.LM.SPECIFIC&&b?.macs?.includes(e.mac)).map(e=>({value:e.mac,label:(0,Cl.Q)(e),image:a.createElement(Wl.A,{model:e.model})})),[i,b,m,u]);return a.createElement(Zn.A,null,a.createElement(Je.A,null,a.createElement(Ze.A,null,a.createElement(At.A,{reason:h&&!g?a.createElement(C.sA,{id:"SETTINGS_DISABLE_GATEWAY_MDNS_PROXY"}):null},a.createElement(qe.A,{control:M.control,name:"vlan_bridging.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_DISCOVERY_SCOPE_DESCRIPTION"})},a.createElement(C.sA,{id:"SETTINGS_DISCOVERY_SCOPE"})))),g?a.createElement(yl.A,{form:M,name:"vlan_bridging.networkconf_ids",getIsNetworkVisible:e=>(0,on.xv)(e)&&!(0,on.uH)(e),additionalInfo:"subnet",truncateLabels:!0,getOptionLabel:e=>(0,on.nz)(e)?o({id:"SETTINGS_NATIVE_NETWORK"}):null}):null,a.createElement(st.A,null,a.createElement(it.A,{htmlFor:"devices",tooltip:a.createElement(C.sA,{id:"SETTINGS_AP_SCOPE_DESCRIPTION"})},a.createElement(C.sA,{id:"SETTINGS_AP_SCOPE"})),a.createElement(Et.A,null,a.createElement(ct.A,{control:M.control,name:"devices.type",value:Fe.LM.ALL},a.createElement(C.sA,{id:"COMMON_ALL"})),a.createElement(At.A,{reasons:[N||b.type===Fe.LM.SPECIFIC?null:a.createElement(C.sA,{id:"SETTINGS_WIFI_ATTACH_MORE_AP_DEVICES"}),u.size||b.type===Fe.LM.SPECIFIC?null:a.createElement(C.sA,{id:"SETTINGS_ADD_MORE_BROADCASTING_APS"})]},a.createElement(ct.A,{control:M.control,name:"devices.type",value:Fe.LM.SPECIFIC},a.createElement(C.sA,{id:"COMMON_SPECIFIC"}))),a.createElement(At.A,{isInteractive:!0,reasons:[N<=1?a.createElement(C.sA,{id:"SETTINGS_WIFI_ATTACH_MORE_AP_DEVICES"}):null,b?.type!==Fe.LM.GROUP&&O?.type===ge.SPECIFIC?a.createElement(C.sA,{id:"SETTINGS_GROUP_MODE_NOT_AVAILABLE_IN_SPECIFIC_APS"}):null,b?.type===Fe.LM.GROUP||v.length?null:a.createElement(C.sA,{id:"SETTINGS_AP_SCOPE_GROUP_DISABLED",values:{link:a.createElement($e.A,{onPress:()=>D(!0)},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUPS"}))}})]},a.createElement(ct.A,{control:M.control,name:"devices.type",value:Fe.LM.GROUP},a.createElement(C.sA,{id:"COMMON_GROUP"})))),R?a.createElement(Er,{existingRecord:void 0,onDismiss:()=>D(!1),onSave:e=>{M.setValue("devices.type",Fe.LM.GROUP),M.setValue("devices.group_ids",[...M.getValues("devices.group_ids")||[],e._id])}}):null),b?.type===Fe.LM.SPECIFIC?a.createElement(Gl.A,{control:M.control,name:"devices.macs",options:G,isWindowed:!0,triggerButtonText:a.createElement(C.sA,{id:"COMMON_SELECT"})}):null,b?.type===Fe.LM.GROUP?a.createElement(Gl.A,{control:M.control,name:"devices.group_ids",options:v,isWindowed:!0,triggerButtonText:a.createElement(C.sA,{id:"COMMON_SELECT"})}):null,a.createElement(st.A,null,a.createElement(it.A,{htmlFor:"devices"},a.createElement(C.sA,{id:"SETTINGS_SERVICE_SCOPE"})),a.createElement(Et.A,null,a.createElement(ct.A,{control:M.control,name:"services.type",value:Fe.aH.ALL},a.createElement(C.sA,{id:"COMMON_ALL"})),a.createElement(ct.A,{control:M.control,name:"services.type",value:Fe.aH.SPECIFIC},a.createElement(C.sA,{id:"COMMON_SPECIFIC"})),a.createElement(ct.A,{control:M.control,name:"services.type",value:Fe.aH.NONE},a.createElement(C.sA,{id:"COMMON_NONE"})))),L===Fe.aH.SPECIFIC?a.createElement(a.Fragment,null,a.createElement(mr.A,{onSubmit:e=>{M.setValue("services.custom",[...M.getValues("services.custom")||[],e],{shouldDirty:!0,shouldTouch:!0})},existingCustomServices:f||[]}),a.createElement(P.A,{flexDirection:"column",maxHeight:"380px",overflowY:"auto",width:"100%",border:`1px solid ${Sn.Ay[`desktop-color-ublue-06-${p}`]}`,borderRadius:T.YC,padding:`${T.YC} ${T.kc}`},a.createElement(P.A,{flexDirection:"column",rowGap:T.YC},f?.length?a.createElement(a.Fragment,null,a.createElement(pt.A,{variant:"caption"},a.createElement(C.sA,{id:"COMMON_CUSTOM"})),f.map(e=>a.createElement(P.A,{alignItems:"center",gap:2,height:T.S2},a.createElement(ht.A,{id:e.address,checked:!0,disabled:!0}),a.createElement(P.A,{alignItems:"center",gap:T.YC,flex:1,overflow:"hidden"},a.createElement(Rn.A,{style:{flex:1},size:"medium"},e.name),a.createElement(Rn.A,{style:{textAlign:"right",flex:1},color:"text-3",size:"small"},e.address),a.createElement(P.A,{overflow:"hidden",flexShrink:0,flexGrow:0,width:T.ED},a.createElement(Bn.A,{variant:"neutral",style:{padding:2,height:T.ED},onClick:()=>M.setValue("services.custom",M.getValues("services.custom")?.filter(t=>t.address!==e.address),{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})},a.createElement(hl.A,{size:"original"})))))),a.createElement(vl.A,{orientation:"horizontal"})):null,E.map(e=>a.createElement(Wt,{key:e.code,control:M.control,name:"services.predefined_ids",value:e.code},a.createElement(Rn.A,null,e.name))))),a.createElement(je.Ay,{form:M,name:"services.custom"})):null,a.createElement(P.A,{gap:T.kc},a.createElement(Bn.A,{type:"button",size:"small",onClick:M.handleSubmit(t)},a.createElement(C.sA,{id:n?"COMMON_ACTION_SAVE_CHANGES":"COMMON_ACTION_CREATE"})),a.createElement(Bn.A,{type:"button",size:"small",variant:"tertiary-neutral",onClick:e},a.createElement(C.sA,{id:"COMMON_ACTION_CANCEL"})))))},Sr=({item:e})=>{const t=(0,l.useSelector)(cr.J),n=(0,a.useMemo)(()=>{if(e.services?.type===Fe.aH.ALL)return[];const n=e.services?.type===Fe.aH.SPECIFIC&&e.services.predefined_ids||[],a=e.services?.type===Fe.aH.SPECIFIC&&e.services.custom||[];return[...t.filter(e=>n?.includes(e.code)).map(e=>e.name),...a.map(e=>e.name)]},[e,t]);return e.services?.type===Fe.aH.ALL?a.createElement(Rn.A,null,a.createElement(C.sA,{id:"COMMON_ALL"})):e.services?.type===Fe.aH.NONE?a.createElement(Rn.A,null,a.createElement(C.sA,{id:"COMMON_FALLBACK"})):a.createElement(gl.A,{enabled:!0,items:n,getItemKey:e=>e,renderChip:e=>a.createElement(Ll.A,null,a.createElement(Rn.A,{variant:"inherit"},e)),renderTooltipItem:e=>a.createElement(pt.A,{variant:"inherit",isTruncated:!0},e)})};var Tr=n(352998);const Nr=({id:e})=>{const t=(0,l.useSelector)(x.K8).find(t=>t._id===e);return t?a.createElement(pt.A,{isTruncated:!0,variant:"inherit"},t.name||a.createElement(C.sA,{id:"COMMON_FALLBACK"})):null};var Or=n(695008);const ur=({enabled:e=!0,id:t})=>{const n=(0,l.useSelector)(x.K8).find(e=>e._id===t);return n?a.createElement(Ll.A,null,a.createElement(Rn.A,{enabled:e},n.name||a.createElement(C.sA,{id:"COMMON_FALLBACK"}))):null},pr=({item:e})=>e.devices?.type===Fe.LM.ALL?a.createElement(Rn.A,null,a.createElement(C.sA,{id:"COMMON_ALL"})):a.createElement(gl.A,e.devices?.type===Fe.LM.SPECIFIC?{enabled:!0,items:e.devices.macs||[],getItemKey:e=>e,renderChip:e=>a.createElement(Or.A,{enabled:!0,mac:e}),renderTooltipItem:e=>a.createElement(Tr.A,{enabled:!0,mac:e})}:{enabled:!0,items:e.devices.group_ids||[],getItemKey:e=>e,renderChip:e=>a.createElement(ur,{id:e,enabled:!0}),renderTooltipItem:e=>a.createElement(Nr,{id:e})}),Pr=[{id:"vlan_bridging",label:a.createElement(P.A,{alignItems:"center",gap:T.YC},a.createElement(Rn.A,{variant:"inherit"},a.createElement(C.sA,{id:"SETTINGS_DISCOVERY_SCOPE"})),a.createElement(Mt.A,{description:a.createElement(C.sA,{id:"SETTINGS_DISCOVERY_SCOPE_DESCRIPTION"})})),renderCell:({vlan_bridging:e})=>e.enabled?a.createElement(gl.A,{enabled:!0,maxChips:2,items:e.networkconf_ids,getItemKey:e=>e,renderChip:e=>a.createElement(fl,{id:e,enabled:!0}),renderTooltipItem:e=>a.createElement(Fl.A,{id:e})}):a.createElement(Rn.A,null,a.createElement(C.sA,{id:"COMMON_OFF"}))},{id:"devices",label:a.createElement(P.A,{alignItems:"center",gap:T.YC},a.createElement(Rn.A,{variant:"inherit"},a.createElement(C.sA,{id:"SETTINGS_AP_SCOPE"})),a.createElement(Mt.A,{description:a.createElement(C.sA,{id:"SETTINGS_AP_SCOPE_DESCRIPTION"})})),renderCell:e=>a.createElement(pr,{item:e})},{id:"services",label:a.createElement(C.sA,{id:"SETTINGS_SERVICE_SCOPE"}),renderCell:e=>a.createElement(Sr,{item:e})}],Rr=({form:e})=>{const[t,n]=(0,a.useState)(!1),[l,_]=(0,a.useState)(null),{field:o}=(0,r.as)({control:e.control,name:"mdns_proxy.rules"}),i=(0,a.useMemo)(()=>o.value||[],[o.value]),s=(0,a.useMemo)(()=>i.map((e,t)=>({id:t.toString(),...e})),[i]),E=(0,a.useMemo)(()=>s.find(e=>e.id===l),[l,s]);return a.createElement(P.A,{gap:T.kc,flexDirection:"column",alignItems:"flex-start",width:"100%"},s.length>0?a.createElement(P.A,{width:"100%"},a.createElement(bl.Ay,{disableColumnFilters:!0,isRemovable:()=>!0,shouldConfirmRemove:!1,removeItems:async e=>{o.onChange(i.filter((t,n)=>!e.some(({id:e})=>e===n.toString()))),_(null)},columns:Pr,items:s,onRowClick:({id:e})=>{n(!1),_(e)},hideManageButton:t||!!E,footerContent:t||E?null:a.createElement($e.A,{fontSize:"medium",onPress:()=>{n(!0),_(null)}},a.createElement(C.sA,{id:"COMMON_CREATE_NEW"}))})):t||E?null:a.createElement($e.A,{onPress:()=>{n(!0),_(null)},fontSize:"medium"},a.createElement(C.sA,{id:"COMMON_CREATE_NEW"})),a.createElement(je.Ay,{form:e,name:"mdns_proxy.rules"}),t?a.createElement(Ir,{wifiForm:e,existingRule:void 0,onDismiss:()=>{n(!1)},onSubmit:e=>{o.onChange([...i,e]),n(!1)}}):E?a.createElement(Ir,{key:E.id,wifiForm:e,existingRule:E,onDismiss:()=>{_(null)},onSubmit:e=>{o.onChange(i.map((t,n)=>n.toString()===l?e:t)),_(null)}}):null)},Cr=({form:e})=>{const t=(0,Dt.mQ)(),n=(0,Dl.A)(w.Xj.MDNS_SERVICE_LIST_WIFI),_=(0,l.useSelector)(x.K8),o=(0,l.useSelector)(z.Kh),i=(0,r.FH)({control:e.control,name:"broadcasting_aps"}),s=(0,r.FH)({control:e.control,name:"mdns_proxy.mode"}),E=(0,a.useMemo)(()=>{const e=Ve(i,{apGroups:_});return(n?.limitations||[]).flatMap(e=>e.key===w.l4.NOT_ALL_DEVICES_SUPPORT_FEATURE&&e.device_macs||[]).filter(t=>e.has(t)).map(e=>o.get(e)||{mac:e,name:e})},[_,i,n?.limitations,o]);return a.createElement(Je.A,null,a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_MDNS_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_NETWORKS_FORM_FIELD_IGMP_SNOOPING_LABEL"})),a.createElement(Et.A,null,a.createElement(ct.A,{control:e.control,name:"mdns_proxy.mode",value:Fe.A.OFF},a.createElement(C.sA,{id:"COMMON_OFF"})),a.createElement(ct.A,{control:e.control,name:"mdns_proxy.mode",value:Fe.A.AUTO,tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_MULTICAST_DNS_AUTO_DESCRIPTION"})},a.createElement(C.sA,{id:"COMMON_AUTO"})),a.createElement(ct.A,{control:e.control,name:"mdns_proxy.mode",value:Fe.A.CUSTOM},a.createElement(C.sA,{id:"COMMON_CUSTOM"}))),a.createElement(je.Ay,{form:e,name:"mdns_proxy.mode",noMargin:!0})),s===Fe.A.CUSTOM?a.createElement(Rr,{form:e}):null,!t&&[Fe.A.CUSTOM,Fe.A.AUTO].includes(s)&&E.length?a.createElement(Tn.A,{portal:!0,position:"left",description:a.createElement(Ml.A,{items:E,getItemKey:({mac:e})=>e,renderItem:Cl.Q})},a.createElement(P.A,{maxWidth:et.ng},a.createElement(at.A,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_MDNS_NOT_SUPPORTED"})))):null)};var Dr=n(400261),Mr=n(617883),br=n(989512),Fr=n(545512),Lr=n(239417);const fr=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"multicast_and_broadcast_blocker.enabled"}),n=(0,l.useSelector)(z.m9),_=(0,l.useSelector)(z.ID),o=(0,l.useSelector)(Lr.GB),{formatMessage:i}=(0,C.tz)();return a.createElement(Je.A,null,a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"multicast_and_broadcast_blocker.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_MULTICAST_CONTROL_DESC"})},a.createElement(C.sA,{id:"COMMON_MULTICAST_AND_BROADCAST_BLOCKER"}))),t?a.createElement(a.Fragment,null,a.createElement(da.A,null,a.createElement(C.sA,{id:"SETTINGS_MULTICAST_AND_BROADCAST_BLOCKER_WARNING"})),a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:n?"SETTINGS_WIFI_FORM_ADVANCED_MULTICAST_EXCEPTIONS_DESC_GATEWAY":"SETTINGS_WIFI_FORM_ADVANCED_MULTICAST_EXCEPTIONS_DESC_NO_GATEWAY"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_MULTICAST_EXCEPTIONS"})),a.createElement(Mr.A,{form:e,name:"multicast_and_broadcast_blocker.exceptions",fieldLabel:"COMMON_MAC_ADDRESS",modalTitle:a.createElement(C.sA,{id:"SETTINGS_SECURITY_ADD_MULTIPLE_MACS"}),modalFieldPlaceholder:i({id:"SETTINGS_SECURITY_MULTIPLE_MACS_PLACEHOLDER"}),placeholder:i({id:"COMMON_PLACEHOLDER_EG"},{value:"ab:cd:ef:12:34:56"}),itemSchema:Re.V,transformValue:Dr.Z,extraDisplayColumns:[{id:"name",label:a.createElement(C.sA,{id:"COMMON_NAME"}),renderCell:({item_id:e})=>{const t=_.find(t=>t.mac===e),n=o.find(t=>t.id===e);return t?a.createElement(br.A,{device:t,width:20,height:20}):n?a.createElement(Fr.A,{client:n,width:20,height:20}):a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_MULTICAST_UNKNOWN_HOSTNAME"})}}]}))):null)},gr=({form:e,existingRecord:t})=>{const n=(0,d.A)(w.Xj.MLO),l=(0,r.FH)({control:e.control,name:"mlo_enabled"}),_=(0,r.FH)({control:e.control,name:"private_preshared_keys.enabled"}),o=(0,r.FH)({control:e.control,name:"wlan_bands"}),i=(0,r.FH)({control:e.control,name:"mode"});return n||l?a.createElement(Je.A,null,a.createElement(Ze.A,null,a.createElement(At.A,{reasons:[!l&&_?a.createElement(C.sA,{id:"SETTINGS_WIFI_MLO_PPSK_DISABLED_REASON"}):null,!l&&o.length<2?a.createElement(C.sA,{id:"SETTINGS_WIFI_MLO_DISABLED_REASON"}):null,l||i!==Ye.IOT?null:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED",values:{feature:a.createElement(C.sA,{id:"COMMON_MLO"})}})]},a.createElement(qe.A,{control:e.control,name:"mlo_enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_MLO_DESC"}),tooltipProps:{title:a.createElement(C.sA,{id:"SETTINGS_WIFI_MLO_DESC_TITLE"})},onToggle:n=>{const a=e.getValues("securityProtocol"),l=n||!(0,N.C1)(a)||t?n&&!(0,N.C1)(a)?(0,N.Ni)(a):a:(0,N.Ow)(a),r=$(l,e.getValues("security_mode"));e.setValue("securityProtocol",l),e.setValue("pmf_mode",r),n&&e.setValue("fast_roaming_enabled",!1)}},a.createElement(C.sA,{id:"COMMON_MLO"})))),l?a.createElement(da.A,null,a.createElement(C.sA,{id:"SETTINGS_ENABLE_MLO_WARNING"})):null):null},vr={ng:[1e3,2e3,5500,6e3,9e3,11e3,12e3,24e3],na:[6e3,9e3,12e3,24e3]},hr={1e3:1,2e3:2,5500:5.5,6e3:11,9e3:11,11e3:11,12e3:12,24e3:24,36e3:36,48e3:48,54e3:54},Gr=({form:e,name:t})=>{const n=vr[t],l=(0,Dt.mQ)();return a.createElement(r.xI,{control:e.control,name:`minimum_data_rate_control.values.${t}`,render:({field:e})=>{const r=((e,t)=>{return-1===(n=e.findIndex(e=>e===(t||0)))?0:n;var n})(n,e.value);return a.createElement(st.A,{gap:T.YC},a.createElement(it.A,{labelProps:{weight:"bold"}},a.createElement(C.sA,{id:"ng"===t?"COMMON_RADIO_BAND_NG":"COMMON_RADIO_BAND_NA"})),a.createElement(P.A,{flexDirection:"column",gap:T.YC},a.createElement(P.A,{width:"100%",justifyContent:"stretch"},a.createElement(ba.A,{isDisabled:l,value:[r,10],minValue:0,maxValue:n.length-1,step:1,style:{width:"100%"},onChange:t=>{const a=n[t[0]];a!==e.value&&e.onChange(a)},className:Gt.AH`
                    [data-uic-component='Slider.Thumb']:last-child {
                      display: none;
                    }
                  `,labelEnd:a.createElement(C.sA,{id:"SETTINGS_DATA_RATE_CONTROL_HIGHER_DENSITY_LABEL"}),label:a.createElement(C.sA,{id:"SETTINGS_DATA_RATE_CONTROL_LOWER_DENSITY_LABEL"}),caption:a.createElement(a.Fragment,null,n[r]/1e3," ",a.createElement(C.sA,{id:"COMMON_UNIT_BPS",values:{prefix:"M"}})),captionEnd:a.createElement(a.Fragment,null,n.at(-1)/1e3," ",a.createElement(C.sA,{id:"COMMON_UNIT_BPS",values:{prefix:"M"}}))}))))}})},yr=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"wlan_bands"})||[],n=(0,mt.k)((0,r.FH)({control:e.control,name:"minimum_data_rate_control"})),l=(0,Dt.mQ)();return a.createElement(Je.A,null,a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"minimum_data_rate_control.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_OVERRIDE_DTIM_DR_LABEL_DESC"})},a.createElement(C.sA,{id:"COMMON_MINIMUM_DATA_RATE_CONTROL"}))),n?.enabled?a.createElement(a.Fragment,null,t.includes(K._$.NG)?a.createElement(a.Fragment,null,a.createElement(Gr,{form:e,name:"ng"}),l?null:a.createElement(da.A,null,a.createElement(C.sA,{id:(n?.values?.ng||0)>11e3?"SETTINGS_WIFI_MINRATE_NO_LEGACY_SUPPORT":"SETTINGS_WIFI_MINRATE_MAX_COMPATIBILITY"}),","," ",a.createElement(C.sA,{id:"SETTINGS_WIFI_MINRATE_MBPS_BEACON",values:{rate:hr[n?.values?.ng??1e3]}}))):null,t.includes(K._$.NA)?a.createElement(Gr,{form:e,name:"na"}):null):null)};var Wr=n(543815);const Ur=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"mac_address_filter.enabled"}),{formatMessage:n}=(0,C.tz)(),[l,_]=(0,a.useState)(!1);return a.createElement(Je.A,null,a.createElement(st.A,null,a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"mac_address_filter.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_MAC_ADDRESS_FILTER_DESC"})},a.createElement(C.sA,{id:"COMMON_MAC_ADDRESS_FILTER"})))),t?a.createElement(a.Fragment,null,a.createElement(st.A,null,a.createElement(it.A,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_MAC_ADDRESS_FILTER_TYPE_LABEL"})),a.createElement(Et.A,null,a.createElement(ct.A,{control:e.control,name:"mac_address_filter.type",value:K.QN.ALLOW},a.createElement(C.sA,{id:"COMMON_ALLOW"})),a.createElement(ct.A,{control:e.control,name:"mac_address_filter.type",value:K.QN.DENY},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_MAC_ADDRESS_FILTER_TYPE_DENY"})))),a.createElement(Mr.A,{form:e,name:"mac_address_filter.mac_addresses",fieldLabel:"COMMON_MAC_ADDRESS",modalTitle:a.createElement(C.sA,{id:"SETTINGS_SECURITY_ADD_MULTIPLE_MACS"}),modalFieldPlaceholder:n({id:"SETTINGS_SECURITY_MULTIPLE_MACS_PLACEHOLDER"}),placeholder:n({id:"COMMON_PLACEHOLDER_EG"},{value:"ab:cd:ef:12:34:56"}),itemSchema:Re.V,transformValue:Dr.Z,actions:a.createElement($e.A,{type:"button",onPress:()=>_(!0),fontSize:"medium"},a.createElement(C.sA,{id:"COMMON_ADD_CLIENT"}))}),l?a.createElement(Wr.A,{onClose:()=>{_(!1)},onSubmit:t=>{_(!1),e.setValue("mac_address_filter.mac_addresses",(0,an.A)([...e.getValues("mac_address_filter.mac_addresses")||[],...t]))}}):null):null)};var Vr=n(860631),wr=n(325734);const zr=({form:e})=>{const t=(0,l.useSelector)(z.kx),n=(0,l.useSelector)(x.K8),_=(0,r.FH)({control:e.control,name:"broadcasting_aps"}),o=(0,a.useMemo)(()=>Ve(_,{apGroups:n}),[n,_]),i=(0,a.useMemo)(()=>t.filter(e=>o.has(e.mac)&&!(0,Vr.ym)(e)),[t,o]);return i.length?a.createElement(wr.A,{list:i.map(e=>e.name),messageId:"SETTINGS_WIFI_FORM_PASSPOINT_UNSUPPORTED_DEVICES_WARNING"}):null};var Hr=n(363370),kr=n(349107),xr=n(765562),Br=n(15095),Yr=n(152408),Kr=n(627440),$r=n(118835),jr=n(651628),Xr=n(616660);const qr=()=>{const e=(0,l.useDispatch)(),t=(0,wl.W6)(),n=(0,l.useSelector)(z.Lt),r=(0,Br.A)(`${Kr.VO.CLIENTS}/${$r.M.HOTSPOT}`),_=(0,a.useCallback)(()=>{e((0,jr.je)(Xr.z.LANDING_PAGE)),t.push(r)},[e,t,r]);return a.createElement(P.A,{gap:T.kc,flexDirection:"column"},a.createElement(at.A,null,a.createElement(P.A,{flexDirection:"column",gap:T.YC},a.createElement(pt.A,{variant:"inherit"},a.createElement(C.sA,{id:"SETTINGS_GUEST_HOTSPOT_PORTAL_INFO",values:{guestPortalButton:a.createElement($e.A,{type:"button",fontSize:"medium",onPress:_},a.createElement(C.sA,{id:"COMMON_HOTSPOT_PORTAL"}))}})),a.createElement(Gn.A,{size:"medium"},a.createElement(C.sA,{id:"SETTINGS_GUEST_HOTSPOT_PORTAL_INFO_INSIGHTS",values:{insightsLink:a.createElement($e.A,{type:"button",fontSize:"medium",onPress:_},a.createElement(C.sA,{id:"COMMON_CLIENTS"}))}})))),n?a.createElement(Yr.A,{feature:"COMMON_HOTSPOT_PORTAL"}):null)},Qr=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"hotspot.type"}),n=(0,d.A)(w.Xj.HOTSPOT2_PASSPOINT);return a.createElement(Je.A,null,a.createElement(st.A,null,a.createElement(it.A,{tooltipProps:{isInteractive:!0},tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_HOTSPOT_2_TOOLTIP",values:{radiusProfileLink:a.createElement(Hr.A,{to:Y.E5,size:"inherit"},a.createElement(C.sA,{id:"COMMON_RADIUS_PROFILE"})),learnMoreLink:a.createElement(kr.A,{id:"COMMON_LEARN_MORE",href:xr.A.hotspotPasspointArticle,noWrap:!0})}})},a.createElement(C.sA,{id:"SETTINGS_HOTSPOT_TYPE"})),a.createElement(Et.A,null,a.createElement(ct.A,{control:e.control,name:"hotspot.type",value:Ee.CAPTIVE_PORTAL,onCheck:()=>{e.getValues("mlo_enabled")||re(e,O.r.OPEN),e.setValue("client_device_isolation_enabled",!0,{shouldDirty:!0})}},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_CAPTIVE_PORTAL"})),a.createElement(At.A,{reason:n||t===Ee.PASSPOINT?null:a.createElement(C.sA,{id:"SETTINGS_PASSPOINT_SUPPORT_REQUIRED"})},a.createElement(ct.A,{control:e.control,name:"hotspot.type",value:Ee.PASSPOINT,onCheck:()=>{e.setValue("radius_mac_authentication.enabled",!1),(0,N.ME)(e.getValues("securityProtocol"))||re(e,e.getValues("wlan_bands")?.includes(K._$.AX)?O.r.WPA3_ENTERPRISE:O.r.WPA2_ENTERPRISE)}},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_PASSPOINT"}))))),t===Ee.CAPTIVE_PORTAL?a.createElement(qr,null):null,t===Ee.PASSPOINT?a.createElement(zr,{form:e}):null)};var Jr=n(278138);const Zr=({form:e})=>a.createElement(Ze.A,null,a.createElement(Jr.A,{form:e,name:"high_security_192_bit_mode_enabled",confirmationTitle:a.createElement(C.sA,{id:"COMMON_ARE_YOU_SURE"}),confirmationMessage:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA3_192_BIT_MODE_WARNING"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA3_192_BIT_MODE"}))),e_=({form:e})=>a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"hide_ssid_enabled"},a.createElement(C.sA,{id:"COMMON_HIDE_WIFI_NAME"}))),t_=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"mode"}),n=(0,r.FH)({control:e.control,name:"group_rekey_interval.enabled"});return a.createElement(P.A,{flexDirection:"row",gap:T.Ln,justifyContent:"space-between",alignItems:"flex-start"},a.createElement(Ze.A,null,a.createElement(At.A,{reason:n||t!==Ye.IOT?null:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED",values:{feature:a.createElement(C.sA,{id:"COMMON_GROUP_REKEY_INTERVAL"})}})},a.createElement(qe.A,{control:e.control,name:"group_rekey_interval.enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_GROUP_REKEY_INTERVAL_DESC"})},a.createElement(C.sA,{id:"COMMON_GROUP_REKEY_INTERVAL"})))),a.createElement(P.A,{width:130},n?a.createElement(kt.A,{control:e.control,name:"group_rekey_interval.value",contentAfter:a.createElement(C.sA,{id:"COMMON_UNIT_SECONDS_SHORT"}),min:ye.MIN,max:ye.MAX}):null))},n_=({form:e})=>{const t=(0,Dt.mQ)(),n=(0,r.FH)({control:e.control,name:"mode"}),l=(0,r.FH)({control:e.control,name:"securityProtocol"}),_=(0,r.FH)({control:e.control,name:"mlo_enabled"});return a.createElement(a.Fragment,null,a.createElement(Ze.A,null,a.createElement(At.A,{reasons:[n===Ye.IOT?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED",values:{feature:a.createElement(C.sA,{id:"COMMON_FAST_ROAMING"})}}):null,X(l)?null:a.createElement(C.sA,{id:"SETTINGS_NOT_SUPPORTED_BY_SECURITY_PROTOCOL",values:{feature:a.createElement(C.sA,{id:"COMMON_FAST_ROAMING"}),securityProtocol:a.createElement(C.sA,{id:De.z[l]})}})]},a.createElement(qe.A,{control:e.control,name:"fast_roaming_enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_ADVANCED_FAST_ROAMING_LABEL_DESC"})},a.createElement(C.sA,{id:"COMMON_FAST_ROAMING"})))),!t&&_?a.createElement(da.A,null,a.createElement(C.sA,{id:"SETTINGS_MLO_ENABLED_FAST_ROAMING_WARNING"})):null)},a_=[K._$.NG,K._$.NA,K._$.AX],l_=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"dtim_period"}),n=(0,r.FH)({control:e.control,name:"mode"}),l=(0,r.FH)({control:e.control,name:"wlan_bands"}),_=a_.filter(e=>!l.length||l.includes(e));return a.createElement(st.A,null,a.createElement(Ze.A,null,a.createElement(At.A,{reason:n===Ye.IOT?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED",values:{feature:a.createElement(C.sA,{id:"COMMON_DTIM_PERIOD"})}}):null},a.createElement(qe.A,{control:e.control,name:"dtim_period.auto",onToggle:()=>e.trigger("dtim_period"),tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_OVERRIDE_DTIM_PERIOD_LABEL_DESC"})},a.createElement(C.sA,{id:"SETTINGS_AUTO_DTIM_PERIOD"})))),t?.auto?null:a.createElement(P.A,{flexDirection:"row",gap:T.Ln,alignItems:"flex-start"},_.map(t=>a.createElement(P.A,{flex:1,key:t},a.createElement(kt.A,{control:e.control,name:`dtim_period.${t}`,label:a.createElement(C.sA,{id:Ut[t]}),min:1,max:Le}))),_.length<a_.length?a.createElement(P.A,{flex:a_.length-_.length}):null))},r_=[K.J7.OFF,K.J7.AUTO,K.J7.MANUAL],__={[K.J7.OFF]:"COMMON_OFF",[K.J7.AUTO]:"COMMON_AUTO",[K.J7.MANUAL]:"COMMON_MANUAL"},o_=({form:e})=>{const{formatMessage:t}=(0,C.tz)(),n=(0,Dt.mQ)(),_=(0,Dl.A)(w.Xj.WIFI_DNS_ASSISTANCE),o=(0,l.useSelector)(x.K8),i=(0,l.useSelector)(z.Kh),s=(0,r.FH)({control:e.control,name:"mode"}),E=(0,r.FH)({control:e.control,name:"dns_assistance.mode"}),c=(0,r.FH)({control:e.control,name:"broadcasting_aps"}),{field:A}=(0,r.as)({control:e.control,name:"dns_assistance.servers"}),d=A.value||[],m=(0,a.useMemo)(()=>{const e=Ve(c,{apGroups:o});return(_?.limitations||[]).flatMap(e=>e.key===w.l4.NOT_ALL_DEVICES_SUPPORT_FEATURE&&e.device_macs||[]).filter(t=>e.has(t)).map(e=>i.get(e)||{mac:e,name:e})},[o,c,_?.limitations,i]);return a.createElement(At.A,{position:"left",reason:s===Ye.IOT&&E===K.J7.OFF?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED",values:{feature:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_DNS_ASSISTANCE"})}}):null},a.createElement(Je.A,null,a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_DNS_ASSISTANCE_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_DNS_ASSISTANCE"})),a.createElement(Et.A,null,r_.map(t=>a.createElement(ct.A,{key:t,value:t,control:e.control,name:"dns_assistance.mode"},a.createElement(C.sA,{id:__[t]}))))),E===K.J7.MANUAL?a.createElement(Je.A,null,d.map((n,l)=>a.createElement(P.A,{key:l,gap:T.kc,alignItems:"flex-start"},a.createElement(P.A,{flex:1},a.createElement(Ht.A,{control:e.control,name:`dns_assistance.servers.${l}`,placeholder:t({id:"SETTINGS_WIFI_FORM_DNS_ASSISTANCE_SERVER_PLACEHOLDER"},{number:l+1})})),a.createElement(P.A,{height:Qe.b,alignItems:"center"},a.createElement(Bn.A,{variant:"tertiary-neutral",width:"square",type:"button",onPress:()=>A.onChange(d.filter((e,t)=>t!==l)),isDisabled:d.length<=1},a.createElement(hl.A,{size:"original"}))))),d.length<2?a.createElement(P.A,null,a.createElement($e.A,{fontSize:"medium",type:"button",onClick:()=>A.onChange([...d,""])},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_DNS_ASSISTANCE_ADD_SERVER"}))):null):null,!n&&E!==K.J7.OFF&&m.length?a.createElement(Tn.A,{portal:!0,position:"left",description:a.createElement(Ml.A,{items:m,getItemKey:({mac:e})=>e,renderItem:Cl.Q})},a.createElement(P.A,{maxWidth:et.ng},a.createElement(at.A,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_DNS_ASSISTANCE_NOT_SUPPORTED"})))):null))},i_=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"radius_profile"}),n=(0,r.FH)({control:e.control,name:"das_dac_coa_enabled"}),_=(0,l.useSelector)(v.selectCustomRadiusProfiles),o=(0,a.useMemo)(()=>{if(!t?.localProfile){const e=_.find(({_id:e})=>e===t.profile_id);return e?.accounting_enabled}return!1},[t,_]);return a.createElement(Ze.A,null,a.createElement(At.A,{reason:o||n?null:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_DASDAC_DISABLED_DESCRIPTION"})},a.createElement(qe.A,{control:e.control,name:"das_dac_coa_enabled",tooltipProps:{isInteractive:!0},tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_DASDAC_DESCRIPTION",values:{link:a.createElement(kr.A,{id:"COMMON_LEARN_MORE",href:xr.A.radiusConfigureArticle})}})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_RADIUS_DASDAC"}))))},s_=({form:e})=>a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"client_device_isolation_enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_CLIENT_ISOLATION_DESC"})},a.createElement(C.sA,{id:"COMMON_CLIENT_DEVICE_ISOLATION"}))),E_=({form:e})=>a.createElement(Ze.A,null,a.createElement(qe.A,{control:e.control,name:"ccmp_encryption_enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_GENERAL_FIELD_CCMP_ENCRYPTION_DESCRIPTION"})},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_GENERAL_FIELD_CCMP_ENCRYPTION_LABEL"}))),c_=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"mode"});return a.createElement(Ze.A,null,a.createElement(At.A,{reason:t===Ye.IOT?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED",values:{feature:a.createElement(C.sA,{id:"COMMON_BSS_TRANSITION"})}}):null},a.createElement(qe.A,{control:e.control,name:"bss_transition_enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_BSS_TRANSITION_LABEL_DESC"})},a.createElement(C.sA,{id:"COMMON_BSS_TRANSITION"}))))};var A_=n(180524),d_=n(128736),m_=n(63020);const I_="device-status",S_=Gt.AH`
  .${I_} {
    display: none;
  }
`,T_=({form:e,existingRecord:t})=>{const{formatMessage:n}=(0,C.tz)(),_=(0,l.useSelector)(z.kx),o=(0,l.useSelector)(u.b),i=(0,r.FH)({control:e.control,name:"broadcasting_aps.ap_macs"})||[],s=(0,r.FH)({control:e.control,name:"wlan_bands"})||[],E=(0,r.FH)({control:e.control,name:"mdns_proxy"}),c=(0,a.useMemo)(()=>new Set(St(E)),[E]),A=Tt({existingRecord:t,form:e}),d=(0,ln.A)(_.map(e=>({...e,isSsidLimitReached:(0,_t.Ly)((0,rt.d)((0,_t.qm)(A,e.mac),o),{deviceMac:e.mac})})),[e=>e.isSsidLimitReached?1:0,e=>(0,Jl.wk)((0,Jl.S9)(e))?0:1],["asc","asc"]).map(e=>{const t=e.isSsidLimitReached&&!i.includes(e.mac),l=!!s.length&&!s.some(t=>e.radio_table?.some(e=>(0,m_.A)(e?.radio,[t])&&!(0,Vt.Ww)(e))),r=c.has(e.mac)&&i.includes(e.mac);return{value:e.mac,label:(0,Cl.Q)(e),additionalInfo:e.ip,disabled:t||r,tooltipDescription:t?a.createElement(C.sA,{id:"SETTINGS_WIFI_LIMIT_ON_AP_REACHED",values:{name:(0,Cl.Q)(e)}}):r?a.createElement(C.sA,{id:"SETTINGS_AP_IS_USED_IN_MULTICAST_FILTERING"}):null,tooltipPosition:"left",tooltipPortal:!0,caption:(0,Cl.Lm)(e.model),tooltipVisibility:"disabled",image:a.createElement(P.A,{alignItems:"center",gap:T.YC},a.createElement(A_.A,{description:(0,Jl.F1)(e,(0,Jl.S9)(e),n)},a.createElement(P.A,{className:I_,marginRight:`-${T.YC}`},a.createElement(er.A,{status:(0,Jl.Nf)(e)}))),l?a.createElement(A_.A,{description:a.createElement(C.sA,{id:"SETTINGS_WIFI_INVALID_BAND_AP_SELECTION"})},a.createElement(P.A,{alignItems:"center"},a.createElement(d_.A,null))):a.createElement(Wl.A,{model:e.model,width:20,height:20}))}});return a.createElement(Gl.A,{control:e.control,name:"broadcasting_aps.ap_macs",options:d,triggerButtonText:a.createElement(C.sA,{id:"SETTINGS_WIFI_SELECT_APS"}),chipClassName:S_,truncateLabels:!0})};var N_,O_=n(250791),u_=n(246942),p_=n.n(u_),P_=n(333422),R_=n(262483);!function(e){e.GROUP="group",e.DEVICE="device"}(N_||(N_={}));const C_=e=>e.isApGroupWlanLimitReached?"disabled":e.type!==N_.DEVICE||(0,Jl.wk)((0,Jl.S9)(e.device))?"inherit":"text-3",D_=[{id:"name",minWidth:80,sortable:!1,label:a.createElement(C.sA,{id:"COMMON_NAME"}),renderCell:e=>e.type===N_.DEVICE?a.createElement(tr,{device:e.device}):a.createElement(P.A,{maxWidth:260,alignItems:"center",gap:T.YC},a.createElement(Rn.A,{variant:"inherit",color:C_(e)},e.group.name),a.createElement(pt.A,{variant:"inherit",color:C_(e)},"(",e.children.length," ",a.createElement(C.sA,{id:"COMMON_APS"}),")")),omitHideCellOverflow:({type:e})=>e===N_.GROUP},{id:"model",minWidth:60,sortable:!1,label:a.createElement(C.sA,{id:"COMMON_MODEL"}),renderCell:e=>e.type===N_.DEVICE?a.createElement(Rn.A,{color:C_(e),variant:"inherit"},(0,Cl.Lm)(e.device.model)):null},{id:"ip",minWidth:60,sortable:!1,label:a.createElement(C.sA,{id:"COMMON_IP_ADDRESS"}),renderCell:e=>e.type===N_.DEVICE?a.createElement(Rn.A,{color:C_(e),variant:"inherit"},(0,Ql.Wcd)(e.device)||Pn.L):null}],M_=Gt.AH`
  /* hide select all checkbox from header. User is not able to select all groups as one of group is "All APs". */
  thead > tr > th:first-child {
    opacity: 0;
    pointer-events: none;
  }

  /* Disable pointer cursor for child rows as those are not selectable */
  tr.isChild td span,
  tr.isChild td div {
    cursor: default;
  }

  /* hide checkboxes for child rows and for AP groups (parent row) with limits reached */
  tr.isChild > td:first-of-type > label,
  tr.isApGroupWlanLimitReached > td:first-of-type > label,
  tr.isGroupRequiredForMdns.isChild > td:first-of-type > label {
    opacity: 0;
  }

  tr.isGroupRequiredForMdns > td:first-of-type > label {
    opacity: ${T.xN};
  }

  /* disable click events for checkbox area for AP groups (parent & child rows) with limits reached */
  tr.isApGroupWlanLimitReached > td:first-of-type > label,
  tr.isGroupRequiredForMdns > td:first-of-type > label {
    pointer-events: none;
  }

  /* hide Model and IP cells pointer events for group rows to allow Name hover to work on whole width of the row */
  tr.isGroup > td:nth-of-type(3) > div,
  tr.isGroup > td:nth-of-type(4) > div {
    pointer-events: none;
  }
`,b_=({value:e,onChange:t,validationConfig:n,form:_})=>{const o=(0,l.useSelector)(x.K8),i=(0,l.useSelector)(y.EL),s=(0,l.useSelector)(z.kx),E=(0,l.useSelector)(u.b),c=(0,r.FH)({control:_.control,name:"mdns_proxy"}),A=(0,a.useMemo)(()=>new Set(St(c)),[c]),d=(0,a.useMemo)(()=>new Set((c.mode===Fe.A.CUSTOM?c.rules.flatMap(e=>e.devices.type===Fe.LM.GROUP?e.devices.group_ids:[]):[])||[]),[c]),m=o.filter(e=>!(0,Me.K5)(e)),I=o.find(Me.K5),[S,N]=(0,a.useState)(!1),[O,p]=(0,a.useState)(null),R=o.find(({_id:e})=>e===O),D=(0,a.useMemo)(()=>(e||[]).flatMap(e=>{const{device_macs:t=[]}=m.find(({_id:t})=>t===e)||{};return t.filter(e=>s.some(t=>t.mac===e)).map(t=>`${e}-${t}`)}),[e,m,s]),M=0===I?.device_macs.length,b=(0,a.useMemo)(()=>(0,ln.A)(m,e=>e.name).filter(({for_wlanconf:e})=>!e).map(t=>{const a=(0,_t.Ly)((0,rt.d)((0,_t.bx)(n,t._id),E),{type:ot.p.SSID_LIMIT_EXCEEDED}),l=new Set(o.filter(n=>n._id!==t._id&&e?.includes(n._id)).flatMap(e=>e.device_macs||[])),r=!!e?.includes(t._id)&&(d.has(t._id)||t.device_macs.some(e=>A.has(e))&&[...A].some(e=>!l.has(e))),_=s.filter(({mac:e})=>t.device_macs.includes(e)).map(e=>({_id:`${t._id}-${e.mac}`,type:N_.DEVICE,device:e,group:t,isApGroupWlanLimitReached:a,isGroupRequiredForMdns:r}));return{_id:`${t._id}`,type:N_.GROUP,group:t,isApGroupWlanLimitReached:a,isGroupRequiredForMdns:r,children:(0,ln.A)(_,[e=>(0,Jl.wk)((0,Jl.S9)(e.device))?0:1,e=>e.device?.name],["asc","asc"])}}),[m,n,E,o,e,d,A,s]),F=(0,a.useCallback)(n=>{const a=[...new Set(n.map(e=>String(e)).map(e=>e.split(ra.jr)[0]||e))].filter(t=>e?.includes(t)||!b.find(e=>e._id===t)?.disabled).sort();t(a)},[t,b,e]),L=(0,a.useCallback)(e=>e.type===N_.DEVICE?null:a.createElement(P.A,{justifyContent:"flex-end",alignItems:"center",height:"100%",marginRight:T.kc,padding:"none",gap:T.YC},a.createElement(Qt.A,{name:i?"ap-groups-view":"ap-groups-edit",type:"button",variant:"inline",onClick:()=>{p(e.group._id)}},a.createElement(C.sA,{id:i?"COMMON_ACTION_VIEW":"COMMON_ACTION_EDIT"})),e.isApGroupWlanLimitReached&&e.group.device_macs.length>0?a.createElement(Mt.A,{portal:!0,description:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_DEVICES_TABLE_LIMIT_REACHED"})}):e.isGroupRequiredForMdns?a.createElement(Mt.A,{portal:!0,description:a.createElement(C.sA,{id:"SETTINGS_APS_USED_IN_MULTICAST_FILTERING"})}):null),[i]),f=(0,a.useCallback)(({isApGroupWlanLimitReached:e,isGroupRequiredForMdns:t,type:n})=>p_()({isChild:n!==N_.GROUP,isApGroupWlanLimitReached:e,isGroupRequiredForMdns:t,isGroup:n===N_.GROUP}),[]),g=(0,a.useMemo)(()=>s.some(e=>!(0,_t.Ly)((0,rt.d)((0,_t.vm)(n,e.mac),E),{deviceMac:e.mac})),[s,n,E]),[v,h]=(0,a.useState)([]),G=(0,a.useMemo)(()=>(0,O_.A)(b.filter(e=>v.includes(e._id)).map(e=>e.children?e.children.length:0)),[v,b]);return a.createElement(P.A,{width:"100%",flexDirection:"column",...nt.A.addDataTestId(nt.A.TestId.AP_GROUPS_TABLE)},a.createElement(P_.AC,{isWindowsTable:!0,rows:b.length+G,tableMaxHeight:352,marginTop:"none"},a.createElement(ka.A,{columns:D_,disableColumnFilters:!0,idField:R_.ID_FIELD,items:b,renderHoverContent:L,multiSelectMode:!0,truncateHeaderCells:!0,onChangeSelection:F,rowClassName:f,disableSelection:i,disableChildrenSelection:!0,headerHeight:32,tableClassName:M_,selectedIds:D,onExpandOrContract:e=>h(e)})),M?null:a.createElement(A_.A,{description:g?void 0:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_DEVICES_TABLE_LIMIT_REACHED_FOR_DEFAULT"})},a.createElement(P.A,{height:32,alignItems:"center"},a.createElement($e.A,{fontSize:"medium",type:"button",onPress:()=>N(!0),isDisabled:!g},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUPS_CREATE_NEW"})))),S?a.createElement(Er,{existingRecord:void 0,onDismiss:()=>N(!1)}):null,R?a.createElement(Er,{existingRecord:R,onDismiss:()=>p(null),onDelete:()=>{const n=(e||[]).filter(e=>e!==R._id);t(n)}}):null)},F_=({form:e,existingRecord:t})=>{const n=Tt({existingRecord:t,form:e});return a.createElement(st.A,null,a.createElement(r.xI,{control:e.control,name:"broadcasting_aps.group_ids",render:({field:t})=>a.createElement(b_,{onChange:t.onChange,value:t.value,validationConfig:n,form:e})}),a.createElement(je.Ay,{form:e,name:"broadcasting_aps.group_ids"}))},L_=(e,t,n)=>{const l=t.ap_group_mode===e;switch(e){case K.qq.ALL:if(!l&&(0,_t.Ly)((0,rt.d)((0,_t.rY)(t),n),{type:ot.p.SSID_LIMIT_EXCEEDED}))return a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_DEVICES_TABLE_LIMIT_REACHED"});break;case K.qq.DEVICES:case K.qq.GROUPS:if(!l&&(n.apGroups?.find(Me.K5)?.device_macs?.length||0)<=1)return a.createElement(C.sA,{id:"SETTINGS_WIFI_ATTACH_MORE_AP_DEVICES"})}return null},f_=({form:e,existingRecord:t})=>{const n=(0,r.FH)({control:e.control,name:"broadcasting_aps"}),_=(0,l.useSelector)(u.b),o=Tt({form:e,existingRecord:t}),i=(0,l.useSelector)(x.K8),s=(0,r.FH)({control:e.control,name:"broadcasting_aps.type"}),E=(0,r.FH)({control:e.control,name:"mdns_proxy"}),c=(0,r.FH)({control:e.control,name:"broadcasting_aps.group_ids"}),A=(0,a.useMemo)(()=>St(E),[E]),d=(0,a.useMemo)(()=>!A.every(e=>i.some(t=>c?.includes(t._id)&&t.device_macs?.includes(e))),[A,c,i]),m=(0,a.useMemo)(()=>E.mode===Fe.A.CUSTOM&&(E.rules||[]).some(e=>e.devices?.type===Fe.LM.GROUP),[E]);return a.createElement(a.Fragment,null,a.createElement(st.A,null,a.createElement(it.A,{tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUPS_DESCRIPTION"})},a.createElement(C.sA,{id:"COMMON_BROADCASTING_APS"})),a.createElement(Et.A,null,a.createElement(At.A,{reason:L_(K.qq.ALL,o,_)},a.createElement(ct.A,{control:e.control,name:"broadcasting_aps.type",value:ge.ALL},a.createElement(C.sA,{id:"COMMON_ALL"}))),a.createElement(At.A,{reasons:[L_(K.qq.GROUPS,o,_),s!==ge.GROUP&&d?a.createElement(C.sA,{id:"SETTINGS_CLEAR_SPECIFIC_APS_IN_MULTICAST_FILTERING"}):null]},a.createElement(ct.A,{control:e.control,name:"broadcasting_aps.type",value:ge.GROUP},a.createElement(C.sA,{id:"COMMON_GROUP"}))),a.createElement(At.A,{reasons:[L_(K.qq.DEVICES,o,_),s!==ge.SPECIFIC&&m?a.createElement(C.sA,{id:"SETTINGS_CLEAR_GROUPS_APS_IN_MULTICAST_FILTERING"}):null]},a.createElement(ct.A,{control:e.control,name:"broadcasting_aps.type",value:ge.SPECIFIC,onCheck:()=>{const t=e.getValues("mdns_proxy"),n=St(t);e.setValue("broadcasting_aps.ap_macs",Array.from(new Set([...e.getValues("broadcasting_aps.ap_macs")||[],...n])))}},a.createElement(C.sA,{id:"COMMON_SPECIFIC"}))))),n?.type===ge.SPECIFIC?a.createElement(T_,{existingRecord:t,form:e}):null,n?.type===ge.GROUP?a.createElement(F_,{existingRecord:t,form:e}):null)};var g_=n(329109);const v_=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"advertise_device_name_in_beacon"}),n=(0,r.FH)({control:e.control,name:"mode"});return a.createElement(Ze.A,null,a.createElement(At.A,{reason:t||n!==Ye.IOT?null:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ENHANCED_INTEROP_FEATURE_DISABLED",values:{feature:a.createElement(C.sA,{id:"SETTINGS_SHOW_AP_NAME_IN_BEACON"})}})},a.createElement(qe.A,{control:e.control,name:"advertise_device_name_in_beacon",tooltip:a.createElement(C.sA,{id:"SETTINGS_SHOW_AP_NAME_IN_BEACON_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_SHOW_AP_NAME_IN_BEACON"}))))},h_=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"wlan_bands"})||[],n=(0,r.FH)({control:e.control,name:"band_steering_enabled"});return a.createElement(Ze.A,null,a.createElement(At.A,{reason:t.length<2&&!n?a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_BAND_STEERING_DISABLED_BANDS"}):null},a.createElement(qe.A,{control:e.control,name:"band_steering_enabled",tooltip:a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_ADVANCED_BAND_STEERING_DESC"})},a.createElement(C.sA,{id:"COMMON_BAND_STEERING"}))))},G_=({form:e,autoDefaultValues:t})=>{const n=(0,r.FH)({control:e.control,name:"mode"}),l=(0,r.FH)({control:e.control,name:"wlan_bands"}),_=n===Ye.HOTSPOT,o=1===l.length&&l.includes(K._$.AX);return a.createElement(Ct.A,{form:e,name:"advanced",variant:"capsule",tabs:[{label:a.createElement(C.sA,{id:"COMMON_AUTO"}),id:s.C.AUTO,disabled:_||o,tooltipProps:_?{portal:!0,description:a.createElement(C.sA,{id:"SETTINGS_MANUAL_REQUIRED"})}:void 0},{label:a.createElement(C.sA,{id:"COMMON_MANUAL"}),id:s.C.MANUAL}],onAfterChange:n=>{n===s.C.AUTO&&Object.entries(t).forEach(([t,n])=>{e.getValues("mode")===Ye.IOT&&Ue.includes(t)||e.setValue(t,n,{shouldDirty:!0})})}})};var y_=n(94841);const W_=(e,t,n,a)=>{const l=t?.find(Me.K5);if(e?.ap_group_mode===K.qq.ALL)return{type:ge.ALL};if(e?.ap_group_mode===K.qq.GROUPS)return{type:ge.GROUP,group_ids:e.ap_group_ids||[]};if(e?.ap_group_mode===K.qq.DEVICES)return{type:ge.SPECIFIC,ap_macs:t.filter(t=>t.for_wlanconf&&e.ap_group_ids?.includes(t._id)).flatMap(e=>e.device_macs||[])};if(!(0,_t.Ly)((0,rt.d)((0,_t.rY)((0,_t.bT)({ap_group_mode:K.qq.DEVICES},n)),a),{type:ot.p.SSID_LIMIT_EXCEEDED}))return{type:ge.ALL};const r=l?.device_macs?.filter(t=>!(0,_t.Ly)((0,rt.d)((0,_t.vm)((0,_t.bT)(e||{ap_group_mode:K.qq.DEVICES},n),t),a),{type:ot.p.SSID_LIMIT_EXCEEDED}));return{type:ge.SPECIFIC,ap_macs:r}},U_=(e,t,n)=>({localProfile:e?.radiusprofile_id===t||!e?.radiusprofile_id,profile_id:e?.radiusprofile_id&&e?.radiusprofile_id!==t?e.radiusprofile_id:n[0]?._id}),V_=(e,t,n,a,l,r,_,o,i)=>{const E=e?.setting_preference===s.C.AUTO?e:a.find(({setting_preference:e,enhanced_iot:t})=>e===s.C.AUTO&&!t),c=_.find(on.nz),A=e?.wlan_bands??o,d=l.find(tt.b),m=e?(0,N.dt)(e)??O.r.WPA23_PERSONAL:E?(0,N.dt)(E)??O.r.WPA23_PERSONAL:O.r.WPA23_PERSONAL,I=(e=>e?e.wpa3_transition&&e.wpa3_support?O.I.ENHANCED_OPEN_TRANSITION:e.wpa3_support?O.I.ENHANCED_OPEN:O.I.OPEN:O.I.OPEN)(e);return{name:e?.name||"",broadcasting_aps:W_(e,t,A,n),mode:e?.enhanced_iot?Ye.IOT:e?.hotspot2conf_enabled||e?.is_guest?Ye.HOTSPOT:Ye.STANDARD,hotspot:{type:e?.hotspot2conf_enabled?Ee.PASSPOINT:Ee.CAPTIVE_PORTAL,venue_name:e?.hotspot2?.venue_name?.[0]?.name||"",venue_type:ga({group:e?.hotspot2?.venue_group,type:e?.hotspot2?.venue_type}),cellular_network_list:e?.hotspot2?.cellular_network_list||[],roaming_consortium_list:e?.hotspot2?.roaming_consortium_list||[],network_type:e?.hotspot2?.network_type||K.KX.FREE_PUBLIC_NETWORK,type_availability_ipv4:e?.hotspot2?.ipaddr_type_avail_v4,type_availability_ipv6:e?.hotspot2?.ipaddr_type_avail_v6,domain_name_list:e?.hotspot2?.domain_name_list||[],nai_realm_list:(e?.hotspot2?.nai_realm_list||[]).map(e=>({...e,sub_methods:(0,y_.A)(e.auth_ids||[],e.auth_vals||[]).map(([e,t])=>(0,b.bc)({auth_id:e,auth_val:t}))})),capabilities:e?.hotspot2?.capab||[],operator_friendly_name:e?.hotspot2?.friendly_name?.[0]?.text||"",wan_metrics:{enabled:!!e?.hotspot2?.metrics_status,info:e?.hotspot2?.metrics_info_link_status,symmetric_link:e?.hotspot2?.metrics_info_symmetric,at_capacity:e?.hotspot2?.metrics_info_at_capacity,uplink_speed:e?.hotspot2?.metrics_uplink_speed_set?e.hotspot2.metrics_uplink_speed:void 0,downlink_speed:e?.hotspot2?.metrics_downlink_speed_set?e.hotspot2.metrics_downlink_speed:void 0,uplink_load:e?.hotspot2?.metrics_uplink_load_set?e?.hotspot2?.metrics_uplink_load:void 0,downlink_load:e?.hotspot2?.metrics_downlink_load_set?e?.hotspot2?.metrics_downlink_load:void 0,load_measurement:{enabled:!!e?.hotspot2?.metrics_measurement_set,value:e?.hotspot2?.metrics_measurement}}},mac_address_filter:{enabled:!!e?.mac_filter_enabled,type:e?.mac_filter_policy||K.QN.ALLOW,mac_addresses:e?.mac_filter_list||[]},wlan_bands:A,network_id:e?.networkconf_id??E?.networkconf_id??c?._id,password:e?.x_passphrase||"",advanced:e?.setting_preference||s.C.AUTO,securityProtocol:m,private_preshared_keys:{enabled:!!e?.private_preshared_keys_enabled,items:(e?.private_preshared_keys||[]).map(e=>({network_id:e.networkconf_id,password:e.password}))},multicast_to_unicast_enabled:!!e?.mcastenhance_enabled,multicast_and_broadcast_blocker:{enabled:!!e?.bc_filter_enabled,exceptions:e?.bc_filter_list||[]},mlo_enabled:e?.mlo_enabled??E?.mlo_enabled??!1,band_steering_enabled:e?!!e.no2ghz_oui:A.length>1,hide_ssid_enabled:e?.hide_ssid??E?.hide_ssid??!1,client_device_isolation_enabled:e?.l2_isolation??E?.l2_isolation??!1,proxy_arp_enabled:e?.proxy_arp??E?.proxy_arp??!1,bss_transition_enabled:(e?!!e?.bss_transition:E?.bss_transition)??!0,uapsd_enabled:!!e?.uapsd_enabled,fast_roaming_enabled:!!e?.fast_roaming_enabled,wifi_speed_limit:{enabled:!!e?.usergroup_id&&e.usergroup_id!==d?._id,profile_id:e?.usergroup_id&&e.usergroup_id!==d?._id?e.usergroup_id:void 0},dtim_period:{auto:e?.dtim_mode!==K.kt.CUSTOM,[K._$.NG]:e?.dtim_mode===K.kt.CUSTOM?e?.dtim_ng:fe[K._$.NG],[K._$.NA]:e?.dtim_mode===K.kt.CUSTOM?e?.dtim_na:fe[K._$.NA],[K._$.AX]:e?.dtim_mode===K.kt.CUSTOM?e?.dtim_6e:fe[K._$.AX]},schedule:{mode:e?.schedule_with_duration?.length?Be.ON:Be.OFF,value:e?.schedule_with_duration||[]},high_security_192_bit_mode_enabled:!!e?.wpa3_enhanced_192,nas_id:{type:e?.nas_identifier_type??K.EC.BSSID,value:e?.nas_identifier||""},group_rekey_interval:{enabled:"number"==typeof e?.group_rekey&&e.group_rekey!==ye.DISABLED,value:"number"==typeof e?.group_rekey&&e.group_rekey!==ye.DISABLED?e.group_rekey:ye.DEFAULT},das_dac_coa_enabled:!!e?.radius_das_enabled,sae_anti_clogging:e?.sae_anti_clogging??5,sae_sync_time:e?.sae_sync??5,pmf_mode:e?.pmf_mode||$(m,I),radius_mac_authentication:{enabled:!!e?.radius_mac_auth_enabled,profile:U_(e,r,i),format:e?.radius_macacl_format||K.VZ.NONE_LOWER},radius_profile:U_(e,r,i),minimum_data_rate_control:{enabled:e?.minrate_setting_preference===s.C.MANUAL,values:{ng:e?.minrate_ng_data_rate_kbps,na:e?.minrate_na_data_rate_kbps}},security_mode:I,mdns_proxy:{mode:e?.mdns_proxy_mode||Fe.A.OFF,rules:(e?.mdns_proxy_custom||[]).map(e=>({services:e?.services_mode===Fe.aH.SPECIFIC?{type:Fe.aH.SPECIFIC,custom:e.custom_services||[],predefined_ids:(e.predefined_services||[]).map(({code:e})=>e)}:{type:e?.services_mode||Fe.aH.ALL},vlan_bridging:{enabled:!!(e?.networkconf_ids||[])?.length,networkconf_ids:e?.networkconf_ids||[]},devices:e?.ap_scope_mode===Fe.LM.SPECIFIC?{type:Fe.LM.SPECIFIC,macs:e.ap_macs}:e?.ap_scope_mode===Fe.LM.GROUP?{type:Fe.LM.GROUP,group_ids:e.ap_group_ids||[]}:{type:Fe.LM.ALL}}))},wep_key:{password:e?.x_wep||"",index:e?.wep_idx},ccmp_encryption_enabled:e?.wpa_enc!==K.Jl.AUTO,advertise_device_name_in_beacon:!!e?.advertise_device_name_in_beacon,dns_assistance:e?.dns_assistance_mode===K.J7.MANUAL?{mode:K.J7.MANUAL,servers:e.dns_assistance_servers?.length?e.dns_assistance_servers:[""]}:{mode:e?.dns_assistance_mode??K.J7.OFF,servers:[""]}}};var w_=n(732881),z_=n(117982),H_=n(900956),k_=n(457311),x_=n(230741);const B_=({trigger:e,securityProtocol:t,onDone:n,defaultOpen:_=!1})=>{const o=(0,l.useDispatch)(),i=(0,l.useSelector)(g.QC),s=(0,I.m)({schema:ce.Ay.object({secret:x_.G}),defaultValues:{secret:""}}),E=(0,r.lN)(s);return a.createElement(H_.A,{defaultOpen:_},a.createElement(z_.A,null,e),a.createElement(w_.A,{actionButtons:({close:e})=>a.createElement(P.A,{gap:T.kc},a.createElement(Bn.A,{variant:"tertiary-neutral",onPress:()=>e(),motif:"dark"},a.createElement(C.sA,{id:"COMMON_ACTION_CANCEL"})),a.createElement(Bn.A,{motif:"dark",isPending:E.isSubmitting,onPress:()=>{s.handleSubmit(async({secret:t})=>{await o((0,k_.$I)({...i,configure_whole_network:!0,enabled:!0,x_secret:t})),e(),n()})()}},a.createElement(C.sA,{id:"COMMON_ACTION_ENABLE"}))),title:a.createElement(C.sA,{id:"COMMON_ENABLE_RADIUS_TITLE"})},a.createElement(Je.A,null,a.createElement(pt.A,{motif:"dark"},a.createElement(C.sA,{id:"SETTINGS_WIFI_FORM_GENERAL_FIELD_RADIUS_ENABLED_DESCRIPTION",values:{security:a.createElement(C.sA,{id:De.z[t]})}})),a.createElement(Ht.A,{control:s.control,name:"secret",motif:"dark",label:a.createElement(C.sA,{id:"COMMON_RADIUS_X_SECRET_LABEL"}),autoComplete:"new-password",passwordToggle:!0,type:"password"}))))},Y_=({trigger:e,onDone:t})=>a.createElement(H_.A,null,a.createElement(z_.A,null,e),a.createElement(w_.A,{actionButtons:({close:e})=>a.createElement(P.A,{gap:T.kc},a.createElement(Bn.A,{variant:"tertiary-neutral",onPress:()=>e(),motif:"dark"},a.createElement(C.sA,{id:"COMMON_ACTION_CANCEL"})),a.createElement(Bn.A,{motif:"dark",variant:"destructive",onPress:()=>{e(),t()}},a.createElement(C.sA,{id:"COMMON_ACTION_CONFIRM"}))),title:a.createElement(C.sA,{id:"SETTINGS_WIFI_WPA3_TO_WPA23_CONFIRMATION_TITLE"})},a.createElement(Je.A,null,a.createElement(pt.A,{motif:"dark"},a.createElement(C.sA,{id:"SETTINGS_WIFI_WPA3_TO_WPA23_CONFIRMATION_DESCRIPTION"}))))),K_=({existingRecord:e,form:t,onSubmit:n,warnAboutSecurityChange:_,warnAboutSlowApply:o})=>{const i=(0,l.useSelector)(v.selectAllRadiusProfiles),s=(0,l.useSelector)(g.QC),E=(0,r.lN)(t),c=(0,r.FH)({control:t.control,name:"radius_profile.localProfile"}),A=(0,r.FH)({control:t.control,name:"radius_mac_authentication"}),d=(0,r.FH)({control:t.control,name:"securityProtocol"}),[m,I]=(0,a.useState)(!1);(0,a.useEffect)(()=>{I(!1)},[d]);const S=(0,a.useMemo)(()=>(0,N.ME)(d)?c:!!A?.enabled&&"profile"in A&&!!A?.profile?.localProfile,[c,A,d]),O=i.find(Jt.Dn),u=(0,a.useMemo)(()=>{if(!e)return!1;const t=(0,N.dt)(e);return(0,N.C1)(t)&&(0,N.tw)(d)},[e,d]),p=(0,a.useMemo)(()=>S&&O&&!s?.enabled,[S,O,s?.enabled]),P=a.createElement(C.sA,{id:e?"COMMON_ACTION_APPLY_CHANGES":"COMMON_ACTION_CREATE"}),R=a.createElement(A_.A,{description:_?a.createElement(C.sA,{id:"SETTINGS_WIFI_APPLY_SECURITY_WARNING"}):o?a.createElement(C.sA,{id:"COMMON_FORM_CHANGES_TRIGGER_PROVISION"}):null},a.createElement(Bn.A,{onPress:()=>p||u?void 0:n(),isPending:E.isSubmitting,style:{height:T.tr}},_||o?a.createElement(On.A,{size:"original",variant:"fill"}):null,P));return u&&!m?a.createElement(Y_,{trigger:R,onDone:()=>{p?I(!0):n()}}):p?a.createElement(B_,{trigger:m?a.createElement(Bn.A,{onPress:()=>p||u?void 0:n(),isPending:E.isSubmitting},_||o?a.createElement(On.A,{size:"original",variant:"fill"}):null,P):R,securityProtocol:d,onDone:()=>{n()},defaultOpen:m}):R},$_=()=>a.createElement(st.A,null,a.createElement(it.A,{htmlFor:"password"},a.createElement(C.sA,{id:"COMMON_PASSWORD"})),a.createElement(Ze.A,null,a.createElement(ht.A,{id:"password",checked:!0,disabled:!0},a.createElement(C.sA,{id:"COMMON_VALUE_AUTO"})))),j_=({existingRecord:e})=>a.createElement(at.A,null,a.createElement(C.sA,{id:"SETTINGS_WIFI_UID_NAME_INFO",values:{link:e.uid_workspace_url?a.createElement(kr.A,{href:e.uid_workspace_url,id:"SETTINGS_WIFI_UID_NAME_CHANGE_INFO_LINK"}):a.createElement(C.sA,{id:"SETTINGS_WIFI_UID_NAME_CHANGE_INFO_LINK"})}}));var X_=n(998386);const q_=({existingRecord:e})=>a.createElement(at.A,null,a.createElement(P.A,{flexDirection:"column"},a.createElement(C.sA,{id:"COMMON_MANAGED_BY_FABRIC",values:{feature:a.createElement(C.sA,{id:"COMMON_WIFI_BROADCAST"})}}),a.createElement(kr.A,{id:"COMMON_VIEW_IN_SITE_MANAGER",href:(0,X_.vF)(e?.cloud_template)}))),Q_={name:"devices_ap_group",for_wlanconf:!0,attr_no_delete:!1},J_=async(e,t,n,a)=>{if(n.broadcasting_aps.type===ge.ALL){const e=a.find(Me.K5);if(!e)throw new Error("No default AP group found");return{ap_group_mode:K.qq.ALL,ap_group_ids:[e._id]}}if(n.broadcasting_aps.type===ge.GROUP)return{ap_group_mode:K.qq.GROUPS,ap_group_ids:n.broadcasting_aps.group_ids};const l=await(async(e,t,n,a)=>{const l=t?.ap_group_mode===K.qq.DEVICES?n.find(e=>e.for_wlanconf&&e._id===t.ap_group_ids?.[0]):void 0;if(l&&ut()((0,ln.A)(l.device_macs),(0,ln.A)(a)))return l;try{return e(l?(0,B.Cy)({...l,device_macs:a}):(0,B.tp)({...Q_,device_macs:a}))}catch(t){const n=(0,Ul.F)(t)?t:void 0;throw e((0,na.ox)({errorMessage:n?.msg,errorValues:t,icon:Yn.C.danger,message:"SETTINGS_WIFI_FORM_ADVANCED_AP_GROUP_SAVE_FAILED"})),t}})(e,t,a,n.broadcasting_aps.ap_macs);return{ap_group_mode:K.qq.DEVICES,ap_group_ids:[l._id]}},Z_=(e,t)=>{if("radius_profile"in e){const n=e.radius_profile;return n.localProfile?t:"profile_id"in n?n.profile_id:void 0}if(e.radius_mac_authentication?.enabled&&"profile"in e.radius_mac_authentication){const{profile:n}=e.radius_mac_authentication;return n.localProfile?t:"profile_id"in n?n.profile_id:void 0}},eo=({form:e})=>{const t=(0,r.FH)({control:e.control,name:"wlan_bands"}),n=(0,r.FH)({control:e.control,name:"security_mode"}),l=1===t?.length&&t.includes(K._$.AX);return a.createElement(st.A,{label:a.createElement(it.A,null,a.createElement(C.sA,{id:"SETTINGS_SECURITY_MODE"}))},a.createElement(Et.A,{flexDirection:"column",alignItems:"flex-start"},a.createElement(m.A,{isDisabled:l&&n!==O.I.OPEN},a.createElement(ct.A,{control:e.control,name:"security_mode",value:O.I.OPEN,onCheck:()=>{e.setValue("pmf_mode",K.ns.DISABLED)}},a.createElement(C.sA,{id:"COMMON_OPEN"}))),a.createElement(ct.A,{control:e.control,name:"security_mode",value:O.I.ENHANCED_OPEN,onCheck:()=>{e.setValue("pmf_mode",K.ns.REQUIRED)},tooltip:a.createElement(C.sA,{id:"SETTINGS_ENHANCED_OPEN_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_ENHANCED_OPEN"})),a.createElement(m.A,{isDisabled:l},a.createElement(ct.A,{control:e.control,name:"security_mode",value:O.I.ENHANCED_OPEN_TRANSITION,onCheck:()=>{e.setValue("pmf_mode",K.ns.OPTIONAL)},tooltip:a.createElement(C.sA,{id:"SETTINGS_ENHANCED_OPEN_TRANSITION_TOOLTIP"})},a.createElement(C.sA,{id:"SETTINGS_ENHANCED_OPEN_TRANSITION"})))))},to="wifi-form",no=["hide_ssid_enabled","client_device_isolation_enabled","band_steering_enabled"],ao=({activeItem:e})=>{const t=e?._id===Y.R6?void 0:e,n=(0,d.A)(w.Xj.MDNS_SERVICE_LIST_WIFI),$=(0,d.A)(w.Xj.WIFI_DNS_ASSISTANCE),j=(0,d.A)(w.Xj.UID_SETTINGS_V2),q=(0,b.Nq)(t),Q=(0,h.A)(t),J=(0,l.useDispatch)(),Z=(0,l.useSelector)(y.EL),ee=(0,l.useSelector)(D.T),te=(0,l.useSelector)(x.K8),ne=(0,l.useSelector)(z.n4),ae=(0,l.useSelector)(g.AP),le=(0,l.useSelector)(L._E),re=(0,l.useSelector)(u.b),ce=(0,l.useSelector)(W.lW),Ae=(0,l.useSelector)(U._),de=(0,l.useSelector)(E.W),me=(0,l.useSelector)(v.selectDefaultRadiusProfileId),Ie=(0,l.useSelector)(G.Ct),Se=(0,l.useSelector)(v.selectCustomRadiusProfiles),Te=(0,l.useSelector)(v.selectAllRadiusProfiles),Ne=(0,a.useMemo)(()=>V_(t,te,re,ee,le,me,Ie,de,Se),[te,de,me,t,Ie,re,le,ee,Se]),Oe=(0,a.useMemo)(()=>(0,_.A)(V_(t?.setting_preference!==s.C.AUTO||t.enhanced_iot?void 0:t,te,re,ee,le,me,Ie,de,Se),We),[te,de,me,t,Ie,re,le,ee,Se]),ue=(0,I.m)({schema:Ke(ae,ne,te,q,Te,me),defaultValues:Ne}),pe=(0,r.lN)(ue);(0,i.y)(ue);const Pe=(0,r.FH)({control:ue.control,name:"advanced"})===s.C.AUTO,Re=(0,r.FH)({control:ue.control,name:"private_preshared_keys.enabled"}),Ce=(0,r.FH)({control:ue.control,name:"mode"}),De=(0,r.FH)({control:ue.control,name:"securityProtocol"}),Me=(0,r.FH)({control:ue.control,name:"pmf_mode"}),be=(0,r.FH)({control:ue.control,name:"hotspot.type"}),Le=(0,r.FH)({control:ue.control,name:"radius_mac_authentication.enabled"}),fe=Ce===Ye.HOTSPOT&&be===Ee.PASSPOINT,ge=ue.handleSubmit(async e=>{const a=await(async(e,t,n,a,l,r,_,o)=>({...n,enabled:n?.enabled??!0,name:e.name,setting_preference:e.advanced,networkconf_id:"network_id"in e?e.network_id:void 0,x_passphrase:"password"in e&&!l?e.password:void 0,uid_workspace_url:void 0,mcastenhance_enabled:"multicast_to_unicast_enabled"in e?e.multicast_to_unicast_enabled:void 0,bc_filter_enabled:!!e.multicast_and_broadcast_blocker.enabled,bc_filter_list:e.multicast_and_broadcast_blocker.enabled&&e.multicast_and_broadcast_blocker.exceptions||[],mlo_enabled:"mlo_enabled"in e&&!!e.mlo_enabled,no2ghz_oui:!!e.band_steering_enabled,hide_ssid:!!e.hide_ssid_enabled,proxy_arp:!!e.proxy_arp_enabled,bss_transition:!!e.bss_transition_enabled,uapsd_enabled:!!e.uapsd_enabled,fast_roaming_enabled:X(e.securityProtocol)&&!!e.fast_roaming_enabled,usergroup_id:e.wifi_speed_limit.enabled?e.wifi_speed_limit.profile_id:"",dtim_mode:e.dtim_period.auto?K.kt.DEFAULT:K.kt.CUSTOM,dtim_na:!e.dtim_period.auto&&e.wlan_bands.includes(K._$.NA)?e.dtim_period[K._$.NA]:void 0,dtim_ng:!e.dtim_period.auto&&e.wlan_bands.includes(K._$.NG)?e.dtim_period[K._$.NG]:void 0,dtim_6e:!e.dtim_period.auto&&e.wlan_bands.includes(K._$.AX)?e.dtim_period[K._$.AX]:void 0,wlan_bands:e.wlan_bands,iapp_enabled:n?.iapp_enabled??_[0]?.iapp_enabled??!0,wlan_band:void 0,schedule_with_duration:e.schedule.mode===Be.ON?e.schedule.value:[],wpa3_enhanced_192:"high_security_192_bit_mode_enabled"in e&&!!e.high_security_192_bit_mode_enabled,nas_identifier:e.nas_id?.type===K.EC.CUSTOM?e.nas_id.value:void 0,nas_identifier_type:(0,N.ME)(e.securityProtocol)||e.radius_mac_authentication?.enabled?e.nas_id?.type??K.EC.BSSID:void 0,group_rekey:ie(e.securityProtocol)?e.group_rekey_interval?.enabled?e.group_rekey_interval.value:ye.DISABLED:void 0,radius_das_enabled:se(e.securityProtocol)&&!!e.das_dac_coa_enabled,sae_anti_clogging:oe(e.securityProtocol)&&"sae_anti_clogging"in e?e.sae_anti_clogging:void 0,sae_sync:oe(e.securityProtocol)&&"sae_sync_time"in e?e.sae_sync_time:void 0,pmf_mode:e.pmf_mode,...(0,N._R)(e.securityProtocol,"security_mode"in e?e.security_mode:void 0),minrate_setting_preference:e.minimum_data_rate_control?.enabled?s.C.MANUAL:s.C.AUTO,minrate_ng_enabled:!!e.minimum_data_rate_control?.enabled,minrate_ng_data_rate_kbps:e.minimum_data_rate_control?.enabled?e.minimum_data_rate_control.values.ng:void 0,minrate_ng_advertising_rates:(!e.minimum_data_rate_control?.enabled||vr.ng[0]!==e.minimum_data_rate_control.values.ng)&&(n?.minrate_ng_advertising_rates??_[0]?.minrate_ng_advertising_rates),minrate_na_enabled:e.minimum_data_rate_control?.enabled,minrate_na_data_rate_kbps:e.minimum_data_rate_control?.enabled?e.minimum_data_rate_control.values.na:void 0,minrate_na_advertising_rates:(!e.minimum_data_rate_control?.enabled||vr.na[0]!==e.minimum_data_rate_control.values.na)&&(n?.minrate_na_advertising_rates??_[0]?.minrate_na_advertising_rates),mdns_proxy_mode:r?e.mdns_proxy.mode:Fe.A.OFF,mdns_proxy_custom:e.mdns_proxy?.mode===Fe.A.CUSTOM?e.mdns_proxy.rules?.map(e=>({networkconf_ids:e.vlan_bridging.enabled?e.vlan_bridging.networkconf_ids:[],ap_scope_mode:e.devices.type,ap_macs:e.devices.type===Fe.LM.SPECIFIC?e.devices.macs:void 0,ap_group_ids:e.devices.type===Fe.LM.GROUP?e.devices.group_ids:void 0,services_mode:e.services.type,predefined_services:e.services.type===Fe.aH.SPECIFIC?e.services.predefined_ids?.map(e=>({code:e}))||[]:void 0,custom_services:e.services.type===Fe.aH.SPECIFIC?(e.services.custom||[]).map(({address:e,name:t})=>({address:e,name:t})):void 0})):void 0,mac_filter_enabled:!!e.mac_address_filter?.enabled,mac_filter_policy:e.mac_address_filter?.enabled?e.mac_address_filter.type:void 0,mac_filter_list:e.mac_address_filter?.enabled?e.mac_address_filter.mac_addresses:n?.mac_filter_list||[],private_preshared_keys_enabled:"private_preshared_keys"in e&&!!e.private_preshared_keys?.enabled,private_preshared_keys:"private_preshared_keys"in e&&e.private_preshared_keys?.enabled?e.private_preshared_keys.items.map(e=>({networkconf_id:e.network_id,password:e.password})):[],radius_mac_auth_enabled:!!e.radius_mac_authentication?.enabled,radiusprofile_id:Z_(e,o),radius_macacl_format:e.radius_mac_authentication?.enabled?e.radius_mac_authentication.format:void 0,enhanced_iot:e.mode===Ye.IOT,hotspot2conf_enabled:e.mode===Ye.HOTSPOT&&e.hotspot.type===Ee.PASSPOINT,is_guest:e.mode===Ye.HOTSPOT&&e.hotspot.type===Ee.CAPTIVE_PORTAL,l2_isolation:!!e.client_device_isolation_enabled,wep_idx:e.securityProtocol===O.r.WEP?e.wep_key.index:void 0,x_wep:e.securityProtocol===O.r.WEP?e.wep_key.password:void 0,advertise_device_name_in_beacon:!!e.advertise_device_name_in_beacon,dns_assistance_mode:e.dns_assistance.mode,dns_assistance_servers:e.dns_assistance.mode===K.J7.MANUAL?e.dns_assistance.servers.filter(Boolean):void 0,hotspot2:e.mode===Ye.HOTSPOT&&e.hotspot.type===Ee.PASSPOINT?{venue_name:e.hotspot.venue_name?[{name:e.hotspot.venue_name}]:[],venue_group:va(e.hotspot.venue_type)?.group,venue_type:va(e.hotspot.venue_type)?.type,network_type:e.hotspot.network_type,ipaddr_type_avail_v4:e.hotspot.type_availability_ipv4,ipaddr_type_avail_v6:e.hotspot.type_availability_ipv6,capab:e.hotspot.capabilities,nai_realm_list:(e.hotspot.nai_realm_list||[]).map(({eap_method:e,name:t,sub_methods:n})=>({eap_method:e,auth_ids:n.map(b.G6).map(String),auth_vals:n.map(b.Sl).map(String),name:t})),roaming_consortium_list:e.hotspot.roaming_consortium_list||[],cellular_network_list:e.hotspot.cellular_network_list||[],domain_name_list:e.hotspot.domain_name_list||[],friendly_name:e.hotspot.operator_friendly_name?[{text:e.hotspot.operator_friendly_name}]:[],metrics_status:!!e.hotspot.wan_metrics.enabled,metrics_info_at_capacity:e.hotspot.wan_metrics?.enabled?!!e.hotspot.wan_metrics.at_capacity:void 0,metrics_info_symmetric:e.hotspot.wan_metrics?.enabled?!!e.hotspot.wan_metrics.symmetric_link:void 0,metrics_info_link_status:e.hotspot.wan_metrics?.enabled?e.hotspot.wan_metrics.info:void 0,metrics_uplink_speed:e.hotspot.wan_metrics?.enabled?e.hotspot.wan_metrics.uplink_speed:void 0,metrics_uplink_speed_set:e.hotspot.wan_metrics?.enabled&&!!e.hotspot.wan_metrics.uplink_speed,metrics_downlink_speed:e.hotspot.wan_metrics?.enabled?e.hotspot.wan_metrics.downlink_speed:void 0,metrics_downlink_speed_set:e.hotspot.wan_metrics?.enabled&&!!e.hotspot.wan_metrics.downlink_speed,metrics_uplink_load:e.hotspot.wan_metrics?.enabled?e.hotspot.wan_metrics.uplink_load:void 0,metrics_uplink_load_set:e.hotspot.wan_metrics?.enabled&&!!e.hotspot.wan_metrics.uplink_load,metrics_downlink_load:e.hotspot.wan_metrics?.enabled?e.hotspot.wan_metrics.downlink_load:void 0,metrics_downlink_load_set:e.hotspot.wan_metrics?.enabled&&!!e.hotspot.wan_metrics.downlink_load,metrics_measurement_set:e.hotspot.wan_metrics?.enabled&&!!e.hotspot.wan_metrics?.load_measurement?.enabled,metrics_measurement:e.hotspot.wan_metrics?.enabled&&e.hotspot.wan_metrics?.load_measurement?.enabled?e.hotspot.wan_metrics.load_measurement.value:void 0}:void 0,...await J_(t,n,e,a),wpa_enc:(0,N.ME)(e.securityProtocol)&&"high_security_192_bit_mode_enabled"in e&&e.high_security_192_bit_mode_enabled?K.Jl.GCMP256:(0,N.eP)(e.securityProtocol)?e.ccmp_encryption_enabled?K.Jl.CCMP:K.Jl.AUTO:void 0,pmf_cipher:(0,N.ME)(e.securityProtocol)&&"high_security_192_bit_mode_enabled"in e&&e.high_security_192_bit_mode_enabled?K.dF.BIPGMAC256:void 0}))(e,J,t,te,q,n,ee,me);return J((0,F.oq)(a)).then(t=>(J((0,B.Yo)()),J((0,F.uy)()),J((0,M.P)()),e.mode!==Ye.HOTSPOT||e.hotspot.type!==Ee.CAPTIVE_PORTAL||Ae||J((0,V.y)()),t)).then(e=>{const n=e&&"_id"in e?e._id:e&&"data"in e&&e?.data?.[0]?._id||t?._id;J((0,R.SQ)(!1)),J((0,R.XP)({type:S.H.WIFI,id:n}))}).then(()=>ue.reset()).catch(()=>{})});return(0,a.useEffect)(()=>{J((0,k.$3)(void 0,{crudCacheStrategy:{type:o.e.CACHE}})),J((0,k.QG)({queryParams:{withinHours:ce}},{crudCacheStrategy:{type:o.e.CACHE}})),J((0,k.bk)(void 0,{crudCacheStrategy:{type:o.e.CACHE}})),J((0,H.v)()),J((0,f.y)(void 0,{crudCacheStrategy:{type:o.e.CACHE}}))},[J,ce]),a.createElement("form",{onSubmit:ge,id:to},a.createElement(m.A,{isDisabled:Z||Q},a.createElement(P.A,{gap:T.kc,flexDirection:"column",width:"100%"},a.createElement(p.A,null,a.createElement(c.A,{feature:A.v.SETTINGS_WIFI,skipApproval:!0,renderWarning:({children:e})=>a.createElement(a.Fragment,null,e)}),Q?a.createElement(q_,{existingRecord:t}):null,a.createElement(m.A,{isDisabled:q},a.createElement(Pl,{form:ue}),q?a.createElement(j_,{existingRecord:t}):null,q&&!Re?a.createElement($_,null):null,q?null:a.createElement(Na,{form:ue})),Re?null:a.createElement(m.A,{isDisabled:q&&!j},a.createElement(Nl,{form:ue})),a.createElement(f_,{form:ue,existingRecord:t}),a.createElement(Nt,{form:ue,existingRecord:t,autoDefaultValues:Oe}),a.createElement(zt,{form:ue,existingRecord:t}),Ce===Ye.HOTSPOT?a.createElement(Qr,{form:ue}):null),Ce===Ye.HOTSPOT&&be===Ee.PASSPOINT?a.createElement(Tl,{form:ue}):null,a.createElement(p.A,{title:a.createElement(C.sA,{id:"COMMON_ADVANCED"}),titleAction:a.createElement(G_,{form:ue,autoDefaultValues:Oe})}),a.createElement(m.A,{isDisabled:Pe},a.createElement(p.A,{title:a.createElement(C.sA,{id:"SETTINGS_ROAMING_ASSISTANCE"}),isOutlined:!0},a.createElement(n_,{form:ue})),a.createElement(p.A,{title:a.createElement(C.sA,{id:"SETTINGS_HIGH_CAPACITY_TUNING"}),isOutlined:!0},a.createElement(yr,{form:ue}),n||Q?a.createElement(Cr,{form:ue}):null,a.createElement(fr,{form:ue}),a.createElement(Rl,{form:ue}),a.createElement(nn,{form:ue})),a.createElement(p.A,{title:a.createElement(C.sA,{id:"COMMON_SECURITY"})},a.createElement(jt,{form:ue,existingRecord:t,initialSecurityProtocol:Ne.securityProtocol}),De===O.r.OPEN?a.createElement(eo,{form:ue}):null,De===O.r.HOTSPOT_2_OSEN||(0,N.ME)(De)?a.createElement(Zt,{form:ue,root:"radius_profile"}):null,De===O.r.WEP?a.createElement(xt,{form:ue}):null,(0,N.eP)(De)?a.createElement(E_,{form:ue}):null,a.createElement(Ta,{form:ue}),q?null:a.createElement(Aa,{form:ue}),q?null:a.createElement(e_,{form:ue}),a.createElement(s_,{form:ue}),De===O.r.WPA3_ENTERPRISE?a.createElement(Zr,{form:ue}):null,oe(De)?a.createElement(qt,{form:ue}):null,oe(De)?a.createElement(Xt,{form:ue}):null),a.createElement(p.A,{title:a.createElement(C.sA,{id:"SETTINGS_BEHAVIOR_CONTROLS"})},$?a.createElement(o_,{form:ue}):null,a.createElement(gr,{form:ue,existingRecord:t}),a.createElement(h_,{form:ue}),a.createElement(c_,{form:ue}),a.createElement(Bt,{form:ue}),q?null:a.createElement(Ur,{form:ue}),q||fe?null:a.createElement(tn,{form:ue}),a.createElement(lt,{form:ue}),a.createElement(l_,{form:ue}),(0,N.ME)(De)||Le?a.createElement(pl,{form:ue}):null,se(De)?a.createElement(i_,{form:ue}):null,ie(De)?a.createElement(t_,{form:ue}):null,a.createElement(v_,{form:ue}),a.createElement(vt,{form:ue})))),a.createElement(g_.A,{onFormCancel:()=>ue.reset(),isDirty:pe.isDirty||!t,hideCancelButton:!ue.formState.isDirty,applyButton:a.createElement(K_,{form:ue,existingRecord:t,onSubmit:ge,warnAboutSlowApply:!!t&&Object.keys(pe.dirtyFields||{}).some(e=>!no.includes(e)),warnAboutSecurityChange:(ve=!!t,he=Ne.securityProtocol,Ge=Ne.pmf_mode,Ue=De,Ve=Me,ve&&(he!==Ue||Ge!==Ve)&&(_e.includes(Ue)||_e.includes(he)))}),form:to,isSubmitting:ue.formState.isSubmitting})));var ve,he,Ge,Ue,Ve},lo=({activeItem:e})=>a.createElement(ao,{activeItem:e,key:e?._id})},755667(e,t,n){n.d(t,{A:()=>S});var a=n(614476),l=n(296540),r=n(592563),_=n(895424),o=n(263963),i=n(79786),s=n(454195),E=n(566723),c=n(317672),A=n(349665),d=n(294303),m=n(916537);const I=/^_[a-zA-Z0-9._-]+\._(tcp|udp)(\.local)?$/i,S=({existingCustomServices:e,onSubmit:t,tooltip:n})=>{const{formatMessage:S}=(0,m.tz)(),T=(0,i.m)({schema:a.z.object({serviceName:a.z.string().min(1).max(32),address:a.z.string().min(1).regex(I,{message:(0,o.rn)("SETTINGS_MDNS_SERVICE_ID_VALIDATION")}).refine(t=>!e?.some(e=>e.address===t),{message:S({id:"SETTINGS_VALUE_UNIQUE"})})}),defaultValues:{serviceName:"",address:""}}),N=(0,l.useCallback)(()=>{T.handleSubmit(({address:e,serviceName:n})=>{t({name:n,address:e}),T.setFocus("serviceName"),T.reset()})()},[T,t]);return(0,l.useEffect)(()=>{const e=e=>{"Enter"===e.key&&(e.preventDefault(),N())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[T,t,N]),l.createElement(A.A,null,l.createElement(c.A,{htmlFor:"services.predefined_ids",tooltip:n,tooltipProps:{portal:!0,isInteractive:!0}},l.createElement(m.sA,{id:"SETTINGS_CUSTOM_SERVICE"})),l.createElement(d.A,{flexDirection:"row",gap:E.kc,alignItems:"flex-start"},l.createElement(d.A,{flex:"1",flexGrow:1,flexShrink:1,overflow:"hidden"},l.createElement(_.A,{control:T.control,name:"serviceName",placeholder:S({id:"SETTINGS_LABEL"})})),l.createElement(d.A,{flex:"1",flexGrow:1,flexShrink:1,overflow:"hidden"},l.createElement(_.A,{control:T.control,name:"address",placeholder:S({id:"SETTINGS_SERVICE_NAME"})})),l.createElement(d.A,{height:s.b},l.createElement(r.A,{fontSize:"medium",type:"button",onPress:N},l.createElement(m.sA,{id:"COMMON_ACTION_ADD"})))))}},930167(e,t,n){n.d(t,{b:()=>A});var a=n(801081),l=n(189601),r=n(951929),_=n(294591),o=n(477544),i=n(332977),s=n(302167),E=n(532419),c=n(180830);const A=(0,l.WY)()((0,a.Mz)(c.K8,E.kx,i.JT,o.Ag,s.Zc,s.L_,(e,t,n,a,l,o)=>({apGroups:e,adoptedAps:t.map(({mac:e,model:t,radio_table:n,support_wifi6e:a,device_mode_override:l})=>({mac:e,model:t,radio_table:n,support_wifi6e:a,device_mode_override:l})),wlanCapabilities:n,wlanConfigurations:a.map(({_id:t,ap_group_mode:n,ap_group_ids:a,wlan_bands:l=r.A,private_preshared_keys_enabled:o})=>({_id:t,ap_group_mode:n,ap_specific_macs:n===_.qq.DEVICES?e.filter(e=>a.includes(e._id)).flatMap(e=>e.device_macs||[]):[],ap_group_ids:a,wlan_bands:l,private_preshared_keys_enabled:o})),isMeshingEnabled:l,isAutoLinkEnabled:o})),e=>e)},280044(e,t,n){var a;n.d(t,{p:()=>a}),function(e){e.SSID_LIMIT_EXCEEDED="SSID_LIMIT_EXCEEDED",e.WLAN_BAND_NOT_SUPPORTED="WLAN_BAND_NOT_SUPPORTED",e.WLAN_BAND_REGION_BLOCKED="WLAN_BAND_REGION_BLOCKED",e.PPSK_NOT_SUPPORTED_WITH_BAND="PPSK_NOT_SUPPORTED_WITH_BAND",e.NO_DEVICE_SUPPORTS_BAND="NO_DEVICE_SUPPORTS_BAND"}(a||(a={}))},880880(e,t,n){n.d(t,{GC:()=>_,Ly:()=>o,bT:()=>A,bx:()=>s,qm:()=>i,rY:()=>c,uc:()=>d,vm:()=>E,wA:()=>m,zY:()=>r});var a=n(41343),l=n(294591);function r(e,t){return e.find(e=>Object.entries(t).every(([t,n])=>e[t]===n))}function _(e,t){return e.filter(e=>Object.entries(t).every(([t,n])=>e[t]===n))}function o(e,t){return!!r(e,t)}const i=(e,t)=>({...e,ap_group_mode:l.qq.DEVICES,ap_specific_macs:[...e.ap_specific_macs||[],t]});function s(e,t){return{...e,ap_group_mode:l.qq.GROUPS,ap_group_ids:[t]}}const E=(e,t)=>({...e,ap_group_mode:l.qq.DEVICES,ap_specific_macs:[t]}),c=e=>({...e,ap_group_mode:l.qq.ALL}),A=(e,t)=>({...e,wlan_bands:t}),d=(e,t)=>({...e,wlan_bands:(0,a.A)([...e.wlan_bands||[],...t]).sort()}),m=()=>({ap_group_mode:l.qq.ALL})},38455(e,t,n){n.d(t,{d:()=>d});var a=n(294591),l=n(170459),r=n(280044);const _=(e,t)=>{const n=t.adoptedAps.filter(({mac:e})=>t.broadcastingMacs.has(e));return e.wlan_bands?.includes(a._$.AX)?n.filter(e=>(0,l.Ng)(e)).map(e=>({type:r.p.WLAN_BAND_REGION_BLOCKED,band:a._$.AX,deviceMac:e.mac})):[]},o=(e,t)=>e.wlan_bands?.includes(a._$.AX)&&!t.wlanCapabilities?.wpa3_supported?[{type:r.p.WLAN_BAND_NOT_SUPPORTED,band:a._$.AX}]:[];var i=n(983329);const s=(e,t)=>{const n=t.wlanConfigurationsWithBroadcastingMacs.filter(({configuration:{_id:t}})=>t!==e._id),a=[{configuration:e,broadcastingMacs:t.broadcastingMacs},...n];return t.broadcastingDevices.flatMap(n=>{const l=(0,i.Xf)(n,t.isMeshingEnabled,t.isAutoLinkEnabled);return(e.wlan_bands||[]).flatMap(e=>{const t=a.filter(({configuration:t,broadcastingMacs:a})=>a.has(n.mac)&&(t.wlan_bands||[]).includes(e)).length;return l>=t?[]:[{type:r.p.SSID_LIMIT_EXCEEDED,band:e,deviceMac:n.mac,limit:l,actualSsidCount:t}]})})},E=e=>e.wlan_bands?.includes(a._$.AX)&&e.private_preshared_keys_enabled?[{type:r.p.PPSK_NOT_SUPPORTED_WITH_BAND,band:a._$.AX}]:[],c=(e,t)=>e.wlan_bands?.includes(a._$.AX)&&!t.broadcastingDevices.some(l.bV)?[{type:r.p.NO_DEVICE_SUPPORTS_BAND,band:a._$.AX}]:[],A=(e,t)=>{switch(e.ap_group_mode){case a.qq.ALL:return new Set(t.apGroups.find(i.K5)?.device_macs||[]);case a.qq.DEVICES:return e.ap_specific_macs?new Set(e.ap_specific_macs):new Set(t.apGroups.filter(({_id:t})=>e.ap_group_ids?.includes(t)).flatMap(e=>e?.device_macs||[]));case a.qq.GROUPS:return new Set(t.apGroups.filter(({_id:t})=>e.ap_group_ids?.includes(t)).flatMap(e=>e?.device_macs||[]));default:return new Set}},d=(e,t)=>{const n=A(e,{apGroups:t.apGroups}),a={...t,wlanConfigurationsWithBroadcastingMacs:t.wlanConfigurations.map(e=>({configuration:e,broadcastingMacs:A(e,{apGroups:t.apGroups})})),broadcastingMacs:n,broadcastingDevices:t.adoptedAps.filter(({mac:e})=>n.has(e))};return[...s(e,a),...o(e,a),..._(e,a),...E(e),...c(e,a)]}},508086(e,t,n){n.d(t,{z:()=>l});var a=n(40622);const l={[a.r.HOTSPOT_2_OSEN]:"SETTINGS_WIFI_PROTOCOL_OPTIONS_HOTSPOT_2_OSEN",[a.r.OPEN]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_OPEN",[a.r.WEP]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WEP",[a.r.WPA12_PERSONAL]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_AUTO_PERSONAL",[a.r.WPA12_ENTERPRISE]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_AUTO_ENTERPRISE",[a.r.WPA1_PERSONAL]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA1_PERSONAL",[a.r.WPA1_ENTERPRISE]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA1_ENTERPRISE",[a.r.WPA2_PERSONAL]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA2_PERSONAL",[a.r.WPA2_ENTERPRISE]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA2_ENTERPRISE",[a.r.WPA23_PERSONAL]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA2_WPA3",[a.r.WPA23_ENTERPRISE]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA2_WPA3_ENTERPRISE",[a.r.WPA3_PERSONAL]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA3_PERSONAL",[a.r.WPA3_ENTERPRISE]:"SETTINGS_WIFI_FORM_VALUES_SECURITY_PROTOCOL_WPA3_ENTERPRISE"}},675344(e,t,n){n.d(t,{By:()=>a,Ko:()=>_,Qb:()=>r,uE:()=>l,xh:()=>o});const a="800px",l="832px",r="1362px",_="664px",o="100px"},332431(e,t,n){n.d(t,{Ay:()=>s});var a=n(296540),l=n(349785),r=n(86838),_=n(413089),o=n(263963);const i=e=>{if(!e)return[];const t=Object.values(e).map(e=>(e=>"object"==typeof e&&null!==e&&"type"in e&&"string"==typeof e.type)(e)?i(e):[]);return[e.message,...t.flat()].filter(_.z)},s=function({name:e,form:t,noMargin:n}){const _=(0,o.L_)();return a.createElement(l.xI,{name:e,control:t.control,render:({fieldState:e})=>{const t=i(e.error)[0];return a.createElement(a.Fragment,null,e.invalid&&t?a.createElement(r.A,{isInvalid:!0,style:n?{paddingTop:0,paddingBottom:0}:void 0,label:_(t)}):null)}})}},278138(e,t,n){n.d(t,{A:()=>o});var a=n(296540),l=n(132196),r=n(897502),_=n(147606);const o=function({form:e,name:t,confirmationTitle:n,confirmationMessage:o,skipConfirmation:i,...s}){return a.createElement(r.A,{control:e.control,name:t,inputClassName:l.AH`
        background: transparent;
      `,renderCheckbox:(e,t)=>t.value||i?e:a.createElement(_.A,{trigger:e,title:n,message:o,onConfirm:()=>t.onChange(!0)}),...s})}},21803(e,t,n){n.d(t,{A:()=>c});var a=n(296540),l=n(469733),r=n(349785),_=n(62170),o=n(938325),i=n(916537),s=n(959207),E=n(366188);const c=function({form:e,name:t,getIsNetworkVisible:n,getDisabledReason:c,additionalInfo:A,getOptionLabel:d,...m}){const{formatMessage:I}=(0,i.tz)(),S=(0,l.useSelector)(E.Ct),T=(0,r.FH)({control:e.control,name:t}),N=(0,a.useMemo)(()=>S.filter(e=>n(e)||T?.includes(e._id)).map(e=>{const t=T?.includes(e._id)?void 0:c?.(e);return{label:d?.(e)||e.name,value:e._id,disabled:!!t,tooltipDescription:t,tooltipPosition:"left",tooltipPortal:!0,additionalInfo:"subnet"===A?(0,s.mC)(e):"vlan"===A?(0,o.mM)(e.vlan,(0,s.nz)(e))?.toString():void 0}}),[S,n,T,c,d,A]);return a.createElement(_.A,{control:e.control,name:t,options:N,truncateLabels:!0,...m,triggerButtonText:I({id:"COMMON_SELECT"})})}},617883(e,t,n){n.d(t,{A:()=>E});var a=n(296540),l=n(349785),r=n(263963),_=n(284428),o=n(294303),i=n(916537),s=n(859510);const E=function({form:e,name:t,fieldLabel:n,modalTitle:E,modalFieldPlaceholder:c,placeholder:A,itemSchema:d,transformValue:m,getDuplicationMessage:I,extraDisplayColumns:S,actions:T,max:N,disableMultiEdit:O=!1,splitBy:u,validateInArray:p}){const P=(0,_.mQ)(),R=(0,r.L_)(),{formatMessage:C}=(0,i.tz)(),D=(0,a.useMemo)(()=>({fieldLabel:n,modalTitle:E,modalFieldPlaceholder:c}),[n,c,E]),M=(0,a.useMemo)(()=>({getDuplicationMessage:I??(()=>C({id:"SETTINGS_VALUE_UNIQUE"})),validateInArray:p,validate:e=>{if(u&&"string"==typeof e){const t=e.split(u).map(e=>e.trim()).filter(Boolean);for(const n of t.length>0?t:[e]){const e=d.safeParse(n);if(!e.success)return a.createElement(a.Fragment,null,R(e.error.issues[0]?.message))}return!0}const t=d.safeParse(e);return!!t.success||a.createElement(a.Fragment,null,R(t.error.issues[0]?.message))}}),[C,R,I,d,u,p]),b=(0,a.useMemo)(()=>({placeholder:A,translatePlaceholder:!1,parser:m?e=>m(e?.[0]?.target?.value):void 0}),[A,m]);return a.createElement(l.xI,{control:e.control,name:t,render:({field:e,fieldState:t,formState:n})=>a.createElement(o.A,{flexDirection:"column",width:"100%"},a.createElement(s.A,{disabled:P,labels:D,fieldValidation:M,extraFieldConfig:b,value:e.value||[],onChange:t=>e.onChange(t),invalid:t.invalid?R((0,l.Jt)(n.errors,e.name)?.message)||!0:void 0,extraDisplayColumns:S,actions:T,disableMultiEdit:O,max:N,splitBy:u}))})}},438794(e,t,n){function a(e){return{...e}}n.d(t,{k:()=>a})},897502(e,t,n){n.d(t,{A:()=>E});var a=n(296540),l=n(349785),r=n(314714),_=n(566723),o=n(766624),i=n(294303),s=n(284428);const E=function({control:e,name:t,children:n,tooltip:E,tooltipProps:c,onToggle:A,renderCheckbox:d,inputClassName:m}){const I=(0,s.mQ)();return a.createElement(l.xI,{control:e,name:t,render:({field:e})=>{const t=a.createElement(r.A,{id:e.name,onChange:({target:{checked:t}})=>{e.onChange(t),A?.(t)},checked:!!e.value,disabled:I,inputClassName:m},n);return a.createElement(i.A,{gap:_.YC,alignItems:"center"},d?d(t,e):t,E?a.createElement(o.A,{description:E,...c}):null)}})}},188738(e,t,n){n.d(t,{A:()=>A});var a=n(296540),l=n(436331),r=n(349785),_=n(704025),o=n(317672),i=n(349665),s=n(199582),E=n(263963),c=n(284428);const A=function({control:e,name:t,label:n,options:A,tooltip:d,tooltipProps:m,placeholder:I,renderOption:S,onChange:T,onAfterChange:N,searchable:O,searchableProps:u,portal:p,maxHeight:P,disableValidationMessage:R,isReadOnly:C,[s.L]:D}){const M=(0,c.mQ)(),b=(0,E.L_)();return a.createElement(r.xI,{control:e,name:t,render:({field:e,fieldState:s,formState:E})=>a.createElement(i.A,{gap:2},n?a.createElement(o.A,{htmlFor:t,tooltip:d,tooltipProps:{portal:!0,...m}},n):null,a.createElement(l.A,{variant:"secondary",width:"100%",renderOption:S??_.i,options:A,...e,readOnly:C,disabled:M,onChange:(t,n)=>{const a=T?T(n,{field:e,fieldState:s,formState:E}):e.onChange(n);return N?.(n),a},value:e.value??"",invalid:s.invalid&&!R?b((0,r.Jt)(E.errors,t)?.message)||!0:void 0,placeholder:I,searchable:O,searchableProps:u,portal:p,"data-testid":D,maxHeight:P}))})}},222190(e,t,n){n.d(t,{A:()=>s});var a=n(296540),l=n(349785),r=n(438628),_=n(566723),o=n(263963),i=n(284428);const s=function({control:e,name:t,label:n,placeholder:s,tooltip:E,tooltipProps:c,contentAfter:A,arrowSize:d,min:m,max:I,step:S,value:T,iconBefore:N,onAfterChange:O,onChange:u}){const p=(0,i.mQ)(),P=(0,o.L_)();return a.createElement(l.xI,{control:e,name:t,render:({field:{ref:e,...o},fieldState:i,formState:R})=>a.createElement(r.A,{type:"number",variant:"secondary",width:"100%",...o,value:T??o.value??"",onChange:e=>{u?u(e,R):o.onChange(e.target.value?.length?+e.target.value:null),O?.(e)},disabled:p,invalid:i.invalid?P((0,l.Jt)(R.errors,t)?.message)||!0:void 0,labelTooltip:E,labelTooltipProps:{style:{opacity:p?_.xN:void 0,...c?.style},...c},label:n,placeholder:s,arrowSize:d,contentAfter:A,iconBefore:N,step:S,min:m,max:I})})}},62170(e,t,n){n.d(t,{A:()=>c});var a=n(296540),l=n(349785),r=n(566723),_=n(662297),o=n(916537),i=n(263963),s=n(284428);const E=[],c=function({control:e,name:t,tooltip:n,options:c,triggerButtonText:A,truncateLabels:d=!0,isWindowed:m,searchOptions:I,maxSelections:S,narrowTrigger:T,chipClassName:N,label:O,onAfterChange:u}){const p=(0,s.mQ)(),P=(0,i.L_)();return a.createElement(l.xI,{control:e,name:t,render:({field:e,fieldState:i,formState:s})=>a.createElement(_.A,{name:e.name,onChange:t=>{e.onChange(t),u?.(t)},disabled:p,value:e.value||E,tooltipDescription:n,options:c,truncateLabels:d,invalid:i.invalid?P((0,l.Jt)(s.errors,t)?.message)||!0:void 0,translateTriggerButtonText:!1,triggerButtonText:A??a.createElement(o.sA,{id:"COMMON_EDIT_SELECTIONS"}),isWindowed:m,searchOptions:I,maxSelections:S,isFullWidth:!0,triggerButtonHeight:T?r.S2:void 0,chipClassName:N,label:O})})}},610356(e,t,n){n.d(t,{A:()=>E});var a=n(296540),l=n(349785),r=n(54227),_=n(566723),o=n(766624),i=n(294303),s=n(284428);const E=(0,a.forwardRef)(function({control:e,name:t,children:n,tooltip:E,tooltipProps:c,value:A,onCheck:d,...m},I){const S=(0,s.mQ)();return a.createElement(l.xI,{control:e,name:t,render:({field:e})=>a.createElement(i.A,{gap:_.YC,alignItems:"center",ref:I,...m},a.createElement(r.A,{id:e.name,onChange:({target:{checked:t}})=>{t&&(e.onChange(A),d?.())},checked:e.value===A,disabled:S,value:e.value},n),E?a.createElement(o.A,{description:E,...c}):null)})})},649192(e,t,n){n.d(t,{A:()=>A});var a=n(296540),l=n(349785),r=n(979106);const _=(0,n(71479).A)(r.A)`
  width: auto;
  flex: none;
`;var o=n(317672),i=n(349665),s=n(294303),E=n(332431),c=n(284428);const A=function({form:e,name:t,label:n,tabs:r,tooltip:A,tooltipProps:d,variant:m,onAfterChange:I}){const S=(0,c.mQ)();return a.createElement(l.xI,{control:e.control,name:t,render:({field:l})=>a.createElement(i.A,null,n?a.createElement(o.A,{htmlFor:t,tooltip:A,tooltipProps:d},n):null,a.createElement(s.A,{alignItems:"center",justifyContent:"flex-start"},a.createElement(_,{id:t,variant:m??"filter",tabs:r,selectedTab:l.value||null,onSelectTab:({id:e})=>{e!==l.value&&(l.onChange(e),I?.(e))},disabled:S,ref:l.ref})),a.createElement(E.Ay,{form:e,name:t}))})}},143985(e,t,n){n.d(t,{B:()=>o,b:()=>_});var a=n(614476),l=n(620637),r=n(263963);const _=a.z.string({message:(0,r.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>!e||(0,l.isValidIpv4)(e),{message:(0,r.rn)("COMMON_VALIDATION_VALID_IPV4")}),o=a.z.string({message:(0,r.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>(0,l.isValidIpv4)(e),{message:(0,r.rn)("COMMON_VALIDATION_VALID_IPV4")})},156211(e,t,n){n.d(t,{D:()=>a});const a=(e,t,n="")=>{Object.entries(t).forEach(([t,l])=>{const r=[n,t].filter(Boolean).join(".");"object"!=typeof l||Array.isArray(l)||null===l?e.setValue(r,l,{shouldDirty:!0,shouldValidate:!0}):a(e,l,r)})}},464265(e,t,n){n.d(t,{A:()=>_});var a=n(296540),l=n(469733),r=n(792072);const _=e=>(0,l.useSelector)((0,a.useMemo)(()=>(0,r.jN)(e),[e]))},523265(e,t,n){n.d(t,{A:()=>_});var a=n(296540),l=n(469733),r=n(792072);const _=e=>(0,l.useSelector)((0,a.useMemo)(()=>(0,r.z7)(e),[e]))},267691(e,t,n){n.d(t,{u:()=>o});var a=n(296540),l=n(469733),r=n(528644),_=n(674319);function o(e){const t=(0,l.useSelector)(r.C);return(0,a.useMemo)(()=>(0,_.TM)(e,t),[e,t])}},675291(e,t,n){n.d(t,{A:()=>N});var a=n(296540),l=n(469733),r=n(847883),_=n(758649),o=n(162420),i=n(687370),s=n(958372),E=n(267691),c=n(675344),A=n(566723),d=n(294303),m=n(263130),I=n(916537),S=n(789768);const T={maxWidth:c.By,margin:`${A.Ln} 0 0 0`,style:{flex:0}},N=({feature:e,children:t,rowProps:n,skipApproval:c=!1,renderWarning:N})=>{const O=(0,l.useDispatch)(),u=(0,E.u)(e),p=(0,i.r)(e),P=(0,a.useCallback)(()=>{O((0,S.ct)(e))},[O,e]),R=p?null:a.createElement(m.A,{icon:a.createElement(o.A,{variant:"fill",size:"original",isActive:!0}),description:a.createElement(I.sA,{id:s.b[e]?.(u||c)||"COMMON_LOCKED_FEATURE"}),action:u||c?null:a.createElement(_.A,{type:"button",onClick:P,variant:"inline"},a.createElement(I.sA,{id:"COMMON_LOCKED_PRECONFIGURE"}))});return a.createElement(a.Fragment,null,R?a.createElement(a.Fragment,null,N?N({children:R}):a.createElement(r.A,{unlimitedWidth:!0,...T,...n},R)):null,t?a.createElement(r.A,{unlimitedWidth:!0,disabled:!p&&!u&&!c,marginBottom:0},a.createElement(d.A,{width:"100%",flexDirection:"column",gap:A.Ln},t)):null)}},674319(e,t,n){n.d(t,{A:()=>o,TM:()=>E,f9:()=>s});var a=n(598796),l=n(780811),r=n(169568);const _={[r.v.SETTINGS_WIFI]:e=>!e.devicesHaveLastFetchTime||e.hasApAdopted,[r.v.SETTINGS_WIFI_SPEED_LIMIT_PROFILES]:e=>!e.devicesHaveLastFetchTime||e.hasApAdopted,[r.v.SETTINGS_NETWORKS]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasSwitchAdopted||e.hasApAdopted,[r.v.SETTINGS_INTERNET]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[r.v.SETTINGS_TELEPORT]:e=>e.features.has(a.Xj.TELEPORT),[r.v.SETTING_ROUTING]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasL3SwitchAdopted,[r.v.SETTINGS_SECURITY]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasL3SwitchAdopted,[r.v.SETTINGS_RADIUS]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[r.v.NETWORK_OBJECTS]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[r.v.SETTINGS_ETHERNET_PORTS]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasSwitchAdopted,[r.v.SETTINGS_PROFILES]:e=>!e.devicesHaveLastFetchTime||e.hasApAdopted||e.hasSiteGateway||e.hasSwitchAdopted,[r.v.SETTINGS_VPN]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[r.v.SETTINGS_VPN_CLIENT]:e=>e.hasSiteGateway&&!(0,l.oWO)({type:e.siteGatewayInterfaces.type})&&!(0,l.ziy)({model:e.siteGatewayInterfaces.model}),[r.v.SETTINGS_POLICY]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasL3SwitchAdopted||e.features.has(a.Xj.SWITCH_CUSTOM_ACL_RULES)||e.features.has(a.Xj.ZONE_BASED_FIREWALL)||e.features.has(a.Xj.USER_DEFINED_NAT_RULES)||e.features.has(a.Xj.STATIC_DNS),[r.v.SETTINGS_POLICY_ACL]:e=>!e.devicesHaveLastFetchTime||e.features.has(a.Xj.SWITCH_CUSTOM_ACL_RULES),[r.v.SETTINGS_POLICY_QOS]:e=>!e.devicesHaveLastFetchTime||e.features.has(a.Xj.ZONE_BASED_FIREWALL),[r.v.SETTINGS_POLICY_NAT]:e=>!e.devicesHaveLastFetchTime||e.features.has(a.Xj.USER_DEFINED_NAT_RULES),[r.v.SETTINGS_POLICY_DNS]:e=>!e.devicesHaveLastFetchTime||e.features.has(a.Xj.STATIC_DNS),[r.v.SETTINGS_POLICY_PORT_FORWARDING]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[r.v.SETTINGS_POLICY_FIREWALL]:e=>!e.devicesHaveLastFetchTime||e.features.has(a.Xj.ZONE_BASED_FIREWALL),[r.v.SETTINGS_POLICY_ROUTE]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasL3SwitchAdopted,[r.v.SETTINGS_CONTENT_FILTER]:e=>!e.devicesHaveLastFetchTime||e.features.has(a.Xj.CLOUDFLARE_CONTENT_FILTERING)},o=(e,t)=>!!_[e]?.(t),i={[r.v.SETTINGS_WIFI]:()=>!0,[r.v.SETTINGS_WIFI_SPEED_LIMIT_PROFILES]:()=>!0,[r.v.SETTINGS_NETWORKS]:()=>!0,[r.v.SETTINGS_INTERNET]:()=>!0,[r.v.SETTINGS_TELEPORT]:()=>!0,[r.v.SETTING_ROUTING]:()=>!0,[r.v.SETTINGS_SECURITY]:()=>!0,[r.v.SETTINGS_RADIUS]:()=>!0,[r.v.NETWORK_OBJECTS]:()=>!0,[r.v.SETTINGS_ETHERNET_PORTS]:()=>!0,[r.v.SETTINGS_PROFILES]:()=>!0,[r.v.SETTINGS_VPN]:()=>!0,[r.v.SETTINGS_VPN_CLIENT]:()=>!0,[r.v.SETTINGS_POLICY]:()=>!0,[r.v.SETTINGS_POLICY_ACL]:()=>!1,[r.v.SETTINGS_POLICY_QOS]:()=>!1,[r.v.SETTINGS_POLICY_NAT]:()=>!1,[r.v.SETTINGS_POLICY_DNS]:()=>!1,[r.v.SETTINGS_POLICY_PORT_FORWARDING]:()=>!0,[r.v.SETTINGS_POLICY_FIREWALL]:()=>!1,[r.v.SETTINGS_POLICY_ROUTE]:()=>!0,[r.v.SETTINGS_CONTENT_FILTER]:()=>!1},s=(e,t)=>i[e]?.(t),E=(e,t)=>!!t.selfPreconfigureApprovals?.includes(e)&&s(e,t)},169568(e,t,n){var a;n.d(t,{v:()=>a}),function(e){e.SETTINGS_WIFI="settingsWifi",e.SETTINGS_NETWORKS="settingsNetworks",e.SETTINGS_INTERNET="settingsInternet",e.SETTINGS_TELEPORT="settingsTeleport",e.SETTINGS_VPN="settingsVpn",e.SETTING_ROUTING="settingsRouting",e.SETTINGS_SECURITY="settingsSecurity",e.SETTINGS_ETHERNET_PORTS="settingsEthernetPorts",e.SETTINGS_WIFI_SPEED_LIMIT_PROFILES="settingsWifiSpeedLimitProfiles",e.SETTINGS_RADIUS="settingsRadius",e.NETWORK_OBJECTS="settingsNetworkObjects",e.SETTINGS_PROFILES="settingsProfiles",e.SETTINGS_VPN_CLIENT="vpnClient",e.SETTINGS_CONTENT_FILTER="settingsContentFilter",e.SETTINGS_POLICY="settingsPolicy",e.SETTINGS_POLICY_ACL="settingsPolicyAcl",e.SETTINGS_POLICY_QOS="settingsPolicyQos",e.SETTINGS_POLICY_NAT="settingsPolicyNat",e.SETTINGS_POLICY_DNS="settingsPolicyDns",e.SETTINGS_POLICY_PORT_FORWARDING="settingsPolicyPortForwarding",e.SETTINGS_POLICY_FIREWALL="settingsPolicyFirewall",e.SETTINGS_POLICY_ROUTE="settingsPolicyRoute"}(a||(a={}))},528644(e,t,n){n.d(t,{C:()=>i});var a=n(801081),l=n(198494),r=n(792072),_=n(532419),o=n(319797);const i=(0,a.Mz)(_.$8,_.m9,_.N4,_.at,_.Tp,r.et,l.UP,_.IP,_.C$,o.Az,(e,t,n,a,l,r,_,o,i,s)=>({devicesHaveLastFetchTime:e,hasSiteGateway:t,hasApAdopted:n,hasSwitchAdopted:a,hasL3SwitchAdopted:l,features:r,selfPreconfigureApprovals:_,siteGatewayInterfaces:o,isUsg:i,isFirewallManagedByOrchestration:s}))},958372(e,t,n){n.d(t,{D:()=>E,b:()=>c});var a=n(296540),l=n(169568),r=n(916537),_=n(196010),o=n(928085),i=n(959341);const s=()=>{const e=(0,o.A)(i.tz);return a.createElement(_.A,{to:e},a.createElement(r.sA,{id:"COMMON_ACTION_MANAGE"}))},E={[l.v.SETTINGS_POLICY_ACL]:a.createElement(r.sA,{id:"SETTINGS_POLICY_TYPE_ACL_UNSUPPORTED"}),[l.v.SETTINGS_POLICY_QOS]:a.createElement(r.sA,{id:"SETTINGS_ZONE_BASED_FIREWALL_REQUIRED",values:{link:a.createElement(s,null)}}),[l.v.SETTINGS_POLICY_FIREWALL]:a.createElement(r.sA,{id:"SETTINGS_ZONE_BASED_FIREWALL_REQUIRED",values:{link:a.createElement(s,null)}}),[l.v.SETTINGS_POLICY_NAT]:a.createElement(r.sA,{id:"SETTINGS_NAT_NOT_SUPPORTED"}),[l.v.SETTINGS_POLICY_DNS]:a.createElement(r.sA,{id:"SETTINGS_DNS_NOT_SUPPORTED"}),[l.v.SETTINGS_POLICY_PORT_FORWARDING]:a.createElement(r.sA,{id:"SETTINGS_PORT_FORWARDING_NOT_SUPPORTED"}),[l.v.SETTINGS_POLICY_ROUTE]:a.createElement(r.sA,{id:"SETTINGS_ROUTING_NOT_SUPPORTED"})},c={[l.v.SETTINGS_WIFI]:e=>e?"COMMON_LOCKED_FEATURE_AP_PRECONFIGURED":"COMMON_LOCKED_FEATURE_AP",[l.v.SETTINGS_NETWORKS]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW_OR_AP",[l.v.SETTINGS_INTERNET]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[l.v.SETTINGS_TELEPORT]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[l.v.SETTING_ROUTING]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[l.v.SETTINGS_SECURITY]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[l.v.SETTINGS_ETHERNET_PORTS]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[l.v.SETTINGS_WIFI_SPEED_LIMIT_PROFILES]:e=>e?"COMMON_LOCKED_FEATURE_AP_PRECONFIGURED":"COMMON_LOCKED_FEATURE_AP",[l.v.NETWORK_OBJECTS]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[l.v.SETTINGS_VPN]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[l.v.SETTINGS_POLICY]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[l.v.SETTINGS_POLICY_ACL]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[l.v.SETTINGS_POLICY_QOS]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[l.v.SETTINGS_POLICY_NAT]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[l.v.SETTINGS_POLICY_DNS]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[l.v.SETTINGS_POLICY_PORT_FORWARDING]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[l.v.SETTINGS_POLICY_FIREWALL]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[l.v.SETTINGS_POLICY_ROUTE]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW"}},687370(e,t,n){n.d(t,{r:()=>o});var a=n(296540),l=n(469733),r=n(528644),_=n(674319);function o(e){const t=(0,l.useSelector)(r.C);return(0,a.useMemo)(()=>(0,_.A)(e,t),[e,t])}},30247(e,t,n){n.d(t,{W:()=>d,U:()=>A});var a=n(801081),l=n(951929),r=n(38455),_=n(880880),o=n(930167),i=n(294591);const s=Object.values(i._$);var E=n(532419),c=n(983329);const A=(0,a.Mz)(E.U$,o.b,(e,t)=>{if(!t.wlanConfigurations?.length)return!0;const n=t.apGroups.find(c.K5);if(!n)return!1;if(0===n.device_macs.length){const n=(0,c.Xf)(e,t.isMeshingEnabled,t.isAutoLinkEnabled),a=t.wlanConfigurations.flatMap(({wlan_bands:e=[]})=>e);return l.A.filter(e=>a.filter(t=>t===e).length<n).length>0}return t.adoptedAps.some(e=>s.some(n=>!(0,_.Ly)((0,r.d)((0,_.vm)((0,_.bT)((0,_.wA)(),[n]),e.mac),t),{})))}),d=(0,a.Mz)(E.U$,o.b,(e,t)=>{const n=t.apGroups.find(c.K5);if(!n)return[];if(0===n.device_macs.length){const n=(0,c.Xf)(e,t.isMeshingEnabled,t.isAutoLinkEnabled),a=t.wlanConfigurations.flatMap(({wlan_bands:e=[]})=>e);return l.A.filter(e=>e!==i._$.AX&&a.filter(t=>t===e).length<n).sort()}return s.filter(e=>t.adoptedAps.some(n=>!(0,_.zY)((0,r.d)({ap_group_mode:i.qq.DEVICES,ap_specific_macs:[n.mac],wlan_bands:[e]},t),{})))})},786649(e,t,n){n.d(t,{l:()=>l});var a=n(546391);const l=e=>e.map(e=>e.map(e=>{let t=("number"==typeof e?e:e||"").toString();return t=t.replace(a.w1,"\\\\"),t=t.replace(a.ur,'\\"'),a.oZ.test(t)&&(t=`"${t}"`),t}).join(",")).join("\n")},424815(e,t,n){n.d(t,{P:()=>l});var a=n(348466);function l(e,t,n){const l=URL.createObjectURL(t),r=document.createElement("a");r.id=n,r.href=l,r.download=e.replaceAll(/[^A-Za-z0-9_\-.]/g,a.jr),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(l)}},413089(e,t,n){function a(e){return Boolean(e)}n.d(t,{z:()=>a})},400261(e,t,n){n.d(t,{Z:()=>l});var a=n(546391);const l=e=>e?e.replace(a.SD,"").replace(a.fA,"$&:").substring(0,17).toLowerCase():e},834042(e,t,n){n.d(t,{EJ:()=>s,gy:()=>o,oP:()=>_,pi:()=>r,q8:()=>i,t:()=>l});var a=n(621690);const l=60,r=24,_=({minuteOfDay:e,use24HourFormat:t,formatMessage:n})=>{const a=Math.floor(e/60);return`${String(t?a:a%12||12).padStart(2,"0")}:${String(e%l).padStart(2,"0")}${t?"":` ${n({id:a>=12?"COMMON_PM":"COMMON_AM"})}`}`},o=(e,t,n)=>{const r=Math.max(1,Math.min(60,Math.floor(60/t))),o=Math.floor(60/r);return(0,a.A)(0,24).flatMap(t=>(0,a.A)(r).map(a=>{const r=a*o;return{label:_({use24HourFormat:e,formatMessage:n,minuteOfDay:t*l+r}),value:60*t+ +r}}))},i=e=>6e4*Math.round(e/6e4),s=(e,t)=>{const n=+(e/1e3).toFixed(1),a=+(n/1e3).toFixed(1),l=+(n/6e4).toFixed(1);return n<1e3?`${n} ${t({id:"COMMON_UNIT_MS"})}`:a<60?`${a} ${t({id:"COMMON_UNIT_S"})}`:`${l} ${t({id:"COMMON_UNIT_MIN"})}`}}}]);