"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[59405],{47115(e,n,a){a.d(n,{LL:()=>t,TG:()=>i});const i=e=>{const{top:n,bottom:a}=e.getBoundingClientRect();return n>=0&&a<=(window.innerHeight||document.documentElement.clientHeight)};function t(e){"function"==typeof e.persist&&e.persist()}},789562(e,n,a){a.d(n,{A:()=>s});var i=a(274934),t=a(602086),r=a(772609);const s=({duration:e,value:n,renderLabel:a,onComplete:s,maxValue:o=100,initialTime:d=0,...c})=>{const[l,u]=(0,t.useState)(0),A=(0,t.useRef)(null),p=(0,t.useRef)(0),_=(0,t.useCallback)(()=>{p.current+=.5;const n=Math.min(Math.round(100*p.current/e),o);n>=100&&(clearInterval(A.current),A.current=null,s?.()),u(n)},[e,o,s]);return(0,t.useEffect)(()=>{const a=()=>{A.current&&clearInterval(A.current)};if(n)return A.current&&clearInterval(A.current),a;p.current=d;const i=Math.min(Math.round(100*d/e),o);return u(i),d>=e?(s?.(),a):(A.current=setInterval(_,500),a)},[_,n,d,e,o,s]),(0,i.jsx)(r.A,{value:void 0!==n?n:l,label:a?a(e-p.current):void 0,...c})}},602381(e,n,a){var i,t;a.d(n,{Z:()=>t,e:()=>i}),function(e){e.WIRED="WIRED",e.WIRELESS="WIRELESS"}(i||(i={})),function(e){e.CAPTURING="CAPTURING",e.STOP_CAPTURING="STOP_CAPTURING",e.UPLOADING="UPLOADING",e.READY_TO_DOWNLOAD="READY_TO_DOWNLOAD",e.TIMEOUT="TIMEOUT"}(t||(t={}))},859513(e,n,a){a.d(n,{A:()=>l});var i=a(274934),t=a(814557),r=a(247816),s=a(409844),o=a(470070),d=a(291508);const c=(0,r.A)("div",(0,d.A)("align"))`
  ${({align:e})=>e&&`text-align: ${e}`};
  color: ${({theme:{themeName:e}})=>t.Ay[`desktop-color-red-06-${e}`]};
  font-size: ${({theme:{fontSizes:e}})=>e[0]}px;
  line-height: 20px;
