UNPKG

iobroker.lovelace

Version:

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

39 lines 25.7 kB
export const __rspack_esm_id=14222;export const __rspack_esm_ids=[14222];export const __webpack_modules__={63708(t,e,o){o.d(e,{fW:()=>r});o(18111),o(13579);var a=o(44537),i=o(36312);const r=(t,e)=>(l(e)||n(t,e))&&s(t,e),n=(t,e)=>!e.component||(0,a.e)(e.component).some(e=>(0,i.x)(t.config,e)),s=(t,e)=>!e.not_component||!(0,a.e)(e.not_component).some(e=>(0,i.x)(t.config,e)),l=t=>t.core},72487(t,e,o){o.a(t,async function(t,a){try{o.d(e,{CA:()=>z,Mi:()=>Z,Pm:()=>k,Wq:()=>b,Yq:()=>h,bl:()=>H,c2:()=>x,fr:()=>f,gu:()=>M,kz:()=>c,m9:()=>j,sl:()=>u,ur:()=>D,zB:()=>m});o(18111),o(20116);var i=o(74487),r=o(22786),n=o(46927),s=o(8480),l=t([i,s]);[i,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 h=(t,e,o)=>d(e,o.time_zone).format(t),d=(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,o)=>p(e,o.time_zone).format(t),p=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),m=(t,e,o)=>{const a=g(e,o.time_zone);if(e.date_format===n.ow.language||e.date_format===n.ow.system)return a.format(t);const i=a.formatToParts(t),r=i.find(t=>"literal"===t.type)?.value,s=i.find(t=>"day"===t.type)?.value,l=i.find(t=>"month"===t.type)?.value,h=i.find(t=>"year"===t.type)?.value,d=i[i.length-1];let c="literal"===d?.type?d?.value:"";"bg"===e.language&&e.date_format===n.ow.YMD&&(c="");return{[n.ow.DMY]:`${s}${r}${l}${r}${h}${c}`,[n.ow.MDY]:`${l}${r}${s}${r}${h}${c}`,[n.ow.YMD]:`${h}${r}${l}${r}${s}${c}`}[e.date_format]},g=(0,r.A)((t,e)=>{const o=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(o,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})}),u=(t,e,o)=>v(e,o.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,o)=>y(e,o.time_zone).format(t),y=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),b=(t,e,o)=>w(e,o.time_zone).format(t),w=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,s.wj)(t.time_zone,e)})),x=(t,e,o)=>_(e,o.time_zone).format(t),_=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),k=(t,e,o)=>C(e,o.time_zone).format(t),C=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),z=(t,e,o)=>T(e,o.time_zone).format(t),T=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,s.wj)(t.time_zone,e)})),M=(t,e,o)=>$(e,o.time_zone).format(t),$=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,s.wj)(t.time_zone,e)})),Z=(t,e,o)=>A(e,o.time_zone).format(t),A=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),D=(t,e,o)=>S(e,o.time_zone).format(t),S=(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)})),H=(t,e,o)=>{const a=(0,s.wj)(e.time_zone,o.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:a}).format(t)},j=(t,e,o,a)=>`${H(t,o,a)}/${H(e,o,a)}`;a()}catch(t){a(t)}})},30162(t,e,o){o.a(t,async function(t,a){try{o.d(e,{LW:()=>u,Xs:()=>m,fU:()=>h,ie:()=>c});var i=o(74487),r=o(22786),n=o(8480),s=o(69543),l=t([i,n]);[i,n]=l.then?(await l)():l;const h=(t,e,o)=>d(e,o.time_zone).format(t),d=(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,o)=>p(e,o.time_zone).format(t),p=(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)})),m=(t,e,o)=>g(e,o.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)})),u=(t,e,o)=>v(e,o.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(t){a(t)}})},8480(t,e,o){o.a(t,async function(t,a){try{o.d(e,{fL:()=>d,n2:()=>c,wj:()=>p});var i=o(74487),r=o(29079),n=o(46927),s=t([i]);i=(s.then?(await s)():s)[0];const l=Intl.DateTimeFormat?.().resolvedOptions?.().timeZone,h=l&&("UTC"===l||"Etc/UTC"===l||l in r)?l:void 0,d=14881==o.j?void 0!==h:null,c=h??"UTC",p=(t,e)=>t===n.Wj.local&&h?c:e;a()}catch(t){a(t)}})},69543(t,e,o){o.d(e,{J:()=>r});o(74423);var a=o(22786),i=o(46927);const r=(0,a.A)(t=>{if(t.time_format===i.Hg.language||t.time_format===i.Hg.system){const e=t.time_format===i.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===i.Hg.am_pm})},26218(t,e,o){o.d(e,{a:()=>i});const a=(0,o(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function i(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const i=e.connectedCallback;e.connectedCallback=function(){i.call(this);const e=this[o];e&&this.updateComplete.then(()=>{const o=this.renderRoot.querySelector(t);o&&setTimeout(()=>{o.scrollTop=e},0)})};const r=Object.getOwnPropertyDescriptor(e,o);let n;if(void 0===r)n={get(){return this[`__${String(o)}`]||history.state?.scrollPosition},set(t){a(t),this[`__${String(o)}`]=t},configurable:!0,enumerable:!0};else{const t=r.set;n={...r,set(e){a(e),this[`__${String(o)}`]=e,t?.call(this,e)}}}Object.defineProperty(e,o,n)}}},67258(t,e,o){o.d(e,{d:()=>a});const a=t=>{switch(t.language){case"cs":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}}},77796(t,e,o){o.d(e,{n:()=>a});const a=(t,e,o=!0,a=!0)=>{let i,r=0;const n=(...n)=>{const s=()=>{r=!1===o?0:Date.now(),i=void 0,t(...n)},l=Date.now();r||!1!==o||(r=l);const h=e-(l-r);h<=0||h>e?(i&&(clearTimeout(i),i=void 0),r=l,t(...n)):i||!1===a||(i=window.setTimeout(s,h))};return n.cancel=()=>{clearTimeout(i),i=void 0,r=0},n}},76776(t,e,o){var a=o(62826),i=o(5124),r=o(22441);class n extends i.WF{render(){return i.qy` ${this.header?i.qy`<h1 class="card-header">${this.header}</h1>`:i.s6} <slot></slot> `}constructor(...t){super(...t),this.raised=!1}}n.styles=i.AH`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)} :host ::slotted( .card-content:not(:nth-child(1 of .card-content, .card-header)) ), slot:not(:first-child)::slotted(.card-content) { padding-top: 0; margin-top: calc(var(--ha-space-2) * -1); } :host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`,(0,a.Cg)([(0,r.MZ)()],n.prototype,"header",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],n.prototype,"raised",void 0),n=(0,a.Cg)([(0,r.EM)("ha-card")],n)},90248(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaIconButtonArrowPrev:()=>p});var i=o(62826),r=o(5124),n=o(22441),s=o(63091),l=o(26300),h=t([l]);l=(h.then?(await h)():h)[0];const d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",c="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class p extends r.WF{render(){return r.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"></ha-icon-button> `}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?c:d}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"download",void 0),(0,i.Cg)([(0,n.wk)()],p.prototype,"_icon",void 0),p=(0,i.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],p),a()}catch(t){a(t)}})},26300(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaIconButton:()=>d});var i=o(62826),r=o(5124),n=o(22441),s=o(63672),l=o(18350),h=(o(67094),t([l]));l=(h.then?(await h)():h)[0];class d extends r.WF{render(){return r.qy` <ha-button appearance="plain" variant="neutral" aria-label="${(0,s.J)(this.label)}" title="${(0,s.J)(this.hideTitle?void 0:this.label)}" aria-haspopup="${(0,s.J)(this.ariaHasPopup)}" .disabled="${this.disabled}" .iconTag="${this.path?"ha-svg-icon":"span"}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"> ${this.path?r.qy`<ha-svg-icon aria-hidden="true" .path="${this.path}"></ha-svg-icon>`:r.qy`<span><slot></slot></span>`} </ha-button> `}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}d.shadowRootOptions={mode:"open",delegatesFocus:!0},d.styles=r.AH`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var( --ha-icon-button-padding-inline, --ha-space-2 );--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`,(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],d.prototype,"path",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],d.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],d.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],d.prototype,"hideTitle",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],d.prototype,"selected",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"download",void 0),d=(0,i.Cg)([(0,n.EM)("ha-icon-button")],d),a()}catch(t){a(t)}})},43661(t,e,o){o.r(e),o.d(e,{HaIconNext:()=>s});var a=o(62826),i=o(22441),r=o(63091),n=o(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,i.MZ)()],s.prototype,"path",void 0),s=(0,a.Cg)([(0,i.EM)("ha-icon-next")],s)},2054(t,e,o){o.a(t,async function(t,e){try{var a=o(62826),i=o(5124),r=o(22441),n=o(1087),s=o(44249),l=o(26300),h=t([l]);l=(h.then?(await h)():h)[0];const d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class c extends i.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return i.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return i.qy` <ha-icon-button .label="${this.hass.localize("ui.sidebar.sidebar_toggle")}" .path="${d}" @click="${this._toggleMenu}"></ha-icon-button> ${t?i.qy`<div class="dot"></div>`:""} `}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,o=t.has("narrow")?t.get("narrow"):this.narrow,a=!1===e?.kioskMode&&(o||"always_hidden"===e?.dockedSidebar),i=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&a===i||(this._show=i||this._alwaysVisible,i?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,s.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,n.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}c.styles=i.AH`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`,(0,a.Cg)([(0,r.MZ)({type:Boolean})],c.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],c.prototype,"hass",void 0),(0,a.Cg)([(0,r.wk)()],c.prototype,"_hasNotifications",void 0),(0,a.Cg)([(0,r.wk)()],c.prototype,"_show",void 0),c=(0,a.Cg)([(0,r.EM)("ha-menu-button")],c),e()}catch(t){e(t)}})},54276(t,e,o){var a=o(62826),i=o(76482),r=o(91382),n=o(96245),s=o(5124),l=o(22441);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){t?.removeEventListener("touchend",this._handleTouchEnd),e?.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new i.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}h.styles=[n.R,s.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)) )}`],h=(0,a.Cg)([(0,l.EM)("ha-ripple")],h)},67094(t,e,o){o.r(e),o.d(e,{HaSvgIcon:()=>n});var a=o(62826),i=o(5124),r=o(22441);class n extends i.WF{render(){return i.JW` <svg viewBox="${this.viewBox||"0 0 24 24"}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${this.path?i.JW`<path class="primary-path" d="${this.path}"></path>`:i.s6} ${this.secondaryPath?i.JW`<path class="secondary-path" d="${this.secondaryPath}"></path>`:i.s6} </g> </svg>`}}n.styles=i.AH`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`,(0,a.Cg)([(0,r.MZ)()],n.prototype,"path",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"secondaryPath",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"viewBox",void 0),n=(0,a.Cg)([(0,r.EM)("ha-svg-icon")],n)},31462(t,e,o){o.d(e,{S:()=>a});const a={"odroid-n2":"ioBroker Blue / ODROID-N2","odroid-xu4":"ODROID-XU4","odroid-c2":"ODROID-C2","odroid-c4":"ODROID-C4",rpi:"Raspberry Pi",rpi0:"Raspberry Pi Zero","rpi0-w":"Raspberry Pi Zero W",rpi2:"Raspberry Pi 2",rpi3:"Raspberry Pi 3 (32-bit)","rpi3-64":"Raspberry Pi 3",rpi4:"Raspberry Pi 4 (32-bit)","rpi4-64":"Raspberry Pi 4",tinker:"ASUS Tinker Board","khadas-vim3":"Khadas VIM3","generic-aarch64":"Generic AArch64",ova:"Virtual Machine","generic-x86-64":"Generic x86-64","intel-nuc":"Intel NUC",yellow:"ioBroker Yellow"}},47351(t,e,o){o.d(e,{PS:()=>a,Tv:()=>n,VR:()=>i,lE:()=>s});o(74423),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698);const a=t=>t.data,i=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(t,e,o){o.d(e,{He:()=>h,Ku:()=>r,PB:()=>n,Wq:()=>p,hu:()=>l,mZ:()=>s,v9:()=>d,xY:()=>c});var a=o(62384),i=o(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,i.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,i.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"),h=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),d=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,i.PS)(await t.callApi("GET","/os/datadisk/list")),p=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,i.PS)(await t.callApi("GET","hassio/host/disks/default/usage"))},44249(t,e,o){o.d(e,{V:()=>a});const a=(t,e)=>{const o=new i,a=t.subscribeMessage(t=>e(o.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{a.then(t=>t?.())}};class i{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications={...this.notifications,...t.notifications};return Object.values(this.notifications)}constructor(){this.notifications={}}}},9835(t,e,o){o.d(e,{eb:()=>s,lD:()=>n});var a=o(1087);const i=()=>Promise.all([o.e(4801),o.e(32450),o.e(46095),o.e(79996),o.e(80617),o.e(99128)]).then(o.bind(o,15903)),r=()=>o.e(78590).then(o.bind(o,25069)),n=t=>{(0,a.r)(t,"show-dialog",{dialogTag:"dialog-restart",dialogImport:i,dialogParams:{}})},s=(t,e)=>{(0,a.r)(t,"show-dialog",{dialogTag:"dialog-restart-wait",dialogImport:r,dialogParams:e})}},14503(t,e,o){o.d(e,{RF:()=>r,dp:()=>l,kO:()=>s,nA:()=>n,og:()=>i});var a=o(5124);const i=a.AH`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`,r=a.AH`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}@media (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${i} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`,n=a.AH`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`,s=a.AH`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc( 100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var( --safe-area-inset-y, 0px ) );--mdc-dialog-max-height:calc( 100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var( --safe-area-inset-y, 0px ) );--ha-dialog-max-height:calc( 100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var( --safe-area-inset-y, 0px ) );--ha-dialog-max-height:calc( 100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var( --safe-area-inset-y, 0px ) )}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`,l=a.AH`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`;a.AH`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`}};