"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[6988],{224948(e,t,n){n.d(t,{A:()=>m});var r=n(296540),o=n(217439),l=n(71479),a=n(566723),i=n(294303),s=n(689965);const c=(0,l.A)("div")`
  margin-right: ${a.kc};
`,d=(0,l.A)("div")`
  margin-left: ${a.kc};
`,m=({icon:e,closeIcon:t,nested:n,children:l,...a})=>r.createElement(s.A,{nested:n,...a},r.createElement(i.A,null,r.createElement(c,null,e),r.createElement(o.A,{size:"medium"},l),t?r.createElement(d,null,t):null))},401479(e,t,n){n.d(t,{A:()=>c});var r=n(296540),o=n(822336),l=n(71479),a=n(294303),i=n(311785);const s=(0,l.A)(a.A,(0,i.A)("color","dimension"))`
  width: ${({dimension:e})=>e}px;
  height: ${({dimension:e})=>e}px;
  border-radius: 50%;
  background-color: ${({color:e})=>e};
  border: ${({theme:{themeName:e}})=>o.Ay[`desktop-border-divider-${e}`]};
`,c=({color:e,dimension:t=16})=>r.createElement(s,{color:e,dimension:t})},551753(e,t,n){n.d(t,{A:()=>_});var r=n(822336),o=n(296540),l=n(758649),a=n(217439),i=n(162420),s=n(823858),c=n(793336),d=n(382389),m=n(46119),E=n(916537),h=n(224948),u=n(294303);const _=(0,o.memo)(({children:e,customIcon:t,link:n,nested:_,extra:p,variant:A="warning",...g})=>{const{themeName:b}=(0,d.u)(),k=(0,o.useMemo)(()=>{switch(A){case"warning":return o.createElement(s.A,{size:"original",color:r.Ay[`desktop-color-orange-06-${b}`],variant:"fill"});case"info":return o.createElement(i.A,{isActive:!0,size:"original",variant:"fill"});case"custom":return t;default:return o.createElement(c.A,{size:"medium",color:r.Ay[`desktop-color-red-06-${b}`],variant:"fill"})}},[A,b,t]),f=(0,o.useCallback)(()=>{m.A.open(n)},[n]);return o.createElement(h.A,{icon:k,nested:_,...g},o.createElement(u.A,{flexDirection:"column",alignItems:"flex-start"},o.createElement(a.A,null,e),o.createElement(a.A,null,n?o.createElement(l.A,{type:"button",variant:"inline",onClick:f},o.createElement(E.sA,{id:"COMMON_LEARN_MORE"})):null),p))})},129712(e,t,n){n.d(t,{A:()=>v,H:()=>k});var r=n(82960),o=n(469733),l=n(296540),a=n(951272),i=n(870443),s=n(566723),c=n(855019),d=n(62227),m=n(294303),E=n(845030),h=n(302167),u=n(366188),_=n(780811),p=n(239417),A=n(785146),g=n(31208),b=n(726317);const k="network",f=(0,a.bk)({enableReinitialize:!0,isInitialValid:!0,mapPropsToValues:({activeItem:{config_network:e,ip:t,switch_vlan_enabled:n,mgmt_network_id:r,connection_network_id:o},nativeNetworks:l})=>{const a=(0,_.U$e)(l,o);return{config_network:{type:e?.type||c.NL.DHCP,ip:e?.ip||t||"",netmask:e?.netmask||a?.netmask||"",gateway:e?.gateway||a?.ip||"",dns1:e?.dns1||a?.dns1||"",dns2:e?.dns2||a?.dns2||"",dnssuffix:e?.dnssuffix||"",bonding_enabled:e?.bonding_enabled||!1},mgmt_network_id:(0,_.ewD)(l,r),switch_vlan_enabled:n||!1}},handleSubmit:(e,{resetForm:t})=>{t({values:e})},validationSchema:({honeypotNetworksIps:e,combinedClients:t})=>i.A.object().shape({config_network:(0,d.d)(e,t),mgmt_network_id:i.A.string(),lte_limit_enabled:i.A.boolean().label("COMMON_LTE_DATA_LIMIT"),lte_limit:i.A.number().integer().label("COMMON_DATA_LIMIT").when("lte_limit_enabled",{is:!0,then:i.A.number().min(1).required().label("COMMON_DATA_LIMIT")})})}),v=(0,r.Zz)((0,o.connect)(e=>({nativeNetworks:(0,u.Tn)(e),honeypotNetworksIps:(0,h.Yk)(e),combinedClients:(0,p.GB)(e)})),f)(({setFormDirty:e,setFormInvalid:t,dirty:n,values:r,resetForm:a,isValid:i,initialValues:d,nativeNetworks:h=[],activeItem:u})=>{const _=(0,o.useDispatch)();return(0,l.useEffect)(()=>{e(k,n),t(k,!i)},[e,t,n,i]),(0,l.useEffect)(()=>(_((0,E.uo)({[k]:()=>({config_network:r.config_network.type===c.NL.STATIC?r.config_network:{type:c.NL.DHCP,bonding_enabled:r.config_network.bonding_enabled},mgmt_network_id:r.mgmt_network_id})})),_((0,E.Oo)({[k]:()=>a({values:r})})),_((0,E.rW)({[k]:a})),()=>{_((0,E.uo)({[k]:null})),_((0,E.Oo)({[k]:null})),_((0,E.rW)({[k]:null}))}),[_,a,r,u.port_overrides,d.switch_vlan_enabled]),l.createElement(m.A,{gap:s.S2,flexDirection:"column"},h.length>1?l.createElement(A.A,{nativeNetworks:h,activeItemMac:u.mac}):null,l.createElement(b.A,null),r.config_network.type===c.NL.STATIC?l.createElement(g.A,null):null)})},531935(e,t,n){n.d(t,{t:()=>X,A:()=>le});var r=n(82960),o=n(469733),l=n(296540),a=n(951272),i=n(271856),s=n(217439),c=n(802),d=n(314714),m=n(758649),E=n(162420),h=n(71479),u=n(939703),_=n(860631),p=n(454195),A=n(566723),g=n(766624),b=n(143811),k=n(294303),f=n(916537),v=n(768195);const w=()=>l.createElement(k.A,{flexDirection:"column"},l.createElement(k.A,{height:A.Er,alignItems:"center",gap:A.YC},l.createElement(s.A,{color:"text-3",size:"small"},l.createElement(f.sA,{id:"COMMON_MODE"})),l.createElement(g.A,{description:l.createElement(f.sA,{id:"DEVICE_PROPERTIES_LABEL_COMBO_MODE_DESC"})})),l.createElement(k.A,{height:p.b,alignItems:"center",gap:A.Ln},l.createElement(b.A,{name:"led_mode",type:"radio",value:v.QV.ETHERLIGHTING},l.createElement(f.sA,{id:"COMMON_ETHERLIGHTING"})),l.createElement(b.A,{name:"led_mode",type:"radio",value:v.QV.STANDARD},l.createElement(f.sA,{id:"COMMON_STANDARD"}))));var S=n(551753),C=n(845030),O=n(854726),D=n(936621),T=n(962669),I=n(822336),x=n(705145),M=n(718814),N=n(879002),y=n(401479),L=n(311785);const R="ffffff",P="ff0505",$=(0,h.A)("div")`
  position: relative;
