UNPKG

iobroker.lovelace

Version:

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

1 lines 29 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[84208],{41113:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(18111),a(20116),a(61701),a(3362),a(62953);var i=a(40445),s=a(5124),n=a(67576),o=a(1087),r=a(57237),l=a(76570),d=a(65063),h=a(54706),c=a(90986),p=a(14503),u=a(29823),v=(a(70947),a(11382),a(47680),a(8630),a(28732),e([u]));u=(v.then?(await v)():v)[0];let g,y,f,m,x,b,_,w,$,C=e=>e;const k="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",M="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",H="M21 8H3V6H21V8M13.81 16H10V18H13.09C13.21 17.28 13.46 16.61 13.81 16M18 11H6V13H18V11M21.12 15.46L19 17.59L16.88 15.46L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46Z",L="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",A="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",Z="M5.5,7A1.5,1.5 0 0,1 4,5.5A1.5,1.5 0 0,1 5.5,4A1.5,1.5 0 0,1 7,5.5A1.5,1.5 0 0,1 5.5,7M21.41,11.58L12.41,2.58C12.05,2.22 11.55,2 11,2H4C2.89,2 2,2.89 2,4V11C2,11.55 2.22,12.05 2.59,12.41L11.58,21.41C11.95,21.77 12.45,22 13,22C13.55,22 14.05,21.77 14.41,21.41L21.41,14.41C21.78,14.05 22,13.55 22,13C22,12.44 21.77,11.94 21.41,11.58Z";class z extends((0,h.E)(s.WF)){hassSubscribe(){return[(0,l.Ar)(this.hass.connection,this.scope,e=>{this._categories=e})]}render(){var e,t,a,i;return(0,s.qy)(g||(g=C` <ha-expansion-panel left-chevron .expanded="${0}" @expanded-will-change="${0}" @expanded-changed="${0}"> <div slot="header" class="header"> ${0} ${0} </div> ${0} </ha-expansion-panel> ${0} `),this.expanded,this._expandedWillChange,this._expandedChanged,this.hass.localize("ui.panel.config.category.caption"),null!==(e=this.value)&&void 0!==e&&e.length?(0,s.qy)(y||(y=C`<div class="badge">${0}</div> <ha-icon-button .path="${0}" @click="${0}"></ha-icon-button>`),null===(t=this.value)||void 0===t?void 0:t.length,H,this._clearFilter):s.s6,this._shouldRender?(0,s.qy)(f||(f=C` <ha-list @selected="${0}" class="ha-scrollbar" activatable> ${0} ${0} </ha-list> `),this._categorySelected,this._categories.length>0?(0,s.qy)(m||(m=C`<ha-list-item .selected="${0}" .activated="${0}">${0}</ha-list-item>`),!(null!==(a=this.value)&&void 0!==a&&a.length),!(null!==(i=this.value)&&void 0!==i&&i.length),this.hass.localize("ui.panel.config.category.filter.show_all")):s.s6,this._categories.map(e=>{var t,a;return(0,s.qy)(x||(x=C`<ha-list-item .value="${0}" .selected="${0}" .activated="${0}" graphic="icon" hasMeta> ${0} ${0} <ha-dropdown @click="${0}" @wa-select="${0}" slot="meta" .categoryId="${0}"> <ha-icon-button .path="${0}" slot="trigger" .label="${0}"></ha-icon-button> <ha-dropdown-item value="edit"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> <ha-dropdown-item value="delete" variant="danger"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> </ha-dropdown> </ha-list-item>`),e.category_id,null===(t=this.value)||void 0===t?void 0:t.includes(e.category_id),null===(a=this.value)||void 0===a?void 0:a.includes(e.category_id),e.icon?(0,s.qy)(b||(b=C`<ha-icon slot="graphic" .icon="${0}"></ha-icon>`),e.icon):(0,s.qy)(_||(_=C`<ha-svg-icon .path="${0}" slot="graphic"></ha-svg-icon>`),Z),e.name,r.d,this._handleAction,e.category_id,M,this.hass.localize("ui.common.menu"),L,this.hass.localize("ui.panel.config.category.editor.edit"),k,this.hass.localize("ui.panel.config.category.editor.delete"))})):s.s6,this.expanded?(0,s.qy)(w||(w=C`<ha-list-item graphic="icon" @click="${0}" class="add"> <ha-svg-icon slot="graphic" .path="${0}"></ha-svg-icon> ${0} </ha-list-item>`),this._addCategory,A,this.hass.localize("ui.panel.config.category.editor.add")):s.s6)}updated(e){e.has("expanded")&&this.expanded&&setTimeout(()=>{this.expanded&&(this._list.style.height=this.clientHeight-97+"px")},300)}_handleAction(e){const t=e.currentTarget.categoryId;switch(e.detail.item.value){case"edit":this._editCategory(t);break;case"delete":this._deleteCategory(t)}}_editCategory(e){(0,c.S)(this,{scope:this.scope,entry:this._categories.find(t=>t.category_id===e),updateEntry:t=>(0,l.pW)(this.hass,this.scope,e,t)})}async _deleteCategory(e){if(await(0,d.dk)(this,{title:this.hass.localize("ui.panel.config.category.editor.confirm_delete"),text:this.hass.localize("ui.panel.config.category.editor.confirm_delete_text"),confirmText:this.hass.localize("ui.common.delete"),destructive:!0}))try{await(0,l.JJ)(this.hass,this.scope,e),(0,o.r)(this,"data-table-filter-changed",{value:[],items:void 0})}catch(t){alert(`Failed to delete: ${t.message}`)}}_addCategory(){this.scope&&(0,c.S)(this,{scope:this.scope,createEntry:e=>(0,l.s_)(this.hass,this.scope,e)})}_expandedWillChange(e){this._shouldRender=e.detail.expanded}_expandedChanged(e){this.expanded=e.detail.expanded}async _categorySelected(e){var t;if(!e.detail.index)return(0,o.r)(this,"data-table-filter-changed",{value:[],items:void 0}),void(this.value=[]);const a=e.detail.index-1,i=null===(t=this._categories[a])||void 0===t?void 0:t.category_id;i&&(this.value=[i],(0,o.r)(this,"data-table-filter-changed",{value:this.value,items:void 0}))}_clearFilter(e){e.preventDefault(),this.value=void 0,(0,o.r)(this,"data-table-filter-changed",{value:void 0,items:void 0})}static get styles(){return[p.dp,(0,s.AH)($||($=C`:host{border-bottom:1px solid var(--divider-color);position:relative}:host([expanded]){flex:1;height:0}ha-expansion-panel{--ha-card-border-radius:var(--ha-border-radius-square);--expansion-panel-content-padding:0}.header{display:flex;align-items:center}.header ha-icon-button{margin-inline-start:auto;margin-inline-end:8px}.badge{display:inline-block;margin-left:8px;margin-inline-start:8px;margin-inline-end:0;min-width:16px;box-sizing:border-box;border-radius:var(--ha-border-radius-circle);font-size:var(--ha-font-size-xs);font-weight:var(--ha-font-weight-normal);background-color:var(--primary-color);line-height:var(--ha-line-height-normal);text-align:center;padding:0px 2px;color:var(--text-primary-color)}ha-list{--mdc-list-item-meta-size:auto;--mdc-list-side-padding-right:var(--ha-space-1);--mdc-list-side-padding-left:var(--ha-space-4);--ha-icon-button-size:36px}ha-list-item{--mdc-list-item-graphic-margin:var(--ha-space-4)}ha-dropdown-item{font-size:var(--ha-font-size-m)}.warning{color:var(--error-color)}.add{position:absolute;bottom:0;right:0;left:0}`))]}constructor(...e){super(...e),this.narrow=!1,this.expanded=!1,this._categories=[],this._shouldRender=!1,this.hassSubscribeRequiredHostProps=["scope"]}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],z.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],z.prototype,"value",void 0),(0,i.Cg)([(0,n.MZ)()],z.prototype,"scope",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],z.prototype,"narrow",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],z.prototype,"expanded",void 0),(0,i.Cg)([(0,n.wk)()],z.prototype,"_categories",void 0),(0,i.Cg)([(0,n.wk)()],z.prototype,"_shouldRender",void 0),(0,i.Cg)([(0,n.P)("ha-list")],z.prototype,"_list",void 0),z=(0,i.Cg)([(0,n.EM)("ha-filter-categories")],z),t()}catch(g){t(g)}})},66702:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(44114),a(26910),a(18111),a(22489),a(7588),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(40445),s=a(5124),n=a(67576),o=a(22786),r=a(1087),l=a(69093),d=a(28978),h=a(52220),c=a(19459),p=a(71606),u=a(14503),v=a(85614),g=(a(30716),a(11382),a(8630),a(93367)),y=a(36866),f=e([g,y]);[g,y]=f.then?(await f)():f;let m,x,b,_,w,$=e=>e;const C="M21 8H3V6H21V8M13.81 16H10V18H13.09C13.21 17.28 13.46 16.61 13.81 16M18 11H6V13H18V11M21.12 15.46L19 17.59L16.88 15.46L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46Z";class k extends s.WF{willUpdate(e){super.willUpdate(e),this.hasUpdated||(0,v.i)(),e.has("value")&&!(0,c.b)(this.value,e.get("value"))&&this._findRelated()}render(){var e,t;return(0,s.qy)(m||(m=$` <ha-expansion-panel left-chevron .expanded="${0}" @expanded-will-change="${0}" @expanded-changed="${0}"> <div slot="header" class="header"> ${0} ${0} </div> ${0} </ha-expansion-panel> `),this.expanded,this._expandedWillChange,this._expandedChanged,this.hass.localize("ui.panel.config.entities.caption"),null!==(e=this.value)&&void 0!==e&&e.length?(0,s.qy)(x||(x=$`<div class="badge">${0}</div> <ha-icon-button .path="${0}" @click="${0}"></ha-icon-button>`),null===(t=this.value)||void 0===t?void 0:t.length,C,this._clearFilter):s.s6,this._shouldRender?(0,s.qy)(b||(b=$` <ha-input-search appearance="outlined" .value="${0}" @input="${0}"> </ha-input-search> <ha-list class="ha-scrollbar" multi> <lit-virtualizer .items="${0}" .keyFunction="${0}" .renderItem="${0}" @click="${0}" @keydown="${0}"> </lit-virtualizer> </ha-list> `),this._filter,this._handleSearchChange,this._entities(this.hass.states,this.type,this._filter||"",this.value),this._keyFunction,this._renderItem,this._handleItemClick,this._handleItemKeydown):s.s6)}updated(e){e.has("expanded")&&this.expanded&&setTimeout(()=>{this.expanded&&(this._list.style.height=this.clientHeight-49-4-32+"px")},300)}_handleItemKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._handleItemClick(e))}_handleItemClick(e){var t,a;const i=e.target.closest("ha-check-list-item"),s=null==i?void 0:i.value;if(s){var n;if(null!==(t=this.value)&&void 0!==t&&t.includes(s))this.value=null===(n=this.value)||void 0===n?void 0:n.filter(e=>e!==s);else this.value=[...this.value||[],s];i.selected=null===(a=this.value)||void 0===a?void 0:a.includes(s)}}_expandedWillChange(e){this._shouldRender=e.detail.expanded}_expandedChanged(e){this.expanded=e.detail.expanded}_handleSearchChange(e){var t;const a=e.target;this._filter=(null!==(t=a.value)&&void 0!==t?t:"").toLowerCase()}async _findRelated(){var e;const t=[];if(null===(e=this.value)||void 0===e||!e.length)return this.value=[],void(0,r.r)(this,"data-table-filter-changed",{value:[],items:void 0});for(const s of this.value)this.type&&t.push((0,p.f)(this.hass,"entity",s));const a=await Promise.all(t),i=new Set;for(const s of a)s[this.type]&&s[this.type].forEach(e=>i.add(e));(0,r.r)(this,"data-table-filter-changed",{value:this.value,items:this.type?i:void 0})}_clearFilter(e){e.preventDefault(),this.value=void 0,(0,r.r)(this,"data-table-filter-changed",{value:void 0,items:void 0})}static get styles(){return[u.dp,(0,s.AH)(_||(_=$`:host{border-bottom:1px solid var(--divider-color)}:host([expanded]){flex:1;height:0}ha-expansion-panel{--ha-card-border-radius:var(--ha-border-radius-square);--expansion-panel-content-padding:0}.header{display:flex;align-items:center}.header ha-icon-button{margin-inline-start:auto;margin-inline-end:8px}.badge{display:inline-block;margin-left:8px;margin-inline-start:8px;margin-inline-end:0;min-width:16px;box-sizing:border-box;border-radius:var(--ha-border-radius-circle);font-size:var(--ha-font-size-xs);font-weight:var(--ha-font-weight-normal);background-color:var(--primary-color);line-height:var(--ha-line-height-normal);text-align:center;padding:0px 2px;color:var(--text-primary-color)}ha-check-list-item{--mdc-list-item-graphic-margin:16px;width:100%}ha-input-search{display:block;padding:var(--ha-space-1) var(--ha-space-2) 0}`))]}constructor(...e){super(...e),this.narrow=!1,this.expanded=!1,this._shouldRender=!1,this._keyFunction=e=>null==e?void 0:e.entity_id,this._renderItem=e=>{var t,a;return e?(0,s.qy)(w||(w=$`<ha-check-list-item tabindex="0" .value="${0}" .selected="${0}" graphic="icon"> <ha-state-icon slot="graphic" .stateObj="${0}"></ha-state-icon> ${0} </ha-check-list-item>`),e.entity_id,null!==(t=null===(a=this.value)||void 0===a?void 0:a.includes(e.entity_id))&&void 0!==t&&t,e,(0,d.u)(e)):s.s6},this._entities=(0,o.A)((e,t,a,i)=>Object.values(e).filter(e=>{var i;return(!t||(0,l.t)(e)!==t)&&(!a||e.entity_id.toLowerCase().includes(a)||(null===(i=e.attributes.friendly_name)||void 0===i?void 0:i.toLowerCase().includes(a)))}).sort((e,t)=>(0,h.xL)((0,d.u)(e),(0,d.u)(t),this.hass.locale.language)))}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"value",void 0),(0,i.Cg)([(0,n.MZ)()],k.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],k.prototype,"narrow",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],k.prototype,"expanded",void 0),(0,i.Cg)([(0,n.wk)()],k.prototype,"_shouldRender",void 0),(0,i.Cg)([(0,n.wk)()],k.prototype,"_filter",void 0),(0,i.Cg)([(0,n.P)("ha-list")],k.prototype,"_list",void 0),k=(0,i.Cg)([(0,n.EM)("ha-filter-entities")],k),t()}catch(m){t(m)}})},2617:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(44114),a(3362),a(62953);var i=a(40445),s=a(5124),n=a(67576),o=a(75751),r=a(1087),l=a(14503),d=(a(30716),a(11382),a(47680),a(26300)),h=a(23430),c=(a(8630),a(28732),a(61037),a(14782)),p=a(75197),u=e([d,h,p]);[d,h,p]=u.then?(await u)():u;let v,g,y,f,m,x=e=>e;const b="M21 8H3V6H21V8M13.81 16H10V18H13.09C13.21 17.28 13.46 16.61 13.81 16M18 11H6V13H18V11M21.12 15.46L19 17.59L16.88 15.46L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46Z";class _ extends s.WF{render(){var e,t;return(0,s.qy)(v||(v=x` <ha-expansion-panel left-chevron .expanded="${0}" @expanded-will-change="${0}" @expanded-changed="${0}"> <div slot="header" class="header"> ${0} ${0} </div> ${0} </ha-expansion-panel> `),this.expanded,this._expandedWillChange,this._expandedChanged,this.hass.localize("ui.panel.config.dashboard.voice_assistants.main"),null!==(e=this.value)&&void 0!==e&&e.length?(0,s.qy)(g||(g=x`<div class="badge">${0}</div> <ha-icon-button .path="${0}" @click="${0}"></ha-icon-button>`),null===(t=this.value)||void 0===t?void 0:t.length,b,this._clearFilter):s.s6,this._shouldRender?(0,s.qy)(y||(y=x`<ha-list @selected="${0}" class="ha-scrollbar" multi> ${0} </ha-list> `),this._assistantsSelected,(0,o.u)(this._voiceAssistantOptions,e=>e,e=>(0,s.qy)(f||(f=x`<ha-check-list-item .value="${0}" .selected="${0}" hasMeta graphic="icon"> <voice-assistant-brand-icon slot="graphic" .voiceAssistantId="${0}" .hass="${0}"> </voice-assistant-brand-icon> ${0} </ha-check-list-item>`),e,(this.value||[]).includes(e),e,this.hass,c.aK[e].name))):s.s6)}firstUpdated(e){super.firstUpdated(e),this._voiceAssistantOptions=Object.keys(c.aK)}updated(e){e.has("expanded")&&this.expanded&&setTimeout(()=>{this.expanded&&(this._list.style.height=this.clientHeight-49+"px")},300)}_expandedWillChange(e){this._shouldRender=e.detail.expanded}_expandedChanged(e){this.expanded=e.detail.expanded}async _assistantsSelected(e){if(!e.detail.index)return(0,r.r)(this,"data-table-filter-changed",{value:[],items:void 0}),void(this.value=[]);const t=[];for(const a of e.detail.index)t.push(this._voiceAssistantOptions[a]);this.value=t,(0,r.r)(this,"data-table-filter-changed",{value:this.value,items:void 0})}_clearFilter(e){e.preventDefault(),this.value=[],(0,r.r)(this,"data-table-filter-changed",{value:void 0,items:void 0})}static get styles(){return[l.dp,(0,s.AH)(m||(m=x`:host{position:relative;border-bottom:1px solid var(--divider-color)}:host([expanded]){flex:1;height:0}ha-expansion-panel{--ha-card-border-radius:var(--ha-border-radius-square);--expansion-panel-content-padding:0}.header{display:flex;align-items:center}.header ha-icon-button{margin-inline-start:auto;margin-inline-end:8px}ha-check-list-item{--mdc-list-item-graphic-margin:var(--ha-space-4)}.badge{display:inline-block;margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;min-width:16px;box-sizing:border-box;border-radius:var(--ha-border-radius-circle);font-size:var(--ha-font-size-xs);font-weight:var(--ha-font-weight-normal);background-color:var(--primary-color);line-height:var(--ha-line-height-normal);text-align:center;padding:0px 2px;color:var(--text-primary-color)}.add{position:absolute;bottom:0;right:0;left:0}`))]}constructor(...e){super(...e),this.value=[],this.narrow=!1,this.expanded=!1,this._voiceAssistantOptions=[],this._shouldRender=!1}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],_.prototype,"value",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],_.prototype,"narrow",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],_.prototype,"expanded",void 0),(0,i.Cg)([(0,n.wk)()],_.prototype,"_voiceAssistantOptions",void 0),(0,i.Cg)([(0,n.wk)()],_.prototype,"_shouldRender",void 0),(0,i.Cg)([(0,n.P)("ha-list")],_.prototype,"_list",void 0),_=(0,i.Cg)([(0,n.EM)("ha-filter-voice-assistants")],_),t()}catch(v){t(v)}})},61037:function(e,t,a){var i=a(40445),s=a(67576),n=a(5124),o=a(14503),r=a(14782),l=a(44144);let d,h,c=e=>e;class p extends n.WF{render(){var e;return(0,n.qy)(d||(d=c` <img class="logo" alt="${0}" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer"> `),r.aK[this.voiceAssistantId].name,(0,l.MR)({domain:r.aK[this.voiceAssistantId].domain,type:"icon",darkOptimized:null===(e=this.hass.themes)||void 0===e?void 0:e.darkMode},this.hass.auth.data.hassUrl))}static get styles(){return[o.RF,(0,n.AH)(h||(h=c`:host{display:inline}.logo{position:relative;vertical-align:middle;height:24px}`))]}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"voiceAssistantId",void 0),p=(0,i.Cg)([(0,s.EM)("voice-assistant-brand-icon")],p)},82e3:function(e,t,a){a.d(t,{D5:function(){return i},Fy:function(){return o},Gk:function(){return d},Hg:function(){return s},Y_:function(){return h},ds:function(){return l},e0:function(){return n},ec:function(){return r}});a(74423),a(18111),a(61701),a(33110),a(3362);const i=14881==a.j?`${location.protocol}//${location.host}`:null,s=e=>e.map(e=>{if("string"!==e.type)return e;switch(e.name){case"username":return Object.assign(Object.assign({},e),{},{autocomplete:"username",autofocus:!0});case"password":return Object.assign(Object.assign({},e),{},{autocomplete:"current-password"});case"code":return Object.assign(Object.assign({},e),{},{autocomplete:"one-time-code",autofocus:!0});default:return e}}),n=(e,t)=>e.callWS({type:"auth/sign_path",path:t}),o=async(e,t,a,i)=>e.callWS({type:"config/auth_provider/homeassistant/create",user_id:t,username:a,password:i}),r=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:t,new_password:a}),l=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:t,password:a}),d=(e,t,a)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:t,username:a}),h=(e,t,a)=>e.callWS({type:"auth/delete_all_refresh_tokens",token_type:t,delete_current_token:a})},76570:function(e,t,a){a.d(t,{AH:function(){return o},Ar:function(){return r},JJ:function(){return h},pW:function(){return d},s_:function(){return l}});a(26910);var i=a(90889),s=a(52220),n=a(9899);const o=(e,t)=>e.sendMessagePromise({type:"config/category_registry/list",scope:t}).then(e=>e.sort((e,t)=>(0,s.xL)(e.name,t.name))),r=(e,t,a)=>(0,i.N)(`_categoryRegistry_${t}`,e=>o(e,t),(e,a)=>e.subscribeEvents((0,n.s)(()=>o(e,t).then(e=>a.setState(e,!0)),500,!0),"category_registry_updated"),e,a),l=(e,t,a)=>e.callWS(Object.assign({type:"config/category_registry/create",scope:t},a)),d=(e,t,a,i)=>e.callWS(Object.assign({type:"config/category_registry/update",scope:t,category_id:a},i)),h=(e,t,a)=>e.callWS({type:"config/category_registry/delete",scope:t,category_id:a})},14782:function(e,t,a){a.d(t,{Gw:function(){return o},Ow:function(){return l},YH:function(){return n},aK:function(){return s},hB:function(){return d},ij:function(){return r}});a(18111),a(22489);var i=a(59241);const s={conversation:{domain:"assist_pipeline",name:"Assist"},"cloud.alexa":{domain:"alexa",name:"Amazon Alexa"},"cloud.google_assistant":{domain:"google_assistant",name:"Google Assistant"}},n=(e,t,a)=>e.callWS({type:"homeassistant/expose_new_entities/set",assistant:t,expose_new:a}),o=(e,t)=>e.callWS({type:"homeassistant/expose_new_entities/get",assistant:t}),r=(e,t,a,i)=>e.callWS({type:"homeassistant/expose_entity",assistants:t,entity_ids:a,should_expose:i}),l=e=>e.callWS({type:"homeassistant/expose_entity/list"}),d=(e,t)=>{const a=(0,i.Ox)(e)[t];return Object.keys(s).filter(e=>{var t;return null==a||null===(t=a.options)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.should_expose})}},81310:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),s=a(5124),n=a(67576),o=a(6412),r=a(26218),l=a(91926),d=a(90248),h=a(2054),c=a(14503),p=e([d,h]);[d,h]=p.then?(await p)():p;let u,v,g,y,f,m=e=>e;class x extends s.WF{render(){var e;return(0,s.qy)(u||(u=m` <div class="toolbar ${0}"> <div class="toolbar-content"> ${0} <div class="main-title"> <slot name="header">${0}</slot> </div> <slot name="toolbar-icon"></slot> </div> </div> <div class="${0}" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),(0,o.H)({narrow:this.narrow}),this.mainPage||null!==(e=history.state)&&void 0!==e&&e.root?(0,s.qy)(v||(v=m` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):this.backPath?(0,s.qy)(g||(g=m` <ha-icon-button-arrow-prev href="${0}" .hass="${0}"></ha-icon-button-arrow-prev> `),this.backPath,this.hass):(0,s.qy)(y||(y=m` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,(0,o.H)({content:!0,"ha-scrollbar":this.scrollable,"not-scrollable":!this.scrollable}),this._saveScrollPos)}_saveScrollPos(e){this._savedScrollPos=e.target.scrollTop}_backTapped(){this.backCallback?this.backCallback():(0,l.OE)()}static get styles(){return[c.dp,(0,s.AH)(f||(f=m`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{background-color:var(--app-header-background-color);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box;padding:8px 12px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;align-items:center;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.content{position:relative;width:calc(100% - var(--safe-area-inset-right,0px));height:calc(100% - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));padding-bottom:var(--safe-area-inset-bottom,0px);margin-right:var(--safe-area-inset-right);overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}.content.not-scrollable{overflow:hidden;display:flex;flex-direction:column}:host([narrow]) .content{width:calc(100% - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));margin-left:var(--safe-area-inset-left)}#fab{position:absolute;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;bottom:calc(16px + var(--safe-area-inset-bottom,0px));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--ha-space-2);--ha-button-box-shadow:var(--ha-box-shadow-l)}:host([narrow]) #fab.tabs{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:calc(24px + var(--safe-area-inset-bottom,0px));right:calc(24px + var(--safe-area-inset-right,0px));inset-inline-end:calc(24px + var(--safe-area-inset-right,0px));inset-inline-start:initial}`))]}constructor(...e){super(...e),this.mainPage=!1,this.narrow=!1,this.scrollable=!0}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)()],x.prototype,"header",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"main-page"})],x.prototype,"mainPage",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"back-path"})],x.prototype,"backPath",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"backCallback",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],x.prototype,"narrow",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],x.prototype,"scrollable",void 0),(0,i.Cg)([(0,r.a)(".content")],x.prototype,"_savedScrollPos",void 0),(0,i.Cg)([(0,n.Ls)({passive:!0})],x.prototype,"_saveScrollPos",null),x=(0,i.Cg)([(0,n.EM)("hass-subpage")],x),t()}catch(u){t(u)}})},55270:function(e,t,a){a.d(t,{j:function(){return n}});a(3362),a(62953);var i=a(1087);const s=()=>a.e(98983).then(a.bind(a,35930)),n=(e,t)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-assign-category",dialogImport:s,dialogParams:t})}},90986:function(e,t,a){a.d(t,{S:function(){return n}});a(3362),a(62953);var i=a(1087);const s=()=>a.e(25291).then(a.bind(a,81574)),n=(e,t)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-category-registry-detail",dialogImport:s,dialogParams:t})}},94017:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{HX:function(){return g},MD:function(){return u}});a(74423),a(18111),a(61701),a(13579);var s=a(5124),n=a(75197),o=e([n]);n=(o.then?(await o)():o)[0];let l,d,h,c,p=e=>e;function u(e,t,a,i,n,o){return{title:e("ui.panel.config.generic.headers.assistants"),type:"flex",defaultHidden:!o,sortable:!0,showNarrow:!0,minWidth:"112px",maxWidth:"112px",valueColumn:"assistants_sortable_key",template:e=>(0,s.qy)(l||(l=p`${0}`),0!==e.assistants.length?(0,s.qy)(d||(d=p`<div style="display:flex;gap:var(--ha-space-1)"> ${0} </div>`),a.map(a=>{var s;const o=!(null!=n&&n[a])||n[a].includes(e.entity_id),r=null===(s=e.manAssistants)||void 0===s?void 0:s.includes(a);return v(e.entity_id,e.assistants.includes(a),a,t,i,r,!o)})):s.s6)}}const v=(e,t,a,i,n,o,r)=>{const l=null==n?void 0:n.some(e=>e.assistants.includes(a));return t?(0,s.qy)(h||(h=p`<voice-assistants-expose-assistant-icon .id="${0}" .assistant="${0}" .hass="${0}" .manual="${0}" .unsupported="${0}"></voice-assistants-expose-assistant-icon>`),e,a,i,null!=o&&o,null!=r&&r):l?(0,s.qy)(c||(c=p`<div style="width:24px"></div>`)):s.s6},g=e=>{let t=0;if(!e.length)return;return["conversation","cloud.alexa","cloud.google_assistant"].forEach((a,i)=>{e.includes(a)&&(t+=2**i)}),3===t?t=4:4===t&&(t=3),`${t}`};i()}catch(r){i(r)}})},19661:function(e,t,a){a.d(t,{V:function(){return n}});a(44114);var i=a(22786),s=a(36312);const n=(0,i.A)((e,t)=>{const a=[];return(0,s.x)(t.config,"conversation")&&a.push("conversation"),null!=e&&e.logged_in&&(e.prefs.alexa_enabled&&a.push("cloud.alexa"),e.prefs.google_enabled&&a.push("cloud.google_assistant")),a})},75197:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),s=a(5124),n=a(67576),o=a(89784),r=a(80880),l=a(14782),d=(a(67094),a(34127)),h=(a(61037),e([d]));d=(h.then?(await h)():h)[0];let c,p,u,v,g=e=>e;const y="M13,13H11V7H13M13,17H11V15H13M12,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";class f extends s.WF{render(){if(!this.assistant||!l.aK[this.assistant])return s.s6;const e=(0,r.Y)(this.id)+"-"+this.assistant;return(0,s.qy)(c||(c=g` <div class="container" id="${0}"> <voice-assistant-brand-icon style="${0}" .voiceAssistantId="${0}" .hass="${0}"> </voice-assistant-brand-icon> ${0} </div> <ha-tooltip for="${0}" placement="left" .disabled="${0}"> ${0} ${0} ${0} </ha-tooltip> `),e,(0,o.W)({filter:this.manual?"grayscale(100%)":void 0}),this.assistant,this.hass,this.unsupported?(0,s.qy)(p||(p=g` <ha-svg-icon .path="${0}" class="unsupported"></ha-svg-icon> `),y):s.s6,e,!this.unsupported&&!this.manual,this.unsupported?this.hass.localize("ui.panel.config.voice_assistants.expose.not_supported"):"",this.unsupported&&this.manual?(0,s.qy)(u||(u=g`<br>`)):s.s6,this.manual?this.hass.localize("ui.panel.config.voice_assistants.expose.manually_configured"):s.s6)}constructor(...e){super(...e),this.unsupported=!1,this.manual=!1}}f.styles=(0,s.AH)(v||(v=g`.container{position:relative}.unsupported{color:var(--error-color);position:absolute;--mdc-icon-size:16px;right:10px;top:-7px;inset-inline-end:10px;inset-inline-start:initial}`)),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],f.prototype,"unsupported",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],f.prototype,"manual",void 0),(0,i.Cg)([(0,n.MZ)()],f.prototype,"assistant",void 0),f=(0,i.Cg)([(0,n.EM)("voice-assistants-expose-assistant-icon")],f),t()}catch(c){t(c)}})}}]);