UNPKG

iobroker.lovelace

Version:

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

67 lines 76.3 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[59465],{95747:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{CL:function(){return f},GH:function(){return y},ZS:function(){return v},aQ:function(){return p},r6:function(){return d},yg:function(){return b}});var r=a(74487),i=a(22786),s=a(72487),n=a(30162),l=a(8480),h=a(69543),c=e([r,l,s,n]);[r,l,s,n]=c.then?(await c)():c;const d=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,h.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,h.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),p=((0,i.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),(e,t,a)=>g(t,a.time_zone).format(e)),g=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",hour:(0,h.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,h.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),v=(e,t,a)=>m(t,a.time_zone).format(e),m=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",day:"numeric",hour:(0,h.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,h.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),f=(e,t,a)=>(new Date).getFullYear()===e.getFullYear()?v(e,t,a):p(e,t,a),b=(e,t,a)=>w(t,a.time_zone).format(e),w=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,h.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,h.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),y=(e,t,a)=>`${(0,s.zB)(e,t,a)}, ${(0,n.fU)(e,t,a)}`;o()}catch(d){o(d)}})},8480:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{wj:function(){return g}});var r,i,s,n=a(74487),l=a(29079),h=a(46927),c=e([n]);n=(c.then?(await c)():c)[0];const d=null===(r=Intl.DateTimeFormat)||void 0===r||null===(i=(s=r.call(Intl)).resolvedOptions)||void 0===i?void 0:i.call(s).timeZone,u=d&&("UTC"===d||"Etc/UTC"===d||d in l)?d:void 0,p=null!=u?u:"UTC",g=(e,t)=>e===h.Wj.local&&u?p:t;o()}catch(d){o(d)}})},69543:function(e,t,a){a.d(t,{J:function(){return i}});a(74423);var o=a(22786),r=a(46927);const i=(0,o.A)(e=>{if(e.time_format===r.Hg.language||e.time_format===r.Hg.system){const t=e.time_format===r.Hg.language?e.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(t).includes("10")}return e.time_format===r.Hg.am_pm})},93421:function(e,t,a){a.d(t,{IW:function(){return c},dH:function(){return h},fI:function(){return l}});a(44114),a(62953);var o=a(35211),r=a(22792),i=a(32172);const s=(e,t)=>{let a=e;for(const o of t){if(null==a)return;a=a[o]}return a},n=(e,t,a)=>{const r=(0,i.p)({transformer:function(e){return a.call(this,e)},watch:t?[t]:[]}),s=(0,o.Fg)({context:e,subscribe:!0});return(e,t)=>{r(e,t),s(e,t)}},l=e=>n(r.iN,e.entityIdPath[0],function(t){const a=s(this,e.entityIdPath);return"string"==typeof a?null==t?void 0:t[a]:void 0}),h=e=>n(r.X1,e.entityIdPath[0],function(t){const a=s(this,e.entityIdPath);return"string"==typeof a?null==t?void 0:t[a]:void 0}),c=()=>n(r.D5,void 0,({localize:e})=>e)},32172:function(e,t,a){a.d(t,{p:function(){return o}});a(16280),a(18111),a(7588),a(45367),a(92731),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);function o(e){return(t,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const o=String(a),r=t;if(r._transformers){if(!r.hasOwnProperty("_transformers")){const e=r._transformers;r._transformers=new Map,e.forEach((e,t)=>r._transformers.set(t,e))}}else{r._transformers=new Map,r._watching=new Map;const e=r.willUpdate;r.willUpdate=function(t){e.call(this,t);const a=new Set;t.forEach((e,t)=>{const o=this._watching.get(t);void 0!==o&&o.forEach(e=>a.add(e))}),a.forEach(e=>{this[e]=this[`__original_${String(e)}`]})}}r._transformers.set(a,e.transformer),e.watch&&e.watch.forEach(e=>{let t=r._watching.get(e);t||(t=new Set,r._watching.set(e,t)),t.add(a)});const i=Object.getOwnPropertyDescriptor(t,a);let s;if(void 0===i)s={get(){return this[`__transform_${o}`]},set(e){const t=this[`__transform_${o}`],a=this._transformers.get(o);this[`__transform_${o}`]=a?a.call(this,e):e,this[`__original_${o}`]=e,this.requestUpdate(o,t)},configurable:!0,enumerable:!0};else{const e=i.set;s=Object.assign(Object.assign({},i),{},{set(t){const a=this[`__transform_${o}`],r=this._transformers.get(o);this[`__transform_${o}`]=r?r.call(this,t):t,this[`__original_${o}`]=t,this.requestUpdate(o,a),null==e||e.call(this,t)}})}Object.defineProperty(t,a,s)}}},86198:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{T:function(){return n}});var r=a(74487),i=a(22786),s=e([r]);r=(s.then?(await s)():s)[0];const n=(e,t)=>{try{var a,o;return null!==(a=null===(o=l(t))||void 0===o?void 0:o.of(e))&&void 0!==a?a:e}catch(r){return e}},l=(0,i.A)(e=>new Intl.DisplayNames(e.language,{type:"language",fallback:"code"}));o()}catch(n){o(n)}})},31290:function(e,t,a){a.d(t,{n:function(){return o}});a(27495),a(25440);const o=e=>e.replace(/^_*(.)|_+(.)/g,(e,t,a)=>t?t.toUpperCase():" "+a.toUpperCase())},5745:function(e,t,a){var o=a(40445),r=a(99731),i=a(67576);class s extends r.Y{}s=(0,o.Cg)([(0,i.EM)("ha-chip-set")],s)},38962:function(e,t,a){a.a(e,async function(e,o){try{a.r(t);a(62953);var r=a(40445),i=a(5124),s=a(67576),n=a(6412),l=a(93421),h=a(1087),c=a(26300),d=(a(67094),e([c]));c=(d.then?(await d)():d)[0];let u,p,g,v,m=e=>e;const f="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",b={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};class w extends i.WF{render(){var e;return(0,i.qy)(u||(u=m` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,n.H)({[this.alertType]:!0}),this.title?"":"no-title",b[this.alertType],(0,n.H)({content:!0,narrow:this.narrow}),this.title?(0,i.qy)(p||(p=m`<div class="title">${0}</div>`),this.title):i.s6,this.dismissable?(0,i.qy)(g||(g=m`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(e=this._localize)||void 0===e?void 0:e.call(this,"ui.common.dismiss_alert"),f):i.s6)}_dismissClicked(){(0,h.r)(this,"alert-dismissed-clicked")}constructor(...e){super(...e),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}w.styles=(0,i.AH)(v||(v=m`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`)),(0,r.Cg)([(0,s.MZ)()],w.prototype,"title",void 0),(0,r.Cg)([(0,s.MZ)({attribute:"alert-type"})],w.prototype,"alertType",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"dismissable",void 0),(0,r.Cg)([(0,s.wk)(),(0,l.IW)()],w.prototype,"_localize",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"narrow",void 0),w=(0,r.Cg)([(0,s.EM)("ha-alert")],w),o()}catch(u){o(u)}})},76776:function(e,t,a){a(62953);var o=a(40445),r=a(5124),i=a(67576);let s,n,l,h=e=>e;class c extends r.WF{render(){return(0,r.qy)(s||(s=h` ${0} <slot></slot> `),this.header?(0,r.qy)(n||(n=h`<h1 class="card-header">${0}</h1>`),this.header):r.s6)}constructor(...e){super(...e),this.raised=!1}}c.styles=(0,r.AH)(l||(l=h`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)}
    :host
      ::slotted(
        .card-content:not(:nth-child(1 of .card-content, .card-header))
      ),
    slot:not(:first-child)::slotted(.card-content) {
      padding-top: 0;
      margin-top: calc(var(--ha-space-2) * -1);
    }
    :host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`)),(0,o.Cg)([(0,i.MZ)()],c.prototype,"header",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],c.prototype,"raised",void 0),c=(0,o.Cg)([(0,i.EM)("ha-card")],c)},9503:function(e,t,a){var o=a(40445),r=a(97577),i=a(5124),s=a(67576);let n,l=e=>e;class h extends r.A{get value(){var e;return null!==(e=this._value)&&void 0!==e?e:null}set value(e){this._value=e}static get styles(){return[r.A.styles,(0,i.AH)(n||(n=l`: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))}`))]}}h=(0,o.Cg)([(0,s.EM)("ha-checkbox")],h)},70947:function(e,t,a){a(62953);var o=a(40445),r=a(50759),i=(a(38625),a(5124)),s=a(67576);a(67094);let n,l,h=e=>e;class c extends r.A{renderCheckboxIcon(){return(0,i.qy)(n||(n=h` <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[r.A.styles,(0,i.AH)(l||(l=h`: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,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],c.prototype,"selected",void 0),c=(0,o.Cg)([(0,s.EM)("ha-dropdown-item")],c)},29823:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);var o=a(40445),r=a(52254),i=a(5124),s=a(67576),n=e([r]);r=(n.then?(await n)():n)[0];let l,h=e=>e;class c extends r.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[r.A.styles,(0,i.AH)(l||(l=h`: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,o.Cg)([(0,s.MZ)({attribute:!1})],c.prototype,"dropdownTag",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],c.prototype,"dropdownItemTag",void 0),c=(0,o.Cg)([(0,s.EM)("ha-dropdown")],c),t()}catch(l){t(l)}})},14927:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{getLanguageOptions:function(){return x}});var r=a(74487),i=(a(26910),a(18111),a(20116),a(61701),a(62953),a(40445)),s=a(5124),n=a(67576),l=a(22786),h=a(1087),c=a(86198),d=a(52220),u=a(28684),p=a(18350),g=a(38508),v=e([r,p,g,c]);[r,p,g,c]=v.then?(await v)():v;let m,f,b,w,y,_,k=e=>e;const $="M7,10L12,15L17,10H7Z",C=[{name:"primary",weight:10},{name:"secondary",weight:8},{name:"search_labels.english",weight:5}],x=(e,t,a,o)=>{let r=[];const i={language:"en"};if(t){const t=u.P.translations;r=e.map(e=>{var a;let r=null===(a=t[e])||void 0===a?void 0:a.nativeName;if(!r)try{r=new Intl.DisplayNames(e,{type:"language",fallback:"code"}).of(e)}catch(l){r=e}const s=(0,c.T)(e,o||{language:navigator.language}),n=(0,c.T)(e,i);return{id:e,primary:r,secondary:s!==r?s:void 0,search_labels:{english:n!==r?n:null}}})}else o&&(r=e.map(e=>{const t=(0,c.T)(e,o),a=(0,c.T)(e,i);return{id:e,primary:t,search_labels:{english:a!==t?a:null}}}));return!a&&o&&r.sort((e,t)=>(0,d.SH)(e.primary,t.primary,o.language)),r};class z extends s.WF{firstUpdated(e){super.firstUpdated(e),this._computeDefaultLanguageOptions()}_computeDefaultLanguageOptions(){this._defaultLanguages=Object.keys(u.P.translations)}render(){var e,t,a,o;const r=null!==(e=this.label)&&void 0!==e?e:(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.components.language-picker.language"))||"Language",i=null!==(a=this.value)&&void 0!==a?a:this.required&&!this.disabled?this._getItems()[0].id:this.value;return(0,s.qy)(m||(m=k` <ha-generic-picker .hass="${0}" .autofocus="${0}" .notFoundLabel="${0}" .emptyLabel="${0}" .label="${0}" .value="${0}" .valueRenderer="${0}" .disabled="${0}" .helper="${0}" .getItems="${0}" .searchKeys="${0}" @value-changed="${0}" hide-clear-icon> ${0} </ha-generic-picker> `),this.hass,this.autofocus,this._notFoundLabel,(null===(o=this.hass)||void 0===o?void 0:o.localize("ui.components.language-picker.no_languages"))||"No languages available",r,i,this._valueRenderer,this.disabled,this.helper,this._getItems,C,this._changed,this.buttonStyle?(0,s.qy)(f||(f=k`<ha-button slot="field" .disabled="${0}" @click="${0}" appearance="plain" variant="neutral"> ${0} <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> </ha-button>`),this.disabled,this._openPicker,this._getLanguageName(i),$):s.s6)}_openPicker(e){e.stopPropagation(),this.genericPicker.open()}_changed(e){e.stopPropagation(),this.value=e.detail.value,(0,h.r)(this,"value-changed",{value:this.value})}constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.nativeName=!1,this.buttonStyle=!1,this.noSort=!1,this._defaultLanguages=[],this._getLanguagesOptions=(0,l.A)(x),this._getItems=()=>{var e,t;return this._getLanguagesOptions(null!==(e=this.languages)&&void 0!==e?e:this._defaultLanguages,this.nativeName,this.noSort,null===(t=this.hass)||void 0===t?void 0:t.locale)},this._getLanguageName=e=>{var t;return null===(t=this._getItems().find(t=>t.id===e))||void 0===t?void 0:t.primary},this._valueRenderer=e=>{var t;return(0,s.qy)(b||(b=k`<span slot="headline">${0}</span> `),null!==(t=this._getLanguageName(e))&&void 0!==t?t:e)},this._notFoundLabel=e=>{const t=(0,s.qy)(w||(w=k`<b>‘${0}’</b>`),e);return this.hass?this.hass.localize("ui.components.language-picker.no_match",{term:t}):(0,s.qy)(y||(y=k`No languages found for ${0}`),t)}}}z.styles=(0,s.AH)(_||(_=k`ha-generic-picker{width:100%;display:block}`)),(0,i.Cg)([(0,n.MZ)()],z.prototype,"value",void 0),(0,i.Cg)([(0,n.MZ)()],z.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:Array})],z.prototype,"languages",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],z.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],z.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],z.prototype,"required",void 0),(0,i.Cg)([(0,n.MZ)()],z.prototype,"helper",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"native-name",type:Boolean})],z.prototype,"nativeName",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"button-style"})],z.prototype,"buttonStyle",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"no-sort",type:Boolean})],z.prototype,"noSort",void 0),(0,i.Cg)([(0,n.wk)()],z.prototype,"_defaultLanguages",void 0),(0,i.Cg)([(0,n.P)("ha-generic-picker",!0)],z.prototype,"genericPicker",void 0),z=(0,i.Cg)([(0,n.EM)("ha-language-picker")],z),o()}catch(m){o(m)}})},2054:function(e,t,a){a.a(e,async function(e,t){try{a(16280),a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(1087),n=a(44249),l=a(26300),h=e([l]);l=(h.then?(await h)():h)[0];let c,d,u,p=e=>e;const g="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class v extends r.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 r.s6;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,r.qy)(c||(c=p` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),g,this._toggleMenu,e?(0,r.qy)(d||(d=p`<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,a=e.has("narrow")?e.get("narrow"):this.narrow,o=!1===(null==t?void 0:t.kioskMode)&&(a||"always_hidden"===(null==t?void 0:t.dockedSidebar)),r=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&o===r||(this._show=r||this._alwaysVisible,r?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,n.V)(this.hass.connection,e=>{this._hasNotifications=e.length>0})}_toggleMenu(){(0,s.r)(this,"hass-toggle-menu")}constructor(...e){super(...e),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}v.styles=(0,r.AH)(u||(u=p`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,o.Cg)([(0,i.MZ)({type:Boolean})],v.prototype,"narrow",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,o.Cg)([(0,i.wk)()],v.prototype,"_hasNotifications",void 0),(0,o.Cg)([(0,i.wk)()],v.prototype,"_show",void 0),v=(0,o.Cg)([(0,i.EM)("ha-menu-button")],v),t()}catch(c){t(c)}})},33680:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{x:function(){return g}});a(3362),a(62953);var r=a(40445),i=a(5124),s=a(67576),n=a(97932),l=a(65063),h=a(1087),c=a(59646),d=e([c]);c=(d.then?(await d)():d)[0];let u,p=e=>e;const g="serviceWorker"in navigator&&"PushManager"in window&&("https:"===document.location.protocol||"localhost"===document.location.hostname||"127.0.0.1"===document.location.hostname);class v extends i.WF{render(){return(0,i.qy)(u||(u=p` <ha-switch .disabled="${0}" .checked="${0}" @change="${0}"></ha-switch> `),this.disabled||this._loading,this._pushChecked,this._handlePushChange)}async connectedCallback(){if(super.connectedCallback(),g)try{const e=await navigator.serviceWorker.ready;if(!e.pushManager)return;e.pushManager.getSubscription().then(e=>{this._loading=!1,this._pushChecked=!!e})}catch(e){}}_handlePushChange(e){if(!g)return;e.target.checked?this._subscribePushNotifications():this._unsubscribePushNotifications()}async _subscribePushNotifications(){const e=await navigator.serviceWorker.ready;let t;try{let o;o=navigator.userAgent.toLowerCase().indexOf("firefox")>-1?"firefox":"chrome";const r=await(0,l.an)(this,{title:this.hass.localize("ui.panel.profile.push_notifications.add_device_prompt.title"),inputLabel:this.hass.localize("ui.panel.profile.push_notifications.add_device_prompt.input_label")});if(null==r)return void(this._pushChecked=!1);let i;try{i=await(0,n.p)(this.hass)}catch(a){i=null}t=i?await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:i}):await e.pushManager.subscribe({userVisibleOnly:!0}),await this.hass.callApi("POST","notify.html5",{subscription:t,browser:o,name:r})}catch(o){const e=o.message||"Notification registration failed.";t&&await t.unsubscribe(),console.error(o),(0,h.r)(this,"hass-notification",{message:e}),this._pushChecked=!1}}async _unsubscribePushNotifications(){const e=await navigator.serviceWorker.ready;try{const t=await e.pushManager.getSubscription();if(!t)return;await this.hass.callApi("DELETE","notify.html5",{subscription:t}),await t.unsubscribe()}catch(t){const e=t.message||"Failed unsubscribing for push notifications.";console.error("Error in unsub push",t),(0,h.r)(this,"hass-notification",{message:e}),this._pushChecked=!0}}constructor(...e){super(...e),this._pushChecked="Notification"in window&&"granted"===Notification.permission,this._loading=!0}}(0,r.Cg)([(0,s.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],v.prototype,"disabled",void 0),(0,r.Cg)([(0,s.wk)()],v.prototype,"_pushChecked",void 0),(0,r.Cg)([(0,s.wk)()],v.prototype,"_loading",void 0),v=(0,r.Cg)([(0,s.EM)("ha-push-notifications-toggle")],v),o()}catch(u){o(u)}})},8034:function(e,t,a){a(27495),a(62953);var o=a(40445),r=a(92070),i=a(5124),s=a(67576);let n,l,h,c=e=>e;class d extends i.WF{render(){const e=this._hasSlotController.test("description");return(0,i.qy)(n||(n=c` <div class="prefix-wrap"> <slot name="prefix"></slot> <div class="body" part="heading" ?two-line="${0}" ?three-line="${0}"> <slot name="heading"></slot> ${0} </div> </div> <div class="content"> <slot></slot> </div> `),!this.threeLine&&e,this.threeLine,e?(0,i.qy)(l||(l=c`<span class="secondary"><slot name="description"></slot></span>`)):i.s6)}constructor(...e){super(...e),this.narrow=!1,this.slim=!1,this.threeLine=!1,this.wrapHeading=!1,this.empty=!1,this._hasSlotController=new r.X(this,"description")}}d.styles=(0,i.AH)(h||(h=c`:host{display:flex;padding:0 var(--ha-space-4);align-content:normal;align-self:auto;align-items:center}.body{padding-top:var(--settings-row-body-padding-top,var(--ha-space-2));padding-bottom:var(--settings-row-body-padding-bottom,var(--ha-space-2));padding-left:0;padding-inline-start:0;padding-right:var(--ha-space-4);padding-inline-end:var(--ha-space-4);overflow:hidden;display:var(--layout-vertical_-_display,flex);flex-direction:var(--layout-vertical_-_flex-direction,column);justify-content:var(--layout-center-justified_-_justify-content,center);flex:var(--layout-flex_-_flex,1);flex-basis:var(--layout-flex_-_flex-basis,0.000000001px)}.body[three-line]{min-height:88px}:host(:not([wrap-heading])) body>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body>.secondary{display:block;padding-top:var(--ha-space-1);font-family:var(
        --mdc-typography-body2-font-family,
        var(--mdc-typography-font-family, var(--ha-font-family-body))
      );font-size:var(--mdc-typography-body2-font-size, var(--ha-font-size-s));-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-weight:var(--mdc-typography-body2-font-weight,var(--ha-font-weight-normal));line-height:normal;color:var(--secondary-text-color)}.body[two-line]{min-height:calc(72px - 16px);flex:1}.content{display:contents}:host(:not([narrow])) .content{display:var(--settings-row-content-display,flex);justify-content:flex-end;flex:1;min-width:0;padding:var(--settings-row-content-padding-block,var(--ha-space-4)) 0}:host([empty]) .content{display:none}.content ::slotted(*){width:var(--settings-row-content-width)}:host([narrow]){align-items:normal;flex-direction:column;border-top:1px solid var(--divider-color);padding-bottom:var(--ha-space-2)}::slotted(ha-switch){padding:var(--settings-row-switch-padding-block,var(--ha-space-4)) 0}.secondary{white-space:normal}.prefix-wrap{flex:var(--settings-row-prefix-flex,1);display:var(--settings-row-prefix-display)}:host([narrow]) .prefix-wrap{display:flex;align-items:center}:host([slim]),:host([slim]) .content,:host([slim]) ::slotted(ha-switch){padding:0}:host([slim]) .body{min-height:0}`)),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"narrow",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"slim",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"three-line"})],d.prototype,"threeLine",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"wrap-heading",reflect:!0})],d.prototype,"wrapHeading",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"empty",void 0),d=(0,o.Cg)([(0,s.EM)("ha-settings-row")],d)},59646:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var o=a(40445),r=a(29344),i=a(5124),s=a(67576),n=a(88360),l=e([r]);r=(l.then?(await l)():l)[0];let h,c=e=>e;class d extends r.A{updated(e){super.updated(e),e.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[r.A.styles,(0,i.AH)(h||(h=c`: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(...e){super(...e),this.haptic=!1,this._forwardHaptic=()=>{(0,n.j)(this,"light")}}}(0,o.Cg)([(0,s.MZ)({type:Boolean})],d.prototype,"haptic",void 0),d=(0,o.Cg)([(0,s.EM)("ha-switch")],d),t()}catch(h){t(h)}})},37532:function(e,t,a){a.a(e,async function(e,t){try{a(44114),a(26910),a(18111),a(20116),a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(22786),n=a(1087),l=a(52220),h=a(38508),c=e([h]);h=(c.then?(await c)():c)[0];let d,u,p,g=e=>e;const v="default",m=[{name:"primary",weight:1}];class f extends r.WF{render(){var e,t,a,o,i;return(0,r.qy)(d||(d=g` <ha-generic-picker .label="${0}" .placeholder="${0}" .helper="${0}" .value="${0}" .valueRenderer="${0}" .getItems="${0}" .searchKeys="${0}" .disabled="${0}" .required="${0}" @value-changed="${0}"></ha-generic-picker> `),null!==(e=null!==(t=this.label)&&void 0!==t?t:null===(a=this.hass)||void 0===a?void 0:a.localize("ui.components.theme-picker.theme"))&&void 0!==e?e:"Theme",null!==(o=this.noThemeLabel)&&void 0!==o?o:null===(i=this.hass)||void 0===i?void 0:i.localize("ui.components.theme-picker.no_theme"),this.helper,this.value,this._valueRenderer,this._getItems,m,this.disabled,this.required,this._changed)}_changed(e){e.stopPropagation(),this.value=e.detail.value,(0,n.r)(this,"value-changed",{value:this.value})}constructor(...e){super(...e),this.includeDefault=!1,this.disabled=!1,this.required=!1,this._getThemeOptions=(0,s.A)((e,t,a)=>{const o=[];a&&o.push({id:v,primary:"ioBroker"});const r=Object.keys(e).sort((e,a)=>(0,l.SH)(e,a,t));for(const i of r)o.push({id:i,primary:i});return o}),this._getItems=()=>{var e,t;return this._getThemeOptions((null===(e=this.hass)||void 0===e?void 0:e.themes.themes)||{},(null===(t=this.hass)||void 0===t?void 0:t.locale.language)||"en",this.includeDefault)},this._valueRenderer=e=>{var t,a;return(0,r.qy)(u||(u=g`<span slot="headline">${0}</span>`),null!==(t=null===(a=this._getItems().find(t=>t.id===e))||void 0===a?void 0:a.primary)&&void 0!==t?t:e)}}}f.styles=(0,r.AH)(p||(p=g`ha-generic-picker{width:100%;display:block}`)),(0,o.Cg)([(0,i.MZ)()],f.prototype,"value",void 0),(0,o.Cg)([(0,i.MZ)()],f.prototype,"label",void 0),(0,o.Cg)([(0,i.MZ)()],f.prototype,"helper",void 0),(0,o.Cg)([(0,i.MZ)({attribute:"include-default",type:Boolean})],f.prototype,"includeDefault",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],f.prototype,"required",void 0),(0,o.Cg)([(0,i.MZ)({attribute:"no-theme-label"})],f.prototype,"noThemeLabel",void 0),f=(0,o.Cg)([(0,i.EM)("ha-theme-picker")],f),t()}catch(d){t(d)}})},36866:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(91485),n=e([s]);s=(n.then?(await n)():n)[0];let l,h,c=e=>e;const d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";class u extends s.U{willUpdate(e){var t,a;(super.willUpdate(e),this.label||this.placeholder||this.hasUpdated&&!e.has("_i18n"))||(this.placeholder=(null===(t=this.i18n)||void 0===t||null===(a=t.localize)||void 0===a?void 0:a.call(t,"ui.common.search"))||"Search")}renderStartDefault(){return(0,r.qy)(l||(l=c`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),d)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}u.styles=[...s.U.styles,(0,r.AH)(h||(h=c`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],u=(0,o.Cg)([(0,i.EM)("ha-input-search")],u),t()}catch(l){t(l)}})},64013:function(e,t,a){var o=a(40445),r=a(97086),i=a(5124),s=a(67576);let n,l=e=>e;class h extends r.A{static get styles(){return[r.A.styles,(0,i.AH)(n||(n=l`:host{--wa-form-control-required-content:var(
            --ha-radio-group-required-marker,
            var(--ha-input-required-marker, "*")
          );--wa-form-control-required-content-offset:var(
            --ha-radio-group-required-marker-offset,
            0.1rem
          )}`))]}constructor(){super(),this.radioTag="ha-radio-option"}}h=(0,o.Cg)([(0,s.EM)("ha-radio-group")],h)},92677:function(e,t,a){var o=a(40445),r=a(17010),i=a(5124),s=a(67576);let n,l=e=>e;class h extends r.A{static get styles(){return[r.A.styles,(0,i.AH)(n||(n=l`:host{--wa-form-control-activated-color:var(
            --ha-radio-option-active-color,
            var(--ha-color-fill-primary-loud-resting)
          );--wa-form-control-height:var(--ha-radio-option-height, 40px);--wa-form-control-toggle-size:var(
            --ha-radio-option-toggle-size,
            20px
          );--wa-form-control-border-width:var(
            --ha-radio-option-border-width,
            var(--ha-border-width-md)
          );--wa-form-control-border-color:var(
            --ha-radio-option-border-color,
            var(--ha-color-border-neutral-normal)
          );--wa-form-control-background-color:var(
            --ha-radio-option-background-color,
            var(--wa-form-control-background-color)
          );--checked-icon-color:var(
            --ha-radio-option-checked-icon-color,
            var(--wa-form-control-activated-color)
          );--checked-icon-scale:var(--ha-radio-option-checked-icon-scale, 0.7)}:host([appearance=default]) .control{margin:var(--ha-radio-option-control-margin,var(--ha-space-3) var(--ha-space-2) var(--ha-space-3) var(--ha-space-3))}:host(:not([aria-checked=true],[aria-disabled=true]):hover) .control{border-color:var(--ha-radio-option-border-color-hover,var(--ha-radio-option-border-color,var(--ha-color-border-neutral-loud)));background-color:var(--ha-radio-option-background-color-hover,var(--ha-color-fill-neutral-quiet-hover))}:host([aria-checked=true]) .control{background-color:var(--ha-radio-option-checked-background-color,var(--ha-color-fill-primary-normal-resting));color:var(--checked-icon-color);border-color:var(--checked-icon-color)}[part~=label]{display:inline-flex;align-items:center;cursor:pointer}:host([disabled]) [part~=label]{cursor:not-allowed}`))]}}h=(0,o.Cg)([(0,s.EM)("ha-radio-option")],h)},28918:function(e,t,a){a.d(t,{H:function(){return r},o:function(){return o}});function o(e){return"boolean"==typeof e?e?{}:void 0:e}function r(e){return"strategy"in e}},91984:function(e,t,a){a.d(t,{R6:function(){return r},TQ:function(){return i},cg:function(){return s}});var o=a(31290);function r(e){return"strategy"in e}const i=(e,t)=>{var a;return null!==(a=e.title)&&void 0!==a?a:e.path?(0,o.n)(e.path):String(t)},s=e=>{var t;return null!==(t=e.icon)&&void 0!==t?t:"mdi:view-compact"}},97932:function(e,t,a){a.d(t,{p:function(){return o}});a(54743),a(11745),a(16573),a(78100),a(77936),a(3362),a(27495),a(25440),a(21489),a(48140),a(75044),a(21903),a(91134),a(28845),a(373),a(37467),a(44732),a(79577),a(16632),a(34226),a(9486),a(20456),a(55815),a(64979),a(79739);const o=async e=>{const t=await e.callWS({type:"notify/html5/appkey"});return t?function(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),a=window.atob(t),o=new Uint8Array(a.length);for(let r=0;r<a.length;++r)o[r]=a.charCodeAt(r);return o}(t):null}},68370:function(e,t,a){a.r(t),a.d(t,{lovelaceResourcesTabs:function(){return l},lovelaceTabs:function(){return n}});a(3362),a(62953);var o=a(40445),r=a(67576),i=a(324);const s="M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z",n=[{path:"/config/lovelace/dashboards",translationKey:"ui.panel.config.lovelace.dashboards.caption",iconPath:s}],l=[{path:"/config/lovelace/resources",translationKey:"ui.panel.config.lovelace.resources.caption",iconPath:s}];class h extends i.a{updatePageEl(e){e.hass=this.hass,e.narrow=this.narrow,e.isWide=this.isWide,e.route=this.routeTail}constructor(...e){super(...e),this.narrow=!1,this.isWide=!1,this.routerOptions={defaultPage:"dashboards",routes:{dashboards:{tag:"ha-config-lovelace-dashboards",load:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(34995),a.e(83113),a.e(62574),a.e(19112),a.e(30002),a.e(89747),a.e(16876)]).then(a.bind(a,49406)),cache:!0},resources:{tag:"ha-config-lovelace-resources",load:()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(46095),a.e(7305),a.e(34995),a.e(83113),a.e(57908),a.e(62574),a.e(19112),a.e(30002),a.e(16499)]).then(a.bind(a,89192))}}}}}(0,o.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],h.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"is-wide",type:Boolean})],h.prototype,"isWide",void 0),h=(0,o.Cg)([(0,r.EM)("ha-config-lovelace")],h)},15656:function(e,t,a){a.d(t,{Nu:function(){return p},TG:function(){return w},Xd:function(){return m},d4:function(){return b},uN:function(){return v},xC:function(){return f}});var o=a(86518),r=(a(16280),a(18111),a(61701),a(3362),a(62953),a(28918)),i=a(35952),s=a(91984),n=a(53338);const l=["strategy"],h=["strategy"],c=["strategy"],d="custom:",u={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(9209)]).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(86201)]).then(a.bind(a,67293)),energy:()=>Promise.all([a.e(67218),a.e(92610),a.e(7483),a.e(77183),a.e(19343)]).then(a.bind(a,94429))},view:{"original-states":()=>Promise.all([a.e(67218),a.e(92610),a.e(662),a.e(77183),a.e(94530)]).then(a.bind(a,16330)),"energy-overview":()=>Promise.all([a.e(67218),a.e(92610),a.e(7483),a.e(77183),a.e(51016)]).then(a.bind(a,3260)),energy:()=>Promise.all([a.e(67218),a.e(92610),a.e(7483),a.e(77183),a.e(20984)]).then(a.bind(a,86242)),water:()=>Promise.all([a.e(67218),a.e(92610),a.e(7483),a.e(77183),a.e(8969)]).then(a.bind(a,88615)),gas:()=>Promise.all([a.e(67218),a.e(92610),a.e(7483),a.e(77183),a.e(17423)]).then(a.bind(a,21733)),power:()=>Promise.all([a.e(67218),a.e(92610),a.e(7483),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(74271)]).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(88964)]).then(a.bind(a,69140)),"home-overview":()=>Promise.all([a.e(67218),a.e(92610),a.e(99788),a.e(45193),a.e(77183),a.e(59704),a.e(25322),a.e(12009),a.e(20282),a.e(3650),a.e(58709)]).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(59022)]).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(50362)]).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(71780)]).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(34442)]).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(98874)]).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))}},p=async(e,t)=>{var a;if(t in u[e]){await u[e][t]();const a=`${t}-${e}-strategy`;return customElements.get(a)}if(!t.startsWith(d))throw new Error("Unknown strategy");const o=`ll-strategy-${t.slice(7)}`,r=`ll-strategy-${e}-${t.slice(7)}`;if(!0===await Promise.race([customElements.whenDefined(o),customElements.whenDefined(r),new Promise(e=>{setTimeout(()=>e(!0),5e3)})]))throw new Error(`Timeout waiting for strategy element ${r} to be registered`);return null!==(a=customElements.get(r))&&void 0!==a?a:customElements.get(o)},g=async(e,t,a,o)=>{const r=a.type;if(!r)return t("No strategy type found");try{const t=await p(e,r);if((0,n.Xo)(t)){if("dashboard"===e&&"generateDashboard"in t)return await t.generateDashboard({config:{strategy:a,views:[]},hass:o});if("view"===e&&"generateView"in t)return await t.generateView({config:{views:[]},view:{strategy:a},hass:o})}const i=(0,n._V)(a);return await t.generate(i,o)}catch(i){return"timeout"!==i.message&&console.error(i),t(i)}},v=async(e,t)=>{const{strategy:a}=e,r=(0,o.A)(e,l),i=await g("dashboard",e=>({views:[{title:"Error",cards:[{type:"markdown",content:`Error loading the dashboard strategy:\n> ${e}`}]}]}),a,t);return Object.assign(Object.assign({},r),i)},m=async(e,t)=>{const{strategy:a}=e,r=(0,o.A)(e,h),i=await g("view",e=>({cards:[{type:"markdown",content:`Error loading the view strategy:\n> ${e}`}]}),a,t);return Object.assign(Object.assign({},r),i)},f=async(e,t)=>{const{strategy:a}=e,r=(0,o.A)(e,c),i=await g("section",e=>({cards:[{type:"markdown",content:`Error loading the section strategy:\n> ${e}`}]}),a,t);return Object.assign(Object.assign({},r),i)},b=async(e,t)=>{const a=(0,i.Wu)(e)?await v(e,t):Object.assign({},e);return a.views=await Promise.all(a.views.map(async e=>{const a=(0,s.R6)(e)?await m(e,t):Object.assign({},e);return a.sections&&(a.sections=await Promise.all(a.sections.map(async e=>(0,r.H)(e)?await f(e,t):Object.assign({},e)))),a})),a};async function w(e,t){const a=await p("dashboard",t),o=await async function(e,t){const a=t.getCreateSuggestions;if("function"==typeof a)return a.call(t,e)}(e,a);return{strategyClass:a,fieldSuggestions:o}}},53338:function(e,t,a){a.d(t,{B2:function(){return r},Xo:function(){return o},_V:function(){return i}});const o=e=>!("generate"in e),r=e=>2===Object.keys(e).length&&"options"in e&&"object"==typeof e.options,i=e=>{if(!r(e))return e;const t=Object.assign(Object.assign({},e),e.options);return delete t.options,t}},89483:function(e,t,a){a.a(e,async function(e,t){try{a(3362);var o=a(40445),r=a(5124),i=a(67576),s=a(1087),n=a(59646),l=(a(83892),e([n]));n=(l.then?(await l)():l)[0];let h,c=e=>e;class d extends r.WF{render(){return(0,r.qy)(h||(h=c` <ha-row-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" .checked="${0}" @change="${0}"></ha-switch> </ha-row-item> `),this.hass.localize("ui.panel.profile.enable_shortcuts.header"),this.hass.localize("ui.panel.profile.enable_shortcuts.description"),this.hass.enableShortcuts,this._checkedChanged)}async _checkedChanged(e){const t=e.target.checked;t!==this.hass.enableShortcuts&&(0,s.r)(this,"hass-enable-shortcuts",t)}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"hass",void 0),d=(0,o.Cg)([(0,i.EM)("ha-enable-shortcuts-row")],d),t()}catch(h){t(h)}})},50366:function(e,t,a){a.a(e,async function(e,t){try{a(3362);var o=a(40445),r=a(5124),i=a(67576),s=a(38962),n=(a(76776),a(59646)),l=(a(83892),a(48250)),h=e([s,n]);[s,n]=h.then?(await h)():h;let c,d,u,p=e=>e;class g extends r.WF{render(){return(0,r.qy)(c||(c=p`${0} <ha-row-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" haptic .checked="${0}" .disabled="${0}" @change="${0}"></ha-switch> </ha-row-item>`),this._error?(0,r.qy)(d||(d=p`<ha-alert alert-type="error">${0}</ha-alert>`),this._error):r.s6,this.hass.localize("ui.panel.profile.entity_id_picker.title"),this.hass.localize("ui.panel.profile.entity_id_picker.description"),!!this.coreUserData&&!!this.coreUserData.showEntityIdPicker,void 0===this.coreUserData,this._toggled)}async _toggled(e){try{(0,l.Bp)(this.hass.connection,"core",Object.assign(Object.assign({},this.coreUserData),{},{showEntityIdPicker:e.currentTarget.checked}))}catch(t){this._error=t.message||t}}}g.styles=(0,r.AH)(u||(u=p`a{color:var(--primary-color)}ha-alert{margin:0 16px;display:block}`)),(0,o.Cg)([(0,i.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],g.prototype,"coreUserData",void 0),(0,o.Cg)([(0,i.wk)()],g.prototype,"_error",void 0),g=(0,o.Cg)([(0,i.EM)("ha-entity-id-picker-row")],g),t()}catch(c){t(c)}})},35839:function(e,t,a){a.a(e,async function(e,t){try{a(3362);var o=a(40445),r=a(5124),i=a(67576),s=a(1087),n=a(59646),l=(a(83892),e([n]));n=(l.then?(await l)():l)[0];let h,c=e=>e;class d extends r.WF{render(){return(0,r.qy)(h||(h=c` <ha-row-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" .checked="${0}" @change="${0}"></ha-switch> </ha-row-item> `),this.hass.localize("ui.panel.profile.force_narrow.header"),this.hass.localize("ui.panel.profile.force_narrow.description"),"always_hidden"===this.hass.dockedSidebar,this._checkedChanged)}async _checkedChanged(e){const t=e.target.checked;t!==("always_hidden"===this.hass.dockedSidebar)&&(0,s.r)(this,"hass-dock-sidebar",{dock:t?"always_hidden":"auto"})}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"hass",void 0),d=(0,o.Cg)([(0,i.EM)("ha-force-narrow-row")],d),t()}catch(h){t(h)}})},1354:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(20116),a(61701),a(3362),a(62953);var o=a(40445),r=(a(68825),a(5124)),i=a(67576),s=a(22786),n=(a(70947),a(47680),a(606)),l=(a(8034),a(65829)),h=(a(67094),a(48250)),c=a(71730),d=a(99774),u=a(49406),p=e([n,l,u]);[n,l,u]=p.then?(await p)():p;let g,v,m,f,b,w,y,_=e=>e;const k="___use_system___";class $ extends r.WF{firstUpdated(e){super.firstUpdated(e),this._getDashboards()}render(){var e;const t=(null===(e=this.hass.userData)||void 0===e?void 0:e.default_panel)||k;return(0,r.qy)(g||(g=_` <ha-settings-row .narrow="${0}"> <span slot="heading"> ${0} </span> <span slot="description"> ${0} </span> ${0} </ha-settings-row> `),this.narrow,this.hass.localize("ui.panel.profile.dashboard.header"),this.hass.localize("ui.panel.profile.dashboard.description"),this._dashboards?(0,r.qy)(v||(v=_` <ha-select .label="${0}" .value="${0}" @selected="${0}"> <ha-dropdown-item .value="${0}" .selected="${0}"> ${0} </ha-dropdown-item> <wa-divider></wa-divider> ${0} ${0} </ha-select> `),this.hass.localize("ui.panel.profile.dashboard.dropdown_label"),this._valueLabel(t),this._dashboardChanged,k,t===k,this.hass.localize("ui.panel.profile.dashboard.system"),u.PANEL_DASHBOARDS.map(e=>{const a=this.hass.panels[e];return a?(0,r.qy)(m||(m=_` <ha-dropdown-item value="${0}" .selected="${0}"> <ha-icon slot="icon" .icon="${0}"></ha-icon> ${0} </ha-dropdown-item> `),a.url_path,t===a.url_path,(0,d.Q)(a),(0,d.hL)(this.hass,a)):r.s6}),this._dashboards.length?(0,r.qy)(f||(f=_` <wa-divider></wa-divider> ${0} `),this._dashboards.map(e=>!this.hass.user.is_admin&&e.require_admin?"":(0,r.qy)(b||(b=_` <ha-dropdown-item .value="${0}" .selected="${0}"> <ha-icon slot="icon" .icon="${0}"></ha-icon> ${0} </ha-dropdown-item> `),e.url_path,t===e.url_path,e.icon||"mdi:view-dashboard",e.title))):r.s6):(0,r.qy)(w||(w=_`<div class="loading"> <ha-spinner size="small"></ha-spinner> </div>`)))}async _getDashboards(){this._dashboards=await(0,c.SJ)(this.hass)}_dashboardChanged(e){var t;const a=e.detail.value;if(!a)return;const o=a===k?void 0:a;o!==(null===(t=this.hass.userData)||void 0===t?void 0:t.default_panel)&&(0,h.Bp)(this.hass.connection,"core",Object.assign(Object.assign({},this.hass.userData),{},{default_panel:o}))}static get styles(){return[(0,r.AH)(y||(y=_`.loading{display:flex;justify-content:center;align-items:center;height:56px;width:200px}ha-select{display:block;width:100%}`))]}constructor(...e){super(...e),this.narrow=!1,this._valueLabel=(0,s.A)(e=>{var t;if(e===k)return this.hass.localize("ui.panel.profile.dashboard.system");if("lovelace"===e)return this.hass.localize("ui.panel.profile.dashboard.lovelace");const a=this.hass.panels[e];if(a)return(0,d.hL)(this.hass,a);const o=null===(t=this._dashboards)||void 0===t?void 0:t.find(t=>t.url_path===e);return o?o.title:e})}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],$.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],$.prototype,"narrow",void 0),(0,o.Cg)([(0,i.wk)()],$.prototype,"_dashboards",void 0),$=(0,o.Cg)([(0,i.EM)("ha-pick-dashboard-row")],$),t()}catch(g){t(g)}})},35342:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(61701),a(3362),a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(72487),n=a(1087),l=(a(76776),a(606)),h=(a(8034),a(46927)),c=e([l,s]);[l,s]=c.then?(await c)():c;let d,u,p=e=>e;class g extends r.WF{render(){const e=new Date;return(0,r.qy)(d||(d=p` <ha-settings-row .narrow="${0}"> <span slot="heading"> ${0} </span> <span slot="description"> ${0} </span> <ha-select .label="${0}" .disabled="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> </ha-settings-row> `),this.narrow,this.hass.localize("ui.panel.profile.date_format.header"),this.hass.localize("ui.panel.profile.date_format.description"),this.hass.localize("ui.panel.profile.date_format.dropdown_label"),void 0===this.hass.locale,this.hass.locale.date_format,this._handleFormatSelection,Object.values(h.ow).map(t=>({value:t.toString(),label:this.hass.localize(`ui.panel.profile.date_format.formats.${t}`),secondary:(0,s.zB)(e,Object.assign(Object.assign({},this.hass.locale),{},{date_format:t}),this.hass.config)})))}async _handleFormatSelection(e){(0,n.r)(this,"hass-date-format-select",e.detail.value)}constructor(...e){super(...e),this.narrow=!1}}g.styles=(0,r.AH)(u||(u=p`ha-select{display:block;width:100%}`)),(0,o.Cg)([(0,i.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],g.prototype,"narrow",void 0),g=(0,o.Cg)([(0,i.EM)("ha-pick-date-format-row")],g),t()}catch(d){t(d)}})},94655:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(380),n=a(1087),l=a(606),h=(a(8034),a(46927)),c=e([l,s]);[l,s]=c.then?(await c)():c;let d,u,p=e=>e;class g extends r.WF{render(){return(0,r.qy)(d||(d=p` <ha-settings-row .narrow="${0}"> <span slot="heading"> ${0} </span> <span slot="description"> ${0} </span> <ha-select .label="${0}" .disabled="${0}" .value="${0}" @selected="${0}" .options="${0}"></ha-select> </ha-settings-row> `),this.narrow,this.hass.localize("ui.panel.profile.first_weekday.header"),this.hass.localize("ui.panel.profile.first_weekday.description"),this.hass.localize("ui.panel.profile.first_weekday.dropdown_label"),void 0===this.hass.locale,this.hass.locale.first_weekday,this._handleFormatSelection,[h.zt.language,h.zt.monday,h.zt.saturday,h.zt.sunday].map(e=>({value:e.toString(),label:this.hass.localize(`ui.panel.profile.first_weekday.values.${e}`),secondary:e===h.zt.language?this.hass.localize(`ui.panel.profile.first_weekday.values.${(0,s.D)(this.hass.locale)}`):void 0})))}async _handleFormatSelection(e){(0,n.r)(this,"hass-first-weekday-select",e.detail.value)}constructor(...e){super(...e),this.narrow=!1}}g.styles=(0,r.AH)(u||(u=p`ha-select{display:block;width:100%}`)),(0,o.Cg)([(0,i.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],g.prototype,"narrow",void 0),g=(0,o.Cg)([(0,i.EM)("ha-pick-first-weekday-row")],g),t()}catch(d){t(d)}})},16831:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(1087),n=a(14927),l=(a(8034),e([n]));n=(l.then?(await l)():l)[0];let h,c,d=e=>e;class u extends r.WF{render(){return(0,r.qy)(h||(h=d` <ha-settings-row .narrow="${0}"> <span slot="heading">${0}</span> <span slot="description"> <a href="https://developers.home-assistant.io/docs/translations/" target="_blank" rel="noreferrer">${0}</a> </span> <ha-language-picker .hass="${0}" native-name .label="${0}" .value="${0}" @value-changed="${0}" naturalMenuWidth> </ha-language-picker> </ha-settings-row> `),this.narrow,this.hass.localize("ui.panel.profile.language.header"),this.hass.localize("ui.panel.profile.language.link_promo"),this.hass,this.hass.localize("ui.panel.profile.language.dropdown_label"),this.hass.locale.language,this._languageSelectionChanged)}_languageSelectionChanged(e){e.detail.value!==this.hass.language&&(0,s.r)(this,"hass-language-select",e.detail.value)}constructor(...e){super(...e),this.narrow=!1}}u.styles=(0,r.AH)(c||(c=d`a{color:var(--primary-color)}ha-language-picker{width:100%}`)),(0,o.Cg)([(0,i.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],u.prototype,"narrow",void 0),u=(0,o.Cg)([(0,i.EM)("ha-pick-language-row")],u),t()}catch(h){t(h)}})},99229:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(61701),a(3362),a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(1087),n=a(20058),l=(a(76776),a(606)),h=(a(8034),a(46927)),c=e([l,n]);[l,n]=c.then?(await c)():c;let d,u,p=e=>e;class g extends r.WF{render(){return(0,r.qy)(d||(d=p` <ha-settings-row .narrow="${0}"> <span slot="heading"> ${0} </span> <span slot="description"> ${0} </span> <ha-select .label="${0}" .disabled="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> </ha-settings-row> `),this.narrow,this.hass.localize("ui.panel.profile.number_format.header"),this.hass.localize("ui.panel.profile.number_format.description"),this.hass.localize("ui.panel.profile.number_format.dropdown_label"),void 0===this.hass.locale,this.hass.locale.number_format,this._handleFormatSelection,Object.values(h.jG).map(e=>{const t=this.hass.localize(`ui.panel.profile.number_format.formats.${e}`);return{value:e,label:t,secondary:"89"!==t.slice(t.length-2)?(0,n.ZV)(1234567.89,Object.assign(Object.assign({},this.hass.locale),{},{number_format:e})):void 0}}))}async _handleFormatSelection(e){(0,s.r)(this,"hass-number-format-select",e.detail.value)}constructor(...e){super(...e),this.narrow=!1}}g.styles=(0,r.AH)(u||(u=p`ha-select{display:block;width:100%}`)),(0,o.Cg)([(0,i.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],g.prototype,"narrow",void 0),g=(0,o.Cg)([(0,i.EM)("ha-pick-number-format-row")],g),t()}catch(d){t(d)}})},11775:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(42002),n=a(1087),l=a(18350),h=(a(8034),a(37532)),c=a(91485),d=(a(64013),a(92677),a(33009)),u=a(54706),p=a(25806),g=a(36918),v=a(48183),m=e([l,h,c]);[l,h,c]=m.then?(await m)():m;let f,b,w,y,_,k,$=e=>e;const C="default";class x extends((0,u.E)(r.WF)){hassSubscribe(){return[(0,d.s)(this.hass,({value:e})=>{this._userTheme=e}).catch(()=>(this._userTheme=void 0,()=>{}))]}render(){var e,t,a,o;const i=this.hass.themes.themes&&Object.keys(this.hass.themes.themes).length,s=""===(null===(e=this.hass.selectedTheme)||void 0===e?void 0:e.theme),n=null!==(t=this.hass.selectedTheme)&&void 0!==t&&t.theme?null===(a=this.hass.selectedTheme)||void 0===a?void 0:a.theme:this.hass.themes.darkMode&&this.hass.themes.default_dark_theme||this.hass.themes.default_theme,l=this.hass.selectedTheme,h=this._getLocalTheme(),c=void 0!==this._userTheme&&null===this._userTheme&&null!==h;return(0,r.qy)(f||(f=$` <ha-settings-row .narrow="${0}"> <span slot="heading">${0}</span> <span slot="description"> ${0} <a href="${0}" target="_blank" rel="noreferrer"> ${0} </a> </span> <ha-theme-picker .hass="${0}" .label="${0}" .noThemeLabel="${0}" .value="${0}" .disabled="${0}" include-default @value-changed="${0}"></ha-theme-picker> </ha-settings-row> ${0} ${0} `),this.narrow,this.hass.localize("ui.panel.profile.themes.header"),i?"":this.hass.localize("ui.panel.profile.themes.error_no_theme"),(0,g.o)(this.hass,"/integrations/frontend/#defining-themes"),this.hass.localize("ui.panel.profile.themes.link_promo"),this.hass,this.hass.localize("ui.panel.profile.themes.dropdown_label"),this.hass.localize("ui.panel.profile.themes.use_default"),(null===(o=this.hass.selectedTheme)||void 0===o?void 0:o.theme)||void 0,!i,this._handleThemeSelection,n===C||s&&this.hass.themes.default_dark_theme&&this.hass.themes.default_theme||this._supportsModeSelection(n)?(0,r.qy)(b||(b=$`<div class="inputs"> <ha-radio-group @change="${0}" name="dark_mode" .ariaLabel="${0}" .value="${0}" orientation="horizontal"> <ha-radio-option value="auto"> ${0} </ha-radio-option> <ha-radio-option value="light"> ${0} </ha-radio-option> <ha-radio-option value="dark"> ${0} </ha-radio-option> </ha-radio-group> ${0} </div>`),this._handleDarkMode,this.hass.localize("ui.panel.profile.themes.theme_mode"),void 0===(null==l?void 0:l.dark)?"auto":l.dark?"dark":"light",this.hass.localize("ui.panel.profile.themes.dark_mode.auto"),this.hass.localize("ui.panel.profile.themes.dark_mode.light"),this.hass.localize("ui.panel.profile.themes.dark_mode.dark"),n===C?(0,r.qy)(w||(w=$`<div class="color-pickers"> <ha-input .value="${0}" type="color" .label="${0}" .name="${0}" @change="${0}"></ha-input> <ha-input .value="${0}" type="color" .label="${0}" .name="${0}" @change="${0}"></ha-input> ${0} </div>`),(null==l?void 0:l.primaryColor)||p.BN,this.hass.localize("ui.panel.profile.themes.primary_color"),"primaryColor",this._handleColorChange,(null==l?void 0:l.accentColor)||p.z2,this.hass.localize("ui.panel.profile.themes.accent_color"),"accentColor",this._handleColorChange,null!=l&&l.primaryColor||null!=l&&l.accentColor?(0,r.qy)(y||(y=$` <ha-button appearance="plain" size="small" @click="${0}"> ${0} </ha-button>`),this._resetColors,this.hass.localize("ui.panel.profile.themes.reset")):""):""):"",c?(0,r.qy)(_||(_=$` <ha-settings-row .narrow="${0}"> <span slot="heading"> ${0} </span> <span slot="description"> ${0} </span> <ha-button appearance="plain" size="small" .disabled="${0}" @click="${0}"> ${0} </ha-button> </ha-settings-row> `),this.narrow,this.hass.localize("ui.panel.profile.themes.migrate_header"),this.hass.localize("ui.panel.profile.themes.migrate_description"),this._migrating,this._migrateThemePreferences,this.hass.localize("ui.panel.profile.themes.migrate_button")):"")}_handleColorChange(e){const t=e.target;"primaryColor"===t.name&&(t.value=(0,s.C)(t.value)),(0,n.r)(this,"settheme",{[t.name]:t.value})}_resetColors(){(0,n.r)(this,"settheme",{primaryColor:void 0,accentColor:void 0})}_supportsModeSelection(e){const t=this.hass.themes.themes[e];return!!t&&!!(t.modes&&"light"in t.modes&&"dark"in t.modes)}_handleDarkMode(e){let t;switch(e.currentTarget.value){case"light":t=!1;break;case"dark":t=!0}(0,n.r)(this,"settheme",{dark:t})}_handleThemeSelection(e){var t;e.stopPropagation();const a=e.detail.value;var o;void 0!==a?a!==(null===(t=this.hass.selectedTheme)||void 0===t?void 0:t.theme)&&(0,n.r)(this,"settheme",{theme:a,primaryColor:void 0,accentColor:void 0}):null!==(o=this.hass.selectedTheme)&&void 0!==o&&o.theme&&(0,n.r)(this,"settheme",{theme:"",primaryColor:void 0,accentColor:void 0})}_getLocalTheme(){var e;return null!==(e=this.hass.selectedTheme)&&void 0!==e?e:null}async _migrateThemePreferences(){const e=this._getLocalTheme();if(e){this._migrating=!0;try{await(0,d.j)(this.hass,e),(0,v.N_)(),(0,n.r)(this,"hass-notification",{message:this.hass.localize("ui.panel.profile.themes.migrate_success")})}catch(t){(0,n.r)(this,"hass-notification",{message:this.hass.localize("ui.panel.profile.themes.migrate_failed")})}finally{this._migrating=!1}}}constructor(...e){super(...e),this.narrow=!1,this._migrating=!1}}x.styles=(0,r.AH)(k||(k=$`a{color:var(--primary-color)}.inputs{display:flex;flex-wrap:wrap;justify-content:space-between;margin:0 12px}ha-radio-group{display:flex;justify-content:center;margin-inline-end:var(--ha-space-3)}.color-pickers{display:flex;justify-content:flex-end;align-items:center;flex-grow:1}ha-input{min-width:75px;flex-grow:1;margin:0 4px}ha-theme-picker{display:block;width:100%}`)),(0,o.Cg)([(0,i.MZ)({attribute:!1})],x.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],x.prototype,"narrow",void 0),(0,o.Cg)([(0,i.wk)()],x.prototype,"_userTheme",void 0),(0,o.Cg)([(0,i.wk)()],x.prototype,"_migrating",void 0),x=(0,o.Cg)([(0,i.EM)("ha-pick-theme-row")],x),t()}catch(f){t(f)}})},3001:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(61701),a(3362),a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(30162),n=a(1087),l=(a(76776),a(606)),h=(a(8034),a(46927)),c=e([l,s]);[l,s]=c.then?(await c)():c;let d,u,p=e=>e;class g extends r.WF{render(){const e=new Date;return(0,r.qy)(d||(d=p` <ha-settings-row .narrow="${0}"> <span slot="heading"> ${0} </span> <span slot="description"> ${0} </span> <ha-select .label="${0}" .disabled="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> </ha-settings-row> `),this.narrow,this.hass.localize("ui.panel.profile.time_format.header"),this.hass.localize("ui.panel.profile.time_format.description"),this.hass.localize("ui.panel.profile.time_format.dropdown_label"),void 0===this.hass.locale,this.hass.locale.time_format,this._handleFormatSelection,Object.values(h.Hg).map(t=>({value:t.toString(),label:this.hass.localize(`ui.panel.profile.time_format.formats.${t}`),secondary:(0,s.fU)(e,Object.assign(Object.assign({},this.hass.locale),{},{time_format:t}),this.hass.config)})))}async _handleFormatSelection(e){(0,n.r)(this,"hass-time-format-select",e.detail.value)}constructor(...e){super(...e),this.narrow=!1}}g.styles=(0,r.AH)(u||(u=p`ha-select{display:block;width:100%}`)),(0,o.Cg)([(0,i.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],g.prototype,"narrow",void 0),g=(0,o.Cg)([(0,i.EM)("ha-pick-time-format-row")],g),t()}catch(d){t(d)}})},81115:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(61701),a(3362),a(27495),a(25440),a(62953);var o=a(40445),r=a(5124),i=a(67576),s=a(95747),n=a(8480),l=a(1087),h=(a(76776),a(606)),c=(a(8034),a(46927)),d=e([h,n,s]);[h,n,s]=d.then?(await d)():d;let u,p,g=e=>e;class v extends r.WF{render(){const e=new Date;return(0,r.qy)(u||(u=g` <ha-settings-row .narrow="${0}"> <span slot="heading"> ${0} </span> <span slot="description"> ${0} </span> <ha-select .label="${0}" .disabled="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> </ha-settings-row> `),this.narrow,this.hass.localize("ui.panel.profile.time_zone.header"),this.hass.localize("ui.panel.profile.time_zone.description"),this.hass.localize("ui.panel.profile.time_zone.dropdown_label"),void 0===this.hass.locale,this.hass.locale.time_zone,this._handleFormatSelection,Object.values(c.Wj).map(t=>({value:t.toString(),label:this.hass.localize(`ui.panel.profile.time_zone.options.${t}`,{timezone:(0,n.wj)(t,this.hass.config.time_zone).replace("_"," ")}),secondary:(0,s.GH)(e,Object.assign(Object.assign({},this.hass.locale),{},{time_zone:t}),this.hass.config)})))}async _handleFormatSelection(e){(0,l.r)(this,"hass-time-zone-select",e.detail.value)}constructor(...e){super(...e),this.narrow=!1}}v.styles=(0,r.AH)(p||(p=g`ha-select{display:block;width:100%}`)),(0,o.Cg)([(0,i.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],v.prototype,"narrow",void 0),v=(0,o.Cg)([(0,i.EM)("ha-pick-time-zone-row")],v),t()}catch(u){t(u)}})},39517:function(e,t,a){a.a(e,async function(e,o){try{a.r(t);a(3362),a(62953);var r=a(40445),i=a(5124),s=a(67576),n=a(36312),l=a(1087),h=a(12587),c=a(18350),d=(a(76776),a(83892),a(16869)),u=a(48250),p=a(65063),g=a(68302),v=a(40511),m=a(14503),f=a(84187),b=a(89483),w=a(50366),y=a(35839),_=a(62337),k=a(1354),$=a(35342),C=a(94655),x=a(16831),z=a(99229),M=a(11775),A=a(3001),H=a(81115),Z=a(16195),q=a(12623),L=a(55256),E=e([c,v,b,w,y,k,$,C,x,z,M,A,H,Z,q,L]);[c,v,b,w,y,k,$,C,x,z,M,A,H,Z,q,L]=E.then?(await E)():E;let T,S,P,j,O,D,N,F=e=>e;class V extends i.WF{_getCoreData(){this._unsubCoreData=(0,u.oT)(this.hass.connection,"core",({value:e})=>{this._coreUserData=e})}connectedCallback(){super.connectedCallback(),this.hass&&this._getCoreData(),this._scrollToHash()}firstUpdated(){this._unsubCoreData||this._getCoreData()}disconnectedCallback(){super.disconnectedCallback(),this._unsubCoreData&&(this._unsubCoreData.then(e=>e()),this._unsubCoreData=void 0)}async _scrollToHash(){await(0,h.E)();const e=window.location.hash.substring(1);if(e){const t=this.shadowRoot.getElementById(e);null==t||t.scrollIntoView(),this._clearHash()}}_clearHash(){history.replaceState(null,"",window.location.pathname)}render(){return(0,i.qy)(T||(T=F` <hass-tabs-subpage main-page .hass="${0}" .narrow="${0}" .tabs="${0}" .route="${0}"> <div slot="title">${0}</div> <div class="content"> <ha-card .header="${0}"> <div class="card-content"> ${0} ${0} </div> <div class="card-actions"> <ha-button variant="danger" appearance="plain" @click="${0}"> ${0} </ha-button> </div> </ha-card> <ha-card .header="${0}"> <div class="card-content"> ${0} </div> <ha-pick-language-row .narrow="${0}" .hass="${0}"></ha-pick-language-row> <ha-pick-theme-row .narrow="${0}" .hass="${0}"></ha-pick-theme-row> <ha-pick-dashboard-row .narrow="${0}" .hass="${0}"></ha-pick-dashboard-row> <ha-row-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-button slot="end" appearance="plain" size="small" @click="${0}"> ${0} </ha-button> </ha-row-item> ${0} </ha-card> <ha-card .header="${0}"> <div class="card-content"> ${0} </div> <ha-pick-time-zone-row .narrow="${0}" .hass="${0}"></ha-pick-time-zone-row> <ha-pick-number-format-row .narrow="${0}" .hass="${0}"></ha-pick-number-format-row> <ha-pick-time-format-row .narrow="${0}" .hass="${0}"></ha-pick-time-format-row> <ha-pick-date-format-row .narrow="${0}" .hass="${0}"></ha-pick-date-format-row> <ha-pick-first-weekday-row .narrow="${0}" .hass="${0}"></ha-pick-first-weekday-row> </ha-card> <ha-card .header="${0}"> <div class="card-content"> ${0} </div> ${0} ${0} ${0} <ha-set-suspend-row .hass="${0}"></ha-set-suspend-row> ${0} </ha-card> </div> </hass-tabs-subpage> `),this.hass,this.narrow,_.profileSections,this.route,this.hass.localize("panel.profile"),this.hass.user.name,this.hass.localize("ui.panel.profile.current_user",{fullName:this.hass.user.name}),this.hass.user.is_owner?this.hass.localize("ui.panel.profile.is_owner"):"",this._handleLogOut,this.hass.localize("ui.panel.profile.logout"),this.hass.localize("ui.panel.profile.user_preferences_header"),this.hass.localize("ui.panel.profile.user_preferences_detail"),this.narrow,this.hass,this.narrow,this.hass,this.narrow,this.hass,this.hass.localize("ui.panel.profile.customize_sidebar.header"),this.hass.localize("ui.panel.profile.customize_sidebar.description"),this._customizeSidebar,this.hass.localize("ui.panel.profile.customize_sidebar.button"),this.hass.user.is_admin?(0,i.qy)(S||(S=F` <ha-entity-id-picker-row .hass="${0}" .coreUserData="${0}"></ha-entity-id-picker-row> `),this.hass,this._coreUserData):i.s6,this.hass.localize("ui.panel.profile.localization_header"),this.hass.localize("ui.panel.profile.localization_detail"),this.narrow,this.hass,this.narrow,this.hass,this.narrow,this.hass,this.narrow,this.hass,this.narrow,this.hass,this.hass.localize(d.g?"ui.panel.profile.mobile_app_settings":"ui.panel.profile.browser_settings"),this.hass.localize("ui.panel.profile.client_settings_detail"),"auto"===this.hass.dockedSidebar&&this.narrow?i.s6:(0,i.qy)(P||(P=F` <ha-force-narrow-row .hass="${0}"></ha-force-narrow-row> `),this.hass),"vibrate"in navigator?(0,i.qy)(j||(j=F` <ha-set-vibrate-row .hass="${0}"></ha-set-vibrate-row> `),this.hass):i.s6,!d.g&&(0,n.x)(this.hass.config,"html5.notify")?(0,i.qy)(O||(O=F` <ha-push-notifications-row .hass="${0}"></ha-push-notifications-row> `),this.hass):i.s6,this.hass,f.M?i.s6:(0,i.qy)(D||(D=F` <ha-enable-shortcuts-row id="shortcuts" .hass="${0}"></ha-enable-shortcuts-row> `),this.hass))}_customizeSidebar(){(0,g.w)(this)}_handleLogOut(){(0,p.dk)(this,{title:this.hass.localize("ui.panel.profile.logout_title"),text:this.hass.localize("ui.panel.profile.logout_text"),confirmText:this.hass.localize("ui.panel.profile.logout"),confirm:()=>(0,l.r)(this,"hass-logout"),destructive:!0})}static get styles(){return[m.RF,(0,i.AH)(N||(N=F`:host{-ms-user-select:initial;-webkit-user-select:initial;-moz-user-select:initial}.content{display:block;max-width:600px;margin:0 auto;padding-bottom:var(--safe-area-inset-bottom)}.content>*{display:block;margin:24px 0}`))]}constructor(...e){super(...e),this.narrow=!1}}(0,r.Cg)([(0,s.MZ)({attribute:!1})],V.prototype,"hass",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],V.prototype,"narrow",void 0),(0,r.Cg)([(0,s.wk)()],V.prototype,"_coreUserData",void 0),(0,r.Cg)([(0,s.MZ)({attribute:!1})],V.prototype,"route",void 0),V=(0,r.Cg)([(0,s.EM)("ha-profile-section-general")],V),o()}catch(T){o(T)}})},16195:function(e,t,a){a.a(e,async function(e,t){try{var o=a(40445),r=a(5124),i=a(67576),s=a(36312),n=a(33680),l=(a(83892),a(36918)),h=e([n]);n=(h.then?(await h)():h)[0];let c,d,u=e=>e;class p extends r.WF{render(){const e=(0,s.x)(this.hass.config,"html5.notify");let t;t=n.x?e?"description":"error_load_platform":"error_use_https";const a=!e||!n.x;return(0,r.qy)(c||(c=u` <ha-row-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0} <a href="${0}" target="_blank" rel="noreferrer">${0}</a></span> <ha-push-notifications-toggle slot="end" .hass="${0}" .disabled="${0}"></ha-push-notifications-toggle> </ha-row-item> `),this.hass.localize("ui.panel.profile.push_notifications.header"),this.hass.localize(`ui.panel.profile.push_notifications.${t}`),(0,l.o)(this.hass,"/integrations/html5"),this.hass.localize("ui.panel.profile.push_notifications.link_promo"),this.hass,a)}}p.styles=(0,r.AH)(d||(d=u`a{color:var(--primary-color)}`)),(0,o.Cg)([(0,i.MZ)({attribute:!1})],p.prototype,"hass",void 0),p=(0,o.Cg)([(0,i.EM)("ha-push-notifications-row")],p),t()}catch(c){t(c)}})},12623:function(e,t,a){a.a(e,async function(e,t){try{a(3362);var o=a(40445),r=a(5124),i=a(67576),s=a(1087),n=a(59646),l=(a(83892),e([n]));n=(l.then?(await l)():l)[0];let h,c=e=>e;class d extends r.WF{render(){return(0,r.qy)(h||(h=c` <ha-row-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" .checked="${0}" @change="${0}"></ha-switch> </ha-row-item> `),this.hass.localize("ui.panel.profile.suspend.header"),this.hass.localize("ui.panel.profile.suspend.description"),this.hass.suspendWhenHidden,this._checkedChanged)}async _checkedChanged(e){const t=e.target.checked;t!==this.hass.suspendWhenHidden&&(0,s.r)(this,"hass-suspend-when-hidden",{suspend:t})}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"hass",void 0),d=(0,o.Cg)([(0,i.EM)("ha-set-suspend-row")],d),t()}catch(h){t(h)}})},55256:function(e,t,a){a.a(e,async function(e,t){try{a(3362);var o=a(40445),r=a(5124),i=a(67576),s=a(1087),n=a(59646),l=(a(83892),a(88360)),h=e([n]);n=(h.then?(await h)():h)[0];let c,d=e=>e;class u extends r.WF{render(){return(0,r.qy)(c||(c=d` <ha-row-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" .checked="${0}" @change="${0}"></ha-switch> </ha-row-item> `),this.hass.localize("ui.panel.profile.vibrate.header"),this.hass.localize("ui.panel.profile.vibrate.description"),this.hass.vibrate,this._checkedChanged)}async _checkedChanged(e){const t=e.target.checked;t!==this.hass.vibrate&&((0,s.r)(this,"hass-vibrate",{vibrate:t}),(0,l.j)(this,"light"))}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],u.prototype,"hass",void 0),u=(0,o.Cg)([(0,i.EM)("ha-set-vibrate-row")],u),t()}catch(c){t(c)}})},85614:function(e,t,a){a.d(t,{i:function(){return o}});a(3362),a(62953);const o=async()=>{await Promise.all([a.e(38085),a.e(22309)]).then(a.bind(a,40772))}},36918:function(e,t,a){a.d(t,{o:function(){return o}});const o=(e,t)=>`https://www.iobroker.net/#${e.language&&e.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},22348:function(e,t,a){a.d(t,{V:function(){return r}});var o=a(37177);const r=e=>!!e&&o.n},37177:function(e,t,a){a.d(t,{n:function(){return o}});a(27495);const o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);