iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 14 kB
JavaScript
/*! For license information please see 27964.cad1fd04ec403334.js.LICENSE.txt */
export const __rspack_esm_id=27964;export const __rspack_esm_ids=[27964];export const __webpack_modules__={67932(e,t,a){a.d(t,{S:()=>i});const r={en:"US",hi:"IN",deva:"IN",te:"IN",mr:"IN",ta:"IN",gu:"IN",kn:"IN",or:"IN",ml:"IN",pa:"IN",bho:"IN",awa:"IN",as:"IN",mwr:"IN",mai:"IN",mag:"IN",bgc:"IN",hne:"IN",dcc:"IN",bn:"BD",beng:"BD",rkt:"BD",dz:"BT",tibt:"BT",tn:"BW",am:"ET",ethi:"ET",om:"ET",quc:"GT",id:"ID",jv:"ID",su:"ID",mad:"ID",ms_arab:"ID",he:"IL",hebr:"IL",jam:"JM",ja:"JP",jpan:"JP",km:"KH",khmr:"KH",ko:"KR",kore:"KR",lo:"LA",laoo:"LA",mh:"MH",my:"MM",mymr:"MM",mt:"MT",ne:"NP",fil:"PH",ceb:"PH",ilo:"PH",ur:"PK",pa_arab:"PK",lah:"PK",ps:"PK",sd:"PK",skr:"PK",gn:"PY",th:"TH",thai:"TH",tts:"TH",zh_hant:"TW",hant:"TW",sm:"WS",zu:"ZA",sn:"ZW",arq:"DZ",ar:"EG",arab:"EG",arz:"EG",fa:"IR",az_arab:"IR",dv:"MV",thaa:"MV"};const o={AG:0,ATG:0,28:0,AS:0,ASM:0,16:0,BD:0,BGD:0,50:0,BR:0,BRA:0,76:0,BS:0,BHS:0,44:0,BT:0,BTN:0,64:0,BW:0,BWA:0,72:0,BZ:0,BLZ:0,84:0,CA:0,CAN:0,124:0,CO:0,COL:0,170:0,DM:0,DMA:0,212:0,DO:0,DOM:0,214:0,ET:0,ETH:0,231:0,GT:0,GTM:0,320:0,GU:0,GUM:0,316:0,HK:0,HKG:0,344:0,HN:0,HND:0,340:0,ID:0,IDN:0,360:0,IL:0,ISR:0,376:0,IN:0,IND:0,356:0,JM:0,JAM:0,388:0,JP:0,JPN:0,392:0,KE:0,KEN:0,404:0,KH:0,KHM:0,116:0,KR:0,KOR:0,410:0,LA:0,LA0:0,418:0,MH:0,MHL:0,584:0,MM:0,MMR:0,104:0,MO:0,MAC:0,446:0,MT:0,MLT:0,470:0,MX:0,MEX:0,484:0,MZ:0,MOZ:0,508:0,NI:0,NIC:0,558:0,NP:0,NPL:0,524:0,PA:0,PAN:0,591:0,PE:0,PER:0,604:0,PH:0,PHL:0,608:0,PK:0,PAK:0,586:0,PR:0,PRI:0,630:0,PT:0,PRT:0,620:0,PY:0,PRY:0,600:0,SA:0,SAU:0,682:0,SG:0,SGP:0,702:0,SV:0,SLV:0,222:0,TH:0,THA:0,764:0,TT:0,TTO:0,780:0,TW:0,TWN:0,158:0,UM:0,UMI:0,581:0,US:0,USA:0,840:0,VE:0,VEN:0,862:0,VI:0,VIR:0,850:0,WS:0,WSM:0,882:0,YE:0,YEM:0,887:0,ZA:0,ZAF:0,710:0,ZW:0,ZWE:0,716:0,AE:6,ARE:6,784:6,AF:6,AFG:6,4:6,BH:6,BHR:6,48:6,DJ:6,DJI:6,262:6,DZ:6,DZA:6,12:6,EG:6,EGY:6,818:6,IQ:6,IRQ:6,368:6,IR:6,IRN:6,364:6,JO:6,JOR:6,400:6,KW:6,KWT:6,414:6,LY:6,LBY:6,434:6,OM:6,OMN:6,512:6,QA:6,QAT:6,634:6,SD:6,SDN:6,729:6,SY:6,SYR:6,760:6,MV:5,MDV:5,462:5};function i(e){return function(e,t,a){if(e){var r,o=e.toLowerCase().split(/[-_]/),i=o[0],n=i;if(o[1]&&4===o[1].length?(n+="_"+o[1],r=o[2]):r=o[1],r||(r=t[n]||t[i]),r)return function(e,t){var a=t["string"==typeof e?e.toUpperCase():e];return"number"==typeof a?a:1}(r.match(/^\d+$/)?Number(r):r,a)}return 1}(e,r,o)}},65213(e,t,a){var r=a(44576),o=a(79039),i=r.RegExp,n=!o(function(){var e=!0;try{i(".","d")}catch(t){e=!1}var t={},a="",r=e?"dgimsy":"gimsy",o=function(e,r){Object.defineProperty(t,e,{get:function(){return a+=r,!0}})},n={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(n.hasIndices="d"),n)o(s,n[s]);return Object.getOwnPropertyDescriptor(i.prototype,"flags").get.call(t)!==r||a!==r});e.exports={correct:n}},67979(e,t,a){var r=a(28551);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},69479(e,t,a){var r=a(43724),o=a(62106),i=a(65213),n=a(67979);r&&!i.correct&&(o(RegExp.prototype,"flags",{configurable:!0,get:n}),i.correct=!0)},1126(e,t,a){a.a(e,async function(e,t){try{var r=a(5124),o=a(22441),i=a(6412),n=a(63672),s=a(17051),d=a(42462),l=a(28438),c=a(98779),h=a(27259),p=a(25877),w=a(31247),u=a(4444),m=a(92070),f=a(9395),g=a(717),b=a(17060),v=a(88496),y=a(57024),M=e([v,b]);[v,b]=M.then?(await M)():M;var D=Object.defineProperty,k=Object.getOwnPropertyDescriptor,I=(e,t,a,r)=>{for(var o,i=r>1?void 0:r?k(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&&D(t,a,i),i};let N=class extends g.A{firstUpdated(){r.S$||this.open&&(this.addOpenListeners(),this.drawer.showModal(),(0,u.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,u.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,h.Ud)(this.drawer,"pulse");this.removeOpenListeners(),await(0,h.Ud)(this.drawer,"hide"),this.open=!1,this.drawer.close(),(0,u.I7)(this);const a=this.originalTrigger;"function"==typeof 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,h.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 c.k;this.dispatchEvent(e),e.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.drawer.showModal(),(0,u.JG)(this),requestAnimationFrame(()=>{const e=this.querySelector("[autofocus]");e&&"function"==typeof e.focus?e.focus():this.drawer.focus()}),await(0,h.Ud)(this.drawer,"show"),this.dispatchEvent(new d.q))}render(){const e=!this.withoutHeader,t=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return r.qy` <dialog aria-labelledby="${this.ariaLabelledby??"title"}" aria-describedby="${(0,n.J)(this.ariaDescribedby)}" part="dialog" class="${(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}"> ${e?r.qy` <header part="header" class="header"> <h2 part="title" class="title" id="title"> <slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(8203)} </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" ="${e=>this.requestClose(e.target)}"> <wa-icon name="xmark" label="${this.localize.term("close")}" library="system" variant="solid"></wa-icon> </wa-button> </div> </header> `:""} <div part="body" class="body"><slot></slot></div> ${t?r.qy` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `:""} </dialog> `}constructor(){super(...arguments),this.localize=new b.c(this),this.hasSlotController=new m.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))}}};N.css=y.A,I([(0,o.P)(".drawer")],N.prototype,"drawer",2),I([(0,o.MZ)({type:Boolean,reflect:!0})],N.prototype,"open",2),I([(0,o.MZ)({reflect:!0})],N.prototype,"label",2),I([(0,o.MZ)({reflect:!0})],N.prototype,"placement",2),I([(0,o.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],N.prototype,"withoutHeader",2),I([(0,o.MZ)({attribute:"light-dismiss",type:Boolean})],N.prototype,"lightDismiss",2),I([(0,o.MZ)({attribute:"aria-labelledby"})],N.prototype,"ariaLabelledby",2),I([(0,o.MZ)({attribute:"aria-describedby"})],N.prototype,"ariaDescribedby",2),I([(0,o.MZ)({attribute:"with-footer",type:Boolean})],N.prototype,"withFooter",2),I([(0,f.w)("open",{waitUntilFirstUpdate:!0})],N.prototype,"handleOpenChange",1),N=I([(0,o.EM)("wa-drawer")],N),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&&a?.length){const e=t.getRootNode().getElementById(a);"wa-drawer"===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(e){t(e)}})},57024(e,t,a){a.d(t,{A:()=>r});var r=a(5124).AH`: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}}`},2045(e,t,a){a.d(t,{q:()=>o});let r={};function o(){return r}},6439(e,t,a){function r(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return 0===a?0:a}}a.d(t,{u:()=>r})},74816(e,t,a){a.d(t,{x:()=>o});a(18111),a(20116),a(61701);var r=a(73420);function o(e,...t){const a=r.w.bind(null,e||t.find(e=>"object"==typeof e));return t.map(a)}},465(e,t,a){a.d(t,{m:()=>d});var r=a(83504);function o(e){const t=(0,r.a)(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}var i=a(74816),n=a(9160),s=a(35932);function d(e,t,a){const[r,d]=(0,i.x)(a?.in,e,t),l=(0,s.o)(r),c=(0,s.o)(d),h=+l-o(l),p=+c-o(c);return Math.round((h-p)/n.w4)}},6946(e,t,a){a.d(t,{c:()=>i});var r=a(74816),o=a(465);function i(e,t,a){const[i,s]=(0,r.x)(a?.in,e,t),d=n(i,s),l=Math.abs((0,o.m)(i,s));i.setDate(i.getDate()-d*l);const c=d*(l-Number(n(i,s)===-d));return 0===c?0:c}function n(e,t){const a=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return a<0?-1:a>0?1:a}},38684(e,t,a){a.d(t,{I:()=>i});var r=a(6439),o=a(6946);function i(e,t,a){const i=(0,o.c)(e,t,a)/7;return(0,r.u)(a?.roundingMethod)(i)}},35932(e,t,a){a.d(t,{o:()=>o});var r=a(83504);function o(e,t){const a=(0,r.a)(e,t?.in);return a.setHours(0,0,0,0),a}},52640(e,t,a){a.d(t,{k:()=>i});var r=a(2045),o=a(83504);function i(e,t){const a=(0,r.q)(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,n=(0,o.a)(e,t?.in),s=n.getDay(),d=(s<i?7:0)+s-i;return n.setDate(n.getDate()-d),n.setHours(0,0,0,0),n}}};