iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 11.7 kB
JavaScript
/*! For license information please see 45981.bc4b8a790ec09d14.js.LICENSE.txt */
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[45981],{48646:function(e,t,a){var r=a(69565),o=a(28551),i=a(1767),n=a(50851);e.exports=function(e,t){t&&"string"==typeof e||o(e);var a=n(e);return i(o(void 0!==a?r(a,e):e))}},78350:function(e,t,a){var r=a(46518),o=a(70259),i=a(79306),n=a(48981),s=a(26198),d=a(1469);r({target:"Array",proto:!0},{flatMap:function(e){var t,a=n(this),r=s(a);return i(e),t=d(a,0),o(t,a,a,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},18863:function(e,t,a){var r=a(46518),o=a(80926).right,i=a(34598),n=a(39519);r({target:"Array",proto:!0,forced:!a(16193)&&n>79&&n<83||!i("reduceRight")},{reduceRight:function(e){return o(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},30237:function(e,t,a){a(6469)("flatMap")},30531:function(e,t,a){var r=a(46518),o=a(69565),i=a(79306),n=a(28551),s=a(1767),d=a(48646),l=a(19462),h=a(9539),c=a(96395),p=a(30684),w=a(84549);var f=!c&&!p("flatMap",function(){}),u=!c&&!f&&w("flatMap",TypeError),m=c||f||u||function(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next(),e.return()}catch(t){return!0}}(),v=l(function(){for(var e,t,a=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=n(o(t.next,t.iterator))).done)return e.value;this.inner=null}catch(i){h(a,"throw",i)}if(e=n(o(this.next,a)),this.done=!!e.done)return;try{this.inner=d(r(e.value,this.counter++),!1)}catch(i){h(a,"throw",i)}}});r({target:"Iterator",proto:!0,real:!0,forced:m},{flatMap:function(e){n(this);try{i(e)}catch(t){h(this,"throw",t)}return u?o(u,this,e):new v(s(this),{mapper:e,inner:null})}})},13611:function(e,t,a){var r=a(46518),o=a(44576),i=a(62106),n=a(43724),s=TypeError,d=Object.defineProperty,l=o.self!==o;try{if(n){var h=Object.getOwnPropertyDescriptor(o,"self");!l&&h&&h.get&&h.enumerable||i(o,"self",{get:function(){return o},set:function(e){if(this!==o)throw new s("Illegal invocation");d(o,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else r({global:!0,simple:!0,forced:l},{self:o})}catch(c){}},31886:function(e,t,a){a.a(e,async function(e,r){try{a.d(t,{BB:function(){return o.B}});a(38744);var o=a(88775),i=a(49232),n=a(78713),s=a(53834),d=a(35204),l=a(5806),h=e([o,i,n,s,d,l]);[o,i,n,s,d,l]=h.then?(await h)():h,r()}catch(c){r(c)}})},1126:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(27495),a(62953);var r=a(5124),o=a(67576),i=a(6412),n=a(63672),s=a(17051),d=a(42462),l=a(28438),h=a(98779),c=a(27259),p=a(25877),w=a(31247),f=a(4444),u=a(92070),m=a(9395),v=a(717),g=a(17060),b=a(88496),y=a(57024),k=e([b,g]);[b,g]=k.then?(await k)():k;let M,E,L,O=e=>e;var x=Object.defineProperty,D=Object.getOwnPropertyDescriptor,C=(e,t,a,r)=>{for(var o,i=r>1?void 0:r?D(t,a):t,n=e.length-1;n>=0;n--)(o=e[n])&&(i=(r?o(t,a,i):o(i))||i);return r&&i&&x(t,a,i),i};let $=class extends v.A{firstUpdated(){r.S$||this.open&&(this.addOpenListeners(),this.drawer.showModal(),(0,f.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,f.I7)(this),this.removeOpenListeners()}async requestClose(e){const t=new l.L({source:e});if(this.dispatchEvent(t),t.defaultPrevented)return this.open=!0,void(0,c.Ud)(this.drawer,"pulse");this.removeOpenListeners(),await(0,c.Ud)(this.drawer,"hide"),this.open=!1,this.drawer.close(),(0,f.I7)(this);const a=this.originalTrigger;"function"==typeof(null==a?void 0:a.focus)&&setTimeout(()=>a.focus()),this.dispatchEvent(new s.Z)}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),(0,p.AZ)(this)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,p.Fw)(this)}handleDialogCancel(e){e.preventDefault(),!this.drawer.classList.contains("hide")&&e.target===this.drawer&&(0,p.a0)(this)&&this.requestClose(this.drawer)}handleDialogClick(e){const t=e.target.closest('[data-drawer="close"]');t&&(e.stopPropagation(),this.requestClose(t))}async handleDialogPointerDown(e){e.target===this.drawer&&(this.lightDismiss?this.requestClose(this.drawer):await(0,c.Ud)(this.drawer,"pulse"))}handleOpenChange(){this.open&&!this.drawer.open?this.show():this.drawer.open&&(this.open=!0,this.requestClose(this.drawer))}async show(){const e=new h.k;this.dispatchEvent(e),e.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.drawer.showModal(),(0,f.JG)(this),requestAnimationFrame(()=>{const e=this.querySelector("[autofocus]");e&&"function"==typeof e.focus?e.focus():this.drawer.focus()}),await(0,c.Ud)(this.drawer,"show"),this.dispatchEvent(new d.q))}render(){var e;const t=!this.withoutHeader,a=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return(0,r.qy)(M||(M=O` <dialog aria-labelledby="${0}" aria-describedby="${0}" part="dialog" class="${0}" ="${0}" ="${0}" ="${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,i.H)({drawer:!0,open:this.open,top:"top"===this.placement,end:"end"===this.placement,bottom:"bottom"===this.placement,start:"start"===this.placement}),this.handleDialogCancel,this.handleDialogClick,this.handleDialogPointerDown,t?(0,r.qy)(E||(E=O` <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" ="${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")):"",a?(0,r.qy)(L||(L=O` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `)):"")}constructor(){super(...arguments),this.localize=new g.c(this),this.hasSlotController=new u.X(this,"footer","header-actions","label"),this.open=!1,this.label="",this.placement="end",this.withoutHeader=!1,this.lightDismiss=!0,this.withFooter=!1,this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.open&&(0,p.a0)(this)&&(e.preventDefault(),e.stopPropagation(),this.requestClose(this.drawer))}}};$.css=y.A,C([(0,o.P)(".drawer")],$.prototype,"drawer",2),C([(0,o.MZ)({type:Boolean,reflect:!0})],$.prototype,"open",2),C([(0,o.MZ)({reflect:!0})],$.prototype,"label",2),C([(0,o.MZ)({reflect:!0})],$.prototype,"placement",2),C([(0,o.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],$.prototype,"withoutHeader",2),C([(0,o.MZ)({attribute:"light-dismiss",type:Boolean})],$.prototype,"lightDismiss",2),C([(0,o.MZ)({attribute:"aria-labelledby"})],$.prototype,"ariaLabelledby",2),C([(0,o.MZ)({attribute:"aria-describedby"})],$.prototype,"ariaDescribedby",2),C([(0,o.MZ)({attribute:"with-footer",type:Boolean})],$.prototype,"withFooter",2),C([(0,m.w)("open",{waitUntilFirstUpdate:!0})],$.prototype,"handleOpenChange",1),$=C([(0,o.EM)("wa-drawer")],$),r.S$||(document.addEventListener("click",e=>{const t=e.target.closest("[data-drawer]");if(t instanceof Element){const[e,a]=(0,w.v)(t.getAttribute("data-drawer")||"");if("open"===e&&null!=a&&a.length){const e=t.getRootNode().getElementById(a);"wa-drawer"===(null==e?void 0:e.localName)?e.open=!0:console.warn(`A drawer with an ID of "${a}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),t()}catch(M){t(M)}})},57024:function(e,t,a){a.d(t,{A:function(){return o}});let r;var o=(0,a(5124).AH)(r||(r=(e=>e)`:host{--size:25rem;--spacing:var(--wa-space-l);--backdrop-filter:none;--show-duration:200ms;--hide-duration:200ms;display:none}:host([open]){display:block}.drawer{display:flex;flex-direction:column;top:0;inset-inline-start:0;width:100%;height:100%;max-width:100%;max-height:100%;overflow:hidden;color:inherit;background-color:var(--wa-color-surface-raised);border:none;box-shadow:var(--wa-shadow-l);overflow:auto;padding:0;margin:0;animation-duration:var(--show-duration);animation-timing-function:ease}.drawer.show::backdrop{animation:show-backdrop var(--show-duration,200ms) ease}.drawer.hide::backdrop{animation:show-backdrop var(--hide-duration,200ms) ease reverse}.drawer.show.top{animation:show-drawer-from-top var(--show-duration) ease}.drawer.hide.top{animation:show-drawer-from-top var(--hide-duration) ease reverse}.drawer.show.end{animation:show-drawer-from-end var(--show-duration) ease}.drawer.show.end:dir(rtl){animation-name:show-drawer-from-start}.drawer.hide.end{animation:show-drawer-from-end var(--hide-duration) ease reverse}.drawer.hide.end:dir(rtl){animation-name:show-drawer-from-start}.drawer.show.bottom{animation:show-drawer-from-bottom var(--show-duration) ease}.drawer.hide.bottom{animation:show-drawer-from-bottom var(--hide-duration) ease reverse}.drawer.show.start{animation:show-drawer-from-start var(--show-duration) ease}.drawer.show.start:dir(rtl){animation-name:show-drawer-from-end}.drawer.hide.start{animation:show-drawer-from-start var(--hide-duration) ease reverse}.drawer.hide.start:dir(rtl){animation-name:show-drawer-from-end}.drawer.pulse{animation:pulse 250ms ease}.drawer:focus{outline:0}.top{top:0;inset-inline-end:auto;bottom:auto;inset-inline-start:0;width:100%;height:var(--size)}.end{top:0;inset-inline-end:0;bottom:auto;inset-inline-start:auto;width:var(--size);height:100%}.bottom{top:auto;inset-inline-end:auto;bottom:0;inset-inline-start:0;width:100%;height:var(--size)}.start{top:0;inset-inline-end:auto;bottom:auto;inset-inline-start:0;width:var(--size);height:100%}.header{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: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{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(:last-of-type)){margin-inline-end:var(--wa-spacing-xs)}.drawer::backdrop{background-color:var(--wa-color-overlay-modal,rgb(0 0 0 / .25));-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter)} pulse{0%{scale:1}50%{scale:1.01}100%{scale:1}} show-drawer{from{opacity:0;scale:0.8}to{opacity:1;scale:1}} show-drawer-from-top{from{opacity:0;translate:0 -100%}to{opacity:1;translate:0 0}} show-drawer-from-end{from{opacity:0;translate:100%}to{opacity:1;translate:0 0}} show-drawer-from-bottom{from{opacity:0;translate:0 100%}to{opacity:1;translate:0 0}} show-drawer-from-start{from{opacity:0;translate:-100% 0}to{opacity:1;translate:0 0}} show-backdrop{from{opacity:0}to{opacity:1}} (forced-colors:active){.drawer{border:solid 1px #fff}}`))}}]);