iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
5 lines • 41.3 kB
JavaScript
/*! For license information please see 35333.33a1250073a02897.js.LICENSE.txt */
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["35333"],{49976:function(e,t,i){i.d(t,{U:()=>a});const a=e=>e.stopPropagation()},41307:function(e,t,i){var a=i(61701),n=i(72621),s=(i(71695),i(40251),i(47021),i(57243)),o=i(50778),l=i(35359),r=i(36522),d=i(76320);i(37583);let h,c,u,f,p=e=>e;(0,a.Z)([(0,o.Mo)("ha-expansion-panel")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"expanded",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"outlined",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({attribute:"left-chevron",type:Boolean,reflect:!0})],key:"leftChevron",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({attribute:"no-collapse",type:Boolean,reflect:!0})],key:"noCollapse",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"secondary",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_showContent",value(){return this.expanded}},{kind:"field",decorators:[(0,o.IO)(".container")],key:"_container",value:void 0},{kind:"method",key:"render",value:function(){const e=this.noCollapse?s.Ld:(0,s.dy)(h||(h=p` <ha-svg-icon .path="${0}" class="summary-icon ${0}"></ha-svg-icon> `),"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",(0,l.$)({expanded:this.expanded}));return(0,s.dy)(c||(c=p` <div class="top ${0}"> <div id="summary" class="${0}" ="${0}" ="${0}" ="${0}" ="${0}" role="button" tabindex="${0}" aria-expanded="${0}" aria-controls="sect1"> ${0} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${0} <slot class="secondary" name="secondary">${0}</slot> </div> </slot> ${0} <slot name="icons"></slot> </div> </div> <div class="container ${0}" ="${0}" role="region" aria-labelledby="summary" aria-hidden="${0}" tabindex="-1"> ${0} </div> `),(0,l.$)({expanded:this.expanded}),(0,l.$)({noCollapse:this.noCollapse}),this._toggleContainer,this._toggleContainer,this._focusChanged,this._focusChanged,this.noCollapse?-1:0,this.expanded,this.leftChevron?e:s.Ld,this.header,this.secondary,this.leftChevron?s.Ld:e,(0,l.$)({expanded:this.expanded}),this._handleTransitionEnd,!this.expanded,this._showContent?(0,s.dy)(u||(u=p`<slot></slot>`)):"")}},{kind:"method",key:"willUpdate",value:function(e){(0,n.Z)(i,"willUpdate",this,3)([e]),e.has("expanded")&&(this._showContent=this.expanded,setTimeout((()=>{this._container.style.overflow=this.expanded?"initial":"hidden"}),300))}},{kind:"method",key:"_handleTransitionEnd",value:function(){this._container.style.removeProperty("height"),this._container.style.overflow=this.expanded?"initial":"hidden",this._showContent=this.expanded}},{kind:"method",key:"_toggleContainer",value:async function(e){if(e.defaultPrevented)return;if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;if(e.preventDefault(),this.noCollapse)return;const t=!this.expanded;(0,r.B)(this,"expanded-will-change",{expanded:t}),this._container.style.overflow="hidden",t&&(this._showContent=!0,await(0,d.y)());const i=this._container.scrollHeight;this._container.style.height=`${i}px`,t||setTimeout((()=>{this._container.style.height="0px"}),0),this.expanded=t,(0,r.B)(this,"expanded-changed",{expanded:this.expanded})}},{kind:"method",key:"_focusChanged",value:function(e){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===e.type)}},{kind:"field",static:!0,key:"styles",value(){return(0,s.iv)(f||(f=p`:host{display:block}.top{display:flex;align-items:center;border-radius:var(--ha-card-border-radius,12px)}.top.expanded{border-bottom-left-radius:0px;border-bottom-right-radius:0px}.top.focused{background:var(--input-fill-color)}:host([outlined]){box-shadow:none;border-width:1px;border-style:solid;border-color:var(--outline-color);border-radius:var(--ha-card-border-radius,12px)}.summary-icon{transition:transform 150ms cubic-bezier(.4, 0, .2, 1);direction:var(--direction);margin-left:8px;margin-inline-start:8px;margin-inline-end:initial}::slotted([slot=leading-icon]),:host([left-chevron]) .summary-icon{margin-left:0;margin-right:8px;margin-inline-start:0;margin-inline-end:8px}#summary{flex:1;display:flex;padding:var(--expansion-panel-summary-padding,0 8px);min-height:48px;align-items:center;cursor:pointer;overflow:hidden;font-weight:500;outline:0}#summary.noCollapse{cursor:default}.summary-icon.expanded{transform:rotate(180deg)}.header,::slotted([slot=header]){flex:1}.container{padding:var(--expansion-panel-content-padding,0 8px);overflow:hidden;transition:height .3s cubic-bezier(.4, 0, .2, 1);height:0px}.container.expanded{height:auto}.secondary{display:block;color:var(--secondary-text-color);font-size:12px}`))}}]}}),s.oi)},59959:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HaIconOverflowMenu:()=>k});var n=i(61701),s=(i(71695),i(9359),i(70104),i(47021),i(57243)),o=i(50778),l=i(35359),r=i(28008),d=(i(34273),i(23334),i(7285),i(37583),i(56032)),h=e([d]);d=(h.then?(await h)():h)[0];let c,u,f,p,y,v,g,b,_=e=>e;const 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";let k=(0,n.Z)([(0,o.Mo)("ha-icon-overflow-menu")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Array})],key:"items",value(){return[]}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,s.dy)(c||(c=_` ${0} `),this.narrow?(0,s.dy)(u||(u=_` <ha-button-menu ="${0}" ="${0}" class="ha-icon-overflow-menu-overflow" absolute> <ha-icon-button .label="${0}" .path="${0}" slot="trigger"></ha-icon-button> ${0} </ha-button-menu>`),this._handleIconOverflowMenuOpened,this._handleIconOverflowMenuClosed,this.hass.localize("ui.common.overflow_menu"),m,this.items.map((e=>e.divider?(0,s.dy)(f||(f=_`<li divider role="separator"></li>`)):(0,s.dy)(p||(p=_`<ha-list-item graphic="icon" ?disabled="${0}" ="${0}" class="${0}"> <div slot="graphic"> <ha-svg-icon class="${0}" .path="${0}"></ha-svg-icon> </div> ${0} </ha-list-item> `),e.disabled,e.action,(0,l.$)({warning:Boolean(e.warning)}),(0,l.$)({warning:Boolean(e.warning)}),e.path,e.label)))):(0,s.dy)(y||(y=_` ${0} `),this.items.map((e=>{var t;return e.narrowOnly?s.Ld:e.divider?(0,s.dy)(v||(v=_`<div role="separator"></div>`)):(0,s.dy)(g||(g=_`<ha-tooltip .disabled="${0}" .content="${0}"> <ha-icon-button ="${0}" .label="${0}" .path="${0}" ?disabled="${0}"></ha-icon-button> </ha-tooltip>`),!e.tooltip,null!==(t=e.tooltip)&&void 0!==t?t:"",e.action,e.label,e.path,e.disabled)}))))}},{kind:"method",key:"_handleIconOverflowMenuOpened",value:function(e){e.stopPropagation();const t=this.closest(".mdc-data-table__row");t&&(t.style.zIndex="1")}},{kind:"method",key:"_handleIconOverflowMenuClosed",value:function(){const e=this.closest(".mdc-data-table__row");e&&(e.style.zIndex="")}},{kind:"get",static:!0,key:"styles",value:function(){return[r.Qx,(0,s.iv)(b||(b=_`:host{display:flex;justify-content:flex-end}li[role=separator]{border-bottom-color:var(--divider-color)}div[role=separator]{border-right:1px solid var(--divider-color);width:1px}ha-list-item[disabled] ha-svg-icon{color:var(--disabled-text-color)}`))]}}]}}),s.oi);a()}catch(c){a(c)}}))},51223:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(61701),n=(i(71695),i(47021),i(57243)),s=i(50778),o=i(94571),l=i(59847),r=i(45729),d=(i(65981),i(37583),e([r]));r=(d.then?(await d)():d)[0];let h,c,u,f,p=e=>e;(0,a.Z)([(0,s.Mo)("ha-state-icon")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"stateObj",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"stateValue",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"icon",value:void 0},{kind:"method",key:"render",value:function(){var e,t;const i=this.icon||this.stateObj&&(null===(e=this.hass)||void 0===e||null===(e=e.entities[this.stateObj.entity_id])||void 0===e?void 0:e.icon)||(null===(t=this.stateObj)||void 0===t?void 0:t.attributes.icon);if(i)return(0,n.dy)(h||(h=p`<ha-icon .icon="${0}"></ha-icon>`),i);if(!this.stateObj)return n.Ld;if(!this.hass)return this._renderFallback();const a=(0,r.gD)(this.hass,this.stateObj,this.stateValue).then((e=>e?(0,n.dy)(c||(c=p`<ha-icon .icon="${0}"></ha-icon>`),e):this._renderFallback()));return(0,n.dy)(u||(u=p`${0}`),(0,o.C)(a))}},{kind:"method",key:"_renderFallback",value:function(){const e=(0,l.N)(this.stateObj);return(0,n.dy)(f||(f=p` <ha-svg-icon .path="${0}"></ha-svg-icon> `),r.Ls[e]||r.Rb)}}]}}),n.oi);t()}catch(h){t(h)}}))},46210:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HaConfigHelpers:()=>ze});var n=i(61701),s=i(72621),o=(i(19083),i(71695),i(92745),i(9359),i(68107),i(56475),i(1331),i(31526),i(70104),i(52924),i(19423),i(40251),i(18917),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(61006),i(47021),i(60738)),l=i(18672),r=i(57243),d=i(50778),h=i(27486),c=i(22381),u=i(75011),f=i(68958),p=i(59847),y=i(83523),v=i(58776),g=i(35076),b=(i(10504),i(20130),i(53678),i(76268),i(93258)),_=(i(43082),i(86735),i(65981),i(59959)),m=(i(51868),i(51223)),k=(i(37583),i(56032)),$=i(36540),C=i(75101),w=i(15681),x=i(30635),L=i(63318),E=i(62992),A=i(57816),S=i(63860),M=i(38572),z=i(91854),H=i(76131),I=i(12939),O=i(75375),j=i(38419),B=i(6736),F=i(28008),V=i(78819),Z=i(11917),T=i(82967),D=(i(44536),i(32731)),N=i(26345),R=i(96530),P=i(79105),U=e([b,_,m,k,O,j,l]);[b,_,m,k,O,j,l]=U.then?(await U)():U;let G,X,Y,J,W,K,Q,q,ee,te,ie,ae,ne,se,oe,le,re,de,he,ce,ue,fe,pe,ye,ve,ge=e=>e;const be="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",_e="M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z",me="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",ke="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",$e="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",Ce="M7,10L12,15L17,10H7Z",we="M18.66,2C18.4,2 18.16,2.09 17.97,2.28L16.13,4.13L19.88,7.88L21.72,6.03C22.11,5.64 22.11,5 21.72,4.63L19.38,2.28C19.18,2.09 18.91,2 18.66,2M3.28,4L2,5.28L8.5,11.75L4,16.25V20H7.75L12.25,15.5L18.72,22L20,20.72L13.5,14.25L9.75,10.5L3.28,4M15.06,5.19L11.03,9.22L14.78,12.97L18.81,8.94L15.06,5.19Z",xe="M13 2V4C17.39 4.54 20.5 8.53 19.96 12.92C19.5 16.56 16.64 19.43 13 19.88V21.88C18.5 21.28 22.45 16.34 21.85 10.85C21.33 6.19 17.66 2.5 13 2M11 2C9.04 2.18 7.19 2.95 5.67 4.2L7.1 5.74C8.22 4.84 9.57 4.26 11 4.06V2M4.26 5.67C3 7.19 2.24 9.04 2.05 11H4.05C4.24 9.58 4.8 8.23 5.69 7.1L4.26 5.67M2.06 13C2.26 14.96 3.03 16.81 4.27 18.33L5.69 16.9C4.81 15.77 4.24 14.42 4.06 13H2.06M7.06 18.37L5.67 19.74C7.18 21 9.04 21.79 11 22V20C9.58 19.82 8.23 19.25 7.1 18.37H7.06Z",Le="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",Ee="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",Ae="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",Se=(e,t)=>{const i={};for(const a of e)i[t(a)]=a;return i},Me=(e,t,i)=>{var a;const n=null===(a=e[i])||void 0===a?void 0:a.config_entry_id;return n?t[n]:void 0};let ze=(0,n.Z)([(0,d.Mo)("ha-config-helpers")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:"is-wide",type:Boolean})],key:"isWide",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,f.t)({key:"helpers-table-sort",state:!1,subscribe:!1})],key:"_activeSorting",value:void 0},{kind:"field",decorators:[(0,f.t)({key:"helpers-table-grouping",state:!1,subscribe:!1})],key:"_activeGrouping",value:void 0},{kind:"field",decorators:[(0,f.t)({key:"helpers-table-collapsed",state:!1,subscribe:!1})],key:"_activeCollapsed",value:void 0},{kind:"field",decorators:[(0,f.t)({storage:"sessionStorage",key:"helpers-table-search",state:!0,subscribe:!1})],key:"_filter",value(){return""}},{kind:"field",decorators:[(0,f.t)({key:"helpers-table-column-order",state:!1,subscribe:!1})],key:"_activeColumnOrder",value:void 0},{kind:"field",decorators:[(0,f.t)({key:"helpers-table-hidden-columns",state:!1,subscribe:!1})],key:"_activeHiddenColumns",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_stateItems",value(){return[]}},{kind:"field",decorators:[(0,d.SB)()],key:"_disabledEntityEntries",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_entityEntries",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_configEntries",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_entitySource",value(){return{}}},{kind:"field",decorators:[(0,d.SB)()],key:"_selected",value(){return[]}},{kind:"field",decorators:[(0,d.SB)()],key:"_activeFilters",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_helperManifests",value:void 0},{kind:"field",decorators:[(0,f.t)({storage:"sessionStorage",key:"helpers-table-filters",state:!0,subscribe:!1})],key:"_filters",value(){return{}}},{kind:"field",decorators:[(0,d.SB)()],key:"_filteredItems",value(){return{}}},{kind:"field",decorators:[(0,d.SB)()],key:"_expandedFilter",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_categories",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_labels",value:void 0},{kind:"field",decorators:[(0,d.SB)(),(0,o.F_)({context:x.we,subscribe:!0})],key:"_entityReg",value:void 0},{kind:"field",decorators:[(0,d.SB)()],key:"_filteredStateItems",value:void 0},{kind:"field",key:"_sizeController",value(){return new l.Z(this,{callback:e=>{var t;return null===(t=e[0])||void 0===t?void 0:t.contentRect.width}})}},{kind:"field",key:"_debouncedFetchEntitySources",value(){return(0,c.D)((()=>this._fetchEntitySources()),500,!1)}},{kind:"method",key:"hassSubscribe",value:function(){return[(0,C.DJ)(this.hass,(async e=>{const t=this._configEntries?Object.assign({},this._configEntries):{};e.forEach((e=>{var i;null===e.type||"added"===e.type?t[e.entry.entry_id]=e.entry:"removed"===e.type?delete t[e.entry.entry_id]:"updated"===e.type&&(t[e.entry.entry_id]=e.entry),this._entitySource&&this._configEntries&&"loaded"===e.entry.state&&"loaded"!==(null===(i=this._configEntries[e.entry.entry_id])||void 0===i?void 0:i.state)&&this._debouncedFetchEntitySources()})),this._configEntries=t}),{type:["helper"]}),(0,L.LM)(this.hass.connection,(e=>{this._entityEntries=Se(e,(e=>e.entity_id))})),(0,S.f4)(this.hass.connection,(e=>{this._labels=e})),(0,$.U)(this.hass.connection,"helpers",(e=>{this._categories=e}))]}},{kind:"field",key:"_columns",value(){return(0,h.Z)((e=>({icon:{title:"",label:e("ui.panel.config.helpers.picker.headers.icon"),type:"icon",showNarrow:!0,moveable:!1,template:e=>e.entity?(0,r.dy)(G||(G=ge`<ha-state-icon .hass="${0}" .stateObj="${0}"></ha-state-icon>`),this.hass,e.entity):(0,r.dy)(X||(X=ge`<ha-svg-icon .path="${0}" style="color:var(--error-color)"></ha-svg-icon>`),e.icon)},name:{title:e("ui.panel.config.helpers.picker.headers.name"),main:!0,sortable:!0,filterable:!0,flex:2,direction:"asc",extraTemplate:e=>e.label_entries.length?(0,r.dy)(Y||(Y=ge` <ha-data-table-labels .labels="${0}"></ha-data-table-labels> `),e.label_entries):r.Ld},entity_id:{title:e("ui.panel.config.helpers.picker.headers.entity_id"),sortable:!0,filterable:!0},category:{title:e("ui.panel.config.helpers.picker.headers.category"),hidden:!0,groupable:!0,filterable:!0,sortable:!0},labels:{title:"",hidden:!0,filterable:!0,template:e=>e.label_entries.map((e=>e.name)).join(" ")},localized_type:{title:e("ui.panel.config.helpers.picker.headers.type"),sortable:!0,filterable:!0,groupable:!0},editable:{title:e("ui.panel.config.helpers.picker.headers.editable"),type:"icon",sortable:!0,minWidth:"88px",maxWidth:"88px",showNarrow:!0,template:e=>(0,r.dy)(J||(J=ge` ${0} `),e.editable?"":(0,r.dy)(W||(W=ge` <div tabindex="0" style="display:inline-block;position:relative"> <ha-tooltip placement="left" .content="${0}"> <ha-svg-icon .path="${0}"></ha-svg-icon> </ha-tooltip> </div> `),this.hass.localize("ui.panel.config.entities.picker.status.unmanageable"),we))},actions:{title:"",label:this.hass.localize("ui.panel.config.generic.headers.actions"),type:"overflow-menu",hideable:!1,moveable:!1,showNarrow:!0,template:e=>(0,r.dy)(K||(K=ge` <ha-icon-overflow-menu .hass="${0}" narrow .items="${0}"> </ha-icon-overflow-menu> `),this.hass,[...e.configEntry&&C.LZ.includes(e.configEntry.state)?[{path:be,label:this.hass.localize("ui.panel.config.helpers.picker.error_information"),warning:!0,action:()=>this._showError(e)}]:[],{path:ke,label:this.hass.localize("ui.panel.config.automation.picker.show_settings"),action:()=>this._openSettings(e)},{path:Ee,label:this.hass.localize("ui.panel.config.automation.picker."+(e.category?"edit_category":"assign_category")),action:()=>this._editCategory(e)},...e.configEntry&&e.editable&&C.LZ.includes(e.configEntry.state)&&void 0===e.entity?[{path:Ae,label:this.hass.localize("ui.common.delete"),warning:!0,action:()=>this._deleteEntry(e)}]:[]])}})))}},{kind:"field",key:"_getItems",value(){return(0,h.Z)(((e,t,i,a,n,s,o,l,r)=>{if(null===r)return[];const d=Object.assign({},n);return[...t.map((e=>{const t=Me(a,n,e.entity_id);return t&&delete d[t.entry_id],{id:e.entity_id,name:e.attributes.friendly_name||"",entity_id:e.entity_id,editable:void 0!==t||e.attributes.editable,type:t?t.domain:this._entitySource[e.entity_id]||(0,p.N)(e),configEntry:t,entity:e}})),...Object.values(d).map((e=>{const t=Object.values(a).find((t=>t.config_entry_id===e.entry_id));return{id:e.entry_id,entity_id:"",icon:"setup_in_progress"===e.state?xe:be,name:e.title||"",editable:!0,type:e.domain,configEntry:e,entity:void 0,selectable:!1,disabled:!(null==t||!t.disabled_by)}})).filter((e=>!e.disabled)),...(i||[]).map((e=>({id:e.entity_id,entity_id:e.entity_id,icon:_e,name:e.name||e.original_name||e.entity_id,editable:!0,type:e.platform,configEntry:void 0,entity:void 0,selectable:!0,disabled:!0})))].filter((e=>!r||(null==r?void 0:r.includes(e.entity_id)))).map((t=>{var i;const a=s.find((e=>e.entity_id===t.entity_id)),n=l&&(null==a?void 0:a.labels),r=null==a?void 0:a.categories.helpers;return Object.assign(Object.assign({},t),{},{localized_type:(0,A.Lh)(e,t.type)||e(`ui.panel.config.helpers.types.${t.type}`)||t.type,label_entries:(n||[]).map((e=>l.find((t=>t.label_id===e)))),category:r?null==o||null===(i=o.find((e=>e.category_id===r)))||void 0===i?void 0:i.name:void 0})}))}))}},{kind:"method",key:"_labelsForEntity",value:function(e){var t,i;return(null===(t=this.hass.entities[e])||void 0===t?void 0:t.labels)||(null===(i=this._entityReg.find((t=>t.entity_id===e)))||void 0===i?void 0:i.labels)||[]}},{kind:"method",key:"render",value:function(){var e,t,i;if(!this.hass||void 0===this._stateItems||void 0===this._entityEntries||void 0===this._configEntries)return(0,r.dy)(Q||(Q=ge`<hass-loading-screen></hass-loading-screen>`));const a=(0,r.dy)(q||(q=ge`${0} <ha-md-menu-item .value="${0}" .clickAction="${0}"> <div slot="headline"> ${0} </div> </ha-md-menu-item> <ha-md-divider role="separator" tabindex="-1"></ha-md-divider> <ha-md-menu-item .clickAction="${0}"> <div slot="headline"> ${0} </div> </ha-md-menu-item>`),null===(e=this._categories)||void 0===e?void 0:e.map((e=>(0,r.dy)(ee||(ee=ge`<ha-md-menu-item .value="${0}" .clickAction="${0}"> ${0} <div slot="headline">${0}</div> </ha-md-menu-item>`),e.category_id,this._handleBulkCategory,e.icon?(0,r.dy)(te||(te=ge`<ha-icon slot="start" .icon="${0}"></ha-icon>`),e.icon):(0,r.dy)(ie||(ie=ge`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),Ee),e.name))),null,this._handleBulkCategory,this.hass.localize("ui.panel.config.automation.picker.bulk_actions.no_category"),this._bulkCreateCategory,this.hass.localize("ui.panel.config.category.editor.add")),n=(0,r.dy)(ae||(ae=ge`${0}<ha-md-divider role="separator" tabindex="-1"></ha-md-divider> <ha-md-menu-item .clickAction="${0}"> <div slot="headline"> ${0} </div> </ha-md-menu-item>`),null===(t=this._labels)||void 0===t?void 0:t.map((e=>{const t=e.color?(0,u.I)(e.color):void 0,i=this._selected.every((t=>this._labelsForEntity(t).includes(e.label_id))),a=!i&&this._selected.some((t=>this._labelsForEntity(t).includes(e.label_id)));return(0,r.dy)(ne||(ne=ge`<ha-md-menu-item .value="${0}" .action="${0}" ="${0}" keep-open> <ha-checkbox slot="start" .checked="${0}" .indeterminate="${0}" reducedTouchTarget></ha-checkbox> <ha-label style="${0}"> ${0} ${0} </ha-label> </ha-md-menu-item> `),e.label_id,i?"remove":"add",this._handleBulkLabel,i,a,t?`--color: ${t}`:"",e.icon?(0,r.dy)(se||(se=ge`<ha-icon slot="icon" .icon="${0}"></ha-icon>`),e.icon):r.Ld,e.name)})),this._bulkCreateLabel,this.hass.localize("ui.panel.config.labels.add_label")),s=this._sizeController.value&&this._sizeController.value<700||!this._sizeController.value&&"docked"===this.hass.dockedSidebar,o=this._getItems(this.hass.localize,this._stateItems,this._disabledEntityEntries||[],this._entityEntries,this._configEntries,this._entityReg,this._categories,this._labels,this._filteredStateItems);return(0,r.dy)(oe||(oe=ge` <hass-tabs-subpage-data-table .hass="${0}" .narrow="${0}" back-path="/config" .route="${0}" .tabs="${0}" .searchLabel="${0}" selectable .selected="${0}" -changed="${0}" has-filters .filters="${0}" .columns="${0}" .data="${0}" .initialGroupColumn="${0}" .initialCollapsedGroups="${0}" .initialSorting="${0}" .columnOrder="${0}" .hiddenColumns="${0}" -changed="${0}" -changed="${0}" -changed="${0}" -changed="${0}" .activeFilters="${0}" -filter="${0}" -click="${0}" .filter="${0}" -changed="${0}" has-fab clickable .noDataText="${0}" class="${0}"> <ha-filter-floor-areas .hass="${0}" .type="${0}" .value="${0}" -table-filter-changed="${0}" slot="filter-pane" .expanded="${0}" .narrow="${0}" -changed="${0}"></ha-filter-floor-areas> <ha-filter-devices .hass="${0}" .type="${0}" .value="${0}" -table-filter-changed="${0}" slot="filter-pane" .expanded="${0}" .narrow="${0}" -changed="${0}"></ha-filter-devices> <ha-filter-labels .hass="${0}" .value="${0}" -table-filter-changed="${0}" slot="filter-pane" .expanded="${0}" .narrow="${0}" -changed="${0}"></ha-filter-labels> <ha-filter-categories .hass="${0}" scope="helpers" .value="${0}" -table-filter-changed="${0}" slot="filter-pane" .expanded="${0}" .narrow="${0}" -changed="${0}"></ha-filter-categories> ${0} ${0} <ha-integration-overflow-menu .hass="${0}" slot="toolbar-icon"></ha-integration-overflow-menu> <ha-fab slot="fab" .label="${0}" extended ="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-fab> </hass-tabs-subpage-data-table> `),this.hass,this.narrow,this.route,T.configSections.devices,this.hass.localize("ui.panel.config.helpers.picker.search",{number:o.length}),this._selected.length,this._handleSelectionChanged,Object.values(this._filters).filter((e=>Array.isArray(e)?e.length:e&&Object.values(e).some((e=>Array.isArray(e)?e.length:e)))).length,this._columns(this.hass.localize),o,null!==(i=this._activeGrouping)&&void 0!==i?i:"category",this._activeCollapsed,this._activeSorting,this._activeColumnOrder,this._activeHiddenColumns,this._handleColumnsChanged,this._handleSortingChanged,this._handleGroupingChanged,this._handleCollapseChanged,this._activeFilters,this._clearFilter,this._openEditDialog,this._filter,this._handleSearchChange,this.hass.localize("ui.panel.config.helpers.picker.no_helpers"),this.narrow?"narrow":"",this.hass,"entity",this._filters["ha-filter-floor-areas"],this._filterChanged,"ha-filter-floor-areas"===this._expandedFilter,this.narrow,this._filterExpanded,this.hass,"entity",this._filters["ha-filter-devices"],this._filterChanged,"ha-filter-devices"===this._expandedFilter,this.narrow,this._filterExpanded,this.hass,this._filters["ha-filter-labels"],this._filterChanged,"ha-filter-labels"===this._expandedFilter,this.narrow,this._filterExpanded,this.hass,this._filters["ha-filter-categories"],this._filterChanged,"ha-filter-categories"===this._expandedFilter,this.narrow,this._filterExpanded,this.narrow?r.Ld:(0,r.dy)(le||(le=ge`<ha-md-button-menu slot="selection-bar"> <ha-assist-chip slot="trigger" .label="${0}"> <ha-svg-icon slot="trailing-icon" .path="${0}"></ha-svg-icon> </ha-assist-chip> ${0} </ha-md-button-menu> ${0}`),this.hass.localize("ui.panel.config.automation.picker.bulk_actions.move_category"),Ce,a,s?r.Ld:(0,r.dy)(re||(re=ge`<ha-md-button-menu slot="selection-bar"> <ha-assist-chip slot="trigger" .label="${0}"> <ha-svg-icon slot="trailing-icon" .path="${0}"></ha-svg-icon> </ha-assist-chip> ${0} </ha-md-button-menu>`),this.hass.localize("ui.panel.config.automation.picker.bulk_actions.add_label"),Ce,n)),this.narrow||s?(0,r.dy)(de||(de=ge` <ha-md-button-menu has-overflow slot="selection-bar"> ${0} <ha-svg-icon slot="trailing-icon" .path="${0}"></ha-svg-icon> ${0} ${0} </ha-md-button-menu>`),this.narrow?(0,r.dy)(he||(he=ge`<ha-assist-chip .label="${0}" slot="trigger"> <ha-svg-icon slot="trailing-icon" .path="${0}"></ha-svg-icon> </ha-assist-chip>`),this.hass.localize("ui.panel.config.automation.picker.bulk_action"),Ce):(0,r.dy)(ce||(ce=ge`<ha-icon-button .path="${0}" .label="${0}" slot="trigger"></ha-icon-button>`),$e,this.hass.localize("ui.panel.config.automation.picker.bulk_action")),Ce,this.narrow?(0,r.dy)(ue||(ue=ge`<ha-sub-menu> <ha-md-menu-item slot="item"> <div slot="headline"> ${0} </div> <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> </ha-md-menu-item> <ha-menu slot="menu">${0}</ha-menu> </ha-sub-menu>`),this.hass.localize("ui.panel.config.automation.picker.bulk_actions.move_category"),me,a):r.Ld,this.narrow||"docked"===this.hass.dockedSidebar?(0,r.dy)(fe||(fe=ge` <ha-sub-menu> <ha-md-menu-item slot="item"> <div slot="headline"> ${0} </div> <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> </ha-md-menu-item> <ha-menu slot="menu">${0}</ha-menu> </ha-sub-menu>`),this.hass.localize("ui.panel.config.automation.picker.bulk_actions.add_label"),me,n):r.Ld):r.Ld,this.hass,this.hass.localize("ui.panel.config.helpers.picker.create_helper"),this._createHelper,Le)}},{kind:"method",key:"_filterExpanded",value:function(e){e.detail.expanded?this._expandedFilter=e.target.localName:this._expandedFilter===e.target.localName&&(this._expandedFilter=void 0)}},{kind:"method",key:"_filterChanged",value:function(e){const t=e.target.localName;this._filters=Object.assign(Object.assign({},this._filters),{},{[t]:e.detail.value}),this._filteredItems=Object.assign(Object.assign({},this._filteredItems),{},{[t]:e.detail.items}),this._applyFilters()}},{kind:"method",key:"_applyFilters",value:function(){const e=Object.entries(this._filters);let t;Object.values(this._filteredItems).forEach((e=>{e&&(t=t?"intersection"in t?t.intersection(e):new Set([...t].filter((t=>e.has(t)))):e)}));for(const[i,a]of e){if("ha-filter-labels"===i&&Array.isArray(a)&&a.length){const e=new Set;if(this._stateItems.filter((e=>{var t;return null===(t=this._entityReg.find((t=>t.entity_id===e.entity_id)))||void 0===t?void 0:t.labels.some((e=>a.includes(e)))})).forEach((t=>e.add(t.entity_id))),(this._disabledEntityEntries||[]).filter((e=>e.labels.some((e=>a.includes(e))))).forEach((t=>e.add(t.entity_id))),!t){t=e;continue}t="intersection"in t?t.intersection(e):new Set([...t].filter((t=>e.has(t))))}if("ha-filter-categories"===i&&Array.isArray(a)&&a.length){const e=new Set;if(this._stateItems.filter((e=>{var t;return a[0]===(null===(t=this._entityReg.find((t=>t.entity_id===e.entity_id)))||void 0===t?void 0:t.categories.helpers)})).forEach((t=>e.add(t.entity_id))),(this._disabledEntityEntries||[]).filter((e=>a[0]===e.categories.helpers)).forEach((t=>e.add(t.entity_id))),!t){t=e;continue}t="intersection"in t?t.intersection(e):new Set([...t].filter((t=>e.has(t))))}}this._filteredStateItems=t?[...t]:void 0}},{kind:"method",key:"_clearFilter",value:function(){this._filters={},this._filteredItems={},this._applyFilters()}},{kind:"method",key:"_editCategory",value:function(e){const t=this._entityReg.find((t=>t.entity_id===e.entity_id));t?(0,V.U)(this,{scope:"helpers",entityReg:t}):(0,H.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.automation.picker.no_category_support"),text:this.hass.localize("ui.panel.config.automation.picker.no_category_entity_reg")})}},{kind:"field",key:"_handleBulkCategory",value(){return e=>{const t=e.value;this._bulkAddCategory(t)}}},{kind:"method",key:"_bulkAddCategory",value:async function(e){const t=[];this._selected.forEach((i=>{t.push((0,L.Nv)(this.hass,i,{categories:{helpers:e}}))}));const i=await Promise.allSettled(t);if((0,g.M)(i)){const e=(0,g.a)(i);(0,H.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.common.multiselect.failed",{number:e.length}),text:(0,r.dy)(pe||(pe=ge`<pre>
${0}</pre>`),e.map((e=>e.reason.message||e.reason.code||e.reason)).join("\r\n"))})}}},{kind:"method",key:"_handleBulkLabel",value:async function(e){const t=e.currentTarget.value,i=e.currentTarget.action;this._bulkLabel(t,i)}},{kind:"method",key:"_bulkLabel",value:async function(e,t){const i=[];this._selected.forEach((a=>{const n=this._labelsForEntity(a);i.push((0,L.Nv)(this.hass,a,{labels:"add"===t?n.concat(e):n.filter((t=>t!==e))}))}));const a=await Promise.allSettled(i);if((0,g.M)(a)){const e=(0,g.a)(a);(0,H.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.common.multiselect.failed",{number:e.length}),text:(0,r.dy)(ye||(ye=ge`<pre>
${0}</pre>`),e.map((e=>e.reason.message||e.reason.code||e.reason)).join("\r\n"))})}}},{kind:"method",key:"_handleSelectionChanged",value:function(e){this._selected=e.detail.value}},{kind:"method",key:"firstUpdated",value:function(e){(0,s.Z)(i,"firstUpdated",this,3)([e]),this._fetchEntitySources(),"/add"===this.route.path&&this._handleAdd()}},{kind:"method",key:"_fetchEntitySources",value:async function(){const[e,t]=await Promise.all([(0,E.m)(this.hass),(0,A.F3)(this.hass)]),i={};for(const s of t)"helper"===s.integration_type&&(i[s.domain]=s);this._helperManifests=i;const a={},n=new Set;for(const[s,o]of Object.entries(e)){const e=o.domain;e in i&&(a[s]=e,n.add(e))}n.size&&this.hass.loadBackendTranslation("title",[...n]),this._entitySource=a}},{kind:"method",key:"_handleAdd",value:async function(){var e;const t=(0,v.io)("domain");if((0,y.c)("/config/helpers",{replace:!0}),!t)return;if((0,R.X)(t))return void(0,P.j)(this,{domain:t});if(!(await(0,w.d4)(this.hass,["helper"])).includes(t)){return(await(0,w.d4)(this.hass,["device","hub","service"])).includes(t)?void(0,y.c)(`/config/integrations/add?domain=${t}`,{replace:!0}):void(0,H.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.error"),text:this.hass.localize("ui.panel.config.integrations.config_flow.no_config_flow")})}const i=await this.hass.loadBackendTranslation("title",t,!0);await(0,H.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.confirm_new",{integration:(0,A.Lh)(i,t)})})&&(0,M.t)(this,{startFlowHandler:t,manifest:await(0,A.t4)(this.hass,t),showAdvanced:null===(e=this.hass.userData)||void 0===e?void 0:e.showAdvanced})}},{kind:"method",key:"willUpdate",value:function(e){if((0,s.Z)(i,"willUpdate",this,3)([e]),!this._entityEntries||!this._configEntries)return;(e.has("_helperManifests")||e.has("_entityEntries")||e.has("_configEntries"))&&this._helperManifests&&(this._disabledEntityEntries=Object.values(this._entityEntries).filter((e=>e.disabled_by&&(e.platform in this._helperManifests||e.config_entry_id&&e.config_entry_id in this._configEntries))));let t=!this._stateItems||e.has("_entityEntries")||e.has("_configEntries")||e.has("_entitySource");if(!t&&e.has("hass")){const i=e.get("hass");t=!i||i.states!==this.hass.states}if(!t)return;const a=Object.keys(this._entitySource),n=Object.values(this.hass.states).filter((e=>a.includes(e.entity_id)||(0,R.X)((0,p.N)(e))));this._stateItems.length===n.length&&this._stateItems.every(((e,t)=>n[t]===e))||(this._stateItems=n)}},{kind:"method",key:"_openEditDialog",value:async function(e){const t=e.detail.id;t.includes(".")?(0,I.A)(this,{entityId:t}):(0,z.c)(this,this._configEntries[t])}},{kind:"method",key:"_showError",value:function(e){(0,H.showAlertDialog)(this,{title:this.hass.localize("ui.errors.config.configuration_error"),text:(0,D.x)(this.hass,e.configEntry),warning:!0})}},{kind:"method",key:"_deleteEntry",value:async function(e){await(0,H.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_title",{title:e.configEntry.title}),text:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_text"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0})&&(0,C.iJ)(this.hass,e.id)}},{kind:"method",key:"_openSettings",value:function(e){e.entity?(0,I.A)(this,{entityId:e.entity_id,view:"settings"}):(0,z.c)(this,e.configEntry)}},{kind:"method",key:"_createHelper",value:function(){(0,P.j)(this,{})}},{kind:"field",key:"_bulkCreateCategory",value(){return()=>{(0,Z.n)(this,{scope:"helpers",createEntry:async e=>{const t=await(0,$.DM)(this.hass,"helpers",e);return this._bulkAddCategory(t.category_id),t}})}}},{kind:"field",key:"_bulkCreateLabel",value(){return()=>{(0,N.T)(this,{createEntry:async e=>{const t=await(0,S.jo)(this.hass,e);return this._bulkLabel(t.label_id,"add"),t}})}}},{kind:"method",key:"_handleSortingChanged",value:function(e){this._activeSorting=e.detail}},{kind:"method",key:"_handleGroupingChanged",value:function(e){var t;this._activeGrouping=null!==(t=e.detail.value)&&void 0!==t?t:""}},{kind:"method",key:"_handleCollapseChanged",value:function(e){this._activeCollapsed=e.detail.value}},{kind:"method",key:"_handleSearchChange",value:function(e){this._filter=e.detail.value}},{kind:"method",key:"_handleColumnsChanged",value:function(e){this._activeColumnOrder=e.detail.columnOrder,this._activeHiddenColumns=e.detail.hiddenColumns}},{kind:"get",static:!0,key:"styles",value:function(){return[F.Qx,(0,r.iv)(ve||(ve=ge`:host{display:block}hass-tabs-subpage-data-table{--data-table-row-height:60px}hass-tabs-subpage-data-table.narrow{--data-table-row-height:72px}ha-assist-chip{--ha-assist-chip-container-shape:10px}ha-md-button-menu ha-assist-chip{--md-assist-chip-trailing-space:8px}ha-label{--ha-label-background-color:var(--color, var(--grey-color));--ha-label-background-opacity:0.5}`))]}}]}}),(0,B.f)(r.oi));a()}catch(G){a(G)}}))},79105:function(e,t,i){i.d(t,{j:()=>s});i(71695),i(40251),i(47021);var a=i(36522);const n=()=>Promise.all([i.e("97983"),i.e("99287"),i.e("58640"),i.e("65186"),i.e("27933")]).then(i.bind(i,49335)),s=(e,t)=>{(0,a.B)(e,"show-dialog",{dialogTag:"dialog-helper-detail",dialogImport:n,dialogParams:t})}},18917:function(e,t,i){var a=i(40810),n=i(97934),s=i(63983),o=i(92395),l=i(72049),r=i(73994);a({target:"Promise",stat:!0,forced:i(79083)},{allSettled:function(e){var t=this,i=o.f(t),a=i.resolve,d=i.reject,h=l((function(){var i=s(t.resolve),o=[],l=0,d=1;r(e,(function(e){var s=l++,r=!1;d++,n(i,t,e).then((function(e){r||(r=!0,o[s]={status:"fulfilled",value:e},--d||a(o))}),(function(e){r||(r=!0,o[s]={status:"rejected",reason:e},--d||a(o))}))})),--d||a(o)}));return h.error&&d(h.value),i.promise}})},74763:function(e,t,i){i.d(t,{l:()=>u});var a=i(9065),n=i(50778),s=(i(67351),i(71695),i(9359),i(56475),i(1331),i(47021),i(57243)),o=i(4077);let l,r=e=>e;class d extends s.oi{get chips(){return this.childElements.filter((e=>e instanceof o.A))}constructor(){super(),this.internals=this.attachInternals(),s.sk||(this.addEventListener("focusin",this.updateTabIndices.bind(this)),this.addEventListener("update-focus",this.updateTabIndices.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.internals.role="toolbar")}render(){return(0,s.dy)(l||(l=r`<slot ="${0}"></slot>`),this.updateTabIndices)}handleKeyDown(e){const t="ArrowLeft"===e.key,i="ArrowRight"===e.key,a="Home"===e.key,n="End"===e.key;if(!(t||i||a||n))return;const{chips:s}=this;if(s.length<2)return;if(e.preventDefault(),a||n){return s[a?0:s.length-1].focus({trailing:n}),void this.updateTabIndices()}const o="rtl"===getComputedStyle(this).direction?t:i,l=s.find((e=>e.matches(":focus-within")));if(!l){return(o?s[0]:s[s.length-1]).focus({trailing:!o}),void this.updateTabIndices()}const r=s.indexOf(l);let d=o?r+1:r-1;for(;d!==r;){d>=s.length?d=0:d<0&&(d=s.length-1);const e=s[d];if(!e.disabled||e.alwaysFocusable){e.focus({trailing:!o}),this.updateTabIndices();break}o?d++:d--}}updateTabIndices(){const{chips:e}=this;let t;for(const i of e){const e=i.alwaysFocusable||!i.disabled;i.matches(":focus-within")&&e?t=i:(e&&!t&&(t=i),i.tabIndex=-1)}t&&(t.tabIndex=0)}}(0,a.__decorate)([(0,n.NH)()],d.prototype,"childElements",void 0);let h;const c=(0,s.iv)(h||(h=(e=>e)`:host{display:flex;flex-wrap:wrap;gap:8px}`));let u=class extends d{};u.styles=[c],u=(0,a.__decorate)([(0,n.Mo)("md-chip-set")],u)},27608:function(e,t,i){i.d(t,{MT:()=>n,RV:()=>a,U2:()=>l,ZH:()=>d,t8:()=>r});i(71695),i(92745),i(9359),i(31526),i(70104),i(40251),i(47021);function a(e){return new Promise(((t,i)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>i(e.error)}))}function n(e,t){const i=indexedDB.open(e);i.onupgradeneeded=()=>i.result.createObjectStore(t);const n=a(i);return(e,i)=>n.then((a=>i(a.transaction(t,e).objectStore(t))))}let s;function o(){return s||(s=n("keyval-store","keyval")),s}function l(e,t=o()){return t("readonly",(t=>a(t.get(e))))}function r(e,t,i=o()){return i("readwrite",(i=>(i.put(t,e),a(i.transaction))))}function d(e=o()){return e("readwrite",(e=>(e.clear(),a(e.transaction))))}},91583:function(e,t,i){i.d(t,{r:()=>l});i(52247),i(71695),i(47021);var a=i(2841),n=i(45779),s=i(53232);const o=(e,t,i)=>{const a=new Map;for(let n=t;n<=i;n++)a.set(e[n],n);return a},l=(0,n.XM)(class extends n.Xe{constructor(e){if(super(e),e.type!==n.pX.CHILD)throw Error("repeat() can only be used in text expressions")}ct(e,t,i){let a;void 0===i?i=t:void 0!==t&&(a=t);const n=[],s=[];let o=0;for(const l of e)n[o]=a?a(l,o):o,s[o]=i(l,o),o++;return{values:s,keys:n}}render(e,t,i){return this.ct(e,t,i).values}update(e,[t,i,n]){var l;const r=(0,s.i9)(e),{values:d,keys:h}=this.ct(t,i,n);if(!Array.isArray(r))return this.ut=h,d;const c=null!==(l=this.ut)&&void 0!==l?l:this.ut=[],u=[];let f,p,y=0,v=r.length-1,g=0,b=d.length-1;for(;y<=v&&g<=b;)if(null===r[y])y++;else if(null===r[v])v--;else if(c[y]===h[g])u[g]=(0,s.fk)(r[y],d[g]),y++,g++;else if(c[v]===h[b])u[b]=(0,s.fk)(r[v],d[b]),v--,b--;else if(c[y]===h[b])u[b]=(0,s.fk)(r[y],d[b]),(0,s._Y)(e,u[b+1],r[y]),y++,b--;else if(c[v]===h[g])u[g]=(0,s.fk)(r[v],d[g]),(0,s._Y)(e,r[y],r[v]),v--,g++;else if(void 0===f&&(f=o(h,g,b),p=o(c,y,v)),f.has(c[y]))if(f.has(c[v])){const t=p.get(h[g]),i=void 0!==t?r[t]:null;if(null===i){const t=(0,s._Y)(e,r[y]);(0,s.fk)(t,d[g]),u[g]=t}else u[g]=(0,s.fk)(i,d[g]),(0,s._Y)(e,r[y],i),r[t]=null;g++}else(0,s.ws)(r[v]),v--;else(0,s.ws)(r[y]),y++;for(;g<=b;){const t=(0,s._Y)(e,u[b+1]);(0,s.fk)(t,d[g]),u[g++]=t}for(;y<=v;){const e=r[y++];null!==e&&(0,s.ws)(e)}return this.ut=h,(0,s.hl)(e,u),a.Jb}})}}]);
//# sourceMappingURL=35333.33a1250073a02897.js.map