"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["60419"],{26218:function(t,e,a){a.d(e,{a:function(){return i}});a(16280);const o=(0,a(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function i(t){return(e,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const i=e.connectedCallback;e.connectedCallback=function(){i.call(this);const e=this[a];e&&this.updateComplete.then(()=>{const a=this.renderRoot.querySelector(t);a&&setTimeout(()=>{a.scrollTop=e},0)})};const r=Object.getOwnPropertyDescriptor(e,a);let n;if(void 0===r)n={get(){var t;return this[`__${String(a)}`]||(null===(t=history.state)||void 0===t?void 0:t.scrollPosition)},set(t){o(t),this[`__${String(a)}`]=t},configurable:!0,enumerable:!0};else{const t=r.set;n=Object.assign(Object.assign({},r),{},{set(e){o(e),this[`__${String(a)}`]=e,null==t||t.call(this,e)}})}Object.defineProperty(e,a,n)}}},68348:function(t,e,a){a.d(e,{u:function(){return o}});a(18111),a(13579);const o=t=>{var e,a;if(t.some(t=>"tagName"in t&&("HA-MENU"===t.tagName||"HA-CODE-EDITOR"===t.tagName)))return!1;const o=t[0];if("TEXTAREA"===o.tagName||"HA-SELECT"===(null===(e=o.parentElement)||void 0===e?void 0:e.tagName)||"HA-DROPDOWN"===(null===(a=o.parentElement)||void 0===a?void 0:a.tagName))return!1;if("INPUT"!==o.tagName)return!0;switch(o.type){case"button":case"checkbox":case"hidden":case"radio":case"range":return!0;default:return!1}}},76830:function(t,e,a){a.d(e,{d:function(){return o}});a(18111),a(20116);const o=(t,e=!0)=>{if(t.defaultPrevented||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey)return;const a=t.composedPath().find(t=>"A"===t.tagName);if(!a||a.target||a.hasAttribute("download")||"external"===a.getAttribute("rel"))return;let o=a.href;if(!o||-1!==o.indexOf("mailto:"))return;const i=window.location,r=i.origin||i.protocol+"//"+i.host;return o.startsWith(r)&&(o=o.slice(r.length),"#"!==o)?(e&&t.preventDefault(),o):void 0}},57237:function(t,e,a){a.d(e,{d:function(){return o}});const o=t=>t.stopPropagation()},36961:function(t,e,a){a.d(e,{q:function(){return i}});var o;a(31436),a(74423),a(55081);const i=Boolean(globalThis.ElementInternals)&&(null===(o=globalThis.HTMLElement)||void 0===o||null===(o=o.prototype.attachInternals)||void 0===o?void 0:o.toString().includes("[native code]"))},77796:function(t,e,a){a.d(e,{n:function(){return o}});a(62953);const o=(t,e,a=!0,o=!0)=>{let i,r=0;const n=(...n)=>{const s=()=>{r=!1===a?0:Date.now(),i=void 0,t(...n)},l=Date.now();r||!1!==a||(r=l);const d=e-(l-r);d<=0||d>e?(i&&(clearTimeout(i),i=void 0),r=l,t(...n)):i||!1===o||(i=window.setTimeout(s,d))};return n.cancel=()=>{clearTimeout(i),i=void 0,r=0},n}},64481:function(t,e,a){a.d(e,{D:function(){return i},J:function(){return r}});a(3362);let o=!1;try{o="true"===window.localStorage.getItem("disableViewTransition")}catch(n){}const i=t=>{o=t},r=t=>{if(!document.startViewTransition||o)return t(!1),Promise.resolve();let e=!1;try{return document.startViewTransition(()=>{e=!0,t(!0)}).finished}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),e?Promise.reject(a):(t(!1),Promise.resolve())}}},34296:function(t,e,a){a(62953);var o=a(40445),i=a(96229),r=a(26069),n=a(91735),s=a(42034),l=a(96196),d=a(77845);let c,h,p,u,v=t=>t;class g extends i.k{renderOutline(){return this.filled?(0,l.qy)(c||(c=v`<span class="filled"></span>`)):super.renderOutline()}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{active:this.active})}renderPrimaryContent(){return(0,l.qy)(h||(h=v` <span class="leading icon" aria-hidden="true"> ${0} </span> <span class="label">${0}</span> <span class="touch"></span> <span class="trailing leading icon" aria-hidden="true"> ${0} </span> `),this.renderLeadingIcon(),this.label,this.renderTrailingIcon())}renderTrailingIcon(){return(0,l.qy)(p||(p=v`<slot name="trailing-icon"></slot>`))}constructor(...t){super(...t),this.filled=!1,this.active=!1}}g.styles=[n.R,s.R,r.R,(0,l.AH)(u||(u=v`:host{--md-sys-color-primary:var(--primary-text-color);--md-sys-color-on-surface:var(--primary-text-color);--md-assist-chip-container-shape:var(
          --ha-assist-chip-container-shape,
          16px
        );--md-assist-chip-outline-color:var(--outline-color);--md-assist-chip-label-text-weight:400}.filled{display:flex;pointer-events:none;border-radius:inherit;inset:0;position:absolute;background-color:var(--ha-assist-chip-filled-container-color)}::slotted([slot=icon]),::slotted([slot=trailing-icon]){display:flex;--mdc-icon-size:var(--md-input-chip-icon-size, 18px);font-size:var(--_label-text-size)!important}.trailing.icon ::slotted(*),.trailing.icon svg{margin-inline-end:unset;margin-inline-start:var(--_icon-label-space)}::before{background:var(--ha-assist-chip-container-color,transparent);opacity:var(--ha-assist-chip-container-opacity, 1)}:where(.active)::before{background:var(--ha-assist-chip-active-container-color);opacity:var(--ha-assist-chip-active-container-opacity)}.label{font-family:var(--ha-font-family-body)}`))],(0,o.Cg)([(0,d.MZ)({type:Boolean,reflect:!0})],g.prototype,"filled",void 0),(0,o.Cg)([(0,d.MZ)({type:Boolean})],g.prototype,"active",void 0),g=(0,o.Cg)([(0,d.EM)("ha-assist-chip")],g)},9503:function(t,e,a){var o=a(40445),i=a(69162),r=a(47191),n=a(96196),s=a(77845);let l;class d extends i.L{}d.styles=[r.R,(0,n.AH)(l||(l=(t=>t)`:host{--mdc-theme-secondary:var(--primary-color)}`))],d=(0,o.Cg)([(0,s.EM)("ha-checkbox")],d)},70947:function(t,e,a){a(62953);var o=a(40445),i=a(90075),r=(a(43776),a(96196)),n=a(77845);a(67094);let s,l,d=t=>t;class c extends i.A{renderCheckboxIcon(){return(0,r.qy)(s||(s=d` <ha-svg-icon id="check" part="checkmark" .path="${0}"></ha-svg-icon> `),this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z")}static get styles(){return[i.A.styles,(0,r.AH)(l||(l=d`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`))]}constructor(...t){super(...t),this.selected=!1}}(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],c.prototype,"selected",void 0),c=(0,o.Cg)([(0,n.EM)("ha-dropdown-item")],c)},29823:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(62953);var o=a(40445),i=a(52254),r=a(96196),n=a(77845),s=t([i]);i=(s.then?(await s)():s)[0];let l,d=t=>t;class c extends i.A{get anchorElement(){var t;return null===(t=this.popup)||void 0===t?void 0:t.anchor}set anchorElement(t){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=t)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!0)}async hideMenu(){const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!1),await super.hideMenu()}static get styles(){return[i.A.styles,(0,r.AH)(l||(l=d`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
            --card-background-color,
            var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
          )}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`))]}constructor(...t){super(...t),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],c.prototype,"dropdownTag",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],c.prototype,"dropdownItemTag",void 0),c=(0,o.Cg)([(0,n.EM)("ha-dropdown")],c),e()}catch(l){e(l)}})},27661:function(t,e,a){var o=a(40445),i=a(51978),r=a(94743),n=a(77845),s=a(96196),l=a(63091);let d,c,h,p=t=>t;class u extends i.n{firstUpdated(t){super.firstUpdated(t),this.style.setProperty("--mdc-theme-secondary","var(--primary-color)")}}u.styles=[r.R,(0,s.AH)(d||(d=p`:host{--mdc-typography-button-text-transform:none;--mdc-typography-button-font-size:var(--ha-font-size-l);--mdc-typography-button-font-family:var(--ha-font-family-body);--mdc-typography-button-font-weight:var(--ha-font-weight-medium)}:host .mdc-fab--extended{border-radius:var(--ha-button-border-radius,var(--ha-border-radius-pill))}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:var(--ha-button-border-radius,var(--ha-border-radius-pill))}:host .mdc-fab--extended .mdc-fab__icon{margin-inline-start:-8px;margin-inline-end:12px;direction:var(--direction)}:disabled{--mdc-theme-secondary:var(--disabled-text-color);cursor:not-allowed!important}`)),"rtl"===l.G.document.dir?(0,s.AH)(c||(c=p`:host .mdc-fab--extended .mdc-fab__icon{direction:rtl}`)):(0,s.AH)(h||(h=p``))],u=(0,o.Cg)([(0,n.EM)("ha-fab")],u)},90248:function(t,e,a){a.a(t,async function(t,o){try{a.r(e),a.d(e,{HaIconButtonArrowPrev:function(){return v}});a(62953);var i=a(40445),r=a(96196),n=a(77845),s=a(63091),l=a(26300),d=t([l]);l=(d.then?(await d)():d)[0];let c,h=t=>t;const p="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",u="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class v extends r.WF{render(){var t;return(0,r.qy)(c||(c=h` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?u:p}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],v.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)()],v.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)()],v.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],v.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],v.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],v.prototype,"download",void 0),(0,i.Cg)([(0,n.wk)()],v.prototype,"_icon",void 0),v=(0,i.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],v),o()}catch(c){o(c)}})},26300:function(t,e,a){a.a(t,async function(t,o){try{a.r(e),a.d(e,{HaIconButton:function(){return g}});a(62953);var i=a(40445),r=a(96196),n=a(77845),s=a(32288),l=a(18350),d=(a(67094),t([l]));l=(d.then?(await d)():d)[0];let c,h,p,u,v=t=>t;class g extends r.WF{render(){return(0,r.qy)(c||(c=v` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,s.J)(this.label),(0,s.J)(this.hideTitle?void 0:this.label),(0,s.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,r.qy)(h||(h=v`<ha-svg-icon .path="${0}"></ha-svg-icon>`),this.path):(0,r.qy)(p||(p=v`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}g.shadowRootOptions={mode:"open",delegatesFocus:!0},g.styles=(0,r.AH)(u||(u=v`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var(
        --ha-icon-button-padding-inline,
        --ha-space-2
      );--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],g.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],g.prototype,"path",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],g.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],g.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],g.prototype,"hideTitle",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],g.prototype,"selected",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"download",void 0),g=(0,i.Cg)([(0,n.EM)("ha-icon-button")],g),o()}catch(c){o(c)}})},2054:function(t,e,a){a.a(t,async function(t,e){try{a(16280),a(62953);var o=a(40445),i=a(96196),r=a(77845),n=a(1087),s=a(44249),l=a(26300),d=t([l]);l=(d.then?(await d)():d)[0];let c,h,p,u=t=>t;const v="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class g extends i.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return i.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,i.qy)(c||(c=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),v,this._toggleMenu,t?(0,i.qy)(h||(h=u`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,a=t.has("narrow")?t.get("narrow"):this.narrow,o=!1===(null==e?void 0:e.kioskMode)&&(a||"always_hidden"===(null==e?void 0:e.dockedSidebar)),i=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&o===i||(this._show=i||this._alwaysVisible,i?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,s.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,n.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}g.styles=(0,i.AH)(p||(p=u`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,o.Cg)([(0,r.MZ)({type:Boolean})],g.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,r.wk)()],g.prototype,"_hasNotifications",void 0),(0,o.Cg)([(0,r.wk)()],g.prototype,"_show",void 0),g=(0,o.Cg)([(0,r.EM)("ha-menu-button")],g),e()}catch(c){e(c)}})},54276:function(t,e,a){a(62953);var o=a(40445),i=a(76482),r=a(91382),n=a(96245),s=a(96196),l=a(77845);let d;class c extends r.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new i.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}c.styles=[n.R,(0,s.AH)(d||(d=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
          --ha-ripple-hover-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        );--md-ripple-pressed-color:var(
          --ha-ripple-pressed-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        )}`))],c=(0,o.Cg)([(0,l.EM)("ha-ripple")],c)},67094:function(t,e,a){a.r(e),a.d(e,{HaSvgIcon:function(){return h}});var o=a(40445),i=a(96196),r=a(77845);let n,s,l,d,c=t=>t;class h extends i.WF{render(){return(0,i.JW)(n||(n=c` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,i.JW)(s||(s=c`<path class="primary-path" d="${0}"></path>`),this.path):i.s6,this.secondaryPath?(0,i.JW)(l||(l=c`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):i.s6)}}h.styles=(0,i.AH)(d||(d=c`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`)),(0,o.Cg)([(0,r.MZ)()],h.prototype,"path",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"secondaryPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"viewBox",void 0),h=(0,o.Cg)([(0,r.EM)("ha-svg-icon")],h)},34127:function(t,e,a){a.a(t,async function(t,e){try{a(62953);var o=a(40445),i=a(52630),r=a(96196),n=a(77845),s=t([i]);i=(s.then?(await s)():s)[0];let l,d=t=>t;class c extends i.A{static get styles(){return[i.A.styles,(0,r.AH)(l||(l=d`:host{--wa-tooltip-background-color:var(
            --ha-tooltip-background-color,
            var(--secondary-background-color)
          );--wa-tooltip-content-color:var(
            --ha-tooltip-text-color,
            var(--primary-text-color)
          );--wa-tooltip-font-family:var(
            --ha-tooltip-font-family,
            var(--ha-font-family-body)
          );--wa-tooltip-font-size:var(
            --ha-tooltip-font-size,
            var(--ha-font-size-s)
          );--wa-tooltip-font-weight:var(
            --ha-tooltip-font-weight,
            var(--ha-font-weight-normal)
          );--wa-tooltip-line-height:var(
            --ha-tooltip-line-height,
            var(--ha-line-height-condensed)
          );--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
            --ha-tooltip-border-radius,
            var(--ha-border-radius-sm)
          );--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 8px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}`))]}constructor(...t){super(...t),this.showDelay=150,this.hideDelay=150}}(0,o.Cg)([(0,n.MZ)({attribute:"show-delay",type:Number})],c.prototype,"showDelay",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"hide-delay",type:Number})],c.prototype,"hideDelay",void 0),c=(0,o.Cg)([(0,n.EM)("ha-tooltip")],c),e()}catch(l){e(l)}})},36866:function(t,e,a){a.a(t,async function(t,e){try{var o=a(40445),i=a(16527),r=a(96196),n=a(77845),s=a(38911),l=a(91485),d=t([l]);l=(d.then?(await d)():d)[0];let c,h=t=>t;const p="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";class u extends l.U{willUpdate(t){super.willUpdate(t),this.label||this.placeholder||this.hasUpdated&&!t.has("localize")||(this.placeholder=this.localize("ui.common.search"))}renderStartDefault(){return(0,r.qy)(c||(c=h`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),p)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}(0,o.Cg)([(0,n.wk)(),(0,i.Fg)({context:s.$F,subscribe:!0})],u.prototype,"localize",void 0),u=(0,o.Cg)([(0,n.EM)("ha-input-search")],u),e()}catch(c){e(c)}})},91485:function(t,e,a){a.a(t,async function(t,o){try{a.d(e,{U:function(){return k}});a(3362),a(27495),a(62953);var i=a(40445),r=(a(54430),a(30006)),n=a(92070),s=a(96196),l=a(77845),d=a(94333),c=a(32288),h=a(22786),p=a(57237),u=a(26300),v=(a(67094),a(34127)),g=a(36961),b=t([r,u,v]);[r,u,v]=b.then?(await b)():b;let f,m,y,w,_=t=>t;const C="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",x="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",M="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";class k extends s.WF{select(){var t;null===(t=this._input)||void 0===t||t.select()}setSelectionRange(t,e,a){var o;null===(o=this._input)||void 0===o||o.setSelectionRange(t,e,a)}setRangeText(t,e,a,o){var i;null===(i=this._input)||void 0===i||i.setRangeText(t,e,a,o)}showPicker(){var t;null===(t=this._input)||void 0===t||t.showPicker()}stepUp(){var t;null===(t=this._input)||void 0===t||t.stepUp()}stepDown(){var t;null===(t=this._input)||void 0===t||t.stepDown()}checkValidity(){var t,e;return!g.q||(null===(t=null===(e=this._input)||void 0===e?void 0:e.checkValidity())||void 0===t||t)}reportValidity(){const t=this.checkValidity();return this._invalid=!t,t}async firstUpdated(t){var e;(super.firstUpdated(t),this.insetLabel)||(await(null===(e=this._input)||void 0===e?void 0:e.updateComplete),this._syncStartSlotWidth())}render(){var t,e;const a=!this.label&&this._hasSlotController.test("label"),o=!this.hint&&this._hasSlotController.test("hint");return(0,s.qy)(f||(f=_` <wa-input .type="${0}" .value="${0}" .withClear="${0}" .placeholder="${0}" .readonly="${0}" .passwordToggle="${0}" .passwordVisible="${0}" .withoutSpinButtons="${0}" .required="${0}" .pattern="${0}" .minlength="${0}" .maxlength="${0}" .min="${0}" .max="${0}" .step="${0}" .autocapitalize="${0}" .autocorrect="${0}" .autocomplete="${0}" .autofocus="${0}" .enterkeyhint="${0}" .spellcheck="${0}" .inputmode="${0}" .name="${0}" .disabled="${0}" class="${0}" @input="${0}" @change="${0}" @blur="${0}" @wa-invalid="${0}" exportparts="base:wa-base, hint:wa-hint, input:wa-input"> ${0} <slot name="start" slot="start" @slotchange="${0}"> ${0} </slot> <slot name="end" slot="end"> ${0} </slot> <slot name="clear-icon" slot="clear-icon"> <ha-icon-button .path="${0}"></ha-icon-button> </slot> <slot name="show-password-icon" slot="show-password-icon"> <ha-icon-button @keydown="${0}" .path="${0}"></ha-icon-button> </slot> <slot name="hide-password-icon" slot="hide-password-icon"> <ha-icon-button @keydown="${0}" .path="${0}"></ha-icon-button> </slot> <div slot="hint" class="${0}" role="${0}" aria-live="polite"> ${0} </div> </wa-input> `),this.type,null!==(t=this.value)&&void 0!==t?t:null,this.withClear,this.placeholder,this.readonly,this.passwordToggle,this.passwordVisible,this.withoutSpinButtons,this.required,this.pattern,this.minlength,this.maxlength,this.min,this.max,this.step,this.autocapitalize||void 0,this.autocorrect?"on":"off",this.autocomplete,this.autofocus,this.enterkeyhint||void 0,this.spellcheck,this.inputmode||void 0,this.name,this.disabled,(0,d.H)({invalid:this.invalid||this._invalid,"label-raised":void 0!==this.value&&""!==this.value||this.label&&this.placeholder,"no-label":!this.label,"hint-hidden":!(this.hint||o||this.required||this._invalid||this.invalid)}),this._handleInput,this._handleChange,this._handleBlur,this._handleInvalid,this.label||a?(0,s.qy)(m||(m=_`<slot name="label" slot="label">${0}</slot>`),this._renderLabel(this.label,this.required)):s.s6,this._syncStartSlotWidth,this.renderStartDefault(),this.renderEndDefault(),C,p.d,x,p.d,M,(0,d.H)({error:this.invalid||this._invalid}),(0,c.J)(this.invalid||this._invalid?"alert":void 0),this._invalid||this.invalid?this.validationMessage||(null===(e=this._input)||void 0===e?void 0:e.validationMessage):this.hint||(o?(0,s.qy)(y||(y=_`<slot name="hint"></slot>`)):s.s6))}renderStartDefault(){return s.s6}renderEndDefault(){return s.s6}_handleInput(){var t,e,a;this.value=null!==(t=null===(e=this._input)||void 0===e?void 0:e.value)&&void 0!==t?t:void 0,this._invalid&&null!==(a=this._input)&&void 0!==a&&a.checkValidity()&&(this._invalid=!1)}_handleChange(){var t,e;this.value=null!==(t=null===(e=this._input)||void 0===e?void 0:e.value)&&void 0!==t?t:void 0}_handleBlur(){var t;this.autoValidate&&(this._invalid=!(null!==(t=this._input)&&void 0!==t&&t.checkValidity()))}_handleInvalid(){this._invalid=!0}constructor(...t){super(...t),this.appearance="material",this.type="text",this.label="",this.hint="",this.withClear=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.withoutSpinButtons=!1,this.required=!1,this.autocapitalize="",this.autocorrect=!1,this.autofocus=!1,this.enterkeyhint="",this.spellcheck=!0,this.inputmode="",this.disabled=!1,this.validationMessage="",this.autoValidate=!1,this.invalid=!1,this.insetLabel=!1,this._invalid=!1,this._hasSlotController=new n.X(this,"label","hint","input"),this._syncStartSlotWidth=()=>{var t,e;const a=null===(t=this._input)||void 0===t||null===(t=t.shadowRoot)||void 0===t?void 0:t.querySelector('[part~="start"]'),o=null!==(e=null==a?void 0:a.offsetWidth)&&void 0!==e?e:0;o>0&&!this.insetLabel?(this.style.setProperty("--start-slot-width",`calc(${o}px + var(--ha-space-1))`),this.style.setProperty("--input-padding-inline-start","var(--ha-space-1)")):(this.style.removeProperty("--start-slot-width"),this.style.removeProperty("--input-padding-inline-start"))},this._renderLabel=(0,h.A)((t,e)=>{if(!e)return t;let a=getComputedStyle(this).getPropertyValue("--ha-input-required-marker");return a||(a="*"),a.startsWith('"')&&a.endsWith('"')&&(a=a.slice(1,-1)),a?`${t}${a}`:t})}}k.shadowRootOptions={mode:"open",delegatesFocus:!0},k.styles=(0,s.AH)(w||(w=_`:host{display:flex;align-items:flex-start;padding-top:var(--ha-input-padding-top);padding-bottom:var(--ha-input-padding-bottom,var(--ha-space-2));text-align:var(--ha-input-text-align,start)}:host([appearance=outlined]){padding-bottom:var(--ha-input-padding-bottom)}wa-input{flex:1;min-width:0;--wa-transition-fast:var(--wa-transition-normal);position:relative}wa-input::part(label){position:absolute;top:0;font-weight:var(--ha-font-weight-normal);font-family:var(--ha-font-family-body);transition:all var(--wa-transition-normal) ease-in-out;color:var(--secondary-text-color);line-height:var(--ha-line-height-condensed);z-index:1;pointer-events:none;padding-inline-start:calc(var(--start-slot-width,0px) + var(--ha-space-4));padding-inline-end:var(--ha-space-4);padding-top:var(--ha-space-5);font-size:var(--ha-font-size-m)}:host([appearance=material]:focus-within) wa-input::part(label){color:var(--primary-color)}:host(:focus-within) wa-input.invalid::part(label),wa-input.invalid:not([disabled])::part(label){color:var(--ha-color-fill-danger-loud-resting)}:host(:focus-within) wa-input::part(label),:host([type=date]) wa-input::part(label),wa-input.label-raised::part(label){padding-top:var(--ha-space-3);font-size:var(--ha-font-size-xs)}wa-input::part(base){height:56px;background-color:var(--ha-color-form-background);border-top-left-radius:var(--ha-border-radius-sm);border-top-right-radius:var(--ha-border-radius-sm);border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square);border:none;padding:0 var(--ha-space-4);position:relative;transition:background-color var(--wa-transition-normal) ease-in-out}:host([appearance=outlined]) wa-input.no-label::part(base){height:32px;padding:0 var(--ha-space-2)}:host([appearance=outlined]) wa-input::part(base){border:1px solid var(--ha-color-border-neutral-quiet);background-color:var(--card-background-color);border-radius:var(--ha-border-radius-md);transition:border-color var(--wa-transition-normal) ease-in-out}:host([appearance=material]) ::part(base)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background-color:var(--ha-color-border-neutral-loud);transition:height var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out}:host([appearance=material]:focus-within) wa-input::part(base)::after{height:2px;background-color:var(--primary-color)}:host([appearance=material]) wa-input.invalid:not([disabled])::part(base)::after,:host([appearance=material]:focus-within) wa-input.invalid::part(base)::after{background-color:var(--ha-color-border-danger-normal)}wa-input::part(input){padding-top:var(--ha-space-3);padding-inline-start:var(--input-padding-inline-start,0)}wa-input.no-label::part(input){padding-top:0}:host([type=color]) wa-input::part(input){padding-top:var(--ha-space-6);cursor:pointer}:host([type=color]) wa-input.no-label::part(input){padding:var(--ha-space-2)}:host([type=color]) wa-input.no-label::part(base){padding:0}wa-input::part(input)::placeholder{color:var(--ha-color-neutral-60)}:host(:focus-within) wa-input::part(base){outline:0}wa-input::part(base):hover{background-color:var(--ha-color-form-background-hover)}:host([appearance=outlined]) wa-input::part(base):hover{border-color:var(--ha-color-border-neutral-normal)}:host([appearance=outlined]:focus-within) wa-input::part(base){border-color:var(--primary-color)}wa-input:disabled::part(base){background-color:var(--ha-color-form-background-disabled)}wa-input:disabled::part(label){opacity:.5}wa-input::part(hint){min-height:var(--ha-space-5);margin-block-start:0;margin-inline-start:var(--ha-space-3);font-size:var(--ha-font-size-xs);display:flex;align-items:center;color:var(--ha-color-text-secondary)}wa-input.hint-hidden::part(hint){height:0;min-height:0}.error{color:var(--ha-color-on-danger-quiet)}wa-input::part(end){color:var(--ha-color-text-secondary)}:host([appearance=outlined]) wa-input.no-label{--ha-icon-button-size:24px;--mdc-icon-size:18px}`)),(0,i.Cg)([(0,l.MZ)({reflect:!0})],k.prototype,"appearance",void 0),(0,i.Cg)([(0,l.MZ)({reflect:!0})],k.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"value",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"label",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"hint",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,attribute:"with-clear"})],k.prototype,"withClear",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"placeholder",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean})],k.prototype,"readonly",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,attribute:"password-toggle"})],k.prototype,"passwordToggle",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,attribute:"password-visible"})],k.prototype,"passwordVisible",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,attribute:"without-spin-buttons"})],k.prototype,"withoutSpinButtons",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],k.prototype,"required",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"pattern",void 0),(0,i.Cg)([(0,l.MZ)({type:Number})],k.prototype,"minlength",void 0),(0,i.Cg)([(0,l.MZ)({type:Number})],k.prototype,"maxlength",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"min",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"max",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"step",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"autocapitalize",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean})],k.prototype,"autocorrect",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"autocomplete",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean})],k.prototype,"autofocus",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"enterkeyhint",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean})],k.prototype,"spellcheck",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"inputmode",void 0),(0,i.Cg)([(0,l.MZ)()],k.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean})],k.prototype,"disabled",void 0),(0,i.Cg)([(0,l.MZ)({attribute:"validation-message"})],k.prototype,"validationMessage",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,attribute:"auto-validate"})],k.prototype,"autoValidate",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean})],k.prototype,"invalid",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,attribute:"inset-label"})],k.prototype,"insetLabel",void 0),(0,i.Cg)([(0,l.wk)()],k.prototype,"_invalid",void 0),(0,i.Cg)([(0,l.P)("wa-input")],k.prototype,"_input",void 0),k=(0,i.Cg)([(0,l.EM)("ha-input")],k),o()}catch(f){o(f)}})},44249:function(t,e,a){a.d(e,{V:function(){return o}});a(62953);const o=(t,e)=>{const a=new i,o=t.subscribeMessage(t=>e(a.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{o.then(t=>null==t?void 0:t())}};class i{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},84621:function(t,e,a){a.d(e,{$:function(){return C},A2:function(){return T},C2:function(){return o},Iu:function(){return z},Ky:function(){return c},Lj:function(){return d},Mo:function(){return A},On:function(){return s},P0:function(){return k},PA:function(){return l},Qo:function(){return x},RW:function(){return M},Uc:function(){return n},Ui:function(){return m},VC:function(){return H},VK:function(){return L},Yf:function(){return q},ZU:function(){return r},cm:function(){return g},f7:function(){return Z},hi:function(){return w},i_:function(){return u},jm:function(){return E},kH:function(){return h},ks:function(){return p},oM:function(){return v},p7:function(){return $},pl:function(){return b},rv:function(){return f},sb:function(){return V},tg:function(){return S},tv:function(){return _},xU:function(){return i},zt:function(){return y}});const o=(t,e,a)=>t.connection.subscribeMessage(t=>a(t),{type:"zha/devices/reconfigure",ieee:e}),i=t=>t.callWS({type:"zha/topology/update"}),r=(t,e,a,o,i)=>t.callWS({type:"zha/devices/clusters/attributes",ieee:e,endpoint_id:a,cluster_id:o,cluster_type:i}),n=t=>t.callWS({type:"zha/devices"}),s=(t,e)=>t.callWS({type:"zha/device",ieee:e}),l=(t,e)=>t.callWS({type:"zha/devices/bindable",ieee:e}),d=(t,e,a)=>t.callWS({type:"zha/devices/bind",source_ieee:e,target_ieee:a}),c=(t,e,a)=>t.callWS({type:"zha/devices/unbind",source_ieee:e,target_ieee:a}),h=(t,e,a,o)=>t.callWS({type:"zha/groups/bind",source_ieee:e,group_id:a,bindings:o}),p=(t,e,a,o)=>t.callWS({type:"zha/groups/unbind",source_ieee:e,group_id:a,bindings:o}),u=(t,e)=>t.callWS(Object.assign(Object.assign({},e),{},{type:"zha/devices/clusters/attributes/value"})),v=(t,e,a,o,i)=>t.callWS({type:"zha/devices/clusters/commands",ieee:e,endpoint_id:a,cluster_id:o,cluster_type:i}),g=(t,e)=>t.callWS({type:"zha/devices/clusters",ieee:e}),b=t=>t.callWS({type:"zha/groups"}),f=(t,e)=>t.callWS({type:"zha/group/remove",group_ids:e}),m=(t,e)=>t.callWS({type:"zha/group",group_id:e}),y=t=>t.callWS({type:"zha/devices/groupable"}),w=(t,e,a)=>t.callWS({type:"zha/group/members/add",group_id:e,members:a}),_=(t,e,a)=>t.callWS({type:"zha/group/members/remove",group_id:e,members:a}),C=(t,e,a,o)=>t.callWS({type:"zha/group/add",group_name:e,group_id:a,members:o}),x=t=>t.callWS({type:"zha/configuration"}),M=(t,e)=>t.callWS({type:"zha/configuration/update",data:e}),k=t=>t.callWS({type:"zha/network/settings"}),z=t=>t.callWS({type:"zha/network/backups/create"}),$=(t,e)=>t.callWS({type:"zha/network/change_channel",new_channel:e}),S="INITIALIZED",A="INTERVIEW_COMPLETE",Z="CONFIGURED",L=["PAIRED",Z,A],H=["device_joined","raw_device_initialized","device_fully_initialized"],E="log_output",T="zha_channel_bind",V="zha_channel_configure_reporting",q="zha_channel_cfg_done"},59992:function(t,e,a){a.a(t,async function(t,o){try{a.d(e,{V:function(){return v}});a(62953);var i=a(40445),r=a(88696),n=a(96196),s=a(94333),l=a(77845),d=t([r]);r=(d.then?(await d)():d)[0];let c,h,p=t=>t;const u=t=>void 0===t?[]:Array.isArray(t)?t:[t],v=t=>{class e extends t{get scrollableElement(){return e.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(t){var e;null===(e=super.firstUpdated)||void 0===e||e.call(this,t),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(t){var e;null===(e=super.updated)||void 0===e||e.call(this,t),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(t=!1){return(0,n.qy)(c||(c=p` <div class="${0}"></div> <div class="${0}"></div> `),(0,s.H)({"fade-top":!0,rounded:t,visible:this._contentScrolled}),(0,s.H)({"fade-bottom":!0,rounded:t,visible:this._contentScrollable}))}static get styles(){var t;const e=Object.getPrototypeOf(this);return[...u(null!==(t=null==e?void 0:e.styles)&&void 0!==t?t:[]),(0,n.AH)(h||(h=p`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const t=this.scrollableElement;t!==this._scrollTarget&&(this._detachScrollableElement(),t&&(this._scrollTarget=t,t.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(t),this._updateScrollableState(t)))}_detachScrollableElement(){var t,e;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(t=(e=this._resize).unobserve)||void 0===t||t.call(e,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(t){const e=parseFloat(getComputedStyle(t).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:o=0,scrollTop:i=0}=t;this._contentScrollable=a-o>i+e+this.scrollFadeSafeAreaPadding}constructor(...t){super(...t),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=t=>{var e;const a=t.currentTarget;this._contentScrolled=(null!==(e=a.scrollTop)&&void 0!==e?e:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new r.P(this,{target:null,callback:t=>{var e;const a=null===(e=t[0])||void 0===e?void 0:e.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return e.DEFAULT_SCROLLABLE_ELEMENT=null,(0,i.Cg)([(0,l.wk)()],e.prototype,"_contentScrolled",void 0),(0,i.Cg)([(0,l.wk)()],e.prototype,"_contentScrollable",void 0),e};o()}catch(c){o(c)}})},31580:function(t,e,a){a.d(e,{J8:function(){return i},Rr:function(){return n},b9:function(){return o},iV:function(){return r}});a(94490);const o=t=>{let e=t;return"string"==typeof t&&(e=parseInt(t,16)),"0x"+e.toString(16).padStart(4,"0")},i=(t,e)=>{const a=t.user_given_name?t.user_given_name:t.name,o=e.user_given_name?e.user_given_name:e.name;return a.localeCompare(o)},r=(t,e)=>{const a=t.name,o=e.name;return a.localeCompare(o)},n=t=>`${t.name} (Endpoint id: ${t.endpoint_id}, Id: ${o(t.id)}, Type: ${t.type})`},32168:function(t,e,a){a.a(t,async function(t,o){try{a.r(e),a.d(e,{ZHAGroupsDashboard:function(){return C}});a(26910),a(18111),a(61701),a(3362),a(62953);var i=a(40445),r=a(96196),n=a(77845),s=a(22786),l=a(91926),d=(a(27661),a(26300)),c=a(84621),h=a(72553),p=a(14503),u=a(31580),v=t([d,h]);[d,h]=v.then?(await v)():v;let g,b,f,m,y=t=>t;const w="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",_=[{translationKey:"ui.panel.config.zha.groups.caption",path:"/config/zha/groups",iconPath:"M22,4A2,2 0 0,1 24,6V16A2,2 0 0,1 22,18H6A2,2 0 0,1 4,16V4A2,2 0 0,1 6,2H12L14,4H22M2,6V20H20V22H2A2,2 0 0,1 0,20V11H0V6H2M6,6V16H22V6H6Z"}];class C extends r.WF{connectedCallback(){super.connectedCallback(),this.hass&&this._firstUpdatedCalled&&this._fetchGroups()}firstUpdated(t){super.firstUpdated(t),this.hass&&this._fetchGroups(),this._firstUpdatedCalled=!0}render(){return(0,r.qy)(g||(g=y` <hass-tabs-subpage-data-table .tabs="${0}" back-path="/config/zha/dashboard" .hass="${0}" .narrow="${0}" .route="${0}" .columns="${0}" .data="${0}" @row-click="${0}" clickable has-fab> <a href="/config/zha/group-add" slot="fab"> <ha-fab .label="${0}" extended> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-fab> </a> </hass-tabs-subpage-data-table> `),_,this.hass,this.narrow,this.route,this._columns(this.hass.localize),this._formattedGroups(this._groups),this._handleRowClicked,this.hass.localize("ui.panel.config.zha.groups.add_group"),w)}async _fetchGroups(){this._groups=(await(0,c.pl)(this.hass)).sort(u.iV)}_handleRowClicked(t){const e=t.detail.id;(0,l.o)(`/config/zha/group/${e}`)}static get styles(){return[p.RF,(0,r.AH)(b||(b=y`a{color:var(--primary-color)}`))]}constructor(...t){super(...t),this.narrow=!1,this.isWide=!1,this._groups=[],this._firstUpdatedCalled=!1,this._formattedGroups=(0,s.A)(t=>{let e=t;return e=e.map(t=>Object.assign(Object.assign({},t),{},{id:String(t.group_id)})),e}),this._columns=(0,s.A)(t=>({name:{title:t("ui.panel.config.zha.groups.groups"),sortable:!0,filterable:!0,showNarrow:!0,main:!0,hideable:!1,moveable:!1,direction:"asc",flex:2},group_id:{title:t("ui.panel.config.zha.groups.group_id"),type:"numeric",template:t=>(0,r.qy)(f||(f=y` ${0} `),(0,u.b9)(t.group_id)),sortable:!0},members:{title:t("ui.panel.config.zha.groups.members"),type:"numeric",template:t=>(0,r.qy)(m||(m=y` ${0} `),t.members.length),sortable:!0}}))}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],C.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],C.prototype,"route",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],C.prototype,"narrow",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"is-wide",type:Boolean})],C.prototype,"isWide",void 0),(0,i.Cg)([(0,n.wk)()],C.prototype,"_groups",void 0),C=(0,i.Cg)([(0,n.EM)("zha-groups-dashboard")],C),o()}catch(g){o(g)}})},69235:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await a.e("71055").then(a.bind(a,52370))).default),e()}catch(o){e(o)}},1)},14503:function(t,e,a){a.d(e,{RF:function(){return p},dp:function(){return g},kO:function(){return v},nA:function(){return u},og:function(){return h}});var o=a(96196);let i,r,n,s,l,d,c=t=>t;const h=(0,o.AH)(i||(i=c`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),p=(0,o.AH)(r||(r=c`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}@media (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${0} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`),h),u=(0,o.AH)(n||(n=c`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`)),v=(0,o.AH)(s||(s=c`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc(
      100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--mdc-dialog-max-height:calc(
      100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--ha-dialog-max-height:calc(
      100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--ha-dialog-max-height:calc(
      100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    )}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`)),g=(0,o.AH)(l||(l=c`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,o.AH)(d||(d=c`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},85614:function(t,e,a){a.d(e,{i:function(){return o}});a(3362),a(62953);const o=async()=>{await Promise.all([a.e("38085"),a.e("22309")]).then(a.bind(a,40772))}}}]);
//# sourceMappingURL=60419.27988a7f6a4e0cac.js.map