UNPKG

iobroker.lovelace

Version:

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

40 lines 85.6 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[8026],{80785:function(t,e,i){function a(t){return!!t&&(t instanceof Date&&!isNaN(t.valueOf()))}i.d(e,{A:function(){return a}})},72487:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{CA:function(){return $},Mi:function(){return L},Pm:function(){return C},Wq:function(){return y},Yq:function(){return d},bl:function(){return E},c2:function(){return w},fr:function(){return f},gu:function(){return A},kz:function(){return c},m9:function(){return F},sl:function(){return m},ur:function(){return M},zB:function(){return p}});i(18111),i(20116);var o=i(74487),r=i(22786),n=i(46927),s=i(8480),l=t([o,s]);[o,s]=l.then?(await l)():l;(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)}));const d=(t,e,i)=>h(e,i.time_zone).format(t),h=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),c=(t,e,i)=>u(e,i.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),p=(t,e,i)=>{var a,o,r,s;const l=g(e,i.time_zone);if(e.date_format===n.ow.language||e.date_format===n.ow.system)return l.format(t);const d=l.formatToParts(t),h=null===(a=d.find(t=>"literal"===t.type))||void 0===a?void 0:a.value,c=null===(o=d.find(t=>"day"===t.type))||void 0===o?void 0:o.value,u=null===(r=d.find(t=>"month"===t.type))||void 0===r?void 0:r.value,p=null===(s=d.find(t=>"year"===t.type))||void 0===s?void 0:s.value,m=d[d.length-1];let v="literal"===(null==m?void 0:m.type)?null==m?void 0:m.value:"";"bg"===e.language&&e.date_format===n.ow.YMD&&(v="");return{[n.ow.DMY]:`${c}${h}${u}${h}${p}${v}`,[n.ow.MDY]:`${u}${h}${c}${h}${p}${v}`,[n.ow.YMD]:`${p}${h}${u}${h}${c}${v}`}[e.date_format]},g=(0,r.A)((t,e)=>{const i=t.date_format===n.ow.system?void 0:t.language;return t.date_format===n.ow.language||(t.date_format,n.ow.system),new Intl.DateTimeFormat(i,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})}),m=(t,e,i)=>v(e,i.time_zone).format(t),v=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),f=(t,e,i)=>b(e,i.time_zone).format(t),b=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),y=(t,e,i)=>_(e,i.time_zone).format(t),_=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,s.wj)(t.time_zone,e)})),w=(t,e,i)=>x(e,i.time_zone).format(t),x=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),C=(t,e,i)=>k(e,i.time_zone).format(t),k=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),$=(t,e,i)=>S(e,i.time_zone).format(t),S=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,s.wj)(t.time_zone,e)})),A=(t,e,i)=>I(e,i.time_zone).format(t),I=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,s.wj)(t.time_zone,e)})),L=(t,e,i)=>T(e,i.time_zone).format(t),T=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),M=(t,e,i)=>z(e,i.time_zone).format(t),z=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),E=(t,e,i)=>{const a=(0,s.wj)(e.time_zone,i.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:a}).format(t)},F=(t,e,i,a)=>`${E(t,i,a)}/${E(e,i,a)}`;a()}catch(d){a(d)}})},95747:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{CL:function(){return y},GH:function(){return x},Rl:function(){return p},ZS:function(){return f},aQ:function(){return m},r6:function(){return c},yg:function(){return _}});var o=i(74487),r=i(22786),n=i(72487),s=i(30162),l=i(8480),d=i(69543),h=t([o,l,n,s]);[o,l,n,s]=h.then?(await h)():h;const c=(t,e,i)=>u(e,i.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),p=t=>g().format(t),g=(0,r.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),m=(t,e,i)=>v(e,i.time_zone).format(t),v=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",hour:(0,d.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),f=(t,e,i)=>b(e,i.time_zone).format(t),b=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",day:"numeric",hour:(0,d.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),y=(t,e,i)=>(new Date).getFullYear()===t.getFullYear()?f(t,e,i):m(t,e,i),_=(t,e,i)=>w(e,i.time_zone).format(t),w=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,d.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),x=(t,e,i)=>`${(0,n.zB)(t,e,i)}, ${(0,s.fU)(t,e,i)}`;a()}catch(c){a(c)}})},30162:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{LW:function(){return m},Xs:function(){return p},fU:function(){return d},ie:function(){return c}});var o=i(74487),r=i(22786),n=i(8480),s=i(69543),l=t([o,n]);[o,n]=l.then?(await l)():l;const d=(t,e,i)=>h(e,i.time_zone).format(t),h=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),c=(t,e,i)=>u(e,i.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),p=(t,e,i)=>g(e,i.time_zone).format(t),g=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),m=(t,e,i)=>v(e,i.time_zone).format(t),v=(0,r.A)((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,n.wj)(t.time_zone,e)}));a()}catch(d){a(d)}})},8480:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{fL:function(){return p},n2:function(){return g},wj:function(){return m}});var o,r,n,s=i(74487),l=i(29079),d=i(46927),h=t([s]);s=(h.then?(await h)():h)[0];const c=null===(o=Intl.DateTimeFormat)||void 0===o||null===(r=(n=o.call(Intl)).resolvedOptions)||void 0===r?void 0:r.call(n).timeZone,u=c&&("UTC"===c||"Etc/UTC"===c||c in l)?c:void 0,p=14881==i.j?void 0!==u:null,g=null!=u?u:"UTC",m=(t,e)=>t===d.Wj.local&&u?g:e;a()}catch(c){a(c)}})},69543:function(t,e,i){i.d(e,{J:function(){return r}});i(74423);var a=i(22786),o=i(46927);const r=(0,a.A)(t=>{if(t.time_format===o.Hg.language||t.time_format===o.Hg.system){const e=t.time_format===o.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===o.Hg.am_pm})},93421:function(t,e,i){i.d(e,{IW:function(){return h},dH:function(){return d},fI:function(){return l}});i(44114),i(62953);var a=i(35211),o=i(22792),r=i(32172);const n=(t,e)=>{let i=t;for(const a of e){if(null==i)return;i=i[a]}return i},s=(t,e,i)=>{const o=(0,r.p)({transformer:function(t){return i.call(this,t)},watch:e?[e]:[]}),n=(0,a.Fg)({context:t,subscribe:!0});return(t,e)=>{o(t,e),n(t,e)}},l=t=>s(o.iN,t.entityIdPath[0],function(e){const i=n(this,t.entityIdPath);return"string"==typeof i?null==e?void 0:e[i]:void 0}),d=t=>s(o.X1,t.entityIdPath[0],function(e){const i=n(this,t.entityIdPath);return"string"==typeof i?null==e?void 0:e[i]:void 0}),h=()=>s(o.D5,void 0,({localize:t})=>t)},32172:function(t,e,i){i.d(e,{p:function(){return a}});i(16280),i(18111),i(7588),i(45367),i(92731),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);function a(t){return(e,i)=>{if("object"==typeof i)throw new Error("This decorator does not support this compilation type.");const a=String(i),o=e;if(o._transformers){if(!o.hasOwnProperty("_transformers")){const t=o._transformers;o._transformers=new Map,t.forEach((t,e)=>o._transformers.set(e,t))}}else{o._transformers=new Map,o._watching=new Map;const t=o.willUpdate;o.willUpdate=function(e){t.call(this,e);const i=new Set;e.forEach((t,e)=>{const a=this._watching.get(e);void 0!==a&&a.forEach(t=>i.add(t))}),i.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}o._transformers.set(i,t.transformer),t.watch&&t.watch.forEach(t=>{let e=o._watching.get(t);e||(e=new Set,o._watching.set(t,e)),e.add(i)});const r=Object.getOwnPropertyDescriptor(e,i);let n;if(void 0===r)n={get(){return this[`__transform_${a}`]},set(t){const e=this[`__transform_${a}`],i=this._transformers.get(a);this[`__transform_${a}`]=i?i.call(this,t):t,this[`__original_${a}`]=t,this.requestUpdate(a,e)},configurable:!0,enumerable:!0};else{const t=r.set;n=Object.assign(Object.assign({},r),{},{set(e){const i=this[`__transform_${a}`],o=this._transformers.get(a);this[`__transform_${a}`]=o?o.call(this,e):e,this[`__original_${a}`]=e,this.requestUpdate(a,i),null==t||t.call(this,e)}})}Object.defineProperty(e,i,n)}}},60353:function(t,e,i){i.d(e,{u:function(){return a}});class a{start(t){const e=Date.now();this._startY=t,this._startTime=e,this._lastY=t,this._lastTime=e,this._delta=0}move(t){const e=Date.now();return this._delta=this._startY-t,this._lastY=t,this._lastTime=e,this._delta}end(){const t=this.getVelocity(),e=Math.abs(t)>this._velocityThreshold;return{velocity:t,delta:this._delta,isSwipe:e,isDownwardSwipe:t>0}}getDelta(){return this._delta}getVelocity(){if(Date.now()-this._lastTime>=this._movementTimeThreshold)return 0;const t=this._lastTime-this._startTime;return t>0?(this._lastY-this._startY)/t:0}reset(){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0}constructor(t={}){var e,i;this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=null!==(e=t.velocitySwipeThreshold)&&void 0!==e?e:.5,this._movementTimeThreshold=null!==(i=t.movementTimeThreshold)&&void 0!==i?i:100}}},64481:function(t,e,i){i.d(e,{D:function(){return o},J:function(){return n}});i(16280),i(3362),i(55815),i(64979),i(79739);let a=!1;try{a="true"===window.localStorage.getItem("disableViewTransition")}catch(s){}const o=t=>{a=t},r=t=>{if(!(t=>(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name)(t))throw t},n=t=>{if(!document.startViewTransition||a)return t(!1),Promise.resolve();let e=!1;try{const i=document.startViewTransition(()=>{e=!0,t(!0)});return i.ready.catch(r),i.finished.catch(r)}catch(i){return console.warn("View transition failed, falling back to direct execution.",i),e?Promise.reject(i):(t(!1),Promise.resolve())}}},3109:function(t,e,i){var a=i(40445),o=i(86137),r=i(67576);class n extends o.A{constructor(){super(),this.play=!0,this.iterations=1,this.fill="both",this.name="fadeIn"}}(0,a.Cg)([(0,r.MZ)({type:Boolean})],n.prototype,"play",void 0),n=(0,a.Cg)([(0,r.EM)("ha-fade-in")],n)},14693:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{r:function(){return I}});i(62953);var o=i(40445),r=i(35211),n=i(5124),s=i(67576),l=i(71769),d=i(22792),h=i(99611),c=(i(76538),i(26300)),u=i(72554),p=t([h,c,u]);[h,c,u]=p.then?(await p)():p;let g,m,v,f,b,y,_,w,x,C,k,$=t=>t;const S="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",A="(max-width: 870px), (max-height: 500px)";class I extends n.WF{connectedCallback(){super.connectedCallback(),this._unsubMediaQuery=(0,l.m)(A,t=>{this._modeSet&&!this.allowModeChange||(this.mode=t?"bottom-sheet":"dialog",this._modeSet=!0)})}get _defaultAriaLabelledBy(){return this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)}_renderCloseButton(t){var e,i,a;return this.hideCloseButton?(0,n.qy)(g||(g=$`<span slot="${0}"></span>`),t):(0,n.qy)(m||(m=$` <slot name="headerNavigationIcon" slot="${0}"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> `),t,null!==(e=null===(i=this._i18n)||void 0===i||null===(a=i.localize)||void 0===a?void 0:a.call(i,"ui.common.close"))&&void 0!==e?e:"Close",S)}_renderHeaderContent(){return(0,n.qy)(v||(v=$` <ha-dialog-header .subtitlePosition="${0}"> ${0} ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> `),this.headerSubtitlePosition,this._renderCloseButton("navigationIcon"),void 0!==this.headerTitle?(0,n.qy)(f||(f=$`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,n.qy)(b||(b=$`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,n.qy)(y||(y=$`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,n.qy)(_||(_=$`<slot name="headerSubtitle" slot="subtitle"></slot>`)))}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._unsubMediaQuery)||void 0===t||t.call(this),this._unsubMediaQuery=void 0,this._modeSet=!1}render(){return"bottom-sheet"===this.mode?(0,n.qy)(w||(w=$` <ha-bottom-sheet .ariaLabelledBy="${0}" .ariaDescribedBy="${0}" .flexContent="${0}" .open="${0}" .preventScrimClose="${0}"> ${0} <slot></slot> <slot name="footer" slot="footer"></slot> </ha-bottom-sheet> `),this._defaultAriaLabelledBy,this.ariaDescribedBy,this.flexContent,this.open,this.preventScrimClose,this.withoutHeader?n.s6:(0,n.qy)(x||(x=$` <slot name="header" slot="header">${0}</slot> `),this._renderHeaderContent())):(0,n.qy)(C||(C=$` <ha-dialog .open="${0}" .type="${0}" .width="${0}" .preventScrimClose="${0}" .ariaLabelledBy="${0}" .ariaDescribedBy="${0}" .headerTitle="${0}" .headerSubtitle="${0}" .headerSubtitlePosition="${0}" .flexContent="${0}" .withoutHeader="${0}"> ${0} <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> `),this.open,this.type,this.width,this.preventScrimClose,this.ariaLabelledBy,this.ariaDescribedBy,this.headerTitle,this.headerSubtitle,this.headerSubtitlePosition,this.flexContent,this.withoutHeader,this._renderCloseButton("headerNavigationIcon"))}static get styles(){return[(0,n.AH)(k||(k=$`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(...t){super(...t),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,s.MZ)({attribute:"aria-labelledby"})],I.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],I.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],I.prototype,"open",void 0),(0,o.Cg)([(0,s.MZ)({reflect:!0})],I.prototype,"type",void 0),(0,o.Cg)([(0,s.MZ)({type:String,reflect:!0,attribute:"width"})],I.prototype,"width",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],I.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"header-title"})],I.prototype,"headerTitle",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"header-subtitle"})],I.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,s.MZ)({type:String,attribute:"header-subtitle-position"})],I.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"allow-mode-change"})],I.prototype,"allowModeChange",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"without-header"})],I.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"hide-close-button"})],I.prototype,"hideCloseButton",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],I.prototype,"flexContent",void 0),(0,o.Cg)([(0,s.wk)()],I.prototype,"mode",void 0),(0,o.Cg)([(0,s.wk)(),(0,r.Fg)({context:d.D5,subscribe:!0})],I.prototype,"_i18n",void 0),I=(0,o.Cg)([(0,s.EM)("ha-adaptive-dialog")],I),a()}catch(g){a(g)}})},38962:function(t,e,i){i.a(t,async function(t,a){try{i.r(e);i(62953);var o=i(40445),r=i(5124),n=i(67576),s=i(6412),l=i(93421),d=i(1087),h=i(26300),c=(i(67094),t([h]));h=(c.then?(await c)():c)[0];let u,p,g,m,v=t=>t;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",b={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 y extends r.WF{render(){var t;return(0,r.qy)(u||(u=v` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,s.H)({[this.alertType]:!0}),this.title?"":"no-title",b[this.alertType],(0,s.H)({content:!0,narrow:this.narrow}),this.title?(0,r.qy)(p||(p=v`<div class="title">${0}</div>`),this.title):r.s6,this.dismissable?(0,r.qy)(g||(g=v`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(t=this._localize)||void 0===t?void 0:t.call(this,"ui.common.dismiss_alert"),f):r.s6)}_dismissClicked(){(0,d.r)(this,"alert-dismissed-clicked")}constructor(...t){super(...t),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}y.styles=(0,r.AH)(m||(m=v`.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,n.MZ)()],y.prototype,"title",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"alert-type"})],y.prototype,"alertType",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],y.prototype,"dismissable",void 0),(0,o.Cg)([(0,n.wk)(),(0,l.IW)()],y.prototype,"_localize",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],y.prototype,"narrow",void 0),y=(0,o.Cg)([(0,n.EM)("ha-alert")],y),a()}catch(u){a(u)}})},99611:function(t,e,i){i.a(t,async function(t,e){try{i(18111),i(13579),i(3362),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var a=i(40445),o=i(1126),r=i(35211),n=i(5124),s=i(67576),l=i(1087),d=i(60353),h=i(22792),c=i(59992),u=i(14503),p=i(22348),g=t([o,c]);[o,c]=g.then?(await g)():g;let m,v,f=t=>t;const b=300,y=new Set(["ha-control-slider","ha-slider","ha-control-switch","ha-control-circular-slider","ha-hs-color-picker","ha-map","ha-more-info-control-select-container","ha-filter-chip"]),_=new Set(["volume-slider-container","forecast"]);class w extends((0,c.V)(n.WF)){get scrollableElement(){return this._bodyElement}connectedCallback(){super.connectedCallback(),this.addEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.addEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0})}updated(t){super.updated(t),t.has("open")&&(this._drawerOpen=this.open)}render(){return(0,n.qy)(m||(m=f` <wa-drawer id="drawer" placement="bottom" .open="${0}" .lightDismiss="${0}" .ariaLabelledby="${0}" .ariaDescribedby="${0}" @keydown="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-hide="${0}" @wa-after-hide="${0}" @click="${0}" without-header @touchstart="${0}"> <div class="handle-wrapper" aria-hidden="true"> <div class="handle"></div> </div> <slot name="header"></slot> <div class="content-wrapper"> <div id="body" class="body ha-scrollbar"> <slot></slot> </div> ${0} </div> <slot name="footer"></slot> </wa-drawer> `),this._drawerOpen,!this.preventScrimClose,this.ariaLabelledBy,this.ariaDescribedBy,this._handleKeyDown,this._handleShow,this._handleAfterShow,this._handleHide,this._handleAfterHide,this._handleCloseAction,this._handleTouchStart,this.renderScrollableFades())}_startResizing(t){document.addEventListener("touchmove",this._handleTouchMove,{passive:!1}),document.addEventListener("touchend",this._handleTouchEnd),document.addEventListener("touchcancel",this._handleTouchEnd),this._gestureRecognizer.start(t)}_animateSnapBack(){this.style.setProperty("--dialog-transition",`transform ${b}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},b)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.removeEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0}),this._unregisterResizeHandlers(),this._isDragging=!1}static get styles(){return[...super.styles,u.dp,(0,n.AH)(v||(v=f`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${0}ms;--hide-duration:${0}ms}wa-drawer::part(dialog){max-height:min(var(--ha-bottom-sheet-max-height,90vh),calc(100vh - max(var(--safe-area-inset-top),48px)));max-height:min(var(--ha-bottom-sheet-max-height,90dvh),calc(100dvh - max(var(--safe-area-inset-top),48px)));align-items:center;transform:var(--dialog-transform);transition:var(--dialog-transition)}@media (prefers-reduced-motion:reduce){wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:1ms;--hide-duration:1ms}wa-drawer::part(dialog){transition:1ms}}wa-drawer::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));background-color:var(--ha-bottom-sheet-scrim-color,var(--mdc-dialog-scrim-color,none))}wa-drawer::part(body){max-width:var(--ha-bottom-sheet-max-width);width:100%;position:relative;border-top-left-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));border-top-right-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));background-color:var(--ha-bottom-sheet-surface-background,var(--ha-dialog-surface-background,var(--card-background-color,var(--ha-color-surface-default))));-webkit-backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));padding:var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left))}:host([flexcontent]) wa-drawer::part(body){display:flex;flex-direction:column}:host([prevent-scrim-close]) .handle-wrapper{display:none}.handle-wrapper{position:absolute;top:0;inset-inline-start:0;width:100%;padding-bottom:2px;display:flex;justify-content:center;align-items:center;pointer-events:none;z-index:1}.handle-wrapper .handle{height:16px;width:200px;display:flex;justify-content:center;align-items:center}.handle-wrapper .handle::after{content:"";border-radius:var(--ha-border-radius-md);height:4px;background:var(--ha-bottom-sheet-handle-color,var(--divider-color));width:40px}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{padding:var(--ha-bottom-sheet-content-padding,0);box-sizing:border-box}:host([flexcontent]) .body{flex:1;max-width:100%;display:flex;flex-direction:column;padding:var(--ha-bottom-sheet-content-padding,var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left)));box-sizing:border-box}slot[name=footer]{display:block;padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;box-sizing:border-box}:host([flexcontent]) slot[name=footer]{flex-shrink:0}`),b,b)]}constructor(...t){super(...t),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(()=>{var t;const e=this._autofocusElement;null!==(t=this._hassConfig)&&void 0!==t&&t.auth.external&&(0,p.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}})):null==e||e.focus()})},this._handleAfterShow=()=>{(0,l.r)(this,"after-show")},this._handleSliderInteractionStart=()=>{this._sliderInteractionActive=!0},this._handleSliderInteractionStop=()=>{this._sliderInteractionActive=!1},this._handleAfterHide=t=>{if(this._sliderInteractionActive)return this._drawerOpen=!0,void(this.open=!0);t.eventPhase===Event.AT_TARGET&&(this.open=!1,this._drawerOpen=!1,(0,l.r)(this,"closed"))},this._handleHide=t=>{if(t.eventPhase!==Event.AT_TARGET)return;const e=t.detail.source===t.target.drawer;if(this._sliderInteractionActive)return t.preventDefault(),this._drawerOpen=!0,this.open=!0,void(this._escapePressed=!1);this.preventScrimClose&&this._escapePressed&&e&&t.preventDefault(),this._escapePressed=!1},this._handleKeyDown=t=>{"Escape"===t.key&&(this._escapePressed=!0,this.preventScrimClose&&t.preventDefault(),t.stopPropagation(),t.currentTarget.open=!1)},this._handleCloseAction=t=>{t.composedPath().some(t=>t instanceof HTMLElement&&("close"===t.getAttribute("data-dialog")||"close"===t.getAttribute("data-drawer")))&&(this._drawerOpen=!1)},this._handleTouchStart=t=>{if(this.preventScrimClose)return;const e=t.composedPath();for(const i of e){if(i===this._drawer)break;if(i instanceof HTMLElement&&(i.scrollTop>0||y.has(i.localName)||Array.from(i.classList).some(t=>_.has(t))))return}t.stopPropagation(),this._startResizing(t.touches[0].clientY)},this._handleTouchMove=t=>{const e=t.touches[0].clientY,i=this._gestureRecognizer.move(e);i<0&&(t.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*i}px)`)}))},this._handleTouchEnd=()=>{var t;this._unregisterResizeHandlers(),this._isDragging=!1;const e=this._gestureRecognizer.end();if(e.isSwipe)return void(e.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const i=null===(t=this._drawer.shadowRoot)||void 0===t?void 0:t.querySelector('[part="body"]'),a=(null==i?void 0:i.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,a.Cg)([(0,s.MZ)({attribute:"aria-labelledby"})],w.prototype,"ariaLabelledBy",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],w.prototype,"ariaDescribedBy",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"open",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],w.prototype,"flexContent",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],w.prototype,"preventScrimClose",void 0),(0,a.Cg)([(0,s.wk)()],w.prototype,"_drawerOpen",void 0),(0,a.Cg)([(0,s.wk)()],w.prototype,"_sliderInteractionActive",void 0),(0,a.Cg)([(0,s.wk)(),(0,r.Fg)({context:h.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,a.Cg)([(0,s.P)("#drawer")],w.prototype,"_drawer",void 0),(0,a.Cg)([(0,s.P)("#body")],w.prototype,"_bodyElement",void 0),(0,a.Cg)([(0,s.P)("[autofocus]")],w.prototype,"_autofocusElement",void 0),w=(0,a.Cg)([(0,s.EM)("ha-bottom-sheet")],w),e()}catch(m){e(m)}})},76538:function(t,e,i){i(62953);var a=i(40445),o=i(5124),r=i(67576);let n,s,l,d,h,c,u=t=>t;class p extends o.WF{render(){const t=(0,o.qy)(n||(n=u`<div class="header-title"> <slot name="title"></slot> </div>`)),e=(0,o.qy)(s||(s=u`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,o.qy)(l||(l=u` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${0} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `),"above"===this.subtitlePosition?(0,o.qy)(d||(d=u`${0}${0}`),e,t):(0,o.qy)(h||(h=u`${0}${0}`),t,e))}static get styles(){return[(0,o.AH)(c||(c=u`: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(...t){super(...t),this.subtitlePosition="below",this.showBorder=!1}}(0,a.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],p.prototype,"subtitlePosition",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],p.prototype,"showBorder",void 0),p=(0,a.Cg)([(0,r.EM)("ha-dialog-header")],p)},72554:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(62953),i(49255);var a=i(40445),o=i(93900),r=i(35211),n=i(5124),s=i(67576),l=i(63672),d=i(1087),h=i(64481),c=i(22792),u=i(59992),p=i(14503),g=i(22348),m=(i(76538),i(26300)),v=t([o,m,u]);[o,m,u]=v.then?(await v)():v;let f,b,y,_,w,x,C,k=t=>t;const $="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 S extends((0,u.V)(n.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(t){super.updated(t),t.has("open")&&(this._open=this.open)}render(){var t,e,i;return(0,n.qy)(f||(f=k` <wa-dialog .open="${0}" .lightDismiss="${0}" without-header aria-labelledby="${0}" aria-describedby="${0}" @keydown="${0}" @wa-hide="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-after-hide="${0}"> ${0} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll="${0}"> <slot></slot> </div> ${0} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `),this._open,!this.preventScrimClose,(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,l.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?n.s6:(0,n.qy)(b||(b=k`<slot name="header"> <ha-dialog-header .subtitlePosition="${0}" .showBorder="${0}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`),this.headerSubtitlePosition,this._bodyScrolled,null!==(t=null===(e=this._i18n)||void 0===e||null===(i=e.localize)||void 0===i?void 0:i.call(e,"ui.common.close"))&&void 0!==t?t:"Close",$,void 0!==this.headerTitle?(0,n.qy)(y||(y=k`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,n.qy)(_||(_=k`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,n.qy)(w||(w=k`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,n.qy)(x||(x=k`<slot name="headerSubtitle" slot="subtitle"></slot>`))),this._handleBodyScroll,this.renderScrollableFades())}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(t){this._open?(0,h.J)(()=>{this._setFullscreen(t.detail)}):this._setFullscreen(t.detail)}_setFullscreen(t){this.toggleAttribute("fullscreen",t)}_handleBodyScroll(t){this._bodyScrolled=t.target.scrollTop>0}_handleKeyDown(t){"Escape"===t.key&&(this._escapePressed=!0,this.preventScrimClose&&t.preventDefault(),t.stopPropagation(),t.currentTarget.open=!1)}_handleHide(t){var e;const i=(null===(e=t.detail)||void 0===e?void 0:e.source)===t.target.dialog;this.preventScrimClose&&this._escapePressed&&i&&t.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,p.dp,(0,n.AH)(C||(C=k`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(...t){super(...t),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 t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var t,e;if(null!==(t=this._hassConfig)&&void 0!==t&&t.auth.external&&(0,g.V)(this._hassConfig.auth.external)){const t=this.querySelector("[autofocus]");return void(null!==t&&(t.id||(t.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})))}null===(e=this.querySelector("[autofocus]"))||void 0===e||e.focus()}))},this._handleAfterShow=t=>{t.eventPhase===Event.AT_TARGET&&(0,d.r)(this,"after-show")},this._handleAfterHide=t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,d.r)(this,"closed"))}}}(0,a.Cg)([(0,s.MZ)({attribute:"aria-labelledby"})],S.prototype,"ariaLabelledBy",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],S.prototype,"ariaDescribedBy",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],S.prototype,"open",void 0),(0,a.Cg)([(0,s.MZ)({reflect:!0})],S.prototype,"type",void 0),(0,a.Cg)([(0,s.MZ)({type:String,reflect:!0,attribute:"width"})],S.prototype,"width",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],S.prototype,"preventScrimClose",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"header-title"})],S.prototype,"headerTitle",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"header-subtitle"})],S.prototype,"headerSubtitle",void 0),(0,a.Cg)([(0,s.MZ)({type:String,attribute:"header-subtitle-position"})],S.prototype,"headerSubtitlePosition",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],S.prototype,"flexContent",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,attribute:"without-header"})],S.prototype,"withoutHeader",void 0),(0,a.Cg)([(0,s.wk)()],S.prototype,"_open",void 0),(0,a.Cg)([(0,s.P)(".body")],S.prototype,"bodyContainer",void 0),(0,a.Cg)([(0,s.wk)(),(0,r.Fg)({context:c.D5,subscribe:!0})],S.prototype,"_i18n",void 0),(0,a.Cg)([(0,s.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],S.prototype,"_hassConfig",void 0),(0,a.Cg)([(0,s.wk)()],S.prototype,"_bodyScrolled",void 0),(0,a.Cg)([(0,s.Ls)({passive:!0})],S.prototype,"_handleBodyScroll",null),S=(0,a.Cg)([(0,s.EM)("ha-dialog")],S),e()}catch(f){e(f)}})},11382:function(t,e,i){i(3362),i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(6412),s=i(1087),l=i(12587);i(67094);let d,h,c,u,p=t=>t;class g extends o.WF{render(){const t=this.noCollapse?o.s6:(0,o.qy)(d||(d=p` <ha-svg-icon .path="${0}" class="summary-icon ${0}"></ha-svg-icon> `),"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",(0,n.H)({expanded:this.expanded}));return(0,o.qy)(h||(h=p` <div class="top ${0}"> <div id="summary" class="${0}" @click="${0}" @keydown="${0}" @focus="${0}" @blur="${0}" role="button" tabindex="${0}" aria-expanded="${0}" aria-controls="sect1" part="summary"> ${0} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${0} <slot class="secondary" name="secondary">${0}</slot> </div> </slot> <slot name="event"></slot> ${0} <slot name="icons"></slot> </div> </div> <div class="container ${0}" @transitionend="${0}" role="region" aria-labelledby="summary" aria-hidden="${0}" tabindex="-1"> ${0} </div> `),(0,n.H)({expanded:this.expanded}),(0,n.H)({noCollapse:this.noCollapse}),this._toggleContainer,this._toggleContainer,this._focusChanged,this._focusChanged,this.noCollapse?-1:0,this.expanded,this.leftChevron?t:o.s6,this.header,this.secondary,this.leftChevron?o.s6:t,(0,n.H)({expanded:this.expanded}),this._handleTransitionEnd,!this.expanded,this._showContent?(0,o.qy)(c||(c=p`<slot></slot>`)):"")}willUpdate(t){super.willUpdate(t),t.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(t){if(t.defaultPrevented)return;if("keydown"===t.type&&"Enter"!==t.key&&" "!==t.key)return;if(t.preventDefault(),this.noCollapse)return;const e=!this.expanded;(0,s.r)(this,"expanded-will-change",{expanded:e}),this._container.style.overflow="hidden",e&&(this._showContent=!0,await(0,l.E)());const i=this._container.scrollHeight;this._container.style.height=`${i}px`,e||setTimeout(()=>{this._container.style.height="0px"},0),this.expanded=e,(0,s.r)(this,"expanded-changed",{expanded:this.expanded})}_focusChanged(t){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===t.type)}constructor(...t){super(...t),this.expanded=!1,this.outlined=!1,this.leftChevron=!1,this.noCollapse=!1,this._showContent=this.expanded}}g.styles=(0,o.AH)(u||(u=p`: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,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],g.prototype,"expanded",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],g.prototype,"outlined",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"left-chevron",type:Boolean,reflect:!0})],g.prototype,"leftChevron",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"no-collapse",type:Boolean,reflect:!0})],g.prototype,"noCollapse",void 0),(0,a.Cg)([(0,r.MZ)()],g.prototype,"header",void 0),(0,a.Cg)([(0,r.MZ)()],g.prototype,"secondary",void 0),(0,a.Cg)([(0,r.wk)()],g.prototype,"_showContent",void 0),(0,a.Cg)([(0,r.P)(".container")],g.prototype,"_container",void 0),g=(0,a.Cg)([(0,r.EM)("ha-expansion-panel")],g)},43661:function(t,e,i){i.r(e),i.d(e,{HaIconNext:function(){return s}});i(62953);var a=i(40445),o=i(67576),r=i(63091),n=i(67094);class s extends n.HaSvgIcon{constructor(...t){super(...t),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,a.Cg)([(0,o.MZ)()],s.prototype,"path",void 0),s=(0,a.Cg)([(0,o.EM)("ha-icon-next")],s)},54276:function(t,e,i){i(62953);var a=i(40445),o=i(76482),r=i(91382),n=i(96245),s=i(5124),l=i(67576);let d;class h extends r.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new o.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}h.styles=[n.R,(0,s.AH)(d||(d=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
          --ha-ripple-hover-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        );--md-ripple-pressed-color:var(
          --ha-ripple-pressed-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        )}`))],h=(0,a.Cg)([(0,l.EM)("ha-ripple")],h)},65829:function(t,e,i){i.a(t,async function(t,a){try{i.r(e),i.d(e,{HaSpinner:function(){return c}});var o=i(40445),r=i(55262),n=i(5124),s=i(67576),l=t([r]);r=(l.then?(await l)():l)[0];let d,h=t=>t;class c extends r.A{updated(t){if(super.updated(t),t.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,(0,n.AH)(d||(d=h`: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,s.MZ)()],c.prototype,"size",void 0),c=(0,o.Cg)([(0,s.EM)("ha-spinner")],c),a()}catch(d){a(d)}})},28170:function(t,e,i){i.d(e,{o:function(){return d}});i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(1087),s=i(83892);let l;class d extends s.x{connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role",this.defaultRole),(0,n.r)(this,"ha-list-item-register",{item:this})}disconnectedCallback(){super.disconnectedCallback(),(0,n.r)(this,"ha-list-item-unregister",{item:this})}activate(){this.click()}constructor(...t){super(...t),this.interactive=!1,this.defaultRole="listitem"}}d.styles=[s.x.styles,(0,o.AH)(l||(l=(t=>t)`: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,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],d.prototype,"interactive",void 0),d=(0,a.Cg)([(0,r.EM)("ha-list-item-base")],d)},1671:function(t,e,i){i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(63672),s=(i(54276),i(28170));let l,d,h,c,u=t=>t;class p extends s.o{activate(){var t;null===(t=this._item)||void 0===t||t.click()}_renderBase(t){return void 0!==this.href?(0,o.qy)(l||(l=u`<a part="base" class="base interactive" id="item" href="${0}" target="${0}" rel="${0}" download="${0}" tabindex="-1" aria-disabled="${0}"> ${0}${0} </a>`),(0,n.J)(this.disabled?void 0:this.href),(0,n.J)(this.target),(0,n.J)(this.rel),(0,n.J)(this.download),this.disabled?"true":"false",this._renderRipple(),t):(0,o.qy)(d||(d=u`<button part="base" class="base interactive" id="item" type="button" ?disabled="${0}" tabindex="-1"> ${0}${0} </button>`),this.disabled,this._renderRipple(),t)}_renderRipple(){return(0,o.qy)(h||(h=u`<ha-ripple part="ripple" for="item" ?disabled="${0}"></ha-ripple>`),this.disabled)}constructor(...t){super(...t),this.interactive=!0}}p.styles=[s.o.styles,(0,o.AH)(c||(c=u`: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,a.Cg)([(0,r.MZ)({type:String})],p.prototype,"href",void 0),(0,a.Cg)([(0,r.MZ)({type:String})],p.prototype,"target",void 0),(0,a.Cg)([(0,r.MZ)({type:String})],p.prototype,"rel",void 0),(0,a.Cg)([(0,r.MZ)({type:String})],p.prototype,"download",void 0),(0,a.Cg)([(0,r.P)("#item")],p.prototype,"_item",void 0),p=(0,a.Cg)([(0,r.EM)("ha-list-item-button")],p)},83892:function(t,e,i){i.d(e,{x:function(){return m}});i(18111),i(13579),i(27495),i(42762),i(62953);var a=i(40445),o=i(92070),r=i(5124),n=i(67576);let s,l,d,h,c,u,p,g=t=>t;class m extends r.WF{_onSlotChange(t){return e=>{const i=e.target.assignedNodes({flatten:!0}).some(t=>{var e;return t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&""!==(null===(e=t.textContent)||void 0===e?void 0:e.trim())});"start"===t?this._hasStart=i:this._hasEnd=i}}render(){return this._renderBase(this._renderInner())}_renderBase(t){return(0,r.qy)(s||(s=g`<div part="base" class="base" id="item">${0}</div>`),t)}_renderInner(){const t=this._slotController.test("content");return(0,r.qy)(l||(l=g` <div part="start" class="start" ?hidden="${0}"> <slot name="start" @slotchange="${0}"></slot> </div> <div part="content" class="content"> ${0} </div> <div part="end" class="end" ?hidden="${0}"> <slot name="end" @slotchange="${0}"></slot> </div> `),!this._hasStart,this._onSlotChange("start"),t?(0,r.qy)(d||(d=g`<slot name="content"></slot>`)):this._renderDefaultContent(),!this._hasEnd,this._onSlotChange("end"))}_renderDefaultContent(){var t,e;const i=this._slotController.test("headline"),a=this._slotController.test("supporting-text"),o=i||void 0!==this.headline,n=a||void 0!==this.supportingText;return(0,r.qy)(h||(h=g` ${0} ${0} `),o?(0,r.qy)(c||(c=g`<div part="headline" class="headline"> <slot name="headline">${0}</slot> </div>`),null!==(t=this.headline)&&void 0!==t?t:r.s6):r.s6,n?(0,r.qy)(u||(u=g`<div part="supporting-text" class="supporting"> <slot name="supporting-text">${0}</slot> </div>`),null!==(e=this.supportingText)&&void 0!==e?e:r.s6):r.s6)}constructor(...t){super(...t),this.disabled=!1,this._slotController=new o.X(this,"headline","supporting-text","content"),this._hasStart=!1,this._hasEnd=!1}}m.styles=(0,r.AH)(p||(p=g`: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,a.Cg)([(0,n.MZ)({type:String})],m.prototype,"headline",void 0),(0,a.Cg)([(0,n.MZ)({type:String,attribute:"supporting-text"})],m.prototype,"supportingText",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),(0,a.Cg)([(0,n.wk)()],m.prototype,"_hasStart",void 0),(0,a.Cg)([(0,n.wk)()],m.prototype,"_hasEnd",void 0),m=(0,a.Cg)([(0,n.EM)("ha-row-item")],m)},50723:function(t,e,i){i.d(e,{N:function(){return p}});i(74423),i(26910),i(18111),i(22489),i(7588),i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(91335);i(44114),i(94490);const s=t=>{const e=[];let i=t;for(;i;){e.push(i);const t=i.parentNode;if(t instanceof ShadowRoot)i=t.host;else if(t)i=t;else{const t=i.getRootNode();i=t instanceof ShadowRoot?t.host:null}}return e.reverse()},l=(t,e)=>{if(t===e)return 0;const i=s(t),a=s(e);let o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o++;return 0===o?0:o===i.length?-1:o===a.length?1:i[o].compareDocumentPosition(a[o])&Node.DOCUMENT_POSITION_FOLLOWING?-1:1};var d=i(1087);let h,c,u=t=>t;class p 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,n.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(){var t;super.disconnectedCallback(),null===(t=this._unbindKeys)||void 0===t||t.call(this),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(t){this.items.length?this.focusItemAtIndex(this._activeItemIndex>=0?this._activeItemIndex:0):super.focus(t)}focusItemAtIndex(t){t<0||this.setActiveItemIndex(t,!0)}getActiveItemIndex(){return this._activeItemIndex}setActiveItemIndex(t,e=!1){this._hasFocusableItem?(this._activeItemIndex=Math.max(0,Math.min(this.items.length-1,t)),this._isFocusable(this._activeItemIndex)||(this._activeItemIndex=this._firstFocusableIndex),this._applyActive(e)):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 t=-1,e=-1;for(let i=0;i<this.items.length;i++)this._isFocusable(i)&&(-1===t&&(t=i),e=i);this._firstFocusableIndex=t,this._lastFocusableIndex=e,this._hasFocusableItem=-1!==t}render(){return(0,o.qy)(h||(h=u`<div part="base" class="base"> <slot></slot> </div>`))}_isFocusable(t){const e=this.items[t];return!!e&&e.interactive&&!e.disabled}_applyActive(t){var e;(this.items.forEach((t,e)=>{t.interactive&&!t.disabled?t.tabIndex=e===this._activeItemIndex?0:-1:t.removeAttribute("tabindex")}),t&&this._activeItemIndex>=0)&&(null===(e=this.items[this._activeItemIndex])||void 0===e||e.focus())}_moveFocus(t,e){!this._hasFocusableItem||e<0||e===this._activeItemIndex||(t.preventDefault(),this._activeItemIndex=e,this._applyActive(!0))}_stepIndex(t,e){const i=this.items.length;if(!i||!this._hasFocusableItem)return t;let a=t;for(let o=0;o<i;o++){if(a+=e,a<0||a>=i){if(!this.wrapFocus)return t;a=(a+i)%i}if(this._isFocusable(a))return a}return t}constructor(...t){super(...t),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=t=>{t.stopPropagation();const e=t.detail.item;if(this.items.includes(e))return;const i=[...this.items,e];i.sort(l),this.items=i,this.updateListItems()},this._onItemUnregister=t=>{t.stopPropagation();const e=t.detail.item;this.items.includes(e)&&(this.items=this.items.filter(t=>t!==e),this.updateListItems())},this._onFocusIn=t=>{const e=t.composedPath();for(let i=0;i<this.items.length;i++)if(e.includes(this.items[i]))return void(i!==this._activeItemIndex&&(this._activeItemIndex=i,this._applyActive(!1)))},this._onForward=t=>{this._moveFocus(t,this._stepIndex(this._activeItemIndex,1))},this._onBack=t=>{this._moveFocus(t,this._stepIndex(this._activeItemIndex,-1))},this._onHome=t=>{this._moveFocus(t,this._firstFocusableIndex)},this._onEnd=t=>{this._moveFocus(t,this._lastFocusableIndex)},this._onActivate=t=>{if(!this._isFocusable(this._activeItemIndex))return;t.preventDefault();const e=this.items[this._activeItemIndex];e.activate(),(0,d.r)(this,"ha-list-activated",{index:this._activeItemIndex,item:e})}}}p.styles=(0,o.AH)(c||(c=u`: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,a.Cg)([(0,r.MZ)({type:Boolean,attribute:"wrap-focus"})],p.prototype,"wrapFocus",void 0),(0,a.Cg)([(0,r.MZ)({type:String,attribute:"aria-label",reflect:!0})],p.prototype,"ariaLabel",void 0),p=(0,a.Cg)([(0,r.EM)("ha-list-base")],p)},94355:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),o=i(88590),r=i(5124),n=i(67576),s=t([o]);o=(s.then?(await s)():s)[0];let l,d=t=>t;class h extends o.A{static get styles(){return[o.A.styles,(0,r.AH)(l||(l=d`: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(...t){super(...t),this.loading=!1}}(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],h.prototype,"loading",void 0),h=(0,a.Cg)([(0,n.EM)("ha-progress-bar")],h),e()}catch(l){e(l)}})},31420:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{Bi:function(){return D},Dt:function(){return X},EB:function(){return M},IW:function(){return I},P_:function(){return $},SG:function(){return A},Sx:function(){return N},T2:function(){return f},Xm:function(){return y},Ye:function(){return b},Zm:function(){return z},cq:function(){return W},dH:function(){return L},en:function(){return G},gF:function(){return w},gb:function(){return _},gv:function(){return E},jU:function(){return B},kI:function(){return T},mF:function(){return F},mu:function(){return S},oJ:function(){return Z},pI:function(){return C},pL:function(){return Y},q5:function(){return O},q7:function(){return H},qk:function(){return v},sp:function(){return R},uM:function(){return J},v3:function(){return P},xN:function(){return K},yL:function(){return x},yj:function(){return j},zZ:function(){return k}});i(74423),i(26910),i(54743),i(11745),i(16573),i(78100),i(77936),i(18111),i(22489),i(20116),i(7588),i(61701),i(3362),i(27495),i(25440),i(21489),i(48140),i(75044),i(21903),i(91134),i(28845),i(373),i(37467),i(44732),i(79577),i(16632),i(34226),i(9486),i(20456),i(62953),i(48408),i(14603),i(47566),i(98721);var o=i(22711),r=i(97732),n=i(6226),s=i(22786),l=i(80785),d=i(95747),h=i(30162),c=i(36918),u=i(30039),p=i(39889),g=i(95350),m=t([o,d,h]);[o,d,h]=m.then?(await m)():m;var v=function(t){return t.NEVER="never",t.DAILY="daily",t.CUSTOM_DAYS="custom_days",t}({});const f=["mon","tue","wed","thu","fri","sat","sun"],b=t=>t.sort((t,e)=>f.indexOf(t)-f.indexOf(e)),y=t=>t.callWS({type:"backup/config/info"}),_=(t,e)=>t.callWS(Object.assign({type:"backup/config/update"},e)),w=(t,e)=>{var i,a;return _(t,{create_backup:{agent_ids:e.create_backup.agent_ids,include_folders:null!==(i=e.create_backup.include_folders)&&void 0!==i?i:[],include_database:e.create_backup.include_database,include_addons:null!==(a=e.create_backup.include_addons)&&void 0!==a?a:[],include_all_addons:e.create_backup.include_all_addons,password:e.create_backup.password},retention:e.retention,schedule:e.schedule})},x=(t,e,i)=>`/api/backup/download/${t}?agent_id=${e}${i?`&password=${i}`:""}`,C=t=>t.callWS({type:"backup/info"}),k=(t,e)=>t.callWS({type:"backup/details",backup_id:e}),$=t=>t.callWS({type:"backup/agents/info"}),S=(t,e)=>t.callWS({type:"backup/delete",backup_id:e}),A=(t,e)=>t.callWS(Object.assign({type:"backup/generate"},e)),I=t=>t.callWS({type:"backup/generate_with_automatic_settings"}),L=(t,e)=>t.callWS(Object.assign({type:"backup/restore"},e)),T=async(t,e,i)=>{const a=new FormData;a.append("file",e);const o=new URLSearchParams;return i.forEach(t=>{o.append("agent_id",t)}),(0,p.QE)(t.fetchWithAuth(`/api/backup/upload?${o.toString()}`,{method:"POST",body:a}))},M=t=>{const e=t.find(D);if(e)return e;const i=t.find(B);return i||t[0]},z=(t,e,i,a)=>t.callWS({type:"backup/can_decrypt_on_download",backup_id:e,agent_id:i,password:a}),E="backup.local",F="hassio.local",Z="cloud.cloud",D=t=>[E,F].includes(t),B=t=>{const[e,i]=t.split(".");return"hassio"===e&&"local"!==i},H=(t,e,i)=>{if(D(e))return t("ui.panel.config.backup.agents.local_agent");const a=i.find(t=>t.agent_id===e),o=e.split(".")[0],r=a?a.name:e.split(".")[1];if(B(e))return r;const n=(0,g.p$)(t,o);return i.filter(t=>t.agent_id.split(".")[0]===o).length>1?`${n}: ${r}`:n},P=t=>Math.max(...Object.values(t.agents).map(t=>t.size)),q=["automatic","app_update","manual"],O=(0,o.z)(t=>t?q:q.filter(t=>"app_update"!==t)),R=(t,e)=>{var i,a;return t.with_automatic_settings?"automatic":!e||null==(null===(i=t.extra_metadata)||void 0===i?void 0:i["supervisor.addon_update"])&&null==(null===(a=t.extra_metadata)||void 0===a?void 0:a["supervisor.app_update"])?"manual":"app_update"},j=(t,e)=>{const i=D(t),a=D(e),o=B(t),r=B(e),n=(t,e)=>t?1:e?2:3,s=n(i,o),l=n(a,r);return s!==l?s-l:t.localeCompare(e)},W=()=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",e="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx";let i="";const a=new Uint8Array(34);return crypto.getRandomValues(a),a.forEach((a,o)=>{i+="-"===e[o]?"-":t[a%36]}),i},U=(t,e)=>"data:text/plain;charset=utf-8,"+encodeURIComponent(`${t.localize("ui.panel.config.backup.emergency_kit_file.title")}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.description")}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.date")} ${(0,d.r6)(new Date,t.locale,t.config)}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.instance")}\n${t.config.location_name}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.url")}\n${t.auth.data.hassUrl}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.encryption_key")}\n${e}\n\n${t.localize("ui.panel.config.backup.emergency_kit_file.more_info",{link:(0,c.o)(t,"/more-info/backup-emergency-kit")})}`),V=(t,e)=>`home_assistant_backup_emergency_kit_${e?`${e}_`:""}${(0,d.GH)(new Date,t.locale,t.config).replace(",","").replace(" ","_")}.txt`,N=(t,e,i)=>(0,u.R)(U(t,e),V(t,i)),J=(0,r.g)((0,n.a)(new Date,4),45),Y=(0,r.g)((0,n.a)(new Date,5),45),G=(0,s.A)((t,e,i)=>{if((0,l.A)(i))return(0,h.fU)(i,t,e);if("string"==typeof i&&i){const a=i.split(":"),o=(0,r.g)((0,n.a)(new Date,parseInt(a[0])),parseInt(a[1]));return(0,h.fU)(o,t,e)}return`${(0,h.fU)(J,t,e)} - ${(0,h.fU)(Y,t,e)}`}),K="application/x-tar",X={file:void 0};a()}catch(f){a(f)}})},16869:function(t,e,i){i.d(e,{B:function(){return r},g:function(){return o}});var a;i(74423),i(27495);const o=window.externalAppV2||window.externalApp||(null===(a=window.webkit)||void 0===a||null===(a=a.messageHandlers)||void 0===a?void 0:a.getExternalAuth)||location.search.includes("external_auth=1"),r=window.externalApp||window.externalAppV2},47351:function(t,e,i){i.d(e,{PS:function(){return a},Tv:function(){return n},VR:function(){return o},lE:function(){return s}});i(74423),i(3362),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);const a=t=>t.data,o=t=>"object"==typeof t?"object"==typeof t.body?t.body.message||"Unknown error, see supervisor logs":t.body||t.message||"Unknown error, see supervisor logs":t,r=new Set([502,503,504]),n=t=>!!(t&&t.status_code&&r.has(t.status_code))||!(!t||!t.message||!t.message.includes("ERR_CONNECTION_CLOSED")&&!t.message.includes("ERR_CONNECTION_RESET")),s=async(t,e)=>t({type:"supervisor/api",endpoint:`/${e}/stats`,method:"get"})},15336:function(t,e,i){i.d(e,{He:function(){return d},Ku:function(){return r},PB:function(){return n},Wq:function(){return u},hu:function(){return l},mZ:function(){return s},v9:function(){return h},xY:function(){return c}});i(3362);var a=i(62384),o=i(47351);const r=async t=>{if((0,a.v)(t.config.version,2021,2,4))return t.callWS({type:"supervisor/api",endpoint:"/host/info",method:"get"});const e=await t.callApi("GET","hassio/host/info");return(0,o.PS)(e)},n=async t=>(0,a.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/os/info",method:"get"}):(0,o.PS)(await t.callApi("GET","hassio/os/info")),s=async t=>(0,a.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/host/reboot",method:"post",timeout:null}):t.callApi("POST","hassio/host/reboot"),l=async t=>(0,a.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/host/shutdown",method:"post",timeout:null}):t.callApi("POST","hassio/host/shutdown"),d=async(t,e)=>(0,a.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/host/options",method:"post",data:e}):t.callApi("POST","hassio/host/options",e),h=async(t,e)=>(0,a.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/os/datadisk/move",method:"post",timeout:null,data:{device:e}}):t.callApi("POST","hassio/os/datadisk/move"),c=async t=>(0,a.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/os/datadisk/list",method:"get",timeout:null}):(0,o.PS)(await t.callApi("GET","/os/datadisk/list")),u=async t=>(0,a.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/host/disks/default/usage",method:"get",timeout:3600,params:{max_depth:3}}):(0,o.PS)(await t.callApi("GET","hassio/host/disks/default/usage"))},15903:function(t,e,i){i.a(t,async function(t,a){try{i.r(e);i(74423),i(3362),i(62953);var o=i(40445),r=i(5124),n=i(67576),s=i(36312),l=i(1087),d=(i(3109),i(14693)),h=i(38962),c=(i(11382),i(43661),i(65829)),u=(i(1671),i(50723),i(94355)),p=i(31420),g=i(47351),m=i(15336),v=i(14503),f=i(81619),b=i(65063),y=i(9835),_=t([d,h,c,u,p]);[d,h,c,u,p]=_.then?(await _)():_;let w,x,C,k,$,S,A,I,L=t=>t;const T="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",M="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",z="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",E="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",F="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 Z extends r.WF{async showDialog(){const t=(0,s.x)(this.hass.config,"hassio");this._open=!0,this._dialogOpen=!0,t&&!this._hostInfo&&this._loadHostInfo()}async _loadBackupState(){try{const{state:t}=await(0,p.pI)(this.hass);return t}catch(t){return"idle"}}async _loadHostInfo(){this._loadingHostInfo=!0;try{this._hostInfo=await(0,m.Ku)(this.hass)}catch(t){}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 t=!!this._hostInfo,e=this.hass.localize("ui.dialogs.restart.heading");return(0,r.qy)(w||(w=L` <ha-adaptive-dialog .open="${0}" header-title="${0}" allow-mode-change flexcontent @closed="${0}"> <div class="content"> <div class="action-loader"> ${0} </div> ${0} </div> </ha-adaptive-dialog> `),this._dialogOpen,e,this._dialogClosed,this._loadingBackupInfo?(0,r.qy)(x||(x=L`<ha-fade-in .delay="${0}"> <ha-progress-bar indeterminate></ha-progress-bar> </ha-fade-in>`),250):r.s6,this._loadingHostInfo?(0,r.qy)(C||(C=L` <div class="loader"> <ha-spinner></ha-spinner> </div> `)):(0,r.qy)(k||(k=L` <ha-list-base dialogInitialFocus> <ha-list-item-button @click="${0}" .disabled="${0}"> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <div slot="start" class="icon-background reload"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> <ha-list-item-button .action="${0}" @click="${0}" .disabled="${0}"> <div slot="start" class="icon-background restart"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> </ha-list-base> <ha-expansion-panel .header="${0}"> <ha-list-base> ${0} <ha-list-item-button .action="${0}" @click="${0}" .disabled="${0}"> <div slot="start" class="icon-background restart-safe-mode"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> </ha-list-base> </ha-expansion-panel> `),this._reload,this._loadingBackupInfo,this.hass.localize("ui.dialogs.restart.reload.title"),this.hass.localize("ui.dialogs.restart.reload.description"),T,"restart",this._handleAction,this._loadingBackupInfo,F,this.hass.localize("ui.dialogs.restart.restart.title"),this.hass.localize("ui.dialogs.restart.restart.description"),this.hass.localize("ui.dialogs.restart.advanced_options"),t?(0,r.qy)($||($=L` <ha-list-item-button .action="${0}" @click="${0}" .disabled="${0}"> <div slot="start" class="icon-background reboot"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> <ha-list-item-button .action="${0}" @click="${0}" .disabled="${0}"> <div slot="start" class="icon-background shutdown"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-list-item-button> `),"reboot",this._handleAction,this._loadingBackupInfo,E,this.hass.localize("ui.dialogs.restart.reboot.title"),this.hass.localize("ui.dialogs.restart.reboot.description"),"shutdown",this._handleAction,this._loadingBackupInfo,z,this.hass.localize("ui.dialogs.restart.shutdown.title"),this.hass.localize("ui.dialogs.restart.shutdown.description")):r.s6,"restart-safe-mode",this._handleAction,this._loadingBackupInfo,M,this.hass.localize("ui.dialogs.restart.restart-safe-mode.title"),this.hass.localize("ui.dialogs.restart.restart-safe-mode.description")))}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(t){switch(t){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(t){if(this._loadingBackupInfo)return;this._loadingBackupInfo=!0;const e=t.currentTarget.action,i=await this._loadBackupState(),a=this._getBackupProgressMessage(i);this._loadingBackupInfo=!1;if(!(await(0,b.dk)(this,{title:this.hass.localize(`ui.dialogs.restart.${e}.confirm_title`),text:(0,r.qy)(S||(S=L`${0}${0}`),this.hass.localize(`ui.dialogs.restart.${e}.confirm_description`),a?(0,r.qy)(A||(A=L`<br><br><ha-alert>${0}</ha-alert>`),a):r.s6),confirmText:this.hass.localize(`ui.dialogs.restart.${e}.confirm_action${"idle"===i?"":"_backup"}`),destructive:!0})))return;let o;if(this._dialogOpen=!1,["restart","restart-safe-mode"].includes(e)){const t="restart-safe-mode"===e?{safe_mode:!0}:void 0;o=this._restartAction("homeassistant","restart",this.hass.localize(`ui.dialogs.restart.${e}.failed`),t)}else o=this._hostAction(this.hass.localize(`ui.dialogs.restart.${e}.action_toast`),e);"idle"===i?o():(0,y.eb)(this,{title:this.hass.localize(`ui.dialogs.restart.${e}.title`),initialBackupState:i,action:o})}static get styles(){return[v.RF,v.nA,(0,r.AH)(I||(I=L`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(...t){super(...t),this._open=!1,this._loadingHostInfo=!1,this._loadingBackupInfo=!1,this._dialogOpen=!1,this._restartAction=(t,e,i,a)=>async()=>{try{await this.hass.callService(t,e,a)}catch(o){(0,b.showAlertDialog)(this,{title:i,text:o.message})}},this._hostAction=(t,e)=>async()=>{(0,f.P)(this,{message:t,duration:-1});try{"reboot"===e?await(0,m.mZ)(this.hass):await(0,m.hu)(this.hass)}catch(i){this.hass.connection.connected&&!(0,g.Tv)(i)&&(0,b.showAlertDialog)(this,{title:this.hass.localize(`ui.dialogs.restart.${e}.failed`),text:(0,g.VR)(i)})}}}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],Z.prototype,"hass",void 0),(0,o.Cg)([(0,n.wk)()],Z.prototype,"_open",void 0),(0,o.Cg)([(0,n.wk)()],Z.prototype,"_loadingHostInfo",void 0),(0,o.Cg)([(0,n.wk)()],Z.prototype,"_loadingBackupInfo",void 0),(0,o.Cg)([(0,n.wk)()],Z.prototype,"_hostInfo",void 0),(0,o.Cg)([(0,n.wk)()],Z.prototype,"_dialogOpen",void 0),Z=(0,o.Cg)([(0,n.EM)("dialog-restart")],Z),a()}catch(w){a(w)}})},59992:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{V:function(){return g}});i(62953);var o=i(40445),r=i(88696),n=i(5124),s=i(6412),l=i(67576),d=t([r]);r=(d.then?(await d)():d)[0];let h,c,u=t=>t;const p=t=>void 0===t?[]:Array.isArray(t)?t:[t],g=t=>{class e extends t{get scrollableElement(){return e.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(t){var e;null===(e=super.firstUpdated)||void 0===e||e.call(this,t),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(t){var e;null===(e=super.updated)||void 0===e||e.call(this,t),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(t=!1){return(0,n.qy)(h||(h=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,s.H)({"fade-top":!0,rounded:t,visible:this._contentScrolled}),(0,s.H)({"fade-bottom":!0,rounded:t,visible:this._contentScrollable}))}static get styles(){var t;const e=Object.getPrototypeOf(this);return[...p(null!==(t=null==e?void 0:e.styles)&&void 0!==t?t:[]),(0,n.AH)(c||(c=u`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const t=this.scrollableElement;t!==this._scrollTarget&&(this._detachScrollableElement(),t&&(this._scrollTarget=t,t.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(t),this._updateScrollableState(t)))}_detachScrollableElement(){var t,e;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(t=(e=this._resize).unobserve)||void 0===t||t.call(e,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(t){const e=parseFloat(getComputedStyle(t).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:i=0,clientHeight:a=0,scrollTop:o=0}=t;this._contentScrollable=i-a>o+e+this.scrollFadeSafeAreaPadding}constructor(...t){super(...t),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=t=>{var e;const i=t.currentTarget;this._contentScrolled=(null!==(e=i.scrollTop)&&void 0!==e?e:0)>this.scrollFadeThreshold,this._updateScrollableState(i)},this._resize=new r.P(this,{target:null,callback:t=>{var e;const i=null===(e=t[0])||void 0===e?void 0:e.target;i&&this._updateScrollableState(i)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return e.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,l.wk)()],e.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,l.wk)()],e.prototype,"_contentScrollable",void 0),e};a()}catch(h){a(h)}})},69235:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await i.e(71055).then(i.bind(i,52370))).default),e()}catch(a){e(a)}},1)},36918:function(t,e,i){i.d(e,{o:function(){return a}});const a=(t,e)=>`https://www.iobroker.net/#${t.language&&t.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},30039:function(t,e,i){i.d(e,{R:function(){return o}});i(62953),i(3296),i(27208),i(48408),i(14603),i(47566),i(98721);var a=i(16869);const o=(t,e="")=>{const i=document.createElement("a");i.target="_blank",i.href=t,i.download=e,i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click")),document.body.removeChild(i),t.startsWith("blob:")&&(a.B?setTimeout(()=>URL.revokeObjectURL(t),1e4):URL.revokeObjectURL(t))}},22348:function(t,e,i){i.d(e,{V:function(){return o}});var a=i(37177);const o=t=>!!t&&a.n},37177:function(t,e,i){i.d(e,{n:function(){return a}});i(27495);const a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);