iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
6 lines • 31.7 kB
JavaScript
export const __webpack_ids__=["58529"];export const __webpack_modules__={47558:function(e,t,i){i.d(t,{v:()=>a});i(92745);const a=(e,t)=>{const i={};for(const a of e){const e=t(a);e in i?i[e].push(a):i[e]=[a]}return i}},93288:function(e,t,i){var a=i(44249),l=i(72621),d=(i(92745),i(9359),i(56475),i(1331),i(31526),i(70104),i(48136),i(52924),i(22139),i(12582)),o=i(57243),n=i(15093),r=i(35359),c=i(20552),s=i(69634),h=i(27486),u=i(31146),f=i(36522),m=i(1416),p=i(22381),_=i(47558),b=i(28008),v=i(47641),k=(i(83456),i(37583),i(36841),i(75656),i(50100),i(18084),i(75351));let g;const x=()=>(g||(g=(0,k.Ud)(new Worker(new URL(i.p+i.u("6522"),i.b)))),g);var y=i(76320);const w="zzzzz_undefined";(0,a.Z)([(0,n.Mo)("ha-data-table")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"localizeFunc",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Object})],key:"columns",value:()=>({})},{kind:"field",decorators:[(0,n.Cb)({type:Array})],key:"data",value:()=>[]},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"selectable",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"clickable",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({attribute:"has-fab",type:Boolean})],key:"hasFab",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"appendRow",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"auto-height"})],key:"autoHeight",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"id",value:()=>"id"},{kind:"field",decorators:[(0,n.Cb)({attribute:!1,type:String})],key:"noDataText",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1,type:String})],key:"searchLabel",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"no-label-float"})],key:"noLabelFloat",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"filter",value:()=>""},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"groupColumn",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"groupOrder",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"sortColumn",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"sortDirection",value:()=>null},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"initialCollapsedGroups",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hiddenColumns",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"columnOrder",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_filterable",value:()=>!1},{kind:"field",decorators:[(0,n.SB)()],key:"_filter",value:()=>""},{kind:"field",decorators:[(0,n.SB)()],key:"_filteredData",value:()=>[]},{kind:"field",decorators:[(0,n.SB)()],key:"_headerHeight",value:()=>0},{kind:"field",decorators:[(0,n.IO)("slot[name='header']")],key:"_header",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_collapsedGroups",value:()=>[]},{kind:"field",key:"_checkableRowsCount",value:void 0},{kind:"field",key:"_checkedRows",value:()=>[]},{kind:"field",key:"_sortColumns",value:()=>({})},{kind:"field",key:"_curRequest",value:()=>0},{kind:"field",key:"_lastUpdate",value:()=>0},{kind:"field",decorators:[(0,u.i)(".scroller")],key:"_savedScrollPos",value:void 0},{kind:"field",key:"_debounceSearch",value(){return(0,p.D)((e=>{this._filter=e}),100,!1)}},{kind:"method",key:"clearSelection",value:function(){this._checkedRows=[],this._checkedRowsChanged()}},{kind:"method",key:"selectAll",value:function(){this._checkedRows=this._filteredData.filter((e=>!1!==e.selectable)).map((e=>e[this.id])),this._checkedRowsChanged()}},{kind:"method",key:"select",value:function(e,t){t&&(this._checkedRows=[]),e.forEach((e=>{const t=this._filteredData.find((t=>t[this.id]===e));!1===t?.selectable||this._checkedRows.includes(e)||this._checkedRows.push(e)})),this._checkedRowsChanged()}},{kind:"method",key:"unselect",value:function(e){e.forEach((e=>{const t=this._checkedRows.indexOf(e);t>-1&&this._checkedRows.splice(t,1)})),this._checkedRowsChanged()}},{kind:"method",key:"connectedCallback",value:function(){(0,l.Z)(i,"connectedCallback",this,3)([]),this._filteredData.length&&(this._filteredData=[...this._filteredData])}},{kind:"method",key:"firstUpdated",value:function(){this.updateComplete.then((()=>this._calcTableHeight()))}},{kind:"method",key:"updated",value:function(){const e=this.renderRoot.querySelector(".mdc-data-table__header-row");e&&(e.scrollWidth>e.clientWidth?this.style.setProperty("--table-row-width",`${e.scrollWidth}px`):this.style.removeProperty("--table-row-width"))}},{kind:"method",key:"willUpdate",value:function(e){if((0,l.Z)(i,"willUpdate",this,3)([e]),this.hasUpdated||(0,v.o)(),e.has("columns")){if(this._filterable=Object.values(this.columns).some((e=>e.filterable)),!this.sortColumn)for(const e in this.columns)if(this.columns[e].direction){this.sortDirection=this.columns[e].direction,this.sortColumn=e,(0,f.B)(this,"sorting-changed",{column:e,direction:this.sortDirection});break}const e=(0,d.Z)(this.columns);Object.values(e).forEach((e=>{delete e.title,delete e.template,delete e.extraTemplate})),this._sortColumns=e}e.has("filter")&&this._debounceSearch(this.filter),e.has("data")&&(this._checkableRowsCount=this.data.filter((e=>!1!==e.selectable)).length),!this.hasUpdated&&this.initialCollapsedGroups?(this._collapsedGroups=this.initialCollapsedGroups,(0,f.B)(this,"collapsed-changed",{value:this._collapsedGroups})):e.has("groupColumn")&&(this._collapsedGroups=[],(0,f.B)(this,"collapsed-changed",{value:this._collapsedGroups})),(e.has("data")||e.has("columns")||e.has("_filter")||e.has("sortColumn")||e.has("sortDirection"))&&this._sortFilterData(),(e.has("selectable")||e.has("hiddenColumns"))&&(this._filteredData=[...this._filteredData])}},{kind:"field",key:"_sortedColumns",value:()=>(0,h.Z)(((e,t)=>t&&t.length?Object.keys(e).sort(((e,i)=>{const a=t.indexOf(e),l=t.indexOf(i);if(a!==l){if(-1===a)return 1;if(-1===l)return-1}return a-l})).reduce(((t,i)=>(t[i]=e[i],t)),{}):e))},{kind:"method",key:"render",value:function(){const e=this.localizeFunc||this.hass.localize,t=this._sortedColumns(this.columns,this.columnOrder);return o.dy` <div class="mdc-data-table"> <slot name="header" ="${this._calcTableHeight}"> ${this._filterable?o.dy` <div class="table-header"> <search-input .hass="${this.hass}" -changed="${this._handleSearchChange}" .label="${this.searchLabel}" .noLabelFloat="${this.noLabelFloat}"></search-input> </div> `:""} </slot> <div class="mdc-data-table__table ${(0,r.$)({"auto-height":this.autoHeight})}" role="table" aria-rowcount="${this._filteredData.length+1}" style="${(0,s.V)({height:this.autoHeight?53*(this._filteredData.length||1)+53+"px":`calc(100% - ${this._headerHeight}px)`})}"> <div class="mdc-data-table__header-row" role="row" aria-rowindex="1" ="${this._scrollContent}"> <slot name="header-row"> ${this.selectable?o.dy` <div class="mdc-data-table__header-cell mdc-data-table__header-cell--checkbox" role="columnheader"> <ha-checkbox class="mdc-data-table__row-checkbox" ="${this._handleHeaderRowCheckboxClick}" .indeterminate="${this._checkedRows.length&&this._checkedRows.length!==this._checkableRowsCount}" .checked="${this._checkedRows.length&&this._checkedRows.length===this._checkableRowsCount}"> </ha-checkbox> </div> `:""} ${Object.entries(t).map((([e,t])=>{if(t.hidden||(this.columnOrder&&this.columnOrder.includes(e)?this.hiddenColumns?.includes(e)??t.defaultHidden:t.defaultHidden))return o.Ld;const i=e===this.sortColumn,a={"mdc-data-table__header-cell--numeric":"numeric"===t.type,"mdc-data-table__header-cell--icon":"icon"===t.type,"mdc-data-table__header-cell--icon-button":"icon-button"===t.type,"mdc-data-table__header-cell--overflow-menu":"overflow-menu"===t.type,"mdc-data-table__header-cell--overflow":"overflow"===t.type,sortable:Boolean(t.sortable),"not-sorted":Boolean(t.sortable&&!i)};return o.dy` <div aria-label="${(0,c.o)(t.label)}" class="mdc-data-table__header-cell ${(0,r.$)(a)}" style="${(0,s.V)({minWidth:t.minWidth,maxWidth:t.maxWidth,flex:t.flex||1})}" role="columnheader" aria-sort="${(0,c.o)(i?"desc"===this.sortDirection?"descending":"ascending":void 0)}" ="${this._handleHeaderClick}" .columnId="${e}" title="${(0,c.o)(t.title)}"> ${t.sortable?o.dy` <ha-svg-icon .path="${i&&"desc"===this.sortDirection?"M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z":"M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z"}"></ha-svg-icon> `:""} <span>${t.title}</span> </div> `}))} </slot> </div> ${this._filteredData.length?o.dy` <lit-virtualizer scroller class="mdc-data-table__content scroller ha-scrollbar" ="${this._saveScrollPos}" .items="${this._groupData(this._filteredData,e,this.appendRow,this.hasFab,this.groupColumn,this.groupOrder,this._collapsedGroups)}" .keyFunction="${this._keyFunction}" .renderItem="${(e,i)=>this._renderRow(t,this.narrow,e,i)}"></lit-virtualizer> `:o.dy` <div class="mdc-data-table__content"> <div class="mdc-data-table__row" role="row"> <div class="mdc-data-table__cell grows center" role="cell"> ${this.noDataText||e("ui.components.data-table.no-data")} </div> </div> </div> `} </div> </div> `}},{kind:"field",key:"_keyFunction",value(){return e=>e?.[this.id]||e}},{kind:"field",key:"_renderRow",value(){return(e,t,i,a)=>i?i.append?o.dy`<div class="mdc-data-table__row">${i.content}</div>`:i.empty?o.dy`<div class="mdc-data-table__row empty-row"></div>`:o.dy` <div aria-rowindex="${a+2}" role="row" .rowId="${i[this.id]}" ="${this._handleRowClick}" class="mdc-data-table__row ${(0,r.$)({"mdc-data-table__row--selected":this._checkedRows.includes(String(i[this.id])),clickable:this.clickable})}" aria-selected="${(0,c.o)(!!this._checkedRows.includes(String(i[this.id]))||void 0)}" .selectable="${!1!==i.selectable}"> ${this.selectable?o.dy` <div class="mdc-data-table__cell mdc-data-table__cell--checkbox" role="cell"> <ha-checkbox class="mdc-data-table__row-checkbox" ="${this._handleRowCheckboxClick}" .rowId="${i[this.id]}" .disabled="${!1===i.selectable}" .checked="${this._checkedRows.includes(String(i[this.id]))}"> </ha-checkbox> </div> `:""} ${Object.entries(e).map((([a,l])=>t&&!l.main&&!l.showNarrow||l.hidden||(this.columnOrder&&this.columnOrder.includes(a)?this.hiddenColumns?.includes(a)??l.defaultHidden:l.defaultHidden)?o.Ld:o.dy` <div ="${this._setTitle}" ="${this._setTitle}" role="${l.main?"rowheader":"cell"}" class="mdc-data-table__cell ${(0,r.$)({"mdc-data-table__cell--flex":"flex"===l.type,"mdc-data-table__cell--numeric":"numeric"===l.type,"mdc-data-table__cell--icon":"icon"===l.type,"mdc-data-table__cell--icon-button":"icon-button"===l.type,"mdc-data-table__cell--overflow-menu":"overflow-menu"===l.type,"mdc-data-table__cell--overflow":"overflow"===l.type,forceLTR:Boolean(l.forceLTR)})}" style="${(0,s.V)({minWidth:l.minWidth,maxWidth:l.maxWidth,flex:l.flex||1})}"> ${l.template?l.template(i):t&&l.main?o.dy`<div class="primary">${i[a]}</div> <div class="secondary"> ${Object.entries(e).filter((([e,t])=>!(t.hidden||t.main||t.showNarrow||(this.columnOrder&&this.columnOrder.includes(e)?this.hiddenColumns?.includes(e)??t.defaultHidden:t.defaultHidden)))).map((([e,t],a)=>o.dy`${0!==a?" ⸱ ":o.Ld}${t.template?t.template(i):i[e]}`))} </div> ${l.extraTemplate?l.extraTemplate(i):o.Ld}`:o.dy`${i[a]}${l.extraTemplate?l.extraTemplate(i):o.Ld}`} </div> `))} </div> `:o.Ld}},{kind:"method",key:"_sortFilterData",value:async function(){const e=(new Date).getTime(),t=e-this._lastUpdate,i=e-this._curRequest;this._curRequest=e;const a=!this._lastUpdate||t>500&&i<500;let l=this.data;if(this._filter&&(l=await this._memFilterData(this.data,this._sortColumns,this._filter.trim())),!a&&this._curRequest!==e)return;const d=this.sortColumn?((e,t,i,a,l)=>x().sortData(e,t,i,a,l))(l,this._sortColumns[this.sortColumn],this.sortDirection,this.sortColumn,this.hass.locale.language):l,[o]=await Promise.all([d,y.y]),n=(new Date).getTime()-e;n<100&&await new Promise((e=>{setTimeout(e,100-n)})),(a||this._curRequest===e)&&(this._lastUpdate=e,this._filteredData=o)}},{kind:"field",key:"_groupData",value(){return(0,h.Z)(((e,t,i,a,l,d,n)=>{if(i||a||l){let r=[...e];if(l){const e=(0,_.v)(r,(e=>e[l]));e.undefined&&(e[w]=e.undefined,delete e.undefined);const i=Object.keys(e).sort(((e,t)=>{const i=d?.indexOf(e)??-1,a=d?.indexOf(t)??-1;return i!==a?-1===i?1:-1===a?-1:i-a:(0,m.$K)(["","-","—"].includes(e)?"zzz":e,["","-","—"].includes(t)?"zzz":t,this.hass.locale.language)})).reduce(((t,i)=>(t[i]=e[i],t)),{}),a=[];Object.entries(i).forEach((([e,i])=>{a.push({append:!0,content:o.dy`<div class="mdc-data-table__cell group-header" role="cell" .group="${e}" ="${this._collapseGroup}"> <ha-icon-button .path="${"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"}" class="${n.includes(e)?"collapsed":""}"> </ha-icon-button> ${e===w?t("ui.components.data-table.ungrouped"):e||""} </div>`}),n.includes(e)||a.push(...i)})),r=a}return i&&r.push({append:!0,content:i}),a&&r.push({empty:!0}),r}return e}))}},{kind:"field",key:"_memFilterData",value:()=>(0,h.Z)(((e,t,i)=>((e,t,i)=>x().filterData(e,t,i))(e,t,i)))},{kind:"method",key:"_handleHeaderClick",value:function(e){const t=e.currentTarget.columnId;this.columns[t].sortable&&(this.sortDirection&&this.sortColumn===t?"asc"===this.sortDirection?this.sortDirection="desc":this.sortDirection=null:this.sortDirection="asc",this.sortColumn=null===this.sortDirection?void 0:t,(0,f.B)(this,"sorting-changed",{column:t,direction:this.sortDirection}))}},{kind:"method",key:"_handleHeaderRowCheckboxClick",value:function(e){e.target.checked?this.selectAll():(this._checkedRows=[],this._checkedRowsChanged())}},{kind:"field",key:"_handleRowCheckboxClick",value(){return e=>{const t=e.currentTarget,i=t.rowId;if(t.checked){if(this._checkedRows.includes(i))return;this._checkedRows=[...this._checkedRows,i]}else this._checkedRows=this._checkedRows.filter((e=>e!==i));this._checkedRowsChanged()}}},{kind:"field",key:"_handleRowClick",value(){return e=>{if(e.composedPath().find((e=>["ha-checkbox","mwc-button","ha-button","ha-icon-button","ha-assist-chip"].includes(e.localName))))return;const t=e.currentTarget.rowId;(0,f.B)(this,"row-click",{id:t},{bubbles:!1})}}},{kind:"method",key:"_setTitle",value:function(e){const t=e.currentTarget;t.scrollWidth>t.offsetWidth&&t.setAttribute("title",t.innerText)}},{kind:"method",key:"_checkedRowsChanged",value:function(){this._filteredData.length&&(this._filteredData=[...this._filteredData]),(0,f.B)(this,"selection-changed",{value:this._checkedRows})}},{kind:"method",key:"_handleSearchChange",value:function(e){this.filter||this._debounceSearch(e.detail.value)}},{kind:"method",key:"_calcTableHeight",value:async function(){this.autoHeight||(await this.updateComplete,this._headerHeight=this._header.clientHeight)}},{kind:"method",decorators:[(0,n.hO)({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop,this.renderRoot.querySelector(".mdc-data-table__header-row").scrollLeft=e.target.scrollLeft}},{kind:"method",decorators:[(0,n.hO)({passive:!0})],key:"_scrollContent",value:function(e){this.renderRoot.querySelector("lit-virtualizer").scrollLeft=e.target.scrollLeft}},{kind:"field",key:"_collapseGroup",value(){return e=>{const t=e.currentTarget.group;this._collapsedGroups.includes(t)?this._collapsedGroups=this._collapsedGroups.filter((e=>e!==t)):this._collapsedGroups=[...this._collapsedGroups,t],(0,f.B)(this,"collapsed-changed",{value:this._collapsedGroups})}}},{kind:"method",key:"expandAllGroups",value:function(){this._collapsedGroups=[],(0,f.B)(this,"collapsed-changed",{value:this._collapsedGroups})}},{kind:"method",key:"collapseAllGroups",value:function(){if(!this.groupColumn||!this.data.some((e=>e[this.groupColumn])))return;const e=(0,_.v)(this.data,(e=>e[this.groupColumn]));e.undefined&&(e[w]=e.undefined,delete e.undefined),this._collapsedGroups=Object.keys(e),(0,f.B)(this,"collapsed-changed",{value:this._collapsedGroups})}},{kind:"get",static:!0,key:"styles",value:function(){return[b.$c,o.iv`:host{height:100%}.mdc-data-table__content{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;line-height:1.25rem;font-weight:400;letter-spacing:.0178571429em;text-decoration:inherit;text-transform:inherit}.mdc-data-table{background-color:var(--data-table-background-color);border-radius:4px;border-width:1px;border-style:solid;border-color:var(--divider-color);display:inline-flex;flex-direction:column;box-sizing:border-box;overflow:hidden}.mdc-data-table__row--selected{background-color:rgba(var(--rgb-primary-color),.04)}.mdc-data-table__row{display:flex;height:var(--data-table-row-height,52px);width:var(--table-row-width,100%)}.mdc-data-table__row.empty-row{height:var(--data-table-empty-row-height,var(--data-table-row-height,52px))}.mdc-data-table__row~.mdc-data-table__row{border-top:1px solid var(--divider-color)}.mdc-data-table__row.clickable:not(
.mdc-data-table__row--selected
):hover{background-color:rgba(var(--rgb-primary-text-color),.04)}.mdc-data-table__header-cell{color:var(--primary-text-color)}.mdc-data-table__cell{color:var(--primary-text-color)}.mdc-data-table__header-row{height:56px;display:flex;border-bottom:1px solid var(--divider-color);overflow:auto}.mdc-data-table__header-row::-webkit-scrollbar{display:none}.mdc-data-table__header-row{-ms-overflow-style:none;scrollbar-width:none}.mdc-data-table__cell,.mdc-data-table__header-cell{padding-right:16px;padding-left:16px;min-width:150px;align-self:center;overflow:hidden;text-overflow:ellipsis;flex-shrink:0;box-sizing:border-box}.mdc-data-table__cell.mdc-data-table__cell--flex{display:flex;overflow:initial}.mdc-data-table__cell.mdc-data-table__cell--icon{overflow:initial}.mdc-data-table__cell--checkbox,.mdc-data-table__header-cell--checkbox{padding-left:16px;padding-right:0;padding-inline-start:16px;padding-inline-end:initial;width:60px;min-width:60px}.mdc-data-table__table{height:100%;width:100%;border:0;white-space:nowrap;position:relative}.mdc-data-table__cell{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;line-height:1.25rem;font-weight:400;letter-spacing:.0178571429em;text-decoration:inherit;text-transform:inherit;flex-grow:0;flex-shrink:0}.mdc-data-table__cell a{color:inherit;text-decoration:none}.mdc-data-table__cell--numeric{text-align:var(--float-end)}.mdc-data-table__cell--icon{color:var(--secondary-text-color);text-align:center}.mdc-data-table__cell--icon,.mdc-data-table__header-cell--icon{min-width:64px;flex:0 0 64px!important}.mdc-data-table__cell--icon img{width:24px;height:24px}.mdc-data-table__header-cell.mdc-data-table__header-cell--icon{text-align:center}.mdc-data-table__header-cell.sortable.mdc-data-table__header-cell--icon:hover,.mdc-data-table__header-cell.sortable.mdc-data-table__header-cell--icon:not(
.not-sorted
){text-align:var(--float-start)}.mdc-data-table__cell--icon:first-child ha-domain-icon,.mdc-data-table__cell--icon:first-child ha-icon,.mdc-data-table__cell--icon:first-child ha-service-icon,.mdc-data-table__cell--icon:first-child ha-state-icon,.mdc-data-table__cell--icon:first-child ha-svg-icon,.mdc-data-table__cell--icon:first-child img{margin-left:8px;margin-inline-start:8px;margin-inline-end:initial}.mdc-data-table__cell--icon:first-child state-badge{margin-right:-8px;margin-inline-end:-8px;margin-inline-start:initial}.mdc-data-table__cell--icon-button,.mdc-data-table__cell--overflow-menu,.mdc-data-table__header-cell--icon-button,.mdc-data-table__header-cell--overflow-menu{min-width:64px;flex:0 0 64px!important;padding:8px}.mdc-data-table__cell--icon-button,.mdc-data-table__header-cell--icon-button{min-width:56px;width:56px}.mdc-data-table__cell--icon-button,.mdc-data-table__cell--overflow-menu{color:var(--secondary-text-color);text-overflow:clip}.mdc-data-table__cell--icon-button:first-child,.mdc-data-table__cell--icon-button:last-child,.mdc-data-table__header-cell--icon-button:first-child,.mdc-data-table__header-cell--icon-button:last-child{width:64px}.mdc-data-table__cell--icon-button:first-child,.mdc-data-table__cell--overflow-menu:first-child,.mdc-data-table__header-cell--icon-button:first-child,.mdc-data-table__header-cell--overflow-menu:first-child{padding-left:16px;padding-inline-start:16px;padding-inline-end:initial}.mdc-data-table__cell--icon-button:last-child,.mdc-data-table__cell--overflow-menu:last-child,.mdc-data-table__header-cell--icon-button:last-child,.mdc-data-table__header-cell--overflow-menu:last-child{padding-right:16px;padding-inline-end:16px;padding-inline-start:initial}.mdc-data-table__cell--overflow,.mdc-data-table__cell--overflow-menu,.mdc-data-table__header-cell--overflow,.mdc-data-table__header-cell--overflow-menu{overflow:initial}.mdc-data-table__cell--icon-button a{color:var(--secondary-text-color)}.mdc-data-table__header-cell{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;line-height:1.375rem;font-weight:500;letter-spacing:.0071428571em;text-decoration:inherit;text-transform:inherit;text-align:var(--float-start)}.mdc-data-table__header-cell--numeric{text-align:var(--float-end)}.mdc-data-table__header-cell--numeric.sortable:hover,.mdc-data-table__header-cell--numeric.sortable:not(.not-sorted){text-align:var(--float-start)}.group-header{padding-top:12px;height:var(--data-table-row-height,52px);padding-left:12px;padding-inline-start:12px;padding-inline-end:initial;width:100%;font-weight:500;display:flex;align-items:center;cursor:pointer;background-color:var(--primary-background-color)}.group-header ha-icon-button{transition:transform .2s ease}.group-header ha-icon-button.collapsed{transform:rotate(180deg)}:host{display:block}.mdc-data-table{display:block;border-width:var(--data-table-border-width,1px);height:100%}.mdc-data-table__header-cell{overflow:hidden;position:relative}.mdc-data-table__header-cell span{position:relative;left:0px;inset-inline-start:0px;inset-inline-end:initial}.mdc-data-table__header-cell.sortable{cursor:pointer}.mdc-data-table__header-cell>*{transition:var(--float-start) .2s ease}.mdc-data-table__header-cell ha-svg-icon{top:-3px;position:absolute}.mdc-data-table__header-cell.not-sorted ha-svg-icon{left:-20px;inset-inline-start:-20px;inset-inline-end:initial}.mdc-data-table__header-cell.sortable.not-sorted:hover span,.mdc-data-table__header-cell.sortable:not(.not-sorted) span{left:24px;inset-inline-start:24px;inset-inline-end:initial}.mdc-data-table__header-cell.sortable:hover.not-sorted ha-svg-icon,.mdc-data-table__header-cell.sortable:not(.not-sorted) ha-svg-icon{left:12px;inset-inline-start:12px;inset-inline-end:initial}.table-header{border-bottom:1px solid var(--divider-color)}search-input{display:block;flex:1;--mdc-text-field-fill-color:var(--sidebar-background-color);--mdc-text-field-idle-line-color:transparent}slot[name=header]{display:block}.center{text-align:center}.secondary{color:var(--secondary-text-color)}.scroller{height:calc(100% - 57px);overflow:overlay!important}.mdc-data-table__table.auto-height .scroller{overflow-y:hidden!important}.grows{flex-grow:1;flex-shrink:1}.forceLTR{direction:ltr}.clickable{cursor:pointer}lit-virtualizer{contain:size layout!important;overscroll-behavior:contain}`]}}]}}),o.oi)},83456:function(e,t,i){var a=i(44249),l=i(92444),d=i(76688),o=i(57243),n=i(15093);(0,a.Z)([(0,n.Mo)("ha-checkbox")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[d.W,o.iv`:host{--mdc-theme-secondary:var(--primary-color)}`]}]}}),l.A)},83166:function(e,t,i){var a=i(44249),l=i(72621),d=i(1105),o=i(33990),n=i(57243),r=i(15093),c=i(5111);(0,a.Z)([(0,r.Mo)("ha-textfield")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"icon",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"iconTrailing",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"autocorrect",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:"input-spellcheck"})],key:"inputSpellcheck",value:void 0},{kind:"field",decorators:[(0,r.IO)("input")],key:"formElement",value:void 0},{kind:"method",key:"updated",value:function(e){(0,l.Z)(i,"updated",this,3)([e]),(e.has("invalid")||e.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||this.validationMessage||"Invalid":""),(this.invalid||this.validateOnInitialRender||e.has("invalid")&&void 0!==e.get("invalid"))&&this.reportValidity()),e.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete")),e.has("autocorrect")&&(this.autocorrect?this.formElement.setAttribute("autocorrect",this.autocorrect):this.formElement.removeAttribute("autocorrect")),e.has("inputSpellcheck")&&(this.inputSpellcheck?this.formElement.setAttribute("spellcheck",this.inputSpellcheck):this.formElement.removeAttribute("spellcheck"))}},{kind:"method",key:"renderIcon",value:function(e,t=!1){const i=t?"trailing":"leading";return n.dy` <span class="mdc-text-field__icon mdc-text-field__icon--${i}" tabindex="${t?1:-1}"> <slot name="${i}Icon"></slot> </span> `}},{kind:"field",static:!0,key:"styles",value:()=>[o.W,n.iv`.mdc-text-field__input{width:var(--ha-textfield-input-width,100%)}.mdc-text-field:not(.mdc-text-field--with-leading-icon){padding:var(--text-field-padding,0px 16px)}.mdc-text-field__affix--suffix{padding-left:var(--text-field-suffix-padding-left,12px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,12px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:ltr}.mdc-text-field--with-leading-icon{padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,16px);direction:var(--direction)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:var(--text-field-suffix-padding-left,0px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,0px)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:var(--secondary-text-color)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--secondary-text-color)}.mdc-text-field__icon--leading{margin-inline-start:16px;margin-inline-end:8px;direction:var(--direction)}.mdc-text-field__icon--trailing{padding:var(--textfield-icon-trailing-padding,12px)}.mdc-floating-label:not(.mdc-floating-label--float-above){text-overflow:ellipsis;width:inherit;padding-right:30px;padding-inline-end:30px;padding-inline-start:initial;box-sizing:border-box;direction:var(--direction)}input{text-align:var(--text-field-text-align,start)}input[type=color]{height:20px}::-ms-reveal{display:none}:host([no-spinner]) input::-webkit-inner-spin-button,:host([no-spinner]) input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=color]::-webkit-color-swatch-wrapper{padding:0}:host([no-spinner]) input[type=number]{-moz-appearance:textfield}.mdc-text-field__ripple{overflow:hidden}.mdc-text-field{overflow:var(--text-field-overflow)}.mdc-floating-label{inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start);direction:var(--direction);text-align:var(--float-start)}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px - var(--text-field-suffix-padding-left,0px));inset-inline-start:calc(48px + var(--text-field-suffix-padding-left,0px))!important;inset-inline-end:initial!important;direction:var(--direction)}.mdc-text-field__input[type=number]{direction:var(--direction)}.mdc-text-field__affix--prefix{padding-right:var(--text-field-prefix-padding-right,2px);padding-inline-end:var(--text-field-prefix-padding-right,2px);padding-inline-start:initial}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:var(--mdc-text-field-label-ink-color)}#helper-text ha-markdown{display:inline-block}`,"rtl"===c.E.document.dir?n.iv`.mdc-floating-label,.mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field__icon--leading,.mdc-text-field__input[type=number]{direction:rtl;--direction:rtl}`:n.iv``]}]}}),d.P)},36841:function(e,t,i){var a=i(44249),l=(i(9359),i(56475),i(57243)),d=i(15093),o=(i(23334),i(37583),i(83166),i(36522));(0,a.Z)([(0,d.Mo)("search-input")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"filter",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"suffix",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"autofocus",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({type:String})],key:"label",value:void 0},{kind:"method",key:"focus",value:function(){this._input?.focus()}},{kind:"field",decorators:[(0,d.IO)("ha-textfield",!0)],key:"_input",value:void 0},{kind:"method",key:"render",value:function(){return l.dy` <ha-textfield .autofocus="${this.autofocus}" .label="${this.label||this.hass.localize("ui.common.search")}" .value="${this.filter||""}" icon .iconTrailing="${this.filter||this.suffix}" ="${this._filterInputChanged}"> <slot name="prefix" slot="leadingIcon"> <ha-svg-icon tabindex="-1" class="prefix" .path="${"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"}"></ha-svg-icon> </slot> <div class="trailing" slot="trailingIcon"> ${this.filter&&l.dy` <ha-icon-button ="${this._clearSearch}" .label="${this.hass.localize("ui.common.clear")}" .path="${"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"}" class="clear-button"></ha-icon-button> `} <slot name="suffix"></slot> </div> </ha-textfield> `}},{kind:"method",key:"_filterChanged",value:async function(e){(0,o.B)(this,"value-changed",{value:String(e)})}},{kind:"method",key:"_filterInputChanged",value:async function(e){this._filterChanged(e.target.value)}},{kind:"method",key:"_clearSearch",value:async function(){this._filterChanged("")}},{kind:"field",static:!0,key:"styles",value:()=>l.iv`:host{display:inline-flex}ha-icon-button,ha-svg-icon{color:var(--primary-text-color)}ha-svg-icon{outline:0}.clear-button{--mdc-icon-size:20px}ha-textfield{display:inherit}.trailing{display:flex;align-items:center}`}]}}),l.oi)},47641:function(e,t,i){i.d(t,{o:()=>a});const a=async()=>{await i.e("31026").then(i.bind(i,35714))}}};
//# sourceMappingURL=58529.06b7607505e0851b.js.map