"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[9749],{545111:(e,t,n)=>{n.d(t,{N:()=>r});const r=(0,n(296540).createContext)({mac:void 0,deviceName:void 0,isQuickScanning:!1,quickScanningChannelWidth:void 0,quickScanningRadio:void 0,supportedQuickScan:!1})},769048:(e,t,n)=>{n.d(t,{A:()=>f});var r=n(296540),l=n(71479),o=n(217439),a=n(271856),c=n(162420),d=n(469733),i=n(294303),s=n(566723),u=n(459449),A=n(302167),b=n(709565),m=n(349107),g=n(765562),k=n(601628);const h="enabled",E="inUse",p="inUsePreview",N="nextAi",I="suggested",$="dfs",O="notAvailable",_="utilization",y="blacklisted",x="blockedForOutdoor",C=(0,l.A)("div")`
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 2px;
  margin-left: 2px;

  ${({theme:{themeName:e}})=>`\n\n  &.${E} {\n    background: ${b.Y.inUse[`${e}-background`]};\n  }\n  \n  &.${h} {\n    background: ${b.Y.enabled[`${e}-background`]};\n    border: ${b.Y.enabled[`${e}-border`]};\n  }\n\n  &.${p} {\n    background: ${b.Y.inUsePreview[`${e}-background`]};\n  }\n\n  &.${N} {\n    background: ${b.Y.nextAi[`${e}-background`]};\n  }\n\n  &.${I} {\n    background: ${b.Y.suggested[`${e}-background`]};\n    border: ${b.Y.suggested[`${e}-border`]};\n  }\n\n  &.${$} {\n    background: ${b.Y.dfsLegend[`${e}-background`]};\n    border: ${b.Y.dfsLegend[`${e}-border`]};\n  }\n  \n  &.${x} {\n    background: ${b.Y.blockedForOutdoor[`${e}-background`]};\n    border: ${b.Y.blockedForOutdoor[`${e}-border`]};\n    background-size: 3px 3px;\n  }\n\n  &.${O} {\n    background: ${b.Y.notAvailable[`${e}-background`]};\n  }\n\n  &.${_} {\n    background: ${b.Y.utilization[`${e}-background`]};\n  }\n\n  &.${y} {\n    background: ${b.Y.blacklisted[`${e}-background`]};\n  }\n\n  `}
`,L=({className:e,label:t,icon:n})=>r.createElement(i.A,{alignItems:"center",gap:s.YC},r.createElement(C,{className:e}),r.createElement(o.A,{variant:"caption"},t),n),f=({showBlacklisted:e,stateType:t,hasAfcSupport:n,containerProps:l})=>r.createElement(i.A,{gap:s.xO,justifyContent:l?.justifyContent||"center",...l},[k.xd.NORMAL,k.xd.OPTIMIZING].includes(t)?r.createElement(L,{className:E,label:r.createElement(u.sA,{id:"COMMON_IN_USE"})}):null,r.createElement(L,{className:h,label:r.createElement(u.sA,{id:"COMMON_ENABLED"})}),r.createElement(L,{className:$,label:r.createElement(u.sA,{id:"COMMON_DEVICE_RADIO_CHANNEL_DFS"})}),n?r.createElement(L,{className:x,label:r.createElement(u.sA,{id:"SETTINGS_WIFI_CHANNELIZATION_BLOCKED_FOR_OUTDOOR"}),icon:r.createElement(a.A,{description:r.createElement(u.sA,{id:"SETTINGS_WIFI_CHANNELIZATION_AFC_RESTRICTION_TOOLTIP",values:{link:r.createElement(m.A,{href:g.A.afcArticle,id:"COMMON_LEARN_MORE"})}}),portal:!0,isInteractive:!0},r.createElement(c.A,{isActive:!0,size:"medium"}))}):null,r.createElement(L,{className:O,label:r.createElement(u.sA,{id:"COMMON_NOT_AVAILABLE"}),icon:r.createElement(a.A,{description:r.createElement(u.sA,{id:"SETTINGS_WIFI_CHANNELIZATION_NOT_AVAILABLE_REGION",values:{countryCode:(0,d.useSelector)(A.AP)}}),portal:!0},r.createElement(c.A,{isActive:!0,size:"medium"}))}),e?r.createElement(L,{className:y,label:r.createElement(u.sA,{id:"COMMON_EXCLUDED"})}):null)},899847:(e,t,n)=>{n.d(t,{A:()=>re});var r,l=n(296540),o=n(469733),a=n(252959),c=n(439173),d=n(762720),i=n(276420),s=n(736201),u=n(359719),A=n(132196),b=n(998837),m=n(71479),g=n(311785),k=n(709565),h=n(456618),E=n(601628);!function(e){e.HALF_RIGHT="halfRight",e.FULL="full"}(r||(r={}));const p="inUse",N="inUsePreview",I="nextAi",$="suggested",O="enable",_="dfs",y="blockedForOutdoor",x="notAvailable",C="selected",L="blacklisted",f="blacklistedDfs",T="blacklistedRight",S="blacklistedLeft",M=(0,m.A)("button")`
  position: relative;
  user-select: none;
  background: transparent;
  color: inherit;

  border: none;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 2px;
  overflow: hidden;
  width: 100%;
  height: 100%;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }

  ${({onClick:e,disabled:t})=>e&&!t?"cursor: pointer;":""}