`,G=(0,h.A)(k.A,(0,L.A)("color"))`
  border: ${({theme:{themeName:e}})=>I.Ay[`desktop-border-divider-${e}`]};
  border-radius: ${I.Ay["desktop-radius-base"]};
  cursor: pointer;
`,F=({color:e,label:t})=>l.createElement(G,{width:164,height:32,gap:A.kc,padding:`0 ${A.kc}`,alignItems:"center",color:e},l.createElement(y.A,{color:`${e.startsWith("#")?"":"#"}${e}`}),l.createElement(x.A,{size:"medium",isTruncated:!0},t)),H=(0,h.A)("div",(0,L.A)("popoverOpen","horizontalOffset","isWhiteSelected"))`
  position: absolute;
  left: 178px;
  top: 42px;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background-color: ${`#${R}`};
  border: 1px solid
    ${({theme:{themeName:e},isWhiteSelected:t})=>t?I.Ay[`desktop-color-ublue-06-${e}`]:I.Ay[`desktop-color-neutral-03-${e}`]};
  z-index: ${({theme:e})=>e.zIndex["z-index-popover"]+1};
  cursor: pointer;
  display: ${({popoverOpen:e})=>e?"block":" none"};
  transform: ${({horizontalOffset:e})=>`translateX(${e}px)`};
  transition: display 1s;