`,l=({align:e="left",children:n=null,className:a=null,translation:t=null,visible:r=!1})=>r?(0,i.jsxs)(c,{align:e,className:(0,s.cx)(a),children:[t?(0,i.jsx)(o.sA,{id:t}):null,n]}):null},218100(e,n,a){a.d(n,{h:()=>r});var i=a(758654),t=a(561614);const r=(e,n=!1)=>e?[...new Set(e.map(({radio:e})=>e!==t.sx.RADIO_6E||n?e:null).filter(Boolean).sort(i.fU))]:[]},996077(e,n,a){var i,t;a.d(n,{A:()=>i,X:()=>t}),function(e){e.DEFAULT="default",e.IN_PROGRESS="inProgress",e.READY="ready",e.DOWNLOADING="downloading",e.STOPPING="stopping"}(i||(i={})),function(e){e.AP="ap",e.GATEWAY="gateway"}(t||(t={}))},441318(e,n,a){a.d(n,{VQ:()=>b,ar:()=>R,ax:()=>S,r8:()=>N});var i=a(222102),t=a(430328),r=a(197719),s=a(254590),o=a(243436),d=a(910577),c=a(407386),l=a(423564),u=a(581814),A=a(197571),p=a(267142),_=a(644533),x=a(754924),O=a(544691),C=a(602381),m=a(996077);const E=[u.rR.CORPORATE,u.rR.GUEST],D=e=>void 0===e||e,I=({_id:e,name:n,enabled:a,ip_subnet:i,ipv6_subnet:t,wan_networkgroup:r,vpn_type:o,purpose:d,l2tp_interface:c,openvpn_interface:u,wireguard_interface:A,ipsec_interface:_,sdwan_hub_spoke_local_wan_id:x},O)=>({_id:e,enabled:D(a),name:n||s.L,ip_subnet:O?s.L:(0,l.Qe)({ip_subnet:i,ipv6_subnet:t},p.L),wan_networkgroup:r,vpn_type:o,ipsec_interface:_,l2tp_interface:c,openvpn_interface:u,purpose:d,sdwan_hub_spoke_local_wan_id:x,wireguard_interface:A}),f=(e,n)=>e?e===r.C.WAN?n.wan1:n[e.toLocaleLowerCase()]||{}:{},h=(e,n=C.e.WIRELESS)=>(0,i.Mz)(A.Ct,d.Ag,(0,O.a5)(e),x.fq,x.Dx,(e,a,i,t,r)=>{const s=a.reduce((e,{enabled:n,networkconf_id:a,ap_group_ids:t=[]})=>(n&&i.some(({_id:e})=>t.includes(e))&&e.push(a),e),[]);return e.reduce((e,a)=>(_.A.includes(a.purpose)&&(s.includes(a._id)||n===C.e.WIRED)&&e.push(I(a,(0,o.cH)({gateway_device:a.gateway_device,purpose:a.purpose},t,r))),e),[])}),b=(e,n=C.e.WIRELESS)=>(0,i.Mz)(h(e,n),e=>Boolean(e.length)),T=(0,t.WY)()((0,i.Mz)(A.Ct,x.U$,c.$D,x.AL,(e,n,a,i)=>[...e.reduce((e,a)=>(a&&n.network_table?.some(({_id:e})=>e===a._id)&&D(a.enabled)&&a.gateway_type!==u.xk.SWITCH&&E.includes(a.purpose)&&e.push(I(a)),e),[]),...a.reduce((e,{configuration:a={}})=>{if((({purpose:e,wan_networkgroup:n},a)=>{if(e!==u.rR.WAN)return!1;if(n===r.C.WAN_LTE_FAILOVER)return!0;const i=f(n,a);return!!i?.up})(a,n)){let t;if(a.wan_networkgroup===r.C.WAN_LTE_FAILOVER)t=i?.lte_ip;else{const e=f(a.wan_networkgroup,n);t=e?.ip}e.push({...I(a),...t?{ip_subnet:t}:{}})}return e},[])]),e=>e),R=(0,t.WY)()((0,i.Mz)(T,e=>Boolean(e.length)),e=>e),S=(e,n,a)=>{switch(n){case m.X.AP:return a===C.e.WIRELESS?h(e,a):(e=>(0,i.Mz)((0,x.tG)(e),A.Ct,x.fq,x.Dx,(e,n,a,i)=>{if(!e.connection_network_id)return[];const t=n.find(({_id:n})=>n===e.connection_network_id);return t?[I(t,(0,o.cH)({gateway_device:t.gateway_device,purpose:t.purpose},a,i))]:[]}))(e);case m.X.GATEWAY:return T;default:return()=>[]}},N=e=>(0,i.Mz)(d.Ag,n=>{const a=n.filter(n=>n.networkconf_id===e);return[...new Set(a.flatMap(e=>e.wlan_bands))]})},441359(e,n,a){a.r(n),a.d(n,{default:()=>Se});var i=a(274934),t=a(977872),r=a(254585),s=a(205521),o=a(100978),d=a(602086),c=a(843871),l=a(159469),u=a(700444),A=a(602381);const p=a(290454).w,_="pcap-get";var x;!function(e){e.CAPTURING="CAPTURING",e.NOT_FOUND="NOT_FOUND"}(x||(x={}));var O=a(571766),C=a(29472),m=a(293783),E=a(193730),D=a(774366),I=a(197571),f=a(754924),h=a(352210),b=a(309130),T=a(441318),R=a(996077),S=a(247816),N=a(814557),v=a(950804),j=a(561614);const g=(0,S.A)(o.A)`
  width: 100%;
  border-radius: ${N.Ay["desktop-radius-base"]};
  background: ${({theme:{themeName:e}})=>N.Ay[`desktop-color-neutral-01-${e}`]};
  padding: ${b.Ln};
