UNPKG

iobroker.lovelace

Version:

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

3 lines 16.6 kB
/*! For license information please see 26372.bd3534cac9bfc335.js.LICENSE.txt */ export const __webpack_ids__=["26372"];export const __webpack_modules__={93958:function(t,e,n){n.d(e,{F:()=>h});var s=n(9065),i=n(15093),a=n(92444),r=n(76688);let o=class extends a.A{};o.styles=[r.W],o=(0,s.__decorate)([(0,i.Mo)("mwc-checkbox")],o);var l=n(57243),d=n(35359),c=n(65703);class h extends c.K{constructor(){super(...arguments),this.left=!1,this.graphic="control"}render(){const t={"mdc-deprecated-list-item__graphic":this.left,"mdc-deprecated-list-item__meta":!this.left},e=this.renderText(),n=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():l.dy``,s=this.hasMeta&&this.left?this.renderMeta():l.dy``,i=this.renderRipple();return l.dy` ${i} ${n} ${this.left?"":e} <span class="${(0,d.$)(t)}"> <mwc-checkbox reducedTouchTarget tabindex="${this.tabindex}" .checked="${this.selected}" ?disabled="${this.disabled}" @change="${this.onChange}"> </mwc-checkbox> </span> ${this.left?e:""} ${s}`}async onChange(t){const e=t.target;this.selected===e.checked||(this._skipPropRequest=!0,this.selected=e.checked,await this.updateComplete,this._skipPropRequest=!1)}}(0,s.__decorate)([(0,i.IO)("slot")],h.prototype,"slotElement",void 0),(0,s.__decorate)([(0,i.IO)("mwc-checkbox")],h.prototype,"checkboxElement",void 0),(0,s.__decorate)([(0,i.Cb)({type:Boolean})],h.prototype,"left",void 0),(0,s.__decorate)([(0,i.Cb)({type:String,reflect:!0})],h.prototype,"graphic",void 0)},97536:function(t,e,n){n.d(e,{W:()=>s});const s=n(57243).iv`:host(:not([twoline])){height:56px}:host(:not([left])) .mdc-deprecated-list-item__meta{height:40px;width:40px}`},88977:function(t,e,n){n.d(e,{L:()=>a});const s={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 i={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 a(t){return function(t,e,n){if(t){var s,i=t.toLowerCase().split(/[-_]/),a=i[0],r=a;if(i[1]&&4===i[1].length?(r+="_"+i[1],s=i[2]):s=i[1],s||(s=e[r]||e[a]),s)return function(t,e){var n=e["string"==typeof t?t.toUpperCase():t];return"number"==typeof n?n:1}(s.match(/^\d+$/)?Number(s):s,n)}return 1}(t,s,i)}},95927:function(t,e,n){n.a(t,(async function(t,s){try{n.d(e,{Z:()=>o});var i=n(95559),a=n(35325),r=t([i,a]);[i,a]=r.then?(await r)():r;var o=(0,i.rx)({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:a.Nt,dateProfileGeneratorClass:a.XK},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});s()}catch(t){s(t)}}))},13711:function(t,e,n){n.a(t,(async function(t,s){try{n.d(e,{Z:()=>l});var i=n(95559),a=n(55885),r=n(66952),o=t([r,i,a]);[r,i,a]=o.then?(await o)():o;const d={listDayFormat:c,listDaySideFormat:c,noEventsClassNames:r.n,noEventsContent:r.n,noEventsDidMount:r.n,noEventsWillUnmount:r.n};function c(t){return!1===t?null:(0,r.x)(t)}var l=(0,i.rx)({name:"@fullcalendar/list",optionRefiners:d,views:{list:{component:a.B,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});s()}catch(h){s(h)}}))},55885:function(t,e,n){n.a(t,(async function(t,s){try{n.d(e,{B:()=>v});n(92745);var i=n(66952),a=n(65054),r=t([i]);i=(r.then?(await r)():r)[0];class o extends i.B{constructor(){super(...arguments),this.state={textId:(0,i.a5)()}}render(){let{theme:t,dateEnv:e,options:n,viewApi:s}=this.context,{cellId:r,dayDate:o,todayRange:d}=this.props,{textId:c}=this.state,h=(0,i.a_)(o,d),u=n.listDayFormat?e.format(o,n.listDayFormat):"",f=n.listDaySideFormat?e.format(o,n.listDaySideFormat):"",v=Object.assign({date:e.toDate(o),view:s,textId:c,text:u,sideText:f,navLinkAttrs:(0,i.b0)(this.context,o),sideNavLinkAttrs:(0,i.b0)(this.context,o,"day",!1)},h);return(0,a.az)(i.C,{elTag:"tr",elClasses:["fc-list-day",...(0,i.aZ)(h,t)],elAttrs:{"data-date":(0,i.bv)(o)},renderProps:v,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:l,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(e=>(0,a.az)("th",{scope:"colgroup",colSpan:3,id:r,"aria-labelledby":c},(0,a.az)(e,{elTag:"div",elClasses:["fc-list-day-cushion",t.getClass("tableCellShaded")]}))))}}function l(t){return(0,a.az)(a.HY,null,t.text&&(0,a.az)("a",Object.assign({id:t.textId,className:"fc-list-day-text"},t.navLinkAttrs),t.text),t.sideText&&(0,a.az)("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},t.sideNavLinkAttrs),t.sideText))}const d=(0,i.x)({hour:"numeric",minute:"2-digit",meridiem:"short"});class c extends i.B{render(){let{props:t,context:e}=this,{options:n}=e,{seg:s,timeHeaderId:r,eventHeaderId:o,dateHeaderId:l}=t,c=n.eventTimeFormat||d;return(0,a.az)(i.cn,Object.assign({},t,{elTag:"tr",elClasses:["fc-list-event",s.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>h(s,e),seg:s,timeText:"",disableDragging:!0,disableResizing:!0}),((t,n)=>(0,a.az)(a.HY,null,u(s,c,e,r,l),(0,a.az)("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},(0,a.az)("span",{className:"fc-list-event-dot",style:{borderColor:n.borderColor||n.backgroundColor}})),(0,a.az)(t,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${o} ${l}`}}))))}}function h(t,e){let n=(0,i.bU)(t,e);return(0,a.az)("a",Object.assign({},n),t.eventRange.def.title)}function u(t,e,n,s,r){let{options:o}=n;if(!1!==o.displayEventTime){let l,d=t.eventRange.def,c=t.eventRange.instance,h=!1;if(d.allDay?h=!0:(0,i.az)(t.eventRange.range)?t.isStart?l=(0,i.bQ)(t,e,n,null,null,c.range.start,t.end):t.isEnd?l=(0,i.bQ)(t,e,n,null,null,t.start,c.range.end):h=!0:l=(0,i.bQ)(t,e,n),h){let t={text:n.options.allDayText,view:n.viewApi};return(0,a.az)(i.C,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${s} ${r}`},renderProps:t,generatorName:"allDayContent",customGenerator:o.allDayContent,defaultGenerator:f,classNameGenerator:o.allDayClassNames,didMount:o.allDayDidMount,willUnmount:o.allDayWillUnmount})}return(0,a.az)("td",{className:"fc-list-event-time"},l)}return null}function f(t){return t.text}class v extends i.be{constructor(){super(...arguments),this.computeDateVars=(0,i.z)(g),this.eventStoreToSegs=(0,i.z)(this._eventStoreToSegs),this.state={timeHeaderId:(0,i.a5)(),eventHeaderId:(0,i.a5)(),dateHeaderIdRoot:(0,i.a5)()},this.setRootEl=t=>{t?this.context.registerInteractiveComponent(this,{el:t}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:t,context:e}=this,{dayDates:n,dayRanges:s}=this.computeDateVars(t.dateProfile),r=this.eventStoreToSegs(t.eventStore,t.eventUiBases,s);return(0,a.az)(i.ct,{elRef:this.setRootEl,elClasses:["fc-list",e.theme.getClass("table"),!1!==e.options.stickyHeaderDates?"fc-list-sticky":""],viewSpec:e.viewSpec},(0,a.az)(i.cd,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},r.length>0?this.renderSegList(r,n):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:t,viewApi:e}=this.context,n={text:t.noEventsText,view:e};return(0,a.az)(i.C,{elTag:"div",elClasses:["fc-list-empty"],renderProps:n,generatorName:"noEventsContent",customGenerator:t.noEventsContent,defaultGenerator:p,classNameGenerator:t.noEventsClassNames,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(t=>(0,a.az)(t,{elTag:"div",elClasses:["fc-list-empty-cushion"]})))}renderSegList(t,e){let{theme:n,options:s}=this.context,{timeHeaderId:r,eventHeaderId:l,dateHeaderIdRoot:d}=this.state,h=y(t);return(0,a.az)(i.ch,{unit:"day"},((t,u)=>{let f=[];for(let n=0;n<h.length;n+=1){let v=h[n];if(v){let h=(0,i.bv)(e[n]),p=d+"-"+h;f.push((0,a.az)(o,{key:h,cellId:p,dayDate:e[n],todayRange:u})),v=(0,i.bR)(v,s.eventOrder);for(let e of v)f.push((0,a.az)(c,Object.assign({key:h+":"+e.eventRange.instance.instanceId,seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:r,eventHeaderId:l,dateHeaderId:p},(0,i.bS)(e,u,t))))}}return(0,a.az)("table",{className:"fc-list-table "+n.getClass("table")},(0,a.az)("thead",null,(0,a.az)("tr",null,(0,a.az)("th",{scope:"col",id:r},s.timeHint),(0,a.az)("th",{scope:"col","aria-hidden":!0}),(0,a.az)("th",{scope:"col",id:l},s.eventHint))),(0,a.az)("tbody",null,f))}))}_eventStoreToSegs(t,e,n){return this.eventRangesToSegs((0,i.af)(t,e,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)}eventRangesToSegs(t,e){let n=[];for(let s of t)n.push(...this.eventRangeToSegs(s,e));return n}eventRangeToSegs(t,e){let n,s,a,{dateEnv:r}=this.context,{nextDayThreshold:o}=this.context.options,l=t.range,d=t.def.allDay,c=[];for(n=0;n<e.length;n+=1)if(s=(0,i.o)(l,e[n]),s&&(a={component:this,eventRange:t,start:s.start,end:s.end,isStart:t.isStart&&s.start.valueOf()===l.start.valueOf(),isEnd:t.isEnd&&s.end.valueOf()===l.end.valueOf(),dayIndex:n},c.push(a),!a.isEnd&&!d&&n+1<e.length&&l.end<r.add(e[n+1].start,o))){a.end=l.end,a.isEnd=!0;break}return c}}function p(t){return t.text}function g(t){let e=(0,i.q)(t.renderRange.start),n=t.renderRange.end,s=[],a=[];for(;e<n;)s.push(e),a.push({start:e,end:(0,i.t)(e,1)}),e=(0,i.t)(e,1);return{dayDates:s,dayRanges:a}}function y(t){let e,n,s=[];for(e=0;e<t.length;e+=1)n=t[e],(s[n.dayIndex]||(s[n.dayIndex]=[])).push(n);return s}(0,i.cw)(':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}'),s()}catch(m){s(m)}}))},27608:function(t,e,n){n.d(e,{MT:()=>i,RV:()=>s,U2:()=>o,ZH:()=>d,t8:()=>l});n(92745),n(9359),n(31526),n(70104);function s(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}function i(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const i=s(n);return(t,n)=>i.then((s=>n(s.transaction(e,t).objectStore(e))))}let a;function r(){return a||(a=i("keyval-store","keyval")),a}function o(t,e=r()){return e("readonly",(e=>s(e.get(t))))}function l(t,e,n=r()){return n("readwrite",(n=>(n.put(e,t),s(n.transaction))))}function d(t=r()){return t("readwrite",(t=>(t.clear(),s(t.transaction))))}},1714:function(t,e,n){n.d(e,{sR:()=>h});n(92519),n(42179),n(89256),n(24931),n(88463),n(57449),n(19814);var s=n(53232),i=n(45779);const a=(t,e)=>{var n,s;const i=t._$AN;if(void 0===i)return!1;for(const t of i)null===(s=(n=t)._$AO)||void 0===s||s.call(n,e,!1),a(t,e);return!0},r=t=>{let e,n;do{if(void 0===(e=t._$AM))break;n=e._$AN,n.delete(t),t=e}while(0===(null==n?void 0:n.size))},o=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(void 0===n)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),c(e)}};function l(t){void 0!==this._$AN?(r(this),this._$AM=t,o(this)):this._$AM=t}function d(t,e=!1,n=0){const s=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(s))for(let t=n;t<s.length;t++)a(s[t],!1),r(s[t]);else null!=s&&(a(s,!1),r(s));else a(this,t)}const c=t=>{var e,n,s,a;t.type==i.pX.CHILD&&(null!==(e=(s=t)._$AP)&&void 0!==e||(s._$AP=d),null!==(n=(a=t)._$AQ)&&void 0!==n||(a._$AQ=l))};class h extends i.Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),o(this),this.isConnected=t._$AU}_$AO(t,e=!0){var n,s;t!==this.isConnected&&(this.isConnected=t,t?null===(n=this.reconnected)||void 0===n||n.call(this):null===(s=this.disconnected)||void 0===s||s.call(this)),e&&(a(this,t),r(this))}setValue(t){if((0,s.OR)(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(){}}},94571:function(t,e,n){n.d(e,{C:()=>u});n(9359),n(1331);var s=n(2841),i=n(53232),a=n(1714);class r{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}class o{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.Z=t)))}resume(){var t;null===(t=this.Z)||void 0===t||t.call(this),this.Y=this.Z=void 0}}var l=n(45779);const d=t=>!(0,i.pt)(t)&&"function"==typeof t.then,c=1073741823;class h extends a.sR{constructor(){super(...arguments),this._$C_t=c,this._$Cwt=[],this._$Cq=new r(this),this._$CK=new o}render(...t){var e;return null!==(e=t.find((t=>!d(t))))&&void 0!==e?e:s.Jb}update(t,e){const n=this._$Cwt;let i=n.length;this._$Cwt=e;const a=this._$Cq,r=this._$CK;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$C_t);t++){const s=e[t];if(!d(s))return this._$C_t=t,s;t<i&&s===n[t]||(this._$C_t=c,i=0,Promise.resolve(s).then((async t=>{for(;r.get();)await r.get();const e=a.deref();if(void 0!==e){const n=e._$Cwt.indexOf(s);n>-1&&n<e._$C_t&&(e._$C_t=n,e.setValue(t))}})))}return s.Jb}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}}const u=(0,l.XM)(h)}}; //# sourceMappingURL=26372.bd3534cac9bfc335.js.map