`,v=({themeName:e})=>A.AH`
  border: 1px solid transparent;

  &.${p} {
    background: ${k.Y.inUse[`${e}-background`]};
    border: ${k.Y.inUse[`${e}-border`]};
  }

  &.${N} {
    background: ${k.Y.inUsePreview[`${e}-background`]};
  }

  &.${I} {
    background: ${k.Y.nextAi[`${e}-background`]};
  }

  &.${$} {
    background: ${k.Y.suggested[`${e}-background`]};
    border: ${k.Y.suggested[`${e}-border`]};
  }

  &.${O} {
    background: ${k.Y.enable[`${e}-background`]};
    border: ${k.Y.enable[`${e}-border`]};
  }

  &.${_} {
    border: ${k.Y.dfs[`${e}-border`]};
    background: ${k.Y.dfs[`${e}-background`]};

    .${O} & {
      border: none;
    }
  }

  &.${_}.${p} {
    border: ${k.Y.dfsInUse[`${e}-border`]};
    background: ${k.Y.dfsInUse[`${e}-background`]};
  }

  &.${x} {
    background: ${k.Y.notAvailable[`${e}-background`]};
    border: ${k.Y.notAvailable[`${e}-border`]};
  }

  &.${y} {
    background: ${k.Y.blockedForOutdoor[`${e}-background`]};
    background-size: 4px 4px;
    border: ${k.Y.blockedForOutdoor[`${e}-border`]};
  }

  &.${y}.${p} {
    background: ${k.Y.blockedForOutdoorInUse[`${e}-background`]};
    border: ${k.Y.blockedForOutdoorInUse[`${e}-border`]};
  }

  &.${T} {
    background: ${k.Y.enable[`${e}-background`]};

    ::before {
      left: 50%;
      background: ${k.Y.blacklisted[`${e}-background`]};
    }

    border: ${k.Y.enable[`${e}-border`]};
  }

  &.${S} {
    background: ${k.Y.enable[`${e}-background`]};

    ::before {
      right: 50%;
      background: ${k.Y.blacklisted[`${e}-background`]};
    }

    border: ${k.Y.enable[`${e}-border`]};
  }

  &.${L} {
    background: ${k.Y.blacklisted[`${e}-background`]};
    border: ${k.Y.blacklisted[`${e}-border`]};
  }

  &.${f} {
    background: ${k.Y.blacklistedDfs[`${e}-background`]};
    border: ${k.Y.blacklistedDfs[`${e}-border`]};
  }

  &.${C} {
    border: ${k.Y.selected[`${e}-border`]};
  }
`,D=({themeName:e})=>A.AH`
  &:hover {
    border: ${k.Y.selected[`${e}-border`]} !important;

    & > div {
      border: none;
    }
  }
`,R=(e,t,n,r,l,o)=>{let a=t;return t===h.d.IN_USE?[E.xd.NORMAL,E.xd.OPTIMIZING].includes(e.type)&&(a=p):t===h.d.BLACKLISTED&&(a=n?f:L),l&&(a=x),[{[y]:r&&!l},a,{[_]:n,[C]:o&&!l}]},F=(0,m.A)("div",(0,g.A)("right"))`
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  ${({right:e})=>e?"left: 50%;":"right: 50%;"}
`,w=(0,l.forwardRef)(({channel:e,radioAnalysisState:t,preview:n,dfs:o,isBlockedForOutdoor:a,notAvailable:c,selected:d,state:i,...s},u)=>{const m=(0,b.u)();return l.createElement(M,{...s,className:(0,A.cx)(v(m),R(t,i,o===r.FULL,a,c,d),s.onClick&&D(m)),type:"button",ref:u},o===r.HALF_RIGHT?l.createElement(F,{right:!0,className:(0,A.cx)(v(m),R(t,i,!0,a,c,d))}):null)});var U=n(217439),Y=n(271856),W=n(823858),P=n(84385),H=n(566723),B=n(459449),G=n(280062),z=n(294303),q=n(302167);const Z=()=>l.createElement(U.A,{color:"text-3",size:"small"},l.createElement(B.sA,{id:"SETTINGS_WIFI_CHANNELIZATION_NOT_AVAILABLE_REGION",values:{countryCode:(0,o.useSelector)(q.AP)}})),j=(0,m.A)(W.A)`
  margin-top: ${H.YC};
  color: ${({theme:{motifPalette:{warning:e}}})=>e};
