UNPKG

iobroker.lovelace

Version:

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

40 lines 80 kB
export const __rspack_esm_id=99128;export const __rspack_esm_ids=[99128];export const __webpack_modules__={80785(e,t,a){function i(e){return!!e&&(e instanceof Date&&!isNaN(e.valueOf()))}a.d(t,{A:()=>i})},72487(e,t,a){a.a(e,async function(e,i){try{a.d(t,{CA:()=>$,Mi:()=>L,Pm:()=>C,Wq:()=>_,Yq:()=>d,bl:()=>z,c2:()=>w,fr:()=>f,gu:()=>A,kz:()=>c,m9:()=>F,sl:()=>m,ur:()=>M,zB:()=>u});a(18111),a(20116);var o=a(74487),r=a(22786),s=a(46927),n=a(8480),l=e([o,n]);[o,n]=l.then?(await l)():l;(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,n.wj)(e.time_zone,t)}));const d=(e,t,a)=>h(t,a.time_zone).format(e),h=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,n.wj)(e.time_zone,t)})),c=(e,t,a)=>p(t,a.time_zone).format(e),p=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,n.wj)(e.time_zone,t)})),u=(e,t,a)=>{const i=g(t,a.time_zone);if(t.date_format===s.ow.language||t.date_format===s.ow.system)return i.format(e);const o=i.formatToParts(e),r=o.find(e=>"literal"===e.type)?.value,n=o.find(e=>"day"===e.type)?.value,l=o.find(e=>"month"===e.type)?.value,d=o.find(e=>"year"===e.type)?.value,h=o[o.length-1];let c="literal"===h?.type?h?.value:"";"bg"===t.language&&t.date_format===s.ow.YMD&&(c="");return{[s.ow.DMY]:`${n}${r}${l}${r}${d}${c}`,[s.ow.MDY]:`${l}${r}${n}${r}${d}${c}`,[s.ow.YMD]:`${d}${r}${l}${r}${n}${c}`}[t.date_format]},g=(0,r.A)((e,t)=>{const a=e.date_format===s.ow.system?void 0:e.language;return e.date_format===s.ow.language||(e.date_format,s.ow.system),new Intl.DateTimeFormat(a,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,n.wj)(e.time_zone,t)})}),m=(e,t,a)=>v(t,a.time_zone).format(e),v=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short",timeZone:(0,n.wj)(e.time_zone,t)})),f=(e,t,a)=>b(t,a.time_zone).format(e),b=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric",timeZone:(0,n.wj)(e.time_zone,t)})),_=(e,t,a)=>y(t,a.time_zone).format(e),y=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",timeZone:(0,n.wj)(e.time_zone,t)})),w=(e,t,a)=>x(t,a.time_zone).format(e),x=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",timeZone:(0,n.wj)(e.time_zone,t)})),C=(e,t,a)=>k(t,a.time_zone).format(e),k=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",timeZone:(0,n.wj)(e.time_zone,t)})),$=(e,t,a)=>S(t,a.time_zone).format(e),S=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",timeZone:(0,n.wj)(e.time_zone,t)})),A=(e,t,a)=>I(t,a.time_zone).format(e),I=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",timeZone:(0,n.wj)(e.time_zone,t)})),L=(e,t,a)=>T(t,a.time_zone).format(e),T=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,n.wj)(e.time_zone,t)})),M=(e,t,a)=>E(t,a.time_zone).format(e),E=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,n.wj)(e.time_zone,t)})),z=(e,t,a)=>{const i=(0,n.wj)(t.time_zone,a.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:i}).format(e)},F=(e,t,a,i)=>`${z(e,a,i)}/${z(t,a,i)}`;i()}catch(e){i(e)}})},95747(e,t,a){a.a(e,async function(e,i){try{a.d(t,{CL:()=>_,GH:()=>x,Rl:()=>u,ZS:()=>f,aQ:()=>m,r6:()=>c,yg:()=>y});var o=a(74487),r=a(22786),s=a(72487),n=a(30162),l=a(8480),d=a(69543),h=e([o,l,s,n]);[o,l,s,n]=h.then?(await h)():h;const c=(e,t,a)=>p(t,a.time_zone).format(e),p=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),u=e=>g().format(e),g=(0,r.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),m=(e,t,a)=>v(t,a.time_zone).format(e),v=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",hour:(0,d.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),f=(e,t,a)=>b(t,a.time_zone).format(e),b=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",day:"numeric",hour:(0,d.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),_=(e,t,a)=>(new Date).getFullYear()===e.getFullYear()?f(e,t,a):m(e,t,a),y=(e,t,a)=>w(t,a.time_zone).format(e),w=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,d.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),x=(e,t,a)=>`${(0,s.zB)(e,t,a)}, ${(0,n.fU)(e,t,a)}`;i()}catch(e){i(e)}})},30162(e,t,a){a.a(e,async function(e,i){try{a.d(t,{LW:()=>m,Xs:()=>u,fU:()=>d,ie:()=>c});var o=a(74487),r=a(22786),s=a(8480),n=a(69543),l=e([o,s]);[o,s]=l.then?(await l)():l;const d=(e,t,a)=>h(t,a.time_zone).format(e),h=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,n.J)(e)?"h12":"h23",timeZone:(0,s.wj)(e.time_zone,t)})),c=(e,t,a)=>p(t,a.time_zone).format(e),p=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:(0,n.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,n.J)(e)?"h12":"h23",timeZone:(0,s.wj)(e.time_zone,t)})),u=(e,t,a)=>g(t,a.time_zone).format(e),g=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",hour:(0,n.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,n.J)(e)?"h12":"h23",timeZone:(0,s.wj)(e.time_zone,t)})),m=(e,t,a)=>v(t,a.time_zone).format(e),v=(0,r.A)((e,t)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,s.wj)(e.time_zone,t)}));i()}catch(e){i(e)}})},8480(e,t,a){a.a(e,async function(e,i){try{a.d(t,{fL:()=>h,n2:()=>c,wj:()=>p});var o=a(74487),r=a(29079),s=a(46927),n=e([o]);o=(n.then?(await n)():n)[0];const l=Intl.DateTimeFormat?.().resolvedOptions?.().timeZone,d=l&&("UTC"===l||"Etc/UTC"===l||l in r)?l:void 0,h=14881==a.j?void 0!==d:null,c=d??"UTC",p=(e,t)=>e===s.Wj.local&&d?c:t;i()}catch(e){i(e)}})},69543(e,t,a){a.d(t,{J:()=>r});a(74423);var i=a(22786),o=a(46927);const r=(0,i.A)(e=>{if(e.time_format===o.Hg.language||e.time_format===o.Hg.system){const t=e.time_format===o.Hg.language?e.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(t).includes("10")}return e.time_format===o.Hg.am_pm})},93421(e,t,a){a.d(t,{IW:()=>h,dH:()=>d,fI:()=>l});a(44114);var i=a(35211),o=a(22792),r=a(32172);const s=(e,t)=>{let a=e;for(const e of t){if(null==a)return;a=a[e]}return a},n=(e,t,a)=>{const o=(0,r.p)({transformer:function(e){return a.call(this,e)},watch:t?[t]:[]}),s=(0,i.Fg)({context:e,subscribe:!0});return(e,t)=>{o(e,t),s(e,t)}},l=e=>n(o.iN,e.entityIdPath[0],function(t){const a=s(this,e.entityIdPath);return"string"==typeof a?t?.[a]:void 0}),d=e=>n(o.X1,e.entityIdPath[0],function(t){const a=s(this,e.entityIdPath);return"string"==typeof a?t?.[a]:void 0}),h=()=>n(o.D5,void 0,({localize:e})=>e)},32172(e,t,a){a.d(t,{p:()=>i});a(18111),a(7588),a(45367),a(92731),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);function i(e){return(t,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const i=String(a),o=t;if(o._transformers){if(!o.hasOwnProperty("_transformers")){const e=o._transformers;o._transformers=new Map,e.forEach((e,t)=>o._transformers.set(t,e))}}else{o._transformers=new Map,o._watching=new Map;const e=o.willUpdate;o.willUpdate=function(t){e.call(this,t);const a=new Set;t.forEach((e,t)=>{const i=this._watching.get(t);void 0!==i&&i.forEach(e=>a.add(e))}),a.forEach(e=>{this[e]=this[`__original_${String(e)}`]})}}o._transformers.set(a,e.transformer),e.watch&&e.watch.forEach(e=>{let t=o._watching.get(e);t||(t=new Set,o._watching.set(e,t)),t.add(a)});const r=Object.getOwnPropertyDescriptor(t,a);let s;if(void 0===r)s={get(){return this[`__transform_${i}`]},set(e){const t=this[`__transform_${i}`],a=this._transformers.get(i);this[`__transform_${i}`]=a?a.call(this,e):e,this[`__original_${i}`]=e,this.requestUpdate(i,t)},configurable:!0,enumerable:!0};else{const e=r.set;s={...r,set(t){const a=this[`__transform_${i}`],o=this._transformers.get(i);this[`__transform_${i}`]=o?o.call(this,t):t,this[`__original_${i}`]=t,this.requestUpdate(i,a),e?.call(this,t)}}}Object.defineProperty(t,a,s)}}},60353(e,t,a){a.d(t,{u:()=>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={}){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=e.velocitySwipeThreshold??.5,this._movementTimeThreshold=e.movementTimeThreshold??100}}},64481(e,t,a){a.d(t,{D:()=>o,J:()=>s});a(64979);let i=!1;try{i="true"===window.localStorage.getItem("disableViewTransition")}catch{}const o=e=>{i=e},r=e=>{if(!(e=>(e instanceof DOMException||e instanceof Error)&&"AbortError"===e.name)(e))throw e},s=e=>{if(!document.startViewTransition||i)return e(!1),Promise.resolve();let t=!1;try{const a=document.startViewTransition(()=>{t=!0,e(!0)});return a.ready.catch(r),a.finished.catch(r)}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),t?Promise.reject(a):(e(!1),Promise.resolve())}}},3109(e,t,a){var i=a(62826),o=a(86137),r=a(22441);class s extends o.A{constructor(){super(),this.play=!0,this.iterations=1,this.fill="both",this.name="fadeIn"}}(0,i.Cg)([(0,r.MZ)({type:Boolean})],s.prototype,"play",void 0),s=(0,i.Cg)([(0,r.EM)("ha-fade-in")],s)},14693(e,t,a){a.a(e,async function(e,i){try{a.d(t,{r:()=>v});var o=a(62826),r=a(35211),s=a(5124),n=a(22441),l=a(71769),d=a(22792),h=a(99611),c=(a(76538),a(26300)),p=a(72554),u=e([h,c,p]);[h,c,p]=u.then?(await u)():u;const g="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",m="(max-width: 870px), (max-height: 500px)";class v extends s.WF{connectedCallback(){super.connectedCallback(),this._unsubMediaQuery=(0,l.m)(m,e=>{this._modeSet&&!this.allowModeChange||(this.mode=e?"bottom-sheet":"dialog",this._modeSet=!0)})}get _defaultAriaLabelledBy(){return this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)}_renderCloseButton(e){return this.hideCloseButton?s.qy`<span slot="${e}"></span>`:s.qy` <slot name="headerNavigationIcon" slot="${e}"> <ha-icon-button data-dialog="close" .label="${this._i18n?.localize?.("ui.common.close")??"Close"}" .path="${g}"></ha-icon-button> </slot> `}_renderHeaderContent(){return s.qy` <ha-dialog-header .subtitlePosition="${this.headerSubtitlePosition}"> ${this._renderCloseButton("navigationIcon")} ${void 0!==this.headerTitle?s.qy`<span slot="title" class="title" id="ha-dialog-title"> ${this.headerTitle} </span>`:s.qy`<slot name="headerTitle" slot="title"></slot>`} ${void 0!==this.headerSubtitle?s.qy`<span slot="subtitle">${this.headerSubtitle}</span>`:s.qy`<slot name="headerSubtitle" slot="subtitle"></slot>`} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> `}disconnectedCallback(){super.disconnectedCallback(),this._unsubMediaQuery?.(),this._unsubMediaQuery=void 0,this._modeSet=!1}render(){return"bottom-sheet"===this.mode?s.qy` <ha-bottom-sheet .ariaLabelledBy="${this._defaultAriaLabelledBy}" .ariaDescribedBy="${this.ariaDescribedBy}" .flexContent="${this.flexContent}" .open="${this.open}" .preventScrimClose="${this.preventScrimClose}"> ${this.withoutHeader?s.s6:s.qy` <slot name="header" slot="header">${this._renderHeaderContent()}</slot> `} <slot></slot> <slot name="footer" slot="footer"></slot> </ha-bottom-sheet> `:s.qy` <ha-dialog .open="${this.open}" .type="${this.type}" .width="${this.width}" .preventScrimClose="${this.preventScrimClose}" .ariaLabelledBy="${this.ariaLabelledBy}" .ariaDescribedBy="${this.ariaDescribedBy}" .headerTitle="${this.headerTitle}" .headerSubtitle="${this.headerSubtitle}" .headerSubtitlePosition="${this.headerSubtitlePosition}" .flexContent="${this.flexContent}" .withoutHeader="${this.withoutHeader}"> ${this._renderCloseButton("headerNavigationIcon")} <slot name="headerTitle" slot="headerTitle"></slot> <slot name="headerSubtitle" slot="headerSubtitle"></slot> <slot name="headerActionItems" slot="headerActionItems"></slot> <slot></slot> <slot name="footer" slot="footer"></slot> </ha-dialog> `}static get styles(){return[s.AH`ha-bottom-sheet{--ha-bottom-sheet-border-radius:var(--ha-border-radius-2xl);--ha-bottom-sheet-surface-background:var(
            --ha-dialog-surface-background,
            var(--card-background-color, var(--ha-color-surface-default))
          );--ha-bottom-sheet-padding:0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left);--ha-bottom-sheet-content-padding:var(
            --dialog-content-padding,
            0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6)
          )}`]}constructor(...e){super(...e),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.allowModeChange=!1,this.withoutHeader=!1,this.hideCloseButton=!1,this.flexContent=!1,this.mode="dialog",this._modeSet=!1}}(0,o.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],v.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],v.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],v.prototype,"open",void 0),(0,o.Cg)([(0,n.MZ)({reflect:!0})],v.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:String,reflect:!0,attribute:"width"})],v.prototype,"width",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],v.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-title"})],v.prototype,"headerTitle",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-subtitle"})],v.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,n.MZ)({type:String,attribute:"header-subtitle-position"})],v.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"allow-mode-change"})],v.prototype,"allowModeChange",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"without-header"})],v.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"hide-close-button"})],v.prototype,"hideCloseButton",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],v.prototype,"flexContent",void 0),(0,o.Cg)([(0,n.wk)()],v.prototype,"mode",void 0),(0,o.Cg)([(0,n.wk)(),(0,r.Fg)({context:d.D5,subscribe:!0})],v.prototype,"_i18n",void 0),v=(0,o.Cg)([(0,n.EM)("ha-adaptive-dialog")],v),i()}catch(e){i(e)}})},38962(e,t,a){a.a(e,async function(e,i){try{a.r(t);var o=a(62826),r=a(5124),s=a(22441),n=a(6412),l=a(93421),d=a(1087),h=a(26300),c=(a(67094),e([h]));h=(c.then?(await c)():c)[0];const p="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",u={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};class g extends r.WF{render(){return r.qy` <div class="issue-type ${(0,n.H)({[this.alertType]:!0})}" role="alert"> <div class="icon ${this.title?"":"no-title"}"> <slot name="icon"> <ha-svg-icon .path="${u[this.alertType]}"></ha-svg-icon> </slot> </div> <div class="${(0,n.H)({content:!0,narrow:this.narrow})}"> <div class="main-content"> ${this.title?r.qy`<div class="title">${this.title}</div>`:r.s6} <slot></slot> </div> <div class="action"> <slot name="action"> ${this.dismissable?r.qy`<ha-icon-button @click="${this._dismissClicked}" .label="${this._localize?.("ui.common.dismiss_alert")}" .path="${p}"></ha-icon-button>`:r.s6} </slot> </div> </div> </div> `}_dismissClicked(){(0,d.r)(this,"alert-dismissed-clicked")}constructor(...e){super(...e),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}g.styles=r.AH`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`,(0,o.Cg)([(0,s.MZ)()],g.prototype,"title",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"alert-type"})],g.prototype,"alertType",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],g.prototype,"dismissable",void 0),(0,o.Cg)([(0,s.wk)(),(0,l.IW)()],g.prototype,"_localize",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],g.prototype,"narrow",void 0),g=(0,o.Cg)([(0,s.EM)("ha-alert")],g),i()}catch(e){i(e)}})},99611(e,t,a){a.a(e,async function(e,t){try{a(18111),a(13579),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var i=a(62826),o=a(1126),r=a(35211),s=a(5124),n=a(22441),l=a(1087),d=a(60353),h=a(22792),c=a(59992),p=a(14503),u=a(22348),g=e([o]);o=(g.then?(await g)():g)[0];const m=300,v=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"]),f=new Set(["volume-slider-container","forecast"]);class b extends((0,c.V)(s.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 s.qy` <wa-drawer id="drawer" placement="bottom" .open="${this._drawerOpen}" .lightDismiss="${!this.preventScrimClose}" .ariaLabelledby="${this.ariaLabelledBy}" .ariaDescribedby="${this.ariaDescribedBy}" @keydown="${this._handleKeyDown}" @wa-show="${this._handleShow}" @wa-after-show="${this._handleAfterShow}" @wa-hide="${this._handleHide}" @wa-after-hide="${this._handleAfterHide}" @click="${this._handleCloseAction}" without-header @touchstart="${this._handleTouchStart}"> <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> ${this.renderScrollableFades()} </div> <slot name="footer"></slot> </wa-drawer> `}_startResizing(e){document.addEventListener("touchmove",this._handleTouchMove,{passive:!1}),document.addEventListener("touchend",this._handleTouchEnd),document.addEventListener("touchcancel",this._handleTouchEnd),this._gestureRecognizer.start(e)}_animateSnapBack(){this.style.setProperty("--dialog-transition",`transform ${m}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},m)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.removeEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0}),this._unregisterResizeHandlers(),this._isDragging=!1}static get styles(){return[...super.styles,p.dp,s.AH`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${m}ms;--hide-duration:${m}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}`]}constructor(...e){super(...e),this.open=!1,this.flexContent=!1,this.preventScrimClose=!1,this._drawerOpen=!1,this._sliderInteractionActive=!1,this._gestureRecognizer=new d.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(()=>{const e=this._autofocusElement;this._hassConfig?.auth.external&&(0,u.V)(this._hassConfig.auth.external)?e&&(e.id||(e.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})):e?.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 e of t){if(e===this._drawer)break;if(e instanceof HTMLElement&&(e.scrollTop>0||v.has(e.localName)||Array.from(e.classList).some(e=>f.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=()=>{this._unregisterResizeHandlers(),this._isDragging=!1;const e=this._gestureRecognizer.end();if(e.isSwipe)return void(e.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const t=this._drawer.shadowRoot?.querySelector('[part="body"]'),a=t?.offsetHeight||0;a>0&&e.delta<0&&Math.abs(e.delta)>.5*a?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,n.MZ)({attribute:"aria-labelledby"})],b.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],b.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],b.prototype,"open",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],b.prototype,"flexContent",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],b.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,n.wk)()],b.prototype,"_drawerOpen",void 0),(0,i.Cg)([(0,n.wk)()],b.prototype,"_sliderInteractionActive",void 0),(0,i.Cg)([(0,n.wk)(),(0,r.Fg)({context:h.WF,subscribe:!0})],b.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,n.P)("#drawer")],b.prototype,"_drawer",void 0),(0,i.Cg)([(0,n.P)("#body")],b.prototype,"_bodyElement",void 0),(0,i.Cg)([(0,n.P)("[autofocus]")],b.prototype,"_autofocusElement",void 0),b=(0,i.Cg)([(0,n.EM)("ha-bottom-sheet")],b),t()}catch(e){t(e)}})},76538(e,t,a){var i=a(62826),o=a(5124),r=a(22441);class s extends o.WF{render(){const e=o.qy`<div class="header-title"> <slot name="title"></slot> </div>`,t=o.qy`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`;return o.qy` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${"above"===this.subtitlePosition?o.qy`${t}${e}`:o.qy`${e}${t}`} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `}static get styles(){return[o.AH`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.header-bar{display:flex;flex-direction:row;align-items:center;padding:0 var(--ha-space-1);box-sizing:border-box}.header-content{flex:1;padding:10px var(--ha-space-1);display:flex;flex-direction:column;justify-content:center;min-height:var(--ha-space-12);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))}@media all and (min-width:450px) and (min-height:500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}`]}constructor(...e){super(...e),this.subtitlePosition="below",this.showBorder=!1}}(0,i.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],s.prototype,"subtitlePosition",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],s.prototype,"showBorder",void 0),s=(0,i.Cg)([(0,r.EM)("ha-dialog-header")],s)},72554(e,t,a){a.a(e,async function(e,t){try{var i=a(62826),o=a(93900),r=a(35211),s=a(5124),n=a(22441),l=a(63672),d=a(1087),h=a(64481),c=a(22792),p=a(59992),u=a(14503),g=a(22348),m=(a(76538),a(26300)),v=e([o,m]);[o,m]=v.then?(await v)():v;const f="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";class b extends((0,p.V)(s.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(e){super.updated(e),e.has("open")&&(this._open=this.open)}render(){return s.qy` <wa-dialog .open="${this._open}" .lightDismiss="${!this.preventScrimClose}" without-header aria-labelledby="${(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0))}" aria-describedby="${(0,l.J)(this.ariaDescribedBy)}" @keydown="${this._handleKeyDown}" @wa-hide="${this._handleHide}" @wa-show="${this._handleShow}" @wa-after-show="${this._handleAfterShow}" @wa-after-hide="${this._handleAfterHide}"> ${this.withoutHeader?s.s6:s.qy`<slot name="header"> <ha-dialog-header .subtitlePosition="${this.headerSubtitlePosition}" .showBorder="${this._bodyScrolled}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${this._i18n?.localize?.("ui.common.close")??"Close"}" .path="${f}"></ha-icon-button> </slot> ${void 0!==this.headerTitle?s.qy`<span slot="title" class="title" id="ha-dialog-title"> ${this.headerTitle} </span>`:s.qy`<slot name="headerTitle" slot="title"></slot>`} ${void 0!==this.headerSubtitle?s.qy`<span slot="subtitle">${this.headerSubtitle}</span>`:s.qy`<slot name="headerSubtitle" slot="subtitle"></slot>`} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll="${this._handleBodyScroll}"> <slot></slot> </div> ${this.renderScrollableFades()} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(e){this._open?(0,h.J)(()=>{this._setFullscreen(e.detail)}):this._setFullscreen(e.detail)}_setFullscreen(e){this.toggleAttribute("fullscreen",e)}_handleBodyScroll(e){this._bodyScrolled=e.target.scrollTop>0}_handleKeyDown(e){"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)}_handleHide(e){const t=e.detail?.source===e.target.dialog;this.preventScrimClose&&this._escapePressed&&t&&e.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,u.dp,s.AH`wa-dialog{--full-width:var(
            --ha-dialog-width-full,
            min(95vw, var(--safe-width))
          );--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--spacing:var(--dialog-content-padding, var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration, 200ms);--hide-duration:var(--ha-dialog-hide-duration, 200ms);--wa-color-surface-raised:var(
            --ha-dialog-surface-background,
            var(--card-background-color, var(--ha-color-surface-default))
          );--wa-panel-border-radius:var(
            --ha-dialog-border-radius,
            var(--ha-border-radius-3xl)
          );max-width:var(--ha-dialog-max-width,var(--safe-width))}@media (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0ms;--hide-duration:0ms}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([fullscreen]) wa-dialog,:host([width=full]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{overflow:hidden;padding:0}wa-dialog::part(dialog){-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)),calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));display:flex;flex-direction:column;overflow:hidden}wa-dialog::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)}@media all and (max-width:450px),all and (max-height:500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full, 100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);margin-top:0;margin-bottom:0;padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);transform:none}}.header-title-container{display:flex;align-items:center}.header-title{margin:0;margin-bottom:0;color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var(
            --ha-dialog-header-title-font-size,
            var(--ha-font-size-2xl)
          );line-height:var(
            --ha-dialog-header-title-line-height,
            var(--ha-line-height-condensed)
          );font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--ha-space-3)}wa-dialog::part(body){padding:0;display:flex;flex-direction:column;max-width:100%;overflow:hidden}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}wa-dialog::part(footer){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%}`]}constructor(...e){super(...e),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{if(this._hassConfig?.auth.external&&(0,g.V)(this._hassConfig.auth.external)){const e=this.querySelector("[autofocus]");return void(null!==e&&(e.id||(e.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})))}this.querySelector("[autofocus]")?.focus()}))},this._handleAfterShow=e=>{e.eventPhase===Event.AT_TARGET&&(0,d.r)(this,"after-show")},this._handleAfterHide=e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,d.r)(this,"closed"))}}}(0,i.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],b.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],b.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],b.prototype,"open",void 0),(0,i.Cg)([(0,n.MZ)({reflect:!0})],b.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({type:String,reflect:!0,attribute:"width"})],b.prototype,"width",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],b.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"header-title"})],b.prototype,"headerTitle",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"header-subtitle"})],b.prototype,"headerSubtitle",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"header-subtitle-position"})],b.prototype,"headerSubtitlePosition",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],b.prototype,"flexContent",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"without-header"})],b.prototype,"withoutHeader",void 0),(0,i.Cg)([(0,n.wk)()],b.prototype,"_open",void 0),(0,i.Cg)([(0,n.P)(".body")],b.prototype,"bodyContainer",void 0),(0,i.Cg)([(0,n.wk)(),(0,r.Fg)({context:c.D5,subscribe:!0})],b.prototype,"_i18n",void 0),(0,i.Cg)([(0,n.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],b.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,n.wk)()],b.prototype,"_bodyScrolled",void 0),(0,i.Cg)([(0,n.Ls)({passive:!0})],b.prototype,"_handleBodyScroll",null),b=(0,i.Cg)([(0,n.EM)("ha-dialog")],b),t()}catch(e){t(e)}})},11382(e,t,a){var i=a(62826),o=a(5124),r=a(22441),s=a(6412),n=a(1087),l=a(12587);a(67094);class d extends o.WF{render(){const e=this.noCollapse?o.s6:o.qy` <ha-svg-icon .path="${"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}" class="summary-icon ${(0,s.H)({expanded:this.expanded})}"></ha-svg-icon> `;return o.qy` <div class="top ${(0,s.H)({expanded:this.expanded})}"> <div id="summary" class="${(0,s.H)({noCollapse:this.noCollapse})}" @click="${this._toggleContainer}" @keydown="${this._toggleContainer}" @focus="${this._focusChanged}" @blur="${this._focusChanged}" role="button" tabindex="${this.noCollapse?-1:0}" aria-expanded="${this.expanded}" aria-controls="sect1" part="summary"> ${this.leftChevron?e:o.s6} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${this.header} <slot class="secondary" name="secondary">${this.secondary}</slot> </div> </slot> <slot name="event"></slot> ${this.leftChevron?o.s6:e} <slot name="icons"></slot> </div> </div> <div class="container ${(0,s.H)({expanded:this.expanded})}" @transitionend="${this._handleTransitionEnd}" role="region" aria-labelledby="summary" aria-hidden="${!this.expanded}" tabindex="-1"> ${this._showContent?o.qy`<slot></slot>`:""} </div> `}willUpdate(e){super.willUpdate(e),e.has("expanded")&&(this._showContent=this.expanded,setTimeout(()=>{this._container.style.overflow=this.expanded?"initial":"hidden"},300))}_handleTransitionEnd(){this._container.style.removeProperty("height"),this._container.style.overflow=this.expanded?"initial":"hidden",this._showContent=this.expanded}async _toggleContainer(e){if(e.defaultPrevented)return;if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;if(e.preventDefault(),this.noCollapse)return;const t=!this.expanded;(0,n.r)(this,"expanded-will-change",{expanded:t}),this._container.style.overflow="hidden",t&&(this._showContent=!0,await(0,l.E)());const a=this._container.scrollHeight;this._container.style.height=`${a}px`,t||setTimeout(()=>{this._container.style.height="0px"},0),this.expanded=t,(0,n.r)(this,"expanded-changed",{expanded:this.expanded})}_focusChanged(e){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===e.type)}constructor(...e){super(...e),this.expanded=!1,this.outlined=!1,this.leftChevron=!1,this.noCollapse=!1,this._showContent=this.expanded}}d.styles=o.AH`:host{display:block}.top{display:flex;align-items:center;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.top.expanded{border-bottom-left-radius:0px;border-bottom-right-radius:0px}.top.focused{background:var(--input-fill-color)}:host([outlined]){box-shadow:none;border-width:1px;border-style:solid;border-color:var(--outline-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.summary-icon{transition:transform 150ms cubic-bezier(.4, 0, .2, 1);direction:var(--direction);margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;border-radius:var(--ha-border-radius-circle)}#summary:focus-visible ha-svg-icon.summary-icon{background-color:var(--ha-color-fill-neutral-normal-active)}::slotted([slot=leading-icon]),:host([left-chevron]) .summary-icon{margin-left:0;margin-right:8px;margin-inline-start:0;margin-inline-end:8px}#summary{flex:1;display:flex;padding:var(--expansion-panel-summary-padding,0 8px);min-height:48px;align-items:center;cursor:pointer;overflow:hidden;font-weight:var(--ha-font-weight-medium);outline:0}#summary.noCollapse{cursor:default}.summary-icon.expanded{transform:rotate(180deg)}.header,::slotted([slot=header]){flex:1;overflow-wrap:anywhere;color:var(--primary-text-color)}.container{padding:var(--expansion-panel-content-padding,0 8px);overflow:hidden;transition:height .3s cubic-bezier(.4, 0, .2, 1);height:0px}.container.expanded{height:auto}.secondary{display:block;color:var(--secondary-text-color);font-size:var(--ha-font-size-s)}`,(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],d.prototype,"expanded",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],d.prototype,"outlined",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"left-chevron",type:Boolean,reflect:!0})],d.prototype,"leftChevron",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"no-collapse",type:Boolean,reflect:!0})],d.prototype,"noCollapse",void 0),(0,i.Cg)([(0,r.MZ)()],d.prototype,"header",void 0),(0,i.Cg)([(0,r.MZ)()],d.prototype,"secondary",void 0),(0,i.Cg)([(0,r.wk)()],d.prototype,"_showContent",void 0),(0,i.Cg)([(0,r.P)(".container")],d.prototype,"_container",void 0),d=(0,i.Cg)([(0,r.EM)("ha-expansion-panel")],d)},43661(e,t,a){a.r(t),a.d(t,{HaIconNext:()=>n});var i=a(62826),o=a(22441),r=a(63091),s=a(67094);class n extends s.HaSvgIcon{constructor(...e){super(...e),this.path="rtl"===r.G.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}}(0,i.Cg)([(0,o.MZ)()],n.prototype,"path",void 0),n=(0,i.Cg)([(0,o.EM)("ha-icon-next")],n)},54276(e,t,a){var i=a(62826),o=a(76482),r=a(91382),s=a(96245),n=a(5124),l=a(22441);class d extends r.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){e?.removeEventListener("touchend",this._handleTouchEnd),t?.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new o.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}d.styles=[s.R,n.AH`: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)},65829(e,t,a){a.a(e,async function(e,i){try{a.r(t),a.d(t,{HaSpinner:()=>d});var o=a(62826),r=a(55262),s=a(5124),n=a(22441),l=e([r]);r=(l.then?(await l)():l)[0];class d extends r.A{updated(e){if(super.updated(e),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[r.A.styles,s.AH`:host{--indicator-color:var(
            --ha-spinner-indicator-color,
            var(--primary-color)
          );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`]}}(0,o.Cg)([(0,n.MZ)()],d.prototype,"size",void 0),d=(0,o.Cg)([(0,n.EM)("ha-spinner")],d),i()}catch(e){i(e)}})},28170(e,t,a){a.d(t,{o:()=>l});var i=a(62826),o=a(5124),r=a(22441),s=a(1087),n=a(83892);class l extends n.x{connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role",this.defaultRole),(0,s.r)(this,"ha-list-item-register",{item:this})}disconnectedCallback(){super.disconnectedCallback(),(0,s.r)(this,"ha-list-item-unregister",{item:this})}activate(){this.click()}constructor(...e){super(...e),this.interactive=!1,this.defaultRole="listitem"}}l.styles=[n.x.styles,o.AH`:host{--ha-list-item-focus-radius:var(--ha-border-radius-sm);--ha-list-item-focus-width:2px;--ha-list-item-focus-width-start:var(--ha-space-2);--ha-list-item-focus-offset:-2px;--ha-list-item-focus-background:var(--ha-color-fill-neutral-quiet-hover)}:host(:focus){outline:0}.base{border-radius:var(--ha-list-item-focus-radius);outline:var(--ha-list-item-focus-width) solid transparent;outline-offset:var(--ha-list-item-focus-offset);transition:outline-color var(--ha-animation-duration-fast) ease-out,background-color var(--ha-animation-duration-fast) ease-out}@keyframes ha-list-item-focus-in{from{outline-width:var(--ha-list-item-focus-width-start);outline-offset:calc(-1 * var(--ha-list-item-focus-width-start))}to{outline-width:var(--ha-list-item-focus-width);outline-offset:var(--ha-list-item-focus-offset)}}:host(:focus-visible) .base{outline-color:var(--ha-color-focus);background-color:var(--ha-list-item-focus-background);animation:ha-list-item-focus-in var(--ha-animation-duration-normal) ease-in}`],(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],l.prototype,"interactive",void 0),l=(0,i.Cg)([(0,r.EM)("ha-list-item-base")],l)},1671(e,t,a){var i=a(62826),o=a(5124),r=a(22441),s=a(63672),n=(a(54276),a(28170));class l extends n.o{activate(){this._item?.click()}_renderBase(e){return void 0!==this.href?o.qy`<a part="base" class="base interactive" id="item" href="${(0,s.J)(this.disabled?void 0:this.href)}" target="${(0,s.J)(this.target)}" rel="${(0,s.J)(this.rel)}" download="${(0,s.J)(this.download)}" tabindex="-1" aria-disabled="${this.disabled?"true":"false"}"> ${this._renderRipple()}${e} </a>`:o.qy`<button part="base" class="base interactive" id="item" type="button" ?disabled="${this.disabled}" tabindex="-1"> ${this._renderRipple()}${e} </button>`}_renderRipple(){return o.qy`<ha-ripple part="ripple" for="item" ?disabled="${this.disabled}"></ha-ripple>`}constructor(...e){super(...e),this.interactive=!0}}l.styles=[n.o.styles,o.AH`:host{cursor:pointer;--ha-ripple-color:var(--primary-text-color)}:host([disabled]){cursor:default}.base.interactive{width:100%;border:none;background:0 0;color:inherit;font:inherit;text-align:inherit;text-decoration:none;appearance:none;cursor:inherit}:host([disabled]) .base.interactive{color:var(--disabled-text-color)}`],(0,i.Cg)([(0,r.MZ)({type:String})],l.prototype,"href",void 0),(0,i.Cg)([(0,r.MZ)({type:String})],l.prototype,"target",void 0),(0,i.Cg)([(0,r.MZ)({type:String})],l.prototype,"rel",void 0),(0,i.Cg)([(0,r.MZ)({type:String})],l.prototype,"download",void 0),(0,i.Cg)([(0,r.P)("#item")],l.prototype,"_item",void 0),l=(0,i.Cg)([(0,r.EM)("ha-list-item-button")],l)},83892(e,t,a){a.d(t,{x:()=>n});a(18111),a(13579);var i=a(62826),o=a(92070),r=a(5124),s=a(22441);class n extends r.WF{_onSlotChange(e){return t=>{const a=t.target.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&""!==e.textContent?.trim());"start"===e?this._hasStart=a:this._hasEnd=a}}render(){return this._renderBase(this._renderInner())}_renderBase(e){return r.qy`<div part="base" class="base" id="item">${e}</div>`}_renderInner(){const e=this._slotController.test("content");return r.qy` <div part="start" class="start" ?hidden="${!this._hasStart}"> <slot name="start" @slotchange="${this._onSlotChange("start")}"></slot> </div> <div part="content" class="content"> ${e?r.qy`<slot name="content"></slot>`:this._renderDefaultContent()} </div> <div part="end" class="end" ?hidden="${!this._hasEnd}"> <slot name="end" @slotchange="${this._onSlotChange("end")}"></slot> </div> `}_renderDefaultContent(){const e=this._slotController.test("headline"),t=this._slotController.test("supporting-text"),a=e||void 0!==this.headline,i=t||void 0!==this.supportingText;return r.qy` ${a?r.qy`<div part="headline" class="headline"> <slot name="headline">${this.headline??r.s6}</slot> </div>`:r.s6} ${i?r.qy`<div part="supporting-text" class="supporting"> <slot name="supporting-text">${this.supportingText??r.s6}</slot> </div>`:r.s6} `}constructor(...e){super(...e),this.disabled=!1,this._slotController=new o.X(this,"headline","supporting-text","content"),this._hasStart=!1,this._hasEnd=!1}}n.styles=r.AH`:host{display:block;color:var(--primary-text-color);font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal)}:host([disabled]){color:var(--disabled-text-color);pointer-events:none}.base{position:relative;display:flex;flex-direction:row;align-items:center;gap:var(--ha-row-item-gap,var(--ha-space-4));padding-block:var(--ha-row-item-padding-block,var(--ha-space-3));padding-inline:var(--ha-row-item-padding-inline,var(--ha-space-4));min-height:var(--ha-row-item-min-height,48px);box-sizing:border-box}.content{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center}.end,.start{display:flex;align-items:center;flex:0 0 auto}.end[hidden],.start[hidden]{display:none}.headline{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.supporting{color:var(--secondary-text-color);font-size:var(--ha-font-size-s);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}`,(0,i.Cg)([(0,s.MZ)({type:String})],n.prototype,"headline",void 0),(0,i.Cg)([(0,s.MZ)({type:String,attribute:"supporting-text"})],n.prototype,"supportingText",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0),(0,i.Cg)([(0,s.wk)()],n.prototype,"_hasStart",void 0),(0,i.Cg)([(0,s.wk)()],n.prototype,"_hasEnd",void 0),n=(0,i.Cg)([(0,s.EM)("ha-row-item")],n)},50723(e,t,a){a.d(t,{N:()=>h});a(74423),a(18111),a(22489),a(7588);var i=a(62826),o=a(5124),r=a(22441),s=a(91335);a(44114);const n=e=>{const t=[];let a=e;for(;a;){t.push(a);const e=a.parentNode;if(e instanceof ShadowRoot)a=e.host;else if(e)a=e;else{const e=a.getRootNode();a=e instanceof ShadowRoot?e.host:null}}return t.reverse()},l=(e,t)=>{if(e===t)return 0;const a=n(e),i=n(t);let o=0;for(;o<a.length&&o<i.length&&a[o]===i[o];)o++;return 0===o?0:o===a.length?-1:o===i.length?1:a[o].compareDocumentPosition(i[o])&Node.DOCUMENT_POSITION_FOLLOWING?-1:1};var d=a(1087);class h extends o.WF{connectedCallback(){super.connectedCallback(),this.hasAttribute("ha-list")||this.setAttribute("ha-list",""),!this.hasAttribute("role")&&this.hostRole&&this.setAttribute("role",this.hostRole),this._unbindKeys=(0,s.Tc)(this,{ArrowDown:this._onForward,ArrowUp:this._onBack,Home:this._onHome,End:this._onEnd,Enter:this._onActivate,Space:this._onActivate}),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("ha-list-item-register",this._onItemRegister),this.addEventListener("ha-list-item-unregister",this._onItemUnregister)}disconnectedCallback(){super.disconnectedCallback(),this._unbindKeys?.(),this._unbindKeys=void 0,this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("ha-list-item-register",this._onItemRegister),this.removeEventListener("ha-list-item-unregister",this._onItemUnregister)}focus(e){this.items.length?this.focusItemAtIndex(this._activeItemIndex>=0?this._activeItemIndex:0):super.focus(e)}focusItemAtIndex(e){e<0||this.setActiveItemIndex(e,!0)}getActiveItemIndex(){return this._activeItemIndex}setActiveItemIndex(e,t=!1){this._hasFocusableItem?(this._activeItemIndex=Math.max(0,Math.min(this.items.length-1,e)),this._isFocusable(this._activeItemIndex)||(this._activeItemIndex=this._firstFocusableIndex),this._applyActive(t)):this._activeItemIndex=-1}updateListItems(){this._recomputeFocusableIndexes(),(this._activeItemIndex>=this.items.length||!this._hasFocusableItem||this._activeItemIndex<0)&&(this._activeItemIndex=this._firstFocusableIndex),this._applyActive(!1)}_recomputeFocusableIndexes(){let e=-1,t=-1;for(let a=0;a<this.items.length;a++)this._isFocusable(a)&&(-1===e&&(e=a),t=a);this._firstFocusableIndex=e,this._lastFocusableIndex=t,this._hasFocusableItem=-1!==e}render(){return o.qy`<div part="base" class="base"> <slot></slot> </div>`}_isFocusable(e){const t=this.items[e];return!!t&&t.interactive&&!t.disabled}_applyActive(e){this.items.forEach((e,t)=>{e.interactive&&!e.disabled?e.tabIndex=t===this._activeItemIndex?0:-1:e.removeAttribute("tabindex")}),e&&this._activeItemIndex>=0&&this.items[this._activeItemIndex]?.focus()}_moveFocus(e,t){!this._hasFocusableItem||t<0||t===this._activeItemIndex||(e.preventDefault(),this._activeItemIndex=t,this._applyActive(!0))}_stepIndex(e,t){const a=this.items.length;if(!a||!this._hasFocusableItem)return e;let i=e;for(let o=0;o<a;o++){if(i+=t,i<0||i>=a){if(!this.wrapFocus)return e;i=(i+a)%a}if(this._isFocusable(i))return i}return e}constructor(...e){super(...e),this.wrapFocus=!1,this.ariaLabel=null,this.items=[],this.hostRole="list",this._activeItemIndex=-1,this._firstFocusableIndex=-1,this._lastFocusableIndex=-1,this._hasFocusableItem=!1,this._onItemRegister=e=>{e.stopPropagation();const t=e.detail.item;if(this.items.includes(t))return;const a=[...this.items,t];a.sort(l),this.items=a,this.updateListItems()},this._onItemUnregister=e=>{e.stopPropagation();const t=e.detail.item;this.items.includes(t)&&(this.items=this.items.filter(e=>e!==t),this.updateListItems())},this._onFocusIn=e=>{const t=e.composedPath();for(let e=0;e<this.items.length;e++)if(t.includes(this.items[e]))return void(e!==this._activeItemIndex&&(this._activeItemIndex=e,this._applyActive(!1)))},this._onForward=e=>{this._moveFocus(e,this._stepIndex(this._activeItemIndex,1))},this._onBack=e=>{this._moveFocus(e,this._stepIndex(this._activeItemIndex,-1))},this._onHome=e=>{this._moveFocus(e,this._firstFocusableIndex)},this._onEnd=e=>{this._moveFocus(e,this._lastFocusableIndex)},this._onActivate=e=>{if(!this._isFocusable(this._activeItemIndex))return;e.preventDefault();const t=this.items[this._activeItemIndex];t.activate(),(0,d.r)(this,"ha-list-activated",{index:this._activeItemIndex,item:t})}}}h.styles=o.AH`:host{display:block}.base{display:flex;flex-direction:column;gap:var(--ha-list-gap,0);padding:var(--ha-list-padding,0);margin:0;list-style:none}`,(0,i.Cg)([(0,r.MZ)({type:Boolean,attribute:"wrap-focus"})],h.prototype,"wrapFocus",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"aria-label",reflect:!0})],h.prototype,"ariaLabel",void 0),h=(0,i.Cg)([(0,r.EM)("ha-list-base")],h)},94355(e,t,a){a.a(e,async function(e,t){try{var i=a(62826),o=a(88590),r=a(5124),s=a(22441),n=e([o]);o=(n.then?(await n)():n)[0];class l extends o.A{static get styles(){return[o.A.styles,r.AH`:host{--indicator-color:var(
            --ha-progress-bar-indicator-color,
            var(--ha-color-on-primary-normal)
          );--track-color:var(
            --ha-progress-bar-track-color,
            var(--ha-color-fill-neutral-normal-hover)
          );--track-height:var(--ha-progress-bar-track-height, 12px);--wa-transition-slow:var(--ha-animation-duration-slow);position:relative}.progress-bar{border-radius:var(--ha-progress-bar-border-radius,var(--ha-border-radius-pill))}.indicator{background:var(--ha-progress-bar-indicator-background,var(--indicator-color))}:host([indeterminate]) .indicator{animation:wa-progress-indeterminate var(--ha-progress-bar-animation-duration,2.5s) infinite cubic-bezier(.37,0,.63,1)}@keyframes slide-highlight{0%{transform:translateX(-200%)}100%{transform:translateX(200%)}}:host([loading]:not([indeterminate])) .progress-bar::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,oklch(from var(--indicator-color) 85% c h) 50%,transparent 100%);opacity:.5;animation:slide-highlight var(--ha-progress-bar-animation-duration,2.5s) infinite cubic-bezier(.37,0,.63,1);width:50%}:host::after{--width:var(
            --ha-progress-bar-indicator-highlight-width,
            calc(var(--track-height) * 2)
          );width:var(--width);height:var(--ha-progress-bar-indicator-highlight-height,calc(var(--track-height) * 2));content:"";position:absolute;inset-inline-start:clamp(var(--width)/ 2,var(--percentage,0%),calc(100% - var(--width)/ 2));top:50%;transform:translate(-50%,-50%);background-image:var(--ha-progress-bar-indicator-highlight-image);background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:none;transition:inset-inline-start var(--wa-transition-slow, 200ms) var(--wa-transition-easing, ease)}:host([indeterminate])::after{display:none}`]}constructor(...e){super(...e),this.loading=!1}}(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],l.prototype,"loading",void 0),l=(0,i.Cg)([(0,s.EM)("ha-progress-bar")],l),t()}catch(e){t(e)}})},31420(e,t,a){a.a(e,async function(e,i){try{a.d(t,{Bi:()=>D,Dt:()=>X,EB:()=>M,IW:()=>I,P_:()=>$,SG:()=>A,Sx:()=>N,T2:()=>f,Xm:()=>_,Ye:()=>b,Zm:()=>E,cq:()=>W,dH:()=>L,en:()=>G,gF:()=>w,gb:()=>y,gv:()=>z,jU:()=>B,kI:()=>T,mF:()=>F,mu:()=>S,oJ:()=>Z,pI:()=>C,pL:()=>Y,q5:()=>R,q7:()=>H,qk:()=>v,sp:()=>O,uM:()=>J,v3:()=>P,xN:()=>K,yL:()=>x,yj:()=>j,zZ:()=>k});a(74423),a(16573),a(78100),a(77936),a(18111),a(22489),a(20116),a(7588),a(61701),a(37467),a(44732),a(79577),a(16632),a(34226),a(9486),a(20456),a(14603),a(47566),a(98721);var o=a(22711),r=a(97732),s=a(6226),n=a(22786),l=a(80785),d=a(95747),h=a(30162),c=a(36918),p=a(30039),u=a(39889),g=a(95350),m=e([o,d,h]);[o,d,h]=m.then?(await m)():m;var v=function(e){return e.NEVER="never",e.DAILY="daily",e.CUSTOM_DAYS="custom_days",e}({});const f=["mon","tue","wed","thu","fri","sat","sun"],b=e=>e.sort((e,t)=>f.indexOf(e)-f.indexOf(t)),_=e=>e.callWS({type:"backup/config/info"}),y=(e,t)=>e.callWS({type:"backup/config/update",...t}),w=(e,t)=>y(e,{create_backup:{agent_ids:t.create_backup.agent_ids,include_folders:t.create_backup.include_folders??[],include_database:t.create_backup.include_database,include_addons:t.create_backup.include_addons??[],include_all_addons:t.create_backup.include_all_addons,password:t.create_backup.password},retention:t.retention,schedule:t.schedule}),x=(e,t,a)=>`/api/backup/download/${e}?agent_id=${t}${a?`&password=${a}`:""}`,C=e=>e.callWS({type:"backup/info"}),k=(e,t)=>e.callWS({type:"backup/details",backup_id:t}),$=e=>e.callWS({type:"backup/agents/info"}),S=(e,t)=>e.callWS({type:"backup/delete",backup_id:t}),A=(e,t)=>e.callWS({type:"backup/generate",...t}),I=e=>e.callWS({type:"backup/generate_with_automatic_settings"}),L=(e,t)=>e.callWS({type:"backup/restore",...t}),T=async(e,t,a)=>{const i=new FormData;i.append("file",t);const o=new URLSearchParams;return a.forEach(e=>{o.append("agent_id",e)}),(0,u.QE)(e.fetchWithAuth(`/api/backup/upload?${o.toString()}`,{method:"POST",body:i}))},M=e=>{const t=e.find(D);if(t)return t;const a=e.find(B);return a||e[0]},E=(e,t,a,i)=>e.callWS({type:"backup/can_decrypt_on_download",backup_id:t,agent_id:a,password:i}),z="backup.local",F="hassio.local",Z="cloud.cloud",D=e=>[z,F].includes(e),B=e=>{const[t,a]=e.split(".");return"hassio"===t&&"local"!==a},H=(e,t,a)=>{if(D(t))return e("ui.panel.config.backup.agents.local_agent");const i=a.find(e=>e.agent_id===t),o=t.split(".")[0],r=i?i.name:t.split(".")[1];if(B(t))return r;const s=(0,g.p$)(e,o);return a.filter(e=>e.agent_id.split(".")[0]===o).length>1?`${s}: ${r}`:s},P=e=>Math.max(...Object.values(e.agents).map(e=>e.size)),q=["automatic","app_update","manual"],R=(0,o.z)(e=>e?q:q.filter(e=>"app_update"!==e)),O=(e,t)=>e.with_automatic_settings?"automatic":!t||null==e.extra_metadata?.["supervisor.addon_update"]&&null==e.extra_metadata?.["supervisor.app_update"]?"manual":"app_update",j=(e,t)=>{const a=D(e),i=D(t),o=B(e),r=B(t),s=(e,t)=>e?1:t?2:3,n=s(a,o),l=s(i,r);return n!==l?n-l:e.localeCompare(t)},W=()=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",t="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx";let a="";const i=new Uint8Array(34);return crypto.getRandomValues(i),i.forEach((i,o)=>{a+="-"===t[o]?"-":e[i%36]}),a},U=(e,t)=>"data:text/plain;charset=utf-8,"+encodeURIComponent(`${e.localize("ui.panel.config.backup.emergency_kit_file.title")}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.description")}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.date")} ${(0,d.r6)(new Date,e.locale,e.config)}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.instance")}\n${e.config.location_name}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.url")}\n${e.auth.data.hassUrl}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.encryption_key")}\n${t}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.more_info",{link:(0,c.o)(e,"/more-info/backup-emergency-kit")})}`),V=(e,t)=>`home_assistant_backup_emergency_kit_${t?`${t}_`:""}${(0,d.GH)(new Date,e.locale,e.config).replace(",","").replace(" ","_")}.txt`,N=(e,t,a)=>(0,p.R)(U(e,t),V(e,a)),J=(0,r.g)((0,s.a)(new Date,4),45),Y=(0,r.g)((0,s.a)(new Date,5),45),G=(0,n.A)((e,t,a)=>{if((0,l.A)(a))return(0,h.fU)(a,e,t);if("string"==typeof a&&a){const i=a.split(":"),o=(0,r.g)((0,s.a)(new Date,parseInt(i[0])),parseInt(i[1]));return(0,h.fU)(o,e,t)}return`${(0,h.fU)(J,e,t)} - ${(0,h.fU)(Y,e,t)}`}),K="application/x-tar",X={file:void 0};i()}catch(e){i(e)}})},16869(e,t,a){a.d(t,{B:()=>o,g:()=>i});a(74423);const i=window.externalAppV2||window.externalApp||window.webkit?.messageHandlers?.getExternalAuth||location.search.includes("external_auth=1"),o=window.externalApp||window.externalAppV2},47351(e,t,a){a.d(t,{PS:()=>i,Tv:()=>s,VR:()=>o,lE:()=>n});a(74423),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);const i=e=>e.data,o=e=>"object"==typeof e?"object"==typeof e.body?e.body.message||"Unknown error, see supervisor logs":e.body||e.message||"Unknown error, see supervisor logs":e,r=new Set([502,503,504]),s=e=>!!(e&&e.status_code&&r.has(e.status_code))||!(!e||!e.message||!e.message.includes("ERR_CONNECTION_CLOSED")&&!e.message.includes("ERR_CONNECTION_RESET")),n=async(e,t)=>e({type:"supervisor/api",endpoint:`/${t}/stats`,method:"get"})},15336(e,t,a){a.d(t,{He:()=>d,Ku:()=>r,PB:()=>s,Wq:()=>p,hu:()=>l,mZ:()=>n,v9:()=>h,xY:()=>c});var i=a(62384),o=a(47351);const r=async e=>{if((0,i.v)(e.config.version,2021,2,4))return e.callWS({type:"supervisor/api",endpoint:"/host/info",method:"get"});const t=await e.callApi("GET","hassio/host/info");return(0,o.PS)(t)},s=async e=>(0,i.v)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/os/info",method:"get"}):(0,o.PS)(await e.callApi("GET","hassio/os/info")),n=async e=>(0,i.v)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/reboot",method:"post",timeout:null}):e.callApi("POST","hassio/host/reboot"),l=async e=>(0,i.v)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/shutdown",method:"post",timeout:null}):e.callApi("POST","hassio/host/shutdown"),d=async(e,t)=>(0,i.v)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/options",method:"post",data:t}):e.callApi("POST","hassio/host/options",t),h=async(e,t)=>(0,i.v)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/os/datadisk/move",method:"post",timeout:null,data:{device:t}}):e.callApi("POST","hassio/os/datadisk/move"),c=async e=>(0,i.v)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/os/datadisk/list",method:"get",timeout:null}):(0,o.PS)(await e.callApi("GET","/os/datadisk/list")),p=async e=>(0,i.v)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/disks/default/usage",method:"get",timeout:3600,params:{max_depth:3}}):(0,o.PS)(await e.callApi("GET","hassio/host/disks/default/usage"))},15903(e,t,a){a.a(e,async function(e,i){try{a.r(t);a(74423);var o=a(62826),r=a(5124),s=a(22441),n=a(36312),l=a(1087),d=(a(3109),a(14693)),h=a(38962),c=(a(11382),a(43661),a(65829)),p=(a(1671),a(50723),a(94355)),u=a(31420),g=a(47351),m=a(15336),v=a(14503),f=a(81619),b=a(65063),_=a(9835),y=e([d,h,c,p,u]);[d,h,c,p,u]=y.then?(await y)():y;const w="M7.5,5.6L5,7L6.4,4.5L5,2L7.5,3.4L10,2L8.6,4.5L10,7L7.5,5.6M19.5,15.4L22,14L20.6,16.5L22,19L19.5,17.6L17,19L18.4,16.5L17,14L19.5,15.4M22,2L20.6,4.5L22,7L19.5,5.6L17,7L18.4,4.5L17,2L19.5,3.4L22,2M13.34,12.78L15.78,10.34L13.66,8.22L11.22,10.66L13.34,12.78M14.37,7.29L16.71,9.63C17.1,10 17.1,10.65 16.71,11.04L5.04,22.71C4.65,23.1 4,23.1 3.63,22.71L1.29,20.37C0.9,20 0.9,19.35 1.29,18.96L12.96,7.29C13.35,6.9 14,6.9 14.37,7.29Z",x="M19.79,15.41C20.74,13.24 20.74,10.75 19.79,8.59L17.05,9.83C17.65,11.21 17.65,12.78 17.06,14.17L19.79,15.41M15.42,4.21C13.25,3.26 10.76,3.26 8.59,4.21L9.83,6.94C11.22,6.35 12.79,6.35 14.18,6.95L15.42,4.21M4.21,8.58C3.26,10.76 3.26,13.24 4.21,15.42L6.95,14.17C6.35,12.79 6.35,11.21 6.95,9.82L4.21,8.58M8.59,19.79C10.76,20.74 13.25,20.74 15.42,19.78L14.18,17.05C12.8,17.65 11.22,17.65 9.84,17.06L8.59,19.79M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,8A4,4 0 0,0 8,12A4,4 0 0,0 12,16A4,4 0 0,0 16,12A4,4 0 0,0 12,8Z",C="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",k="M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M12,19A7,7 0 0,1 5,12A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19M13,17H11V7H13V17Z",$="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z";class S extends r.WF{async showDialog(){const e=(0,n.x)(this.hass.config,"hassio");this._open=!0,this._dialogOpen=!0,e&&!this._hostInfo&&this._loadHostInfo()}async _loadBackupState(){try{const{state:e}=await(0,u.pI)(this.hass);return e}catch(e){return"idle"}}async _loadHostInfo(){this._loadingHostInfo=!0;try{this._hostInfo=await(0,m.Ku)(this.hass)}catch(e){}finally{this._loadingHostInfo=!1}}_dialogClosed(){this._dialogOpen=!1,this._open=!1,this._loadingHostInfo=!1,this._loadingBackupInfo=!1,(0,l.r)(this,"dialog-closed",{dialog:this.localName})}render(){if(!this._open)return r.s6;const e=!!this._hostInfo,t=this.hass.localize("ui.dialogs.restart.heading");return r.qy` <ha-adaptive-dialog .open="${this._dialogOpen}" header-title="${t}" allow-mode-change flexcontent @closed="${this._dialogClosed}"> <div class="content"> <div class="action-loader"> ${this._loadingBackupInfo?r.qy`<ha-fade-in .delay="${250}"> <ha-progress-bar indeterminate></ha-progress-bar> </ha-fade-in>`:r.s6} </div> ${this._loadingHostInfo?r.qy` <div class="loader"> <ha-spinner></ha-spinner> </div> `:r.qy` <ha-list-base dialogInitialFocus> <ha-list-item-button @click="${this._reload}" .disabled="${this._loadingBackupInfo}"> <div slot="headline"> ${this.hass.localize("ui.dialogs.restart.reload.title")} </div> <div slot="supporting-text"> ${this.hass.localize("ui.dialogs.restart.reload.description")} </div> <div slot="start" class="icon-background reload"> <ha-svg-icon .path="${w}"></ha-svg-icon> </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> <ha-list-item-button .action="${"restart"}" @click="${this._handleAction}" .disabled="${this._loadingBackupInfo}"> <div slot="start" class="icon-background restart"> <ha-svg-icon .path="${$}"></ha-svg-icon> </div> <div slot="headline"> ${this.hass.localize("ui.dialogs.restart.restart.title")} </div> <div slot="supporting-text"> ${this.hass.localize("ui.dialogs.restart.restart.description")} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> </ha-list-base> <ha-expansion-panel .header="${this.hass.localize("ui.dialogs.restart.advanced_options")}"> <ha-list-base> ${e?r.qy` <ha-list-item-button .action="${"reboot"}" @click="${this._handleAction}" .disabled="${this._loadingBackupInfo}"> <div slot="start" class="icon-background reboot"> <ha-svg-icon .path="${k}"></ha-svg-icon> </div> <div slot="headline"> ${this.hass.localize("ui.dialogs.restart.reboot.title")} </div> <div slot="supporting-text"> ${this.hass.localize("ui.dialogs.restart.reboot.description")} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> <ha-list-item-button .action="${"shutdown"}" @click="${this._handleAction}" .disabled="${this._loadingBackupInfo}"> <div slot="start" class="icon-background shutdown"> <ha-svg-icon .path="${C}"></ha-svg-icon> </div> <div slot="headline"> ${this.hass.localize("ui.dialogs.restart.shutdown.title")} </div> <div slot="supporting-text"> ${this.hass.localize("ui.dialogs.restart.shutdown.description")} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> `:r.s6} <ha-list-item-button .action="${"restart-safe-mode"}" @click="${this._handleAction}" .disabled="${this._loadingBackupInfo}"> <div slot="start" class="icon-background restart-safe-mode"> <ha-svg-icon .path="${x}"></ha-svg-icon> </div> <div slot="headline"> ${this.hass.localize("ui.dialogs.restart.restart-safe-mode.title")} </div> <div slot="supporting-text"> ${this.hass.localize("ui.dialogs.restart.restart-safe-mode.description")} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> </ha-list-base> </ha-expansion-panel> `} </div> </ha-adaptive-dialog> `}async _reload(){this._dialogOpen=!1,(0,f.P)(this,{message:this.hass.localize("ui.dialogs.restart.reload.reloading"),duration:1e3}),this._restartAction("homeassistant","reload_all",this.hass.localize("ui.dialogs.restart.reload.failed"))()}_getBackupProgressMessage(e){switch(e){case"create_backup":return this.hass.localize("ui.dialogs.restart.backup_in_progress");case"receive_backup":return this.hass.localize("ui.dialogs.restart.upload_in_progress");case"restore_backup":return this.hass.localize("ui.dialogs.restart.restore_in_progress");default:return""}}async _handleAction(e){if(this._loadingBackupInfo)return;this._loadingBackupInfo=!0;const t=e.currentTarget.action,a=await this._loadBackupState(),i=this._getBackupProgressMessage(a);this._loadingBackupInfo=!1;if(!await(0,b.dk)(this,{title:this.hass.localize(`ui.dialogs.restart.${t}.confirm_title`),text:r.qy`${this.hass.localize(`ui.dialogs.restart.${t}.confirm_description`)}${i?r.qy`<br><br><ha-alert>${i}</ha-alert>`:r.s6}`,confirmText:this.hass.localize(`ui.dialogs.restart.${t}.confirm_action${"idle"===a?"":"_backup"}`),destructive:!0}))return;let o;if(this._dialogOpen=!1,["restart","restart-safe-mode"].includes(t)){const e="restart-safe-mode"===t?{safe_mode:!0}:void 0;o=this._restartAction("homeassistant","restart",this.hass.localize(`ui.dialogs.restart.${t}.failed`),e)}else o=this._hostAction(this.hass.localize(`ui.dialogs.restart.${t}.action_toast`),t);"idle"===a?o():(0,_.eb)(this,{title:this.hass.localize(`ui.dialogs.restart.${t}.title`),initialBackupState:a,action:o})}static get styles(){return[v.RF,v.nA,r.AH`ha-adaptive-dialog{--dialog-content-padding:0}ha-expansion-panel{border-top:1px solid var(--divider-color);margin-bottom:10px;box-shadow:none;--expansion-panel-content-padding:0;--expansion-panel-summary-padding:0 var(--mdc-list-side-padding, 20px);--ha-card-border-radius:var(--ha-border-radius-square)}.icon-background{border-radius:var(--ha-border-radius-circle);color:#fff;display:flex;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.reload{background-color:#5f8a49}.restart{background-color:#ffd500;color:#650}.reboot{background-color:#ba1b1b;color:#fff}.shutdown{background-color:#0b1d29;color:#fff}.restart-safe-mode{background-color:#e48629;color:#fff}.divider{height:1px;background-color:var(--divider-color)}.section{font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-condensed);margin:8px 0 4px 0;padding-left:var(--mdc-list-side-padding,20px);padding-right:var(--mdc-list-side-padding,20px);padding-inline-start:var(--mdc-list-side-padding,20px);padding-inline-end:var(--mdc-list-side-padding,20px)}.loader{display:flex;align-items:center;justify-content:center;padding:24px}.action-loader{--ha-progress-bar-track-height:4px;--ha-progress-bar-border-radius:0}`]}constructor(...e){super(...e),this._open=!1,this._loadingHostInfo=!1,this._loadingBackupInfo=!1,this._dialogOpen=!1,this._restartAction=(e,t,a,i)=>async()=>{try{await this.hass.callService(e,t,i)}catch(e){(0,b.showAlertDialog)(this,{title:a,text:e.message})}},this._hostAction=(e,t)=>async()=>{(0,f.P)(this,{message:e,duration:-1});try{"reboot"===t?await(0,m.mZ)(this.hass):await(0,m.hu)(this.hass)}catch(e){this.hass.connection.connected&&!(0,g.Tv)(e)&&(0,b.showAlertDialog)(this,{title:this.hass.localize(`ui.dialogs.restart.${t}.failed`),text:(0,g.VR)(e)})}}}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],S.prototype,"hass",void 0),(0,o.Cg)([(0,s.wk)()],S.prototype,"_open",void 0),(0,o.Cg)([(0,s.wk)()],S.prototype,"_loadingHostInfo",void 0),(0,o.Cg)([(0,s.wk)()],S.prototype,"_loadingBackupInfo",void 0),(0,o.Cg)([(0,s.wk)()],S.prototype,"_hostInfo",void 0),(0,o.Cg)([(0,s.wk)()],S.prototype,"_dialogOpen",void 0),S=(0,o.Cg)([(0,s.EM)("dialog-restart")],S),i()}catch(e){i(e)}})},59992(e,t,a){a.d(t,{V:()=>l});var i=a(62826),o=a(88696),r=a(5124),s=a(6412),n=a(22441);const l=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){super.firstUpdated?.(e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){super.updated?.(e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return r.qy` <div class="${(0,s.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled})}"></div> <div class="${(0,s.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable})}"></div> `}static get styles(){const e=Object.getPrototypeOf(this);var t;return[...void 0===(t=e?.styles??[])?[]:Array.isArray(t)?t:[t],r.AH`.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(){this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),this._resize.unobserve?.(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:o=0}=e;this._contentScrollable=a-i>o+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{const t=e.currentTarget;this._contentScrolled=(t.scrollTop??0)>this.scrollFadeThreshold,this._updateScrollableState(t)},this._resize=new o.P(this,{target:null,callback:e=>{const t=e[0]?.target;t&&this._updateScrollableState(t)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,i.Cg)([(0,n.wk)()],t.prototype,"_contentScrolled",void 0),(0,i.Cg)([(0,n.wk)()],t.prototype,"_contentScrollable",void 0),t}},36918(e,t,a){a.d(t,{o:()=>i});const i=(e,t)=>`https://www.iobroker.net/#${e.language&&e.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},30039(e,t,a){a.d(t,{R:()=>o});a(14603),a(47566),a(98721);var i=a(16869);const o=(e,t="")=>{const a=document.createElement("a");a.target="_blank",a.href=e,a.download=t,a.style.display="none",document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),document.body.removeChild(a),e.startsWith("blob:")&&(i.B?setTimeout(()=>URL.revokeObjectURL(e),1e4):URL.revokeObjectURL(e))}},22348(e,t,a){a.d(t,{V:()=>o});var i=a(37177);const o=e=>!!e&&i.n},37177(e,t,a){a.d(t,{n:()=>i});const i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},89429(e){e.exports=function(){}}};