`,V=({label:e,color:t,rootSelectorId:n,onChange:r,horizontalOffset:o=0})=>{const a=(0,l.useRef)(null),[i,s]=(0,l.useState)(!1),c=(0,l.useMemo)(()=>t.toLocaleLowerCase()===R,[t]);(0,N.A)(a,()=>{s(!1)});const d=(0,l.useCallback)(e=>{r(e.toString()||P)},[r]),m=(0,l.useCallback)(()=>{s(!1),r(R)},[r]),E=c?P:t;return l.createElement($,{id:n,ref:a},l.createElement(M.A,{value:E.startsWith("#")?E:`#${E}`,onChange:d,colorSpace:"hex",sliders:[{id:"hue",channel:"hue"}]},l.createElement("span",null,l.createElement(F,{label:e,color:t}))),l.createElement(H,{popoverOpen:i,horizontalOffset:o,isWhiteSelected:c,onClick:m}))};var z=n(823881),Q=n(768941),Z=n(356927);const W=10,B={[String(Z.A[Q.n5.PORTSPEED_HALF_100].speed)]:z.Ms.FE,[String(Z.A[Q.n5.PORTSPEED_FULL_100].speed)]:z.Ms.FE,[String(Z.A[Q.n5.PORTSPEED_HALF_1000].speed)]:z.Ms.GbE,[String(Z.A[Q.n5.PORTSPEED_FULL_1000].speed)]:z.Ms.GbE,[String(Z.A[Q.n5.PORTSPEED_FULL_2P5G].speed)]:z.Ms["2.5GbE"],[String(Z.A[Q.n5.PORTSPEED_FULL_5G].speed)]:z.Ms["5GbE"],[String(Z.A[Q.n5.PORTSPEED_FULL_10G].speed)]:z.Ms["10GbE"],[String(Z.A[Q.n5.PORTSPEED_FULL_25G].speed)]:z.Ms["25GbE"],[String(Z.A[Q.n5.PORTSPEED_FULL_40G].speed)]:z.Ms["40GbE"],[String(Z.A[Q.n5.PORTSPEED_FULL_50G].speed)]:z.Ms["50GbE"],[String(Z.A[Q.n5.PORTSPEED_FULL_100G].speed)]:z.Ms["100GbE"]},U={[z.Ms.FE]:1,[z.Ms.GbE]:2,[z.Ms["2.5GbE"]]:3,[z.Ms["5GbE"]]:4,[z.Ms["10GbE"]]:5,[z.Ms["25GbE"]]:6,[z.Ms["40GbE"]]:7,[z.Ms["100GbE"]]:8},K=({colors:e,portSpeeds:t,onChangeColor:n})=>{const r=(0,l.useMemo)(()=>t.map(e=>B[e]).filter(e=>Boolean(e)),[t]),o=(0,l.useMemo)(()=>e.filter(({key:e})=>r.includes(e)).sort((e,t)=>U[e.key]-U[t.key]),[e,r]),a=(0,l.useCallback)(e=>t=>{n(e,t)},[n]),i=(0,l.useMemo)(()=>o.map(({key:e,raw_color_hex:t},n)=>l.createElement(V,{key:e,label:e,color:t,onChange:a(e),rootSelectorId:`etherlighting-speed-${n}`,horizontalOffset:n%2==0?0:-30})),[o,a]);return l.createElement(k.A,{gap:A.kc,flexWrap:"wrap"},i)};var j=n(878237),Y=n(366188);const q=({colors:e,onChangeColor:t,isEmptyVlanTagged:n})=>{const{formatMessage:r}=(0,f.tz)(),[a,i]=(0,l.useState)(0),c=(0,o.useSelector)(Y.Tn),d=(0,l.useMemo)(()=>c.reduce((e,{_id:t,name:n,vlan:r})=>({...e,[t]:{name:n,vlan:r||1}}),{}),[c]),m=(0,l.useMemo)(()=>e.filter(({key:e})=>d[e]?.name||n&&"none"===e).sort((e,t)=>(d[e.key]?.vlan||1e4)-(d[t.key]?.vlan||1e4)),[e,n,d]),E=(0,l.useCallback)(e=>n=>{t(e,n)},[t]),h=(0,l.useMemo)(()=>m.slice(a*W,(a+1)*W).map(({key:e,raw_color_hex:t},n)=>l.createElement(V,{key:e,label:d[e]?.name||r({id:"COMMON_NONE"}),color:t,onChange:E(e),rootSelectorId:`etherlighting-network-${n}`,horizontalOffset:n%2==0?0:-30})),[m,d,r,a,E]),u=(0,l.useCallback)(()=>{i(a-1)},[a]),_=(0,l.useCallback)(()=>{i(a+1)},[a]);return l.createElement(l.Fragment,null,l.createElement(k.A,{gap:A.kc,flexWrap:"wrap"},h),m.length>W?l.createElement(k.A,{gap:A.xO,alignItems:"center"},l.createElement(s.A,{color:"text-3"},l.createElement(f.sA,{id:"PAGINATION_FROM_TO",values:{from:a*W+1,to:Math.min((a+1)*W,m.length),total:m.length,section:l.createElement(f.sA,{id:"COMMON_NETWORKS"})}})),l.createElement(k.A,null,l.createElement(s.A,{color:"text-2"},l.createElement(j.A,{disabled:0===a,onClick:u})),l.createElement(s.A,{color:"text-2"},l.createElement(j.A,{disabled:(a+1)*W>=m.length,onClick:_,rotate:!0})))):null)},X="etherlighting",J=(0,h.A)(i.A)`
  bottom: 2px;