`,K=()=>l.createElement(z.A,{alignItems:"flex-start",gap:H.YC},l.createElement(j,{size:"original"}),l.createElement(U.A,{color:"inherit"},l.createElement(B.sA,{id:"SETTINGS_WIFI_CHANNELIZATION_WILL_BLOCK_ALL"}))),V={blacklisted:"COMMON_EXCLUDED",enable:"COMMON_ENABLED",inUse:"COMMON_IN_USE"},X=(0,m.A)("div")`
  text-align: right;
`,Q=({label:e,value:t})=>l.createElement(z.A,{justifyContent:"space-between",gap:H.Ln},l.createElement("div",null,e),l.createElement(X,null,l.createElement(U.A,{size:"small"},t))),J=({state:e,data:t})=>l.createElement(z.A,{flexDirection:"column",gap:H.YC},l.createElement(Q,{label:l.createElement(B.sA,{id:"COMMON_STATUS"}),value:l.createElement(B.sA,{id:V[e]})}),t?.utilization?l.createElement(Q,{label:l.createElement(B.sA,{id:"COMMON_UTILIZATION"}),value:`${t.utilization}%`}):null,t?.interference?l.createElement(Q,{label:l.createElement(B.sA,{id:"COMMON_INTERFERENCE"}),value:`${t.interference}%`}):null,t?.ap?l.createElement(Q,{label:l.createElement(B.sA,{id:"COMMON_ACCESS_POINTS"}),value:t.ap}):null,t?.client?l.createElement(Q,{label:l.createElement(B.sA,{id:"COMMON_CLIENTS"}),value:t.client}):null,t?.txRetry?l.createElement(Q,{label:l.createElement(B.sA,{id:"COMMON_TX_RETRIES"}),value:`${t.txRetry}%`}):null,l.createElement(z.A,null,l.createElement(U.A,{color:"text-3",size:"small"},l.createElement(B.sA,{id:e===h.d.BLACKLISTED?"SETTINGS_WIFI_CHANNELIZATION_CLICK_TO_INCLUDE_CHANNEL":"SETTINGS_WIFI_CHANNELIZATION_CLICK_TO_EXCLUDE_CHANNEL"})))),ee=({children:e,channel:t,controlChannel:n,channelWidth:r,state:o,isDfs:a,notAvailable:c,willBlockAll:d,radioType:i,data:s,cursorType:u})=>{const{formatMessage:A}=(0,B.tz)(),b=c?l.createElement(Z,null):d&&l.createElement(K,null);return l.createElement(Y.A,{width:d?300:void 0,description:b||l.createElement(J,{state:o,data:s}),title:l.createElement(l.Fragment,null,l.createElement(U.A,{color:"inherit",weight:"bold"},l.createElement(B.sA,{id:"SETTINGS_WIFI_CHANNELIZATION_CONTROL_CHANNEL"})," ",n),l.createElement(P.A,null),l.createElement(U.A,{color:"inherit",weight:"bold",size:"small"},l.createElement(z.A,{flexDirection:"row",gap:H.kc},l.createElement(z.A,null,l.createElement(B.sA,{id:"COMMON_CHANNEL"})," ",t,a?` (${A({id:"COMMON_DEVICE_RADIO_CHANNEL_DFS"})})`:""),l.createElement(z.A,null,l.createElement(G.A,{radio:i})),l.createElement(z.A,null,r," ",l.createElement(B.sA,{id:"COMMON_UNIT_MHZ"}))))),portal:!0,noWrap:!0,cursorType:u},e)};var te=n(255544);const ne=(e,t)=>{const n=t.includes(e[0]),l=t.includes(e[e.length-1]);if(n||l)return l&&!n?r.HALF_RIGHT:r.FULL},re=({sectionId:e,blacklistedChannels:t,onChangeBlacklistedChannels:n,radioAnalysisState:r,hideLegend:A,disableActions:b,channelsTableStyle:m})=>{const{band:g}=i.kL[e],k=(0,o.useSelector)(a.H),E=(0,o.useSelector)(te.D),p=(0,o.useSelector)(te.W),N=(0,l.useMemo)(()=>(0,d.r)(k,null,g,null,!0),[g,k]),I=(0,l.useMemo)(()=>(0,d.r)(k,null,g,Number(s.P)).filter(e=>!t.has((0,u.PA)(g,s.P,e))),[g,t,k]);return l.createElement(i.Ay,{sectionId:e,hideLegend:A,channelsTableStyle:m,renderChannel:({channel:e,channelWidth:o,custom:a})=>{if(a)return a;const{subChannels:i,band:A}=c.R[g]?.[o]?.[+e]??{};if(!i?.length)return null;const m=(0,d.r)(k,null,g,Number(o)),$=p[`${g}-${o}`],O=(0,u.o)(i,$),_=O||i[0],y=(0,u.JE)(i,g,s.P,t)||(O?h.d.IN_USE:h.d.ENABLE),x=!i.some(e=>m.includes(e)),C=y!==h.d.BLACKLISTED&&I?.length<=i?.length&&I?.every(e=>i?.includes(e)),L=l.createElement(w,{channel:e,radioAnalysisState:r,state:y,onClick:x||C||b?void 0:()=>{const e=new Set([...t]);i.forEach(t=>{const n=(0,u.PA)(g,s.P,t);y===h.d.BLACKLISTED?e.delete(n):e.add(n)}),n(e)},dfs:ne(i,N),isBlockedForOutdoor:Boolean(A&&u.Oh.includes(A)),notAvailable:x,preview:!1});return b?L:l.createElement(ee,{key:e,channel:e,controlChannel:_,channelWidth:o,state:y,isDfs:N.includes(_),radioType:g,data:E[`${g}-${o}-${_}`],notAvailable:x,willBlockAll:C},L)}})}},709565:(e,t,n)=>{n.d(t,{Y:()=>c});var r=n(822336);const l=(e,t)=>`repeating-linear-gradient(\n  -45deg,\n  ${e},\n  ${e} 1px,\n  ${t} 1px,\n  ${t} 5px\n)`,o=(e,t)=>`repeating-linear-gradient(\n  -45deg,\n  ${e},\n  ${e} 1px,\n  ${t} 1px,\n  ${t} 3px\n)`,a=(e,t)=>`radial-gradient(\n  circle at 2px 1px, ${e} 1px, ${t} 0\n)`,c={inUse:{"light-background":r.Ay["desktop-color-green-06-light"],"dark-background":r.Ay["desktop-color-green-06-dark"],"light-border":`1px solid ${r.Ay["desktop-color-green-05-light"]}`,"dark-border":`1px solid ${r.Ay["desktop-color-green-05-dark"]}`},enabled:{"light-background":r.Ay["desktop-color-neutral-03-light"],"dark-background":r.Ay["desktop-color-neutral-03-dark"],"light-border":`1px solid ${r.Ay["desktop-color-neutral-06-light"]}`,"dark-border":`1px solid ${r.Ay["desktop-color-neutral-06-dark"]}`},inUsePreview:{"light-background":r.Ay["desktop-color-green-03-light"]},nextAi:{"light-background":r.Ay["desktop-color-green-06-light"],"dark-background":r.Ay["desktop-color-green-06-dark"]},suggested:{"light-background":r.Ay["desktop-color-green-06-light"],"light-border":`1px solid ${r.Ay["desktop-color-green-07-light"]}`,"dark-background":r.Ay["desktop-color-green-06-dark"],"dark-border":`1px solid ${r.Ay["desktop-color-green-07-dark"]}`},enable:{"light-background":r.Ay["desktop-color-neutral-03-light"],"dark-background":r.Ay["desktop-color-neutral-03-dark"],"light-border":`1px solid ${r.Ay["desktop-color-neutral-06-light"]}`,"dark-border":`1px solid ${r.Ay["desktop-color-neutral-06-dark"]}`},dfs:{"light-border":`1px solid ${r.Ay["desktop-color-neutral-06-light"]}`,"light-background":l(r.Ay["desktop-color-neutral-03-light"],r.Ay["desktop-color-neutral-00-light"]),"dark-border":`1px solid ${r.Ay["desktop-color-neutral-06-dark"]}`,"dark-background":l("#333539","#282B2F")},dfsLegend:{"light-border":`1px solid ${r.Ay["desktop-color-neutral-06-light"]}`,"light-background":o(r.Ay["desktop-color-neutral-03-light"],r.Ay["desktop-color-neutral-00-light"]),"dark-border":`1px solid ${r.Ay["desktop-color-neutral-06-dark"]}`,"dark-background":o("#333539","#282B2F")},dfsInUse:{"light-background":l(r.Ay["desktop-color-neutral-05-light"],r.Ay["desktop-color-green-06-light"]),"dark-background":l(r.Ay["desktop-color-neutral-05-dark"],r.Ay["desktop-color-green-06-dark"])},blockedForOutdoor:{"light-background":a(r.Ay["desktop-color-neutral-03-light"],"transparent"),"dark-background":a(r.Ay["desktop-color-neutral-03-dark"],"transparent"),"light-border":`1px solid ${r.Ay["desktop-color-neutral-06-light"]}`,"dark-border":`1px solid ${r.Ay["desktop-color-neutral-06-dark"]}`},blockedForOutdoorInUse:{"light-background":a(r.Ay["desktop-color-neutral-05-light"],r.Ay["desktop-color-green-06-light"]),"dark-background":a(r.Ay["desktop-color-neutral-05-dark"],r.Ay["desktop-color-green-06-dark"])},notAvailable:{"light-background":r.Ay["desktop-color-orange-03-light"],"dark-background":r.Ay["desktop-color-orange-01-dark"],"light-border":`1px solid ${r.Ay["desktop-color-orange-04-light"]}`,"dark-border":`1px solid ${r.Ay["desktop-color-orange-02-dark"]}`},utilization:{"light-background":r.Ay["desktop-color-orange-05-light"],"dark-background":r.Ay["desktop-color-orange-05-dark"]},selected:{"light-border":`1px solid ${r.Ay["desktop-color-ublue-06-light"]}`,"dark-border":`1px solid ${r.Ay["desktop-color-ublue-06-dark"]}`},blacklisted:{"light-background":r.Ay["desktop-color-red-02-light"],"dark-background":r.Ay["desktop-color-red-02-dark"],"light-border":`1px solid ${r.Ay["desktop-color-red-01-light"]}`,"dark-border":`1px solid ${r.Ay["desktop-color-red-01-dark"]}`},blacklistedDfs:{"light-background":l(r.Ay["desktop-color-red-03-light"],r.Ay["desktop-color-red-02-light"]),"dark-background":l(r.Ay["desktop-color-red-03-dark"],r.Ay["desktop-color-red-02-dark"]),"light-border":`1px solid ${r.Ay["desktop-color-red-03-light"]}`,"dark-border":`1px solid ${r.Ay["desktop-color-red-03-dark"]}`}}},456618:(e,t,n)=>{var r;n.d(t,{d:()=>r}),function(e){e.IN_USE="inUse",e.ENABLE="enable",e.BLACKLISTED="blacklisted",e.BLACKLISTED_RIGHT="blacklistedRight",e.BLACKLISTED_LEFT="blacklistedLeft"}(r||(r={}))},255544:(e,t,n)=>{n.d(t,{D:()=>s,W:()=>i});var r=n(801081),l=n(250791),o=n(532419),a=n(780811),c=n(170459),d=n(359719);const i=(0,r.Mz)(o.ID,e=>{const t={};for(let n=0;n<e.length;n+=1){const r=e[n];if(!(0,a.r$)(r))for(let e=0;e<(r.radio_table?.length||0);e+=1){const n=r.radio_table[e],l=r.radio_table_stats?.find(({name:e})=>e===n.name);if(l){const e=`${n.radio}-${n.ht}`;t[e]||(t[e]=[]),t[e].push(l.channel)}}}return t}),s=(0,r.Mz)(o.ID,e=>{const t={};for(let n=0;n<e.length;n+=1){const r=e[n];if(!(0,a.r$)(r))for(let e=0;e<(r.radio_table?.length||0);e+=1){const n=r.radio_table[e],l=r.radio_table_stats?.find(({name:e})=>e===n.name);if(l){const e=(0,c.Lm)(r.radio_table_stats,n),o=`${n.radio}-${n.ht}-${l.channel}`;t[o]||(t[o]=[]),t[o].push({channelWidth:n.ht,channel:l.channel,client:l.num_sta,interference:e?.interference,txRetry:e?.selfTx,utilization:e?.total})}}}return Object.keys(t).reduce((e,n)=>{const r=t[n],o=t[n].length;return e[n]={client:(0,l.A)(r.map(e=>e.client)),interference:(0,d.rc)((0,l.A)(r.map(e=>e.interference))/o),txRetry:(0,d.rc)((0,l.A)(r.map(e=>e.txRetry))/o),utilization:(0,d.rc)((0,l.A)(r.map(e=>e.utilization))/o),ap:o},e},{})})},601628:(e,t,n)=>{n.d(t,{RC:()=>d,gO:()=>c,xd:()=>r});var r,l=n(296540),o=n(469733),a=n(67097);!function(e){e.NORMAL="normal",e.OPTIMIZING="optimizing"}(r||(r={}));const c=e=>[r.OPTIMIZING].includes(e.type),d=()=>{const[e,t]=(0,l.useState)({type:r.NORMAL}),n=(0,o.useSelector)(a.DJ);return(0,l.useEffect)(()=>{n?t({type:r.OPTIMIZING}):e.type===r.OPTIMIZING&&t({type:r.NORMAL})},[n,e.type]),{state:e}}},359719:(e,t,n)=>{n.d(t,{Oh:()=>c,JE:()=>u,o:()=>b,_5:()=>s,rc:()=>A,NT:()=>i,PA:()=>d});var r,l=n(564985);!function(e){e.UNII6="unii6",e.UNII8="unii8"}(r||(r={}));var o=n(736201),a=n(456618);const c=[r.UNII6,r.UNII8],d=(e,t,n)=>`${e}.${t}.${n}`,i=e=>`${e.radio}.${o.P}.${e.channel}`,s=e=>{const[t,n,r]=e.split(".");return{radio:t,channel_width:n,channel:r}},u=(e,t,n,r)=>{if(t===l.sx.RADIO_6E){const l=r.has(d(t,n,e[e.length-1]));if(l!==r.has(d(t,n,e[0])))return l?a.d.BLACKLISTED_RIGHT:a.d.BLACKLISTED_LEFT}return e.every(e=>r.has(d(t,n,e)))?a.d.BLACKLISTED:void 0},A=e=>Math.floor(100*e)/100,b=(e,t)=>e.find(e=>t?.includes(e))},830220:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(296540),l=n(217439),o=n(294303),a=n(298390),c=n(6510),d=n(852866),i=n(530813);const s=({devices:e,textProps:t,maxCount:n=a.w})=>r.createElement(o.A,{width:"100%",flexDirection:"column"},r.createElement(i.A,{items:e,getItemKey:e=>e.mac,renderItem:e=>r.createElement(l.A,{...t},(0,d.c)((0,c.Q)(e),33)),showListMarkers:!0,listGap:0,maxItemCount:n}))},276420:(e,t,n)=>{n.d(t,{kL:()=>f,z6:()=>C,Ay:()=>S});var r=n(296540),l=n(469733),o=n(758649),a=n(71479),c=n(271856),d=n(459449),i=n(564985),s=n(252959),u=n(217439),A=n(294303),b=n(566723),m=n(592563),g=n(421289),k=n(311785),h=n(171073),E=n(545111),p=n(736201),N=n(705145);const I=(0,a.A)(N.A)`
  ${({hoverable:e,theme:{motifPalette:{uBlue06:t}}})=>e&&`\n      &:hover {\n        color: ${t};\n      }\n  `}
