UNPKG

iobroker.lovelace

Version:

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

10 lines 97.1 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[27527],{36356:function(e,t,i){i.d(t,{q:function(){return n}});class n{get enabled(){return this._enabled}set enabled(e){e!==this._enabled&&(this._enabled=e,this._enabled?this._attach():this._detach(),this._host.requestUpdate())}hostUpdated(){this.enabled&&!this._scrollContainer&&this._attach()}hostDisconnected(){this._detach()}_attach(){var e;this._scrollContainer=null===(e=this._host.renderRoot)||void 0===e?void 0:e.querySelector(this._selector),this._scrollContainer&&this._scrollContainer.addEventListener("mousedown",this._mouseDown)}_detach(){window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._scrollContainer&&(this._scrollContainer.removeEventListener("mousedown",this._mouseDown),this._scrollContainer=void 0),this.scrolled=!1,this.scrolling=!1,this.mouseIsDown=!1,this.scrollStartX=0,this.scrollLeft=0}constructor(e,{selector:t,enabled:i}){this.mouseIsDown=!1,this.scrolled=!1,this.scrolling=!1,this.scrollStartX=0,this.scrollLeft=0,this._enabled=!0,this._mouseDown=e=>{const t=this._scrollContainer;t&&(this.scrollStartX=e.pageX-t.offsetLeft,this.scrollLeft=t.scrollLeft,this.mouseIsDown=!0,this.scrolled=!1,window.addEventListener("mousemove",this._mouseMove),window.addEventListener("mouseup",this._mouseUp,{once:!0}))},this._mouseUp=()=>{this.mouseIsDown=!1,this.scrolling=!1,this._host.requestUpdate(),window.removeEventListener("mousemove",this._mouseMove)},this._mouseMove=e=>{if(!this.mouseIsDown)return;const t=this._scrollContainer;if(!t)return;const i=e.pageX-t.offsetLeft-this.scrollStartX;this.scrolled||(this.scrolled=Math.abs(i)>1,this.scrolling=this.scrolled,this._host.requestUpdate()),t.scrollLeft=this.scrollLeft-i},this._selector=t,this._host=e,this.enabled=null==i||i,e.addController(this)}}},17451:function(e,t,i){i.d(t,{j:function(){return n}});const n=(e,t,i)=>(void 0!==i&&(i=!!i),e.hasAttribute(t)?!!i||(e.removeAttribute(t),!1):!1!==i&&(e.setAttribute(t,""),!0))},76774:function(e,t,i){i.d(t,{q:function(){return n}});const n=(e,t)=>{const i=e.area_id;return i?t[i]:void 0}},52943:function(e,t,i){i.d(t,{Z:function(){return n}});const n=e=>e.charAt(0).toUpperCase()+e.slice(1)},76776:function(e,t,i){i(62953);var n=i(40445),o=i(5124),s=i(67576);let a,r,l,c=e=>e;class d extends o.WF{render(){return(0,o.qy)(a||(a=c` ${0} <slot></slot> `),this.header?(0,o.qy)(r||(r=c`<h1 class="card-header">${0}</h1>`),this.header):o.s6)}constructor(...e){super(...e),this.raised=!1}}d.styles=(0,o.AH)(l||(l=c`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)}
    :host
      ::slotted(
        .card-content:not(:nth-child(1 of .card-content, .card-header))
      ),
    slot:not(:first-child)::slotted(.card-content) {
      padding-top: 0;
      margin-top: calc(var(--ha-space-2) * -1);
    }
    :host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`)),(0,n.Cg)([(0,s.MZ)()],d.prototype,"header",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"raised",void 0),d=(0,n.Cg)([(0,s.EM)("ha-card")],d)},17308:function(e,t,i){var n=i(40445),o=i(49838),s=i(11245),a=i(5124),r=i(67576);let l;class c extends o.B{}c.styles=[s.R,(0,a.AH)(l||(l=(e=>e)`:host{--md-sys-color-surface:var(--card-background-color)}`))],c=(0,n.Cg)([(0,r.EM)("ha-md-list")],c)},76944:function(e,t,i){i.d(t,{MV:function(){return a},VR:function(){return s},d8:function(){return n},jJ:function(){return r},l3:function(){return o}});i(3362);const n=async e=>e.callWS({type:"application_credentials/config"}),o=async(e,t)=>e.callWS({type:"application_credentials/config_entry",config_entry_id:t}),s=async e=>e.callWS({type:"application_credentials/list"}),a=async(e,t,i,n,o)=>e.callWS({type:"application_credentials/create",domain:t,client_id:i,client_secret:n,name:o}),r=async(e,t)=>e.callWS({type:"application_credentials/delete",application_credentials_id:t})},96204:function(e,t,i){i.d(t,{Dh:function(){return n},It:function(){return a},WV:function(){return s},g9:function(){return o}});const n=e=>e.callWS({type:"diagnostics/list"}),o=(e,t)=>e.callWS({type:"diagnostics/get",domain:t}),s=e=>`/api/diagnostics/config_entry/${e}`,a=(e,t)=>`/api/diagnostics/config_entry/${e}/device/${t}`},6810:function(e,t,i){i.d(t,{c:function(){return s}});i(3362),i(62953);const n=async(e,t,i,o,s,...a)=>{const r=s,l=r[e],c=l=>o&&o(s,l.result)!==l.cacheKey?(r[e]=void 0,n(e,t,i,o,s,...a)):l.result;if(l)return l instanceof Promise?l.then(c):c(l);const d=i(s,...a);return r[e]=d,d.then(i=>{r[e]={result:i,cacheKey:null==o?void 0:o(s,i)},setTimeout(()=>{r[e]=void 0},t)},()=>{r[e]=void 0}),d},o=e=>e.callWS({type:"entity/source"}),s=e=>n("_entitySources",3e4,o,e=>Object.keys(e.states).length,e)},70555:function(e,t,i){i.d(t,{L:function(){return s},_:function(){return a}});var n=i(36312),o=i(62384);const s=e=>e.callApi("GET","error_log"),a=e=>(0,n.x)(e.config,"hassio")&&(0,o.v)(e.config.version,2025,10)?"/api/hassio/core/logs/latest":"/api/error_log"},16869:function(e,t,i){i.d(t,{B:function(){return s},g:function(){return o}});var n;i(74423),i(27495);const o=window.externalAppV2||window.externalApp||(null===(n=window.webkit)||void 0===n||null===(n=n.messageHandlers)||void 0===n?void 0:n.getExternalAuth)||location.search.includes("external_auth=1"),s=window.externalApp||window.externalAppV2},81137:function(e,t,i){i.d(t,{M:function(){return o}});const n="M20,2H4V4L9.81,8.36C6.14,9.57 4.14,13.53 5.35,17.2C6.56,20.87 10.5,22.87 14.19,21.66C17.86,20.45 19.86,16.5 18.65,12.82C17.95,10.71 16.3,9.05 14.19,8.36L20,4V2M14.94,19.5L12,17.78L9.06,19.5L9.84,16.17L7.25,13.93L10.66,13.64L12,10.5L13.34,13.64L16.75,13.93L14.16,16.17L14.94,19.5Z",o={bronze:{icon:n,translationKey:"ui.panel.config.integrations.config_entry.bronze_quality"},silver:{icon:n,translationKey:"ui.panel.config.integrations.config_entry.silver_quality"},gold:{icon:n,translationKey:"ui.panel.config.integrations.config_entry.gold_quality"},platinum:{icon:"M18 2C17.1 2 16 3 16 4H8C8 3 6.9 2 6 2H2V11C2 12 3 13 4 13H6.2C6.6 15 7.9 16.7 11 17V19.08C8 19.54 8 22 8 22H16C16 22 16 19.54 13 19.08V17C16.1 16.7 17.4 15 17.8 13H20C21 13 22 12 22 11V2H18M6 11H4V4H6V11M20 11H18V4H20V11Z",translationKey:"ui.panel.config.integrations.config_entry.platinum_quality"},legacy:{icon:"M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z",translationKey:"ui.panel.config.integrations.config_entry.legacy_integration"}}},7749:function(e,t,i){i.d(t,{HH:function(){return n},TY:function(){return o},lu:function(){return s},mu:function(){return a}});const n=(e,t)=>e.callApi("POST","config/config_entries/options/flow",{handler:t}),o=(e,t)=>e.callApi("GET",`config/config_entries/options/flow/${t}`),s=(e,t,i)=>e.callApi("POST",`config/config_entries/options/flow/${t}`,i),a=(e,t)=>e.callApi("DELETE",`config/config_entries/options/flow/${t}`)},28669:function(e,t,i){i.d(t,{TK:function(){return r},_2:function(){return c},eR:function(){return o},hG:function(){return l},hU:function(){return s},kg:function(){return a},wj:function(){return n},xg:function(){return d}});i(44114),i(18111),i(61701),i(3362),i(42762);const n="system-admin",o="system-users",s=async e=>e.callWS({type:"config/auth/list"}),a=async(e,t,i,n)=>e.callWS({type:"config/auth/create",name:t,group_ids:i,local_only:n}),r=async(e,t,i)=>e.callWS(Object.assign(Object.assign({},i),{},{type:"config/auth/update",user_id:t})),l=async(e,t)=>e.callWS({type:"config/auth/delete",user_id:t}),c=e=>e?e.trim().split(" ").slice(0,3).map(e=>e.substring(0,1)).join(""):"?",d=(e,t,i)=>{const n=[],o=t=>e.localize(`ui.panel.config.users.${t}`);return t.is_owner&&n.push(["M12 2C6.47 2 2 6.5 2 12C2 17.5 6.5 22 12 22S22 17.5 22 12 17.5 2 12 2M12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4S20 7.58 20 12C20 16.42 16.42 20 12 20M8 14L7 8L10 10L12 7L14 10L17 8L16 14H8M8.56 16C8.22 16 8 15.78 8 15.44V15H16V15.44C16 15.78 15.78 16 15.44 16H8.56Z",o("is_owner")]),i&&t.system_generated&&n.push(["M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z",o("is_system")]),t.local_only&&n.push(["M12 20C7.6 20 4 16.4 4 12S7.6 4 12 4 20 7.6 20 12 16.4 20 12 20M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M11 14H13V17H16V12H18L12 7L6 12H8V17H11V14",o("is_local")]),t.is_active||n.push(["M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z",o("is_not_active")]),n}},15603:function(e,t,i){i.d(t,{n:function(){return s}});i(3362),i(62953);var n=i(1087);const o=()=>i.e(24922).then(i.bind(i,51937)),s=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-config-entry-system-options",dialogImport:o,dialogParams:t})}},70241:function(e,t,i){i.d(t,{Q:function(){return u}});i(3362),i(62953);var n=i(5124),o=i(95350),s=i(7749),a=i(29094);let r,l,c,d,h,g,p=e=>e;const u=(e,t,i)=>(0,a.g)(e,Object.assign({startFlowHandler:t.entry_id,domain:t.domain},i),{flowType:"options_flow",showDevices:!1,createFlow:async(e,i)=>{const[n]=await Promise.all([(0,s.HH)(e,i),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return n},fetchFlow:async(e,i)=>{const[n]=await Promise.all([(0,s.TY)(e,i),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return n},handleFlowStep:s.lu,deleteFlow:s.mu,renderAbortDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.abort.${i.reason}`,i.description_placeholders);return o?(0,n.qy)(r||(r=p` <ha-markdown breaks allow-svg .content="${0}"></ha-markdown> `),o):i.reason},renderShowFormStepHeader(e,i){return e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.title`,i.description_placeholders)||e.localize("ui.dialogs.options_flow.form.header")},renderShowFormStepDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.description`,i.description_placeholders);return o?(0,n.qy)(l||(l=p` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderShowFormStepFieldLabel(e,i,n,o){var s;if("expandable"===n.type)return e.localize(`component.${t.domain}.options.step.${i.step_id}.sections.${n.name}.name`,i.description_placeholders)||n.name;const a=null!=o&&null!==(s=o.path)&&void 0!==s&&s[0]?`sections.${o.path[0]}.`:"";return e.localize(`component.${t.domain}.options.step.${i.step_id}.${a}data.${n.name}`,i.description_placeholders)||n.name},renderShowFormStepFieldHelper(e,i,o,s){var a;if("expandable"===o.type)return e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.sections.${o.name}.description`,i.description_placeholders);const r=null!=s&&null!==(a=s.path)&&void 0!==a&&a[0]?`sections.${s.path[0]}.`:"",l=e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.${r}data_description.${o.name}`,i.description_placeholders);return l?(0,n.qy)(c||(c=p`<ha-markdown breaks .content="${0}"></ha-markdown>`),l):""},renderShowFormStepFieldError(e,i,n){return e.localize(`component.${i.translation_domain||t.domain}.options.error.${n}`,i.description_placeholders)||n},renderShowFormStepFieldLocalizeValue(e,i,n){return e.localize(`component.${t.domain}.selector.${n}`)},renderShowFormStepSubmitButton(e,i){return e.localize(`component.${t.domain}.options.step.${i.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===i.last_step?"next":"submit"))},renderExternalStepHeader(e,t){return""},renderExternalStepDescription(e,t){return""},renderCreateEntryDescription(e,t){return(0,n.qy)(d||(d=p` <p>${0}</p> `),e.localize("ui.dialogs.options_flow.success.description"))},renderShowFormProgressHeader(e,i){return e.localize(`component.${t.domain}.options.step.${i.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderShowFormProgressDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.progress.${i.progress_action}`,i.description_placeholders);return o?(0,n.qy)(h||(h=p` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuHeader(e,i){return e.localize(`component.${t.domain}.options.step.${i.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderMenuDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.description`,i.description_placeholders);return o?(0,n.qy)(g||(g=p` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuOption(e,i,n){return e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.menu_options.${n}`,i.description_placeholders)},renderMenuOptionDescription(e,i,n){return e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.menu_option_descriptions.${n}`,i.description_placeholders)},renderLoadingDescription(e,i){return e.localize(`component.${t.domain}.options.loading`)||("loading_flow"===i||"loading_step"===i?e.localize(`ui.dialogs.options_flow.loading.${i}`,{integration:(0,o.p$)(e.localize,t.domain)}):"")}})},26401:function(e,t,i){i.d(t,{a:function(){return b}});i(89463),i(3362),i(62953);var n=i(5124),o=i(95350);const s={"HA-Frontend-Base":`${location.protocol}//${location.host}`},a=(e,t,i,n)=>e.callApi("POST","config/config_entries/subentries/flow",{handler:[t,i],subentry_id:n},s),r=(e,t,i)=>e.callApi("POST",`config/config_entries/subentries/flow/${t}`,i,s),l=(e,t)=>e.callApi("DELETE",`config/config_entries/subentries/flow/${t}`);var c=i(29094);let d,h,g,p,u,m,_,f,y,v=e=>e;const b=(e,t,i,b)=>(0,c.g)(e,b,{flowType:"config_subentries_flow",showDevices:!0,createFlow:async(e,n)=>{const[o]=await Promise.all([a(e,n,i,b.subEntryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config_subentries",t.domain),e.loadBackendTranslation("selector",t.domain),e.loadBackendTranslation("title",t.domain)]);return o},fetchFlow:async(e,n)=>{const o=await((e,t)=>e.callApi("GET",`config/config_entries/subentries/flow/${t}`,void 0,s))(e,n);return i=o.handler[1],await e.loadFragmentTranslation("config"),await e.loadBackendTranslation("config_subentries",t.domain),await e.loadBackendTranslation("selector",t.domain),o},handleFlowStep:r,deleteFlow:l,renderAbortDescription(e,o){const s=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.abort.${o.reason}`,o.description_placeholders);return s?(0,n.qy)(d||(d=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),s):o.reason},renderShowFormStepHeader(e,n){return e.localize(`component.${n.translation_domain||t.domain}.config_subentries.${i}.step.${n.step_id}.title`,n.description_placeholders)||e.localize(`component.${t.domain}.title`)},renderShowFormStepDescription(e,o){const s=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.description`,o.description_placeholders);return s?(0,n.qy)(h||(h=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),s):""},renderShowFormStepFieldLabel(e,n,o,s){var a;if("expandable"===o.type)return e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.sections.${o.name}.name`,n.description_placeholders)||o.name;const r=null!=s&&null!==(a=s.path)&&void 0!==a&&a[0]?`sections.${s.path[0]}.`:"";return e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.${r}data.${o.name}`,n.description_placeholders)||o.name},renderShowFormStepFieldHelper(e,o,s,a){var r;if("expandable"===s.type)return e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.sections.${s.name}.description`,o.description_placeholders);const l=null!=a&&null!==(r=a.path)&&void 0!==r&&r[0]?`sections.${a.path[0]}.`:"",c=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.${l}data_description.${s.name}`,o.description_placeholders);return c?(0,n.qy)(g||(g=v`<ha-markdown breaks .content="${0}"></ha-markdown>`),c):""},renderShowFormStepFieldError(e,n,o){return e.localize(`component.${n.translation_domain||n.translation_domain||t.domain}.config_subentries.${i}.error.${o}`,n.description_placeholders)||o},renderShowFormStepFieldLocalizeValue(e,i,n){return e.localize(`component.${t.domain}.selector.${n}`)},renderShowFormStepSubmitButton(e,n){return e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===n.last_step?"next":"submit"))},renderExternalStepHeader(e,n){return e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription(e,o){const s=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.description`,o.description_placeholders);return(0,n.qy)(p||(p=v` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),s?(0,n.qy)(u||(u=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),s):"")},renderCreateEntryDescription(e,o){const s=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.create_entry.${o.description||"default"}`,o.description_placeholders);return(0,n.qy)(m||(m=v` ${0} `),s?(0,n.qy)(_||(_=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),s):n.s6)},renderShowFormProgressHeader(e,n){return e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderShowFormProgressDescription(e,o){const s=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.progress.${o.progress_action}`,o.description_placeholders);return s?(0,n.qy)(f||(f=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),s):""},renderMenuHeader(e,n){return e.localize(`component.${t.domain}.config_subentries.${i}.step.${n.step_id}.title`,n.description_placeholders)||e.localize(`component.${t.domain}.title`)},renderMenuDescription(e,o){const s=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.description`,o.description_placeholders);return s?(0,n.qy)(y||(y=v` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),s):""},renderMenuOption(e,n,o){return e.localize(`component.${n.translation_domain||t.domain}.config_subentries.${i}.step.${n.step_id}.menu_options.${o}`,n.description_placeholders)},renderMenuOptionDescription(e,n,o){return e.localize(`component.${n.translation_domain||t.domain}.config_subentries.${i}.step.${n.step_id}.menu_option_descriptions.${o}`,n.description_placeholders)},renderLoadingDescription(e,t,i,n){if("loading_flow"!==t&&"loading_step"!==t)return"";const s=(null==n?void 0:n.handler)||i;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:s?(0,o.p$)(e.localize,s):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},54706:function(e,t,i){i.d(t,{E:function(){return s}});i(74423),i(18111),i(13579),i(3362),i(62953);var n=i(40445),o=i(67576);const s=e=>{class t extends e{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const e=this.__unsubs.pop();e instanceof Promise?e.then(e=>e()):e()}this.__unsubs=void 0}}updated(e){if(super.updated(e),e.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const t of e.keys())if(this.hassSubscribeRequiredHostProps.includes(t))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){var e;void 0!==this.__unsubs||!this.isConnected||void 0===this.hass||null!==(e=this.hassSubscribeRequiredHostProps)&&void 0!==e&&e.some(e=>void 0===this[e])||(this.__unsubs=this.hassSubscribe())}}return(0,n.Cg)([(0,o.MZ)({attribute:!1})],t.prototype,"hass",void 0),t}},8872:function(e,t,i){i.d(t,{F:function(){return o},_:function(){return s}});i(3362),i(62953);var n=i(1087);const o=()=>Promise.all([i.e(92769),i.e(3283),i.e(33192),i.e(26092),i.e(39005),i.e(66201),i.e(90108)]).then(i.bind(i,22756)),s=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-device-registry-detail",dialogImport:o,dialogParams:t})}},8313:function(e,t,i){i.a(e,async function(e,t){try{i(74423),i(18111),i(22489),i(13579),i(3362),i(62953);var n=i(40445),o=i(5124),s=i(67576),a=i(6412),r=i(57237),l=i(37981),c=i(76774),d=i(91926),h=i(29823),g=(i(70947),i(77423)),p=i(58594),u=i(14503),m=i(33963),_=i(8872),f=i(9567),y=e([h,f,m]);[h,f,m]=y.then?(await y)():y;let v,b,$,w,C,H,L,x=e=>e;const V="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",M="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",A="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",z="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",E="M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z",k="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4M9,9V15H15V9",S="M18,11H14.82C14.4,9.84 13.3,9 12,9C10.7,9 9.6,9.84 9.18,11H6C5.67,11 4,10.9 4,9V8C4,6.17 5.54,6 6,6H16.18C16.6,7.16 17.7,8 19,8A3,3 0 0,0 22,5A3,3 0 0,0 19,2C17.7,2 16.6,2.84 16.18,4H6C4.39,4 2,5.06 2,8V9C2,11.94 4.39,13 6,13H9.18C9.6,14.16 10.7,15 12,15C13.3,15 14.4,14.16 14.82,13H18C18.33,13 20,13.1 20,15V16C20,17.83 18.46,18 18,18H7.82C7.4,16.84 6.3,16 5,16A3,3 0 0,0 2,19A3,3 0 0,0 5,22C6.3,22 7.4,21.16 7.82,20H18C19.61,20 22,18.93 22,16V15C22,12.07 19.61,11 18,11M19,4A1,1 0 0,1 20,5A1,1 0 0,1 19,6A1,1 0 0,1 18,5A1,1 0 0,1 19,4M5,20A1,1 0 0,1 4,19A1,1 0 0,1 5,18A1,1 0 0,1 6,19A1,1 0 0,1 5,20Z";class q extends o.WF{render(){const e=this.device,t=this._getEntities(),i=(0,c.q)(e,this.hass.areas),n=[e.model||e.sw_version||e.manufacturer,i?i.name:void 0].filter(Boolean);return(0,o.qy)(v||(v=x`<ha-md-list-item type="button" @click="${0}" class="${0}"> <ha-svg-icon .path="${0}" slot="start"></ha-svg-icon> <div slot="headline"> ${0} </div> <span slot="supporting-text">${0} ${0} ${0}</span> ${0} <div class="vertical-divider" slot="end" @click="${0}"></div> ${0} <ha-dropdown slot="end" @click="${0}" @wa-select="${0}"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> ${0} ${0} <ha-dropdown-item .variant="${0}" value="disable" .disabled="${0}"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} </ha-dropdown-item> ${0} </ha-dropdown> </ha-md-list-item> `),this._handleNavigateToDevice,(0,a.H)({disabled:Boolean(e.disabled_by)}),"service"===e.entry_type?S:M,(0,l.T)(e,this.hass.localize,this.hass.states),n.join(" • "),n.length&&t.length?" • ":o.s6,t.length?this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:t.length}):o.s6,this.narrow?o.s6:(0,o.qy)(b||(b=x`<ha-icon-next slot="end"> </ha-icon-next>`)),r.d,this.narrow?o.s6:(0,o.qy)($||($=x`<ha-icon-button slot="end" @click="${0}" .path="${0}" .label="${0}"></ha-icon-button>`),this._handleEditDeviceButton,z,this.hass.localize("ui.panel.config.integrations.config_entry.device.edit")),r.d,this._handleMenuAction,this.hass.localize("ui.common.menu"),A,this.narrow?(0,o.qy)(w||(w=x`<ha-dropdown-item value="edit"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} </ha-dropdown-item>`),z,this.hass.localize("ui.panel.config.integrations.config_entry.device.edit")):o.s6,t.length?(0,o.qy)(C||(C=x` <ha-dropdown-item value="entities"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> `),E,this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:t.length})):o.s6,"user"!==e.disabled_by?"danger":"default","user"!==e.disabled_by&&!!e.disabled_by,k,e.disabled_by&&"user"!==e.disabled_by?this.hass.localize("ui.dialogs.device-registry-detail.enabled_cause",{type:this.hass.localize(`ui.dialogs.device-registry-detail.type.${e.entry_type||"device"}`),cause:this.hass.localize(`config_entry.disabled_by.${e.disabled_by}`)}):e.disabled_by?this.hass.localize("ui.panel.config.integrations.config_entry.device.enable"):this.hass.localize("ui.panel.config.integrations.config_entry.device.disable"),this.entry.supports_remove_device?(0,o.qy)(H||(H=x`<ha-dropdown-item variant="danger" value="delete"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} </ha-dropdown-item>`),V,this.hass.localize("ui.panel.config.integrations.config_entry.device.delete")):o.s6)}_handleEditDeviceButton(e){e.stopPropagation(),this._handleEditDevice()}_handleNavigateToDevice(){(0,d.oo)(`/config/devices/device/${this.device.id}`)}constructor(...e){super(...e),this.narrow=!1,this._getEntities=()=>{var e;return null===(e=this.entities)||void 0===e?void 0:e.filter(e=>e.device_id===this.device.id)},this._handleMenuAction=e=>{e.stopPropagation();switch(e.detail.item.value){case"edit":return void this._handleEditDevice();case"entities":return void this._handleNavigateToEntities();case"disable":return void this._doDisableDevice();case"delete":this._handleDeleteDevice()}},this._handleEditDevice=()=>{(0,_._)(this,{device:this.device,updateEntry:async e=>{await(0,p.FB)(this.hass,this.device.id,e)}})},this._handleNavigateToEntities=()=>{(0,d.oo)(`/config/entities/?historyBack=1&device=${this.device.id}`)},this._doDisableDevice=async()=>{const e=null===this.device.disabled_by;if(e&&!Object.values(this.hass.devices).some(e=>e.id!==this.device.id&&e.config_entries.includes(this.entry.entry_id))){const e=this.entry;if(e&&!e.disabled_by){if(!(await(0,m.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.devices.confirm_disable_config_entry_title"),text:this.hass.localize("ui.panel.config.devices.confirm_disable_config_entry_message",{name:e.title}),destructive:!0,confirmText:this.hass.localize("ui.common.yes"),dismissText:this.hass.localize("ui.common.no")})))return;let i;try{i=await(0,g.XQ)(this.hass,this.entry.entry_id)}catch(t){return void(0,m.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_error"),text:t.message})}return void(i.require_restart&&(0,m.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.disable_restart_confirm")}))}}if(e){if(!(await(0,m.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.device.confirm_disable_title"),text:this.hass.localize("ui.panel.config.integrations.config_entry.device.confirm_disable_message",{name:(0,l.T)(this.device,this.hass.localize,this.hass.states)}),destructive:!0,confirmText:this.hass.localize("ui.common.yes"),dismissText:this.hass.localize("ui.common.no")})))return}await(0,p.FB)(this.hass,this.device.id,{disabled_by:e?"user":null})},this._handleDeleteDevice=async()=>{const e=this.entry;if(await(0,m.showConfirmationDialog)(this,{text:this.hass.localize("ui.panel.config.devices.confirm_delete"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0}))try{await(0,p.nO)(this.hass,this.device.id,e.entry_id)}catch(t){(0,m.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.devices.error_delete"),text:t.message})}}}}q.styles=[u.RF,(0,o.AH)(L||(L=x`:host{border-top:1px solid var(--divider-color)}ha-md-list-item{--md-list-item-leading-space:56px;--md-ripple-hover-color:transparent;--md-ripple-pressed-color:transparent}.disabled{opacity:.5}:host([narrow]) ha-md-list-item{--md-list-item-leading-space:16px}.vertical-divider{height:100%;width:1px;background:var(--divider-color)}a{text-decoration:none}`))],(0,n.Cg)([(0,s.MZ)({attribute:!1})],q.prototype,"hass",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],q.prototype,"narrow",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],q.prototype,"entry",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],q.prototype,"device",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],q.prototype,"entities",void 0),q=(0,n.Cg)([(0,s.EM)("ha-config-entry-device-row")],q),t()}catch(v){t(v)}})},65536:function(e,t,i){i.a(e,async function(e,t){try{i(78350),i(74423),i(44114),i(30237),i(18111),i(22489),i(20116),i(30531),i(61701),i(3362),i(62953);var n=i(40445),o=i(5124),s=i(67576),a=i(6412),r=i(22786),l=i(63130),c=i(29823),d=(i(70947),i(76944)),h=i(82e3),g=i(77423),p=i(96204),u=i(95350),m=i(15603),_=i(77763),f=i(70241),y=i(26401),v=i(14503),b=i(36918),$=i(30039),w=i(81619),C=i(33963),H=i(8313),L=i(87599),x=i(9567),V=e([c,H,x,L,C]);[c,H,x,L,C]=V.then?(await V)():V;let M,A,z,E,k,S,q,D,T,F,Z,P,B,I,R,O,U,W,j,N,G,Q,K,X,J,Y,ee,te=e=>e;const ie="M13,13H11V7H13M13,17H11V15H13M12,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",ne="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",oe="M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z",se="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",ae="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",re="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",le="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",ce="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z",de="M22 15V16L14 18.5L7 16.6V18H1V7H9L15.2 9.3C16.2 9.7 17 10.8 17 12H19C20.7 12 22 13.3 22 15M5 16V9H3V16H5M19.9 14.6C19.7 14.2 19.4 14 19 14H13.6C13.1 14 12.5 13.9 12 13.8L9.7 13L10.3 11.1L12.7 11.9C13 11.9 15 12 15 12C15 11.6 14.8 11.3 14.4 11.2L8.6 9H7V14.5L14 16.4L19.9 14.6Z",he="M12,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,2M10,16.5L16,12L10,7.5V16.5Z",ge="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",pe="M13 2V4C17.39 4.54 20.5 8.53 19.96 12.92C19.5 16.56 16.64 19.43 13 19.88V21.88C18.5 21.28 22.45 16.34 21.85 10.85C21.33 6.19 17.66 2.5 13 2M11 2C9.04 2.18 7.19 2.95 5.67 4.2L7.1 5.74C8.22 4.84 9.57 4.26 11 4.06V2M4.26 5.67C3 7.19 2.24 9.04 2.05 11H4.05C4.24 9.58 4.8 8.23 5.69 7.1L4.26 5.67M2.06 13C2.26 14.96 3.03 16.81 4.27 18.33L5.69 16.9C4.81 15.77 4.24 14.42 4.06 13H2.06M7.06 18.37L5.67 19.74C7.18 21 9.04 21.79 11 22V20C9.58 19.82 8.23 19.25 7.1 18.37H7.06Z",ue="M2 12C2 16.97 6.03 21 11 21C13.39 21 15.68 20.06 17.4 18.4L15.9 16.9C14.63 18.25 12.86 19 11 19C4.76 19 1.64 11.46 6.05 7.05C10.46 2.64 18 5.77 18 12H15L19 16H19.1L23 12H20C20 7.03 15.97 3 11 3C6.03 3 2 7.03 2 12Z",me="M2 12C2 17 6 21 11 21C13.4 21 15.7 20.1 17.4 18.4L15.9 16.9C14.6 18.3 12.9 19 11 19C4.8 19 1.6 11.5 6.1 7.1S18 5.8 18 12H15L19 16H19.1L23 12H20C20 7 16 3 11 3S2 7 2 12M10 15H12V17H10V15M10 7H12V13H10V7",_e="M18,17H10.5L12.5,15H18M6,17V14.5L13.88,6.65C14.07,6.45 14.39,6.45 14.59,6.65L16.35,8.41C16.55,8.61 16.55,8.92 16.35,9.12L8.47,17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z",fe="M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z",ye="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4M9,9V15H15V9",ve="M5,3C3.89,3 3,3.89 3,5V19C3,20.11 3.89,21 5,21H19C20.11,21 21,20.11 21,19V5C21,3.89 20.11,3 19,3H5M5,5H19V19H5V5M7,7V9H17V7H7M7,11V13H17V11H7M7,15V17H14V15H7Z",be="M22.7,19L13.6,9.9C14.5,7.6 14,4.9 12.1,3C10.1,1 7.1,0.6 4.7,1.7L9,6L6,9L1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1C4.8,14 7.5,14.5 9.8,13.6L18.9,22.7C19.3,23.1 19.9,23.1 20.3,22.7L22.6,20.4C23.1,20 23.1,19.3 22.7,19Z";class $e extends o.WF{render(){const e=this.data.entry;let t,i,n=ie;e.disabled_by||"not_loaded"!==e.state?"setup_in_progress"===e.state?(n=pe,t=["ui.panel.config.integrations.config_entry.setup_in_progress"]):g.m4.includes(e.state)&&("setup_retry"===e.state&&(n=me),t=[`ui.panel.config.integrations.config_entry.state.${e.state}`],i=(0,L.J)(this.hass,e)):t=["ui.panel.config.integrations.config_entry.not_loaded"];const s=this._getEntities(),r=[...this.data.devices,...this.data.services],l=[...this.data.devices,...this.data.subEntries.flatMap(e=>e.devices)],c=[...this.data.services,...this.data.subEntries.flatMap(e=>e.services)],d=[];e.disabled_by?(d.push(this.hass.localize("ui.panel.config.integrations.config_entry.disable.disabled_cause",{cause:this.hass.localize(`ui.panel.config.integrations.config_entry.disable.disabled_by.${e.disabled_by}`)||e.disabled_by})),"failed_unload"===e.state&&d.push(`.\n        ${this.hass.localize("ui.panel.config.integrations.config_entry.disable_restart_confirm")}.`)):l.length||c.length||!s.length||d.push((0,o.qy)(M||(M=te`<a href="${0}">${0}</a>`),`/config/entities/?historyBack=1&config_entry=${e.entry_id}`,this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:s.length})));const h=this._configPanel(e.domain,this.hass.panels),m=this.data.subEntries;return(0,o.qy)(A||(A=te`<ha-md-list> <ha-md-list-item class="${0}"> ${0} <div slot="headline"> ${0} </div> <div slot="supporting-text"> <div>${0}</div> ${0} </div> ${0} <ha-dropdown slot="end" @wa-select="${0}"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> ${0} ${0} ${0} ${0} ${0} <ha-dropdown-item value="rename"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> <ha-dropdown-item value="copy"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> ${0} <wa-divider></wa-divider> ${0} ${0} <ha-dropdown-item value="system_options"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> ${0} ${0} </ha-dropdown> </ha-md-list-item> ${0} </ha-md-list>`),(0,a.H)({config_entry:!0,"state-not-loaded":"not_loaded"===e.state,"state-failed-unload":"failed_unload"===e.state,"state-setup":"setup_in_progress"===e.state,"state-error":g.m4.includes(e.state),"state-disabled":null!==e.disabled_by,"has-subentries":this._expanded&&m.length>0}),m.length||r.length?(0,o.qy)(z||(z=te`<ha-icon-button class="expand-button ${0}" .path="${0}" slot="start" @click="${0}"></ha-icon-button>`),(0,a.H)({expanded:this._expanded}),ne,this._toggleExpand):o.s6,e.title||(0,u.p$)(this.hass.localize,e.domain),d,t?(0,o.qy)(E||(E=te` <div class="message"> <ha-svg-icon .path="${0}"></ha-svg-icon> <div> ${0}${0} </div> </div> `),n,this.hass.localize(...t),i?(0,o.qy)(k||(k=te`: ${0}`),i):o.s6):o.s6,"user"===e.disabled_by?(0,o.qy)(S||(S=te`<ha-button slot="end" @click="${0}"> ${0} </ha-button>`),this._handleEnable,this.hass.localize("ui.common.enable")):h&&!t?(0,o.qy)(q||(q=te`<ha-icon-button .path="${0}" .label="${0}" slot="end" class="link" href="${0}"> </ha-icon-button>`),oe,this.hass.localize("ui.panel.config.integrations.config_entry.configure"),`/${h}?config_entry=${e.entry_id}`):e.supports_options?(0,o.qy)(D||(D=te` <ha-icon-button slot="end" @click="${0}" .path="${0}" .label="${0}"> </ha-icon-button> `),this._showOptions,oe,this.hass.localize("ui.panel.config.integrations.config_entry.configure")):o.s6,this._handleMenuAction,this.hass.localize("ui.common.menu"),le,l.length?(0,o.qy)(T||(T=te` <a href="${0}"> <ha-dropdown-item value="devices"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `),1===l.length?`/config/devices/device/${l[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${e.entry_id}`,re,this.hass.localize("ui.panel.config.integrations.config_entry.devices",{count:l.length})):o.s6,c.length?(0,o.qy)(F||(F=te` <a href="${0}"> <ha-dropdown-item value="services"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `),1===c.length?`/config/devices/device/${c[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${e.entry_id}`,de,this.hass.localize("ui.panel.config.integrations.config_entry.services",{count:c.length})):o.s6,s.length?(0,o.qy)(Z||(Z=te` <a href="${0}"> <ha-dropdown-item value="entities"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `),`/config/entities?historyBack=1&config_entry=${e.entry_id}`,fe,this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:s.length})):o.s6,g.m4.includes(e.state)?(0,o.qy)(P||(P=te` <a href="${0}"> <ha-dropdown-item value="logs"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `),`/config/logs?filter=${encodeURIComponent(e.domain)}`,ve,this.hass.localize("ui.panel.config.logs.caption")):o.s6,!e.disabled_by&&g.qf.includes(e.state)&&e.supports_unload&&"system"!==e.source?(0,o.qy)(B||(B=te` <ha-dropdown-item value="reload"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> `),ue,this.hass.localize("ui.panel.config.integrations.config_entry.reload")):o.s6,_e,this.hass.localize("ui.panel.config.integrations.config_entry.rename"),se,this.hass.localize("ui.panel.config.integrations.config_entry.copy"),Object.keys(e.supported_subentry_types).map(t=>(0,o.qy)(I||(I=te`<ha-dropdown-item value="subentry_${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item>`),t,ge,this.hass.localize(`component.${e.domain}.config_subentries.${t}.initiate_flow.user`))),this.diagnosticHandler&&"loaded"===e.state?(0,o.qy)(R||(R=te` <a href="${0}" target="_blank" @click="${0}"> <ha-dropdown-item value="diagnostics"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> </a> `),(0,p.WV)(e.entry_id),this._signUrl,ce,this.hass.localize("ui.panel.config.integrations.config_entry.download_diagnostics")):o.s6,!e.disabled_by&&e.supports_reconfigure&&"system"!==e.source?(0,o.qy)(O||(O=te` <ha-dropdown-item value="reconfigure"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> `),be,this.hass.localize("ui.panel.config.integrations.config_entry.reconfigure")):o.s6,oe,this.hass.localize("ui.panel.config.integrations.config_entry.system_options"),"user"===e.disabled_by?(0,o.qy)(U||(U=te` <ha-dropdown-item value="enable"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> `),he,this.hass.localize("ui.common.enable")):"system"!==e.source?(0,o.qy)(W||(W=te` <ha-dropdown-item variant="danger" value="disable"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> `),ye,this.hass.localize("ui.common.disable")):o.s6,"system"!==e.source?(0,o.qy)(j||(j=te` <ha-dropdown-item variant="danger" value="delete"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> `),ae,this.hass.localize("ui.panel.config.integrations.config_entry.delete")):o.s6,this._expanded?m.length?(0,o.qy)(N||(N=te`${0} ${0}`),r.length?(0,o.qy)(G||(G=te`<ha-md-list class="devices"> <ha-md-list-item @click="${0}" type="button" class="toggle-devices-row ${0}"> <ha-icon-button class="expand-button ${0}" .path="${0}" slot="start"> </ha-icon-button> ${0} </ha-md-list-item> ${0} </ha-md-list>`),this._toggleOwnDevices,(0,a.H)({expanded:this._devicesExpanded}),(0,a.H)({expanded:this._devicesExpanded}),ne,this.hass.localize("ui.panel.config.integrations.config_entry.devices_without_subentry"),this._devicesExpanded?r.map(t=>(0,o.qy)(Q||(Q=te`<ha-config-entry-device-row .hass="${0}" .narrow="${0}" .entry="${0}" .device="${0}" .entities="${0}"></ha-config-entry-device-row>`),this.hass,this.narrow,e,t,s)):o.s6):o.s6,m.map(t=>(0,o.qy)(K||(K=te` <ha-config-sub-entry-row .hass="${0}" .narrow="${0}" .manifest="${0}" .diagnosticHandler="${0}" .entities="${0}" .entry="${0}" .data="${0}" data-entry-id="${0}"></ha-config-sub-entry-row> `),this.hass,this.narrow,this.manifest,this.diagnosticHandler,this.entities,e,t,e.entry_id))):(0,o.qy)(X||(X=te` ${0} `),r.map(t=>(0,o.qy)(J||(J=te`<ha-config-entry-device-row .hass="${0}" .narrow="${0}" .entry="${0}" .device="${0}" .entities="${0}"></ha-config-entry-device-row>`),this.hass,this.narrow,e,t,s))):o.s6)}_toggleExpand(){this._expanded=!this._expanded}_toggleOwnDevices(){this._devicesExpanded=!this._devicesExpanded}_showOptions(){(0,f.Q)(this,this.data.entry,{manifest:this.manifest})}async _applicationCredentialForRemove(e){try{return(await(0,d.l3)(this.hass,e)).application_credentials_id}catch(t){return null}}async _removeApplicationCredential(e){if(await(0,C.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_title"),text:(0,o.qy)(Y||(Y=te`${0}, <br> <br> ${0} <br> <br> <a href="${0}" target="_blank" rel="noreferrer"> ${0} </a>`),this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_prompt"),this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_detail"),(0,b.o)(this.hass,"/integrations/application_credentials/"),this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.learn_more")),destructive:!0,confirmText:this.hass.localize("ui.common.remove"),dismissText:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.dismiss")}))try{await(0,d.jJ)(this.hass,e)}catch(t){(0,C.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_error_title"),text:t.message})}}async _signUrl(e){const t=e.currentTarget;e.preventDefault();const i=await(0,h.e0)(this.hass,t.getAttribute("href"));(0,$.R)(i.path)}constructor(...e){super(...e),this.narrow=!1,this._expanded=!0,this._devicesExpanded=!0,this._configPanel=(0,r.A)((e,t)=>{var i;return(null===(i=Object.values(t).find(t=>t.config_panel_domain===e))||void 0===i?void 0:i.url_path)||u.Og[e]}),this._getEntities=()=>this.entities.filter(e=>e.config_entry_id===this.data.entry.entry_id),this._handleMenuAction=e=>{e.stopPropagation();const t=e.detail.item.value;if("reload"!==t)if("rename"!==t)if("copy"!==t)if("reconfigure"!==t)if("system_options"!==t)if("enable"!==t)if("disable"!==t)if("delete"!==t){if(null!=t&&t.startsWith("subentry_")){const e=t.substring(9);this._addSubEntry(e)}}else this._handleDelete();else this._handleDisable();else this._handleEnable();else this._handleSystemOptions();else this._handleReconfigure();else this._handleCopy();else this._handleRename();else this._handleReload()},this._handleReload=async()=>{const e=(await(0,g.yv)(this.hass,this.data.entry.entry_id)).require_restart?"reload_restart_confirm":"reload_confirm";(0,C.showAlertDialog)(this,{text:this.hass.localize(`ui.panel.config.integrations.config_entry.${e}`)})},this._handleReconfigure=async()=>{(0,_.W)(this,{startFlowHandler:this.data.entry.domain,manifest:await(0,u.QC)(this.hass,this.data.entry.domain),entryId:this.data.entry.entry_id,navigateToResult:!0})},this._handleCopy=async()=>{var e;await(0,l.l)(this.data.entry.entry_id),(0,w.P)(this,{message:(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.copied_clipboard"))||"Copied to clipboard"})},this._handleRename=async()=>{const e=await(0,C.showPromptDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.rename_dialog"),defaultValue:this.data.entry.title,inputLabel:this.hass.localize("ui.panel.config.integrations.rename_input_label")});null!==e&&await(0,g.iH)(this.hass,this.data.entry.entry_id,{title:e})},this._handleDisable=async()=>{const e=this.data.entry.entry_id;if(!(await(0,C.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_confirm_title",{title:this.data.entry.title}),text:this.hass.localize("ui.panel.config.integrations.config_entry.disable_confirm_text"),confirmText:this.hass.localize("ui.common.disable"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0})))return;let t;try{t=await(0,g.XQ)(this.hass,e)}catch(i){return void(0,C.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_error"),text:i.message})}t.require_restart&&(0,C.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.disable_restart_confirm")})},this._handleEnable=async()=>{const e=this.data.entry.entry_id;let t;try{t=await(0,g.k3)(this.hass,e)}catch(i){return void(0,C.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_error"),text:i.message})}t.require_restart&&(0,C.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.enable_restart_confirm")})},this._handleDelete=async()=>{const e=this.data.entry.entry_id,t=await this._applicationCredentialForRemove(e);if(!(await(0,C.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_title",{title:this.data.entry.title}),text:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_text"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0})))return;(await(0,g.eM)(this.hass,e)).require_restart&&(0,C.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.restart_confirm")}),t&&this._removeApplicationCredential(t)},this._handleSystemOptions=()=>{(0,m.n)(this,{entry:this.data.entry,manifest:this.manifest})},this._addSubEntry=e=>{(0,y.a)(this,this.data.entry,e,{startFlowHandler:this.data.entry.entry_id})}}}$e.styles=[v.RF,(0,o.AH)(ee||(ee=te`:host{display:block;position:relative}:host(.highlight)::after{position:absolute;inset:0;pointer-events:none;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));box-shadow:0 0 0 1px rgba(var(--rgb-info-color),.5),0 0 12px rgba(var(--rgb-info-color),.28);content:""}.expand-button{margin:0 -12px;transition:transform 150ms cubic-bezier(.4, 0, .2, 1)}.expand-button.expanded{transform:rotate(180deg)}ha-md-list{border:1px solid var(--divider-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));padding:0}:host([narrow]){margin-left:-12px;margin-right:-12px}ha-md-list.devices{margin:16px;margin-top:0}ha-icon-button.link{color:var(--md-list-item-trailing-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}.toggle-devices-row{overflow:hidden;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.toggle-devices-row.expanded{border-bottom-left-radius:0;border-bottom-right-radius:0}ha-dropdown a{text-decoration:none}`))],(0,n.Cg)([(0,s.MZ)({attribute:!1})],$e.prototype,"hass",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],$e.prototype,"narrow",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],$e.prototype,"manifest",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],$e.prototype,"diagnosticHandler",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],$e.prototype,"entities",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],$e.prototype,"data",void 0),(0,n.Cg)([(0,s.wk)()],$e.prototype,"_expanded",void 0),(0,n.Cg)([(0,s.wk)()],$e.prototype,"_devicesExpanded",void 0),$e=(0,n.Cg)([(0,s.EM)("ha-config-entry-row")],$e),t()}catch(M){t(M)}})},87599:function(e,t,i){i.a(e,async function(e,n){try{i.d(t,{J:function(){return ze}});i(74423),i(44114),i(26910),i(18111),i(22489),i(20116),i(7588),i(61701),i(13579),i(3362),i(27495),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(25440),i(62953),i(48408),i(14603),i(47566),i(98721);var o=i(40445),s=i(5124),a=i(67576),r=i(91450),l=i(22786),c=i(36312),d=i(37981),h=i(89020),g=i(52220),p=i(12587),u=i(18350),m=i(29823),_=(i(70947),i(17308),i(2846),i(36866)),f=i(82e3),y=i(77423),v=i(26571),b=i(96204),$=i(59241),w=i(6810),C=i(70555),H=i(95350),L=i(81137),x=i(77763),V=i(26401),M=i(65063),A=i(28794),z=i(81310),E=i(54706),k=i(59653),S=i(14503),q=i(44144),D=i(36918),T=i(30039),F=i(65536),Z=i(76559),P=i(35402),B=e([u,m,_,A,z,F]);[u,m,_,A,z,F]=B.then?(await B)():B;let I,R,O,U,W,j,N,G,Q,K,X,J,Y,ee,te,ie,ne,oe,se,ae,re,le,ce,de,he,ge,pe,ue,me,_e,fe,ye=e=>e;const ve="M14,12H10V10H14M14,16H10V14H14M20,8H17.19C16.74,7.22 16.12,6.55 15.37,6.04L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.04,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6.04C7.88,6.55 7.26,7.22 6.81,8H4V10H6.09C6.04,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.04,15.67 6.09,16H4V18H6.81C7.85,19.79 9.78,21 12,21C14.22,21 16.15,19.79 17.19,18H20V16H17.91C17.96,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.96,10.33 17.91,10H20V8Z",be="M19 7H16.19C15.74 6.2 15.12 5.5 14.37 5L16 3.41L14.59 2L12.42 4.17C11.96 4.06 11.5 4 11 4S10.05 4.06 9.59 4.17L7.41 2L6 3.41L7.62 5C6.87 5.5 6.26 6.21 5.81 7H3V9H5.09C5.03 9.33 5 9.66 5 10V11H3V13H5V14C5 14.34 5.03 14.67 5.09 15H3V17H5.81C7.26 19.5 10.28 20.61 13 19.65V19C13 16.46 14.61 14.2 17 13.35V13H19V11H17V10C17 9.66 16.97 9.33 16.91 9H19V7M13 15H9V13H13V15M13 11H9V9H13V11M17 16V22L22 19L17 16Z",$e="M19 7H16.19C15.74 6.2 15.12 5.5 14.37 5L16 3.41L14.59 2L12.42 4.17C11.96 4.06 11.5 4 11 4S10.05 4.06 9.59 4.17L7.41 2L6 3.41L7.62 5C6.87 5.5 6.26 6.21 5.81 7H3V9H5.09C5.03 9.33 5 9.66 5 10V11H3V13H5V14C5 14.34 5.03 14.67 5.09 15H3V17H5.81C7.26 19.5 10.28 20.61 13 19.65V19C13 16.46 14.61 14.2 17 13.35V13H19V11H17V10C17 9.66 16.97 9.33 16.91 9H19V7M13 15H9V13H13V15M13 11H9V9H13V11M16 16H22V22H16V16Z",we="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",Ce="M14 2H6C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H18C19.11 22 20 21.11 20 20V8L14 2M18 20H6V4H13V9H18V20M9.54 15.65L11.63 17.74L10.35 19L7 15.65L10.35 12.3L11.63 13.56L9.54 15.65M17 15.65L13.65 19L12.38 17.74L14.47 15.65L12.38 13.56L13.65 12.3L17 15.65Z",He="M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,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,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z",Le="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z",xe="M2,10.96C1.5,10.68 1.35,10.07 1.63,9.59L3.13,7C3.24,6.8 3.41,6.66 3.6,6.58L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.66,6.72 20.82,6.88 20.91,7.08L22.36,9.6C22.64,10.08 22.47,10.69 22,10.96L21,11.54V16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V10.96C2.7,11.13 2.32,11.14 2,10.96M12,4.15V4.15L12,10.85V10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V12.69L14,15.59C13.67,15.77 13.3,15.76 13,15.6V19.29L19,15.91M13.85,13.36L20.13,9.73L19.55,8.72L13.27,12.35L13.85,13.36Z",Ve="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",Me="M5,3C3.89,3 3,3.89 3,5V19C3,20.11 3.89,21 5,21H19C20.11,21 21,20.11 21,19V5C21,3.89 20.11,3 19,3H5M5,5H19V19H5V5M7,7V9H17V7H7M7,11V13H17V11H7M7,15V17H14V15H7Z",Ae="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",ze=(e,t)=>{if(t.reason){if(t.error_reason_translation_key){const i=e.loadBackendTranslation("exceptions",t.domain).then(e=>{var i;return e(`component.${t.domain}.exceptions.${t.error_reason_translation_key}.message`,null!==(i=t.error_reason_translation_placeholders)&&void 0!==i?i:void 0)||t.reason});return(0,s.qy)(I||(I=ye`${0}`),(0,r.T)(i))}const i=e.loadBackendTranslation("config",t.domain).then(e=>e(`component.${t.domain}.config.error.${t.reason}`)||t.reason);return(0,s.qy)(R||(R=ye`${0}`),(0,r.T)(i,t.reason))}return(0,s.qy)(O||(O=ye` <br> <a href="${0}"> ${0} </a> `),`/config/logs?filter=${encodeURIComponent(t.domain)}`,e.localize("ui.panel.config.integrations.config_entry.check_the_logs"))};class Ee extends((0,E.E)(s.WF)){connectedCallback(){super.connectedCallback(),window.addEventListener("hashchange",this._handleHashChange),this._handleHashChange()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("hashchange",this._handleHashChange)}hassSubscribe(){return[(0,$.Bz)(this.hass.connection,e=>{this._entities=e}),(0,H.FP)(this.hass.connection,e=>{for(const t of e)t.domain===this.domain&&(this._logInfo=t)})]}willUpdate(e){if(e.has("domain")&&(this.hass.loadBackendTranslation("title",[this.domain]),this.hass.loadBackendTranslation("config",[this.domain]),this.hass.loadBackendTranslation("config_subentries",[this.domain]),this._extraConfigEntries=void 0,this._filter="",this._subEntries={},this._fetchManifest(),this._fetchDiagnostics(),this._fetchEntitySources()),e.has("configEntries")||e.has("_extraConfigEntries")){const e=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries);this._fetchAllSubEntries(e)}}async _fetchEntitySources(){const e=await(0,w.c)(this.hass),t={};for(const[i,n]of Object.entries(e))n.domain in t||(t[n.domain]=[]),t[n.domain].push(i);this._domainEntities=t}updated(e){super.updated(e),this._searchParms.has("config_entry")&&(e.has("configEntries")&&!e.get("configEntries")||e.has("_searchParms"))&&this.configEntries&&this._highlightEntry()}render(){var e,t,i,n,o,a,r,l,c,d,g;if(!this.configEntries||!this.domain)return s.s6;const p=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries),u=new Set;p.forEach(e=>{Object.keys(e.supported_subentry_types).forEach(e=>{u.add(e)})});const m=this._domainConfigEntriesInProgress(this.domain,this.configEntriesInProgress),_=this._discoveryFlows(m,this.hass.locale.language),f=this._attentionFlows(m),y=this._attentionEntries(p),b=this._normalEntries(p,this.hass.locale.language),$=this._buildNormalEntryData(b,this.hass.devices,this._subEntries,this.hass.locale.language,this.hass.localize),w=this._buildAttentionEntryData(y,this.hass.devices,this._subEntries,this.hass.locale.language,this.hass.localize),C=this._filterNormalTree($,this._filter,this.hass.areas),x=this._filterDiscoveryTree(_,this._filter),V=this._filterAttentionFlowTree(f,this._filter),M=this._filterAttentionTree(w,this._filter,this.hass.areas),A=this._getDevices(p,this.hass.devices),z=this._getEntities(p,this._entities);let E=z.length;if(this.domain in this._domainEntities&&E!==this._domainEntities[this.domain].length)if(E){const e=new Set(z.map(e=>e.entity_id));for(const t of this._domainEntities[this.domain])e.add(t);E=e.size}else E=this._domainEntities[this.domain].length;const k=A.filter(e=>"service"===e.entry_type),S=A.filter(e=>"service"!==e.entry_type),T=h.x.includes(this.domain);return(0,s.qy)(U||(U=ye` <hass-subpage .hass="${0}" .narrow="${0}"> ${0} ${0} <div class="container"> <div class="header"> <div class="title-container"> <div class="logo-container"> <img alt="${0}" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer" @load="${0}" @error="${0}"> </div> <div class="title"> <h1>${0}</h1> <div class="sub"> ${0} ${0} ${0} ${0} ${0} </div> <div> ${0} ${0} ${0} ${0} ${0} </div> </div> </div> <div class="actions"> ${0} ${0} ${0} </div> </div> ${0} ${0} ${0} ${0} <div class="section"> <h3 class="section-header"> ${0} </h3> ${0} </div> </div> </hass-subpage> `),this.hass,this.narrow,this._manifest?(0,s.qy)(W||(W=ye` <a slot="toolbar-icon" href="${0}" rel="noreferrer" target="_blank"> <ha-icon-button .label="${0}" .path="${0}"></ha-icon-button> </a> `),this._manifest.is_built_in?(0,D.o)(this.hass,`/integrations/${this._manifest.domain}`):this._manifest.documentation,this.hass.localize("ui.panel.config.integrations.config_entry.documentation"),He):s.s6,null!==(e=this._manifest)&&void 0!==e&&e.config_flow||this._logInfo?(0,s.qy)(j||(j=ye`<ha-dropdown slot="toolbar-icon"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> ${0} ${0} </ha-dropdown>`),this.hass.localize("ui.common.menu"),we,this._manifest&&(this._manifest.is_built_in||this._manifest.issue_tracker)?(0,s.qy)(N||(N=ye` <a href="${0}" rel="noreferrer" target="_blank"> <ha-dropdown-item> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} <ha-svg-icon slot="details" .path="${0}"></ha-svg-icon> </ha-dropdown-item> </a> `),(0,H.QQ)(this.domain,this._manifest),ve,this.hass.localize("ui.panel.config.integrations.config_entry.known_issues"),Le):s.s6,this._logInfo?(0,s.qy)(G||(G=ye`<a href="${0}"> <ha-dropdown-item> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> <ha-dropdown-item @click="${0}"> <ha-svg-icon slot="icon" .variant="${0}" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item>`),`/config/logs?filter=${encodeURIComponent(this.domain)}`,Me,this.hass.localize("ui.panel.config.logs.caption"),this._logInfo.level===H.S1.DEBUG?this._handleDisableDebugLogging:this._handleEnableDebugLogging,this._logInfo.level===H.S1.DEBUG?"danger":"default",this._logInfo.level===H.S1.DEBUG?$e:be,this._logInfo.level===H.S1.DEBUG?this.hass.localize("ui.panel.config.integrations.config_entry.disable_debug_logging"):this.hass.localize("ui.panel.config.integrations.config_entry.enable_debug_logging")):s.s6):s.s6,(0,H.p$)(this.hass.localize,this.domain),(0,q.MR)({domain:this.domain,type:"icon@2x",darkOptimized:null===(t=this.hass.themes)||void 0===t?void 0:t.darkMode},this.hass.auth.data.hassUrl),this._onImageLoad,this._onImageError,(0,H.p$)(this.hass.localize,this.domain),null!=(null===(i=this._manifest)||void 0===i?void 0:i.version)?(0,s.qy)(Q||(Q=ye`<span class="version">${0}</span>`),this.hass.localize("ui.panel.config.integrations.config_entry.version",{version:this._manifest.version})):s.s6,!1===(null===(n=this._manifest)||void 0===n?void 0:n.is_built_in)?(0,s.qy)(K||(K=ye`<div class="${0}"> <ha-svg-icon path="${0}"></ha-svg-icon> <a href="${0}" rel="noopener noreferrer" target="_blank"> ${0} </a> </div>`),"integration-info "+(this._manifest.overwrites_built_in?"error":"warn"),xe,(0,D.o)(this.hass,"/docs/quality_scale/#-custom"),this.hass.localize(this._manifest.overwrites_built_in?"ui.panel.config.integrations.config_entry.custom_overwrites_core":"ui.panel.config.integrations.config_entry.custom_integration")):s.s6,null!==(o=this._manifest)&&void 0!==o&&null!==(o=o.iot_class)&&void 0!==o&&o.startsWith("cloud_")?(0,s.qy)(X||(X=ye`<div class="integration-info"> <ha-svg-icon .path="${0}"></ha-svg-icon> ${0} </div>`),Ae,this.hass.localize("ui.panel.config.integrations.config_entry.depends_on_cloud")):s.s6,0===b.length&&this._manifest&&!this._manifest.config_flow&&this.hass.config.components.find(e=>e.split(".")[0]===this.domain)?(0,s.qy)(J||(J=ye`<div class="integration-info info"> <ha-svg-icon path="${0}"></ha-svg-icon>${0} </div>`),Ce,this.hass.localize("ui.panel.config.integrations.config_entry.no_config_flow")):s.s6,null!==(a=this._manifest)&&void 0!==a&&a.is_built_in&&this._manifest.quality_scale&&this._manifest.quality_scale in L.M?(0,s.qy)(Y||(Y=ye` <div class="integration-info"> <a href="${0}" rel="noopener noreferrer" target="_blank"> <ha-svg-icon class="${0}" .path="${0}"></ha-svg-icon> ${0} <ha-svg-icon class="open-external" .path="${0}"></ha-svg-icon> </a> </div> `),(0,D.o)(this.hass,`/docs/quality_scale/#-${this._manifest.quality_scale}`),`quality-scale ${this._manifest.quality_scale}-quality`,L.M[this._manifest.quality_scale].icon,this.hass.localize(L.M[this._manifest.quality_scale].translationKey),Le):s.s6,S.length?(0,s.qy)(ee||(ee=ye` <a href="${0}"> ${0} </a> `),1===S.length?`/config/devices/device/${S[0].id}`:`/config/devices/dashboard?historyBack=1&domain=${this.domain}`,this.hass.localize("ui.panel.config.integrations.config_entry.devices",{count:S.length})):s.s6,S.length&&k.length?" • ":"",k.length?(0,s.qy)(te||(te=ye`<a href="${0}"> ${0} </a>`),1===k.length?`/config/devices/device/${k[0].id}`:`/config/devices/dashboard?historyBack=1&domain=${this.domain}`,this.hass.localize("ui.panel.config.integrations.config_entry.services",{count:k.length})):s.s6,(S.length||k.length)&&E?" • ":"",E?(0,s.qy)(ie||(ie=ye` <a href="${0}"> ${0} </a> `),`/config/entities?historyBack=1&domain=${this.domain}`,this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:E})):s.s6,T?(0,s.qy)(ne||(ne=ye` <ha-button @click="${0}"> ${0} </ha-button> `),this._addDevice,this.hass.localize("ui.panel.config.integrations.integration_page.add_device")):s.s6,"hardware"===(null===(r=this._manifest)||void 0===r?void 0:r.integration_type)||null!==(l=this._manifest)&&void 0!==l&&l.single_config_entry&&(0!==$.length||0!==w.length)?s.s6:(0,s.qy)(oe||(oe=ye`<ha-button .appearance="${0}" @click="${0}"> ${0} </ha-button>`),T?"filled":"accent",this._addIntegration,this.hass.localize(`component.${this.domain}.config.initiate_flow.user`)||(null!==(c=this._manifest)&&void 0!==c&&c.integration_type?this.hass.localize(`ui.panel.config.integrations.integration_page.add_${this._manifest.integration_type}`):this.hass.localize("ui.panel.config.integrations.integration_page.add_entry"))),Array.from(u).map(e=>(0,s.qy)(se||(se=ye`<ha-button appearance="filled" @click="${0}" .flowType="${0}" .disabled="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0}</ha-button>`),this._addSubEntry,e,!b.length,Ve,this.hass.localize(`component.${this.domain}.config_subentries.${e}.initiate_flow.user`))),$.length+w.length>0?(0,s.qy)(ae||(ae=ye`<ha-input-search appearance="outlined" .value="${0}" @input="${0}"></ha-input-search>`),this._filter,this._handleSearchChange):s.s6,(null===(d=this._logInfo)||void 0===d?void 0:d.level)===H.S1.DEBUG?(0,s.qy)(re||(re=ye`<div class="section"> <ha-alert alert-type="warning"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} <ha-button size="small" variant="warning" slot="action" @click="${0}"> ${0} </ha-button> </ha-alert> </div>`),be,this.hass.localize("ui.panel.config.integrations.config_entry.debug_logging_enabled"),this._handleDisableDebugLogging,this.hass.localize("ui.common.disable")):s.s6,x.length?(0,s.qy)(le||(le=ye` <div class="section"> <h3 class="section-header"> ${0} </h3> <ha-md-list class="discovered"> ${0} </ha-md-list> </div> `),this.hass.localize("ui.panel.config.integrations.discovered"),x.map(e=>(0,s.qy)(ce||(ce=ye`<ha-md-list-item class="discovered"> ${0} <ha-button slot="end" variant="success" size="small" .flow="${0}" @click="${0}"> ${0} </ha-button> </ha-md-list-item>`),e.localized_title,e,this._continueFlow,this.hass.localize("ui.common.add")))):s.s6,V.length||M.length?(0,s.qy)(de||(de=ye` <div class="section"> <h3 class="section-header"> ${0} </h3> ${0} ${0} </div> `),this.hass.localize("ui.panel.config.integrations.integration_page.attention_entries"),V.length?(0,s.qy)(he||(he=ye`<ha-md-list class="attention"> ${0} </ha-md-list>`),V.map(e=>{const t=v.Al.includes(e.context.source);return(0,s.qy)(ge||(ge=ye`<ha-md-list-item class="config_entry ${0}"> ${0} <span slot="supporting-text">${0}</span> <ha-button slot="end" .flow="${0}" @click="${0}" variant="warning">${0}</ha-button> </ha-md-list-item>`),t?"attention":"",e.localized_title,this.hass.localize("ui.panel.config.integrations."+(t?"attention":"discovered")),e,this._continueFlow,this.hass.localize("ui.panel.config.integrations."+(t?"reconfigure":"configure")))})):s.s6,M.map(e=>(0,s.qy)(pe||(pe=ye`<ha-config-entry-row class="attention" .hass="${0}" .narrow="${0}" .manifest="${0}" .diagnosticHandler="${0}" .entities="${0}" .data="${0}" data-entry-id="${0}"></ha-config-entry-row>`),this.hass,this.narrow,this._manifest,this._diagnosticHandler,this._entities,e,e.entry.entry_id))):s.s6,null!==(g=this._manifest)&&void 0!==g&&g.integration_type?this.hass.localize(`ui.panel.config.integrations.integration_page.entries_${this._manifest.integration_type}`):this.hass.localize("ui.panel.config.integrations.integration_page.entries"),0===C.length?(0,s.qy)(ue||(ue=ye`<div class="card-content no-entries"> ${0} </div>`),this._filter?this.hass.localize("ui.panel.config.integrations.none_found"):this._manifest&&!this._manifest.config_flow&&this.hass.config.components.find(e=>e.split(".")[0]===this.domain)?this.hass.localize("ui.panel.config.integrations.integration_page.yaml_entry"):this.hass.localize("ui.panel.config.integrations.integration_page.no_entries")):(0,s.qy)(me||(me=ye` ${0} `),C.map(e=>(0,s.qy)(_e||(_e=ye`<ha-config-entry-row .hass="${0}" .narrow="${0}" .manifest="${0}" .diagnosticHandler="${0}" .entities="${0}" .data="${0}" data-entry-id="${0}"></ha-config-entry-row>`),this.hass,this.narrow,this._manifest,this._diagnosticHandler,this._entities,e,e.entry.entry_id))))}_onImageLoad(e){e.target.style.display="inline-block"}_onImageError(e){e.target.style.display="none"}async _highlightEntry(){await(0,p.E)();const e=this._searchParms.get("config_entry");this._configEntryRows.forEach(e=>e.classList.remove("highlight"));const t=Array.from(this._configEntryRows).find(t=>t.dataset.entryId===e);t&&(t.scrollIntoView({block:"center"}),t.classList.add("highlight"))}_continueFlow(e){(0,x.W)(this,{continueFlowId:e.target.flow.flow_id,navigateToResult:!0,dialogClosedCallback:()=>{}})}async _fetchManifest(){this.domain&&(this._manifest=await(0,H.QC)(this.hass,this.domain),this._manifest.integration_type&&!["device","hub","service"].includes(this._manifest.integration_type)&&(this._extraConfigEntries=await(0,y.VN)(this.hass,{domain:this.domain})))}async _fetchDiagnostics(){if(this.domain&&(0,c.x)(this.hass.config,"diagnostics"))try{this._diagnosticHandler=await(0,b.g9)(this.hass,this.domain)}catch(e){}}async _fetchAllSubEntries(e){const t=++this._subEntriesFetchId,i=e.filter(e=>e.num_subentries>0);if(!i.length)return void(this._subEntries={});const n={};await Promise.all(i.map(async e=>{try{n[e.entry_id]=(await(0,y.t0)(this.hass,e.entry_id)).sort((e,t)=>(0,g.SH)(e.title,t.title,this.hass.locale.language))}catch(t){n[e.entry_id]=[]}})),t===this._subEntriesFetchId&&(this._subEntries=n)}_handleSearchChange(e){var t;this._filter=null!==(t=e.target.value)&&void 0!==t?t:""}async _handleEnableDebugLogging(){const e=this.domain;await(0,H.nQ)(this.hass,e,H.S1[H.S1.DEBUG],"once")}async _handleDisableDebugLogging(e){e.stopPropagation();const t=this.domain;await(0,H.nQ)(this.hass,t,H.S1[H.S1.NOTSET],"once");const i=`home-assistant_${t}_${(new Date).toISOString().replace(/:/g,"-")}.log`,n=await(0,f.e0)(this.hass,(0,C._)(this.hass));(0,T.R)(n.path,i)}_addDevice(){(0,h.P)(this,this.hass,this.domain)}async _addIntegration(){var e;null!==(e=this._manifest)&&void 0!==e&&e.config_flow?(0,Z.X)(this,{domain:this.domain,navigateToResult:!0}):(0,M.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.yaml_only_title"),text:this.hass.localize("ui.panel.config.integrations.config_flow.yaml_only")})}async _addSubEntry(e){const t=e.target.flowType,i=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries).filter(e=>"ignore"!==e.source);i.length&&(1!==i.length||"loaded"!==i[0].state?(0,P.J)(this,{domain:this.domain,subFlowType:t,configEntries:i,configEntryPicked:e=>{(0,V.a)(this,e,t,{startFlowHandler:e.entry_id})}}):(0,V.a)(this,i[0],t,{startFlowHandler:i[0].entry_id}))}static get styles(){return[S.RF,(0,s.AH)(fe||(fe=ye`.container{display:flex;flex-wrap:wrap;margin:auto;max-width:1000px;padding:32px}:host([narrow]) .container{padding:16px}.container>*{flex-grow:1}.header{display:flex;flex-wrap:wrap;gap:var(--ha-space-6);align-items:center;justify-content:space-between;margin-bottom:24px}.title-container{display:flex;align-items:center}.title{display:flex;gap:var(--ha-space-1);flex-direction:column;justify-content:space-between}.title h1{font-family:var(--ha-font-family-body);font-size:32px;font-weight:700;line-height:40px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none;margin:0}.sub{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center}.card-content{padding:16px 0 8px}.card-header{padding-bottom:0}.no-entries{padding:12px 16px}.logo-container{display:flex;justify-content:center;margin-right:16px;margin-inline-end:16px;margin-inline-start:initial;padding:0 8px}.logo-container img{width:80px}.version{color:var(--secondary-text-color)}.overview .card-actions{padding:0}img{max-width:200px;max-height:100px}@keyframes shimmer{100%{mask-position:left}}.actions{display:flex;flex-wrap:wrap;gap:var(--ha-space-2)}ha-input-search{width:100%;margin-bottom:var(--ha-space-4)}.section{width:100%}.section-header{margin-inline-start:16px;margin-top:6px;margin-bottom:6px;font-family:var(--ha-font-family-body);font-size:14px;font-weight:500;line-height:20px;letter-spacing:.10000000149011612px;text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none;color:var(--secondary-text-color)}.integration-info{display:flex;align-items:center;gap:var(--ha-space-2)}.integration-info ha-svg-icon{min-width:24px;color:var(--mdc-theme-text-icon-on-background)}.integration-info.warn ha-svg-icon{color:var(--warning-color)}.integration-info.error ha-svg-icon{color:var(--error-color)}.integration-info.info ha-svg-icon{color:var(--info-color)}.quality-scale{mask:linear-gradient(-60deg,#000 30%,#0005,#000 70%) right/350% 100%;animation:shimmer 2.5s infinite}ha-svg-icon.bronze-quality{color:#cd7f32}ha-svg-icon.silver-quality{color:silver}ha-svg-icon.gold-quality{color:gold}ha-svg-icon.platinum-quality{color:#727272}ha-svg-icon.legacy-quality{color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38));animation:unset}ha-md-list{border:1px solid var(--divider-color);border-radius:var(--ha-border-radius-md);padding:0}.discovered{--md-list-container-color:rgba(var(--rgb-success-color), 0.2)}.attention{--md-list-container-color:rgba(var(--rgb-warning-color), 0.2)}ha-md-list-item{--md-list-item-top-space:4px;--md-list-item-bottom-space:4px;position:relative}ha-md-list-item.discovered{height:72px}ha-md-list-item.config_entry::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:""}ha-config-entry-row{display:block;margin-bottom:16px}a{text-decoration:none}.warning{color:var(--error-color)}.state-failed-unload{--state-message-color:var(--warning-color);--text-on-state-color:var(--primary-text-color)}.state-failed::after{background-color:var(--warning-color)}.state-not-loaded{--state-message-color:var(--primary-text-color)}.state-setup{--state-message-color:var(--secondary-text-color)}.message{font-weight:var(--ha-font-weight-bold);display:flex;align-items:center}.message ha-svg-icon{color:var(--state-message-color)}.message div{flex:1;margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;padding-top:2px;padding-right:2px;padding-inline-end:2px;padding-inline-start:initial;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:7;overflow:hidden;text-overflow:ellipsis}.state-disabled [slot=headline],.state-disabled [slot=supporting-text]{opacity:var(--md-list-item-disabled-opacity, .3)}ha-md-list{margin-top:8px;margin-bottom:8px}a[slot=toolbar-icon]{color:var(--sidebar-icon-color)}ha-svg-icon.open-external{min-width:14px;width:14px}`))]}constructor(...e){super(...e),this.narrow=!1,this.isWide=!1,this.configEntriesInProgress=[],this._entities=[],this._searchParms=new URLSearchParams(window.location.hash.substring(1)),this._filter="",this._subEntries={},this._subEntriesFetchId=0,this._domainEntities={},this._handleHashChange=()=>{this._searchParms=new URLSearchParams(window.location.hash.substring(1))},this._domainConfigEntries=(0,l.A)((e,t)=>t?t.filter(t=>t.domain===e):[]),this._domainConfigEntriesInProgress=(0,l.A)((e,t)=>t?t.filter(t=>t.handler===e):[]),this._buildEntryData=(e,t,i,n,o)=>{const s=(e,t)=>(0,g.SH)((0,d.T)(e,o,this.hass.states)||"",(0,d.T)(t,o,this.hass.states)||"",n);return e.map(e=>{const n=Object.values(t).filter(t=>t.config_entries.includes(e.entry_id)),o=(i[e.entry_id]||[]).map(t=>{const i=n.filter(i=>{var n;return(null===(n=i.config_entries_subentries[e.entry_id])||void 0===n?void 0:n.includes(t.subentry_id))&&"service"!==i.entry_type}).sort(s),o=n.filter(i=>{var n;return(null===(n=i.config_entries_subentries[e.entry_id])||void 0===n?void 0:n.includes(t.subentry_id))&&"service"===i.entry_type}).sort(s);return{subEntry:t,devices:i,services:o}}),a=n.filter(t=>{var i;return!(null!==(i=t.config_entries_subentries[e.entry_id])&&void 0!==i&&i.length&&null!==t.config_entries_subentries[e.entry_id][0]||"service"===t.entry_type)}).sort(s),r=n.filter(t=>{var i;return!(null!==(i=t.config_entries_subentries[e.entry_id])&&void 0!==i&&i.length&&null!==t.config_entries_subentries[e.entry_id][0]||"service"!==t.entry_type)}).sort(s);return{entry:e,devices:a,services:r,subEntries:o}})},this._buildNormalEntryData=(0,l.A)(this._buildEntryData),this._buildAttentionEntryData=(0,l.A)(this._buildEntryData),this._normalEntries=(0,l.A)((e,t)=>e.filter(e=>"ignore"!==e.source&&!y.m4.includes(e.state)).sort((e,i)=>Boolean(e.disabled_by)!==Boolean(i.disabled_by)?e.disabled_by?1:-1:(0,g.SH)(e.title,i.title,t))),this._attentionEntries=(0,l.A)(e=>e.filter(e=>y.m4.includes(e.state))),this._discoveryFlows=(0,l.A)((e,t)=>e.filter(e=>!v.Al.includes(e.context.source)).sort((e,i)=>(0,g.SH)(e.localized_title||"zzz",i.localized_title||"zzz",t))),this._attentionFlows=(0,l.A)(e=>e.filter(e=>v.Al.includes(e.context.source))),this._filterTree=(0,l.A)((e,t,i)=>{if(!t)return e;const n=["name","manufacturer","model","sw_version","area"],o=e=>{var t;return{device:e,name:e.name_by_user||e.name||"",manufacturer:e.manufacturer||"",model:e.model||"",sw_version:e.sw_version||"",area:e.area_id&&(null===(t=i[e.area_id])||void 0===t?void 0:t.name)||""}},s=e=>(0,k.C)(e.map(o),t,n,void 0,{keys:n}).map(e=>e.device),a=["title"],r=e=>(0,k.C)([{title:e}],t,a,void 0,{keys:a}).length>0,l=[];for(const c of e){if(r(c.entry.title)){l.push(c);continue}const e=s(c.devices),t=s(c.services),i=c.subEntries.map(e=>{if(r(e.subEntry.title))return e;const t=s(e.devices),i=s(e.services);return t.length||i.length?{subEntry:e.subEntry,devices:t,services:i}:null}).filter(e=>null!==e);(e.length||t.length||i.length)&&l.push({entry:c.entry,devices:e,services:t,subEntries:i})}return l}),this._filterNormalTree=(0,l.A)((e,t,i)=>this._filterTree(e,t,i)),this._filterFlowTree=(e,t)=>{if(!t)return e;const i=["localized_title"];return(0,k.C)(e.filter(e=>e.localized_title),t,i,void 0,{keys:i})},this._filterDiscoveryTree=(0,l.A)((e,t)=>this._filterFlowTree(e,t)),this._filterAttentionFlowTree=(0,l.A)((e,t)=>this._filterFlowTree(e,t)),this._filterAttentionTree=(0,l.A)((e,t,i)=>this._filterTree(e,t,i)),this._getEntities=(0,l.A)((e,t)=>{if(!t)return[];const i=e.map(e=>e.entry_id);return t.filter(e=>e.config_entry_id&&i.includes(e.config_entry_id))}),this._getDevices=(0,l.A)((e,t)=>{if(!t)return[];const i=e.map(e=>e.entry_id);return Object.values(t).filter(e=>e.config_entries.some(e=>i.includes(e)))})}}(0,o.Cg)([(0,a.MZ)({attribute:!1})],Ee.prototype,"hass",void 0),(0,o.Cg)([(0,a.MZ)()],Ee.prototype,"domain",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],Ee.prototype,"narrow",void 0),(0,o.Cg)([(0,a.MZ)({attribute:"is-wide",type:Boolean})],Ee.prototype,"isWide",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],Ee.prototype,"configEntries",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],Ee.prototype,"configEntriesInProgress",void 0),(0,o.Cg)([(0,a.wk)()],Ee.prototype,"_entities",void 0),(0,o.Cg)([(0,a.wk)()],Ee.prototype,"_manifest",void 0),(0,o.Cg)([(0,a.wk)()],Ee.prototype,"_extraConfigEntries",void 0),(0,o.Cg)([(0,a.wk)()],Ee.prototype,"_diagnosticHandler",void 0),(0,o.Cg)([(0,a.wk)()],Ee.prototype,"_logInfo",void 0),(0,o.Cg)([(0,a.wk)()],Ee.prototype,"_searchParms",void 0),(0,o.Cg)([(0,a.wk)()],Ee.prototype,"_filter",void 0),(0,o.Cg)([(0,a.wk)()],Ee.prototype,"_subEntries",void 0),(0,o.Cg)([(0,a.wk)()],Ee.prototype,"_domainEntities",void 0),(0,o.Cg)([(0,a.YG)("ha-config-entry-row")],Ee.prototype,"_configEntryRows",void 0),Ee=(0,o.Cg)([(0,a.EM)("ha-config-integration-page")],Ee),n()}catch(I){n(I)}})},9567:function(e,t,i){i.a(e,async function(e,t){try{i(18111),i(22489),i(61701),i(3362),i(62953);var n=i(40445),o=i(5124),s=i(67576),a=i(6412),r=i(29823),l=(i(70947),i(77423)),c=i(26401),d=i(33963),h=i(8313),g=e([r,h,d]);[r,h,d]=g.then?(await g)():g;let p,u,m,_,f,y,v,b,$,w,C=e=>e;const H="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",L="M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z",x="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",V="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",M="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",A="M22 15V16L14 18.5L7 16.6V18H1V7H9L15.2 9.3C16.2 9.7 17 10.8 17 12H19C20.7 12 22 13.3 22 15M5 16V9H3V16H5M19.9 14.6C19.7 14.2 19.4 14 19 14H13.6C13.1 14 12.5 13.9 12 13.8L9.7 13L10.3 11.1L12.7 11.9C13 11.9 15 12 15 12C15 11.6 14.8 11.3 14.4 11.2L8.6 9H7V14.5L14 16.4L19.9 14.6Z",z="M18,17H10.5L12.5,15H18M6,17V14.5L13.88,6.65C14.07,6.45 14.39,6.45 14.59,6.65L16.35,8.41C16.55,8.61 16.55,8.92 16.35,9.12L8.47,17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z",E="M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z";class k extends o.WF{render(){var e;const t=this.data.subEntry,i=this.entry,n=this.data.devices,s=this.data.services,r=this._getEntities();return(0,o.qy)(p||(p=C`<ha-md-list> <ha-md-list-item class="sub-entry" data-entry-id="${0}" .configEntry="${0}" .subEntry="${0}"> ${0} <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> ${0} <ha-dropdown slot="end" @wa-select="${0}"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> ${0} ${0} ${0} <ha-dropdown-item value="rename"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> <ha-dropdown-item variant="danger" value="delete"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> </ha-dropdown> </ha-md-list-item> ${0} </ha-md-list>`),i.entry_id,i,t,n.length||s.length?(0,o.qy)(u||(u=C`<ha-icon-button class="expand-button ${0}" .path="${0}" slot="start" @click="${0}"></ha-icon-button>`),(0,a.H)({expanded:this._expanded}),H,this._toggleExpand):o.s6,t.title,this.hass.localize(`component.${i.domain}.config_subentries.${t.subentry_type}.entry_type`),null!==(e=i.supported_subentry_types[t.subentry_type])&&void 0!==e&&e.supports_reconfigure?(0,o.qy)(m||(m=C` <ha-icon-button slot="end" @click="${0}" .path="${0}" .label="${0}"> </ha-icon-button> `),this._handleReconfigureSub,L,this.hass.localize(`component.${i.domain}.config_subentries.${t.subentry_type}.initiate_flow.reconfigure`)||this.hass.localize("ui.panel.config.integrations.config_entry.configure")):o.s6,this._handleMenuAction,this.hass.localize("ui.common.menu"),M,n.length||s.length?(0,o.qy)(_||(_=C` <a href="${0}"> <ha-dropdown-item value="devices"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `),1===n.length?`/config/devices/device/${n[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${i.entry_id}&sub_entry=${t.subentry_id}`,V,this.hass.localize("ui.panel.config.integrations.config_entry.devices",{count:n.length})):o.s6,s.length?(0,o.qy)(f||(f=C` <a href="${0}"> <ha-dropdown-item value="services"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `),1===s.length?`/config/devices/device/${s[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${i.entry_id}&sub_entry=${t.subentry_id}`,A,this.hass.localize("ui.panel.config.integrations.config_entry.services",{count:s.length})):o.s6,r.length?(0,o.qy)(y||(y=C` <a href="${0}"> <ha-dropdown-item value="entities"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} <ha-icon-next slot="details"></ha-icon-next> </ha-dropdown-item> </a> `),`/config/entities?historyBack=1&config_entry=${i.entry_id}&sub_entry=${t.subentry_id}`,E,this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:r.length})):o.s6,z,this.hass.localize("ui.panel.config.integrations.config_entry.rename"),x,this.hass.localize("ui.panel.config.integrations.config_entry.delete"),this._expanded?(0,o.qy)(v||(v=C` ${0} ${0} `),n.map(e=>(0,o.qy)(b||(b=C`<ha-config-entry-device-row .hass="${0}" .narrow="${0}" .entry="${0}" .device="${0}" .entities="${0}"></ha-config-entry-device-row>`),this.hass,this.narrow,this.entry,e,this.entities)),s.map(e=>(0,o.qy)($||($=C`<ha-config-entry-device-row .hass="${0}" .narrow="${0}" .entry="${0}" .device="${0}" .entities="${0}"></ha-config-entry-device-row>`),this.hass,this.narrow,this.entry,e,this.entities))):o.s6)}_toggleExpand(){this._expanded=!this._expanded}async _handleReconfigureSub(){(0,c.a)(this,this.entry,this.data.subEntry.subentry_type,{startFlowHandler:this.entry.entry_id,subEntryId:this.data.subEntry.subentry_id})}constructor(...e){super(...e),this.narrow=!1,this._expanded=!0,this._getEntities=()=>this.entities.filter(e=>e.config_subentry_id===this.data.subEntry.subentry_id),this._handleMenuAction=e=>{switch(e.detail.item.value){case"rename":this._handleRenameSub();break;case"delete":this._handleDeleteSub()}},this._handleRenameSub=async()=>{const e=await(0,d.showPromptDialog)(this,{title:this.hass.localize("ui.common.rename"),defaultValue:this.data.subEntry.title,inputLabel:this.hass.localize("ui.panel.config.integrations.rename_input_label")});null!==e&&await(0,l.A)(this.hass,this.entry.entry_id,this.data.subEntry.subentry_id,{title:e})},this._handleDeleteSub=async()=>{await(0,d.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_title",{title:this.data.subEntry.title}),text:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_text"),confirmText:this.hass.localize("ui.common.delete"),dismissText:this.hass.localize("ui.common.cancel"),destructive:!0})&&await(0,l.Cm)(this.hass,this.entry.entry_id,this.data.subEntry.subentry_id)}}}k.styles=(0,o.AH)(w||(w=C`.expand-button{margin:0 -12px;transition:transform 150ms cubic-bezier(.4, 0, .2, 1)}.expand-button.expanded{transform:rotate(180deg)}ha-md-list{border:1px solid var(--divider-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));padding:0;margin:16px;margin-top:0}ha-md-list-item.has-subentries{border-bottom:1px solid var(--divider-color)}ha-dropdown a{text-decoration:none}`)),(0,n.Cg)([(0,s.MZ)({attribute:!1})],k.prototype,"hass",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],k.prototype,"narrow",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],k.prototype,"manifest",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],k.prototype,"diagnosticHandler",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],k.prototype,"entities",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],k.prototype,"entry",void 0),(0,n.Cg)([(0,s.MZ)({attribute:!1})],k.prototype,"data",void 0),(0,n.Cg)([(0,s.wk)()],k.prototype,"_expanded",void 0),k=(0,n.Cg)([(0,s.EM)("ha-config-sub-entry-row")],k),t()}catch(p){t(p)}})},35402:function(e,t,i){i.d(t,{J:function(){return o}});i(3362),i(62953);var n=i(1087);const o=(e,t)=>{(0,n.r)(e,"show-dialog",{dialogTag:"dialog-pick-config-entry",dialogImport:()=>i.e(88889).then(i.bind(i,99712)),dialogParams:t})}},34128:function(e,t,i){i.d(t,{G9:function(){return a},Ni:function(){return s},Ue:function(){return d},Vd:function(){return h},gh:function(){return g}});i(16280),i(74423),i(3362),i(62953);var n=i(1087),o=i(45291);const s=e=>{const t=document.createElement("hui-error-card");return customElements.get("hui-error-card")?t.setConfig(e):(Promise.resolve().then(i.bind(i,4397)),customElements.whenDefined("hui-error-card").then(()=>{customElements.upgrade(t),t.setConfig(e)})),t},a=(e,t)=>({type:"error",error:e,origConfig:t}),r=(e,t)=>{const i=document.createElement(e);return i.setConfig(t),i},l=(e,t,n)=>"badge"===e?(e=>{const t=document.createElement("hui-error-badge");return customElements.get("hui-error-badge")?t.setConfig(e):(Promise.all([i.e(92769),i.e(3283),i.e(72130),i.e(85010),i.e(67218),i.e(98470),i.e(99788),i.e(66283),i.e(82134),i.e(45981),i.e(26092),i.e(39005),i.e(34310),i.e(59704),i.e(25322),i.e(55392),i.e(89747),i.e(71572),i.e(36332),i.e(77563),i.e(15862),i.e(99143),i.e(41344),i.e(12009),i.e(66990),i.e(3025),i.e(38108),i.e(57693),i.e(38260)]).then(i.bind(i,50655)),customElements.whenDefined("hui-error-badge").then(()=>{customElements.upgrade(t),t.setConfig(e)})),t})(a(t,n)):"heading-badge"===e?(e=>{const t=document.createElement("hui-error-heading-badge");return customElements.get("hui-error-heading-badge")?t.setConfig(e):(Promise.all([i.e(92769),i.e(3283),i.e(72130),i.e(85010),i.e(67218),i.e(98470),i.e(99788),i.e(66283),i.e(82134),i.e(45981),i.e(26092),i.e(39005),i.e(34310),i.e(59704),i.e(25322),i.e(55392),i.e(89747),i.e(71572),i.e(36332),i.e(77563),i.e(15862),i.e(99143),i.e(41344),i.e(12009),i.e(66990),i.e(3025),i.e(38108),i.e(57693),i.e(21614)]).then(i.bind(i,13469)),customElements.whenDefined("hui-error-heading-badge").then(()=>{customElements.upgrade(t),t.setConfig(e)})),t})(((e,t)=>({type:"error",error:e,origConfig:t}))(t,n)):s({type:"error",message:t}),c=e=>(0,o.c8)(e)?(0,o.Iu)(e):void 0,d=(e,t,i,n,o,s)=>{try{return h(e,t,i,n,o,s)}catch(a){return console.error(e,t.type,a),l(e,a.message,t)}},h=(e,t,i,o,s,a)=>{if(!t||"object"!=typeof t)throw new Error("Config is not an object");if(!(t.type||a||s&&"entity"in t))throw new Error("No card type configured");const d=t.type?c(t.type):void 0;if(d)return((e,t,i)=>{if(customElements.get(t))return r(t,i);const o=l(e,`Custom element doesn't exist: ${t}.`,i);if(!t.includes("-"))return o;o.style.display="None";const s=window.setTimeout(()=>{o.style.display=""},2e3);return customElements.whenDefined(t).then(()=>{clearTimeout(s),(0,n.r)(o,"ll-rebuild")}),o})(e,d,t);let h;if(s&&!t.type&&t.entity){h=`${s[t.entity.split(".",1)[0]]||s._domain_not_found}-entity`}else h=t.type||a;if(void 0===h)throw new Error("No type specified");const g=`hui-${h}-${e}`;if(o&&h in o)return o[h](),((e,t)=>{if(customElements.get(e))return r(e,t);const i=document.createElement(e);return customElements.whenDefined(e).then(()=>{try{customElements.upgrade(i),(0,n.r)(i,"ll-upgrade"),i.setConfig(t)}catch(e){(0,n.r)(i,"ll-rebuild")}}),i})(g,t);if(i&&i.has(h))return r(g,t);throw new Error(`Unknown type encountered: ${h}`)},g=async(e,t,i,n)=>{const o=c(e);if(o){const e=customElements.get(o);if(e)return e;if(!o.includes("-"))throw new Error(`Custom element not found: ${o}`);return new Promise((e,t)=>{setTimeout(()=>t(new Error(`Custom element not found: ${o}`)),2e3),customElements.whenDefined(o).then(()=>e(customElements.get(o)))})}const s=`hui-${e}-${t}`,a=customElements.get(s);if(i&&i.has(e))return a;if(n&&e in n)return a||n[e]().then(()=>customElements.get(s));throw new Error(`Unknown type: ${e}`)}},94225:function(e,t,i){i.a(e,async function(e,n){try{i.d(t,{T:function(){return v},t:function(){return b}});i(3362),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var o=i(99799),s=i(29003),a=i(92055),r=i(19396),l=i(74323),c=i(51199),d=i(43721),h=i(65509),g=i(21659),p=i(82525),u=i(34128),m=e([o,s,a,r,l,c,d,h,g,p]);[o,s,a,r,l,c,d,h,g,p]=m.then?(await m)():m;const _=new Set(["media-player-entity","scene-entity","script-entity","sensor-entity","simple-entity","toggle-entity","button","call-service"]),f={"button-entity":()=>i.e(26846).then(i.bind(i,21869)),"climate-entity":()=>i.e(56995).then(i.bind(i,2798)),"cover-entity":()=>i.e(41243).then(i.bind(i,79734)),"date-entity":()=>i.e(17418).then(i.bind(i,75473)),"datetime-entity":()=>Promise.all([i.e(99194),i.e(24617),i.e(55328)]).then(i.bind(i,69690)),"event-entity":()=>Promise.resolve().then(i.bind(i,99799)),"group-entity":()=>i.e(68827).then(i.bind(i,53110)),"input-button-entity":()=>i.e(19825).then(i.bind(i,46472)),"humidifier-entity":()=>i.e(378).then(i.bind(i,53537)),"input-datetime-entity":()=>i.e(71748).then(i.bind(i,1391)),"input-number-entity":()=>i.e(17600).then(i.bind(i,58723)),"input-select-entity":()=>i.e(44325).then(i.bind(i,54596)),"input-text-entity":()=>i.e(8086).then(i.bind(i,51765)),"lock-entity":()=>i.e(28245).then(i.bind(i,49748)),"number-entity":()=>i.e(71523).then(i.bind(i,57198)),"select-entity":()=>i.e(9374).then(i.bind(i,78157)),"text-entity":()=>i.e(67973).then(i.bind(i,58212)),"time-entity":()=>Promise.all([i.e(21209),i.e(7004)]).then(i.bind(i,87550)),"timer-entity":()=>i.e(94097).then(i.bind(i,6344)),"update-entity":()=>i.e(80275).then(i.bind(i,38238)),"valve-entity":()=>i.e(96654).then(i.bind(i,46493)),conditional:()=>Promise.all([i.e(67218),i.e(77563),i.e(78490)]).then(i.bind(i,80725)),"weather-entity":()=>Promise.all([i.e(12009),i.e(77547)]).then(i.bind(i,80395)),divider:()=>i.e(45249).then(i.bind(i,38584)),section:()=>i.e(51255).then(i.bind(i,39082)),weblink:()=>i.e(69148).then(i.bind(i,65751)),cast:()=>i.e(10405).then(i.bind(i,96612)),buttons:()=>i.e(50777).then(i.bind(i,65728)),attribute:()=>Promise.resolve().then(i.bind(i,65509)),text:()=>i.e(95421).then(i.bind(i,3980))},y={_domain_not_found:"simple",alert:"toggle",automation:"toggle",button:"button",climate:"climate",cover:"cover",date:"date",datetime:"datetime",event:"event",fan:"toggle",group:"group",humidifier:"humidifier",input_boolean:"toggle",input_button:"input-button",input_datetime:"input-datetime",input_number:"input-number",input_select:"input-select",input_text:"input-text",light:"toggle",lock:"lock",media_player:"media-player",number:"number",remote:"toggle",scene:"scene",script:"script",select:"select",sensor:"sensor",siren:"toggle",switch:"toggle",text:"text",time:"time",timer:"timer",update:"update",vacuum:"toggle",valve:"valve",water_heater:"climate",weather:"weather"},v=e=>(0,u.Ue)("row",e,_,f,y,void 0),b=e=>(0,u.gh)(e,"row",_,f);n()}catch(_){n(_)}})},30039:function(e,t,i){i.d(t,{R:function(){return o}});i(62953),i(3296),i(27208),i(48408),i(14603),i(47566),i(98721);var n=i(16869);const o=(e,t="")=>{const i=document.createElement("a");i.target="_blank",i.href=e,i.download=t,i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click")),document.body.removeChild(i),e.startsWith("blob:")&&(n.B?setTimeout(()=>URL.revokeObjectURL(e),1e4):URL.revokeObjectURL(e))}}}]);