UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

31 lines 79.9 kB
export const __rspack_esm_id=70802;export const __rspack_esm_ids=[70802];export const __webpack_modules__={16629(t,e,a){a.d(e,{E7:()=>u,Mn:()=>i,P9:()=>l,lf:()=>h});a(18111),a(61701);var o=a(63004);const i=t=>{const e=t/100;return[Math.round(r(e)),Math.round(n(e)),Math.round(s(e))]},r=t=>{if(t<=66)return 255;const e=329.698727446*(t-60)**-.1332047592;return(0,o.q)(e,0,255)},n=t=>{let e;return e=t<=66?99.4708025861*Math.log(t)-161.1195681661:288.1221695283*(t-60)**-.0755148492,(0,o.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,o.q)(e,0,255)},c=(t,e)=>{const a=Math.max(...t),o=Math.max(...e);let i;return i=0===o?0:a/o,e.map(t=>Math.round(t*i))},l=t=>0===t?1e6:Math.floor(1e6/t),d=t=>0===t?1e6:Math.floor(1e6/t),h=(t,e,a)=>{const[o,r,n,s,h]=t,u=d(e??2700),m=d(a??6500),p=u-m;let g;try{g=h/(s+h)}catch(t){g=.5}const _=m+g*p,b=_?l(_):0,[y,v,f]=i(b),w=Math.max(s,h)/255;return c([o,r,n,s,h],[o+y*w,r+v*w,n+f*w])},u=t=>{const[e,a,o,i]=t;return c([e,a,o,i],[e+i,a+i,o+i])}},36356(t,e,a){a.d(e,{q:()=>o});class o{get enabled(){return this._enabled}set enabled(t){t!==this._enabled&&(this._enabled=t,this._enabled?this._attach():this._detach(),this._host.requestUpdate())}hostUpdated(){this.enabled&&!this._scrollContainer&&this._attach()}hostDisconnected(){this._detach()}_attach(){this._scrollContainer=this._host.renderRoot?.querySelector(this._selector),this._scrollContainer&&this._scrollContainer.addEventListener("mousedown",this._mouseDown)}_detach(){window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._scrollContainer&&(this._scrollContainer.removeEventListener("mousedown",this._mouseDown),this._scrollContainer=void 0),this.scrolled=!1,this.scrolling=!1,this.mouseIsDown=!1,this.scrollStartX=0,this.scrollLeft=0}constructor(t,{selector:e,enabled:a}){this.mouseIsDown=!1,this.scrolled=!1,this.scrolling=!1,this.scrollStartX=0,this.scrollLeft=0,this._enabled=!0,this._mouseDown=t=>{const e=this._scrollContainer;e&&(this.scrollStartX=t.pageX-e.offsetLeft,this.scrollLeft=e.scrollLeft,this.mouseIsDown=!0,this.scrolled=!1,window.addEventListener("mousemove",this._mouseMove),window.addEventListener("mouseup",this._mouseUp,{once:!0}))},this._mouseUp=()=>{this.mouseIsDown=!1,this.scrolling=!1,this._host.requestUpdate(),window.removeEventListener("mousemove",this._mouseMove)},this._mouseMove=t=>{if(!this.mouseIsDown)return;const e=this._scrollContainer;if(!e)return;const a=t.pageX-e.offsetLeft-this.scrollStartX;this.scrolled||(this.scrolled=Math.abs(a)>1,this.scrolling=this.scrolled,this._host.requestUpdate()),e.scrollLeft=this.scrollLeft-a},this._selector=e,this._host=t,this.enabled=a??!0,t.addController(this)}}},80785(t,e,a){function o(t){return!!t&&(t instanceof Date&&!isNaN(t.valueOf()))}a.d(e,{A:()=>o})},72487(t,e,a){a.a(t,async function(t,o){try{a.d(e,{CA:()=>A,Mi:()=>x,Pm:()=>L,Wq:()=>v,Yq:()=>l,bl:()=>I,c2:()=>w,fr:()=>b,gu:()=>H,kz:()=>h,m9:()=>D,sl:()=>g,ur:()=>T,zB:()=>m});a(18111),a(20116);var i=a(74487),r=a(22786),n=a(46927),s=a(8480),c=t([i,s]);[i,s]=c.then?(await c)():c;(0,r.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,a)=>d(e,a.time_zone).format(t),d=(0,r.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,a)=>u(e,a.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),m=(t,e,a)=>{const o=p(e,a.time_zone);if(e.date_format===n.ow.language||e.date_format===n.ow.system)return o.format(t);const i=o.formatToParts(t),r=i.find(t=>"literal"===t.type)?.value,s=i.find(t=>"day"===t.type)?.value,c=i.find(t=>"month"===t.type)?.value,l=i.find(t=>"year"===t.type)?.value,d=i[i.length-1];let h="literal"===d?.type?d?.value:"";"bg"===e.language&&e.date_format===n.ow.YMD&&(h="");return{[n.ow.DMY]:`${s}${r}${c}${r}${l}${h}`,[n.ow.MDY]:`${c}${r}${s}${r}${l}${h}`,[n.ow.YMD]:`${l}${r}${c}${r}${s}${h}`}[e.date_format]},p=(0,r.A)((t,e)=>{const a=t.date_format===n.ow.system?void 0:t.language;return t.date_format===n.ow.language||(t.date_format,n.ow.system),new Intl.DateTimeFormat(a,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})}),g=(t,e,a)=>_(e,a.time_zone).format(t),_=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),b=(t,e,a)=>y(e,a.time_zone).format(t),y=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),v=(t,e,a)=>f(e,a.time_zone).format(t),f=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,s.wj)(t.time_zone,e)})),w=(t,e,a)=>C(e,a.time_zone).format(t),C=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),L=(t,e,a)=>M(e,a.time_zone).format(t),M=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),A=(t,e,a)=>E(e,a.time_zone).format(t),E=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,s.wj)(t.time_zone,e)})),H=(t,e,a)=>$(e,a.time_zone).format(t),$=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,s.wj)(t.time_zone,e)})),x=(t,e,a)=>k(e,a.time_zone).format(t),k=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),T=(t,e,a)=>V(e,a.time_zone).format(t),V=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),I=(t,e,a)=>{const o=(0,s.wj)(e.time_zone,a.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:o}).format(t)},D=(t,e,a,o)=>`${I(t,a,o)}/${I(e,a,o)}`;o()}catch(t){o(t)}})},82591(t,e,a){a.a(t,async function(t,o){try{a.d(e,{E2:()=>m,Z8:()=>p,a3:()=>y,i:()=>h,nR:()=>l});var i=a(74487),r=a(22786),n=a(79791),s=t([i]);i=(s.then?(await s)():s)[0];const c=t=>t<10?`0${t}`:t,l=(t,e)=>{const a=e.days||0,o=e.hours||0,i=e.minutes||0,r=e.seconds||0,n=e.milliseconds||0;return a>0?`${Intl.NumberFormat(t.language,{style:"unit",unit:"day",unitDisplay:"long"}).format(a)} ${o}:${c(i)}:${c(r)}`:o>0?`${o}:${c(i)}:${c(r)}`:i>0?`${i}:${c(r)}`:r>0?Intl.NumberFormat(t.language,{style:"unit",unit:"second",unitDisplay:"long"}).format(r):n>0?Intl.NumberFormat(t.language,{style:"unit",unit:"millisecond",unitDisplay:"long"}).format(n):null},d=(0,r.A)(t=>new Intl.DurationFormat(t.language,{style:"long"})),h=(t,e)=>d(t).format(e),u=(0,r.A)(t=>new Intl.DurationFormat(t.language,{style:"digital",hoursDisplay:"auto"})),m=(t,e)=>u(t).format(e),p=["min","h","d"],g=(0,r.A)(t=>new Intl.DurationFormat(t.language,{style:"narrow",daysDisplay:"always"})),_=(0,r.A)(t=>new Intl.DurationFormat(t.language,{style:"narrow",hoursDisplay:"always"})),b=(0,r.A)(t=>new Intl.DurationFormat(t.language,{style:"narrow",minutesDisplay:"always"})),y=(t,e,a,o)=>{const i=void 0!==o?(0,n.L)(parseFloat(e),o):parseFloat(e);switch(a){case"d":{const e=Math.floor(i),a={days:e,hours:Math.floor(24*(i-e))};return g(t).format(a)}case"h":{const e=Math.floor(i),a={hours:e,minutes:Math.floor(60*(i-e))};return _(t).format(a)}case"min":{const e=Math.floor(i),a={minutes:e,seconds:Math.floor(60*(i-e))};return b(t).format(a)}default:throw new Error("Invalid duration unit")}};o()}catch(t){o(t)}})},30162(t,e,a){a.a(t,async function(t,o){try{a.d(e,{LW:()=>g,Xs:()=>m,fU:()=>l,ie:()=>h});var i=a(74487),r=a(22786),n=a(8480),s=a(69543),c=t([i,n]);[i,n]=c.then?(await c)():c;const l=(t,e,a)=>d(e,a.time_zone).format(t),d=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),h=(t,e,a)=>u(e,a.time_zone).format(t),u=(0,r.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,n.wj)(t.time_zone,e)})),m=(t,e,a)=>p(e,a.time_zone).format(t),p=(0,r.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,n.wj)(t.time_zone,e)})),g=(t,e,a)=>_(e,a.time_zone).format(t),_=(0,r.A)((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,n.wj)(t.time_zone,e)}));o()}catch(t){o(t)}})},98975(t,e,a){a.a(t,async function(t,o){try{a.d(e,{K:()=>l});var i=a(74487),r=a(22786),n=a(63927),s=t([i,n]);[i,n]=s.then?(await s)():s;const c=(0,r.A)(t=>new Intl.RelativeTimeFormat(t.language,{numeric:"auto"})),l=(t,e,a,o=!0)=>{const i=(0,n.x)(t,a,e);return o?c(e).format(i.value,i.unit):Intl.NumberFormat(e.language,{style:"unit",unit:i.unit,unitDisplay:"long"}).format(Math.abs(i.value))};o()}catch(t){o(t)}})},69543(t,e,a){a.d(e,{J:()=>r});a(74423);var o=a(22786),i=a(46927);const r=(0,o.A)(t=>{if(t.time_format===i.Hg.language||t.time_format===i.Hg.system){const e=t.time_format===i.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===i.Hg.am_pm})},32172(t,e,a){a.d(e,{p:()=>o});a(18111),a(7588),a(45367),a(92731),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);function o(t){return(e,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const o=String(a),i=e;if(i._transformers){if(!i.hasOwnProperty("_transformers")){const t=i._transformers;i._transformers=new Map,t.forEach((t,e)=>i._transformers.set(e,t))}}else{i._transformers=new Map,i._watching=new Map;const t=i.willUpdate;i.willUpdate=function(e){t.call(this,e);const a=new Set;e.forEach((t,e)=>{const o=this._watching.get(e);void 0!==o&&o.forEach(t=>a.add(t))}),a.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}i._transformers.set(a,t.transformer),t.watch&&t.watch.forEach(t=>{let e=i._watching.get(t);e||(e=new Set,i._watching.set(t,e)),e.add(a)});const r=Object.getOwnPropertyDescriptor(e,a);let n;if(void 0===r)n={get(){return this[`__transform_${o}`]},set(t){const e=this[`__transform_${o}`],a=this._transformers.get(o);this[`__transform_${o}`]=a?a.call(this,t):t,this[`__original_${o}`]=t,this.requestUpdate(o,e)},configurable:!0,enumerable:!0};else{const t=r.set;n={...r,set(e){const a=this[`__transform_${o}`],i=this._transformers.get(o);this[`__transform_${o}`]=i?i.call(this,e):e,this[`__original_${o}`]=e,this.requestUpdate(o,a),t?.call(this,e)}}}Object.defineProperty(e,a,n)}}},69093(t,e,a){a.d(e,{t:()=>i});var o=a(71727);const i=t=>(0,o.m)(t.entity_id)},47129(t,e,a){a.d(e,{a:()=>r});a(74423);var o=a(22675),i=a(71727);function r(t,e){const a=(0,i.m)(t.entity_id),r=void 0!==e?e:t?.state;if(["button","event","infrared","input_button","radio_frequency","scene"].includes(a))return r!==o.Hh;if(r===o.Hh||r===o.HV)return!1;if("off"===r&&"alert"!==a)return!1;switch(a){case"alarm_control_panel":return"disarmed"!==r;case"alert":return"idle"!==r;case"cover":case"valve":return"closed"!==r;case"device_tracker":case"person":return"not_home"!==r;case"lawn_mower":return!["docked","paused"].includes(r);case"lock":return"locked"!==r;case"media_player":return"standby"!==r;case"vacuum":return!["idle","docked","paused"].includes(r);case"plant":return"problem"===r;case"group":return["on","home","open","locked","problem"].includes(r);case"timer":return"active"===r;case"camera":return"streaming"===r}return!0}},52658(t,e,a){a.d(e,{ZK:()=>u,gf:()=>h,mT:()=>p,Se:()=>d,mg:()=>m});a(44114),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var o=a(22675),i=a(68287),r=a(86030),n=a(80880);var s=a(71727),c=a(47129);const l=new Set(["alarm_control_panel","alert","automation","binary_sensor","calendar","camera","climate","cover","device_tracker","fan","group","humidifier","input_boolean","lawn_mower","light","lock","media_player","person","plant","remote","schedule","script","siren","sun","switch","timer","update","vacuum","valve","water_heater","weather"]),d=(t,e)=>{if((void 0!==e?e:t?.state)===o.Hh)return"var(--state-unavailable-color)";const a=m(t,e);return a?(0,r.B)(a):void 0},h=(t,e,a)=>{const o=void 0!==a?a:e.state,i=(0,c.a)(e,a);return u(t,e.attributes.device_class,o,i)},u=(t,e,a,o)=>{const i=[],r=(0,n.Y)(a,"_"),s=o?"active":"inactive";return e&&i.push(`--state-${t}-${e}-${r}-color`),i.push(`--state-${t}-${r}-color`,`--state-${t}-${s}-color`,`--state-${s}-color`),i},m=(t,e)=>{const a=void 0!==e?e:t?.state,o=(0,s.m)(t.entity_id),r=t.attributes.device_class;if("sensor"===o&&"battery"===r){const t=(t=>{const e=Number(t);if(!isNaN(e))return e>=70?"--state-sensor-battery-high-color":e>=30?"--state-sensor-battery-medium-color":"--state-sensor-battery-low-color"})(a);if(t)return[t]}if("group"===o){const a=(0,i.z)(t);if(a&&l.has(a))return h(a,t,e)}if(l.has(o))return h(o,t,e)},p=t=>{if(t.attributes.brightness&&"plant"!==(0,s.m)(t.entity_id)){return`brightness(${(t.attributes.brightness+245)/5}%)`}return""}},82286(t,e,a){a.d(e,{$:()=>o});const o=(t,e)=>i(t.attributes,e),i=(t,e)=>0!==(t.supported_features&e)},78649(t,e,a){a.d(e,{n:()=>i});const o=/^(\w+)\.(\w+)$/,i=t=>o.test(t)},20058(t,e,a){a.a(t,async function(t,o){try{a.d(e,{QL:()=>h,ZQ:()=>u,ZV:()=>d,ty:()=>c,x:()=>s});var i=a(74487),r=(a(74423),a(18111),a(61701),a(46927)),n=t([i]);i=(n.then?(await n)():n)[0];const s=t=>c(t.attributes),c=(t,e)=>!!t.unit_of_measurement||!!t.state_class||(e||[]).includes(t.device_class||""),l=t=>{switch(t.number_format){case r.jG.comma_decimal:return["en-US","en"];case r.jG.decimal_comma:return["de","es","it"];case r.jG.space_comma:return["fr","sv","cs"];case r.jG.quote_decimal:return["de-CH"];case r.jG.system:return;default:return t.language}},d=(t,e,a)=>h(t,e,a).map(t=>t.value).join(""),h=(t,e,a)=>{const o=e?l(e):void 0;return e?.number_format===r.jG.none||Number.isNaN(Number(t))?Number.isNaN(Number(t))||""===t||e?.number_format!==r.jG.none?[{type:"literal",value:t}]:new Intl.NumberFormat("en-US",m(t,{...a,useGrouping:!1})).formatToParts(Number(t)):new Intl.NumberFormat(o,m(t,a)).formatToParts(Number(t))},u=(t,e)=>{const a=e?.display_precision;return null!=a?{maximumFractionDigits:a,minimumFractionDigits:a}:Number.isInteger(Number(t?.attributes?.step))&&Number.isInteger(Number(t?.state))?{maximumFractionDigits:0}:void 0},m=(t,e)=>{const a={maximumFractionDigits:2,...e};if("string"!=typeof t)return a;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;a.minimumFractionDigits=e,a.maximumFractionDigits=e}return a};o()}catch(t){o(t)}})},79791(t,e,a){a.d(e,{L:()=>o});const o=(t,e=2)=>Math.round(t*10**e)/10**e},80880(t,e,a){a.d(e,{Y:()=>o});const o=(t,e="_")=>{const a="àáâäæãåāăąабçćčđďдèéêëēėęěеёэфğǵгḧхîïíīįìıİийкłлḿмñńǹňнôöòóœøōõőоṕпŕřрßśšşșсťțтûüùúūǘůűųувẃẍÿýыžźżз·",o=`aaaaaaaaaaabcccdddeeeeeeeeeeefggghhiiiiiiiiijkllmmnnnnnoooooooooopprrrsssssstttuuuuuuuuuuvwxyyyzzzz${e}`,i=new RegExp(a.split("").join("|"),"g"),r={ж:"zh",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ю:"iu",я:"ia"};let n;return""===t?n="":(n=t.toString().toLowerCase().replace(i,t=>o.charAt(a.indexOf(t))).replace(/[а-я]/g,t=>r[t]||"").replace(/(\d),(?=\d)/g,"$1").replace(/[^a-z0-9]+/g,e).replace(new RegExp(`(${e})\\1+`,"g"),"$1").replace(new RegExp(`^${e}+`),"").replace(new RegExp(`${e}+$`),""),""===n&&(n="unknown")),n}},31290(t,e,a){a.d(e,{n:()=>o});const o=t=>t.replace(/^_*(.)|_+(.)/g,(t,e,a)=>e?e.toUpperCase():" "+a.toUpperCase())},67258(t,e,a){a.d(e,{d:()=>o});const o=t=>{switch(t.language){case"cs":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}}},8549(t,e,a){a.d(e,{A:()=>i});var o=a(67258);const i=(t,e)=>"°"===t?"":e&&"%"===t?(0,o.d)(e):" "},51758(t,e,a){a.d(e,{Z:()=>o});const o=t=>{const e=window.location.pathname;return t?e+"?"+t:e}},63927(t,e,a){a.a(t,async function(t,o){try{a.d(e,{x:()=>h});var i=a(6946),r=a(52640),n=a(38684),s=a(380);const c=1e3,l=60,d=60*l;function h(t,e=Date.now(),a,o={}){const h={...u,...o||{}},m=(+t-+e)/c;if(Math.abs(m)<h.second)return{value:Math.round(m),unit:"second"};const p=m/l;if(Math.abs(p)<h.minute)return{value:Math.round(p),unit:"minute"};const g=m/d;if(Math.abs(g)<h.hour)return{value:Math.round(g),unit:"hour"};const _=new Date(t),b=new Date(e);_.setHours(0,0,0,0),b.setHours(0,0,0,0);const y=(0,i.c)(_,b);if(0===y)return{value:Math.round(g),unit:"hour"};if(Math.abs(y)<h.day)return{value:y,unit:"day"};const v=(0,s.P)(a),f=(0,r.k)(_,{weekStartsOn:v}),w=(0,r.k)(b,{weekStartsOn:v}),C=(0,n.I)(f,w);if(0===C)return{value:y,unit:"day"};if(Math.abs(C)<h.week)return{value:C,unit:"week"};const L=_.getFullYear()-b.getFullYear(),M=12*L+_.getMonth()-b.getMonth();return 0===M?{value:C,unit:"week"}:Math.abs(M)<h.month||0===L?{value:M,unit:"month"}:{value:Math.round(L),unit:"year"}}const u={second:59,minute:59,hour:22,day:5,week:4,month:11};o()}catch(m){o(m)}})},58139(t,e,a){a.d(e,{d:()=>o,t:()=>i});const o=async(t,e)=>new Promise(a=>{const o=e(t,t=>{o(),a(t)})}),i=async t=>new Promise(e=>{const a=t.subscribe(t=>{a(),e(t)})})},5745(t,e,a){var o=a(62826),i=a(99731),r=a(22441);class n extends i.Y{}n=(0,o.Cg)([(0,r.EM)("ha-chip-set")],n)},9503(t,e,a){var o=a(62826),i=a(97577),r=a(5124),n=a(22441);class s extends i.A{get value(){return this._value??null}set value(t){this._value=t}static get styles(){return[i.A.styles,r.AH`: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))}`]}}s=(0,o.Cg)([(0,n.EM)("ha-checkbox")],s)},59174(t,e,a){a.a(t,async function(t,e){try{var o=a(62826),i=a(35211),r=a(5124),n=a(22441),s=a(91450),c=a(22792),l=a(85694),d=a(44144),h=(a(47680),t([l]));l=(h.then?(await h)():h)[0];class u extends r.WF{render(){if(this.icon)return r.qy`<ha-icon .icon="${this.icon}"></ha-icon>`;if(!this.domain)return r.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?r.qy`<ha-icon .icon="${t}"></ha-icon>`:this._renderFallback());return r.qy`${(0,s.T)(t)}`}_renderFallback(){if(this.domain&&this.domain in l.l)return r.qy` <ha-svg-icon .path="${l.l[this.domain]}"></ha-svg-icon> `;if(this.brandFallback){const t=(0,d.MR)({domain:this.domain,type:"icon",darkOptimized:this._hassUi?.themes.darkMode},this._hassConfig?.auth.data.hassUrl);return r.qy` <img alt="" src="${t}" crossorigin="anonymous" referrerpolicy="no-referrer"> `}return r.qy`<ha-svg-icon .path="${l.lW}"></ha-svg-icon>`}}u.styles=r.AH`img{width:var(--mdc-icon-size,24px)}`,(0,o.Cg)([(0,n.MZ)()],u.prototype,"domain",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],u.prototype,"deviceClass",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],u.prototype,"state",void 0),(0,o.Cg)([(0,n.MZ)()],u.prototype,"icon",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"brand-fallback",type:Boolean})],u.prototype,"brandFallback",void 0),(0,o.Cg)([(0,n.wk)(),(0,i.Fg)({context:c.WF,subscribe:!0})],u.prototype,"_hassConfig",void 0),(0,o.Cg)([(0,n.wk)(),(0,i.Fg)({context:c.Wq,subscribe:!0})],u.prototype,"_connection",void 0),(0,o.Cg)([(0,n.wk)(),(0,i.Fg)({context:c.EK,subscribe:!0})],u.prototype,"_hassUi",void 0),u=(0,o.Cg)([(0,n.EM)("ha-domain-icon")],u),e()}catch(t){e(t)}})},11382(t,e,a){var o=a(62826),i=a(5124),r=a(22441),n=a(6412),s=a(1087),c=a(12587);a(67094);class l extends i.WF{render(){const t=this.noCollapse?i.s6:i.qy` <ha-svg-icon .path="${"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}" class="summary-icon ${(0,n.H)({expanded:this.expanded})}"></ha-svg-icon> `;return i.qy` <div class="top ${(0,n.H)({expanded:this.expanded})}"> <div id="summary" class="${(0,n.H)({noCollapse:this.noCollapse})}" @click="${this._toggleContainer}" @keydown="${this._toggleContainer}" @focus="${this._focusChanged}" @blur="${this._focusChanged}" role="button" tabindex="${this.noCollapse?-1:0}" aria-expanded="${this.expanded}" aria-controls="sect1" part="summary"> ${this.leftChevron?t:i.s6} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${this.header} <slot class="secondary" name="secondary">${this.secondary}</slot> </div> </slot> <slot name="event"></slot> ${this.leftChevron?i.s6:t} <slot name="icons"></slot> </div> </div> <div class="container ${(0,n.H)({expanded:this.expanded})}" @transitionend="${this._handleTransitionEnd}" role="region" aria-labelledby="summary" aria-hidden="${!this.expanded}" tabindex="-1"> ${this._showContent?i.qy`<slot></slot>`:""} </div> `}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 a=this._container.scrollHeight;this._container.style.height=`${a}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}}l.styles=i.AH`: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,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],l.prototype,"expanded",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],l.prototype,"outlined",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"left-chevron",type:Boolean,reflect:!0})],l.prototype,"leftChevron",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"no-collapse",type:Boolean,reflect:!0})],l.prototype,"noCollapse",void 0),(0,o.Cg)([(0,r.MZ)()],l.prototype,"header",void 0),(0,o.Cg)([(0,r.MZ)()],l.prototype,"secondary",void 0),(0,o.Cg)([(0,r.wk)()],l.prototype,"_showContent",void 0),(0,o.Cg)([(0,r.P)(".container")],l.prototype,"_container",void 0),l=(0,o.Cg)([(0,r.EM)("ha-expansion-panel")],l)},90248(t,e,a){a.a(t,async function(t,o){try{a.r(e),a.d(e,{HaIconButtonArrowPrev:()=>u});var i=a(62826),r=a(5124),n=a(22441),s=a(63091),c=a(26300),l=t([c]);c=(l.then?(await l)():l)[0];const d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",h="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class u extends r.WF{render(){return r.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"></ha-icon-button> `}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?h:d}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],u.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)()],u.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)()],u.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],u.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],u.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],u.prototype,"download",void 0),(0,i.Cg)([(0,n.wk)()],u.prototype,"_icon",void 0),u=(0,i.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],u),o()}catch(t){o(t)}})},26300(t,e,a){a.a(t,async function(t,o){try{a.r(e),a.d(e,{HaIconButton:()=>d});var i=a(62826),r=a(5124),n=a(22441),s=a(63672),c=a(18350),l=(a(67094),t([c]));c=(l.then?(await l)():l)[0];class d extends r.WF{render(){return r.qy` <ha-button appearance="plain" variant="neutral" aria-label="${(0,s.J)(this.label)}" title="${(0,s.J)(this.hideTitle?void 0:this.label)}" aria-haspopup="${(0,s.J)(this.ariaHasPopup)}" .disabled="${this.disabled}" .iconTag="${this.path?"ha-svg-icon":"span"}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"> ${this.path?r.qy`<ha-svg-icon aria-hidden="true" .path="${this.path}"></ha-svg-icon>`:r.qy`<span><slot></slot></span>`} </ha-button> `}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}d.shadowRootOptions={mode:"open",delegatesFocus:!0},d.styles=r.AH`: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,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],d.prototype,"path",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],d.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],d.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],d.prototype,"hideTitle",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],d.prototype,"selected",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"download",void 0),d=(0,i.Cg)([(0,n.EM)("ha-icon-button")],d),o()}catch(t){o(t)}})},43661(t,e,a){a.r(e),a.d(e,{HaIconNext:()=>s});var o=a(62826),i=a(22441),r=a(63091),n=a(67094);class s extends n.HaSvgIcon{constructor(...t){super(...t),this.path="rtl"===r.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,o.Cg)([(0,i.MZ)()],s.prototype,"path",void 0),s=(0,o.Cg)([(0,i.EM)("ha-icon-next")],s)},8630(t,e,a){var o=a(62826),i=a(68618),r=a(11081),n=a(22441);class s extends i.iY{}s.styles=r.R,s=(0,o.Cg)([(0,n.EM)("ha-list")],s)},2054(t,e,a){a.a(t,async function(t,e){try{var o=a(62826),i=a(5124),r=a(22441),n=a(1087),s=a(44249),c=a(26300),l=t([c]);c=(l.then?(await l)():l)[0];const d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class h extends i.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 i.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return i.qy` <ha-icon-button .label="${this.hass.localize("ui.sidebar.sidebar_toggle")}" .path="${d}" @click="${this._toggleMenu}"></ha-icon-button> ${t?i.qy`<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,a=t.has("narrow")?t.get("narrow"):this.narrow,o=!1===e?.kioskMode&&(a||"always_hidden"===e?.dockedSidebar),i=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&o===i||(this._show=i||this._alwaysVisible,i?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,n.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}h.styles=i.AH`: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,o.Cg)([(0,r.MZ)({type:Boolean})],h.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,o.Cg)([(0,r.wk)()],h.prototype,"_hasNotifications",void 0),(0,o.Cg)([(0,r.wk)()],h.prototype,"_show",void 0),h=(0,o.Cg)([(0,r.EM)("ha-menu-button")],h),e()}catch(t){e(t)}})},93367(t,e,a){a.a(t,async function(t,e){try{var o=a(62826),i=a(35211),r=a(5124),n=a(22441),s=a(91450),c=a(69093),l=a(22792),d=a(85694),h=(a(47680),a(67094),t([d]));d=(h.then?(await h)():h)[0];class u extends r.WF{render(){const t=this.icon||this.stateObj&&this._entities?.[this.stateObj.entity_id]?.icon||this.stateObj?.attributes.icon;if(t)return r.qy`<ha-icon .icon="${t}"></ha-icon>`;if(!this.stateObj)return r.s6;if(!this._config||!this._connection||!this._entities)return this._renderFallback();const e=(0,d.fq)(this._entities,this._config.config,this._connection.connection,this.stateObj,this.stateValue).then(t=>t?r.qy`<ha-icon .icon="${t}"></ha-icon>`:this._renderFallback());return r.qy`${(0,s.T)(e)}`}_renderFallback(){const t=(0,c.t)(this.stateObj);return r.qy` <ha-svg-icon .path="${d.l[t]||d.lW}"></ha-svg-icon> `}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],u.prototype,"stateObj",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],u.prototype,"stateValue",void 0),(0,o.Cg)([(0,n.MZ)()],u.prototype,"icon",void 0),(0,o.Cg)([(0,n.wk)(),(0,i.Fg)({context:l.WF,subscribe:!0})],u.prototype,"_config",void 0),(0,o.Cg)([(0,n.wk)(),(0,i.Fg)({context:l.Wq,subscribe:!0})],u.prototype,"_connection",void 0),(0,o.Cg)([(0,n.wk)(),(0,i.Fg)({context:l.X1,subscribe:!0})],u.prototype,"_entities",void 0),u=(0,o.Cg)([(0,n.EM)("ha-state-icon")],u),e()}catch(t){e(t)}})},67094(t,e,a){a.r(e),a.d(e,{HaSvgIcon:()=>n});var o=a(62826),i=a(5124),r=a(22441);class n extends i.WF{render(){return i.JW` <svg viewBox="${this.viewBox||"0 0 24 24"}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${this.path?i.JW`<path class="primary-path" d="${this.path}"></path>`:i.s6} ${this.secondaryPath?i.JW`<path class="secondary-path" d="${this.secondaryPath}"></path>`:i.s6} </g> </svg>`}}n.styles=i.AH`: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,o.Cg)([(0,r.MZ)()],n.prototype,"path",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"secondaryPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"viewBox",void 0),n=(0,o.Cg)([(0,r.EM)("ha-svg-icon")],n)},59646(t,e,a){a.a(t,async function(t,e){try{var o=a(62826),i=a(29344),r=a(5124),n=a(22441),s=a(88360),c=t([i]);i=(c.then?(await c)():c)[0];class l extends i.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[i.A.styles,r.AH`: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,o.Cg)([(0,n.MZ)({type:Boolean})],l.prototype,"haptic",void 0),l=(0,o.Cg)([(0,n.EM)("ha-switch")],l),e()}catch(t){e(t)}})},27330(t,e,a){a.d(e,{L:()=>l,p:()=>c});var o=a(62826),i=a(5124),r=a(22441),n=a(6412);const s={passive:!0},c=i.AH`:host{display:block}.top-app-bar{box-sizing:border-box;color:var(--app-header-text-color,#fff);background-color:var(--app-header-background-color,var(--primary-color));position:fixed;top:0;inset-inline-end:0;width:var(--ha-top-app-bar-width,100%);z-index:4;padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right);transition:box-shadow var(--ha-animation-duration-normal) ease,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}:host([narrow]) .top-app-bar{padding-left:var(--safe-area-inset-left)}.top-app-bar.scrolled:not(.pane-header){box-shadow:var(--ha-box-shadow-s)}.row{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--header-height);border-bottom:var(--app-header-border-bottom)}.section{display:flex;align-items:center;box-sizing:border-box;min-width:0;height:100%;padding:0 var(--ha-space-3)}#navigation{flex:1 1 auto}.section.center{flex:1 1 auto;justify-content:center;text-align:center}.section.end{flex:none;justify-content:flex-end}.title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--header-height);padding-inline-start:var(--ha-space-6)}:host([narrow]) .title{padding-inline-start:var(--ha-space-2)}.top-app-bar-fixed-adjust{padding-top:calc(var(--header-height,0px) + var(--safe-area-inset-top,0px));padding-bottom:var(--safe-area-inset-bottom);padding-right:var(--safe-area-inset-right)}:host([narrow]) .top-app-bar-fixed-adjust{padding-left:var(--safe-area-inset-left)}`;class l extends i.WF{get scrollTarget(){return this._scrollTarget||window}set scrollTarget(t){const e=this.scrollTarget;this._unregisterListeners(),this._scrollTarget=t,this._updateBarPosition(),this.requestUpdate("scrollTarget",e),this.isConnected&&(this._registerListeners(),this._syncScrollState())}_isPaneHeader(){return!1}render(){return i.qy`${this._renderHeader()}${this._renderContent()}`}connectedCallback(){super.connectedCallback(),this.hasUpdated&&(this._updateBarPosition(),this._registerListeners(),this._syncScrollState())}_renderHeader(){const t=i.qy`<span class="title"> <slot name="title"></slot> </span>`,e=this._isPaneHeader();return i.qy` <header class="top-app-bar ${(0,n.H)({"pane-header":e})}"> <div class="row"> ${e?i.qy`<section class="section" id="title"> <slot name="navigationIcon"></slot> ${t} </section>`:i.s6} <section class="section" id="navigation"> ${e?i.s6:i.qy`<slot name="navigationIcon"></slot> ${this.centerTitle?i.s6:t}`} </section> ${!e&&this.centerTitle?i.qy`<section class="section center">${t}</section>`:i.s6} <section class="section end" id="actions" role="toolbar"> <slot name="actionItems"></slot> </section> </div> </header> `}_renderContent(){return i.qy`<div class="top-app-bar-fixed-adjust"> <slot></slot> </div>`}firstUpdated(t){super.firstUpdated(t),this._updateBarPosition(),this._registerListeners(),this._syncScrollState()}disconnectedCallback(){super.disconnectedCallback(),this._unregisterListeners()}_updateBarPosition(){this._barElement&&(this._barElement.style.position=this.scrollTarget===window?"":"absolute")}_registerListeners(){this.scrollTarget.addEventListener("scroll",this._syncScrollState,s)}_unregisterListeners(){this.scrollTarget.removeEventListener("scroll",this._syncScrollState)}constructor(...t){super(...t),this.narrow=!1,this.centerTitle=!1,this._syncScrollState=()=>{const t=this.scrollTarget instanceof Window?this.scrollTarget.pageYOffset:this.scrollTarget.scrollTop;this._barElement?.classList.toggle("scrolled",t>0)}}}l.styles=c,(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],l.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"center-title",type:Boolean})],l.prototype,"centerTitle",void 0),(0,o.Cg)([(0,r.P)(".top-app-bar")],l.prototype,"_barElement",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],l.prototype,"scrollTarget",null),l=(0,o.Cg)([(0,r.EM)("ha-top-app-bar-fixed")],l)},10897(t,e,a){a.d(e,{C4:()=>l,CK:()=>c,FX:()=>g,UC:()=>m,_Z:()=>v,bT:()=>f,j4:()=>b,sd:()=>r,su:()=>s,vc:()=>y,w8:()=>u,wv:()=>h,y3:()=>p,zS:()=>n});var o=a(3931),i=a(82e3);const r=[1,2,3,4,6,8],n="web_rtc",s=(t,e,a)=>`${t}&width=${e}&height=${a}`,c=t=>t.attributes.access_token?`/api/camera_proxy_stream/${t.entity_id}?token=${t.attributes.access_token}`:void 0,l=async(t,e,a,i)=>{const r=await(0,o.U)("_cameraTmbUrl",9e3,d,t,e);return s(r,a,i)},d=async(t,e)=>{const a=await(0,i.e0)(t,`/api/camera_proxy/${e}`);return t.hassUrl(a.path)},h=async(t,e,a)=>{const o={type:"camera/stream",entity_id:e};a&&(o.format=a);const i=await t.callWS(o);return i.url=t.hassUrl(i.url),i},u=(t,e,a,o)=>t.connection.subscribeMessage(o,{type:"camera/webrtc/offer",entity_id:e,offer:a}),m=(t,e,a,o)=>t.callWS({type:"camera/webrtc/candidate",entity_id:e,session_id:a,candidate:o}),p=(t,e)=>t.callWS({type:"camera/get_prefs",entity_id:e}),g=(t,e,a)=>t.callWS({type:"camera/update_prefs",entity_id:e,...a}),_="media-source://camera/",b=t=>t.startsWith(_),y=t=>t.substring(22),v=async(t,e)=>t.callWS({type:"camera/capabilities",entity_id:e}),f=async(t,e)=>t.callWS({type:"camera/webrtc/get_client_config",entity_id:e})},38279(t,e,a){a.d(e,{$2:()=>o,VV:()=>r,on:()=>c,sx:()=>n});var o=function(t){return t[t.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",t[t.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",t[t.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",t[t.FAN_MODE=8]="FAN_MODE",t[t.PRESET_MODE=16]="PRESET_MODE",t[t.SWING_MODE=32]="SWING_MODE",t[t.AUX_HEAT=64]="AUX_HEAT",t[t.TURN_OFF=128]="TURN_OFF",t[t.TURN_ON=256]="TURN_ON",t[t.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",t}({});const i=["auto","heat_cool","heat","cool","dry","fan_only","off"].reduce((t,e,a)=>(t[e]=a,t),{}),r=(t,e)=>i[t]-i[e],n={cooling:"cool",defrosting:"heat",drying:"dry",fan:"fan_only",heating:"heat",idle:"off",off:"off",preheating:"heat"},s={cool:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z",dry:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",fan_only:"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.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",auto:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22C12.4 22 12.7 22 13.1 21.9L15.4 15.3L14.8 14.7C15.5 14 16 13 16 11.9C16 11.2 15.8 10.5 15.4 9.9L17.6 7.7C18.5 9 19 10.4 19 12H20C20.3 12 20.6 12.1 20.8 12.2C20.8 12.2 20.9 12.2 20.9 12.3C21.3 12.5 21.7 12.9 21.9 13.4C22 12.9 22 12.5 22 12C22 6.5 17.5 2 12 2M14 8.6C13.4 8.2 12.7 8 12 8C9.8 8 8 9.8 8 12C8 13.1 8.4 14.1 9.2 14.8L7.1 16.9C5.8 15.7 5 13.9 5 12C5 8.1 8.1 5 12 5C13.6 5 15 5.5 16.2 6.4L14 8.6M20 14H18L14.8 23H16.7L17.4 21H20.6L21.3 23H23.2L20 14M17.8 19.7L19 16L20.2 19.7H17.8Z",heat:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z",off:"M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",heat_cool:"M12.92 1.58L11.18 2.58L12.39 4.67L11.8 6.85L9 7.6L7.38 6L7.42 3.59L5.43 3.59L5.43 5.42L3.59 5.42L3.6 7.42L6 7.42L7.65 9.03L6.9 11.82L4.68 12.4L2.59 11.2L1.59 12.93L3.17 13.84L2.26 15.42L4 16.42L5.19 14.33L7.42 13.75L7.92 14.26L9.32 12.86L8.78 12.32L9.53 9.54L12.32 8.78L12.85 9.32L14.26 7.91L13.73 7.37L14.32 5.19L16.41 4L15.41 2.25L13.83 3.16L12.92 1.58M20.72 4L4 20.72L5.27 22L10.16 17.11C10.63 17.43 11.15 17.68 11.71 17.83C14.38 18.55 17.12 16.96 17.83 14.29C18.22 12.86 17.93 11.36 17.11 10.16L22 5.27L20.72 4M18.74 9C19.18 9.63 19.53 10.38 19.75 11.19C19.97 12 20.03 12.81 19.96 13.61L22.65 10.41L18.74 9M19.32 15.95C19 16.67 18.5 17.35 17.93 17.94C17.34 18.53 16.66 19 15.96 19.34L20.05 20.06L19.32 15.95M9 18.71L10.41 22.66L13.59 19.95C12.81 20 12 19.97 11.19 19.76C10.36 19.54 9.62 19.17 9 18.71Z"},c=t=>s[t]||"M16.95,16.95L14.83,14.83C15.55,14.1 16,13.1 16,12C16,11.26 15.79,10.57 15.43,10L17.6,7.81C18.5,9 19,10.43 19,12C19,13.93 18.22,15.68 16.95,16.95M12,5C13.57,5 15,5.5 16.19,6.4L14,8.56C13.43,8.21 12.74,8 12,8A4,4 0 0,0 8,12C8,13.1 8.45,14.1 9.17,14.83L7.05,16.95C5.78,15.68 5,13.93 5,12A7,7 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"},22675(t,e,a){a.d(e,{HV:()=>r,Hh:()=>i});var o=a(23832);const i="unavailable",r="unknown",n=[i,r,"off"];(0,o.g)(n)},68287(t,e,a){a.d(e,{z:()=>i});a(18111),a(61701),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var o=a(71727);const i=t=>{const e=t.attributes.entity_id||[],a=[...new Set(e.map(t=>(0,o.m)(t)))];return 1===a.length?a[0]:void 0}},99129(t,e,a){a.d(e,{EG:()=>r,ML:()=>n});var o=a(35518),i=a(35952);const r=(t,e,a)=>t.subscribeEvents(t=>{t.data.url_path===e&&a()},"lovelace_updated"),n=(t,e=null)=>(0,o.X)(t,`_lovelace_${e??""}`,t=>(0,i.Dz)(t,e,!1),(a,o)=>r(t,e,()=>(0,i.Dz)(t,e,!1).then(t=>o.setState(t,!0))))},28918(t,e,a){a.d(e,{H:()=>i,o:()=>o});function o(t){return"boolean"==typeof t?t?{}:void 0:t}function i(t){return"strategy"in t}},91984(t,e,a){a.d(e,{R6:()=>i,TQ:()=>r,cg:()=>n});var o=a(31290);function i(t){return"strategy"in t}const r=(t,e)=>t.title??(t.path?(0,o.n)(t.path):String(e)),n=t=>t.icon??"mdi:view-compact"},45291(t,e,a){a.d(e,{IP:()=>o,Iu:()=>h,J_:()=>r,O9:()=>s,b$:()=>l,bH:()=>n,c8:()=>d,wi:()=>c});a(18111),a(20116);const o="custom:",i=window;"customCards"in i||(i.customCards=[]),"customCardFeatures"in i||(i.customCardFeatures=[]),"customBadges"in i||(i.customBadges=[]),"customTileFeatures"in i||(i.customTileFeatures=[]);const r=i.customCards,n=()=>[...i.customCardFeatures,...i.customTileFeatures],s=i.customBadges,c=t=>r.find(e=>e.type===t),l=t=>s.find(e=>e.type===t),d=t=>t.startsWith(o),h=t=>t.slice(o.length)},53072(t,e,a){a.d(e,{$6:()=>b,EC:()=>g,ET:()=>_,H1:()=>p,HN:()=>w,Im:()=>A,QI:()=>C,Un:()=>v,Xm:()=>f,ce:()=>L,fh:()=>E,ie:()=>M,mm:()=>y,vj:()=>m});a(44114);var o=a(47129),i=a(82286),r=a(22675),n=a(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 m=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 p="browser",g={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}},_=(t,e,a,o)=>t.callWS({type:"media_player/browse_media",entity_id:e,media_content_id:a,media_content_type:o}),b=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)},y=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},v=(t,e=!1)=>{if(!t)return;const a=t.state;if(a===r.Hh)return;const n=!0===t.attributes.assumed_state;if(!(0,o.a)(t)&&!n)return(0,i.$)(t,128)?[{icon:d,action:"turn_on"}]:void 0;const s=[];n&&(0,i.$)(t,128)&&s.push({icon:"M11,3H13V21H11V3Z",action:"turn_on"}),(0,i.$)(t,256)&&s.push({icon:n?"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"===a||"paused"===a||n)&&(0,i.$)(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"===a||"paused"===a||n)&&(0,i.$)(t,16)&&s.push({icon:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z",action:"media_previous_track"}),!n&&("playing"===a&&((0,i.$)(t,1)||(0,i.$)(t,4096))||("paused"===a||"idle"===a)&&(0,i.$)(t,16384)||"on"===a&&((0,i.$)(t,16384)||(0,i.$)(t,1)))&&s.push({icon:"on"===a?"M3,5V19L11,12M13,19H16V5H13M18,5V19H21V5":"playing"!==a?l:(0,i.$)(t,1)?c:h,action:"playing"!==a?"media_play":(0,i.$)(t,1)?"media_pause":"media_stop"}),n&&(0,i.$)(t,16384)&&s.push({icon:l,action:"media_play"}),n&&(0,i.$)(t,1)&&s.push({icon:c,action:"media_pause"}),n&&(0,i.$)(t,4096)&&s.push({icon:h,action:"media_stop"}),("playing"===a||"paused"===a||n)&&(0,i.$)(t,32)&&s.push({icon:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z",action:"media_next_track"}),("playing"===a||"paused"===a||n)&&(0,i.$)(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},f=t=>{if(void 0===t||t===1/0)return"";const e=Math.max(0,Math.floor(t)),a=Math.floor(e/3600),o=Math.floor(e%3600/60),i=e%60,r=t=>t.toString().padStart(2,"0");return a>0?`${r(a)}:${r(o)}:${r(i)}`:`${r(o)}:${r(i)}`},w=t=>{if(!t)return;const e=t.indexOf("?authSig=");let a=e>0?t.slice(0,e):t;return a.startsWith("http")&&(a=decodeURIComponent(a.split("/").pop())),a},C=(t,e,a)=>t.callService("media_player","volume_set",{entity_id:e,volume_level:a}),L=(t,e,a)=>t.callService("media_player",a,"shuffle_set"===a?{entity_id:e.entity_id,shuffle:!e.attributes.shuffle}:"repeat_set"===a?{entity_id:e.entity_id,repeat:"all"===e.attributes.repeat?"one":"off"===e.attributes.repeat?"all":"off"}:{entity_id:e.entity_id}),M=(t,e,a,o,i={})=>(!i.enqueue&&void 0===i.announce&&(0,n.ni)(a)&&(i.announce=!0),t.callService("media_player","play_media",{entity_id:e,media_content_id:a,media_content_type:o,...i})),A=(t,e,a)=>t.callService("media_player","join",{group_members:a},{entity_id:e}),E=(t,e)=>t.callService("media_player","unjoin",{},{entity_id:e})},44249(t,e,a){a.d(e,{V:()=>o});const o=(t,e)=>{const a=new i,o=t.subscribeMessage(t=>e(a.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{o.then(t=>t?.())}};class i{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications={...this.notifications,...t.notifications};return Object.values(this.notifications)}constructor(){this.notifications={}}}},65590(t,e,a){a.d(e,{EE:()=>c,Ed:()=>l,K1:()=>p,Pe:()=>g,Xf:()=>h,aO:()=>s,fk:()=>u,wE:()=>m,yU:()=>d});a(74423),a(18111),a(22489),a(61701);var o=a(71727),i=a(28978),r=a(52220),n=a(22675),s=function(t){return t.NeedsAction="needs_action",t.Completed="completed",t}({}),c=function(t){return t.NONE="none",t.ALPHA_ASC="alpha_asc",t.ALPHA_DESC="alpha_desc",t.DUEDATE_ASC="duedate_asc",t.DUEDATE_DESC="duedate_desc",t}({}),l=function(t){return t[t.CREATE_TODO_ITEM=1]="CREATE_TODO_ITEM",t[t.DELETE_TODO_ITEM=2]="DELETE_TODO_ITEM",t[t.UPDATE_TODO_ITEM=4]="UPDATE_TODO_ITEM",t[t.MOVE_TODO_ITEM=8]="MOVE_TODO_ITEM",t[t.SET_DUE_DATE_ON_ITEM=16]="SET_DUE_DATE_ON_ITEM",t[t.SET_DUE_DATETIME_ON_ITEM=32]="SET_DUE_DATETIME_ON_ITEM",t[t.SET_DESCRIPTION_ON_ITEM=64]="SET_DESCRIPTION_ON_ITEM",t}({});const d=(t,e=!0)=>Object.keys(t.states).filter(a=>"todo"===(0,o.m)(a)&&t.states[a].state!==n.Hh&&(e||!0!==t.entities[a]?.hidden)).map(e=>({...t.states[e],entity_id:e,name:(0,i.u)(t.states[e])})).sort((e,a)=>(0,r.xL)(e.name,a.name,t.locale.language)),h=(t,e,a)=>t.connection.subscribeMessage(a,{type:"todo/item/subscribe",entity_id:e}),u=(t,e,a)=>t.callService("todo","update_item",{item:a.uid,rename:a.summary,status:a.status,description:a.description,due_datetime:a.due?.includes("T")?a.due:void 0,due_date:void 0===a.due||a.due?.includes("T")?void 0:a.due},{entity_id:e}),m=(t,e,a)=>t.callService("todo","add_item",{item:a.summary,description:a.description||void 0,due_datetime:a.due?.includes("T")?a.due:void 0,due_date:void 0===a.due||a.due?.includes("T")?void 0:a.due},{entity_id:e}),p=(t,e,a)=>t.callService("todo","remove_item",{item:a},{entity_id:e}),g=(t,e,a,o)=>t.callWS({type:"todo/item/move",entity_id:e,uid:a,previous_uid:o})},42269(t,e,a){a.d(e,{p:()=>i});var o=a(1087);const i=(t,e)=>(0,o.r)(t,"hass-more-info",e)},24367(t,e,a){a.d(e,{L:()=>i,z:()=>r});var o=a(23832);const i=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],r=(0,o.g)(i)},20939(t,e,a){a.d(e,{L:()=>i});a(18111),a(61701);var o=a(78649);const i=(t,e=!0)=>{if(!t||!Array.isArray(t))throw new Error("Entities need to be an array");return t.map((t,a)=>{if("object"==typeof t&&!Array.isArray(t)&&t.type)return t;let i;if("string"==typeof t)i={entity:t};else{if("object"!=typeof t||Array.isArray(t))throw new Error(`Invalid entity ID at position ${a}`);if(!("entity"in t))throw new Error(`Object at position ${a} is missing entity field`);i=t}if(e&&!(0,o.n)(i.entity))throw new Error(`Invalid entity ID at position ${a}: ${i.entity}`);return i})}},15656(t,e,a){a.d(e,{Nu:()=>l,TG:()=>g,Xd:()=>u,d4:()=>p,uN:()=>h,xC:()=>m});a(18111),a(61701);var o=a(28918),i=a(35952),r=a(91984),n=a(53338);const s="custom:",c={dashboard:{"original-states":()=>a.e(60134).then(a.bind(a,43845)),map:()=>a.e(74994).then(a.bind(a,56009)),iframe:()=>a.e(1732).then(a.bind(a,38287)),areas:()=>Promise.all([a.e(99788),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(20992)]).then(a.bind(a,80821)),home:()=>Promise.all([a.e(99788),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(3650),a.e(97416)]).then(a.bind(a,67293)),energy:()=>Promise.all([a.e(67218),a.e(92610),a.e(26857),a.e(77183),a.e(19343)]).then(a.bind(a,94429))},view:{"original-states":()=>Promise.all([a.e(67218),a.e(92610),a.e(45688),a.e(77183),a.e(94530)]).then(a.bind(a,16330)),"energy-overview":()=>Promise.all([a.e(67218),a.e(92610),a.e(26857),a.e(77183),a.e(51016)]).then(a.bind(a,3260)),energy:()=>Promise.all([a.e(67218),a.e(92610),a.e(26857),a.e(77183),a.e(20984)]).then(a.bind(a,86242)),water:()=>Promise.all([a.e(67218),a.e(92610),a.e(26857),a.e(77183),a.e(8969)]).then(a.bind(a,88615)),gas:()=>Promise.all([a.e(67218),a.e(92610),a.e(26857),a.e(77183),a.e(17423)]).then(a.bind(a,21733)),power:()=>Promise.all([a.e(67218),a.e(92610),a.e(26857),a.e(77183),a.e(17879)]).then(a.bind(a,60093)),map:()=>a.e(6875).then(a.bind(a,14966)),iframe:()=>a.e(73441).then(a.bind(a,51480)),area:()=>Promise.all([a.e(99788),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(35818)]).then(a.bind(a,44979)),"areas-overview":()=>Promise.all([a.e(99788),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(94101)]).then(a.bind(a,69140)),"home-overview":()=>Promise.all([a.e(67218),a.e(92610),a.e(99788),a.e(28991),a.e(77183),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(3650),a.e(6078)]).then(a.bind(a,8892)),"home-media-players":()=>Promise.all([a.e(99788),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(3650),a.e(44685)]).then(a.bind(a,24876)),"home-area":()=>Promise.all([a.e(99788),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(3650),a.e(54547)]).then(a.bind(a,47302)),"home-other-devices":()=>a.e(27800).then(a.bind(a,78859)),light:()=>Promise.all([a.e(99788),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(2437)]).then(a.bind(a,71776)),security:()=>Promise.all([a.e(99788),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(85143)]).then(a.bind(a,31758)),climate:()=>Promise.all([a.e(99788),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(19051)]).then(a.bind(a,73026)),maintenance:()=>a.e(82691).then(a.bind(a,78030))},section:{"common-controls":()=>a.e(8717).then(a.bind(a,44124))}},l=async(t,e)=>{if(e in c[t]){await c[t][e]();const a=`${e}-${t}-strategy`;return customElements.get(a)}if(!e.startsWith(s))throw new Error("Unknown strategy");const a=`ll-strategy-${e.slice(7)}`,o=`ll-strategy-${t}-${e.slice(7)}`;if(!0===await Promise.race([customElements.whenDefined(a),customElements.whenDefined(o),new Promise(t=>{setTimeout(()=>t(!0),5e3)})]))throw new Error(`Timeout waiting for strategy element ${o} to be registered`);return customElements.get(o)??customElements.get(a)},d=async(t,e,a,o)=>{const i=a.type;if(!i)return e("No strategy type found");try{const e=await l(t,i);if((0,n.Xo)(e)){if("dashboard"===t&&"generateDashboard"in e)return await e.generateDashboard({config:{strategy:a,views:[]},hass:o});if("view"===t&&"generateView"in e)return await e.generateView({config:{views:[]},view:{strategy:a},hass:o})}const r=(0,n._V)(a);return await e.generate(r,o)}catch(t){return"timeout"!==t.message&&console.error(t),e(t)}},h=async(t,e)=>{const{strategy:a,...o}=t;return{...o,...await d("dashboard",t=>({views:[{title:"Error",cards:[{type:"markdown",content:`Error loading the dashboard strategy:\n> ${t}`}]}]}),a,e)}},u=async(t,e)=>{const{strategy:a,...o}=t;return{...o,...await d("view",t=>({cards:[{type:"markdown",content:`Error loading the view strategy:\n> ${t}`}]}),a,e)}},m=async(t,e)=>{const{strategy:a,...o}=t;return{...o,...await d("section",t=>({cards:[{type:"markdown",content:`Error loading the section strategy:\n> ${t}`}]}),a,e)}},p=async(t,e)=>{const a=(0,i.Wu)(t)?await h(t,e):{...t};return a.views=await Promise.all(a.views.map(async t=>{const a=(0,r.R6)(t)?await u(t,e):{...t};return a.sections&&(a.sections=await Promise.all(a.sections.map(async t=>(0,o.H)(t)?await m(t,e):{...t}))),a})),a};async function g(t,e){const a=await l("dashboard",e),o=await async function(t,e){const a=e.getCreateSuggestions;if("function"==typeof a)return a.call(e,t)}(t,a);return{strategyClass:a,fieldSuggestions:o}}},53338(t,e,a){a.d(e,{B2:()=>i,Xo:()=>o,_V:()=>r});const o=t=>!("generate"in t),i=t=>2===Object.keys(t).length&&"options"in t&&"object"==typeof t.options,r=t=>{if(!i(t))return t;const e={...t,...t.options};return delete e.options,e}},69179(t,e,a){a.a(t,async function(t,o){try{a.r(e);a(18111),a(61701);var i=a(62826),r=(a(68825),a(88696)),n=a(5124),s=a(22441),c=a(22786),l=a(36312),d=a(93905),h=a(1087),u=a(28978),m=a(82286),p=a(91926),g=a(51758),_=a(6030),b=a(18350),y=a(29823),v=(a(70947),a(26300)),f=(a(8630),a(28732),a(2054)),w=a(93367),C=(a(67094),a(81762),a(77423)),L=a(59241),M=a(95350),A=a(65590),E=a(77763),H=a(65063),$=a(27560),x=a(14503),k=a(46856),T=a(12295),V=t([b,y,v,f,w,k]);[b,y,v,f,w,k]=V.then?(await V)():V;const I="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",D="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M17,11H15V9H17V11M13,11H11V9H13V11M9,11H7V9H9V11Z",Z="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",S="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",O="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",F="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z";class z extends n.WF{connectedCallback(){super.connectedCallback(),this._mql=window.matchMedia("(max-width: 450px), all and (max-height: 500px)"),this._mql.addListener(this._setIsMobile),this.mobile=this._mql.matches}disconnectedCallback(){super.disconnectedCallback(),this._mql?.removeListener(this._setIsMobile),this._mql=void 0}willUpdate(t){if(super.willUpdate(t),!this.hasUpdated){this.hass.loadFragmentTranslation("lovelace");const t=(0,_.p9)("entity_id");this._openAddItemFromUrl="true"===(0,_.p9)("add_item"),t?this._entityId=t:(this._entityId&&!(this._entityId in this.hass.states)&&(this._entityId=void 0),this._entityId||(this._entityId=(0,A.yU)(this.hass,!1)[0]?.entity_id))}!t.has("_entityId")&&this.hasUpdated||this._setupTodoElement(),this._openAddItemFromUrl&&this._entityId&&(this._openAddItemFromUrl=!1,(0,p.oo)((0,g.Z)((0,_.s8)("add_item")),{replace:!0}),(0,m.$)(this.hass.states[this._entityId],A.Ed.CREATE_TODO_ITEM)&&this._addItem())}_setupTodoElement(){this._entityId?(0,p.oo)((0,g.Z)((0,_.KH)({entity_id:this._entityId})),{replace:!0}):(0,p.oo)((0,g.Z)(""),{replace:!0})}render(){const t=this._entityId?this.hass.entities[this._entityId]:void 0,e=this._entityId?this.hass.states[this._entityId]:void 0,a=this._showPaneController.value??!this.narrow,o=(0,A.yU)(this.hass,!1).map(t=>n.qy`<ha-dropdown-item @click="${this._setEntityId}" value="${t.entity_id}" .selected="${t.entity_id===this._entityId}"> <ha-state-icon .stateObj="${t}" slot="icon"></ha-state-icon>${t.name} </ha-dropdown-item> `);return n.qy` <ha-two-pane-top-app-bar-fixed .pane="${a}" footer .narrow="${this.narrow}"> <ha-menu-button slot="navigationIcon" .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> <div slot="title"> ${a?this.hass.localize("panel.todo"):n.qy`<ha-dropdown class="lists"> <ha-button slot="trigger"> <div> ${this._entityId?e?(0,u.u)(e):this._entityId:n.s6} </div> <ha-svg-icon slot="end" .path="${I}"></ha-svg-icon> </ha-button> ${o} ${this.hass.user?.is_admin?n.qy`<wa-divider></wa-divider> <ha-dropdown-item @click="${this._addList}"> <ha-svg-icon .path="${F}" slot="icon"></ha-svg-icon> ${this.hass.localize("ui.panel.todo.create_list")} </ha-dropdown-item>`:n.s6} </ha-dropdown>`} </div> <ha-list slot="pane" activatable>${o}</ha-list> ${a&&this.hass.user?.is_admin?n.qy`<ha-list-item graphic="icon" slot="pane-footer" @click="${this._addList}"> <ha-svg-icon .path="${F}" slot="graphic"></ha-svg-icon> ${this.hass.localize("ui.panel.todo.create_list")} </ha-list-item>`:n.s6} <ha-dropdown slot="actionItems" @wa-select="${this._handleDropdownSelect}"> <ha-icon-button slot="trigger" .label="${""}" .path="${S}"></ha-icon-button> ${this._conversation(this.hass.config.components)?n.qy`<ha-dropdown-item value="info" .disabled="${!this._entityId}"> <ha-svg-icon .path="${O}" slot="icon"> </ha-svg-icon> ${this.hass.localize("ui.panel.todo.information")} </ha-dropdown-item>`:n.s6} <wa-divider></wa-divider> <ha-dropdown-item value="assist"> <ha-svg-icon .path="${D}" slot="icon"> </ha-svg-icon> ${this.hass.localize("ui.panel.todo.assist")} </ha-dropdown-item> ${"local_todo"===t?.platform?n.qy` <wa-divider></wa-divider> <ha-dropdown-item value="delete" variant="danger" .disabled="${!this._entityId}"> <ha-svg-icon .path="${Z}" slot="icon" class="warning"> </ha-svg-icon> ${this.hass.localize("ui.panel.todo.delete_list")} </ha-dropdown-item>`:n.s6} </ha-dropdown> <div id="columns"> <div class="column"> ${this._entityId?n.qy` <hui-card .hass="${this.hass}" .config="${this._cardConfig(this._entityId)}"></hui-card> `:n.s6} </div> </div> ${e&&(0,m.$)(e,A.Ed.CREATE_TODO_ITEM)?n.qy`<ha-button class="fab" size="large" @click="${this._addItem}"> <ha-svg-icon slot="start" .path="${F}"></ha-svg-icon> ${this.hass.localize("ui.panel.todo.add_item")} </ha-button>`:n.s6} </ha-two-pane-top-app-bar-fixed> `}async _addList(){(0,E.W)(this,{startFlowHandler:"local_todo",manifest:await(0,M.QC)(this.hass,"local_todo")})}_showMoreInfoDialog(){this._entityId&&(0,h.r)(this,"hass-more-info",{entityId:this._entityId})}async _deleteList(){if(!this._entityId)return;const t=await(0,L.v)(this.hass,this._entityId);if("local_todo"!==t.platform)return;const e=t.config_entry_id;if(!e)return;if(!await(0,H.dk)(this,{title:this.hass.localize("ui.panel.todo.delete_confirm_title",{name:this._entityId in this.hass.states?(0,u.u)(this.hass.states[this._entityId]):this._entityId}),text:this.hass.localize("ui.panel.todo.delete_confirm_text"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0}))return;const a=await(0,C.eM)(this.hass,e);this._entityId=(0,A.yU)(this.hass,!1)[0]?.entity_id,a.require_restart&&(0,H.showAlertDialog)(this,{text:this.hass.localize("ui.panel.todo.restart_confirm")})}_showVoiceCommandDialog(){(0,$.z)(this,this.hass,{pipeline_id:"last_used"})}_addItem(){(0,T.X)(this,{entity:this._entityId})}_handleDropdownSelect(t){const e=t.detail?.item?.value;if(e)switch(e){case"info":this._showMoreInfoDialog();break;case"assist":this._showVoiceCommandDialog();break;case"delete":this._deleteList()}}_setEntityId(t){const e=t.currentTarget;this._entityId=e.value}static get styles(){return[x.RF,n.AH`:host{display:block}#columns{display:flex;flex-direction:row;justify-content:center;margin:8px;padding-bottom:70px}.column{flex:1 0 0;max-width:500px;min-width:0}ha-dropdown{display:inline-block;max-width:100%}ha-dropdown ha-button{--ha-font-size-m:var(--ha-font-size-l)}ha-dropdown ha-button div{text-overflow:ellipsis;width:100%;overflow:hidden;white-space:nowrap;display:block}.fab{position:fixed;right:calc(16px + var(--safe-area-inset-right,0px));bottom:calc(16px + var(--safe-area-inset-bottom,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;--ha-button-box-shadow:var(--ha-box-shadow-l)}ha-dropdown.lists ha-dropdown-item{max-width:80vw}`]}constructor(...t){super(...t),this.narrow=!1,this.mobile=!1,this._openAddItemFromUrl=!1,this._showPaneController=new r.P(this,{callback:t=>t[0]?.contentRect.width>750}),this._conversation=(0,c.A)(t=>(0,l.x)(this.hass.config,"conversation")),this._setIsMobile=t=>{this.mobile=t.matches},this._cardConfig=(0,c.A)(t=>({type:"todo-list",entity:t}))}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],z.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],z.prototype,"narrow",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],z.prototype,"mobile",void 0),(0,i.Cg)([(0,s.wk)(),(0,d.I)({key:"selectedTodoEntity",state:!0})],z.prototype,"_entityId",void 0),z=(0,i.Cg)([(0,s.EM)("ha-panel-todo")],z),o()}catch(t){o(t)}})},12295(t,e,a){a.d(e,{X:()=>r});var o=a(1087);const i=()=>a.e(10734).then(a.bind(a,54653)),r=(t,e)=>{(0,o.r)(t,"show-dialog",{dialogTag:"dialog-todo-item-editor",dialogImport:i,dialogParams:e})}},86030(t,e,a){a.d(e,{B:()=>o,a:()=>i});a(18111),a(18237);function o(t){return Array.isArray(t)?t.reverse().reduce((t,e)=>`var(${e}${t?`, ${t}`:""})`,void 0):`var(${t})`}function i(t,e){if(Array.isArray(t))for(const a of t){const t=i(a,e);if(t)return t}else if(t.endsWith("-color"))return e.getPropertyValue(t).trim()||void 0}},53580(t,e,a){a.d(e,{mdiHomeAssistant:()=>o});const o="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(t,e,a){a.d(e,{o:()=>o});const o=(t,e)=>`https://www.iobroker.net/#${t.language&&t.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},88438(t,e,a){a.d(e,{C:()=>o});const o="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}};