iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
72 lines • 70.9 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[9032],{72487:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{CA:function(){return A},Mi:function(){return H},Pm:function(){return x},Wq:function(){return y},Yq:function(){return c},bl:function(){return E},c2:function(){return w},fr:function(){return g},gu:function(){return M},kz:function(){return h},m9:function(){return Z},sl:function(){return v},ur:function(){return S},zB:function(){return p}});a(18111),a(20116);var i=a(74487),r=a(22786),n=a(46927),s=a(8480),l=e([i,s]);[i,s]=l.then?(await l)():l;(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)}));const c=(e,t,a)=>d(t,a.time_zone).format(e),d=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),h=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),p=(e,t,a)=>{var o,i,r,s;const l=f(t,a.time_zone);if(t.date_format===n.ow.language||t.date_format===n.ow.system)return l.format(e);const c=l.formatToParts(e),d=null===(o=c.find(e=>"literal"===e.type))||void 0===o?void 0:o.value,h=null===(i=c.find(e=>"day"===e.type))||void 0===i?void 0:i.value,u=null===(r=c.find(e=>"month"===e.type))||void 0===r?void 0:r.value,p=null===(s=c.find(e=>"year"===e.type))||void 0===s?void 0:s.value,v=c[c.length-1];let b="literal"===(null==v?void 0:v.type)?null==v?void 0:v.value:"";"bg"===t.language&&t.date_format===n.ow.YMD&&(b="");return{[n.ow.DMY]:`${h}${d}${u}${d}${p}${b}`,[n.ow.MDY]:`${u}${d}${h}${d}${p}${b}`,[n.ow.YMD]:`${p}${d}${u}${d}${h}${b}`}[t.date_format]},f=(0,r.A)((e,t)=>{const a=e.date_format===n.ow.system?void 0:e.language;return e.date_format===n.ow.language||(e.date_format,n.ow.system),new Intl.DateTimeFormat(a,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})}),v=(e,t,a)=>b(t,a.time_zone).format(e),b=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(e.time_zone,t)})),g=(e,t,a)=>m(t,a.time_zone).format(e),m=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),y=(e,t,a)=>_(t,a.time_zone).format(e),_=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",timeZone:(0,s.wj)(e.time_zone,t)})),w=(e,t,a)=>C(t,a.time_zone).format(e),C=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",timeZone:(0,s.wj)(e.time_zone,t)})),x=(e,t,a)=>k(t,a.time_zone).format(e),k=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),A=(e,t,a)=>$(t,a.time_zone).format(e),$=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",timeZone:(0,s.wj)(e.time_zone,t)})),M=(e,t,a)=>z(t,a.time_zone).format(e),z=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",timeZone:(0,s.wj)(e.time_zone,t)})),H=(e,t,a)=>L(t,a.time_zone).format(e),L=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),S=(e,t,a)=>T(t,a.time_zone).format(e),T=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),E=(e,t,a)=>{const o=(0,s.wj)(t.time_zone,a.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:o}).format(e)},Z=(e,t,a,o)=>`${E(e,a,o)}/${E(t,a,o)}`;o()}catch(c){o(c)}})},30162:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{LW:function(){return v},Xs:function(){return p},fU:function(){return c},ie:function(){return h}});var i=a(74487),r=a(22786),n=a(8480),s=a(69543),l=e([i,n]);[i,n]=l.then?(await l)():l;const c=(e,t,a)=>d(t,a.time_zone).format(e),d=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,n.wj)(e.time_zone,t)})),h=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:(0,s.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,n.wj)(e.time_zone,t)})),p=(e,t,a)=>f(t,a.time_zone).format(e),f=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",hour:(0,s.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,n.wj)(e.time_zone,t)})),v=(e,t,a)=>b(t,a.time_zone).format(e),b=(0,r.A)((e,t)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,n.wj)(e.time_zone,t)}));o()}catch(c){o(c)}})},69543:function(e,t,a){a.d(t,{J:function(){return r}});a(74423);var o=a(22786),i=a(46927);const r=(0,o.A)(e=>{if(e.time_format===i.Hg.language||e.time_format===i.Hg.system){const t=e.time_format===i.Hg.language?e.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(t).includes("10")}return e.time_format===i.Hg.am_pm})},26218:function(e,t,a){a.d(t,{a:function(){return i}});a(16280);const o=(0,a(77796).n)(e=>{history.replaceState({scrollPosition:e},"")},300);function i(e){return(t,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const i=t.connectedCallback;t.connectedCallback=function(){i.call(this);const t=this[a];t&&this.updateComplete.then(()=>{const a=this.renderRoot.querySelector(e);a&&setTimeout(()=>{a.scrollTop=t},0)})};const r=Object.getOwnPropertyDescriptor(t,a);let n;if(void 0===r)n={get(){var e;return this[`__${String(a)}`]||(null===(e=history.state)||void 0===e?void 0:e.scrollPosition)},set(e){o(e),this[`__${String(a)}`]=e},configurable:!0,enumerable:!0};else{const e=r.set;n=Object.assign(Object.assign({},r),{},{set(t){o(t),this[`__${String(a)}`]=t,null==e||e.call(this,t)}})}Object.defineProperty(t,a,n)}}},80880:function(e,t,a){a.d(t,{Y:function(){return o}});a(84864),a(57465),a(27495),a(25440);const o=(e,t="_")=>{const a="àáâäæãåāăąабçćčđďдèéêëēėęěеёэфğǵгḧхîïíīįìıİийкłлḿмñńǹňнôöòóœøōõőоṕпŕřрßśšşșсťțтûüùúūǘůűųувẃẍÿýыžźżз·",o=`aaaaaaaaaaabcccdddeeeeeeeeeeefggghhiiiiiiiiijkllmmnnnnnoooooooooopprrrsssssstttuuuuuuuuuuvwxyyyzzzz${t}`,i=new RegExp(a.split("").join("|"),"g"),r={"ж":"zh","х":"kh","ц":"ts","ч":"ch","ш":"sh","щ":"shch","ю":"iu","я":"ia"};let n;return""===e?n="":(n=e.toString().toLowerCase().replace(i,e=>o.charAt(a.indexOf(e))).replace(/[а-я]/g,e=>r[e]||"").replace(/(\d),(?=\d)/g,"$1").replace(/[^a-z0-9]+/g,t).replace(new RegExp(`(${t})\\1+`,"g"),"$1").replace(new RegExp(`^${t}+`),"").replace(new RegExp(`${t}+$`),""),""===n&&(n="unknown")),n}},60353:function(e,t,a){a.d(t,{u:function(){return o}});class o{start(e){const t=Date.now();this._startY=e,this._startTime=t,this._lastY=e,this._lastTime=t,this._delta=0}move(e){const t=Date.now();return this._delta=this._startY-e,this._lastY=e,this._lastTime=t,this._delta}end(){const e=this.getVelocity(),t=Math.abs(e)>this._velocityThreshold;return{velocity:e,delta:this._delta,isSwipe:t,isDownwardSwipe:e>0}}getDelta(){return this._delta}getVelocity(){if(Date.now()-this._lastTime>=this._movementTimeThreshold)return 0;const e=this._lastTime-this._startTime;return e>0?(this._lastY-this._startY)/e:0}reset(){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0}constructor(e={}){var t,a;this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=null!==(t=e.velocitySwipeThreshold)&&void 0!==t?t:.5,this._movementTimeThreshold=null!==(a=e.movementTimeThreshold)&&void 0!==a?a:100}}},77796:function(e,t,a){a.d(t,{n:function(){return o}});a(62953);const o=(e,t,a=!0,o=!0)=>{let i,r=0;const n=(...n)=>{const s=()=>{r=!1===a?0:Date.now(),i=void 0,e(...n)},l=Date.now();r||!1!==a||(r=l);const c=t-(l-r);c<=0||c>t?(i&&(clearTimeout(i),i=void 0),r=l,e(...n)):i||!1===o||(i=window.setTimeout(s,c))};return n.cancel=()=>{clearTimeout(i),i=void 0,r=0},n}},34296:function(e,t,a){a(62953);var o=a(40445),i=a(96229),r=a(26069),n=a(91735),s=a(42034),l=a(5124),c=a(67576);let d,h,u,p,f=e=>e;class v extends i.k{renderOutline(){return this.filled?(0,l.qy)(d||(d=f`<span class="filled"></span>`)):super.renderOutline()}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{active:this.active})}renderPrimaryContent(){return(0,l.qy)(h||(h=f` <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)(u||(u=f`<slot name="trailing-icon"></slot>`))}constructor(...e){super(...e),this.filled=!1,this.active=!1}}v.styles=[n.R,s.R,r.R,(0,l.AH)(p||(p=f`: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,c.MZ)({type:Boolean,reflect:!0})],v.prototype,"filled",void 0),(0,o.Cg)([(0,c.MZ)({type:Boolean})],v.prototype,"active",void 0),v=(0,o.Cg)([(0,c.EM)("ha-assist-chip")],v)},5745:function(e,t,a){var o=a(40445),i=a(99731),r=a(67576);class n extends i.Y{}n=(0,o.Cg)([(0,r.EM)("ha-chip-set")],n)},99611:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(13579),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var o=a(40445),i=a(1126),r=a(35211),n=a(5124),s=a(67576),l=a(1087),c=a(60353),d=a(22792),h=a(59992),u=a(14503),p=a(22348),f=e([i,h]);[i,h]=f.then?(await f)():f;let v,b,g=e=>e;const m=300,y=new Set(["ha-control-slider","ha-slider","ha-control-switch","ha-control-circular-slider","ha-hs-color-picker","ha-map","ha-more-info-control-select-container","ha-filter-chip"]),_=new Set(["volume-slider-container","forecast"]);class w extends((0,h.V)(n.WF)){get scrollableElement(){return this._bodyElement}connectedCallback(){super.connectedCallback(),this.addEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.addEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0})}updated(e){super.updated(e),e.has("open")&&(this._drawerOpen=this.open)}render(){return(0,n.qy)(v||(v=g` <wa-drawer id="drawer" placement="bottom" .open="${0}" .lightDismiss="${0}" .ariaLabelledby="${0}" .ariaDescribedby="${0}" @keydown="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-hide="${0}" @wa-after-hide="${0}" @click="${0}" without-header @touchstart="${0}"> <div class="handle-wrapper" aria-hidden="true"> <div class="handle"></div> </div> <slot name="header"></slot> <div class="content-wrapper"> <div id="body" class="body ha-scrollbar"> <slot></slot> </div> ${0} </div> <slot name="footer"></slot> </wa-drawer> `),this._drawerOpen,!this.preventScrimClose,this.ariaLabelledBy,this.ariaDescribedBy,this._handleKeyDown,this._handleShow,this._handleAfterShow,this._handleHide,this._handleAfterHide,this._handleCloseAction,this._handleTouchStart,this.renderScrollableFades())}_startResizing(e){document.addEventListener("touchmove",this._handleTouchMove,{passive:!1}),document.addEventListener("touchend",this._handleTouchEnd),document.addEventListener("touchcancel",this._handleTouchEnd),this._gestureRecognizer.start(e)}_animateSnapBack(){this.style.setProperty("--dialog-transition",`transform ${m}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},m)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.removeEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0}),this._unregisterResizeHandlers(),this._isDragging=!1}static get styles(){return[...super.styles,u.dp,(0,n.AH)(b||(b=g`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${0}ms;--hide-duration:${0}ms}wa-drawer::part(dialog){max-height:min(var(--ha-bottom-sheet-max-height,90vh),calc(100vh - max(var(--safe-area-inset-top),48px)));max-height:min(var(--ha-bottom-sheet-max-height,90dvh),calc(100dvh - max(var(--safe-area-inset-top),48px)));align-items:center;transform:var(--dialog-transform);transition:var(--dialog-transition)}@media (prefers-reduced-motion:reduce){wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:1ms;--hide-duration:1ms}wa-drawer::part(dialog){transition:1ms}}wa-drawer::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));background-color:var(--ha-bottom-sheet-scrim-color,var(--mdc-dialog-scrim-color,none))}wa-drawer::part(body){max-width:var(--ha-bottom-sheet-max-width);width:100%;position:relative;border-top-left-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));border-top-right-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));background-color:var(--ha-bottom-sheet-surface-background,var(--ha-dialog-surface-background,var(--card-background-color,var(--ha-color-surface-default))));-webkit-backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));padding:var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left))}:host([flexcontent]) wa-drawer::part(body){display:flex;flex-direction:column}:host([prevent-scrim-close]) .handle-wrapper{display:none}.handle-wrapper{position:absolute;top:0;inset-inline-start:0;width:100%;padding-bottom:2px;display:flex;justify-content:center;align-items:center;pointer-events:none;z-index:1}.handle-wrapper .handle{height:16px;width:200px;display:flex;justify-content:center;align-items:center}.handle-wrapper .handle::after{content:"";border-radius:var(--ha-border-radius-md);height:4px;background:var(--ha-bottom-sheet-handle-color,var(--divider-color));width:40px}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{padding:var(--ha-bottom-sheet-content-padding,0);box-sizing:border-box}:host([flexcontent]) .body{flex:1;max-width:100%;display:flex;flex-direction:column;padding:var(--ha-bottom-sheet-content-padding,var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left)));box-sizing:border-box}slot[name=footer]{display:block;padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;box-sizing:border-box}:host([flexcontent]) slot[name=footer]{flex-shrink:0}`),m,m)]}constructor(...e){super(...e),this.open=!1,this.flexContent=!1,this.preventScrimClose=!1,this._drawerOpen=!1,this._sliderInteractionActive=!1,this._gestureRecognizer=new c.u,this._isDragging=!1,this._escapePressed=!1,this._handleShow=async()=>{this._drawerOpen=!0,this.open=!0,(0,l.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e;const t=this._autofocusElement;null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,p.V)(this._hassConfig.auth.external)?t&&(t.id||(t.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})):null==t||t.focus()})},this._handleAfterShow=()=>{(0,l.r)(this,"after-show")},this._handleSliderInteractionStart=()=>{this._sliderInteractionActive=!0},this._handleSliderInteractionStop=()=>{this._sliderInteractionActive=!1},this._handleAfterHide=e=>{if(this._sliderInteractionActive)return this._drawerOpen=!0,void(this.open=!0);e.eventPhase===Event.AT_TARGET&&(this.open=!1,this._drawerOpen=!1,(0,l.r)(this,"closed"))},this._handleHide=e=>{if(e.eventPhase!==Event.AT_TARGET)return;const t=e.detail.source===e.target.drawer;if(this._sliderInteractionActive)return e.preventDefault(),this._drawerOpen=!0,this.open=!0,void(this._escapePressed=!1);this.preventScrimClose&&this._escapePressed&&t&&e.preventDefault(),this._escapePressed=!1},this._handleKeyDown=e=>{"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)},this._handleCloseAction=e=>{e.composedPath().some(e=>e instanceof HTMLElement&&("close"===e.getAttribute("data-dialog")||"close"===e.getAttribute("data-drawer")))&&(this._drawerOpen=!1)},this._handleTouchStart=e=>{if(this.preventScrimClose)return;const t=e.composedPath();for(const a of t){if(a===this._drawer)break;if(a instanceof HTMLElement&&(a.scrollTop>0||y.has(a.localName)||Array.from(a.classList).some(e=>_.has(e))))return}e.stopPropagation(),this._startResizing(e.touches[0].clientY)},this._handleTouchMove=e=>{const t=e.touches[0].clientY,a=this._gestureRecognizer.move(t);a<0&&(e.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*a}px)`)}))},this._handleTouchEnd=()=>{var e;this._unregisterResizeHandlers(),this._isDragging=!1;const t=this._gestureRecognizer.end();if(t.isSwipe)return void(t.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const a=null===(e=this._drawer.shadowRoot)||void 0===e?void 0:e.querySelector('[part="body"]'),o=(null==a?void 0:a.offsetHeight)||0;o>0&&t.delta<0&&Math.abs(t.delta)>.5*o?this._drawerOpen=!1:this._animateSnapBack()},this._unregisterResizeHandlers=()=>{document.removeEventListener("touchmove",this._handleTouchMove),document.removeEventListener("touchend",this._handleTouchEnd),document.removeEventListener("touchcancel",this._handleTouchEnd)}}}(0,o.Cg)([(0,s.MZ)({attribute:"aria-labelledby"})],w.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],w.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"open",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],w.prototype,"flexContent",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],w.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,s.wk)()],w.prototype,"_drawerOpen",void 0),(0,o.Cg)([(0,s.wk)()],w.prototype,"_sliderInteractionActive",void 0),(0,o.Cg)([(0,s.wk)(),(0,r.Fg)({context:d.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,o.Cg)([(0,s.P)("#drawer")],w.prototype,"_drawer",void 0),(0,o.Cg)([(0,s.P)("#body")],w.prototype,"_bodyElement",void 0),(0,o.Cg)([(0,s.P)("[autofocus]")],w.prototype,"_autofocusElement",void 0),w=(0,o.Cg)([(0,s.EM)("ha-bottom-sheet")],w),t()}catch(v){t(v)}})},9503:function(e,t,a){var o=a(40445),i=a(97577),r=a(5124),n=a(67576);let s,l=e=>e;class c extends i.A{get value(){var e;return null!==(e=this._value)&&void 0!==e?e:null}set value(e){this._value=e}static get styles(){return[i.A.styles,(0,r.AH)(s||(s=l`:host{--wa-form-control-toggle-size:var(--ha-checkbox-size, 20px);--wa-form-control-border-color:var(
--ha-checkbox-border-color,
var(--ha-color-border-neutral-normal)
);--wa-form-control-background-color:var(
--ha-checkbox-background-color,
var(--wa-form-control-background-color)
);--checked-icon-color:var(
--ha-checkbox-checked-icon-color,
var(--wa-color-brand-on-loud)
);--wa-form-control-activated-color:var(
--ha-checkbox-checked-background-color,
var(--ha-color-fill-primary-loud-resting)
);-webkit-tap-highlight-color:transparent;--checked-icon-scale:var(--ha-checkbox-checked-icon-scale, 0.9);--wa-form-control-required-content:var(
--ha-checkbox-required-marker,
var(--ha-input-required-marker, "*")
);--wa-form-control-required-content-offset:var(
--ha-checkbox-required-marker-offset,
0.1rem
)}[part~=base]{align-items:center;gap:var(--ha-space-2)}[part~=control]{border-radius:var(--ha-checkbox-border-radius,var(--ha-border-radius-sm));border-width:var(--ha-checkbox-border-width,var(--ha-border-width-md));margin-inline-end:0}[part~=label]{line-height:1}#hint{font-size:var(--ha-font-size-xs);color:var(--ha-color-text-secondary)}label:has(input:not(:disabled)):hover{--wa-form-control-border-color:var(
--ha-checkbox-border-color-hover,
var(--ha-checkbox-border-color, var(--ha-color-border-neutral-loud))
)}label:has(input:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-background-color-hover,var(--ha-color-form-background-hover))}label:has(input:checked:not(:disabled)):hover [part~=control],label:has(input:indeterminate:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover));border-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover))}`))]}}c=(0,o.Cg)([(0,n.EM)("ha-checkbox")],c)},70947:function(e,t,a){a(62953);var o=a(40445),i=a(50759),r=(a(38625),a(5124)),n=a(67576);a(67094);let s,l,c=e=>e;class d extends i.A{renderCheckboxIcon(){return(0,r.qy)(s||(s=c` <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=c`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`))]}constructor(...e){super(...e),this.selected=!1}}(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],d.prototype,"selected",void 0),d=(0,o.Cg)([(0,n.EM)("ha-dropdown-item")],d)},29823:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);var o=a(40445),i=a(52254),r=a(5124),n=a(67576),s=e([i]);i=(s.then?(await s)():s)[0];let l,c=e=>e;class d extends i.A{get anchorElement(){var e;return null===(e=this.popup)||void 0===e?void 0:e.anchor}set anchorElement(e){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=e)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!0)}async hideMenu(){const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!1),await super.hideMenu()}static get styles(){return[i.A.styles,(0,r.AH)(l||(l=c`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
--card-background-color,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
)}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`))]}constructor(...e){super(...e),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"dropdownTag",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"dropdownItemTag",void 0),d=(0,o.Cg)([(0,n.EM)("ha-dropdown")],d),t()}catch(l){t(l)}})},90248:function(e,t,a){a.a(e,async function(e,o){try{a.r(t),a.d(t,{HaIconButtonArrowPrev:function(){return f}});a(62953);var i=a(40445),r=a(5124),n=a(67576),s=a(63091),l=a(26300),c=e([l]);l=(c.then?(await c)():c)[0];let d,h=e=>e;const u="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",p="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class f extends r.WF{render(){var e;return(0,r.qy)(d||(d=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===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...e){super(...e),this.disabled=!1,this._icon="rtl"===s.G.document.dir?p:u}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],f.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)()],f.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)()],f.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],f.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],f.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],f.prototype,"download",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_icon",void 0),f=(0,i.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],f),o()}catch(d){o(d)}})},26300:function(e,t,a){a.a(e,async function(e,o){try{a.r(t),a.d(t,{HaIconButton:function(){return v}});a(62953);var i=a(40445),r=a(5124),n=a(67576),s=a(63672),l=a(18350),c=(a(67094),e([l]));l=(c.then?(await c)():c)[0];let d,h,u,p,f=e=>e;class v extends r.WF{render(){return(0,r.qy)(d||(d=f` <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=f`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,r.qy)(u||(u=f`<span><slot></slot></span>`)))}constructor(...e){super(...e),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}v.shadowRootOptions={mode:"open",delegatesFocus:!0},v.styles=(0,r.AH)(p||(p=f`: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})],v.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],v.prototype,"path",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],v.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],v.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],v.prototype,"hideTitle",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],v.prototype,"selected",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),v=(0,i.Cg)([(0,n.EM)("ha-icon-button")],v),o()}catch(d){o(d)}})},47680:function(e,t,a){a.r(t),a.d(t,{HaIcon:function(){return $}});a(74423),a(3362),a(62953);var o=a(40445),i=a(5124),r=a(67576),n=a(1087),s=a(9899),l=a(700),c=(a(44114),a(18111),a(7588),a(96167),a(95192)),d=a(7553);const h=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let u;const p=()=>(u||(u=f().catch(e=>{throw u=void 0,e})),u),f=async()=>{const e=(0,c.y$)("hass-icon-db","mdi-icon-store"),t=await(0,c.Jt)("_version",e);return t?t!==h.version&&(await(0,c.IU)(e),(0,c.hZ)("_version",h.version,e)):(0,c.hZ)("_version",h.version,e),e},v=["mdi","hass","hassio","hademo"];let b=[];a(67094);let g,m,y,_=e=>e;const w={},C={},x=(0,s.s)(()=>(async e=>{const t=Object.keys(e),a=await Promise.allSettled(Object.values(e));(await p())("readwrite",o=>{a.forEach((a,i)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([e,t])=>{o.put(t,e)}),delete e[t[i]]})})})(C),2e3),k={},A={"home-assistant":()=>a.e(58781).then(a.bind(a,53580)).then(e=>e.mdiHomeAssistant),"music-assistant":()=>a.e(56009).then(a.bind(a,10576)).then(e=>e.mdiMusicAssistant),esphome:()=>a.e(88800).then(a.bind(a,45091)).then(e=>e.mdiEsphomeLogo)};class $ extends i.WF{willUpdate(e){super.willUpdate(e),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?(0,i.qy)(g||(g=_` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,i.qy)(m||(m=_`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):i.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let o,i=a;if(!t||!i)return;if(!v.includes(t)){const a=l.y[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(i),e)):void(this._legacy=!0)}if(this._legacy=!1,i in w){const e=w[i];let a;e.newName?(a=`Icon ${t}:${i} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,i=e.newName):a=`Icon ${t}:${i} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(a),(0,n.r)(this,"write_log",{level:"warning",message:a})}if(i in k)return void(this._path=k[i]);if(i in A){const t=await A[i]();return this.icon===e&&(this._path=t),void(k[i]=t)}try{o=await(e=>new Promise((t,a)=>{if(b.push([e,t,a]),b.length>1)return;const o=p();(0,d.h)(1e3,(async()=>{(await o)("readonly",e=>{for(const[t,a,o]of b)(0,c.Yd)(e.get(t)).then(e=>a(e)).catch(e=>o(e));b=[]})})()).catch(e=>{for(const[,,t]of b)t(e);b=[]})}))(i)}catch(u){o=void 0}if(o)return this.icon===e&&(this._path=o),void(k[i]=o);const r=(e=>{let t;for(const a of h.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(i);if(r in C)return void this._setPath(C[r],i,e);const s=fetch(`/static/mdi/${r}.json`).then(e=>e.json());C[r]=s,this._setPath(s,i,e),s.catch(()=>{delete C[r]}),x()}async _setCustomPath(e,t){const a=await e;this.icon===t&&(this._path=a.path,this._secondaryPath=a.secondaryPath,this._viewBox=a.viewBox)}async _setPath(e,t,a){try{const o=await e;this.icon===a&&(this._path=o[t]),k[t]=o[t]}catch(o){}}constructor(...e){super(...e),this._legacy=!1}}$.styles=(0,i.AH)(y||(y=_`:host{fill:currentcolor}`)),(0,o.Cg)([(0,r.MZ)()],$.prototype,"icon",void 0),(0,o.Cg)([(0,r.wk)()],$.prototype,"_path",void 0),(0,o.Cg)([(0,r.wk)()],$.prototype,"_secondaryPath",void 0),(0,o.Cg)([(0,r.wk)()],$.prototype,"_viewBox",void 0),(0,o.Cg)([(0,r.wk)()],$.prototype,"_legacy",void 0),$=(0,o.Cg)([(0,r.EM)("ha-icon")],$)},81789:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{p:function(){return z}});a(74423),a(18111),a(22489),a(61701),a(13579),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(40445),r=a(35211),n=a(5124),s=a(67576),l=a(89784),c=a(22786),d=a(78870),h=a(1087),u=a(22792),p=a(5904),f=a(92557),v=a(65063),b=a(69569),g=a(38508),m=a(49639),y=(a(67094),e([g,m]));[g,m]=y.then?(await y)():y;let _,w,C,x,k,A=e=>e;const $="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",M="___ADD_NEW___",z=e=>(0,n.qy)(_||(_=A`<div style="${0}"></div>`),(0,l.W)({backgroundColor:e?(0,d.MP)(e):void 0,borderRadius:"var(--ha-border-radius-md)",border:"1px solid var(--outline-color)",boxSizing:"border-box",width:"var(--ha-space-5)",height:"var(--ha-space-5)"}));class H extends n.WF{willUpdate(e){var t;this._pendingLabelId&&e.has("_labels")&&null!==(t=this._labels)&&void 0!==t&&t.some(e=>e.label_id===this._pendingLabelId)&&(this._setValue(this._pendingLabelId),this._pendingLabelId=void 0)}async open(){var e;await this.updateComplete,await(null===(e=this._picker)||void 0===e?void 0:e.open())}render(){var e,t;const a=null!==(e=this.placeholder)&&void 0!==e?e:this.hass.localize("ui.components.label-picker.label");return(0,n.qy)(w||(w=A` <ha-generic-picker .disabled="${0}" .hass="${0}" .autofocus="${0}" .label="${0}" .helper="${0}" .notFoundLabel="${0}" .emptyLabel="${0}" .addButtonLabel="${0}" .placeholder="${0}" .value="${0}" .getItems="${0}" .getAdditionalItems="${0}" .rowRenderer="${0}" .searchKeys="${0}" @value-changed="${0}"> <slot @slotchange="${0}" .slot="${0}"></slot> </ha-generic-picker> `),this.disabled,this.hass,this.autofocus,this.label,this.helper,this._notFoundLabel,this.hass.localize("ui.components.label-picker.no_labels"),this.hass.localize("ui.components.label-picker.add"),a,this.value,this._getItems,this._getAdditionalItems,this._rowRenderer,p.u,this._valueChanged,this._handleSlotChange,null!==(t=this._slotNodes)&&void 0!==t&&t.length?"field":void 0)}_valueChanged(e){e.stopPropagation();const t=e.detail.value;if(t){if(t.startsWith(M)){this.hass.loadFragmentTranslation("config");const e=t.substring(M.length);return void(0,b.f)(this,{suggestedName:e,createEntry:async e=>{try{var t;const a=await(0,f._9)(this.hass,e);null!==(t=this._labels)&&void 0!==t&&t.some(e=>e.label_id===a.label_id)?this._setValue(a.label_id):this._pendingLabelId=a.label_id}catch(a){(0,v.showAlertDialog)(this,{title:this.hass.localize("ui.components.label-picker.failed_create_label"),text:a.message})}}})}this._setValue(t)}else this._setValue(void 0)}_setValue(e){this.value=e,setTimeout(()=>{(0,h.r)(this,"value-changed",{value:e}),(0,h.r)(this,"change")},0)}_handleSlotChange(){this.requestUpdate()}constructor(...e){super(...e),this.noAdd=!1,this.disabled=!1,this.required=!1,this._rowRenderer=e=>(0,n.qy)(C||(C=A`<ha-combo-box-item type="button" compact="compact"> ${0} ${0} </ha-combo-box-item>`),(0,m.LE)(e),e.id!==M?(0,n.qy)(x||(x=A`<div slot="trailing-supporting-text"> ${0} </div>`),z(e.color)):n.s6),this._getLabelsMemoized=(0,c.A)(p.I),this._getItems=()=>this._getLabelsMemoized(this.hass.states,this.hass.areas,this.hass.devices,this.hass.entities,this._labels,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter,this.entityFilter,this.excludeLabels),this._allLabelNames=(0,c.A)(e=>e?[...new Set(e.map(e=>e.name.toLowerCase()).filter(Boolean))]:[]),this._getAdditionalItems=e=>{if(this.noAdd)return[];const t=this._allLabelNames(this._labels);return e&&!t.includes(e.toLowerCase())?[{id:M+e,primary:this.hass.localize("ui.components.label-picker.add_new_suggestion",{name:e}),icon_path:$}]:[{id:M,primary:this.hass.localize("ui.components.label-picker.add_new"),icon_path:$}]},this._notFoundLabel=e=>this.hass.localize("ui.components.label-picker.no_match",{term:(0,n.qy)(k||(k=A`<b>‘${0}’</b>`),e)})}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],H.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)()],H.prototype,"label",void 0),(0,i.Cg)([(0,s.MZ)()],H.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)()],H.prototype,"helper",void 0),(0,i.Cg)([(0,s.MZ)()],H.prototype,"placeholder",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,attribute:"no-add"})],H.prototype,"noAdd",void 0),(0,i.Cg)([(0,s.MZ)({type:Array,attribute:"include-domains"})],H.prototype,"includeDomains",void 0),(0,i.Cg)([(0,s.MZ)({type:Array,attribute:"exclude-domains"})],H.prototype,"excludeDomains",void 0),(0,i.Cg)([(0,s.MZ)({type:Array,attribute:"include-device-classes"})],H.prototype,"includeDeviceClasses",void 0),(0,i.Cg)([(0,s.MZ)({type:Array,attribute:"exclude-label"})],H.prototype,"excludeLabels",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],H.prototype,"deviceFilter",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],H.prototype,"entityFilter",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],H.prototype,"disabled",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],H.prototype,"required",void 0),(0,i.Cg)([(0,r.Fg)({context:u.HD,subscribe:!0}),(0,s.wk)()],H.prototype,"_labels",void 0),(0,i.Cg)([(0,s.KN)({flatten:!0})],H.prototype,"_slotNodes",void 0),(0,i.Cg)([(0,s.P)("ha-generic-picker")],H.prototype,"_picker",void 0),(0,i.Cg)([(0,s.wk)()],H.prototype,"_pendingLabelId",void 0),H=(0,i.Cg)([(0,s.EM)("ha-label-picker")],H),o()}catch(_){o(_)}})},2054:function(e,t,a){a.a(e,async function(e,t){try{a(16280),a(62953);var o=a(40445),i=a(5124),r=a(67576),n=a(1087),s=a(44249),l=a(26300),c=e([l]);l=(c.then?(await c)():c)[0];let d,h,u,p=e=>e;const f="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class v 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 e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,i.qy)(d||(d=p` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),f,this._toggleMenu,e?(0,i.qy)(h||(h=p`<div class="dot"></div>`)):"")}willUpdate(e){if(super.willUpdate(e),!e.has("narrow")&&!e.has("hass"))return;const t=e.has("hass")?e.get("hass"):this.hass,a=e.has("narrow")?e.get("narrow"):this.narrow,o=!1===(null==t?void 0:t.kioskMode)&&(a||"always_hidden"===(null==t?void 0:t.dockedSidebar)),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,e=>{this._hasNotifications=e.length>0})}_toggleMenu(){(0,n.r)(this,"hass-toggle-menu")}constructor(...e){super(...e),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}v.styles=(0,i.AH)(u||(u=p`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,o.Cg)([(0,r.MZ)({type:Boolean})],v.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,o.Cg)([(0,r.wk)()],v.prototype,"_hasNotifications",void 0),(0,o.Cg)([(0,r.wk)()],v.prototype,"_show",void 0),v=(0,o.Cg)([(0,r.EM)("ha-menu-button")],v),t()}catch(d){t(d)}})},67094:function(e,t,a){a.r(t),a.d(t,{HaSvgIcon:function(){return h}});var o=a(40445),i=a(5124),r=a(67576);let n,s,l,c,d=e=>e;class h extends i.WF{render(){return(0,i.JW)(n||(n=d` <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=d`<path class="primary-path" d="${0}"></path>`),this.path):i.s6,this.secondaryPath?(0,i.JW)(l||(l=d`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):i.s6)}}h.styles=(0,i.AH)(c||(c=d`: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(e,t,a){a.a(e,async function(e,t){try{a(62953);var o=a(40445),i=a(52630),r=a(5124),n=a(67576),s=e([i]);i=(s.then?(await s)():s)[0];let l,c=e=>e;class d extends i.A{static get styles(){return[i.A.styles,(0,r.AH)(l||(l=c`:host{--wa-tooltip-background-color:var(
--ha-tooltip-background-color,
var(--ha-color-surface-default)
);--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-m)
);--wa-tooltip-font-weight:var(
--ha-tooltip-font-weight,
var(--ha-font-weight-medium)
);--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-md)
);--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}.tooltip::part(popup){animation-duration:var(--ha-tooltip-animation-duration, 0)}.body{box-shadow:var(--ha-tooltip-box-shadow,var(--ha-box-shadow-m))}`))]}constructor(...e){super(...e),this.showDelay=350,this.hideDelay=150}}(0,o.Cg)([(0,n.MZ)({attribute:"show-delay",type:Number})],d.prototype,"showDelay",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"hide-delay",type:Number})],d.prototype,"hideDelay",void 0),d=(0,o.Cg)([(0,n.EM)("ha-tooltip")],d),t()}catch(l){t(l)}})},36866:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var o=a(40445),i=a(5124),r=a(67576),n=a(91485),s=e([n]);n=(s.then?(await s)():s)[0];let l,c,d=e=>e;const h="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 n.U{willUpdate(e){var t,a;(super.willUpdate(e),this.label||this.placeholder||this.hasUpdated&&!e.has("_i18n"))||(this.placeholder=(null===(t=this.i18n)||void 0===t||null===(a=t.localize)||void 0===a?void 0:a.call(t,"ui.common.search"))||"Search")}renderStartDefault(){return(0,i.qy)(l||(l=d`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),h)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}u.styles=[...n.U.styles,(0,i.AH)(c||(c=d`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],u=(0,o.Cg)([(0,r.EM)("ha-input-search")],u),t()}catch(l){t(l)}})},700:function(e,t,a){a.d(t,{y:function(){return n}});const o=window;"customIconsets"in o||(o.customIconsets={});const i=o.customIconsets,r=window;"customIcons"in r||(r.customIcons={});const n=new Proxy(r.customIcons,{get:(e,t)=>{var a;return null!==(a=e[t])&&void 0!==a?a:i[t]?{getIcon:i[t]}:void 0}})},22675:function(e,t,a){a.d(t,{HV:function(){return r},Hh:function(){return i}});var o=a(23832);const i="unavailable",r="unknown",n=[i,r,"off"];(0,o.g)(n)},5904:function(e,t,a){a.d(t,{I:function(){return n},u:function(){return r}});a(89463),a(74423),a(18111),a(81148),a(22489),a(7588),a(61701),a(13579),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var o=a(71727),i=a(58594);const r=[{name:"search_labels.name",weight:10},{name:"search_labels.description",weight:5},{name:"search_labels.id",weight:4}],n=(e,t,a,r,n,s,l,c,d,h,u,p="")=>{if(!n||0===n.length)return[];const f=Object.values(a),v=Object.values(r);let b,g,m={};(s||l||c||d||h)&&(m=(0,i.g2)(v),b=f,g=v.filter(e=>e.labels.length>0),s&&(b=b.filter(e=>{const t=m[e.id];return!(!t||!t.length)&&m[e.id].some(e=>s.includes((0,o.m)(e.entity_id)))}),g=g.filter(e=>s.includes((0,o.m)(e.entity_id)))),l&&(b=b.filter(e=>{const t=m[e.id];return!t||!t.length||v.every(e=>!l.includes((0,o.m)(e.entity_id)))}),g=g.filter(e=>!l.includes((0,o.m)(e.entity_id)))),c&&(b=b.filter(t=>{const a=m[t.id];return!(!a||!a.length)&&m[t.id].some(t=>{const a=e[t.entity_id];return!!a&&(a.attributes.device_class&&c.includes(a.attributes.device_class))})}),g=g.filter(t=>{const a=e[t.entity_id];return a&&a.attributes.device_class&&c.includes(a.attributes.device_class)})),d&&(b=b.filter(e=>d(e))),h&&(b=b.filter(t=>{const a=m[t.id];return!(!a||!a.length)&&m[t.id].some(t=>{const a=e[t.entity_id];return!!a&&h(a)})}),g=g.filter(t=>{const a=e[t.entity_id];return!!a&&h(a)})));let y=n;const _=new Set;let w;b&&(w=b.filter(e=>e.area_id).map(e=>e.area_id),b.forEach(e=>{e.labels.forEach(e=>_.add(e))})),g&&(w=(null!=w?w:[]).concat(g.filter(e=>e.area_id).map(e=>e.area_id)),g.forEach(e=>{e.labels.forEach(e=>_.add(e))})),w&&w.forEach(e=>{const a=t[e];null==a||a.labels.forEach(e=>_.add(e))}),u&&(y=y.filter(e=>!u.includes(e.label_id))),(b||g)&&(y=y.filter(e=>_.has(e.label_id)));return y.map(e=>{var t;return{id:`${p}${e.label_id}`,primary:e.name,secondary:null!==(t=e.description)&&void 0!==t?t:"",icon:e.icon||void 0,icon_path:e.icon?void 0:"M17.63,5.84C17.27,5.33 16.67,5 16,5H5A2,2 0 0,0 3,7V17A2,2 0 0,0 5,19H16C16.67,19 17.27,18.66 17.63,18.15L22,12L17.63,5.84Z",sorting_label:e.name,search_labels:{name:e.name,description:e.description,id:e.label_id},color:e.color||void 0}})}},44249:function(e,t,a){a.d(t,{V:function(){return o}});a(62953);const o=(e,t)=>{const a=new i,o=e.subscribeMessage(e=>t(a.processMessage(e)),{type:"persistent_notification/subscribe"});return()=>{o.then(e=>null==e?void 0:e())}};class i{processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications=Object.assign(Object.assign({},this.notifications),e.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},59992:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{V:function(){return f}});a(62953);var i=a(40445),r=a(88696),n=a(5124),s=a(6412),l=a(67576),c=e([r]);r=(c.then?(await c)():c)[0];let d,h,u=e=>e;const p=e=>void 0===e?[]:Array.isArray(e)?e:[e],f=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){var t;null===(t=super.firstUpdated)||void 0===t||t.call(this,e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){var t;null===(t=super.updated)||void 0===t||t.call(this,e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return(0,n.qy)(d||(d=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,s.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled}),(0,s.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable}))}static get styles(){var e;const t=Object.getPrototypeOf(this);return[...p(null!==(e=null==t?void 0:t.styles)&&void 0!==e?e:[]),(0,n.AH)(h||(h=u`.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 e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){var e,t;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(e=(t=this._resize).unobserve)||void 0===e||e.call(t,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:o=0,scrollTop:i=0}=e;this._contentScrollable=a-o>i+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{var t;const a=e.currentTarget;this._contentScrolled=(null!==(t=a.scrollTop)&&void 0!==t?t:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new r.P(this,{target:null,callback:e=>{var t;const a=null===(t=e[0])||void 0===t?void 0:t.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,i.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,i.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t};o()}catch(d){o(d)}})},19862:function(e,t,a){a.a(e,async function(e,o){try{a.r(t),a.d(t,{HaConfigLabels:function(){return I}});a(89463),a(18111),a(22489),a(20116),a(61701),a(3362),a(62953);var i=a(40445),r=(a(68825),a(5124)),n=a(67576),s=a(22786),l=a(93905),c=a(91926),d=a(29823),h=(a(70947),a(18350)),u=(a(47680),a(26300)),p=a(81789),f=(a(67094),a(92557)),v=a(65063),b=a(72553),g=a(29303),m=a(25635),y=a(69569),_=e([d,h,u,b,p,g]);[d,h,u,b,p,g]=_.then?(await _)():_;let w,C,x,k,A,$,M,z,H=e=>e;const L="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",S="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",T="M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z",E="M16,17H5V7H16L19.55,12M17.63,5.84C17.27,5.33 16.67,5 16,5H5A2,2 0 0,0 3,7V17A2,2 0 0,0 5,19H16C16.67,19 17.27,18.66 17.63,18.15L22,12L17.63,5.84Z",Z="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",V=[{value:"navigate-entities",icon:"M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z",translationKey:"entities.caption"},{value:"navigate-devices",icon:"M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",translationKey:"devices.caption"},{value:"navigate-automations",icon:"M12,2A2,2 0 0,1 14,4C14,4.74 13.6,5.39 13,5.73V7H14A7,7 0 0,1 21,14H22A1,1 0 0,1 23,15V18A1,1 0 0,1 22,19H21V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V19H2A1,1 0 0,1 1,18V15A1,1 0 0,1 2,14H3A7,7 0 0,1 10,7H11V5.73C10.4,5.39 10,4.74 10,4A2,2 0 0,1 12,2M7.5,13A2.5,2.5 0 0,0 5,15.5A2.5,2.5 0 0,0 7.5,18A2.5,2.5 0 0,0 10,15.5A2.5,2.5 0 0,0 7.5,13M16.5,13A2.5,2.5 0 0,0 14,15.5A2.5,2.5 0 0,0 16.5,18A2.5,2.5 0 0,0 19,15.5A2.5,2.5 0 0,0 16.5,13Z",translationKey:"automation.caption"},{value:"navigate-scenes",icon:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z",translationKey:"scene.caption"},{value:"navigate-scripts",icon:"M17.8,20C17.4,21.2 16.3,22 15,22H5C3.3,22 2,20.7 2,19V18H5L14.2,18C14.6,19.2 15.7,20 17,20H17.8M19,2C20.7,2 22,3.3 22,5V6H20V5C20,4.4 19.6,4 19,4C18.4,4 18,4.4 18,5V18H17C16.4,18 16,17.6 16,17V16H5V5C5,3.3 6.3,2 8,2H19M8,6V8H15V6H8M8,10V12H14V10H8Z",translationKey:"script.caption"}];class I extends r.WF{firstUpdated(e){super.firstUpdated(e),this._fetchLabels()}render(){return(0,r.qy)(w||(w=H` <hass-tabs-subpage-data-table .hass="${0}" .narrow="${0}" back-path="/config" .route="${0}" .tabs="${0}" .columns="${0}" .data="${0}" .noDataText="${0}" has-fab .initialSorting="${0}" .columnOrder="${0}" .hiddenColumns="${0}" @columns-changed="${0}" @sorting-changed="${0}" .filter="${0}" @search-changed="${0}" @row-click="${0}" clickable id="label_id"> <ha-icon-button slot="toolbar-icon" @click="${0}" .label="${0}" .path="${0}"></ha-icon-button> <ha-button slot="fab" size="large" @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> </hass-tabs-subpage-data-table> <ha-dropdown id="overflow-menu" @wa-select="${0}" @wa-after-show="${0}" @wa-after-hide="${0}"> ${0} <wa-divider></wa-divider> <ha-dropdown-item variant="danger" value="remove"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> </ha-dropdown> `),this.hass,this.narrow,this.route,m.configSections.areas,this._columns(this.hass.localize,this.narrow),this._data(this._labels),this.hass.localize("ui.panel.config.labels.no_labels"),this._activeSorting,this._activeColumnOrder,this._activeHiddenColumns,this._handleColumnsChanged,this._handleSortingChanged,this._filter,this._handleSearchChange,this._editLabel,this._showHelp,this.hass.localize("ui.common.help"),T,this._addLabel,Z,this.hass.localize("ui.panel.config.labels.add_label"),this._handleOverflowAction,this._overflowMenuOpened,this._overflowMenuClosed,V.map(e=>(0,r.qy)(C||(C=H` <ha-dropdown-item value="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> `),e.value,e.icon,this.hass.localize(`ui.panel.config.${e.translationKey}`))),L,this.hass.localize("ui.common.delete"))}_editLabel(e){const t=this._labels.find(t=>t.label_id===e.detail.id);this._openDialog(t)}_showHelp(){(0,v.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.labels.caption"),text:(0,r.qy)(x||(x=H` ${0} <p>${0}</p> `),this.hass.localize("ui.panel.config.labels.introduction"),this.hass.localize("ui.panel.config.labels.introduction2"))})}async _fetchLabels(){this._labels=await(0,f._G)(this.hass.connection)}_addLabel(){this._openDialog()}_openDialog(e){(0,y.f)(this,{entry:e,createEntry:e=>this._createLabel(e),updateEntry:e?t=>this._updateLabel(e,t):void 0,removeEntry:e?()=>this._removeLabel(e):void 0})}async _createLabel(e){const t=await(0,f._9)(this.hass,e);return this._labels=[...this._labels,t],t}async _updateLabel(e,t){const a=await(0,f.Rp)(this.hass,e.label_id,t);return this._labels=this._labels.map(t=>t.label_id===e.label_id?a:t),a}async _removeLabel(e){if(!(await(0,v.dk)(this,{title:this.hass.localize("ui.panel.config.labels.confirm_remove_title"),text:this.hass.localize("ui.panel.config.labels.confirm_remove",{label:e.name||e.label_id}),dismissText:this.hass.localize("ui.common.cancel"),confirmText:this.hass.localize("ui.common.remove"),destructive:!0})))return!1;try{return await(0,f.d4)(this.hass,e.label_id),this._labels=this._labels.filter(t=>t.label_id!==e.label_id),!0}catch(t){return!1}}_handleSortingChanged(e){this._activeSorting=e.detail}_handleSearchChange(e){this._filter=e.detail.value}_handleColumnsChanged(e){this._activeColumnOrder=e.detail.columnOrder,this._activeHiddenColumns=e.detail.hiddenColumns}constructor(...e){super(...e),this.isWide=!1,this.narrow=!1,this._labels=[],this._filter="",this._openingOverflow=!1,this._columns=(0,s.A)((e,t)=>({icon:{title:"",moveable:!1,showNarrow:!0,label:e("ui.panel.config.labels.headers.icon"),type:"icon",template:e=>e.icon?(0,r.qy)(k||(k=H`<ha-icon .icon="${0}"></ha-icon>`),e.icon):(0,r.qy)(A||(A=H`<ha-svg-icon .path="${0}"></ha-svg-icon>`),E)},color:{title:"",showNarrow:!0,label:e("ui.panel.config.labels.headers.color"),type:"icon",template:e=>{var t;return(0,p.p)(null!==(t=e.color)&&void 0!==t?t:void 0)}},name:{title:e("ui.panel.config.labels.headers.name"),main:!0,flex:2,sortable:!0,filterable:!0,template:t?void 0:e=>(0,r.qy)($||($=H` <div>${0}</div> ${0} `),e.name,e.description?(0,r.qy)(M||(M=H`<div class="secondary">${0}</div>`),e.description):r.s6)},description:{title:e("ui.panel.config.labels.headers.description"),hidden:!t,filterable:!0,hideable:!0},created_at:(0,g.oO)(e,this.hass),modified_at:(0,g.Tr)(e,this.hass),actions:{lastFixed:!0,title:"",label:e("ui.panel.config.generic.headers.actions"),showNarrow:!0,type:"overflow-menu",template:e=>(0,r.qy)(z||(z=H` <ha-icon-button .selectedLabel="${0}" .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> `),e,this.hass.localize("ui.common.overflow_menu"),S,this._toggleOverflowMenu)}})),this._data=(0,s.A)(e=>e.map(e=>Object.assign({},e))),this._toggleOverflowMenu=e=>{this._overflowMenu&&(this._overflowMenu.anchorElement!==e.target?(this._openingOverflow=!0,this._overflowMenu.anchorElement=e.target,this._overflowLabel=e.target.selectedLabel,this._overflowMenu.open=!0):this._overflowMenu.anchorElement=void 0)},this._overflowMenuOpened=()=>{this._openingOverflow=!1},this._overflowMenuClosed=()=>{!this._openingOverflow&&this._overflowMenu&&(this._overflowMenu.anchorElement=void 0)},this._handleRemoveLabelClick=()=>{this._removeLabel(this._overflowLabel)},this._handleOverflowAction=e=>{const t=e.detail.item.value;if(t)switch(t){case"navigate-entities":this._navigateConfig("/config/entities");break;case"navigate-devices":this._navigateConfig("/config/devices/dashboard");break;case"navigate-automations":this._navigateConfig("/config/automation/dashboard");break;case"navigate-scenes":this._navigateConfig("/config/scene/dashboard");break;case"navigate-scripts":this._navigateConfig("/config/script/dashboard");break;case"remove":this._handleRemoveLabelClick()}},this._navigateConfig=e=>{(0,c.oo)(`${e}?historyBack=1&label=${this._overflowLabel.label_id}`)}}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],I.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"is-wide",type:Boolean})],I.prototype,"isWide",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],I.prototype,"narrow",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],I.prototype,"route",void 0),(0,i.Cg)([(0,n.wk)()],I.prototype,"_labels",void 0),(0,i.Cg)([(0,n.wk)(),(0,l.I)({storage:"sessionStorage",key:"labels-table-search",state:!0,subscribe:!1})],I.prototype,"_filter",void 0),(0,i.Cg)([(0,l.I)({key:"labels-table-sort",state:!1,subscribe:!1})],I.prototype,"_activeSorting",void 0),(0,i.Cg)([(0,l.I)({key:"labels-table-column-order",state:!1,subscribe:!1})],I.prototype,"_activeColumnOrder",void 0),(0,i.Cg)([(0,l.I)({key:"labels-table-hidden-columns",state:!1,subscribe:!1})],I.prototype,"_activeHiddenColumns",void 0),(0,i.Cg)([(0,n.P)("#overflow-menu")],I.prototype,"_overflowMenu",void 0),I=(0,i.Cg)([(0,n.EM)("ha-config-labels")],I),o()}catch(w){o(w)}})},69569:function(e,t,a){a.d(t,{f:function(){return r}});a(3362),a(62953);var o=a(1087);const i=()=>Promise.all([a.e(92769),a.e(3283),a.e(37941),a.e(26092),a.e(39005),a.e(13231)]).then(a.bind(a,427)),r=(e,t)=>{(0,o.r)(e,"show-dialog",{dialogTag:"dialog-label-detail",dialogImport:i,dialogParams:t})}},69235:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await a.e(71055).then(a.bind(a,52370))).default),t()}catch(o){t(o)}},1)},14503:function(e,t,a){a.d(t,{RF:function(){return u},dp:function(){return v},kO:function(){return f},nA:function(){return p},og:function(){return h}});var o=a(5124);let i,r,n,s,l,c,d=e=>e;const h=(0,o.AH)(i||(i=d`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),u=(0,o.AH)(r||(r=d`: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),p=(0,o.AH)(n||(n=d`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)}`)),f=(0,o.AH)(s||(s=d`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}}`)),v=(0,o.AH)(l||(l=d`.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)(c||(c=d`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},85614:function(e,t,a){a.d(t,{i:function(){return o}});a(3362),a(62953);const o=async()=>{await Promise.all([a.e(38085),a.e(22309)]).then(a.bind(a,40772))}},22348:function(e,t,a){a.d(t,{V:function(){return i}});var o=a(37177);const i=e=>!!e&&o.n},37177:function(e,t,a){a.d(t,{n:function(){return o}});a(27495);const o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},88438:function(e,t,a){a.d(t,{C:function(){return o}});const o="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}}]);