UNPKG

iobroker.lovelace

Version:

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

12 lines 96.2 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["16930"],{31146:function(e,t,i){i.d(t,{i:()=>n});const a=(0,i(93826).P)((e=>{history.replaceState({scrollPosition:e},"")}),300),n=e=>t=>({kind:"method",placement:"prototype",key:t.key,descriptor:{set(e){a(e),this[`__${String(t.key)}`]=e},get(){var e;return this[`__${String(t.key)}`]||(null===(e=history.state)||void 0===e?void 0:e.scrollPosition)},enumerable:!0,configurable:!0},finisher(i){const a=i.prototype.connectedCallback;i.prototype.connectedCallback=function(){a.call(this);const i=this[t.key];i&&this.updateComplete.then((()=>{const t=this.renderRoot.querySelector(e);t&&setTimeout((()=>{t.scrollTop=i}),0)}))}}})},87865:function(e,t,i){i.d(t,{v:()=>a});i(40251);const a=async(e,t)=>{if(navigator.clipboard)try{return void(await navigator.clipboard.writeText(e))}catch(n){}const i=null!=t?t:document.body,a=document.createElement("textarea");a.value=e,i.appendChild(a),a.select(),document.execCommand("copy"),i.removeChild(a)}},93826:function(e,t,i){i.d(t,{P:()=>a});i(71695),i(47021);const a=(e,t,i=!0,a=!0)=>{let n,o=0;const r=(...r)=>{const s=()=>{o=!1===i?0:Date.now(),n=void 0,e(...r)},d=Date.now();o||!1!==i||(o=d);const l=t-(d-o);l<=0||l>t?(n&&(clearTimeout(n),n=void 0),o=d,e(...r)):n||!1===a||(n=window.setTimeout(s,l))};return r.cancel=()=>{clearTimeout(n),n=void 0,o=0},r}},99426:function(e,t,i){i.r(t);var a=i(61701),n=(i(71695),i(47021),i(57243)),o=i(50778),r=i(35359),s=i(36522);i(23334),i(37583);let d,l,c,h,u=e=>e;const p={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"};(0,a.Z)([(0,o.Mo)("ha-alert")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"title",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({attribute:"alert-type"})],key:"alertType",value(){return"info"}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"dismissable",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,n.dy)(d||(d=u` <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,r.$)({[this.alertType]:!0}),this.title?"":"no-title",p[this.alertType],(0,r.$)({content:!0,narrow:this.narrow}),this.title?(0,n.dy)(l||(l=u`<div class="title">${0}</div>`),this.title):n.Ld,this.dismissable?(0,n.dy)(c||(c=u`<ha-icon-button @click="${0}" label="Dismiss alert" .path="${0}"></ha-icon-button>`),this._dismissClicked,"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"):n.Ld)}},{kind:"method",key:"_dismissClicked",value:function(){(0,s.B)(this,"alert-dismissed-clicked")}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(h||(h=u`.issue-type{position:relative;padding:8px;display:flex}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:4px}.icon{z-index:1}.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;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:0}.title{margin-top:2px;font-weight:700}.action ha-icon-button,.action mwc-button{--mdc-theme-primary:var(--primary-text-color);--mdc-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}`))}}]}}),n.oi)},34273:function(e,t,i){var a=i(61701),n=i(72621),o=(i(71695),i(9359),i(31526),i(47021),i(22997),i(57243)),r=i(50778),s=i(5111),d=i(76525);let l,c,h=e=>e;(0,a.Z)([(0,r.Mo)("ha-button-menu")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",key:d.gA,value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"corner",value(){return"BOTTOM_START"}},{kind:"field",decorators:[(0,r.Cb)({attribute:"menu-corner"})],key:"menuCorner",value(){return"START"}},{kind:"field",decorators:[(0,r.Cb)({type:Number})],key:"x",value(){return null}},{kind:"field",decorators:[(0,r.Cb)({type:Number})],key:"y",value(){return null}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"multi",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"activatable",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"fixed",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"no-anchor"})],key:"noAnchor",value(){return!1}},{kind:"field",decorators:[(0,r.IO)("mwc-menu",!0)],key:"_menu",value:void 0},{kind:"get",key:"items",value:function(){var e;return null===(e=this._menu)||void 0===e?void 0:e.items}},{kind:"get",key:"selected",value:function(){var e;return null===(e=this._menu)||void 0===e?void 0:e.selected}},{kind:"method",key:"focus",value:function(){var e,t;null!==(e=this._menu)&&void 0!==e&&e.open?this._menu.focusItemAtIndex(0):null===(t=this._triggerButton)||void 0===t||t.focus()}},{kind:"method",key:"render",value:function(){return(0,o.dy)(l||(l=h` <div @click="${0}"> <slot name="trigger" @slotchange="${0}"></slot> </div> <mwc-menu .corner="${0}" .menuCorner="${0}" .fixed="${0}" .multi="${0}" .activatable="${0}" .y="${0}" .x="${0}"> <slot></slot> </mwc-menu> `),this._handleClick,this._setTriggerAria,this.corner,this.menuCorner,this.fixed,this.multi,this.activatable,this.y,this.x)}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(i,"firstUpdated",this,3)([e]),"rtl"===s.E.document.dir&&this.updateComplete.then((()=>{this.querySelectorAll("mwc-list-item").forEach((e=>{const t=document.createElement("style");t.innerHTML="span.material-icons:first-of-type { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}",e.shadowRoot.appendChild(t)}))}))}},{kind:"method",key:"_handleClick",value:function(){this.disabled||(this._menu.anchor=this.noAnchor?null:this,this._menu.show())}},{kind:"get",key:"_triggerButton",value:function(){return this.querySelector('ha-icon-button[slot="trigger"], mwc-button[slot="trigger"]')}},{kind:"method",key:"_setTriggerAria",value:function(){this._triggerButton&&(this._triggerButton.ariaHasPopup="menu")}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(c||(c=h`:host{display:inline-block;position:relative}::slotted([disabled]){color:var(--disabled-text-color)}`))}}]}}),o.oi)},59826:function(e,t,i){var a=i(61701),n=(i(71695),i(47021),i(31622)),o=i(57243),r=i(50778),s=i(22344);let d,l=e=>e;(0,a.Z)([(0,r.Mo)("ha-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value(){return[s.W,(0,o.iv)(d||(d=l`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}:host([destructive]){--mdc-theme-primary:var(--error-color)}`))]}}]}}),n.Button)},54977:function(e,t,i){var a=i(61701),n=(i(71695),i(47021),i(57243)),o=i(50778);let r,s,d,l=e=>e;(0,a.Z)([(0,o.Mo)("ha-card")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"raised",value(){return!1}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(r||(r=l`: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,12px);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, 24px);letter-spacing:-.012em;line-height:48px;padding:12px 16px 16px;display:block;margin-block-start:0px;margin-block-end:0px;font-weight:400}:host ::slotted(.card-content:not(:first-child)),slot:not(:first-child)::slotted(.card-content){padding-top:0px;margin-top:-8px}:host ::slotted(.card-content){padding:16px}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:5px 16px}`))}},{kind:"method",key:"render",value:function(){return(0,n.dy)(s||(s=l` ${0} <slot></slot> `),this.header?(0,n.dy)(d||(d=l`<h1 class="card-header">${0}</h1>`),this.header):n.Ld)}}]}}),n.oi)},83456:function(e,t,i){var a=i(61701),n=(i(71695),i(47021),i(92444)),o=i(76688),r=i(57243),s=i(50778);let d,l=e=>e;(0,a.Z)([(0,s.Mo)("ha-checkbox")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value(){return[o.W,(0,r.iv)(d||(d=l`:host{--mdc-theme-secondary:var(--primary-color)}`))]}}]}}),n.A)},41307:function(e,t,i){var a=i(61701),n=i(72621),o=(i(71695),i(40251),i(47021),i(57243)),r=i(50778),s=i(35359),d=i(36522),l=i(76320);i(37583);let c,h,u,p,f=e=>e;(0,a.Z)([(0,r.Mo)("ha-expansion-panel")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"expanded",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"outlined",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:"left-chevron",type:Boolean,reflect:!0})],key:"leftChevron",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:"no-collapse",type:Boolean,reflect:!0})],key:"noCollapse",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"secondary",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_showContent",value(){return this.expanded}},{kind:"field",decorators:[(0,r.IO)(".container")],key:"_container",value:void 0},{kind:"method",key:"render",value:function(){const e=this.noCollapse?o.Ld:(0,o.dy)(c||(c=f` <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,s.$)({expanded:this.expanded}));return(0,o.dy)(h||(h=f` <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"> ${0} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${0} <slot class="secondary" name="secondary">${0}</slot> </div> </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,s.$)({expanded:this.expanded}),(0,s.$)({noCollapse:this.noCollapse}),this._toggleContainer,this._toggleContainer,this._focusChanged,this._focusChanged,this.noCollapse?-1:0,this.expanded,this.leftChevron?e:o.Ld,this.header,this.secondary,this.leftChevron?o.Ld:e,(0,s.$)({expanded:this.expanded}),this._handleTransitionEnd,!this.expanded,this._showContent?(0,o.dy)(u||(u=f`<slot></slot>`)):"")}},{kind:"method",key:"willUpdate",value:function(e){(0,n.Z)(i,"willUpdate",this,3)([e]),e.has("expanded")&&(this._showContent=this.expanded,setTimeout((()=>{this._container.style.overflow=this.expanded?"initial":"hidden"}),300))}},{kind:"method",key:"_handleTransitionEnd",value:function(){this._container.style.removeProperty("height"),this._container.style.overflow=this.expanded?"initial":"hidden",this._showContent=this.expanded}},{kind:"method",key:"_toggleContainer",value:async function(e){if(e.defaultPrevented)return;if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;if(e.preventDefault(),this.noCollapse)return;const t=!this.expanded;(0,d.B)(this,"expanded-will-change",{expanded:t}),this._container.style.overflow="hidden",t&&(this._showContent=!0,await(0,l.y)());const i=this._container.scrollHeight;this._container.style.height=`${i}px`,t||setTimeout((()=>{this._container.style.height="0px"}),0),this.expanded=t,(0,d.B)(this,"expanded-changed",{expanded:this.expanded})}},{kind:"method",key:"_focusChanged",value:function(e){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===e.type)}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(p||(p=f`:host{display:block}.top{display:flex;align-items:center;border-radius:var(--ha-card-border-radius,12px)}.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,12px)}.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}::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:500;outline:0}#summary.noCollapse{cursor:default}.summary-icon.expanded{transform:rotate(180deg)}.header,::slotted([slot=header]){flex:1}.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:12px}`))}}]}}),o.oi)},55486:function(e,t,i){var a=i(61701),n=(i(71695),i(47021),i(4918)),o=i(6394),r=i(57243),s=i(50778),d=i(35359),l=i(36522);let c,h,u=e=>e;(0,a.Z)([(0,s.Mo)("ha-formfield")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"method",key:"render",value:function(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return(0,r.dy)(c||(c=u` <div class="mdc-form-field ${0}"> <slot></slot> <label class="mdc-label" @click="${0}"> <slot name="label">${0}</slot> </label> </div>`),(0,d.$)(e),this._labelClick,this.label)}},{kind:"method",key:"_labelClick",value:function(){const e=this.input;if(e&&(e.focus(),!e.disabled))switch(e.tagName){case"HA-CHECKBOX":e.checked=!e.checked,(0,l.B)(e,"change");break;case"HA-RADIO":e.checked=!0,(0,l.B)(e,"change");break;default:e.click()}}},{kind:"field",static:!0,key:"styles",value(){return[o.W,(0,r.iv)(h||(h=u`:host(:not([alignEnd])) ::slotted(ha-switch){margin-right:10px;margin-inline-end:10px;margin-inline-start:inline}.mdc-form-field{align-items:var(--ha-formfield-align-items,center);gap:4px}.mdc-form-field>label{direction:var(--direction);margin-inline-start:0;margin-inline-end:auto;padding:0}:host([disabled]) label{color:var(--disabled-text-color)}`))]}}]}}),n.a)},54202:function(e,t,i){i.r(t),i.d(t,{HaIconButtonArrowPrev:()=>l});var a=i(61701),n=(i(71695),i(47021),i(57243)),o=i(50778),r=i(5111);i(23334);let s,d=e=>e;let l=(0,a.Z)([(0,o.Mo)("ha-icon-button-arrow-prev")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_icon",value(){return"rtl"===r.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}},{kind:"method",key:"render",value:function(){var e;return(0,n.dy)(s||(s=d` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.back"))||"Back",this._icon)}}]}}),n.oi)},23334:function(e,t,i){i.r(t),i.d(t,{HaIconButton:()=>u});var a=i(61701),n=(i(71695),i(47021),i(74269),i(57243)),o=i(50778),r=i(20552);i(37583);let s,d,l,c,h=e=>e,u=(0,a.Z)([(0,o.Mo)("ha-icon-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"path",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"label",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:String,attribute:"aria-haspopup"})],key:"ariaHasPopup",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:"hide-title",type:Boolean})],key:"hideTitle",value(){return!1}},{kind:"field",decorators:[(0,o.IO)("mwc-icon-button",!0)],key:"_button",value:void 0},{kind:"method",key:"focus",value:function(){var e;null===(e=this._button)||void 0===e||e.focus()}},{kind:"field",static:!0,key:"shadowRootOptions",value(){return{mode:"open",delegatesFocus:!0}}},{kind:"method",key:"render",value:function(){return(0,n.dy)(s||(s=h` <mwc-icon-button aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}"> ${0} </mwc-icon-button> `),(0,r.o)(this.label),(0,r.o)(this.hideTitle?void 0:this.label),(0,r.o)(this.ariaHasPopup),this.disabled,this.path?(0,n.dy)(d||(d=h`<ha-svg-icon .path="${0}"></ha-svg-icon>`),this.path):(0,n.dy)(l||(l=h`<slot></slot>`)))}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(c||(c=h`:host{display:inline-block;outline:0}:host([disabled]){pointer-events:none}mwc-icon-button{--mdc-theme-on-primary:currentColor;--mdc-theme-text-disabled-on-light:var(--disabled-text-color)}`))}}]}}),n.oi)},7285:function(e,t,i){i.d(t,{M:()=>p});var a=i(61701),n=i(72621),o=(i(71695),i(47021),i(65703)),r=i(46289),s=i(57243),d=i(50778);let l,c,h,u=e=>e,p=(0,a.Z)([(0,d.Mo)("ha-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"renderRipple",value:function(){return this.noninteractive?"":(0,n.Z)(i,"renderRipple",this,3)([])}},{kind:"get",static:!0,key:"styles",value:function(){return[r.W,(0,s.iv)(l||(l=u`:host{padding-left:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-inline-start:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-right:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px));padding-inline-end:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px))}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:48px}span.material-icons:first-of-type{margin-inline-start:0px!important;margin-inline-end:var(--mdc-list-item-graphic-margin,16px)!important;direction:var(--direction)!important}span.material-icons:last-of-type{margin-inline-start:auto!important;margin-inline-end:0px!important;direction:var(--direction)!important}.mdc-deprecated-list-item__meta{display:var(--mdc-list-item-meta-display);align-items:center;flex-shrink:0}:host([graphic=icon]:not([twoline])) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,20px)!important}:host([multiline-secondary]){height:auto}:host([multiline-secondary]) .mdc-deprecated-list-item__text{padding:8px 0}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text{text-overflow:initial;white-space:normal;overflow:auto;display:inline-block;margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text{margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text::before{display:none}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text::before{display:none}:host([disabled]){color:var(--disabled-text-color)}:host([noninteractive]){pointer-events:unset}`)),"rtl"===document.dir?(0,s.iv)(c||(c=u`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`)):(0,s.iv)(h||(h=u``))]}}]}}),o.K)},43344:function(e,t,i){var a=i(61701),n=i(72621),o=(i(52247),i(71695),i(47021),i(57243)),r=i(50778),s=i(36522),d=i(83716);i(23334);let l,c,h,u=e=>e;(0,a.Z)([(0,r.Mo)("ha-menu-button")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"hassio",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_hasNotifications",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_show",value(){return!1}},{kind:"field",key:"_alwaysVisible",value(){return!1}},{kind:"field",key:"_attachNotifOnConnect",value(){return!1}},{kind:"field",key:"_unsubNotifications",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,n.Z)(i,"connectedCallback",this,3)([]),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,n.Z)(i,"disconnectedCallback",this,3)([]),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}},{kind:"method",key:"render",value:function(){if(!this._show)return o.Ld;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,o.dy)(l||(l=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",this._toggleMenu,e?(0,o.dy)(c||(c=u`<div class="dot"></div>`)):"")}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(i,"firstUpdated",this,3)([e]),this.hassio&&(this._alwaysVisible=(Number(window.parent.frontendVersion)||0)<20190710)}},{kind:"method",key:"willUpdate",value:function(e){if((0,n.Z)(i,"willUpdate",this,3)([e]),!e.has("narrow")&&!e.has("hass"))return;const t=e.has("hass")?e.get("hass"):this.hass,a=(e.has("narrow")?e.get("narrow"):this.narrow)||"always_hidden"===(null==t?void 0:t.dockedSidebar),o=this.narrow||"always_hidden"===this.hass.dockedSidebar;this.hasUpdated&&a===o||(this._show=o||this._alwaysVisible,o?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}},{kind:"method",key:"_subscribeNotifications",value:function(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,d.r)(this.hass.connection,(e=>{this._hasNotifications=e.length>0}))}},{kind:"method",key:"_toggleMenu",value:function(){(0,s.B)(this,"hass-toggle-menu")}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(h||(h=u`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:50%;border:2px solid var(--app-header-background-color)}`))}}]}}),o.oi)},34326:function(e,t,i){var a=i(61701),n=(i(71695),i(47021),i(57243)),o=i(50778);i(23334),i(83166);let r,s,d,l=e=>e;(0,a.Z)([(0,o.Mo)("ha-password-field")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"iconTrailing",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"autocorrect",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:"input-spellcheck"})],key:"inputSpellcheck",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"value",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"placeholder",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"label",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Number})],key:"minLength",value(){return-1}},{kind:"field",decorators:[(0,o.Cb)({type:Number})],key:"maxLength",value(){return-1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"outlined",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"helper",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"validateOnInitialRender",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"validationMessage",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"autoValidate",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"pattern",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({type:Number})],key:"size",value(){return null}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"helperPersistent",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"charCounter",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"endAligned",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"prefix",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"suffix",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"name",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({type:String,attribute:"input-mode"})],key:"inputMode",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"readOnly",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({attribute:!1,type:String})],key:"autocapitalize",value(){return""}},{kind:"field",decorators:[(0,o.SB)()],key:"_unmaskedPassword",value(){return!1}},{kind:"field",decorators:[(0,o.IO)("ha-textfield")],key:"_textField",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,n.dy)(r||(r=l`<ha-textfield .invalid="${0}" .errorMessage="${0}" .icon="${0}" .iconTrailing="${0}" .autocomplete="${0}" .autocorrect="${0}" .inputSpellcheck="${0}" .value="${0}" .placeholder="${0}" .label="${0}" .disabled="${0}" .required="${0}" .minLength="${0}" .maxLength="${0}" .outlined="${0}" .helper="${0}" .validateOnInitialRender="${0}" .validationMessage="${0}" .autoValidate="${0}" .pattern="${0}" .size="${0}" .helperPersistent="${0}" .charCounter="${0}" .endAligned="${0}" .prefix="${0}" .name="${0}" .inputMode="${0}" .readOnly="${0}" .autocapitalize="${0}" .type="${0}" .suffix="${0}" @input="${0}" @change="${0}"></ha-textfield> <ha-icon-button .label="${0}" @click="${0}" .path="${0}"></ha-icon-button>`),this.invalid,this.errorMessage,this.icon,this.iconTrailing,this.autocomplete,this.autocorrect,this.inputSpellcheck,this.value,this.placeholder,this.label,this.disabled,this.required,this.minLength,this.maxLength,this.outlined,this.helper,this.validateOnInitialRender,this.validationMessage,this.autoValidate,this.pattern,this.size,this.helperPersistent,this.charCounter,this.endAligned,this.prefix,this.name,this.inputMode,this.readOnly,this.autocapitalize,this._unmaskedPassword?"text":"password",(0,n.dy)(s||(s=l`<div style="width:24px"></div>`)),this._handleInputEvent,this._handleChangeEvent,(null===(e=this.hass)||void 0===e?void 0:e.localize(this._unmaskedPassword?"ui.components.selectors.text.hide_password":"ui.components.selectors.text.show_password"))||(this._unmaskedPassword?"Hide password":"Show password"),this._toggleUnmaskedPassword,this._unmaskedPassword?"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z":"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z")}},{kind:"method",key:"focus",value:function(){this._textField.focus()}},{kind:"method",key:"checkValidity",value:function(){return this._textField.checkValidity()}},{kind:"method",key:"reportValidity",value:function(){return this._textField.reportValidity()}},{kind:"method",key:"setCustomValidity",value:function(e){return this._textField.setCustomValidity(e)}},{kind:"method",key:"layout",value:function(){return this._textField.layout()}},{kind:"method",key:"_toggleUnmaskedPassword",value:function(){this._unmaskedPassword=!this._unmaskedPassword}},{kind:"method",decorators:[(0,o.hO)({passive:!0})],key:"_handleInputEvent",value:function(e){this.value=e.target.value}},{kind:"method",decorators:[(0,o.hO)({passive:!0})],key:"_handleChangeEvent",value:function(e){this.value=e.target.value,this._reDispatchEvent(e)}},{kind:"method",key:"_reDispatchEvent",value:function(e){const t=new Event(e.type,e);this.dispatchEvent(t)}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(d||(d=l`:host{display:block;position:relative}ha-textfield{width:100%}ha-icon-button{position:absolute;top:8px;right:8px;inset-inline-start:initial;inset-inline-end:8px;--mdc-icon-button-size:40px;--mdc-icon-size:20px;color:var(--secondary-text-color);direction:var(--direction)}`))}}]}}),n.oi)},72781:function(e,t,i){var a=i(61701),n=(i(71695),i(47021),i(47711)),o=i(81577),r=i(57243),s=i(50778);let d,l=e=>e;(0,a.Z)([(0,s.Mo)("ha-radio")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value(){return[o.W,(0,r.iv)(d||(d=l`:host{--mdc-theme-secondary:var(--primary-color)}`))]}}]}}),n.J)},30509:function(e,t,i){var a=i(61701),n=(i(71695),i(47021),i(57243)),o=i(50778);let r,s,d=e=>e;(0,a.Z)([(0,o.Mo)("ha-settings-row")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"slim",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,attribute:"three-line"})],key:"threeLine",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,attribute:"wrap-heading",reflect:!0})],key:"wrapHeading",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,n.dy)(r||(r=d` <div class="prefix-wrap"> <slot name="prefix"></slot> <div class="body" ?two-line="${0}" ?three-line="${0}"> <slot name="heading"></slot> <div class="secondary"><slot name="description"></slot></div> </div> </div> <div class="content"><slot></slot></div> `),!this.threeLine,this.threeLine)}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(s||(s=d`:host{display:flex;padding:0 16px;align-content:normal;align-self:auto;align-items:center}.body{padding-top:8px;padding-bottom:8px;padding-left:0;padding-inline-start:0;padding-right:16px;padding-inline-end:16px;overflow:hidden;display:var(--layout-vertical_-_display,flex);flex-direction:var(--layout-vertical_-_flex-direction,column);justify-content:var(--layout-center-justified_-_justify-content,center);flex:var(--layout-flex_-_flex,1);flex-basis:var(--layout-flex_-_flex-basis,0.000000001px)}.body[three-line]{min-height:var(--paper-item-body-three-line-min-height,88px)}:host(:not([wrap-heading])) body>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body>.secondary{display:block;padding-top:4px;font-family:var(
        --mdc-typography-body2-font-family,
        var(--mdc-typography-font-family, Roboto, sans-serif)
      );-webkit-font-smoothing:antialiased;font-size:var(--mdc-typography-body2-font-size, .875rem);font-weight:var(--mdc-typography-body2-font-weight,400);line-height:normal;color:var(--secondary-text-color)}.body[two-line]{min-height:calc(var(--paper-item-body-two-line-min-height,72px) - 16px);flex:1}.content{display:contents}:host(:not([narrow])) .content{display:var(--settings-row-content-display,flex);justify-content:flex-end;flex:1;padding:16px 0}.content ::slotted(*){width:var(--settings-row-content-width)}:host([narrow]){align-items:normal;flex-direction:column;border-top:1px solid var(--divider-color);padding-bottom:8px}::slotted(ha-switch){padding:16px 0}.secondary{white-space:normal}.prefix-wrap{display:var(--settings-row-prefix-display)}:host([narrow]) .prefix-wrap{display:flex;align-items:center}:host([slim]),:host([slim]) .content,:host([slim]) ::slotted(ha-switch){padding:0}:host([slim]) .body{min-height:0}`))}}]}}),n.oi)},17170:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HaSpinner:()=>p});var n=i(61701),o=i(72621),r=(i(71695),i(47021),i(97677)),s=i(43580),d=i(57243),l=i(50778),c=e([r]);r=(c.then?(await c)():c)[0];let h,u=e=>e,p=(0,n.Z)([(0,l.Mo)("ha-spinner")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,l.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,o.Z)(i,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}},{kind:"field",static:!0,key:"styles",value(){return[s.Z,(0,d.iv)(h||(h=u`: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)}`))]}}]}}),r.Z);a()}catch(h){a(h)}}))},37583:function(e,t,i){i.r(t),i.d(t,{HaSvgIcon:()=>h});var a=i(61701),n=(i(71695),i(47021),i(57243)),o=i(50778);let r,s,d,l,c=e=>e,h=(0,a.Z)([(0,o.Mo)("ha-svg-icon")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"secondaryPath",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"viewBox",value:void 0},{kind:"method",key:"render",value:function(){return(0,n.YP)(r||(r=c` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,n.YP)(s||(s=c`<path class="primary-path" d="${0}"></path>`),this.path):n.Ld,this.secondaryPath?(0,n.YP)(d||(d=c`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):n.Ld)}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(l||(l=c`: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)}`))}}]}}),n.oi)},1888:function(e,t,i){var a=i(61701),n=i(72621),o=(i(71695),i(47021),i(62523)),r=i(83835),s=i(57243),d=i(50778),l=i(13560);let c,h=e=>e;(0,a.Z)([(0,d.Mo)("ha-switch")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"haptic",value(){return!1}},{kind:"method",key:"firstUpdated",value:function(){(0,n.Z)(i,"firstUpdated",this,3)([]),this.addEventListener("change",(()=>{this.haptic&&(0,l.j)("light")}))}},{kind:"field",static:!0,key:"styles",value(){return[r.W,(0,s.iv)(c||(c=h`:host{--mdc-theme-secondary:var(--switch-checked-color)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:var(--switch-checked-button-color);border-color:var(--switch-checked-button-color)}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:var(--switch-checked-track-color);border-color:var(--switch-checked-track-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:var(--switch-unchecked-button-color);border-color:var(--switch-unchecked-button-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:var(--switch-unchecked-track-color);border-color:var(--switch-unchecked-track-color)}`))]}}]}}),o.H)},83166:function(e,t,i){var a=i(61701),n=i(72621),o=(i(71695),i(47021),i(1105)),r=i(33990),s=i(57243),d=i(50778),l=i(5111);let c,h,u,p,f=e=>e;(0,a.Z)([(0,d.Mo)("ha-textfield")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"iconTrailing",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"autocorrect",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:"input-spellcheck"})],key:"inputSpellcheck",value:void 0},{kind:"field",decorators:[(0,d.IO)("input")],key:"formElement",value:void 0},{kind:"method",key:"updated",value:function(e){(0,n.Z)(i,"updated",this,3)([e]),(e.has("invalid")||e.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||this.validationMessage||"Invalid":""),(this.invalid||this.validateOnInitialRender||e.has("invalid")&&void 0!==e.get("invalid"))&&this.reportValidity()),e.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete")),e.has("autocorrect")&&(this.autocorrect?this.formElement.setAttribute("autocorrect",this.autocorrect):this.formElement.removeAttribute("autocorrect")),e.has("inputSpellcheck")&&(this.inputSpellcheck?this.formElement.setAttribute("spellcheck",this.inputSpellcheck):this.formElement.removeAttribute("spellcheck"))}},{kind:"method",key:"renderIcon",value:function(e,t=!1){const i=t?"trailing":"leading";return(0,s.dy)(c||(c=f` <span class="mdc-text-field__icon mdc-text-field__icon--${0}" tabindex="${0}"> <slot name="${0}Icon"></slot> </span> `),i,t?1:-1,i)}},{kind:"field",static:!0,key:"styles",value(){return[r.W,(0,s.iv)(h||(h=f`.mdc-text-field__input{width:var(--ha-textfield-input-width,100%)}.mdc-text-field:not(.mdc-text-field--with-leading-icon){padding:var(--text-field-padding,0px 16px)}.mdc-text-field__affix--suffix{padding-left:var(--text-field-suffix-padding-left,12px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,12px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:ltr}.mdc-text-field--with-leading-icon{padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,16px);direction:var(--direction)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:var(--text-field-suffix-padding-left,0px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,0px)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:var(--secondary-text-color)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--secondary-text-color)}.mdc-text-field__icon--leading{margin-inline-start:16px;margin-inline-end:8px;direction:var(--direction)}.mdc-text-field__icon--trailing{padding:var(--textfield-icon-trailing-padding,12px)}.mdc-floating-label:not(.mdc-floating-label--float-above){text-overflow:ellipsis;width:inherit;padding-right:30px;padding-inline-end:30px;padding-inline-start:initial;box-sizing:border-box;direction:var(--direction)}input{text-align:var(--text-field-text-align,start)}input[type=color]{height:20px}::-ms-reveal{display:none}:host([no-spinner]) input::-webkit-inner-spin-button,:host([no-spinner]) input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=color]::-webkit-color-swatch-wrapper{padding:0}:host([no-spinner]) input[type=number]{-moz-appearance:textfield}.mdc-text-field__ripple{overflow:hidden}.mdc-text-field{overflow:var(--text-field-overflow)}.mdc-floating-label{inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start);direction:var(--direction);text-align:var(--float-start)}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px - var(--text-field-suffix-padding-left,0px));inset-inline-start:calc(48px + var(--text-field-suffix-padding-left,0px))!important;inset-inline-end:initial!important;direction:var(--direction)}.mdc-text-field__input[type=number]{direction:var(--direction)}.mdc-text-field__affix--prefix{padding-right:var(--text-field-prefix-padding-right,2px);padding-inline-end:var(--text-field-prefix-padding-right,2px);padding-inline-start:initial}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:var(--mdc-text-field-label-ink-color)}#helper-text ha-markdown{display:inline-block}`)),"rtl"===l.E.document.dir?(0,s.iv)(u||(u=f`.mdc-floating-label,.mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field__icon--leading,.mdc-text-field__input[type=number]{direction:rtl;--direction:rtl}`)):(0,s.iv)(p||(p=f``))]}}]}}),o.P)},66929:function(e,t,i){i.d(t,{Ij:()=>n,S7:()=>a});i(19423);const a=(e,t)=>e.callWS(Object.assign({type:"config/core/update"},t)),n=e=>e.callApi("POST","config/core/check_config")},56785:function(e,t,i){i.d(t,{js:()=>o,rY:()=>n,yd:()=>d,yz:()=>s});i(19083),i(71695),i(40251),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(61006),i(47021);var a=i(17803);const n=e=>e.data,o=e=>"object"==typeof e?"object"==typeof e.body?e.body.message||"Unknown error, see supervisor logs":e.body||e.message||"Unknown error, see supervisor logs":e,r=new Set([502,503,504]),s=e=>!!(e&&e.status_code&&r.has(e.status_code))||!(!e||!e.message||!e.message.includes("ERR_CONNECTION_CLOSED")&&!e.message.includes("ERR_CONNECTION_RESET")),d=async(e,t)=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:`/${t}/stats`,method:"get"}):n(await e.callApi("GET",`hassio/${t}/stats`))},67044:function(e,t,i){i.d(t,{AP:()=>r,MY:()=>s,Or:()=>d,Sj:()=>o,Sx:()=>c,oJ:()=>l,ou:()=>h});i(40251);var a=i(17803),n=i(56785);const o=async e=>{if((0,a.I)(e.config.version,2021,2,4))return e.callWS({type:"supervisor/api",endpoint:"/host/info",method:"get"});const t=await e.callApi("GET","hassio/host/info");return(0,n.rY)(t)},r=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/os/info",method:"get"}):(0,n.rY)(await e.callApi("GET","hassio/os/info")),s=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/reboot",method:"post",timeout:null}):e.callApi("POST","hassio/host/reboot"),d=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/shutdown",method:"post",timeout:null}):e.callApi("POST","hassio/host/shutdown"),l=async(e,t)=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/options",method:"post",data:t}):e.callApi("POST","hassio/host/options",t),c=async(e,t)=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/os/datadisk/move",method:"post",timeout:null,data:{device:t}}):e.callApi("POST","hassio/os/datadisk/move"),h=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/os/datadisk/list",method:"get",timeout:null}):(0,n.rY)(await e.callApi("GET","/os/datadisk/list"))},81732:function(e,t,i){i.d(t,{Cy:()=>d,Ne:()=>s,Tg:()=>l,bR:()=>o,tJ:()=>r});i(19083),i(71695),i(52805),i(9359),i(70104),i(48136),i(23669),i(40251),i(19134),i(11740),i(61006),i(44495),i(47021);var a=i(17803),n=i(56785);const o=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/network/info",method:"get"}):(0,n.rY)(await e.callApi("GET","hassio/network/info")),r=async(e,t,i)=>{(0,a.I)(e.config.version,2021,2,4)?await e.callWS({type:"supervisor/api",endpoint:`/network/interface/${t}/update`,method:"post",data:i,timeout:null}):await e.callApi("POST",`hassio/network/interface/${t}/update`,i)},s=async(e,t)=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:`/network/interface/${t}/accesspoints`,method:"get",timeout:null}):(0,n.rY)(await e.callApi("GET",`hassio/network/interface/${t}/accesspoints`)),d=e=>{const[t,i]=e.split("/"),a=t.includes(":");return{ip:t,mask:i?c(i,a):null}},l=(e,t)=>`${e}/${h(t)}`,c=(e,t=!1)=>{const i=parseInt(e,10);if(t){const e="ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",t=Math.floor(i/16),a=i%16,n=a?parseInt("1".repeat(a)+"0".repeat(16-a),2).toString(16):"";return e.split(":").slice(0,t).concat(n).concat(Array(8-t-(n?1:0)).fill("0")).join(":")}const a=~(2**(32-i)-1);return[a>>>24&255,a>>>16&255,a>>>8&255,255&a].join(".")},h=e=>e.includes(":")?e.split(":").map((e=>e?(parseInt(e,16).toString(2).match(/1/g)||[]).length:0)).reduce(((e,t)=>e+t),0):e.split(".").reduce(((e,t)=>e+(parseInt(t,10).toString(2).match(/1/g)||[]).length),0)},26011:function(e,t,i){i.d(t,{Mo:()=>a,Ws:()=>n,nC:()=>o});const a=e=>e.callWS({type:"network"}),n=(e,t)=>e.callWS({type:"network/configure",config:{configured_adapters:t}}),o=e=>e.callWS({type:"network/url"})},83716:function(e,t,i){i.d(t,{r:()=>a});i(71695),i(19423),i(47021);const a=(e,t)=>{const i=new n,a=e.subscribeMessage((e=>t(i.processMessage(e))),{type:"persistent_notification/subscribe"});return()=>{a.then((e=>null==e?void 0:e()))}};class n{constructor(){this.notifications=void 0,this.notifications={}}processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications=Object.assign(Object.assign({},this.notifications),e.notifications);return Object.values(this.notifications)}}},87979:function(e,t,i){var a=i(61701),n=(i(71695),i(47021),i(57243)),o=i(50778),r=i(31146),s=(i(54202),i(43344),i(28008));let d,l,c,h,u,p=e=>e;(0,a.Z)([(0,o.Mo)("hass-subpage")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,attribute:"main-page"})],key:"mainPage",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"backCallback",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"supervisor",value(){return!1}},{kind:"field",decorators:[(0,r.i)(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,n.dy)(d||(d=p` <div class="toolbar"> ${0} <div class="main-title"><slot name="header">${0}</slot></div> <slot name="toolbar-icon"></slot> </div> <div class="content ha-scrollbar" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),this.mainPage||null!==(e=history.state)&&void 0!==e&&e.root?(0,n.dy)(l||(l=p` <ha-menu-button .hassio="${0}" .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.supervisor,this.hass,this.narrow):this.backPath?(0,n.dy)(c||(c=p` <a href="${0}"> <ha-icon-button-arrow-prev .hass="${0}"></ha-icon-button-arrow-prev> </a> `),this.backPath,this.hass):(0,n.dy)(h||(h=p` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,this._saveScrollPos)}},{kind:"method",decorators:[(0,o.hO)({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop}},{kind:"method",key:"_backTapped",value:function(){this.backCallback?this.backCallback():history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[s.$c,(0,n.iv)(u||(u=p`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin:var(--margin-title);line-height:20px;min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;padding-bottom:1px}.content{position:relative;width:100%;height:calc(100% - 1px - var(--header-height));overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}#fab{position:absolute;right:calc(16px + env(safe-area-inset-right));inset-inline-end:calc(16px + env(safe-area-inset-right));inset-inline-start:initial;bottom:calc(16px + env(safe-area-inset-bottom));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}:host([narrow]) #fab.tabs{bottom:calc(84px + env(safe-area-inset-bottom))}#fab[is-wide]{bottom:24px;right:24px;inset-inline-end:24px;inset-inline-start:initial}`))]}}]}}),n.oi)},16029:function(e,t,i){var a=i(61701),n=i(72621),o=(i(71695),i(9359),i(56475),i(70104),i(19423),i(40251),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(47021),i(31622),i(57243)),r=i(50778),s=i(72344),d=(i(99426),i(54977),i(83456),i(19083),i(92745),i(61006),i(36522)),l=i(28008);i(30509),i(37583);let c,h,u,p,f,v,m,g=e=>e;const k=e=>(0,o.dy)(c||(c=g`${0}`),e.map(((t,i)=>[(0,o.dy)(h||(h=g`<span>${0}/${0}</span>`),t.address,t.network_prefix),i<e.length-1?", ":o.Ld])));(0,a.Z)([(0,r.Mo)("ha-network")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"networkConfig",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_expanded",value:void 0},{kind:"method",key:"render",value:function(){if(void 0===this.networkConfig)return o.Ld;const e=this.networkConfig.configured_adapters||[];return(0,o.dy)(p||(p=g` <ha-settings-row> <span slot="prefix"> <ha-checkbox id="auto_configure" @change="${0}" .checked="${0}" name="auto_configure"> </ha-checkbox> </span> <span slot="heading" data-for="auto_configure"> ${0} </span> <span slot="description" data-for="auto_configure"> ${0}: ${0} </span> </ha-settings-row> ${0} `),this._handleAutoConfigureCheckboxClick,!e.length,this.hass.localize("ui.panel.config.network.adapter.auto_configure"),this.hass.localize("ui.panel.config.network.adapter.detected"),this.networkConfig.adapters.map((e=>e.auto?(0,o.dy)(u||(u=g`${0} (${0})`),e.name,k([...e.ipv4,...e.ipv6])):"")),e.length||this._expanded?this.networkConfig.adapters.map((t=>(0,o.dy)(f||(f=g`<ha-settings-row> <span slot="prefix"> <ha-checkbox id="${0}" @change="${0}" .checked="${0}" .adapter="${0}" name="${0}"> </ha-checkbox> </span> <span slot="heading"> ${0}: ${0} ${0} </span> <span slot="description"> ${0} </span> </ha-settings-row>`),t.name,this._handleAdapterCheckboxClick,e.includes(t.name),t.name,t.name,this.hass.localize("ui.panel.config.network.adapter.adapter"),t.name,t.default?(0,o.dy)(v||(v=g`<ha-svg-icon .path="${0}"></ha-svg-icon> (${0})`),"M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z",this.hass.localize("ui.common.default")):o.Ld,k([...t.ipv4,...t.ipv6])))):o.Ld)}},{kind:"method",key:"_handleAutoConfigureCheckboxClick",value:function(e){const t=e.currentTarget;if(void 0===this.networkConfig)return;let i=[...this.networkConfig.configured_adapters];if(t.checked)this._expanded=!1,i=[];else{this._expanded=!0;for(const e of this.networkConfig.adapters)if(e.default){i=[e.name];break}}(0,d.B)(this,"network-config-changed",{configured_adapters:i})}},{kind:"method",key:"_handleAdapterCheckboxClick",value:function(e){const t=e.currentTarget,i=t.name;if(void 0===this.networkConfig)return;const a=[...this.networkConfig.configured_adapters];if(t.checked)a.push(i);else{const e=a.indexOf(i,0);a.splice(e,1)}(0,d.B)(this,"network-config-changed",{configured_adapters:a})}},{kind:"get",static:!0,key:"styles",value:function(){return[l.Qx,(0,o.iv)(m||(m=g`.error{color:var(--error-color)}ha-settings-row{padding:0;--paper-time-input-justify-content:flex-end;--settings-row-content-display:contents;--settings-row-prefix-display:contents}span[slot=description],span[slot=heading]{cursor:pointer}`))]}}]}}),o.oi);var y=i(81732),b=i(26011);let _,x,w,$=e=>e;(0,a.Z)([(0,r.Mo)("ha-config-network")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_networkConfig",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_error",value:void 0},{kind:"method",key:"render",value:function(){var e;return null!==(e=this.hass.userData)&&void 0!==e&&e.showAdvanced&&(0,s.p)(this.hass,"network")?(0,o.dy)(_||(_=$` <ha-card outlined header="${0}"> <div class="card-content"> ${0} <p> ${0} </p> <ha-network @network-config-changed="${0}" .hass="${0}" .networkConfig="${0}"></ha-network> </div> <div class="card-actions"> <mwc-button @click="${0}"> ${0} </mwc-button> </div> </ha-card> `),this.hass.localize("ui.panel.config.network.network_adapter"),this._error?(0,o.dy)(x||(x=$` <ha-alert alert-type="error">${0}</ha-alert> `),this._error.message||this._error.code):"",this.hass.localize("ui.panel.config.network.network_adapter_info"),this._configChanged,this.hass,this._networkConfig,this._save,this.hass.localize("ui.panel.config.core.section.core.core_config.save_button")):o.Ld}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(i,"firstUpdated",this,3)([e]),(0,s.p)(this.hass,"network")&&this._load()}},{kind:"method",key:"_load",value:async function(){this._error=void 0;try{const e=await(0,b.Mo)(this.hass);if((0,s.p)(this.hass,"hassio")){const t=await(0,y.bR)(this.hass),i=new Set(t.interfaces.map((e=>e.interface)));i.size&&(e.adapters=e.adapters.filter((e=>i.has(e.name))))}this._networkConfig=e}catch(e){this._error=e.message||e}}},{kind:"method",key:"_save",value:async function(){this._error=void 0;try{var e;await(0,b.Ws)(this.hass,(null===(e=this._networkConfig)||void 0===e?void 0:e.configured_adapters)||[])}catch(t){this._error=t.message||t}}},{kind:"method",key:"_configChanged",value:function(e){this._networkConfig=Object.assign(Object.assign({},this._networkConfig),{},{configured_adapters:e.detail.configured_adapters})}},{kind:"get",static:!0,key:"styles",value:function(){return[l.Qx,(0,o.iv)(w||(w=$`.error{color:var(--error-color)}ha-settings-row{padding:0}.card-actions{display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center}`))]}}]}}),o.oi)},59484:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t);var n=i(61701),o=(i(71695),i(47021),i(57243)),r=i(50778),s=i(72344),d=(i(87979),i(16029),i(18951),i(756)),l=i(1515),c=e([d,l]);[d,l]=c.then?(await c)():c;let h,u,p,f=e=>e;(0,n.Z)([(0,r.Mo)("ha-config-section-network")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,o.dy)(h||(h=f` <hass-subpage back-path="/config/system" .hass="${0}" .narrow="${0}" .header="${0}"> <div class="content"> ${0} <ha-config-url-form .hass="${0}"></ha-config-url-form> <ha-config-network .hass="${0}"></ha-config-network> </div> </hass-subpage> `),this.hass,this.narrow,this.hass.localize("ui.panel.config.network.caption"),(0,s.p)(this.hass,"hassio")?(0,o.dy)(u||(u=f`<supervisor-hostname .hass="${0}" .narrow="${0}"></supervisor-hostname> <supervisor-network .hass="${0}"></supervisor-network>`),this.hass,this.narrow,this.hass):"",this.hass,this.hass)}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(p||(p=f`.content{padding:28px 20px 0;max-width:1040px;margin:0 auto}ha-config-network,ha-config-url-form,supervisor-hostname,supervisor-network{display:block;margin:0 auto;margin-bottom:24px;max-width:600px}`))}}]}}),o.oi);a()}catch(h){a(h)}}))},18951:function(e,t,i){var a=i(61701),n=i(72621),o=(i(19083),i(71695),i(40251),i(88044),i(47021),i(72700),i(8038),i(71513),i(75656),i(50100),i(18084),i(31622),i(57243)),r=i(50778),s=i(72344);i(19134),i(5740);const d=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;i(99426),i(54977),i(55486),i(1888),i(83166),i(30509),i(59826);var l=i(94616),c=i(66929),h=i(26011),u=i(87865),p=i(72473),f=i(11225),v=i(6736);let m,g,k,y,b,_,x,w,$,C,L,S,z,A,M=e=>e;const B="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",P="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z",I="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z";(0,a.Z)([(0,r.Mo)("ha-config-url-form")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_working",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_urls",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_external_url",value(){return""}},{kind:"field",decorators:[(0,r.SB)()],key:"_internal_url",value(){return""}},{kind:"field",decorators:[(0,r.SB)()],key:"_cloudStatus",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_showCustomExternalUrl",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_showCustomInternalUrl",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_unmaskedExternalUrl",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_unmaskedInternalUrl",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_cloudChecked",value(){return!1}},{kind:"method",key:"hassSubscribe",value:function(){return[this.hass.connection.subscribeEvents((()=>{this._fetchUrls()}),"core_config_updated")]}},{kind:"method",key:"render",value:function(){var e,t,i;const a=["storage","default"].includes(this.hass.config.config_source),n=this._working||!a;if(void 0===this._cloudStatus||void 0===this._urls)return o.Ld;const r=this._showCustomInternalUrl?this._internal_url:(null===(e=this._urls)||void 0===e?void 0:e.internal)||"",l=this._showCustomExternalUrl?this._external_url:(this._cloudChecked?null===(t=this._urls)||void 0===t?void 0:t.cloud:null===(i=this._urls)||void 0===i?void 0:i.external)||"";let c,h,u;return null===this._cloudStatus?(c=!1,h=!1,u=!1):(u=this._cloudStatus.http_use_ssl,this._cloudStatus.logged_in?(c=!0,h=this._cloudStatus.active_subscription&&this._cloudStatus.prefs.remote_enabled):(c=!1,h=!1)),(0,o.dy)(m||(m=M` <ha-card outlined .header="${0}"> <div class="card-content"> ${0} ${0} <div class="description"> ${0} </div> ${0} <div class="url-container"> <div class="textfield-container"> <ha-textfield name="external_url" type="url" placeholder="https://example.duckdns.org:8123" .value="${0}" @change="${0}" .disabled="${0}" .suffix="${0}"></ha-textfield> ${0} </div> <ha-button .url="${0}" @click="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-button> </div> ${0} ${0} <h4> ${0} </h4> <ha-settings-row slim> <span slot="heading"> ${0} </span> <span slot="description"> ${0} </span> <ha-switch .disabled="${0}" .checked="${0}" @change="${0}"></ha-switch> </ha-settings-row> <div class="url-container"> <div class="textfield-container"> <ha-textfield name="internal_url" type="url" placeholder="${0}" .value="${0}" @change="${0}" .disabled="${0}" .suffix="${0}"></ha-textfield> ${0} </div> <ha-button .url="${0}" @click="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-button> </div> ${0} </div> <div class="card-actions"> <mwc-button @click="${0}" .disabled="${0}"> ${0} </mwc-button> </div> </ha-card> `),this.hass.localize("ui.panel.config.url.caption"),a?"":(0,o.dy)(g||(g=M` <ha-alert> ${0} </ha-alert> `),this.hass.localize("ui.panel.config.core.section.core.core_config.edit_requires_storage")),this._error?(0,o.dy)(k||(k=M`<ha-alert alert-type="error">${0}</ha-alert>`),this._error):"",this.hass.localize("ui.panel.config.url.description"),c?(0,o.dy)(y||(y=M` <h4> ${0} </h4> <ha-settings-row slim> <span slot="heading"> ${0} </span> <ha-switch .disabled="${0}" .checked="${0}" @change="${0}"></ha-switch> </ha-settings-row> `),this.hass.localize("ui.panel.config.url.external_url_label"),this.hass.localize("ui.panel.config.url.external_use_ha_cloud"),n,this._cloudChecked,this._toggleCloud):"",this._unmaskedExternalUrl||this._showCustomExternalUrl&&a?l:(0,f.t)(l),this._handleChange,n||!this._showCustomExternalUrl,(0,o.dy)(b||(b=M`<div style="width:24px"></div>`)),this._showCustomExternalUrl&&a?o.Ld:(0,o.dy)(_||(_=M` <ha-icon-button class="toggle-unmasked-url" .label="${0}" @click="${0}" .path="${0}"></ha-icon-button> `),this.hass.localize(`ui.panel.config.common.${this._unmaskedExternalUrl?"hide":"show"}_url`),this._toggleUnmaskedExternalUrl,this._unmaskedExternalUrl?P:I),l,this._copyURL,B,this.hass.localize("ui.panel.config.common.copy_link"),c||!(0,s.p)(this.hass,"cloud")?"":(0,o.dy)(x||(x=M` <div class="row"> <div class="flex"></div> <a href="/config/cloud">${0}</a> </div> `),this.hass.localize("ui.panel.config.url.external_get_ha_cloud")),!this._showCustomExternalUrl&&c?(0,o.dy)(w||(w=M` ${0} `),h?(0,o.dy)($||($=M` <div class="row"> <div class="flex"></div> <a href="/config/cloud">${0}</a> </div> `),this.hass.localize("ui.panel.config.url.manage_ha_cloud")):(0,o.dy)(C||(C=M` <ha-alert alert-type="error"> ${0} <a href="/config/cloud" slot="action"><mwc-button .label="${0}"></mwc-button></a> </ha-alert> `),this.hass.localize("ui.panel.config.url.ha_cloud_remote_not_enabled"),this.hass.localize("ui.panel.config.url.enable_remote"))):"",this.hass.localize("ui.panel.config.url.internal_url_label"),this.hass.localize("ui.panel.config.url.internal_url_automatic"),this.hass.localize("ui.panel.config.url.internal_url_automatic_description"),n,!this._showCustomInternalUrl,this._toggleInternalAutomatic,this.hass.localize("ui.panel.config.url.internal_url_placeholder"),this._unmaskedInternalUrl||this._showCustomInternalUrl&&a?r:(0,f.t)(r),this._handleChange,n||!this._showCustomInternalUrl,(0,o.dy)(L||(L=M`<div style="width:24px"></div>`)),this._showCustomInternalUrl&&a?o.Ld:(0,o.dy)(S||(S=M` <ha-icon-button class="toggle-unmasked-url" .label="${0}" @click="${0}" .path="${0}"></ha-icon-button> `),this.hass.localize(`ui.panel.config.common.${this._unmaskedInternalUrl?"hide":"show"}_url`),this._toggleUnmaskedInternalUrl,this._unmaskedInternalUrl?P:I),r,this._copyURL,B,this.hass.localize("ui.panel.config.common.copy_link"),!u||r&&r.startsWith("https://")&&(p=new URL(r).hostname,!d.test(p))?"":(0,o.dy)(z||(z=M` <ha-alert .alertType="${0}" .title="${0}"> ${0} </ha-alert> `),this._showCustomInternalUrl?"info":"warning",this.hass.localize("ui.panel.config.url.internal_url_https_error_title"),this.hass.localize("ui.panel.config.url.internal_url_https_error_description")),this._save,n,this.hass.localize("ui.panel.config.core.section.core.core_config.save_button"));var p}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(i,"firstUpdated",this,3)([e]),(0,s.p)(this.hass,"cloud")?(0,l.LI)(this.hass).then((e=>{this._cloudStatus=e,this._showCustomExternalUrl=!(this._cloudStatus.logged_in&&!this.hass.config.external_url)})):this._cloudStatus=null,this._fetchUrls()}},{kind:"method",key:"_toggleCloud",value:function(e){this._cloudChecked=e.currentTarget.checked,this._showCustomExternalUrl=!this._cloudChecked}},{kind:"method",key:"_toggleInternalAutomatic",value:function(e){this._showCustomInternalUrl=!e.currentTarget.checked}},{kind:"method",key:"_toggleUnmaskedInternalUrl",value:function(){this._unmaskedInternalUrl=!this._unmaskedInternalUrl}},{kind:"method",key:"_toggleUnmaskedExternalUrl",value:function(){this._unmaskedExternalUrl=!this._unmaskedExternalUrl}},{kind:"method",key:"_copyURL",value:async function(e){const t=e.currentTarget.url;await(0,u.v)(t),(0,p.C)(this,{message:this.hass.localize("ui.common.copied_clipboard")})}},{kind:"method",key:"_handleChange",value:function(e){const t=e.currentTarget;this[`_${t.name}`]=t.value||""}},{kind:"method",key:"_save",value:async function(){this._working=!0,this._error=void 0;try{await(0,c.S7)(this.hass,{external_url:this._showCustomExternalUrl&&this._external_url||null,internal_url:this._showCustomInternalUrl&&this._internal_url||null})}catch(e){this._error=e.message||e}finally{this._working=!1}}},{kind:"method",key:"_fetchUrls",value:async function(){var e,t,i,a,n,o,r;this._urls=await(0,h.nC)(this.hass),this._cloudChecked=(null===(e=this._urls)||void 0===e?void 0:e.cloud)===(null===(t=this._urls)||void 0===t?void 0:t.external)&&!this.hass.config.external_url,this._showCustomInternalUrl=!!this.hass.config.internal_url,this._showCustomExternalUrl=!(null!==(i=this._cloudStatus)&&void 0!==i&&i.logged_in&&!this.hass.config.external_url),this._internal_url=null!==(a=null===(n=this._urls)||void 0===n?void 0:n.internal)&&void 0!==a?a:"",this._external_url=null!==(o=null===(r=this._urls)||void 0===r?void 0:r.external)&&void 0!==o?o:""}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(A||(A=M`.description{margin-bottom:1em}.row{display:flex;flex-direction:row;margin:0 -8px;align-items:center;padding:8px 0}.secondary{color:var(--secondary-text-color)}.flex{flex:1}.row>*{margin:0 8px}ha-alert{display:block;margin:16px 0}.card-actions{display:flex;flex-direction:row-reverse}a{color:var(--primary-color);text-decoration:none}.url-container{display:flex;align-items:center;gap:8px;margin-top:8px}.textfield-container{position:relative;flex:1}.textfield-container ha-textfield{display:block}.toggle-unmasked-url{position:absolute;top:8px;right:8px;inset-inline-start:initial;inset-inline-end:8px;--mdc-icon-button-size:40px;--mdc-icon-size:20px;color:var(--secondary-text-color);direction:var(--direction)}`))}}]}}),(0,v.f)(o.oi))},756:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(61701),n=(i(71695),i(40251),i(47021),i(31622),i(2060),i(87319),i(57243)),o=i(50778),r=(i(99426),i(54977),i(17170)),s=(i(41307),i(55486),i(23334),i(72781),i(30509),i(83166),i(56785)),d=i(67044),l=i(76131),c=e([r]);r=(c.then?(await c)():c)[0];let h,u,p,f=e=>e;(0,a.Z)([(0,o.Mo)("supervisor-hostname")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,o.SB)()],key:"_processing",value(){return!1}},{kind:"field",decorators:[(0,o.SB)()],key:"_hostname",value:void 0},{kind:"method",key:"firstUpdated",value:function(){this._fetchHostInfo()}},{kind:"method",key:"_fetchHostInfo",value:async function(){const e=await(0,d.Sj)(this.hass);this._hostname=e.hostname}},{kind:"method",key:"render",value:function(){return this._hostname?(0,n.dy)(h||(h=f` <ha-card class="no-padding" outlined .header="${0}"> <div class="card-content"> <p> ${0} </p> <ha-textfield .disabled="${0}" .value="${0}" @change="${0}" placeholder="homeassistant"> </ha-textfield> </div> <div class="card-actions"> <mwc-button @click="${0}" .disabled="${0}"> ${0} </mwc-button> </div> </ha-card> `),this.hass.localize("ui.panel.config.network.supervisor.hostname.title"),this.hass.localize("ui.panel.config.network.supervisor.hostname.description"),this._processing,this._hostname,this._handleChange,this._save,this._processing,this._processing?(0,n.dy)(u||(u=f`<ha-spinner size="small"></ha-spinner>`)):this.hass.localize("ui.common.save")):n.Ld}},{kind:"method",key:"_handleChange",value:function(e){this._hostname=e.target.value}},{kind:"method",key:"_save",value:async function(){this._processing=!0;try{await(0,d.oJ)(this.hass,{hostname:this._hostname})}catch(e){(0,l.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.network.supervisor.hostname.failed_to_set_hostname"),text:(0,s.js)(e)})}finally{this._processing=!1}}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(p||(p=f`ha-textfield{width:100%}.card-actions{display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center}.card-content>p{padding-bottom:1em}`))}}]}}),n.oi);t()}catch(h){t(h)}}))},1515:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(61701),n=(i(19083),i(71695),i(92745),i(61893),i(9359),i(56475),i(1331),i(31526),i(70104),i(19423),i(40251),i(81804),i(47021),i(2060),i(99619),i(56820),i(57243)),o=i(50778),r=i(67064),s=(i(99426),i(59826),i(34273),i(54977),i(17170)),d=(i(41307),i(55486),i(23334),i(34326),i(72781),i(7285),i(83166),i(56785)),l=i(81732),c=i(76131),h=e([s]);s=(h.then?(await h)():h)[0];let u,p,f,v,m,g,k,y,b,_,x,w,$,C,L,S,z,A,M,B,P,I,U=e=>e;const T="M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z",V="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",E="M7,10L12,15L17,10H7Z",H="M12,21L15.6,16.2C14.6,15.45 13.35,15 12,15C10.65,15 9.4,15.45 8.4,16.2L12,21M12,3C7.95,3 4.21,4.34 1.2,6.6L3,9C5.5,7.12 8.62,6 12,6C15.38,6 18.5,7.12 21,9L22.8,6.6C19.79,4.34 16.05,3 12,3M12,9C9.3,9 6.81,9.89 4.8,11.4L6.6,13.8C8.1,12.67 9.97,12 12,12C14.03,12 15.9,12.67 17.4,13.8L19.2,11.4C17.19,9.89 14.7,9 12,9Z",O=["ipv4","ipv6"],Z={ipv4:{Cloudflare:["1.1.1.1","1.0.0.1"],Google:["8.8.8.8","8.8.4.4"],Quad9:["9.9.9.9","149.112.112.112"],NextDNS:["45.90.28.0","45.90.30.0"],AdGuard:["94.140.14.140","94.140.14.141"]},ipv6:{Cloudflare:["2606:4700:4700::1111","2606:4700:4700::1001"],Google:["2001:4860:4860::8888","2001:4860:4860::8844"],Quad9:["2620:fe::fe","2620:fe::9"],NextDNS:["2a05:d014:a000::","2a05:d014:a001::"],AdGuard:["94.140.14.140","94.140.14.141"]}};(0,a.Z)([(0,o.Mo)("supervisor-network")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_accessPoints",value(){return[]}},{kind:"field",decorators:[(0,o.SB)()],key:"_curTabIndex",value(){return 0}},{kind:"field",decorators:[(0,o.SB)()],key:"_dirty",value(){return!1}},{kind:"field",decorators:[(0,o.SB)()],key:"_interface",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_interfaces",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_processing",value(){return!1}},{kind:"field",decorators:[(0,o.SB)()],key:"_scanning",value(){return!1}},{kind:"field",decorators:[(0,o.SB)()],key:"_wifiConfiguration",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_dnsMenuOpen",value(){return!1}},{kind:"method",key:"firstUpdated",value:function(){this._fetchNetworkInfo()}},{kind:"method",key:"_fetchNetworkInfo",value:async function(){const e=await(0,l.bR)(this.hass);this._interfaces=e.interfaces.sort(((e,t)=>e.primary>t.primary?-1:1)),this._interface=Object.assign({},this._interfaces[this._curTabIndex])}},{kind:"method",key:"render",value:function(){return this._interface?(0,n.dy)(u||(u=U` <ha-card outlined .header="${0}"> ${0} ${0} </ha-card> `),this.hass.localize("ui.panel.config.network.supervisor.title"),this._interfaces.length>1?(0,n.dy)(p||(p=U`<mwc-tab-bar .activeIndex="${0}" @MDCTabBar:activated="${0}">${0} </mwc-tab-bar>`),this._curTabIndex,this._handleTabActivated,this._interfaces.map((e=>(0,n.dy)(f||(f=U`<mwc-tab .id="${0}" .label="${0}"> </mwc-tab>`),e.interface,e.interface)))):n.Ld,(0,r.F)(this._renderTab())):n.Ld}},{kind:"method",key:"_renderTab",value:function(){var e,t,i,a;return(0,n.dy)(v||(v=U`<div class="card-content"> ${0} ${0} ${0} </div> <div class="card-actions"> <ha-button @click="${0}" .disabled="${0}"> ${0} </ha-button> <ha-button @click="${0}"> ${0} </ha-button> </div>`),"wireless"===(null===(e=this._interface)||void 0===e?void 0:e.type)?(0,n.dy)(m||(m=U` <ha-expansion-panel .header="${0}" outlined .expanded="${0}"> ${0} <ha-button class="scan" @click="${0}" .disabled="${0}"> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-button> ${0} ${0} </ha-expansion-panel> `),this.hass.localize("ui.panel.config.network.supervisor.wifi"),!(null!==(t=this._interface)&&void 0!==t&&null!==(t=t.wifi)&&void 0!==t&&t.ssid),null!==(i=this._interface)&&void 0!==i&&null!==(i=i.wifi)&&void 0!==i&&i.ssid?(0,n.dy)(g||(g=U`<p> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </p>`),H,this.hass.localize("ui.panel.config.network.supervisor.connected_to",{ssid:null===(a=this._interface)||void 0===a||null===(a=a.wifi)||void 0===a?void 0:a.ssid})):n.Ld,this._scanForAP,this._scanning,this._scanning?(0,n.dy)(k||(k=U`<ha-spinner size="small"> </ha-spinner>`)):this.hass.localize("ui.panel.config.network.supervisor.scan_ap"),H,this._accessPoints.length?(0,n.dy)(y||(y=U` <mwc-list> ${0} </mwc-list> `),this._accessPoints.map((e=>{var t;return(0,n.dy)(b||(b=U` <ha-list-item twoline @click="${0}" .activated="${0}" .ap="${0}"> <span>${0}</span> <span slot="secondary"> ${0} - ${0}: ${0} </span> </ha-list-item> `),this._selectAP,e.ssid===(null===(t=this._wifiConfiguration)||void 0===t?void 0:t.ssid),e,e.ssid,e.mac,this.hass.localize("ui.panel.config.network.supervisor.signal_strength"),e.signal)}))):n.Ld,this._wifiConfiguration?(0,n.dy)(_||(_=U` <div class="radio-row"> <ha-formfield .label="${0}"> <ha-radio @change="${0}" .ap="${0}" value="open" name="auth" .checked="${0}"> </ha-radio> </ha-formfield> <ha-formfield .label="${0}"> <ha-radio @change="${0}" .ap="${0}" value="wep" name="auth" .checked="${0}"> </ha-radio> </ha-formfield> <ha-formfield .label="${0}"> <ha-radio @change="${0}" .ap="${0}" value="wpa-psk" name="auth" .checked="${0}"> </ha-radio> </ha-formfield> </div> ${0} `),this.hass.localize("ui.panel.config.network.supervisor.open"),this._handleRadioValueChangedAp,this._wifiConfiguration,void 0===this._wifiConfiguration.auth||"open"===this._wifiConfiguration.auth,this.hass.localize("ui.panel.config.network.supervisor.wep"),this._handleRadioValueChangedAp,this._wifiConfiguration,"wep"===this._wifiConfiguration.auth,this.hass.localize("ui.panel.config.network.supervisor.wpa"),this._handleRadioValueChangedAp,this._wifiConfiguration,"wpa-psk"===this._wifiConfiguration.auth,"wpa-psk"===this._wifiConfiguration.auth||"wep"===this._wifiConfiguration.auth?(0,n.dy)(x||(x=U` <ha-password-field id="psk" .label="${0}" .version="${0}" @change="${0}"> </ha-password-field> `),this.hass.localize("ui.panel.config.network.supervisor.wifi_password"),"wifi",this._handleInputValueChangedWifi):n.Ld):n.Ld):n.Ld,O.map((e=>this._interface[e]?this._renderIPConfiguration(e):n.Ld)),this._dirty?(0,n.dy)(w||(w=U`<ha-alert alert-type="warning"> ${0} </ha-alert>`),this.hass.localize("ui.panel.config.network.supervisor.warning")):n.Ld,this._updateNetwork,!this._dirty,this._processing?(0,n.dy)($||($=U`<ha-spinner size="small"></ha-spinner>`)):this.hass.localize("ui.common.save"),this._clear,this.hass.localize("ui.panel.config.network.supervisor.reset"))}},{kind:"method",key:"_selectAP",value:function(e){this._wifiConfiguration=e.currentTarget.ap,O.forEach((e=>{"disabled"===this._interface[e].method&&(this._interface[e].method="auto")})),this._dirty=!0}},{kind:"method",key:"_scanForAP",value:async function(){if(this._interface){this._scanning=!0;try{var e;const t=await(0,l.Ne)(this.hass,this._interface.interface);this._accessPoints=[],null===(e=t.accesspoints)||void 0===e||e.forEach((e=>{if(e.ssid){const t=this._accessPoints.find((t=>t.ssid===e.ssid));t?e.signal>t.signal&&(this._accessPoints=this._accessPoints.filter((t=>t.ssid!==e.ssid)),this._accessPoints.push(e)):this._accessPoints.push(e)}}))}catch(t){(0,c.showAlertDialog)(this,{title:"Failed to scan for accesspoints",text:(0,d.js)(t)})}finally{this._scanning=!1}}}},{kind:"method",key:"_renderIPConfiguration",value:function(e){var t,i,a,o,r,s,d,c;if(!("wireless"!==(null===(t=this._interface)||void 0===t?void 0:t.type)||null!==(i=this._wifiConfiguration)&&void 0!==i&&i.ssid||null!==(a=this._interface.wifi)&&void 0!==a&&a.ssid))return n.Ld;const h=(null===(o=this._interface[e])||void 0===o?void 0:o.nameservers)||[];0===h.length&&h.push("");const u="auto"===(null===(r=this._interface[e])||void 0===r?void 0:r.method);return(0,n.dy)(C||(C=U` <ha-expansion-panel .header="${0}" outlined> <div class="radio-row"> <ha-formfield .label="${0}"> <ha-radio @change="${0}" .version="${0}" value="auto" name="${0}method" .checked="${0}"> </ha-radio> </ha-formfield> <ha-formfield .label="${0}"> <ha-radio @change="${0}" .version="${0}" value="static" name="${0}method" .checked="${0}"> </ha-radio> </ha-formfield> <ha-formfield .label="${0}" class="warning"> <ha-radio @change="${0}" .version="${0}" value="disabled" name="${0}method" .checked="${0}"> </ha-radio> </ha-formfield> </div> ${0} </ha-expansion-panel> `),`IPv${e.charAt(e.length-1)}`,this.hass.localize("ui.panel.config.network.supervisor.auto"),this._handleRadioValueChanged,e,e,"auto"===(null===(s=this._interface[e])||void 0===s?void 0:s.method),this.hass.localize("ui.panel.config.network.supervisor.static"),this._handleRadioValueChanged,e,e,"static"===(null===(d=this._interface[e])||void 0===d?void 0:d.method),this.hass.localize("ui.panel.config.network.supervisor.disabled"),this._handleRadioValueChanged,e,e,"disabled"===(null===(c=this._interface[e])||void 0===c?void 0:c.method),["static","auto"].includes(this._interface[e].method)?(0,n.dy)(L||(L=U` ${0} ${0} <ha-textfield id="gateway" .label="${0}" .version="${0}" .value="${0}" @change="${0}" .disabled="${0}"> </ha-textfield> <div class="nameservers"> ${0} </div> <ha-button-menu @opened="${0}" @closed="${0}" .version="${0}" class="add-nameserver"> <ha-button slot="trigger"> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-button> ${0} <ha-list-item @click="${0}" .version="${0}"> ${0} </ha-list-item> </ha-button-menu> `),this._interface[e].address.map(((t,i)=>{const{ip:a,mask:o}=(0,l.Cy)(t);return(0,n.dy)(S||(S=U` <div class="address-row"> <ha-textfield id="address" .label="${0}" .version="${0}" .value="${0}" .index="${0}" @change="${0}" .disabled="${0}"> </ha-textfield> <ha-textfield id="netmask" .label="${0}" .version="${0}" .value="${0}" .index="${0}" @change="${0}" .disabled="${0}"> </ha-textfield> ${0} </div> `),this.hass.localize("ui.panel.config.network.supervisor.ip"),e,a,i,this._handleInputValueChanged,u,this.hass.localize("ui.panel.config.network.supervisor.netmask"),e,o,i,this._handleInputValueChanged,u,this._interface[e].address.length>1&&!u?(0,n.dy)(z||(z=U` <ha-icon-button .label="${0}" .path="${0}" .version="${0}" .index="${0}" @click="${0}"></ha-icon-button> `),this.hass.localize("ui.common.delete"),T,e,i,this._removeAddress):n.Ld)})),u?n.Ld:(0,n.dy)(A||(A=U` <ha-button @click="${0}" .version="${0}" class="add-address"> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-button> `),this._addAddress,e,this.hass.localize("ui.panel.config.network.supervisor.add_address"),V),this.hass.localize("ui.panel.config.network.supervisor.gateway"),e,this._interface[e].gateway||"",this._handleInputValueChanged,u,h.map(((t,i)=>{var a;return(0,n.dy)(M||(M=U` <div class="address-row"> <ha-textfield id="nameserver" .label="${0}" .version="${0}" .value="${0}" .index="${0}" @change="${0}"> </ha-textfield> ${0} </div> `),this.hass.localize("ui.panel.config.network.supervisor.dns_server"),e,t,i,this._handleInputValueChanged,(null===(a=this._interface[e].nameservers)||void 0===a?void 0:a.length)>1?(0,n.dy)(B||(B=U` <ha-icon-button .label="${0}" .path="${0}" .version="${0}" .index="${0}" @click="${0}"></ha-icon-button> `),this.hass.localize("ui.common.delete"),T,e,i,this._removeNameserver):n.Ld)})),this._handleDNSMenuOpened,this._handleDNSMenuClosed,e,this.hass.localize("ui.panel.config.network.supervisor.add_dns_server"),this._dnsMenuOpen?E:V,Object.entries(Z[e]).map((([t,i])=>(0,n.dy)(P||(P=U` <ha-list-item @click="${0}" .version="${0}" .addresses="${0}"> ${0} </ha-list-item> `),this._addPredefinedDNS,e,i,t))),this._addCustomDNS,e,this.hass.localize("ui.panel.config.network.supervisor.custom_dns")):n.Ld)}},{kind:"method",key:"_updateNetwork",value:async function(){var e,t;this._processing=!0;let i={};O.forEach((e=>{var t,a,n,o,r;(i[e]={method:(null===(t=this._interface[e])||void 0===t?void 0:t.method)||"auto",nameservers:null===(a=this._interface[e])||void 0===a||null===(a=a.nameservers)||void 0===a?void 0:a.filter((e=>e.trim()))},"static"===(null===(n=this._interface[e])||void 0===n?void 0:n.method))&&(i[e]=Object.assign(Object.assign({},i[e]),{},{address:null===(o=this._interface[e])||void 0===o||null===(o=o.address)||void 0===o?void 0:o.filter((e=>e.trim())),gateway:null===(r=this._interface[e])||void 0===r?void 0:r.gateway}))})),this._wifiConfiguration&&(i=Object.assign(Object.assign({},i),{},{wifi:{ssid:this._wifiConfiguration.ssid,mode:this._wifiConfiguration.mode,auth:this._wifiConfiguration.auth||"open"}}),"open"!==i.wifi.auth&&(i.wifi=Object.assign(Object.assign({},i.wifi),{},{psk:this._wifiConfiguration.psk}))),i.enabled=!("disabled"===(null===(e=i.ipv4)||void 0===e?void 0:e.method)&&"disabled"===(null===(t=i.ipv6)||void 0===t?void 0:t.method)||"wireless"===this._interface.type&&void 0===this._wifiConfiguration&&!this._interface.wifi);try{await(0,l.tJ)(this.hass,this._interface.interface,i),this._dirty=!1,await this._fetchNetworkInfo()}catch(a){(0,c.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.network.supervisor.failed_to_change"),text:(0,d.js)(a)})}finally{this._processing=!1}}},{kind:"method",key:"_clear",value:async function(){await this._fetchNetworkInfo(),this._interface.ipv4.method="auto",this._interface.ipv4.nameservers=[],this._interface.ipv6.method="auto",this._interface.ipv6.nameservers=[],this._interface.wifi=null,this._wifiConfiguration=void 0,this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_handleTabActivated",value:async function(e){if(this._dirty){if(!(await(0,c.showConfirmationDialog)(this,{text:this.hass.localize("ui.panel.config.network.supervisor.unsaved"),confirmText:this.hass.localize("ui.common.yes"),dismissText:this.hass.localize("ui.common.no")})))return void this.requestUpdate("_interface")}this._curTabIndex=e.detail.index,this._interface=Object.assign({},this._interfaces[e.detail.index])}},{kind:"method",key:"_handleRadioValueChanged",value:function(e){const t=e.target.value,i=e.target.version;t&&this._interface&&this._interface[i].method!==t&&(this._dirty=!0,this._interface[i].method=t,this.requestUpdate("_interface"))}},{kind:"method",key:"_handleRadioValueChangedAp",value:function(e){const t=e.target.value;this._wifiConfiguration.auth=t,this._dirty=!0,this.requestUpdate("_wifiConfiguration")}},{kind:"method",key:"_handleInputValueChanged",value:function(e){var t;const i=e.target,a=i.value,n=e.target.version,o=i.id;if(a&&null!==(t=this._interface)&&void 0!==t&&t[n])if(this._dirty=!0,"address"===o){const t=e.target.index,{mask:i}=(0,l.Cy)(this._interface[n].address[t]),{mask:o}=(0,l.Cy)(a);this._interface[n].address[t]=(0,l.Tg)(a,o||i||""),this.requestUpdate("_interface")}else if("netmask"===o){const t=e.target.index,{ip:i}=(0,l.Cy)(this._interface[n].address[t]);this._interface[n].address[t]=(0,l.Tg)(i,a),this.requestUpdate("_interface")}else if("nameserver"===o){const t=e.target.index;this._interface[n].nameservers[t]=a,this.requestUpdate("_interface")}else this._interface[n][o]=a}},{kind:"method",key:"_handleInputValueChangedWifi",value:function(e){const t=e.target,i=t.value,a=t.id;i&&this._wifiConfiguration&&this._wifiConfiguration[a]!==i&&(this._dirty=!0,this._wifiConfiguration[a]=i)}},{kind:"method",key:"_addAddress",value:function(e){const t=e.target.version;this._interface[t].address.push("ipv4"===t?"0.0.0.0/24":"::/64"),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_removeAddress",value:function(e){const t=e.target,i=t.index,a=t.version;this._interface[a].address.splice(i,1),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_handleDNSMenuOpened",value:function(){this._dnsMenuOpen=!0}},{kind:"method",key:"_handleDNSMenuClosed",value:function(){this._dnsMenuOpen=!1}},{kind:"method",key:"_addPredefinedDNS",value:function(e){const t=e.target,i=t.version,a=t.addresses;this._interface[i].nameservers||(this._interface[i].nameservers=[]),this._interface[i].nameservers.push(...a),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_addCustomDNS",value:function(e){const t=e.target.version;this._interface[t].nameservers||(this._interface[t].nameservers=[]),this._interface[t].nameservers.push(""),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_removeNameserver",value:function(e){const t=e.target,i=t.index,a=t.version;this._interface[a].nameservers.splice(i,1),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"get",static:!0,key:"styles",value:function(){return[(0,n.iv)(I||(I=U`mwc-tab-bar{border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12));margin-bottom:24px}.content{display:block;padding:20px 24px}ha-button.warning{--mdc-theme-primary:var(--error-color)}ha-button.scan{margin-left:8px;margin-inline-start:8px;margin-inline-end:initial}ha-expansion-panel{--expansion-panel-summary-padding:0 16px;margin:4px 0}ha-textfield{display:block;margin-top:16px}.address-row{display:flex;flex-direction:row;gap:8px;align-items:center}.address-row ha-textfield{flex:1}.address-row ha-icon-button{--mdc-icon-button-size:36px;margin-top:16px}.add-address,.add-nameserver{margin-top:16px}ha-list-item{--mdc-list-side-padding:10px}.card-actions{display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center}ha-expansion-panel>:last-child{margin-bottom:16px}`))]}}]}}),n.oi);t()}catch(u){t(u)}}))},16485:function(e,t,i){i.a(e,(async function(e,t){try{i(71695),i(92745),i(40251),i(47021);var a=i(61449),n=i(40574),o=i(30532),r=i(41674),s=i(49722),d=i(76632),l=i(7884),c=i(35185),h=i(65401),u=i(44180),p=i(49447);const e=async()=>{const e=(0,u.sS)(),t=[];(0,o.shouldPolyfill)()&&await Promise.all([i.e("80210"),i.e("74055")]).then(i.bind(i,98133)),(0,s.shouldPolyfill)()&&await Promise.all([i.e("2142"),i.e("75297"),i.e("80210"),i.e("60251")]).then(i.bind(i,59095)),(0,a.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("68250")]).then(i.bind(i,80561)).then((()=>(0,p.H)()))),(0,h.shouldPolyfill)()&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("65578")]).then(i.bind(i,97995))),(0,n.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("59826")]).then(i.bind(i,31514))),(0,r.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("23649")]).then(i.bind(i,93840))),(0,d.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("42831")]).then(i.bind(i,29559))),(0,l.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("57377")]).then(i.bind(i,39030)).then((()=>i.e("61236").then(i.t.bind(i,4121,23))))),(0,c.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("13870")]).then(i.bind(i,74546))),0!==t.length&&await Promise.all(t).then((()=>(0,p.n)(e)))};await e(),t()}catch(f){t(f)}}),1)},28008:function(e,t,i){i.d(t,{$c:()=>p,Qx:()=>h,k1:()=>c,yu:()=>u});var a=i(57243);let n,o,r,s,d,l=e=>e;const c=(0,a.iv)(n||(n=l`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),h=(0,a.iv)(o||(o=l`:host{font-family:var(--paper-font-body1_-_font-family);-webkit-font-smoothing:var(--paper-font-body1_-_-webkit-font-smoothing);font-size:var(--paper-font-body1_-_font-size);font-weight:var(--paper-font-body1_-_font-weight);line-height:var(--paper-font-body1_-_line-height)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}h1{font-family:var(--paper-font-headline_-_font-family);-webkit-font-smoothing:var(--paper-font-headline_-_-webkit-font-smoothing);white-space:var(--paper-font-headline_-_white-space);overflow:var(--paper-font-headline_-_overflow);text-overflow:var(--paper-font-headline_-_text-overflow);font-size:var(--paper-font-headline_-_font-size);font-weight:var(--paper-font-headline_-_font-weight);line-height:var(--paper-font-headline_-_line-height)}h2{font-family:var(--paper-font-title_-_font-family);-webkit-font-smoothing:var(--paper-font-title_-_-webkit-font-smoothing);white-space:var(--paper-font-title_-_white-space);overflow:var(--paper-font-title_-_overflow);text-overflow:var(--paper-font-title_-_text-overflow);font-size:var(--paper-font-title_-_font-size);font-weight:var(--paper-font-title_-_font-weight);line-height:var(--paper-font-title_-_line-height)}h3{font-family:var(--paper-font-subhead_-_font-family);-webkit-font-smoothing:var(--paper-font-subhead_-_-webkit-font-smoothing);white-space:var(--paper-font-subhead_-_white-space);overflow:var(--paper-font-subhead_-_overflow);text-overflow:var(--paper-font-subhead_-_text-overflow);font-size:var(--paper-font-subhead_-_font-size);font-weight:var(--paper-font-subhead_-_font-weight);line-height:var(--paper-font-subhead_-_line-height)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}${0} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`),c),u=(0,a.iv)(r||(r=l`ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between}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-dialog{--mdc-dialog-min-width:calc(
        100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
      );--mdc-dialog-max-width:calc(
        100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
      );--mdc-dialog-min-height:100%;--mdc-dialog-max-height:100%;--vertical-align-dialog:flex-end;--ha-dialog-border-radius:0}}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}.error{color:var(--error-color)}`)),p=(0,a.iv)(s||(s=l`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{-webkit-border-radius:4px;border-radius:4px;background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,a.iv)(d||(d=l`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},11225:function(e,t,i){i.d(t,{t:()=>a});i(19134),i(97499),i(97003);function a(e){return e.endsWith(".ui.nabu.casa")?"https://•••••••••••••••••.ui.nabu.casa":e.replace(/(?<=:\/\/)[\w-]+|(?<=\.)[\w-]+/g,(e=>"•".repeat(e.length)))}}}]);
//# sourceMappingURL=16930.56449d3b7190a46b.js.map