iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
9 lines • 62.9 kB
JavaScript
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["40503"],{72344:function(e,t,i){i.d(t,{p:()=>a});i(19083),i(61006);const a=(e,t)=>e&&e.config.components.includes(t)},17803:function(e,t,i){i.d(t,{I:()=>a,_:()=>o});i(19083),i(71695),i(61006),i(47021);const a=(e,t,i,a)=>{const[o,n,r]=e.split(".",3);return Number(o)>t||Number(o)===t&&(void 0===a?Number(n)>=i:Number(n)>i)||void 0!==a&&Number(o)===t&&Number(n)===i&&Number(r)>=a},o=e=>e.includes("dev")},73358:function(e,t,i){i.d(t,{AF:()=>r,Kk:()=>d,PS:()=>a,a5:()=>n,gD:()=>h,iY:()=>u,lC:()=>c,ot:()=>f,tj:()=>s,uo:()=>l,zF:()=>o});i(71695),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(47021);const a=66977!=i.j?["alert","button","climate","cover","configurator","event","input_button","input_select","input_number","input_text","humidifier","lawn_mower","lock","media_player","number","scene","script","select","timer","text","update","vacuum","water_heater"]:null,o=99387==i.j?["sensor","binary_sensor","calendar","camera","device_tracker","image","weather"]:null,n=99387==i.j?["assist_satellite","conversation","stt","tts"]:null,r=["automation","button","cover","date","datetime","fan","group","humidifier","input_boolean","input_button","input_datetime","input_number","input_select","input_text","light","lock","media_player","number","scene","script","select","switch","text","time","vacuum","valve"],s=["closed","locked","off"],l="on",c="off",d=new Set(["fan","input_boolean","light","switch","group","automation","humidifier","valve"]),u=new Set(["camera","image","media_player"]),f="°C",h="°F"},68958:function(e,t,i){i.d(t,{t:()=>n});i(92745),i(9359),i(31526),i(77439),i(19423),i(88972);class a{constructor(e=window.localStorage){this.storage=void 0,this._storage={},this._listeners={},this.storage=e,e===window.localStorage&&window.addEventListener("storage",(e=>{e.key&&this.hasKey(e.key)&&(this._storage[e.key]=e.newValue?JSON.parse(e.newValue):e.newValue,this._listeners[e.key]&&this._listeners[e.key].forEach((t=>t(e.oldValue?JSON.parse(e.oldValue):e.oldValue,this._storage[e.key]))))}))}addFromStorage(e){if(!this._storage[e]){const t=this.storage.getItem(e);t&&(this._storage[e]=JSON.parse(t))}}subscribeChanges(e,t){return this._listeners[e]?this._listeners[e].push(t):this._listeners[e]=[t],()=>{this.unsubscribeChanges(e,t)}}unsubscribeChanges(e,t){if(!(e in this._listeners))return;const i=this._listeners[e].indexOf(t);-1!==i&&this._listeners[e].splice(i,1)}hasKey(e){return e in this._storage}getValue(e){return this._storage[e]}setValue(e,t){const i=this._storage[e];this._storage[e]=t;try{void 0===t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify(t))}catch(a){}finally{this._listeners[e]&&this._listeners[e].forEach((e=>e(i,t)))}}}const o={},n=e=>t=>{const i=e.storage||"localStorage";let n;i&&i in o?n=o[i]:(n=new a(window[i]),o[i]=n);const r=String(t.key),s=e.key||String(t.key),l=t.initializer?t.initializer():void 0;n.addFromStorage(s);const c=!1!==e.subscribe?e=>n.subscribeChanges(s,((i,a)=>{e.requestUpdate(t.key,i)})):void 0,d=()=>n.hasKey(s)?e.deserializer?e.deserializer(n.getValue(s)):n.getValue(s):l;return{kind:"method",placement:"prototype",key:t.key,descriptor:{set(i){((i,a)=>{let o;e.state&&(o=d()),n.setValue(s,e.serializer?e.serializer(a):a),e.state&&i.requestUpdate(t.key,o)})(this,i)},get(){return d()},enumerable:!0,configurable:!0},finisher(i){if(e.state&&e.subscribe){const e=i.prototype.connectedCallback,t=i.prototype.disconnectedCallback;i.prototype.connectedCallback=function(){e.call(this),this[`__unbsubLocalStorage${r}`]=null==c?void 0:c(this)},i.prototype.disconnectedCallback=function(){var e;t.call(this),null===(e=this[`__unbsubLocalStorage${r}`])||void 0===e||e.call(this),this[`__unbsubLocalStorage${r}`]=void 0}}e.state&&i.createProperty(t.key,Object.assign({noAccessor:!0},e.stateOptions))}}}},84200:function(e,t,i){i.d(t,{r:()=>o});i(71695),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(47021);const a=(e,t,i=true)=>{var o;if(!e||e===document.body)return null;if((e=null!==(o=e.assignedSlot)&&void 0!==o?o:e).parentElement)e=e.parentElement;else{const t=e.getRootNode();e=t instanceof ShadowRoot?t.host:null}return(i?Object.prototype.hasOwnProperty.call(e,t):e&&t in e)?e:a(e,t,i)},o=(e,t,i=true)=>{const o=new Set;for(;e;)o.add(e),e=a(e,t,i);return o}},81165:function(e,t,i){i.d(t,{j:()=>a});const a=(e=document)=>{var t;return null!==(t=e.activeElement)&&void 0!==t&&null!==(t=t.shadowRoot)&&void 0!==t&&t.activeElement?a(e.activeElement.shadowRoot):e.activeElement}},62201:function(e,t,i){i.d(t,{K:()=>a});const a=(e,t)=>{const i=matchMedia(e),a=e=>t(e.matches);return i.addListener(a),t(i.matches),()=>i.removeListener(a)}},88128:function(e,t,i){i.d(t,{P:()=>a});const a=e=>e.preventDefault()},49976:function(e,t,i){i.d(t,{U:()=>a});const a=e=>e.stopPropagation()},86431:function(e,t,i){i.d(t,{jL:()=>o,wZ:()=>n});i(71695),i(81804),i(47021);var a=i(47194);const o=e=>{var t;return null===(t=e.name_by_user||e.name)||void 0===t?void 0:t.trim()},n=(e,t,i)=>o(e)||i&&r(t,i)||t.localize("ui.panel.config.devices.unnamed_device",{type:t.localize(`ui.panel.config.devices.type.${e.entry_type||"device"}`)}),r=(e,t)=>{for(const i of t||[]){const t="string"==typeof i?i:i.entity_id,o=e.states[t];if(o)return(0,a.C)(o)}}},83523:function(e,t,i){i.d(t,{c:()=>r});i(40251),i(19134),i(97003);var a=i(76525),o=i(36522),n=i(5111);const r=async(e,t,i=Date.now())=>{var s;const{history:l}=n.E;if(null!==(s=l.state)&&void 0!==s&&s.dialog&&Date.now()-i<500){return await(0,a.ts)()?new Promise((a=>{setTimeout((()=>{r(e,t,i).then(a)}))})):(console.warn("Navigation blocked, because dialog refused to close"),!1)}const c=(null==t?void 0:t.replace)||!1;var d,u,f;return c?l.replaceState(null!==(d=l.state)&&void 0!==d&&d.root?{root:!0}:null!==(u=null==t?void 0:t.data)&&void 0!==u?u:null,"",e):l.pushState(null!==(f=null==t?void 0:t.data)&&void 0!==f?f:null,"",e),(0,o.B)(n.E,"location-changed",{replace:c}),!0}},41680:function(e,t,i){i.d(t,{p:()=>o});i(71695),i(92745),i(77439),i(19134),i(97003),i(47021);var a=i(62900);const o=(e,t)=>{if(!(t instanceof a.DD))return{warnings:[t.message],errors:void 0};const i=[],o=[];for(const a of t.failures())if(void 0===a.value)i.push(e.localize("ui.errors.config.key_missing",{key:a.path.join(".")}));else if("never"===a.type)o.push(e.localize("ui.errors.config.key_not_expected",{key:a.path.join(".")}));else{if("union"===a.type)continue;"enums"===a.type?o.push(e.localize("ui.errors.config.key_wrong_type",{key:a.path.join("."),type_correct:a.message.replace("Expected ","").split(", ")[0],type_wrong:JSON.stringify(a.value)})):o.push(e.localize("ui.errors.config.key_wrong_type",{key:a.path.join("."),type_correct:a.refinement||a.type,type_wrong:JSON.stringify(a.value)}))}return{warnings:o,errors:i}}},48045:function(e,t,i){i.d(t,{v:()=>a});i(71695),i(69235),i(12385),i(19134),i(32517),i(11740),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(47021);const a=(e,t)=>{if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let i,o;if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!a(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!a(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e);if(o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(!a(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}},37394:function(e,t,i){i.d(t,{n:()=>o});i(52247),i(71695),i(40251),i(47021);class a extends Error{constructor(e,...t){super(...t),this.timeout=void 0,Error.captureStackTrace&&Error.captureStackTrace(this,a),this.name="TimeoutError",this.timeout=e,this.message=`Timed out in ${e} ms.`}}const o=(e,t)=>{const i=new Promise(((t,i)=>{setTimeout((()=>{i(new a(e))}),e)}));return Promise.race([t,i])}},76320:function(e,t,i){i.d(t,{T:()=>a,y:()=>o});i(40251);const a=e=>{requestAnimationFrame((()=>setTimeout(e,0)))},o=()=>new Promise((e=>{a(e)}))},34273:function(e,t,i){var a=i(61701),o=i(72621),n=(i(71695),i(9359),i(31526),i(47021),i(22997),i(57243)),r=i(50778),s=i(5111),l=i(76525);let c,d,u=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:l.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,n.dy)(c||(c=u` <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,o.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,n.iv)(d||(d=u`:host{display:inline-block;position:relative}::slotted([disabled]){color:var(--disabled-text-color)}`))}}]}}),n.oi)},83456:function(e,t,i){var a=i(61701),o=(i(71695),i(47021),i(92444)),n=i(76688),r=i(57243),s=i(50778);let l,c=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[n.W,(0,r.iv)(l||(l=c`:host{--mdc-theme-secondary:var(--primary-color)}`))]}}]}}),o.A)},29073:function(e,t,i){i.d(t,{u:()=>k});var a=i(61701),o=i(72621),n=(i(71695),i(9359),i(31526),i(70104),i(19423),i(40251),i(47021),i(57243)),r=i(50778),s=i(29567),l=i(36522);i(99426),i(66671);let c,d,u,f,h,p,m,g,y,v=e=>e;const b={boolean:()=>Promise.all([i.e("29570"),i.e("79350")]).then(i.bind(i,8353)),constant:()=>i.e("69654").then(i.bind(i,5606)),float:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("62022")]).then(i.bind(i,53203)),grid:()=>i.e("45036").then(i.bind(i,20018)),expandable:()=>i.e("42653").then(i.bind(i,91624)),integer:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("42950"),i.e("29570"),i.e("65505"),i.e("92139"),i.e("17375"),i.e("42849")]).then(i.bind(i,96116)),multi_select:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("56898"),i.e("42950"),i.e("29570"),i.e("65505"),i.e("5080"),i.e("50408"),i.e("13204"),i.e("99562")]).then(i.bind(i,84545)),positive_time_period_dict:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("3688"),i.e("38336"),i.e("63016")]).then(i.bind(i,15063)),select:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("24199"),i.e("41258"),i.e("56898"),i.e("78943"),i.e("35671"),i.e("42950"),i.e("29570"),i.e("65505"),i.e("7010"),i.e("62524"),i.e("34561"),i.e("47818"),i.e("22542")]).then(i.bind(i,62706)),string:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("36620")]).then(i.bind(i,8327)),optional_actions:()=>i.e("85230").then(i.bind(i,26709))},_=(e,t)=>e?!t.name||t.flatten?e:e[t.name]:null;let k=(0,a.Z)([(0,r.Mo)("ha-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.Cb)({attribute:!1})],key:"data",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"schema",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"error",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"warning",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeError",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeWarning",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeLabel",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"computeHelper",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"localizeValue",value:void 0},{kind:"method",key:"getFormProperties",value:function(){return{}}},{kind:"method",key:"focus",value:async function(){await this.updateComplete;const e=this.renderRoot.querySelector(".root");if(e)for(const t of e.children)if("HA-ALERT"!==t.tagName){t instanceof n.fl&&await t.updateComplete,t.focus();break}}},{kind:"method",key:"willUpdate",value:function(e){e.has("schema")&&this.schema&&this.schema.forEach((e=>{var t;"selector"in e||null===(t=b[e.type])||void 0===t||t.call(b)}))}},{kind:"method",key:"render",value:function(){return(0,n.dy)(c||(c=v` <div class="root" part="root"> ${0} ${0} </div> `),this.error&&this.error.base?(0,n.dy)(d||(d=v` <ha-alert alert-type="error"> ${0} </ha-alert> `),this._computeError(this.error.base,this.schema)):"",this.schema.map((e=>{var t;const i=((e,t)=>e&&t.name?e[t.name]:null)(this.error,e),a=((e,t)=>e&&t.name?e[t.name]:null)(this.warning,e);return(0,n.dy)(u||(u=v` ${0} ${0} `),i?(0,n.dy)(f||(f=v` <ha-alert own-margin alert-type="error"> ${0} </ha-alert> `),this._computeError(i,e)):a?(0,n.dy)(h||(h=v` <ha-alert own-margin alert-type="warning"> ${0} </ha-alert> `),this._computeWarning(a,e)):"","selector"in e?(0,n.dy)(p||(p=v`<ha-selector .schema="${0}" .hass="${0}" .name="${0}" .selector="${0}" .value="${0}" .label="${0}" .disabled="${0}" .placeholder="${0}" .helper="${0}" .localizeValue="${0}" .required="${0}" .context="${0}"></ha-selector>`),e,this.hass,e.name,e.selector,_(this.data,e),this._computeLabel(e,this.data),e.disabled||this.disabled||!1,e.required?"":e.default,this._computeHelper(e),this.localizeValue,e.required||!1,this._generateContext(e)):(0,s.h)(this.fieldElementName(e.type),Object.assign({schema:e,data:_(this.data,e),label:this._computeLabel(e,this.data),helper:this._computeHelper(e),disabled:this.disabled||e.disabled||!1,hass:this.hass,localize:null===(t=this.hass)||void 0===t?void 0:t.localize,computeLabel:this.computeLabel,computeHelper:this.computeHelper,localizeValue:this.localizeValue,context:this._generateContext(e)},this.getFormProperties())))})))}},{kind:"method",key:"fieldElementName",value:function(e){return`ha-form-${e}`}},{kind:"method",key:"_generateContext",value:function(e){if(!e.context)return;const t={};for(const[i,a]of Object.entries(e.context))t[i]=this.data[a];return t}},{kind:"method",key:"createRenderRoot",value:function(){const e=(0,o.Z)(i,"createRenderRoot",this,3)([]);return this.addValueChangedListener(e),e}},{kind:"method",key:"addValueChangedListener",value:function(e){e.addEventListener("value-changed",(e=>{e.stopPropagation();const t=e.target.schema;if(e.target===this)return;const i=!t.name||"flatten"in t&&t.flatten?e.detail.value:{[t.name]:e.detail.value};this.data=Object.assign(Object.assign({},this.data),i),(0,l.B)(this,"value-changed",{value:this.data})}))}},{kind:"method",key:"_computeLabel",value:function(e,t){return this.computeLabel?this.computeLabel(e,t):e?e.name:""}},{kind:"method",key:"_computeHelper",value:function(e){return this.computeHelper?this.computeHelper(e):""}},{kind:"method",key:"_computeError",value:function(e,t){return Array.isArray(e)?(0,n.dy)(m||(m=v`<ul> ${0} </ul>`),e.map((e=>(0,n.dy)(g||(g=v`<li> ${0} </li>`),this.computeError?this.computeError(e,t):e)))):this.computeError?this.computeError(e,t):e}},{kind:"method",key:"_computeWarning",value:function(e,t){return this.computeWarning?this.computeWarning(e,t):e}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(y||(y=v`.root>*{display:block}.root>:not([own-margin]):not(:last-child){margin-bottom:24px}ha-alert[own-margin]{margin-bottom:4px}`))}}]}}),n.oi)},65981:function(e,t,i){i.r(t),i.d(t,{HaIcon:()=>L});var a=i(61701),o=i(72621),n=(i(19083),i(71695),i(40251),i(61006),i(47021),i(57243)),r=i(50778),s=i(36522),l=i(22381),c=i(80654),d=(i(92745),i(9359),i(31526),i(27608)),u=i(27486),f=i(37394);const h=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}'),p=(0,u.Z)((async()=>{const e=(0,d.MT)("hass-icon-db","mdi-icon-store");{const t=await(0,d.U2)("_version",e);t?t!==h.version&&(await(0,d.ZH)(e),(0,d.t8)("_version",h.version,e)):(0,d.t8)("_version",h.version,e)}return e})),m=["mdi","hass","hassio","hademo"];let g=[];i(37583);let y,v,b,_=e=>e;const k={},w={},C=(0,l.D)((()=>(async e=>{const t=Object.keys(e),i=await Promise.all(Object.values(e));(await p())("readwrite",(a=>{i.forEach(((i,o)=>{Object.entries(i).forEach((([e,t])=>{a.put(t,e)})),delete e[t[o]]}))}))})(w)),2e3),A={};let L=(0,a.Z)([(0,r.Mo)("ha-icon")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,r.Cb)()],key:"icon",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_path",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_secondaryPath",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_viewBox",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_legacy",value(){return!1}},{kind:"method",key:"willUpdate",value:function(e){(0,o.Z)(a,"willUpdate",this,3)([e]),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}},{kind:"method",key:"render",value:function(){return this.icon?this._legacy?(0,n.dy)(y||(y=_` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,n.dy)(v||(v=_`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):n.Ld}},{kind:"method",key:"_loadIcon",value:async function(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let o,n=a;if(!t||!n)return;if(!m.includes(t)){const i=c.g[t];return i?void(i&&"function"==typeof i.getIcon&&this._setCustomPath(i.getIcon(n),e)):void(this._legacy=!0)}if(this._legacy=!1,n in k){const e=k[n];let i;e.newName?(i=`Icon ${t}:${n} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,n=e.newName):i=`Icon ${t}:${n} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(i),(0,s.B)(this,"write_log",{level:"warning",message:i})}if(n in A)return void(this._path=A[n]);if("home-assistant"===n){const t=(await i.e("48348").then(i.bind(i,30511))).mdiHomeAssistant;return this.icon===e&&(this._path=t),void(A[n]=t)}try{o=await(e=>new Promise(((t,i)=>{if(g.push([e,t,i]),g.length>1)return;const a=p();(0,f.n)(1e3,(async()=>{(await a)("readonly",(e=>{for(const[t,i,a]of g)(0,d.RV)(e.get(t)).then((e=>i(e))).catch((e=>a(e)));g=[]}))})()).catch((e=>{for(const[,,t]of g)t(e);g=[]}))})))(n)}catch(u){o=void 0}if(o)return this.icon===e&&(this._path=o),void(A[n]=o);const r=(e=>{let t;for(const i of h.parts){if(void 0!==i.start&&e<i.start)break;t=i}return t.file})(n);if(r in w)return void this._setPath(w[r],n,e);const l=fetch(`/static/mdi/${r}.json`).then((e=>e.json()));w[r]=l,this._setPath(l,n,e),C()}},{kind:"method",key:"_setCustomPath",value:async function(e,t){const i=await e;this.icon===t&&(this._path=i.path,this._secondaryPath=i.secondaryPath,this._viewBox=i.viewBox)}},{kind:"method",key:"_setPath",value:async function(e,t,i){const a=await e;this.icon===i&&(this._path=a[t]),A[t]=a[t]}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(b||(b=_`:host{fill:currentcolor}`))}}]}}),n.oi)},64780:function(e,t,i){var a=i(61701),o=(i(71695),i(47021),i(57243)),n=i(50778),r=i(76525),s=i(36522);i(96090);let l,c,d=e=>e;(0,a.Z)([(0,n.Mo)("ha-md-button-menu")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",key:r.gA,value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)()],key:"positioning",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"has-overflow"})],key:"hasOverflow",value(){return!1}},{kind:"field",decorators:[(0,n.IO)("ha-menu",!0)],key:"_menu",value:void 0},{kind:"get",key:"items",value:function(){return this._menu.items}},{kind:"method",key:"focus",value:function(){var e;this._menu.open?this._menu.focus():null===(e=this._triggerButton)||void 0===e||e.focus()}},{kind:"method",key:"render",value:function(){return(0,o.dy)(l||(l=d` <div @click="${0}"> <slot name="trigger" @slotchange="${0}"></slot> </div> <ha-menu .positioning="${0}" .hasOverflow="${0}" @opening="${0}" @closing="${0}"> <slot></slot> </ha-menu> `),this._handleClick,this._setTriggerAria,this.positioning,this.hasOverflow,this._handleOpening,this._handleClosing)}},{kind:"method",key:"_handleOpening",value:function(){(0,s.B)(this,"opening",void 0,{composed:!1})}},{kind:"method",key:"_handleClosing",value:function(){(0,s.B)(this,"closing",void 0,{composed:!1})}},{kind:"method",key:"_handleClick",value:function(){this.disabled||(this._menu.anchorElement=this,this._menu.open?this._menu.close():this._menu.show())}},{kind:"get",key:"_triggerButton",value:function(){return this.querySelector('ha-icon-button[slot="trigger"], mwc-button[slot="trigger"], ha-assist-chip[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=d`:host{display:inline-block;position:relative}::slotted([disabled]){color:var(--disabled-text-color)}`))}}]}}),o.oi)},51868:function(e,t,i){var a=i(61701),o=i(72621),n=(i(71695),i(47021),i(1231)),r=i(57243),s=i(50778);let l,c=e=>e;(0,a.Z)([(0,s.Mo)("ha-md-divider")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",static:!0,key:"styles",value(){return[...(0,o.Z)(i,"styles",this),(0,r.iv)(l||(l=c`:host{--md-divider-color:var(--divider-color)}`))]}}]}}),n.B)},7843:function(e,t,i){var a=i(61701),o=i(72621),n=(i(71695),i(47021),i(28674)),r=i(57243),s=i(50778);let l,c=e=>e;(0,a.Z)([(0,s.Mo)("ha-md-menu-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"clickAction",value:void 0},{kind:"field",static:!0,key:"styles",value(){return[...(0,o.Z)(i,"styles",this),(0,r.iv)(l||(l=c`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-on-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color);--md-sys-color-secondary-container:rgba(
var(--rgb-primary-color),
0.15
);--md-sys-color-on-secondary-container:var(--text-primary-color);--mdc-icon-size:16px;--md-sys-color-on-primary-container:var(--primary-text-color);--md-sys-color-on-secondary-container:var(--primary-text-color);--md-menu-item-label-text-font:Roboto,sans-serif}:host(.warning){--md-menu-item-label-text-color:var(--error-color);--md-menu-item-leading-icon-color:var(--error-color)}::slotted([slot=headline]){text-wrap:nowrap}`))]}}]}}),n.i)},96090:function(e,t,i){var a=i(61701),o=i(72621),n=(i(71695),i(47021),i(53336)),r=i(7162),s=i(57243),l=i(50778);let c,d=e=>e;(0,a.Z)([(0,l.Mo)("ha-menu")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"connectedCallback",value:function(){(0,o.Z)(i,"connectedCallback",this,3)([]),this.addEventListener("close-menu",this._handleCloseMenu)}},{kind:"method",key:"_handleCloseMenu",value:function(e){var t,i;e.detail.reason.kind===r.GB.KEYDOWN&&e.detail.reason.key===r.KC.ESCAPE||null===(t=(i=e.detail.initiator).clickAction)||void 0===t||t.call(i,e.detail.initiator)}},{kind:"field",static:!0,key:"styles",value(){return[...(0,o.Z)(i,"styles",this),(0,s.iv)(c||(c=d`:host{--md-sys-color-surface-container:var(--card-background-color)}`))]}}]}}),n.xX)},32669:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HaActionSelector:()=>m});var o=i(61701),n=(i(71695),i(47021),i(57243)),r=i(50778),s=i(27486),l=i(68418),c=i(40928),d=e([c]);c=(d.then?(await d)():d)[0];let u,f,h,p=e=>e,m=(0,o.Z)([(0,r.Mo)("ha-selector-action")],(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:"selector",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"value",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",key:"_actions",value(){return(0,s.Z)((e=>e?(0,l.eR)(e):[]))}},{kind:"method",key:"render",value:function(){return(0,n.dy)(u||(u=p` ${0} <ha-automation-action .disabled="${0}" .actions="${0}" .hass="${0}"></ha-automation-action> `),this.label?(0,n.dy)(f||(f=p`<label>${0}</label>`),this.label):n.Ld,this.disabled,this._actions(this.value),this.hass)}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(h||(h=p`ha-automation-action{display:block;margin-bottom:16px}label{display:block;margin-bottom:4px;font-weight:500}`))}}]}}),n.oi);a()}catch(u){a(u)}}))},56032:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(61701),o=(i(71695),i(47021),i(80519)),n=i(1261),r=i(57243),s=i(50778),l=i(85605),c=e([o]);o=(c.then?(await c)():c)[0];let d,u=e=>e;(0,l.jx)("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:150,easing:"ease"}}),(0,l.jx)("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:400,easing:"ease"}});(0,a.Z)([(0,s.Mo)("ha-tooltip")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value(){return[n.Z,(0,r.iv)(d||(d=u`:host{--sl-tooltip-background-color:var(--secondary-background-color);--sl-tooltip-color:var(--primary-text-color);--sl-tooltip-font-family:Roboto,sans-serif;--sl-tooltip-font-size:12px;--sl-tooltip-font-weight:normal;--sl-tooltip-line-height:1;--sl-tooltip-padding:8px;--sl-tooltip-border-radius:var(--ha-tooltip-border-radius, 4px);--sl-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 8px);--sl-z-index-tooltip:var(--ha-tooltip-z-index, 1000)}`))]}}]}}),o.Z);t()}catch(d){t(d)}}))},45801:function(e,t,i){var a=i(61701),o=i(72621),n=(i(71695),i(47021),i(57243)),r=i(50778),s=i(35359),l=i(69634),c=i(59847),d=i(4242);let u,f,h,p=e=>e;(0,a.Z)([(0,r.Mo)("ha-user-badge")],(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.Cb)({attribute:!1})],key:"user",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_personPicture",value:void 0},{kind:"field",key:"_personEntityId",value:void 0},{kind:"method",key:"willUpdate",value:function(e){if((0,o.Z)(i,"willUpdate",this,3)([e]),e.has("user"))return void this._getPersonPicture();const t=e.get("hass");if(this._personEntityId&&t&&this.hass.states[this._personEntityId]!==t.states[this._personEntityId]){const e=this.hass.states[this._personEntityId];e?this._personPicture=e.attributes.entity_picture:this._getPersonPicture()}else!this._personEntityId&&t&&this._getPersonPicture()}},{kind:"method",key:"render",value:function(){if(!this.hass||!this.user)return n.Ld;const e=this._personPicture;if(e)return(0,n.dy)(u||(u=p`<div style="${0}" class="picture"></div>`),(0,l.V)({backgroundImage:`url(${this.hass.hassUrl(e)})`}));const t=(0,d.fm)(this.user.name);return(0,n.dy)(f||(f=p`<div class="initials ${0}"> ${0} </div>`),(0,s.$)({long:t.length>2}),t)}},{kind:"method",key:"_getPersonPicture",value:function(){if(this._personEntityId=void 0,this._personPicture=void 0,this.hass&&this.user)for(const e of Object.values(this.hass.states))if(e.attributes.user_id===this.user.id&&"person"===(0,c.N)(e)){this._personEntityId=e.entity_id,this._personPicture=e.attributes.entity_picture;break}}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(h||(h=p`:host{display:contents}.picture{width:40px;height:40px;background-size:cover;border-radius:50%}.initials{display:inline-block;box-sizing:border-box;width:40px;line-height:40px;border-radius:50%;text-align:center;background-color:var(--light-primary-color);text-decoration:none;color:var(--text-light-primary-color,var(--primary-text-color));overflow:hidden}.initials.long{font-size:80%}`))}}]}}),n.oi)},43546:function(e,t,i){i.d(t,{Cp:()=>f,GX:()=>c,PC:()=>s,TZ:()=>h,W2:()=>u,WD:()=>r,YY:()=>m,et:()=>l,iI:()=>n,j2:()=>p,lU:()=>d,oT:()=>o,uw:()=>a});i(19083),i(9359),i(70104),i(77439),i(19423),i(40251),i(97499),i(61006);const a=28639==i.j?`${location.protocol}//${location.host}`:null,o=e=>e.map((e=>{if("string"!==e.type)return e;switch(e.name){case"username":return Object.assign(Object.assign({},e),{},{autocomplete:"username",autofocus:!0});case"password":return Object.assign(Object.assign({},e),{},{autocomplete:"current-password"});case"code":return Object.assign(Object.assign({},e),{},{autocomplete:"one-time-code",autofocus:!0});default:return e}})),n=(e,t)=>e.callWS({type:"auth/sign_path",path:t}),r=()=>fetch("/auth/providers",{credentials:"same-origin"}),s=(e,t,i)=>fetch("/auth/login_flow",{method:"POST",credentials:"same-origin",body:JSON.stringify({client_id:e,handler:i,redirect_uri:t})}),l=(e,t)=>fetch(`/auth/login_flow/${e}`,{method:"POST",credentials:"same-origin",body:JSON.stringify(t)}),c=e=>fetch(`/auth/login_flow/${e}`,{method:"DELETE",credentials:"same-origin"}),d=(e,t,i,a)=>{e.includes("?")?e.endsWith("&")||(e+="&"):e+="?",e+=`code=${encodeURIComponent(t)}`,i&&(e+=`&state=${encodeURIComponent(i)}`),a&&(e+="&storeToken=true"),document.location.assign(e)},u=async(e,t,i,a)=>e.callWS({type:"config/auth_provider/homeassistant/create",user_id:t,username:i,password:a}),f=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:t,new_password:i}),h=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:t,password:i}),p=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:t,username:i}),m=(e,t,i)=>e.callWS({type:"auth/delete_all_refresh_tokens",token_type:t,delete_current_token:i})},30635:function(e,t,i){i.d(t,{$_:()=>g,A1:()=>r,A4:()=>d,Cy:()=>n,Gn:()=>c,LW:()=>f,TD:()=>b,WC:()=>v,bI:()=>o,cR:()=>l,kd:()=>u,l3:()=>m,pw:()=>h,qF:()=>s,we:()=>y,x_:()=>p});var a=i(60738);const o=(0,a.kr)("connection"),n=(0,a.kr)("states"),r=(0,a.kr)("entities"),s=(0,a.kr)("devices"),l=(0,a.kr)("areas"),c=(0,a.kr)("localize"),d=(0,a.kr)("locale"),u=(0,a.kr)("config"),f=(0,a.kr)("themes"),h=(0,a.kr)("selectedTheme"),p=(0,a.kr)("user"),m=(0,a.kr)("userData"),g=(0,a.kr)("panels"),y=(0,a.kr)("extendedEntities"),v=(0,a.kr)("floors"),b=(0,a.kr)("labels")},80654:function(e,t,i){i.d(t,{g:()=>r});const a=window;"customIconsets"in a||(a.customIconsets={});const o=a.customIconsets,n=window;"customIcons"in n||(n.customIcons={});const r=new Proxy(n.customIcons,{get:(e,t)=>{var i;return null!==(i=e[t])&&void 0!==i?i:o[t]?{getIcon:o[t]}:void 0}})},63318:function(e,t,i){i.d(t,{Iq:()=>p,L3:()=>h,LM:()=>_,Mw:()=>C,Nv:()=>m,_V:()=>k,eD:()=>d,tf:()=>v,vA:()=>f,w1:()=>w,wX:()=>u,z3:()=>g});i(19083),i(71695),i(61893),i(9359),i(56475),i(1331),i(19423),i(47021);if(66977!=i.j)var a=i(62212);var o=i(27486),n=i(47194),r=i(1416),s=i(22381);if(66977!=i.j)var l=i(73850);const c=66977!=i.j?["sensor","binary_sensor"]:null,d=(e,t)=>{const i=t.filter((t=>e.states[t.entity_id]&&"battery"===e.states[t.entity_id].attributes.device_class&&c.includes((0,l.M)(t.entity_id)))).sort(((e,t)=>c.indexOf((0,l.M)(e.entity_id))-c.indexOf((0,l.M)(t.entity_id))));if(i.length>0)return i[0]},u=(e,t)=>t.find((t=>e.states[t.entity_id]&&"battery_charging"===e.states[t.entity_id].attributes.device_class)),f=(e,t)=>{if(t.name)return t.name;const i=e.states[t.entity_id];return i?(0,n.C)(i):t.original_name?t.original_name:t.entity_id},h=(e,t)=>e.callWS({type:"config/entity_registry/get",entity_id:t}),p=(e,t)=>e.callWS({type:"config/entity_registry/get_entries",entity_ids:t}),m=(e,t,i)=>e.callWS(Object.assign({type:"config/entity_registry/update",entity_id:t},i)),g=(e,t)=>e.callWS({type:"config/entity_registry/remove",entity_id:t}),y=e=>e.sendMessagePromise({type:"config/entity_registry/list"}),v=e=>e.sendMessagePromise({type:"config/entity_registry/list_for_display"}),b=(e,t)=>e.subscribeEvents((0,s.D)((()=>y(e).then((e=>t.setState(e,!0)))),500,!0),"entity_registry_updated"),_=(e,t)=>(0,a.B)("_entityRegistry",y,b,e,t),k=(e,t)=>e.sort(((e,i)=>(0,r.fe)(e.name||"",i.name||"",t))),w=(0,o.Z)((e=>{const t={};for(const i of e)t[i.entity_id]=i;return t})),C=(0,o.Z)((e=>{const t={};for(const i of e)t[i.id]=i;return t}))},13560:function(e,t,i){i.d(t,{j:()=>o});var a=i(36522);const o=e=>{(0,a.B)(window,"haptic",e)}},57816:function(e,t,i){if(i.d(t,{F3:()=>c,H0:()=>s,Lh:()=>l,Mt:()=>u,O:()=>m,RO:()=>h,WH:()=>r,ez:()=>n,t4:()=>d}),99387==i.j)var a=i(62212);var o=i(22381);const n=99387==i.j?{bluetooth:"config/bluetooth",matter:"config/matter",mqtt:"config/mqtt",thread:"config/thread",zha:"config/zha/dashboard",zwave_js:"config/zwave_js/dashboard"}:null;let r=99387==i.j?function(e){return e[e.CRITICAL=50]="CRITICAL",e[e.ERROR=40]="ERROR",e[e.WARNING=30]="WARNING",e[e.INFO=20]="INFO",e[e.DEBUG=10]="DEBUG",e[e.NOTSET=0]="NOTSET",e}({}):null;const s=(e,t)=>t.issue_tracker||`https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${e}%22`,l=(e,t,i)=>e(`component.${t}.title`)||(null==i?void 0:i.name)||t,c=(e,t)=>{const i={type:"manifest/list"};return t&&(i.integrations=t),e.callWS(i)},d=(e,t)=>e.callWS({type:"manifest/get",integration:t}),u=e=>e.callWS({type:"integration/setup_info"}),f=e=>e.sendMessagePromise({type:"logger/log_info"}),h=(e,t,i,a)=>e.callWS({type:"logger/integration_log_level",integration:t,level:i,persistence:a}),p=(e,t)=>e.subscribeEvents((0,o.D)((()=>f(e).then((e=>t.setState(e,!0)))),200,!0),"logging_changed"),m=(e,t)=>(0,a.B)("_integration_log_info",f,p,e,t)},89890:function(e,t,i){i.d(t,{DQ:()=>_,Fn:()=>m,Mj:()=>v,N8:()=>p,WL:()=>k,fI:()=>w,kr:()=>C,qV:()=>A,rs:()=>y,xt:()=>b,yZ:()=>h,zz:()=>g});i(92745),i(19423),i(19134),i(97003),i(88044);if(66977!=i.j)var a=i(75278);var o=i(5839),n=i(96194),r=i(58968);const s="M11,14C12,14 13.05,14.16 14.2,14.44C13.39,15.31 13,16.33 13,17.5C13,18.39 13.25,19.23 13.78,20H3V18C3,16.81 3.91,15.85 5.74,15.12C7.57,14.38 9.33,14 11,14M11,12C9.92,12 9,11.61 8.18,10.83C7.38,10.05 7,9.11 7,8C7,6.92 7.38,6 8.18,5.18C9,4.38 9.92,4 11,4C12.11,4 13.05,4.38 13.83,5.18C14.61,6 15,6.92 15,8C15,9.11 14.61,10.05 13.83,10.83C13.05,11.61 12.11,12 11,12M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",l="M14,19H18V5H14M6,19H10V5H6V19Z",c="M8,5.14V19.14L19,12.14L8,5.14Z",d="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",u="M18,18H6V6H18V18Z",f="M8.16,3L6.75,4.41L9.34,7H4C2.89,7 2,7.89 2,9V19C2,20.11 2.89,21 4,21H20C21.11,21 22,20.11 22,19V9C22,7.89 21.11,7 20,7H14.66L17.25,4.41L15.84,3L12,6.84L8.16,3M4,9H17V19H4V9M19.5,9A1,1 0 0,1 20.5,10A1,1 0 0,1 19.5,11A1,1 0 0,1 18.5,10A1,1 0 0,1 19.5,9M19.5,12A1,1 0 0,1 20.5,13A1,1 0 0,1 19.5,14A1,1 0 0,1 18.5,13A1,1 0 0,1 19.5,12Z";let h=function(e){return e[e.PAUSE=1]="PAUSE",e[e.SEEK=2]="SEEK",e[e.VOLUME_SET=4]="VOLUME_SET",e[e.VOLUME_MUTE=8]="VOLUME_MUTE",e[e.PREVIOUS_TRACK=16]="PREVIOUS_TRACK",e[e.NEXT_TRACK=32]="NEXT_TRACK",e[e.TURN_ON=128]="TURN_ON",e[e.TURN_OFF=256]="TURN_OFF",e[e.PLAY_MEDIA=512]="PLAY_MEDIA",e[e.VOLUME_STEP=1024]="VOLUME_STEP",e[e.SELECT_SOURCE=2048]="SELECT_SOURCE",e[e.STOP=4096]="STOP",e[e.CLEAR_PLAYLIST=8192]="CLEAR_PLAYLIST",e[e.PLAY=16384]="PLAY",e[e.SHUFFLE_SET=32768]="SHUFFLE_SET",e[e.SELECT_SOUND_MODE=65536]="SELECT_SOUND_MODE",e[e.BROWSE_MEDIA=131072]="BROWSE_MEDIA",e[e.REPEAT_SET=262144]="REPEAT_SET",e[e.GROUPING=524288]="GROUPING",e}({});const p="browser",m={album:{icon:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12,16.5C9.5,16.5 7.5,14.5 7.5,12C7.5,9.5 9.5,7.5 12,7.5C14.5,7.5 16.5,9.5 16.5,12C16.5,14.5 14.5,16.5 12,16.5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",layout:"grid"},app:{icon:"M21 2H3C1.9 2 1 2.9 1 4V20C1 21.1 1.9 22 3 22H21C22.1 22 23 21.1 23 20V4C23 2.9 22.1 2 21 2M21 7H3V4H21V7Z",layout:"grid",show_list_images:!0},artist:{icon:s,layout:"grid",show_list_images:!0},channel:{icon:f,thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},composer:{icon:"M11,4A4,4 0 0,1 15,8A4,4 0 0,1 11,12A4,4 0 0,1 7,8A4,4 0 0,1 11,4M11,6A2,2 0 0,0 9,8A2,2 0 0,0 11,10A2,2 0 0,0 13,8A2,2 0 0,0 11,6M11,13C12.1,13 13.66,13.23 15.11,13.69C14.5,14.07 14,14.6 13.61,15.23C12.79,15.03 11.89,14.9 11,14.9C8.03,14.9 4.9,16.36 4.9,17V18.1H13.04C13.13,18.8 13.38,19.44 13.76,20H3V17C3,14.34 8.33,13 11,13M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",layout:"grid",show_list_images:!0},contributing_artist:{icon:s,layout:"grid",show_list_images:!0},directory:{icon:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",layout:"grid",show_list_images:!0},episode:{icon:f,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},game:{icon:"M7,6H17A6,6 0 0,1 23,12A6,6 0 0,1 17,18C15.22,18 13.63,17.23 12.53,16H11.47C10.37,17.23 8.78,18 7,18A6,6 0 0,1 1,12A6,6 0 0,1 7,6M6,9V11H4V13H6V15H8V13H10V11H8V9H6M15.5,12A1.5,1.5 0 0,0 14,13.5A1.5,1.5 0 0,0 15.5,15A1.5,1.5 0 0,0 17,13.5A1.5,1.5 0 0,0 15.5,12M18.5,9A1.5,1.5 0 0,0 17,10.5A1.5,1.5 0 0,0 18.5,12A1.5,1.5 0 0,0 20,10.5A1.5,1.5 0 0,0 18.5,9Z",layout:"grid",thumbnail_ratio:"portrait"},genre:{icon:"M8.11,19.45C5.94,18.65 4.22,16.78 3.71,14.35L2.05,6.54C1.81,5.46 2.5,4.4 3.58,4.17L13.35,2.1L13.38,2.09C14.45,1.88 15.5,2.57 15.72,3.63L16.07,5.3L20.42,6.23H20.45C21.5,6.47 22.18,7.53 21.96,8.59L20.3,16.41C19.5,20.18 15.78,22.6 12,21.79C10.42,21.46 9.08,20.61 8.11,19.45V19.45M20,8.18L10.23,6.1L8.57,13.92V13.95C8,16.63 9.73,19.27 12.42,19.84C15.11,20.41 17.77,18.69 18.34,16L20,8.18M16,16.5C15.37,17.57 14.11,18.16 12.83,17.89C11.56,17.62 10.65,16.57 10.5,15.34L16,16.5M8.47,5.17L4,6.13L5.66,13.94L5.67,13.97C5.82,14.68 6.12,15.32 6.53,15.87C6.43,15.1 6.45,14.3 6.62,13.5L7.05,11.5C6.6,11.42 6.21,11.17 6,10.81C6.06,10.2 6.56,9.66 7.25,9.5C7.33,9.5 7.4,9.5 7.5,9.5L8.28,5.69C8.32,5.5 8.38,5.33 8.47,5.17M15.03,12.23C15.35,11.7 16.03,11.42 16.72,11.57C17.41,11.71 17.91,12.24 18,12.86C17.67,13.38 17,13.66 16.3,13.5C15.61,13.37 15.11,12.84 15.03,12.23M10.15,11.19C10.47,10.66 11.14,10.38 11.83,10.53C12.5,10.67 13.03,11.21 13.11,11.82C12.78,12.34 12.11,12.63 11.42,12.5C10.73,12.33 10.23,11.8 10.15,11.19M11.97,4.43L13.93,4.85L13.77,4.05L11.97,4.43Z",layout:"grid",show_list_images:!0},image:{icon:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z",layout:"grid",show_list_images:!0},movie:{icon:"M18,4L20,8H17L15,4H13L15,8H12L10,4H8L10,8H7L5,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V4H18Z",thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},music:{icon:"M21,3V15.5A3.5,3.5 0 0,1 17.5,19A3.5,3.5 0 0,1 14,15.5A3.5,3.5 0 0,1 17.5,12C18.04,12 18.55,12.12 19,12.34V6.47L9,8.6V17.5A3.5,3.5 0 0,1 5.5,21A3.5,3.5 0 0,1 2,17.5A3.5,3.5 0 0,1 5.5,14C6.04,14 6.55,14.12 7,14.34V6L21,3Z",show_list_images:!0},playlist:{icon:"M15,6H3V8H15V6M15,10H3V12H15V10M3,16H11V14H3V16M17,6V14.18C16.69,14.07 16.35,14 16,14A3,3 0 0,0 13,17A3,3 0 0,0 16,20A3,3 0 0,0 19,17V8H22V6H17Z",layout:"grid",show_list_images:!0},podcast:{icon:"M17,18.25V21.5H7V18.25C7,16.87 9.24,15.75 12,15.75C14.76,15.75 17,16.87 17,18.25M12,5.5A6.5,6.5 0 0,1 18.5,12C18.5,13.25 18.15,14.42 17.54,15.41L16,14.04C16.32,13.43 16.5,12.73 16.5,12C16.5,9.5 14.5,7.5 12,7.5C9.5,7.5 7.5,9.5 7.5,12C7.5,12.73 7.68,13.43 8,14.04L6.46,15.41C5.85,14.42 5.5,13.25 5.5,12A6.5,6.5 0 0,1 12,5.5M12,1.5A10.5,10.5 0 0,1 22.5,12C22.5,14.28 21.77,16.39 20.54,18.11L19.04,16.76C19.96,15.4 20.5,13.76 20.5,12A8.5,8.5 0 0,0 12,3.5A8.5,8.5 0 0,0 3.5,12C3.5,13.76 4.04,15.4 4.96,16.76L3.46,18.11C2.23,16.39 1.5,14.28 1.5,12A10.5,10.5 0 0,1 12,1.5M12,9.5A2.5,2.5 0 0,1 14.5,12A2.5,2.5 0 0,1 12,14.5A2.5,2.5 0 0,1 9.5,12A2.5,2.5 0 0,1 12,9.5Z",layout:"grid"},season:{icon:f,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},track:{icon:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13,13H11V18A2,2 0 0,1 9,20A2,2 0 0,1 7,18A2,2 0 0,1 9,16C9.4,16 9.7,16.1 10,16.3V11H13V13M13,9V3.5L18.5,9H13Z"},tv_show:{icon:f,layout:"grid",thumbnail_ratio:"portrait"},url:{icon:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,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,2Z"},video:{icon:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z",layout:"grid",show_list_images:!0}},g=(e,t,i,a)=>e.callWS({type:"media_player/browse_media",entity_id:t,media_content_id:i,media_content_type:a}),y=e=>{let t=e.attributes.media_position;return"playing"!==e.state?t:(t+=(Date.now()-new Date(e.attributes.media_position_updated_at).getTime())/1e3,t<0?0:t)},v=e=>{let t;switch(e.attributes.media_content_type){case"music":case"image":t=e.attributes.media_artist;break;case"playlist":t=e.attributes.media_playlist||e.attributes.media_artist;break;case"tvshow":t=e.attributes.media_series_title,e.attributes.media_season&&(t+=" S"+e.attributes.media_season,e.attributes.media_episode&&(t+="E"+e.attributes.media_episode));break;case"channel":t=e.attributes.media_channel;break;default:t=e.attributes.app_name||""}return t},b=(e,t=!1)=>{if(!e)return;const i=e.state;if((0,n.rk)(i))return;if(!(0,o.v)(e))return(0,a.e)(e,h.TURN_ON)?[{icon:d,action:"turn_on"}]:void 0;const r=[];(0,a.e)(e,h.TURN_OFF)&&r.push({icon:d,action:"turn_off"});const s=!0===e.attributes.assumed_state,f=e.attributes;return("playing"===i||"paused"===i||s)&&(0,a.e)(e,h.SHUFFLE_SET)&&t&&r.push({icon:!0===f.shuffle?"M14.83,13.41L13.42,14.82L16.55,17.95L14.5,20H20V14.5L17.96,16.54L14.83,13.41M14.5,4L16.54,6.04L4,18.59L5.41,20L17.96,7.46L20,9.5V4M10.59,9.17L5.41,4L4,5.41L9.17,10.58L10.59,9.17Z":"M16,4.5V7H5V9H16V11.5L19.5,8M16,12.5V15H5V17H16V19.5L19.5,16",action:"shuffle_set"}),("playing"===i||"paused"===i||s)&&(0,a.e)(e,h.PREVIOUS_TRACK)&&r.push({icon:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z",action:"media_previous_track"}),!s&&("playing"===i&&((0,a.e)(e,h.PAUSE)||(0,a.e)(e,h.STOP))||("paused"===i||"idle"===i)&&(0,a.e)(e,h.PLAY)||"on"===i&&((0,a.e)(e,h.PLAY)||(0,a.e)(e,h.PAUSE)))&&r.push({icon:"on"===i?"M3,5V19L11,12M13,19H16V5H13M18,5V19H21V5":"playing"!==i?c:(0,a.e)(e,h.PAUSE)?l:u,action:"playing"!==i?"media_play":(0,a.e)(e,h.PAUSE)?"media_pause":"media_stop"}),s&&(0,a.e)(e,h.PLAY)&&r.push({icon:c,action:"media_play"}),s&&(0,a.e)(e,h.PAUSE)&&r.push({icon:l,action:"media_pause"}),s&&(0,a.e)(e,h.STOP)&&r.push({icon:u,action:"media_stop"}),("playing"===i||"paused"===i||s)&&(0,a.e)(e,h.NEXT_TRACK)&&r.push({icon:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z",action:"media_next_track"}),("playing"===i||"paused"===i||s)&&(0,a.e)(e,h.REPEAT_SET)&&t&&r.push({icon:"all"===f.repeat?"M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"one"===f.repeat?"M13,15V9H12L10,10V11H11.5V15M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"M2,5.27L3.28,4L20,20.72L18.73,22L15.73,19H7V22L3,18L7,14V17H13.73L7,10.27V11H5V8.27L2,5.27M17,13H19V17.18L17,15.18V13M17,5V2L21,6L17,10V7H8.82L6.82,5H17Z",action:"repeat_set"}),r.length>0?r:void 0},_=e=>{if(void 0===e||e===1/0)return"";let t=new Date(1e3*e).toISOString();return t=e>3600?t.substring(11,16):t.substring(14,19),t.replace(/^0+/,"").padStart(4,"0")},k=e=>{if(!e)return;const t=e.indexOf("?authSig=");let i=t>0?e.slice(0,t):e;return i.startsWith("http")&&(i=decodeURIComponent(i.split("/").pop())),i},w=(e,t,i)=>e.callService("media_player","volume_set",{entity_id:t,volume_level:i}),C=(e,t,i)=>e.callService("media_player",i,"shuffle_set"===i?{entity_id:t.entity_id,shuffle:!t.attributes.shuffle}:"repeat_set"===i?{entity_id:t.entity_id,repeat:"all"===t.attributes.repeat?"one":"off"===t.attributes.repeat?"all":"off"}:{entity_id:t.entity_id}),A=(e,t,i,a,o={})=>(!o.enqueue&&void 0===o.announce&&(0,r.b_)(i)&&(o.announce=!0),e.callService("media_player","play_media",Object.assign({entity_id:t,media_content_id:i,media_content_type:a},o)))},86825:function(e,t,i){i.d(t,{n:()=>a,o:()=>o});i(19083);const a=(e,t)=>e.callWS({type:"execute_script",sequence:t}),o=(e,t,i)=>"homeassistant"===e&&["restart","stop"].includes(t)||"update"===e&&"install"===t&&["update.home_assistant_core_update","update.home_assistant_operating_system_update"].includes(null==i?void 0:i.entity_id)},58968:function(e,t,i){i.d(t,{MV:()=>c,Wg:()=>s,Xk:()=>r,aT:()=>a,b_:()=>n,yP:()=>l});i(88044);const a=(e,t)=>e.callApi("POST","tts_get_url",t),o="media-source://tts/",n=e=>e.startsWith(o),r=e=>e.substring(19),s=(e,t,i)=>e.callWS({type:"tts/engine/list",language:t,country:i}),l=(e,t)=>e.callWS({type:"tts/engine/get",engine_id:t}),c=(e,t,i)=>e.callWS({type:"tts/engine/voices",engine_id:t,language:i})},69919:function(e,t,i){i.a(e,(async function(e,a){try{i.d(t,{EX:()=>h,Fj:()=>w,M$:()=>C,SO:()=>p,Sk:()=>g,TN:()=>L,UJ:()=>y,Ym:()=>A,hF:()=>m});i(19083),i(61893),i(9359),i(56475),i(70104),i(40251);var o=i(73358);if(99387==i.j)var n=i(73850);if(99387==i.j)var r=i(59847);var s=i(75278),l=i(50602),c=i(1416),d=i(76131);if(99387==i.j)var u=i(72473);var f=e([l]);l=(f.then?(await f)():f)[0];let h=function(e){return e[e.INSTALL=1]="INSTALL",e[e.SPECIFIC_VERSION=2]="SPECIFIC_VERSION",e[e.PROGRESS=4]="PROGRESS",e[e.BACKUP=8]="BACKUP",e[e.RELEASE_NOTES=16]="RELEASE_NOTES",e}({});const p=e=>(0,s.e)(e,h.PROGRESS)&&null!==e.attributes.update_percentage,m=(e,t=!1)=>(e.state===o.uo||t&&Boolean(e.attributes.skipped_version))&&(0,s.e)(e,h.INSTALL),g=e=>!!e.attributes.in_progress,y=(e,t)=>e.callWS({type:"update/release_notes",entity_id:t}),v="ioBroker Core",b="ioBroker Supervisor",_="ioBroker Operating System",k=(e,t)=>Object.values(e).filter((e=>"update"===(0,r.N)(e))).sort(((e,i)=>e.attributes.title===v?-3:i.attributes.title===v?3:e.attributes.title===_?-2:i.attributes.title===_?2:e.attributes.title===b?-1:i.attributes.title===b?1:(0,c.fe)(e.attributes.title||e.attributes.friendly_name||"",i.attributes.title||i.attributes.friendly_name||"",t))),w=(e,t=!1)=>k(e).filter((e=>m(e,t))),C=async(e,t)=>{const i=k(t.states,t.locale.language).map((e=>e.entity_id));if(!i.length)return void(0,d.showAlertDialog)(e,{title:t.localize("ui.panel.config.updates.no_update_entities.title"),text:t.localize("ui.panel.config.updates.no_update_entities.description"),warning:!0});(0,u.C)(e,{message:t.localize("ui.panel.config.updates.checking_updates")});let a=0;const o=await t.connection.subscribeEvents((i=>{"update"===(0,n.M)(i.data.entity_id)&&(a++,(0,u.C)(e,{message:t.localize("ui.panel.config.updates.updates_refreshed",{count:a})}))}),"state_changed");await t.callService("homeassistant","update_entity",{entity_id:i}),await new Promise((e=>{setTimeout(e,15e3)})),o(),0===a&&(0,u.C)(e,{message:t.localize("ui.panel.config.updates.no_new_updates")})},A=(e,t)=>{const i=e.state,a=e.attributes;if("off"===i){return a.latest_version&&a.skipped_version===a.latest_version?a.latest_version:t.formatEntityState(e)}if("on"===i&&g(e)){return(0,s.e)(e,h.PROGRESS)&&null!==a.update_percentage?t.localize("ui.card.update.installing_with_progress",{progress:(0,l.uf)(a.update_percentage,t.locale,{maximumFractionDigits:a.display_precision,minimumFractionDigits:a.display_precision})}):t.localize("ui.card.update.installing")}return t.formatEntityState(e)},L=(e,t)=>{var i;if("hassio"!==(null===(i=t[e.entity_id])||void 0===i?void 0:i.domain))return"generic";const a=e.attributes.title||"";return a===v?"home_assistant":[v,b,_].includes(a)?"generic":"addon"};a()}catch(h){a(h)}}))},76131:function(e,t,i){i.r(t),i.d(t,{loadGenericDialog:()=>o,showAlertDialog:()=>r,showConfirmationDialog:()=>s,showPromptDialog:()=>l});i(71695),i(19423),i(40251),i(47021);var a=i(36522);const o=()=>Promise.all([i.e("46379"),i.e("66031"),i.e("25618"),i.e("7442"),i.e("61454"),i.e("19145")]).then(i.bind(i,79740)),n=(e,t,i)=>new Promise((n=>{const r=t.cancel,s=t.confirm;(0,a.B)(e,"show-dialog",{dialogTag:"dialog-box",dialogImport:o,dialogParams:Object.assign(Object.assign(Object.assign({},t),i),{},{cancel:()=>{n(!(null==i||!i.prompt)&&null),r&&r()},confirm:e=>{n(null==i||!i.prompt||e),s&&s(e)}})})})),r=(e,t)=>n(e,t),s=(e,t)=>n(e,t,{confirmation:!0}),l=(e,t)=>n(e,t,{prompt:!0})},76525:function(e,t,i){i.d(t,{L$:()=>f,gA:()=>c,lD:()=>m,ts:()=>h,vC:()=>d});i(71695),i(92745),i(19423),i(40251),i(47021);var a=i(5111),o=i(84200);if(66977!=i.j)var n=i(81165);var r=i(76320);const s={},l=[],c=Symbol.for("HA focus target"),d=async(e,t,i,r,u,f=!0)=>{if(!(i in s)){if(!u)return!1;s[i]={element:u().then((()=>{const t=document.createElement(i);return e.provideHass(t),t.addEventListener("dialog-closed",p),t.addEventListener("dialog-closed",g),t}))}}if(f){var h,m;const{history:o}=a.E;if(null!==(h=o.state)&&void 0!==h&&h.dialog&&!l.length)return await new Promise((e=>{setTimeout(e)})),d(e,t,i,r,u,f);const n=l.findIndex((e=>e.dialogTag===i));-1!==n&&l.splice(n,1),l.push({element:e,root:t,dialogTag:i,dialogParams:r,dialogImport:u,addHistory:f});const s={dialog:i};null!==(m=o.state)&&void 0!==m&&m.dialog?o.replaceState(s,""):(o.replaceState(Object.assign(Object.assign({},o.state),{},{opensDialog:!0}),""),o.pushState(s,""))}s[i].closedFocusTargets=(0,o.r)((0,n.j)(),c);const y=await s[i].element;return t.appendChild(y),y.showDialog(r),!0},u=async e=>{if(!(e in s))return!0;const t=await s[e].element;return!t.closeDialog||!1!==t.closeDialog()},f=async()=>{if(l.length){var e;const t=l.pop(),i=await u(t.dialogTag);return i||l.push(t),l.length&&null!==(e=a.E.history.state)&&void 0!==e&&e.opensDialog&&a.E.history.pushState({dialog:l[l.length-1].dialogTag},""),i}return!0},h=async()=>{for(let e=l.length-1;e>=0;e--){if(!(!l[e]||await u(l[e].dialogTag)))return!1}return!0},p=e=>{var t;const i=l.findIndex((t=>t.dialogTag===e.detail.dialog));-1!==i&&l.splice(i,1),(null===(t=a.E.history.state)||void 0===t?void 0:t.dialog)===e.detail.dialog&&(l.length?a.E.history.replaceState({dialog:l[l.length-1].dialogTag},""):-1!==i&&a.E.history.back())},m=(e,t)=>{e.addEventListener("show-dialog",(i=>{const{dialogTag:a,dialogImport:o,dialogParams:n,addHistory:r}=i.detail;d(e,t,a,n,o,r)}))},g=async e=>{if(!s[e.detail.dialog])return;const t=s[e.detail.dialog].closedFocusTargets;if(delete s[e.detail.dialog].closedFocusTargets,!t)return;let i=(0,n.j)();i instanceof HTMLElement&&i.blur(),await(0,r.y)();for(const a of t)if(a instanceof HTMLElement&&(a.focus(),i=(0,n.j)(),i&&i!==document.body))return}},30511:function(e,t,i){i.r(t),i.d(t,{mdiHomeAssistant:()=>a});const a="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"},28008:function(e,t,i){i.d(t,{$c:()=>h,Qx:()=>u,k1:()=>d,yu:()=>f});var a=i(57243);let o,n,r,s,l,c=e=>e;const d=(0,a.iv)(o||(o=c`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),u=(0,a.iv)(n||(n=c`: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}`),d),f=(0,a.iv)(r||(r=c`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)}`)),h=(0,a.iv)(s||(s=c`.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)(l||(l=c`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))}}]);
//# sourceMappingURL=40503.d66bd873c3c1e636.js.map