UNPKG

iobroker.lovelace

Version:

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

7 lines 73.2 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[2749],{16629:function(e,t,n){n.d(t,{E7:function(){return h},Mn:function(){return o},P9:function(){return l},lf:function(){return d}});n(18111),n(61701),n(62953);var i=n(63004);const o=e=>{const t=e/100;return[Math.round(s(t)),Math.round(a(t)),Math.round(r(t))]},s=e=>{if(e<=66)return 255;const t=329.698727446*(e-60)**-.1332047592;return(0,i.q)(t,0,255)},a=e=>{let t;return t=e<=66?99.4708025861*Math.log(e)-161.1195681661:288.1221695283*(e-60)**-.0755148492,(0,i.q)(t,0,255)},r=e=>{if(e>=66)return 255;if(e<=19)return 0;const t=138.5177312231*Math.log(e-10)-305.0447927307;return(0,i.q)(t,0,255)},c=(e,t)=>{const n=Math.max(...e),i=Math.max(...t);let o;return o=0===i?0:n/i,t.map(e=>Math.round(e*o))},l=e=>0===e?1e6:Math.floor(1e6/e),u=e=>0===e?1e6:Math.floor(1e6/e),d=(e,t,n)=>{const[i,s,a,r,d]=e,h=u(null!=t?t:2700),m=u(null!=n?n:6500),p=h-m;let f;try{f=d/(r+d)}catch(C){f=.5}const g=m+f*p,_=g?l(g):0,[y,b,v]=o(_),w=Math.max(r,d)/255;return c([i,s,a,r,d],[i+y*w,s+b*w,a+v*w])},h=e=>{const[t,n,i,o]=e;return c([t,n,i,o],[t+o,n+o,i+o])}},36356:function(e,t,n){n.d(t,{q:function(){return i}});class i{get enabled(){return this._enabled}set enabled(e){e!==this._enabled&&(this._enabled=e,this._enabled?this._attach():this._detach(),this._host.requestUpdate())}hostUpdated(){this.enabled&&!this._scrollContainer&&this._attach()}hostDisconnected(){this._detach()}_attach(){var e;this._scrollContainer=null===(e=this._host.renderRoot)||void 0===e?void 0:e.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(e,{selector:t,enabled:n}){this.mouseIsDown=!1,this.scrolled=!1,this.scrolling=!1,this.scrollStartX=0,this.scrollLeft=0,this._enabled=!0,this._mouseDown=e=>{const t=this._scrollContainer;t&&(this.scrollStartX=e.pageX-t.offsetLeft,this.scrollLeft=t.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=e=>{if(!this.mouseIsDown)return;const t=this._scrollContainer;if(!t)return;const n=e.pageX-t.offsetLeft-this.scrollStartX;this.scrolled||(this.scrolled=Math.abs(n)>1,this.scrolling=this.scrolled,this._host.requestUpdate()),t.scrollLeft=this.scrollLeft-n},this._selector=t,this._host=e,this.enabled=null==n||n,e.addController(this)}}},90409:function(e,t,n){n.d(t,{A:function(){return i}});n(18111),n(61701);function i(e){const t=e.split(":").map(Number);return 3600*t[0]+60*t[1]+t[2]}},82591:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{E2:function(){return m},Z8:function(){return p},a3:function(){return y},i:function(){return d},nR:function(){return l}});n(16280);var o=n(74487),s=n(22786),a=n(79791),r=e([o]);o=(r.then?(await r)():r)[0];const c=e=>e<10?`0${e}`:e,l=(e,t)=>{const n=t.days||0,i=t.hours||0,o=t.minutes||0,s=t.seconds||0,a=t.milliseconds||0;return n>0?`${Intl.NumberFormat(e.language,{style:"unit",unit:"day",unitDisplay:"long"}).format(n)} ${i}:${c(o)}:${c(s)}`:i>0?`${i}:${c(o)}:${c(s)}`:o>0?`${o}:${c(s)}`:s>0?Intl.NumberFormat(e.language,{style:"unit",unit:"second",unitDisplay:"long"}).format(s):a>0?Intl.NumberFormat(e.language,{style:"unit",unit:"millisecond",unitDisplay:"long"}).format(a):null},u=(0,s.A)(e=>new Intl.DurationFormat(e.language,{style:"long"})),d=(e,t)=>u(e).format(t),h=(0,s.A)(e=>new Intl.DurationFormat(e.language,{style:"digital",hoursDisplay:"auto"})),m=(e,t)=>h(e).format(t),p=["min","h","d"],f=(0,s.A)(e=>new Intl.DurationFormat(e.language,{style:"narrow",daysDisplay:"always"})),g=(0,s.A)(e=>new Intl.DurationFormat(e.language,{style:"narrow",hoursDisplay:"always"})),_=(0,s.A)(e=>new Intl.DurationFormat(e.language,{style:"narrow",minutesDisplay:"always"})),y=(e,t,n,i)=>{const o=void 0!==i?(0,a.L)(parseFloat(t),i):parseFloat(t);switch(n){case"d":{const t=Math.floor(o),n={days:t,hours:Math.floor(24*(o-t))};return f(e).format(n)}case"h":{const t=Math.floor(o),n={hours:t,minutes:Math.floor(60*(o-t))};return g(e).format(n)}case"min":{const t=Math.floor(o),n={minutes:t,seconds:Math.floor(60*(o-t))};return _(e).format(n)}default:throw new Error("Invalid duration unit")}};i()}catch(c){i(c)}})},26218:function(e,t,n){n.d(t,{a:function(){return o}});n(16280);const i=(0,n(77796).n)(e=>{history.replaceState({scrollPosition:e},"")},300);function o(e){return(t,n)=>{if("object"==typeof n)throw new Error("This decorator does not support this compilation type.");const o=t.connectedCallback;t.connectedCallback=function(){o.call(this);const t=this[n];t&&this.updateComplete.then(()=>{const n=this.renderRoot.querySelector(e);n&&setTimeout(()=>{n.scrollTop=t},0)})};const s=Object.getOwnPropertyDescriptor(t,n);let a;if(void 0===s)a={get(){var e;return this[`__${String(n)}`]||(null===(e=history.state)||void 0===e?void 0:e.scrollPosition)},set(e){i(e),this[`__${String(n)}`]=e},configurable:!0,enumerable:!0};else{const e=s.set;a=Object.assign(Object.assign({},s),{},{set(t){i(t),this[`__${String(n)}`]=t,null==e||e.call(this,t)}})}Object.defineProperty(t,n,a)}}},12575:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{J:function(){return g},computeStateDisplay:function(){return f},computeStateToParts:function(){return y}});n(74423),n(44114),n(18111),n(61701),n(62953);var o=n(22675),s=n(46927),a=n(72487),r=n(95747),c=n(82591),l=n(30162),u=n(20058),d=n(8549),h=n(71727),m=n(64808),p=e([c,u,a,l,r]);[c,u,a,l,r]=p.then?(await p)():p;const f=(e,t,n,i,o,s,a)=>{const r=null==s?void 0:s[t.entity_id];return g(e,n,i,o,r,t.entity_id,t.attributes,void 0!==a?a:t.state)},g=(e,t,n,i,o,s,a,r)=>_(e,t,n,i,o,s,a,r).map(e=>e.value).join(""),_=(e,t,n,i,p,f,g,_)=>{if(_===o.HV||_===o.Hh)return[{type:"value",value:e(`state.default.${_}`)}];const y=(0,h.m)(f),b="counter"===y||"number"===y||"input_number"===y;if((0,u.ty)(g,"sensor"===y?n:[])||b){if("duration"===g.device_class&&g.unit_of_measurement&&c.Z8.includes(g.unit_of_measurement))try{return[{type:"value",value:(0,c.a3)(t,_,g.unit_of_measurement,null==p?void 0:p.display_precision)}]}catch(v){}if("monetary"===g.device_class){let e=[];try{e=(0,u.QL)(_,t,Object.assign({style:"currency",currency:g.unit_of_measurement,minimumFractionDigits:2},(0,u.ZQ)({state:_,attributes:g},p)))}catch(v){}if(e.length){const t={integer:"value",group:"value",decimal:"value",fraction:"value",minusSign:"value",plusSign:"value",literal:"literal",currency:"unit"},n=[];for(const i of e){const e=t[i.type];if(!e)continue;const o=n[n.length-1];"value"===e&&"value"===(null==o?void 0:o.type)?o.value+=i.value:n.push({type:e,value:i.value})}return n}}const n=(0,u.ZV)(_,t,(0,u.ZQ)({state:_,attributes:g},p)),i=(null==p?void 0:p.translation_key)&&e(`component.${p.platform}.entity.${y}.${p.translation_key}.unit_of_measurement`)||g.unit_of_measurement;return i?[{type:"value",value:n},{type:"literal",value:(0,d.A)(i,t)},{type:"unit",value:i}]:[{type:"value",value:n}]}if(["date","input_datetime","time"].includes(y))try{const e=_.split(" ");if(2===e.length)return[{type:"value",value:(0,r.r6)(new Date(e.join("T")),Object.assign(Object.assign({},t),{},{time_zone:s.Wj.local}),i)}];if(1===e.length){if(_.includes("-"))return[{type:"value",value:(0,a.Yq)(new Date(`${_}T00:00`),Object.assign(Object.assign({},t),{},{time_zone:s.Wj.local}),i)}];if(_.includes(":")){const e=new Date;return[{type:"value",value:(0,l.fU)(new Date(`${e.toISOString().split("T")[0]}T${_}`),Object.assign(Object.assign({},t),{},{time_zone:s.Wj.local}),i)}]}}return[{type:"value",value:_}]}catch(w){return[{type:"value",value:_}]}if(["ai_task","button","conversation","event","image","infrared","input_button","notify","radio_frequency","scene","stt","tag","tts","wake_word","datetime"].includes(y)||"sensor"===y&&m.G6.includes(g.device_class))try{return[{type:"value",value:(0,r.r6)(new Date(_),t,i)}]}catch(v){return[{type:"value",value:_}]}return[{type:"value",value:(null==p?void 0:p.translation_key)&&e(`component.${p.platform}.entity.${y}.${p.translation_key}.state.${_}`)||g.device_class&&e(`component.${y}.entity_component.${g.device_class}.state.${_}`)||e(`component.${y}.entity_component._.state.${_}`)||_}]},y=(e,t,n,i,o,s,a)=>{const r=null==s?void 0:s[t.entity_id];return _(e,n,i,o,r,t.entity_id,t.attributes,void 0!==a?a:t.state)};i()}catch(f){i(f)}})},4423:function(e,t,n){n.d(t,{B:function(){return c},r:function(){return r}});n(44114),n(18111),n(13579),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953);var i=n(44537),o=n(71727),s=n(28455);const a=e=>{if(void 0!==e)return null===e?new Set([null]):new Set((0,i.e)(e))},r=(e,t)=>{const n=t.domain?new Set((0,i.e)(t.domain)):void 0,r=t.hidden_domains?new Set((0,i.e)(t.hidden_domains)):void 0,c=t.device_class?new Set((0,i.e)(t.device_class)):void 0,l=a(t.floor),u=a(t.area),d=a(t.device),h=t.entity_category?new Set((0,i.e)(t.entity_category)):void 0,m=t.label?new Set((0,i.e)(t.label)):void 0,p=t.hidden_platform?new Set((0,i.e)(t.hidden_platform)):void 0;return t=>{const i=e.states[t];if(!i)return!1;if(n||r){const e=(0,o.m)(t);if(n&&!n.has(e))return!1;if(r&&r.has(e))return!1}if(c){const e=i.attributes.device_class||"none";if(!c.has(e))return!1}const{area:a,floor:f,device:g,entity:_}=(0,s.ln)(i,e.entities,e.devices,e.areas,e.floors);if(_&&_.hidden)return!1;if(l){var y;const e=null!==(y=null==f?void 0:f.floor_id)&&void 0!==y?y:null;if(!l.has(e))return!1}if(u){var b;const e=null!==(b=null==a?void 0:a.area_id)&&void 0!==b?b:null;if(!u.has(e))return!1}if(d){var v;const e=null!==(v=null==g?void 0:g.id)&&void 0!==v?v:null;if(!d.has(e))return!1}if(m){if(!_)return!1;if(!_.labels.some(e=>m.has(e)))return!1}if(h){const e=(null==_?void 0:_.entity_category)||"none";if(!h.has(e))return!1}if(p){if(!_)return!1;if(_.platform&&p.has(_.platform))return!1}return!0}},c=(e,t)=>{const n=new Set,i=[];for(const o of t)for(const t of e)o(t)&&!n.has(t)&&(n.add(t),i.push(t));return i}},79791:function(e,t,n){n.d(t,{L:function(){return i}});const i=(e,t=2)=>Math.round(e*10**t)/10**t},31290:function(e,t,n){n.d(t,{n:function(){return i}});n(27495),n(25440);const i=e=>e.replace(/^_*(.)|_+(.)/g,(e,t,n)=>t?t.toUpperCase():" "+n.toUpperCase())},22533:function(e,t,n){n.d(t,{i:function(){return o}});var i=n(52943);const o=(e,t)=>(e=>{switch(e){case"de":case"lb":return!0;default:return!1}})(t)?(0,i.Z)(e):e.toLocaleLowerCase(t)},67258:function(e,t,n){n.d(t,{d:function(){return i}});const i=e=>{switch(e.language){case"cs":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}}},8549:function(e,t,n){n.d(t,{A:function(){return o}});var i=n(67258);const o=(e,t)=>"°"===e?"":t&&"%"===e?(0,i.d)(t):" "},17399:function(e,t,n){n.d(t,{W:function(){return i}});n(42762);const i=e=>{const t=e.trim();let n,i;return t.endsWith("ms")?(n=parseFloat(t.slice(0,-2)),i=1):t.endsWith("s")?(n=parseFloat(t.slice(0,-1)),i=1e3):(n=parseFloat(t),i=1),!isFinite(n)||n<0?0:n*i}},58548:function(e,t,n){n.d(t,{A:function(){return o}});n(16280),n(27495),n(25440);const i=e=>{const t=parseFloat(e);if(isNaN(t))throw new Error(`${e} is not a number`);return t};function o(e){if(!e)return null;try{if(e.endsWith("%"))return{w:100,h:i(e.slice(0,-1))};const t=e.replace(":","x").split("x");return 0===t.length?null:1===t.length?{w:i(t[0]),h:1}:{w:i(t[0]),h:i(t[1])}}catch(t){}return null}},60353:function(e,t,n){n.d(t,{u:function(){return i}});class i{start(e){const t=Date.now();this._startY=e,this._startTime=t,this._lastY=e,this._lastTime=t,this._delta=0}move(e){const t=Date.now();return this._delta=this._startY-e,this._lastY=e,this._lastTime=t,this._delta}end(){const e=this.getVelocity(),t=Math.abs(e)>this._velocityThreshold;return{velocity:e,delta:this._delta,isSwipe:t,isDownwardSwipe:e>0}}getDelta(){return this._delta}getVelocity(){if(Date.now()-this._lastTime>=this._movementTimeThreshold)return 0;const e=this._lastTime-this._startTime;return e>0?(this._lastY-this._startY)/e:0}reset(){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0}constructor(e={}){var t,n;this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=null!==(t=e.velocitySwipeThreshold)&&void 0!==t?t:.5,this._movementTimeThreshold=null!==(n=e.movementTimeThreshold)&&void 0!==n?n:100}}},77796:function(e,t,n){n.d(t,{n:function(){return i}});n(62953);const i=(e,t,n=!0,i=!0)=>{let o,s=0;const a=(...a)=>{const r=()=>{s=!1===n?0:Date.now(),o=void 0,e(...a)},c=Date.now();s||!1!==n||(s=c);const l=t-(c-s);l<=0||l>t?(o&&(clearTimeout(o),o=void 0),s=c,e(...a)):o||!1===i||(o=window.setTimeout(r,l))};return a.cancel=()=>{clearTimeout(o),o=void 0,s=0},a}},34296:function(e,t,n){n(62953);var i=n(40445),o=n(96229),s=n(26069),a=n(91735),r=n(42034),c=n(5124),l=n(67576);let u,d,h,m,p=e=>e;class f extends o.k{renderOutline(){return this.filled?(0,c.qy)(u||(u=p`<span class="filled"></span>`)):super.renderOutline()}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{active:this.active})}renderPrimaryContent(){return(0,c.qy)(d||(d=p` <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)(h||(h=p`<slot name="trailing-icon"></slot>`))}constructor(...e){super(...e),this.filled=!1,this.active=!1}}f.styles=[a.R,r.R,s.R,(0,c.AH)(m||(m=p`: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,i.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],f.prototype,"filled",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean})],f.prototype,"active",void 0),f=(0,i.Cg)([(0,l.EM)("ha-assist-chip")],f)},59174:function(e,t,n){n.a(e,async function(e,t){try{var i=n(40445),o=n(35211),s=n(5124),a=n(67576),r=n(91450),c=n(22792),l=n(85694),u=n(44144),d=(n(47680),e([l]));l=(d.then?(await d)():d)[0];let h,m,p,f,g,_,y,b=e=>e;class v extends s.WF{render(){if(this.icon)return(0,s.qy)(h||(h=b`<ha-icon .icon="${0}"></ha-icon>`),this.icon);if(!this.domain)return s.s6;if(!this._connection||!this._hassConfig)return this._renderFallback();const e=(0,l._4)(this._connection.connection,this._hassConfig.config,this.domain,this.deviceClass,this.state).then(e=>e?(0,s.qy)(m||(m=b`<ha-icon .icon="${0}"></ha-icon>`),e):this._renderFallback());return(0,s.qy)(p||(p=b`${0}`),(0,r.T)(e))}_renderFallback(){if(this.domain&&this.domain in l.l)return(0,s.qy)(f||(f=b` <ha-svg-icon .path="${0}"></ha-svg-icon> `),l.l[this.domain]);if(this.brandFallback){var e,t;const n=(0,u.MR)({domain:this.domain,type:"icon",darkOptimized:null===(e=this._hassUi)||void 0===e?void 0:e.themes.darkMode},null===(t=this._hassConfig)||void 0===t?void 0:t.auth.data.hassUrl);return(0,s.qy)(g||(g=b` <img alt="" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer"> `),n)}return(0,s.qy)(_||(_=b`<ha-svg-icon .path="${0}"></ha-svg-icon>`),l.lW)}}v.styles=(0,s.AH)(y||(y=b`img{width:var(--mdc-icon-size,24px)}`)),(0,i.Cg)([(0,a.MZ)()],v.prototype,"domain",void 0),(0,i.Cg)([(0,a.MZ)({attribute:!1})],v.prototype,"deviceClass",void 0),(0,i.Cg)([(0,a.MZ)({attribute:!1})],v.prototype,"state",void 0),(0,i.Cg)([(0,a.MZ)()],v.prototype,"icon",void 0),(0,i.Cg)([(0,a.MZ)({attribute:"brand-fallback",type:Boolean})],v.prototype,"brandFallback",void 0),(0,i.Cg)([(0,a.wk)(),(0,o.Fg)({context:c.WF,subscribe:!0})],v.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,a.wk)(),(0,o.Fg)({context:c.Wq,subscribe:!0})],v.prototype,"_connection",void 0),(0,i.Cg)([(0,a.wk)(),(0,o.Fg)({context:c.EK,subscribe:!0})],v.prototype,"_hassUi",void 0),v=(0,i.Cg)([(0,a.EM)("ha-domain-icon")],v),t()}catch(h){t(h)}})},70947:function(e,t,n){n(62953);var i=n(40445),o=n(50759),s=(n(38625),n(5124)),a=n(67576);n(67094);let r,c,l=e=>e;class u extends o.A{renderCheckboxIcon(){return(0,s.qy)(r||(r=l` <ha-svg-icon id="check" part="checkmark" .path="${0}"></ha-svg-icon> `),this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z")}static get styles(){return[o.A.styles,(0,s.AH)(c||(c=l`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`))]}constructor(...e){super(...e),this.selected=!1}}(0,i.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],u.prototype,"selected",void 0),u=(0,i.Cg)([(0,a.EM)("ha-dropdown-item")],u)},29823:function(e,t,n){n.a(e,async function(e,t){try{n(3362),n(62953);var i=n(40445),o=n(52254),s=n(5124),a=n(67576),r=e([o]);o=(r.then?(await r)():r)[0];let c,l=e=>e;class u extends o.A{get anchorElement(){var e;return null===(e=this.popup)||void 0===e?void 0:e.anchor}set anchorElement(e){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=e)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!0)}async hideMenu(){const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!1),await super.hideMenu()}static get styles(){return[o.A.styles,(0,s.AH)(c||(c=l`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
            --card-background-color,
            var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
          )}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`))]}constructor(...e){super(...e),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,i.Cg)([(0,a.MZ)({attribute:!1})],u.prototype,"dropdownTag",void 0),(0,i.Cg)([(0,a.MZ)({attribute:!1})],u.prototype,"dropdownItemTag",void 0),u=(0,i.Cg)([(0,a.EM)("ha-dropdown")],u),t()}catch(c){t(c)}})},11382:function(e,t,n){n(3362),n(62953);var i=n(40445),o=n(5124),s=n(67576),a=n(6412),r=n(1087),c=n(12587);n(67094);let l,u,d,h,m=e=>e;class p extends o.WF{render(){const e=this.noCollapse?o.s6:(0,o.qy)(l||(l=m` <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,a.H)({expanded:this.expanded}));return(0,o.qy)(u||(u=m` <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,a.H)({expanded:this.expanded}),(0,a.H)({noCollapse:this.noCollapse}),this._toggleContainer,this._toggleContainer,this._focusChanged,this._focusChanged,this.noCollapse?-1:0,this.expanded,this.leftChevron?e:o.s6,this.header,this.secondary,this.leftChevron?o.s6:e,(0,a.H)({expanded:this.expanded}),this._handleTransitionEnd,!this.expanded,this._showContent?(0,o.qy)(d||(d=m`<slot></slot>`)):"")}willUpdate(e){super.willUpdate(e),e.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(e){if(e.defaultPrevented)return;if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;if(e.preventDefault(),this.noCollapse)return;const t=!this.expanded;(0,r.r)(this,"expanded-will-change",{expanded:t}),this._container.style.overflow="hidden",t&&(this._showContent=!0,await(0,c.E)());const n=this._container.scrollHeight;this._container.style.height=`${n}px`,t||setTimeout(()=>{this._container.style.height="0px"},0),this.expanded=t,(0,r.r)(this,"expanded-changed",{expanded:this.expanded})}_focusChanged(e){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===e.type)}constructor(...e){super(...e),this.expanded=!1,this.outlined=!1,this.leftChevron=!1,this.noCollapse=!1,this._showContent=this.expanded}}p.styles=(0,o.AH)(h||(h=m`: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,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],p.prototype,"expanded",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],p.prototype,"outlined",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"left-chevron",type:Boolean,reflect:!0})],p.prototype,"leftChevron",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"no-collapse",type:Boolean,reflect:!0})],p.prototype,"noCollapse",void 0),(0,i.Cg)([(0,s.MZ)()],p.prototype,"header",void 0),(0,i.Cg)([(0,s.MZ)()],p.prototype,"secondary",void 0),(0,i.Cg)([(0,s.wk)()],p.prototype,"_showContent",void 0),(0,i.Cg)([(0,s.P)(".container")],p.prototype,"_container",void 0),p=(0,i.Cg)([(0,s.EM)("ha-expansion-panel")],p)},8630:function(e,t,n){var i=n(40445),o=n(68618),s=n(11081),a=n(67576);class r extends o.iY{}r.styles=s.R,r=(0,i.Cg)([(0,a.EM)("ha-list")],r)},2054:function(e,t,n){n.a(e,async function(e,t){try{n(16280),n(62953);var i=n(40445),o=n(5124),s=n(67576),a=n(1087),r=n(44249),c=n(26300),l=e([c]);c=(l.then?(await l)():l)[0];let u,d,h,m=e=>e;const p="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class f extends o.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 o.s6;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,o.qy)(u||(u=m` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),p,this._toggleMenu,e?(0,o.qy)(d||(d=m`<div class="dot"></div>`)):"")}willUpdate(e){if(super.willUpdate(e),!e.has("narrow")&&!e.has("hass"))return;const t=e.has("hass")?e.get("hass"):this.hass,n=e.has("narrow")?e.get("narrow"):this.narrow,i=!1===(null==t?void 0:t.kioskMode)&&(n||"always_hidden"===(null==t?void 0:t.dockedSidebar)),o=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&i===o||(this._show=o||this._alwaysVisible,o?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,r.V)(this.hass.connection,e=>{this._hasNotifications=e.length>0})}_toggleMenu(){(0,a.r)(this,"hass-toggle-menu")}constructor(...e){super(...e),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}f.styles=(0,o.AH)(h||(h=m`: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,i.Cg)([(0,s.MZ)({type:Boolean})],f.prototype,"narrow",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,i.Cg)([(0,s.wk)()],f.prototype,"_hasNotifications",void 0),(0,i.Cg)([(0,s.wk)()],f.prototype,"_show",void 0),f=(0,i.Cg)([(0,s.EM)("ha-menu-button")],f),t()}catch(u){t(u)}})},10897:function(e,t,n){n.d(t,{C4:function(){return l},CK:function(){return c},FX:function(){return f},UC:function(){return m},_Z:function(){return g},bT:function(){return _},sd:function(){return s},su:function(){return r},w8:function(){return h},wv:function(){return d},y3:function(){return p},zS:function(){return a}});n(3362);var i=n(3931),o=n(82e3);const s=[1,2,3,4,6,8],a="web_rtc",r=(e,t,n)=>`${e}&width=${t}&height=${n}`,c=e=>e.attributes.access_token?`/api/camera_proxy_stream/${e.entity_id}?token=${e.attributes.access_token}`:void 0,l=async(e,t,n,o)=>{const s=await(0,i.U)("_cameraTmbUrl",9e3,u,e,t);return r(s,n,o)},u=async(e,t)=>{const n=await(0,o.e0)(e,`/api/camera_proxy/${t}`);return e.hassUrl(n.path)},d=async(e,t,n)=>{const i={type:"camera/stream",entity_id:t};n&&(i.format=n);const o=await e.callWS(i);return o.url=e.hassUrl(o.url),o},h=(e,t,n,i)=>e.connection.subscribeMessage(i,{type:"camera/webrtc/offer",entity_id:t,offer:n}),m=(e,t,n,i)=>e.callWS({type:"camera/webrtc/candidate",entity_id:t,session_id:n,candidate:i}),p=(e,t)=>e.callWS({type:"camera/get_prefs",entity_id:t}),f=(e,t,n)=>e.callWS(Object.assign({type:"camera/update_prefs",entity_id:t},n)),g=async(e,t)=>e.callWS({type:"camera/capabilities",entity_id:t}),_=async(e,t)=>e.callWS({type:"camera/webrtc/get_client_config",entity_id:t})},38395:function(e,t,n){n.d(t,{gh:function(){return s}});n(3362);var i=n(90889),o=(n(62384),n(61557));const s=e=>(0,i.X)(e,"_ingressPanelInfo",async e=>(await(0,o.uw)(e,{endpoint:"/ingress/panels"})).panels)},25064:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{Fp:function(){return A},IQ:function(){return m},Lj:function(){return H},Mm:function(){return $},_1:function(){return M},tG:function(){return V}});n(74423),n(44114),n(26910),n(13609),n(18111),n(22489),n(20116),n(7588),n(61701),n(13579),n(3362),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953);var o=n(71727),s=n(12575),a=n(28978),r=e([s]);s=(r.then?(await r)():r)[0];const c=["climate","humidifier","water_heater"],l=["climate","humidifier","input_datetime","water_heater","person","device_tracker"],u=["temperature","current_temperature","target_temp_low","target_temp_high","hvac_action","humidity","mode","action","current_humidity"],d=(e,t)=>!e.states[t]||l.includes((0,o.m)(t));class h{processMessage(e){if(!this.combinedHistory||!Object.keys(this.combinedHistory).length)return this.combinedHistory=e.states,this.combinedHistory;if(!Object.keys(e.states).length)return this.combinedHistory;const t=this.hoursToShow?((new Date).getTime()-3600*this.hoursToShow*1e3)/1e3:void 0,n={};for(const i of Object.keys(this.combinedHistory))n[i]=[];for(const i of Object.keys(e.states))n[i]=[];for(const i of Object.keys(n)){if(i in this.combinedHistory&&i in e.states){const t=this.combinedHistory[i],o=t[t.length-1];n[i]=t.concat(e.states[i]),e.states[i][0].lu<o.lu&&(n[i]=n[i].sort((e,t)=>e.lu-t.lu))}else i in this.combinedHistory?n[i]=this.combinedHistory[i]:n[i]=e.states[i];if(t&&i in this.combinedHistory){const e=n[i].filter(e=>e.lu<t);if(!e.length)continue;if(n[i]=n[i].filter(e=>e.lu>=t),n[i].length&&n[i][0].lu===t)continue;const o=e[e.length-1];o.lu=t,delete o.lc,n[i].unshift(o)}}return this.combinedHistory=n,this.combinedHistory}constructor(e,t){this.hass=e,this.hoursToShow=t,this.combinedHistory={}}}const m=(e,t,n,i,o,s=!0,a=!0)=>p(e,t,()=>({type:"history/stream",entity_ids:i,start_time:new Date((new Date).getTime()-3600*n*1e3).toISOString(),minimal_response:s,significant_changes_only:a,no_attributes:null!=o?o:!i.some(t=>d(e,t))}),n),p=async(e,t,n,i)=>{let o,s=!1;const a=async()=>{const a=new h(e,i),r=await e.connection.subscribeMessage(e=>t(a.processMessage(e)),n(),{resubscribe:!1});s?r().catch(()=>{}):o=r},r=()=>{s||(o=void 0,a().catch(()=>{}))};return await a(),e.connection.addEventListener("ready",r),async()=>{s=!0,e.connection.removeEventListener("ready",r),o&&await o()}},f=(e,t)=>e.state===t.state&&(!e.attributes||!t.attributes||u.every(n=>e.attributes[n]===t.attributes[n])),g=(e,t,n,i,o,r,c)=>{const l=[],u=r[0];for(const a of r){if(l.length>0&&a.s===l[l.length-1].state)continue;const r={};null!=c&&c.attributes.device_class&&(r.device_class=null==c?void 0:c.attributes.device_class),l.push({state_localize:(0,s.J)(e,t,[],n,i[o],o,Object.assign(Object.assign({},a.a||u.a),r),a.s),state:a.s,last_changed:1e3*(a.lc?a.lc:a.lu)})}return{name:(0,a._)(o,(null==c?void 0:c.attributes)||u.a),entity_id:o,data:l}},_=(e,t,n,i)=>{const s=[];return Object.keys(n).forEach(e=>{const t=n[e],r=t[0],l=(0,o.m)(e),d=[];for(const n of t){let e;if(c.includes(l)){e={state:n.s,last_changed:1e3*n.lu,attributes:{}};for(const t of u)t in n.a&&(e.attributes[t]=n.a[t])}else e={state:n.s,last_changed:1e3*(n.lc?n.lc:n.lu),attributes:{}};d.length>1&&f(e,d[d.length-1])&&f(e,d[d.length-2])||d.push(e)}const h=e in i?i[e].attributes:"friendly_name"in r.a?r.a:void 0;s.push({domain:l,name:(0,a._)(e,h||{}),entity_id:e,states:d})}),{unit:e,device_class:t,identifier:Object.keys(n).join(""),data:s}},y=["counter","input_number","number"],b=e=>y.includes(e),v=e=>"unit_of_measurement"in e||"state_class"in e,w=(e,t)=>null!=e.attributes.device_class&&t.includes(e.attributes.device_class),C=" ",M=(e,t,n,i,o=!1)=>{const s={};n.forEach(e=>{e in t&&(s[e]=t[e])});const a={};Object.entries(s).forEach(([e,t])=>{const n=t.map(e=>({s:null!=e.mean?e.mean.toString():e.state.toString(),lc:e.end/1e3,a:{},lu:e.end/1e3}));a[e]=n});const r=$(e,a,[],e.localize,i,o,!0);return((null==r?void 0:r.line)||[]).forEach(e=>{e.data.forEach(e=>{e.statistics=e.states,e.states=[]})}),r},H=e=>[{s:e.state,a:e.attributes,lu:new Date(e.last_updated).getTime()/1e3}],$=(e,t,n,i,s,a=!1,r=!1)=>{const c={},l=[],u={};if(new Set([...n,...Object.keys(t)]).forEach(n=>{n in t?u[n]=t[n]:e.states[n]&&(u[n]=H(e.states[n]))}),!u)return{line:[],timeline:[]};Object.keys(u).forEach(t=>{var n;const d=u[t];if(0===d.length)return;const h=(0,o.m)(t),m=t in e.states?e.states[t]:void 0,p=m||b(h)?void 0:d.find(e=>e.a&&v(e.a));let f;f=A(h,m,p,s,r)?(null==m?void 0:m.attributes.unit_of_measurement)||(null==p?void 0:p.a.unit_of_measurement)||C:{zone:i("ui.dialogs.more_info_control.zone.graph_unit"),climate:e.config.unit_system.temperature,humidifier:"%",water_heater:e.config.unit_system.temperature}[h];const _={climate:"temperature",humidifier:"humidity",water_heater:"temperature"}[h]||(null===(n=(null==m?void 0:m.attributes)||(null==p?void 0:p.a))||void 0===n?void 0:n.device_class),y=L(f,_,a);f?y&&y in c&&t in c[y]?c[y][t].push(...d):y&&(y in c||(c[y]={}),c[y][t]=d):l.push(g(i,e.locale,e.config,e.entities,t,d,m))});return{line:Object.keys(c).map(t=>{const n=t.split("_"),i=n[0],o=n.slice(1).join("_")||void 0;return _(i,o,c[t],e.states)}),timeline:l}},L=(e,t,n)=>n?`${e}_${t||""}`:e,A=(e,t,n,i,o=!1)=>o||b(e)||null!=t&&v(t.attributes)||null!=t&&"sensor"===e&&w(t,i)||null!=n,V=(e,t,n=!0)=>{if(!t)return e;const i=Object.assign(Object.assign({},e),{},{line:[]}),o={};for(const c of e.line){const e=L(c.unit,c.device_class,n);e&&(o[e]={historyItem:c})}for(const c of t.line){var s,a;if(c.unit===C)c.unit=null!==(s=null===(a=e.line.find(e=>e.identifier===c.identifier))||void 0===a?void 0:a.unit)&&void 0!==s?s:C;const t=L(c.unit,c.device_class,n);t&&(t in o?o[t].ltsItem=c:o[t]={ltsItem:c})}for(const{historyItem:c,ltsItem:l}of Object.values(o)){if(!c||!l){i.line.push(c||l);continue}const e=Object.assign(Object.assign({},c),{},{data:[]}),t=new Set([...c.data.map(e=>e.entity_id),...l.data.map(e=>e.entity_id)]);for(const n of t){var r;const t=c.data.find(e=>e.entity_id===n),i=l.data.find(e=>e.entity_id===n);if(!t||!i){e.data.push(t||i);continue}const o=(null===(r=t.states[0])||void 0===r?void 0:r.last_changed)||i.statistics[i.statistics.length-1].last_changed+1,s=[];for(const e of i.statistics){if(e.last_changed>=o)break;s.push(e)}e.data.push(0===s.length?t:Object.assign(Object.assign({},t),{},{statistics:s}))}i.line.push(e)}return i};i()}catch(c){i(c)}})},86531:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{$O:function(){return y},a$:function(){return w},cj:function(){return h},dG:function(){return _},gM:function(){return g},gd:function(){return p},k$:function(){return v},rc:function(){return C}});n(74423),n(3362),n(27495),n(25440),n(62953);var o=n(46190),s=n(71727),a=n(69093),r=n(22533),c=n(22675),l=n(25064),u=e([l]);l=(u.then?(await u)():u)[0];const d="ui.components.logbook.messages",h=["counter","proximity"],m={triggered_by_numeric_state_of:"numeric state of",triggered_by_state_of:"state of",triggered_by_event:"event",triggered_by_time_pattern:"time pattern",triggered_by_time:"time",triggered_by_homeassistant_stopping:"ioBroker stopping",triggered_by_homeassistant_starting:"ioBroker starting"},p=async(e,t,n)=>f(e,t,void 0,void 0,n),f=(e,t,n,i,o,s)=>{if((i||s)&&(!i||0===i.length)&&(!s||0===s.length))return Promise.resolve([]);const a={type:"logbook/get_events",start_time:t};return n&&(a.end_time=n),null!=i&&i.length&&(a.entity_ids=i),null!=s&&s.length&&(a.device_ids=s),o&&(a.context_id=o),e.callWS(a)},g=(e,t,n,i,o,s,a)=>{if((s||a)&&(!s||0===s.length)&&(!a||0===a.length))return Promise.reject("No entities or devices");const r={type:"logbook/event_stream",start_time:n,end_time:i};return null!=s&&s.length&&(r.entity_ids=s),null!=a&&a.length&&(r.device_ids=a),e.connection.subscribeMessage(e=>t(e,o),r)},_=(e,t)=>({entity_id:e.entity_id,state:t,attributes:{device_class:null==e?void 0:e.attributes.device_class,source_type:null==e?void 0:e.attributes.source_type,has_date:null==e?void 0:e.attributes.has_date,has_time:null==e?void 0:e.attributes.has_time,entity_picture_local:o.oL.has((0,s.m)(e.entity_id))||null==e?void 0:e.attributes.entity_picture_local,entity_picture:o.oL.has((0,s.m)(e.entity_id))||null==e?void 0:e.attributes.entity_picture}}),y=(e,t)=>{for(const n of Object.keys(m)){const i=m[n];if(t.startsWith(i))return t.replace(i,`${e(`ui.components.logbook.${n}`)}`)}return t},b={triggered_by_numeric_state_of:"numeric_state_of",triggered_by_state_of:"state_of",triggered_by_event:"event",triggered_by_time_pattern:"time_pattern",triggered_by_time:"time",triggered_by_homeassistant_stopping:"homeassistant_stopping",triggered_by_homeassistant_starting:"homeassistant_starting"},v=(e,t)=>{for(const n of Object.keys(m)){const i=m[n];if(t.startsWith(i)){const o=b[n];return t.replace(i,`${e(`ui.components.logbook.${o}`)}`)}}return t},w=(e,t,n,i,o)=>{switch(o){case"device_tracker":case"person":return"not_home"===n?t(`${d}.was_away`):"home"===n?t(`${d}.was_at_home`):t(`${d}.was_at_state`,{state:n});case"sun":return t("above_horizon"===n?`${d}.rose`:`${d}.set`);case"binary_sensor":{const o="on"===n,s="off"===n,a=i.attributes.device_class;if(a&&(o||s))return t(`${d}.${o?"detected_device_classes":"cleared_device_classes"}.${a}`,{device_class:(0,r.i)(t(`component.binary_sensor.entity_component.${a}.name`)||a,e.language)})||t(`${d}.${o?"detected_device_class":"cleared_device_class"}`,{device_class:(0,r.i)(t(`component.binary_sensor.entity_component.${a}.name`)||a,e.language)});break}case"cover":switch(n){case"open":return t(`${d}.was_opened`);case"opening":return t(`${d}.is_opening`);case"closing":return t(`${d}.is_closing`);case"closed":return t(`${d}.was_closed`)}break;case"event":return t(`${d}.detected_event_no_type`);case"lock":switch(n){case"unlocked":return t(`${d}.was_unlocked`);case"locking":return t(`${d}.is_locking`);case"unlocking":return t(`${d}.is_unlocking`);case"opening":return t(`${d}.is_opening`);case"open":return t(`${d}.is_opened`);case"locked":return t(`${d}.was_locked`);case"jammed":return t(`${d}.is_jammed`)}}return"on"===n?t(`${d}.turned_on`):"off"===n?t(`${d}.turned_off`):n===c.HV?t(`${d}.became_unknown`):n===c.Hh?t(`${d}.became_unavailable`):e.localize(`${d}.changed_to_state`,{state:i?e.formatEntityState(i,n):n})},C=(e,t=[])=>{const n=(0,a.t)(e);return!(h.includes(n)||"sensor"===n&&(0,l.Fp)(n,e,void 0,t))};i()}catch(d){i(d)}})},99129:function(e,t,n){n.d(t,{ML:function(){return s}});var i=n(90889),o=n(35952);const s=(e,t=null)=>(0,i.X)(e,`_lovelace_${null!=t?t:""}`,e=>(0,o.Dz)(e,t,!1),(n,i)=>((e,t,n)=>e.subscribeEvents(e=>{e.data.url_path===t&&n()},"lovelace_updated"))(e,t,()=>(0,o.Dz)(e,t,!1).then(e=>i.setState(e,!0))))},35952:function(e,t,n){function i(e){return"strategy"in e}n.d(t,{Dz:function(){return o},Wu:function(){return i},ql:function(){return s}});const o=(e,t,n)=>e.sendMessagePromise({type:"lovelace/config",url_path:t,force:n}),s=(e,t,n)=>e.callWS({type:"lovelace/config/save",url_path:t,config:n})},91984:function(e,t,n){n.d(t,{R6:function(){return o},TQ:function(){return s},cg:function(){return a}});var i=n(31290);function o(e){return"strategy"in e}const s=(e,t)=>{var n;return null!==(n=e.title)&&void 0!==n?n:e.path?(0,i.n)(e.path):String(t)},a=e=>{var t;return null!==(t=e.icon)&&void 0!==t?t:"mdi:view-compact"}},71730:function(e,t,n){n.d(t,{A_:function(){return a},SJ:function(){return i},mQ:function(){return s},n6:function(){return o}});const i=e=>e.callWS({type:"lovelace/dashboards/list"}),o=(e,t)=>e.callWS(Object.assign({type:"lovelace/dashboards/create"},t)),s=(e,t,n)=>e.callWS(Object.assign({type:"lovelace/dashboards/update",dashboard_id:t},n)),a=(e,t)=>e.callWS({type:"lovelace/dashboards/delete",dashboard_id:t})},45291:function(e,t,n){n.d(t,{IP:function(){return i},Iu:function(){return l},J_:function(){return s},bH:function(){return a},c8:function(){return c},wi:function(){return r}});n(18111),n(20116),n(62953);const i="custom:",o=window;"customCards"in o||(o.customCards=[]),"customCardFeatures"in o||(o.customCardFeatures=[]),"customBadges"in o||(o.customBadges=[]),"customTileFeatures"in o||(o.customTileFeatures=[]);const s=o.customCards,a=()=>[...o.customCardFeatures,...o.customTileFeatures],r=(o.customBadges,e=>s.find(t=>t.type===e)),c=e=>e.startsWith(i),l=e=>e.slice(i.length)},53072:function(e,t,n){n.d(t,{$6:function(){return _},EC:function(){return f},ET:function(){return g},H1:function(){return p},HN:function(){return w},Im:function(){return H},Un:function(){return b},Xm:function(){return v},ce:function(){return C},fh:function(){return $},ie:function(){return M},mm:function(){return y},vj:function(){return m}});n(44114);var i=n(47129),o=n(82286),s=n(22675),a=n(52069);const r="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",u="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",d="M18,18H6V6H18V18Z",h="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(e){return e[e.PAUSE=1]="PAUSE",e[e.SEEK=2]="SEEK",e[e.VOLUME_SET=4]="VOLUME_SET",e[e.VOLUME_MUTE=8]="VOLUME_MUTE",e[e.PREVIOUS_TRACK=16]="PREVIOUS_TRACK",e[e.NEXT_TRACK=32]="NEXT_TRACK",e[e.TURN_ON=128]="TURN_ON",e[e.TURN_OFF=256]="TURN_OFF",e[e.PLAY_MEDIA=512]="PLAY_MEDIA",e[e.VOLUME_STEP=1024]="VOLUME_STEP",e[e.SELECT_SOURCE=2048]="SELECT_SOURCE",e[e.STOP=4096]="STOP",e[e.CLEAR_PLAYLIST=8192]="CLEAR_PLAYLIST",e[e.PLAY=16384]="PLAY",e[e.SHUFFLE_SET=32768]="SHUFFLE_SET",e[e.SELECT_SOUND_MODE=65536]="SELECT_SOUND_MODE",e[e.BROWSE_MEDIA=131072]="BROWSE_MEDIA",e[e.REPEAT_SET=262144]="REPEAT_SET",e[e.GROUPING=524288]="GROUPING",e}({});const p="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:r,layout:"grid",show_list_images:!0},channel:{icon:h,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:r,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:h,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:h,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:h,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=(e,t,n,i)=>e.callWS({type:"media_player/browse_media",entity_id:t,media_content_id:n,media_content_type:i}),_=e=>{let t=e.attributes.media_position;return"playing"!==e.state?t:(t+=(Date.now()-new Date(e.attributes.media_position_updated_at).getTime())/1e3,t<0?0:t)},y=e=>{let t;switch(e.attributes.media_content_type){case"music":case"image":t=e.attributes.media_artist;break;case"playlist":t=e.attributes.media_playlist||e.attributes.media_artist;break;case"tvshow":t=e.attributes.media_series_title,e.attributes.media_season&&(t+=" S"+e.attributes.media_season,e.attributes.media_episode&&(t+="E"+e.attributes.media_episode));break;case"channel":t=e.attributes.media_channel;break;default:t=e.attributes.app_name||""}return t},b=(e,t=!1)=>{if(!e)return;const n=e.state;if(n===s.Hh)return;const a=!0===e.attributes.assumed_state;if(!(0,i.a)(e)&&!a)return(0,o.$)(e,128)?[{icon:u,action:"turn_on"}]:void 0;const r=[];a&&(0,o.$)(e,128)&&r.push({icon:"M11,3H13V21H11V3Z",action:"turn_on"}),(0,o.$)(e,256)&&r.push({icon:a?"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":u,action:"turn_off"});const h=e.attributes;return("playing"===n||"paused"===n||a)&&(0,o.$)(e,32768)&&t&&r.push({icon:!0===h.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"===n||"paused"===n||a)&&(0,o.$)(e,16)&&r.push({icon:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z",action:"media_previous_track"}),!a&&("playing"===n&&((0,o.$)(e,1)||(0,o.$)(e,4096))||("paused"===n||"idle"===n)&&(0,o.$)(e,16384)||"on"===n&&((0,o.$)(e,16384)||(0,o.$)(e,1)))&&r.push({icon:"on"===n?"M3,5V19L11,12M13,19H16V5H13M18,5V19H21V5":"playing"!==n?l:(0,o.$)(e,1)?c:d,action:"playing"!==n?"media_play":(0,o.$)(e,1)?"media_pause":"media_stop"}),a&&(0,o.$)(e,16384)&&r.push({icon:l,action:"media_play"}),a&&(0,o.$)(e,1)&&r.push({icon:c,action:"media_pause"}),a&&(0,o.$)(e,4096)&&r.push({icon:d,action:"media_stop"}),("playing"===n||"paused"===n||a)&&(0,o.$)(e,32)&&r.push({icon:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z",action:"media_next_track"}),("playing"===n||"paused"===n||a)&&(0,o.$)(e,262144)&&t&&r.push({icon:"all"===h.repeat?"M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"one"===h.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"}),r.length>0?r:void 0},v=e=>{if(void 0===e||e===1/0)return"";const t=Math.max(0,Math.floor(e)),n=Math.floor(t/3600),i=Math.floor(t%3600/60),o=t%60,s=e=>e.toString().padStart(2,"0");return n>0?`${s(n)}:${s(i)}:${s(o)}`:`${s(i)}:${s(o)}`},w=e=>{if(!e)return;const t=e.indexOf("?authSig=");let n=t>0?e.slice(0,t):e;return n.startsWith("http")&&(n=decodeURIComponent(n.split("/").pop())),n},C=(e,t,n)=>e.callService("media_player",n,"shuffle_set"===n?{entity_id:t.entity_id,shuffle:!t.attributes.shuffle}:"repeat_set"===n?{entity_id:t.entity_id,repeat:"all"===t.attributes.repeat?"one":"off"===t.attributes.repeat?"all":"off"}:{entity_id:t.entity_id}),M=(e,t,n,i,o={})=>(!o.enqueue&&void 0===o.announce&&(0,a.ni)(n)&&(o.announce=!0),e.callService("media_player","play_media",Object.assign({entity_id:t,media_content_id:n,media_content_type:i},o))),H=(e,t,n)=>e.callService("media_player","join",{group_members:n},{entity_id:t}),$=(e,t)=>e.callService("media_player","unjoin",{},{entity_id:t})},44249:function(e,t,n){n.d(t,{V:function(){return i}});n(62953);const i=(e,t)=>{const n=new o,i=e.subscribeMessage(e=>t(n.processMessage(e)),{type:"persistent_notification/subscribe"});return()=>{i.then(e=>null==e?void 0:e())}};class o{processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications=Object.assign(Object.assign({},this.notifications),e.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},61557:function(e,t,n){n.d(t,{uw:function(){return o}});n(3362);const i={type:"supervisor/api",method:"GET"},o=(e,t)=>e.sendMessagePromise(Object.assign(Object.assign({},i),t))},48927:function(e,t,n){n.d(t,{H:function(){return o}});n(3362),n(62953);var i=n(1087);const o=(e,t)=>new Promise(o=>{const s=t.cancel,a=t.submit;(0,i.r)(e,"show-dialog",{dialogTag:"dialog-enter-code",dialogImport:()=>n.e(29130).then(n.bind(n,24561)),dialogParams:Object.assign(Object.assign({},t),{},{cancel:()=>{o(null),s&&s()},submit:e=>{o(e),a&&a(e)}})})})},24673:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{CT:function(){return m},M1:function(){return b},aK:function(){return h},gs:function(){return g},oF:function(){return _},pC:function(){return d},pk:function(){return f},sw:function(){return w},t0:function(){return v}});n(74423);var o=n(36312),s=n(71727),a=n(68287),r=n(25064),c=n(86531),l=n(43248),u=e([c,r]);[c,r]=u.then?(await u)():u;const d=["camera","configurator"],h=["scene","automation"],m=["script"],p=["alarm_control_panel","cover","climate","conversation","fan","humidifier","input_boolean","lawn_mower","light","lock","siren","script","switch","vacuum","valve","water_heater","weather","media_player"],f=["update"],g=["alarm_control_panel","automation","camera","climate","configurator","conversation","counter","cover","date","datetime","fan","group","humidifier","image","input_boolean","input_datetime","lawn_mower","light","lock","media_player","person","remote","script","scene","siren","sun","switch","time","timer","update","vacuum","valve","water_heater","weather"],_=["input_number","input_select","input_text","number","scene","select","text","update"],y=["camera","configurator"],b=(e,t)=>{if("weather"===(0,s.m)(t)){const n=e.states[t];if(n&&(0,l.N_)(n.state))return!1}return(0,o.x)(e.config,"history")&&!y.includes((0,s.m)(t))},v=(e,t,n=[])=>{if(!(0,o.x)(e.config,"logbook"))return!1;const i=e.states[t];if(!i)return!1;const a=(0,s.m)(t);return!(c.cj.includes(a)||"sensor"===a&&(0,r.Fp)(a,i,void 0,n)||y.includes(a))&&("weather"!==a||!i||!(0,l.N_)(i.state))},w=e=>{const t=(0,s.m)(e.entity_id);if("group"===t){const t=(0,a.z)(e);return null!=t&&"group"!==t&&p.includes(t)}return p.includes(t)};i()}catch(d){i(d)}})},42269:function(e,t,n){n.d(t,{p:function(){return o}});var i=n(1087);const o=(e,t)=>(0,i.r)(e,"hass-more-info",t)},2928:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{S5:function(){return u},bG:function(){return c},mE:function(){return l}});n(74423),n(3362),n(62953);var o=n(69093),s=n(24673),a=e([s]);s=(a.then?(await a)():a)[0];const r={alarm_control_panel:()=>n.e(67039).then(n.bind(n,8866)),automation:()=>n.e(59454).then(n.bind(n,68845)),camera:()=>n.e(65742).then(n.bind(n,16349)),climate:()=>n.e(99928).then(n.bind(n,14667)),configurator:()=>n.e(74124).then(n.bind(n,34439)),conversation:()=>Promise.all([n.e(28845),n.e(70876)]).then(n.bind(n,32421)),counter:()=>n.e(60069).then(n.bind(n,40932)),cover:()=>Promise.all([n.e(24484),n.e(63608)]).then(n.bind(n,21771)),date:()=>n.e(85659).then(n.bind(n,54358)),datetime:()=>Promise.all([n.e(99194),n.e(24617),n.e(38124)]).then(n.bind(n,58919)),fan:()=>n.e(790).then(n.bind(n,18133)),group:()=>Promise.all([n.e(73065),n.e(68616)]).then(n.bind(n,72315)),humidifier:()=>n.e(92523).then(n.bind(n,75417)),image:()=>n.e(75226).then(n.bind(n,77249)),input_boolean:()=>n.e(64656).then(n.bind(n,62387)),input_datetime:()=>n.e(76203).then(n.bind(n,15366)),lawn_mower:()=>n.e(2302).then(n.bind(n,69389)),light:()=>Promise.all([n.e(24484),n.e(63373)]).then(n.bind(n,9884)),lock:()=>n.e(17910).then(n.bind(n,54101)),media_player:()=>n.e(68507).then(n.bind(n,70294)),person:()=>Promise.all([n.e(66139),n.e(70622),n.e(12122),n.e(76420)]).then(n.bind(n,68047)),remote:()=>n.e(38545).then(n.bind(n,36872)),script:()=>n.e(75598).then(n.bind(n,46557)),siren:()=>n.e(92950).then(n.bind(n,27029)),sun:()=>n.e(39791).then(n.bind(n,4178)),switch:()=>n.e(14239).then(n.bind(n,31618)),time:()=>Promise.all([n.e(21209),n.e(37288)]).then(n.bind(n,80731)),timer:()=>n.e(2202).then(n.bind(n,97889)),update:()=>Promise.all([n.e(79996),n.e(98672)]).then(n.bind(n,1843)),vacuum:()=>n.e(51122).then(n.bind(n,11113)),valve:()=>Promise.all([n.e(24484),n.e(95351)]).then(n.bind(n,5610)),water_heater:()=>n.e(55684).then(n.bind(n,1199)),weather:()=>Promise.all([n.e(66432),n.e(67237)]).then(n.bind(n,84932))},c=e=>{const t=(0,o.t)(e);return l(t)},l=e=>s.gs.includes(e)?e:s.oF.includes(e)?"hidden":"default",u=e=>{e in r&&r[e]()};i()}catch(r){i(r)}})},50258:function(e,t,n){n.a(e,async function(e,i){try{n.r(t);n(3362),n(62953);var o=n(40445),s=n(5124),a=n(67576),r=n(50587),c=n(90248),l=n(65829),u=n(91926),d=n(6030),h=n(54819),m=e([r,c,l]);[r,c,l]=m.then?(await m)():m;let p,f,g,_,y,b,v=e=>e;class w extends s.WF{render(){return(0,s.qy)(p||(p=v` <ha-icon-button-arrow-prev .label="${0}" @click="${0}"></ha-icon-button-arrow-prev> <h1>ioBroker Cloud</h1> <p> ${0} </p> ${0} ${0} `),this.localize("ui.panel.page-onboarding.restore.back"),this._back,this.localize("ui.panel.page-onboarding.restore.ha-cloud.sign_in_description"),this._showResetPasswordDone?this._renderResetPasswordDone():s.s6,"login"===this._view?(0,s.qy)(f||(f=v`<cloud-login card-less .email="${0}" .localize="${0}" translation-key-panel="page-onboarding.restore.ha-cloud" @cloud-forgot-password="${0}"></cloud-login>`),this._email,this.localize,this._showForgotPassword):"loading"===this._view?(0,s.qy)(g||(g=v`<div class="loading"> <ha-spinner size="large"></ha-spinner> </div>`)):(0,s.qy)(_||(_=v`<cloud-forgot-password-card card-less .email="${0}" .localize="${0}" translation-key-panel="page-onboarding.restore.ha-cloud.forgot_password" @cloud-email-changed="${0}" @cloud-done="${0}"></cloud-forgot-password-card>`),this._email,this.localize,this._emailChanged,this._showPasswordResetDone))}_back(){"forgot-password"!==this._view?(0,u.oo)(`${location.pathname}?${(0,d.s8)("page")}`):this._view="login"}_renderResetPasswordDone(){return(0,s.qy)(y||(y=v`<ha-alert dismissable @alert-dismissed-clicked="${0}"> ${0} </ha-alert>`),this._dismissResetPasswordDoneInfo,this.localize("ui.panel.page-onboarding.restore.ha-cloud.forgot_password.check_your_email"))}async _showForgotPassword(){this._view="loading",this._cloudLoginElement&&(this._email=this._cloudLoginElement.emailField.value),await n.e(79927).then(n.bind(n,7466)),this._view="forgot-password"}_emailChanged(){var e;this._forgotPasswordElement&&(this._email=null===(e=this._forgotPasswordElement)||void 0===e?void 0:e.emailField.value)}_showPasswordResetDone(){this._view="login",this._showResetPasswordDone=!0}_dismissResetPasswordDoneInfo(){this._showResetPasswordDone=!1}static get styles(){return[h.o,(0,s.AH)(b||(b=v`h1,p{text-align:left}h2{font-size:var(--ha-font-size-2xl);display:flex;align-items:center;gap:var(--ha-space-4)}h2 img{width:48px}.loading{display:flex;justify-content:center}ha-alert{margin-bottom:8px;display:block}`))]}constructor(...e){super(...e),this._view="login",this._showResetPasswordDone=!1}}(0,o.Cg)([(0,a.MZ)({attribute:!1})],w.prototype,"localize",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],w.prototype,"backup",void 0),(0,o.Cg)([(0,a.wk)()],w.prototype,"_email",void 0),(0,o.Cg)([(0,a.wk)()],w.prototype,"_view",void 0),(0,o.Cg)([(0,a.wk)()],w.prototype,"_showResetPasswordDone",void 0),(0,o.Cg)([(0,a.P)("cloud-login")],w.prototype,"_cloudLoginElement",void 0),(0,o.Cg)([(0,a.P)("cloud-forgot-password-card")],w.prototype,"_forgotPasswordElement",void 0),w=(0,o.Cg)([(0,a.EM)("onboarding-restore-backup-cloud-login")],w),i()}catch(p){i(p)}})},20939:function(e,t,n){n.d(t,{L:function(){return o}});n(16280),n(18111),n(61701);var i=n(78649);const o=(e,t=!0)=>{if(!e||!Array.isArray(e))throw new Error("Entities need to be an array");return e.map((e,n)=>{if("object"==typeof e&&!Array.isArray(e)&&e.type)return e;let o;if("string"==typeof e)o={entity:e};else{if("object"!=typeof e||Array.isArray(e))throw new Error(`Invalid entity ID at position ${n}`);if(!("entity"in e))throw new Error(`Object at position ${n} is missing entity field`);o=e}if(t&&!(0,i.n)(o.entity))throw new Error(`Invalid entity ID at position ${n}: ${o.entity}`);return o})}},21018:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{YH:function(){return l}});n(3362),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953);var o=n(67066),s=n(34128),a=e([o]);o=(a.then?(await a)():a)[0];const r=new Set(["error","entity"]),c={"entity-filter":()=>n.e(4994).then(n.bind(n,95417)),shortcut:()=>n.e(76612).then(n.bind(n,32175)),"state-label":()=>n.e(52396).then(n.bind(n,22087)),"power-total":()=>Promise.all([n.e(92610),n.e(77183),n.e(28696)]).then(n.bind(n,12150)),"gas-total":()=>Promise.all([n.e(92610),n.e(77183),n.e(72892)]).then(n.bind(n,70346)),"water-total":()=>Promise.all([n.e(92610),n.e(77183),n.e(33194)]).then(n.bind(n,61844))},l=e=>(0,s.Ue)("badge",e,r,c,void 0,"entity");i()}catch(r){i(r)}})},8349:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{MJ:function(){return v},dY:function(){return w}});n(3362),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953);var o=n(85240),s=n(97735),a=n(40205),r=n(45309),c=n(5253),l=n(63577),u=n(17747),d=n(203),h=n(68102),m=n(81643),p=n(89969),f=n(75201),g=n(34128),_=e([o,s,a,r,c,l,u,d,h,m,p,f]);[o,s,a,r,c,l,u,d,h,m,p,f]=_.then?(await _)():_;const y=new Set(["entity","entities","button","entity-button","glance","grid","section","light","sensor","thermostat","weather-forecast","tile","heading"]),b={"alarm-panel":()=>n.e(73842).then(n.bind(n,84329)),area:()=>n.e(50235).then(n.bind(n,17366)),calendar:()=>Promise.all([n.e(79996),n.e(10147),n.e(82752),n.e(83312),n.e(5012)]).then(n.bind(n,68159)),conditional:()=>n.e(77388).then(n.bind(n,51527)),"empty-state":()=>n.e(48285).then(n.bind(n,90476)),"energy-compare":()=>Promise.all([n.e(92610),n.e(77183),n.e(73618)]).then(n.bind(n,62284)),"energy-carbon-consumed-gauge":()=>Promise.all([n.e(92610),n.e(77183),n.e(77735)]).then(n.bind(n,57545)),"energy-date-selection":()=>Promise.all([n.e(92610),n.e(80827),n.e(78928),n.e(77183),n.e(7256),n.e(79352)]).then(n.bind(n,56342)),"energy-devices-graph":()=>Promise.all([n.e(92610),n.e(37552),n.e(1872),n.e(5520),n.e(77183),n.e(19260),n.e(24404)]).then(n.bind(n,78231)),"energy-devices-detail-graph":()=>Promise.all([n.e(92610),n.e(77183),n.e(19260),n.e(24301),n.e(39565)]).then(n.bind(n,93590)),"energy-distribution":()=>Promise.all([n.e(92610),n.e(77183),n.e(46239)]).then(n.bind(n,30961)),"energy-gas-graph":()=>Promise.all([n.e(92610),n.e(77183),n.e(19260),n.e(24301),n.e(43881)]).then(n.bind(n,99389)),"energy-water-graph":()=>Promise.all([n.e(92610),n.e(77183),n.e(19260),n.e(24301),n.e(6171)]).then(n.bind(n,62743)),"energy-grid-neutrality-gauge":()=>Promise.all([n.e(92610),n.e(77183),n.e(32527)]).then(n.bind(n,80449)),"energy-grid-balance":()=>Promise.all([n.e(92610),n.e(77183),n.e(75246)]).then(n.bind(n,76331)),"energy-solar-consumed-gauge":()=>Promise.all([n.e(92610),n.e(77183),n.e(22629)]).then(n.bind(n,89979)),"energy-self-sufficiency-gauge":()=>Promise.all([n.e(92610),n.e(77183),n.e(35546)]).then(n.bind(n,48196)),"energy-solar-graph":()=>Promise.all([n.e(92610),n.e(77183),n.e(19260),n.e(24301),n.e(76285)]).then(n.bind(n,32185)),"energy-sources-table":()=>Promise.all([n.e(92610),n.e(77183),n.e(97870)]).then(n.bind(n,24408)),"energy-usage-graph":()=>Promise.all([n.e(92610),n.e(77183),n.e(19260),n.e(24301),n.e(93507)]).then(n.bind(n,14207)),"energy-sankey":()=>Promise.all([n.e(92610),n.e(37552),n.e(77072),n.e(53771),n.e(72701),n.e(88156),n.e(77183),n.e(19260),n.e(48347),n.e(58597)]).then(n.bind(n,31396)),"water-sankey":()=>Promise.all([n.e(92610),n.e(37552),n.e(77072),n.e(53771),n.e(72701),n.e(88156),n.e(77183),n.e(19260),n.e(48347),n.e(85069)]).then(n.bind(n,41436)),"water-flow-sankey":()=>Promise.all([n.e(92610),n.e(37552),n.e(77072),n.e(53771),n.e(72701),n.e(88156),n.e(77183),n.e(19260),n.e(48347),n.e(37248)]).then(n.bind(n,34499)),"power-sources-graph":()=>Promise.all([n.e(92610),n.e(37552),n.e(77072),n.e(53771),n.e(1872),n.e(9970),n.e(24060),n.e(77183),n.e(19260),n.e(24301),n.e(66471)]).then(n.bind(n,40235)),"power-sankey":()=>Promise.all([n.e(92610),n.e(37552),n.e(77072),n.e(53771),n.e(72701),n.e(88156),n.e(77183),n.e(19260),n.e(48347),n.e(67518)]).then(n.bind(n,59277)),"entity-filter":()=>n.e(99104).then(n.bind(n,6275)),error:()=>Promise.resolve().then(n.bind(n,4397)),"home-summary":()=>Promise.all([n.e(92610),n.e(77183),n.e(3650),n.e(18673)]).then(n.bind(n,51687)),shortcut:()=>n.e(73044).then(n.bind(n,30175)),"discovered-devices":()=>n.e(64522).then(n.bind(n,38865)),repairs:()=>n.e(31854).then(n.bind(n,84029)),updates:()=>n.e(8550).then(n.bind(n,71154)),gauge:()=>n.e(21727).then(n.bind(n,91874)),"history-graph":()=>Promise.all([n.e(37552),n.e(77072),n.e(53771),n.e(1872),n.e(9970),n.e(24060),n.e(19260),n.e(46866),n.e(83779)]).then(n.bind(n,41544)),"horizontal-stack":()=>n.e(175).then(n.bind(n,63218)),distribution:()=>n.e(19472).then(n.bind(n,62707)),humidifier:()=>n.e(38861).then(n.bind(n,86145)),iframe:()=>n.e(44722).then(n.bind(n,56393)),logbook:()=>Promise.all([n.e(82333),n.e(23954)]).then(n.bind(n,42526)),map:()=>Promise.all([n.e(66139),n.e(70622),n.e(12122),n.e(21742)]).then(n.bind(n,22845)),markdown:()=>n.e(44619).then(n.bind(n,67334)),clock:()=>n.e(11546).then(n.bind(n,56833)),"media-control":()=>Promise.all([n.e(87941),n.e(37136)]).then(n.bind(n,92723)),"picture-elements":()=>Promise.all([n.e(99143),n.e(66990),n.e(37848)]).then(n.bind(n,63933)),"picture-entity":()=>Promise.all([n.e(99143),n.e(48412)]).then(n.bind(n,86063)),"picture-glance":()=>Promise.all([n.e(99143),n.e(37855)]).then(n.bind(n,78602)),picture:()=>n.e(85030).then(n.bind(n,30789)),"plant-status":()=>n.e(97524).then(n.bind(n,89759)),"recovery-mode":()=>Promise.all([n.e(86269),n.e(56601)]).then(n.bind(n,93132)),"toggle-group":()=>n.e(87764).then(n.bind(n,5023)),"todo-list":()=>Promise.all([n.e(52894),n.e(31355)]).then(n.bind(n,62134)),"shopping-list":()=>Promise.all([n.e(52894),n.e(31355),n.e(89235)]).then(n.bind(n,36606)),starting:()=>n.e(31946).then(n.bind(n,88785)),"statistics-graph":()=>Promise.all([n.e(92610),n.e(77183),n.e(24301),n.e(42568)]).then(n.bind(n,3515)),statistic:()=>Promise.all([n.e(92610),n.e(77183),n.e(69315)]).then(n.bind(n,89029)),"vertical-stack":()=>n.e(55989).then(n.bind(n,33204))},v=e=>(0,g.Vd)("card",e,y,b,void 0,void 0),w=e=>(0,g.gh)(e,"card",y,b);i()}catch(y){i(y)}})},83938:function(e,t,n){n.d(t,{l:function(){return a},x:function(){return s}});n(3362),n(62953);var i=n(34128);const o={picture:()=>n.e(17813).then(n.bind(n,97588)),buttons:()=>n.e(16700).then(n.bind(n,72791)),graph:()=>n.e(33427).then(n.bind(n,67806))},s=e=>(0,i.Ue)("header-footer",e,void 0,o,void 0,void 0),a=e=>(0,i.gh)(e,"header-footer",void 0,o)},84043:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{d:function(){return m}});n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953);var o=n(98743),s=(n(16732),n(9578)),a=n(51007),r=n(37696),c=n(10792),l=n(14097),u=n(34128),d=e([o,s,a,r,c,l]);[o,s,a,r,c,l]=d.then?(await d)():d;const h=new Set(["conditional","icon","image","service-button","state-badge","state-icon","state-label"]),m=e=>("action-button"===e.type&&(e=Object.assign(Object.assign({},e),{},{type:"service-button"})),(0,u.Ue)("element",e,h));i()}catch(h){i(h)}})},33963:function(e,t,n){n.a(e,async function(e,i){try{n.d(t,{importMoreInfoControl:function(){return s.S5},showAlertDialog:function(){return o.showAlertDialog},showConfirmationDialog:function(){return o.dk},showPromptDialog:function(){return o.an}});n(48927);var o=n(65063),s=n(2928),a=n(21018),r=n(8349),c=(n(83938),n(84043)),l=n(94225),u=e([s,a,r,c,l]);[s,a,r,c,l]=u.then?(await u)():u,i()}catch(d){i(d)}})},15656:function(e,t,n){n.d(t,{Nu:function(){return c},TG:function(){return d},xC:function(){return u}});var i=n(86518),o=(n(16280),n(18111),n(61701),n(3362),n(62953),n(91984),n(53338));const s=["strategy"],a="custom:",r={dashboard:{"original-states":()=>n.e(60134).then(n.bind(n,43845)),map:()=>n.e(74994).then(n.bind(n,56009)),iframe:()=>n.e(1732).then(n.bind(n,38287)),areas:()=>Promise.all([n.e(99788),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(9209)]).then(n.bind(n,80821)),home:()=>Promise.all([n.e(99788),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(3650),n.e(86201)]).then(n.bind(n,67293)),energy:()=>Promise.all([n.e(67218),n.e(92610),n.e(7483),n.e(77183),n.e(19343)]).then(n.bind(n,94429))},view:{"original-states":()=>Promise.all([n.e(67218),n.e(92610),n.e(662),n.e(77183),n.e(94530)]).then(n.bind(n,16330)),"energy-overview":()=>Promise.all([n.e(67218),n.e(92610),n.e(7483),n.e(77183),n.e(51016)]).then(n.bind(n,3260)),energy:()=>Promise.all([n.e(67218),n.e(92610),n.e(7483),n.e(77183),n.e(20984)]).then(n.bind(n,86242)),water:()=>Promise.all([n.e(67218),n.e(92610),n.e(7483),n.e(77183),n.e(8969)]).then(n.bind(n,88615)),gas:()=>Promise.all([n.e(67218),n.e(92610),n.e(7483),n.e(77183),n.e(17423)]).then(n.bind(n,21733)),power:()=>Promise.all([n.e(67218),n.e(92610),n.e(7483),n.e(77183),n.e(17879)]).then(n.bind(n,60093)),map:()=>n.e(6875).then(n.bind(n,14966)),iframe:()=>n.e(73441).then(n.bind(n,51480)),area:()=>Promise.all([n.e(99788),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(74271)]).then(n.bind(n,44979)),"areas-overview":()=>Promise.all([n.e(99788),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(88964)]).then(n.bind(n,69140)),"home-overview":()=>Promise.all([n.e(67218),n.e(92610),n.e(99788),n.e(45193),n.e(77183),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(3650),n.e(58709)]).then(n.bind(n,8892)),"home-media-players":()=>Promise.all([n.e(99788),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(3650),n.e(59022)]).then(n.bind(n,24876)),"home-area":()=>Promise.all([n.e(99788),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(3650),n.e(50362)]).then(n.bind(n,47302)),"home-other-devices":()=>n.e(27800).then(n.bind(n,78859)),light:()=>Promise.all([n.e(99788),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(71780)]).then(n.bind(n,71776)),security:()=>Promise.all([n.e(99788),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(34442)]).then(n.bind(n,31758)),climate:()=>Promise.all([n.e(99788),n.e(59704),n.e(25322),n.e(12009),n.e(20282),n.e(98874)]).then(n.bind(n,73026)),maintenance:()=>n.e(82691).then(n.bind(n,78030))},section:{"common-controls":()=>n.e(8717).then(n.bind(n,44124))}},c=async(e,t)=>{var n;if(t in r[e]){await r[e][t]();const n=`${t}-${e}-strategy`;return customElements.get(n)}if(!t.startsWith(a))throw new Error("Unknown strategy");const i=`ll-strategy-${t.slice(7)}`,o=`ll-strategy-${e}-${t.slice(7)}`;if(!0===await Promise.race([customElements.whenDefined(i),customElements.whenDefined(o),new Promise(e=>{setTimeout(()=>e(!0),5e3)})]))throw new Error(`Timeout waiting for strategy element ${o} to be registered`);return null!==(n=customElements.get(o))&&void 0!==n?n:customElements.get(i)},l=async(e,t,n,i)=>{const s=n.type;if(!s)return t("No strategy type found");try{const t=await c(e,s);if((0,o.Xo)(t)){if("dashboard"===e&&"generateDashboard"in t)return await t.generateDashboard({config:{strategy:n,views:[]},hass:i});if("view"===e&&"generateView"in t)return await t.generateView({config:{views:[]},view:{strategy:n},hass:i})}const a=(0,o._V)(n);return await t.generate(a,i)}catch(a){return"timeout"!==a.message&&console.error(a),t(a)}},u=async(e,t)=>{const{strategy:n}=e,o=(0,i.A)(e,s),a=await l("section",e=>({cards:[{type:"markdown",content:`Error loading the section strategy:\n> ${e}`}]}),n,t);return Object.assign(Object.assign({},o),a)};async function d(e,t){const n=await c("dashboard",t),i=await async function(e,t){const n=t.getCreateSuggestions;if("function"==typeof n)return n.call(t,e)}(e,n);return{strategyClass:n,fieldSuggestions:i}}},53338:function(e,t,n){n.d(t,{Xo:function(){return i},_V:function(){return o}});const i=e=>!("generate"in e),o=e=>{if(!(e=>2===Object.keys(e).length&&"options"in e&&"object"==typeof e.options)(e))return e;const t=Object.assign(Object.assign({},e),e.options);return delete t.options,t}}}]);