`,ee=e=>l.createElement(s.A,{color:"text-1"},e,"%"),te=e=>{const{mode:t,network:n,speed:r,brightness:o,behavior:l,led_mode:a}=e;return{led_mode:a,mode:t,brightness:o,behavior:l,...t===v.QZ.SPEED?{speed:r}:{},...t===v.QZ.NETWORK?{network:n}:{}}},ne=(e,t)=>e.length===t.length&&e.every(e=>{const n=t.find(t=>t.key===e.key);return e.raw_color_hex===n?.raw_color_hex}),re=(e=[],t=[])=>[...e,...t].reduce((e,t)=>(e.some(e=>e.key===t.key)||e.push(t),e),[]),oe=(0,a.bk)({enableReinitialize:!0,mapPropsToValues:({activeItem:{ether_lighting:e={mode:v.QZ.SPEED,brightness:100,behavior:v.VC.BREATH}},etherlightingSettings:{network_overrides:t,network_defaults:n,speed_defaults:r,speed_overrides:o}={network_overrides:[],network_defaults:[],speed_defaults:[],speed_overrides:[]}})=>({led_mode:e.led_mode||v.QV.ETHERLIGHTING,brightness:e.brightness||100,behavior:e.behavior||v.VC.BREATH,mode:e.mode||v.QZ.SPEED,network:re(t,n),speed:re(o,r)}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}}),le=(0,r.Zz)(oe)(({setFieldValue:e,setFormDirty:t,values:n,resetForm:r,activeItem:a,etherlightingSettings:i={}})=>{const h=(0,o.useDispatch)(),g=(0,l.useRef)(n),I=(0,o.useSelector)(O.wD),x=(M=a.port_table,N=a.port_overrides,y=I,Boolean(M?.some(e=>{const t=e.portconf_id&&y?.find(t=>t._id===e.portconf_id),n=N?.find(t=>t.port_idx===e.port_idx);let r=e.native_networkconf_id;return t?r=t.native_networkconf_id:n&&(r=n.native_networkconf_id),r===D.F})));var M,N,y;const L=(0,l.useMemo)(()=>(0,_.Nr)({switch_caps:a.switch_caps}),[a.switch_caps]),R=(0,l.useCallback)((t,r)=>{e(`${n.mode}.[${(n.mode in n&&n[n.mode]||[]).findIndex(e=>e.key===t)}].raw_color_hex`,(0,u.E6)(r).replace("#",""))},[e,n]),P=(0,l.useCallback)(()=>{e(n.mode,n.mode===v.QZ.SPEED?i.speed_defaults:i.network_defaults)},[e,n.mode,i.speed_defaults,i.network_defaults]),$=(0,l.useCallback)(({target:{checked:t}})=>{e("behavior",t?v.VC.BREATH:v.VC.STEADY)},[e]),G=(0,l.useMemo)(()=>n.mode===v.QZ.SPEED?i.speed_defaults?.some(e=>n.speed?.some(t=>t.key===e.key&&t.raw_color_hex!==e.raw_color_hex)):i.network_defaults?.some(e=>n.network?.some(t=>t.key===e.key&&t.raw_color_hex!==e.raw_color_hex)),[i.network_defaults,i.speed_defaults,n.speed,n.network,n.mode]),F=(0,l.useMemo)(()=>te(n),[n]),H=(0,l.useMemo)(()=>{const{current:e}=g;return n.mode!==e.mode||!ne(n[n.mode]||[],e[n.mode]||[])},[n]);(0,l.useEffect)(()=>{const{current:e}=g;var n,r;e&&t(X,!((n=te(e)).mode===(r=F).mode&&n.brightness===r.brightness&&n.behavior===r.behavior&&n.led_mode===r.led_mode&&(n[v.QZ.NETWORK]?ne(n[v.QZ.NETWORK]||[],r[v.QZ.NETWORK]||[]):!n[v.QZ.SPEED]||ne(n[v.QZ.SPEED]||[],r[v.QZ.SPEED]||[]))))},[t,F]),(0,l.useEffect)(()=>{const e={...g.current,...F};return h((0,C.uo)({[X]:()=>({ether_lighting:e})})),h((0,C.Oo)({[X]:()=>{g.current=e,r({values:e}),t(X,!1)}})),h((0,C.rW)({[X]:r})),()=>{h((0,C.uo)({[X]:null})),h((0,C.Oo)({[X]:null})),h((0,C.rW)({[X]:null}))}},[h,r,t,F,n]);const V=(0,l.useCallback)(({target:{value:t}})=>{e("brightness",+t)},[e]);return l.createElement(k.A,{flexDirection:"column",gap:A.Ln},L?l.createElement(w,null):null,n.led_mode===v.QV.ETHERLIGHTING?l.createElement(l.Fragment,null,l.createElement(k.A,{height:p.b,alignItems:"center",gap:A.Ln},l.createElement(b.A,{name:"mode",type:"radio",value:v.QZ.SPEED},l.createElement(f.sA,{id:"COMMON_SPEED"})),l.createElement(b.A,{name:"mode",type:"radio",value:v.QZ.NETWORK},l.createElement(f.sA,{id:"COMMON_NETWORK"}))),l.createElement(k.A,{flexDirection:"column",gap:A.kc},l.createElement(k.A,{width:"100%",height:20,justifyContent:"space-between",alignItems:"center"},l.createElement(s.A,{color:"text-3"},l.createElement(f.sA,{id:"COMMON_COLORS"})),G?l.createElement(m.A,{type:"button",variant:"inline",size:"medium",onClick:P},l.createElement(f.sA,{id:"COMMON_ACTION_RESET"})):null),n.mode===v.QZ.SPEED&&(n[v.QZ.SPEED]||[]).length>0?l.createElement(K,{colors:n[v.QZ.SPEED]||[],portSpeeds:(0,T.MB)(a),onChangeColor:R}):null,n.mode===v.QZ.NETWORK&&(n[v.QZ.NETWORK]||[]).length>0?l.createElement(q,{colors:n[v.QZ.NETWORK]||[],onChangeColor:R,isEmptyVlanTagged:x}):null),l.createElement(k.A,{flexDirection:"column",gap:A.kc},l.createElement(s.A,{color:"text-3"},l.createElement(f.sA,{id:"COMMON_BRIGHTNESS"})),l.createElement(c.A,{value:n.brightness,withValueIndicator:!0,min:1,valueIndicatorPosition:"right",formatValueIndicatorContent:ee,onChange:V})),l.createElement(d.A,{id:"breathingMode",checked:n.behavior===v.VC.BREATH,onChange:$},l.createElement(k.A,{alignItems:"center",gap:A.YC},l.createElement(f.sA,{id:"DEVICE_PROPERTIES_LABEL_BREATHING_MODE"}),l.createElement(J,{portal:!0,description:l.createElement(f.sA,{id:"DEVICE_PROPERTIES_LABEL_BREATHING_MODE_DESC"})},l.createElement(E.A,{size:"original",isActive:!0})))),H?l.createElement(S.A,{variant:"info",nested:!0,padding:A.kc},l.createElement(f.sA,{id:"DEVICE_ETHERLIGHTING_CHANGE_WARNING"})):null):null)})},947045(e,t,n){n.d(t,{A:()=>d,m:()=>c});var r=n(296540),o=n(860631),l=n(941555),a=n(294303),i=n(956619),s=n(279675);const c="manage",d=({activeItem:e,setFormDirty:t,setFormInvalid:n})=>r.createElement(a.A,{flexDirection:"column"},(0,o.j0)(e)?r.createElement(s.A,{activeItem:e,setFormDirty:t,setFormInvalid:n}):r.createElement(l.Ay,{activeItem:e,setFormDirty:t}),r.createElement(i.A,{activeItem:e,hideSnmp:!0}))},878237(e,t,n){n.d(t,{A:()=>h});var r,o=n(296540),l=n(758649),a=n(71479),i=n(825032);!function(e){e.DEFAULT="default",e.HOVER="hover",e.DISABLED="disabled",e.ACTIVE="active"}(r||(r={}));const s={[r.DEFAULT]:{[i.S.LIGHT]:"#d6d9e2",[i.S.DARK]:"#3f3f3f"},[r.HOVER]:{[i.S.LIGHT]:"#7e8190",[i.S.DARK]:"#9d9d9d"},[r.DISABLED]:{[i.S.LIGHT]:"#eeeff3",[i.S.DARK]:"#1e1e1e"},[r.ACTIVE]:{[i.S.LIGHT]:"#a4a7b5",[i.S.DARK]:"#2f2f2f"}},c=(e,t)=>s[t][e],d=(e,t)=>`1px 0px 0px 0px ${c(e,t)}`;var m=n(311785);const E=(0,a.A)(l.A,(0,m.A)("rotate"))`
  margin: 0;
  padding: 0;
  width: 26px;
  height: 24px;
  color: inherit;
  background-color: transparent;
  box-sizing: border-box;
  border-radius: 4px 0 0 4px;
  border-right: 0;
  border-color: transparent;
  border-color: ${({theme:{themeName:e}})=>`${c(e,r.DEFAULT)}`};
  box-shadow: ${({theme:{themeName:e}})=>`${d(e,r.DEFAULT)}`};
  ${({rotate:e=!1})=>e?"\n    transform: rotate(-180deg);\n  ":"\n  position: relative; \n  left: -1px;\n  margin-left: 1px;\n    "}
  > span {
    display: flex;
    align-items: center;
    justify-content: center;
    > div {
      display: flex;
    }
  }
  &:disabled {
    z-index: 0;
    box-shadow: ${({theme:{themeName:e}})=>`${d(e,r.DISABLED)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${c(e,r.DISABLED)} !important`};
  }
  &:hover {
    z-index: 1;
    box-shadow: ${({theme:{themeName:e}})=>`${d(e,r.HOVER)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${c(e,r.HOVER)} !important`};
    border-right: 0;
    background-color: transparent !important;
  }
  &:active {
    box-shadow: ${({theme:{themeName:e}})=>`${d(e,r.ACTIVE)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${c(e,r.ACTIVE)} !important`};
  }