`,$=({channelWidth:e,hoverable:t,isActiveChannelWidthScanning:n})=>r.createElement(I,{color:"text-3",size:"small",isTruncated:!0,hoverable:t},n?r.createElement(u.A,{color:"ublue-06"},r.createElement(d.sA,{id:"COMMON_DEVICE_STATE_RFSCANNING"})):r.createElement(r.Fragment,null,e," ",r.createElement(d.sA,{id:"COMMON_UNIT_MHZ"}))),O=(0,a.A)("div",(0,k.A)("columns","columnWidth","hideLegend"))`
  display: grid;
  grid-template-columns: ${({hideLegend:e})=>e?"":"60px"} repeat(
      ${({columns:e,columnWidth:t=20})=>`${e}, ${t}`}px
    );
  column-gap: 6px;
  row-gap: 6px;
`,_=(0,a.A)("div",(0,k.A)("rowIndex","columnIndexStart","columnIndexEnd"))`
  grid-column-start: ${({columnIndexStart:e})=>e};
  grid-column-end: ${({columnIndexEnd:e,columnIndexStart:t})=>e??t+1};
  grid-row-start: ${({rowIndex:e})=>e};
  display: flex;
  height: 16px;
`,y=({renderChannel:e,layout:t,band:n,hideLegend:o,channelsTableStyle:a})=>{const{mac:c,deviceName:i,supportedQuickScan:s,isQuickScanning:k,quickScanningChannelWidth:N,quickScanningRadio:I}=(0,r.useContext)(E.N),y=(0,l.useDispatch)(),x=Object.entries(t.channels),C=o?0:1;return r.createElement(A.A,{maxWidth:"100%",overflowX:"auto",paddingTop:b.kc,paddingBottom:b.kc,...a},r.createElement(O,{columns:t.columns+C,columnWidth:t.cellWidth,hideLegend:o},o?null:r.createElement(_,{rowIndex:1,columnIndexStart:1,columnIndexEnd:2},r.createElement(u.A,{color:"text-2",size:"small"},r.createElement(d.sA,{id:"COMMON_CHANNELS"}))),o?null:Object.entries(t.channels[p.P]||{}).map(([e,{from:t,to:n}])=>r.createElement(_,{key:e,rowIndex:1,columnIndexStart:t+C,columnIndexEnd:n+C},r.createElement(A.A,{justifyContent:"center",flex:1},r.createElement(u.A,{color:"text-3",size:"xsmall"},e)))),x.map(([t,l],a)=>{const u=t===N&&I===n&&k;return r.createElement(r.Fragment,{key:t},o?null:r.createElement(_,{rowIndex:a+1+1,columnIndexStart:1},r.createElement(A.A,{alignItems:"center",flex:1},s&&c&&n&&t&&!k?r.createElement(g.A,{description:r.createElement(d.sA,{id:"COMMON_QUICK_SCAN"}),placement:"right"},r.createElement(m.A,{variant:"emphasis",onPress:()=>y((0,h.vX)(c,n,Number(t),i))},r.createElement($,{channelWidth:Number(t),hoverable:!0}))):r.createElement($,{channelWidth:Number(t),isActiveChannelWidthScanning:u}))),Object.entries(l).map(([n,{from:l,to:o,row:c,custom:d}])=>r.createElement(_,{key:n,rowIndex:(c??a+1)+1,columnIndexStart:l+C,columnIndexEnd:o+C,className:u?p.S:void 0},e({channel:Number(n),channelWidth:Number(t),...d?{custom:d}:{}}))))})))},x=({maxFrequency:e,minFrequency:t,title:n,children:l,hideLegend:o})=>r.createElement(A.A,{flexDirection:"column",maxWidth:"100%"},o?null:r.createElement(A.A,{flexDirection:"row",gap:b.YC,alignItems:"baseline"},r.createElement(A.A,{minWidth:60},r.createElement(u.A,{size:"small",color:"text-2"},n)),r.createElement(u.A,{size:"small",color:"text-3"},r.createElement(d.sA,{id:"COMMON_MHZ_INTERVAL",values:{min:t,max:e}}))),r.createElement(A.A,null,l));var C,L=n(368116);!function(e){e[e.NA=0]="NA",e[e.NG=1]="NG",e[e.LOWER_6E=2]="LOWER_6E",e[e.UPPER_6E=3]="UPPER_6E",e[e.FULL_6E=4]="FULL_6E"}(C||(C={}));const f={[C.NG]:{label:"COMMON_RADIO_BAND_NG",minFrequency:2412,maxFrequency:2484,getLayout:L.ir,band:i.sx.RADIO_NG},[C.NA]:{label:"COMMON_RADIO_BAND_NA",minFrequency:5180,maxFrequency:5885,getLayout:L.Ko,band:i.sx.RADIO_NA},[C.LOWER_6E]:{label:"COMMON_RADIO_BAND_6E",minFrequency:5935,maxFrequency:6515,getLayout:L.Dd,band:i.sx.RADIO_6E},[C.UPPER_6E]:{label:"COMMON_RADIO_BAND_6E",minFrequency:6535,maxFrequency:7115,getLayout:L.a0,band:i.sx.RADIO_6E},[C.FULL_6E]:{label:"COMMON_RADIO_BAND_6E",minFrequency:5935,maxFrequency:7115,getLayout:L.WE,band:i.sx.RADIO_6E}},T=(0,a.A)(o.A)`
  width: 16px;
  height: 16px;
  padding: 0;
