iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
48 lines • 52.8 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[83128],{65522:function(e,t,a){a.d(t,{A:function(){return i}});a(42762);const i=e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.trim()}},37981:function(e,t,a){a.d(t,{xn:function(){return o},T:function(){return n},Kh:function(){return l}});a(18111),a(22489),a(61701),a(42762),a(62953);var i=a(22786);a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var r=a(28978);const o=e=>{var t;return null===(t=e.name_by_user||e.name)||void 0===t?void 0:t.trim()},n=(e,t,a,i)=>o(e)||i&&s(a,i)||t("ui.panel.config.devices.unnamed_device",{type:t(`ui.panel.config.devices.type.${e.entry_type||"device"}`)}),s=(e,t)=>{for(const a of t||[]){const t=e["string"==typeof a?a:a.entity_id];if(t)return(0,r.u)(t)}},l=(0,i.A)(e=>function(e){const t=new Set,a=new Set;for(const i of e)a.has(i)?t.add(i):a.add(i);return t}(Object.values(e).map(e=>o(e)).filter(e=>void 0!==e)))},76774:function(e,t,a){a.d(t,{q:function(){return i}});const i=(e,t)=>{const a=e.area_id;return a?t[a]:void 0}},7553:function(e,t,a){a.d(t,{h:function(){return r}});a(16280),a(3362),a(62953);class i extends Error{constructor(e,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,i),this.name="TimeoutError",this.timeout=e,this.message=`Timed out in ${e} ms.`}}const r=(e,t)=>{const a=new Promise((t,a)=>{setTimeout(()=>{a(new i(e))},e)});return Promise.race([t,a])}},60353:function(e,t,a){a.d(t,{u:function(){return i}});class i{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}}},8129:function(e,t,a){a.d(t,{l:function(){return i}});a(3362);const i=e=>new Promise(t=>{setTimeout(t,e)})},5745:function(e,t,a){var i=a(40445),r=a(99731),o=a(67576);class n extends r.Y{}n=(0,i.Cg)([(0,o.EM)("ha-chip-set")],n)},1798:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(61701),a(53921),a(3362),a(62953);var i=a(40445),r=a(5124),o=a(67576),n=a(22786),s=a(1087),l=a(65522),c=a(37981),d=a(76774),h=a(77423),u=a(31422),p=a(44144),f=a(38508),v=e([f]);f=(v.then?(await v)():v)[0];let g,m,b,y,_,w,x,C,k,$=e=>e;class S extends r.WF{firstUpdated(e){super.firstUpdated(e),this._loadConfigEntries()}async _loadConfigEntries(){const e=await(0,h.VN)(this.hass);this._configEntryLookup=Object.fromEntries(e.map(e=>[e.entry_id,e]))}render(){var e;const t=null!==(e=this.placeholder)&&void 0!==e?e:this.hass.localize("ui.components.device-picker.placeholder"),a=this._valueRenderer(this._configEntryLookup);return(0,r.qy)(g||(g=$` <ha-generic-picker .hass="${0}" .autofocus="${0}" .disabled="${0}" .helper="${0}" .label="${0}" .searchLabel="${0}" .notFoundLabel="${0}" .emptyLabel="${0}" .placeholder="${0}" .value="${0}" .rowRenderer="${0}" .getItems="${0}" .hideClearIcon="${0}" .valueRenderer="${0}" .searchKeys="${0}" .unknownItemText="${0}" @value-changed="${0}"> </ha-generic-picker> `),this.hass,this.autofocus,this.disabled,this.helper,this.label,this.searchLabel,this._notFoundLabel,this.hass.localize("ui.components.device-picker.no_devices"),t,this.value,this._rowRenderer,this._getItems,this.hideClearIcon,a,u._o,this.hass.localize("ui.components.device-picker.unknown"),this._valueChanged)}async open(){var e;await this.updateComplete,await(null===(e=this._picker)||void 0===e?void 0:e.open())}_valueChanged(e){e.stopPropagation();const t=e.detail.value;this.value=t,(0,s.r)(this,"value-changed",{value:t})}constructor(...e){super(...e),this.autofocus=!1,this.disabled=!1,this.required=!1,this.hideClearIcon=!1,this._configEntryLookup={},this._getDevicesMemoized=(0,n.A)((e,t,a,i,r,o,n,s,l)=>(0,u.oG)(this.hass,t,a,i,r,o,n,s,l)),this._getItems=()=>this._getDevicesMemoized(this.hass.devices,this._configEntryLookup,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter,this.entityFilter,this.excludeDevices,this.value),this._valueRenderer=(0,n.A)(e=>t=>{var a;const i=t,o=this.hass.devices[i];if(!o)return(0,r.qy)(m||(m=$`<span slot="headline">${0}</span>`),i);const n=(0,d.q)(o,this.hass.areas),s=o?(0,c.xn)(o):void 0,h=n?(0,l.A)(n):void 0,u=o.primary_config_entry?e[o.primary_config_entry]:void 0;return(0,r.qy)(b||(b=$` ${0} <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> `),u?(0,r.qy)(y||(y=$`<img slot="start" alt="" crossorigin="anonymous" referrerpolicy="no-referrer" src="${0}">`),(0,p.MR)({domain:u.domain,type:"icon",darkOptimized:null===(a=this.hass.themes)||void 0===a?void 0:a.darkMode},this.hass.auth.data.hassUrl)):r.s6,s,h)}),this._rowRenderer=e=>(0,r.qy)(_||(_=$` <ha-combo-box-item type="button"> ${0} <span slot="headline">${0}</span> ${0} ${0} </ha-combo-box-item> `),e.domain?(0,r.qy)(w||(w=$` <img slot="start" alt="" crossorigin="anonymous" referrerpolicy="no-referrer" src="${0}"> `),(0,p.MR)({domain:e.domain,type:"icon",darkOptimized:this.hass.themes.darkMode},this.hass.auth.data.hassUrl)):r.s6,e.primary,e.secondary?(0,r.qy)(x||(x=$`<span slot="supporting-text">${0}</span>`),e.secondary):r.s6,e.domain_name?(0,r.qy)(C||(C=$` <div slot="trailing-supporting-text" class="domain"> ${0} </div> `),e.domain_name):r.s6),this._notFoundLabel=e=>this.hass.localize("ui.components.device-picker.no_match",{term:(0,r.qy)(k||(k=$`<b>‘${0}’</b>`),e)})}}(0,i.Cg)([(0,o.MZ)({attribute:!1})],S.prototype,"hass",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],S.prototype,"autofocus",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],S.prototype,"disabled",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],S.prototype,"required",void 0),(0,i.Cg)([(0,o.MZ)()],S.prototype,"label",void 0),(0,i.Cg)([(0,o.MZ)()],S.prototype,"value",void 0),(0,i.Cg)([(0,o.MZ)()],S.prototype,"helper",void 0),(0,i.Cg)([(0,o.MZ)()],S.prototype,"placeholder",void 0),(0,i.Cg)([(0,o.MZ)({type:String,attribute:"search-label"})],S.prototype,"searchLabel",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],S.prototype,"createDomains",void 0),(0,i.Cg)([(0,o.MZ)({type:Array,attribute:"include-domains"})],S.prototype,"includeDomains",void 0),(0,i.Cg)([(0,o.MZ)({type:Array,attribute:"exclude-domains"})],S.prototype,"excludeDomains",void 0),(0,i.Cg)([(0,o.MZ)({type:Array,attribute:"include-device-classes"})],S.prototype,"includeDeviceClasses",void 0),(0,i.Cg)([(0,o.MZ)({type:Array,attribute:"exclude-devices"})],S.prototype,"excludeDevices",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],S.prototype,"deviceFilter",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],S.prototype,"entityFilter",void 0),(0,i.Cg)([(0,o.MZ)({attribute:"hide-clear-icon",type:Boolean})],S.prototype,"hideClearIcon",void 0),(0,i.Cg)([(0,o.P)("ha-generic-picker")],S.prototype,"_picker",void 0),(0,i.Cg)([(0,o.wk)()],S.prototype,"_configEntryLookup",void 0),S=(0,i.Cg)([(0,o.EM)("ha-device-picker")],S),t()}catch(g){t(g)}})},41665:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(18111),a(22489),a(61701),a(3362),a(62953);var i=a(40445),r=a(5124),o=a(67576),n=a(1087),s=a(1798),l=e([s]);s=(l.then?(await l)():l)[0];let c,d,h,u=e=>e;class p extends r.WF{render(){if(!this.hass)return r.s6;const e=this._currentDevices;return(0,r.qy)(c||(c=u` ${0} <div> <ha-device-picker .hass="${0}" .helper="${0}" .deviceFilter="${0}" .entityFilter="${0}" .includeDomains="${0}" .excludeDomains="${0}" .excludeDevices="${0}" .includeDeviceClasses="${0}" .label="${0}" .disabled="${0}" .required="${0}" @value-changed="${0}"></ha-device-picker> </div> `),e.map(e=>(0,r.qy)(d||(d=u` <div> <ha-device-picker .curValue="${0}" .hass="${0}" .deviceFilter="${0}" .entityFilter="${0}" .includeDomains="${0}" .excludeDomains="${0}" .includeDeviceClasses="${0}" .value="${0}" .label="${0}" .disabled="${0}" @value-changed="${0}"></ha-device-picker> </div> `),e,this.hass,this.deviceFilter,this.entityFilter,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,e,this.pickedDeviceLabel,this.disabled,this._deviceChanged)),this.hass,this.helper,this.deviceFilter,this.entityFilter,this.includeDomains,this.excludeDomains,e,this.includeDeviceClasses,this.pickDeviceLabel,this.disabled,this.required&&!e.length,this._addDevice)}get _currentDevices(){return this.value||[]}async _updateDevices(e){(0,n.r)(this,"value-changed",{value:e}),this.value=e}_deviceChanged(e){e.stopPropagation();const t=e.currentTarget.curValue,a=e.detail.value;a!==t&&(void 0===a?this._updateDevices(this._currentDevices.filter(e=>e!==t)):this._updateDevices(this._currentDevices.map(e=>e===t?a:e)))}async _addDevice(e){e.stopPropagation();const t=e.detail.value;if(e.currentTarget.value="",!t)return;const a=this._currentDevices;a.includes(t)||this._updateDevices([...a,t])}constructor(...e){super(...e),this.disabled=!1,this.required=!1}}p.styles=(0,r.AH)(h||(h=u`div{margin-top:8px}`)),(0,i.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,o.MZ)({type:Array})],p.prototype,"value",void 0),(0,i.Cg)([(0,o.MZ)()],p.prototype,"helper",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"required",void 0),(0,i.Cg)([(0,o.MZ)({type:Array,attribute:"include-domains"})],p.prototype,"includeDomains",void 0),(0,i.Cg)([(0,o.MZ)({type:Array,attribute:"exclude-domains"})],p.prototype,"excludeDomains",void 0),(0,i.Cg)([(0,o.MZ)({type:Array,attribute:"include-device-classes"})],p.prototype,"includeDeviceClasses",void 0),(0,i.Cg)([(0,o.MZ)({attribute:"picked-device-label"})],p.prototype,"pickedDeviceLabel",void 0),(0,i.Cg)([(0,o.MZ)({attribute:"pick-device-label"})],p.prototype,"pickDeviceLabel",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"deviceFilter",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"entityFilter",void 0),p=(0,i.Cg)([(0,o.EM)("ha-devices-picker")],p),t()}catch(c){t(c)}})},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 i=a(40445),r=a(1126),o=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([r,h]);[r,h]=f.then?(await f)():f;let v,g,m=e=>e;const b=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=m` <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 ${b}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},b)}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)(g||(g=m`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}`),b,b)]}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"]'),i=(null==a?void 0:a.offsetHeight)||0;i>0&&t.delta<0&&Math.abs(t.delta)>.5*i?this._drawerOpen=!1:this._animateSnapBack()},this._unregisterResizeHandlers=()=>{document.removeEventListener("touchmove",this._handleTouchMove),document.removeEventListener("touchend",this._handleTouchEnd),document.removeEventListener("touchcancel",this._handleTouchEnd)}}}(0,i.Cg)([(0,s.MZ)({attribute:"aria-labelledby"})],w.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],w.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"open",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],w.prototype,"flexContent",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],w.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_drawerOpen",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_sliderInteractionActive",void 0),(0,i.Cg)([(0,s.wk)(),(0,o.Fg)({context:d.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,s.P)("#drawer")],w.prototype,"_drawer",void 0),(0,i.Cg)([(0,s.P)("#body")],w.prototype,"_bodyElement",void 0),(0,i.Cg)([(0,s.P)("[autofocus]")],w.prototype,"_autofocusElement",void 0),w=(0,i.Cg)([(0,s.EM)("ha-bottom-sheet")],w),t()}catch(v){t(v)}})},47680:function(e,t,a){a.r(t),a.d(t,{HaIcon:function(){return S}});a(74423),a(3362),a(62953);var i=a(40445),r=a(5124),o=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 g=[];a(67094);let m,b,y,_=e=>e;const w={},x={},C=(0,s.s)(()=>(async e=>{const t=Object.keys(e),a=await Promise.allSettled(Object.values(e));(await p())("readwrite",i=>{a.forEach((a,r)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([e,t])=>{i.put(t,e)}),delete e[t[r]]})})})(x),2e3),k={},$={"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 S extends r.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,r.qy)(m||(m=_` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,r.qy)(b||(b=_`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):r.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let i,r=a;if(!t||!r)return;if(!v.includes(t)){const a=l.y[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(r),e)):void(this._legacy=!0)}if(this._legacy=!1,r in w){const e=w[r];let a;e.newName?(a=`Icon ${t}:${r} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,r=e.newName):a=`Icon ${t}:${r} 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(r in k)return void(this._path=k[r]);if(r in $){const t=await $[r]();return this.icon===e&&(this._path=t),void(k[r]=t)}try{i=await(e=>new Promise((t,a)=>{if(g.push([e,t,a]),g.length>1)return;const i=p();(0,d.h)(1e3,(async()=>{(await i)("readonly",e=>{for(const[t,a,i]of g)(0,c.Yd)(e.get(t)).then(e=>a(e)).catch(e=>i(e));g=[]})})()).catch(e=>{for(const[,,t]of g)t(e);g=[]})}))(r)}catch(u){i=void 0}if(i)return this.icon===e&&(this._path=i),void(k[r]=i);const o=(e=>{let t;for(const a of h.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(r);if(o in x)return void this._setPath(x[o],r,e);const s=fetch(`/static/mdi/${o}.json`).then(e=>e.json());x[o]=s,this._setPath(s,r,e),s.catch(()=>{delete x[o]}),C()}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 i=await e;this.icon===a&&(this._path=i[t]),k[t]=i[t]}catch(i){}}constructor(...e){super(...e),this._legacy=!1}}S.styles=(0,r.AH)(y||(y=_`:host{fill:currentcolor}`)),(0,i.Cg)([(0,o.MZ)()],S.prototype,"icon",void 0),(0,i.Cg)([(0,o.wk)()],S.prototype,"_path",void 0),(0,i.Cg)([(0,o.wk)()],S.prototype,"_secondaryPath",void 0),(0,i.Cg)([(0,o.wk)()],S.prototype,"_viewBox",void 0),(0,i.Cg)([(0,o.wk)()],S.prototype,"_legacy",void 0),S=(0,i.Cg)([(0,o.EM)("ha-icon")],S)},54276:function(e,t,a){a(62953);var i=a(40445),r=a(76482),o=a(91382),n=a(96245),s=a(5124),l=a(67576);let c;class d extends o.n{attach(e){super.attach(e),this.attachableTouchController.attach(e)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(e,t){null==e||e.removeEventListener("touchend",this._handleTouchEnd),null==t||t.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new r.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}d.styles=[n.R,(0,s.AH)(c||(c=(e=>e)`: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))
)}`))],d=(0,i.Cg)([(0,l.EM)("ha-ripple")],d)},2270:function(e,t,a){a.a(e,async function(e,i){try{a.r(t),a.d(t,{HaDeviceSelector:function(){return w}});a(18111),a(22489),a(13579),a(62953);var r=a(40445),o=a(5124),n=a(67576),s=a(22786),l=a(44537),c=a(1087),d=a(77423),h=a(58594),u=a(6810),p=a(95311),f=a(1798),v=a(41665),g=e([f,v]);[f,v]=g.then?(await g)():g;let m,b,y,_=e=>e;class w extends o.WF{_hasIntegration(e){var t,a;return(null===(t=e.device)||void 0===t?void 0:t.filter)&&(0,l.e)(e.device.filter).some(e=>e.integration)||(null===(a=e.device)||void 0===a?void 0:a.entity)&&(0,l.e)(e.device.entity).some(e=>e.integration)}willUpdate(e){var t,a;e.get("selector")&&void 0!==this.value&&(null!==(t=this.selector.device)&&void 0!==t&&t.multiple&&!Array.isArray(this.value)?(this.value=[this.value],(0,c.r)(this,"value-changed",{value:this.value})):null!==(a=this.selector.device)&&void 0!==a&&a.multiple||!Array.isArray(this.value)||(this.value=this.value[0],(0,c.r)(this,"value-changed",{value:this.value})))}updated(e){super.updated(e),e.has("selector")&&this._hasIntegration(this.selector)&&!this._entitySources&&(0,u.c)(this.hass).then(e=>{this._entitySources=e}),!this._configEntries&&this._hasIntegration(this.selector)&&(this._configEntries=[],(0,d.VN)(this.hass).then(e=>{this._configEntries=e}))}render(){var e,t,a;return this._hasIntegration(this.selector)&&!this._entitySources?o.s6:null!==(e=this.selector.device)&&void 0!==e&&e.multiple?(0,o.qy)(b||(b=_` ${0} <ha-devices-picker .hass="${0}" .value="${0}" .helper="${0}" .deviceFilter="${0}" .entityFilter="${0}" .disabled="${0}" .required="${0}"></ha-devices-picker> `),this.label?(0,o.qy)(y||(y=_`<label>${0}</label>`),this.label):"",this.hass,this.value,this.helper,this._filterDevices,null!==(t=this.selector.device)&&void 0!==t&&t.entity?this._filterEntities:void 0,this.disabled,this.required):(0,o.qy)(m||(m=_` <ha-device-picker .hass="${0}" .value="${0}" .label="${0}" .helper="${0}" .deviceFilter="${0}" .entityFilter="${0}" .placeholder="${0}" .disabled="${0}" .required="${0}"></ha-device-picker> `),this.hass,this.value,this.label,this.helper,this._filterDevices,null!==(a=this.selector.device)&&void 0!==a&&a.entity?this._filterEntities:void 0,this.placeholder,this.disabled,this.required)}constructor(...e){super(...e),this.disabled=!1,this.required=!0,this._deviceIntegrationLookup=(0,s.A)(h.fk),this._filterDevices=e=>{var t;if(null===(t=this.selector.device)||void 0===t||!t.filter)return!0;const a=this._entitySources?this._deviceIntegrationLookup(this._entitySources,Object.values(this.hass.entities),Object.values(this.hass.devices),this._configEntries):void 0;return(0,l.e)(this.selector.device.filter).some(t=>(0,p.vX)(t,e,a))},this._filterEntities=e=>(0,l.e)(this.selector.device.entity).some(t=>(0,p.Ru)(t,e,this._entitySources))}}(0,r.Cg)([(0,n.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,r.Cg)([(0,n.MZ)({attribute:!1})],w.prototype,"selector",void 0),(0,r.Cg)([(0,n.wk)()],w.prototype,"_entitySources",void 0),(0,r.Cg)([(0,n.wk)()],w.prototype,"_configEntries",void 0),(0,r.Cg)([(0,n.MZ)()],w.prototype,"value",void 0),(0,r.Cg)([(0,n.MZ)()],w.prototype,"label",void 0),(0,r.Cg)([(0,n.MZ)()],w.prototype,"helper",void 0),(0,r.Cg)([(0,n.MZ)()],w.prototype,"placeholder",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean})],w.prototype,"disabled",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean})],w.prototype,"required",void 0),w=(0,r.Cg)([(0,n.EM)("ha-selector-device")],w),i()}catch(m){i(m)}})},34127:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var i=a(40445),r=a(52630),o=a(5124),n=a(67576),s=e([r]);r=(s.then?(await s)():s)[0];let l,c=e=>e;class d extends r.A{static get styles(){return[r.A.styles,(0,o.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,i.Cg)([(0,n.MZ)({attribute:"show-delay",type:Number})],d.prototype,"showDelay",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-delay",type:Number})],d.prototype,"hideDelay",void 0),d=(0,i.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 i=a(40445),r=a(5124),o=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,r.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,r.AH)(c||(c=d`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],u=(0,i.Cg)([(0,o.EM)("ha-input-search")],u),t()}catch(l){t(l)}})},77423:function(e,t,a){a.d(t,{A:function(){return r},Cm:function(){return o},Fs:function(){return m},JW:function(){return g},TC:function(){return l},VN:function(){return c},Vx:function(){return d},XQ:function(){return f},eM:function(){return u},iH:function(){return h},k3:function(){return v},m4:function(){return n},qf:function(){return s},t0:function(){return i},yv:function(){return p}});a(44114),a(18111),a(22489),a(20116),a(7588),a(61701),a(62953);const i=(e,t)=>e.callWS({type:"config_entries/subentries/list",entry_id:t}),r=(e,t,a,i)=>e.callWS(Object.assign({type:"config_entries/subentries/update",entry_id:t,subentry_id:a},i)),o=(e,t,a)=>e.callWS({type:"config_entries/subentries/delete",entry_id:t,subentry_id:a}),n=66649!=a.j?["migration_error","setup_error","setup_retry"]:null,s=66649!=a.j?["not_loaded","loaded","setup_error","setup_retry"]:null,l=(e,t,a)=>{const i={type:"config_entries/subscribe"};return a&&a.type&&(i.type_filter=a.type),e.connection.subscribeMessage(e=>{t(e)},i)},c=(e,t)=>{const a={};return t&&(t.type&&(a.type_filter=t.type),t.domain&&(a.domain=t.domain)),e.callWS(Object.assign({type:"config_entries/get"},a))},d=(e,t)=>e.callWS({type:"config_entries/get_single",entry_id:t}),h=(e,t,a)=>e.callWS(Object.assign({type:"config_entries/update",entry_id:t},a)),u=(e,t)=>e.callApi("DELETE",`config/config_entries/entry/${t}`),p=(e,t)=>e.callApi("POST",`config/config_entries/entry/${t}/reload`),f=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:"user"}),v=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:null}),g=(e,t)=>{if(!t)return e;const a=e.find(e=>e.entry_id===t);if(!a)return e;return[a,...e.filter(e=>e.entry_id!==t)]};class m{processMessage(e){return e.forEach(e=>{if(null!==e.type&&"added"!==e.type)if("removed"!==e.type){if("updated"===e.type){const t=e.entry;this._entries=this._entries.map(e=>e.entry_id===t.entry_id?t:e)}}else this._entries=this._entries.filter(t=>t.entry_id!==e.entry.entry_id);else this._entries.push(e.entry)}),this._entries}constructor(){this._entries=[]}}},700:function(e,t,a){a.d(t,{y:function(){return n}});const i=window;"customIconsets"in i||(i.customIconsets={});const r=i.customIconsets,o=window;"customIcons"in o||(o.customIcons={});const n=new Proxy(o.customIcons,{get:(e,t)=>{var a;return null!==(a=e[t])&&void 0!==a?a:r[t]?{getIcon:r[t]}:void 0}})},31422:function(e,t,a){a.d(t,{_o:function(){return h},oG:function(){return u},pq:function(){return d}});a(74423),a(18111),a(81148),a(22489),a(61701),a(13579);var i=a(65522),r=a(37981),o=a(71727),n=a(76774),s=a(15638),l=a(95350),c=a(58594);const d=(e,t,a,o,l,c,d,h)=>{const u=(0,n.q)(e,t),p=e.via_device_id?a[e.via_device_id]:void 0,f=p?(0,r.T)(p,l,o,h):void 0,v=p?(0,n.q)(p,t):void 0,g=v?(0,i.A)(v):void 0,m=(0,s.qC)(c,d.translations);return{areaName:u?(0,i.A)(u):g?`${g}${m?" ◂ ":" ▸ "}${f}`:f||void 0,viaDeviceName:f,viaDeviceAreaName:g}},h=[{name:"search_labels.deviceName",weight:10},{name:"search_labels.areaName",weight:8},{name:"search_labels.domainName",weight:4},{name:"search_labels.domain",weight:4},{name:"search_labels.viaDeviceName",weight:3},{name:"search_labels.viaDeviceArea",weight:3}],u=(e,t,a,i,n,s,h,u,p,f="")=>{const v=Object.values(e.devices),g=Object.values(e.entities);let m={};(a||i||n||h)&&(m=(0,c.g2)(g));let b=v.filter(e=>e.id===p||!e.disabled_by);a&&(b=b.filter(e=>{const t=m[e.id];return!(!t||!t.length)&&m[e.id].some(e=>a.includes((0,o.m)(e.entity_id)))})),i&&(b=b.filter(e=>{const t=m[e.id];return!t||!t.length||g.every(e=>!i.includes((0,o.m)(e.entity_id)))})),u&&(b=b.filter(e=>!u.includes(e.id))),n&&(b=b.filter(t=>{const a=m[t.id];return!(!a||!a.length)&&m[t.id].some(t=>{const a=e.states[t.entity_id];return!!a&&(a.attributes.device_class&&n.includes(a.attributes.device_class))})})),h&&(b=b.filter(t=>{const a=m[t.id];return!(!a||!a.length)&&a.some(t=>{const a=e.states[t.entity_id];return!!a&&h(a)})})),s&&(b=b.filter(e=>e.id===p||s(e)));return b.map(a=>{const i=(0,r.T)(a,e.localize,e.states,m[a.id]),{areaName:o,viaDeviceName:n,viaDeviceAreaName:s}=d(a,e.areas,e.devices,e.states,e.localize,e.language,e.translationMetadata,a.via_device_id?m[a.via_device_id]:void 0),c=a.primary_config_entry?null==t?void 0:t[a.primary_config_entry]:void 0,h=null==c?void 0:c.domain,u=h?(0,l.p$)(e.localize,h):void 0,p=i||e.localize("ui.components.device-picker.unnamed_device");return{id:`${f}${a.id}`,label:"",primary:p,secondary:o,domain:null==c?void 0:c.domain,domain_name:u,search_labels:{deviceName:i,areaName:o||null,domain:h||null,domainName:u||null,viaDeviceName:n||null,viaDeviceArea:s||null},sorting_label:[p,o,u].filter(Boolean).join("_")}})}},6810:function(e,t,a){a.d(t,{c:function(){return o}});a(3362),a(62953);const i=async(e,t,a,r,o,...n)=>{const s=o,l=s[e],c=l=>r&&r(o,l.result)!==l.cacheKey?(s[e]=void 0,i(e,t,a,r,o,...n)):l.result;if(l)return l instanceof Promise?l.then(c):c(l);const d=a(o,...n);return s[e]=d,d.then(a=>{s[e]={result:a,cacheKey:null==r?void 0:r(o,a)},setTimeout(()=>{s[e]=void 0},t)},()=>{s[e]=void 0}),d},r=e=>e.callWS({type:"entity/source"}),o=e=>i("_entitySources",3e4,r,e=>Object.keys(e.states).length,e)},95350:function(e,t,a){a.d(t,{$h:function(){return u},FP:function(){return g},Og:function(){return o},QC:function(){return h},QQ:function(){return s},S1:function(){return n},Ud:function(){return m},fK:function(){return c},l7:function(){return d},nQ:function(){return f},p$:function(){return l}});a(3362),a(62953);if(66649!=a.j)var i=a(90889);var r=a(9899);const o=66649!=a.j?{bluetooth:"config/bluetooth",dhcp:"config/dhcp",matter:"config/matter",mqtt:"config/mqtt",ssdp:"config/ssdp",thread:"config/thread",zeroconf:"config/zeroconf",zha:"config/zha/dashboard",zwave_js:"config/zwave_js/dashboard"}:null;var n=66649!=a.j?function(e){return e[e.CRITICAL=50]="CRITICAL",e[e.ERROR=40]="ERROR",e[e.WARNING=30]="WARNING",e[e.INFO=20]="INFO",e[e.DEBUG=10]="DEBUG",e[e.NOTSET=0]="NOTSET",e}({}):null;const s=(e,t)=>t.issue_tracker||`https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${e}%22`,l=(e,t,a)=>e(`component.${t}.title`)||(null==a?void 0:a.name)||t,c=(e,t)=>{const a={type:"manifest/list"};return t&&(a.integrations=t),e.callWS(a)},d=async(e,t)=>{const a=await e.sendMessagePromise({type:"manifest/list"}),i={};for(const r of a)i[r.domain]=r;return t(i),()=>{}},h=(e,t)=>e.callWS({type:"manifest/get",integration:t}),u=e=>e.callWS({type:"integration/setup_info"}),p=e=>e.sendMessagePromise({type:"logger/log_info"}),f=(e,t,a,i)=>e.callWS({type:"logger/integration_log_level",integration:t,level:a,persistence:i}),v=(e,t)=>e.subscribeEvents((0,r.s)(()=>p(e).then(e=>t.setState(e,!0)),200,!0),"logging_changed"),g=(e,t)=>(0,i.N)("_integration_log_info",p,v,e,t),m=(e,t)=>e.callWS({type:"integration/wait",domain:t})},59992:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{V:function(){return f}});a(62953);var r=a(40445),o=a(88696),n=a(5124),s=a(6412),l=a(67576),c=e([o]);o=(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:i=0,scrollTop:r=0}=e;this._contentScrollable=a-i>r+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 o.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,r.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,r.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t};i()}catch(d){i(d)}})},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(i){t(i)}},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 i=a(5124);let r,o,n,s,l,c,d=e=>e;const h=(0,i.AH)(r||(r=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,i.AH)(o||(o=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,i.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,i.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,i.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,i.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 i}});a(3362),a(62953);const i=async()=>{await Promise.all([a.e(38085),a.e(22309)]).then(a.bind(a,40772))}},44144:function(e,t,a){a.d(t,{Cv:function(){return l},MR:function(){return u},QR:function(){return p},_c:function(){return h},a_:function(){return v},bg:function(){return g},yM:function(){return f}});a(18111),a(22489),a(3362),a(62953),a(3296),a(27208),a(48408),a(14603),a(47566),a(98721);var i=a(8129);let r,o;const n=66649!=a.j?18e5:null,s=66649!=a.j?[0,500,1e3,2e3,5e3,1e4,15e3]:null,l=async e=>{const t=r;for(const o of s){o&&await(0,i.l)(o);try{return await c(e),d(e),r!==t}catch(a){}}return!1},c=async e=>{const t=await e.callWS({type:"brands/access_token"});r=t.token},d=e=>{h(),o=setInterval(()=>{c(e).catch(()=>{})},n)},h=()=>{o&&(clearInterval(o),o=void 0)},u=(e,t)=>{if(!r)return"";t=null!=t?t:location.origin;const a=`/api/brands/integration/${e.domain}/${e.darkOptimized?"dark_":""}${e.type}.png`,i=new URL(a,t);return i.searchParams.set("token",r),i.toString()},p=(e,t)=>{if(!r)return"";t=null!=t?t:location.origin;const a=`/api/brands/hardware/${e.category}/${e.darkOptimized?"dark_":""}${e.manufacturer}${e.model?`_${e.model}`:""}.png`,i=new URL(a,t);return i.searchParams.set("token",r),i.toString()},f=(e,t)=>{let a;t=null!=t?t:location.origin;try{a=new URL(e,t)}catch(i){return e}return a.pathname.startsWith("/api/brands/")?r?(a.searchParams.set("token",r),a.toString()):"":e},v=e=>{var t;const a=new URL(e,location.origin);if(a.pathname.startsWith("/api/brands/"))return a.pathname.split("/")[4];const i=a.pathname.split("/").filter(e=>e.length>0),r=i.indexOf("_");return-1!==r&&r+1<i.length?i[r+1]:null!==(t=i[1])&&void 0!==t?t:""},g=e=>{try{return new URL(e,location.origin).pathname.startsWith("/api/brands/")||e.startsWith("https://brands.home-assistant.io/")}catch(t){return!1}}},22348:function(e,t,a){a.d(t,{V:function(){return r}});var i=a(37177);const r=e=>!!e&&i.n},37177:function(e,t,a){a.d(t,{n:function(){return i}});a(27495);const i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},88438:function(e,t,a){a.d(t,{C:function(){return i}});const i="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}}]);