UNPKG

iobroker.lovelace

Version:

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

2 lines 69.4 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["3693"],{99426:function(e,i,t){t.r(i);var n=t(61701),o=(t(71695),t(47021),t(57243)),a=t(50778),s=t(35359),r=t(36522);t(23334),t(37583);let l,c,d,h,g=e=>e;const u={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};(0,n.Z)([(0,a.Mo)("ha-alert")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)()],key:"title",value(){return""}},{kind:"field",decorators:[(0,a.Cb)({attribute:"alert-type"})],key:"alertType",value(){return"info"}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"dismissable",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,o.dy)(l||(l=g` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,s.$)({[this.alertType]:!0}),this.title?"":"no-title",u[this.alertType],(0,s.$)({content:!0,narrow:this.narrow}),this.title?(0,o.dy)(c||(c=g`<div class="title">${0}</div>`),this.title):o.Ld,this.dismissable?(0,o.dy)(d||(d=g`<ha-icon-button @click="${0}" label="Dismiss alert" .path="${0}"></ha-icon-button>`),this._dismissClicked,"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"):o.Ld)}},{kind:"method",key:"_dismissClicked",value:function(){(0,r.B)(this,"alert-dismissed-clicked")}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(h||(h=g`.issue-type{position:relative;padding:8px;display:flex}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:4px}.icon{z-index:1}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:0}.title{margin-top:2px;font-weight:700}.action ha-icon-button,.action mwc-button{--mdc-theme-primary:var(--primary-text-color);--mdc-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`))}}]}}),o.oi)},59826:function(e,i,t){var n=t(61701),o=(t(71695),t(47021),t(31622)),a=t(57243),s=t(50778),r=t(22344);let l,c=e=>e;(0,n.Z)([(0,s.Mo)("ha-button")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",static:!0,key:"styles",value(){return[r.W,(0,a.iv)(l||(l=c`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}:host([destructive]){--mdc-theme-primary:var(--error-color)}`))]}}]}}),o.Button)},54977:function(e,i,t){var n=t(61701),o=(t(71695),t(47021),t(57243)),a=t(50778);let s,r,l,c=e=>e;(0,n.Z)([(0,a.Mo)("ha-card")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean,reflect:!0})],key:"raised",value(){return!1}},{kind:"field",static:!0,key:"styles",value(){return(0,o.iv)(s||(s=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,12px);border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, 24px);letter-spacing:-.012em;line-height:48px;padding:12px 16px 16px;display:block;margin-block-start:0px;margin-block-end:0px;font-weight:400}:host ::slotted(.card-content:not(:first-child)),slot:not(:first-child)::slotted(.card-content){padding-top:0px;margin-top:-8px}:host ::slotted(.card-content){padding:16px}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:5px 16px}`))}},{kind:"method",key:"render",value:function(){return(0,o.dy)(r||(r=c` ${0} <slot></slot> `),this.header?(0,o.dy)(l||(l=c`<h1 class="card-header">${0}</h1>`),this.header):o.Ld)}}]}}),o.oi)},48103:function(e,i,t){var n=t(61701),o=t(72621),a=(t(71695),t(40251),t(47021),t(57243)),s=t(93958),r=t(97536),l=t(46289),c=t(50778),d=t(36522);let h,g=e=>e;(0,n.Z)([(0,c.Mo)("ha-check-list-item")],(function(e,i){class t extends i{constructor(...i){super(...i),e(this)}}return{F:t,d:[{kind:"method",key:"onChange",value:async function(e){(0,o.Z)(t,"onChange",this,3)([e]),(0,d.B)(this,e.type)}},{kind:"field",static:!0,key:"styles",value(){return[l.W,r.W,(0,a.iv)(h||(h=g`:host{--mdc-theme-secondary:var(--primary-color)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,16px);margin-inline-start:0px;direction:var(--direction)}.mdc-deprecated-list-item__meta{flex-shrink:0;direction:var(--direction);margin-inline-start:auto;margin-inline-end:0}.mdc-deprecated-list-item__graphic{margin-top:var(--check-list-item-graphic-margin-top)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{margin-inline-start:0;margin-inline-end:var(--mdc-list-item-graphic-margin,32px)}`))]}}]}}),s.F)},74633:function(e,i,t){var n=t(61701),o=t(72621),a=(t(71695),t(47021),t(78755)),s=t(57243),r=t(50778);let l,c=e=>e;(0,n.Z)([(0,r.Mo)("ha-md-list-item")],(function(e,i){class t extends i{constructor(...i){super(...i),e(this)}}return{F:t,d:[{kind:"field",static:!0,key:"styles",value(){return[...(0,o.Z)(t,"styles",this),(0,s.iv)(l||(l=c`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center)}`))]}}]}}),a.g)},19993:function(e,i,t){var n=t(61701),o=t(72621),a=(t(71695),t(47021),t(623)),s=t(57243),r=t(50778);let l,c=e=>e;(0,n.Z)([(0,r.Mo)("ha-md-list")],(function(e,i){class t extends i{constructor(...i){super(...i),e(this)}}return{F:t,d:[{kind:"field",static:!0,key:"styles",value(){return[...(0,o.Z)(t,"styles",this),(0,s.iv)(l||(l=c`:host{--md-sys-color-surface:var(--card-background-color)}`))]}}]}}),a.j)},11498:function(e,i,t){t.d(i,{A8:()=>n,Ax:()=>o,Fc:()=>a,G$:()=>s,zq:()=>r});t(40251);const n=async e=>e.callWS({type:"application_credentials/config"}),o=async(e,i)=>e.callWS({type:"application_credentials/config_entry",config_entry_id:i}),a=async e=>e.callWS({type:"application_credentials/list"}),s=async(e,i,t,n,o)=>e.callWS({type:"application_credentials/create",domain:i,client_id:t,client_secret:n,name:o}),r=async(e,i)=>e.callWS({type:"application_credentials/delete",application_credentials_id:i})},6823:function(e,i,t){t.d(i,{ZK:()=>s,iP:()=>a,lf:()=>o,pD:()=>n});const n=e=>e.callWS({type:"diagnostics/list"}),o=(e,i)=>e.callWS({type:"diagnostics/get",domain:i}),a=e=>`/api/diagnostics/config_entry/${e}`,s=(e,i)=>`/api/diagnostics/config_entry/${e}/device/${i}`},62992:function(e,i,t){t.d(i,{m:()=>a});t(71695),t(40251),t(47021);const n=async(e,i,t,o,a,...s)=>{const r=a,l=r[e],c=l=>o&&o(a,l.result)!==l.cacheKey?(r[e]=void 0,n(e,i,t,o,a,...s)):l.result;if(l)return l instanceof Promise?l.then(c):c(l);const d=t(a,...s);return r[e]=d,d.then((t=>{r[e]={result:t,cacheKey:null==o?void 0:o(a,t)},setTimeout((()=>{r[e]=void 0}),i)}),(()=>{r[e]=void 0})),d},o=e=>e.callWS({type:"entity/source"}),a=e=>n("_entitySources",3e4,o,(e=>Object.keys(e.states).length),e)},75951:function(e,i,t){t.d(i,{G:()=>n,l:()=>o});const n=e=>e.callApi("GET","error_log"),o="/api/error_log"},45594:function(e,i,t){t.d(i,{Fv:()=>s,e1:()=>a,eH:()=>n,lJ:()=>o});const n=(e,i)=>{var t;return e.callApi("POST","config/config_entries/options/flow",{handler:i,show_advanced_options:Boolean(null===(t=e.userData)||void 0===t?void 0:t.showAdvanced)})},o=(e,i)=>e.callApi("GET",`config/config_entries/options/flow/${i}`),a=(e,i,t)=>e.callApi("POST",`config/config_entries/options/flow/${i}`,t),s=(e,i)=>e.callApi("DELETE",`config/config_entries/options/flow/${i}`)},91854:function(e,i,t){t.d(i,{c:()=>m});t(71695),t(19423),t(40251),t(47021);var n=t(57243),o=t(57816),a=t(45594),s=t(7956);let r,l,c,d,h,g,u=e=>e;const m=(e,i,t)=>(0,s.w)(e,Object.assign({startFlowHandler:i.entry_id,domain:i.domain},t),{flowType:"options_flow",showDevices:!1,createFlow:async(e,t)=>{const[n]=await Promise.all([(0,a.eH)(e,t),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",i.domain),e.loadBackendTranslation("selector",i.domain)]);return n},fetchFlow:async(e,t)=>{const[n]=await Promise.all([(0,a.lJ)(e,t),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",i.domain),e.loadBackendTranslation("selector",i.domain)]);return n},handleFlowStep:a.e1,deleteFlow:a.Fv,renderAbortDescription(e,t){const o=e.localize(`component.${t.translation_domain||i.domain}.options.abort.${t.reason}`,t.description_placeholders);return o?(0,n.dy)(r||(r=u` <ha-markdown breaks allow-svg .content="${0}"></ha-markdown> `),o):t.reason},renderShowFormStepHeader(e,t){return e.localize(`component.${t.translation_domain||i.domain}.options.step.${t.step_id}.title`,t.description_placeholders)||e.localize("ui.dialogs.options_flow.form.header")},renderShowFormStepDescription(e,t){const o=e.localize(`component.${t.translation_domain||i.domain}.options.step.${t.step_id}.description`,t.description_placeholders);return o?(0,n.dy)(l||(l=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderShowFormStepFieldLabel(e,t,n,o){var a;if("expandable"===n.type)return e.localize(`component.${i.domain}.options.step.${t.step_id}.sections.${n.name}.name`);const s=null!=o&&null!==(a=o.path)&&void 0!==a&&a[0]?`sections.${o.path[0]}.`:"";return e.localize(`component.${i.domain}.options.step.${t.step_id}.${s}data.${n.name}`)||n.name},renderShowFormStepFieldHelper(e,t,o,a){var s;if("expandable"===o.type)return e.localize(`component.${t.translation_domain||i.domain}.options.step.${t.step_id}.sections.${o.name}.description`);const r=null!=a&&null!==(s=a.path)&&void 0!==s&&s[0]?`sections.${a.path[0]}.`:"",l=e.localize(`component.${t.translation_domain||i.domain}.options.step.${t.step_id}.${r}data_description.${o.name}`,t.description_placeholders);return l?(0,n.dy)(c||(c=u`<ha-markdown breaks .content="${0}"></ha-markdown>`),l):""},renderShowFormStepFieldError(e,t,n){return e.localize(`component.${t.translation_domain||i.domain}.options.error.${n}`,t.description_placeholders)||n},renderShowFormStepFieldLocalizeValue(e,t,n){return e.localize(`component.${i.domain}.selector.${n}`)},renderShowFormStepSubmitButton(e,t){return e.localize(`component.${i.domain}.options.step.${t.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===t.last_step?"next":"submit"))},renderExternalStepHeader(e,i){return""},renderExternalStepDescription(e,i){return""},renderCreateEntryDescription(e,i){return(0,n.dy)(d||(d=u` <p>${0}</p> `),e.localize("ui.dialogs.options_flow.success.description"))},renderShowFormProgressHeader(e,t){return e.localize(`component.${i.domain}.options.step.${t.step_id}.title`)||e.localize(`component.${i.domain}.title`)},renderShowFormProgressDescription(e,t){const o=e.localize(`component.${t.translation_domain||i.domain}.options.progress.${t.progress_action}`,t.description_placeholders);return o?(0,n.dy)(h||(h=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuHeader(e,t){return e.localize(`component.${i.domain}.options.step.${t.step_id}.title`)||e.localize(`component.${i.domain}.title`)},renderMenuDescription(e,t){const o=e.localize(`component.${t.translation_domain||i.domain}.options.step.${t.step_id}.description`,t.description_placeholders);return o?(0,n.dy)(g||(g=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuOption(e,t,n){return e.localize(`component.${t.translation_domain||i.domain}.options.step.${t.step_id}.menu_options.${n}`,t.description_placeholders)},renderLoadingDescription(e,t){return e.localize(`component.${i.domain}.options.loading`)||("loading_flow"===t||"loading_step"===t?e.localize(`ui.dialogs.options_flow.loading.${t}`,{integration:(0,o.Lh)(e.localize,i.domain)}):"")}})},34515:function(e,i,t){t.r(i);var n=t(61701),o=(t(71695),t(47021),t(31622),t(57243)),a=t(50778);t(54202),t(43344),t(99426);let s,r,l,c,d,h=e=>e;(0,n.Z)([(0,a.Mo)("hass-error-screen")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"toolbar",value(){return!0}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"rootnav",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)()],key:"error",value:void 0},{kind:"method",key:"render",value:function(){var e,i;return(0,o.dy)(s||(s=h` ${0} <div class="content"> <ha-alert alert-type="error">${0}</ha-alert> <slot> <mwc-button @click="${0}"> ${0} </mwc-button> </slot> </div> `),this.toolbar?(0,o.dy)(r||(r=h`<div class="toolbar"> ${0} </div>`),this.rootnav||null!==(e=history.state)&&void 0!==e&&e.root?(0,o.dy)(l||(l=h` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):(0,o.dy)(c||(c=h` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._handleBack)):"",this.error,this._handleBack,null===(i=this.hass)||void 0===i?void 0:i.localize("ui.common.back"))}},{kind:"method",key:"_handleBack",value:function(){history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[(0,o.iv)(d||(d=h`:host{display:block;height:100%;background-color:var(--primary-background-color)}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;pointer-events:none;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}ha-icon-button-arrow-prev{pointer-events:auto}.content{color:var(--primary-text-color);height:calc(100% - var(--header-height));display:flex;padding:16px;align-items:center;justify-content:center;flex-direction:column;box-sizing:border-box}a{color:var(--primary-color)}ha-alert{margin-bottom:16px}`))]}}]}}),o.oi)},75375:function(e,i,t){t.a(e,(async function(e,n){try{t.r(i);var o=t(61701),a=(t(71695),t(47021),t(57243)),s=t(50778),r=t(17170),l=(t(54202),t(43344),t(28008)),c=e([r]);r=(c.then?(await c)():c)[0];let d,h,g,u,m,p,f=e=>e;(0,o.Z)([(0,s.Mo)("hass-loading-screen")],(function(e,i){return{F:class extends i{constructor(...i){super(...i),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,attribute:"no-toolbar"})],key:"noToolbar",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"rootnav",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)()],key:"message",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,a.dy)(d||(d=f` ${0} <div class="content"> <ha-spinner></ha-spinner> ${0} </div> `),this.noToolbar?"":(0,a.dy)(h||(h=f`<div class="toolbar"> ${0} </div>`),this.rootnav||null!==(e=history.state)&&void 0!==e&&e.root?(0,a.dy)(g||(g=f` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):(0,a.dy)(u||(u=f` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._handleBack)),this.message?(0,a.dy)(m||(m=f`<div id="loading-text">${0}</div>`),this.message):a.Ld)}},{kind:"method",key:"_handleBack",value:function(){history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[l.Qx,(0,a.iv)(p||(p=f`:host{display:block;height:100%;background-color:var(--primary-background-color)}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;pointer-events:none;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto}.content{height:calc(100% - var(--header-height));display:flex;flex-direction:column;align-items:center;justify-content:center}#loading-text{max-width:350px;margin-top:16px}`))]}}]}}),a.oi);n()}catch(d){n(d)}}))},32731:function(e,i,t){t.d(i,{x:()=>Qe});var n=t(61701),o=t(72621),a=(t(19083),t(71695),t(92745),t(61893),t(9359),t(56475),t(1331),t(31526),t(70104),t(52924),t(40251),t(19134),t(92519),t(42179),t(89256),t(24931),t(88463),t(57449),t(19814),t(61006),t(97003),t(88044),t(47021),t(71513),t(75656),t(50100),t(18084),t(2060),t(57243)),s=t(50778),r=t(35359),l=t(94571),c=t(27486),d=t(72344),h=t(17803),g=t(1416),u=t(76320),m=(t(59826),t(54977),t(51868),t(7285),t(64780),t(19993),t(74633),t(7843),t(11498)),p=t(43546),f=t(75101),_=t(15681),y=t(6823),v=t(63318),b=t(62992),$=t(75951),k=t(57816),w=t(36522);const C=()=>Promise.all([t.e("97983"),t.e("15903"),t.e("26321")]).then(t.bind(t,97720));var x=t(38572),L=t(91854),H=t(76131),z=(t(34515),t(87979),t(6736)),V=t(28008),M=t(88238),E=t(73192),A=t(58014),S=t(84361);const D="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",F={bronze:{icon:D,translationKey:"ui.panel.config.integrations.config_entry.bronze_quality"},silver:{icon:D,translationKey:"ui.panel.config.integrations.config_entry.silver_quality"},gold:{icon:D,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"},internal:{icon:t(30511).mdiHomeAssistant,translationKey:"ui.panel.config.integrations.config_entry.internal_integration"},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"}};t(63721);const B={"HA-Frontend-Base":`${location.protocol}//${location.host}`},T=(e,i,t,n)=>{var o;return e.callApi("POST","config/config_entries/subentries/flow",{handler:[i,t],show_advanced_options:Boolean(null===(o=e.userData)||void 0===o?void 0:o.showAdvanced),subentry_id:n},B)},Z=(e,i,t)=>e.callApi("POST",`config/config_entries/subentries/flow/${i}`,t,B),I=(e,i)=>e.callApi("DELETE",`config/config_entries/subentries/flow/${i}`);var P=t(7956);let q,O,R,W,j,G,K,U,N,J=e=>e;const Q=(e,i,t,n)=>(0,P.w)(e,n,{flowType:"config_subentries_flow",showDevices:!0,createFlow:async(e,o)=>{const[a]=await Promise.all([T(e,o,t,n.subEntryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config_subentries",i.domain),e.loadBackendTranslation("selector",i.domain),e.loadBackendTranslation("title",i.domain)]);return a},fetchFlow:async(e,t)=>{const n=await((e,i)=>e.callApi("GET",`config/config_entries/subentries/flow/${i}`,void 0,B))(e,t);return await e.loadFragmentTranslation("config"),await e.loadBackendTranslation("config_subentries",i.domain),await e.loadBackendTranslation("selector",i.domain),n},handleFlowStep:Z,deleteFlow:I,renderAbortDescription(e,n){const o=e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.abort.${n.reason}`,n.description_placeholders);return o?(0,a.dy)(q||(q=J` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),o):n.reason},renderShowFormStepHeader(e,n){return e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.step.${n.step_id}.title`,n.description_placeholders)||e.localize(`component.${i.domain}.title`)},renderShowFormStepDescription(e,n){const o=e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.step.${n.step_id}.description`,n.description_placeholders);return o?(0,a.dy)(O||(O=J` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),o):""},renderShowFormStepFieldLabel(e,n,o,a){var s;if("expandable"===o.type)return e.localize(`component.${i.domain}.config_subentries.${t}.step.${n.step_id}.sections.${o.name}.name`);const r=null!=a&&null!==(s=a.path)&&void 0!==s&&s[0]?`sections.${a.path[0]}.`:"";return e.localize(`component.${i.domain}.config_subentries.${t}.step.${n.step_id}.${r}data.${o.name}`)||o.name},renderShowFormStepFieldHelper(e,n,o,s){var r;if("expandable"===o.type)return e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.step.${n.step_id}.sections.${o.name}.description`);const l=null!=s&&null!==(r=s.path)&&void 0!==r&&r[0]?`sections.${s.path[0]}.`:"",c=e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.step.${n.step_id}.${l}data_description.${o.name}`,n.description_placeholders);return c?(0,a.dy)(R||(R=J`<ha-markdown breaks .content="${0}"></ha-markdown>`),c):""},renderShowFormStepFieldError(e,n,o){return e.localize(`component.${n.translation_domain||n.translation_domain||i.domain}.config_subentries.${t}.error.${o}`,n.description_placeholders)||o},renderShowFormStepFieldLocalizeValue(e,t,n){return e.localize(`component.${i.domain}.selector.${n}`)},renderShowFormStepSubmitButton(e,n){return e.localize(`component.${i.domain}.config_subentries.${t}.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.${i.domain}.config_subentries.${t}.step.${n.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription(e,n){const o=e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.step.${n.step_id}.description`,n.description_placeholders);return(0,a.dy)(W||(W=J` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),o?(0,a.dy)(j||(j=J` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),o):"")},renderCreateEntryDescription(e,n){const o=e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.create_entry.${n.description||"default"}`,n.description_placeholders);return(0,a.dy)(G||(G=J` ${0} <p> ${0} </p> `),o?(0,a.dy)(K||(K=J` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),o):"",e.localize("ui.panel.config.integrations.config_flow.created_config",{name:n.title}))},renderShowFormProgressHeader(e,n){return e.localize(`component.${i.domain}.config_subentries.${t}.step.${n.step_id}.title`)||e.localize(`component.${i.domain}.title`)},renderShowFormProgressDescription(e,n){const o=e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.progress.${n.progress_action}`,n.description_placeholders);return o?(0,a.dy)(U||(U=J` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuHeader(e,n){return e.localize(`component.${i.domain}.config_subentries.${t}.step.${n.step_id}.title`,n.description_placeholders)||e.localize(`component.${i.domain}.title`)},renderMenuDescription(e,n){const o=e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.step.${n.step_id}.description`,n.description_placeholders);return o?(0,a.dy)(N||(N=J` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuOption(e,n,o){return e.localize(`component.${n.translation_domain||i.domain}.config_subentries.${t}.step.${n.step_id}.menu_options.${o}`,n.description_placeholders)},renderLoadingDescription(e,i,t,n){if("loading_flow"!==i&&"loading_step"!==i)return"";const o=(null==n?void 0:n.handler)||t;return e.localize(`ui.panel.config.integrations.config_flow.loading.${i}`,{integration:o?(0,k.Lh)(e.localize,o):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}});let X,Y,ee,ie,te,ne,oe,ae,se,re,le,ce,de,he,ge,ue,me,pe,fe,_e,ye,ve,be,$e,ke,we,Ce,xe,Le,He,ze,Ve,Me,Ee,Ae,Se,De,Fe,Be,Te,Ze,Ie,Pe,qe,Oe,Re,We=e=>e;const je="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",Ge="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",Ke="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",Ue="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",Ne="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",Je="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",Qe=(e,i)=>{if(i.reason){if(i.error_reason_translation_key){const t=e.loadBackendTranslation("exceptions",i.domain).then((e=>{var t;return e(`component.${i.domain}.exceptions.${i.error_reason_translation_key}.message`,null!==(t=i.error_reason_translation_placeholders)&&void 0!==t?t:void 0)||i.reason}));return(0,a.dy)(X||(X=We`${0}`),(0,l.C)(t))}const t=e.loadBackendTranslation("config",i.domain).then((e=>e(`component.${i.domain}.config.error.${i.reason}`)||i.reason));return(0,a.dy)(Y||(Y=We`${0}`),(0,l.C)(t,i.reason))}return(0,a.dy)(ee||(ee=We` <br> ${0} `),e.localize("ui.panel.config.integrations.config_entry.check_the_logs"))};(0,n.Z)([(0,s.Mo)("ha-config-integration-page")],(function(e,i){class t extends i{constructor(...i){super(...i),e(this)}}return{F:t,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"domain",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({attribute:"is-wide",type:Boolean})],key:"isWide",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"showAdvanced",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"configEntries",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"configEntriesInProgress",value(){return[]}},{kind:"field",decorators:[(0,s.SB)()],key:"_entities",value(){return[]}},{kind:"field",decorators:[(0,s.SB)()],key:"_manifest",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_extraConfigEntries",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_diagnosticHandler",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_logInfo",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_searchParms",value(){return new URLSearchParams(window.location.hash.substring(1))}},{kind:"field",decorators:[(0,s.SB)()],key:"_domainEntities",value(){return{}}},{kind:"field",decorators:[(0,s.SB)()],key:"_subEntries",value(){return{}}},{kind:"field",key:"_configPanel",value(){return(0,c.Z)(((e,i)=>{var t;return(null===(t=Object.values(i).find((i=>i.config_panel_domain===e)))||void 0===t?void 0:t.url_path)||k.ez[e]}))}},{kind:"field",key:"_domainConfigEntries",value(){return(0,c.Z)(((e,i)=>i?i.filter((i=>i.domain===e)):[]))}},{kind:"field",key:"_domainConfigEntriesInProgress",value(){return(0,c.Z)(((e,i)=>i?i.filter((i=>i.handler===e)):[]))}},{kind:"method",key:"hassSubscribe",value:function(){return[(0,v.LM)(this.hass.connection,(e=>{this._entities=e})),(0,k.O)(this.hass.connection,(e=>{for(const i of e)i.domain===this.domain&&(this._logInfo=i)}))]}},{kind:"method",key:"willUpdate",value:function(e){e.has("domain")&&(this.hass.loadBackendTranslation("title",[this.domain]),this.hass.loadBackendTranslation("config_subentries",[this.domain]),this._extraConfigEntries=void 0,this._fetchManifest(),this._fetchDiagnostics(),this._fetchEntitySources()),(e.has("configEntries")||e.has("_extraConfigEntries"))&&this._fetchSubEntries()}},{kind:"method",key:"_fetchEntitySources",value:async function(){const e=await(0,b.m)(this.hass),i={};for(const[t,n]of Object.entries(e))n.domain in i||(i[n.domain]=[]),i[n.domain].push(t);this._domainEntities=i}},{kind:"method",key:"updated",value:function(e){(0,o.Z)(t,"updated",this,3)([e]),this._searchParms.has("config_entry")&&e.has("configEntries")&&!e.get("configEntries")&&this.configEntries&&this._highlightEntry()}},{kind:"method",key:"render",value:function(){var e,i,t,n,o,s,r;if(!this.configEntries||!this.domain)return a.Ld;const l=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries),c=this._domainConfigEntriesInProgress(this.domain,this.configEntriesInProgress),d=c.filter((e=>!_.P3.includes(e.context.source))),h=c.filter((e=>_.P3.includes(e.context.source))),u=l.filter((e=>f.LZ.includes(e.state))),m=l.filter((e=>"ignore"!==e.source&&!f.LZ.includes(e.state))).sort(((e,i)=>Boolean(e.disabled_by)!==Boolean(i.disabled_by)?e.disabled_by?1:-1:(0,g.fe)(e.title,i.title,this.hass.locale.language))),p=this._getDevices(l,this.hass.devices),y=this._getEntities(l,this._entities);let v=y.length;if(this.domain in this._domainEntities&&v!==this._domainEntities[this.domain].length)if(v){const e=new Set(y.map((e=>e.entity_id)));for(const i of this._domainEntities[this.domain])e.add(i);v=e.size}else v=this._domainEntities[this.domain].length;const b=!p.some((e=>"service"!==e.entry_type));return(0,a.dy)(ie||(ie=We` <hass-subpage .hass="${0}" .narrow="${0}" .header="${0}"> <div class="container"> <div class="column small"> <ha-card class="overview"> <div class="card-content"> <div class="logo-container"> <img alt="${0}" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer" @load="${0}" @error="${0}"> </div> ${0} ${0} ${0} ${0} </div> <div class="card-actions"> ${0} ${0} ${0} ${0} ${0} ${0} </div> </ha-card> </div> <div class="column"> ${0} ${0} <ha-card> <h1 class="card-header"> ${0} </h1> ${0} <div class="card-actions"> <ha-button @click="${0}"> ${0} </ha-button> </div> </ha-card> </div> </div> </hass-subpage> `),this.hass,this.narrow,(0,k.Lh)(this.hass.localize,this.domain),(0,k.Lh)(this.hass.localize,this.domain),(0,M.X1)({domain:this.domain,type:"logo",darkOptimized:null===(e=this.hass.themes)||void 0===e?void 0:e.darkMode}),this._onImageLoad,this._onImageError,null!=(null===(i=this._manifest)||void 0===i?void 0:i.version)?(0,a.dy)(te||(te=We`<div class="version">${0}</div>`),this._manifest.version):a.Ld,!1===(null===(t=this._manifest)||void 0===t?void 0:t.is_built_in)?(0,a.dy)(ne||(ne=We`<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"),"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",(0,E.R)(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")):a.Ld,null!==(n=this._manifest)&&void 0!==n&&null!==(n=n.iot_class)&&void 0!==n&&n.startsWith("cloud_")?(0,a.dy)(oe||(oe=We`<div class="integration-info"> <ha-svg-icon .path="${0}"></ha-svg-icon> ${0} </div>`),"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",this.hass.localize("ui.panel.config.integrations.config_entry.depends_on_cloud")):a.Ld,0===m.length&&this._manifest&&!this._manifest.config_flow&&this.hass.config.components.find((e=>e.split(".")[0]===this.domain))?(0,a.dy)(ae||(ae=We`<div class="integration-info info"> <ha-svg-icon path="${0}"></ha-svg-icon>${0} </div>`),"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",this.hass.localize("ui.panel.config.integrations.config_entry.no_config_flow")):a.Ld,null!==(o=this._manifest)&&void 0!==o&&o.is_built_in&&this._manifest.quality_scale&&Object.keys(F).includes(this._manifest.quality_scale)?(0,a.dy)(se||(se=We` <a href="${0}" rel="noopener noreferrer" target="_blank"> <ha-list-item hasMeta graphic="icon"> <ha-svg-icon slot="graphic" class="${0}" .path="${0}"></ha-svg-icon> ${0} <ha-svg-icon slot="meta" .path="${0}"></ha-svg-icon> </ha-list-item> </a> `),(0,E.R)(this.hass,`/docs/quality_scale/#-${this._manifest.quality_scale}`),`quality-scale ${this._manifest.quality_scale}-quality`,F[this._manifest.quality_scale].icon,this.hass.localize(F[this._manifest.quality_scale].translationKey),Ne):a.Ld,p.length>0?(0,a.dy)(re||(re=We`<a href="${0}"> <ha-list-item hasMeta graphic="icon"> <ha-svg-icon .path="${0}" slot="graphic"></ha-svg-icon> ${0} <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> </a>`),1===p.length?`/config/devices/device/${p[0].id}`:`/config/devices/dashboard?historyBack=1&domain=${this.domain}`,b?Ue:Ge,this.hass.localize("ui.panel.config.integrations.config_entry."+(b?"services":"devices"),{count:p.length})):a.Ld,v>0?(0,a.dy)(le||(le=We`<a href="${0}"> <ha-list-item hasMeta graphic="icon"> <ha-svg-icon .path="${0}" slot="graphic"></ha-svg-icon> ${0} <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> </a>`),`/config/entities?historyBack=1&domain=${this.domain}`,Je,this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:v})):a.Ld,this._manifest?(0,a.dy)(ce||(ce=We`<a href="${0}" rel="noreferrer" target="_blank"> <ha-list-item graphic="icon" hasMeta> ${0} <ha-svg-icon slot="graphic" .path="${0}"></ha-svg-icon> <ha-svg-icon slot="meta" .path="${0}"></ha-svg-icon> </ha-list-item> </a>`),this._manifest.is_built_in?(0,E.R)(this.hass,`/integrations/${this._manifest.domain}`):this._manifest.documentation,this.hass.localize("ui.panel.config.integrations.config_entry.documentation"),"M9 3V18H12V3H9M12 5L16 18L19 17L15 4L12 5M5 5V18H8V5H5M3 19V21H21V19H3Z",Ne):a.Ld,this._manifest&&(this._manifest.is_built_in||this._manifest.issue_tracker)?(0,a.dy)(de||(de=We`<a href="${0}" rel="noreferrer" target="_blank"> <ha-list-item graphic="icon" hasMeta> ${0} <ha-svg-icon slot="graphic" .path="${0}"></ha-svg-icon> <ha-svg-icon slot="meta" .path="${0}"></ha-svg-icon> </ha-list-item> </a>`),(0,k.H0)(this.domain,this._manifest),this.hass.localize("ui.panel.config.integrations.config_entry.known_issues"),"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",Ne):a.Ld,this._logInfo?(0,a.dy)(he||(he=We`<ha-list-item @request-selected="${0}" graphic="icon"> ${0} <ha-svg-icon slot="graphic" class="${0}" .path="${0}"></ha-svg-icon> </ha-list-item>`),this._logInfo.level===k.WH.DEBUG?this._handleDisableDebugLogging:this._handleEnableDebugLogging,this._logInfo.level===k.WH.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"),this._logInfo.level===k.WH.DEBUG?"warning":"",this._logInfo.level===k.WH.DEBUG?"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":"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"):a.Ld,d.length?(0,a.dy)(ge||(ge=We`<ha-card> <h1 class="card-header"> ${0} </h1> <ha-md-list> ${0} </ha-md-list> </ha-card>`),this.hass.localize("ui.panel.config.integrations.discovered"),d.map((e=>(0,a.dy)(ue||(ue=We`<ha-md-list-item class="discovered"> ${0} <ha-button slot="end" unelevated .flow="${0}" @click="${0}" .label="${0}"></ha-button> </ha-md-list-item>`),e.localized_title,e,this._continueFlow,this.hass.localize("ui.common.add"))))):a.Ld,h.length||u.length?(0,a.dy)(me||(me=We`<ha-card> <h1 class="card-header"> ${0} </h1> <ha-md-list> ${0} ${0} </ha-md-list> </ha-card>`),this.hass.localize("ui.panel.config.integrations.integration_page.attention_entries"),h.map((e=>{const i=_.P3.includes(e.context.source);return(0,a.dy)(pe||(pe=We`<ha-md-list-item class="config_entry ${0}"> ${0} <span slot="supporting-text">${0}</span> <ha-button slot="end" unelevated .flow="${0}" @click="${0}" .label="${0}"></ha-button> </ha-md-list-item>`),i?"attention":"",e.localized_title,this.hass.localize("ui.panel.config.integrations."+(i?"attention":"discovered")),e,this._continueFlow,this.hass.localize("ui.panel.config.integrations."+(i?"reconfigure":"configure")))})),u.map(((e,i)=>(0,a.dy)(fe||(fe=We`${0} ${0} `),this._renderConfigEntry(e),i<u.length-1?(0,a.dy)(_e||(_e=We` <ha-md-divider role="separator" tabindex="-1"></ha-md-divider>`)):a.Ld)))):a.Ld,null!==(s=this._manifest)&&void 0!==s&&s.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===m.length?(0,a.dy)(ye||(ye=We`<div class="card-content no-entries"> ${0} </div>`),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,a.dy)(ve||(ve=We`<ha-md-list> ${0} </ha-md-list>`),m.map(((e,i)=>(0,a.dy)(be||(be=We`${0} ${0}`),this._renderConfigEntry(e),i<m.length-1?(0,a.dy)($e||($e=We` <ha-md-divider role="separator" tabindex="-1"></ha-md-divider>`)):a.Ld)))),this._addIntegration,null!==(r=this._manifest)&&void 0!==r&&r.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"))}},{kind:"method",key:"_onImageLoad",value:function(e){e.target.style.display="inline-block"}},{kind:"method",key:"_onImageError",value:function(e){e.target.style.display="none"}},{kind:"method",key:"_renderDeviceLine",value:function(e,i,t,n,o){let s=[];for(const[r,l]of[[i,"devices"],[t,"services"]]){if(0===r.length)continue;const i=1===r.length?`/config/devices/device/${r[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${e.entry_id}${o?`&sub_entry=${o.subentry_id}`:""}`;s.push((0,a.dy)(ke||(ke=We`<a href="${0}">${0}</a>`),i,this.hass.localize(`ui.panel.config.integrations.config_entry.${l}`,{count:r.length})))}return n.length&&s.push((0,a.dy)(we||(we=We`<a href="${0}">${0}</a>`),`/config/entities?historyBack=1&config_entry=${e.entry_id}${o?`&sub_entry=${o.subentry_id}`:""}`,this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:n.length}))),0===s.length?s=[this.hass.localize("ui.panel.config.integrations.config_entry.no_devices_or_entities")]:2===s.length?s=[s[0],` ${this.hass.localize("ui.common.and")} `,s[1]]:3===s.length&&(s=[s[0],", ",s[1],` ${this.hass.localize("ui.common.and")} `,s[2]]),s}},{kind:"method",key:"_renderConfigEntry",value:function(e){let i,t,n="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";e.disabled_by||"not_loaded"!==e.state?"setup_in_progress"===e.state?(n="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",i=["ui.panel.config.integrations.config_entry.setup_in_progress"]):f.LZ.includes(e.state)&&("setup_retry"===e.state&&(n="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"),i=[`ui.panel.config.integrations.config_entry.state.${e.state}`],t=Qe(this.hass,e)):i=["ui.panel.config.integrations.config_entry.not_loaded"];const o=this._getConfigEntryDevices(e),s=this._getConfigEntryServices(e),l=this._getConfigEntryEntities(e);let c=[];e.disabled_by?(c.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&&c.push(`.\n        ${this.hass.localize("ui.panel.config.integrations.config_entry.disable_restart_confirm")}.`)):c=this._renderDeviceLine(e,o,s,l);const d=this._configPanel(e.domain,this.hass.panels),g=this._subEntries[e.entry_id]||[];return(0,a.dy)(Ce||(Ce=We`<ha-md-list-item class="${0}" data-entry-id="${0}" .configEntry="${0}"> <div slot="headline"> ${0} </div> <div slot="supporting-text"> <div>${0}</div> ${0} </div> ${0} <ha-md-button-menu positioning="popover" slot="end"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> ${0} ${0} ${0} ${0} <ha-md-menu-item @click="${0}" graphic="icon"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-md-menu-item> ${0} <ha-md-divider role="separator" tabindex="-1"></ha-md-divider> ${0} ${0} <ha-md-menu-item @click="${0}" graphic="icon"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-md-menu-item> ${0} ${0} </ha-md-button-menu> </ha-md-list-item> ${0}`),(0,r.$)({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":f.LZ.includes(e.state),"state-disabled":null!==e.disabled_by}),e.entry_id,e,e.title||(0,k.Lh)(this.hass.localize,e.domain),c,i?(0,a.dy)(xe||(xe=We` <div class="message"> <ha-svg-icon .path="${0}"></ha-svg-icon> <div> ${0}${0} </div> </div> `),n,this.hass.localize(...i),t?(0,a.dy)(Le||(Le=We`: ${0}`),t):a.Ld):a.Ld,"user"===e.disabled_by?(0,a.dy)(He||(He=We`<ha-button unelevated slot="end" @click="${0}"> ${0} </ha-button>`),this._handleEnable,this.hass.localize("ui.common.enable")):!d||"matter"===e.domain&&!(0,h._)(this.hass.config.version)||i?e.supports_options?(0,a.dy)(Ve||(Ve=We` <ha-button slot="end" @click="${0}"> ${0} </ha-button> `),this._showOptions,this.hass.localize("ui.panel.config.integrations.config_entry.configure")):a.Ld:(0,a.dy)(ze||(ze=We`<a slot="end" href="${0}"><ha-button> ${0} </ha-button></a>`),`/${d}?config_entry=${e.entry_id}`,this.hass.localize("ui.panel.config.integrations.config_entry.configure")),this.hass.localize("ui.common.menu"),Ke,e.disabled_by&&o.length?(0,a.dy)(Me||(Me=We` <ha-md-menu-item href="${0}"> <ha-svg-icon .path="${0}" slot="start"></ha-svg-icon> ${0} <ha-icon-next slot="end"></ha-icon-next> </ha-md-menu-item> `),1===o.length?`/config/devices/device/${o[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${e.entry_id}`,Ge,this.hass.localize("ui.panel.config.integrations.config_entry.devices",{count:o.length})):a.Ld,e.disabled_by&&s.length?(0,a.dy)(Ee||(Ee=We`<ha-md-menu-item href="${0}"> <ha-svg-icon .path="${0}" slot="start"></ha-svg-icon> ${0} <ha-icon-next slot="end"></ha-icon-next> </ha-md-menu-item> `),1===s.length?`/config/devices/device/${s[0].id}`:`/config/devices/dashboard?historyBack=1&config_entry=${e.entry_id}`,Ue,this.hass.localize("ui.panel.config.integrations.config_entry.services",{count:s.length})):a.Ld,e.disabled_by&&l.length?(0,a.dy)(Ae||(Ae=We` <ha-md-menu-item href="${0}"> <ha-svg-icon .path="${0}" slot="start"></ha-svg-icon> ${0} <ha-icon-next slot="end"></ha-icon-next> </ha-md-menu-item> `),`/config/entities?historyBack=1&config_entry=${e.entry_id}`,Je,this.hass.localize("ui.panel.config.integrations.config_entry.entities",{count:l.length})):a.Ld,!e.disabled_by&&f.Q4.includes(e.state)&&e.supports_unload&&"system"!==e.source?(0,a.dy)(Se||(Se=We` <ha-md-menu-item @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-md-menu-item> `),this._handleReload,"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",this.hass.localize("ui.panel.config.integrations.config_entry.reload")):a.Ld,this._handleRename,"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",this.hass.localize("ui.panel.config.integrations.config_entry.rename"),Object.keys(e.supported_subentry_types).map((i=>(0,a.dy)(De||(De=We`<ha-md-menu-item @click="${0}" .entry="${0}" .flowType="${0}" graphic="icon"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0}</ha-md-menu-item>`),this._addSubEntry,e,i,"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",this.hass.localize(`component.${e.domain}.config_subentries.${i}.initiate_flow.user`)))),this._diagnosticHandler&&"loaded"===e.state?(0,a.dy)(Fe||(Fe=We` <ha-md-menu-item href="${0}" target="_blank" @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-md-menu-item> `),(0,y.iP)(e.entry_id),this._signUrl,"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z",this.hass.localize("ui.panel.config.integrations.config_entry.download_diagnostics")):a.Ld,!e.disabled_by&&e.supports_reconfigure&&"system"!==e.source?(0,a.dy)(Be||(Be=We` <ha-md-menu-item @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-md-menu-item> `),this._handleReconfigure,"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",this.hass.localize("ui.panel.config.integrations.config_entry.reconfigure")):a.Ld,this._handleSystemOptions,"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",this.hass.localize("ui.panel.config.integrations.config_entry.system_options"),"user"===e.disabled_by?(0,a.dy)(Te||(Te=We` <ha-md-menu-item @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-md-menu-item> `),this._handleEnable,"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",this.hass.localize("ui.common.enable")):"system"!==e.source?(0,a.dy)(Ze||(Ze=We` <ha-md-menu-item class="warning" @click="${0}" graphic="icon"> <ha-svg-icon slot="start" class="warning" .path="${0}"></ha-svg-icon> ${0} </ha-md-menu-item> `),this._handleDisable,"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",this.hass.localize("ui.common.disable")):a.Ld,"system"!==e.source?(0,a.dy)(Ie||(Ie=We` <ha-md-menu-item class="warning" @click="${0}"> <ha-svg-icon slot="start" class="warning" .path="${0}"></ha-svg-icon> ${0} </ha-md-menu-item> `),this._handleDelete,je,this.hass.localize("ui.panel.config.integrations.config_entry.delete")):a.Ld,g.map((i=>this._renderSubEntry(e,i))))}},{kind:"method",key:"_renderSubEntry",value:function(e,i){var t;const n=this._getConfigEntryDevices(e).filter((t=>{var n;return null===(n=t.config_entries_subentries[e.entry_id])||void 0===n?void 0:n.includes(i.subentry_id)})),o=this._getConfigEntryServices(e).filter((t=>{var n;return null===(n=t.config_entries_subentries[e.entry_id])||void 0===n?void 0:n.includes(i.subentry_id)})),s=this._getConfigEntryEntities(e).filter((e=>e.config_subentry_id===i.subentry_id));return(0,a.dy)(Pe||(Pe=We`<ha-md-list-item class="sub-entry" data-entry-id="${0}" .configEntry="${0}" .subEntry="${0}"> <span slot="headline">${0}</span> <span slot="supporting-text">${0} - ${0}</span> ${0} <ha-md-button-menu positioning="popover" slot="end"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> <ha-md-menu-item class="warning" @click="${0}"> <ha-svg-icon slot="start" class="warning" .path="${0}"></ha-svg-icon> ${0} </ha-md-menu-item> </ha-md-button-menu> </ha-md-list-item>`),e.entry_id,e,i,i.title,this.hass.localize(`component.${e.domain}.config_subentries.${i.subentry_type}.entry_type`),this._renderDeviceLine(e,n,o,s,i),null!==(t=e.supported_subentry_types[i.subentry_type])&&void 0!==t&&t.supports_reconfigure?(0,a.dy)(qe||(qe=We` <ha-button slot="end" @click="${0}"> ${0} </ha-button> `),this._handleReconfigureSub,this.hass.localize("ui.panel.config.integrations.config_entry.configure")):a.Ld,this.hass.localize("ui.common.menu"),Ke,this._handleDeleteSub,je,this.hass.localize("ui.panel.config.integrations.config_entry.delete"))}},{kind:"method",key:"_highlightEntry",value:async function(){await(0,u.y)();const e=this._searchParms.get("config_entry"),i=this.shadowRoot.querySelector(`[data-entry-id="${e}"]`);i&&(i.scrollIntoView({block:"center"}),i.classList.add("highlight"))}},{kind:"method",key:"_continueFlow",value:function(e){(0,x.t)(this,{continueFlowId:e.target.flow.flow_id,navigateToResult:!0,dialogClosedCallback:()=>{}})}},{kind:"method",key:"_fetchManifest",value:async function(){this.domain&&(this._manifest=await(0,k.t4)(this.hass,this.domain),this._manifest.integration_type&&!["device","hub","service"].includes(this._manifest.integration_type)&&(this._extraConfigEntries=await(0,f.pB)(this.hass,{domain:this.domain})))}},{kind:"method",key:"_fetchSubEntries",value:async function(){var e;const i=null===(e=this._extraConfigEntries||this.configEntries)||void 0===e?void 0:e.map((e=>e.num_subentries?(0,f.$H)(this.hass,e.entry_id).then((i=>({entry_id:e.entry_id,subEntries:i}))):void 0));if(i){const e=await Promise.all(i);this._subEntries={},e.forEach((e=>{e&&(this._subEntries[e.entry_id]=e.subEntries)}))}}},{kind:"method",key:"_fetchDiagnostics",value:async function(){if(this.domain&&(0,d.p)(this.hass,"diagnostics"))try{this._diagnosticHandler=await(0,y.lf)(this.hass,this.domain)}catch(e){}}},{kind:"method",key:"_handleEnableDebugLogging",value:async function(){const e=this.domain;await(0,k.RO)(this.hass,e,k.WH[k.WH.DEBUG],"once")}},{kind:"method",key:"_handleDisableDebugLogging",value:async function(e){e.stopPropagation();const i=this.domain;await(0,k.RO)(this.hass,i,k.WH[k.WH.NOTSET],"once");const t=`home-assistant_${i}_${(new Date).toISOString().replace(/:/g,"-")}.log`,n=await(0,p.iI)(this.hass,$.l);(0,A.N)(n.path,t)}},{kind:"field",key:"_getEntities",value(){return(0,c.Z)(((e,i)=>{if(!i)return[];const t=e.map((e=>e.entry_id));return i.filter((e=>e.config_entry_id&&t.includes(e.config_entry_id)))}))}},{kind:"field",key:"_getDevices",value(){return(0,c.Z)(((e,i)=>{if(!i)return[];const t=e.map((e=>e.entry_id));return Object.values(i).filter((e=>e.config_entries.some((e=>t.includes(e)))))}))}},{kind:"field",key:"_getConfigEntryEntities",value(){return e=>{const i=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries);return this._getEntities(i,this._entities).filter((i=>i.config_entry_id===e.entry_id))}}},{kind:"field",key:"_getConfigEntryDevices",value(){return e=>{const i=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries),t=this._getDevices(i,this.hass.devices);return Object.values(t).filter((i=>i.config_entries.includes(e.entry_id)&&"service"!==i.entry_type))}}},{kind:"field",key:"_getConfigEntryServices",value(){return e=>{const i=this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries),t=this._getDevices(i,this.hass.devices);return Object.values(t).filter((i=>i.config_entries.includes(e.entry_id)&&"service"===i.entry_type))}}},{kind:"method",key:"_showOptions",value:function(e){(0,L.c)(this,e.target.closest(".config_entry").configEntry,{manifest:this._manifest})}},{kind:"method",key:"_handleRename",value:function(e){this._editEntryName(e.target.closest(".config_entry").configEntry)}},{kind:"method",key:"_handleReload",value:function(e){this._reloadIntegration(e.target.closest(".config_entry").configEntry)}},{kind:"method",key:"_handleReconfigure",value:function(e){this._reconfigureIntegration(e.target.closest(".config_entry").configEntry)}},{kind:"method",key:"_handleDelete",value:function(e){this._removeIntegration(e.target.closest(".config_entry").configEntry)}},{kind:"method",key:"_handleReconfigureSub",value:async function(e){const i=e.target.closest(".sub-entry").configEntry,t=e.target.closest(".sub-entry").subEntry;Q(this,i,t.flowType||t.subentry_type,{startFlowHandler:i.entry_id,subEntryId:t.subentry_id})}},{kind:"method",key:"_handleDeleteSub",value:async function(e){const i=e.target.closest(".sub-entry").configEntry,t=e.target.closest(".sub-entry").subEntry;await(0,H.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_title",{title:t.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,f.aR)(this.hass,i.entry_id,t.subentry_id)}},{kind:"method",key:"_handleDisable",value:function(e){this._disableIntegration(e.target.closest(".config_entry").configEntry)}},{kind:"method",key:"_handleEnable",value:function(e){this._enableIntegration(e.target.closest(".config_entry").configEntry)}},{kind:"method",key:"_handleSystemOptions",value:function(e){this._showSystemOptions(e.target.closest(".config_entry").configEntry)}},{kind:"method",key:"_showSystemOptions",value:function(e){var i,t;i=this,t={entry:e,manifest:this._manifest},(0,w.B)(i,"show-dialog",{dialogTag:"dialog-config-entry-system-options",dialogImport:C,dialogParams:t})}},{kind:"method",key:"_disableIntegration",value:async function(e){const i=e.entry_id;if(!(await(0,H.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_confirm_title",{title:e.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,f.Ny)(this.hass,i)}catch(n){return void(0,H.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_error"),text:n.message})}t.require_restart&&(0,H.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.disable_restart_confirm")})}},{kind:"method",key:"_enableIntegration",value:async function(e){const i=e.entry_id;let t;try{t=await(0,f.T0)(this.hass,i)}catch(n){return void(0,H.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.disable_error"),text:n.message})}t.require_restart&&(0,H.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.enable_restart_confirm")})}},{kind:"method",key:"_removeIntegration",value:async function(e){const i=e.entry_id,t=await this._applicationCredentialForRemove(i);if(!(await(0,H.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm_title",{title:e.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,f.iJ)(this.hass,i)).require_restart&&(0,H.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.restart_confirm")}),t&&this._removeApplicationCredential(t)}},{kind:"method",key:"_applicationCredentialForRemove",value:async function(e){try{return(await(0,m.Ax)(this.hass,e)).application_credentials_id}catch(i){return null}}},{kind:"method",key:"_removeApplicationCredential",value:async function(e){if(await(0,H.showConfirmationDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_title"),text:(0,a.dy)(Oe||(Oe=We`${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,E.R)(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,m.zq)(this.hass,e)}catch(i){(0,H.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_entry.application_credentials.delete_error_title"),text:i.message})}}},{kind:"method",key:"_reloadIntegration",value:async function(e){const i=e.entry_id,t=(await(0,f.Nn)(this.hass,i)).require_restart?"reload_restart_confirm":"reload_confirm";(0,H.showAlertDialog)(this,{text:this.hass.localize(`ui.panel.config.integrations.config_entry.${t}`)})}},{kind:"method",key:"_reconfigureIntegration",value:async function(e){var i;(0,x.t)(this,{startFlowHandler:e.domain,showAdvanced:null===(i=this.hass.userData)||void 0===i?void 0:i.showAdvanced,manifest:await(0,k.t4)(this.hass,e.domain),entryId:e.entry_id,navigateToResult:!0})}},{kind:"method",key:"_editEntryName",value:async function(e){const i=await(0,H.showPromptDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.rename_dialog"),defaultValue:e.title,inputLabel:this.hass.localize("ui.panel.config.integrations.rename_input_label")});null!==i&&await(0,f.SO)(this.hass,e.entry_id,{title:i})}},{kind:"method",key:"_signUrl",value:async function(e){const i=e.currentTarget;e.preventDefault();const t=await(0,p.iI)(this.hass,i.getAttribute("href"));(0,A.N)(t.path)}},{kind:"method",key:"_addIntegration",value:async function(){var e,i;if(null!==(e=this._manifest)&&void 0!==e&&e.config_flow){if(null!==(i=this._manifest)&&void 0!==i&&i.single_config_entry){if(this._domainConfigEntries(this.domain,this._extraConfigEntries||this.configEntries).length>0){const e=await this.hass.loadBackendTranslation("title",this._manifest.name);return void(await(0,H.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.single_config_entry_title"),text:this.hass.localize("ui.panel.config.integrations.config_flow.single_config_entry",{integration_name:(0,k.Lh)(e,this._manifest.name)})}))}}(0,S.E)(this,{domain:this.domain})}else(0,H.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")})}},{kind:"method",key:"_addSubEntry",value:async function(e){Q(this,e.target.entry,e.target.flowType,{startFlowHandler:e.target.entry.entry_id})}},{kind:"get",static:!0,key:"styles",value:function(){return[V.Qx,(0,a.iv)(Re||(Re=We`.container{display:flex;flex-wrap:wrap;margin:auto;max-width:1000px;margin-top:32px;margin-bottom:32px}.card-content{padding:16px 0 8px}.column{width:33%;flex-grow:1}.column.small{max-width:300px}.column,.fullwidth{padding:8px;box-sizing:border-box}.column>:not(:first-child){margin-top:16px}:host([narrow]) .column{width:100%;max-width:unset}:host([narrow]) .container{margin-top:0}.card-header{padding-bottom:0}.no-entries{padding:12px 16px}.logo-container{display:flex;justify-content:center;margin-bottom:8px}.version{padding-top:8px;display:flex;justify-content:center;color:var(--secondary-text-color)}.overview .card-actions{padding:0}img{max-width:200px;max-height:100px}@keyframes shimmer{100%{mask-position:left}}.integration-info{display:flex;align-items:center;gap:20px;padding:0 20px;min-height:48px}.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.internal-quality{color:var(--primary-color)}ha-svg-icon.legacy-quality{color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38));animation:unset}ha-md-list-item{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-md-list-item.sub-entry{--md-list-item-leading-space:50px}a{text-decoration:none}.highlight::after{background-color:var(--info-color)}.attention{primary-color:var(--error-color)}.warning{color:var(--error-color)}.state-error{--state-message-color:var(--error-color);--text-on-state-color:var(--text-primary-color)}.state-error::after{background-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:700;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}`))]}}]}}),(0,z.f)(a.oi))},58014:function(e,i,t){t.d(i,{N:()=>o,G:()=>a});var n=t(18117);const o=(e,i="")=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.download=i,t.style.display="none",document.body.appendChild(t),t.dispatchEvent(new MouseEvent("click")),document.body.removeChild(t)},a=e=>{var i;return!(e=>!!e.auth.external&&n.G)(e)||!(null===(i=e.auth.external)||void 0===i||!i.config.downloadFileSupported)}},18117:function(e,i,t){t.d(i,{G:()=>n});t(19134),t(5740);const n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);
//# sourceMappingURL=3693.3cdeea9c25c0c086.js.map