`,w=v.A.object().shape({mac:v.A.string().required(),network_id:v.A.string().required(),traffic_type:v.A.string().oneOf(Object.values(A.e)).required(),radio_bands:v.A.array().when("traffic_type",(e,n)=>e===A.e.WIRELESS?n.of(v.A.string().oneOf(Object.values(j.sx))).min(1).required():n.optional()),duration:v.A.number().min(30).max(300).integer()});var P=a(758654);const y=(e,n=!1)=>e?[...new Set(e.filter(({radio:e})=>e!==j.sx.RADIO_6E||n).map(({radio:e})=>e).sort(P.fU))]:[];var L=a(348185),M=a(213582),k=a(125799),W=a(409844),G=a(95032),U=a(954702),$=a(642687),Y=a(470070),F=a(584539),z=a(897166),B=a(956978),V=a(434521),H=a(45978),X=a(789562),q=a(938984),K=a(833466),Q=a(120197);const Z=({disabledItems:e=[]})=>(0,i.jsxs)(o.A,{flexDirection:"column",children:[(0,i.jsx)(q.A,{variant:"caption",color:Object.values(A.e).every(n=>e.includes(n))?"disabled":void 0,children:(0,i.jsx)(Y.sA,{id:"DEVICE_PCAP_CAPTURE_ON"})}),(0,i.jsxs)(o.A,{height:K.b,alignItems:"center",gap:b.Ln,children:[(0,i.jsx)(Q.A,{name:"traffic_type",disabled:e.includes(A.e.WIRELESS),vertical:!0,type:"radio",value:A.e.WIRELESS,children:(0,i.jsx)(Y.sA,{id:"COMMON_WIRELESS"})}),(0,i.jsx)(Q.A,{name:"traffic_type",disabled:e.includes(A.e.WIRED),type:"radio",vertical:!0,value:A.e.WIRED,children:(0,i.jsx)(Y.sA,{id:"DEVICE_PCAP_CAPTURE_WIRED"})})]})]});var J=a(218100),ee=a(370115),ne=a(859513),ae=a(724081),ie=a(244081),te=a(301940),re=a(553732),se=a(539453),oe=a(393482),de=a(761801);const ce=({bands:e,activeBands:n,disabled:a})=>{const{setFieldValue:t,values:r}=(0,c.j7)();return(0,i.jsxs)(o.A,{flexDirection:"column",children:[(0,i.jsx)(q.A,{variant:"caption",color:a?"disabled":void 0,children:(0,i.jsx)(Y.sA,{id:"COMMON_RADIOS"})}),(0,i.jsx)(o.A,{height:"32px",alignItems:"center",gap:b.Ln,children:e.map(e=>(0,i.jsx)(Q.A,{name:`radio_band_${e}`,disabled:a||n&&!n.includes(e),type:"realCheckbox",value:e,onChange:()=>(e=>{r.radio_bands?.includes(e)?t("radio_bands",r.radio_bands.filter(n=>n!==e)):t("radio_bands",[...r.radio_bands||[],e])})(e),checked:r.radio_bands?.includes(e),children:(0,i.jsx)(de.A,{radio:e})},e))})]})},le=(e,n,a)=>i=>{i.target.value||a(e,n)},ue=({mac:e,captureDeviceType:n,disabled:a,trafficType:r})=>{const s=(0,t.d4)((0,T.ax)(e,n,r)),o=(0,t.d4)(f.AL),{formatMessage:c}=(0,Y.tz)(),l=(0,d.useMemo)(()=>(0,ee.MG)(s,c,o?.name,e=>({additionalInfo:e.ip_subnet,disabled:!e.enabled})),[c,s,o?.name]);return(0,ae.A)([(0,te.uy)(void 0,{crudCacheStrategy:{type:ie.e.CACHE}}),(0,oe.Yo)(void 0,{crudCacheStrategy:{type:ie.e.CACHE}}),(0,re.Sk)(void 0,{crudCacheStrategy:{type:ie.e.CACHE}}),(0,se.hh)(void 0,{crudCacheStrategy:{type:ie.e.CACHE}})],(0,i.jsx)(Q.A,{full:!0,name:"network_id",type:"dropdown",variant:"secondary",disabled:a,options:l,renderOption:ee.Ku,label:(0,i.jsx)(Y.sA,{id:"COMMON_NETWORK"})}))},Ae=({disabled:e})=>{const{errors:n,setFieldValue:a}=(0,c.j7)(),t=(0,d.useMemo)(()=>(0,c.O6)(n,"duration")?.props?.id,[n]);return(0,i.jsx)(Q.A,{name:"duration",type:"number",variant:"secondary",min:30,max:300,label:"COMMON_DURATION",contentAfter:(0,i.jsx)(Y.sA,{id:"COMMON_UNIT_SECONDS"}),disabled:e,onBlur:le("duration",30,a),invalid:t?(0,i.jsx)(Y.sA,{id:t,values:{name:(0,i.jsx)(Y.sA,{id:"COMMON_DURATION"}),min:30,max:300,unit:(0,i.jsx)(Y.sA,{id:"COMMON_UNIT_SECONDS"})}}):void 0,width:"160px"})},pe=({mac:e,captureDeviceType:n,radioBands:a,activeRadioBands:t,disabled:r})=>{const{values:s}=(0,c.j7)();return(0,i.jsxs)(i.Fragment,{children:[s.traffic_type===A.e.WIRELESS&&a.length?(0,i.jsxs)(o.A,{flexDirection:"column",children:[(0,i.jsx)(ce,{bands:a,disabled:r,activeBands:t}),s.radio_bands?.length?null:(0,i.jsx)(ne.A,{align:"left",visible:!0,translation:"DEVICE_PCAP_NO_RADIO_SELECTED"})]}):null,(0,i.jsx)(ue,{mac:e,captureDeviceType:n,trafficType:s.traffic_type,disabled:r}),(0,i.jsx)(Ae,{disabled:r})]})};var _e=a(824205),xe=a(491396);const Oe=(0,S.A)(o.A)`
  padding: 6px ${b.xO};
  &:hover {
    background: ${({theme:{themeName:e}})=>N.Ay[`desktop-color-neutral-01-${e}`]};
  }
