UNPKG

iobroker.lovelace

Version:

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

2 lines 16.1 kB
/*! For license information please see 11432.9f522e7880a62782.js.LICENSE.txt */ "use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[11432],{35370:function(e,t,o){var i=o(26198);e.exports=function(e,t,o){for(var a=0,s=arguments.length>2?o:i(t),n=new e(s);s>a;)n[a]=t[a++];return n}},93900:function(e,t,o){o.a(e,async function(e,t){try{o(3362),o(27495),o(62953);var i=o(5124),a=o(67576),s=o(6412),n=o(63672),r=o(17051),l=o(42462),c=o(28438),d=o(98779),h=o(27259),u=o(25877),p=o(31247),f=o(4444),g=o(92070),v=o(9395),b=o(717),w=o(17060),m=o(88496),y=o(91470),k=e([m,w]);[m,w]=k.then?(await k)():k;let C,_,D,q=e=>e;var $=Object.defineProperty,x=Object.getOwnPropertyDescriptor,A=(e,t,o,i)=>{for(var a,s=i>1?void 0:i?x(t,o):t,n=e.length-1;n>=0;n--)(a=e[n])&&(s=(i?a(t,o,s):a(s))||s);return i&&s&&$(t,o,s),s};let E=class extends b.A{firstUpdated(){this.open&&(this.addOpenListeners(),this.dialog.showModal(),(0,f.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,f.I7)(this),this.removeOpenListeners()}async requestClose(e){const t=new c.L({source:e});if(this.dispatchEvent(t),t.defaultPrevented)return this.open=!0,void(0,h.Ud)(this.dialog,"pulse");this.removeOpenListeners(),await(0,h.Ud)(this.dialog,"hide"),this.open=!1,this.dialog.close(),(0,f.I7)(this);const o=this.originalTrigger;"function"==typeof(null==o?void 0:o.focus)&&setTimeout(()=>o.focus()),this.dispatchEvent(new r.Z)}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),(0,u.AZ)(this)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,u.Fw)(this)}handleDialogCancel(e){e.preventDefault(),!this.dialog.classList.contains("hide")&&e.target===this.dialog&&(0,u.a0)(this)&&this.requestClose(this.dialog)}handleDialogClick(e){const t=e.target.closest('[data-dialog="close"]');t&&(e.stopPropagation(),this.requestClose(t))}async handleDialogPointerDown(e){e.target===this.dialog&&(this.lightDismiss?this.requestClose(this.dialog):await(0,h.Ud)(this.dialog,"pulse"))}handleOpenChange(){this.open&&!this.dialog.open?this.show():!this.open&&this.dialog.open&&(this.open=!0,this.requestClose(this.dialog))}async show(){const e=new d.k;this.dispatchEvent(e),e.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.dialog.showModal(),(0,f.JG)(this),requestAnimationFrame(()=>{const e=this.querySelector("[autofocus]");e&&"function"==typeof e.focus?e.focus():this.dialog.focus()}),await(0,h.Ud)(this.dialog,"show"),this.dispatchEvent(new l.q))}render(){var e;const t=!this.withoutHeader,o=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return(0,i.qy)(C||(C=q` <dialog aria-labelledby="${0}" aria-describedby="${0}" part="dialog" class="${0}" @cancel="${0}" @click="${0}" @pointerdown="${0}"> ${0} <div part="body" class="body"><slot></slot></div> ${0} </dialog> `),null!==(e=this.ariaLabelledby)&&void 0!==e?e:"title",(0,n.J)(this.ariaDescribedby),(0,s.H)({dialog:!0,open:this.open}),this.handleDialogCancel,this.handleDialogClick,this.handleDialogPointerDown,t?(0,i.qy)(_||(_=q` <header part="header" class="header"> <h2 part="title" class="title" id="title"> <slot name="label"> ${0} </slot> </h2> <div part="header-actions" class="header-actions"> <slot name="header-actions"></slot> <wa-button part="close-button" exportparts="base:close-button__base" class="close" appearance="plain" @click="${0}"> <wa-icon name="xmark" label="${0}" library="system" variant="solid"></wa-icon> </wa-button> </div> </header> `),this.label.length>0?this.label:String.fromCharCode(8203),e=>this.requestClose(e.target),this.localize.term("close")):"",o?(0,i.qy)(D||(D=q` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `)):"")}constructor(){super(...arguments),this.localize=new w.c(this),this.hasSlotController=new g.X(this,"footer","header-actions","label"),this.open=!1,this.label="",this.withoutHeader=!1,this.lightDismiss=!1,this.withFooter=!1,this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.open&&(0,u.a0)(this)&&(e.preventDefault(),e.stopPropagation(),this.requestClose(this.dialog))}}};E.css=y.A,A([(0,a.P)(".dialog")],E.prototype,"dialog",2),A([(0,a.MZ)({type:Boolean,reflect:!0})],E.prototype,"open",2),A([(0,a.MZ)({reflect:!0})],E.prototype,"label",2),A([(0,a.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],E.prototype,"withoutHeader",2),A([(0,a.MZ)({attribute:"light-dismiss",type:Boolean})],E.prototype,"lightDismiss",2),A([(0,a.MZ)({attribute:"aria-labelledby"})],E.prototype,"ariaLabelledby",2),A([(0,a.MZ)({attribute:"aria-describedby"})],E.prototype,"ariaDescribedby",2),A([(0,a.MZ)({attribute:"with-footer",type:Boolean})],E.prototype,"withFooter",2),A([(0,v.w)("open",{waitUntilFirstUpdate:!0})],E.prototype,"handleOpenChange",1),E=A([(0,a.EM)("wa-dialog")],E),i.S$||(document.addEventListener("click",e=>{const t=e.target.closest("[data-dialog]");if(t instanceof Element){const[e,o]=(0,p.v)(t.getAttribute("data-dialog")||"");if("open"===e&&null!=o&&o.length){const e=t.getRootNode().getElementById(o);"wa-dialog"===(null==e?void 0:e.localName)?e.open=!0:console.warn(`A dialog with an ID of "${o}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),t()}catch(C){t(C)}})},91470:function(e,t,o){o.d(t,{A:function(){return a}});let i;var a=(0,o(5124).AH)(i||(i=(e=>e)`:host{--width:31rem;--spacing:var(--wa-space-l);--backdrop-filter:none;--show-duration:200ms;--hide-duration:200ms;display:none}:host([open]){display:block}.dialog{display:flex;flex-direction:column;top:0;right:0;bottom:0;left:0;width:var(--width);max-width:calc(100% - var(--wa-space-2xl));max-height:calc(100% - var(--wa-space-2xl));color:inherit;background-color:var(--wa-color-surface-raised);border-radius:var(--wa-panel-border-radius);border:none;box-shadow:var(--wa-shadow-l);padding:0;margin:auto}.dialog.show{animation:show-dialog var(--show-duration) ease}.dialog.show::backdrop{animation:show-backdrop var(--show-duration,200ms) ease}.dialog.hide{animation:show-dialog var(--hide-duration) ease reverse}.dialog.hide::backdrop{animation:show-backdrop var(--hide-duration,200ms) ease reverse}.dialog.pulse{animation:pulse 250ms ease}.dialog:focus{outline:0}@media screen and (max-width:420px){.dialog{max-height:80vh}}.open{display:flex;opacity:1}.header{flex:0 0 auto;display:flex;flex-wrap:nowrap;padding-inline-start:var(--spacing);padding-block-end:0;padding-inline-end:calc(var(--spacing) - var(--wa-form-control-padding-block));padding-block-start:calc(var(--spacing) - var(--wa-form-control-padding-block))}.title{align-self:center;flex:1 1 auto;font-family:inherit;font-size:var(--wa-font-size-l);font-weight:var(--wa-font-weight-heading);line-height:var(--wa-line-height-condensed);margin:0}.header-actions{align-self:start;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:end;gap:var(--wa-space-2xs);padding-inline-start:var(--spacing)}.header-actions ::slotted(wa-button),.header-actions wa-button{flex:0 0 auto;display:flex;align-items:center}.body{flex:1 1 auto;display:block;padding:var(--spacing);overflow:auto;-webkit-overflow-scrolling:touch}.body:focus{outline:0}.body:focus-visible{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}.footer{flex:0 0 auto;display:flex;flex-wrap:wrap;gap:var(--wa-space-xs);justify-content:end;padding:var(--spacing);padding-block-start:0}.footer ::slotted(wa-button:not(:first-of-type)){margin-inline-start:var(--wa-spacing-xs)}.dialog::backdrop{background-color:var(--wa-color-overlay-modal,rgb(0 0 0 / .25));-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter)}@keyframes pulse{0%{scale:1}50%{scale:1.02}100%{scale:1}}@keyframes show-dialog{from{opacity:0;scale:0.8}to{opacity:1;scale:1}}@keyframes show-backdrop{from{opacity:0}to{opacity:1}}@media (forced-colors:active){.dialog{border:solid 1px #fff}}`))},88590:function(e,t,o){o.a(e,async function(e,i){try{o.d(t,{A:function(){return w}});o(62953);var a=o(5124),s=o(67576),n=o(63672),r=o(95010),l=o(717),c=o(17060),d=o(4168),h=e([c]);c=(h.then?(await h)():h)[0];let g,v,b=e=>e;var u=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f=(e,t,o,i)=>{for(var a,s=i>1?void 0:i?p(t,o):t,n=e.length-1;n>=0;n--)(a=e[n])&&(s=(i?a(t,o,s):a(s))||s);return i&&s&&u(t,o,s),s};let w=class extends l.A{updated(e){e.has("value")&&requestAnimationFrame(()=>{this.style.setProperty("--percentage",`${(0,r.q)(this.value,0,100)}%`)})}render(){return(0,a.qy)(g||(g=b` <div part="base" class="progress-bar" role="progressbar" title="${0}" aria-label="${0}" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${0}"> <div part="indicator" class="indicator"> ${0} </div> </div> `),(0,n.J)(this.title),this.label.length>0?this.label:this.localize.term("progress"),this.indeterminate?"0":this.value,this.indeterminate?"":(0,a.qy)(v||(v=b` <slot part="label" class="label"></slot> `)))}constructor(){super(...arguments),this.localize=new c.c(this),this.value=0,this.indeterminate=!1,this.label=""}};w.css=d.A,f([(0,s.MZ)({type:Number,reflect:!0})],w.prototype,"value",2),f([(0,s.MZ)({type:Boolean,reflect:!0})],w.prototype,"indeterminate",2),f([(0,s.MZ)()],w.prototype,"label",2),w=f([(0,s.EM)("wa-progress-bar")],w),i()}catch(g){i(g)}})},4168:function(e,t,o){o.d(t,{A:function(){return a}});let i;var a=(0,o(5124).AH)(i||(i=(e=>e)`:host{--track-height:1rem;--track-color:var(--wa-color-neutral-fill-normal);--indicator-color:var(--wa-color-brand-fill-loud);display:flex}.progress-bar{flex:1 1 auto;display:flex;position:relative;overflow:hidden;height:var(--track-height);border-radius:var(--wa-border-radius-pill);background-color:var(--track-color);color:var(--wa-color-brand-on-loud);font-size:var(--wa-font-size-s)}.indicator{width:var(--percentage);display:flex;align-items:center;justify-content:center;background-color:var(--indicator-color);text-align:center;white-space:nowrap;overflow:hidden;line-height:1;font-weight:var(--wa-font-weight-semibold);transition:all var(--wa-transition-slow, 200ms) var(--wa-transition-easing, ease);user-select:none;-webkit-user-select:none}:host([indeterminate]) .indicator{position:absolute;inset-block:0;inline-size:50%;animation:wa-progress-indeterminate 2.5s infinite cubic-bezier(.37,0,.63,1)}@media (forced-colors:active){.progress-bar{outline:solid 1px SelectedItem;background-color:var(--wa-color-surface-default)}.indicator{outline:solid 1px SelectedItem;background-color:SelectedItem}}@keyframes wa-progress-indeterminate{0%{inset-inline-start:-50%}100%,75%{inset-inline-start:100%}}`))},95010:function(e,t,o){o.d(t,{q:function(){return a},N:function(){return s}});o(54743),o(11745),o(16573),o(78100),o(77936),o(21489),o(48140),o(75044),o(21903),o(91134),o(28845),o(373),o(37467),o(44732),o(79577),o(16632),o(34226),o(9486),o(20456);let i=(e=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&o[e]];return t};function a(e,t,o){const i=e=>Object.is(e,-0)?0:e;return i(e<t?t:e>o?o:e)}function s(e=""){return`${e}${i()}`}},31247:function(e,t,o){o.d(t,{v:function(){return i}});o(18111),o(22489),o(61701),o(42762);function i(e){return e.split(" ").map(e=>e.trim()).filter(e=>""!==e)}},4444:function(e,t,o){o.d(t,{JG:function(){return a},Rt:function(){return n},I7:function(){return s}});o(27495),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(25440),o(62953);const i=new Set;function a(e){if(i.add(e),!document.documentElement.classList.contains("wa-scroll-lock")){const e=function(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}()+function(){const e=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(e)||!e?0:e}();let t=getComputedStyle(document.documentElement).scrollbarGutter;t&&"auto"!==t||(t="stable"),e<2&&(t=""),document.documentElement.style.setProperty("--wa-scroll-lock-gutter",t),document.documentElement.classList.add("wa-scroll-lock"),document.documentElement.style.setProperty("--wa-scroll-lock-size",`${e}px`)}}function s(e){i.delete(e),0===i.size&&(document.documentElement.classList.remove("wa-scroll-lock"),document.documentElement.style.removeProperty("--wa-scroll-lock-size"))}function n(e,t,o="vertical",i="smooth"){const a=function(e,t){return{top:Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top),left:Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}}(e,t),s=a.top+t.scrollTop,n=a.left+t.scrollLeft,r=t.scrollLeft,l=t.scrollLeft+t.offsetWidth,c=t.scrollTop,d=t.scrollTop+t.offsetHeight;"horizontal"!==o&&"both"!==o||(n<r?t.scrollTo({left:n,behavior:i}):n+e.clientWidth>l&&t.scrollTo({left:n-t.offsetWidth+e.clientWidth,behavior:i})),"vertical"!==o&&"both"!==o||(s<c?t.scrollTo({top:s,behavior:i}):s+e.clientHeight>d&&t.scrollTo({top:s-t.offsetHeight+e.clientHeight,behavior:i}))}},88696:function(e,t,o){o.a(e,async function(e,i){try{o.d(t,{P:function(){return l}});var a=o(69235),s=(o(3362),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953),o(37540)),n=o(42017),r=e([a]);a=(r.then?(await r)():r)[0];class l{handleChanges(e){var t;this.value=null===(t=this.callback)||void 0===t?void 0:t.call(this,e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}target(e){return c(this,e)}constructor(e,{target:t,config:o,callback:i,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,null!==t&&this.t.add(null!=t?t:e),this.l=o,this.o=null!=a?a:this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver(e=>{this.handleChanges(e),this.h.requestUpdate()}),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}}const c=(0,n.u$)(class extends s.Kq{render(e,t){}update(e,[t,o]){this.controller=t,this.part=e,this.observe=o,!1===o?(t.unobserve(e.element),this.observing=!1):!1===this.observing&&(t.observe(e.element),this.observing=!0)}disconnected(){var e;null!==(e=this.controller)&&void 0!==e&&e.unobserve(this.part.element),this.observing=!1}reconnected(){var e;!1!==this.observe&&!1===this.observing&&(null!==(e=this.controller)&&void 0!==e&&e.observe(this.part.element),this.observing=!0)}constructor(){super(...arguments),this.observing=!1}});i()}catch(l){i(l)}})},37540:function(e,t,o){o.d(t,{Kq:function(){return h}});o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);var i=o(63937),a=o(42017);const s=(e,t)=>{const o=e._$AN;if(void 0===o)return!1;for(const a of o){var i;null!==(i=a._$AO)&&void 0!==i&&i.call(a,t,!1),s(a,t)}return!0},n=e=>{let t,o;do{var i;if(void 0===(t=e._$AM))break;o=t._$AN,o.delete(e),e=t}while(0===(null===(i=o)||void 0===i?void 0:i.size))},r=e=>{for(let t;t=e._$AM;e=t){let o=t._$AN;if(void 0===o)t._$AN=o=new Set;else if(o.has(e))break;o.add(e),d(t)}};function l(e){void 0!==this._$AN?(n(this),this._$AM=e,r(this)):this._$AM=e}function c(e,t=!1,o=0){const i=this._$AH,a=this._$AN;if(void 0!==a&&0!==a.size)if(t)if(Array.isArray(i))for(let r=o;r<i.length;r++)s(i[r],!1),n(i[r]);else null!=i&&(s(i,!1),n(i));else s(this,e)}const d=e=>{var t,o;e.type==a.OA.CHILD&&(null!==(t=e._$AP)&&void 0!==t||(e._$AP=c),null!==(o=e._$AQ)&&void 0!==o||(e._$AQ=l))};class h extends a.WL{_$AT(e,t,o){super._$AT(e,t,o),r(this),this.isConnected=e._$AU}_$AO(e,t=!0){var o,i;e!==this.isConnected&&(this.isConnected=e,e?null===(o=this.reconnected)||void 0===o||o.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),t&&(s(this,e),n(this))}setValue(e){if((0,i.Rt)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}constructor(){super(...arguments),this._$AN=void 0}}}}]);