supervisor/supervisor/api/panel/frontend_es5/6212.838aff045d0ad110.js
github-actions[bot] 0513ea0438
Update frontend to version 20250806.0 (#5810)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-07 11:10:34 +02:00

2 lines
8.3 KiB
JavaScript

"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["6212"],{98921:function(e,t,i){i.d(t,{U:function(){return n}});const n=e=>e.stopPropagation()},86633:function(e,t,i){i(26847),i(1455),i(27530);var n=i(73742),s=i(77740),a=i(32609),o=i(59048),d=i(7616),l=i(31733),r=i(87639),c=i(65863);i(81777),i(39765);let h,u,p,_,v,g=e=>e;class b extends s.K{render(){return(0,o.dy)(h||(h=g` ${0} ${0} `),super.render(),this.clearable&&!this.required&&!this.disabled&&this.value?(0,o.dy)(u||(u=g`<ha-icon-button label="clear" @click="${0}" .path="${0}"></ha-icon-button>`),this._clearValue,"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)}renderMenu(){const e=this.getMenuClasses();return(0,o.dy)(p||(p=g`<ha-menu innerRole="listbox" wrapFocus class="${0}" activatable .fullwidth="${0}" .open="${0}" .anchor="${0}" .fixed="${0}" @selected="${0}" @opened="${0}" @closed="${0}" @items-updated="${0}" @keydown="${0}"> ${0} </ha-menu>`),(0,l.$)(e),!this.fixedMenuPosition&&!this.naturalMenuWidth,this.menuOpen,this.anchorElement,this.fixedMenuPosition,this.onSelected,this.onOpened,this.onClosed,this.onItemsUpdated,this.handleTypeahead,this.renderMenuContent())}renderLeadingIcon(){return this.icon?(0,o.dy)(_||(_=g`<span class="mdc-select__icon"><slot name="icon"></slot></span>`)):o.Ld}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-updated",this._translationsUpdated)}async firstUpdated(){var e;(super.firstUpdated(),this.inlineArrow)&&(null===(e=this.shadowRoot)||void 0===e||null===(e=e.querySelector(".mdc-select__selected-text-container"))||void 0===e||e.classList.add("inline-arrow"))}updated(e){if(super.updated(e),e.has("inlineArrow")){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".mdc-select__selected-text-container");this.inlineArrow?null==e||e.classList.add("inline-arrow"):null==e||e.classList.remove("inline-arrow")}e.get("options")&&(this.layoutOptions(),this.selectByValue(this.value))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-updated",this._translationsUpdated)}_clearValue(){!this.disabled&&this.value&&(this.valueSetDirectly=!0,this.select(-1),this.mdcFoundation.handleChange())}constructor(...e){super(...e),this.icon=!1,this.clearable=!1,this.inlineArrow=!1,this._translationsUpdated=(0,r.D)(async()=>{await(0,c.y)(),this.layoutOptions()},500)}}b.styles=[a.W,(0,o.iv)(v||(v=g`:host([clearable]){position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:var(--secondary-text-color)}.mdc-select__anchor{width:var(--ha-select-min-width,200px)}.mdc-select--filled .mdc-select__anchor{height:var(--ha-select-height,56px)}.mdc-select--filled .mdc-floating-label{inset-inline-start:12px;inset-inline-end:initial;direction:var(--direction)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{inset-inline-start:48px;inset-inline-end:initial;direction:var(--direction)}.mdc-select .mdc-select__anchor{padding-inline-start:12px;padding-inline-end:0px;direction:var(--direction)}.mdc-select__anchor .mdc-floating-label--float-above{transform-origin:var(--float-start)}.mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,0px)}:host([clearable]) .mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,12px)}ha-icon-button{position:absolute;top:10px;right:28px;--mdc-icon-button-size:36px;--mdc-icon-size:20px;color:var(--secondary-text-color);inset-inline-start:initial;inset-inline-end:28px;direction:var(--direction)}.inline-arrow{flex-grow:0}`))],(0,n.__decorate)([(0,d.Cb)({type:Boolean})],b.prototype,"icon",void 0),(0,n.__decorate)([(0,d.Cb)({type:Boolean,reflect:!0})],b.prototype,"clearable",void 0),(0,n.__decorate)([(0,d.Cb)({attribute:"inline-arrow",type:Boolean})],b.prototype,"inlineArrow",void 0),(0,n.__decorate)([(0,d.Cb)()],b.prototype,"options",void 0),b=(0,n.__decorate)([(0,d.Mo)("ha-select")],b)},44822:function(e,t,i){i.r(t),i.d(t,{HaSTTSelector:function(){return x}});i(26847),i(27530);var n=i(73742),s=i(59048),a=i(7616),o=(i(39710),i(81738),i(29981),i(6989),i(1455),i(56389),i(39884)),d=i(98921),l=i(15459),r=i(87639),c=i(99923),h=(i(69760),i(86633),i(44272));let u,p,_,v,g=e=>e;const b="__NONE_OPTION__";class y extends s.oi{render(){if(!this._engines)return s.Ld;let e=this.value;if(!e&&this.required){for(const t of Object.values(this.hass.entities))if("cloud"===t.platform&&"stt"===(0,h.M)(t.entity_id)){e=t.entity_id;break}if(!e)for(const i of this._engines){var t;if(0!==(null==i||null===(t=i.supported_languages)||void 0===t?void 0:t.length)){e=i.engine_id;break}}}return e||(e=b),(0,s.dy)(u||(u=g` <ha-select .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" @selected="${0}" @closed="${0}" fixedMenuPosition naturalMenuWidth> ${0} ${0} </ha-select> `),this.label||this.hass.localize("ui.components.stt-picker.stt"),e,this.required,this.disabled,this._changed,d.U,this.required?s.Ld:(0,s.dy)(p||(p=g`<ha-list-item .value="${0}"> ${0} </ha-list-item>`),b,this.hass.localize("ui.components.stt-picker.none")),this._engines.map(t=>{var i;if(t.deprecated&&t.engine_id!==e)return s.Ld;let n;if(t.engine_id.includes(".")){const e=this.hass.states[t.engine_id];n=e?(0,l.C)(e):t.engine_id}else n=t.name||t.engine_id;return(0,s.dy)(_||(_=g`<ha-list-item .value="${0}" .disabled="${0}"> ${0} </ha-list-item>`),t.engine_id,0===(null===(i=t.supported_languages)||void 0===i?void 0:i.length),n)}))}willUpdate(e){super.willUpdate(e),this.hasUpdated?e.has("language")&&this._debouncedUpdateEngines():this._updateEngines()}async _updateEngines(){var e;if(this._engines=(await(0,c.m)(this.hass,this.language,this.hass.config.country||void 0)).providers,!this.value)return;const t=this._engines.find(e=>e.engine_id===this.value);(0,o.B)(this,"supported-languages-changed",{value:null==t?void 0:t.supported_languages}),t&&0!==(null===(e=t.supported_languages)||void 0===e?void 0:e.length)||(this.value=void 0,(0,o.B)(this,"value-changed",{value:this.value}))}_changed(e){var t;const i=e.target;!this.hass||""===i.value||i.value===this.value||void 0===this.value&&i.value===b||(this.value=i.value===b?void 0:i.value,(0,o.B)(this,"value-changed",{value:this.value}),(0,o.B)(this,"supported-languages-changed",{value:null===(t=this._engines.find(e=>e.engine_id===this.value))||void 0===t?void 0:t.supported_languages}))}constructor(...e){super(...e),this.disabled=!1,this.required=!1,this._debouncedUpdateEngines=(0,r.D)(()=>this._updateEngines(),500)}}y.styles=(0,s.iv)(v||(v=g`ha-select{width:100%}`)),(0,n.__decorate)([(0,a.Cb)()],y.prototype,"value",void 0),(0,n.__decorate)([(0,a.Cb)()],y.prototype,"label",void 0),(0,n.__decorate)([(0,a.Cb)()],y.prototype,"language",void 0),(0,n.__decorate)([(0,a.Cb)({attribute:!1})],y.prototype,"hass",void 0),(0,n.__decorate)([(0,a.Cb)({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),(0,n.__decorate)([(0,a.Cb)({type:Boolean})],y.prototype,"required",void 0),(0,n.__decorate)([(0,a.SB)()],y.prototype,"_engines",void 0),y=(0,n.__decorate)([(0,a.Mo)("ha-stt-picker")],y);let f,m,$=e=>e;class x extends s.oi{render(){var e,t;return(0,s.dy)(f||(f=$`<ha-stt-picker .hass="${0}" .value="${0}" .label="${0}" .helper="${0}" .language="${0}" .disabled="${0}" .required="${0}"></ha-stt-picker>`),this.hass,this.value,this.label,this.helper,(null===(e=this.selector.stt)||void 0===e?void 0:e.language)||(null===(t=this.context)||void 0===t?void 0:t.language),this.disabled,this.required)}constructor(...e){super(...e),this.disabled=!1,this.required=!0}}x.styles=(0,s.iv)(m||(m=$`ha-stt-picker{width:100%}`)),(0,n.__decorate)([(0,a.Cb)({attribute:!1})],x.prototype,"hass",void 0),(0,n.__decorate)([(0,a.Cb)({attribute:!1})],x.prototype,"selector",void 0),(0,n.__decorate)([(0,a.Cb)()],x.prototype,"value",void 0),(0,n.__decorate)([(0,a.Cb)()],x.prototype,"label",void 0),(0,n.__decorate)([(0,a.Cb)()],x.prototype,"helper",void 0),(0,n.__decorate)([(0,a.Cb)({type:Boolean})],x.prototype,"disabled",void 0),(0,n.__decorate)([(0,a.Cb)({type:Boolean})],x.prototype,"required",void 0),(0,n.__decorate)([(0,a.Cb)({attribute:!1})],x.prototype,"context",void 0),x=(0,n.__decorate)([(0,a.Mo)("ha-selector-stt")],x)},99923:function(e,t,i){i.d(t,{m:function(){return n}});const n=(e,t,i)=>e.callWS({type:"stt/engine/list",language:t,country:i})}}]);
//# sourceMappingURL=6212.838aff045d0ad110.js.map