`,Ce=({onDownloadText:e,onCopy:n,isDisabled:a,onClick:t})=>(0,i.jsxs)(o.A,{flexDirection:"column",children:[(0,i.jsx)(Oe,{flexDirection:"row",children:(0,i.jsx)(U.A,{onClick:()=>{e(),t()},isDisabled:a,fontSize:"medium",variant:"neutral",children:(0,i.jsx)(Y.sA,{id:"COMMON_AI_ANALYSIS_DOWNLOAD"})})}),(0,i.jsx)(Oe,{flexDirection:"row",children:(0,i.jsx)(U.A,{onClick:()=>{n(),t()},isDisabled:a,fontSize:"medium",variant:"neutral",children:(0,i.jsx)(Y.sA,{id:"COMMON_COPY_TO_CLIPBOARD"})})})]}),me=e=>{const[n,a]=(0,d.useState)(!1);return(0,i.jsxs)(_e.A.Root,{isOpen:n,onOpenChange:()=>a(!n),children:[(0,i.jsx)(_e.A.Trigger,{isDisabled:e.isDisabled,children:(0,i.jsxs)(U.A,{isDisabled:e.isDisabled,fontSize:"medium",children:[(0,i.jsx)(Y.sA,{id:"COMMON_AI_ANALYSIS"}),(0,i.jsx)(xe.A,{})]})}),(0,i.jsx)(_e.A.Content,{width:165,placement:"bottom end",children:n?(0,i.jsx)(Ce,{...e,onClick:()=>a(!1)}):null})]})},Ee=W.AH`
  pointer-events: auto !important;
