UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

48 lines 60.1 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[49145],{69093:function(t,e,i){i.d(e,{t:function(){return o}});var a=i(71727);const o=t=>(0,a.m)(t.entity_id)},82286:function(t,e,i){i.d(e,{$:function(){return a}});const a=(t,e)=>o(t.attributes,e),o=(t,e)=>0!==(t.supported_features&e)},81836:function(t,e,i){i.d(e,{d:function(){return a},p:function(){return o}});const a=(t,e,i=1e3)=>t||window.setInterval(e,i),o=t=>{t&&clearInterval(t)}},58274:function(t,e,i){i.d(e,{m:function(){return a}});class a{get isInteracting(){return this._touchDragging||this._dragging}setStep(t){this._options.step=t}_getVolumeFromTouch(t){const e=this._options.getSlider();if(!e)return 0;const i=e.getBoundingClientRect(),a=Math.min(Math.max(t-i.left,0),i.width)/i.width*100;return this._roundVolumeValue(a)}_roundVolumeValue(t){return Math.min(Math.max(Math.round(t/this._options.step)*this._options.step,0),100)}_getSliderValue(){const t=this._options.getSlider();return t?Number(t.value):this._lastValue}_updateValue(t){var e,i;this._lastValue=t,null===(e=(i=this._options).onValueUpdated)||void 0===e||e.call(i,t);const a=this._options.getSlider();a&&(a.value=t)}_showTooltip(){var t;const e=this._options.getSlider();null==e||null===(t=e.showTooltip)||void 0===t||t.call(e)}_hideTooltip(){var t;const e=this._options.getSlider();null==e||null===(t=e.hideTooltip)||void 0===t||t.call(e)}constructor(t){this._touchStartX=0,this._touchStartY=0,this._touchStartValue=0,this._touchDragging=!1,this._touchScrolling=!1,this._dragging=!1,this._lastValue=0,this.handleInput=t=>{var e,i;t.stopPropagation();const a=Number(t.target.value);this._dragging=!0,this._updateValue(a),null===(e=(i=this._options).onSetVolumeDebounced)||void 0===e||e.call(i,a)},this.handleChange=t=>{t.stopPropagation();const e=Number(t.target.value);this._dragging=!1,this._updateValue(e),this._options.onSetVolume(e)},this.handleTouchStart=t=>{t.stopPropagation();const e=t.touches[0];this._touchStartX=e.clientX,this._touchStartY=e.clientY,this._touchStartValue=this._getSliderValue(),this._touchDragging=!1,this._touchScrolling=!1,this._showTooltip()},this.handleTouchMove=t=>{if(this._touchScrolling)return;const e=t.touches[0],i=e.clientX-this._touchStartX,a=e.clientY-this._touchStartY,o=Math.abs(i),s=Math.abs(a);if(!this._touchDragging){if(s>10&&s>2*o)return void(this._touchScrolling=!0);o>8&&(this._touchDragging=!0)}if(this._touchDragging){t.preventDefault();const i=this._getVolumeFromTouch(e.clientX);this._updateValue(i)}},this.handleTouchEnd=t=>{if(this._touchScrolling)return this._touchScrolling=!1,void this._hideTooltip();const e=t.changedTouches[0];if(this._touchDragging){const t=this._getVolumeFromTouch(e.clientX);this._updateValue(t),this._options.onSetVolume(t)}else{const t=this._getVolumeFromTouch(e.clientX)>this._touchStartValue?this._options.step:-this._options.step,i=this._roundVolumeValue(this._touchStartValue+t);this._updateValue(i),this._options.onSetVolume(i)}this._touchDragging=!1,this._dragging=!1,this._hideTooltip()},this.handleTouchCancel=()=>{this._touchDragging=!1,this._touchScrolling=!1,this._dragging=!1,this._updateValue(this._touchStartValue),this._hideTooltip()},this.handleWheel=t=>{t.preventDefault(),t.stopPropagation();const e=t.deltaY>0?-1:1,i=this._getSliderValue(),a=this._roundVolumeValue(i+e*this._options.step);this._updateValue(a),this._options.onSetVolume(a)},this._options=t}}},59174:function(t,e,i){i.a(t,async function(t,e){try{var a=i(40445),o=i(35211),s=i(5124),r=i(67576),n=i(91450),l=i(22792),h=i(85694),d=i(44144),c=(i(47680),t([h]));h=(c.then?(await c)():c)[0];let p,u,g,m,v,_,y,b=t=>t;class f extends s.WF{render(){if(this.icon)return(0,s.qy)(p||(p=b`<ha-icon .icon="${0}"></ha-icon>`),this.icon);if(!this.domain)return s.s6;if(!this._connection||!this._hassConfig)return this._renderFallback();const t=(0,h._4)(this._connection.connection,this._hassConfig.config,this.domain,this.deviceClass,this.state).then(t=>t?(0,s.qy)(u||(u=b`<ha-icon .icon="${0}"></ha-icon>`),t):this._renderFallback());return(0,s.qy)(g||(g=b`${0}`),(0,n.T)(t))}_renderFallback(){if(this.domain&&this.domain in h.l)return(0,s.qy)(m||(m=b` <ha-svg-icon .path="${0}"></ha-svg-icon> `),h.l[this.domain]);if(this.brandFallback){var t,e;const i=(0,d.MR)({domain:this.domain,type:"icon",darkOptimized:null===(t=this._hassUi)||void 0===t?void 0:t.themes.darkMode},null===(e=this._hassConfig)||void 0===e?void 0:e.auth.data.hassUrl);return(0,s.qy)(v||(v=b` <img alt="" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer"> `),i)}return(0,s.qy)(_||(_=b`<ha-svg-icon .path="${0}"></ha-svg-icon>`),h.lW)}}f.styles=(0,s.AH)(y||(y=b`img{width:var(--mdc-icon-size,24px)}`)),(0,a.Cg)([(0,r.MZ)()],f.prototype,"domain",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],f.prototype,"deviceClass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],f.prototype,"state",void 0),(0,a.Cg)([(0,r.MZ)()],f.prototype,"icon",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"brand-fallback",type:Boolean})],f.prototype,"brandFallback",void 0),(0,a.Cg)([(0,r.wk)(),(0,o.Fg)({context:l.WF,subscribe:!0})],f.prototype,"_hassConfig",void 0),(0,a.Cg)([(0,r.wk)(),(0,o.Fg)({context:l.Wq,subscribe:!0})],f.prototype,"_connection",void 0),(0,a.Cg)([(0,r.wk)(),(0,o.Fg)({context:l.EK,subscribe:!0})],f.prototype,"_hassUi",void 0),f=(0,a.Cg)([(0,r.EM)("ha-domain-icon")],f),e()}catch(p){e(p)}})},26300:function(t,e,i){i.a(t,async function(t,a){try{i.r(e),i.d(e,{HaIconButton:function(){return m}});i(62953);var o=i(40445),s=i(5124),r=i(67576),n=i(63672),l=i(18350),h=(i(67094),t([l]));l=(h.then?(await h)():h)[0];let d,c,p,u,g=t=>t;class m extends s.WF{render(){return(0,s.qy)(d||(d=g` <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,n.J)(this.label),(0,n.J)(this.hideTitle?void 0:this.label),(0,n.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,s.qy)(c||(c=g`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,s.qy)(p||(p=g`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}m.shadowRootOptions={mode:"open",delegatesFocus:!0},m.styles=(0,s.AH)(u||(u=g`: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,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),(0,o.Cg)([(0,r.MZ)({type:String})],m.prototype,"path",void 0),(0,o.Cg)([(0,r.MZ)({type:String})],m.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)({type:String,attribute:"aria-haspopup"})],m.prototype,"ariaHasPopup",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"hide-title",type:Boolean})],m.prototype,"hideTitle",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],m.prototype,"selected",void 0),(0,o.Cg)([(0,r.MZ)()],m.prototype,"href",void 0),(0,o.Cg)([(0,r.MZ)()],m.prototype,"target",void 0),(0,o.Cg)([(0,r.MZ)()],m.prototype,"rel",void 0),(0,o.Cg)([(0,r.MZ)()],m.prototype,"download",void 0),m=(0,o.Cg)([(0,r.EM)("ha-icon-button")],m),a()}catch(d){a(d)}})},14927:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{getLanguageOptions:function(){return M}});var o=i(74487),s=(i(26910),i(18111),i(20116),i(61701),i(62953),i(40445)),r=i(5124),n=i(67576),l=i(22786),h=i(1087),d=i(86198),c=i(52220),p=i(28684),u=i(18350),g=i(38508),m=t([o,u,g,d]);[o,u,g,d]=m.then?(await m)():m;let v,_,y,b,f,w,x=t=>t;const $="M7,10L12,15L17,10H7Z",C=[{name:"primary",weight:10},{name:"secondary",weight:8},{name:"search_labels.english",weight:5}],M=(t,e,i,a)=>{let o=[];const s={language:"en"};if(e){const e=p.P.translations;o=t.map(t=>{var i;let o=null===(i=e[t])||void 0===i?void 0:i.nativeName;if(!o)try{o=new Intl.DisplayNames(t,{type:"language",fallback:"code"}).of(t)}catch(l){o=t}const r=(0,d.T)(t,a||{language:navigator.language}),n=(0,d.T)(t,s);return{id:t,primary:o,secondary:r!==o?r:void 0,search_labels:{english:n!==o?n:null}}})}else a&&(o=t.map(t=>{const e=(0,d.T)(t,a),i=(0,d.T)(t,s);return{id:t,primary:e,search_labels:{english:i!==e?i:null}}}));return!i&&a&&o.sort((t,e)=>(0,c.SH)(t.primary,e.primary,a.language)),o};class k extends r.WF{firstUpdated(t){super.firstUpdated(t),this._computeDefaultLanguageOptions()}_computeDefaultLanguageOptions(){this._defaultLanguages=Object.keys(p.P.translations)}render(){var t,e,i,a;const o=null!==(t=this.label)&&void 0!==t?t:(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.components.language-picker.language"))||"Language",s=null!==(i=this.value)&&void 0!==i?i:this.required&&!this.disabled?this._getItems()[0].id:this.value;return(0,r.qy)(v||(v=x` <ha-generic-picker .hass="${0}" .autofocus="${0}" .notFoundLabel="${0}" .emptyLabel="${0}" .label="${0}" .value="${0}" .valueRenderer="${0}" .disabled="${0}" .helper="${0}" .getItems="${0}" .searchKeys="${0}" @value-changed="${0}" hide-clear-icon> ${0} </ha-generic-picker> `),this.hass,this.autofocus,this._notFoundLabel,(null===(a=this.hass)||void 0===a?void 0:a.localize("ui.components.language-picker.no_languages"))||"No languages available",o,s,this._valueRenderer,this.disabled,this.helper,this._getItems,C,this._changed,this.buttonStyle?(0,r.qy)(_||(_=x`<ha-button slot="field" .disabled="${0}" @click="${0}" appearance="plain" variant="neutral"> ${0} <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> </ha-button>`),this.disabled,this._openPicker,this._getLanguageName(s),$):r.s6)}_openPicker(t){t.stopPropagation(),this.genericPicker.open()}_changed(t){t.stopPropagation(),this.value=t.detail.value,(0,h.r)(this,"value-changed",{value:this.value})}constructor(...t){super(...t),this.disabled=!1,this.required=!1,this.nativeName=!1,this.buttonStyle=!1,this.noSort=!1,this._defaultLanguages=[],this._getLanguagesOptions=(0,l.A)(M),this._getItems=()=>{var t,e;return this._getLanguagesOptions(null!==(t=this.languages)&&void 0!==t?t:this._defaultLanguages,this.nativeName,this.noSort,null===(e=this.hass)||void 0===e?void 0:e.locale)},this._getLanguageName=t=>{var e;return null===(e=this._getItems().find(e=>e.id===t))||void 0===e?void 0:e.primary},this._valueRenderer=t=>{var e;return(0,r.qy)(y||(y=x`<span slot="headline">${0}</span> `),null!==(e=this._getLanguageName(t))&&void 0!==e?e:t)},this._notFoundLabel=t=>{const e=(0,r.qy)(b||(b=x`<b>‘${0}’</b>`),t);return this.hass?this.hass.localize("ui.components.language-picker.no_match",{term:e}):(0,r.qy)(f||(f=x`No languages found for ${0}`),e)}}}k.styles=(0,r.AH)(w||(w=x`ha-generic-picker{width:100%;display:block}`)),(0,s.Cg)([(0,n.MZ)()],k.prototype,"value",void 0),(0,s.Cg)([(0,n.MZ)()],k.prototype,"label",void 0),(0,s.Cg)([(0,n.MZ)({type:Array})],k.prototype,"languages",void 0),(0,s.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"hass",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],k.prototype,"disabled",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean})],k.prototype,"required",void 0),(0,s.Cg)([(0,n.MZ)()],k.prototype,"helper",void 0),(0,s.Cg)([(0,n.MZ)({attribute:"native-name",type:Boolean})],k.prototype,"nativeName",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,attribute:"button-style"})],k.prototype,"buttonStyle",void 0),(0,s.Cg)([(0,n.MZ)({attribute:"no-sort",type:Boolean})],k.prototype,"noSort",void 0),(0,s.Cg)([(0,n.wk)()],k.prototype,"_defaultLanguages",void 0),(0,s.Cg)([(0,n.P)("ha-generic-picker",!0)],k.prototype,"genericPicker",void 0),k=(0,s.Cg)([(0,n.EM)("ha-language-picker")],k),a()}catch(v){a(v)}})},2054:function(t,e,i){i.a(t,async function(t,e){try{i(16280),i(62953);var a=i(40445),o=i(5124),s=i(67576),r=i(1087),n=i(44249),l=i(26300),h=t([l]);l=(h.then?(await h)():h)[0];let d,c,p,u=t=>t;const g="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class m extends o.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 o.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,o.qy)(d||(d=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),g,this._toggleMenu,t?(0,o.qy)(c||(c=u`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,i=t.has("narrow")?t.get("narrow"):this.narrow,a=!1===(null==e?void 0:e.kioskMode)&&(i||"always_hidden"===(null==e?void 0:e.dockedSidebar)),o=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&a===o||(this._show=o||this._alwaysVisible,o?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,n.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,r.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}m.styles=(0,o.AH)(p||(p=u`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,a.Cg)([(0,s.MZ)({type:Boolean})],m.prototype,"narrow",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,a.Cg)([(0,s.wk)()],m.prototype,"_hasNotifications",void 0),(0,a.Cg)([(0,s.wk)()],m.prototype,"_show",void 0),m=(0,a.Cg)([(0,s.EM)("ha-menu-button")],m),e()}catch(d){e(d)}})},70759:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),o=i(60346),s=i(5124),r=i(67576),n=i(63091),l=t([o]);o=(l.then?(await l)():l)[0];let h,d=t=>t;class c extends o.A{connectedCallback(){super.connectedCallback(),this.dir=n.G.document.dir}static get styles(){return[o.A.styles,(0,s.AH)(h||(h=d`:host{--track-size:var(--ha-slider-track-size, 4px);--marker-height:calc(var(--ha-slider-track-size, 4px) / 2);--marker-width:calc(var(--ha-slider-track-size, 4px) / 2);--wa-color-surface-default:var(--card-background-color);--wa-color-neutral-fill-normal:var(
            --ha-slider-track-color,
            var(--disabled-color)
          );--wa-tooltip-background-color:var(
            --ha-tooltip-background-color,
            var(--secondary-background-color)
          );--wa-tooltip-content-color:var(
            --ha-tooltip-text-color,
            var(--primary-text-color)
          );--wa-tooltip-font-family:var(
            --ha-tooltip-font-family,
            var(--ha-font-family-body)
          );--wa-tooltip-font-size:var(
            --ha-tooltip-font-size,
            var(--ha-font-size-s)
          );--wa-tooltip-font-weight:var(
            --ha-tooltip-font-weight,
            var(--ha-font-weight-normal)
          );--wa-tooltip-line-height:var(
            --ha-tooltip-line-height,
            var(--ha-line-height-condensed)
          );--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
            --ha-tooltip-border-radius,
            var(--ha-border-radius-sm)
          );--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000;min-width:100px;min-inline-size:100px;width:200px}#slider{padding-block:14px;margin-block:-14px}#thumb{border:none;background-color:var(--ha-slider-thumb-color,var(--primary-color));overflow:hidden}#thumb:after{content:"";border-radius:50%;position:absolute;width:calc(var(--thumb-width) * 2 + 8px);height:calc(var(--thumb-height) * 2 + 8px);left:calc(-50% - 4px);top:calc(-50% - 4px);cursor:pointer}#slider:focus-visible:not(.disabled) #thumb,#slider:focus-visible:not(.disabled) #thumb-max,#slider:focus-visible:not(.disabled) #thumb-min{outline:var(--wa-focus-ring)}#track:after{content:"";position:absolute;top:calc(-50% - 4px);left:0;width:100%;height:calc(var(--track-size) * 2 + 8px);cursor:pointer}#indicator{background-color:var(--ha-slider-indicator-color,var(--primary-color))}:host([size=medium]){--thumb-width:20px;--thumb-height:20px}:host([size=small]){--thumb-width:16px;--thumb-height:16px}`))]}constructor(...t){super(...t),this.size="small",this.withTooltip=!0}}(0,a.Cg)([(0,r.MZ)({reflect:!0})],c.prototype,"size",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,attribute:"with-tooltip"})],c.prototype,"withTooltip",void 0),c=(0,a.Cg)([(0,r.EM)("ha-slider")],c),e()}catch(h){e(h)}})},67094:function(t,e,i){i.r(e),i.d(e,{HaSvgIcon:function(){return c}});var a=i(40445),o=i(5124),s=i(67576);let r,n,l,h,d=t=>t;class c extends o.WF{render(){return(0,o.JW)(r||(r=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,o.JW)(n||(n=d`<path class="primary-path" d="${0}"></path>`),this.path):o.s6,this.secondaryPath?(0,o.JW)(l||(l=d`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):o.s6)}}c.styles=(0,o.AH)(h||(h=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,a.Cg)([(0,s.MZ)()],c.prototype,"path",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],c.prototype,"secondaryPath",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],c.prototype,"viewBox",void 0),c=(0,a.Cg)([(0,s.EM)("ha-svg-icon")],c)},27330:function(t,e,i){i.d(e,{L:function(){return y},p:function(){return _}});i(62953);var a=i(40445),o=i(5124),s=i(67576),r=i(6412);let n,l,h,d,c,p,u,g,m=t=>t;const v={passive:!0},_=(0,o.AH)(n||(n=m`:host{display:block}.top-app-bar{box-sizing:border-box;color:var(--app-header-text-color,#fff);background-color:var(--app-header-background-color,var(--primary-color));position:fixed;top:0;inset-inline-end:0;width:var(--ha-top-app-bar-width,100%);z-index:4;padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right);transition:box-shadow var(--ha-animation-duration-normal) ease,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}:host([narrow]) .top-app-bar{padding-left:var(--safe-area-inset-left)}.top-app-bar.scrolled:not(.pane-header){box-shadow:var(--ha-box-shadow-s)}.row{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--header-height);border-bottom:var(--app-header-border-bottom)}.section{display:flex;align-items:center;box-sizing:border-box;min-width:0;height:100%;padding:0 var(--ha-space-3)}#navigation{flex:1 1 auto}.section.center{flex:1 1 auto;justify-content:center;text-align:center}.section.end{flex:none;justify-content:flex-end}.title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--header-height);padding-inline-start:var(--ha-space-6)}:host([narrow]) .title{padding-inline-start:var(--ha-space-2)}.top-app-bar-fixed-adjust{padding-top:calc(var(--header-height,0px) + var(--safe-area-inset-top,0px));padding-bottom:var(--safe-area-inset-bottom);padding-right:var(--safe-area-inset-right)}:host([narrow]) .top-app-bar-fixed-adjust{padding-left:var(--safe-area-inset-left)}`));class y extends o.WF{get scrollTarget(){return this._scrollTarget||window}set scrollTarget(t){const e=this.scrollTarget;this._unregisterListeners(),this._scrollTarget=t,this._updateBarPosition(),this.requestUpdate("scrollTarget",e),this.isConnected&&(this._registerListeners(),this._syncScrollState())}_isPaneHeader(){return!1}render(){return(0,o.qy)(l||(l=m`${0}${0}`),this._renderHeader(),this._renderContent())}connectedCallback(){super.connectedCallback(),this.hasUpdated&&(this._updateBarPosition(),this._registerListeners(),this._syncScrollState())}_renderHeader(){const t=(0,o.qy)(h||(h=m`<span class="title"> <slot name="title"></slot> </span>`)),e=this._isPaneHeader();return(0,o.qy)(d||(d=m` <header class="top-app-bar ${0}"> <div class="row"> ${0} <section class="section" id="navigation"> ${0} </section> ${0} <section class="section end" id="actions" role="toolbar"> <slot name="actionItems"></slot> </section> </div> </header> `),(0,r.H)({"pane-header":e}),e?(0,o.qy)(c||(c=m`<section class="section" id="title"> <slot name="navigationIcon"></slot> ${0} </section>`),t):o.s6,e?o.s6:(0,o.qy)(p||(p=m`<slot name="navigationIcon"></slot> ${0}`),this.centerTitle?o.s6:t),!e&&this.centerTitle?(0,o.qy)(u||(u=m`<section class="section center">${0}</section>`),t):o.s6)}_renderContent(){return(0,o.qy)(g||(g=m`<div class="top-app-bar-fixed-adjust"> <slot></slot> </div>`))}firstUpdated(t){super.firstUpdated(t),this._updateBarPosition(),this._registerListeners(),this._syncScrollState()}disconnectedCallback(){super.disconnectedCallback(),this._unregisterListeners()}_updateBarPosition(){this._barElement&&(this._barElement.style.position=this.scrollTarget===window?"":"absolute")}_registerListeners(){this.scrollTarget.addEventListener("scroll",this._syncScrollState,v)}_unregisterListeners(){this.scrollTarget.removeEventListener("scroll",this._syncScrollState)}constructor(...t){super(...t),this.narrow=!1,this.centerTitle=!1,this._syncScrollState=()=>{var t;const e=this.scrollTarget instanceof Window?this.scrollTarget.pageYOffset:this.scrollTarget.scrollTop;null===(t=this._barElement)||void 0===t||t.classList.toggle("scrolled",e>0)}}}y.styles=_,(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],y.prototype,"narrow",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"center-title",type:Boolean})],y.prototype,"centerTitle",void 0),(0,a.Cg)([(0,s.P)(".top-app-bar")],y.prototype,"_barElement",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],y.prototype,"scrollTarget",null),y=(0,a.Cg)([(0,s.EM)("ha-top-app-bar-fixed")],y)},24786:function(t,e,i){i.a(t,async function(t,e){try{i(13609),i(18111),i(22489),i(61701),i(62953);var a=i(40445),o=i(35211),s=i(5124),r=i(67576),n=i(89784),l=i(1087),h=i(71727),d=i(74705),c=i(69093),p=i(28978),u=i(82286),g=i(22792),m=i(22675),v=i(53756),_=i(95350),y=i(53072),b=i(74281),f=(i(75064),i(38508)),w=(i(67094),t([b,f]));[b,f]=w.then?(await w)():w;let x,$,C,M,k,V,H,S,I=t=>t;const P="M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z";class q extends s.WF{render(){return(0,s.qy)(x||(x=I` <ha-generic-picker .value="${0}" .getItems="${0}" .rowRenderer="${0}" .searchFn="${0}" .searchKeys="${0}" .notFoundLabel="${0}" .popoverPlacement="${0}" .hideClearIcon="${0}" @value-changed="${0}"> <slot name="field" slot="field" @click="${0}"></slot> </ha-generic-picker> `),this.value,this._getPlayerItems,this._playerRowRenderer,this._playerSearchFn,v.t,this._notFoundPlayerLabel,"top-end",!0,this._valueChanged,this.open)}open(t){var e;null===(e=this._picker)||void 0===e||e.open(t,{selectedValue:this.value})}_isMediaPlayerItem(t){return"stateObj"in t&&void 0!==t.stateObj}_valueChanged(t){t.stopPropagation(),t.detail.value&&(0,l.r)(this,"value-changed",{value:t.detail.value})}constructor(...t){super(...t),this._getPlayerItems=()=>{var t;const e=this._i18n.localize("ui.components.media-browser.web-browser"),i=this._i18n.language||"en",a=(null===(t=this._i18n.translationMetadata.translations[i])||void 0===t?void 0:t.isRTL)||!1;return[{id:y.H1,primary:e,icon_path:P,search_labels:{entityName:e,friendlyName:e,deviceName:null,areaName:null,domainName:null,entityId:y.H1}},...Object.values(this._states).filter(this._filterPlayerEntities).map(t=>{const e=(0,p.u)(t),[i,o,s]=(0,d.Cf)(t,[{type:"entity"},{type:"device"},{type:"area"}],this._entities,this._devices,this._areas,this._floors),r=t.entity_id,n=(0,_.p$)(this._i18n.localize,(0,h.m)(r)),l=i||o||r,c=[s,i?o:void 0].filter(Boolean).join(a?" ◂ ":" ▸ ");return{id:r,primary:l,secondary:c,disabled:t.state===m.Hh,domain_name:n,sorting_label:[l,c].filter(Boolean).join("_"),search_labels:{entityName:i||null,deviceName:o||null,areaName:s||null,domainName:n||null,friendlyName:e||null,entityId:r},stateObj:t}})]},this._filterPlayerEntities=t=>{var e;return"media_player"===(0,c.t)(t)&&(0,u.$)(t,y.vj.BROWSE_MEDIA)&&!(null!==(e=this._entities[t.entity_id])&&void 0!==e&&e.hidden)},this._playerRowRenderer=(t,e)=>{var i;const a=this._isMediaPlayerItem(t)?t.stateObj:void 0;return(0,s.qy)($||($=I` <div style="${0}"> <ha-combo-box-item type="button" compact="compact" .disabled="${0}"> ${0} <span slot="headline">${0}</span> ${0} ${0} </ha-combo-box-item> </div> `),(0,n.W)({width:"100%",borderTop:0===e?void 0:"1px solid var(--divider-color)"}),!!t.disabled,t.icon_path?(0,s.qy)(C||(C=I` <ha-svg-icon slot="start" style="margin:0 4px" .path="${0}"></ha-svg-icon> `),t.icon_path):(0,s.qy)(M||(M=I` <state-badge slot="start" .stateObj="${0}"></state-badge> `),a),t.primary,t.secondary?(0,s.qy)(k||(k=I`<span slot="supporting-text">${0}</span>`),t.secondary):s.s6,a&&null!==(i=this._hassConfig.userData)&&void 0!==i&&i.showEntityIdPicker?(0,s.qy)(V||(V=I` <span slot="supporting-text" class="code"> ${0} </span> `),a.entity_id):s.s6)},this._playerSearchFn=(t,e)=>{const i=e.findIndex(e=>e.id===t);if(-1===i)return e;const[a]=e.splice(i,1);return e.unshift(a),e},this._notFoundPlayerLabel=t=>this._i18n.localize("ui.components.entity.entity-picker.no_match",{term:(0,s.qy)(H||(H=I`<b>${0}</b>`),t)})}}q.styles=(0,s.AH)(S||(S=I`ha-generic-picker{--ha-generic-picker-width:min(360px, calc(100vw - 32px))}`)),(0,a.Cg)([(0,r.MZ)()],q.prototype,"value",void 0),(0,a.Cg)([(0,o.Fg)({context:g.iN,subscribe:!0})],q.prototype,"_states",void 0),(0,a.Cg)([(0,o.Fg)({context:g.X1,subscribe:!0})],q.prototype,"_entities",void 0),(0,a.Cg)([(0,o.Fg)({context:g.xJ,subscribe:!0})],q.prototype,"_devices",void 0),(0,a.Cg)([(0,o.Fg)({context:g.wn,subscribe:!0})],q.prototype,"_areas",void 0),(0,a.Cg)([(0,o.Fg)({context:g.rf,subscribe:!0})],q.prototype,"_floors",void 0),(0,a.Cg)([(0,o.Fg)({context:g.D5,subscribe:!0})],q.prototype,"_i18n",void 0),(0,a.Cg)([(0,o.Fg)({context:g.WF,subscribe:!0})],q.prototype,"_hassConfig",void 0),(0,a.Cg)([(0,r.P)("ha-generic-picker")],q.prototype,"_picker",void 0),q=(0,a.Cg)([(0,r.EM)("ha-media-player-picker")],q),e()}catch(x){e(x)}})},82e3:function(t,e,i){i.d(e,{Fy:function(){return s},Gk:function(){return l},Hg:function(){return a},Y_:function(){return h},ds:function(){return n},e0:function(){return o},ec:function(){return r}});i(74423),i(18111),i(61701),i(33110),i(3362);const a=t=>t.map(t=>{if("string"!==t.type)return t;switch(t.name){case"username":return Object.assign(Object.assign({},t),{},{autocomplete:"username",autofocus:!0});case"password":return Object.assign(Object.assign({},t),{},{autocomplete:"current-password"});case"code":return Object.assign(Object.assign({},t),{},{autocomplete:"one-time-code",autofocus:!0});default:return t}}),o=(t,e)=>t.callWS({type:"auth/sign_path",path:e}),s=async(t,e,i,a)=>t.callWS({type:"config/auth_provider/homeassistant/create",user_id:e,username:i,password:a}),r=(t,e,i)=>t.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:e,new_password:i}),n=(t,e,i)=>t.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:e,password:i}),l=(t,e,i)=>t.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:e,username:i}),h=(t,e,i)=>t.callWS({type:"auth/delete_all_refresh_tokens",token_type:e,delete_current_token:i})},44249:function(t,e,i){i.d(e,{V:function(){return a}});i(62953);const a=(t,e)=>{const i=new o,a=t.subscribeMessage(t=>e(i.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{a.then(t=>null==t?void 0:t())}};class o{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},54706:function(t,e,i){i.d(e,{E:function(){return s}});i(74423),i(18111),i(13579),i(3362),i(62953);var a=i(40445),o=i(67576);const s=t=>{class e extends t{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const t=this.__unsubs.pop();t instanceof Promise?t.then(t=>t()):t()}this.__unsubs=void 0}}updated(t){if(super.updated(t),t.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const e of t.keys())if(this.hassSubscribeRequiredHostProps.includes(e))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){var t;void 0!==this.__unsubs||!this.isConnected||void 0===this.hass||null!==(t=this.hassSubscribeRequiredHostProps)&&void 0!==t&&t.some(t=>void 0===this[t])||(this.__unsubs=this.hassSubscribe())}}return(0,a.Cg)([(0,o.MZ)({attribute:!1})],e.prototype,"hass",void 0),e}},24367:function(t,e,i){i.d(e,{L:function(){return o},z:function(){return s}});var a=i(23832);const o=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],s=(0,a.g)(o)},12895:function(t,e,i){i(62953);var a=i(40445),o=i(5124),s=i(67576);let r,n,l,h=t=>t;class d extends o.WF{firstUpdated(t){super.firstUpdated(t),this.addEventListener("mouseover",()=>this.classList.add("hovering"),{capture:!0}),this.addEventListener("mouseout",()=>this.classList.remove("hovering"))}updated(t){super.updated(t),t.has("text")&&this.animating&&(this.animating=!1),t.has("active")&&this.active&&this.offsetWidth<this.scrollWidth&&(this.animating=!0)}render(){return this.text?(0,o.qy)(r||(r=h` <div class="marquee-inner" @animationiteration="${0}"> <span>${0}</span> ${0} </div> `),this._onIteration,this.text,this.animating?(0,o.qy)(n||(n=h` <span>${0}</span> `),this.text):""):o.s6}_onIteration(){this.active||(this.animating=!1)}constructor(...t){super(...t),this.active=!1,this.animating=!1}}d.styles=(0,o.AH)(l||(l=h`:host{display:flex;position:relative;align-items:center;height:1.2em;contain:strict}.marquee-inner{position:absolute;left:0;right:0;text-overflow:ellipsis;overflow:hidden}:host(.hovering) .marquee-inner{text-overflow:initial;overflow:initial}:host([animating]) .marquee-inner{left:initial;right:initial;animation:marquee 10s linear infinite}:host([animating]) .marquee-inner span{padding-right:16px;padding-inline-end:16px;padding-inline-start:initial}@keyframes marquee{0%{transform:translateX(0%)}100%{transform:translateX(-50%)}}`)),(0,a.Cg)([(0,s.MZ)()],d.prototype,"text",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean})],d.prototype,"active",void 0),(0,a.Cg)([(0,s.MZ)({reflect:!0,type:Boolean})],d.prototype,"animating",void 0),d=(0,a.Cg)([(0,s.EM)("hui-marquee")],d)},76704:function(t,e,i){i.d(e,{A:function(){return s},B:function(){return o}});i(16280);var a=i(53072);const o="Unsupported Media";class s{pause(){this.buffering=!1,this.player.pause()}play(){this.player.play()}setVolume(t){this.player.volume=t,this.onChange()}remove(){this._removed=!0,this.onChange=void 0,this.player&&this.player.pause()}static idleStateObj(){const t=(new Date).toISOString();return{state:"idle",entity_id:a.H1,last_changed:t,last_updated:t,attributes:{},context:{id:"",user_id:null,parent_id:null}}}toStateObj(){const t=s.idleStateObj();return t.state=this.buffering?"buffering":this.player.paused||this.player.ended?"paused":"playing",t.attributes={media_title:this.item.title,entity_picture:this.item.thumbnail,volume_level:this.player.volume,supported_features:a.vj.PLAY|a.vj.PAUSE|a.vj.VOLUME_SET},this.player.duration&&(t.attributes.media_duration=this.player.duration,t.attributes.media_position=this.player.currentTime,t.attributes.media_position_updated_at=t.last_updated),t}constructor(t,e,i,a,s){this.hass=t,this.item=e,this.resolved=i,this.onChange=s,this.buffering=!0,this._removed=!1,this._handleChange=()=>{this._removed||this.onChange()};const r=new Audio(this.resolved.url);if(""===r.canPlayType(i.mime_type))throw new Error(o);r.autoplay=!0,r.volume=a,r.addEventListener("play",this._handleChange),r.addEventListener("playing",()=>{this.buffering=!1,this._handleChange()}),r.addEventListener("pause",this._handleChange),r.addEventListener("ended",this._handleChange),r.addEventListener("canplaythrough",this._handleChange),this.player=r}}},64401:function(t,e,i){i.a(t,async function(t,e){try{i(16280),i(18111),i(61701),i(3362),i(62953);var a=i(40445),o=i(5124),s=i(67576),r=i(6412),n=i(91450),l=i(1087),h=i(71727),d=i(74705),c=i(82286),p=i(9899),u=i(81836),g=i(58274),m=i(18350),v=i(59174),_=i(29823),y=i(26300),b=i(70759),f=i(65829),w=i(93367),x=(i(67094),i(24786)),$=i(53072),C=i(65063),M=i(54706),k=(i(12895),i(76704)),V=t([m,v,_,y,b,f,w,x]);[m,v,_,y,b,f,w,x]=V.then?(await V)():V;let H,S,I,P,q,A,z,L,j,T,E,Z,B,O,N,F,U,W=t=>t;const R="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",D="M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z",X="M14,19H18V5H14M6,19H10V5H6V19Z",Y="M8,5.14V19.14L19,12.14L8,5.14Z",J="M3,5V19L11,12M13,19H16V5H13M18,5V19H21V5",K="M18,18H6V6H18V18Z",G="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z";class Q extends((0,M.E)(o.WF)){connectedCallback(){super.connectedCallback();const t=this._stateObj;t&&this._showProgressBar&&"playing"===t.state&&!this._progressInterval&&(this._progressInterval=(0,u.d)(this._progressInterval,()=>this._updateProgressBar()))}disconnectedCallback(){super.disconnectedCallback(),this._progressInterval=(0,u.p)(this._progressInterval),this._tearDownBrowserPlayer()}showResolvingNewMediaPicked(){this._tearDownBrowserPlayer(),this._newMediaExpected=!0,this._debouncedResetMediaExpected()}hideResolvingNewMediaPicked(){this._newMediaExpected=!1}playItem(t,e){if(this.entityId!==$.H1)throw Error("Only browser supported");this._tearDownBrowserPlayer();try{this._browserPlayer=new k.A(this.hass,t,e,this._browserPlayerVolume,()=>this.requestUpdate("_browserPlayer"))}catch(i){if(i.message!==k.B)throw i;(0,C.showAlertDialog)(this,{text:this.hass.localize("ui.components.media-browser.media_not_supported")})}this._newMediaExpected=!1}render(){var t;if(this._newMediaExpected)return(0,o.qy)(H||(H=W` <div class="controls-progress buffering"> ${0} </div> `),(0,n.T)(new Promise(t=>{setTimeout(t,500)}).then(()=>(0,o.qy)(S||(S=W`<ha-spinner></ha-spinner>`)))));const e=this.entityId===$.H1,i=this._stateObj;if(!i)return this._renderChoosePlayer(i,this._volumeValue);const a=this.narrow?"playing"===i.state&&((0,c.$)(i,$.vj.PAUSE)||(0,c.$)(i,$.vj.STOP))||("paused"===i.state||"idle"===i.state)&&(0,c.$)(i,$.vj.PLAY)||"on"===i.state&&((0,c.$)(i,$.vj.PLAY)||(0,c.$)(i,$.vj.PAUSE))?[{icon:"on"===i.state?J:"playing"!==i.state?Y:(0,c.$)(i,$.vj.PAUSE)?X:K,action:"playing"!==i.state?"media_play":(0,c.$)(i,$.vj.PAUSE)?"media_pause":"media_stop"}]:void 0:(0,$.Un)(i,!0),s=(0,$.mm)(i),l=(0,$.Xm)(i.attributes.media_duration),h=(0,$.HN)(i.attributes.media_title||i.attributes.media_content_id),d=i.attributes.entity_picture_local||i.attributes.entity_picture;return(0,o.qy)(I||(I=W` <div class="${0}" @click="${0}"> ${0} <div class="media-info"> <hui-marquee .text="${0}" .active="${0}" @mouseover="${0}" @mouseleave="${0}"></hui-marquee> <span class="secondary"> ${0} </span> </div> </div> <div class="controls-progress ${0}"> ${0} </div> ${0} `),(0,r.H)({info:!0,pointer:!e,app:"app"===(null===(t=this._browserPlayer)||void 0===t?void 0:t.item.media_class)}),this._openMoreInfo,d?(0,o.qy)(P||(P=W`<img alt="" src="${0}">`),this.hass.hassUrl(d)):"",h||s||("playing"!==i.state&&"on"!==i.state?this.hass.localize("ui.card.media_player.nothing_playing"):""),this._marqueeActive,this._marqueeMouseOver,this._marqueeMouseLeave,h?s:"","buffering"===i.state?"buffering":"","buffering"===i.state?(0,o.qy)(q||(q=W`<ha-spinner></ha-spinner> `)):(0,o.qy)(A||(A=W` <div class="controls"> ${0} </div> ${0} `),void 0===a?"":a.map(t=>(0,o.qy)(z||(z=W` <ha-icon-button .label="${0}" .path="${0}" action="${0}" @click="${0}"> </ha-icon-button> `),this.hass.localize(`ui.card.media_player.${t.action}`),t.icon,t.action,this._handleControlClick)),i.attributes.media_duration===1/0?o.s6:this.narrow?(0,o.qy)(L||(L=W`<ha-slider class="progress-slider" min="0" max="${0}" step="1" .value="${0}" .withTooltip="${0}" size="small" aria-label="${0}" ?disabled="${0}" @change="${0}"></ha-slider>`),i.attributes.media_duration||0,(0,$.$6)(i),!1,this.hass.localize("ui.card.media_player.track_position"),e||!(0,c.$)(i,$.vj.SEEK),this._handleMediaSeekChanged):(0,o.qy)(j||(j=W` <div class="progress"> <div id="CurrentProgress"></div> <ha-slider class="progress-slider" min="0" max="${0}" step="1" .value="${0}" .withTooltip="${0}" size="small" aria-label="${0}" ?disabled="${0}" @change="${0}"></ha-slider> <div>${0}</div> </div> `),i.attributes.media_duration||0,(0,$.$6)(i),!1,this.hass.localize("ui.card.media_player.track_position"),e||!(0,c.$)(i,$.vj.SEEK),this._handleMediaSeekChanged,l)),this._renderChoosePlayer(i,this._volumeValue))}_renderChoosePlayer(t,e){const i=this.entityId===$.H1;return(0,o.qy)(T||(T=W` <div class="choose-player ${0}"> ${0} <ha-media-player-picker class="player-menu" .value="${0}" @value-changed="${0}"> <ha-button slot="field"> <span slot="start">${0}</span> ${0} <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> </ha-button> </ha-media-player-picker> </div> `),i?"browser":"",!this.narrow&&t&&(0,c.$)(t,$.vj.VOLUME_SET)?(0,o.qy)(E||(E=W` <ha-dropdown class="volume-menu" placement="top" .distance="${0}"> <ha-icon-button slot="trigger" .path="${0}"></ha-icon-button> <div class="volume-slider-container" @touchstart="${0}" @touchmove="${0}" @touchend="${0}" @touchcancel="${0}" @wheel="${0}"> <ha-slider class="volume-slider" labeled min="0" max="100" .step="${0}" .value="${0}" @input="${0}" @change="${0}"> </ha-slider> </div> </ha-dropdown> `),8,G,this._volumeController.handleTouchStart,this._volumeController.handleTouchMove,this._volumeController.handleTouchEnd,this._volumeController.handleTouchCancel,this._volumeController.handleWheel,this._volumeStep,e,this._volumeController.handleInput,this._volumeController.handleChange):"",this.entityId,this._handlePlayerSelect,this._renderIcon(i,t),i?this.hass.localize("ui.components.media-browser.web-browser"):t?(()=>{const{primary:e,secondary:i}=(0,d.Bj)(this.hass,t);return(0,o.qy)(Z||(Z=W`<div class="player-label"> <div>${0}</div> ${0} </div>`),e,i?(0,o.qy)(B||(B=W`<div class="player-secondary"> ${0} </div>`),i):o.s6)})():this.entityId,R)}_renderIcon(t,e){return t?(0,o.qy)(O||(O=W`<ha-svg-icon .path="${0}"></ha-svg-icon>`),D):e?(0,o.qy)(N||(N=W` <ha-state-icon .stateObj="${0}"></ha-state-icon> `),e):(0,o.qy)(F||(F=W` <ha-domain-icon .domain="${0}"></ha-domain-icon> `),(0,h.m)(this.entityId))}willUpdate(t){if(super.willUpdate(t),t.has("entityId")&&this._tearDownBrowserPlayer(),!t.has("hass")||this.entityId===$.H1)return;const e=t.get("hass");e&&e.states[this.entityId]===this.hass.states[this.entityId]||(this._newMediaExpected=!1),t.has("hass")&&this._updateVolumeValueFromState(this._stateObj)}updated(t){if(super.updated(t),this.entityId===$.H1){if(!t.has("_browserPlayer"))return}else{const e=t.get("hass");if(e&&e.states[this.entityId]===this._stateObj)return}const e=this._stateObj;this.entityId===$.H1&&this._updateVolumeValueFromState(e),this._updateProgressBar(),this._syncVolumeSlider(),this._showProgressBar&&"playing"===(null==e?void 0:e.state)?this._progressInterval=(0,u.d)(this._progressInterval,()=>this._updateProgressBar()):!this._progressInterval||this._showProgressBar&&"playing"===(null==e?void 0:e.state)||(this._progressInterval=(0,u.p)(this._progressInterval))}get _stateObj(){return this.entityId===$.H1?this._browserPlayer?this._browserPlayer.toStateObj():k.A.idleStateObj():this.hass.states[this.entityId]}_tearDownBrowserPlayer(){this._browserPlayer&&(this._browserPlayer.remove(),this._browserPlayer=void 0)}_openMoreInfo(){this.entityId!==$.H1&&(0,l.r)(this,"hass-more-info",{entityId:this.entityId})}get _showProgressBar(){if(!this.hass)return!1;const t=this._stateObj;return t&&("playing"===t.state||"paused"===t.state)&&"media_duration"in t.attributes&&"media_position"in t.attributes}_updateProgressBar(){const t=this._stateObj;if(!this._progressBar||!t)return;if(!t.attributes.media_duration)return this._progressBar.value=0,void(this._currentProgress&&(this._currentProgress.innerHTML=""));const e=(0,$.$6)(t);this._progressBar.max=t.attributes.media_duration,this._progressBar.value=e,this._currentProgress&&(this._currentProgress.innerHTML=(0,$.Xm)(e))}_updateVolumeValueFromState(t){if(!t)return;const e=t.attributes.volume_level;"number"==typeof e&&Number.isFinite(e)&&(this._volumeValue=Math.round(100*e))}_syncVolumeSlider(){this._volumeSlider&&!this._volumeController.isInteracting&&(this._volumeSlider.value=this._volumeValue)}_handleControlClick(t){const e=t.currentTarget.getAttribute("action");this._browserPlayer?"media_pause"===e?this._browserPlayer.pause():"media_play"===e&&this._browserPlayer.play():(0,$.ce)(this.hass,this._stateObj,t.currentTarget.getAttribute("action"))}_handleMediaSeekChanged(t){if(this.entityId===$.H1||!this._stateObj)return;const e=t.target.value;this.hass.callService("media_player","media_seek",{entity_id:this._stateObj.entity_id,seek_position:e})}_marqueeMouseOver(){this._marqueeActive||(this._marqueeActive=!0)}_marqueeMouseLeave(){this._marqueeActive&&(this._marqueeActive=!1)}_handlePlayerSelect(t){t.stopPropagation();const{value:e}=t.detail;e&&(0,l.r)(this,"player-picked",{entityId:e})}_setVolume(t){const e=t/100;if(this._browserPlayer)return this._browserPlayerVolume=e,void this._browserPlayer.setVolume(e);(0,$.QI)(this.hass,this.entityId,e)}constructor(...t){super(...t),this.narrow=!1,this._marqueeActive=!1,this._newMediaExpected=!1,this._volumeValue=0,this._browserPlayerVolume=.8,this._volumeStep=2,this._debouncedVolumeSet=(0,p.s)(t=>{this._setVolume(t)},100),this._volumeController=new g.m({getSlider:()=>this._volumeSlider,step:this._volumeStep,onSetVolume:t=>this._setVolume(t),onSetVolumeDebounced:t=>this._debouncedVolumeSet(t),onValueUpdated:t=>{this._volumeValue=t}}),this._debouncedResetMediaExpected=(0,p.s)(()=>{this._newMediaExpected=!1},2e3)}}Q.styles=(0,o.AH)(U||(U=W`:host{display:flex;height:100px;box-sizing:border-box;background:var(--ha-card-background,var(--card-background-color,#fff));border-top:1px solid var(--divider-color);margin-right:var(--safe-area-inset-right);transition:width var(--ha-animation-duration-normal) ease,margin-left var(--ha-animation-duration-normal) ease,margin-right var(--ha-animation-duration-normal) ease}:host([narrow]){margin-left:var(--safe-area-inset-left)}@media (prefers-reduced-motion:reduce){:host{transition:1ms}}ha-slider{width:100%;min-width:100%;--ha-slider-thumb-color:var(--primary-color);--ha-slider-indicator-color:var(--primary-color)}.info{flex:1;display:flex;align-items:center;width:100%;margin-right:16px;margin-inline-end:16px;margin-inline-start:initial;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.pointer{cursor:pointer}.progress,.secondary{color:var(--secondary-text-color)}.player-label{display:flex;flex-direction:column;align-items:flex-start;gap:var(--ha-space-1);max-width:120px}.player-label>div{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-secondary{font-size:var(--ha-font-size-s);color:color-mix(in srgb,currentColor 70%,transparent)}.choose-player{flex:1;display:flex;justify-content:flex-end;align-items:center;padding:16px;gap:var(--ha-space-2)}.controls{height:48px;padding-bottom:4px}.controls-progress{flex:2;display:flex;align-items:center;justify-content:center;flex-direction:column;direction:ltr}.progress{display:flex;width:100%;align-items:center}.progress>div:first-child{margin-right:var(--ha-space-2)}.progress>div:last-child{margin-left:var(--ha-space-2)}.progress ha-slider{margin:0 4px}ha-dropdown.volume-menu::part(menu){width:220px;max-width:220px;overflow:visible;padding:15px 15px}.volume-slider-container{width:100%}@media (pointer:coarse){.volume-slider{pointer-events:none}}.media-info{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:16px;padding-inline-start:16px;padding-inline-end:initial;width:100%}hui-marquee{font-size:1.2em;margin:0px 0 4px}img{height:100%}.app img{height:68px;margin:16px 0 16px 16px}:host([narrow]){height:57px}:host([narrow]) .controls-progress{flex:unset;min-width:48px}:host([narrow]) .controls-progress.buffering{flex:1}:host([narrow]) .media-info{padding-left:8px;padding-inline-start:8px;padding-inline-end:initial}:host([narrow]) .controls{display:flex;padding-bottom:0;--mdc-icon-size:30px}:host([narrow]) .choose-player{padding-left:0;padding-right:8px;padding-inline-start:0;padding-inline-end:8px;min-width:48px;flex:unset;justify-content:center}:host([narrow]) .choose-player.browser{justify-content:flex-end}:host([narrow]) ha-slider{position:absolute;top:-6px;left:0;right:0}`)),(0,a.Cg)([(0,s.MZ)({attribute:!1})],Q.prototype,"hass",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],Q.prototype,"entityId",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],Q.prototype,"narrow",void 0),(0,a.Cg)([(0,s.P)(".progress-slider")],Q.prototype,"_progressBar",void 0),(0,a.Cg)([(0,s.P)("#CurrentProgress")],Q.prototype,"_currentProgress",void 0),(0,a.Cg)([(0,s.P)(".volume-slider")],Q.prototype,"_volumeSlider",void 0),(0,a.Cg)([(0,s.wk)()],Q.prototype,"_marqueeActive",void 0),(0,a.Cg)([(0,s.wk)()],Q.prototype,"_newMediaExpected",void 0),(0,a.Cg)([(0,s.wk)()],Q.prototype,"_browserPlayer",void 0),Q=(0,a.Cg)([(0,s.EM)("ha-bar-media-player")],Q),e()}catch(H){e(H)}})},68965:function(t,e,i){i.a(t,async function(t,a){try{i.r(e);i(74423),i(18111),i(61701),i(3362),i(27495),i(25440),i(62953);var o=i(40445),s=i(5124),r=i(67576),n=i(93905),l=i(1087),h=i(91926),d=i(29823),c=(i(70947),i(26300)),p=i(90248),u=i(2054),g=(i(27330),i(19262)),m=i(45098),v=i(10897),_=i(53072),y=i(17022),b=i(65063),f=i(14503),w=i(64401),x=i(75484),$=t([d,c,p,u,g,m,w]);[d,c,p,u,g,m,w]=$.then?(await $)():$;let C,M,k,V,H=t=>t;const S="M3,5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5M5,5V19H19V5H5M11,7H13A2,2 0 0,1 15,9V17H13V13H11V17H9V9A2,2 0 0,1 11,7M11,9V11H13V9H11Z",I="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",P="M10,4V8H14V4H10M16,4V8H20V4H16M16,10V14H20V10H16M16,16V20H20V16H16M14,20V16H10V20H14M8,20V16H4V20H8M8,14V10H4V14H8M8,8V4H4V8H8M10,14H14V10H10V14M4,2H20A2,2 0 0,1 22,4V20A2,2 0 0,1 20,22H4C2.92,22 2,21.1 2,20V4A2,2 0 0,1 4,2Z",q="M11 15H17V17H11V15M9 7H7V9H9V7M11 13H17V11H11V13M11 9H17V7H11V9M9 11H7V13H9V11M21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19C20.1 3 21 3.9 21 5M19 5H5V19H19V5M9 15H7V17H9V15Z",A=(t,e)=>{let i=`/media-browser/${t}`;for(const a of e.slice(1))i+="/"+encodeURIComponent(`${a.media_content_type},${a.media_content_id}`);return i};class z extends s.WF{render(){return(0,s.qy)(C||(C=H` <ha-top-app-bar-fixed .narrow="${0}"> ${0} <h1 class="page-title" slot="title"> ${0} </h1> <ha-media-manage-button slot="actionItems" .hass="${0}" .currentItem="${0}" @media-refresh="${0}"></ha-media-manage-button> <ha-dropdown slot="actionItems" @wa-select="${0}"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> <ha-dropdown-item value="auto" class="${0}"> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-dropdown-item> <ha-dropdown-item value="grid" class="${0}"> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-dropdown-item> <ha-dropdown-item value="list" class="${0}"> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-dropdown-item> </ha-dropdown> <ha-media-player-browse .hass="${0}" .entityId="${0}" .navigateIds="${0}" .preferredLayout="${0}" @media-picked="${0}" @media-browsed="${0}"></ha-media-player-browse> </ha-top-app-bar-fixed> <ha-bar-media-player .hass="${0}" .entityId="${0}" .narrow="${0}" @player-picked="${0}"></ha-bar-media-player> `),this.narrow,this._navigateIds.length>1?(0,s.qy)(M||(M=H` <ha-icon-button-arrow-prev slot="navigationIcon" @click="${0}"></ha-icon-button-arrow-prev> `),this._goBack):(0,s.qy)(k||(k=H` <ha-menu-button slot="navigationIcon" .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow),this._currentItem?this._currentItem.title:this.hass.localize("ui.components.media-browser.media-player-browser"),this.hass,this._currentItem,this._refreshMedia,this._handleMenuAction,this.hass.localize("ui.common.menu"),I,"auto"===this._preferredLayout?"selected_menu_item":"",this.hass.localize("ui.components.media-browser.auto"),S,"grid"===this._preferredLayout?"selected_menu_item":"",this.hass.localize("ui.components.media-browser.grid"),P,"list"===this._preferredLayout?"selected_menu_item":"",this.hass.localize("ui.components.media-browser.list"),q,this.hass,this._entityId,this._navigateIds,this._preferredLayout,this._mediaPicked,this._mediaBrowsed,this.hass,this._entityId,this.narrow,this._playerPicked)}_handleMenuAction(t){const e=t.detail.item.value;["auto","grid","list"].includes(e)&&(this._preferredLayout=e)}willUpdate(t){if(super.willUpdate(t),this.hasUpdated||this._entityId===_.H1||this._entityId in this.hass.states||(this._entityId=_.H1),!t.has("route"))return;if(""===this.route.path)return void(0,h.oo)(`/media-browser/${this._entityId}`,{replace:!0});const[e,...i]=this.route.path.substring(1).split("/");if(e!==this._entityId){if(e!==_.H1&&void 0===this.hass.states[e])return(0,h.oo)(`/media-browser/${_.H1}`,{replace:!0}),void(0,b.showAlertDialog)(this,{text:this.hass.localize("ui.panel.media-browser.error.player_not_exist",{name:e})});this._entityId=e}this._navigateIds=[{media_content_type:void 0,media_content_id:void 0},...i.map(t=>{const e=decodeURIComponent(t),i=e.indexOf(",");return{media_content_type:e.substring(0,i),media_content_id:e.substring(i+1)}})],this._currentItem=void 0}_goBack(){(0,h.oo)(A(this._entityId,this._navigateIds.slice(0,-1)))}_mediaBrowsed(t){t.detail.ids!==this._navigateIds?(0,h.oo)(A(this._entityId,t.detail.ids),{replace:t.detail.replace}):this._currentItem=t.detail.current}async _mediaPicked(t){const e=t.detail.item;if(this._entityId!==_.H1){this._player.showResolvingNewMediaPicked();try{await(0,_.ie)(this.hass,this._entityId,e.media_content_id,e.media_content_type)}catch(a){this._player.hideResolvingNewMediaPicked()}return}if((0,v.j4)(e.media_content_id))return void(0,l.r)(this,"hass-more-info",{entityId:(0,v.vc)(e.media_content_id)});let i;this._player.showResolvingNewMediaPicked();try{i=await(0,y.A1)(this.hass,e.media_content_id)}catch(o){return(0,b.showAlertDialog)(this,{title:this.hass.localize("ui.components.media-browser.media_browsing_error"),text:o.message}),void this._player.hideResolvingNewMediaPicked()}i.mime_type.startsWith("audio/")?this._player.playItem(e,i):((0,x.M)(this,{sourceUrl:i.url,sourceType:i.mime_type,title:e.title,can_play:e.can_play}),this._player.hideResolvingNewMediaPicked())}_playerPicked(t){const e=t.detail.entityId;e!==this._entityId&&(0,h.oo)(A(e,this._navigateIds))}_refreshMedia(){this._browser.refresh()}static get styles(){return[f.RF,(0,s.AH)(V||(V=H`ha-media-manage-button{--mdc-theme-primary:var(--app-header-text-color)}ha-media-player-browse{height:calc(100vh - (100px + var(--header-height,0px) + var(--safe-area-inset-top,0px) + var(--safe-area-inset-bottom,0px)))}.page-title{font-size:inherit;margin:inherit;line-height:inherit}:host([narrow]) ha-media-player-browse{height:calc(100vh - (68px + var(--header-height,0px) + var(--safe-area-inset-top,0px) + var(--safe-area-inset-bottom,0px)))}.selected_menu_item{color:var(--primary-color)}.selected_menu_item ha-svg-icon{color:currentColor}ha-bar-media-player{position:fixed;bottom:var(--safe-area-inset-bottom,0px);width:calc(var(--ha-top-app-bar-width,100%) - var(--safe-area-inset-right,0px))}:host([narrow]) ha-bar-media-player{width:calc(var(--ha-top-app-bar-width,100%) - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px))}`))]}constructor(...t){super(...t),this.narrow=!1,this._preferredLayout="auto",this._navigateIds=[{media_content_id:void 0,media_content_type:void 0}],this._entityId=_.H1}}(0,o.Cg)([(0,r.MZ)({attribute:!1})],z.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],z.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],z.prototype,"route",void 0),(0,o.Cg)([(0,r.wk)()],z.prototype,"_currentItem",void 0),(0,o.Cg)([(0,r.wk)(),(0,n.I)({key:"mediaBrowserPreferredLayout",state:!0,subscribe:!1})],z.prototype,"_preferredLayout",void 0),(0,o.Cg)([(0,r.wk)(),(0,n.I)({key:"mediaBrowseEntityId",state:!0,subscribe:!1})],z.prototype,"_entityId",void 0),(0,o.Cg)([(0,r.P)("ha-media-player-browse")],z.prototype,"_browser",void 0),(0,o.Cg)([(0,r.P)("ha-bar-media-player")],z.prototype,"_player",void 0),z=(0,o.Cg)([(0,r.EM)("ha-panel-media-browser")],z),a()}catch(C){a(C)}})},75484:function(t,e,i){i.d(e,{M:function(){return o}});i(3362),i(62953);var a=i(1087);const o=(t,e)=>{(0,a.r)(t,"show-dialog",{dialogTag:"hui-dialog-web-browser-play-media",dialogImport:()=>i.e(3249).then(i.bind(i,42856)),dialogParams:e})}},14503:function(t,e,i){i.d(e,{RF:function(){return p},dp:function(){return m},kO:function(){return g},nA:function(){return u},og:function(){return c}});var a=i(5124);let o,s,r,n,l,h,d=t=>t;const c=(0,a.AH)(o||(o=d`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),p=(0,a.AH)(s||(s=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}`),c),u=(0,a.AH)(r||(r=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)}`)),g=(0,a.AH)(n||(n=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}}`)),m=(0,a.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,a.AH)(h||(h=d`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))}}]);