iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
37 lines • 55.1 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[4211],{93421:function(e,t,a){a.d(t,{IW:function(){return d},dH:function(){return c},fI:function(){return l}});a(44114),a(62953);var r=a(35211),i=a(22792),o=a(32172);const s=(e,t)=>{let a=e;for(const r of t){if(null==a)return;a=a[r]}return a},n=(e,t,a)=>{const i=(0,o.p)({transformer:function(e){return a.call(this,e)},watch:t?[t]:[]}),s=(0,r.Fg)({context:e,subscribe:!0});return(e,t)=>{i(e,t),s(e,t)}},l=e=>n(i.iN,e.entityIdPath[0],function(t){const a=s(this,e.entityIdPath);return"string"==typeof a?null==t?void 0:t[a]:void 0}),c=e=>n(i.X1,e.entityIdPath[0],function(t){const a=s(this,e.entityIdPath);return"string"==typeof a?null==t?void 0:t[a]:void 0}),d=()=>n(i.D5,void 0,({localize:e})=>e)},93905:function(e,t,a){a.d(t,{I:function(){return o}});a(16280),a(44114),a(18111),a(7588),a(69112),a(33110);class r{addFromStorage(e){if(!this._storage[e]){const t=this.storage.getItem(e);t&&(this._storage[e]=JSON.parse(t))}}subscribeChanges(e,t){return this._listeners[e]?this._listeners[e].push(t):this._listeners[e]=[t],()=>{this.unsubscribeChanges(e,t)}}unsubscribeChanges(e,t){if(!(e in this._listeners))return;const a=this._listeners[e].indexOf(t);-1!==a&&this._listeners[e].splice(a,1)}hasKey(e){return e in this._storage}getValue(e){return this._storage[e]}setValue(e,t){const a=this._storage[e];this._storage[e]=t;try{void 0===t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify(t))}catch(r){}finally{this._listeners[e]&&this._listeners[e].forEach(e=>e(a,t))}}constructor(e=window.localStorage){this._storage={},this._listeners={},this.storage=e,this.storage===window.localStorage&&window.addEventListener("storage",e=>{e.key&&this.hasKey(e.key)&&(this._storage[e.key]=e.newValue?JSON.parse(e.newValue):e.newValue,this._listeners[e.key]&&this._listeners[e.key].forEach(t=>t(e.oldValue?JSON.parse(e.oldValue):e.oldValue,this._storage[e.key])))})}}const i={};function o(e){return(t,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const o=e.storage||"localStorage";let s;o&&o in i?s=i[o]:(s=new r(window[o]),i[o]=s);const n=e.key||String(a);s.addFromStorage(n);const l=!1!==e.subscribe?e=>s.subscribeChanges(n,(t,r)=>{e.requestUpdate(a,t)}):void 0,c=()=>s.hasKey(n)?e.deserializer?e.deserializer(s.getValue(n)):s.getValue(n):void 0,d=(t,r)=>{let i;e.state&&(i=c()),s.setValue(n,e.serializer?e.serializer(r):r),e.state&&t.requestUpdate(a,i)},h=t.performUpdate;if(t.performUpdate=function(){this.__initialized=!0,h.call(this)},e.subscribe){const e=t.connectedCallback,a=t.disconnectedCallback;t.connectedCallback=function(){e.call(this);const t=this;t.__unbsubLocalStorage||(t.__unbsubLocalStorage=null==l?void 0:l(this))},t.disconnectedCallback=function(){var e;a.call(this);const t=this;null===(e=t.__unbsubLocalStorage)||void 0===e||e.call(t),t.__unbsubLocalStorage=void 0}}const u=Object.getOwnPropertyDescriptor(t,a);let p;if(void 0===u)p={get(){return c()},set(e){(this.__initialized||void 0===c())&&d(this,e)},configurable:!0,enumerable:!0};else{const e=u.set;p=Object.assign(Object.assign({},u),{},{get(){return c()},set(t){(this.__initialized||void 0===c())&&d(this,t),null==e||e.call(this,t)}})}Object.defineProperty(t,a,p)}}},32172:function(e,t,a){a.d(t,{p:function(){return r}});a(16280),a(18111),a(7588),a(45367),a(92731),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);function r(e){return(t,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const r=String(a),i=t;if(i._transformers){if(!i.hasOwnProperty("_transformers")){const e=i._transformers;i._transformers=new Map,e.forEach((e,t)=>i._transformers.set(t,e))}}else{i._transformers=new Map,i._watching=new Map;const e=i.willUpdate;i.willUpdate=function(t){e.call(this,t);const a=new Set;t.forEach((e,t)=>{const r=this._watching.get(t);void 0!==r&&r.forEach(e=>a.add(e))}),a.forEach(e=>{this[e]=this[`__original_${String(e)}`]})}}i._transformers.set(a,e.transformer),e.watch&&e.watch.forEach(e=>{let t=i._watching.get(e);t||(t=new Set,i._watching.set(e,t)),t.add(a)});const o=Object.getOwnPropertyDescriptor(t,a);let s;if(void 0===o)s={get(){return this[`__transform_${r}`]},set(e){const t=this[`__transform_${r}`],a=this._transformers.get(r);this[`__transform_${r}`]=a?a.call(this,e):e,this[`__original_${r}`]=e,this.requestUpdate(r,t)},configurable:!0,enumerable:!0};else{const e=o.set;s=Object.assign(Object.assign({},o),{},{set(t){const a=this[`__transform_${r}`],i=this._transformers.get(r);this[`__transform_${r}`]=i?i.call(this,t):t,this[`__original_${r}`]=t,this.requestUpdate(r,a),null==e||e.call(this,t)}})}Object.defineProperty(t,a,s)}}},86198:function(e,t,a){a.a(e,async function(e,r){try{a.d(t,{T:function(){return n}});var i=a(74487),o=a(22786),s=e([i]);i=(s.then?(await s)():s)[0];const n=(e,t)=>{try{var a,r;return null!==(a=null===(r=l(t))||void 0===r?void 0:r.of(e))&&void 0!==a?a:e}catch(i){return e}},l=(0,o.A)(e=>new Intl.DisplayNames(e.language,{type:"language",fallback:"code"}));r()}catch(n){r(n)}})},63130:function(e,t,a){a.d(t,{l:function(){return i}});a(3362);var r=a(50248);const i=async(e,t)=>{var a;if(navigator.clipboard)try{return void(await navigator.clipboard.writeText(e))}catch(s){}const i=t||(null===(a=(0,r.n)())||void 0===a?void 0:a.getRootNode())||document.body,o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.opacity="0",i.appendChild(o),o.select(),document.execCommand("copy"),i.removeChild(o)}},60353:function(e,t,a){a.d(t,{u:function(){return r}});class r{start(e){const t=Date.now();this._startY=e,this._startTime=t,this._lastY=e,this._lastTime=t,this._delta=0}move(e){const t=Date.now();return this._delta=this._startY-e,this._lastY=e,this._lastTime=t,this._delta}end(){const e=this.getVelocity(),t=Math.abs(e)>this._velocityThreshold;return{velocity:e,delta:this._delta,isSwipe:t,isDownwardSwipe:e>0}}getDelta(){return this._delta}getVelocity(){if(Date.now()-this._lastTime>=this._movementTimeThreshold)return 0;const e=this._lastTime-this._startTime;return e>0?(this._lastY-this._startY)/e:0}reset(){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0}constructor(e={}){var t,a;this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=null!==(t=e.velocitySwipeThreshold)&&void 0!==t?t:.5,this._movementTimeThreshold=null!==(a=e.movementTimeThreshold)&&void 0!==a?a:100}}},5745:function(e,t,a){var r=a(40445),i=a(99731),o=a(67576);class s extends i.Y{}s=(0,r.Cg)([(0,o.EM)("ha-chip-set")],s)},38962:function(e,t,a){a.a(e,async function(e,r){try{a.r(t);a(62953);var i=a(40445),o=a(5124),s=a(67576),n=a(6412),l=a(93421),c=a(1087),d=a(26300),h=(a(67094),e([d]));d=(h.then?(await h)():h)[0];let u,p,f,v,g=e=>e;const b="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",m={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"};class _ extends o.WF{render(){var e;return(0,o.qy)(u||(u=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,n.H)({[this.alertType]:!0}),this.title?"":"no-title",m[this.alertType],(0,n.H)({content:!0,narrow:this.narrow}),this.title?(0,o.qy)(p||(p=g`<div class="title">${0}</div>`),this.title):o.s6,this.dismissable?(0,o.qy)(f||(f=g`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(e=this._localize)||void 0===e?void 0:e.call(this,"ui.common.dismiss_alert"),b):o.s6)}_dismissClicked(){(0,c.r)(this,"alert-dismissed-clicked")}constructor(...e){super(...e),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}_.styles=(0,o.AH)(v||(v=g`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.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;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-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}`)),(0,i.Cg)([(0,s.MZ)()],_.prototype,"title",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"alert-type"})],_.prototype,"alertType",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],_.prototype,"dismissable",void 0),(0,i.Cg)([(0,s.wk)(),(0,l.IW)()],_.prototype,"_localize",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],_.prototype,"narrow",void 0),_=(0,i.Cg)([(0,s.EM)("ha-alert")],_),r()}catch(u){r(u)}})},99611:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(13579),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var r=a(40445),i=a(1126),o=a(35211),s=a(5124),n=a(67576),l=a(1087),c=a(60353),d=a(22792),h=a(59992),u=a(14503),p=a(22348),f=e([i,h]);[i,h]=f.then?(await f)():f;let v,g,b=e=>e;const m=300,_=new Set(["ha-control-slider","ha-slider","ha-control-switch","ha-control-circular-slider","ha-hs-color-picker","ha-map","ha-more-info-control-select-container","ha-filter-chip"]),y=new Set(["volume-slider-container","forecast"]);class w extends((0,h.V)(s.WF)){get scrollableElement(){return this._bodyElement}connectedCallback(){super.connectedCallback(),this.addEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.addEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0})}updated(e){super.updated(e),e.has("open")&&(this._drawerOpen=this.open)}render(){return(0,s.qy)(v||(v=b` <wa-drawer id="drawer" placement="bottom" .open="${0}" .lightDismiss="${0}" .ariaLabelledby="${0}" .ariaDescribedby="${0}" @keydown="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-hide="${0}" @wa-after-hide="${0}" @click="${0}" without-header @touchstart="${0}"> <div class="handle-wrapper" aria-hidden="true"> <div class="handle"></div> </div> <slot name="header"></slot> <div class="content-wrapper"> <div id="body" class="body ha-scrollbar"> <slot></slot> </div> ${0} </div> <slot name="footer"></slot> </wa-drawer> `),this._drawerOpen,!this.preventScrimClose,this.ariaLabelledBy,this.ariaDescribedBy,this._handleKeyDown,this._handleShow,this._handleAfterShow,this._handleHide,this._handleAfterHide,this._handleCloseAction,this._handleTouchStart,this.renderScrollableFades())}_startResizing(e){document.addEventListener("touchmove",this._handleTouchMove,{passive:!1}),document.addEventListener("touchend",this._handleTouchEnd),document.addEventListener("touchcancel",this._handleTouchEnd),this._gestureRecognizer.start(e)}_animateSnapBack(){this.style.setProperty("--dialog-transition",`transform ${m}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},m)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.removeEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0}),this._unregisterResizeHandlers(),this._isDragging=!1}static get styles(){return[...super.styles,u.dp,(0,s.AH)(g||(g=b`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${0}ms;--hide-duration:${0}ms}wa-drawer::part(dialog){max-height:min(var(--ha-bottom-sheet-max-height,90vh),calc(100vh - max(var(--safe-area-inset-top),48px)));max-height:min(var(--ha-bottom-sheet-max-height,90dvh),calc(100dvh - max(var(--safe-area-inset-top),48px)));align-items:center;transform:var(--dialog-transform);transition:var(--dialog-transition)}@media (prefers-reduced-motion:reduce){wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:1ms;--hide-duration:1ms}wa-drawer::part(dialog){transition:1ms}}wa-drawer::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));background-color:var(--ha-bottom-sheet-scrim-color,var(--mdc-dialog-scrim-color,none))}wa-drawer::part(body){max-width:var(--ha-bottom-sheet-max-width);width:100%;position:relative;border-top-left-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));border-top-right-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));background-color:var(--ha-bottom-sheet-surface-background,var(--ha-dialog-surface-background,var(--card-background-color,var(--ha-color-surface-default))));-webkit-backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));padding:var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left))}:host([flexcontent]) wa-drawer::part(body){display:flex;flex-direction:column}:host([prevent-scrim-close]) .handle-wrapper{display:none}.handle-wrapper{position:absolute;top:0;inset-inline-start:0;width:100%;padding-bottom:2px;display:flex;justify-content:center;align-items:center;pointer-events:none;z-index:1}.handle-wrapper .handle{height:16px;width:200px;display:flex;justify-content:center;align-items:center}.handle-wrapper .handle::after{content:"";border-radius:var(--ha-border-radius-md);height:4px;background:var(--ha-bottom-sheet-handle-color,var(--divider-color));width:40px}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{padding:var(--ha-bottom-sheet-content-padding,0);box-sizing:border-box}:host([flexcontent]) .body{flex:1;max-width:100%;display:flex;flex-direction:column;padding:var(--ha-bottom-sheet-content-padding,var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left)));box-sizing:border-box}slot[name=footer]{display:block;padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;box-sizing:border-box}:host([flexcontent]) slot[name=footer]{flex-shrink:0}`),m,m)]}constructor(...e){super(...e),this.open=!1,this.flexContent=!1,this.preventScrimClose=!1,this._drawerOpen=!1,this._sliderInteractionActive=!1,this._gestureRecognizer=new c.u,this._isDragging=!1,this._escapePressed=!1,this._handleShow=async()=>{this._drawerOpen=!0,this.open=!0,(0,l.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e;const t=this._autofocusElement;null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,p.V)(this._hassConfig.auth.external)?t&&(t.id||(t.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})):null==t||t.focus()})},this._handleAfterShow=()=>{(0,l.r)(this,"after-show")},this._handleSliderInteractionStart=()=>{this._sliderInteractionActive=!0},this._handleSliderInteractionStop=()=>{this._sliderInteractionActive=!1},this._handleAfterHide=e=>{if(this._sliderInteractionActive)return this._drawerOpen=!0,void(this.open=!0);e.eventPhase===Event.AT_TARGET&&(this.open=!1,this._drawerOpen=!1,(0,l.r)(this,"closed"))},this._handleHide=e=>{if(e.eventPhase!==Event.AT_TARGET)return;const t=e.detail.source===e.target.drawer;if(this._sliderInteractionActive)return e.preventDefault(),this._drawerOpen=!0,this.open=!0,void(this._escapePressed=!1);this.preventScrimClose&&this._escapePressed&&t&&e.preventDefault(),this._escapePressed=!1},this._handleKeyDown=e=>{"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)},this._handleCloseAction=e=>{e.composedPath().some(e=>e instanceof HTMLElement&&("close"===e.getAttribute("data-dialog")||"close"===e.getAttribute("data-drawer")))&&(this._drawerOpen=!1)},this._handleTouchStart=e=>{if(this.preventScrimClose)return;const t=e.composedPath();for(const a of t){if(a===this._drawer)break;if(a instanceof HTMLElement&&(a.scrollTop>0||_.has(a.localName)||Array.from(a.classList).some(e=>y.has(e))))return}e.stopPropagation(),this._startResizing(e.touches[0].clientY)},this._handleTouchMove=e=>{const t=e.touches[0].clientY,a=this._gestureRecognizer.move(t);a<0&&(e.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*a}px)`)}))},this._handleTouchEnd=()=>{var e;this._unregisterResizeHandlers(),this._isDragging=!1;const t=this._gestureRecognizer.end();if(t.isSwipe)return void(t.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const a=null===(e=this._drawer.shadowRoot)||void 0===e?void 0:e.querySelector('[part="body"]'),r=(null==a?void 0:a.offsetHeight)||0;r>0&&t.delta<0&&Math.abs(t.delta)>.5*r?this._drawerOpen=!1:this._animateSnapBack()},this._unregisterResizeHandlers=()=>{document.removeEventListener("touchmove",this._handleTouchMove),document.removeEventListener("touchend",this._handleTouchEnd),document.removeEventListener("touchcancel",this._handleTouchEnd)}}}(0,r.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],w.prototype,"ariaLabelledBy",void 0),(0,r.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],w.prototype,"ariaDescribedBy",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean})],w.prototype,"open",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],w.prototype,"flexContent",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],w.prototype,"preventScrimClose",void 0),(0,r.Cg)([(0,n.wk)()],w.prototype,"_drawerOpen",void 0),(0,r.Cg)([(0,n.wk)()],w.prototype,"_sliderInteractionActive",void 0),(0,r.Cg)([(0,n.wk)(),(0,o.Fg)({context:d.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,r.Cg)([(0,n.P)("#drawer")],w.prototype,"_drawer",void 0),(0,r.Cg)([(0,n.P)("#body")],w.prototype,"_bodyElement",void 0),(0,r.Cg)([(0,n.P)("[autofocus]")],w.prototype,"_autofocusElement",void 0),w=(0,r.Cg)([(0,n.EM)("ha-bottom-sheet")],w),t()}catch(v){t(v)}})},76776:function(e,t,a){a(62953);var r=a(40445),i=a(5124),o=a(67576);let s,n,l,c=e=>e;class d extends i.WF{render(){return(0,i.qy)(s||(s=c` ${0} <slot></slot> `),this.header?(0,i.qy)(n||(n=c`<h1 class="card-header">${0}</h1>`),this.header):i.s6)}constructor(...e){super(...e),this.raised=!1}}d.styles=(0,i.AH)(l||(l=c`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)}
:host
::slotted(
.card-content:not(:nth-child(1 of .card-content, .card-header))
),
slot:not(:first-child)::slotted(.card-content) {
padding-top: 0;
margin-top: calc(var(--ha-space-2) * -1);
}
:host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`)),(0,r.Cg)([(0,o.MZ)()],d.prototype,"header",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],d.prototype,"raised",void 0),d=(0,r.Cg)([(0,o.EM)("ha-card")],d)},47680:function(e,t,a){a.r(t),a.d(t,{HaIcon:function(){return S}});a(74423),a(3362),a(62953);var r=a(40445),i=a(5124),o=a(67576),s=a(1087),n=a(9899),l=a(700),c=(a(44114),a(18111),a(7588),a(96167),a(95192)),d=a(7553);const h=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let u;const p=()=>(u||(u=f().catch(e=>{throw u=void 0,e})),u),f=async()=>{const e=(0,c.y$)("hass-icon-db","mdi-icon-store"),t=await(0,c.Jt)("_version",e);return t?t!==h.version&&(await(0,c.IU)(e),(0,c.hZ)("_version",h.version,e)):(0,c.hZ)("_version",h.version,e),e},v=["mdi","hass","hassio","hademo"];let g=[];a(67094);let b,m,_,y=e=>e;const w={},x={},k=(0,n.s)(()=>(async e=>{const t=Object.keys(e),a=await Promise.allSettled(Object.values(e));(await p())("readwrite",r=>{a.forEach((a,i)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([e,t])=>{r.put(t,e)}),delete e[t[i]]})})})(x),2e3),C={},$={"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 S extends i.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?(0,i.qy)(b||(b=y` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,i.qy)(m||(m=y`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):i.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let r,i=a;if(!t||!i)return;if(!v.includes(t)){const a=l.y[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(i),e)):void(this._legacy=!0)}if(this._legacy=!1,i in w){const e=w[i];let a;e.newName?(a=`Icon ${t}:${i} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,i=e.newName):a=`Icon ${t}:${i} 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,s.r)(this,"write_log",{level:"warning",message:a})}if(i in C)return void(this._path=C[i]);if(i in $){const t=await $[i]();return this.icon===e&&(this._path=t),void(C[i]=t)}try{r=await(e=>new Promise((t,a)=>{if(g.push([e,t,a]),g.length>1)return;const r=p();(0,d.h)(1e3,(async()=>{(await r)("readonly",e=>{for(const[t,a,r]of g)(0,c.Yd)(e.get(t)).then(e=>a(e)).catch(e=>r(e));g=[]})})()).catch(e=>{for(const[,,t]of g)t(e);g=[]})}))(i)}catch(u){r=void 0}if(r)return this.icon===e&&(this._path=r),void(C[i]=r);const o=(e=>{let t;for(const a of h.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(i);if(o in x)return void this._setPath(x[o],i,e);const n=fetch(`/static/mdi/${o}.json`).then(e=>e.json());x[o]=n,this._setPath(n,i,e),n.catch(()=>{delete x[o]}),k()}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 r=await e;this.icon===a&&(this._path=r[t]),C[t]=r[t]}catch(r){}}constructor(...e){super(...e),this._legacy=!1}}S.styles=(0,i.AH)(_||(_=y`:host{fill:currentcolor}`)),(0,r.Cg)([(0,o.MZ)()],S.prototype,"icon",void 0),(0,r.Cg)([(0,o.wk)()],S.prototype,"_path",void 0),(0,r.Cg)([(0,o.wk)()],S.prototype,"_secondaryPath",void 0),(0,r.Cg)([(0,o.wk)()],S.prototype,"_viewBox",void 0),(0,r.Cg)([(0,o.wk)()],S.prototype,"_legacy",void 0),S=(0,r.Cg)([(0,o.EM)("ha-icon")],S)},14927:function(e,t,a){a.a(e,async function(e,r){try{a.r(t),a.d(t,{HaLanguagePicker:function(){return S},getLanguageOptions:function(){return $}});var i=a(74487),o=(a(26910),a(18111),a(20116),a(61701),a(62953),a(40445)),s=a(5124),n=a(67576),l=a(22786),c=a(1087),d=a(86198),h=a(52220),u=a(28684),p=a(18350),f=a(38508),v=e([i,p,f,d]);[i,p,f,d]=v.then?(await v)():v;let g,b,m,_,y,w,x=e=>e;const k="M7,10L12,15L17,10H7Z",C=[{name:"primary",weight:10},{name:"secondary",weight:8},{name:"search_labels.english",weight:5}],$=(e,t,a,r)=>{let i=[];const o={language:"en"};if(t){const t=u.P.translations;i=e.map(e=>{var a;let i=null===(a=t[e])||void 0===a?void 0:a.nativeName;if(!i)try{i=new Intl.DisplayNames(e,{type:"language",fallback:"code"}).of(e)}catch(l){i=e}const s=(0,d.T)(e,r||{language:navigator.language}),n=(0,d.T)(e,o);return{id:e,primary:i,secondary:s!==i?s:void 0,search_labels:{english:n!==i?n:null}}})}else r&&(i=e.map(e=>{const t=(0,d.T)(e,r),a=(0,d.T)(e,o);return{id:e,primary:t,search_labels:{english:a!==t?a:null}}}));return!a&&r&&i.sort((e,t)=>(0,h.SH)(e.primary,t.primary,r.language)),i};class S extends s.WF{firstUpdated(e){super.firstUpdated(e),this._computeDefaultLanguageOptions()}_computeDefaultLanguageOptions(){this._defaultLanguages=Object.keys(u.P.translations)}render(){var e,t,a,r;const i=null!==(e=this.label)&&void 0!==e?e:(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.components.language-picker.language"))||"Language",o=null!==(a=this.value)&&void 0!==a?a:this.required&&!this.disabled?this._getItems()[0].id:this.value;return(0,s.qy)(g||(g=x` <ha-generic-picker .hass="${0}" .autofocus="${0}" .notFoundLabel="${0}" .emptyLabel="${0}" .label="${0}" .value="${0}" .valueRenderer="${0}" .disabled="${0}" .helper="${0}" .getItems="${0}" .searchKeys="${0}" @value-changed="${0}" hide-clear-icon> ${0} </ha-generic-picker> `),this.hass,this.autofocus,this._notFoundLabel,(null===(r=this.hass)||void 0===r?void 0:r.localize("ui.components.language-picker.no_languages"))||"No languages available",i,o,this._valueRenderer,this.disabled,this.helper,this._getItems,C,this._changed,this.buttonStyle?(0,s.qy)(b||(b=x`<ha-button slot="field" .disabled="${0}" @click="${0}" appearance="plain" variant="neutral"> ${0} <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> </ha-button>`),this.disabled,this._openPicker,this._getLanguageName(o),k):s.s6)}_openPicker(e){e.stopPropagation(),this.genericPicker.open()}_changed(e){e.stopPropagation(),this.value=e.detail.value,(0,c.r)(this,"value-changed",{value:this.value})}constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.nativeName=!1,this.buttonStyle=!1,this.noSort=!1,this._defaultLanguages=[],this._getLanguagesOptions=(0,l.A)($),this._getItems=()=>{var e,t;return this._getLanguagesOptions(null!==(e=this.languages)&&void 0!==e?e:this._defaultLanguages,this.nativeName,this.noSort,null===(t=this.hass)||void 0===t?void 0:t.locale)},this._getLanguageName=e=>{var t;return null===(t=this._getItems().find(t=>t.id===e))||void 0===t?void 0:t.primary},this._valueRenderer=e=>{var t;return(0,s.qy)(m||(m=x`<span slot="headline">${0}</span> `),null!==(t=this._getLanguageName(e))&&void 0!==t?t:e)},this._notFoundLabel=e=>{const t=(0,s.qy)(_||(_=x`<b>‘${0}’</b>`),e);return this.hass?this.hass.localize("ui.components.language-picker.no_match",{term:t}):(0,s.qy)(y||(y=x`No languages found for ${0}`),t)}}}S.styles=(0,s.AH)(w||(w=x`ha-generic-picker{width:100%;display:block}`)),(0,o.Cg)([(0,n.MZ)()],S.prototype,"value",void 0),(0,o.Cg)([(0,n.MZ)()],S.prototype,"label",void 0),(0,o.Cg)([(0,n.MZ)({type:Array})],S.prototype,"languages",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],S.prototype,"hass",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],S.prototype,"disabled",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],S.prototype,"required",void 0),(0,o.Cg)([(0,n.MZ)()],S.prototype,"helper",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"native-name",type:Boolean})],S.prototype,"nativeName",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"button-style"})],S.prototype,"buttonStyle",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"no-sort",type:Boolean})],S.prototype,"noSort",void 0),(0,o.Cg)([(0,n.wk)()],S.prototype,"_defaultLanguages",void 0),(0,o.Cg)([(0,n.P)("ha-generic-picker",!0)],S.prototype,"genericPicker",void 0),S=(0,o.Cg)([(0,n.EM)("ha-language-picker")],S),r()}catch(g){r(g)}})},54276:function(e,t,a){a(62953);var r=a(40445),i=a(76482),o=a(91382),s=a(96245),n=a(5124),l=a(67576);let c;class d extends o.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){null==e||e.removeEventListener("touchend",this._handleTouchEnd),null==t||t.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new i.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}d.styles=[s.R,(0,n.AH)(c||(c=(e=>e)`: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))
)}`))],d=(0,r.Cg)([(0,l.EM)("ha-ripple")],d)},56304:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(27495),a(62953),a(49255);var r=a(40445),i=a(99324),o=a(92070),s=a(5124),n=a(67576),l=a(6412),c=a(63672),d=a(57237),h=a(53305),u=e([i]);i=(u.then?(await u)():u)[0];let p,f,v,g,b=e=>e;class m extends((0,h.w)(s.WF)){get _formControl(){return this._textarea}setFocused(e){e?this.toggleAttribute("focused",!0):this.removeAttribute("focused")}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",d.d)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",d.d)}async firstUpdated(e){var t,a;(super.firstUpdated(e),this.autofocus)&&(await(null===(t=this._textarea)||void 0===t?void 0:t.updateComplete),null===(a=this._textarea)||void 0===a||a.focus())}focus(e){var t;null===(t=this._textarea)||void 0===t||t.focus(e)}render(){var e,t,a;const r=!this.label&&this._hasSlotController.test("label"),i=!this.hint&&this._hasSlotController.test("hint");return(0,s.qy)(p||(p=b` <wa-textarea .value="${0}" .placeholder="${0}" .readonly="${0}" .required="${0}" .rows="${0}" .resize="${0}" .disabled="${0}" name="${0}" autocapitalize="${0}" autocomplete="${0}" .autofocus="${0}" .spellcheck="${0}" inputmode="${0}" enterkeyhint="${0}" minlength="${0}" maxlength="${0}" class="${0}" @input="${0}" @change="${0}" @blur="${0}" @wa-invalid="${0}" exportparts="base:wa-base, hint:wa-hint, textarea:wa-textarea"> ${0} <div slot="hint" class="${0}" role="${0}" aria-live="polite"> ${0} </div> </wa-textarea> `),null!==(e=this.value)&&void 0!==e?e:null,this.placeholder,this.readonly,this.required,null!==(t=this.rows)&&void 0!==t?t:4,this.resize,this.disabled,(0,c.J)(this.name),(0,c.J)(this.autocapitalize||void 0),(0,c.J)(this.autocomplete),this.autofocus,this.spellcheck,(0,c.J)(this.inputmode||void 0),(0,c.J)(this.enterkeyhint||void 0),(0,c.J)(this.minlength),(0,c.J)(this.maxlength),(0,l.H)({input:!0,invalid:this.invalid||this._invalid,"label-raised":void 0!==this.value&&""!==this.value||this.label&&this.placeholder,"no-label":!this.label,"hint-hidden":!(this.hint||i||this.required||this._invalid||this.invalid)}),this._handleInput,this._handleChange,this._handleBlur,this._handleInvalid,this.label||r?(0,s.qy)(f||(f=b`<slot name="label" slot="label">${0}</slot>`),this.label?this._renderLabel(this.label,this.required):s.s6):s.s6,(0,l.H)({error:this.invalid||this._invalid}),(0,c.J)(this.invalid||this._invalid?"alert":void 0),this._invalid||this.invalid?this.validationMessage||(null===(a=this._textarea)||void 0===a?void 0:a.validationMessage):this.hint||(i?(0,s.qy)(v||(v=b`<slot name="hint"></slot>`)):s.s6))}constructor(...e){super(...e),this.resize="none",this._hasSlotController=new o.X(this,"label","hint"),this._requiredMarkerCSSVar="--ha-textarea-required-marker"}}m.styles=[h.N,(0,s.AH)(g||(g=b`:host{display:flex;align-items:flex-start;padding-bottom:var(--ha-textarea-padding-bottom)}wa-textarea::part(label){width:calc(100% - var(--ha-space-2));background-color:var(--ha-color-form-background);transition:all var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out;padding-inline-start:var(--ha-space-3);padding-inline-end:var(--ha-space-3);margin:var(--ha-space-1) var(--ha-space-1) 0;padding-top:var(--ha-space-4);white-space:nowrap;overflow:hidden}:host(:focus-within) wa-textarea::part(label),:host([focused]) wa-textarea::part(label){color:var(--primary-color)}:host(:focus-within) wa-textarea::part(label),:host([focused]) wa-textarea::part(label),wa-textarea.label-raised::part(label){padding-top:var(--ha-space-2);font-size:var(--ha-font-size-xs)}wa-textarea.no-label::part(label){height:0;padding:0}wa-textarea::part(base){min-height:56px;padding-top:var(--ha-space-6);padding-bottom:var(--ha-space-2)}wa-textarea.no-label::part(base){padding-top:var(--ha-space-3)}wa-textarea::part(base)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background-color:var(--ha-color-border-neutral-loud);transition:height var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out}:host(:focus-within) wa-textarea::part(base)::after,:host([focused]) wa-textarea::part(base)::after{height:2px;background-color:var(--primary-color)}:host(:focus-within) wa-textarea.invalid::part(base)::after,wa-textarea.invalid:not([disabled])::part(base)::after{background-color:var(--ha-color-border-danger-normal)}wa-textarea::part(textarea){padding:0 var(--ha-space-4);font-family:var(--ha-font-family-body);font-size:var(--ha-font-size-m)}:host([resize=auto]) wa-textarea::part(textarea){max-height:var(--ha-textarea-max-height,200px);overflow-y:auto}wa-textarea:hover::part(base),wa-textarea:hover::part(label){background-color:var(--ha-color-form-background-hover)}wa-textarea[disabled]::part(textarea){cursor:not-allowed}wa-textarea[disabled]::part(base),wa-textarea[disabled]::part(label){background-color:var(--ha-color-form-background-disabled)}`))],(0,r.Cg)([(0,n.MZ)({type:Number})],m.prototype,"rows",void 0),(0,r.Cg)([(0,n.MZ)()],m.prototype,"resize",void 0),(0,r.Cg)([(0,n.P)("wa-textarea")],m.prototype,"_textarea",void 0),m=(0,r.Cg)([(0,n.EM)("ha-textarea")],m),t()}catch(p){t(p)}})},34127:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var r=a(40445),i=a(52630),o=a(5124),s=a(67576),n=e([i]);i=(n.then?(await n)():n)[0];let l,c=e=>e;class d extends i.A{static get styles(){return[i.A.styles,(0,o.AH)(l||(l=c`:host{--wa-tooltip-background-color:var(
--ha-tooltip-background-color,
var(--ha-color-surface-default)
);--wa-tooltip-content-color:var(
--ha-tooltip-text-color,
var(--primary-text-color)
);--wa-tooltip-font-family:var(
--ha-tooltip-font-family,
var(--ha-font-family-body)
);--wa-tooltip-font-size:var(
--ha-tooltip-font-size,
var(--ha-font-size-m)
);--wa-tooltip-font-weight:var(
--ha-tooltip-font-weight,
var(--ha-font-weight-medium)
);--wa-tooltip-line-height:var(
--ha-tooltip-line-height,
var(--ha-line-height-condensed)
);--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
--ha-tooltip-border-radius,
var(--ha-border-radius-md)
);--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}.tooltip::part(popup){animation-duration:var(--ha-tooltip-animation-duration, 0)}.body{box-shadow:var(--ha-tooltip-box-shadow,var(--ha-box-shadow-m))}`))]}constructor(...e){super(...e),this.showDelay=350,this.hideDelay=150}}(0,r.Cg)([(0,s.MZ)({attribute:"show-delay",type:Number})],d.prototype,"showDelay",void 0),(0,r.Cg)([(0,s.MZ)({attribute:"hide-delay",type:Number})],d.prototype,"hideDelay",void 0),d=(0,r.Cg)([(0,s.EM)("ha-tooltip")],d),t()}catch(l){t(l)}})},36866:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var r=a(40445),i=a(5124),o=a(67576),s=a(91485),n=e([s]);s=(n.then?(await n)():n)[0];let l,c,d=e=>e;const h="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";class u extends s.U{willUpdate(e){var t,a;(super.willUpdate(e),this.label||this.placeholder||this.hasUpdated&&!e.has("_i18n"))||(this.placeholder=(null===(t=this.i18n)||void 0===t||null===(a=t.localize)||void 0===a?void 0:a.call(t,"ui.common.search"))||"Search")}renderStartDefault(){return(0,i.qy)(l||(l=d`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),h)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}u.styles=[...s.U.styles,(0,i.AH)(c||(c=d`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],u=(0,r.Cg)([(0,o.EM)("ha-input-search")],u),t()}catch(l){t(l)}})},88433:function(e,t,a){a.d(t,{RW:function(){return s},ZE:function(){return i},e1:function(){return n},vc:function(){return o}});var r=a(44537),i=function(e){return e[e.CONTROL=1]="CONTROL",e}({});const o=(e,t,a)=>e.callWS({type:"conversation/agent/list",language:t,country:a}),s=(e,t,a,i)=>e.callWS({type:"conversation/agent/homeassistant/debug",sentences:(0,r.e)(t),language:a,device_id:i}),n=(e,t,a)=>e.callWS({type:"conversation/agent/homeassistant/language_scores",language:t,country:a})},700:function(e,t,a){a.d(t,{y:function(){return s}});const r=window;"customIconsets"in r||(r.customIconsets={});const i=r.customIconsets,o=window;"customIcons"in o||(o.customIcons={});const s=new Proxy(o.customIcons,{get:(e,t)=>{var a;return null!==(a=e[t])&&void 0!==a?a:i[t]?{getIcon:i[t]}:void 0}})},16869:function(e,t,a){a.d(t,{B:function(){return o},g:function(){return i}});var r;a(74423),a(27495);const i=window.externalAppV2||window.externalApp||(null===(r=window.webkit)||void 0===r||null===(r=r.messageHandlers)||void 0===r?void 0:r.getExternalAuth)||location.search.includes("external_auth=1"),o=window.externalApp||window.externalAppV2},59992:function(e,t,a){a.a(e,async function(e,r){try{a.d(t,{V:function(){return f}});a(62953);var i=a(40445),o=a(88696),s=a(5124),n=a(6412),l=a(67576),c=e([o]);o=(c.then?(await c)():c)[0];let d,h,u=e=>e;const p=e=>void 0===e?[]:Array.isArray(e)?e:[e],f=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){var t;null===(t=super.firstUpdated)||void 0===t||t.call(this,e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){var t;null===(t=super.updated)||void 0===t||t.call(this,e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return(0,s.qy)(d||(d=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,n.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled}),(0,n.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable}))}static get styles(){var e;const t=Object.getPrototypeOf(this);return[...p(null!==(e=null==t?void 0:t.styles)&&void 0!==e?e:[]),(0,s.AH)(h||(h=u`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){var e,t;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(e=(t=this._resize).unobserve)||void 0===e||e.call(t,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:r=0,scrollTop:i=0}=e;this._contentScrollable=a-r>i+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{var t;const a=e.currentTarget;this._contentScrolled=(null!==(t=a.scrollTop)&&void 0!==t?t:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new o.P(this,{target:null,callback:e=>{var t;const a=null===(t=e[0])||void 0===t?void 0:t.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,i.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,i.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t};r()}catch(d){r(d)}})},54706:function(e,t,a){a.d(t,{E:function(){return o}});a(74423),a(18111),a(13579),a(3362),a(62953);var r=a(40445),i=a(67576);const o=e=>{class t extends e{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const e=this.__unsubs.pop();e instanceof Promise?e.then(e=>e()):e()}this.__unsubs=void 0}}updated(e){if(super.updated(e),e.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const t of e.keys())if(this.hassSubscribeRequiredHostProps.includes(t))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){var e;void 0!==this.__unsubs||!this.isConnected||void 0===this.hass||null!==(e=this.hassSubscribeRequiredHostProps)&&void 0!==e&&e.some(e=>void 0===this[e])||(this.__unsubs=this.hassSubscribe())}}return(0,r.Cg)([(0,i.MZ)({attribute:!1})],t.prototype,"hass",void 0),t}},79033:function(e,t,a){a.a(e,async function(e,r){try{a.r(t);a(74423),a(44114),a(18111),a(22489),a(20116),a(7588),a(61701),a(33110),a(3362),a(39202),a(62953);var i=a(40445),o=a(53289),s=a(5124),n=a(67576),l=a(93905),c=a(86198),d=a(38962),h=a(18350),u=(a(76776),a(15717)),p=a(14927),f=a(56304),v=a(88433),g=a(54706),b=a(14503),m=a(30039),_=e([d,h,u,p,f,c]);[d,h,u,p,f,c]=_.then?(await _)():_;let y,w,x,k,C,$,S,L=e=>e;const E="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z",M="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z";class A extends((0,g.E)(s.WF)){_languageChanged(e){this._language=e.detail.value}_handleKeyDown(e){"Enter"!==e.code||e.shiftKey||(e.preventDefault(),this._parse())}_textAreaInput(e){const t=e.target.value,a=Boolean(t);a!==this._validInput&&(this._validInput=a)}async _parse(){const e=(this._sentencesInput.value||"").split("\n").filter(e=>""!==e),{results:t}=await(0,v.RW)(this.hass,e,this._language);this._sentencesInput.value="";const a=[];e.forEach((e,r)=>{const i=t[r];a.push({sentence:e,language:this._language,result:i})}),this._results=[...a,...this._results]}async _fetchLanguages(){var e;const{agents:t}=await(0,v.vc)(this.hass),a=t.find(e=>"conversation.home_assistant"===e.id);this.supportedLanguages="*"===(null==a?void 0:a.supported_languages)||null==a?void 0:a.supported_languages,!this._language&&null!==(e=this.supportedLanguages)&&void 0!==e&&e.includes(this.hass.locale.language)?this._language=this.hass.locale.language:this._language||(this._language="en")}firstUpdated(){this._fetchLanguages()}render(){return(0,s.qy)(y||(y=L` <div class="content"> <ha-card .header="${0}" class="form"> <div class="card-content"> <p class="description"> ${0} </p> ${0} <ha-textarea resize="auto" .label="${0}" id="sentences-input" @input="${0}" @keydown="${0}"></ha-textarea> </div> <div class="card-actions"> <ha-button appearance="filled" @click="${0}" .disabled="${0}"> ${0} </ha-button> </div> </ha-card> ${0} ${0} </div> `),this.hass.localize("ui.panel.config.developer-tools.tabs.assist.title"),this.hass.localize("ui.panel.config.developer-tools.tabs.assist.description"),this.supportedLanguages?(0,s.qy)(w||(w=L` <ha-language-picker .languages="${0}" .hass="${0}" .value="${0}" @value-changed="${0}"></ha-language-picker> `),this.supportedLanguages,this.hass,this._language,this._languageChanged):s.s6,this.hass.localize("ui.panel.config.developer-tools.tabs.assist.sentences"),this._textAreaInput,this._handleKeyDown,this._parse,!this._language||!this._validInput,this.hass.localize("ui.panel.config.developer-tools.tabs.assist.parse_sentences"),this._results.length?(0,s.qy)(x||(x=L` <div class="result-toolbar"> <ha-button appearance="filled" @click="${0}" variant="danger"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> <ha-button appearance="filled" @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> </div> `),this._clear,M,this.hass.localize("ui.common.clear"),this._download,E,this.hass.localize("ui.panel.config.developer-tools.tabs.assist.download_results")):"",this._results.map(e=>{const{sentence:t,result:a,language:r}=e,i=null!=a;return(0,s.qy)(k||(k=L` <ha-card class="result"> <div class="card-content"> <div class="sentence"> <p>${0}</p> <p>${0}</p> </div> <div class="info"> ${0}: ${0} (${0}) </div> ${0} </div> </ha-card> `),t,i?"✅":"❌",this.hass.localize("ui.panel.config.developer-tools.tabs.assist.language"),(0,c.T)(r,this.hass.locale),r,a?(0,s.qy)(C||(C=L` <ha-code-editor mode="yaml" .value="${0}" read-only dir="ltr"></ha-code-editor> `),(0,o.dump)(a).trimRight()):(0,s.qy)($||($=L`<ha-alert alert-type="error"> ${0} </ha-alert>`),this.hass.localize("ui.panel.config.developer-tools.tabs.assist.no_match")))}))}_download(){(0,m.R)(`data:text/plain;charset=utf-8,${encodeURIComponent(JSON.stringify({results:this._results},null,2))}`,"intent_results.json")}_clear(){this._results=[]}static get styles(){return[b.RF,(0,s.AH)(S||(S=L`.content{padding:var(--ha-space-7) var(--ha-space-5) var(--ha-space-4);max-width:1040px;margin:0 auto}.card-content{display:flex;flex-direction:column;gap:var(--ha-space-4)}.description{margin:0}ha-textarea{width:100%}.card-actions{text-align:right}.form{margin-bottom:var(--ha-space-4)}.result-toolbar{text-align:center;margin-bottom:var(--ha-space-4)}.result{margin-bottom:var(--ha-space-4)}.sentence{font-weight:var(--ha-font-weight-medium);margin-bottom:var(--ha-space-2);display:flex;flex-direction:row;justify-content:space-between}.sentence p{margin:0}.info p{margin:0}ha-alert,ha-code-editor{display:block;margin-top:var(--ha-space-4)}`))]}constructor(...e){super(...e),this.narrow=!1,this._results=[],this._validInput=!1}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],A.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],A.prototype,"narrow",void 0),(0,i.Cg)([(0,n.wk)()],A.prototype,"supportedLanguages",void 0),(0,i.Cg)([(0,n.wk)(),(0,l.I)({key:"assist_debug_language",state:!0,subscribe:!1,storage:"localStorage"})],A.prototype,"_language",void 0),(0,i.Cg)([(0,n.wk)()],A.prototype,"_results",void 0),(0,i.Cg)([(0,n.P)("#sentences-input")],A.prototype,"_sentencesInput",void 0),(0,i.Cg)([(0,n.wk)()],A.prototype,"_validInput",void 0),A=(0,i.Cg)([(0,n.EM)("developer-tools-assist")],A),r()}catch(y){r(y)}})},85614:function(e,t,a){a.d(t,{i:function(){return r}});a(3362),a(62953);const r=async()=>{await Promise.all([a.e(38085),a.e(22309)]).then(a.bind(a,40772))}},36918:function(e,t,a){a.d(t,{o:function(){return r}});const r=(e,t)=>`https://www.iobroker.net/#${e.language&&e.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},30039:function(e,t,a){a.d(t,{R:function(){return i}});a(62953),a(3296),a(27208),a(48408),a(14603),a(47566),a(98721);var r=a(16869);const i=(e,t="")=>{const a=document.createElement("a");a.target="_blank",a.href=e,a.download=t,a.style.display="none",document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),document.body.removeChild(a),e.startsWith("blob:")&&(r.B?setTimeout(()=>URL.revokeObjectURL(e),1e4):URL.revokeObjectURL(e))}},22348:function(e,t,a){a.d(t,{V:function(){return i}});var r=a(37177);const i=e=>!!e&&r.n},37177:function(e,t,a){a.d(t,{n:function(){return r}});a(27495);const r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},88438:function(e,t,a){a.d(t,{C:function(){return r}});const r="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}}]);