`,De=({activeItem:e,captureDeviceType:n,captureMode:a,onDownload:r,onDownloadText:s,onCopy:l,onStop:u,onClickClose:p})=>{const{handleSubmit:_,values:{duration:x,wasAlreadyInProgress:O,network_id:C},isValid:m}=(0,c.j7)(),E=(0,t.d4)(z.EL),D=(0,t.d4)((0,T.VQ)(e.mac,A.e.WIRELESS)),[I,f]=(0,d.useState)(!0),h=(0,V.S9)(e)===H.g.CONNECTED,S=(0,t.d4)((0,T.r8)(C)),N=(0,J.h)(e.radio_table,e.support_wifi6e).filter(e=>(0,F.A)(e,S)),v=y(e.vap_table,e.support_wifi6e),j=(0,d.useRef)(null);(0,d.useEffect)(()=>{a===R.A.IN_PROGRESS&&(f(!0),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{f(!1),j.current=null},1e4/(O?2:1)))},[a,O]);const g=(0,d.useMemo)(()=>[R.A.IN_PROGRESS,R.A.READY,R.A.DOWNLOADING].includes(a),[a]),w=(0,d.useCallback)(()=>_(),[_]),P=(0,d.useMemo)(()=>[...a!==R.A.DEFAULT||E?[]:[{id:"capture-button",text:(0,i.jsx)(G.A,{color:"neutral-inverse",children:(0,i.jsx)(Y.sA,{id:"COMMON_ACTION_CAPTURE"})}),onClick:w,isDisabled:!m||!h,...h?{}:{className:Ee,text:(0,i.jsx)(k.A,{description:(0,i.jsx)(Y.sA,{id:"DEVICE_PCAP_DISABLED_TOOLTIP"}),offset:8,portal:!0,children:(0,i.jsx)(G.A,{color:"neutral-inverse",children:(0,i.jsx)(Y.sA,{id:"COMMON_ACTION_CAPTURE"})})})}}],...a===R.A.IN_PROGRESS?[{id:"stop-button",text:(0,i.jsx)(G.A,{color:"neutral-inverse",children:(0,i.jsx)(Y.sA,{id:"COMMON_STOP"})}),onClick:u,isDisabled:I}]:[],...a===R.A.STOPPING?[{id:"stopping-button",text:(0,i.jsx)(G.A,{color:"neutral-inverse",children:(0,i.jsx)(Y.sA,{id:"COMMON_STOPPING"})}),isDisabled:!0}]:[],...g&&a!==R.A.IN_PROGRESS?[{id:"restart-button",text:(0,i.jsx)(G.A,{color:"neutral-inverse",children:(0,i.jsx)(Y.sA,{id:"DEVICE_ACTIONS_RESTART"})}),onClick:w}]:[],{id:"cancel-button",variant:"neutral",text:(0,i.jsx)(Y.sA,{id:"COMMON_ACTION_CANCEL"}),onClick:p}],[a,E,w,m,h,u,I,g,p]),L=(0,d.useMemo)(()=>{const e=[];return a===R.A.IN_PROGRESS&&(e.push(A.e.WIRELESS),e.push(A.e.WIRED)),D||e.push(A.e.WIRELESS),e},[a,D]),M=(0,d.useCallback)(e=>a===R.A.IN_PROGRESS?(0,i.jsx)(G.A,{size:"medium",variant:"body-secondary",children:(0,i.jsx)(Y.sA,{id:"COMMON_CAPTURING_PACKETS_TIME_LEFT",values:{timeLeft:Math.round(e)}})}):(0,i.jsxs)(o.A,{gap:b.Ln,children:[(0,i.jsx)(U.A,{onClick:r,isDisabled:a===R.A.DOWNLOADING,fontSize:"medium",children:(0,i.jsx)(Y.sA,{id:"COMMON_DOWNLOAD_FILE"})}),(0,i.jsx)(me,{isDisabled:a===R.A.DOWNLOADING,onDownloadText:s,onCopy:l})]}),[a,s,r,l]);return(0,i.jsxs)(o.A,{flexDirection:"column",gap:b.Ln,width:"100%",children:[(0,i.jsx)(o.A,{flexDirection:"row",children:(0,i.jsxs)(o.A,{flexDirection:"column",gap:b.kc,width:"100%",children:[(0,B.TT5)(e)?(0,i.jsx)(Z,{disabledItems:L}):null,(0,i.jsx)(pe,{mac:e.mac,captureDeviceType:n,radioBands:N,activeRadioBands:v,disabled:a===R.A.IN_PROGRESS}),g?(0,i.jsx)(o.A,{paddingTop:b.YC,children:(0,i.jsx)(X.A,{size:"large",duration:x||40,value:[R.A.READY,R.A.DOWNLOADING].includes(a)?100:void 0,renderLabel:M})}):null]})}),(0,i.jsx)(o.A,{flexDirection:"column",children:(0,i.jsx)(o.A,{flexDirection:"row",gap:b.kc,children:P.map(e=>(0,i.jsx)($.A,{size:"small",variant:"emphasis",type:"button",...e,children:(0,i.jsx)(G.A,{children:e.text})},`${e.id}-button`))})})]})},Ie=({activeItem:e,captureDeviceType:n,captureMode:a,setCaptureMode:r,onClickCloseForm:s})=>{const o=(0,t.wA)(),{setFieldValue:I}=(0,c.j7)(),f=(0,d.useCallback)(()=>{r(R.A.STOPPING),o((0,C.Xj)(E.A.PCAP_STOP,`${p}/${E.A.PCAP_STOP}/${e.mac}`))},[r,e.mac,o]),h=(0,d.useCallback)(async()=>{r(R.A.DOWNLOADING);try{await o(((e,n,{isCancelled:a,...i}={})=>(0,m.P)(`${p}/${_}/${e}`,n,i,a))(e.mac,((e,n,a=Date.now())=>`${e}-pcap-${n}-${a}.tar.gz`)(n,e.mac)))}finally{r(R.A.READY)}},[e.mac,n,o,r]),b=(0,d.useCallback)(async()=>{r(R.A.DOWNLOADING);try{await o(((e,n,{isCancelled:a,...i}={})=>(0,m.P)(`${p}/${_}/${e}/txt`,n,i,a))(e.mac,((e,n,a=Date.now())=>`${e}-pcap-${n}-${a}.txt`)(n,e.mac))),r(R.A.READY)}catch{await h()}},[e.mac,n,o,h,r]),T=(0,d.useCallback)(async()=>{r(R.A.DOWNLOADING);try{await o(((e,{isCancelled:n,...a}={})=>(0,m.B)(`${p}/${_}/${e}/txt`,a,n))(e.mac)),o((0,u.ox)({icon:l.C.success,message:"COMMON_COPIED_TO_CLIPBOARD"})),r(R.A.READY)}catch{await h()}},[e.mac,o,h,r]),S=(0,d.useCallback)(()=>{r(R.A.IN_PROGRESS),I("wasAlreadyInProgress",!0)},[r,I]);return(0,M.A)(L.E.PACKET_CAPTURE,({mac:n,status:a})=>{if(n===e.mac)switch(a){case A.Z.TIMEOUT:r(R.A.DEFAULT),o((0,u.ox)({icon:l.C.danger,message:"DEVICES_PCAP_TIMEOUT"}));break;case A.Z.READY_TO_DOWNLOAD:r(R.A.READY);break;case A.Z.CAPTURING:S();break;case A.Z.STOP_CAPTURING:r(R.A.STOPPING)}}),(0,d.useEffect)(()=>{(async()=>{try{const{data:a}=await o((n=e.mac,(0,C.vB)(O.aC,null,null,D.A.GET,`${p}/pcap-status/${n}`)));a===x.CAPTURING&&S()}catch{}var n})()},[S,e.mac,o]),(0,i.jsx)(De,{activeItem:e,captureDeviceType:n,captureMode:a,onStop:f,onDownload:h,onDownloadText:b,onCopy:T,onClickClose:s})};var fe=a(974390),he=a(421314);const be=({model:e,name:n})=>(0,i.jsxs)(o.A,{width:"100%",flexDirection:"row",gap:b.YC,alignItems:"center",padding:`${b.kc} 0`,children:[(0,i.jsx)(fe.A,{model:e,width:20}),(0,i.jsx)(he.A,{size:"medium",children:n})]}),Te=(e,n,a=!1)=>n&&n.some(({radio:n})=>(n!==j.sx.RADIO_6E||a)&&n===e)?[e]:[],Re=({mac:e,captureDeviceType:n,radio:a,onClickCloseForm:r})=>{const s=(0,t.wA)(),o=(0,t.d4)((0,T.VQ)(e,A.e.WIRELESS)),_=(0,d.useMemo)(()=>n!==R.X.GATEWAY&&o?A.e.WIRELESS:A.e.WIRED,[n,o]),x=(0,t.d4)((0,d.useMemo)(()=>(0,f.tG)(e),[e])),[O,m]=(0,d.useState)(R.A.DEFAULT),D=(0,t.d4)((0,T.ax)(e,n,_)),S=(0,t.d4)(I.nT),N=(D?.find(({_id:e})=>e===S._id)||D[0])?._id,v=(0,d.useMemo)(()=>({mac:e,network_id:N,traffic_type:_,radio_bands:a?Te(a,x.vap_table,x.support_wifi6e):y(x.vap_table,x.support_wifi6e),duration:30,wasAlreadyInProgress:!1}),[e,N,_,a,x.vap_table,x.support_wifi6e]),j=(0,d.useCallback)(e=>{m(R.A.IN_PROGRESS),s(((e,n={})=>(0,C.Xj)(E.A.PCAP_START,`${p}/${E.A.PCAP_START}`,e,n))((({radio_bands:e,...n})=>({...n,...n.traffic_type===A.e.WIRELESS?{radio_bands:e}:{}}))(e),{onError:({apiMsg:e})=>{m(R.A.DEFAULT),s((0,u.ox)({icon:l.C.danger,message:h.API_STRING_TRANSLATION[e]||"DEVICE_PCAP_COULD_NOT_START"}))}}))},[s]);return(0,i.jsxs)(g,{flexDirection:"column",gap:b.kc,children:[(0,i.jsx)(be,{model:x.model,name:x.name}),(0,i.jsx)(c.l1,{enableReinitialize:!0,initialValues:v,validationSchema:w,onSubmit:j,children:(0,i.jsx)(Ie,{activeItem:x,captureDeviceType:n,captureMode:O,setCaptureMode:e=>{m(e)},onClickCloseForm:r})})]})},Se=()=>{const e=(0,t.wA)(),n=(0,t.d4)(r.gm),a=(0,t.d4)((0,r.Gg)());return n?(0,i.jsx)(o.A,{flexDirection:"column",children:(0,i.jsx)(Re,{mac:n,captureDeviceType:a?.captureDeviceType??R.X.GATEWAY,radio:a?.radio,onClickCloseForm:()=>{e((0,s.K5)())}})}):null}},761801(e,n,a){a.d(n,{A:()=>s});var i=a(274934),t=a(470070),r=a(581883);const s=({radio:e,suffix:n})=>r.U[e]?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.sA,{id:r.U[e]}),n?(0,i.jsxs)("span",{children:[" ",n]}):null]}):(0,i.jsx)(t.sA,{id:"COMMON_FALLBACK"})},571829(e,n,a){a.d(n,{I:()=>t});var i=a(561614);const t=[i.sx.RADIO_NG,i.sx.RADIO_NA,i.sx.RADIO_6E,i.sx.RADIO_AD]},758654(e,n,a){a.d(n,{Rm:()=>s,fU:()=>r,uQ:()=>t});var i=a(571829);const t=e=>{const n=(n,a)=>e.indexOf(n)-e.indexOf(a);return{orderRadios:n,orderByRadio:(e,a)=>n(e.radio,a.radio)}},{orderRadios:r,orderByRadio:s}=t(i.I)}}]);