"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[2514,89965],{86571:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(296540),o=n(217439),i=n(699784);const l=({id:e,children:t,values:n})=>a.createElement(o.A,{color:"text-1",weight:"bold",size:"medium"},e?a.createElement(i.sA,{id:e,values:n}):null,t)},137625:(e,t,n)=>{n.d(t,{A:()=>m});var a=n(296540),o=n(353899),i=n(132196),l=n(372737),r=n(566723),s=n(699784);const m=({children:e=null,title:t,titleValues:n,message:m,messageValues:d,handleConfirm:c=()=>null,handleClose:u=()=>null,handleCancel:g,isOpen:_,buttonVariant:h="primary",cancelButtonVariant:p="tertiary",cancelButtonMessage:A="COMMON_ACTION_CANCEL",buttonMessage:E="COMMON_ACTION_CONFIRM",buttonDisabled:b=!1,position:C="top",showHeaderClose:f=!1,contentClassName:O="",body:N,titleBody:v,className:M,rootClose:I=!1,footerActions:y})=>{const S=(0,a.useCallback)(e=>{_&&(e.stopPropagation(),e.key===l.U.ENTER?c():e.key===l.U.ESCAPE&&u(!1))},[_,c,u]);(0,a.useEffect)(()=>(window.addEventListener("keydown",S,!0),()=>{window.removeEventListener("keydown",S,!0)}),[S]);const T=(0,a.useCallback)(()=>{u(!1),g?.()},[u,g]),x=(0,a.useCallback)(()=>{u(!1),c()},[u,c]),$=(0,a.useMemo)(()=>[{text:a.createElement(s.sA,{id:A}),variant:p,onClick:T},{text:a.createElement(s.sA,{id:E}),disabled:b,variant:h,onClick:x}],[E,h,A,p,T,x,b]),k=(0,a.useCallback)(()=>{u(!1)},[u]),R=i.AH`
    ${t?"":`margin-top: ${r.xO}`}
  `;return a.createElement(o.A,{title:t?a.createElement(s.sA,{id:t,values:n}):v||null,...m?{body:a.createElement(a.Fragment,null,a.createElement(s.sA,{id:m,values:d}),N)}:{body:N},position:C,portal:!0,actions:y||$,showHeaderClose:f,contentClassName:i.AH`
        ${R}
        ${O}
      `,onRequestClose:k,isOpen:_,allowOverflow:!0,rootClose:I,className:M},e)}},372737:(e,t,n)=>{var a;n.d(t,{U:()=>a}),function(e){e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape"}(a||(a={}))},389651:(e,t,n)=>{n.d(t,{A:()=>f});var a=n(469733),o=n(296540),i=n(951272),l=n(271856),r=n(927099),s=n(162420),m=n(71479),d=n(834042),c=n(566723),u=n(143811),g=n(699784),_=n(198494),h=n(294303);const p=(0,m.A)(h.A)`
  margin-bottom: 24px;
`,A=(0,m.A)(l.A)`
  top: 2px;
`,E=(0,m.A)(s.A)`
  margin-left: 6px;
  margin-bottom: 3px;