`,S=({sectionId:e,renderChannel:t,channelWidths:n,hideLegend:o,channelsTableStyle:a})=>{const{band:u,getLayout:A,maxFrequency:b,minFrequency:m,label:g}=f[e],k=(0,l.useSelector)(s.H),[h,E]=(0,r.useState)(!0),p=(0,r.useMemo)(()=>r.createElement(c.A,{description:h?r.createElement(d.sA,{id:"SETTINGS_WIFI_CHANNELIZATION_COLLAPSE_CHANNELS"}):r.createElement(d.sA,{id:"SETTINGS_WIFI_CHANNELIZATION_EXPAND_CHANNELS"}),portal:!0},r.createElement(T,{type:"button",onClick:()=>E(!h)},h?"-":"+")),[h]),N=(0,r.useMemo)(()=>{const e=u===i.sx.RADIO_NG?(0,L.ir)(k,h,p):A(k);return n?{...e,channels:Object.fromEntries(Object.entries(e.channels).reduce((e,[t,r])=>(n?.includes(Number(t))&&e.push([t,r]),e),[]))}:e},[n,u,k,p,A,h]);return N&&Object.keys(N.channels||{}).length?r.createElement(x,{title:r.createElement(d.sA,{id:g}),minFrequency:m,maxFrequency:b,hideLegend:o},r.createElement(y,{layout:N,renderChannel:t,band:u,hideLegend:o,channelsTableStyle:a})):null}},736201:(e,t,n)=>{n.d(t,{P:()=>l,S:()=>o});var r=n(132196);const l=20,o=r.AH`
  animation: ${r.i7`
    from {
      opacity: 1;
    }
    to {
      opacity: 0.4;
    }
`} 0.5s forwards;
`},368116:(e,t,n)=>{n.d(t,{WE:()=>k,Dd:()=>h,a0:()=>E,Ko:()=>g,ir:()=>b});var r=n(59116),l=n(141470),o=n(564985),a=n(439173),c=n(736201);const d=(e,t)=>{const n=a.R[e],r=n[20],l=Object.keys(r).map(e=>+e).sort((e,t)=>(r[e]?.centerFrequency||0)-(r[t]?.centerFrequency||0)),o=((e,t)=>{const n=[];return Object.keys(e).filter(e=>e.startsWith(`channels_${t}`)).forEach(t=>{const r=t.split("_")[2];e[t].length>0&&(void 0===r||!Number.isNaN(+r))&&(n.push(void 0===r?c.P:+r),n.sort((e,t)=>e-t))}),n})(t,e),d=l.length+1,i=o.length;return o.reduce((e,t,r)=>Object.entries(n[t]).reduce((e,[n,{subChannels:o}])=>{const a=r+1,c=l.indexOf(o[0])+1,d=l.indexOf(o[o.length-1])+1+1;return e.channels[t]={...e.channels[t]||{},[n]:{row:a,from:c,to:d}},e},e),{columns:d,rows:i,cellWidth:16,channels:{}})},i=e=>{const t=d(o.sx.RADIO_6E,e),n=t.channels[320]?Object.entries(t.channels[320]).reduce((e,[t,n],r)=>(e[t]={...n,row:n.row+(r%2==1?1:0)},e),t.channels[320]):{};return{...t,...n,rows:t.rows+1}},s=(e,t)=>{switch(e){case 20:return Number(t)<=125;case 40:return Number(t)<=123;case 80:return Number(t)<=119;case 160:return Number(t)<=111;case 320:return Number(t)<=127;default:return!0}},u=e=>{const t=Object.values(e.channels).flatMap(e=>Object.values(e).flatMap(({to:e,from:t})=>[e,t])),n=Math.min(...t),l=Math.max(...t);return{...e,columns:l-n+1,channels:(0,r.A)(e.channels,e=>(0,r.A)(e,({from:e,to:t,...r})=>({from:e-n+1,to:t-n+1,...r})))}},A=(e,t,n)=>Object.keys(a.R[o.sx.RADIO_NG][e]).reduce((e,r,l)=>{const o=t*l+1;return e[r]={from:o,to:o+t,row:n},e},{}),b=(e,t,n)=>t?{columns:2*Object.keys(a.R[o.sx.RADIO_NG][20]).length+1,rows:2,cellWidth:5,channels:{20:{...A(20,2,1),14:{custom:n,from:27,to:29,row:1}},40:A(40,3,2)}}:{columns:6,rows:2,cellWidth:5,channels:{20:{1:{from:1,to:3,row:1},6:{from:3,to:5,row:1},11:{from:5,to:7,row:1},12:{custom:n,from:7,to:9,row:1}},40:{3:{from:1,to:4,row:2},11:{from:4,to:7,row:2}}}},m=[169,173,177,167,175,171,163],g=e=>{const t=d(o.sx.RADIO_NA,e);return u({...t,channels:(0,r.A)(t.channels,e=>(0,l.A)(e,(e,t)=>!m.includes(Number(t))))})},k=e=>u(i(e)),h=e=>{const t=i(e),n=(0,r.A)(t.channels,(e,t)=>(0,l.A)(e,(e,n)=>s(Number(t),Number(n))));return u({...t,channels:n})},E=e=>{const t=i(e),n=(0,r.A)(t.channels,(e,t)=>(0,l.A)(e,(e,n)=>!s(Number(t),Number(n))));return u({...t,channels:n})}},302737:(e,t,n)=>{n.d(t,{A:()=>m});var r=n(296540),l=n(592563),o=n(217439),a=n(469733),c=n(459449),d=n(137625),i=n(511690),s=n(457311),u=n(592510),A=n(582724),b=n(358980);const m=({onRestore:e})=>{const t=(0,a.useDispatch)(),n=(0,a.useSelector)(i.U),m=(0,r.useCallback)(()=>{t((0,s.Iz)(n)),e&&e(n)},[t,n]),[g,k]=(0,r.useState)(!1);return(0,A.A)([(0,b.y)(void 0,{crudCacheStrategy:{type:u.e.CACHE}})],r.createElement(d.A,{title:"COMMON_RESTORE_TO_DEFAULTS",message:"SETTINGS_WIFI_CHANNELIZATION_DEFAULT_CONFIRMATION",buttonMessage:"COMMON_ACTION_RESET",buttonVariant:"danger",handleClose:()=>k(!1),handleConfirm:m,isOpen:g},r.createElement(l.A,{type:"button",onPress:()=>k(!0)},r.createElement(o.E,{color:"inherit",size:"medium"},r.createElement(c.sA,{id:"COMMON_RESTORE_TO_DEFAULTS"})))))}}}]);