`,h=({disabled:e,onClick:t,rotate:n})=>o.createElement(E,{variant:"secondary",rotate:n,disabled:e,onClick:t,type:"button"},o.createElement("svg",{width:"4",height:"8",viewBox:"0 0 4 8",fill:"none"},o.createElement("path",{d:"M3.75026 0.999386C3.75026 1.11739 3.70826 1.23639 3.62426 1.33138L1.25026 3.99939L1.27026 4.02039L3.62326 6.66739C3.80726 6.87339 3.78826 7.18939 3.58226 7.37339C3.37626 7.55739 3.06026 7.53839 2.87626 7.33239L0.530256 4.69439C0.156256 4.30739 0.156256 3.69139 0.530256 3.30439L2.87526 0.667385C3.05826 0.461386 3.37526 0.442385 3.58126 0.626385C3.69326 0.724385 3.75026 0.861386 3.75026 0.999386Z",fill:"#A4A7B5"})))},879002(e,t,n){n.d(t,{A:()=>o});var r=n(296540);const o=(e,t,n=[])=>{const o=(0,r.useCallback)(({target:n})=>{e?.current&&n!==e.current&&!e.current.contains(n)&&t()},[t,e?.current]);(0,r.useEffect)(()=>(document.addEventListener("click",o),()=>{document.removeEventListener("click",o)}),[...n,o])}},334243(e,t,n){n.d(t,{E:()=>r});const r=({formData:e,etherlightingSettings:t,initialEtherlightingSettings:n})=>{const{ether_lighting:r}=e,{brightness:o,behavior:l,mode:a,network:i,speed:s,led_mode:c}=r||{},d={mode:a,brightness:o,behavior:l,led_mode:c},m={network_overrides:(i||[]).filter(({key:e,raw_color_hex:n})=>t.network_defaults.find(t=>t.key===e)?.raw_color_hex!==n),speed_overrides:(s||[]).filter(({key:e,raw_color_hex:n})=>t.speed_defaults.find(t=>t.key===e)?.raw_color_hex!==n)},E=m.network_overrides.length!==(n.network_overrides||[]).length||m.network_overrides.some(e=>(n.network_overrides||[]).find(t=>t.key===e.key)?.raw_color_hex!==e.raw_color_hex)||m.speed_overrides.length!==(n.speed_overrides||[]).length||m.speed_overrides.some(e=>(n.speed_overrides||[]).find(t=>t.key===e.key)?.raw_color_hex!==e.raw_color_hex);return{etherlightingDeviceData:d,etherlightingSettingsToSubmit:m,hasEtherlightingChanges:E}}}}]);