`,b=e=>{const[t,n]=e.split(":");return 60*Number(t)+Number(n)},C=e=>`${Math.floor(e/d.t).toString().padStart(2,"0")}:${(e%d.t).toString().padStart(2,"0")}`,f=(0,o.memo)(()=>{const{values:{lcm_night_mode_begins:e,lcm_night_mode_ends:t},setFieldValue:n}=(0,i.j7)(),{formatMessage:l}=(0,g.tz)(),s=(0,a.useSelector)(_.jc),m=(0,o.useMemo)(()=>(0,d.gy)(s,15,l),[s,l]),f=(0,o.useMemo)(()=>"string"==typeof e?b(e):e,[e]),O=(0,o.useMemo)(()=>"string"==typeof t?b(t):t,[t]),N=(0,o.useCallback)(({value:e})=>{n("lcm_night_mode_begins",C(+e))},[n]),v=(0,o.useCallback)(({value:e})=>{n("lcm_night_mode_ends",C(+e))},[n]);return(f||0===f)&&(O||0===O)?o.createElement(o.Fragment,null,o.createElement(h.A,{justifyContent:"flex-start",marginBottom:8},o.createElement(r.A,{color:"primary",size:"body"},o.createElement(g.sA,{id:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_MODE"})),o.createElement(A,{width:200,description:o.createElement(g.sA,{id:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_MODE_DESCRIPTION"})},o.createElement(E,{size:"original",isActive:!0}))),o.createElement(p,{justifyContent:"space-between",flexDirection:"column"},o.createElement(h.A,{gap:c.Ln},o.createElement(u.A,{type:"dropdown",variant:"secondary",label:"COMMON_START_TIME",translateLabel:!0,name:"lcm_night_mode_begins",placeholder:m.some(({value:e})=>e===f)?void 0:(0,d.oP)({formatMessage:l,minuteOfDay:f,use24HourFormat:s}),translatePlaceholder:!1,options:m,value:f,onChange:N,full:!0}),o.createElement(u.A,{type:"dropdown",variant:"secondary",label:"COMMON_END_TIME",translateLabel:!0,name:"lcm_night_mode_ends",placeholder:m.some(({value:e})=>e===O)?void 0:(0,d.oP)({formatMessage:l,minuteOfDay:O,use24HourFormat:s}),translatePlaceholder:!1,options:m,value:O,onChange:v,full:!0})))):null})},403116:(e,t,n)=>{n.d(t,{A:()=>R,h:()=>I});var a=n(868238),o=n(469733),i=n(296540),l=n(951272),r=n(429252),s=n.n(r),m=n(271856),d=n(927099),c=n(802),u=n(162420),g=n(71479),_=n(870443),h=n(860631),p=n(566723),A=n(143811),E=n(294303),b=n(845030),C=n(699784),f=n(302167),O=n(457311),N=n(602021),v=n(639188),M=n(389651);const I="lcmScreen",y=(0,g.A)(d.A)`
  flex: 1;
  margin-right: ${p.xO};
`,S=(0,g.A)("div")`
  margin-right: 2px;
`,T=(0,g.A)(u.A)`
  margin-left: 6px;
  margin-bottom: 3px;
`,x=(0,g.A)(m.A)`
  top: 2px;
