homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
41 lines • 303 kB
JavaScript
import{a as Mi,b as Ie,c as Ei}from"./chunk-D7UMX4UG.js";import{m as ee,n as te}from"./chunk-MAKU7ASQ.js";import{C as J,a as Ti,e as se,l as le}from"./chunk-FQS33FLE.js";import{b as Be}from"./chunk-BABM3ZTD.js";import{l as T}from"./chunk-MVJGA4WA.js";import{$b as _,Ab as G,Ac as Ht,Bb as Y,Ca as di,Cb as ue,Db as xi,Eb as _i,Fa as pi,H as ri,Ib as O,J as ai,Jb as yi,La as Ft,Lb as k,Mb as qe,Nb as u,P as oe,Pc as B,Qa as r,Sa as We,T as si,Ta as mi,Uc as De,Wc as Ve,Xb as j,Yb as st,Za as ui,Zb as Ye,_a as at,_b as d,ac as g,bc as N,cc as Le,db as w,dc as ki,ec as lt,fb as fi,fc as q,gb as vi,gc as Z,ha as li,hc as K,ia as ci,jc as Si,kc as _e,lc as $,mc as A,n as ne,na as F,nc as ct,o as oi,oc as dt,pb as S,pc as bi,qb as C,qc as wi,rb as x,rc as l,sa as M,sc as c,ta as E,tb as gi,tc as me,ua as D,ub as hi,va as H,vb as Ci,wb as f,xb as o,yb as s,zb as m}from"./chunk-HYMBXFUO.js";var Vi=(()=>{class e{service;readyForControl=!1;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-access-code"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:18,vars:7,consts:[["tabindex","0",1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["x","9","y","5","width","12","height","3","rx","1","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["x","9","y","11","width","12","height","16","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1"],["x1","13","y1","11","x2","13","y2","27","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","11","x2","17","y2","27","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","15","x2","21","y2","15","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","19","x2","21","y2","19","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","23","x2","21","y2","23","stroke","#7f7f7f","stroke-width","1"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(G(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),G(4,"svg",3),ue(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11),Y()(),H(),G(13,"div",12),d(14),Y(),G(15,"div",13),d(16),l(17,"translate"),Y()()()),a&2&&(r(2),S("aria-label",c(3,3,"accessories.core.access_code")),r(12),_(i.service.customName||i.service.serviceName),r(2),_(c(17,5,"accessories.core.access_code")))},dependencies:[T],encapsulation:2})}return e})();var je=(function(e){return e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values",e})(je||{}),Me=(function(e){return e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue",e})(Me||{});function _o(e){return mt(e)&&typeof e.from=="function"}function mt(e){return typeof e=="object"&&typeof e.to=="function"}function Bi(e){e.parentElement.removeChild(e)}function Lt(e){return e!=null}function Ai(e){e.preventDefault()}function yo(e){return e.filter(function(n){return this[n]?!1:this[n]=!0},{})}function ko(e,n){return Math.round(e/n)*n}function So(e,n){var t=e.getBoundingClientRect(),a=e.ownerDocument,i=a.documentElement,p=Fi(a);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(p.x=0),n?t.top+p.y-i.clientTop:t.left+p.x-i.clientLeft}function Ae(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function Di(e,n,t){t>0&&(we(e,n),setTimeout(function(){pt(e,n)},t))}function Ii(e){return Math.max(Math.min(e,100),0)}function ut(e){return Array.isArray(e)?e:[e]}function bo(e){e=String(e);var n=e.split(".");return n.length>1?n[1].length:0}function we(e,n){e.classList&&!/\s/.test(n)?e.classList.add(n):e.className+=" "+n}function pt(e,n){e.classList&&!/\s/.test(n)?e.classList.remove(n):e.className=e.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")}function wo(e,n){return e.classList?e.classList.contains(n):new RegExp("\\b"+n+"\\b").test(e.className)}function Fi(e){var n=window.pageXOffset!==void 0,t=(e.compatMode||"")==="CSS1Compat",a=n?window.pageXOffset:t?e.documentElement.scrollLeft:e.body.scrollLeft,i=n?window.pageYOffset:t?e.documentElement.scrollTop:e.body.scrollTop;return{x:a,y:i}}function To(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Mo(){var e=!1;try{var n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,n)}catch{}return e}function Eo(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function Nt(e,n){return 100/(n-e)}function Ot(e,n,t){return n*100/(e[t+1]-e[t])}function Vo(e,n){return Ot(e,e[0]<0?n+Math.abs(e[0]):n-e[0],0)}function Bo(e,n){return n*(e[1]-e[0])/100+e[0]}function Xe(e,n){for(var t=1;e>=n[t];)t+=1;return t}function Ao(e,n,t){if(t>=e.slice(-1)[0])return 100;var a=Xe(t,e),i=e[a-1],p=e[a],b=n[a-1],Q=n[a];return b+Vo([i,p],t)/Nt(b,Q)}function Do(e,n,t){if(t>=100)return e.slice(-1)[0];var a=Xe(t,n),i=e[a-1],p=e[a],b=n[a-1],Q=n[a];return Bo([i,p],(t-b)*Nt(b,Q))}function Io(e,n,t,a){if(a===100)return a;var i=Xe(a,e),p=e[i-1],b=e[i];return t?a-p>(b-p)/2?b:p:n[i-1]?e[i-1]+ko(a-e[i-1],n[i-1]):a}var Po=(function(){function e(n,t,a){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[a||!1],this.xNumSteps=[!1],this.snap=t;var i,p=[];for(Object.keys(n).forEach(function(b){p.push([ut(n[b]),b])}),p.sort(function(b,Q){return b[0][0]-Q[0][0]}),i=0;i<p.length;i++)this.handleEntryPoint(p[i][1],p[i][0]);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)this.handleStepPoint(i,this.xNumSteps[i])}return e.prototype.getDistance=function(n){for(var t=[],a=0;a<this.xNumSteps.length-1;a++)t[a]=Ot(this.xVal,n,a);return t},e.prototype.getAbsoluteDistance=function(n,t,a){var i=0;if(n<this.xPct[this.xPct.length-1])for(;n>this.xPct[i+1];)i++;else n===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!a&&n===this.xPct[i+1]&&i++,t===null&&(t=[]);var p,b=1,Q=t[i],re=0,W=0,X=0,fe=0;for(a?p=(n-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):p=(this.xPct[i+1]-n)/(this.xPct[i+1]-this.xPct[i]);Q>0;)re=this.xPct[i+1+fe]-this.xPct[i+fe],t[i+fe]*b+100-p*100>100?(W=re*p,b=(Q-100*p)/t[i+fe],p=1):(W=t[i+fe]*re/100*b,b=0),a?(X=X-W,this.xPct.length+fe>=1&&fe--):(X=X+W,this.xPct.length-fe>=1&&fe++),Q=t[i+fe]*b;return n+X},e.prototype.toStepping=function(n){return n=Ao(this.xVal,this.xPct,n),n},e.prototype.fromStepping=function(n){return Do(this.xVal,this.xPct,n)},e.prototype.getStep=function(n){return n=Io(this.xPct,this.xSteps,this.snap,n),n},e.prototype.getDefaultStep=function(n,t,a){var i=Xe(n,this.xPct);return(n===100||t&&n===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/a},e.prototype.getNearbySteps=function(n){var t=Xe(n,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var n=this.xNumSteps.map(bo);return Math.max.apply(null,n)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(n){return this.getStep(this.toStepping(n))},e.prototype.handleEntryPoint=function(n,t){var a;if(n==="min"?a=0:n==="max"?a=100:a=parseFloat(n),!Ae(a)||!Ae(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(a),this.xVal.push(t[0]);var i=Number(t[1]);a?this.xSteps.push(isNaN(i)?!1:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(n,t){if(t){if(this.xVal[n]===this.xVal[n+1]){this.xSteps[n]=this.xHighestCompleteStep[n]=this.xVal[n];return}this.xSteps[n]=Ot([this.xVal[n],this.xVal[n+1]],t,0)/Nt(this.xPct[n],this.xPct[n+1]);var a=(this.xVal[n+1]-this.xVal[n])/this.xNumSteps[n],i=Math.ceil(Number(a.toFixed(3))-1),p=this.xVal[n]+this.xNumSteps[n]*i;this.xHighestCompleteStep[n]=p}},e})(),Pi={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},Fo={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},Oe={tooltips:".__tooltips",aria:".__aria"};function Ho(e,n){if(!Ae(n))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=n}function Lo(e,n){if(!Ae(n))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=n}function Oo(e,n){if(!Ae(n))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=n}function No(e,n){if(!Ae(n))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=n}function Ro(e,n){if(typeof n!="object"||Array.isArray(n))throw new Error("noUiSlider: 'range' is not an object.");if(n.min===void 0||n.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new Po(n,e.snap||!1,e.singleStep)}function Wo(e,n){if(n=ut(n),!Array.isArray(n)||!n.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=n.length,e.start=n}function jo(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=n}function Uo(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=n}function $o(e,n){if(typeof n!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=n}function Hi(e,n){var t=[!1],a;if(n==="lower"?n=[!0,!1]:n==="upper"&&(n=[!1,!0]),n===!0||n===!1){for(a=1;a<e.handles;a++)t.push(n);t.push(!1)}else{if(!Array.isArray(n)||!n.length||n.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t=n}e.connect=t}function Go(e,n){switch(n){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Li(e,n){if(!Ae(n))throw new Error("noUiSlider: 'margin' option must be numeric.");n!==0&&(e.margin=e.spectrum.getDistance(n))}function zo(e,n){if(!Ae(n))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(n),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function qo(e,n){var t;if(!Ae(n)&&!Array.isArray(n))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(n)&&!(n.length===2||Ae(n[0])||Ae(n[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(n!==0){for(Array.isArray(n)||(n=[n,n]),e.padding=[e.spectrum.getDistance(n[0]),e.spectrum.getDistance(n[1])],t=0;t<e.spectrum.xNumSteps.length-1;t++)if(e.padding[0][t]<0||e.padding[1][t]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var a=n[0]+n[1],i=e.spectrum.xVal[0],p=e.spectrum.xVal[e.spectrum.xVal.length-1];if(a/(p-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function Zo(e,n){switch(n){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Ko(e,n){if(typeof n!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var t=n.indexOf("tap")>=0,a=n.indexOf("drag")>=0,i=n.indexOf("fixed")>=0,p=n.indexOf("snap")>=0,b=n.indexOf("hover")>=0,Q=n.indexOf("unconstrained")>=0,re=n.indexOf("invert-connects")>=0,W=n.indexOf("drag-all")>=0,X=n.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Li(e,e.start[1]-e.start[0])}if(re&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(Q&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:t||p,drag:a,dragAll:W,smoothSteps:X,fixed:i,snap:p,hover:b,unconstrained:Q,invertConnects:re}}function Qo(e,n){if(n!==!1)if(n===!0||mt(n)){e.tooltips=[];for(var t=0;t<e.handles;t++)e.tooltips.push(n)}else{if(n=ut(n),n.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");n.forEach(function(a){if(typeof a!="boolean"&&!mt(a))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=n}}function Yo(e,n){if(n.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=n}function Xo(e,n){if(!mt(n))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=n}function Jo(e,n){if(!_o(n))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=n}function er(e,n){if(typeof n!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=n}function tr(e,n){e.documentElement=n}function ir(e,n){if(typeof n!="string"&&n!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=n}function nr(e,n){if(typeof n!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(n).forEach(function(t){e.cssClasses[t]=e.cssPrefix+n[t]})):e.cssClasses=n}function Oi(e){var n={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Pi,format:Pi},t={step:{r:!1,t:Ho},keyboardPageMultiplier:{r:!1,t:Lo},keyboardMultiplier:{r:!1,t:Oo},keyboardDefaultStep:{r:!1,t:No},start:{r:!0,t:Wo},connect:{r:!0,t:Hi},direction:{r:!0,t:Zo},snap:{r:!1,t:jo},animate:{r:!1,t:Uo},animationDuration:{r:!1,t:$o},range:{r:!0,t:Ro},orientation:{r:!1,t:Go},margin:{r:!1,t:Li},limit:{r:!1,t:zo},padding:{r:!1,t:qo},behaviour:{r:!0,t:Ko},ariaFormat:{r:!1,t:Xo},format:{r:!1,t:Jo},tooltips:{r:!1,t:Qo},keyboardSupport:{r:!0,t:er},documentElement:{r:!1,t:tr},cssPrefix:{r:!0,t:ir},cssClasses:{r:!0,t:nr},handleAttributes:{r:!1,t:Yo}},a={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:Fo,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(t).forEach(function(re){if(!Lt(e[re])&&a[re]===void 0){if(t[re].r)throw new Error("noUiSlider: '"+re+"' is required.");return}t[re].t(n,Lt(e[re])?e[re]:a[re])}),n.pips=e.pips;var i=document.createElement("div"),p=i.style.msTransform!==void 0,b=i.style.transform!==void 0;n.transformRule=b?"transform":p?"msTransform":"webkitTransform";var Q=[["left","top"],["right","bottom"]];return n.style=Q[n.dir][n.ort],n}function or(e,n,t){var a=To(),i=Eo(),p=i&&Mo(),b=e,Q,re,W,X,fe,Se,ie=n.spectrum,Pe=[],ve=[],Te=[],_t=0,Fe={},Ze=!1,ze=e.ownerDocument,tt=n.documentElement||ze.documentElement,it=ze.body,zn=ze.dir==="rtl"||n.ort===1?0:100;function He(v,h){var y=ze.createElement("div");return h&&we(y,h),v.appendChild(y),y}function qn(v,h){var y=He(v,n.cssClasses.origin),V=He(y,n.cssClasses.handle);if(He(V,n.cssClasses.touchArea),V.setAttribute("data-handle",String(h)),n.keyboardSupport&&(V.setAttribute("tabindex","0"),V.addEventListener("keydown",function(P){return co(P,h)})),n.handleAttributes!==void 0){var I=n.handleAttributes[h];Object.keys(I).forEach(function(P){V.setAttribute(P,I[P])})}return V.setAttribute("role","slider"),V.setAttribute("aria-orientation",n.ort?"vertical":"horizontal"),h===0?we(V,n.cssClasses.handleLower):h===n.handles-1&&we(V,n.cssClasses.handleUpper),y.handle=V,y}function yt(v,h){return h?He(v,n.cssClasses.connect):!1}function Zn(v,h){re=He(h,n.cssClasses.connects),W=[],X=[],X.push(yt(re,v[0]));for(var y=0;y<n.handles;y++)W.push(qn(h,y)),Te[y]=y,X.push(yt(re,v[y+1]))}function Kn(v){we(v,n.cssClasses.target),n.dir===0?we(v,n.cssClasses.ltr):we(v,n.cssClasses.rtl),n.ort===0?we(v,n.cssClasses.horizontal):we(v,n.cssClasses.vertical);var h=getComputedStyle(v).direction;return h==="rtl"?we(v,n.cssClasses.textDirectionRtl):we(v,n.cssClasses.textDirectionLtr),He(v,n.cssClasses.base)}function Qn(v,h){return!n.tooltips||!n.tooltips[h]?!1:He(v.firstChild,n.cssClasses.tooltip)}function Ut(){return b.hasAttribute("disabled")}function kt(v){var h=W[v];return h.hasAttribute("disabled")}function Yn(v){v!=null?(W[v].setAttribute("disabled",""),W[v].handle.removeAttribute("tabindex")):(b.setAttribute("disabled",""),W.forEach(function(h){h.handle.removeAttribute("tabindex")}))}function Xn(v){v!=null?(W[v].removeAttribute("disabled"),W[v].handle.setAttribute("tabindex","0")):(b.removeAttribute("disabled"),W.forEach(function(h){h.removeAttribute("disabled"),h.handle.setAttribute("tabindex","0")}))}function St(){Se&&(Ke("update"+Oe.tooltips),Se.forEach(function(v){v&&Bi(v)}),Se=null)}function $t(){St(),Se=W.map(Qn),Et("update"+Oe.tooltips,function(v,h,y){if(!(!Se||!n.tooltips)&&Se[h]!==!1){var V=v[h];n.tooltips[h]!==!0&&(V=n.tooltips[h].to(y[h])),Se[h].innerHTML=V}})}function Jn(){Ke("update"+Oe.aria),Et("update"+Oe.aria,function(v,h,y,V,I){Te.forEach(function(P){var U=W[P],L=nt(ve,P,0,!0,!0,!0),de=nt(ve,P,100,!0,!0,!0),pe=I[P],ge=String(n.ariaFormat.to(y[P]));L=ie.fromStepping(L).toFixed(1),de=ie.fromStepping(de).toFixed(1),pe=ie.fromStepping(pe).toFixed(1),U.children[0].setAttribute("aria-valuemin",L),U.children[0].setAttribute("aria-valuemax",de),U.children[0].setAttribute("aria-valuenow",pe),U.children[0].setAttribute("aria-valuetext",ge)})})}function eo(v){if(v.mode===je.Range||v.mode===je.Steps)return ie.xVal;if(v.mode===je.Count){if(v.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var h=v.values-1,y=100/h,V=[];h--;)V[h]=h*y;return V.push(100),Gt(V,v.stepped)}return v.mode===je.Positions?Gt(v.values,v.stepped):v.mode===je.Values?v.stepped?v.values.map(function(I){return ie.fromStepping(ie.getStep(ie.toStepping(I)))}):v.values:[]}function Gt(v,h){return v.map(function(y){return ie.fromStepping(h?ie.getStep(y):y)})}function to(v){function h(pe,ge){return Number((pe+ge).toFixed(7))}var y=eo(v),V={},I=ie.xVal[0],P=ie.xVal[ie.xVal.length-1],U=!1,L=!1,de=0;return y=yo(y.slice().sort(function(pe,ge){return pe-ge})),y[0]!==I&&(y.unshift(I),U=!0),y[y.length-1]!==P&&(y.push(P),L=!0),y.forEach(function(pe,ge){var he,ae,xe,be=pe,ye=y[ge+1],ke,At,Dt,It,ti,Pt,ii,ni=v.mode===je.Steps;for(ni&&(he=ie.xNumSteps[ge]),he||(he=ye-be),ye===void 0&&(ye=be),he=Math.max(he,1e-7),ae=be;ae<=ye;ae=h(ae,he)){for(ke=ie.toStepping(ae),At=ke-de,ti=At/(v.density||1),Pt=Math.round(ti),ii=At/Pt,xe=1;xe<=Pt;xe+=1)Dt=de+xe*ii,V[Dt.toFixed(5)]=[ie.fromStepping(Dt),0];It=y.indexOf(ae)>-1?Me.LargeValue:ni?Me.SmallValue:Me.NoValue,!ge&&U&&ae!==ye&&(It=0),ae===ye&&L||(V[ke.toFixed(5)]=[ae,It]),de=ke}}),V}function io(v,h,y){var V,I,P=ze.createElement("div"),U=(V={},V[Me.None]="",V[Me.NoValue]=n.cssClasses.valueNormal,V[Me.LargeValue]=n.cssClasses.valueLarge,V[Me.SmallValue]=n.cssClasses.valueSub,V),L=(I={},I[Me.None]="",I[Me.NoValue]=n.cssClasses.markerNormal,I[Me.LargeValue]=n.cssClasses.markerLarge,I[Me.SmallValue]=n.cssClasses.markerSub,I),de=[n.cssClasses.valueHorizontal,n.cssClasses.valueVertical],pe=[n.cssClasses.markerHorizontal,n.cssClasses.markerVertical];we(P,n.cssClasses.pips),we(P,n.ort===0?n.cssClasses.pipsHorizontal:n.cssClasses.pipsVertical);function ge(ae,xe){var be=xe===n.cssClasses.value,ye=be?de:pe,ke=be?U:L;return xe+" "+ye[n.ort]+" "+ke[ae]}function he(ae,xe,be){if(be=h?h(xe,be):be,be!==Me.None){var ye=He(P,!1);ye.className=ge(be,n.cssClasses.marker),ye.style[n.style]=ae+"%",be>Me.NoValue&&(ye=He(P,!1),ye.className=ge(be,n.cssClasses.value),ye.setAttribute("data-value",String(xe)),ye.style[n.style]=ae+"%",ye.innerHTML=String(y.to(xe)))}}return Object.keys(v).forEach(function(ae){he(ae,v[ae][0],v[ae][1])}),P}function bt(){fe&&(Bi(fe),fe=null)}function wt(v){bt();var h=to(v),y=v.filter,V=v.format||{to:function(I){return String(Math.round(I))}};return fe=b.appendChild(io(h,y,V)),fe}function zt(){var v=Q.getBoundingClientRect(),h="offset"+["Width","Height"][n.ort];return n.ort===0?v.width||Q[h]:v.height||Q[h]}function Ne(v,h,y,V){var I=function(U){var L=no(U,V.pageOffset,V.target||h);if(!L||Ut()&&!V.doNotReject||wo(b,n.cssClasses.tap)&&!V.doNotReject||v===a.start&&L.buttons!==void 0&&L.buttons>1||V.hover&&L.buttons)return!1;p||L.preventDefault(),L.calcPoint=L.points[n.ort],y(L,V)},P=[];return v.split(" ").forEach(function(U){h.addEventListener(U,I,p?{passive:!0}:!1),P.push([U,I])}),P}function no(v,h,y){var V=v.type.indexOf("touch")===0,I=v.type.indexOf("mouse")===0,P=v.type.indexOf("pointer")===0,U=0,L=0;if(v.type.indexOf("MSPointer")===0&&(P=!0),v.type==="mousedown"&&!v.buttons&&!v.touches)return!1;if(V){var de=function(he){var ae=he.target;return ae===y||y.contains(ae)||v.composed&&v.composedPath().shift()===y};if(v.type==="touchstart"){var pe=Array.prototype.filter.call(v.touches,de);if(pe.length>1)return!1;U=pe[0].pageX,L=pe[0].pageY}else{var ge=Array.prototype.find.call(v.changedTouches,de);if(!ge)return!1;U=ge.pageX,L=ge.pageY}}return h=h||Fi(ze),(I||P)&&(U=v.clientX+h.x,L=v.clientY+h.y),v.pageOffset=h,v.points=[U,L],v.cursor=I||P,v}function qt(v){var h=v-So(Q,n.ort),y=h*100/zt();return y=Ii(y),n.dir?100-y:y}function oo(v){var h=100,y=!1;return W.forEach(function(V,I){if(!kt(I)){var P=ve[I],U=Math.abs(P-v),L=U===100&&h===100,de=U<h,pe=U<=h&&v>P;(de||pe||L)&&(y=I,h=U)}}),y}function ro(v,h){v.type==="mouseout"&&v.target.nodeName==="HTML"&&v.relatedTarget===null&&Tt(v,h)}function ao(v,h){if(navigator.appVersion.indexOf("MSIE 9")===-1&&v.buttons===0&&h.buttonsProperty!==0)return Tt(v,h);var y=(n.dir?-1:1)*(v.calcPoint-h.startCalcPoint),V=y*100/h.baseSize;Kt(y>0,V,h.locations,h.handleNumbers,h.connect)}function Tt(v,h){h.handle&&(pt(h.handle,n.cssClasses.active),_t-=1),h.listeners.forEach(function(y){tt.removeEventListener(y[0],y[1])}),_t===0&&(pt(b,n.cssClasses.drag),Bt(),v.cursor&&(it.style.cursor="",it.removeEventListener("selectstart",Ai))),n.events.smoothSteps&&(h.handleNumbers.forEach(function(y){Re(y,ve[y],!0,!0,!1,!1)}),h.handleNumbers.forEach(function(y){Ce("update",y)})),h.handleNumbers.forEach(function(y){Ce("change",y),Ce("set",y),Ce("end",y)})}function Mt(v,h){if(!h.handleNumbers.some(kt)){var y;if(h.handleNumbers.length===1){var V=W[h.handleNumbers[0]];y=V.children[0],_t+=1,we(y,n.cssClasses.active)}v.stopPropagation();var I=[],P=Ne(a.move,tt,ao,{target:v.target,handle:y,connect:h.connect,listeners:I,startCalcPoint:v.calcPoint,baseSize:zt(),pageOffset:v.pageOffset,handleNumbers:h.handleNumbers,buttonsProperty:v.buttons,locations:ve.slice()}),U=Ne(a.end,tt,Tt,{target:v.target,handle:y,listeners:I,doNotReject:!0,handleNumbers:h.handleNumbers}),L=Ne("mouseout",tt,ro,{target:v.target,handle:y,listeners:I,doNotReject:!0,handleNumbers:h.handleNumbers});I.push.apply(I,P.concat(U,L)),v.cursor&&(it.style.cursor=getComputedStyle(v.target).cursor,W.length>1&&we(b,n.cssClasses.drag),it.addEventListener("selectstart",Ai,!1)),h.handleNumbers.forEach(function(de){Ce("start",de)})}}function so(v){v.stopPropagation();var h=qt(v.calcPoint),y=oo(h);y!==!1&&(n.events.snap||Di(b,n.cssClasses.tap,n.animationDuration),Re(y,h,!0,!0),Bt(),Ce("slide",y,!0),Ce("update",y,!0),n.events.snap?Mt(v,{handleNumbers:[y]}):(Ce("change",y,!0),Ce("set",y,!0)))}function lo(v){var h=qt(v.calcPoint),y=ie.getStep(h),V=ie.fromStepping(y);Object.keys(Fe).forEach(function(I){I.split(".")[0]==="hover"&&Fe[I].forEach(function(P){P.call(rt,V)})})}function co(v,h){if(Ut()||kt(h))return!1;var y=["Left","Right"],V=["Down","Up"],I=["PageDown","PageUp"],P=["Home","End"];n.dir&&!n.ort?y.reverse():n.ort&&!n.dir&&(V.reverse(),I.reverse());var U=v.key.replace("Arrow",""),L=U===I[0],de=U===I[1],pe=U===V[0]||U===y[0]||L,ge=U===V[1]||U===y[1]||de,he=U===P[0],ae=U===P[1];if(!pe&&!ge&&!he&&!ae)return!0;v.preventDefault();var xe;if(ge||pe){var be=pe?0:1,ye=Jt(h),ke=ye[be];if(ke===null)return!1;ke===!1&&(ke=ie.getDefaultStep(ve[h],pe,n.keyboardDefaultStep)),de||L?ke*=n.keyboardPageMultiplier:ke*=n.keyboardMultiplier,ke=Math.max(ke,1e-7),ke=(pe?-1:1)*ke,xe=Pe[h]+ke}else ae?xe=n.spectrum.xVal[n.spectrum.xVal.length-1]:xe=n.spectrum.xVal[0];return Re(h,ie.toStepping(xe),!0,!0),Ce("slide",h),Ce("update",h),Ce("change",h),Ce("set",h),!1}function Zt(v){v.fixed||W.forEach(function(h,y){Ne(a.start,h.children[0],Mt,{handleNumbers:[y]})}),v.tap&&Ne(a.start,Q,so,{}),v.hover&&Ne(a.move,Q,lo,{hover:!0}),v.drag&&X.forEach(function(h,y){if(!(h===!1||y===0||y===X.length-1)){var V=W[y-1],I=W[y],P=[h],U=[V,I],L=[y-1,y];we(h,n.cssClasses.draggable),v.fixed&&(P.push(V.children[0]),P.push(I.children[0])),v.dragAll&&(U=W,L=Te),P.forEach(function(de){Ne(a.start,de,Mt,{handles:U,handleNumbers:L,connect:h})})}})}function Et(v,h){Fe[v]=Fe[v]||[],Fe[v].push(h),v.split(".")[0]==="update"&&W.forEach(function(y,V){Ce("update",V)})}function po(v){return v===Oe.aria||v===Oe.tooltips}function Ke(v){var h=v&&v.split(".")[0],y=h?v.substring(h.length):v;Object.keys(Fe).forEach(function(V){var I=V.split(".")[0],P=V.substring(I.length);(!h||h===I)&&(!y||y===P)&&(!po(P)||y===P)&&delete Fe[V]})}function Ce(v,h,y){Object.keys(Fe).forEach(function(V){var I=V.split(".")[0];v===I&&Fe[V].forEach(function(P){P.call(rt,Pe.map(n.format.to),h,Pe.slice(),y||!1,ve.slice(),rt)})})}function nt(v,h,y,V,I,P,U){var L;return W.length>1&&!n.events.unconstrained&&(V&&h>0&&(L=ie.getAbsoluteDistance(v[h-1],n.margin,!1),y=Math.max(y,L)),I&&h<W.length-1&&(L=ie.getAbsoluteDistance(v[h+1],n.margin,!0),y=Math.min(y,L))),W.length>1&&n.limit&&(V&&h>0&&(L=ie.getAbsoluteDistance(v[h-1],n.limit,!1),y=Math.min(y,L)),I&&h<W.length-1&&(L=ie.getAbsoluteDistance(v[h+1],n.limit,!0),y=Math.max(y,L))),n.padding&&(h===0&&(L=ie.getAbsoluteDistance(0,n.padding[0],!1),y=Math.max(y,L)),h===W.length-1&&(L=ie.getAbsoluteDistance(100,n.padding[1],!0),y=Math.min(y,L))),U||(y=ie.getStep(y)),y=Ii(y),y===v[h]&&!P?!1:y}function Vt(v,h){var y=n.ort;return(y?h:v)+", "+(y?v:h)}function Kt(v,h,y,V,I){var P=y.slice(),U=V[0],L=n.events.smoothSteps,de=[!v,v],pe=[v,!v];V=V.slice(),v&&V.reverse(),V.length>1?V.forEach(function(he,ae){var xe=nt(P,he,P[he]+h,de[ae],pe[ae],!1,L);xe===!1?h=0:(h=xe-P[he],P[he]=xe)}):de=pe=[!0];var ge=!1;V.forEach(function(he,ae){ge=Re(he,y[he]+h,de[ae],pe[ae],!1,L)||ge}),ge&&(V.forEach(function(he){Ce("update",he),Ce("slide",he)}),I!=null&&Ce("drag",U))}function Qt(v,h){return n.dir?100-v-h:v}function mo(v,h){ve[v]=h,Pe[v]=ie.fromStepping(h);var y=Qt(h,0)-zn,V="translate("+Vt(y+"%","0")+")";if(W[v].style[n.transformRule]=V,n.events.invertConnects&&ve.length>1){var I=ve.every(function(P,U,L){return U===0||P>=L[U-1]});if(Ze!==!I){Co();return}}Qe(v),Qe(v+1),Ze&&(Qe(v-1),Qe(v+2))}function Bt(){Te.forEach(function(v){var h=ve[v]>50?-1:1,y=3+(W.length+h*v);W[v].style.zIndex=String(y)})}function Re(v,h,y,V,I,P){return I||(h=nt(ve,v,h,y,V,!1,P)),h===!1?!1:(mo(v,h),!0)}function Qe(v){if(X[v]){var h=ve.slice();Ze&&h.sort(function(L,de){return L-de});var y=0,V=100;v!==0&&(y=h[v-1]),v!==X.length-1&&(V=h[v]);var I=V-y,P="translate("+Vt(Qt(y,I)+"%","0")+")",U="scale("+Vt(I/100,"1")+")";X[v].style[n.transformRule]=P+" "+U}}function Yt(v,h){return v===null||v===!1||v===void 0||(typeof v=="number"&&(v=String(v)),v=n.format.from(v),v!==!1&&(v=ie.toStepping(v)),v===!1||isNaN(v))?ve[h]:v}function ot(v,h,y){var V=ut(v),I=ve[0]===void 0;h=h===void 0?!0:h,n.animate&&!I&&Di(b,n.cssClasses.tap,n.animationDuration),Te.forEach(function(L){Re(L,Yt(V[L],L),!0,!1,y)});var P=Te.length===1?0:1;if(I&&ie.hasNoSize()&&(y=!0,ve[0]=0,Te.length>1)){var U=100/(Te.length-1);Te.forEach(function(L){ve[L]=L*U})}for(;P<Te.length;++P)Te.forEach(function(L){Re(L,ve[L],!0,!0,y)});Bt(),Te.forEach(function(L){Ce("update",L),V[L]!==null&&h&&Ce("set",L)})}function uo(v){ot(n.start,v)}function fo(v,h,y,V){if(v=Number(v),!(v>=0&&v<Te.length))throw new Error("noUiSlider: invalid handle number, got: "+v);Re(v,Yt(h,v),!0,!0,V),Ce("update",v),y&&Ce("set",v)}function Xt(v){if(v===void 0&&(v=!1),v)return Pe.length===1?Pe[0]:Pe.slice(0);var h=Pe.map(n.format.to);return h.length===1?h[0]:h}function vo(){for(Ke(Oe.aria),Ke(Oe.tooltips),Object.keys(n.cssClasses).forEach(function(v){pt(b,n.cssClasses[v])});b.firstChild;)b.removeChild(b.firstChild);delete b.noUiSlider}function Jt(v){var h=ve[v],y=ie.getNearbySteps(h),V=Pe[v],I=y.thisStep.step,P=null;if(n.snap)return[V-y.stepBefore.startValue||null,y.stepAfter.startValue-V||null];I!==!1&&V+I>y.stepAfter.startValue&&(I=y.stepAfter.startValue-V),V>y.thisStep.startValue?P=y.thisStep.step:y.stepBefore.step===!1?P=!1:P=V-y.stepBefore.highestStep,h===100?I=null:h===0&&(P=null);var U=ie.countStepDecimals();return I!==null&&I!==!1&&(I=Number(I.toFixed(U))),P!==null&&P!==!1&&(P=Number(P.toFixed(U))),[P,I]}function go(){return Te.map(Jt)}function ho(v,h){var y=Xt(),V=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];V.forEach(function(P){v[P]!==void 0&&(t[P]=v[P])});var I=Oi(t);V.forEach(function(P){v[P]!==void 0&&(n[P]=I[P])}),ie=I.spectrum,n.margin=I.margin,n.limit=I.limit,n.padding=I.padding,n.pips?wt(n.pips):bt(),n.tooltips?$t():St(),ve=[],ot(Lt(v.start)?v.start:y,h),v.connect&&ei()}function ei(){for(;re.firstChild;)re.removeChild(re.firstChild);for(var v=0;v<=n.handles;v++)X[v]=yt(re,n.connect[v]),Qe(v);Zt({drag:n.events.drag,fixed:!0})}function Co(){Ze=!Ze,Hi(n,n.connect.map(function(v){return!v})),ei()}function xo(){Q=Kn(b),Zn(n.connect,Q),Zt(n.events),ot(n.start),n.pips&&wt(n.pips),n.tooltips&&$t(),Jn()}xo();var rt={destroy:vo,steps:go,on:Et,off:Ke,get:Xt,set:ot,setHandle:fo,reset:uo,disable:Yn,enable:Xn,__moveHandles:function(v,h,y){Kt(v,h,ve,y)},options:t,updateOptions:ho,target:b,removePips:bt,removeTooltips:St,getPositions:function(){return ve.slice()},getTooltips:function(){return Se},getOrigins:function(){return W},pips:wt};return rt}function Ni(e,n){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var t=Oi(n),a=or(e,t,n);return e.noUiSlider=a,a}var Rt=class{to(n){return String(parseFloat(parseFloat(String(n)).toFixed(2)))}from(n){return parseFloat(n)}},ce=(()=>{class e{constructor(t,a,i){this.ngZone=t,this.el=a,this.renderer=i,this.handles=[],this.config={},this.change=new We(!0),this.update=new We(!0),this.slide=new We(!0),this.set=new We(!0),this.start=new We(!0),this.end=new We(!0),this.onChange=Function.prototype,this.cleanups=[],this.eventHandler=(p,b,Q,re)=>{let W=this.toValues(b),X=!1;if(this.value===void 0){this.value=W;return}Array.isArray(W)&&this.value[Q]!=W[Q]&&(X=!0),!Array.isArray(W)&&this.value!=W&&(X=!0),X&&this.ngZone.run(()=>{p.observers.length>0&&p.emit(W),this.onChange(W)}),Array.isArray(W)?this.value[Q]=W[Q]:this.value=W},this.defaultKeyHandler=p=>{let b=this.slider.steps(),Q=parseInt(p.target.getAttribute("data-handle")),re=1,W=1,X=0,fe=0;switch(p.which){case 34:W=this.config.pageSteps;break;case 40:case 37:re=-1,X=b[Q][0],p.preventDefault();break;case 33:W=this.config.pageSteps;break;case 38:case 39:X=b[Q][1],p.preventDefault();break;default:break}fe=re*W*X;let Se;Array.isArray(this.value)?(Se=[...this.value],Se[Q]=Se[Q]+fe):Se=this.value+fe,this.slider.set(Se)}}ngOnChanges(t){this.slider&&(t.min||t.max||t.step||t.range)&&this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.slider.updateOptions({range:Object.assign({},{min:this.min,max:this.max},this.range||{}),step:this.step})})})}ngOnDestroy(){for(this.slider.destroy();this.cleanups.length;)this.cleanups.pop()?.()}toValues(t){let a=t.map(this.config.format.from);return a.length==1?a[0]:a}writeValue(t){this.slider?this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.slider.set(t)})}):t!==null&&(this.value=t,this.createSlider(t))}registerOnChange(t){this.onChange=t}registerOnTouched(t){}setDisabledState(t){t?this.renderer.setAttribute(this.el.nativeElement.childNodes[0],"disabled","true"):this.renderer.removeAttribute(this.el.nativeElement.childNodes[0],"disabled")}createSlider(t){let a=JSON.parse(JSON.stringify({behaviour:this.behaviour,connect:this.connect,limit:this.limit,start:t,step:this.step,pageSteps:this.pageSteps,keyboard:this.keyboard,onKeydown:this.onKeydown,range:this.range||this.config.range||{min:this.min,max:this.max},tooltips:this.tooltips,snap:this.snap,animate:this.animate}));if(a.tooltips=this.tooltips||this.config.tooltips,a.format=this.format||this.config.format||new Rt,this.ngZone.runOutsideAngular(()=>{this.slider=Ni(this.el.nativeElement.querySelector("div"),Object.assign(this.config,a))}),this.handles=[].slice.call(this.el.nativeElement.querySelectorAll(".noUi-handle")),this.config.keyboard){this.config.pageSteps===void 0&&(this.config.pageSteps=10);for(let i of this.handles){i.setAttribute("tabindex",0);let p=this.config.onKeydown||this.defaultKeyHandler;this.ngZone.runOutsideAngular(()=>{this.cleanups.push(this.renderer.listen(i,"keydown",p),this.renderer.listen(i,"click",()=>{i.focus()}))})}}this.slider.on("set",(i,p,b)=>{this.eventHandler(this.set,i,p,b)}),this.slider.on("update",(i,p,b)=>{this.update.observers.length>0&&this.ngZone.run(()=>{this.update.emit(this.toValues(i))})}),this.slider.on("change",(i,p,b)=>{this.change.observers.length>0&&this.ngZone.run(()=>{this.change.emit(this.toValues(i))})}),this.slider.on("slide",(i,p,b)=>{this.eventHandler(this.slide,i,p,b)}),this.slider.on("start",(i,p,b)=>{this.start.observers.length>0&&this.ngZone.run(()=>{this.start.emit(this.toValues(i))})}),this.slider.on("end",(i,p,b)=>{this.end.observers.length>0&&this.ngZone.run(()=>{this.end.emit(this.toValues(i))})})}}return e.\u0275fac=function(t){return new(t||e)(at(mi),at(pi),at(ui))},e.\u0275cmp=w({type:e,selectors:[["nouislider"]],hostVars:2,hostBindings:function(t,a){t&2&&st("ng2-nouislider",!0)},inputs:{disabled:"disabled",behaviour:"behaviour",connect:"connect",limit:"limit",min:"min",max:"max",snap:"snap",animate:"animate",range:"range",step:"step",format:"format",pageSteps:"pageSteps",config:"config",keyboard:"keyboard",onKeydown:"onKeydown",tooltips:"tooltips"},outputs:{change:"change",update:"update",slide:"slide",set:"set",start:"start",end:"end"},features:[Si([{provide:Ti,useExisting:li(()=>e),multi:!0}]),di],decls:1,vars:1,template:function(t,a){t&1&&ue(0,"div"),t&2&&S("disabled",a.disabled?!0:void 0)},styles:["[_nghost-%COMP%]{display:block;margin-top:1rem;margin-bottom:1rem}"]}),e})();var ft=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function ar(e,n){if(e&1){let t=O();o(0,"button",6),k("click",function(i){M(t);let p=u(2);return E(p.setTargetMode(0,i))}),o(1,"div",7),m(2,"i",8),s(),d(3),l(4,"translate"),o(5,"div",9),m(6,"i",10),s()()}if(e&2){let t=u(2);r(2),f("ngClass",A(4,ft,t.targetMode===0,t.targetMode!==0)),r(),g(" ",c(4,2,"accessories.control.manual")," ")}}function sr(e,n){if(e&1){let t=O();o(0,"button",6),k("click",function(i){M(t);let p=u(2);return E(p.setTargetMode(1,i))}),o(1,"div",7),m(2,"i",8),s(),d(3),l(4,"translate"),o(5,"div",9),m(6,"i",10),s()()}if(e&2){let t=u(2);r(2),f("ngClass",A(4,ft,t.targetMode===1,t.targetMode!==1)),r(),g(" ",c(4,2,"accessories.control.auto")," ")}}function lr(e,n){if(e&1&&(o(0,"h6",12),d(1),l(2,"translate"),s(),o(3,"div",5),l(4,"translate"),C(5,ar,7,7,"button",13),C(6,sr,7,7,"button",13),s()),e&2){let t=u();r(),_(c(2,4,"accessories.control.mode")),r(2),S("aria-label",c(4,6,"accessories.control.mode_control")),r(2),x(t.targetModeValidValues.includes(0)?5:-1),r(),x(t.targetModeValidValues.includes(1)?6:-1)}}function cr(e,n){if(e&1){let t=O();o(0,"h6",12),d(1),l(2,"translate"),s(),o(3,"nouislider",14),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetRotationSpeed.value,i)||(p.targetRotationSpeed.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=u();r(),N("",c(2,6,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value,"%"),r(2),f("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),q("ngModel",t.targetRotationSpeed.value)}}var Ri=(()=>{class e{$activeModal=F(ee);service;targetState;targetMode;targetModeValidValues=[];targetRotationSpeed;targetRotationSpeedChanged=new ne;constructor(){this.targetRotationSpeedChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value),this.targetRotationSpeed.value&&!this.targetState?(this.targetState=1,"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!0)):!this.targetRotationSpeed.value&&this.targetState&&(this.targetState=0,"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(0):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!1))})}ngOnInit(){this.targetState="Active"in this.service.values?this.service.values.Active:this.service.values.On?1:0,this.targetMode=this.service.values.TargetAirPurifierState,"TargetAirPurifierState"in this.service.values&&(this.targetModeValidValues=this.service.getCharacteristic("TargetAirPurifierState").validValues),this.loadRotationSpeed()}setTargetState(t,a){this.targetState=t,"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.targetState):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(this.targetState===1),a.target.blur()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetAirPurifierState").setValue(this.targetMode),a.target.blur()}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadRotationSpeed(){let t=this.service.getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #add8e6, #416bdf)"})},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:25,vars:23,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),k("click",function(b){return i.setTargetState(0,b)}),o(9,"div",7),m(10,"i",8),s(),d(11),l(12,"translate"),o(13,"div",9),m(14,"i",10),s()(),o(15,"button",6),k("click",function(b){return i.setTargetState(1,b)}),o(16,"div",7),m(17,"i",8),s(),d(18),l(19,"translate"),o(20,"div",9),m(21,"i",10),s()()(),C(22,lr,7,8),C(23,cr,4,8),s(),m(24,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,9,"form.button_close")),r(3),S("aria-label",c(7,11,"accessories.control.state_control")),r(4),f("ngClass",A(17,ft,i.targetState===0,i.targetState!==0)),r(),g(" ",c(12,13,"accessories.control.off")," "),r(6),f("ngClass",A(20,ft,i.targetState===1,i.targetState!==1)),r(),g(" ",c(19,15,"accessories.control.on")," "),r(4),x(i.targetModeValidValues.length?22:-1),r(),x(i.targetRotationSpeed?23:-1))},dependencies:[J,se,le,ce,B,T],styles:[".purifying svg .air-wave{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5} .purifying svg .bottom-line{animation-delay:.4s}@keyframes _ngcontent-%COMP%_wave-motion{0%,to{transform:translateY(0);stroke-opacity:.5}50%{transform:translateY(2px);stroke-opacity:1}}"]})}return e})();var z=(()=>{class e{downTimeout;done=!1;touchInProgress=!1;touchStartTime=0;duration=350;longClick=Ht();shortClick=Ht();onEnter(t){this.shortClick.emit(t)}onMouseUp(t){!this.touchInProgress&&!this.isSyntheticEvent()&&(clearTimeout(this.downTimeout),this.done||(this.done=!0,this.shortClick.emit(t)))}onTouchEnd(t){clearTimeout(this.downTimeout),this.done||(this.done=!0,this.shortClick.emit(t)),setTimeout(()=>{this.touchInProgress=!1},150)}onMouseDown(t){if("touches"in t){this.touchInProgress=!0,this.done=!1,this.touchStartTime=Date.now(),t.cancelable&&this.isSafariMobile()&&t.preventDefault(),this.downTimeout=setTimeout(()=>{this.done||(this.done=!0,this.longClick.emit(t))},this.duration);return}!this.touchInProgress&&!this.isSyntheticEvent()&&t.button===0&&(this.done=!1,this.downTimeout=setTimeout(()=>{this.done||(this.done=!0,this.longClick.emit(t))},this.duration))}onMouseMove(){this.done=!0,clearTimeout(this.downTimeout)}isSyntheticEvent(){let t=Date.now()-this.touchStartTime;return this.touchInProgress&&t<300}isSafariMobile(){let t=navigator.userAgent;return/iPad|iPhone|iPod/.test(t)&&/Safari/.test(t)&&!/Chrome|CriOS|FxiOS|EdgiOS/.test(t)}ngOnDestroy(){clearTimeout(this.downTimeout),this.touchInProgress=!1}static \u0275fac=function(a){return new(a||e)};static \u0275dir=fi({type:e,selectors:[["","shortClick",""],["","longClick",""]],hostBindings:function(a,i){a&1&&k("keyup.enter",function(b){return i.onEnter(b)})("mouseup",function(b){return i.onMouseUp(b)})("touchend",function(b){return i.onTouchEnd(b)})("touchstart",function(b){return i.onMouseDown(b)})("mousedown",function(b){return i.onMouseDown(b)})("mousemove",function(b){return i.onMouseMove(b)})("touchmove",function(b){return i.onMouseMove(b)})},inputs:{duration:"duration"},outputs:{longClick:"longClick",shortClick:"shortClick"}})}return e})();var dr=(e,n)=>({"accessory-on":e,purifying:n});function pr(e,n){if(e&1&&(o(0,"div",18),d(1),s()),e&2){let t=u(2);r(),g("",t.service.values.RotationSpeed,"%")}}function mr(e,n){e&1&&(o(0,"div",18),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.on")))}function ur(e,n){if(e&1&&C(0,pr,2,1,"div",18)(1,mr,3,3,"div",18),e&2){let t=u();x("RotationSpeed"in t.service.values?0:1)}}function fr(e,n){e&1&&(o(0,"div",18),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.idle")))}function vr(e,n){e&1&&(o(0,"div",18),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.off")))}var Wi=(()=>{class e{$modal=F(te);hasTargetValidValues=!1;service;readyForControl=!1;ngOnInit(){"TargetAirPurifierState"in this.service.values&&(this.hasTargetValidValues=this.service.getCharacteristic("TargetAirPurifierState").validValues.length>0)}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&(this.hasTargetValidValues||"RotationSpeed"in this.service.values)){let t=this.$modal.open(Ri,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-air-purifier"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:23,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M3,3.0706147 C3.28945166,3.8007217 5.978098,4.1773883 10.0660175,4.2006147 C12.5085124,4.2144929 18.5053297,1.8514837 22.4060749,1.1943647 C24.1588716,0.898084 26.5955382,1.1756219 28.716875,2.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-wave"],["d","M3,9.0706147 C3.28945166,9.8007217 5.978098,10.1773883 10.0660175,10.2006147 C12.5085124,10.2144929 18.5053297,7.8514837 22.4060749,7.1943647 C24.1588716,6.898084 26.5955382,7.1756219 28.716875,8.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-wave","bottom-line"],["x1","7","y1","14","x2","25","y2","14","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","7","y1","14","x2","2","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","25","y1","14","x2","30","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","8","y1","16.5","x2","24","y2","16.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","7","y1","18.5","x2","25","y2","18.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","6","y1","20.5","x2","26","y2","20.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","2","y1","23","x2","30","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","30","y1","23","x2","30","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","2","y1","23","x2","2","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["cx","15.5","cy","27","r","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["x1","2","y1","31","x2","30","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"path",4)(6,"path",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"circle",15)(17,"line",16),s()(),H(),o(18,"div",17),d(19),s(),C(20,ur,2,1)(21,fr,3,3,"div",18)(22,vr,3,3,"div",18),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",A(8,dr,i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState!==0||i.service.values.On,i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState===2||i.service.values.On)),r(2),S("aria-label",c(3,6,"accessories.core.air_purifier")),r(17),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState===2||i.service.values.On?20:i.service.values.Active&&!("CurrentAirPurifierState"in i.service.values)||i.service.values.Active&&"CurrentAirPurifierState"in i.service.values&&i.service.values.CurrentAirPurifierState===1||i.service.values.On?21:22))},dependencies:[z,B,T],styles:[".purifying svg .air-wave{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5} .purifying svg .bottom-line{animation-delay:.4s}@keyframes _ngcontent-%COMP%_wave-motion{0%,to{transform:translateY(0);stroke-opacity:.5}50%{transform:translateY(2px);stroke-opacity:1}}"]})}return e})();var gr=()=>[3,4],hr=()=>[1,2],Cr=(e,n,t,a)=>({"accessory-on":e,"fill-red":n,"fill-orange":t,"fill-green":a}),xr=(e,n)=>({"grey-text":e,"red-text":n}),ji=(()=>{class e{service;labels=["Unknown","Excellent","Good","Fair","Inferior","Poor"];static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-air-quality-sensor"]],inputs:{service:"service"},decls:25,vars:17,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(5.1, 3) scale(0.68)"],["fill","#7f7f7f","d","M10.1435881,25.4905179 C10.286009,26.7050605 10.531254,27.9706077 10.8919121,29.2887103 C6.25942062,27.4175104 3.57173247,24.180341 2.39781526,19.889403 C1.54190101,16.760839 1.56931096,13.3702525 2.13724518,10.1783222 C2.1501971,10.1055292 2.17646546,9.96330988 2.17646546,9.96330988 C2.17646546,9.96330988 2.33770347,10.0208429 2.92620872,10.2769757 C4.60998953,11.0098007 6.29364519,11.9318703 7.85704035,13.0517448 C9.19214306,14.0080913 10.3087445,15.0188915 11.223018,16.0899229 L11.223018,16.0899229 C10.426841,18.1910249 9.96797687,20.5297906 9.99206994,23.1241613 L5.43414987,14.7605739 C5.30203551,14.5181498 4.99858593,14.4288208 4.75637627,14.5610522 C4.51416661,14.6932836 4.42491674,14.9970019 4.5570311,15.2394261 L10.1435881,25.4905179 Z M13.0333542,29.4136738 C10.9912074,19.9059085 11.088992,14.922477 21.5133004,6.73565972 C23.6127007,5.0868782 25.9746706,4.01306759 28.2881453,3.03596757 C29.0967374,2.69445726 29.3182746,2.61774651 29.3182746,2.61774651 C29.3182746,2.61774651 29.3543667,2.80737221 29.3721623,2.90442957 C30.1524904,7.1603367 30.190151,11.6811187 29.0141452,15.8525373 C27.1508473,22.4618551 22.5118613,27.1961122 14.1841552,29.413553 L25.4116309,9.74806947 C25.5485147,9.50831075 25.46529,9.20288341 25.2257434,9.06587843 C24.9861969,8.92887344 24.6810398,9.01217181 24.544156,9.25193053 L13.0333542,29.4136738 Z M13.4880693,32 C38.9655056,25.5 30.755735,0 30.755735,0 C30.755735,0 17.0308715,3.72274828 11.9893965,14.5 C7.99293593,9 0.873098889,8 0.873098889,8 C-3.99644586,30.5 13.4880693,32 13.4880693,32 Z",1,"leaves"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label",3,"ngClass"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4),o(6,"g",5),m(7,"path",6),s(),m(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),s()(),H(),o(21,"div",20),d(22),s(),o(23,"div",21),d(24),s()()()),a&2&&(f("ngClass",dt(9,Cr,i.service.values.AirQuality===5,i.service.values.AirQuality===5,_e(7,gr).includes(i.service.values.AirQuality),_e(8,hr).includes(i.service.values.AirQuality))),r(2),S("aria-label",c(3,5,"accessories.core.air_quality_sensor")),r(20),_(i.service.customName||i.service.serviceName),r(),f("ngClass",A(14,xr,i.service.values.AirQuality<5,i.service.values.AirQuality===5)),r(),g(" ",i.labels[i.service.values.AirQuality||0]," "))},dependencies:[B,T],styles:[".fill-red svg .leaves{fill:#d32f2f!important;fill-opacity:.5!important} .fill-orange svg .leaves{fill:#ff9800!important;fill-opacity:.5!important} .fill-green svg .leaves{fill:#4caf50!important;fill-opacity:.5!important}"]})}return e})();var _r=e=>({"accessory-on":e});function yr(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.battery_notcharging")," ")}function kr(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.battery_charging")," ")}function Sr(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.battery_notchargeable")," ")}function br(e,n){e&1&&(o(0,"span",10),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.battery_low")))}function wr(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.battery_charged")," ")}var Ui=(()=>{class e{service;Math=Math;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-battery"]],inputs:{service:"service"},decls:18,vars:12,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","5","height","13","rx","2","stroke","none","stroke-width","0"],["x","29.5","y","8","width","2","height","7","rx","2","stroke","none","fill","#7f7f7f","stroke-width","1"],["x","1","y","5","width","29","height","13","rx","2","stroke","#7f7f7f","fill","none","stroke-width","0.75"],["x","16","y","28","font-size","9","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"red-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6),o(8,"text",7),d(9),s()()(),H(),o(10,"div",8),d(11),s(),o(12,"div",9),C(13,yr,2,3)(14,kr,2,3)(15,Sr,2,3)(16,br,3,3,"span",10)(17,wr,2,3),s()()()),a&2&&(f("ngClass",$(10,_r,i.service.values.ChargingState===1)),r(2),S("aria-label",c(3,8,"accessories.core.battery")),r(3),S("width",i.Math.round(29/100*(i.service.values.BatteryLevel||0)))("fill",i.service.values.ChargingState===1?"#4caf50":i.service.values.StatusLowBattery===1?"#e69533":"#808080")("fill-opacity",i.service.values.ChargingState===1||i.service.values.StatusLowBattery===1?"0.5":"1"),r(4),g(" ",i.service.values.BatteryLevel||0,"% "),r(2),_(i.service.customName||i.service.serviceName),r(2),x(i.service.values.ChargingState===0?13:i.service.values.ChargingState===1?14:i.service.values.ChargingState===2?15:i.service.values.StatusLowBattery===1||i.service.values.BatteryLevel===0?16:17))},dependencies:[B,T],styles:['.batterylevel-battery[_ngcontent-%COMP%]{position:relative;width:75px;height:30px;border:1px solid rgb(128,128,128);border-radius:4px;margin-bottom:6px;text-align:center;display:flex;align-items:center;justify-content:center;color:#d3d3d3;font-size:14px}.batterylevel-battery[_ngcontent-%COMP%]:after{content:"";position:absolute;top:7px;right:-6px;width:6px;height:13px;background-color:gray;border-radius:2px}.batterylevel-battery[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;background-color:gray;z-index:1;transition:width .3s ease-in-out}.batterylevel-battery[_ngcontent-%COMP%] .battery-text[_ngcontent-%COMP%]{position:relative;z-index:2}.batterylevel-battery[_ngcontent-%COMP%] .battery-over[_ngcontent-%COMP%]{color:#d3d3d3}.batterylevel-battery[_ngcontent-%COMP%] .battery-under[_ngcontent-%COMP%]{color:gray}@media (max-width: 575px){.batterylevel-battery[_ngcontent-%COMP%]{width:50px;height:25px;font-size:12px}.batterylevel-battery[_ngcontent-%COMP%]:after{top:4px}}.lowbattery[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{background-color:#e69533}.charging[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{background-color:#4caf50}']})}return e})();var Tr=e=>({"accessory-on":e});function Mr(e,n){e&1&&(o(0,"div",16),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.detected")))}function Er(e,n){e&1&&(o(0,"div",17),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.not_detected")))}var $i=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-carbon-dioxide-sensor"]],inputs:{service:"service"},decls:21,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["d","M3,24.0706147 C3.28945166,24.8007217 5.978098,25.1773883 10.0660175,25.2006147 C12.5085124,25.2144929 18.5053297,22.8514837 22.4060749,22.1943647 C24.1588716,21.898084 26.5955382,22.1756219 28.716875,23.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],["d","M3,30.0706147 C3.28945166,30.8007217 5.978098,31.1773883 10.0660175,31.2006147 C12.5085124,31.2144929 18.5053297,28.8514837 22.4060749,28.1943647 C24.1588716,27.898084 26.5955382,28.1756219 28.716875,29.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4),o(6,"text",5),d(7," CO2 "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"path",13)(16,"path",14),s()(),H(),o(17,"div",15),d(18),s(),C(19,Mr,3,3,"div",16)(20,Er,3,3,"div",17),s()()),a&2&&(f("ngClass",$(6,Tr,i.service.values.CarbonDioxideDetected)),r(2),S("aria-label",c(3,4,"accessories.core.carbon_dioxide_sensor")),r(16),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.CarbonDioxideDetected?19:20))},dependencies:[B,T],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var Vr=e=>({"accessory-on":e});function Br(e,n){e&1&&(o(0,"div",16),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.detected")))}function Ar(e,n){e&1&&(o(0,"div",17),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.not_detected")))}var Gi=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-carbon-monoxide-sensor"]],inputs:{service:"service"},decls:21,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["d","M3,23 C6,25 9,21 12,23 C15,25 18,21 21,23 C24,25 27,21 30,23","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],["d","M3,30 C6,32 9,28 12,30 C15,32 18,28 21,30 C24,32 27,28 30,30","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4),o(6,"text",5),d(7," CO "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"path",13)(16,"path",14),s()(),H(),o(17,"div",15),d(18),s(),C(19,Br,3,3,"div",16)(20,Ar,3,3,"div",17),s()()),a&2&&(f("ngClass",$(6,Vr,i.service.values.CarbonMonoxideDetected)),r(2),S("aria-label",c(3,4,"accessories.core.carbon_monoxide_sensor")),r(16),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.CarbonMonoxideDetected?19:20))},dependencies:[B,T],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var Dr=e=>({"accessory-on":e});function Ir(e,n){e&1&&(o(0,"div",9),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.open")))}function Pr(e,n){e&1&&(o(0,"div",10),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.closed")))}var zi=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-contact-sensor"]],inputs:{service:"service"},decls:13,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"left-object"],["x","16","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"right-object"],["x","10","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"left-sensor"],["x","16","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"right-sensor"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7),s()(),H(),o(9,"div",8),d(10),s(),C(11,Ir,3,3,"div",9)(12,Pr,3,3,"div",10),s()()),a&2&&(f("ngClass",$(6,Dr,i.service.values.ContactSensorState)),r(2),S("aria-label",c(3,4,"accessories.core.contact_sensor")),r(8),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.ContactSensorState?11:12))},dependencies:[B,T],styles:[".accessory-on svg .left-sensor{fill:#ff9800;fill-opacity:.5} .accessory-on svg .right-object{x:24px} .accessory-on svg .right-sensor{x:24px;fill:#ff9800;fill-opacity:.5}"]})}return e})();function Fr(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.closed")," ")}function Hr(e,n){if(e&1&&(d(0),l(1,"translate")),e&2){let t=u(2);N(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function Lr(e,n){if(e&1&&C(0,Fr,2,3)(1,Hr,2,4),e&2){let t=u();x(t.service.values.CurrentPosition===0?0:1)}}function Or(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.opening"),"... ")}function Nr(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.closing"),"... ")}var qi=(()=>{class e{$activeModal=F(ee);service;targetMode;targetPositionChanged=new ne;targetPosition;constructor(){this.targetPositionChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service.values.PositionState=1:this.service.getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service.values.PositionState=0),this.service.getCharacteristic("TargetPosition").setValue(this.targetPosition.value)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetPosition()}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5)(7,"div",6),C(8,Lr,2,1)(9,Or,2,3)(10,Nr,2,3),s()(),o(11,"h6",7),d(12),l(13,"translate"),s(),o(14,"nouislider",8),K("ngModelChange",function(b){return Z(i.targetPosition.value,b)||(i.targetPosition.value=b),b}),k("ngModelChange",function(){return i.onTargetPositionChange()}),s(),o(15,"div",9)(16,"span",10),d(17),l(18,"translate"),s(),o(19,"span",10),d(20),l(21,"translate"),s()(),o(22,"h6",7),d(23),l(24,"translate"),s(),o(25,"nouislider",11),K("ngModelChange",function(b){return Z(i.service.getCharacteristic("CurrentPosition").value,b)||(i.service.getCharacteristic("CurrentPosition").value=b),b}),s(),o(26,"div",9)(27,"span",10),d(28),l(29,"translate"),s(),o(30,"span",10),d(31),l(32,"translate"),s()()(),m(33,"div",12),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,20,"form.button_close")),r(5),x(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),r(4),N("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),r(2),f("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),q("ngModel",i.targetPosition.value),r(3),_(c(18,24,"accessories.control.closed")),r(3),_(c(21,26,"accessories.control.open")),r(3),N(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),r(2),f("min",0)("max",100)("step",1)("disabled",!0),q("ngModel",i.service.getCharacteristic("CurrentPosition").value),r(3),_(c(29,30,"accessories.control.closed")),r(3),_(c(32,32,"accessories.control.open")))},dependencies:[ce,J,se,le,T],encapsulation:2})}return e})();var Rr=e=>({"accessory-on":e});function Wr(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.closed")," ")}function jr(e,n){if(e&1&&(d(0),l(1,"translate")),e&2){let t=u(2);N(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function Ur(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.open")," ")}function $r(e,n){if(e&1&&(o(0,"div",11),C(1,Wr,2,3),C(2,jr,2,4),C(3,Ur,2,3),s()),e&2){let t=u();r(),x(t.service.values.CurrentPosition===0?1:-1),r(),x(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),r(),x(t.service.values.CurrentPosition===100?3:-1)}}function Gr(e,n){e&1&&(o(0,"div",12),d(1),l(2,"translate"),s()),e&2&&(r(),g("",c(2,1,"accessories.control.opening"),"..."))}function zr(e,n){e&1&&(o(0,"div",12),d(1),l(2,"translate"),s()),e&2&&(r(),g("",c(2,1,"accessories.control.closing"),"..."))}var Zi=(()=>{class e{$modal=F(te);service;readyForControl=!1;onClick(){this.readyForControl&&(this.service.values.TargetPosition?this.service.getCharacteristic("TargetPosition").setValue(0):this.service.getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(qi,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-door"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:16,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","7.8","y","0.8","width","16.4","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","9.6","y","2.6","width","12.8","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline"],["x","11.2","y","4.2","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x","11.2","y","16.8","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x1","0","y1","31","x2","32","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x","19.25","y","15.87","width","1.55","height","0.05","stroke","#1976d2","fill","none","stroke-width","0.5","rx","10",1,"handle"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"line",8)(10,"rect",9),s()(),H(),o(11,"div",10),d(12),s(),C(13,$r,4,3,"div",11)(14,Gr,3,3,"div",12)(15,zr,3,3,"div",12),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(8,Rr,i.service.values.CurrentPosition)),r(2),S("aria-label",c(3,6,"accessories.core.door")),r(10),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.PositionState===2?13:i.service.values.PositionState===1?14:i.service.values.PositionState===0?15:-1))},dependencies:[z,B,T],styles:["svg .outline{transition:width 3s ease;width:12.8px} svg .panel{transition:width 3s ease;width:9.6px} svg .handle{visibility:visible;opacity:1;transition:opacity 3s ease,visibility 0s linear 3s} .accessory-on svg .outline{transition:width 3s ease;width:3.8px} .accessory-on svg .panel{transition:width 3s ease;width:.6px} .accessory-on svg .handle{visibility:hidden;opacity:0;transition:opacity 3s ease,visibility 0s linear 0s}"]})}return e})();var Ue=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function qr(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),k("click",function(i){M(t);let p=u();return E(p.setActive(0,i))}),o(3,"div",8),m(4,"i",9),s(),d(5),l(6,"translate"),o(7,"div",10),m(8,"i",11),s()(),o(9,"button",7),k("click",function(i){M(t);let p=u();return E(p.setActive(1,i))}),o(10,"div",8),m(11,"i",9),s(),d(12),l(13,"translate"),o(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=u();S("aria-label",c(1,5,"accessories.control.mode_control")),r(4),f("ngClass",A(11,Ue,t.service.values.Active===0,t.service.values.Active!==0)),r(),g(" ",c(6,7,"accessories.control.off")," "),r(6),f("ngClass",A(14,Ue,t.service.values.Active===1,t.service.values.Active!==1)),r(),g(" ",c(13,9,"accessories.control.on")," ")}}function Zr(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetState(0,i))}),o(3,"div",8),m(4,"i",9),s(),d(5),l(6,"translate"),o(7,"div",10),m(8,"i",11),s()(),o(9,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetState(1,i))}),o(10,"div",8),m(11,"i",9),s(),d(12),l(13,"translate"),o(14,"div",10),m(15,"i",11),s()(),o(16,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetState(2,i))}),o(17,"div",8),m(18,"i",9),s(),d(19),l(20,"translate"),o(21,"div",10),m(22,"i",11),s()()()}if(e&2){let t=u();S("aria-label",c(1,7,"accessories.control.media_control")),r(4),f("ngClass",A(15,Ue,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),r(),g(" ",c(6,9,"accessories.control.play")," "),r(6),f("ngClass",A(18,Ue,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),r(),g(" ",c(13,11,"accessories.control.pause")," "),r(6),f("ngClass",A(21,Ue,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),r(),g(" ",c(20,13,"accessories.control.stop")," ")}}function Kr(e,n){if(e&1){let t=O();o(0,"h6"),d(1),l(2,"translate"),s(),o(3,"div",12),l(4,"translate"),o(5,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(!1,i))}),o(6,"div",8),m(7,"i",9),s(),d(8),l(9,"translate"),o(10,"div",10),m(11,"i",11),s()(),o(12,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(!0,i))}),o(13,"div",8),m(14,"i",9),s(),d(15),l(16,"translate"),o(17,"div",10),m(18,"i",11),s()()()}if(e&2){let t=u();r(),g(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),r(2),S("aria-label",c(4,8,"accessories.control.mute_control")),r(4),f("ngClass",A(14,Ue,!t.targetMode,t.targetMode)),r(),g(" ",c(9,10,"accessories.control.not_mute")," "),r(6),f("ngClass",A(17,Ue,t.targetMode,!t.targetMode)),r(),g(" ",c(16,12,"accessories.control.mute")," ")}}function Qr(e,n){if(e&1){let t=O();o(0,"h6",13),d(1),l(2,"translate"),s(),o(3,"nouislider",14),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetVolume.value,i)||(p.targetVolume.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onVolumeStateChange())}),s()}if(e&2){let t=u();r(),N("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),r(2),f("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),q("ngModel",t.targetVolume.value)}}var Ki=(()=>{class e{$activeModal=F(ee);service;targetMode;targetVolume;targetVolumeChanged=new ne;constructor(){this.targetVolumeChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),a.target.blur()}setActive(t,a){this.service.getCharacteristic("Active").setValue(t),a.target.blur()}setTargetState(t,a){this.service.getCharacteristic("TargetMediaState").setValue(t),a.target.blur()}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4),C(6,qr,16,17,"div",5)(7,Zr,23,24,"div",5),C(8,Kr,19,20),C(9,Qr,4,8),s(),m(10,"div",6),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,5,"form.button_close")),r(3),x("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),r(2),x("Mute"in i.service.values?8:-1),r(),x(i.targetVolume?9:-1))},dependencies:[J,se,le,ce,B,T],encapsulation:2})}return e})();var Yr=()=>[0,1],Xr=(e,n)=>({"accessory-on":e,paused:n}),Jr=()=>["Speaker","SmartSpeaker"];function ea(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.play")," ")}function ta(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.pause")," ")}function ia(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.stop")," ")}function na(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function oa(e,n){if(e&1&&d(0),e&2){let t=u(3);g(" \xB7 ",t.service.values.Volume,"% ")}}function ra(e,n){if(e&1&&C(0,oa,1,1),e&2){let t=u(2);x("Volume"in t.service.values?0:-1)}}function aa(e,n){if(e&1&&(o(0,"div",7),C(1,ea,2,3)(2,ta,2,3)(3,ia,2,3),C(4,na,2,3)(5,ra,1,1),s()),e&2){let t,a=u();r(),x((t=a.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),r(3),x("Mute"in a.service.values&&a.service.values.Mute?4:5)}}function sa(e,n){e&1&&(m(0,"div",8),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.off"))}function la(e,n){e&1&&(m(0,"div",8),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.mute"))}function ca(e,n){if(e&1&&(o(0,"div",7),d(1),s()),e&2){let t=u();r(),g("",t.service.values.Volume,"%")}}function da(e,n){e&1&&(o(0,"div",7),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.on")))}function pa(e,n){e&1&&(o(0,"div",7),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.core.doorbell")))}var Qi=(()=>{class e{$modal=F(te);service;readyForControl=!1;onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active===0?1:0):"TargetMediaState"in this.service.values?this.service.getCharacteristic("TargetMediaState").setValue(this.service.values.TargetMediaState===0?1:0):"Mute"in this.service.values&&this.service.getCharacteristic("Mute").setValue(!this.service.values.Mute))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||"TargetMediaState"in this.service.values||"Volume"in this.service.values||"Mute"in this.service.values)){let t=this.$modal.open(Ki,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-doorbell"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:15,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","15","cy","16","r","5","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"circle",5),s()(),H(),o(7,"div",6),d(8),s(),C(9,aa,6,2,"div",7)(10,sa,2,3,"div",8)(11,la,2,3,"div",8)(12,ca,2,1,"div",7)(13,da,3,3,"div",7)(14,pa,3,3,"div",7),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",A(9,Xr,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?_e(8,Yr).includes(i.service.values.CurrentMediaState):"Mute"in i.service.values&&"Volume"in i.service.values?!i.service.values.Mute&&i.service.values.Volume>0:"Mute"in i.service.values&&!i.service.values.Mute,"CurrentMediaState"in i.service.values&&i.service.values.CurrentMediaState===1)),r(2),S("aria-label",c(3,6,"accessories.core.doorbell")),r(6),_(i.service.customName||i.service.serviceName),r(),x("CurrentMediaState"in i.service.values?9:"Active"in i.service.values&&!i.service.values.Active?10:"Mute"in i.service.values&&i.service.values.Mute?11:"Volume"in i.service.values?12:_e(12,Jr).includes(i.service.customType||i.service.type)?13:14))},dependencies:[z,B,T],encapsulation:2})}return e})();var vt=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function ma(e,n){if(e&1){let t=O();o(0,"h6",12),d(1),l(2,"translate"),s(),o(3,"div",13),l(4,"translate"),o(5,"button",6),k("click",function(i){M(t);let p=u();return E(p.setRotationDirection(0,i))}),o(6,"div",7),m(7,"i",8),s(),d(8),l(9,"translate"),o(10,"div",9),m(11,"i",10),s()(),o(12,"button",6),k("click",function(i){M(t);let p=u();return E(p.setRotationDirection(1,i))}),o(13,"div",7),m(14,"i",8),s(),d(15),l(16,"translate"),o(17,"div",9),m(18,"i",10),s()()()}if(e&2){let t=u();r(),_(c(2,6,"accessories.control.rotation_direction")),r(2),S("aria-label",c(4,8,"accessories.control.direction_control")),r(4),f("ngClass",A(14,vt,t.service.values.RotationDirection===0,t.service.values.RotationDirection!==0)),r(),g(" ",c(9,10,"accessories.control.rotation_clockwise")," "),r(6),f("ngClass",A(17,vt,t.service.values.RotationDirection===1,t.service.values.RotationDirection!==1)),r(),g(" ",c(16,12,"accessories.control.rotation_c_clockwise")," ")}}function ua(e,n){e&1&&d(0,"%")}function fa(e,n){if(e&1){let t=O();o(0,"h6",12),d(1),l(2,"translate"),C(3,ua,1,0),s(),o(4,"nouislider",14),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetRotationSpeed.value,i)||(p.targetRotationSpeed.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onTargetRotationSpeedChange())}),s()}if(e&2){let t=u();r(),N(" ",c(2,7,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value),r(2),x(t.targetRotationSpeed.unit==="percentage"?3:-1),r(),f("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),q("ngModel",t.targetRotationSpeed.value)}}var Yi=(()=>{class e{$activeModal=F(ee);service;targetMode;targetRotationSpeed;targetRotationSpeedChanged=new ne;hasRotationDirection=!1;constructor(){this.targetRotationSpeedChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value),this.targetRotationSpeed.value&&!this.targetMode?(this.targetMode=!0,"On"in this.service.values?this.service.getCharacteristic("On").setValue(this.targetMode):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.targetMode?1:0)):!this.targetRotationSpeed.value&&this.targetMode&&(this.targetMode=!1,"On"in this.service.values?this.service.getCharacteristic("On").setValue(this.targetMode):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.targetMode?1:0))})}ngOnInit(){this.targetMode="On"in this.service.values?this.service.values.On:this.service.values.Active===1,this.loadRotationSpeed(),"RotationDirection"in this.service.values&&(this.hasRotationDirection=!0)}setTargetMode(t,a){this.targetMode=t,"On"in this.service.values?this.service.getCharacteristic("On").setValue(this.targetMode):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.targetMode?1:0),this.targetMode&&this.targetRotationSpeed&&!this.targetRotationSpeed.value&&(this.targetRotationSpeed.value=this.service.getCharacteristic("RotationSpeed").maxValue),a.target.blur()}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}setRotationDirection(t,a){this.service.getCharacteristic("RotationDirection").setValue(t),a.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadRotationSpeed(){let t=this.service.getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep,unit:t.unit},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #add8e6, #416bdf)"})},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:25,vars:23,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),k("click",function(b){return i.setTargetMode(!1,b)}),o(9,"div",7),m(10,"i",8),s(),d(11),l(12,"translate"),o(13,"div",9),m(14,"i",10),s()(),o(15,"button",6),k("click",function(b){return i.setTargetMode(!0,b)}),o(16,"div",7),m(17,"i",8),s(),d(18),l(19,"translate"),o(20,"div",9),m(21,"i",10),s()()(),C(22,ma,19,20),C(23,fa,5,9),s(),m(24,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,9,"form.button_close")),r(3),S("aria-label",c(7,11,"accessories.control.mode_control")),r(4),f("ngClass",A(17,vt,!i.targetMode,i.targetMode)),r(),g(" ",c(12,13,"accessories.control.off")," "),r(6),f("ngClass",A(20,vt,i.targetMode,!i.targetMode)),r(),g(" ",c(19,15,"accessories.control.on")," "),r(4),x(i.hasRotationDirection?22:-1),r(),x(i.targetRotationSpeed?23:-1))},dependencies:[J,se,le,ce,B,T],encapsulation:2})}return e})();var va=e=>({"accessory-on":e}),ga=(e,n)=>({spin:e,"spin-counter":n});function ha(e,n){if(e&1&&(o(0,"div",8),d(1),s()),e&2){let t=u();r(),N("",t.service.values.RotationSpeed,"",t.rotationSpeedUnit)}}function Ca(e,n){if(e&1&&(m(0,"div",9),l(1,"translate")),e&2){let t=u();f("innerText",c(1,1,t.service.values.On||t.service.values.Active?"accessories.control.on":"accessories.control.off"))}}var Xi=(()=>{class e{$modal=F(te);service;readyForControl=!1;rotationSpeedUnit="";hasRotationDirection=!1;ngOnInit(){"RotationSpeed"in this.service.values&&this.service.serviceCharacteristics.find(a=>a.type==="RotationSpeed").unit==="percentage"&&(this.rotationSpeedUnit="%"),"RotationDirection"in this.service.values&&(this.hasRotationDirection=!0)}onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1),"RotationSpeed"in this.service.values&&!this.service.values.On&&!this.service.values.RotationSpeed&&(this.service.values.RotationSpeed=this.service.getCharacteristic("RotationSpeed").maxValue))}onLongClick(){if(this.readyForControl&&("RotationSpeed"in this.service.values||"RotationDirection"in this.service.values)){let t=this.$modal.open(Yi,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-fan"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:12,vars:14,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg",3,"ngClass"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["transform","translate(-0.85, 0.2) scale(0.99)"],["fill","#7f7f7f","fill-rule","evenodd","clip-rule","evenodd","d","M20.988 10.265c.382-.596.951-1.424 1.844-2.71C25.462 3.61 23.456 0 18 0c-6.263 0-10.09 5.649-6.835 11.923-.594-.382-1.416-.948-2.682-1.826-3.945-2.63-7.555-.625-7.555 4.832 0 6.308 5.73 10.145 12.057 6.763-.383.599-.958 1.436-1.872 2.753C8.485 28.39 10.49 32 15.947 32c6.267 0 10.095-5.655 6.83-11.932.593.382 1.412.946 2.668 1.818 3.945 2.63 7.555.625 7.555-4.832 0-6.293-5.703-10.127-12.012-6.788Zm-.407 2.602C26.101 8.924 31 11.805 31 17.053c0 3.877-1.845 4.902-4.445 3.169-2.525-1.761-3.46-2.385-4.406-2.763a7.87 7.87 0 0 0-1.01-.317c.105-.382.161-.785.161-1.2 0-1.327-.919-3.134-.919-3.134ZM18.405 10.85c.378-.946 1.001-1.88 2.763-4.405C22.902 3.845 21.877 2 18 2c-5.247 0-8.129 4.899-4.186 10.419 0 0 1.89-.919 3.186-.919.398 0 .783.052 1.15.149.064-.269.149-.533.255-.798ZM11.78 14.524c-.946-.378-1.88-1.001-4.405-2.763-2.6-1.734-4.445-.709-4.445 3.168 0 5.247 4.899 8.129 10.419 4.186 0 0-.848-1.812-.848-3.115 0-.416.057-.819.163-1.201a7.81 7.81 0 0 0-1.183-.275Zm3.763 6.625c-.378.946-1.001 1.88-2.763 4.405-1.734 2.6-.709 4.445 3.168 4.445 5.248 0 8.13-4.899 4.187-10.419 0 0-1.831.919-3.133.919-.416 0-.819-.057-1.201-.162a7.802 7.802 0 0 0-.258.812ZM17 19.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5-1.567 3.5-3.5 3.5Z",1,"fan-blades"],["cx","16","cy","16","r","3.6","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3)(5,"g",4),m(6,"path",5),s(),m(7,"circle",6),s()(),H(),o(8,"div",7),d(9),s(),C(10,ha,2,2,"div",8)(11,Ca,2,3,"div",9),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(9,va,i.service.values.On||i.service.values.Active)),r(2),f("ngClass",A(11,ga,(i.service.values.On||i.service.values.Active)&&(!i.hasRotationDirection||i.hasRotationDirection&&i.service.values.RotationDirection===0),(i.service.values.On||i.service.values.Active)&&i.hasRotationDirection&&i.service.values.RotationDirection===1)),S("aria-label",c(3,7,"accessories.core.fan")),r(7),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.On&&i.service.values.RotationSpeed?10:11))},dependencies:[z,B,T],styles:[".spin svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin 2s infinite linear;transform-origin:53.5% 50%} .spin-counter svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin-counter 2s infinite linear;transform-origin:53.5% 50%}@keyframes _ngcontent-%COMP%_fa-spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_fa-spin-counter{0%{transform:rotate(0)}to{transform:rotate(-359deg)}}"]})}return e})();var Ji=(()=>{class e{$activeModal=F(ee);service;targetMode;ngOnInit(){setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(a=>{a.style.background="linear-gradient(to right, #d32f2f, #e69533, #42d672, #42d672)"})},10)}resetFilterLife(t){this.service.getCharacteristic("ResetFilterIndication").setValue(1),t.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:16,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mb-4"],[3,"ngModelChange","min","max","step","disabled","ngModel"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mt-5","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"modal-footer"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),d(7),l(8,"translate"),s(),o(9,"nouislider",6),K("ngModelChange",function(b){return Z(i.service.values.FilterLifeLevel,b)||(i.service.values.FilterLifeLevel=b),b}),s(),o(10,"div",7),l(11,"translate"),o(12,"button",8),k("click",function(b){return i.resetFilterLife(b)}),d(13),l(14,"translate"),s()()(),m(15,"div",9),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,11,"form.button_close")),r(4),N("",c(8,13,"accessories.control.filter_level"),": ",i.service.values.FilterLifeLevel,"%"),r(2),f("min",0)("max",100)("step",1)("disabled",!0),q("ngModel",i.service.values.FilterLifeLevel),r(),S("aria-label",c(11,15,"accessories.core.filter_maintenance")),r(3),g(" ",c(14,17,"form.button_reset")," "))},dependencies:[J,se,le,ce,T],encapsulation:2})}return e})();var xa=(e,n)=>({replace:e,dirty:n}),_a=e=>({"red-text":e});function ya(e,n){e&1&&(d(0," \xB7 "),o(1,"span",28),d(2),l(3,"translate"),s()),e&2&&(r(2),_(c(3,1,"accessories.control.replace")))}var en=(()=>{class e{$modal=F(te);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(Ji,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-filter-maintenance"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:32,vars:15,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","7","rx","11","ry","5","stroke","#7f7f7f","stroke-width","1.75","fill","#4caf50","fill-opacity","0.5",1,"status"],["cx","16","cy","7","rx","6","ry","2","stroke","#7f7f7f","stroke-width","1","fill","#e0e0e0","fill-opacity","1",1,"back"],["x1","5","y1","7","x2","5","y2","27.7","stroke","#7f7f7f","stroke-width","1.75"],["x1","27","y1","7","x2","27","y2","27.7","stroke","#7f7f7f","stroke-width","1.75"],["d","M4.7,27 A13,6.9 0 0,0 27.3,27","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","7","y1","10","x2","7","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","11","x2","9","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","11","y1","12","x2","11","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","13","y1","12","x2","13","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","15","y1","12","x2","15","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","12","x2","17","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","19","y1","12","x2","19","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","21","y1","12","x2","21","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","23","y1","11","x2","23","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","25","y1","10","x2","25","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","11","y1","6","x2","11","y2","8","stroke","#7f7f7f","stroke-width","1"],["x1","13","y1","5","x2","13","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","15","y1","5","x2","15","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","5","x2","17","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","19","y1","5","x2","19","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","21","y1","6","x2","21","y2","8","stroke","#7f7f7f","stroke-width","1"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[3,"ngClass"],[1,"red-text"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"ellipse",4)(6,"ellipse",5)(7,"line",6)(8,"line",7)(9,"path",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24),s()(),H(),o(26,"div",25),d(27),s(),o(28,"div",26)(29,"span",27),d(30),s(),C(31,ya,4,3),s()()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",A(10,xa,i.service.values.FilterChangeIndication===1||i.service.values.FilterLifeLevel<10,i.service.values.FilterChangeIndication!==1&&i.service.values.FilterLifeLevel<50)),r(2),S("aria-label",c(3,8,"accessories.core.filter_maintenance")),r(25),_(i.service.customName||i.service.serviceName),r(2),f("ngClass",$(13,_a,i.service.values.FilterChangeIndication===1)),r(),g(" ",i.service.values.FilterLifeLevel,"% "),r(),x(i.service.values.FilterChangeIndication===1?31:-1))},dependencies:[B,z,T],styles:[".dirty svg .status{fill:#e69533!important} .replace svg .status{fill:#d32f2f!important} body.dark-mode svg .back{fill:#2b2b2b!important}"]})}return e})();var ka=()=>[0,2,3,4],Sa=(e,n,t,a,i,p,b)=>({"accessory-on":e,opening:n,open:t,closing:a,closed:i,stopped:p,obstructed:b});function ba(e,n){e&1&&(o(0,"div",30),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.obstructed")))}function wa(e,n){e&1&&(o(0,"div",30),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.open")))}function Ta(e,n){e&1&&(o(0,"div",31),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.closed")))}function Ma(e,n){e&1&&(o(0,"div",30),d(1),l(2,"translate"),s()),e&2&&(r(),g("",c(2,1,"accessories.control.opening"),"..."))}function Ea(e,n){e&1&&(o(0,"div",30),d(1),l(2,"translate"),s()),e&2&&(r(),g("",c(2,1,"accessories.control.closing"),"..."))}function Va(e,n){e&1&&(o(0,"div",30),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.stopped")))}function Ba(e,n){if(e&1&&C(0,wa,3,3,"div",30)(1,Ta,3,3,"div",31)(2,Ma,3,3,"div",30)(3,Ea,3,3,"div",30)(4,Va,3,3,"div",30),e&2){let t,a=u();x((t=a.service.values.CurrentDoorState)===0?0:t===1?1:t===2?2:t===3?3:t===4?4:-1)}}function Aa(e,n){e&1&&(o(0,"div",30),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.open")))}function Da(e,n){e&1&&(o(0,"div",31),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.closed")))}function Ia(e,n){if(e&1&&C(0,Aa,3,3,"div",30)(1,Da,3,3,"div",31),e&2){let t=u();x(t.service.values.On||t.service.values.Active?0:1)}}var tn=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("TargetDoorState"in this.service.values?this.service.getCharacteristic("TargetDoorState").setValue(this.service.values.TargetDoorState?0:1):"On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(!this.service.values.Active))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-garage-door-opener"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:35,vars:17,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","15.5","cy","10.25","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#1976d2","fill-opacity","0.5",1,"window"],["x1","1","y1","12","x2","15","y2","1","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","31","y1","12","x2","16","y2","1","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["cx","15.5","cy","1.3","r","0.5","stroke","#7f7f7f","stroke-width","1.5"],["x1","3","y1","11","x2","3","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","29","y1","11","x2","29","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","3","y1","31","x2","6","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","26","y1","31","x2","29","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","6","y1","17","x2","6","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap",""],["x1","26","y1","17","x2","26","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x1","5.25","y1","17","x2","26.75","y2","17","stroke","#7f7f7f","stroke-width","1"],["x1","6.75","y1","18","x2","25.25","y2","18","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line1"],["x1","5.25","y1","19","x2","26.75","y2","19","stroke","#7f7f7f","stroke-width","1",1,"line","line2"],["x1","6.75","y1","20","x2","25.25","y2","20","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line3"],["x1","5.25","y1","21","x2","26.75","y2","21","stroke","#7f7f7f","stroke-width","1",1,"line","line4"],["x1","6.75","y1","22","x2","25.25","y2","22","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line5"],["x1","5.25","y1","23","x2","26.75","y2","23","stroke","#7f7f7f","stroke-width","1",1,"line","line6"],["x1","6.75","y1","24","x2","25.25","y2","24","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line7"],["x1","5.25","y1","25","x2","26.75","y2","25","stroke","#7f7f7f","stroke-width","1",1,"line","line8"],["x1","6.75","y1","26","x2","25.25","y2","26","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line9"],["x1","5.25","y1","27","x2","26.75","y2","27","stroke","#7f7f7f","stroke-width","1",1,"line","line10"],["x1","6.75","y1","28","x2","25.25","y2","28","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line11"],["x1","5.25","y1","29","x2","26.75","y2","29","stroke","#7f7f7f","stroke-width","1",1,"line","line12"],["x1","6.75","y1","30","x2","25.25","y2","30","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line13"],["x1","5.25","y1","31","x2","26.75","y2","31","stroke","#7f7f7f","stroke-width","1",1,"line","line14"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0),k("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"circle",4)(6,"line",5)(7,"line",6)(8,"circle",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27)(29,"line",28),s()(),H(),o(30,"div",29),d(31),s(),C(32,ba,3,3,"div",30)(33,Ba,5,1)(34,Ia,2,1),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",wi(9,Sa,i.service.values.ObstructionDetected||_e(8,ka).includes(i.service.values.CurrentDoorState)||i.service.values.On||i.service.values.Active,i.service.values.CurrentDoorState===2&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===0&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===3&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===1&&!i.service.values.ObstructionDetected,i.service.values.CurrentDoorState===4&&!i.service.values.ObstructionDetected,i.service.values.ObstructionDetected)),r(2),S("aria-label",c(3,6,"accessories.core.garage_door_opener")),r(29),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.ObstructionDetected?32:"CurrentDoorState"in i.service.values?33:34))},dependencies:[z,B,T],styles:[".opening svg .window{fill:#ff9800!important;fill-opacity:.5!important} .opening svg .line{animation:_ngcontent-%COMP%_fade-out .5s ease-in-out forwards} .opening svg .line1{animation-delay:9.282s} .opening svg .line2{animation-delay:8.568s} .opening svg .line3{animation-delay:7.854s} .opening svg .line4{animation-delay:7.14s} .opening svg .line5{animation-delay:6.426s} .opening svg .line6{animation-delay:5.712s} .opening svg .line7{animation-delay:4.998s} .opening svg .line8{animation-delay:4.284s} .opening svg .line9{animation-delay:3.57s} .opening svg .line10{animation-delay:2.856s} .opening svg .line11{animation-delay:2.142s} .opening svg .line12{animation-delay:1.428s} .opening svg .line13{animation-delay:.714s} .opening svg .line14{animation-delay:0s}@keyframes _ngcontent-%COMP%_fade-out{to{opacity:0}} .open .window{fill:#d32f2f!important;fill-opacity:.5!important} .open .line{opacity:0} .closing svg .window{fill:#ff9800!important;fill-opacity:.5!important} .closing svg .line{opacity:0;animation:_ngcontent-%COMP%_fade-in .5s ease-in-out forwards} .closing svg .line1{animation-delay:0s} .closing svg .line2{animation-delay:.714s} .closing svg .line3{animation-delay:1.428s} .closing svg .line4{animation-delay:2.142s} .closing svg .line5{animation-delay:2.856s} .closing svg .line6{animation-delay:3.57s} .closing svg .line7{animation-delay:4.284s} .closing svg .line8{animation-delay:4.998s} .closing svg .line9{animation-delay:5.712s} .closing svg .line10{animation-delay:6.426s} .closing svg .line11{animation-delay:7.14s} .closing svg .line12{animation-delay:7.854s} .closing svg .line13{animation-delay:8.568s} .closing svg .line14{animation-delay:9.282s}@keyframes _ngcontent-%COMP%_fade-in{to{opacity:1}} .closed .window{fill:#4caf50!important;fill-opacity:.5!important} .closed .line{opacity:1} .stopped .window{fill:#d32f2f!important} .stopped .line7, .stopped .line8, .stopped .line9, .stopped .line10, .stopped .line11, .stopped .line12, .stopped .line13, .stopped .line14{opacity:0} .obstructed .window{animation:_ngcontent-%COMP%_flash 2s infinite;fill:#d32f2f!important}@keyframes _ngcontent-%COMP%_flash{0%,to{fill-opacity:.5}50%{fill-opacity:.1}} .obstructed .line7, .obstructed .line8, .obstructed .line9, .obstructed .line10, .obstructed .line11, .obstructed .line12, .obstructed .line13, .obstructed .line14{opacity:0}"]})}return e})();var Je=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Pa(e,n){if(e&1){let t=O();o(0,"button",8),k("click",function(i){M(t);let p=u(2);return E(p.setTargetMode(0,i))}),o(1,"div",9),m(2,"i",10),s(),d(3),l(4,"translate"),o(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=u(2);r(2),f("ngClass",A(4,Je,t.targetMode===0,t.targetMode!==0)),r(),g(" ",c(4,2,"accessories.control.auto")," ")}}function Fa(e,n){if(e&1){let t=O();o(0,"button",8),k("click",function(i){M(t);let p=u(2);return E(p.setTargetMode(1,i))}),o(1,"div",9),m(2,"i",10),s(),d(3),l(4,"translate"),o(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=u(2);r(2),f("ngClass",A(4,Je,t.targetMode===1,t.targetMode!==1)),r(),g(" ",c(4,2,"accessories.control.heat")," ")}}function Ha(e,n){if(e&1){let t=O();o(0,"button",8),k("click",function(i){M(t);let p=u(2);return E(p.setTargetMode(2,i))}),o(1,"div",9),m(2,"i",10),s(),d(3),l(4,"translate"),o(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=u(2);r(2),f("ngClass",A(4,Je,t.targetMode===2,t.targetMode!==2)),r(),g(" ",c(4,2,"accessories.control.cool")," ")}}function La(e,n){if(e&1&&(o(0,"h6",14),d(1),l(2,"translate"),s(),o(3,"div",15),l(4,"translate"),C(5,Pa,7,7,"button",16),C(6,Fa,7,7,"button",16),C(7,Ha,7,7,"button",16),s()),e&2){let t=u();r(),_(c(2,5,"accessories.control.mode")),r(2),S("aria-label",c(4,7,"accessories.control.mode_control")),r(2),x(t.targetStateValidValues.includes(0)?5:-1),r(),x(t.targetStateValidValues.includes(1)?6:-1),r(),x(t.targetStateValidValues.includes(2)?7:-1)}}function Oa(e,n){if(e&1){let t=O();o(0,"h6",17),d(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),s(),o(9,"nouislider",18),K("ngModelChange",function(i){M(t);let p=u(2);return Z(p.autoTemp,i)||(p.autoTemp=i),E(i)}),k("ngModelChange",function(){M(t);let i=u(2);return E(i.onAutoTemperatureStateChange())}),s()}if(e&2){let t=u(2);r(),lt(" ",c(2,9,"accessories.control.target_auto"),": ",me(4,13,c(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",c(5,16,t.temperatureUnits)," - ",me(7,20,c(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",c(8,23,t.temperatureUnits)," "),r(8),f("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),q("ngModel",t.autoTemp)}}function Na(e,n){if(e&1){let t=O();o(0,"h6",14),d(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),o(6,"nouislider",18),K("ngModelChange",function(i){M(t);let p=u(2);return Z(p.targetHeatingTemp,i)||(p.targetHeatingTemp=i),E(i)}),k("ngModelChange",function(){M(t);let i=u(2);return E(i.onTemperatureStateChange())}),s()}if(e&2){let t=u(2);r(),Le(" ",c(2,7,"accessories.control.target_auto"),": ",me(4,11,c(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),f("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),q("ngModel",t.targetHeatingTemp)}}function Ra(e,n){if(e&1){let t=O();o(0,"h6",14),d(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),o(6,"nouislider",18),K("ngModelChange",function(i){M(t);let p=u(2);return Z(p.targetCoolingTemp,i)||(p.targetCoolingTemp=i),E(i)}),k("ngModelChange",function(){M(t);let i=u(2);return E(i.onTemperatureStateChange())}),s()}if(e&2){let t=u(2);r(),Le(" ",c(2,7,"accessories.control.target_auto"),": ",me(4,11,c(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),f("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),q("ngModel",t.targetCoolingTemp)}}function Wa(e,n){if(e&1&&C(0,Oa,10,25)(1,Na,7,16)(2,Ra,7,16),e&2){let t=u();x(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var nn=(()=>{class e{$activeModal=F(ee);$settings=F(Be);service;type;temperatureUnits=this.$settings.env.temperatureUnits;targetState;targetMode;targetTemperatureChanged=new ne;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;constructor(){this.targetTemperatureChanged.pipe(oe(500)).subscribe(()=>{this.HeatingThresholdTemperature&&this.service.getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service.getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp)})}ngOnInit(){this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHeaterCoolerState,this.CoolingThresholdTemperature=this.service.getCharacteristic("CoolingThresholdTemperature"),this.HeatingThresholdTemperature=this.service.getCharacteristic("HeatingThresholdTemperature"),this.targetStateValidValues=this.service.getCharacteristic("TargetHeaterCoolerState").validValues,this.loadTargetTemperature(),setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(a=>{a.style.background="linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}setTargetState(t,a){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetTemperature(),a.target.blur()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetHeaterCoolerState").setValue(this.targetMode),this.loadTargetTemperature(),a.target.blur()}onTemperatureStateChange(){this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetTemperatureChanged.next(void 0)}onAutoTemperatureStateChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.targetTemperatureChanged.next(void 0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetTemperature(){this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type"},decls:31,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"mt-4","mb-1"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),m(7,"i",6),d(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),s(),o(12,"div",7),l(13,"translate"),o(14,"button",8),k("click",function(b){return i.setTargetState(0,b)}),o(15,"div",9),m(16,"i",10),s(),d(17),l(18,"translate"),o(19,"div",11),m(20,"i",12),s()(),o(21,"button",8),k("click",function(b){return i.setTargetState(1,b)}),o(22,"div",9),m(23,"i",10),s(),d(24),l(25,"translate"),o(26,"div",11),m(27,"i",12),s()()(),C(28,La,8,9),C(29,Wa,3,1),s(),m(30,"div",13),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,13,"form.button_close")),r(4),j("color",i.service.values.CurrentHeaterCoolerState===3&&i.service.values.Active===1||i.type==="cooler"&&(i.service.values.Active||i.service.values.On)?"#1e8bbd":i.service.values.CurrentHeaterCoolerState===2&&i.service.values.Active===1||i.type==="heater"&&(i.service.values.Active||i.service.values.On)?"#e69533":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),r(),N("",me(10,17,c(9,15,i.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(11,20,i.temperatureUnits)," "),r(4),S("aria-label",c(13,22,"accessories.control.state_control")),r(4),f("ngClass",A(28,Je,i.targetState===0,i.targetState!==0)),r(),g(" ",c(18,24,"accessories.control.off")," "),r(6),f("ngClass",A(31,Je,i.targetState===1,i.targetState!==1)),r(),g(" ",c(25,26,"accessories.control.on")," "),r(4),x(i.targetStateValidValues.length?28:-1),r(),x(i.targetStateValidValues.includes(0)?29:-1))},dependencies:[B,J,se,le,ce,Ve,T,Ie,De],encapsulation:2})}return e})();var ja=e=>({"accessory-on":e});function Ua(e,n){if(e&1&&(D(),o(0,"text",23),d(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),s()),e&2){let t=u();r(),N(" ",me(3,4,c(2,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function $a(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.off")," ")}function Ga(e,n){if(e&1&&(m(0,"i",26),d(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),l(5,"convertTemp"),l(6,"number"),l(7,"uppercase")),e&2){let t=u(2);r(),ki(" ",me(3,6,c(2,4,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,9,t.temperatureUnits)," - ",me(6,13,c(5,11,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(7,16,t.temperatureUnits)," ")}}function za(e,n){if(e&1&&(m(0,"i",26),d(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=u(2);r(),N(" ",me(3,4,c(2,2,t.service.values.HeatingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function qa(e,n){if(e&1&&(m(0,"i",26),d(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=u(2);r(),N(" ",me(3,4,c(2,2,t.service.values.CoolingThresholdTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function Za(e,n){if(e&1&&C(0,Ga,8,18)(1,za,5,9)(2,qa,5,9),e&2){let t=u();x(t.hasHeating&&t.hasCooling?0:t.hasHeating&&!t.hasCooling?1:!t.hasHeating&&t.hasCooling?2:-1)}}function Ka(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.heat")," ")}function Qa(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.cool")," ")}function Ya(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.on")," ")}var on=(()=>{class e{$modal=F(te);$settings=F(Be);service;readyForControl=!1;type;temperatureUnits=this.$settings.env.temperatureUnits;hasHeating=!1;hasCooling=!1;ngOnInit(){this.hasHeating="HeatingThresholdTemperature"in this.service.values,this.hasCooling="CoolingThresholdTemperature"in this.service.values}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"TargetHeaterCoolerState"in this.service.values){let t=this.$modal.open(nn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-heater-cooler"]],inputs:{service:"service",readyForControl:"readyForControl",type:"type"},decls:36,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","8","y1","7","x2","8","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","12","y1","7","x2","12","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","16","y1","7","x2","16","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","20","y1","7","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","24","y1","7","x2","24","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x","3.5","y","4","width","25","height","15","rx","0","stroke","#7f7f7f","stroke-width","1.2","fill-opacity","0.5"],["x","16","y","27.5","font-size","7","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),o(9,"stop",7),m(10,"animate",8),s(),o(11,"stop",9),m(12,"animate",6),s()(),o(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),o(16,"stop",13),m(17,"animate",14),s(),o(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"rect",22),C(27,Ua,5,9,":svg:text",23),s()(),H(),o(28,"div",24),d(29),s(),o(30,"div",25),C(31,$a,2,3)(32,Za,3,1)(33,Ka,2,3)(34,Qa,2,3)(35,Ya,2,3),s()()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(10,ja,i.service.values.Active||i.service.values.On)),r(2),S("aria-label",c(3,8,"accessories.core.heater_cooler")),r(24),S("fill",i.service.values.CurrentHeaterCoolerState===3&&i.service.values.Active===1||i.type==="cooler"&&(i.service.values.Active||i.service.values.On)?"url(#coolingGradient)":i.service.values.CurrentHeaterCoolerState===2&&i.service.values.Active===1||i.type==="heater"&&(i.service.values.Active||i.service.values.On)?"url(#heatingGradient)":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),r(),x("CurrentTemperature"in i.service.values?27:-1),r(2),_(i.service.customName||i.service.serviceName),r(2),x("Active"in i.service.values&&!i.service.values.Active||"On"in i.service.values&&!i.service.values.On?31:i.service.values.TargetHeaterCoolerState===0&&(i.hasHeating||i.hasCooling)?32:i.service.values.TargetHeaterCoolerState===1?33:i.service.values.TargetHeaterCoolerState===2?34:35))},dependencies:[z,B,Ve,T,Ie,De],encapsulation:2})}return e})();var et=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Xa(e,n){if(e&1){let t=O();o(0,"button",8),k("click",function(i){M(t);let p=u(2);return E(p.setTargetMode(0,i))}),o(1,"div",9),m(2,"i",10),s(),d(3),l(4,"translate"),o(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=u(2);r(2),f("ngClass",A(4,et,t.targetMode===0,t.targetMode!==0)),r(),g(" ",c(4,2,"accessories.control.auto")," ")}}function Ja(e,n){if(e&1){let t=O();o(0,"button",8),k("click",function(i){M(t);let p=u(2);return E(p.setTargetMode(1,i))}),o(1,"div",9),m(2,"i",10),s(),d(3),l(4,"translate"),o(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=u(2);r(2),f("ngClass",A(4,et,t.targetMode===1,t.targetMode!==1)),r(),g(" ",c(4,2,"accessories.control.humidify")," ")}}function es(e,n){if(e&1){let t=O();o(0,"button",8),k("click",function(i){M(t);let p=u(2);return E(p.setTargetMode(2,i))}),o(1,"div",9),m(2,"i",10),s(),d(3),l(4,"translate"),o(5,"div",11),m(6,"i",12),s()()}if(e&2){let t=u(2);r(2),f("ngClass",A(4,et,t.targetMode===2,t.targetMode!==2)),r(),g(" ",c(4,2,"accessories.control.dehumidify")," ")}}function ts(e,n){if(e&1&&(o(0,"h6",14),d(1),l(2,"translate"),s(),o(3,"div",15),l(4,"translate"),C(5,Xa,7,7,"button",16),C(6,Ja,7,7,"button",16),C(7,es,7,7,"button",16),s()),e&2){let t=u();r(),_(c(2,5,"accessories.control.mode")),r(2),S("aria-label",c(4,7,"accessories.control.mode_control")),r(2),x(t.targetStateValidValues.includes(0)?5:-1),r(),x(t.targetStateValidValues.includes(1)?6:-1),r(),x(t.targetStateValidValues.includes(2)?7:-1)}}function is(e,n){if(e&1){let t=O();o(0,"h6",14),d(1),l(2,"translate"),s(),o(3,"nouislider",17),K("ngModelChange",function(i){M(t);let p=u(2);return Z(p.autoHumidity,i)||(p.autoHumidity=i),E(i)}),k("ngModelChange",function(){M(t);let i=u(2);return E(i.onAutoHumidityStateChange())}),s()}if(e&2){let t=u(2);r(),Le(" ",c(2,7,"accessories.control.target_auto"),": ",t.autoHumidity[0],"% - ",t.autoHumidity[1],"% "),r(2),f("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),q("ngModel",t.autoHumidity)}}function ns(e,n){if(e&1){let t=O();o(0,"h6",14),d(1),l(2,"translate"),s(),o(3,"nouislider",17),K("ngModelChange",function(i){M(t);let p=u(2);return Z(p.targetHumidifierHumidity,i)||(p.targetHumidifierHumidity=i),E(i)}),k("ngModelChange",function(){M(t);let i=u(2);return E(i.onHumidityStateChange())}),s()}if(e&2){let t=u(2);r(),N("",c(2,6,"accessories.control.target_auto"),": ",t.targetHumidifierHumidity,"%"),r(2),f("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityHumidifierThreshold.maxValue)("step",t.RelativeHumidityHumidifierThreshold.minStep),q("ngModel",t.targetHumidifierHumidity)}}function os(e,n){if(e&1){let t=O();o(0,"h6",14),d(1),l(2,"translate"),s(),o(3,"nouislider",17),K("ngModelChange",function(i){M(t);let p=u(2);return Z(p.targetDehumidifierHumidity,i)||(p.targetDehumidifierHumidity=i),E(i)}),k("ngModelChange",function(){M(t);let i=u(2);return E(i.onHumidityStateChange())}),s()}if(e&2){let t=u(2);r(),N("",c(2,6,"accessories.control.target_auto"),": ",t.targetDehumidifierHumidity,"%"),r(2),f("min",t.RelativeHumidityDehumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),q("ngModel",t.targetDehumidifierHumidity)}}function rs(e,n){if(e&1&&C(0,is,4,9)(1,ns,4,8)(2,os,4,8),e&2){let t=u();x(t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?0:t.RelativeHumidityHumidifierThreshold&&!t.RelativeHumidityDehumidifierThreshold?1:!t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?2:-1)}}var rn=(()=>{class e{$activeModal=F(ee);service;type;targetState;targetMode;targetHumidityChanged=new ne;targetStateValidValues=[];RelativeHumidityDehumidifierThreshold;RelativeHumidityHumidifierThreshold;targetDehumidifierHumidity;targetHumidifierHumidity;autoHumidity;constructor(){this.targetHumidityChanged.pipe(oe(500)).subscribe(()=>{this.RelativeHumidityHumidifierThreshold&&this.service.getCharacteristic("RelativeHumidityHumidifierThreshold").setValue(this.targetHumidifierHumidity),this.RelativeHumidityDehumidifierThreshold&&this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold").setValue(this.targetDehumidifierHumidity)})}ngOnInit(){this.targetState=this.service.values.Active,this.targetMode=this.service.values.TargetHumidifierDehumidifierState,this.RelativeHumidityDehumidifierThreshold=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold"),this.RelativeHumidityHumidifierThreshold=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold"),this.targetStateValidValues=this.service.getCharacteristic("TargetHumidifierDehumidifierState").validValues,this.loadTargetHumidity(),setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(a=>{a.style.background="linear-gradient(to left, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}loadTargetHumidity(){this.targetDehumidifierHumidity=this.service.getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service.getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity]}setTargetState(t,a){this.targetState=t,this.service.getCharacteristic("Active").setValue(this.targetState),this.loadTargetHumidity(),a.target.blur()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetHumidifierDehumidifierState").setValue(this.targetMode),this.loadTargetHumidity(),a.target.blur()}onHumidityStateChange(){this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity],this.targetHumidityChanged.next(void 0)}onAutoHumidityStateChange(){this.targetHumidifierHumidity=this.autoHumidity[0],this.targetDehumidifierHumidity=this.autoHumidity[1],this.targetHumidityChanged.next(void 0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service",type:"type"},decls:28,vars:26,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),m(7,"i",6),d(8),s(),o(9,"div",7),l(10,"translate"),o(11,"button",8),k("click",function(b){return i.setTargetState(0,b)}),o(12,"div",9),m(13,"i",10),s(),d(14),l(15,"translate"),o(16,"div",11),m(17,"i",12),s()(),o(18,"button",8),k("click",function(b){return i.setTargetState(1,b)}),o(19,"div",9),m(20,"i",10),s(),d(21),l(22,"translate"),o(23,"div",11),m(24,"i",12),s()()(),C(25,ts,8,9),C(26,rs,3,1),s(),m(27,"div",13),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,12,"form.button_close")),r(4),j("color",i.service.values.CurrentHumidifierDehumidifierState===2&&i.service.values.Active===1||i.type==="humidifier"&&(i.service.values.Active||i.service.values.On)?"#1e8bbd":i.service.values.CurrentHumidifierDehumidifierState===3&&i.service.values.Active===1||i.type==="dehumidifier"&&(i.service.values.Active||i.service.values.On)?"#e69533":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),r(),g("",i.service.values.CurrentRelativeHumidity,"% "),r(),S("aria-label",c(10,14,"accessories.control.state_control")),r(4),f("ngClass",A(20,et,i.targetState===0,i.targetState!==0)),r(),g(" ",c(15,16,"accessories.control.off")," "),r(6),f("ngClass",A(23,et,i.targetState===1,i.targetState!==1)),r(),g(" ",c(22,18,"accessories.control.on")," "),r(4),x(i.targetStateValidValues.length?25:-1),r(),x(i.targetStateValidValues.includes(0)?26:-1))},dependencies:[B,J,se,le,ce,T],encapsulation:2})}return e})();var as=e=>({"accessory-on":e});function ss(e,n){if(e&1&&(D(),o(0,"text",36),d(1),s()),e&2){let t=u();r(),g(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function ls(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.off")," ")}function cs(e,n){if(e&1&&(m(0,"i",39),d(1)),e&2){let t=u(2);r(),N(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% - ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function ds(e,n){if(e&1&&(m(0,"i",39),d(1)),e&2){let t=u(2);r(),g(" ",t.service.values.RelativeHumidityHumidifierThreshold,"% ")}}function ps(e,n){if(e&1&&(m(0,"i",39),d(1)),e&2){let t=u(2);r(),g(" ",t.service.values.RelativeHumidityDehumidifierThreshold,"% ")}}function ms(e,n){if(e&1&&C(0,cs,2,2)(1,ds,2,1)(2,ps,2,1),e&2){let t=u();x(t.hasHumidifier&&t.hasDehumidifier?0:t.hasHumidifier&&!t.hasDehumidifier?1:!t.hasHumidifier&&t.hasDehumidifier?2:-1)}}function us(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.humidify")," ")}function fs(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.dehumidify")," ")}function vs(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.on")," ")}function gs(e,n){if(e&1&&C(0,fs,2,3)(1,vs,2,3),e&2){let t=u();x(t.service.values.TargetHumidifierDehumidifierState===2?0:1)}}var an=(()=>{class e{$modal=F(te);service;readyForControl=!1;type;hasHumidifier=!1;hasDehumidifier=!1;ngOnInit(){this.hasHumidifier="RelativeHumidityHumidifierThreshold"in this.service.values,this.hasDehumidifier="RelativeHumidityDehumidifierThreshold"in this.service.values}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"TargetHumidifierDehumidifierState"in this.service.values){let t=this.$modal.open(rn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-humidifier-dehumidifier"]],inputs:{service:"service",readyForControl:"readyForControl",type:"type"},decls:48,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","humidifyingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","dehumidifyingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","3.5","width","30","height","25","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","6","y1","10","x2","6","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","6","y1","12","x2","6","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","6","y1","14","x2","6","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","10","x2","10","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","12","x2","10","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","14","x2","10","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","10","x2","14","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","12","x2","14","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","14","x2","14","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","10","x2","18","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","12","x2","18","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","14","x2","18","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","10","x2","22","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","12","x2","22","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","10","x2","26","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","12","x2","26","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","14","x2","26","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x","1","y","7","width","30","height","10","rx","0","stroke","#7f7f7f","stroke-width","1.2","fill-opacity","0.5"],["x","16.5","y","25.5","font-size","7","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),o(9,"stop",7),m(10,"animate",8),s(),o(11,"stop",9),m(12,"animate",6),s()(),o(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),o(16,"stop",13),m(17,"animate",14),s(),o(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"line",22)(27,"line",23)(28,"line",24)(29,"line",25)(30,"line",26)(31,"line",27)(32,"line",28)(33,"line",29)(34,"line",30)(35,"line",31)(36,"line",32)(37,"line",33)(38,"line",34)(39,"rect",35),C(40,ss,2,1,":svg:text",36),s()(),H(),o(41,"div",37),d(42),s(),o(43,"div",38),C(44,ls,2,3)(45,ms,3,1)(46,us,2,3)(47,gs,2,1),s()()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(10,as,i.service.values.Active||i.service.values.On)),r(2),S("aria-label",c(3,8,"accessories.core.humidifier_dehumidifier")),r(37),S("fill",i.service.values.CurrentHumidifierDehumidifierState===2&&i.service.values.Active===1||i.type==="humidifier"&&(i.service.values.Active||i.service.values.On)?"url(#humidifyingGradient)":i.service.values.CurrentHumidifierDehumidifierState===3&&i.service.values.Active===1||i.type==="dehumidifier"&&(i.service.values.Active||i.service.values.On)?"url(#dehumidifyingGradient)":i.service.values.Active||i.service.values.On?"#42d672":"#7b7b7b"),r(),x("CurrentRelativeHumidity"in i.service.values?40:-1),r(2),_(i.service.customName||i.service.serviceName),r(2),x("Active"in i.service.values&&!i.service.values.Active||"On"in i.service.values&&!i.service.values.On?44:i.service.values.TargetHumidifierDehumidifierState===0&&(i.hasHumidifier||i.hasDehumidifier)?45:i.service.values.TargetHumidifierDehumidifierState===1?46:47))},dependencies:[z,B,T],encapsulation:2})}return e})();function hs(e,n){if(e&1&&d(0),e&2){let t=u();g(" ",t.service.values.CurrentRelativeHumidity,"% ")}}function Cs(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.no_data")," ")}var sn=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-humidity-sensor"]],inputs:{service:"service"},decls:26,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(1.8, -4.3), scale(0.85)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.4","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(G(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),G(4,"svg",3),ue(5,"rect",4),G(6,"g",5),ue(7,"path",6),Y(),ue(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),Y()(),H(),G(21,"div",20),d(22),Y(),G(23,"div",21),C(24,hs,1,1)(25,Cs,2,3),Y()()()),a&2&&(r(2),S("aria-label",c(3,3,"accessories.core.humidity_sensor")),r(20),_(i.service.customName||i.service.serviceName),r(2),x("CurrentRelativeHumidity"in i.service.values?24:25))},dependencies:[T],styles:[".humidity-drop[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:50px;line-height:42px;border-radius:5% 55% 70%;font-size:14px;text-align:center;margin-bottom:6px;margin-top:9px;background-color:gray;color:#d3d3d3;transform:rotate(45deg)}@media (max-width: 575px){.humidity-drop-collapse[_ngcontent-%COMP%]{width:31px;height:31px;line-height:28px;font-size:10px;margin-bottom:7px;margin-top:5px}.humidity-drop-collapse[_ngcontent-%COMP%] .humidity-drop-text[_ngcontent-%COMP%]{margin-left:-2px}}.humidity-drop-text[_ngcontent-%COMP%]{transform:rotate(-45deg);margin-left:-5px}"]})}return e})();var xs=e=>({"accessory-on":e});function _s(e,n){e&1&&(o(0,"div",14),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.running")))}function ys(e,n){e&1&&(o(0,"div",14),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.off")))}var ln=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-irrigation-system"]],inputs:{service:"service"},decls:18,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","9","y","1","width","14","height","6.5","rx","2","fill","#1976d2","stroke","#7b7b7b","stroke-width","0.5","fill-opacity","0.5"],["x1","16","y1","8","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","9","x2","31","y2","9","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","20","x2","31","y2","20","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","31","x2","31","y2","31","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x","1","y","10","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","17","y","10","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","1","y","21","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","17","y","21","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"rect",9)(11,"rect",10)(12,"rect",11)(13,"rect",12),s()(),H(),o(14,"div",13),d(15),s(),C(16,_s,3,3,"div",14)(17,ys,3,3,"div",14),s()()),a&2&&(f("ngClass",$(6,xs,i.service.values.InUse)),r(2),S("aria-label",c(3,4,"accessories.core.irrigation_system")),r(13),g(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),r(),x(i.service.values.InUse?16:17))},dependencies:[B,T],styles:[".accessory-on svg .field{fill:#4caf50} .accessory-on svg .pipe{animation:_ngcontent-%COMP%_pulse 5s infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{stroke:#7f7f7f;stroke-opacity:.5}50%{stroke:#1976d2;stroke-opacity:1}}"]})}return e})();var ks=e=>({"accessory-on":e});function Ss(e,n){e&1&&(o(0,"div",23),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.detected")))}function bs(e,n){e&1&&(o(0,"div",24),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.not_detected")))}var cn=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-leak-sensor"]],inputs:{service:"service"},decls:28,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"red-outline"],["transform","translate(7, 0), scale(0.35)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","1"],["transform","translate(13, 7), scale(0.35)"],["cx","16","cy","22","rx","10","ry","2","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","0.35"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4),o(6,"g",5),m(7,"path",6),s(),o(8,"g",7),m(9,"path",6),s(),m(10,"ellipse",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16)(19,"line",17)(20,"line",18)(21,"line",19)(22,"line",20)(23,"line",21),s()(),H(),o(24,"div",22),d(25),s(),C(26,Ss,3,3,"div",23)(27,bs,3,3,"div",24),s()()),a&2&&(f("ngClass",$(6,ks,i.service.values.LeakDetected)),r(2),S("aria-label",c(3,4,"accessories.core.leak_sensor")),r(23),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.LeakDetected?26:27))},dependencies:[B,T],styles:[".accessory-on svg .red-outline{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function ws(e,n){if(e&1&&(G(0,"div",28),d(1),l(2,"number"),Y()),e&2){let t=u();r(),g("",me(2,1,t.service.values.CurrentAmbientLightLevel,"0.1-1")," lux")}}function Ts(e,n){if(e&1&&(G(0,"div",28),d(1),l(2,"number"),Y()),e&2){let t=u();r(),g("",me(2,1,t.service.values.CurrentAmbientLightLevel,"1.0-0")," lux")}}var dn=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-light-sensor"]],inputs:{service:"service"},decls:32,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["cx","16","cy","13.75","r","5","stroke","#ff9800","fill","none","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","3","x2","16","y2","7","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","23.5","y1","6","x2","20.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","22.75","y1","13.5","x2","26.75","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","20.75","y1","18.25","x2","23.75","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","20.5","x2","16","y2","24.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","11.25","y1","18.25","x2","8.25","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","5.25","y1","13.5","x2","9.25","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","8.5","y1","6","x2","11.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(G(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),G(4,"svg",3),ue(5,"rect",4)(6,"circle",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26),Y()(),H(),G(28,"div",27),d(29),Y(),C(30,ws,3,4,"div",28)(31,Ts,3,4,"div",28),Y()()),a&2&&(r(2),S("aria-label",c(3,3,"accessories.core.light_sensor")),r(27),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.CurrentAmbientLightLevel<1?30:31))},dependencies:[Ve,T],encapsulation:2})}return e})();var gt=(()=>{class e{miredToKelvin(t){return Math.round(1e6/t)}kelvinToMired(t){return Math.round(1e6/t)}kelvinToHsl(t){let a=t/100,i,p,b;a<=66?(i=255,p=Math.min(99.4708025861*Math.log(a)-161.1195681661,255),b=a<=19?0:Math.min(138.5177312231*Math.log(a-10)-305.0447927307,255)):(i=Math.min(329.698727446*(a-60)**-.1332047592,255),p=Math.min(288.1221695283*(a-60)**-.0755148492,255),b=255),i/=255,p/=255,b/=255;let Q=Math.max(i,p,b),re=Math.min(i,p,b),W=Q-re,X=0;W!==0&&(Q===i?X=(p-b)/W%6:Q===p?X=(b-i)/W+2:X=(i-p)/W+4,X=Math.round(X*60),X<0&&(X+=360));let fe=(Q+re)/2,Se=W===0?0:W/(1-Math.abs(2*fe-1));return`hsl(${Math.round(X)}, ${Math.round(Se*100)}%, ${Math.round(fe*100)}%)`}static \u0275fac=function(a){return new(a||e)};static \u0275prov=ci({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var pn=(e,n)=>({"fa-check-circle":e,"fa-blank":n}),Ms=(e,n)=>({"off-text":e,"on-text":n}),Wt=(e,n)=>({"mb-1":e,"":n});function Es(e,n){e&1&&m(0,"div")}function Vs(e,n){if(e&1&&(o(0,"div",11)(1,"div",13)(2,"div",7),m(3,"i",14),s(),d(4),l(5,"translate"),o(6,"div",9),m(7,"i",10),s()()()),e&2){let t=u();r(3),f("ngClass",A(5,Ms,!t.isAdaptiveLightingEnabled,t.isAdaptiveLightingEnabled)),r(),N(" ",c(5,3,"accessories.control.adaptive_lighting"),": ",t.isAdaptiveLightingEnabled?"ON":"OFF"," ")}}function Bs(e,n){if(e&1){let t=O();o(0,"h6",15),d(1),l(2,"translate"),s(),o(3,"nouislider",16),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetBrightness.value,i)||(p.targetBrightness.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onBrightnessStateChange())}),s()}if(e&2){let t=u();r(),N("",c(2,6,"accessories.control.brightness"),": ",t.targetBrightness.value,"%"),r(2),f("min",t.targetBrightness.min)("max",t.targetBrightness.max)("step",t.targetBrightness.step),q("ngModel",t.targetBrightness.value)}}function As(e,n){e&1&&(o(0,"div",18)(1,"span",19),d(2),l(3,"translate"),s()()),e&2&&(r(2),_(c(3,1,"accessories.control.adaptive_lighting_note")))}function Ds(e,n){if(e&1){let t=O();o(0,"h6",15),d(1),l(2,"translate"),s(),o(3,"nouislider",17),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetHue.value,i)||(p.targetHue.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onHueStateChange())}),s(),C(4,As,4,3,"div",18)}if(e&2){let t=u();r(),N("",c(2,8,"accessories.control.hue"),": ",t.targetHue.value,"\xB0"),r(2),f("min",0)("max",360)("step",1),q("ngModel",t.targetHue.value),f("ngClass",A(10,Wt,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),x(t.isAdaptiveLightingEnabled?4:-1)}}function Is(e,n){e&1&&(o(0,"div",18)(1,"span",19),d(2),l(3,"translate"),s()()),e&2&&(r(2),_(c(3,1,"accessories.control.adaptive_lighting_note")))}function Ps(e,n){if(e&1){let t=O();o(0,"h6",15),d(1),l(2,"translate"),s(),o(3,"nouislider",17),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetSaturation.value,i)||(p.targetSaturation.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onSaturationStateChange())}),s(),C(4,Is,4,3,"div",18)}if(e&2){let t=u();r(),N("",c(2,8,"accessories.control.saturation"),": ",t.targetSaturation.value,"%"),r(2),f("min",0)("max",100)("step",1),q("ngModel",t.targetSaturation.value),f("ngClass",A(10,Wt,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),x(t.isAdaptiveLightingEnabled?4:-1)}}function Fs(e,n){e&1&&(o(0,"div",18)(1,"span",19),d(2),l(3,"translate"),s()()),e&2&&(r(2),_(c(3,1,"accessories.control.adaptive_lighting_note")))}function Hs(e,n){if(e&1){let t=O();o(0,"h6",15),d(1),l(2,"translate"),l(3,"convertMired"),s(),o(4,"nouislider",17),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetColorTemperature.value,i)||(p.targetColorTemperature.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onColorTemperatureStateChange())}),s(),C(5,Fs,4,3,"div",18)}if(e&2){let t=u();r(),N(" ",c(2,8,"accessories.control.color_temperature"),": ",c(3,10,t.targetColorTemperature.mired)," "),r(3),f("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),q("ngModel",t.targetColorTemperature.value),f("ngClass",A(12,Wt,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),r(),x(t.isAdaptiveLightingEnabled?5:-1)}}var mn=(()=>{class e{$activeModal=F(ee);$colour=F(gt);service;isAdaptiveLightingEnabled$;targetMode;targetBrightness;targetBrightnessChanged=new ne;targetHue;targetHueChanged=new ne;targetSaturation;targetSaturationChanged=new ne;targetColorTemperature;targetColorTemperatureChanged=new ne;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;sliderIndex=0;constructor(){this.targetBrightnessChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("Brightness").setValue(this.targetBrightness.value),this.targetBrightness.value&&!this.service.values.On?(this.targetMode=!0,this.service.getCharacteristic("On").setValue(this.targetMode)):!this.targetBrightness.value&&this.service.values.On&&(this.targetMode=!1,this.service.getCharacteristic("On").setValue(this.targetMode))}),this.targetHueChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("Hue").setValue(this.targetHue.value)}),this.targetSaturationChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("Saturation").setValue(this.targetSaturation.value)}),this.targetColorTemperatureChanged.pipe(oe(500)).subscribe(t=>{this.service.getCharacteristic("ColorTemperature").setValue(t)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetBrightness(),this.loadTargetHue(),this.loadTargetSaturation(),this.loadTargetColorTemperature()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("On").setValue(this.targetMode),this.targetMode&&this.targetBrightness&&!this.targetBrightness.value&&(this.targetBrightness.value=this.service.getCharacteristic("Brightness").maxValue),a.target.blur()}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onHueStateChange(){this.targetHueChanged.next(this.targetHue.value);let t=document.querySelectorAll(".noUi-target")[this.sliderIndex-1];if(t){let a=this.targetHue.value;t.style.background=`linear-gradient(to right,
hsl(${a}, 0%, 50%),
hsl(${a}, 100%, 50%))`}}onSaturationStateChange(){this.targetSaturationChanged.next(this.targetSaturation.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetBrightness(){let t=this.service.getCharacteristic("Brightness");t&&(this.targetBrightness={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{let a=document.querySelectorAll(".noUi-target")[this.sliderIndex];a&&(a.style.background="linear-gradient(to right, #242424, #ffd6aa)",this.sliderIndex+=1)},10))}loadTargetHue(){this.service.getCharacteristic("Hue")&&(this.targetHue={value:this.service.getCharacteristic("Hue").value},setTimeout(()=>{let a=document.querySelectorAll(".noUi-target")[this.sliderIndex];a&&(a.style.background=`linear-gradient(to right,
hsl(0, 100%, 50%),
hsl(60, 100%, 50%),
hsl(120, 100%, 50%),
hsl(180, 100%, 50%),
hsl(240, 100%, 50%),
hsl(300, 100%, 50%),
hsl(360, 100%, 50%))`),this.sliderIndex+=1},10))}loadTargetSaturation(){this.service.getCharacteristic("Saturation")&&(this.targetSaturation={value:this.service.getCharacteristic("Saturation").value},setTimeout(()=>{let a=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(a){let i=this.targetHue.value||0;a.style.background=`linear-gradient(to right,
hsl(${i}, 0%, 50%),
hsl(${i}, 100%, 50%))`}this.sliderIndex+=1},10))}loadTargetColorTemperature(){let t=this.service.getCharacteristic("ColorTemperature");t&&(this.targetColorTemperature={value:this.$colour.miredToKelvin(t.value),mired:t.value,min:this.$colour.miredToKelvin(t.maxValue),max:this.$colour.miredToKelvin(t.minValue),step:t.minStep},setTimeout(()=>{let a=document.querySelectorAll(".noUi-target")[this.sliderIndex];if(a){let i=this.$colour.kelvinToHsl(this.targetColorTemperature.min),p=this.$colour.kelvinToHsl(this.targetColorTemperature.max);a.style.background=`linear-gradient(to right, ${i}, ${p})`}},10),this.isAdaptiveLightingEnabled$&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$.subscribe(a=>{this.isAdaptiveLightingEnabled=a})))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service",isAdaptiveLightingEnabled$:"isAdaptiveLightingEnabled$"},decls:29,vars:27,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"d-flex","justify-content-center","mb-0","p-0","mt-0","grey-outline"],[1,"modal-footer"],[1,"mb-0","mx-0","p-3","btn-read","w-100","no-round-top"],[1,"fas","fa-xl","fa-sun",3,"ngClass"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[3,"ngModelChange","min","max","step","ngModel","ngClass"],[1,"d-flex","text-center","mt-0","mb-1"],[1,"grey-text","small"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),k("click",function(b){return i.setTargetMode(!1,b)}),o(9,"div",7),m(10,"i",8),s(),d(11),l(12,"translate"),o(13,"div",9),m(14,"i",10),s()(),o(15,"button",6),k("click",function(b){return i.setTargetMode(!0,b)}),o(16,"div",7),m(17,"i",8),s(),d(18),l(19,"translate"),o(20,"div",9),m(21,"i",10),s()(),C(22,Es,1,0,"div"),s(),C(23,Vs,8,8,"div",11),C(24,Bs,4,8),C(25,Ds,5,13),C(26,Ps,5,13),C(27,Hs,6,15),s(),m(28,"div",12),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,13,"form.button_close")),r(3),S("aria-label",c(7,15,"accessories.control.mode_control")),r(4),f("ngClass",A(21,pn,!i.targetMode,i.targetMode)),r(),g(" ",c(12,17,"accessories.control.off")," "),r(6),f("ngClass",A(24,pn,i.targetMode,!i.targetMode)),r(),g(" ",c(19,19,"accessories.control.on")," "),r(4),x(i.hasAdaptiveLighting?22:-1),r(),x(i.hasAdaptiveLighting?23:-1),r(),x(i.targetBrightness?24:-1),r(),x(i.targetHue?25:-1),r(),x(i.targetSaturation?26:-1),r(),x(i.targetColorTemperature?27:-1))},dependencies:[J,se,le,ce,B,T,Mi],encapsulation:2})}return e})();var Ls=e=>({"accessory-on":e});function Os(e,n){if(e&1&&(m(0,"div",10),l(1,"translate")),e&2){let t=u();f("innerHTML",t.service.values.On?t.service.values.Brightness+"%"+(t.hasAdaptiveLighting?" \xB7 <i class='fa fa-sun "+(t.isAdaptiveLightingEnabled?"on-text":"grey-text")+"'></i>":""):c(1,1,"accessories.control.off"),Ft)}}function Ns(e,n){if(e&1&&(m(0,"div",10),l(1,"translate")),e&2){let t=u();f("innerHTML",c(1,1,t.service.values.On||t.service.values.Active?"accessories.control.on"+(t.hasAdaptiveLighting?" \xB7 <i class='fa fa-sun "+(t.isAdaptiveLightingEnabled?"on-text":"grey-text")+"'></i>":""):"accessories.control.off"),Ft)}}var un=(()=>{class e{$modal=F(te);intervalId;$colour=F(gt);service;readyForControl=!1;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;isAdaptiveLightingEnabled$=new oi(!1);ngOnInit(){this.loadAdaptiveLighting()}ngOnDestroy(){this.intervalId&&clearInterval(this.intervalId)}onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1),"Brightness"in this.service.values&&!this.service.values.On&&!this.service.values.Brightness&&(this.service.values.Brightness=this.service.getCharacteristic("Brightness").maxValue))}onLongClick(){if(this.readyForControl&&("Brightness"in this.service.values||"Hue"in this.service.values||"Saturation"in this.service.values||"ColorTemperature"in this.service.values)){let t=this.$modal.open(mn,{size:"md",backdrop:"static"});if(t.componentInstance.service=this.service,this.hasAdaptiveLighting){t.componentInstance.isAdaptiveLightingEnabled$=this.isAdaptiveLightingEnabled$,this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e3);let a=this.isAdaptiveLightingEnabled$.subscribe(i=>{this.isAdaptiveLightingEnabled=i});t.result.finally(()=>{this.intervalId&&clearInterval(this.intervalId),a.unsubscribe(),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e4)})}}}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let a=t/100,i,p,b;return a<=66?(i=255,p=a,p=99.4708025861*Math.log(p)-161.1195681661,b=a<=19?0:138.5177312231*Math.log(a-10)-305.0447927307):(i=329.698727446*(a-60)**-.1332047592,p=288.1221695283*(a-60)**-.0755148492,b=255),i=Math.round(Math.min(Math.max(i,0),255)),p=Math.round(Math.min(Math.max(p,0),255)),b=Math.round(Math.min(Math.max(b,0),255)),`#${i.toString(16).padStart(2,"0")}${p.toString(16).padStart(2,"0")}${b.toString(16).padStart(2,"0")}`}loadAdaptiveLighting(){"CharacteristicValueActiveTransitionCount"in this.service.values&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service.values.CharacteristicValueActiveTransitionCount)},3e4),this.isAdaptiveLightingEnabled$.subscribe(t=>{this.isAdaptiveLightingEnabled=t}))}Math=Math;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-lightbulb"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),H(),o(10,"div",9),d(11),s(),C(12,Os,2,3,"div",10)(13,Ns,2,3,"div",10),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(10,Ls,i.service.values.On||i.service.values.Active)),r(2),S("aria-label",c(3,8,"accessories.core.lightbulb")),r(3),S("fill",i.service.values.On||i.service.values.Active?"Hue"in i.service.values?"hsl("+i.service.values.Hue+", "+i.service.values.Saturation+"%, 50%)":"ColorTemperature"in i.service.values?i.$colour.kelvinToHsl(i.$colour.miredToKelvin(i.service.values.ColorTemperature)):"#ffcf55":"none")("fill-opacity","Brightness"in i.service.values?.25+i.service.values.Brightness/100*.5:.75),r(6),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.Brightness?12:13))},dependencies:[z,B,T],encapsulation:2})}return e})();var ht=(()=>{class e{transform(t){if(typeof t!="number"||Number.isNaN(t))return"";let a=Math.floor(t/60),i=t%60;return[a>0?`${a.toString()}m`:"",i>0?`${i.toString()}s`:""].filter(Boolean).join(" ")}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=vi({name:"duration",type:e,pure:!0})}return e})();var fn=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Rs(e,n){if(e&1){let t=O();o(0,"h6",12),d(1),l(2,"translate"),l(3,"duration"),s(),o(4,"nouislider",13),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetLockManagementAutoSecurityTimeout.value,i)||(p.targetLockManagementAutoSecurityTimeout.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onLockManagementAutoSecurityTimeoutStateChange())}),s()}if(e&2){let t=u();r(),N(" ",c(2,6,"accessories.control.lock_auto"),": ",t.targetLockManagementAutoSecurityTimeout.value===0?"\u221E":c(3,8,t.targetLockManagementAutoSecurityTimeout.value)," "),r(3),f("min",t.targetLockManagementAutoSecurityTimeout.min)("max",t.targetLockManagementAutoSecurityTimeout.max)("step",10),q("ngModel",t.targetLockManagementAutoSecurityTimeout.value)}}var vn=(()=>{class e{$activeModal=F(ee);lockTimeout;service;serviceManagement;targetMode;targetLockManagementAutoSecurityTimeout;targetLockManagementAutoSecurityTimeoutChanged=new ne;ngOnInit(){this.targetMode=this.service.values.LockTargetState,this.service.linkedServices&&(this.serviceManagement=Object.values(this.service.linkedServices).find(t=>t.type==="LockManagement")),this.serviceManagement&&(this.targetLockManagementAutoSecurityTimeoutChanged.pipe(oe(300),si()).subscribe(()=>{this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout").setValue(this.targetLockManagementAutoSecurityTimeout.value)}),this.loadTargetLockManagementAutoSecurityTimeout())}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("LockTargetState").setValue(this.targetMode),this.lockTimeout&&(clearTimeout(this.lockTimeout),this.lockTimeout=null),this.targetMode===0&&this.targetLockManagementAutoSecurityTimeout?.value>0&&(this.lockTimeout=setTimeout(()=>{this.targetMode=1},(this.targetLockManagementAutoSecurityTimeout.value+.3)*1e3)),a.target.blur()}onLockManagementAutoSecurityTimeoutStateChange(){this.targetLockManagementAutoSecurityTimeoutChanged.next(this.targetLockManagementAutoSecurityTimeout.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetLockManagementAutoSecurityTimeout(){let t=this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout");t&&(this.targetLockManagementAutoSecurityTimeout={value:t.value||0,min:t.minValue||0,max:t.maxValue||3600,step:t.minStep||10},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:24,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),k("click",function(b){return i.setTargetMode(1,b)}),o(9,"div",7),m(10,"i",8),s(),d(11),l(12,"translate"),o(13,"div",9),m(14,"i",10),s()(),o(15,"button",6),k("click",function(b){return i.setTargetMode(0,b)}),o(16,"div",7),m(17,"i",8),s(),d(18),l(19,"translate"),o(20,"div",9),m(21,"i",10),s()()(),C(22,Rs,5,10),s(),m(23,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,8,"form.button_close")),r(3),S("aria-label",c(7,10,"accessories.control.mode_control")),r(4),f("ngClass",A(16,fn,i.targetMode===1,i.targetMode!==1)),r(),g(" ",c(12,12,"accessories.control.locked")," "),r(6),f("ngClass",A(19,fn,i.targetMode===0,i.targetMode!==0)),r(),g(" ",c(19,14,"accessories.control.unlocked")," "),r(4),x(i.serviceManagement?22:-1))},dependencies:[J,se,le,ce,B,T,ht],encapsulation:2})}return e})();var Ws=(e,n,t,a)=>({"accessory-on":e,unlocked:n,jammed:t,error:a}),js=(e,n)=>({"red-text":e,"grey-text":n});function Us(e,n){if(e&1&&(m(0,"div",9),l(1,"translate")),e&2){let t=u();f("innerText",c(1,2,t.service.values.LockCurrentState?"accessories.control.locked":"accessories.control.unlocked"))("ngClass",A(4,js,!t.service.values.LockCurrentState,t.service.values.LockCurrentState))}}function $s(e,n){e&1&&(o(0,"div",10),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.jammed")))}function Gs(e,n){e&1&&(o(0,"div",10),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.unknown")))}var gn=(()=>{class e{$modal=F(te);service;readyForControl=!1;onClick(){this.readyForControl&&("LockTargetState"in this.service.values?this.service.getCharacteristic("LockTargetState").setValue(this.service.values.LockTargetState?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"LockTargetState"in this.service.values){let t=this.$modal.open(vn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-lock-mechanism"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","longClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M8 16 C6 -4, 26 -4, 24 16","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"shackle-locked"],["d","M8 16 C6 -2, 22 -2, 24 7","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","stroke-opacity","0",1,"shackle-unlocked"],["x","5","y","16","width","22","height","15","rx","3","fill","none","stroke","#7f7f7f","stroke-width","2"],["cx","16","cy","23.5","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#4caf50","fill-opacity","0.5",1,"keyhole"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText","ngClass"],[1,"accessory-label","red-text"]],template:function(a,i){a&1&&(o(0,"div",0),k("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"path",4)(6,"path",5)(7,"rect",6)(8,"circle",7),s()(),H(),o(9,"div",8),d(10),s(),C(11,Us,2,7,"div",9)(12,$s,3,3,"div",10)(13,Gs,3,3,"div",10),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",dt(8,Ws,"LockCurrentState"in i.service.values&&i.service.values.LockCurrentState!==1||i.service.values.On===1,i.service.values.LockCurrentState===0||i.service.values.On===1,i.service.values.LockCurrentState===2,i.service.values.LockCurrentState===3)),r(2),S("aria-label",c(3,6,"accessories.core.lock_mechanism")),r(8),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.LockCurrentState<2?11:i.service.values.LockCurrentState===2?12:i.service.values.LockCurrentState===3?13:-1))},dependencies:[z,B,T],styles:["@keyframes _ngcontent-%COMP%_blink{0%,to{fill-opacity:1}50%{fill-opacity:.2}} .unlocked svg .shackle-locked{stroke-opacity:0!important} .unlocked svg .shackle-unlocked{stroke-opacity:1!important} .unlocked svg .keyhole{fill:#ff9800!important} .jammed svg .shackle-locked{stroke-opacity:0!important} .jammed svg .shackle-unlocked{stroke-opacity:1!important} .jammed svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite} .error svg .shackle-locked{stroke-opacity:0!important} .error svg .shackle-unlocked{stroke-opacity:1!important} .error svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}"]})}return e})();var $e=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function zs(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),k("click",function(i){M(t);let p=u();return E(p.setActive(0,i))}),o(3,"div",8),m(4,"i",9),s(),d(5),l(6,"translate"),o(7,"div",10),m(8,"i",11),s()(),o(9,"button",7),k("click",function(i){M(t);let p=u();return E(p.setActive(1,i))}),o(10,"div",8),m(11,"i",9),s(),d(12),l(13,"translate"),o(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=u();S("aria-label",c(1,5,"accessories.control.mode_control")),r(4),f("ngClass",A(11,$e,t.service.values.Active===0,t.service.values.Active!==0)),r(),g(" ",c(6,7,"accessories.control.off")," "),r(6),f("ngClass",A(14,$e,t.service.values.Active===1,t.service.values.Active!==1)),r(),g(" ",c(13,9,"accessories.control.on")," ")}}function qs(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetState(0,i))}),o(3,"div",8),m(4,"i",9),s(),d(5),l(6,"translate"),o(7,"div",10),m(8,"i",11),s()(),o(9,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetState(1,i))}),o(10,"div",8),m(11,"i",9),s(),d(12),l(13,"translate"),o(14,"div",10),m(15,"i",11),s()(),o(16,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetState(2,i))}),o(17,"div",8),m(18,"i",9),s(),d(19),l(20,"translate"),o(21,"div",10),m(22,"i",11),s()()()}if(e&2){let t=u();S("aria-label",c(1,7,"accessories.control.media_control")),r(4),f("ngClass",A(15,$e,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),r(),g(" ",c(6,9,"accessories.control.play")," "),r(6),f("ngClass",A(18,$e,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),r(),g(" ",c(13,11,"accessories.control.pause")," "),r(6),f("ngClass",A(21,$e,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),r(),g(" ",c(20,13,"accessories.control.stop")," ")}}function Zs(e,n){if(e&1){let t=O();o(0,"h6"),d(1),l(2,"translate"),s(),o(3,"div",12),l(4,"translate"),o(5,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(!1,i))}),o(6,"div",8),m(7,"i",9),s(),d(8),l(9,"translate"),o(10,"div",10),m(11,"i",11),s()(),o(12,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(!0,i))}),o(13,"div",8),m(14,"i",9),s(),d(15),l(16,"translate"),o(17,"div",10),m(18,"i",11),s()()()}if(e&2){let t=u();r(),g(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),r(2),S("aria-label",c(4,8,"accessories.control.mute_control")),r(4),f("ngClass",A(14,$e,!t.targetMode,t.targetMode)),r(),g(" ",c(9,10,"accessories.control.not_mute")," "),r(6),f("ngClass",A(17,$e,t.targetMode,!t.targetMode)),r(),g(" ",c(16,12,"accessories.control.mute")," ")}}function Ks(e,n){if(e&1){let t=O();o(0,"h6",13),d(1),l(2,"translate"),s(),o(3,"nouislider",14),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetVolume.value,i)||(p.targetVolume.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onVolumeStateChange())}),s()}if(e&2){let t=u();r(),N("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),r(2),f("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),q("ngModel",t.targetVolume.value)}}var hn=(()=>{class e{$activeModal=F(ee);service;targetMode;targetVolume;targetVolumeChanged=new ne;constructor(){this.targetVolumeChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),a.target.blur()}setActive(t,a){this.service.getCharacteristic("Active").setValue(t),a.target.blur()}setTargetState(t,a){this.service.getCharacteristic("TargetMediaState").setValue(t),a.target.blur()}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4),C(6,zs,16,17,"div",5)(7,qs,23,24,"div",5),C(8,Zs,19,20),C(9,Ks,4,8),s(),m(10,"div",6),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,5,"form.button_close")),r(3),x("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),r(2),x("Mute"in i.service.values?8:-1),r(),x(i.targetVolume?9:-1))},dependencies:[J,se,le,ce,B,T],encapsulation:2})}return e})();var Qs=()=>[0,1],Ys=(e,n)=>({"accessory-on":e,paused:n}),Xs=()=>["Speaker","SmartSpeaker"];function Js(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.play")," ")}function el(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.pause")," ")}function tl(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.stop")," ")}function il(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function nl(e,n){if(e&1&&d(0),e&2){let t=u(3);g(" \xB7 ",t.service.values.Volume,"% ")}}function ol(e,n){if(e&1&&C(0,nl,1,1),e&2){let t=u(2);x("Volume"in t.service.values?0:-1)}}function rl(e,n){if(e&1&&(o(0,"div",10),C(1,Js,2,3)(2,el,2,3)(3,tl,2,3),C(4,il,2,3)(5,ol,1,1),s()),e&2){let t,a=u();r(),x((t=a.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),r(3),x("Mute"in a.service.values&&a.service.values.Mute?4:5)}}function al(e,n){e&1&&(m(0,"div",11),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.off"))}function sl(e,n){e&1&&(m(0,"div",11),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.mute"))}function ll(e,n){if(e&1&&(o(0,"div",10),d(1),s()),e&2){let t=u();r(),g("",t.service.values.Volume,"%")}}function cl(e,n){e&1&&(o(0,"div",10),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.on")))}function dl(e,n){e&1&&(o(0,"div",10),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.microphone")))}var Cn=(()=>{class e{$modal=F(te);service;readyForControl=!1;onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active===0?1:0):"TargetMediaState"in this.service.values?this.service.getCharacteristic("TargetMediaState").setValue(this.service.values.TargetMediaState===0?1:0):"Mute"in this.service.values&&this.service.getCharacteristic("Mute").setValue(!this.service.values.Mute))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||"TargetMediaState"in this.service.values||"Volume"in this.service.values||"Mute"in this.service.values)){let t=this.$modal.open(hn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-microphone"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:18,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["stroke-linecap","round","x1","10","y1","6","x2","20","y2","6","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","10","x2","20","y2","10","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","14","x2","20","y2","14","stroke","#7f7f7f","stroke-width","2"],["cx","15","cy","23","r","3","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"circle",8),s()(),H(),o(10,"div",9),d(11),s(),C(12,rl,6,2,"div",10)(13,al,2,3,"div",11)(14,sl,2,3,"div",11)(15,ll,2,1,"div",10)(16,cl,3,3,"div",10)(17,dl,3,3,"div",10),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",A(9,Ys,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?_e(8,Qs).includes(i.service.values.CurrentMediaState):"Mute"in i.service.values&&"Volume"in i.service.values?!i.service.values.Mute&&i.service.values.Volume>0:"Mute"in i.service.values&&!i.service.values.Mute,"CurrentMediaState"in i.service.values&&i.service.values.CurrentMediaState===1)),r(2),S("aria-label",c(3,6,"accessories.core.microphone")),r(9),_(i.service.customName||i.service.serviceName),r(),x("CurrentMediaState"in i.service.values?12:"Active"in i.service.values&&!i.service.values.Active?13:"Mute"in i.service.values&&i.service.values.Mute?14:"Volume"in i.service.values?15:_e(12,Xs).includes(i.service.customType||i.service.type)?16:17))},dependencies:[z,B,T],encapsulation:2})}return e})();var pl=e=>({"accessory-on":e});function ml(e,n){e&1&&(o(0,"div",25),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.detected")))}function ul(e,n){e&1&&(o(0,"div",26),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.not_detected")))}var xn=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-motion-sensor"]],inputs:{service:"service"},decls:29,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(7, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["x","9","y","9","width","2","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","7","y","13","width","3","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","8","y","17","width","4","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4),o(6,"g",5),m(7,"path",6)(8,"path",7),s(),m(9,"rect",8)(10,"rect",9)(11,"rect",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23),s()(),H(),o(25,"div",24),d(26),s(),C(27,ml,3,3,"div",25)(28,ul,3,3,"div",26),s()()),a&2&&(f("ngClass",$(6,pl,i.service.values.MotionDetected)),r(2),S("aria-label",c(3,4,"accessories.core.motion_sensor")),r(24),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.MotionDetected?27:28))},dependencies:[B,T],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var fl=e=>({"accessory-on":e});function vl(e,n){e&1&&(o(0,"div",22),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.detected")))}function gl(e,n){e&1&&(o(0,"div",23),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.not_detected")))}var _n=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-occupancy-sensor"]],inputs:{service:"service"},decls:26,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(4.75, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4),o(6,"g",5),m(7,"path",6)(8,"path",7),s(),m(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20),s()(),H(),o(22,"div",21),d(23),s(),C(24,vl,3,3,"div",22)(25,gl,3,3,"div",23),s()()),a&2&&(f("ngClass",$(6,fl,i.service.values.OccupancyDetected)),r(2),S("aria-label",c(3,4,"accessories.core.occupancy_sensor")),r(21),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.OccupancyDetected?24:25))},dependencies:[B,T],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var yn=()=>[0,2],hl=e=>({"accessory-on":e});function Cl(e,n){e&1&&(D(),m(0,"line",8)(1,"line",9)(2,"line",10))}function xl(e,n){e&1&&(D(),m(0,"line",11)(1,"line",12)(2,"line",13))}function _l(e,n){e&1&&(D(),m(0,"line",13)(1,"line",14)(2,"line",15))}var kn=(()=>{class e{$settings=F(Be);service;readyForControl=!1;browserLang=this.$settings.browserLang;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"LockTargetState"in this.service.values?this.service.getCharacteristic("LockTargetState").setValue(this.service.values.LockTargetState?0:1):"TargetDoorState"in this.service.values&&this.service.getCharacteristic("TargetDoorState").setValue(this.service.values.TargetDoorState?0:1))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-outlet"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:14,vars:15,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","6","ry","6","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"outer"],["cx","16","cy","16","r","10","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"inner"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"],["x1","16","y1","10","x2","16","y2","13","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","19","x2","13","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","19","x2","22","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","11.5","y1","14.5","x2","13.5","y2","11.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","18.5","y1","11.5","x2","20.5","y2","14.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","16","y1","19","x2","16","y2","22","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","14","x2","13","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"]],template:function(a,i){a&1&&(o(0,"div",0),k("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"circle",5),C(7,Cl,3,0)(8,xl,3,0)(9,_l,3,0),s()(),H(),o(10,"div",6),d(11),s(),m(12,"div",7),l(13,"translate"),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(12,hl,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&_e(11,yn).includes(i.service.values.CurrentDoorState))),r(2),S("aria-label",c(3,7,"accessories.core.outlet")),r(5),x(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),r(4),_(i.service.customName||i.service.serviceName),r(),f("innerText",c(13,9,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&_e(14,yn).includes(i.service.values.CurrentDoorState)?"accessories.control.on":"accessories.control.off")))},dependencies:[z,B,T],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .outer[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}"]})}return e})();var yl=e=>({"accessory-on":e}),Sn=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-robot-vacuum"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:36,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","motionClip"],["x","0","y","-0.5","width","32","height","8"],["transform","translate(0, 5)"],["cx","16","cy","10","rx","14","ry","8.4","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","2","y1","10","x2","2","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["x1","30","y1","10","x2","30","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["d","M2,16 A14,6.9 0 0,0 30,16","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["cx","16","cy","10","rx","4.2","ry","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["cx","16","cy","15","r","0.9","fill","#7f7f7f"],["x1","2","y1","16","x2","0.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","2","y1","16","x2","0.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["clip-path","url(#motionClip)","stroke","#7f7f7f","stroke-linecap","round",1,"motion-lines",2,"display","none"],["x1","12","y1","8","x2","12","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.3s","repeatCount","indefinite"],["x1","16","y1","8","x2","16","y2","14","stroke-width","2.5","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.6s","repeatCount","indefinite"],["x1","20","y1","8","x2","20","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.9s","repeatCount","indefinite"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(a,i){a&1&&(o(0,"div",0),k("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3)(5,"defs")(6,"clipPath",4),m(7,"rect",5),s()(),o(8,"g",6),m(9,"ellipse",7)(10,"line",8)(11,"line",9)(12,"path",10)(13,"ellipse",11)(14,"circle",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16),s(),o(19,"g",17)(20,"line",18),m(21,"animate",19)(22,"animate",20)(23,"animate",21),s(),o(24,"line",22),m(25,"animate",23)(26,"animate",24)(27,"animate",25),s(),o(28,"line",26),m(29,"animate",27)(30,"animate",28)(31,"animate",29),s()()()(),H(),o(32,"div",30),d(33),s(),m(34,"div",31),l(35,"translate"),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(10,yl,i.service.values.On||i.service.values.Active)),r(2),S("aria-label",c(3,6,"accessories.core.robot_vacuum")),r(31),_(i.service.customName||i.service.serviceName),r(),f("innerText",c(35,8,i.service.values.On||i.service.values.Active?"accessories.control.on":"accessories.control.off")))},dependencies:[z,B,T],styles:[".accessory-on svg .motion-lines{display:inline!important}"]})}return e})();var Ct=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function kl(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.triggered")," ")}function Sl(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.off")," ")}function bl(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.ready")," ")}function wl(e,n){if(e&1){let t=O();G(0,"button",10),qe("click",function(i){M(t);let p=u();return E(p.setTargetMode(3,i))}),G(1,"div",11),ue(2,"i",12),Y(),d(3),l(4,"translate"),G(5,"div",13),ue(6,"i",14),Y()()}if(e&2){let t=u();r(2),Ye(A(7,Ct,t.targetMode===3,t.targetMode!==3)),j("opacity",(t.service.values==null?null:t.service.values.SecuritySystemCurrentState)===4?.25:1),r(),g(" ",c(4,5,"accessories.control.off")," ")}}function Tl(e,n){if(e&1){let t=O();G(0,"button",10),qe("click",function(i){M(t);let p=u();return E(p.setTargetMode(0,i))}),G(1,"div",11),ue(2,"i",12),Y(),d(3),l(4,"translate"),G(5,"div",13),ue(6,"i",14),Y()()}if(e&2){let t=u();r(2),Ye(A(7,Ct,t.targetMode===0,t.targetMode!==0)),j("opacity",(t.service.values==null?null:t.service.values.SecuritySystemCurrentState)===4?.25:1),r(),g(" ",c(4,5,"accessories.control.home")," ")}}function Ml(e,n){if(e&1){let t=O();G(0,"button",10),qe("click",function(i){M(t);let p=u();return E(p.setTargetMode(1,i))}),G(1,"div",11),ue(2,"i",12),Y(),d(3),l(4,"translate"),G(5,"div",13),ue(6,"i",14),Y()()}if(e&2){let t=u();r(2),Ye(A(7,Ct,t.targetMode===1,t.targetMode!==1)),j("opacity",(t.service.values==null?null:t.service.values.SecuritySystemCurrentState)===4?.25:1),r(),g(" ",c(4,5,"accessories.control.away")," ")}}function El(e,n){if(e&1){let t=O();G(0,"button",10),qe("click",function(i){M(t);let p=u();return E(p.setTargetMode(2,i))}),G(1,"div",11),ue(2,"i",12),Y(),d(3),l(4,"translate"),G(5,"div",13),ue(6,"i",14),Y()()}if(e&2){let t=u();r(2),Ye(A(7,Ct,t.targetMode===2,t.targetMode!==2)),j("opacity",(t.service.values==null?null:t.service.values.SecuritySystemCurrentState)===4?.25:1),r(),g(" ",c(4,5,"accessories.control.night")," ")}}var bn=(()=>{class e{$activeModal=F(ee);service;targetMode;targetModeValidValues=[];ngOnInit(){this.targetMode=this.service.values.SecuritySystemTargetState,this.targetModeValidValues=this.service.getCharacteristic("SecuritySystemTargetState").validValues}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("SecuritySystemTargetState").setValue(this.targetMode),a.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:20,vars:17,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-4","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"]],template:function(a,i){a&1&&(G(0,"div",0)(1,"div",1),ue(2,"h5",2),G(3,"button",3),l(4,"translate"),qe("click",function(){return i.dismissModal()}),Y()(),G(5,"div",4)(6,"div",5)(7,"div",6),d(8),l(9,"translate"),C(10,kl,2,3)(11,Sl,2,3)(12,bl,2,3),Y()(),G(13,"div",7),l(14,"translate"),C(15,wl,7,10,"button",8),C(16,Tl,7,10,"button",8),C(17,Ml,7,10,"button",8),C(18,El,7,10,"button",8),Y()(),ue(19,"div",9),Y()),a&2&&(r(2),yi("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,11,"form.button_close")),r(4),st("text-danger",(i.service.values==null?null:i.service.values.SecuritySystemCurrentState)===4),r(),g(" ",c(9,13,"menu.label_status"),": "),r(2),x((i.service.values==null?null:i.service.values.SecuritySystemCurrentState)===4?10:(i.service.values==null?null:i.service.values.SecuritySystemCurrentState)===3?11:12),r(3),S("aria-label",c(14,15,"accessories.control.mode_control")),r(2),x(i.targetModeValidValues.includes(3)?15:-1),r(),x(i.targetModeValidValues.includes(0)?16:-1),r(),x(i.targetModeValidValues.includes(1)?17:-1),r(),x(i.targetModeValidValues.includes(2)?18:-1))},dependencies:[J,T],encapsulation:2})}return e})();var Vl=(e,n,t,a,i)=>({"accessory-on":e,home:n,away:t,night:a,triggered:i});function Bl(e,n){e&1&&(o(0,"div",10),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.home")))}function Al(e,n){e&1&&(o(0,"div",10),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.away")))}function Dl(e,n){e&1&&(o(0,"div",10),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.night")))}function Il(e,n){e&1&&(o(0,"div",11),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.off")))}function Pl(e,n){e&1&&(o(0,"div",11),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.triggered")))}var wn=(()=>{class e{$modal=F(te);service;readyForControl=!1;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(bn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-security-system"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:17,vars:14,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M7 18 C7 5, 25 5, 25 18 V26 H7 V18 Z","fill","none","stroke","#7f7f7f","stroke-width","1.5","fill-opacity","0.5",1,"dome"],["x","2","y","26","width","28","height","4","fill","none","stroke","#7f7f7f","stroke-width","1.5","rx","1"],["x1","6","y1","3","x2","10","y2","7","stroke-width","3",1,"ray"],["x1","16","y1","0","x2","16","y2","5","stroke-width","3",1,"ray"],["x1","26","y1","3","x2","22","y2","7","stroke-width","3",1,"ray"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(a,i){if(a&1&&(o(0,"div",0),k("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"path",4)(6,"rect",5)(7,"line",6)(8,"line",7)(9,"line",8),s()(),H(),o(10,"div",9),d(11),s(),C(12,Bl,3,3,"div",10)(13,Al,3,3,"div",10)(14,Dl,3,3,"div",10)(15,Il,3,3,"div",11)(16,Pl,3,3,"div",11),s()()),a&2){let p;j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",bi(8,Vl,i.service.values.SecuritySystemCurrentState!==3,i.service.values.SecuritySystemCurrentState===0,i.service.values.SecuritySystemCurrentState===1,i.service.values.SecuritySystemCurrentState===2,i.service.values.SecuritySystemCurrentState===4)),r(2),S("aria-label",c(3,6,"accessories.core.security_system")),r(9),_(i.service.customName||i.service.serviceName),r(),x((p=i.service.values.SecuritySystemCurrentState)===0?12:p===1?13:p===2?14:p===3?15:p===4?16:-1)}},dependencies:[z,B,T],styles:[".home svg .dome{fill:#1976d2!important} .away svg .dome{fill:#ff9800!important} .night svg .dome{fill:#673ab7!important} .triggered svg .dome{fill:#d32f2f!important} .triggered svg .ray{stroke:#d32f2f;stroke-opacity:.5;animation:_ngcontent-%COMP%_blink 1s infinite}@keyframes _ngcontent-%COMP%_blink{0%,to{stroke-opacity:1}50%{stroke-opacity:.2}}"]})}return e})();var Fl=e=>({"accessory-on":e});function Hl(e,n){e&1&&(o(0,"div",17),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.detected")))}function Ll(e,n){e&1&&(o(0,"div",18),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.not_detected")))}var Tn=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-smoke-sensor"]],inputs:{service:"service"},decls:22,vars:8,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","21","x2","6","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","16","y1","21","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","21","y1","21","x2","26","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4),o(6,"text",5),d(7," SMOKE "),s(),m(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15),s()(),H(),o(18,"div",16),d(19),s(),C(20,Hl,3,3,"div",17)(21,Ll,3,3,"div",18),s()()),a&2&&(f("ngClass",$(6,Fl,i.service.values.SmokeDetected)),r(2),S("aria-label",c(3,4,"accessories.core.smoke_sensor")),r(17),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.SmokeDetected?20:21))},dependencies:[B,T],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var Ge=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Ol(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),k("click",function(i){M(t);let p=u();return E(p.setActive(0,i))}),o(3,"div",8),m(4,"i",9),s(),d(5),l(6,"translate"),o(7,"div",10),m(8,"i",11),s()(),o(9,"button",7),k("click",function(i){M(t);let p=u();return E(p.setActive(1,i))}),o(10,"div",8),m(11,"i",9),s(),d(12),l(13,"translate"),o(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=u();S("aria-label",c(1,5,"accessories.control.mode_control")),r(4),f("ngClass",A(11,Ge,t.service.values.Active===0,t.service.values.Active!==0)),r(),g(" ",c(6,7,"accessories.control.off")," "),r(6),f("ngClass",A(14,Ge,t.service.values.Active===1,t.service.values.Active!==1)),r(),g(" ",c(13,9,"accessories.control.on")," ")}}function Nl(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetState(0,i))}),o(3,"div",8),m(4,"i",9),s(),d(5),l(6,"translate"),o(7,"div",10),m(8,"i",11),s()(),o(9,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetState(1,i))}),o(10,"div",8),m(11,"i",9),s(),d(12),l(13,"translate"),o(14,"div",10),m(15,"i",11),s()(),o(16,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetState(2,i))}),o(17,"div",8),m(18,"i",9),s(),d(19),l(20,"translate"),o(21,"div",10),m(22,"i",11),s()()()}if(e&2){let t=u();S("aria-label",c(1,7,"accessories.control.media_control")),r(4),f("ngClass",A(15,Ge,t.service.values.CurrentMediaState===0,t.service.values.CurrentMediaState!==0)),r(),g(" ",c(6,9,"accessories.control.play")," "),r(6),f("ngClass",A(18,Ge,t.service.values.CurrentMediaState===1,t.service.values.CurrentMediaState!==1)),r(),g(" ",c(13,11,"accessories.control.pause")," "),r(6),f("ngClass",A(21,Ge,t.service.values.CurrentMediaState===2,t.service.values.CurrentMediaState!==2)),r(),g(" ",c(20,13,"accessories.control.stop")," ")}}function Rl(e,n){if(e&1){let t=O();o(0,"h6"),d(1),l(2,"translate"),s(),o(3,"div",12),l(4,"translate"),o(5,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(!1,i))}),o(6,"div",8),m(7,"i",9),s(),d(8),l(9,"translate"),o(10,"div",10),m(11,"i",11),s()(),o(12,"button",7),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(!0,i))}),o(13,"div",8),m(14,"i",9),s(),d(15),l(16,"translate"),o(17,"div",10),m(18,"i",11),s()()()}if(e&2){let t=u();r(),g(" ",c(2,6,"Active"in t.service.values||"TargetMediaState"in t.service.values?"accessories.control.speaker_volume":"menu.label_status")," "),r(2),S("aria-label",c(4,8,"accessories.control.mute_control")),r(4),f("ngClass",A(14,Ge,!t.targetMode,t.targetMode)),r(),g(" ",c(9,10,"accessories.control.not_mute")," "),r(6),f("ngClass",A(17,Ge,t.targetMode,!t.targetMode)),r(),g(" ",c(16,12,"accessories.control.mute")," ")}}function Wl(e,n){if(e&1){let t=O();o(0,"h6",13),d(1),l(2,"translate"),s(),o(3,"nouislider",14),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetVolume.value,i)||(p.targetVolume.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onVolumeStateChange())}),s()}if(e&2){let t=u();r(),N("",c(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),r(2),f("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),q("ngModel",t.targetVolume.value)}}var Mn=(()=>{class e{$activeModal=F(ee);service;targetMode;targetVolume;targetVolumeChanged=new ne;constructor(){this.targetVolumeChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("Volume").setValue(this.targetVolume.value)})}ngOnInit(){this.targetMode=this.service.values.Mute,this.loadTargetVolume()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("Mute").setValue(this.targetMode),a.target.blur()}setActive(t,a){this.service.getCharacteristic("Active").setValue(t),a.target.blur()}setTargetState(t,a){this.service.getCharacteristic("TargetMediaState").setValue(t),a.target.blur()}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetVolume(){let t=this.service.getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #ffffff, #ffd966, #ff0000)"})},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4),C(6,Ol,16,17,"div",5)(7,Nl,23,24,"div",5),C(8,Rl,19,20),C(9,Wl,4,8),s(),m(10,"div",6),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,5,"form.button_close")),r(3),x("Active"in i.service.values?6:"TargetMediaState"in i.service.values?7:-1),r(2),x("Mute"in i.service.values?8:-1),r(),x(i.targetVolume?9:-1))},dependencies:[J,se,le,ce,B,T],encapsulation:2})}return e})();var jl=()=>[0,1],Ul=(e,n,t)=>({"accessory-on":e,paused:n,muted:t}),$l=()=>["Speaker","SmartSpeaker"];function Gl(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.play")," ")}function zl(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.pause")," ")}function ql(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.stop")," ")}function Zl(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" \xB7 ",c(1,1,"accessories.control.mute")," ")}function Kl(e,n){if(e&1&&d(0),e&2){let t=u(3);g(" \xB7 ",t.service.values.Volume,"% ")}}function Ql(e,n){if(e&1&&C(0,Kl,1,1),e&2){let t=u(2);x("Volume"in t.service.values?0:-1)}}function Yl(e,n){if(e&1&&(o(0,"div",14),C(1,Gl,2,3)(2,zl,2,3)(3,ql,2,3),C(4,Zl,2,3)(5,Ql,1,1),s()),e&2){let t,a=u();r(),x((t=a.service.values.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),r(3),x("Mute"in a.service.values&&a.service.values.Mute?4:5)}}function Xl(e,n){e&1&&(m(0,"div",15),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.off"))}function Jl(e,n){e&1&&(m(0,"div",15),l(1,"translate")),e&2&&f("innerText",c(1,1,"accessories.control.mute"))}function ec(e,n){if(e&1&&(o(0,"div",14),d(1),s()),e&2){let t=u();r(),g("",t.service.values.Volume,"%")}}function tc(e,n){e&1&&(o(0,"div",14),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.on")))}function ic(e,n){e&1&&(o(0,"div",14),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.speaker")))}var En=(()=>{class e{$modal=F(te);service;readyForControl=!1;onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active===0?1:0):"TargetMediaState"in this.service.values?this.service.getCharacteristic("TargetMediaState").setValue(this.service.values.TargetMediaState===0?1:0):"Mute"in this.service.values&&this.service.getCharacteristic("Mute").setValue(!this.service.values.Mute))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||"TargetMediaState"in this.service.values||"Volume"in this.service.values||"Mute"in this.service.values)){let t=this.$modal.open(Mn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-speaker"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:22,vars:14,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","20","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1"],["cx","16","cy","9","r","4.5","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","9","r","1.5","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["cx","16","cy","22","r","6","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","22","r","2","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["d","M4,12 Q1,16 4,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M3,10 Q-2,16 3,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],["d","M28,12 Q31,16 28,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M29,10 Q34,16 29,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"path",9)(11,"path",10)(12,"path",11)(13,"path",12),s()(),H(),o(14,"div",13),d(15),s(),C(16,Yl,6,2,"div",14)(17,Xl,2,3,"div",15)(18,Jl,2,3,"div",15)(19,ec,2,1,"div",14)(20,tc,3,3,"div",14)(21,ic,3,3,"div",14),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",ct(9,Ul,"Active"in i.service.values?i.service.values.Active:"CurrentMediaState"in i.service.values?_e(8,jl).includes(i.service.values.CurrentMediaState):"Mute"in i.service.values&&"Volume"in i.service.values?!i.service.values.Mute&&i.service.values.Volume>0:"Mute"in i.service.values&&!i.service.values.Mute,"CurrentMediaState"in i.service.values&&i.service.values.CurrentMediaState===1,"Mute"in i.service.values&&i.service.values.Mute)),r(2),S("aria-label",c(3,6,"accessories.core.speaker")),r(13),_(i.service.customName||i.service.serviceName),r(),x("CurrentMediaState"in i.service.values?16:"Active"in i.service.values&&!i.service.values.Active?17:"Mute"in i.service.values&&i.service.values.Mute?18:"Volume"in i.service.values?19:_e(13,$l).includes(i.service.customType||i.service.type)?20:21))},dependencies:[z,B,T],styles:[".accessory-on:not(.paused):not(.muted) svg .wave-inner{animation:_ngcontent-%COMP%_pulse-inner 2s infinite} .accessory-on:not(.paused):not(.muted) svg .wave-outer{animation:_ngcontent-%COMP%_pulse-outer 2s infinite}@keyframes _ngcontent-%COMP%_pulse-inner{0%{stroke-opacity:.5}50%{stroke-opacity:1}to{stroke-opacity:.5}}@keyframes _ngcontent-%COMP%_pulse-outer{0%{stroke-opacity:.3}50%{stroke-opacity:.8}to{stroke-opacity:.3}} body.dark-mode div.accessory-box:not(.accessory-on) svg .inner{fill:#2b2b2b!important}"]})}return e})();var nc=(e,n,t)=>({"press-single":e,"press-double":n,"press-long":t}),Vn=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-stateless-programmable-switch"]],inputs:{service:"service"},decls:17,vars:12,consts:[[1,"accessory-box",3,"ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","8.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"single"],["cx","23.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"double"],["cx","23.5","cy","9.5","r","3","stroke","#7f7f7f","stroke-width","1","fill","none"],["cx","16","cy","23.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"long"],["x1","5","y1","23.5","x2","11","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],["x1","21","y1","23.5","x2","27","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"line",9)(11,"line",10),s()(),H(),o(12,"div",11),d(13),s(),o(14,"div",12),d(15),l(16,"translate"),s()()()),a&2&&(f("ngClass",ct(8,nc,i.service.values.ProgrammableSwitchEvent===0,i.service.values.ProgrammableSwitchEvent===1,i.service.values.ProgrammableSwitchEvent===2)),r(2),S("aria-label",c(3,4,"accessories.core.stateless_programmable_switch")),r(11),_(i.service.customName||i.service.serviceName),r(2),_(c(16,6,"accessories.control.stateless")))},dependencies:[B,T],styles:[".press-single svg .single{fill:#1976d2!important} .press-double svg .double{fill:#1976d2!important} .press-long svg .long{fill:#1976d2!important}"]})}return e})();var Bn=()=>[0,2],oc=e=>({"accessory-on":e}),An=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"LockTargetState"in this.service.values?this.service.getCharacteristic("LockTargetState").setValue(this.service.values.LockTargetState?0:1):"TargetDoorState"in this.service.values&&this.service.getCharacteristic("TargetDoorState").setValue(this.service.values.TargetDoorState?0:1))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-switch"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:12,vars:14,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","16","y1","8","x2","16","y2","14","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#7f7f7f","d",`M21.4589329,9.49999998
C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
C22.4505994,12.4811551 23,14.065977 23,15.7447101
C23,19.7640218 19.8532802,23 16,23
C12.1467198,23 9,19.7640218 9,15.7447101
C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389
C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999
C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372
C7.75536735,11.4998488 7,13.5315645 7,15.7447101
C7,20.8562656 11.0294373,25 16,25
C20.9705627,25 25,20.8562656 25,15.7447101
C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685
C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z`],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(a,i){a&1&&(o(0,"div",0),k("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"circle",4)(6,"line",5)(7,"path",6),s()(),H(),o(8,"div",7),d(9),s(),m(10,"div",8),l(11,"translate"),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(11,oc,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&_e(10,Bn).includes(i.service.values.CurrentDoorState))),r(2),S("aria-label",c(3,6,"accessories.core.switch")),r(7),_(i.service.customName||i.service.serviceName),r(),f("innerText",c(11,8,i.service.values.On||i.service.values.Active||"LockTargetState"in i.service.values&&!i.service.values.LockTargetState||"CurrentDoorState"in i.service.values&&_e(13,Bn).includes(i.service.values.CurrentDoorState)?"accessories.control.on":"accessories.control.off")))},dependencies:[z,B,T],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] line[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#1976d2;fill-opacity:.75}"]})}return e})();var rc=(e,n)=>({"mb-4":e,"mb-0":n}),jt=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function ac(e,n){if(e&1){let t=O();o(0,"div",5),l(1,"translate"),o(2,"button",7),k("click",function(i){M(t);let p=u();return E(p.setActive(0,i))}),o(3,"div",8),m(4,"i",9),s(),d(5),l(6,"translate"),o(7,"div",10),m(8,"i",11),s()(),o(9,"button",7),k("click",function(i){M(t);let p=u();return E(p.setActive(1,i))}),o(10,"div",8),m(11,"i",9),s(),d(12),l(13,"translate"),o(14,"div",10),m(15,"i",11),s()()()}if(e&2){let t=u();f("ngClass",A(12,rc,t.sourceList.length,!t.sourceList.length)),S("aria-label",c(1,6,"accessories.control.mode_control")),r(4),f("ngClass",A(15,jt,t.service.values.Active===0,t.service.values.Active!==0)),r(),g(" ",c(6,8,"accessories.control.off")," "),r(6),f("ngClass",A(18,jt,t.service.values.Active===1,t.service.values.Active!==1)),r(),g(" ",c(13,10,"accessories.control.on")," ")}}function sc(e,n){e&1&&(o(0,"h6"),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.input")))}function lc(e,n){if(e&1){let t=O();o(0,"button",7),k("click",function(i){let p=M(t).$implicit,b=u(2);return E(b.setInput(p.identifier,i))}),o(1,"div",8),m(2,"i",9),s(),d(3),o(4,"div",10),m(5,"i",11),s()()}if(e&2){let t=n.$implicit,a=u(2);r(2),f("ngClass",A(2,jt,a.service.values.ActiveIdentifier===t.identifier,a.service.values.ActiveIdentifier!==t.identifier)),r(),g(" ",t.name," ")}}function cc(e,n){if(e&1&&(C(0,sc,3,3,"h6"),o(1,"div",12),l(2,"translate"),hi(3,lc,6,5,"button",13,gi),s()),e&2){let t=u();x(t.hasActive?0:-1),r(),S("aria-label",c(2,2,"accessories.control.input_control")),r(2),Ci(t.sourceList)}}var Dn=(()=>{class e{$activeModal=F(ee);service;inputList;hasActive=!1;sourceList=[];ngOnInit(){"Active"in this.service.values&&(this.hasActive=!0),Object.keys(this.inputList).length&&Object.entries(this.inputList).forEach(([t,a])=>{this.sourceList.push({identifier:Number.parseInt(t,10),name:a})})}setActive(t,a){this.service.getCharacteristic("Active").setValue(t),a.target.blur()}setInput(t,a){this.service.getCharacteristic("ActiveIdentifier").setValue(t),a.target.blur()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service",inputList:"inputList"},decls:9,vars:6,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4),C(6,ac,16,21,"div",5),C(7,cc,5,4),s(),m(8,"div",6),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,4,"form.button_close")),r(3),x(i.hasActive?6:-1),r(),x(i.sourceList.length?7:-1))},dependencies:[J,B,T],encapsulation:2})}return e})();var dc=e=>({"accessory-on":e});function pc(e,n){if(e&1&&(o(0,"div",7),d(1),l(2,"translate"),s()),e&2){let t=u();r(),g(" ",t.channelList[t.service.values.ActiveIdentifier]||c(2,1,"accessories.control.on")," ")}}function mc(e,n){e&1&&(o(0,"div",7),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.off")))}var In=(()=>{class e{$modal=F(te);service;readyForControl=!1;channelList={};ngOnInit(){if(this.service.linkedServices)for(let[,t]of Object.entries(this.service.linkedServices))t.type==="InputSource"&&(this.channelList[t.values.Identifier]=t.values.ConfiguredName||`Input ${t.values.Identifier}`)}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&("Active"in this.service.values||Object.keys(this.channelList).length)){let t=this.$modal.open(Dn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.inputList=this.channelList}}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-television"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:11,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","10","y1","27.25","x2","22","y2","27.25","stroke","#d32f2f","stroke-width","4","stroke-linecap","round","stroke-opacity","0.75",1,"stand"],["x","1","y","6","width","30","height","20","rx","2","stroke","#7f7f7f","fill","#808080","stroke-width","1.5",1,"screen"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"line",4)(6,"rect",5),s()(),H(),o(7,"div",6),d(8),s(),C(9,pc,3,3,"div",7)(10,mc,3,3,"div",7),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(8,dc,i.service.values.Active||i.service.values.On)),r(2),S("aria-label",c(3,6,"accessories.core.television")),r(6),g(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),r(),x(i.service.values.On||i.service.values.Active?9:10))},dependencies:[z,B,T],styles:["body.dark-mode .screen{fill:#2b2b2b;stroke:#7f7f7f} .accessory-on svg .screen{animation:_ngcontent-%COMP%_color-change 3s infinite alternate} .accessory-on svg .stand{stroke:#7f7f7f;stroke-opacity:1}@keyframes _ngcontent-%COMP%_color-change{0%{fill:#4fc3f7}to{fill:#0288d1}}"]})}return e})();function uc(e,n){if(e&1&&(d(0),l(1,"convertTemp"),l(2,"number"),l(3,"uppercase")),e&2){let t=u();N(" ",me(2,4,c(1,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(3,7,t.temperatureUnits)," ")}}function fc(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.no_data")," ")}var Pn=(()=>{class e{$settings=F(Be);service;temperatureUnits=this.$settings.env.temperatureUnits;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-temperature-sensor"]],inputs:{service:"service"},decls:34,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","16","y1","5","x2","16","y2","17","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["cx","16","cy","20","r","3","stroke","#7f7f7f","stroke-width","1.2","fill","#1976d2","fill-opacity","0.5"],["x1","9","y1","6","x2","13","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","9","x2","13","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","12","x2","13","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","15","x2","13","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","6","x2","23","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","9","x2","23","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","12","x2","23","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","15","x2","23","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(G(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),D(),G(4,"svg",3),ue(5,"rect",4)(6,"line",5)(7,"circle",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27),Y()(),H(),G(29,"div",28),d(30),Y(),G(31,"div",29),C(32,uc,4,9)(33,fc,2,3),Y()()()),a&2&&(r(2),S("aria-label",c(3,3,"accessories.core.temperature_sensor")),r(28),_(i.service.customName||i.service.serviceName),r(2),x("CurrentTemperature"in i.service.values?32:33))},dependencies:[Ve,Ie,De,T],styles:[".temperature-circle[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:50px;line-height:50px;border-radius:50%;font-size:14px;text-align:center;margin-bottom:6px;background-color:gray;color:#d3d3d3}@media (max-width: 575px){.temperature-circle-collapse[_ngcontent-%COMP%]{width:31px;height:31px;line-height:31px;font-size:10px;margin-bottom:7px}}"]})}return e})();var xt=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function vc(e,n){if(e&1&&d(0),e&2){let t=u();g(" \xB7 ",t.service.values.CurrentRelativeHumidity,"% ")}}function gc(e,n){if(e&1){let t=O();o(0,"button",10),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(0,i))}),o(1,"div",11),m(2,"i",12),s(),d(3),l(4,"translate"),o(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=u();r(2),f("ngClass",A(4,xt,t.targetMode===0,t.targetMode!==0)),r(),g(" ",c(4,2,"accessories.control.off")," ")}}function hc(e,n){if(e&1){let t=O();o(0,"button",10),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(3,i))}),o(1,"div",11),m(2,"i",12),s(),d(3),l(4,"translate"),o(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=u();r(2),f("ngClass",A(4,xt,t.targetMode===3,t.targetMode!==3)),r(),g(" ",c(4,2,"accessories.control.auto")," ")}}function Cc(e,n){if(e&1){let t=O();o(0,"button",10),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(1,i))}),o(1,"div",11),m(2,"i",12),s(),d(3),l(4,"translate"),o(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=u();r(2),f("ngClass",A(4,xt,t.targetMode===1,t.targetMode!==1)),r(),g(" ",c(4,2,"accessories.control.heat")," ")}}function xc(e,n){if(e&1){let t=O();o(0,"button",10),k("click",function(i){M(t);let p=u();return E(p.setTargetMode(2,i))}),o(1,"div",11),m(2,"i",12),s(),d(3),l(4,"translate"),o(5,"div",13),m(6,"i",14),s()()}if(e&2){let t=u();r(2),f("ngClass",A(4,xt,t.targetMode===2,t.targetMode!==2)),r(),g(" ",c(4,2,"accessories.control.cool")," ")}}function _c(e,n){if(e&1){let t=O();o(0,"h6",15),d(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),o(6,"nouislider",16),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetTemperature.value,i)||(p.targetTemperature.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onTemperatureStateChange())}),s()}if(e&2){let t=u();r(),Le(" ",c(2,7,"accessories.control.target"),": ",me(4,11,c(3,9,t.targetTemperature.value),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),f("min",t.targetTemperature.min)("max",t.targetTemperature.max)("step",t.targetTemperature.step),q("ngModel",t.targetTemperature.value)}}function yc(e,n){if(e&1){let t=O();o(0,"h6",17),d(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),s(),o(9,"nouislider",16),K("ngModelChange",function(i){M(t);let p=u(2);return Z(p.autoTemp,i)||(p.autoTemp=i),E(i)}),k("ngModelChange",function(){M(t);let i=u(2);return E(i.onAutoThresholdStateChange())}),s()}if(e&2){let t=u(2);r(),lt(" ",c(2,9,"accessories.control.threshold_auto"),": ",me(4,13,c(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",c(5,16,t.temperatureUnits)," - ",me(7,20,c(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",c(8,23,t.temperatureUnits)," "),r(8),f("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),q("ngModel",t.autoTemp)}}function kc(e,n){if(e&1){let t=O();o(0,"h6",15),d(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),o(6,"nouislider",16),K("ngModelChange",function(i){M(t);let p=u(2);return Z(p.targetHeatingTemp,i)||(p.targetHeatingTemp=i),E(i)}),k("ngModelChange",function(){M(t);let i=u(2);return E(i.onThresholdStateChange())}),s()}if(e&2){let t=u(2);r(),Le(" ",c(2,7,"accessories.control.threshold_auto"),": ",me(4,11,c(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),f("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),q("ngModel",t.targetHeatingTemp)}}function Sc(e,n){if(e&1){let t=O();o(0,"h6",15),d(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),s(),o(6,"nouislider",16),K("ngModelChange",function(i){M(t);let p=u(2);return Z(p.targetCoolingTemp,i)||(p.targetCoolingTemp=i),E(i)}),k("ngModelChange",function(){M(t);let i=u(2);return E(i.onThresholdStateChange())}),s()}if(e&2){let t=u(2);r(),Le(" ",c(2,7,"accessories.control.threshold_auto"),": ",me(4,11,c(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",c(5,14,t.temperatureUnits)," "),r(5),f("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),q("ngModel",t.targetCoolingTemp)}}function bc(e,n){if(e&1&&C(0,yc,10,25)(1,kc,7,16)(2,Sc,7,16),e&2){let t=u();x(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var Fn=(()=>{class e{$activeModal=F(ee);$settings=F(Be);service;targetMode;targetTemperature;targetTemperatureChanged=new ne;targetThresholdChanged=new ne;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;hasHumidity=!1;temperatureUnits=this.$settings.env.temperatureUnits;constructor(){this.targetTemperatureChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("TargetTemperature").setValue(this.targetTemperature.value)}),this.targetThresholdChanged.pipe(oe(500)).subscribe(()=>{this.HeatingThresholdTemperature&&this.service.getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service.getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp)})}ngOnInit(){this.targetMode=this.service.values.TargetHeatingCoolingState,this.CoolingThresholdTemperature=this.service.getCharacteristic("CoolingThresholdTemperature"),this.HeatingThresholdTemperature=this.service.getCharacteristic("HeatingThresholdTemperature"),this.targetStateValidValues=this.service.getCharacteristic("TargetHeatingCoolingState").validValues,this.loadTargetTemperature(),this.service.getCharacteristic("CurrentRelativeHumidity")&&(this.hasHumidity=!0),setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(a=>{a.style.background="linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))"})},10)}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("TargetHeatingCoolingState").setValue(this.targetMode),a.target.blur()}onTemperatureStateChange(){this.targetTemperatureChanged.next(this.targetTemperature.value)}onThresholdStateChange(){this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetThresholdChanged.next(void 0)}onAutoThresholdStateChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.targetThresholdChanged.next(void 0)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetTemperature(){let t=this.service.getCharacteristic("TargetTemperature");this.targetTemperature={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep||.5},this.targetCoolingTemp=this.service.getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service.getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:22,vars:25,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-4","mb-1"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"h6",5),m(7,"i",6),d(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),C(12,vc,1,1),s(),o(13,"div",7),l(14,"translate"),C(15,gc,7,7,"button",8),C(16,hc,7,7,"button",8),C(17,Cc,7,7,"button",8),C(18,xc,7,7,"button",8),s(),C(19,_c,7,16),C(20,bc,3,1),s(),m(21,"div",9),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,14,"form.button_close")),r(4),j("color",i.service.values.CurrentHeatingCoolingState===2?"#1e8bbd":i.service.values.CurrentHeatingCoolingState===1?"#e69533":i.service.values.TargetHeatingCoolingState===3?"#42d672":"#7b7b7b"),r(),N("",me(10,18,c(9,16,i.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(11,21,i.temperatureUnits)," "),r(4),x(i.hasHumidity?12:-1),r(),S("aria-label",c(14,23,"accessories.control.mode_control")),r(2),x(i.targetStateValidValues.includes(0)?15:-1),r(),x(i.targetStateValidValues.includes(3)?16:-1),r(),x(i.targetStateValidValues.includes(1)?17:-1),r(),x(i.targetStateValidValues.includes(2)?18:-1),r(),x("TargetTemperature"in i.service.values?19:-1),r(),x(i.targetStateValidValues.includes(3)?20:-1))},dependencies:[B,J,se,le,ce,Ve,T,Ie,De],encapsulation:2})}return e})();var wc=e=>({"accessory-on":e});function Tc(e,n){if(e&1&&(D(),o(0,"text",18),d(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),s()),e&2){let t=u();r(),N(" ",me(3,4,c(2,2,t.service.values.CurrentTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}function Mc(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.off")," ")}function Ec(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.heat")," ")}function Vc(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.cool")," ")}function Bc(e,n){if(e&1&&(m(0,"i",21),d(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t=u();r(),N(" ",me(3,4,c(2,2,t.service.values.TargetTemperature),"1.0-1"),"\xB0",c(4,7,t.temperatureUnits)," ")}}var Hn=(()=>{class e{$modal=F(te);$settings=F(Be);service;readyForControl=!1;temperatureUnits=this.$settings.env.temperatureUnits;onClick(){if(!this.readyForControl)return;let t=this.$modal.open(Fn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-thermostat"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:30,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","1","y","19","width","30","height","8","rx","0","stroke","#7f7f7f","stroke-width","0.75","fill-opacity","0.5"],["x","16","y","13","font-size","8","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),m(8,"animate",6),s(),o(9,"stop",7),m(10,"animate",8),s(),o(11,"stop",9),m(12,"animate",6),s()(),o(13,"linearGradient",10)(14,"stop",11),m(15,"animate",12),s(),o(16,"stop",13),m(17,"animate",14),s(),o(18,"stop",15),m(19,"animate",12),s()()(),m(20,"rect",16)(21,"rect",17),C(22,Tc,5,9,":svg:text",18),s()(),H(),o(23,"div",19),d(24),s(),o(25,"div",20),C(26,Mc,2,3)(27,Ec,2,3)(28,Vc,2,3)(29,Bc,5,9),s()()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(10,wc,i.service.values.TargetHeatingCoolingState>0)),r(2),S("aria-label",c(3,8,"accessories.core.thermostat")),r(19),S("fill",i.service.values.CurrentHeatingCoolingState===2?"url(#coolingGradient)":i.service.values.CurrentHeatingCoolingState===1?"url(#heatingGradient)":i.service.values.TargetHeatingCoolingState===3?"#42d672":"#7b7b7b"),r(),x("CurrentTemperature"in i.service.values?22:-1),r(2),_(i.service.customName||i.service.serviceName),r(2),x(i.service.values.TargetHeatingCoolingState===0?26:i.service.values.CurrentHeatingCoolingState===1?27:i.service.values.CurrentHeatingCoolingState===2?28:i.service.values.TargetHeatingCoolingState===3?29:-1))},dependencies:[z,B,Ve,T,Ie,De],encapsulation:2})}return e})();var Ln=(()=>{class e{service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-unknown"]],inputs:{service:"service"},decls:10,vars:3,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","1.5"],["d",`M12.2575393,17.7112593
L12.1868707,17.7112593
C11.0779698,17.7112593 10.6478221,16.9467914 11.2212184,16.0037726
L16.4805582,7.35415962
C17.67876,5.38357359 18.0624739,5.55948915 17.3376772,7.746963
L15.7252918,12.6132252
C15.3772095,13.6637556 15.9942825,14.5048291 17.0992511,14.5048291
L20.1977772,14.5048291
L20.1846183,14.5177121
L20.2552868,14.5177121
C21.3641878,14.5177121 21.7943355,15.2821799 21.2209392,16.2251988
L16.1844844,24.5082506
C14.864477,26.6791606 14.4411534,26.4839632 15.241777,24.0676402
L16.7168658,19.6157462
C17.0649481,18.5652158 16.447875,17.7241422 15.3429064,17.7241422
L12.2443804,17.7241422
L12.2575393,17.7112593 Z`,"fill","#7f7f7f"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(a,i){a&1&&(G(0,"div",0)(1,"div",1)(2,"div",2),D(),G(3,"svg",3),ue(4,"circle",4)(5,"path",5),Y()(),H(),G(6,"div",6),d(7),Y(),G(8,"div",7),d(9),Y()()()),a&2&&(r(2),S("aria-label",i.service.humanType),r(5),_(i.service.customName||i.service.serviceName),r(2),_(i.service.humanType))},encapsulation:2})}return e})();var On=(e,n)=>({"fa-check-circle":e,"fa-blank":n});function Ac(e,n){if(e&1){let t=O();o(0,"h6"),d(1),l(2,"translate"),l(3,"duration"),s(),o(4,"nouislider",12),K("ngModelChange",function(i){M(t);let p=u();return Z(p.targetSetDuration.value,i)||(p.targetSetDuration.value=i),E(i)}),k("ngModelChange",function(){M(t);let i=u();return E(i.onSetDurationStateChange())}),s()}if(e&2){let t=u();r(),N(" ",c(2,6,"accessories.control.set_duration"),": ",t.targetSetDuration.value===0?"\u221E":c(3,8,t.targetSetDuration.value)," "),r(3),f("min",t.targetSetDuration.min)("max",t.targetSetDuration.max)("step",15),q("ngModel",t.targetSetDuration.value)}}var Nn=(()=>{class e{$activeModal=F(ee);service;targetMode;targetSetDuration;targetSetDurationChanged=new ne;constructor(){this.targetSetDurationChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("SetDuration").setValue(this.targetSetDuration.value)})}ngOnInit(){this.targetMode=this.service.values.Active,this.loadTargetSetDuration()}setTargetMode(t,a){this.targetMode=t,this.service.getCharacteristic("Active").setValue(this.targetMode),a.target.blur()}onSetDurationStateChange(){this.targetSetDurationChanged.next(this.targetSetDuration.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetSetDuration(){let t=this.service.getCharacteristic("SetDuration");t&&(this.targetSetDuration={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{let a=document.querySelectorAll(".noUi-target")[0];a&&(a.style.background="linear-gradient(to right, #add8e6, #416bdf)")},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:24,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl",3,"ngClass"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5),l(7,"translate"),o(8,"button",6),k("click",function(b){return i.setTargetMode(!1,b)}),o(9,"div",7),m(10,"i",8),s(),d(11),l(12,"translate"),o(13,"div",9),m(14,"i",10),s()(),o(15,"button",6),k("click",function(b){return i.setTargetMode(!0,b)}),o(16,"div",7),m(17,"i",8),s(),d(18),l(19,"translate"),o(20,"div",9),m(21,"i",10),s()()(),C(22,Ac,5,10),s(),m(23,"div",11),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,8,"form.button_close")),r(3),S("aria-label",c(7,10,"accessories.control.mode_control")),r(4),f("ngClass",A(16,On,!i.targetMode,i.targetMode)),r(),g(" ",c(12,12,"accessories.control.off")," "),r(6),f("ngClass",A(19,On,i.targetMode,!i.targetMode)),r(),g(" ",c(19,14,"accessories.control.on")," "),r(4),x(i.targetSetDuration?22:-1))},dependencies:[J,se,le,ce,B,T,ht],encapsulation:2})}return e})();var Dc=e=>({"accessory-on":e});function Ic(e,n){e&1&&(o(0,"div",2),l(1,"translate"),D(),o(2,"svg",5),m(3,"line",6)(4,"line",7)(5,"line",8)(6,"line",9)(7,"circle",10)(8,"circle",11)(9,"circle",12)(10,"circle",13)(11,"circle",14)(12,"circle",15),s()()),e&2&&S("aria-label",c(1,1,"accessories.core.generic_valve"))}function Pc(e,n){e&1&&(o(0,"div",2),l(1,"translate"),D(),o(2,"svg",5),m(3,"circle",16)(4,"circle",17)(5,"circle",18)(6,"circle",19)(7,"circle",20)(8,"circle",21)(9,"circle",22)(10,"circle",23)(11,"circle",24)(12,"circle",25)(13,"line",26)(14,"line",27)(15,"line",28),s()()),e&2&&S("aria-label",c(1,1,"accessories.core.irrigation_valve"))}function Fc(e,n){e&1&&(o(0,"div",2),l(1,"translate"),D(),o(2,"svg",5),m(3,"line",29)(4,"line",30)(5,"line",31)(6,"path",32)(7,"line",33)(8,"circle",34)(9,"circle",35)(10,"circle",36)(11,"circle",37)(12,"circle",38)(13,"circle",39)(14,"circle",40)(15,"circle",41)(16,"circle",42)(17,"circle",43)(18,"circle",44)(19,"circle",45),s()()),e&2&&S("aria-label",c(1,1,"accessories.core.shower_head_valve"))}function Hc(e,n){e&1&&(o(0,"div",2),l(1,"translate"),D(),o(2,"svg",5),m(3,"rect",46)(4,"line",47)(5,"line",48)(6,"rect",49)(7,"path",50)(8,"line",51)(9,"line",52),s()()),e&2&&S("aria-label",c(1,1,"accessories.core.faucet_valve"))}function Lc(e,n){if(e&1&&(o(0,"div",4),d(1),s()),e&2){let t=u();r(),_(t.remainingDuration)}}function Oc(e,n){e&1&&(o(0,"div",4),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.running")))}function Nc(e,n){e&1&&(o(0,"div",4),d(1),l(2,"translate"),s()),e&2&&(r(),_(c(2,1,"accessories.control.off")))}var Rn=(()=>{class e{$modal=F(te);service;readyForControl=!1;secondsActive=0;remainingDuration;remainingDurationInterval=ri(1e3).pipe(ai(()=>this.isActive()));remainingDurationSubscription;ngOnInit(){"SetDuration"in this.service.values&&this.setupRemainingDurationCounter()}onClick(){this.readyForControl&&("Active"in this.service.values?this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1):"On"in this.service.values&&this.service.getCharacteristic("On").setValue(!this.service.values.On))}onLongClick(){if(this.readyForControl&&"SetDuration"in this.service.values){let t=this.$modal.open(Nn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}}ngOnDestroy(){this.remainingDurationSubscription&&this.remainingDurationSubscription.unsubscribe()}isActive(){return this.service.values.Active?!0:(this.resetRemainingDuration(),!1)}setupRemainingDurationCounter(){this.remainingDurationSubscription=this.remainingDurationInterval.subscribe(()=>{this.secondsActive++;let t=this.service.getCharacteristic("RemainingDuration").value-this.secondsActive;t>0?this.remainingDuration=t<3600?new Date(t*1e3).toISOString().substring(14,19):new Date(t*1e3).toISOString().substring(11,19):this.remainingDuration=""})}resetRemainingDuration(){this.secondsActive=0,this.service.getCharacteristic("RemainingDuration")&&(this.remainingDuration="")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-valve"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:11,vars:8,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","8","y1","3","x2","14","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","11","y1","8","x2","11","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","0","y1","9","x2","21","y2","9","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","21","y1","9","x2","21","y2","14","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","21","cy","19","r","1.5",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","17","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","25","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","21","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","29","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","1","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","6","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","16","cy","4","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","26","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","31","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","7","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","25","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","10.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","21.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","16","cy","9","r","1.5",1,"drop","drop-in"],["x1","16","y1","16","x2","16","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","14","y1","16","x2","18","y2","16","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","4","y1","31","x2","28","y2","31","stroke","#7f7f7f","stroke-opacity","0.5","stroke-width","10","stroke-linecap","round",1,"grass"],["x1","1","y1","1","x2","16","y2","1","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","1","y1","1","x2","1","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","16","y1","1","x2","16","y2","3","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["d","M8 11 A8 7 0 0 1 24 11","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","7","y1","11","x2","25","y2","11","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","8","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","24","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","8","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","24","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","8","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","24","cy","28","r","0.75",1,"drop","drop-bottom"],["x","-3","y","28","width","21","height","6.5","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"sink"],["stroke-linecap","round","x1","24","y1","18","x2","26","y2","18","stroke","#1976d2","stroke-width","3","stroke-opacity","0.5"],["stroke-linecap","round","x1","20","y1","18","x2","22","y2","18","stroke","#d32f2f","stroke-width","3","stroke-opacity","0.5"],["x","19","y","16.5","rx","1","width","8","height","3","fill","none","stroke-width","1","stroke","#7f7f7f"],["d","M10 9 C10 -1, 23 -1, 23 10 V26","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","10","y1","9","x2","10","y2","28","stroke","#1976d2","stroke-opacity","0","stroke-width","1.5",1,"stream"],["x1","20","y1","31","x2","26","y2","31","stroke","#7f7f7f","stroke-width","10","stroke-linecap","round"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1),C(2,Ic,13,3,"div",2)(3,Pc,16,3,"div",2)(4,Fc,20,3,"div",2)(5,Hc,10,3,"div",2),o(6,"div",3),d(7),s(),C(8,Lc,2,1,"div",4)(9,Oc,3,3,"div",4)(10,Nc,3,3,"div",4),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(6,Dc,i.service.values.Active||i.service.values.On)),r(2),x(i.service.values.ValveType===0||!i.service.values.ValveType?2:i.service.values.ValveType===1?3:i.service.values.ValveType===2?4:i.service.values.ValveType===3?5:-1),r(5),g(" ",i.service.customName||i.service.values.ConfiguredName||i.service.serviceName," "),r(),x(i.service.values.Active&&i.remainingDuration?8:i.service.values.Active&&!i.remainingDuration||i.service.values.On?9:10))},dependencies:[z,B,T],styles:[".accessory-on svg .grass{stroke:#4caf50!important} .accessory-on svg .drop{fill-opacity:.5} .accessory-on svg .drop-in{animation:_ngcontent-%COMP%_blink 1.5s infinite} .accessory-on svg .drop-out{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.75s} .accessory-on svg .drop-top{animation:_ngcontent-%COMP%_blink 1.5s infinite} .accessory-on svg .drop-middle{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.5s} .accessory-on svg .drop-bottom{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:1s}@keyframes _ngcontent-%COMP%_blink{0%,to{opacity:1}50%{opacity:0}}@keyframes _ngcontent-%COMP%_blink-on-off{0%,to{opacity:1}50%{opacity:.5}} .accessory-on svg .stream{stroke-opacity:.5;animation:_ngcontent-%COMP%_blink-on-off 4s infinite} .accessory-on svg .sink{fill:#1976d2}"]})}return e})();var Rc=e=>({"accessory-on":e}),Wn=(()=>{class e{service;readyForControl=!1;onClick(){this.readyForControl&&("On"in this.service.values?this.service.getCharacteristic("On").setValue(!this.service.values.On):"Active"in this.service.values&&this.service.getCharacteristic("Active").setValue(this.service.values.Active?0:1))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-washing-machine"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:22,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3","y","1","width","25","height","30","rx","2","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","6","y","4","width","5","rx","0.5","height","4","stroke","#7f7f7f","fill","none","stroke-width","0.5"],["x","7","y","6","width","3","rx","0.25","height","1","stroke","#7f7f7f","fill","none","stroke-width","0.25"],["x","14","y","4","width","11","height","4","rx","0.5","fill","none","stroke","#7f7f7f","stroke-width","0.5"],["x","19","y","5","width","5","height","2","rx","0.25","fill","#1976d2","fill-opacity","0.5","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","19","y","15.5","rx","1","width","3","height","3","fill","#7f7f7f",1,"handle"],["cx","15.5","cy","17","r","6.5","stroke","#7f7f7f","fill","none","stroke-width","1.2"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(a,i){a&1&&(o(0,"div",0),k("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10)(12,"rect",11)(13,"rect",12)(14,"rect",13)(15,"rect",14)(16,"rect",15)(17,"circle",16),s()(),H(),o(18,"div",17),d(19),s(),m(20,"div",18),l(21,"translate"),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(10,Rc,i.service.values.On||i.service.values.Active)),r(2),S("aria-label",c(3,6,"accessories.core.washing_machine")),r(17),_(i.service.customName||i.service.serviceName),r(),f("innerText",c(21,8,i.service.values.On||i.service.values.Active?"accessories.control.on":"accessories.control.off")))},dependencies:[z,B,T],styles:[".accessory-on svg .handle{fill:#1976d2;fill-opacity:.5;transform-origin:48% 53%;animation:_ngcontent-%COMP%_rotate-handle 2s linear infinite}@keyframes _ngcontent-%COMP%_rotate-handle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]})}return e})();function Wc(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.closed")," ")}function jc(e,n){if(e&1&&(d(0),l(1,"translate")),e&2){let t=u(2);N(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function Uc(e,n){if(e&1&&C(0,Wc,2,3)(1,jc,2,4),e&2){let t=u();x(t.service.values.CurrentPosition===0?0:1)}}function $c(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.opening"),"... ")}function Gc(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.closing"),"... ")}var jn=(()=>{class e{$activeModal=F(ee);service;targetMode;targetPositionChanged=new ne;targetPosition;constructor(){this.targetPositionChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service.values.PositionState=1:this.service.getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service.values.PositionState=0),this.service.getCharacteristic("TargetPosition").setValue(this.targetPosition.value)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetPosition()}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5)(7,"div",6),C(8,Uc,2,1)(9,$c,2,3)(10,Gc,2,3),s()(),o(11,"h6",7),d(12),l(13,"translate"),s(),o(14,"nouislider",8),K("ngModelChange",function(b){return Z(i.targetPosition.value,b)||(i.targetPosition.value=b),b}),k("ngModelChange",function(){return i.onTargetPositionChange()}),s(),o(15,"div",9)(16,"span",10),d(17),l(18,"translate"),s(),o(19,"span",10),d(20),l(21,"translate"),s()(),o(22,"h6",7),d(23),l(24,"translate"),s(),o(25,"nouislider",11),K("ngModelChange",function(b){return Z(i.service.getCharacteristic("CurrentPosition").value,b)||(i.service.getCharacteristic("CurrentPosition").value=b),b}),s(),o(26,"div",9)(27,"span",10),d(28),l(29,"translate"),s(),o(30,"span",10),d(31),l(32,"translate"),s()()(),m(33,"div",12),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,20,"form.button_close")),r(5),x(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),r(4),N("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),r(2),f("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),q("ngModel",i.targetPosition.value),r(3),_(c(18,24,"accessories.control.closed")),r(3),_(c(21,26,"accessories.control.open")),r(3),N(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),r(2),f("min",0)("max",100)("step",1)("disabled",!0),q("ngModel",i.service.getCharacteristic("CurrentPosition").value),r(3),_(c(29,30,"accessories.control.closed")),r(3),_(c(32,32,"accessories.control.open")))},dependencies:[ce,J,se,le,T],encapsulation:2})}return e})();var zc=e=>({"accessory-on":e});function qc(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.closed")," ")}function Zc(e,n){if(e&1&&(d(0),l(1,"translate")),e&2){let t=u(2);N(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function Kc(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.open")," ")}function Qc(e,n){if(e&1&&(o(0,"div",12),C(1,qc,2,3),C(2,Zc,2,4),C(3,Kc,2,3),s()),e&2){let t=u();r(),x(t.service.values.CurrentPosition===0?1:-1),r(),x(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),r(),x(t.service.values.CurrentPosition===100?3:-1)}}function Yc(e,n){e&1&&(o(0,"div",13),d(1),l(2,"translate"),s()),e&2&&(r(),g("",c(2,1,"accessories.control.opening"),"..."))}function Xc(e,n){e&1&&(o(0,"div",13),d(1),l(2,"translate"),s()),e&2&&(r(),g("",c(2,1,"accessories.control.closing"),"..."))}var Un=(()=>{class e{$modal=F(te);service;readyForControl=!1;onClick(){this.readyForControl&&(this.service.values.TargetPosition?this.service.getCharacteristic("TargetPosition").setValue(0):this.service.getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open(jn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-window-covering"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:17,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","2.3","y","2.1","width","27.4","height","27.6","stroke","#808080","fill","#808080","stroke-width","0.5","stroke-opacity","0.9","fill-opacity","0.9",1,"c-blinds"],["x","2.05","y","29.9","width","27.9","height","0","stroke","#ffffff","fill","#ffffff","stroke-width","0.5","stroke-opacity","0","fill-opacity","0.5",1,"c-light"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),s()(),H(),o(12,"div",11),d(13),s(),C(14,Qc,4,3,"div",12)(15,Yc,3,3,"div",13)(16,Xc,3,3,"div",13),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(8,zc,i.service.values.CurrentPosition)),r(2),S("aria-label",c(3,6,"accessories.core.window_covering")),r(11),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.PositionState===2?14:i.service.values.PositionState===1?15:i.service.values.PositionState===0?16:-1))},dependencies:[z,B,T],styles:["body.dark-mode .c-blinds{fill:#2b2b2b;stroke:#2b2b2b;stroke-opacity:.8;fill-opacity:.8} svg .c-blinds{transition:height 3s ease;height:27.6px} svg .c-light{transition:y 3s ease,height 3s ease;y:29.9px;height:0} .accessory-on svg .c-blinds{transition:height 3s ease;height:.3px} .accessory-on svg .c-light{transition:y 3s ease,height 3s ease;y:2.65px;height:27.3px}"]})}return e})();function Jc(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.closed")," ")}function e0(e,n){if(e&1&&(d(0),l(1,"translate")),e&2){let t=u(2);N(" ",c(1,2,"accessories.control.open")," ",t.service.getCharacteristic("CurrentPosition").value,"% ")}}function t0(e,n){if(e&1&&C(0,Jc,2,3)(1,e0,2,4),e&2){let t=u();x(t.service.values.CurrentPosition===0?0:1)}}function i0(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.opening"),"... ")}function n0(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.closing"),"... ")}var $n=(()=>{class e{$activeModal=F(ee);service;targetMode;targetPositionChanged=new ne;targetPosition;constructor(){this.targetPositionChanged.pipe(oe(500)).subscribe(()=>{this.service.getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service.values.PositionState=1:this.service.getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service.values.PositionState=0),this.service.getCharacteristic("TargetPosition").setValue(this.targetPosition.value)})}ngOnInit(){this.targetMode=this.service.values.On,this.loadTargetPosition()}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadTargetPosition(){let t=this.service.getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},setTimeout(()=>{document.querySelectorAll(".noUi-target").forEach(i=>{i.style.background="linear-gradient(to right, #242424, #ffd6aa)"})},10))}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],inputs:{service:"service"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(a,i){a&1&&(o(0,"div",0)(1,"div",1),m(2,"h5",2),o(3,"button",3),l(4,"translate"),k("click",function(){return i.dismissModal()}),s()(),o(5,"div",4)(6,"div",5)(7,"div",6),C(8,t0,2,1)(9,i0,2,3)(10,n0,2,3),s()(),o(11,"h6",7),d(12),l(13,"translate"),s(),o(14,"nouislider",8),K("ngModelChange",function(b){return Z(i.targetPosition.value,b)||(i.targetPosition.value=b),b}),k("ngModelChange",function(){return i.onTargetPositionChange()}),s(),o(15,"div",9)(16,"span",10),d(17),l(18,"translate"),s(),o(19,"span",10),d(20),l(21,"translate"),s()(),o(22,"h6",7),d(23),l(24,"translate"),s(),o(25,"nouislider",11),K("ngModelChange",function(b){return Z(i.service.getCharacteristic("CurrentPosition").value,b)||(i.service.getCharacteristic("CurrentPosition").value=b),b}),s(),o(26,"div",9)(27,"span",10),d(28),l(29,"translate"),s(),o(30,"span",10),d(31),l(32,"translate"),s()()(),m(33,"div",12),s()),a&2&&(r(2),f("innerText",i.service.customName||i.service.serviceName),r(),S("aria-label",c(4,20,"form.button_close")),r(5),x(i.service.values.PositionState===2?8:i.service.values.PositionState===1?9:i.service.values.PositionState===0?10:-1),r(4),N("",c(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),r(2),f("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),q("ngModel",i.targetPosition.value),r(3),_(c(18,24,"accessories.control.closed")),r(3),_(c(21,26,"accessories.control.open")),r(3),N(" ",c(24,28,"accessories.control.current"),": ",i.service.getCharacteristic("CurrentPosition").value,"% "),r(2),f("min",0)("max",100)("step",1)("disabled",!0),q("ngModel",i.service.getCharacteristic("CurrentPosition").value),r(3),_(c(29,30,"accessories.control.closed")),r(3),_(c(32,32,"accessories.control.open")))},dependencies:[ce,J,se,le,T],encapsulation:2})}return e})();var o0=e=>({"accessory-on":e});function r0(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.closed")," ")}function a0(e,n){if(e&1&&(d(0),l(1,"translate")),e&2){let t=u(2);N(" ",c(1,2,"accessories.control.open")," ",t.service.values.CurrentPosition,"% ")}}function s0(e,n){e&1&&(d(0),l(1,"translate")),e&2&&g(" ",c(1,1,"accessories.control.open")," ")}function l0(e,n){if(e&1&&(o(0,"div",12),C(1,r0,2,3),C(2,a0,2,4),C(3,s0,2,3),s()),e&2){let t=u();r(),x(t.service.values.CurrentPosition===0?1:-1),r(),x(t.service.values.CurrentPosition>0&&t.service.values.CurrentPosition<100?2:-1),r(),x(t.service.values.CurrentPosition===100?3:-1)}}function c0(e,n){e&1&&(o(0,"div",13),d(1),l(2,"translate"),s()),e&2&&(r(),g("",c(2,1,"accessories.control.opening"),"..."))}function d0(e,n){e&1&&(o(0,"div",13),d(1),l(2,"translate"),s()),e&2&&(r(),g("",c(2,1,"accessories.control.closing"),"..."))}var Gn=(()=>{class e{$modal=F(te);service;readyForControl=!1;onClick(){this.readyForControl&&(this.service.values.TargetPosition?this.service.getCharacteristic("TargetPosition").setValue(0):this.service.getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl)return;let t=this.$modal.open($n,{size:"md",backdrop:"static"});t.componentInstance.service=this.service}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-window"]],inputs:{service:"service",readyForControl:"readyForControl"},decls:17,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick","ngClass"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-left"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-left"],["x","15.16","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-left"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-right"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-right"],["x","16.76","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-right"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(a,i){a&1&&(o(0,"div",0),k("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),o(1,"div",1)(2,"div",2),l(3,"translate"),D(),o(4,"svg",3),m(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),s()(),H(),o(12,"div",11),d(13),s(),C(14,l0,4,3,"div",12)(15,c0,3,3,"div",13)(16,d0,3,3,"div",13),s()()),a&2&&(j("cursor",i.readyForControl?"pointer":"default"),f("ngClass",$(8,o0,i.service.values.CurrentPosition)),r(2),S("aria-label",c(3,6,"accessories.core.window")),r(11),_(i.service.customName||i.service.serviceName),r(),x(i.service.values.PositionState===2?14:i.service.values.PositionState===1?15:i.service.values.PositionState===0?16:-1))},dependencies:[z,B,T],styles:["svg .outline-left{x:2.8px;width:12.4px} svg .divider-left{x:3.66px;width:10.68px} svg .handle-left{x:15.16px;width:.1px} svg .outline-right{x:16.8px;width:12.4px} svg .divider-right{x:17.66px;width:10.68px} svg .handle-right{x:16.76px;width:.1px} .accessory-on svg .outline-left{x:2.8px;width:2.4px} .accessory-on svg .divider-left{x:3.66px;width:.68px} .accessory-on svg .handle-left{x:5.16px;width:.1px} .accessory-on svg .outline-right{x:26.8px;width:2.4px} .accessory-on svg .divider-right{x:27.66px;width:.68px} .accessory-on svg .handle-right{x:26.76px;width:.1px}"]})}return e})();function p0(e,n){if(e&1){let t=O();o(0,"button",6),l(1,"translate"),k("click",function(){M(t);let i=u();return E(i.$accessories.showAccessoryInformation(i.service))}),m(2,"i",7),s()}if(e&2){let t=u();S("aria-label",c(1,1,"form.button_edit")+" "+(t.service.customName||t.service.serviceName))}}function m0(e,n){e&1&&m(0,"i",1)}function u0(e,n){if(e&1&&(o(0,"app-switch",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.switch")," ")}}function f0(e,n){if(e&1&&(o(0,"app-thermostat",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.thermostat")," ")}}function v0(e,n){if(e&1&&(o(0,"app-outlet",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.outlet")," ")}}function g0(e,n){if(e&1&&(o(0,"app-fan",3),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.fan")," ")}}function h0(e,n){if(e&1&&(o(0,"app-fan",3),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.fan")," ")}}function C0(e,n){if(e&1&&(o(0,"app-air-purifier",3),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.air_purifier")," ")}}function x0(e,n){if(e&1&&(o(0,"app-access-code",3),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.access_code")," ")}}function _0(e,n){if(e&1&&(o(0,"app-lightbulb",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.lightbulb")," ")}}function y0(e,n){if(e&1&&(o(0,"app-light-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),_(c(2,2,"accessories.core.light_sensor"))}}function k0(e,n){if(e&1&&(o(0,"app-lock-mechanism",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.lock_mechanism")," ")}}function S0(e,n){if(e&1&&(o(0,"app-temperature-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),g(" ",c(2,2,"accessories.core.temperature_sensor")," ")}}function b0(e,n){if(e&1&&(o(0,"app-garage-door-opener",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.garage_door_opener")," ")}}function w0(e,n){if(e&1&&(o(0,"app-motion-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),_(c(2,2,"accessories.core.motion_sensor"))}}function T0(e,n){if(e&1&&(o(0,"app-occupancy-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),g(" ",c(2,2,"accessories.core.occupancy_sensor")," ")}}function M0(e,n){if(e&1&&(o(0,"app-contact-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),_(c(2,2,"accessories.core.contact_sensor"))}}function E0(e,n){if(e&1&&(o(0,"app-humidity-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),_(c(2,2,"accessories.core.humidity_sensor"))}}function V0(e,n){if(e&1&&(o(0,"app-air-quality-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),g(" ",c(2,2,"accessories.core.air_quality_sensor")," ")}}function B0(e,n){if(e&1&&(o(0,"app-window-covering",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.window_covering")," ")}}function A0(e,n){if(e&1&&(o(0,"app-window",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.window")," ")}}function D0(e,n){if(e&1&&(o(0,"app-door",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.door")," ")}}function I0(e,n){if(e&1&&(o(0,"app-television",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.television")," ")}}function P0(e,n){if(e&1&&(o(0,"app-battery",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),_(c(2,2,"accessories.core.battery"))}}function F0(e,n){if(e&1&&(o(0,"app-battery",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),_(c(2,2,"accessories.core.battery"))}}function H0(e,n){if(e&1&&(o(0,"app-speaker",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.speaker")," ")}}function L0(e,n){if(e&1&&(o(0,"app-speaker",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.speaker")," ")}}function O0(e,n){if(e&1&&(o(0,"app-doorbell",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.doorbell")," ")}}function N0(e,n){if(e&1&&(o(0,"app-microphone",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.microphone")," ")}}function R0(e,n){if(e&1&&(o(0,"app-security-system",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.security_system")," ")}}function W0(e,n){if(e&1&&(o(0,"app-leak-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),_(c(2,2,"accessories.core.leak_sensor"))}}function j0(e,n){if(e&1&&(o(0,"app-smoke-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),_(c(2,2,"accessories.core.smoke_sensor"))}}function U0(e,n){if(e&1&&(o(0,"app-carbon-monoxide-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),g(" ",c(2,2,"accessories.core.carbon_monoxide_sensor")," ")}}function $0(e,n){if(e&1&&(o(0,"app-carbon-dioxide-sensor",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),g(" ",c(2,2,"accessories.core.carbon_dioxide_sensor")," ")}}function G0(e,n){if(e&1&&(o(0,"app-valve",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.valve")," ")}}function z0(e,n){if(e&1&&(o(0,"app-irrigation-system",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),g(" ",c(2,2,"accessories.core.irrigation_system")," ")}}function q0(e,n){if(e&1&&(o(0,"app-heater-cooler",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.heater_cooler")," ")}}function Z0(e,n){if(e&1&&(o(0,"app-heater-cooler",5),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("type","heater")("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,4,"accessories.core.heater")," ")}}function K0(e,n){if(e&1&&(o(0,"app-heater-cooler",5),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("type","cooler")("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,4,"accessories.core.cooler")," ")}}function Q0(e,n){if(e&1&&(o(0,"app-humidifier-dehumidifier",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.humidifier_dehumidifier")," ")}}function Y0(e,n){if(e&1&&(o(0,"app-humidifier-dehumidifier",5),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("type","humidifier")("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,4,"accessories.core.humidifier")," ")}}function X0(e,n){if(e&1&&(o(0,"app-humidifier-dehumidifier",5),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("type","dehumidifier")("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,4,"accessories.core.dehumidifier")," ")}}function J0(e,n){if(e&1&&(o(0,"app-stateless-programmable-switch",4),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service),r(),g(" ",c(2,2,"accessories.core.stateless_programmable_switch")," ")}}function ed(e,n){if(e&1&&(o(0,"app-filter-maintenance",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.filter_maintenance")," ")}}function td(e,n){if(e&1&&(o(0,"app-robot-vacuum",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.robot_vacuum")," ")}}function id(e,n){if(e&1&&(o(0,"app-washing-machine",2),d(1),l(2,"translate"),s()),e&2){let t=u();f("service",t.service)("readyForControl",t.$accessories.readyForControl),r(),g(" ",c(2,3,"accessories.core.washing_machine")," ")}}function nd(e,n){if(e&1&&(o(0,"app-unknown",4),d(1),s()),e&2){let t=u();f("service",t.service),r(),_(t.service.humanType)}}var Zg=(()=>{class e{$accessories=F(Ei);service;static \u0275fac=function(a){return new(a||e)};static \u0275cmp=w({type:e,selectors:[["app-accessory-tile"]],inputs:{service:"service"},decls:48,vars:3,consts:[["type","button",1,"manage-accessory-button"],[1,"fas","fa-circle-notch","fa-spin","refreshing-accessory-status-icon","grey-text"],[3,"service","readyForControl"],[1,"w-100",3,"service","readyForControl"],[3,"service"],[3,"service","type","readyForControl"],["type","button",1,"manage-accessory-button",3,"click"],["aria-hidden","true",1,"fas","fa-bars","grey-text"]],template:function(a,i){if(a&1&&(xi(0),C(1,p0,3,3,"button",0),C(2,m0,1,0,"i",1),C(3,u0,3,5,"app-switch",2)(4,f0,3,5,"app-thermostat",2)(5,v0,3,5,"app-outlet",2)(6,g0,3,5,"app-fan",3)(7,h0,3,5,"app-fan",3)(8,C0,3,5,"app-air-purifier",3)(9,x0,3,5,"app-access-code",3)(10,_0,3,5,"app-lightbulb",2)(11,y0,3,4,"app-light-sensor",4)(12,k0,3,5,"app-lock-mechanism",2)(13,S0,3,4,"app-temperature-sensor",4)(14,b0,3,5,"app-garage-door-opener",2)(15,w0,3,4,"app-motion-sensor",4)(16,T0,3,4,"app-occupancy-sensor",4)(17,M0,3,4,"app-contact-sensor",4)(18,E0,3,4,"app-humidity-sensor",4)(19,V0,3,4,"app-air-quality-sensor",4)(20,B0,3,5,"app-window-covering",2)(21,A0,3,5,"app-window",2)(22,D0,3,5,"app-door",2)(23,I0,3,5,"app-television",2)(24,P0,3,4,"app-battery",4)(25,F0,3,4,"app-battery",4)(26,H0,3,5,"app-speaker",2)(27,L0,3,5,"app-speaker",2)(28,O0,3,5,"app-doorbell",2)(29,N0,3,5,"app-microphone",2)(30,R0,3,5,"app-security-system",2)(31,W0,3,4,"app-leak-sensor",4)(32,j0,3,4,"app-smoke-sensor",4)(33,U0,3,4,"app-carbon-monoxide-sensor",4)(34,$0,3,4,"app-carbon-dioxide-sensor",4)(35,G0,3,5,"app-valve",2)(36,z0,3,4,"app-irrigation-system",4)(37,q0,3,5,"app-heater-cooler",2)(38,Z0,3,6,"app-heater-cooler",5)(39,K0,3,6,"app-heater-cooler",5)(40,Q0,3,5,"app-humidifier-dehumidifier",2)(41,Y0,3,6,"app-humidifier-dehumidifier",5)(42,X0,3,6,"app-humidifier-dehumidifier",5)(43,J0,3,4,"app-stateless-programmable-switch",4)(44,ed,3,5,"app-filter-maintenance",2)(45,td,3,5,"app-robot-vacuum",2)(46,id,3,5,"app-washing-machine",2)(47,nd,2,2,"app-unknown",4),_i()),a&2){let p;r(),x(i.$accessories.readyForControl?1:-1),r(),x(i.$accessories.readyForControl?-1:2),r(),x((p=i.service.customType||i.service.type)==="Switch"?3:p==="Thermostat"?4:p==="Outlet"?5:p==="Fan"?6:p==="Fanv2"?7:p==="AirPurifier"?8:p==="AccessCode"?9:p==="Lightbulb"?10:p==="LightSensor"?11:p==="LockMechanism"?12:p==="TemperatureSensor"?13:p==="GarageDoorOpener"?14:p==="MotionSensor"?15:p==="OccupancySensor"?16:p==="ContactSensor"?17:p==="HumiditySensor"?18:p==="AirQualitySensor"?19:p==="WindowCovering"?20:p==="Window"?21:p==="Door"?22:p==="Television"?23:p==="Battery"?24:p==="BatteryService"?25:p==="Speaker"?26:p==="SmartSpeaker"?27:p==="Doorbell"?28:p==="Microphone"?29:p==="SecuritySystem"?30:p==="LeakSensor"?31:p==="SmokeSensor"?32:p==="CarbonMonoxideSensor"?33:p==="CarbonDioxideSensor"?34:p==="Valve"?35:p==="IrrigationSystem"?36:p==="HeaterCooler"?37:p==="Heater"?38:p==="Cooler"?39:p==="HumidifierDehumidifier"?40:p==="Humidifier"?41:p==="Dehumidifier"?42:p==="StatelessProgrammableSwitch"?43:p==="FilterMaintenance"?44:p==="RobotVacuum"?45:p==="WashingMachine"?46:47)}},dependencies:[An,Hn,kn,Xi,Wi,un,dn,gn,Pn,tn,xn,_n,zi,sn,ji,Un,Gn,Zi,In,Ui,En,wn,cn,Tn,Gi,$i,Rn,ln,on,an,Vn,en,Qi,Ln,Cn,Sn,Wn,Vi,T],encapsulation:2})}return e})();export{Zg as a};