iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
55 lines • 69 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[81802],{16629:function(t,e,o){o.d(e,{E7:function(){return u},Mn:function(){return a},P9:function(){return l},lf:function(){return h}});o(18111),o(61701),o(62953);var n=o(63004);const a=t=>{const e=t/100;return[Math.round(i(e)),Math.round(r(e)),Math.round(s(e))]},i=t=>{if(t<=66)return 255;const e=329.698727446*(t-60)**-.1332047592;return(0,n.q)(e,0,255)},r=t=>{let e;return e=t<=66?99.4708025861*Math.log(t)-161.1195681661:288.1221695283*(t-60)**-.0755148492,(0,n.q)(e,0,255)},s=t=>{if(t>=66)return 255;if(t<=19)return 0;const e=138.5177312231*Math.log(t-10)-305.0447927307;return(0,n.q)(e,0,255)},c=(t,e)=>{const o=Math.max(...t),n=Math.max(...e);let a;return a=0===n?0:o/n,e.map(t=>Math.round(t*a))},l=t=>0===t?1e6:Math.floor(1e6/t),d=t=>0===t?1e6:Math.floor(1e6/t),h=(t,e,o)=>{const[n,i,r,s,h]=t,u=d(null!=e?e:2700),p=d(null!=o?o:6500),m=u-p;let f;try{f=h/(s+h)}catch(C){f=.5}const g=p+f*m,v=g?l(g):0,[b,y,w]=a(v),_=Math.max(s,h)/255;return c([n,i,r,s,h],[n+b*_,i+y*_,r+w*_])},u=t=>{const[e,o,n,a]=t;return c([e,o,n,a],[e+a,o+a,n+a])}},80785:function(t,e,o){function n(t){return!!t&&(t instanceof Date&&!isNaN(t.valueOf()))}o.d(e,{A:function(){return n}})},72487:function(t,e,o){o.a(t,async function(t,n){try{o.d(e,{CA:function(){return k},Mi:function(){return $},Pm:function(){return M},Wq:function(){return y},Yq:function(){return l},bl:function(){return z},c2:function(){return _},fr:function(){return v},gu:function(){return L},kz:function(){return h},m9:function(){return T},sl:function(){return f},ur:function(){return E},zB:function(){return p}});o(18111),o(20116);var a=o(74487),i=o(22786),r=o(46927),s=o(8480),c=t([a,s]);[a,s]=c.then?(await c)():c;(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)}));const l=(t,e,o)=>d(e,o.time_zone).format(t),d=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),h=(t,e,o)=>u(e,o.time_zone).format(t),u=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),p=(t,e,o)=>{var n,a,i,s;const c=m(e,o.time_zone);if(e.date_format===r.ow.language||e.date_format===r.ow.system)return c.format(t);const l=c.formatToParts(t),d=null===(n=l.find(t=>"literal"===t.type))||void 0===n?void 0:n.value,h=null===(a=l.find(t=>"day"===t.type))||void 0===a?void 0:a.value,u=null===(i=l.find(t=>"month"===t.type))||void 0===i?void 0:i.value,p=null===(s=l.find(t=>"year"===t.type))||void 0===s?void 0:s.value,f=l[l.length-1];let g="literal"===(null==f?void 0:f.type)?null==f?void 0:f.value:"";"bg"===e.language&&e.date_format===r.ow.YMD&&(g="");return{[r.ow.DMY]:`${h}${d}${u}${d}${p}${g}`,[r.ow.MDY]:`${u}${d}${h}${d}${p}${g}`,[r.ow.YMD]:`${p}${d}${u}${d}${h}${g}`}[e.date_format]},m=(0,i.A)((t,e)=>{const o=t.date_format===r.ow.system?void 0:t.language;return t.date_format===r.ow.language||(t.date_format,r.ow.system),new Intl.DateTimeFormat(o,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})}),f=(t,e,o)=>g(e,o.time_zone).format(t),g=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),v=(t,e,o)=>b(e,o.time_zone).format(t),b=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),y=(t,e,o)=>w(e,o.time_zone).format(t),w=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,s.wj)(t.time_zone,e)})),_=(t,e,o)=>C(e,o.time_zone).format(t),C=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),M=(t,e,o)=>x(e,o.time_zone).format(t),x=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),k=(t,e,o)=>A(e,o.time_zone).format(t),A=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,s.wj)(t.time_zone,e)})),L=(t,e,o)=>H(e,o.time_zone).format(t),H=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,s.wj)(t.time_zone,e)})),$=(t,e,o)=>V(e,o.time_zone).format(t),V=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),E=(t,e,o)=>Z(e,o.time_zone).format(t),Z=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),z=(t,e,o)=>{const n=(0,s.wj)(e.time_zone,o.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:n}).format(t)},T=(t,e,o,n)=>`${z(t,o,n)}/${z(e,o,n)}`;n()}catch(l){n(l)}})},82591:function(t,e,o){o.a(t,async function(t,n){try{o.d(e,{E2:function(){return p},Z8:function(){return m},a3:function(){return b},i:function(){return h},nR:function(){return l}});o(16280);var a=o(74487),i=o(22786),r=o(79791),s=t([a]);a=(s.then?(await s)():s)[0];const c=t=>t<10?`0${t}`:t,l=(t,e)=>{const o=e.days||0,n=e.hours||0,a=e.minutes||0,i=e.seconds||0,r=e.milliseconds||0;return o>0?`${Intl.NumberFormat(t.language,{style:"unit",unit:"day",unitDisplay:"long"}).format(o)} ${n}:${c(a)}:${c(i)}`:n>0?`${n}:${c(a)}:${c(i)}`:a>0?`${a}:${c(i)}`:i>0?Intl.NumberFormat(t.language,{style:"unit",unit:"second",unitDisplay:"long"}).format(i):r>0?Intl.NumberFormat(t.language,{style:"unit",unit:"millisecond",unitDisplay:"long"}).format(r):null},d=(0,i.A)(t=>new Intl.DurationFormat(t.language,{style:"long"})),h=(t,e)=>d(t).format(e),u=(0,i.A)(t=>new Intl.DurationFormat(t.language,{style:"digital",hoursDisplay:"auto"})),p=(t,e)=>u(t).format(e),m=["min","h","d"],f=(0,i.A)(t=>new Intl.DurationFormat(t.language,{style:"narrow",daysDisplay:"always"})),g=(0,i.A)(t=>new Intl.DurationFormat(t.language,{style:"narrow",hoursDisplay:"always"})),v=(0,i.A)(t=>new Intl.DurationFormat(t.language,{style:"narrow",minutesDisplay:"always"})),b=(t,e,o,n)=>{const a=void 0!==n?(0,r.L)(parseFloat(e),n):parseFloat(e);switch(o){case"d":{const e=Math.floor(a),o={days:e,hours:Math.floor(24*(a-e))};return f(t).format(o)}case"h":{const e=Math.floor(a),o={hours:e,minutes:Math.floor(60*(a-e))};return g(t).format(o)}case"min":{const e=Math.floor(a),o={minutes:e,seconds:Math.floor(60*(a-e))};return v(t).format(o)}default:throw new Error("Invalid duration unit")}};n()}catch(c){n(c)}})},30162:function(t,e,o){o.a(t,async function(t,n){try{o.d(e,{LW:function(){return f},Xs:function(){return p},fU:function(){return l},ie:function(){return h}});var a=o(74487),i=o(22786),r=o(8480),s=o(69543),c=t([a,r]);[a,r]=c.then?(await c)():c;const l=(t,e,o)=>d(e,o.time_zone).format(t),d=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,r.wj)(t.time_zone,e)})),h=(t,e,o)=>u(e,o.time_zone).format(t),u=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,r.wj)(t.time_zone,e)})),p=(t,e,o)=>m(e,o.time_zone).format(t),m=(0,i.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,r.wj)(t.time_zone,e)})),f=(t,e,o)=>g(e,o.time_zone).format(t),g=(0,i.A)((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,r.wj)(t.time_zone,e)}));n()}catch(l){n(l)}})},69543:function(t,e,o){o.d(e,{J:function(){return i}});o(74423);var n=o(22786),a=o(46927);const i=(0,n.A)(t=>{if(t.time_format===a.Hg.language||t.time_format===a.Hg.system){const e=t.time_format===a.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===a.Hg.am_pm})},93421:function(t,e,o){o.d(e,{IW:function(){return d},dH:function(){return l},fI:function(){return c}});o(44114),o(62953);var n=o(35211),a=o(22792),i=o(32172);const r=(t,e)=>{let o=t;for(const n of e){if(null==o)return;o=o[n]}return o},s=(t,e,o)=>{const a=(0,i.p)({transformer:function(t){return o.call(this,t)},watch:e?[e]:[]}),r=(0,n.Fg)({context:t,subscribe:!0});return(t,e)=>{a(t,e),r(t,e)}},c=t=>s(a.iN,t.entityIdPath[0],function(e){const o=r(this,t.entityIdPath);return"string"==typeof o?null==e?void 0:e[o]:void 0}),l=t=>s(a.X1,t.entityIdPath[0],function(e){const o=r(this,t.entityIdPath);return"string"==typeof o?null==e?void 0:e[o]:void 0}),d=()=>s(a.D5,void 0,({localize:t})=>t)},26218:function(t,e,o){o.d(e,{a:function(){return a}});o(16280);const n=(0,o(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function a(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const a=e.connectedCallback;e.connectedCallback=function(){a.call(this);const e=this[o];e&&this.updateComplete.then(()=>{const o=this.renderRoot.querySelector(t);o&&setTimeout(()=>{o.scrollTop=e},0)})};const i=Object.getOwnPropertyDescriptor(e,o);let r;if(void 0===i)r={get(){var t;return this[`__${String(o)}`]||(null===(t=history.state)||void 0===t?void 0:t.scrollPosition)},set(t){n(t),this[`__${String(o)}`]=t},configurable:!0,enumerable:!0};else{const t=i.set;r=Object.assign(Object.assign({},i),{},{set(e){n(e),this[`__${String(o)}`]=e,null==t||t.call(this,e)}})}Object.defineProperty(e,o,r)}}},32172:function(t,e,o){o.d(e,{p:function(){return n}});o(16280),o(18111),o(7588),o(45367),o(92731),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);function n(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const n=String(o),a=e;if(a._transformers){if(!a.hasOwnProperty("_transformers")){const t=a._transformers;a._transformers=new Map,t.forEach((t,e)=>a._transformers.set(e,t))}}else{a._transformers=new Map,a._watching=new Map;const t=a.willUpdate;a.willUpdate=function(e){t.call(this,e);const o=new Set;e.forEach((t,e)=>{const n=this._watching.get(e);void 0!==n&&n.forEach(t=>o.add(t))}),o.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}a._transformers.set(o,t.transformer),t.watch&&t.watch.forEach(t=>{let e=a._watching.get(t);e||(e=new Set,a._watching.set(t,e)),e.add(o)});const i=Object.getOwnPropertyDescriptor(e,o);let r;if(void 0===i)r={get(){return this[`__transform_${n}`]},set(t){const e=this[`__transform_${n}`],o=this._transformers.get(n);this[`__transform_${n}`]=o?o.call(this,t):t,this[`__original_${n}`]=t,this.requestUpdate(n,e)},configurable:!0,enumerable:!0};else{const t=i.set;r=Object.assign(Object.assign({},i),{},{set(e){const o=this[`__transform_${n}`],a=this._transformers.get(n);this[`__transform_${n}`]=a?a.call(this,e):e,this[`__original_${n}`]=e,this.requestUpdate(n,o),null==t||t.call(this,e)}})}Object.defineProperty(e,o,r)}}},69093:function(t,e,o){o.d(e,{t:function(){return a}});var n=o(71727);const a=t=>(0,n.m)(t.entity_id)},82286:function(t,e,o){o.d(e,{$:function(){return n}});const n=(t,e)=>a(t.attributes,e),a=(t,e)=>0!==(t.supported_features&e)},79791:function(t,e,o){o.d(e,{L:function(){return n}});const n=(t,e=2)=>Math.round(t*10**e)/10**e},31290:function(t,e,o){o.d(e,{n:function(){return n}});o(27495),o(25440);const n=t=>t.replace(/^_*(.)|_+(.)/g,(t,e,o)=>e?e.toUpperCase():" "+o.toUpperCase())},67258:function(t,e,o){o.d(e,{d:function(){return n}});const n=t=>{switch(t.language){case"cs":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}}},8549:function(t,e,o){o.d(e,{A:function(){return a}});var n=o(67258);const a=(t,e)=>"°"===t?"":e&&"%"===t?(0,n.d)(e):" "},58139:function(t,e,o){o.d(e,{d:function(){return n},t:function(){return a}});o(3362);const n=async(t,e)=>new Promise(o=>{const n=e(t,t=>{n(),o(t)})}),a=async t=>new Promise(e=>{const o=t.subscribe(t=>{o(),e(t)})})},77796:function(t,e,o){o.d(e,{n:function(){return n}});o(62953);const n=(t,e,o=!0,n=!0)=>{let a,i=0;const r=(...r)=>{const s=()=>{i=!1===o?0:Date.now(),a=void 0,t(...r)},c=Date.now();i||!1!==o||(i=c);const l=e-(c-i);l<=0||l>e?(a&&(clearTimeout(a),a=void 0),i=c,t(...r)):a||!1===n||(a=window.setTimeout(s,l))};return r.cancel=()=>{clearTimeout(a),a=void 0,i=0},r}},34296:function(t,e,o){o(62953);var n=o(40445),a=o(96229),i=o(26069),r=o(91735),s=o(42034),c=o(5124),l=o(67576);let d,h,u,p,m=t=>t;class f extends a.k{renderOutline(){return this.filled?(0,c.qy)(d||(d=m`<span class="filled"></span>`)):super.renderOutline()}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{active:this.active})}renderPrimaryContent(){return(0,c.qy)(h||(h=m` <span class="leading icon" aria-hidden="true"> ${0} </span> <span class="label">${0}</span> <span class="touch"></span> <span class="trailing leading icon" aria-hidden="true"> ${0} </span> `),this.renderLeadingIcon(),this.label,this.renderTrailingIcon())}renderTrailingIcon(){return(0,c.qy)(u||(u=m`<slot name="trailing-icon"></slot>`))}constructor(...t){super(...t),this.filled=!1,this.active=!1}}f.styles=[r.R,s.R,i.R,(0,c.AH)(p||(p=m`:host{--md-sys-color-primary:var(--primary-text-color);--md-sys-color-on-surface:var(--primary-text-color);--md-assist-chip-container-shape:var(
--ha-assist-chip-container-shape,
16px
);--md-assist-chip-outline-color:var(--outline-color);--md-assist-chip-label-text-weight:400}.filled{display:flex;pointer-events:none;border-radius:inherit;inset:0;position:absolute;background-color:var(--ha-assist-chip-filled-container-color)}::slotted([slot=icon]),::slotted([slot=trailing-icon]){display:flex;--mdc-icon-size:var(--md-input-chip-icon-size, 18px);font-size:var(--_label-text-size)!important}.trailing.icon ::slotted(*),.trailing.icon svg{margin-inline-end:unset;margin-inline-start:var(--_icon-label-space)}::before{background:var(--ha-assist-chip-container-color,transparent);opacity:var(--ha-assist-chip-container-opacity, 1)}:where(.active)::before{background:var(--ha-assist-chip-active-container-color);opacity:var(--ha-assist-chip-active-container-opacity)}.label{font-family:var(--ha-font-family-body)}`))],(0,n.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],f.prototype,"filled",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean})],f.prototype,"active",void 0),f=(0,n.Cg)([(0,l.EM)("ha-assist-chip")],f)},38962:function(t,e,o){o.a(t,async function(t,n){try{o.r(e);o(62953);var a=o(40445),i=o(5124),r=o(67576),s=o(6412),c=o(93421),l=o(1087),d=o(26300),h=(o(67094),t([d]));d=(h.then?(await h)():h)[0];let u,p,m,f,g=t=>t;const v="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",b={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};class y extends i.WF{render(){var t;return(0,i.qy)(u||(u=g` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,s.H)({[this.alertType]:!0}),this.title?"":"no-title",b[this.alertType],(0,s.H)({content:!0,narrow:this.narrow}),this.title?(0,i.qy)(p||(p=g`<div class="title">${0}</div>`),this.title):i.s6,this.dismissable?(0,i.qy)(m||(m=g`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(t=this._localize)||void 0===t?void 0:t.call(this,"ui.common.dismiss_alert"),v):i.s6)}_dismissClicked(){(0,l.r)(this,"alert-dismissed-clicked")}constructor(...t){super(...t),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}y.styles=(0,i.AH)(f||(f=g`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`)),(0,a.Cg)([(0,r.MZ)()],y.prototype,"title",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"alert-type"})],y.prototype,"alertType",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"dismissable",void 0),(0,a.Cg)([(0,r.wk)(),(0,c.IW)()],y.prototype,"_localize",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"narrow",void 0),y=(0,a.Cg)([(0,r.EM)("ha-alert")],y),n()}catch(u){n(u)}})},9503:function(t,e,o){var n=o(40445),a=o(97577),i=o(5124),r=o(67576);let s,c=t=>t;class l extends a.A{get value(){var t;return null!==(t=this._value)&&void 0!==t?t:null}set value(t){this._value=t}static get styles(){return[a.A.styles,(0,i.AH)(s||(s=c`:host{--wa-form-control-toggle-size:var(--ha-checkbox-size, 20px);--wa-form-control-border-color:var(
--ha-checkbox-border-color,
var(--ha-color-border-neutral-normal)
);--wa-form-control-background-color:var(
--ha-checkbox-background-color,
var(--wa-form-control-background-color)
);--checked-icon-color:var(
--ha-checkbox-checked-icon-color,
var(--wa-color-brand-on-loud)
);--wa-form-control-activated-color:var(
--ha-checkbox-checked-background-color,
var(--ha-color-fill-primary-loud-resting)
);-webkit-tap-highlight-color:transparent;--checked-icon-scale:var(--ha-checkbox-checked-icon-scale, 0.9);--wa-form-control-required-content:var(
--ha-checkbox-required-marker,
var(--ha-input-required-marker, "*")
);--wa-form-control-required-content-offset:var(
--ha-checkbox-required-marker-offset,
0.1rem
)}[part~=base]{align-items:center;gap:var(--ha-space-2)}[part~=control]{border-radius:var(--ha-checkbox-border-radius,var(--ha-border-radius-sm));border-width:var(--ha-checkbox-border-width,var(--ha-border-width-md));margin-inline-end:0}[part~=label]{line-height:1}#hint{font-size:var(--ha-font-size-xs);color:var(--ha-color-text-secondary)}label:has(input:not(:disabled)):hover{--wa-form-control-border-color:var(
--ha-checkbox-border-color-hover,
var(--ha-checkbox-border-color, var(--ha-color-border-neutral-loud))
)}label:has(input:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-background-color-hover,var(--ha-color-form-background-hover))}label:has(input:checked:not(:disabled)):hover [part~=control],label:has(input:indeterminate:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover));border-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover))}`))]}}l=(0,n.Cg)([(0,r.EM)("ha-checkbox")],l)},59174:function(t,e,o){o.a(t,async function(t,e){try{var n=o(40445),a=o(35211),i=o(5124),r=o(67576),s=o(91450),c=o(22792),l=o(85694),d=o(44144),h=(o(47680),t([l]));l=(h.then?(await h)():h)[0];let u,p,m,f,g,v,b,y=t=>t;class w extends i.WF{render(){if(this.icon)return(0,i.qy)(u||(u=y`<ha-icon .icon="${0}"></ha-icon>`),this.icon);if(!this.domain)return i.s6;if(!this._connection||!this._hassConfig)return this._renderFallback();const t=(0,l._4)(this._connection.connection,this._hassConfig.config,this.domain,this.deviceClass,this.state).then(t=>t?(0,i.qy)(p||(p=y`<ha-icon .icon="${0}"></ha-icon>`),t):this._renderFallback());return(0,i.qy)(m||(m=y`${0}`),(0,s.T)(t))}_renderFallback(){if(this.domain&&this.domain in l.l)return(0,i.qy)(f||(f=y` <ha-svg-icon .path="${0}"></ha-svg-icon> `),l.l[this.domain]);if(this.brandFallback){var t,e;const o=(0,d.MR)({domain:this.domain,type:"icon",darkOptimized:null===(t=this._hassUi)||void 0===t?void 0:t.themes.darkMode},null===(e=this._hassConfig)||void 0===e?void 0:e.auth.data.hassUrl);return(0,i.qy)(g||(g=y` <img alt="" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer"> `),o)}return(0,i.qy)(v||(v=y`<ha-svg-icon .path="${0}"></ha-svg-icon>`),l.lW)}}w.styles=(0,i.AH)(b||(b=y`img{width:var(--mdc-icon-size,24px)}`)),(0,n.Cg)([(0,r.MZ)()],w.prototype,"domain",void 0),(0,n.Cg)([(0,r.MZ)({attribute:!1})],w.prototype,"deviceClass",void 0),(0,n.Cg)([(0,r.MZ)({attribute:!1})],w.prototype,"state",void 0),(0,n.Cg)([(0,r.MZ)()],w.prototype,"icon",void 0),(0,n.Cg)([(0,r.MZ)({attribute:"brand-fallback",type:Boolean})],w.prototype,"brandFallback",void 0),(0,n.Cg)([(0,r.wk)(),(0,a.Fg)({context:c.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,n.Cg)([(0,r.wk)(),(0,a.Fg)({context:c.Wq,subscribe:!0})],w.prototype,"_connection",void 0),(0,n.Cg)([(0,r.wk)(),(0,a.Fg)({context:c.EK,subscribe:!0})],w.prototype,"_hassUi",void 0),w=(0,n.Cg)([(0,r.EM)("ha-domain-icon")],w),e()}catch(u){e(u)}})},11382:function(t,e,o){o(3362),o(62953);var n=o(40445),a=o(5124),i=o(67576),r=o(6412),s=o(1087),c=o(12587);o(67094);let l,d,h,u,p=t=>t;class m extends a.WF{render(){const t=this.noCollapse?a.s6:(0,a.qy)(l||(l=p` <ha-svg-icon .path="${0}" class="summary-icon ${0}"></ha-svg-icon> `),"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",(0,r.H)({expanded:this.expanded}));return(0,a.qy)(d||(d=p` <div class="top ${0}"> <div id="summary" class="${0}" @click="${0}" @keydown="${0}" @focus="${0}" @blur="${0}" role="button" tabindex="${0}" aria-expanded="${0}" aria-controls="sect1" part="summary"> ${0} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${0} <slot class="secondary" name="secondary">${0}</slot> </div> </slot> <slot name="event"></slot> ${0} <slot name="icons"></slot> </div> </div> <div class="container ${0}" @transitionend="${0}" role="region" aria-labelledby="summary" aria-hidden="${0}" tabindex="-1"> ${0} </div> `),(0,r.H)({expanded:this.expanded}),(0,r.H)({noCollapse:this.noCollapse}),this._toggleContainer,this._toggleContainer,this._focusChanged,this._focusChanged,this.noCollapse?-1:0,this.expanded,this.leftChevron?t:a.s6,this.header,this.secondary,this.leftChevron?a.s6:t,(0,r.H)({expanded:this.expanded}),this._handleTransitionEnd,!this.expanded,this._showContent?(0,a.qy)(h||(h=p`<slot></slot>`)):"")}willUpdate(t){super.willUpdate(t),t.has("expanded")&&(this._showContent=this.expanded,setTimeout(()=>{this._container.style.overflow=this.expanded?"initial":"hidden"},300))}_handleTransitionEnd(){this._container.style.removeProperty("height"),this._container.style.overflow=this.expanded?"initial":"hidden",this._showContent=this.expanded}async _toggleContainer(t){if(t.defaultPrevented)return;if("keydown"===t.type&&"Enter"!==t.key&&" "!==t.key)return;if(t.preventDefault(),this.noCollapse)return;const e=!this.expanded;(0,s.r)(this,"expanded-will-change",{expanded:e}),this._container.style.overflow="hidden",e&&(this._showContent=!0,await(0,c.E)());const o=this._container.scrollHeight;this._container.style.height=`${o}px`,e||setTimeout(()=>{this._container.style.height="0px"},0),this.expanded=e,(0,s.r)(this,"expanded-changed",{expanded:this.expanded})}_focusChanged(t){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===t.type)}constructor(...t){super(...t),this.expanded=!1,this.outlined=!1,this.leftChevron=!1,this.noCollapse=!1,this._showContent=this.expanded}}m.styles=(0,a.AH)(u||(u=p`:host{display:block}.top{display:flex;align-items:center;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.top.expanded{border-bottom-left-radius:0px;border-bottom-right-radius:0px}.top.focused{background:var(--input-fill-color)}:host([outlined]){box-shadow:none;border-width:1px;border-style:solid;border-color:var(--outline-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.summary-icon{transition:transform 150ms cubic-bezier(.4, 0, .2, 1);direction:var(--direction);margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;border-radius:var(--ha-border-radius-circle)}#summary:focus-visible ha-svg-icon.summary-icon{background-color:var(--ha-color-fill-neutral-normal-active)}::slotted([slot=leading-icon]),:host([left-chevron]) .summary-icon{margin-left:0;margin-right:8px;margin-inline-start:0;margin-inline-end:8px}#summary{flex:1;display:flex;padding:var(--expansion-panel-summary-padding,0 8px);min-height:48px;align-items:center;cursor:pointer;overflow:hidden;font-weight:var(--ha-font-weight-medium);outline:0}#summary.noCollapse{cursor:default}.summary-icon.expanded{transform:rotate(180deg)}.header,::slotted([slot=header]){flex:1;overflow-wrap:anywhere;color:var(--primary-text-color)}.container{padding:var(--expansion-panel-content-padding,0 8px);overflow:hidden;transition:height .3s cubic-bezier(.4, 0, .2, 1);height:0px}.container.expanded{height:auto}.secondary{display:block;color:var(--secondary-text-color);font-size:var(--ha-font-size-s)}`)),(0,n.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],m.prototype,"expanded",void 0),(0,n.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],m.prototype,"outlined",void 0),(0,n.Cg)([(0,i.MZ)({attribute:"left-chevron",type:Boolean,reflect:!0})],m.prototype,"leftChevron",void 0),(0,n.Cg)([(0,i.MZ)({attribute:"no-collapse",type:Boolean,reflect:!0})],m.prototype,"noCollapse",void 0),(0,n.Cg)([(0,i.MZ)()],m.prototype,"header",void 0),(0,n.Cg)([(0,i.MZ)()],m.prototype,"secondary",void 0),(0,n.Cg)([(0,i.wk)()],m.prototype,"_showContent",void 0),(0,n.Cg)([(0,i.P)(".container")],m.prototype,"_container",void 0),m=(0,n.Cg)([(0,i.EM)("ha-expansion-panel")],m)},90248:function(t,e,o){o.a(t,async function(t,n){try{o.r(e),o.d(e,{HaIconButtonArrowPrev:function(){return m}});o(62953);var a=o(40445),i=o(5124),r=o(67576),s=o(63091),c=o(26300),l=t([c]);c=(l.then?(await l)():l)[0];let d,h=t=>t;const u="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",p="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class m extends i.WF{render(){var t;return(0,i.qy)(d||(d=h` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?p:u}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],m.prototype,"disabled",void 0),(0,a.Cg)([(0,r.MZ)()],m.prototype,"label",void 0),(0,a.Cg)([(0,r.MZ)()],m.prototype,"href",void 0),(0,a.Cg)([(0,r.MZ)()],m.prototype,"target",void 0),(0,a.Cg)([(0,r.MZ)()],m.prototype,"rel",void 0),(0,a.Cg)([(0,r.MZ)()],m.prototype,"download",void 0),(0,a.Cg)([(0,r.wk)()],m.prototype,"_icon",void 0),m=(0,a.Cg)([(0,r.EM)("ha-icon-button-arrow-prev")],m),n()}catch(d){n(d)}})},26300:function(t,e,o){o.a(t,async function(t,n){try{o.r(e),o.d(e,{HaIconButton:function(){return f}});o(62953);var a=o(40445),i=o(5124),r=o(67576),s=o(63672),c=o(18350),l=(o(67094),t([c]));c=(l.then?(await l)():l)[0];let d,h,u,p,m=t=>t;class f extends i.WF{render(){return(0,i.qy)(d||(d=m` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,s.J)(this.label),(0,s.J)(this.hideTitle?void 0:this.label),(0,s.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,i.qy)(h||(h=m`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,i.qy)(u||(u=m`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}f.shadowRootOptions={mode:"open",delegatesFocus:!0},f.styles=(0,i.AH)(p||(p=m`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var(
--ha-icon-button-padding-inline,
--ha-space-2
);--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,a.Cg)([(0,r.MZ)({type:String})],f.prototype,"path",void 0),(0,a.Cg)([(0,r.MZ)({type:String})],f.prototype,"label",void 0),(0,a.Cg)([(0,r.MZ)({type:String,attribute:"aria-haspopup"})],f.prototype,"ariaHasPopup",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"hide-title",type:Boolean})],f.prototype,"hideTitle",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"selected",void 0),(0,a.Cg)([(0,r.MZ)()],f.prototype,"href",void 0),(0,a.Cg)([(0,r.MZ)()],f.prototype,"target",void 0),(0,a.Cg)([(0,r.MZ)()],f.prototype,"rel",void 0),(0,a.Cg)([(0,r.MZ)()],f.prototype,"download",void 0),f=(0,a.Cg)([(0,r.EM)("ha-icon-button")],f),n()}catch(d){n(d)}})},43661:function(t,e,o){o.r(e),o.d(e,{HaIconNext:function(){return s}});o(62953);var n=o(40445),a=o(67576),i=o(63091),r=o(67094);class s extends r.HaSvgIcon{constructor(...t){super(...t),this.path="rtl"===i.G.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}}(0,n.Cg)([(0,a.MZ)()],s.prototype,"path",void 0),s=(0,n.Cg)([(0,a.EM)("ha-icon-next")],s)},8630:function(t,e,o){var n=o(40445),a=o(68618),i=o(11081),r=o(67576);class s extends a.iY{}s.styles=i.R,s=(0,n.Cg)([(0,r.EM)("ha-list")],s)},2054:function(t,e,o){o.a(t,async function(t,e){try{o(16280),o(62953);var n=o(40445),a=o(5124),i=o(67576),r=o(1087),s=o(44249),c=o(26300),l=t([c]);c=(l.then?(await l)():l)[0];let d,h,u,p=t=>t;const m="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class f extends a.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return a.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,a.qy)(d||(d=p` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),m,this._toggleMenu,t?(0,a.qy)(h||(h=p`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,o=t.has("narrow")?t.get("narrow"):this.narrow,n=!1===(null==e?void 0:e.kioskMode)&&(o||"always_hidden"===(null==e?void 0:e.dockedSidebar)),a=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&n===a||(this._show=a||this._alwaysVisible,a?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,s.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,r.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}f.styles=(0,a.AH)(u||(u=p`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,n.Cg)([(0,i.MZ)({type:Boolean})],f.prototype,"narrow",void 0),(0,n.Cg)([(0,i.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,n.Cg)([(0,i.wk)()],f.prototype,"_hasNotifications",void 0),(0,n.Cg)([(0,i.wk)()],f.prototype,"_show",void 0),f=(0,n.Cg)([(0,i.EM)("ha-menu-button")],f),e()}catch(d){e(d)}})},67094:function(t,e,o){o.r(e),o.d(e,{HaSvgIcon:function(){return h}});var n=o(40445),a=o(5124),i=o(67576);let r,s,c,l,d=t=>t;class h extends a.WF{render(){return(0,a.JW)(r||(r=d` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,a.JW)(s||(s=d`<path class="primary-path" d="${0}"></path>`),this.path):a.s6,this.secondaryPath?(0,a.JW)(c||(c=d`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):a.s6)}}h.styles=(0,a.AH)(l||(l=d`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`)),(0,n.Cg)([(0,i.MZ)()],h.prototype,"path",void 0),(0,n.Cg)([(0,i.MZ)({attribute:!1})],h.prototype,"secondaryPath",void 0),(0,n.Cg)([(0,i.MZ)({attribute:!1})],h.prototype,"viewBox",void 0),h=(0,n.Cg)([(0,i.EM)("ha-svg-icon")],h)},59646:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var n=o(40445),a=o(29344),i=o(5124),r=o(67576),s=o(88360),c=t([a]);a=(c.then?(await c)():c)[0];let l,d=t=>t;class h extends a.A{updated(t){super.updated(t),t.has("haptic")&&(this.haptic?this.addEventListener("change",this._forwardHaptic):this.removeEventListener("change",this._forwardHaptic))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this._forwardHaptic)}static get styles(){return[a.A.styles,(0,i.AH)(l||(l=d`:host{--wa-form-control-toggle-size:var(--ha-switch-size, 24px);--wa-form-control-required-content:var(
--ha-switch-required-marker,
var(--ha-input-required-marker, "*")
);--wa-form-control-required-content-offset:var(
--ha-switch-required-marker-offset,
0.1rem
);--thumb-size:var(--ha-switch-thumb-size, 18px);--width:var(--ha-switch-width, 48px)}label{position:relative;height:max(var(--thumb-size),var(--wa-form-control-toggle-size))}label::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-width:var(--ha-switch-min-touch-size,40px);min-height:var(--ha-switch-min-touch-size,40px)}label.disabled::before{pointer-events:none}.switch{background-color:var(--ha-switch-background-color,var(--ha-color-fill-disabled-quiet-resting));border-color:var(--ha-switch-border-color,var(--ha-color-border-neutral-normal))}label:not(.disabled) .input:focus-visible~.switch,label:not(.disabled):hover .switch{background-color:var(--ha-switch-background-color-hover,var(--ha-switch-background-color,var(--ha-color-fill-disabled-quiet-hover)))}.checked .switch{background-color:var(--ha-switch-checked-background-color,var(--ha-color-fill-primary-normal-resting));border-color:var(--ha-switch-checked-border-color,var(--ha-color-border-primary-loud))}label:not(.disabled).checked .input:focus-visible~.switch,label:not(.disabled).checked:hover .switch{background-color:var(--ha-switch-checked-background-color-hover,var(--ha-switch-checked-background-color,var(--ha-color-fill-primary-normal-hover)));border-color:var(--ha-switch-checked-border-color-hover,var(--ha-switch-checked-border-color,var(--ha-color-border-primary-loud)))}.switch .thumb{background-color:var(--ha-switch-thumb-background-color,var(--ha-color-on-neutral-normal));border-color:var(--ha-switch-thumb-border-color,var(--ha-color-on-neutral-normal));border-style:var(--wa-form-control-border-style);border-width:var(--wa-form-control-border-width);box-shadow:var(--ha-switch-thumb-box-shadow,var(--ha-box-shadow-s))}label:not(.disabled) .input:focus-visible~.switch .thumb,label:not(.disabled):hover .switch .thumb{background-color:var(--ha-switch-thumb-background-color-hover,var(--ha-switch-thumb-background-color,var(--ha-color-on-neutral-normal)));border-color:var(--ha-switch-thumb-border-color-hover,var(--ha-switch-thumb-border-color,var(--ha-color-on-neutral-normal)))}.checked .switch .thumb{background-color:var(--ha-switch-checked-thumb-background-color,var(--ha-color-on-primary-normal));border-color:var(--ha-switch-checked-thumb-border-color,var(--ha-color-on-primary-normal))}label:not(.disabled).checked .input:focus-visible~.switch .thumb,label:not(.disabled).checked:hover .switch .thumb{background-color:var(--ha-switch-checked-thumb-background-color-hover,var(--ha-switch-checked-thumb-background-color,var(--ha-color-on-primary-normal)));border-color:var(--ha-switch-checked-thumb-border-color-hover,var(--ha-switch-checked-thumb-border-color,var(--ha-color-on-primary-normal)))}label.disabled{opacity:var(--ha-switch-disabled-opacity, .3);cursor:not-allowed}label:not(.disabled) .input:focus-visible~.switch .thumb{outline:0;outline-offset:none}label:not(.disabled) .input:focus-visible~.switch{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}:host(:empty) slot.label{display:none}`))]}constructor(...t){super(...t),this.haptic=!1,this._forwardHaptic=()=>{(0,s.j)(this,"light")}}}(0,n.Cg)([(0,r.MZ)({type:Boolean})],h.prototype,"haptic",void 0),h=(0,n.Cg)([(0,r.EM)("ha-switch")],h),e()}catch(l){e(l)}})},34127:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var n=o(40445),a=o(52630),i=o(5124),r=o(67576),s=t([a]);a=(s.then?(await s)():s)[0];let c,l=t=>t;class d extends a.A{static get styles(){return[a.A.styles,(0,i.AH)(c||(c=l`:host{--wa-tooltip-background-color:var(
--ha-tooltip-background-color,
var(--ha-color-surface-default)
);--wa-tooltip-content-color:var(
--ha-tooltip-text-color,
var(--primary-text-color)
);--wa-tooltip-font-family:var(
--ha-tooltip-font-family,
var(--ha-font-family-body)
);--wa-tooltip-font-size:var(
--ha-tooltip-font-size,
var(--ha-font-size-m)
);--wa-tooltip-font-weight:var(
--ha-tooltip-font-weight,
var(--ha-font-weight-medium)
);--wa-tooltip-line-height:var(
--ha-tooltip-line-height,
var(--ha-line-height-condensed)
);--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
--ha-tooltip-border-radius,
var(--ha-border-radius-md)
);--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}.tooltip::part(popup){animation-duration:var(--ha-tooltip-animation-duration, 0)}.body{box-shadow:var(--ha-tooltip-box-shadow,var(--ha-box-shadow-m))}`))]}constructor(...t){super(...t),this.showDelay=350,this.hideDelay=150}}(0,n.Cg)([(0,r.MZ)({attribute:"show-delay",type:Number})],d.prototype,"showDelay",void 0),(0,n.Cg)([(0,r.MZ)({attribute:"hide-delay",type:Number})],d.prototype,"hideDelay",void 0),d=(0,n.Cg)([(0,r.EM)("ha-tooltip")],d),e()}catch(c){e(c)}})},10897:function(t,e,o){o.d(e,{C4:function(){return l},CK:function(){return c},FX:function(){return f},UC:function(){return p},_Z:function(){return y},bT:function(){return w},j4:function(){return v},sd:function(){return i},su:function(){return s},vc:function(){return b},w8:function(){return u},wv:function(){return h},y3:function(){return m},zS:function(){return r}});o(3362);var n=o(3931),a=o(82e3);const i=[1,2,3,4,6,8],r="web_rtc",s=(t,e,o)=>`${t}&width=${e}&height=${o}`,c=t=>t.attributes.access_token?`/api/camera_proxy_stream/${t.entity_id}?token=${t.attributes.access_token}`:void 0,l=async(t,e,o,a)=>{const i=await(0,n.U)("_cameraTmbUrl",9e3,d,t,e);return s(i,o,a)},d=async(t,e)=>{const o=await(0,a.e0)(t,`/api/camera_proxy/${e}`);return t.hassUrl(o.path)},h=async(t,e,o)=>{const n={type:"camera/stream",entity_id:e};o&&(n.format=o);const a=await t.callWS(n);return a.url=t.hassUrl(a.url),a},u=(t,e,o,n)=>t.connection.subscribeMessage(n,{type:"camera/webrtc/offer",entity_id:e,offer:o}),p=(t,e,o,n)=>t.callWS({type:"camera/webrtc/candidate",entity_id:e,session_id:o,candidate:n}),m=(t,e)=>t.callWS({type:"camera/get_prefs",entity_id:e}),f=(t,e,o)=>t.callWS(Object.assign({type:"camera/update_prefs",entity_id:e},o)),g="media-source://camera/",v=t=>t.startsWith(g),b=t=>t.substring(22),y=async(t,e)=>t.callWS({type:"camera/capabilities",entity_id:e}),w=async(t,e)=>t.callWS({type:"camera/webrtc/get_client_config",entity_id:e})},99129:function(t,e,o){o.d(e,{EG:function(){return i},ML:function(){return r}});var n=o(90889),a=o(35952);const i=(t,e,o)=>t.subscribeEvents(t=>{t.data.url_path===e&&o()},"lovelace_updated"),r=(t,e=null)=>(0,n.X)(t,`_lovelace_${null!=e?e:""}`,t=>(0,a.Dz)(t,e,!1),(o,n)=>i(t,e,()=>(0,a.Dz)(t,e,!1).then(t=>n.setState(t,!0))))},28918:function(t,e,o){o.d(e,{H:function(){return a},o:function(){return n}});function n(t){return"boolean"==typeof t?t?{}:void 0:t}function a(t){return"strategy"in t}},35952:function(t,e,o){function n(t){return"strategy"in t}o.d(e,{Dz:function(){return a},Wu:function(){return n},ql:function(){return i}});const a=(t,e,o)=>t.sendMessagePromise({type:"lovelace/config",url_path:e,force:o}),i=(t,e,o)=>t.callWS({type:"lovelace/config/save",url_path:e,config:o})},91984:function(t,e,o){o.d(e,{R6:function(){return a},TQ:function(){return i},cg:function(){return r}});var n=o(31290);function a(t){return"strategy"in t}const i=(t,e)=>{var o;return null!==(o=t.title)&&void 0!==o?o:t.path?(0,n.n)(t.path):String(e)},r=t=>{var e;return null!==(e=t.icon)&&void 0!==e?e:"mdi:view-compact"}},71730:function(t,e,o){o.d(e,{A_:function(){return r},SJ:function(){return n},mQ:function(){return i},n6:function(){return a}});const n=t=>t.callWS({type:"lovelace/dashboards/list"}),a=(t,e)=>t.callWS(Object.assign({type:"lovelace/dashboards/create"},e)),i=(t,e,o)=>t.callWS(Object.assign({type:"lovelace/dashboards/update",dashboard_id:e},o)),r=(t,e)=>t.callWS({type:"lovelace/dashboards/delete",dashboard_id:e})},45291:function(t,e,o){o.d(e,{IP:function(){return n},Iu:function(){return h},J_:function(){return i},O9:function(){return s},b$:function(){return l},bH:function(){return r},c8:function(){return d},wi:function(){return c}});o(18111),o(20116),o(62953);const n="custom:",a=window;"customCards"in a||(a.customCards=[]),"customCardFeatures"in a||(a.customCardFeatures=[]),"customBadges"in a||(a.customBadges=[]),"customTileFeatures"in a||(a.customTileFeatures=[]);const i=a.customCards,r=()=>[...a.customCardFeatures,...a.customTileFeatures],s=a.customBadges,c=t=>i.find(e=>e.type===t),l=t=>s.find(e=>e.type===t),d=t=>t.startsWith(n),h=t=>t.slice(n.length)},53072:function(t,e,o){o.d(e,{$6:function(){return v},EC:function(){return f},ET:function(){return g},H1:function(){return m},HN:function(){return _},Im:function(){return k},QI:function(){return C},Un:function(){return y},Xm:function(){return w},ce:function(){return M},fh:function(){return A},ie:function(){return x},mm:function(){return b},vj:function(){return p}});o(44114);var n=o(47129),a=o(82286),i=o(22675),r=o(52069);const s="M11,14C12,14 13.05,14.16 14.2,14.44C13.39,15.31 13,16.33 13,17.5C13,18.39 13.25,19.23 13.78,20H3V18C3,16.81 3.91,15.85 5.74,15.12C7.57,14.38 9.33,14 11,14M11,12C9.92,12 9,11.61 8.18,10.83C7.38,10.05 7,9.11 7,8C7,6.92 7.38,6 8.18,5.18C9,4.38 9.92,4 11,4C12.11,4 13.05,4.38 13.83,5.18C14.61,6 15,6.92 15,8C15,9.11 14.61,10.05 13.83,10.83C13.05,11.61 12.11,12 11,12M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",c="M14,19H18V5H14M6,19H10V5H6V19Z",l="M8,5.14V19.14L19,12.14L8,5.14Z",d="M13,3H11V13H13V3M17.83,5.17L16.41,6.59C18.05,7.91 19,9.9 19,12A7,7 0 0,1 12,19C8.14,19 5,15.88 5,12C5,9.91 5.95,7.91 7.58,6.58L6.17,5.17C2.38,8.39 1.92,14.07 5.14,17.86C8.36,21.64 14.04,22.1 17.83,18.88C19.85,17.17 21,14.65 21,12C21,9.37 19.84,6.87 17.83,5.17Z",h="M18,18H6V6H18V18Z",u="M8.16,3L6.75,4.41L9.34,7H4C2.89,7 2,7.89 2,9V19C2,20.11 2.89,21 4,21H20C21.11,21 22,20.11 22,19V9C22,7.89 21.11,7 20,7H14.66L17.25,4.41L15.84,3L12,6.84L8.16,3M4,9H17V19H4V9M19.5,9A1,1 0 0,1 20.5,10A1,1 0 0,1 19.5,11A1,1 0 0,1 18.5,10A1,1 0 0,1 19.5,9M19.5,12A1,1 0 0,1 20.5,13A1,1 0 0,1 19.5,14A1,1 0 0,1 18.5,13A1,1 0 0,1 19.5,12Z";var p=function(t){return t[t.PAUSE=1]="PAUSE",t[t.SEEK=2]="SEEK",t[t.VOLUME_SET=4]="VOLUME_SET",t[t.VOLUME_MUTE=8]="VOLUME_MUTE",t[t.PREVIOUS_TRACK=16]="PREVIOUS_TRACK",t[t.NEXT_TRACK=32]="NEXT_TRACK",t[t.TURN_ON=128]="TURN_ON",t[t.TURN_OFF=256]="TURN_OFF",t[t.PLAY_MEDIA=512]="PLAY_MEDIA",t[t.VOLUME_STEP=1024]="VOLUME_STEP",t[t.SELECT_SOURCE=2048]="SELECT_SOURCE",t[t.STOP=4096]="STOP",t[t.CLEAR_PLAYLIST=8192]="CLEAR_PLAYLIST",t[t.PLAY=16384]="PLAY",t[t.SHUFFLE_SET=32768]="SHUFFLE_SET",t[t.SELECT_SOUND_MODE=65536]="SELECT_SOUND_MODE",t[t.BROWSE_MEDIA=131072]="BROWSE_MEDIA",t[t.REPEAT_SET=262144]="REPEAT_SET",t[t.GROUPING=524288]="GROUPING",t}({});const m="browser",f={album:{icon:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12,16.5C9.5,16.5 7.5,14.5 7.5,12C7.5,9.5 9.5,7.5 12,7.5C14.5,7.5 16.5,9.5 16.5,12C16.5,14.5 14.5,16.5 12,16.5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",layout:"grid"},app:{icon:"M21 2H3C1.9 2 1 2.9 1 4V20C1 21.1 1.9 22 3 22H21C22.1 22 23 21.1 23 20V4C23 2.9 22.1 2 21 2M21 7H3V4H21V7Z",layout:"grid",show_list_images:!0},artist:{icon:s,layout:"grid",show_list_images:!0},channel:{icon:u,thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},composer:{icon:"M11,4A4,4 0 0,1 15,8A4,4 0 0,1 11,12A4,4 0 0,1 7,8A4,4 0 0,1 11,4M11,6A2,2 0 0,0 9,8A2,2 0 0,0 11,10A2,2 0 0,0 13,8A2,2 0 0,0 11,6M11,13C12.1,13 13.66,13.23 15.11,13.69C14.5,14.07 14,14.6 13.61,15.23C12.79,15.03 11.89,14.9 11,14.9C8.03,14.9 4.9,16.36 4.9,17V18.1H13.04C13.13,18.8 13.38,19.44 13.76,20H3V17C3,14.34 8.33,13 11,13M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",layout:"grid",show_list_images:!0},contributing_artist:{icon:s,layout:"grid",show_list_images:!0},directory:{icon:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",layout:"grid",show_list_images:!0},episode:{icon:u,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},game:{icon:"M7,6H17A6,6 0 0,1 23,12A6,6 0 0,1 17,18C15.22,18 13.63,17.23 12.53,16H11.47C10.37,17.23 8.78,18 7,18A6,6 0 0,1 1,12A6,6 0 0,1 7,6M6,9V11H4V13H6V15H8V13H10V11H8V9H6M15.5,12A1.5,1.5 0 0,0 14,13.5A1.5,1.5 0 0,0 15.5,15A1.5,1.5 0 0,0 17,13.5A1.5,1.5 0 0,0 15.5,12M18.5,9A1.5,1.5 0 0,0 17,10.5A1.5,1.5 0 0,0 18.5,12A1.5,1.5 0 0,0 20,10.5A1.5,1.5 0 0,0 18.5,9Z",layout:"grid",thumbnail_ratio:"portrait"},genre:{icon:"M8.11,19.45C5.94,18.65 4.22,16.78 3.71,14.35L2.05,6.54C1.81,5.46 2.5,4.4 3.58,4.17L13.35,2.1L13.38,2.09C14.45,1.88 15.5,2.57 15.72,3.63L16.07,5.3L20.42,6.23H20.45C21.5,6.47 22.18,7.53 21.96,8.59L20.3,16.41C19.5,20.18 15.78,22.6 12,21.79C10.42,21.46 9.08,20.61 8.11,19.45V19.45M20,8.18L10.23,6.1L8.57,13.92V13.95C8,16.63 9.73,19.27 12.42,19.84C15.11,20.41 17.77,18.69 18.34,16L20,8.18M16,16.5C15.37,17.57 14.11,18.16 12.83,17.89C11.56,17.62 10.65,16.57 10.5,15.34L16,16.5M8.47,5.17L4,6.13L5.66,13.94L5.67,13.97C5.82,14.68 6.12,15.32 6.53,15.87C6.43,15.1 6.45,14.3 6.62,13.5L7.05,11.5C6.6,11.42 6.21,11.17 6,10.81C6.06,10.2 6.56,9.66 7.25,9.5C7.33,9.5 7.4,9.5 7.5,9.5L8.28,5.69C8.32,5.5 8.38,5.33 8.47,5.17M15.03,12.23C15.35,11.7 16.03,11.42 16.72,11.57C17.41,11.71 17.91,12.24 18,12.86C17.67,13.38 17,13.66 16.3,13.5C15.61,13.37 15.11,12.84 15.03,12.23M10.15,11.19C10.47,10.66 11.14,10.38 11.83,10.53C12.5,10.67 13.03,11.21 13.11,11.82C12.78,12.34 12.11,12.63 11.42,12.5C10.73,12.33 10.23,11.8 10.15,11.19M11.97,4.43L13.93,4.85L13.77,4.05L11.97,4.43Z",layout:"grid",show_list_images:!0},image:{icon:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z",layout:"grid",show_list_images:!0},movie:{icon:"M18,4L20,8H17L15,4H13L15,8H12L10,4H8L10,8H7L5,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V4H18Z",thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},music:{icon:"M21,3V15.5A3.5,3.5 0 0,1 17.5,19A3.5,3.5 0 0,1 14,15.5A3.5,3.5 0 0,1 17.5,12C18.04,12 18.55,12.12 19,12.34V6.47L9,8.6V17.5A3.5,3.5 0 0,1 5.5,21A3.5,3.5 0 0,1 2,17.5A3.5,3.5 0 0,1 5.5,14C6.04,14 6.55,14.12 7,14.34V6L21,3Z",show_list_images:!0},playlist:{icon:"M15,6H3V8H15V6M15,10H3V12H15V10M3,16H11V14H3V16M17,6V14.18C16.69,14.07 16.35,14 16,14A3,3 0 0,0 13,17A3,3 0 0,0 16,20A3,3 0 0,0 19,17V8H22V6H17Z",layout:"grid",show_list_images:!0},podcast:{icon:"M17,18.25V21.5H7V18.25C7,16.87 9.24,15.75 12,15.75C14.76,15.75 17,16.87 17,18.25M12,5.5A6.5,6.5 0 0,1 18.5,12C18.5,13.25 18.15,14.42 17.54,15.41L16,14.04C16.32,13.43 16.5,12.73 16.5,12C16.5,9.5 14.5,7.5 12,7.5C9.5,7.5 7.5,9.5 7.5,12C7.5,12.73 7.68,13.43 8,14.04L6.46,15.41C5.85,14.42 5.5,13.25 5.5,12A6.5,6.5 0 0,1 12,5.5M12,1.5A10.5,10.5 0 0,1 22.5,12C22.5,14.28 21.77,16.39 20.54,18.11L19.04,16.76C19.96,15.4 20.5,13.76 20.5,12A8.5,8.5 0 0,0 12,3.5A8.5,8.5 0 0,0 3.5,12C3.5,13.76 4.04,15.4 4.96,16.76L3.46,18.11C2.23,16.39 1.5,14.28 1.5,12A10.5,10.5 0 0,1 12,1.5M12,9.5A2.5,2.5 0 0,1 14.5,12A2.5,2.5 0 0,1 12,14.5A2.5,2.5 0 0,1 9.5,12A2.5,2.5 0 0,1 12,9.5Z",layout:"grid"},season:{icon:u,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},track:{icon:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13,13H11V18A2,2 0 0,1 9,20A2,2 0 0,1 7,18A2,2 0 0,1 9,16C9.4,16 9.7,16.1 10,16.3V11H13V13M13,9V3.5L18.5,9H13Z"},tv_show:{icon:u,layout:"grid",thumbnail_ratio:"portrait"},url:{icon:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},video:{icon:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z",layout:"grid",show_list_images:!0}},g=(t,e,o,n)=>t.callWS({type:"media_player/browse_media",entity_id:e,media_content_id:o,media_content_type:n}),v=t=>{let e=t.attributes.media_position;return"playing"!==t.state?e:(e+=(Date.now()-new Date(t.attributes.media_position_updated_at).getTime())/1e3,e<0?0:e)},b=t=>{let e;switch(t.attributes.media_content_type){case"music":case"image":e=t.attributes.media_artist;break;case"playlist":e=t.attributes.media_playlist||t.attributes.media_artist;break;case"tvshow":e=t.attributes.media_series_title,t.attributes.media_season&&(e+=" S"+t.attributes.media_season,t.attributes.media_episode&&(e+="E"+t.attributes.media_episode));break;case"channel":e=t.attributes.media_channel;break;default:e=t.attributes.app_name||""}return e},y=(t,e=!1)=>{if(!t)return;const o=t.state;if(o===i.Hh)return;const r=!0===t.attributes.assumed_state;if(!(0,n.a)(t)&&!r)return(0,a.$)(t,128)?[{icon:d,action:"turn_on"}]:void 0;const s=[];r&&(0,a.$)(t,128)&&s.push({icon:"M11,3H13V21H11V3Z",action:"turn_on"}),(0,a.$)(t,256)&&s.push({icon:r?"M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M12,19A7,7 0 0,1 5,12A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19Z":d,action:"turn_off"});const u=t.attributes;return("playing"===o||"paused"===o||r)&&(0,a.$)(t,32768)&&e&&s.push({icon:!0===u.shuffle?"M14.83,13.41L13.42,14.82L16.55,17.95L14.5,20H20V14.5L17.96,16.54L14.83,13.41M14.5,4L16.54,6.04L4,18.59L5.41,20L17.96,7.46L20,9.5V4M10.59,9.17L5.41,4L4,5.41L9.17,10.58L10.59,9.17Z":"M16,4.5V7H5V9H16V11.5L19.5,8M16,12.5V15H5V17H16V19.5L19.5,16",action:"shuffle_set"}),("playing"===o||"paused"===o||r)&&(0,a.$)(t,16)&&s.push({icon:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z",action:"media_previous_track"}),!r&&("playing"===o&&((0,a.$)(t,1)||(0,a.$)(t,4096))||("paused"===o||"idle"===o)&&(0,a.$)(t,16384)||"on"===o&&((0,a.$)(t,16384)||(0,a.$)(t,1)))&&s.push({icon:"on"===o?"M3,5V19L11,12M13,19H16V5H13M18,5V19H21V5":"playing"!==o?l:(0,a.$)(t,1)?c:h,action:"playing"!==o?"media_play":(0,a.$)(t,1)?"media_pause":"media_stop"}),r&&(0,a.$)(t,16384)&&s.push({icon:l,action:"media_play"}),r&&(0,a.$)(t,1)&&s.push({icon:c,action:"media_pause"}),r&&(0,a.$)(t,4096)&&s.push({icon:h,action:"media_stop"}),("playing"===o||"paused"===o||r)&&(0,a.$)(t,32)&&s.push({icon:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z",action:"media_next_track"}),("playing"===o||"paused"===o||r)&&(0,a.$)(t,262144)&&e&&s.push({icon:"all"===u.repeat?"M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"one"===u.repeat?"M13,15V9H12L10,10V11H11.5V15M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"M2,5.27L3.28,4L20,20.72L18.73,22L15.73,19H7V22L3,18L7,14V17H13.73L7,10.27V11H5V8.27L2,5.27M17,13H19V17.18L17,15.18V13M17,5V2L21,6L17,10V7H8.82L6.82,5H17Z",action:"repeat_set"}),s.length>0?s:void 0},w=t=>{if(void 0===t||t===1/0)return"";const e=Math.max(0,Math.floor(t)),o=Math.floor(e/3600),n=Math.floor(e%3600/60),a=e%60,i=t=>t.toString().padStart(2,"0");return o>0?`${i(o)}:${i(n)}:${i(a)}`:`${i(n)}:${i(a)}`},_=t=>{if(!t)return;const e=t.indexOf("?authSig=");let o=e>0?t.slice(0,e):t;return o.startsWith("http")&&(o=decodeURIComponent(o.split("/").pop())),o},C=(t,e,o)=>t.callService("media_player","volume_set",{entity_id:e,volume_level:o}),M=(t,e,o)=>t.callService("media_player",o,"shuffle_set"===o?{entity_id:e.entity_id,shuffle:!e.attributes.shuffle}:"repeat_set"===o?{entity_id:e.entity_id,repeat:"all"===e.attributes.repeat?"one":"off"===e.attributes.repeat?"all":"off"}:{entity_id:e.entity_id}),x=(t,e,o,n,a={})=>(!a.enqueue&&void 0===a.announce&&(0,r.ni)(o)&&(a.announce=!0),t.callService("media_player","play_media",Object.assign({entity_id:e,media_content_id:o,media_content_type:n},a))),k=(t,e,o)=>t.callService("media_player","join",{group_members:o},{entity_id:e}),A=(t,e)=>t.callService("media_player","unjoin",{},{entity_id:e})},44249:function(t,e,o){o.d(e,{V:function(){return n}});o(62953);const n=(t,e)=>{const o=new a,n=t.subscribeMessage(t=>e(o.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{n.then(t=>null==t?void 0:t())}};class a{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},61557:function(t,e,o){o.d(e,{uw:function(){return a}});o(3362);const n={type:"supervisor/api",method:"GET"},a=(t,e)=>t.sendMessagePromise(Object.assign(Object.assign({},n),e))},42269:function(t,e,o){o.d(e,{p:function(){return a}});var n=o(1087);const a=(t,e)=>(0,n.r)(t,"hass-more-info",e)},24367:function(t,e,o){o.d(e,{L:function(){return a},z:function(){return i}});var n=o(23832);const a=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],i=(0,n.g)(a)},20939:function(t,e,o){o.d(e,{L:function(){return a}});o(16280),o(18111),o(61701);var n=o(78649);const a=(t,e=!0)=>{if(!t||!Array.isArray(t))throw new Error("Entities need to be an array");return t.map((t,o)=>{if("object"==typeof t&&!Array.isArray(t)&&t.type)return t;let a;if("string"==typeof t)a={entity:t};else{if("object"!=typeof t||Array.isArray(t))throw new Error(`Invalid entity ID at position ${o}`);if(!("entity"in t))throw new Error(`Object at position ${o} is missing entity field`);a=t}if(e&&!(0,n.n)(a.entity))throw new Error(`Invalid entity ID at position ${o}: ${a.entity}`);return a})}},15656:function(t,e,o){o.d(e,{Nu:function(){return p},TG:function(){return y},Xd:function(){return g},d4:function(){return b},uN:function(){return f},xC:function(){return v}});var n=o(86518),a=(o(16280),o(18111),o(61701),o(3362),o(62953),o(28918)),i=o(35952),r=o(91984),s=o(53338);const c=["strategy"],l=["strategy"],d=["strategy"],h="custom:",u={dashboard:{"original-states":()=>o.e(60134).then(o.bind(o,43845)),map:()=>o.e(74994).then(o.bind(o,56009)),iframe:()=>o.e(1732).then(o.bind(o,38287)),areas:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(9209)]).then(o.bind(o,80821)),home:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(86201)]).then(o.bind(o,67293)),energy:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(19343)]).then(o.bind(o,94429))},view:{"original-states":()=>Promise.all([o.e(67218),o.e(92610),o.e(662),o.e(77183),o.e(94530)]).then(o.bind(o,16330)),"energy-overview":()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(51016)]).then(o.bind(o,3260)),energy:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(20984)]).then(o.bind(o,86242)),water:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(8969)]).then(o.bind(o,88615)),gas:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(17423)]).then(o.bind(o,21733)),power:()=>Promise.all([o.e(67218),o.e(92610),o.e(7483),o.e(77183),o.e(17879)]).then(o.bind(o,60093)),map:()=>o.e(6875).then(o.bind(o,14966)),iframe:()=>o.e(73441).then(o.bind(o,51480)),area:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(74271)]).then(o.bind(o,44979)),"areas-overview":()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(88964)]).then(o.bind(o,69140)),"home-overview":()=>Promise.all([o.e(67218),o.e(92610),o.e(99788),o.e(45193),o.e(77183),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(58709)]).then(o.bind(o,8892)),"home-media-players":()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(59022)]).then(o.bind(o,24876)),"home-area":()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(50362)]).then(o.bind(o,47302)),"home-other-devices":()=>o.e(27800).then(o.bind(o,78859)),light:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(71780)]).then(o.bind(o,71776)),security:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(34442)]).then(o.bind(o,31758)),climate:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(98874)]).then(o.bind(o,73026)),maintenance:()=>o.e(82691).then(o.bind(o,78030))},section:{"common-controls":()=>o.e(8717).then(o.bind(o,44124))}},p=async(t,e)=>{var o;if(e in u[t]){await u[t][e]();const o=`${e}-${t}-strategy`;return customElements.get(o)}if(!e.startsWith(h))throw new Error("Unknown strategy");const n=`ll-strategy-${e.slice(7)}`,a=`ll-strategy-${t}-${e.slice(7)}`;if(!0===await Promise.race([customElements.whenDefined(n),customElements.whenDefined(a),new Promise(t=>{setTimeout(()=>t(!0),5e3)})]))throw new Error(`Timeout waiting for strategy element ${a} to be registered`);return null!==(o=customElements.get(a))&&void 0!==o?o:customElements.get(n)},m=async(t,e,o,n)=>{const a=o.type;if(!a)return e("No strategy type found");try{const e=await p(t,a);if((0,s.Xo)(e)){if("dashboard"===t&&"generateDashboard"in e)return await e.generateDashboard({config:{strategy:o,views:[]},hass:n});if("view"===t&&"generateView"in e)return await e.generateView({config:{views:[]},view:{strategy:o},hass:n})}const i=(0,s._V)(o);return await e.generate(i,n)}catch(i){return"timeout"!==i.message&&console.error(i),e(i)}},f=async(t,e)=>{const{strategy:o}=t,a=(0,n.A)(t,c),i=await m("dashboard",t=>({views:[{title:"Error",cards:[{type:"markdown",content:`Error loading the dashboard strategy:\n> ${t}`}]}]}),o,e);return Object.assign(Object.assign({},a),i)},g=async(t,e)=>{const{strategy:o}=t,a=(0,n.A)(t,l),i=await m("view",t=>({cards:[{type:"markdown",content:`Error loading the view strategy:\n> ${t}`}]}),o,e);return Object.assign(Object.assign({},a),i)},v=async(t,e)=>{const{strategy:o}=t,a=(0,n.A)(t,d),i=await m("section",t=>({cards:[{type:"markdown",content:`Error loading the section strategy:\n> ${t}`}]}),o,e);return Object.assign(Object.assign({},a),i)},b=async(t,e)=>{const o=(0,i.Wu)(t)?await f(t,e):Object.assign({},t);return o.views=await Promise.all(o.views.map(async t=>{const o=(0,r.R6)(t)?await g(t,e):Object.assign({},t);return o.sections&&(o.sections=await Promise.all(o.sections.map(async t=>(0,a.H)(t)?await v(t,e):Object.assign({},t)))),o})),o};async function y(t,e){const o=await p("dashboard",e),n=await async function(t,e){const o=e.getCreateSuggestions;if("function"==typeof o)return o.call(e,t)}(t,o);return{strategyClass:o,fieldSuggestions:n}}},53338:function(t,e,o){o.d(e,{B2:function(){return a},Xo:function(){return n},_V:function(){return i}});const n=t=>!("generate"in t),a=t=>2===Object.keys(t).length&&"options"in t&&"object"==typeof t.options,i=t=>{if(!a(t))return t;const e=Object.assign(Object.assign({},t),t.options);return delete e.options,e}},1289:function(t,e,o){o.a(t,async function(t,n){try{o.r(e);o(3362),o(27495),o(62953),o(48408),o(14603),o(47566),o(98721);var a=o(40445),i=o(5124),r=o(67576),s=o(6412),c=o(91926),l=o(9899),d=o(19459),h=o(90248),u=o(2054),p=o(14503),m=o(15656),f=o(75400),g=(o(77985),o(87778),t([h,u,f]));[h,u,f]=g.then?(await g)():g;let v,b,y,w,_,C=t=>t;const M={strategy:{type:"maintenance"}};class x extends i.WF{willUpdate(t){if(super.willUpdate(t),!this.hasUpdated)return void this._setup();if(!t.has("hass"))return;const e=t.get("hass");if(e&&e.localize!==this.hass.localize)this._setLovelace();else if(e&&this.hass){if((e.entities!==this.hass.entities||e.devices!==this.hass.devices||e.areas!==this.hass.areas||e.floors!==this.hass.floors||e.panels!==this.hass.panels)&&"RUNNING"===this.hass.config.state)return void this._debounceRegistriesChanged();"RUNNING"===this.hass.config.state&&"RUNNING"!==e.config.state&&this._setLovelace()}}async _setup(){await this.hass.loadFragmentTranslation("lovelace"),this._setLovelace()}_back(t){t.stopPropagation(),(0,c.OE)()}render(){return(0,i.qy)(v||(v=C` <div class="header ${0}"> <div class="toolbar"> ${0} <div class="main-title"> ${0} </div> </div> </div> ${0} `),(0,s.H)({narrow:this.narrow}),this._searchParams.has("historyBack")?(0,i.qy)(b||(b=C` <ha-icon-button-arrow-prev @click="${0}" slot="navigationIcon"></ha-icon-button-arrow-prev> `),this._back):(0,i.qy)(y||(y=C` <ha-menu-button slot="navigationIcon" .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow),this.hass.localize("panel.maintenance"),this._lovelace?(0,i.qy)(w||(w=C` <hui-view-container .hass="${0}"> <hui-view-background .hass="${0}"> </hui-view-background> <hui-view .hass="${0}" .narrow="${0}" .lovelace="${0}" .index="${0}"></hui-view> </hui-view-container> `),this.hass,this.hass,this.hass,this.narrow,this._lovelace,this._viewIndex):i.s6)}async _setLovelace(){var t;const e={views:[await(0,m.Xd)(M,this.hass)]},o={views:[M]};(0,d.b)(e,null===(t=this._lovelace)||void 0===t?void 0:t.config)||(this._lovelace={config:e,rawConfig:o,editMode:!1,urlPath:"maintenance",mode:"generated",locale:this.hass.locale,enableFullEditMode:()=>{},saveConfig:async()=>{},deleteConfig:async()=>{},setEditMode:()=>{},showToast:()=>{}})}static get styles(){return[p.RF,(0,i.AH)(_||(_=C`:host{-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none}.header{background-color:var(--app-header-background-color);color:var(--app-header-text-color,#fff);position:fixed;top:0;width:calc(var(--ha-top-app-bar-width,100%) - var(--safe-area-inset-right,0px));z-index:4;display:flex;flex-direction:row;-webkit-backdrop-filter:var(--app-header-backdrop-filter,none);backdrop-filter:var(--app-header-backdrop-filter,none);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .header{width:calc(var(--ha-top-app-bar-width,100%) - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));padding-left:var(--safe-area-inset-left)}:host([scrolled]) .header{box-shadow:var(--bar-box-shadow,0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12))}.toolbar{height:var(--header-height);display:flex;flex:1;align-items:center;font-size:var(--ha-font-size-xl);padding:0px 12px;font-weight:var(--ha-font-weight-normal);box-sizing:border-box;border-bottom:var(--app-header-border-bottom,none)}:host([narrow]) .toolbar{padding:0 4px}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);flex-grow:1}.narrow .main-title{margin-inline-start:var(--ha-space-2)}hui-view-container{position:relative;display:flex;min-height:100vh;box-sizing:border-box;padding-top:calc(var(--header-height) + var(--safe-area-inset-top));padding-right:var(--safe-area-inset-right);padding-inline-end:var(--safe-area-inset-right);padding-bottom:var(--safe-area-inset-bottom)}:host([narrow]) hui-view-container{padding-left:var(--safe-area-inset-left);padding-inline-start:var(--safe-area-inset-left)}hui-view{flex:1 1 100%;max-width:100%}`))]}constructor(...t){super(...t),this.narrow=!1,this._viewIndex=0,this._searchParams=new URLSearchParams(window.location.search),this._debounceRegistriesChanged=(0,l.s)(()=>this._registriesChanged(),200),this._registriesChanged=async()=>{this._setLovelace()}}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],x.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],x.prototype,"narrow",void 0),(0,a.Cg)([(0,r.wk)()],x.prototype,"_viewIndex",void 0),(0,a.Cg)([(0,r.wk)()],x.prototype,"_lovelace",void 0),(0,a.Cg)([(0,r.wk)()],x.prototype,"_searchParams",void 0),x=(0,a.Cg)([(0,r.EM)("ha-panel-maintenance")],x),n()}catch(v){n(v)}})},53580:function(t,e,o){o.d(e,{mdiHomeAssistant:function(){return n}});const n="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"},36918:function(t,e,o){o.d(e,{o:function(){return n}});const n=(t,e)=>`https://www.iobroker.net/#${t.language&&t.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`}}]);