UNPKG

iobroker.lovelace

Version:

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

2 lines 16.5 kB
/*! For license information please see 54025.fddc5bf31f86a3ee.js.LICENSE.txt */ "use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[54025],{48646:function(t,e,i){var n=i(69565),o=i(28551),a=i(1767),s=i(50851);t.exports=function(t,e){e&&"string"==typeof t||o(t);var i=s(t);return a(o(void 0!==i?n(i,t):t))}},78350:function(t,e,i){var n=i(46518),o=i(70259),a=i(79306),s=i(48981),r=i(26198),l=i(1469);n({target:"Array",proto:!0},{flatMap:function(t){var e,i=s(this),n=r(i);return a(t),e=l(i,0),o(e,i,i,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},30237:function(t,e,i){i(6469)("flatMap")},30531:function(t,e,i){var n=i(46518),o=i(69565),a=i(79306),s=i(28551),r=i(1767),l=i(48646),c=i(19462),d=i(9539),h=i(96395),u=i(30684),p=i(84549);var f=!h&&!u("flatMap",function(){}),g=!h&&!f&&p("flatMap",TypeError),v=h||f||g||function(){try{var t=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(t){return t});t.next(),t.return()}catch(e){return!0}}(),b=c(function(){for(var t,e,i=this.iterator,n=this.mapper;;){if(e=this.inner)try{if(!(t=s(o(e.next,e.iterator))).done)return t.value;this.inner=null}catch(a){d(i,"throw",a)}if(t=s(o(this.next,i)),this.done=!!t.done)return;try{this.inner=l(n(t.value,this.counter++),!1)}catch(a){d(i,"throw",a)}}});n({target:"Iterator",proto:!0,real:!0,forced:v},{flatMap:function(t){s(this);try{a(t)}catch(e){d(this,"throw",e)}return g?o(g,this,t):new b(r(this),{mapper:t,inner:null})}})},93900:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(27495),i(62953);var n=i(5124),o=i(67576),a=i(6412),s=i(63672),r=i(17051),l=i(42462),c=i(28438),d=i(98779),h=i(27259),u=i(25877),p=i(31247),f=i(4444),g=i(92070),v=i(9395),b=i(717),w=i(17060),y=i(88496),m=i(91470),k=t([y,w]);[y,w]=k.then?(await k)():k;let E,x,_,M=t=>t;var A=Object.defineProperty,C=Object.getOwnPropertyDescriptor,$=(t,e,i,n)=>{for(var o,a=n>1?void 0:n?C(e,i):e,s=t.length-1;s>=0;s--)(o=t[s])&&(a=(n?o(e,i,a):o(a))||a);return n&&a&&A(e,i,a),a};let L=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(t){const e=new c.L({source:t});if(this.dispatchEvent(e),e.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 i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout(()=>i.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(t){t.preventDefault(),!this.dialog.classList.contains("hide")&&t.target===this.dialog&&(0,u.a0)(this)&&this.requestClose(this.dialog)}handleDialogClick(t){const e=t.target.closest('[data-dialog="close"]');e&&(t.stopPropagation(),this.requestClose(e))}async handleDialogPointerDown(t){t.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 t=new d.k;this.dispatchEvent(t),t.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.dialog.showModal(),(0,f.JG)(this),requestAnimationFrame(()=>{const t=this.querySelector("[autofocus]");t&&"function"==typeof t.focus?t.focus():this.dialog.focus()}),await(0,h.Ud)(this.dialog,"show"),this.dispatchEvent(new l.q))}render(){var t;const e=!this.withoutHeader,i=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return(0,n.qy)(E||(E=M` <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!==(t=this.ariaLabelledby)&&void 0!==t?t:"title",(0,s.J)(this.ariaDescribedby),(0,a.H)({dialog:!0,open:this.open}),this.handleDialogCancel,this.handleDialogClick,this.handleDialogPointerDown,e?(0,n.qy)(x||(x=M` <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),t=>this.requestClose(t.target),this.localize.term("close")):"",i?(0,n.qy)(_||(_=M` <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=t=>{"Escape"===t.key&&this.open&&(0,u.a0)(this)&&(t.preventDefault(),t.stopPropagation(),this.requestClose(this.dialog))}}};L.css=m.A,$([(0,o.P)(".dialog")],L.prototype,"dialog",2),$([(0,o.MZ)({type:Boolean,reflect:!0})],L.prototype,"open",2),$([(0,o.MZ)({reflect:!0})],L.prototype,"label",2),$([(0,o.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],L.prototype,"withoutHeader",2),$([(0,o.MZ)({attribute:"light-dismiss",type:Boolean})],L.prototype,"lightDismiss",2),$([(0,o.MZ)({attribute:"aria-labelledby"})],L.prototype,"ariaLabelledby",2),$([(0,o.MZ)({attribute:"aria-describedby"})],L.prototype,"ariaDescribedby",2),$([(0,o.MZ)({attribute:"with-footer",type:Boolean})],L.prototype,"withFooter",2),$([(0,v.w)("open",{waitUntilFirstUpdate:!0})],L.prototype,"handleOpenChange",1),L=$([(0,o.EM)("wa-dialog")],L),n.S$||(document.addEventListener("click",t=>{const e=t.target.closest("[data-dialog]");if(e instanceof Element){const[t,i]=(0,p.v)(e.getAttribute("data-dialog")||"");if("open"===t&&null!=i&&i.length){const t=e.getRootNode().getElementById(i);"wa-dialog"===(null==t?void 0:t.localName)?t.open=!0:console.warn(`A dialog with an ID of "${i}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),e()}catch(E){e(E)}})},91470:function(t,e,i){i.d(e,{A:function(){return o}});let n;var o=(0,i(5124).AH)(n||(n=(t=>t)`: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}}`))},88696:function(t,e,i){i.a(t,async function(t,n){try{i.d(e,{P:function(){return l}});var o=i(69235),a=(i(3362),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953),i(37540)),s=i(42017),r=t([o]);o=(r.then?(await r)():r)[0];class l{handleChanges(t){var e;this.value=null===(e=this.callback)||void 0===e?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}target(t){return c(this,t)}constructor(t,{target:e,config:i,callback:n,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(null!=e?e:t),this.l=i,this.o=null!=o?o:this.o,this.callback=n,window.ResizeObserver?(this.u=new ResizeObserver(t=>{this.handleChanges(t),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}}const c=(0,s.u$)(class extends a.Kq{render(t,e){}update(t,[e,i]){this.controller=e,this.part=t,this.observe=i,!1===i?(e.unobserve(t.element),this.observing=!1):!1===this.observing&&(e.observe(t.element),this.observing=!0)}disconnected(){var t;null!==(t=this.controller)&&void 0!==t&&t.unobserve(this.part.element),this.observing=!1}reconnected(){var t;!1!==this.observe&&!1===this.observing&&(null!==(t=this.controller)&&void 0!==t&&t.observe(this.part.element),this.observing=!0)}constructor(){super(...arguments),this.observing=!1}});n()}catch(l){n(l)}})},2209:function(t,e,i){i.d(e,{LV:function(){return u}});i(89463),i(16280),i(72712),i(55081),i(18111),i(61701),i(18237),i(45367),i(92731),i(3362),i(84864),i(57465),i(27495),i(88454),i(29452),i(62953);const n=Symbol("Comlink.proxy"),o=Symbol("Comlink.endpoint"),a=Symbol("Comlink.releaseProxy"),s=Symbol("Comlink.finalizer"),r=Symbol("Comlink.thrown"),l=t=>"object"==typeof t&&null!==t||"function"==typeof t,c=new Map([["proxy",{canHandle:t=>l(t)&&t[n],serialize(t){const{port1:e,port2:i}=new MessageChannel;return d(t,e),[i,[i]]},deserialize(t){return t.start(),u(t)}}],["throw",{canHandle:t=>l(t)&&r in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function d(t,e=globalThis,i=["*"]){e.addEventListener("message",function o(a){if(!a||!a.data)return;if(!function(t,e){for(const i of t){if(e===i||"*"===i)return!0;if(i instanceof RegExp&&i.test(e))return!0}return!1}(i,a.origin))return void console.warn(`Invalid origin '${a.origin}' for comlink proxy`);const{id:l,type:c,path:u}=Object.assign({path:[]},a.data),p=(a.data.argumentList||[]).map(k);let f;try{const e=u.slice(0,-1).reduce((t,e)=>t[e],t),i=u.reduce((t,e)=>t[e],t);switch(c){case"GET":f=i;break;case"SET":e[u.slice(-1)[0]]=k(a.data.value),f=!0;break;case"APPLY":f=i.apply(e,p);break;case"CONSTRUCT":f=function(t){return Object.assign(t,{[n]:!0})}(new i(...p));break;case"ENDPOINT":{const{port1:e,port2:i}=new MessageChannel;d(t,i),f=function(t,e){return y.set(t,e),t}(e,[e])}break;case"RELEASE":f=void 0;break;default:return}}catch(g){f={value:g,[r]:0}}Promise.resolve(f).catch(t=>({value:t,[r]:0})).then(i=>{const[n,a]=m(i);e.postMessage(Object.assign(Object.assign({},n),{id:l}),a),"RELEASE"===c&&(e.removeEventListener("message",o),h(e),s in t&&"function"==typeof t[s]&&t[s]())}).catch(t=>{const[i,n]=m({value:new TypeError("Unserializable return value"),[r]:0});e.postMessage(Object.assign(Object.assign({},i),{id:l}),n)})}),e.start&&e.start()}function h(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function u(t,e){const i=new Map;return t.addEventListener("message",function(t){const{data:e}=t;if(!e||!e.id)return;const n=i.get(e.id);if(n)try{n(e)}finally{i.delete(e.id)}}),b(t,i,[],e)}function p(t){if(t)throw new Error("Proxy has been released and is not useable")}function f(t){return A(t,new Map,{type:"RELEASE"}).then(()=>{h(t)})}const g=new WeakMap,v="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(g.get(t)||0)-1;g.set(t,e),0===e&&f(t)});function b(t,e,i=[],n=function(){}){let s=!1;const r=new Proxy(n,{get(n,o){if(p(s),o===a)return()=>{!function(t){v&&v.unregister(t)}(r),f(t),e.clear(),s=!0};if("then"===o){if(0===i.length)return{then:()=>r};const n=A(t,e,{type:"GET",path:i.map(t=>t.toString())}).then(k);return n.then.bind(n)}return b(t,e,[...i,o])},set(n,o,a){p(s);const[r,l]=m(a);return A(t,e,{type:"SET",path:[...i,o].map(t=>t.toString()),value:r},l).then(k)},apply(n,a,r){p(s);const l=i[i.length-1];if(l===o)return A(t,e,{type:"ENDPOINT"}).then(k);if("bind"===l)return b(t,e,i.slice(0,-1));const[c,d]=w(r);return A(t,e,{type:"APPLY",path:i.map(t=>t.toString()),argumentList:c},d).then(k)},construct(n,o){p(s);const[a,r]=w(o);return A(t,e,{type:"CONSTRUCT",path:i.map(t=>t.toString()),argumentList:a},r).then(k)}});return function(t,e){const i=(g.get(e)||0)+1;g.set(e,i),v&&v.register(t,e,t)}(r,t),r}function w(t){const e=t.map(m);return[e.map(t=>t[0]),(i=e.map(t=>t[1]),Array.prototype.concat.apply([],i))];var i}const y=new WeakMap;function m(t){for(const[e,i]of c)if(i.canHandle(t)){const[n,o]=i.serialize(t);return[{type:"HANDLER",name:e,value:n},o]}return[{type:"RAW",value:t},y.get(t)||[]]}function k(t){switch(t.type){case"HANDLER":return c.get(t.name).deserialize(t.value);case"RAW":return t.value}}function A(t,e,i,n){return new Promise(o=>{const a=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");e.set(a,o),t.start&&t.start(),t.postMessage(Object.assign({id:a},i),n)})}},37540:function(t,e,i){i.d(e,{Kq:function(){return h}});i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var n=i(63937),o=i(42017);const a=(t,e)=>{const i=t._$AN;if(void 0===i)return!1;for(const o of i){var n;null!==(n=o._$AO)&&void 0!==n&&n.call(o,e,!1),a(o,e)}return!0},s=t=>{let e,i;do{var n;if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null===(n=i)||void 0===n?void 0:n.size))},r=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),d(e)}};function l(t){void 0!==this._$AN?(s(this),this._$AM=t,r(this)):this._$AM=t}function c(t,e=!1,i=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(n))for(let r=i;r<n.length;r++)a(n[r],!1),s(n[r]);else null!=n&&(a(n,!1),s(n));else a(this,t)}const d=t=>{var e,i;t.type==o.OA.CHILD&&(null!==(e=t._$AP)&&void 0!==e||(t._$AP=c),null!==(i=t._$AQ)&&void 0!==i||(t._$AQ=l))};class h extends o.WL{_$AT(t,e,i){super._$AT(t,e,i),r(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(a(this,t),s(this))}setValue(t){if((0,n.Rt)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}constructor(){super(...arguments),this._$AN=void 0}}},54495:function(t,e,i){i.d(e,{OA:function(){return n.OA},WL:function(){return n.WL},u$:function(){return n.u$}});var n=i(42017)}}]);