`,$=(0,l.bk)({enableReinitialize:!0,isInitialValid:!0,mapPropsToValues:({lcmSettings:e,activeItem:{lcm_brightness:t=v.VG,lcm_brightness_override:n=!1,lcm_night_mode_enabled:a=!1,lcm_night_mode_begins:o=v.z7,lcm_night_mode_ends:i=v.Vm}})=>({lcm:e,lcm_brightness:t,lcm_brightness_override:n,lcm_night_mode_enabled:a,lcm_night_mode_begins:o,lcm_night_mode_ends:i}),validationSchema:_.A.object().shape({lcm:_.A.object().shape({sync:_.A.boolean()}),lcm_brightness_override:_.A.boolean(),lcm_brightness:_.A.number().label("COMMON_BRIGHTNESS").min(1).max(100).required(),lcm_night_mode_begins:_.A.string(),lcm_night_mode_ends:_.A.string()}),handleSubmit:()=>null}),k=e=>i.createElement(d.A,{size:"body"},e),R=(0,a.Zz)((0,o.connect)(e=>({lcmSettings:(0,f.ml)(e)}),{}),$)(({values:e,setFieldValue:t,resetForm:n,setFormDirty:a,setFormInvalid:l,dirty:r,isValid:m,initialValues:u,activeItem:g})=>{const _=(0,o.useDispatch)(),f=(0,o.useSelector)(N.EL);return(0,i.useEffect)(()=>{a(I,r),l(I,!m)},[a,l,m,r]),(0,i.useEffect)(()=>(_((0,b.uo)({[I]:()=>({...e,lcm_brightness_override:e.lcm_brightness!==v.VG,lcm_night_mode_begins:e.lcm_night_mode_begins,lcm_night_mode_ends:e.lcm_night_mode_ends})})),_((0,b.Oo)({[I]:()=>{s()(u.lcm,e.lcm)||_((0,O.vd)(e.lcm)),n({values:e})}})),_((0,b.rW)({[I]:n})),()=>{_((0,b.uo)({[I]:null})),_((0,b.Oo)({[I]:null})),_((0,b.rW)({[I]:null}))}),[n,e,u.lcm]),i.createElement(i.Fragment,null,(0,h.TY)(g)?i.createElement(i.Fragment,null,i.createElement(E.A,{justifyContent:"space-between",marginBottom:p.Ln},i.createElement(d.A,{color:"primary",size:"body"},i.createElement(C.sA,{id:"COMMON_BRIGHTNESS"})),i.createElement(c.A,{width:"50%",value:e.lcm_brightness||v.VG,withValueIndicator:!0,min:1,valueIndicatorPosition:"right",formatValueIndicatorContent:k,onChange:e=>{t("lcm_brightness",+e.target.value)},disabled:f})),i.createElement(M.A,null)):null,i.createElement(E.A,{justifyContent:"space-between",alignItems:"center"},i.createElement(A.A,{type:"realCheckbox",name:"lcm.sync"},i.createElement(y,{color:"primary",size:"body"},i.createElement(E.A,{alignItems:"center"},i.createElement(S,null,i.createElement(C.sA,{id:"COMMON_RACK_MULTI_SCREEN_SYNC"})),i.createElement(x,{tooltipClassName:"tooltip-position-fixer",width:200,description:i.createElement(C.sA,{id:"DEVICE_PROPERTIES_LABEL_RACK_MULTI_SCREEN_SYNCHRONIZATION_TOOLTIP"})},i.createElement(T,{isActive:!0,size:"original"})))))))})},449688:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(296540);const o=function(e){return t=>n=>{const[o,i]=(0,a.useState)(Object.fromEntries(e.map(e=>[e,!1]))),[l,r]=(0,a.useState)(Object.fromEntries(e.map(e=>[e,!1]))),s=(0,a.useCallback)((e,t)=>{i(n=>({...n,[e]:t}))},[]),m=(0,a.useCallback)((e,t)=>{r(n=>({...n,[e]:t}))},[]),d=!!Object.values(o).find(e=>e),c=!!Object.values(l).find(e=>e);return a.createElement(t,{isDirty:d,isInvalid:c,formStates:o,setFormDirty:s,setFormInvalid:m,...n})}}},639188:(e,t,n)=>{n.d(t,{VG:()=>a,Vm:()=>i,z7:()=>o});const a=80,o="22:00",i="08:00"},689965:(e,t,n)=>{n.d(t,{A:()=>g,I:()=>a});var a,o=n(296540),i=n(822336),l=n(427853),r=n(71479),s=n(825032),m=n(566723),d=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const c=(0,r.A)(d.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>i.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,u=(0,r.A)(l.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||i.Ay[t===s.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${m.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${m.Ln} ${m.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,g=({type:e,marginBottom:t,margin:n,padding:i,flex:l,width:r,nested:s,...m})=>"items"in m?o.createElement(u,{marginBottom:t,margin:n,padding:i,flex:l,nested:s,...m}):o.createElement(c,{nested:s,width:r,marginBottom:t,margin:n,padding:i,flex:l,isButtonList:e===a.BUTTON_LIST,...m},m.children)},834042:(e,t,n)=>{n.d(t,{EJ:()=>m,gy:()=>r,oP:()=>l,pi:()=>i,q8:()=>s,t:()=>o});var a=n(621690);const o=60,i=24,l=({minuteOfDay:e,use24HourFormat:t,formatMessage:n})=>{const a=Math.floor(e/60);return`${String(t?a:a%12||12).padStart(2,"0")}:${String(e%o).padStart(2,"0")}${t?"":` ${n({id:a>=12?"COMMON_PM":"COMMON_AM"})}`}`},r=(e,t,n)=>{const i=Math.max(1,Math.min(60,Math.floor(60/t))),r=Math.floor(60/i);return(0,a.A)(0,24).map(t=>(0,a.A)(i).map(a=>{const i=a*r;return{label:l({use24HourFormat:e,formatMessage:n,minuteOfDay:t*o+i}),value:60*t+ +i}})).flat()},s=e=>6e4*Math.round(e/6e4),m=(e,t)=>{const n=+(e/1e3).toFixed(1),a=+(n/1e3).toFixed(1),o=+(n/6e4).toFixed(1);return n<1e3?`${n} ${t({id:"COMMON_UNIT_MS"})}`:a<60?`${a} ${t({id:"COMMON_UNIT_S"})}`:`${o} ${t({id:"COMMON_UNIT_MIN"})}`}},889764:(e,t,n)=>{n.d(t,{H5:()=>s,Lq:()=>r,n0:()=>l});var a=n(849513),o=n(276907),i=n(919952);const l=e=>e[i.U.SHARED][o.N.PROPERTY_PANEL]?.[a.Io.TAB_GET_DATA_FUNCTION]||{},r=e=>e[i.U.SHARED][o.N.PROPERTY_PANEL]?.[a.Io.TAB_SUBMIT_FUNCTION]||{},s=e=>e[i.U.SHARED][o.N.PROPERTY_PANEL]?.[a.Io.TAB_RESET_FUNCTION]||{}}}]);