iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
16 lines • 27.7 kB
JavaScript
export const __rspack_esm_id=30195;export const __rspack_esm_ids=[30195];export const __webpack_modules__={86198(e,t,a){a.a(e,async function(e,i){try{a.d(t,{T:()=>n});var o=a(74487),s=a(22786),r=e([o]);o=(r.then?(await r)():r)[0];const n=(e,t)=>{try{return c(t)?.of(e)??e}catch{return e}},c=(0,s.A)(e=>new Intl.DisplayNames(e.language,{type:"language",fallback:"code"}));i()}catch(e){i(e)}})},7553(e,t,a){a.d(t,{h:()=>o});class i extends Error{constructor(e,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,i),this.name="TimeoutError",this.timeout=e,this.message=`Timed out in ${e} ms.`}}const o=(e,t)=>{const a=new Promise((t,a)=>{setTimeout(()=>{a(new i(e))},e)});return Promise.race([t,a])}},44643(e,t,a){a.a(e,async function(e,t){try{a(44114),a(18111),a(20116),a(61701);var i=a(62826),o=a(5124),s=a(22441),r=a(1087),n=a(86198),c=a(69150),l=a(606),d=e([l,n]);[l,n]=d.then?(await d)():d;const p="preferred",h="last_used";class f extends o.WF{get _default(){return this.includeLastUsed?h:p}render(){if(!this._pipelines)return o.s6;const e=this.value??this._default,t=[{value:p,label:this.hass.localize("ui.components.pipeline-picker.preferred",{preferred:this._pipelines.find(e=>e.id===this._preferredPipeline)?.name})}];return this.includeLastUsed&&t.unshift({value:h,label:this.hass.localize("ui.components.pipeline-picker.last_used")}),t.push(...this._pipelines.map(e=>({value:e.id,label:`${e.name} (${(0,n.T)(e.language,this.hass.locale)})`}))),o.qy` <ha-select .label="${this.label||this.hass.localize("ui.components.pipeline-picker.pipeline")}" .value="${e}" .required="${this.required}" .disabled="${this.disabled}" ="${this._changed}" .options="${t}"> </ha-select> `}firstUpdated(e){super.firstUpdated(e),(0,c.nx)(this.hass).then(e=>{this._pipelines=e.pipelines,this._preferredPipeline=e.preferred_pipeline})}_changed(e){const t=e.detail.value;!this.hass||""===t||t===this.value||void 0===this.value&&t===this._default||(this.value=t===this._default?void 0:t,(0,r.r)(this,"value-changed",{value:this.value}))}constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.includeLastUsed=!1,this._preferredPipeline=null}}f.styles=o.AH`ha-select{width:100%}`,(0,i.Cg)([(0,s.MZ)()],f.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)()],f.prototype,"label",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],f.prototype,"required",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"includeLastUsed",void 0),(0,i.Cg)([(0,s.wk)()],f.prototype,"_pipelines",void 0),(0,i.Cg)([(0,s.wk)()],f.prototype,"_preferredPipeline",void 0),f=(0,i.Cg)([(0,s.EM)("ha-assist-pipeline-picker")],f),t()}catch(e){t(e)}})},75064(e,t,a){var i=a(62826),o=a(5124),s=a(22441),r=a(2846);class n extends r.G{constructor(...e){super(...e),this.borderTop=!1}}n.styles=[...r.J,o.AH`:host{--md-list-item-one-line-container-height:48px;--md-list-item-two-line-container-height:64px}:host([border-top]) md-item{border-top:1px solid var(--divider-color)}[slot=start]{--state-icon-color:var(--secondary-text-color)}[slot=overline]{line-height:1.15rem;font-size:calc(var(--mdc-typography-subtitle1-font-size, 1rem) * .75);font-weight:var(--mdc-typography-subtitle1-font-weight,400);font-family:var(
--mdc-typography-subtitle1-font-family,
var(--mdc-typography-font-family)
);color:var(--mdc-select-label-ink-color,rgba(0,0,0,.6))}[slot=headline]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-m);white-space:nowrap}[slot=supporting-text]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-s);white-space:nowrap}::slotted(img),::slotted(state-badge){width:32px;height:32px}::slotted(.code){font-family:var(--ha-font-family-code);font-size:var(--ha-font-size-xs)}::slotted(.domain){font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal);align-self:flex-end;max-width:30%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}`],(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"border-top"})],n.prototype,"borderTop",void 0),n=(0,i.Cg)([(0,s.EM)("ha-combo-box-item")],n)},70947(e,t,a){var i=a(62826),o=a(50759),s=(a(38625),a(5124)),r=a(22441);a(67094);class n extends o.A{renderCheckboxIcon(){return s.qy` <ha-svg-icon id="check" part="checkmark" .path="${this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,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":"M19,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,3M19,5V19H5V5H19Z"}"></ha-svg-icon> `}static get styles(){return[o.A.styles,s.AH`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`]}constructor(...e){super(...e),this.selected=!1}}(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],n.prototype,"selected",void 0),n=(0,i.Cg)([(0,r.EM)("ha-dropdown-item")],n)},29823(e,t,a){a.a(e,async function(e,t){try{var i=a(62826),o=a(52254),s=a(5124),r=a(22441),n=e([o]);o=(n.then?(await n)():n)[0];class c extends o.A{get anchorElement(){return this.popup?.anchor}set anchorElement(e){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=e)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!0)}async hideMenu(){const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!1),await super.hideMenu()}static get styles(){return[o.A.styles,s.AH`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
--card-background-color,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
)}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`]}constructor(...e){super(...e),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,i.Cg)([(0,r.MZ)({attribute:!1})],c.prototype,"dropdownTag",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],c.prototype,"dropdownItemTag",void 0),c=(0,i.Cg)([(0,r.EM)("ha-dropdown")],c),t()}catch(e){t(e)}})},47680(e,t,a){a.r(t),a.d(t,{HaIcon:()=>x});a(74423);var i=a(62826),o=a(5124),s=a(22441),r=a(1087),n=a(9899),c=a(700),l=(a(44114),a(18111),a(7588),a(95192)),d=a(7553);const p=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let h;const f=()=>(h||(h=u().catch(e=>{throw h=void 0,e})),h),u=async()=>{const e=(0,l.y$)("hass-icon-db","mdi-icon-store"),t=await(0,l.Jt)("_version",e);return t?t!==p.version&&(await(0,l.IU)(e),(0,l.hZ)("_version",p.version,e)):(0,l.hZ)("_version",p.version,e),e},b=["mdi","hass","hassio","hademo"];let v=[];a(67094);const g={},m={},y=(0,n.s)(()=>(async e=>{const t=Object.keys(e),a=await Promise.allSettled(Object.values(e));(await f())("readwrite",i=>{a.forEach((a,o)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([e,t])=>{i.put(t,e)}),delete e[t[o]]})})})(m),2e3),w={},_={"home-assistant":()=>a.e(58781).then(a.bind(a,53580)).then(e=>e.mdiHomeAssistant),"music-assistant":()=>a.e(56009).then(a.bind(a,10576)).then(e=>e.mdiMusicAssistant),esphome:()=>a.e(88800).then(a.bind(a,45091)).then(e=>e.mdiEsphomeLogo)};class x extends o.WF{willUpdate(e){super.willUpdate(e),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?o.qy` <iron-icon .icon="${this.icon}"></iron-icon>`:o.qy`<ha-svg-icon .path="${this._path}" .secondaryPath="${this._secondaryPath}" .viewBox="${this._viewBox}"></ha-svg-icon>`:o.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let i,o=a;if(!t||!o)return;if(!b.includes(t)){const a=c.y[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(o),e)):void(this._legacy=!0)}if(this._legacy=!1,o in g){const e=g[o];let a;e.newName?(a=`Icon ${t}:${o} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,o=e.newName):a=`Icon ${t}:${o} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(a),(0,r.r)(this,"write_log",{level:"warning",message:a})}if(o in w)return void(this._path=w[o]);if(o in _){const t=await _[o]();return this.icon===e&&(this._path=t),void(w[o]=t)}try{i=await(e=>new Promise((t,a)=>{if(v.push([e,t,a]),v.length>1)return;const i=f();(0,d.h)(1e3,(async()=>{(await i)("readonly",e=>{for(const[t,a,i]of v)(0,l.Yd)(e.get(t)).then(e=>a(e)).catch(e=>i(e));v=[]})})()).catch(e=>{for(const[,,t]of v)t(e);v=[]})}))(o)}catch(e){i=void 0}if(i)return this.icon===e&&(this._path=i),void(w[o]=i);const s=(e=>{let t;for(const a of p.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(o);if(s in m)return void this._setPath(m[s],o,e);const n=fetch(`/static/mdi/${s}.json`).then(e=>e.json());m[s]=n,this._setPath(n,o,e),n.catch(()=>{delete m[s]}),y()}async _setCustomPath(e,t){const a=await e;this.icon===t&&(this._path=a.path,this._secondaryPath=a.secondaryPath,this._viewBox=a.viewBox)}async _setPath(e,t,a){try{const i=await e;this.icon===a&&(this._path=i[t]),w[t]=i[t]}catch(e){}}constructor(...e){super(...e),this._legacy=!1}}x.styles=o.AH`:host{fill:currentcolor}`,(0,i.Cg)([(0,s.MZ)()],x.prototype,"icon",void 0),(0,i.Cg)([(0,s.wk)()],x.prototype,"_path",void 0),(0,i.Cg)([(0,s.wk)()],x.prototype,"_secondaryPath",void 0),(0,i.Cg)([(0,s.wk)()],x.prototype,"_viewBox",void 0),(0,i.Cg)([(0,s.wk)()],x.prototype,"_legacy",void 0),x=(0,i.Cg)([(0,s.EM)("ha-icon")],x)},3449(e,t,a){var i=a(62826),o=a(5124),s=a(22441);class r extends o.WF{render(){return o.qy`<slot></slot>`}constructor(...e){super(...e),this.disabled=!1}}r.styles=o.AH`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:var(--ha-font-size-s);padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var(
--mdc-typography-caption-letter-spacing,
.0333333333em
);line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`,(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],r.prototype,"disabled",void 0),r=(0,i.Cg)([(0,s.EM)("ha-input-helper-text")],r)},2846(e,t,a){a.d(t,{G:()=>l,J:()=>c});var i=a(62826),o=a(58168),s=a(82553),r=a(5124),n=a(22441);a(54276);const c=[s.R,r.AH`: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);gap:var(--ha-md-list-item-gap,16px)}`];class l extends o.n{renderRipple(){return"text"===this.type?r.s6:r.qy`<ha-ripple part="ripple" for="item" ?disabled="${this.disabled&&"link"!==this.type}"></ha-ripple>`}}l.styles=c,l=(0,i.Cg)([(0,n.EM)("ha-md-list-item")],l)},88285(e,t,a){a.a(e,async function(e,t){try{var i=a(62826),o=a(35211),s=a(5124),r=a(22441),n=a(63672),c=a(1087),l=a(22792),d=a(17894),p=(a(75064),a(47680),a(26300)),h=e([p]);p=(h.then?(await h)():h)[0];const f="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",u="M7,10L12,15L17,10H7Z";class b extends((0,d.c)(s.WF)){async focus(){await this.updateComplete,await(this.item?.focus())}render(){const e=!!this.value,t=!(!this.value||this.required||this.disabled||this.hideClearIcon),a=this.placeholder??this.label,i=this.label&&e?s.qy`<span slot="overline">${this.label}${this.required?" *":""}</span>`:s.s6,o=e?this.valueRenderer?this.valueRenderer(this.value??""):s.qy`<span slot="headline">${this.value}</span>`:a?s.qy`<span slot="headline" class="placeholder"> ${a}${this.required?" *":""} </span>`:s.s6;return s.qy` <ha-combo-box-item aria-label="${(0,n.J)(this.label||this.placeholder)}" .disabled="${this.disabled}" type="button" compact="compact"> ${this.image?s.qy`<img alt="${this.label??""}" slot="start" .src="${this.image}" crossorigin="anonymous" referrerpolicy="no-referrer">`:this.icon?s.qy`<ha-icon slot="start" .icon="${this.icon}"></ha-icon>`:s.qy`<slot name="start"></slot>`} ${i}${o} ${this.unknown?s.qy`<div slot="supporting-text" class="unknown"> ${this.unknownItemText||this._i18n?.localize("ui.components.combo-box.unknown_item")} </div>`:s.s6} ${t?s.qy` <ha-icon-button class="clear" slot="end" ="${this._clear}" .path="${f}"></ha-icon-button> `:s.s6} <ha-svg-icon class="arrow" slot="end" .path="${u}"></ha-svg-icon> </ha-combo-box-item> `}_clear(e){e.stopPropagation(),(0,c.r)(this,"clear")}static get styles(){return[s.AH`ha-combo-box-item[disabled]{background-color:var(--ha-color-form-background-disabled);--md-list-item-disabled-opacity:0.5;opacity:.5;cursor:not-allowed}ha-combo-box-item{position:relative;background-color:var(--ha-color-form-background);border-radius:var(--ha-border-radius-sm);border-end-end-radius:0;border-end-start-radius:0;--md-list-item-one-line-container-height:56px;--md-list-item-two-line-container-height:56px;--md-list-item-top-space:0px;--md-list-item-bottom-space:0px;--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-2);--ha-md-list-item-gap:var(--ha-space-2);--md-focus-ring-width:0px;--md-focus-ring-duration:0s}ha-combo-box-item:after{display:block;content:"";position:absolute;pointer-events:none;bottom:0;left:0;right:0;height:1px;width:100%;background-color:var(--ha-color-border-neutral-loud);transform:height 180ms ease-in-out,background-color 180ms ease-in-out}ha-combo-box-item:focus:after{height:2px;background-color:var(--mdc-theme-primary)}:host([unknown]) ha-combo-box-item{background-color:var(--ha-color-fill-warning-quiet-resting)}:host([invalid]) ha-combo-box-item:after{height:2px;background-color:var(--mdc-theme-error,var(--error-color,#b00020))}.clear{margin:0 -8px;--ha-icon-button-size:32px;--ha-icon-button-padding-inline:var(--ha-space-1)}.arrow{--mdc-icon-size:20px;width:32px}.placeholder{color:var(--secondary-text-color)}:host([invalid]) .placeholder{color:var(--mdc-theme-error,var(--error-color,#b00020))}.unknown{color:var(--ha-color-on-warning-normal)}`]}constructor(...e){super(...e),this.invalid=!1}}(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],b.prototype,"invalid",void 0),(0,i.Cg)([(0,r.P)("ha-combo-box-item",!0)],b.prototype,"item",void 0),(0,i.Cg)([(0,r.wk)(),(0,o.Fg)({context:l.D5,subscribe:!0})],b.prototype,"_i18n",void 0),b=(0,i.Cg)([(0,r.EM)("ha-picker-field")],b),t()}catch(e){t(e)}})},54276(e,t,a){var i=a(62826),o=a(76482),s=a(91382),r=a(96245),n=a(5124),c=a(22441);class l extends s.n{attach(e){super.attach(e),this.attachableTouchController.attach(e)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(e,t){e?.removeEventListener("touchend",this._handleTouchEnd),t?.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new o.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}l.styles=[r.R,n.AH`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
--ha-ripple-hover-color,
var(--ha-ripple-color, var(--secondary-text-color))
);--md-ripple-pressed-color:var(
--ha-ripple-pressed-color,
var(--ha-ripple-color, var(--secondary-text-color))
)}`],l=(0,i.Cg)([(0,c.EM)("ha-ripple")],l)},606(e,t,a){a.a(e,async function(e,t){try{a(74423),a(18111),a(61701);var i=a(62826),o=a(5124),s=a(22441),r=a(63672),n=a(22786),c=a(1087),l=a(29823),d=(a(70947),a(3449),a(88285)),p=(a(67094),e([l,d]));[l,d]=p.then?(await p)():p;class h extends o.WF{render(){return this.disabled?o.qy`${this._renderField()}${this._renderHelper()}`:o.qy` <ha-dropdown placement="bottom" -select="${this._handleSelect}" -show="${this._handleShow}" -hide="${this._handleHide}"> ${this._renderField()} ${this.options?this.options.map(e=>{const t=["string","number"].includes(typeof e);return o.qy` <ha-dropdown-item .value="${t?e:e.value}" .disabled="${!t&&(e.disabled??!1)}" .selected="${this.value===(t?e:e.value)}"> ${e.iconPath?o.qy`<ha-svg-icon slot="icon" .path="${e.iconPath}"></ha-svg-icon>`:o.s6} <div class="content"> ${t?e:e.label||e.value} ${e.secondary?o.qy`<div class="secondary">${e.secondary}</div>`:o.s6} </div> </ha-dropdown-item> `}):o.qy`<slot></slot>`} </ha-dropdown> ${this._renderHelper()} `}_renderField(){const e=this._getValueLabel(this.options,this.value);return o.qy` <ha-picker-field slot="trigger" type="button" class="${this._opened?"opened":""}" compact="compact" aria-label="${(0,r.J)(this.label)}" ="${this._clearValue}" .label="${this.label}" .value="${e}" .required="${this.required}" .disabled="${this.disabled}" .hideClearIcon="${!this.clearable||this.required||this.disabled||!String(this.value)}"> </ha-picker-field> `}_renderHelper(){return this.helper?o.qy`<ha-input-helper-text .disabled="${this.disabled}">${this.helper}</ha-input-helper-text>`:o.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,c.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,c.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,n.A)((e,t)=>{const a=void 0!==t?String(t):void 0;if(!e||!a)return a;for(const t of e){const e=["string","number"].includes(typeof t);if(e&&t===a||!e&&String(t.value)===a)return e?t:t.label||t.value}return a})}}h.styles=o.AH`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`,(0,i.Cg)([(0,s.MZ)({type:Boolean})],h.prototype,"clearable",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"options",void 0),(0,i.Cg)([(0,s.MZ)()],h.prototype,"label",void 0),(0,i.Cg)([(0,s.MZ)()],h.prototype,"helper",void 0),(0,i.Cg)([(0,s.MZ)()],h.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],h.prototype,"required",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],h.prototype,"disabled",void 0),(0,i.Cg)([(0,s.wk)()],h.prototype,"_opened",void 0),(0,i.Cg)([(0,s.P)("ha-picker-field")],h.prototype,"_triggerField",void 0),h=(0,i.Cg)([(0,s.EM)("ha-select")],h),t()}catch(e){t(e)}})},83642(e,t,a){a.a(e,async function(e,i){try{a.r(t),a.d(t,{HaAssistPipelineSelector:()=>l});var o=a(62826),s=a(5124),r=a(22441),n=a(44643),c=e([n]);n=(c.then?(await c)():c)[0];class l extends s.WF{render(){return s.qy` <ha-assist-pipeline-picker .hass="${this.hass}" .value="${this.value}" .label="${this.label}" .helper="${this.helper}" .disabled="${this.disabled}" .required="${this.required}" .includeLastUsed="${Boolean(this.selector.assist_pipeline?.include_last_used)}"></ha-assist-pipeline-picker> `}constructor(...e){super(...e),this.disabled=!1,this.required=!0}}l.styles=s.AH`ha-conversation-agent-picker{width:100%}`,(0,o.Cg)([(0,r.MZ)({attribute:!1})],l.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],l.prototype,"selector",void 0),(0,o.Cg)([(0,r.MZ)()],l.prototype,"value",void 0),(0,o.Cg)([(0,r.MZ)()],l.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)()],l.prototype,"helper",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],l.prototype,"disabled",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],l.prototype,"required",void 0),l=(0,o.Cg)([(0,r.EM)("ha-selector-assist_pipeline")],l),i()}catch(e){i(e)}})},69150(e,t,a){a.d(t,{$$:()=>b,AH:()=>o,NH:()=>h,QC:()=>i,Uc:()=>r,Zr:()=>f,ds:()=>u,hJ:()=>n,mp:()=>l,nx:()=>c,u6:()=>d,vU:()=>s,zn:()=>p});const i=(e,t,a)=>"run-start"===t.type?e={init_options:a,stage:"ready",run:t.data,events:[t],started:new Date(t.timestamp)}:e?((e="wake_word-start"===t.type?{...e,stage:"wake_word",wake_word:{...t.data,done:!1}}:"wake_word-end"===t.type?{...e,wake_word:{...e.wake_word,...t.data,done:!0}}:"stt-start"===t.type?{...e,stage:"stt",stt:{...t.data,done:!1}}:"stt-end"===t.type?{...e,stt:{...e.stt,...t.data,done:!0}}:"intent-start"===t.type?{...e,stage:"intent",intent:{...t.data,done:!1}}:"intent-end"===t.type?{...e,intent:{...e.intent,...t.data,done:!0}}:"tts-start"===t.type?{...e,stage:"tts",tts:{...t.data,done:!1}}:"tts-end"===t.type?{...e,tts:{...e.tts,...t.data,done:!0}}:"run-end"===t.type?{...e,finished:new Date(t.timestamp),stage:"done"}:"error"===t.type?{...e,finished:new Date(t.timestamp),stage:"error",error:t.data}:{...e}).events=[...e.events,t],e):void console.warn("Received unexpected event before receiving session",t),o=(e,t,a)=>{let o;const r=s(e,e=>{o=i(o,e,a),"run-end"!==e.type&&"error"!==e.type||r.then(e=>e()),o&&t(o)},a);return r},s=(e,t,a)=>e.connection.subscribeMessage(t,{...a,type:"assist_pipeline/run"}),r=(e,t)=>e.callWS({type:"assist_pipeline/pipeline_debug/list",pipeline_id:t}),n=(e,t,a)=>e.callWS({type:"assist_pipeline/pipeline_debug/get",pipeline_id:t,pipeline_run_id:a}),c=e=>e.callWS({type:"assist_pipeline/pipeline/list"}),l=(e,t)=>e.callWS({type:"assist_pipeline/pipeline/get",pipeline_id:t}),d=(e,t)=>e.callWS({type:"assist_pipeline/pipeline/create",...t}),p=(e,t,a)=>e.callWS({type:"assist_pipeline/pipeline/update",pipeline_id:t,...a}),h=(e,t)=>e.callWS({type:"assist_pipeline/pipeline/set_preferred",pipeline_id:t}),f=(e,t)=>e.callWS({type:"assist_pipeline/pipeline/delete",pipeline_id:t}),u=e=>e.callWS({type:"assist_pipeline/language/list"}),b=e=>e.callWS({type:"assist_pipeline/device/list"})},700(e,t,a){a.d(t,{y:()=>r});const i=window;"customIconsets"in i||(i.customIconsets={});const o=i.customIconsets,s=window;"customIcons"in s||(s.customIcons={});const r=new Proxy(s.customIcons,{get:(e,t)=>e[t]??(o[t]?{getIcon:o[t]}:void 0)})},17894(e,t,a){a.d(t,{c:()=>s});var i=a(62826),o=a(22441);const s=e=>{class t extends e{constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,i.Cg)([(0,o.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"icon",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"image",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"label",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"placeholder",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"helper",void 0),(0,i.Cg)([(0,o.MZ)()],t.prototype,"value",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,i.Cg)([(0,o.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,i.Cg)([(0,o.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},89429(e){e.exports=function(){}}};