UNPKG

iobroker.lovelace

Version:

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

10 lines 22.7 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[83312],{89865:function(e,t,a){a.a(e,async function(e,t){try{a(18111),a(61701),a(62953);var i=a(40445),r=(a(22395),a(5124)),n=a(67576),o=a(1087),s=a(18350),d=(a(67094),e([s]));s=(d.then?(await d)():d)[0];let l,c,h,u,v=e=>e;class p extends r.WF{render(){return(0,r.qy)(l||(l=v` <wa-button-group childSelector="ha-button"> ${0} </wa-button-group> `),this.buttons.map(e=>(0,r.qy)(c||(c=v`<ha-button iconTag="ha-svg-icon" class="icon" .variant="${0}" .size="${0}" .value="${0}" @click="${0}" .title="${0}" .appearance="${0}"> ${0} </ha-button>`),this.active===e.value&&this.activeVariant?this.activeVariant:this.variant,this.size,e.value,this._handleClick,e.label,this.active===e.value?"accent":"filled",e.iconPath?(0,r.qy)(h||(h=v`<ha-svg-icon aria-label="${0}" .path="${0}"></ha-svg-icon>`),e.label,e.iconPath):e.label)))}_handleClick(e){this.active=e.currentTarget.value,(0,o.r)(this,"value-changed",{value:this.active})}constructor(...e){super(...e),this.size="medium",this.nowrap=!1,this.fullWidth=!1,this.variant="brand"}}p.styles=(0,r.AH)(u||(u=v`:host{--mdc-icon-size:var(--button-toggle-icon-size, 20px)}:host([no-wrap]) wa-button-group::part(base){flex-wrap:nowrap}wa-button-group{padding:var(--ha-button-toggle-group-padding)}:host([full-width]) wa-button-group,:host([full-width]) wa-button-group::part(base){width:100%}:host([full-width]) ha-button{flex:1}`)),(0,i.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"buttons",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"active",void 0),(0,i.Cg)([(0,n.MZ)({reflect:!0})],p.prototype,"size",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"no-wrap"})],p.prototype,"nowrap",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"full-width"})],p.prototype,"fullWidth",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"variant",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"active-variant"})],p.prototype,"activeVariant",void 0),p=(0,i.Cg)([(0,n.EM)("ha-button-toggle-group")],p),t()}catch(l){t(l)}})},3059:function(e,t,a){a.a(e,async function(e,i){try{a.r(t),a.d(t,{HaIconButtonNext:function(){return p}});a(62953);var r=a(40445),n=a(5124),o=a(67576),s=a(63091),d=a(26300),l=e([d]);d=(l.then?(await l)():l)[0];let c,h=e=>e;const u="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",v="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";class p extends n.WF{render(){var e;return(0,n.qy)(c||(c=h` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.next"))||"Next",this._icon,this.href,this.target,this.rel,this.download)}constructor(...e){super(...e),this.disabled=!1,this._icon="rtl"===s.G.document.dir?u:v}}(0,r.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"label",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"href",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"target",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"rel",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"download",void 0),(0,r.Cg)([(0,o.wk)()],p.prototype,"_icon",void 0),p=(0,r.Cg)([(0,o.EM)("ha-icon-button-next")],p),i()}catch(c){i(c)}})},45100:function(e,t,a){a.a(e,async function(e,i){try{a.r(t),a.d(t,{HaIconButtonPrev:function(){return p}});a(62953);var r=a(40445),n=a(5124),o=a(67576),s=a(63091),d=a(26300),l=e([d]);d=(l.then?(await l)():l)[0];let c,h=e=>e;const u="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",v="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";class p extends n.WF{render(){var e;return(0,n.qy)(c||(c=h` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...e){super(...e),this.disabled=!1,this._icon="rtl"===s.G.document.dir?v:u}}(0,r.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"label",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"href",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"target",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"rel",void 0),(0,r.Cg)([(0,o.MZ)()],p.prototype,"download",void 0),(0,r.Cg)([(0,o.wk)()],p.prototype,"_icon",void 0),p=(0,r.Cg)([(0,o.EM)("ha-icon-button-prev")],p),i()}catch(c){i(c)}})},55156:function(e,t,a){a.d(t,{At:function(){return v},TK:function(){return b},_1:function(){return u},ar:function(){return c},at:function(){return l},iO:function(){return p},kt:function(){return d},pO:function(){return h}});a(89463),a(44114),a(26910),a(18111),a(22489),a(7588),a(61701),a(45367),a(92731),a(3362),a(62953);var i=a(78870),r=a(90433);if(59509==a.j)var n=a(71727);var o=a(28978),s=a(22675),d=function(e){return e.THISEVENT="",e.THISANDFUTURE="THISANDFUTURE",e}({}),l=function(e){return e[e.CREATE_EVENT=1]="CREATE_EVENT",e[e.DELETE_EVENT=2]="DELETE_EVENT",e[e.UPDATE_EVENT=4]="UPDATE_EVENT",e}({});const c=(e,t,a)=>{var d;const l=getComputedStyle(t),c=new Map(null!==(d=null==a?void 0:a.map(e=>[e.entity_id,e.options]))&&void 0!==d?d:[]);return Object.keys(e.states).filter(t=>{var a;return"calendar"===(0,n.m)(t)&&e.states[t].state!==s.Hh&&!0!==(null===(a=e.entities[t])||void 0===a?void 0:a.hidden)}).sort().map((t,a)=>{var n;const s=e.states[t],d=null===(n=c.get(t))||void 0===n||null===(n=n.calendar)||void 0===n?void 0:n.color;let h;return h=d&&(0,i.dc)(d)?(0,i.MP)(d):(0,r.Vy)(a,l),Object.assign(Object.assign({},s),{},{name:(0,o.u)(s),backgroundColor:h})})},h=(e,t,a)=>e.callWS({type:"calendar/event/create",entity_id:t,event:a}),u=(e,t,a,i,r,n)=>e.callWS({type:"calendar/event/update",entity_id:t,uid:a,recurrence_id:r,recurrence_range:n,event:i}),v=(e,t,a,i,r)=>e.callWS({type:"calendar/event/delete",entity_id:t,uid:a,recurrence_id:i,recurrence_range:r}),p=(e,t,a,i,r)=>e.connection.subscribeMessage(r,{type:"calendar/event/subscribe",entity_id:t,start:a.toISOString(),end:i.toISOString()}),g=e=>"string"==typeof e?e:"dateTime"in e?e.dateTime:"date"in e?e.date:void 0,b=(e,t)=>{var a,i,r,n,o;const s=g(e.start),d=g(e.end);if(!s||!d)return null;const l={summary:e.summary,dtstart:s,dtend:d,description:null!==(a=e.description)&&void 0!==a?a:void 0,location:null!==(i=e.location)&&void 0!==i?i:void 0,uid:null!==(r=e.uid)&&void 0!==r?r:void 0,recurrence_id:null!==(n=e.recurrence_id)&&void 0!==n?n:void 0,rrule:null!==(o=e.rrule)&&void 0!==o?o:void 0};return{start:s,end:d,title:e.summary,backgroundColor:t.backgroundColor,borderColor:t.backgroundColor,calendar:t.entity_id,eventData:l}}},54706:function(e,t,a){a.d(t,{E:function(){return n}});a(74423),a(18111),a(13579),a(3362),a(62953);var i=a(40445),r=a(67576);const n=e=>{class t extends e{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const e=this.__unsubs.pop();e instanceof Promise?e.then(e=>e()):e()}this.__unsubs=void 0}}updated(e){if(super.updated(e),e.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const t of e.keys())if(this.hassSubscribeRequiredHostProps.includes(t))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){var e;void 0!==this.__unsubs||!this.isConnected||void 0===this.hass||null!==(e=this.hassSubscribeRequiredHostProps)&&void 0!==e&&e.some(e=>void 0===this[e])||(this.__unsubs=this.hassSubscribe())}}return(0,i.Cg)([(0,r.MZ)({attribute:!1})],t.prototype,"hass",void 0),t}},63556:function(e,t,a){a.a(e,async function(e,t){try{var i=a(74487),r=(a(74423),a(18111),a(22489),a(13579),a(3362),a(62953),a(40445)),n=a(31886),o=a(3398),s=a(78871),d=a(69749),l=a(29851),c=a(33965),h=a(88696),u=a(5124),v=a(67576),p=a(22786),g=a(380),b=a(8480),f=a(69543),y=a(1087),w=a(82286),m=a(18350),_=a(89865),C=a(3059),V=a(45100),x=a(55156),M=a(46927),k=a(14503),T=a(85979),$=a(43036),E=a(42228),Z=e([i,m,_,C,V,T,d,c,l,g,o,n,b,h]);[i,m,_,C,V,T,d,c,l,g,o,n,b,h]=Z.then?(await Z)():Z;let H,z,D,A,S,P,L,G=e=>e;const R="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",W="M21 3H3C2.4 3 2 3.4 2 4V10C2 10.6 2.4 11 3 11H21C21.6 11 22 10.6 22 10V4C22 3.4 21.6 3 21 3M21 13H3C2.4 13 2 13.4 2 14V20C2 20.6 2.4 21 3 21H21C21.6 21 22 20.6 22 20V14C22 13.4 21.6 13 21 13Z",B="M2,3V6H21V3M20,8H3A1,1 0 0,0 2,9V15A1,1 0 0,0 3,16H20A1,1 0 0,0 21,15V9A1,1 0 0,0 20,8M2,21H21V18H2V21Z",N="M16,5V11H21V5M10,11H15V5H10M16,18H21V12H16M10,18H15V12H10M4,18H9V12H4M4,11H9V5H4V11Z",j="M13,5H10A1,1 0 0,0 9,6V18A1,1 0 0,0 10,19H13A1,1 0 0,0 14,18V6A1,1 0 0,0 13,5M20,5H17A1,1 0 0,0 16,6V18A1,1 0 0,0 17,19H20A1,1 0 0,0 21,18V6A1,1 0 0,0 20,5M6,5H3A1,1 0 0,0 2,6V18A1,1 0 0,0 3,19H6A1,1 0 0,0 7,18V6A1,1 0 0,0 6,5Z",I={headerToolbar:!1,plugins:[d.A,c.A,l.Ay],initialView:"dayGridMonth",dayMaxEventRows:!0,height:"parent",handleWindowResize:!1,locales:s.A,views:{listWeek:{type:"list",duration:{days:7}}}};class q extends u.WF{disconnectedCallback(){var e,t;this._clearMidnightRefreshTimeout(),super.disconnectedCallback(),null===(e=this.calendar)||void 0===e||e.destroy(),this.calendar=void 0,null===(t=this._fullCalendarStyle)||void 0===t||t.remove()}connectedCallback(){super.connectedCallback(),this.hasUpdated&&!this.calendar?this._loadCalendar(this._activeView):this.calendar&&this._scheduleMidnightRefresh()}render(){const e=this._viewToggleButtons(this.views,this.hass.localize);return(0,u.qy)(H||(H=G` ${0} <div id="calendar"></div> ${0} `),this.calendar?(0,u.qy)(z||(z=G` ${0} <div class="header"> ${0} </div> `),this.error?(0,u.qy)(D||(D=G`<hui-warning .hass="${0}" severity="warning">${0}</hui-warning>`),this.hass,this.error):"",this.narrow?(0,u.qy)(S||(S=G` <div class="controls"> <h1>${0}</h1> <div> <ha-icon-button-prev .label="${0}" class="prev" @click="${0}"> </ha-icon-button-prev> <ha-icon-button-next .label="${0}" class="next" @click="${0}"> </ha-icon-button-next> </div> </div> <div class="controls buttons"> <ha-button appearance="plain" size="small" class="today" @click="${0}">${0}</ha-button> <ha-button-toggle-group .buttons="${0}" .active="${0}" size="small" no-wrap @value-changed="${0}"></ha-button-toggle-group> </div> `),this.calendar.view.title,this.hass.localize("ui.common.previous"),this._handlePrev,this.hass.localize("ui.common.next"),this._handleNext,this._handleToday,this.hass.localize("ui.components.calendar.today"),e,this._activeView,this._handleView):(0,u.qy)(A||(A=G` <div class="navigation"> <ha-button appearance="filled" size="small" class="today" @click="${0}">${0}</ha-button> <ha-icon-button-prev .label="${0}" class="prev" @click="${0}"> </ha-icon-button-prev> <ha-icon-button-next .label="${0}" class="next" @click="${0}"> </ha-icon-button-next> </div> <h1>${0}</h1> <ha-button-toggle-group .buttons="${0}" .active="${0}" size="small" no-wrap @value-changed="${0}"></ha-button-toggle-group> `),this._handleToday,this.hass.localize("ui.components.calendar.today"),this.hass.localize("ui.common.previous"),this._handlePrev,this.hass.localize("ui.common.next"),this._handleNext,this.calendar.view.title,e,this._activeView,this._handleView)):"",this.addFab&&this._hasMutableCalendars?(0,u.qy)(P||(P=G`<ha-button size="large" slot="fab" @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button>`),this._createEvent,R,this.hass.localize("ui.components.calendar.event.add")):u.s6)}willUpdate(e){if(super.willUpdate(e),!this.calendar)return;e.has("events")&&(this.calendar.removeAllEventSources(),this.calendar.addEventSource(this.events)),e.has("views")&&!this.views.includes(this._activeView)&&(this._activeView=this.initialView&&this.views.includes(this.initialView)?this.initialView:this.views[0],this.calendar.changeView(this._activeView),this._fireViewChanged()),e.has("eventDisplay")&&this.calendar.setOption("eventDisplay",this.eventDisplay);const t=e.get("hass");t&&t.language!==this.hass.language&&this.calendar.setOption("locale",this.hass.language)}firstUpdated(){this._loadCalendar(this.initialView),this._activeView=this.initialView}async _loadCalendar(e){const t=this.hass.locale.time_zone===M.Wj.local?void 0:(await a.e(73361).then(a.bind(a,56520))).default,i=Object.assign(Object.assign({},I),{},{plugins:this.hass.locale.time_zone===M.Wj.local?I.plugins:[...I.plugins,t],locale:this.hass.language,timeZone:this.hass.locale.time_zone===M.Wj.local?"local":this.hass.config.time_zone,firstDay:(0,g.P)(this.hass.locale),initialView:e,eventDisplay:this.eventDisplay,eventTimeFormat:{hour:(0,f.J)(this.hass.locale)?"numeric":"2-digit",minute:(0,f.J)(this.hass.locale)?"numeric":"2-digit",hour12:(0,f.J)(this.hass.locale)}});i.dateClick=e=>this._handleDateClick(e),i.eventClick=e=>this._handleEventClick(e),this.calendar=new o.Vv(this.shadowRoot.getElementById("calendar"),i),this.calendar.render(),this._fireViewChanged()}get _hasMutableCalendars(){return this.calendars.some(e=>{const t=this.hass.states[e.entity_id];return t&&(0,w.$)(t,x.at.CREATE_EVENT)})}_createEvent(e){(0,E.A)(this,{selectedDate:"dayGridWeek"===this._activeView||"dayGridDay"===this._activeView||"dayGridMonth"===this._activeView&&this.calendar.view.currentStart.getMonth()!==(new Date).getMonth()?this.calendar.view.currentStart:void 0,updated:()=>{this._fireViewChanged()}})}_handleEventClick(e){const t=this.hass.states[e.event.extendedProps.calendar],a=t&&(0,w.$)(t,x.at.UPDATE_EVENT),i=t&&(0,w.$)(t,x.at.DELETE_EVENT);(0,$.X)(this,{calendarId:e.event.extendedProps.calendar,entry:e.event.extendedProps.eventData,color:e.event.backgroundColor,updated:()=>{this._fireViewChanged()},canEdit:a,canDelete:i})}_handleDateClick(e){"dayGridMonth"===e.view.type&&(this._activeView="dayGridDay",this.calendar.changeView("dayGridDay"),this.calendar.gotoDate(e.dateStr),this._fireViewChanged())}_handleNext(){this.calendar.next(),this._fireViewChanged()}_handlePrev(){this.calendar.prev(),this._fireViewChanged()}_handleToday(){this.calendar.today(),this._fireViewChanged()}_handleView(e){this._activeView=e.detail.value,this.calendar.changeView(this._activeView),this._fireViewChanged()}_fireViewChanged(){this._scheduleMidnightRefresh(),(0,y.r)(this,"view-changed",{start:this.calendar.view.activeStart,end:this.calendar.view.activeEnd,view:this.calendar.view.type})}_scheduleMidnightRefresh(){if(this._clearMidnightRefreshTimeout(),!this.calendar)return;const e=this._isShowingToday(),t=new n.BB(new Date,this._calendarTimeZone());t.setHours(24,0,0,0),this._midnightRefreshTimeout=window.setTimeout(()=>{var t;if(e)return null===(t=this.calendar)||void 0===t||t.today(),void this._fireViewChanged();this._scheduleMidnightRefresh()},t.getTime()-Date.now())}_clearMidnightRefreshTimeout(){void 0!==this._midnightRefreshTimeout&&(window.clearTimeout(this._midnightRefreshTimeout),this._midnightRefreshTimeout=void 0)}_isShowingToday(){var e;const t=null===(e=this.calendar)||void 0===e?void 0:e.getDate();return!!t&&this._formatDateInCalendarTimeZone(t)===this._formatDateInCalendarTimeZone(new Date)}_calendarTimeZone(){return(0,b.wj)(this.hass.locale.time_zone,this.hass.config.time_zone)}_formatDateInCalendarTimeZone(e){return new Intl.DateTimeFormat("en-CA",{timeZone:this._calendarTimeZone(),year:"numeric",month:"2-digit",day:"2-digit"}).format(e)}static get styles(){return[k.RF,(0,u.AH)(L||(L=G`:host{display:flex;flex-direction:column;--fc-theme-standard-border-color:var(--divider-color)}.header{display:flex;align-items:center;justify-content:space-between;padding-bottom:8px}:host([narrow]) .header{padding-right:8px;padding-left:8px;padding-inline-start:8px;padding-inline-end:8px;flex-direction:column;align-items:flex-start;justify-content:initial}.header{padding-right:var(--calendar-header-padding);padding-left:var(--calendar-header-padding);padding-inline-start:var(--calendar-header-padding);padding-inline-end:var(--calendar-header-padding)}.navigation{display:flex;align-items:center;flex-grow:0}a{color:var(--primary-color)}.controls{display:flex;justify-content:space-between;align-items:center;width:100%}.buttons{display:flex;flex-wrap:wrap}.buttons>*{margin-bottom:5px;box-sizing:border-box}.today{margin-right:20px;margin-inline-end:20px;margin-inline-start:initial;direction:var(--direction)}.next,.prev{--ha-icon-button-size:32px}ha-button[slot=fab]{position:absolute;bottom:var(--ha-space-4);right:var(--ha-space-4);inset-inline-end:var(--ha-space-4);inset-inline-start:initial;z-index:1;--ha-button-box-shadow:var(--ha-box-shadow-l)}#calendar{flex-grow:1;background-color:var(--ha-card-background,var(--card-background-color,#fff));height:var(--calendar-height);--fc-neutral-bg-color:var( --ha-card-background, var(--card-background-color, white) );--fc-list-event-hover-bg-color:var( --ha-card-background, var(--card-background-color, white) );--fc-theme-standard-border-color:var(--divider-color);--fc-border-color:var(--divider-color);--fc-page-bg-color:var( --ha-card-background, var(--card-background-color, white) )}a{color:inherit!important}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--divider-color);border-width:var(--calendar-border-width,1px);border-radius:var(--calendar-border-radius,var(--mdc-shape-small,4px))}.fc-theme-standard td{border-bottom-left-radius:var(--mdc-shape-small,4px);border-bottom-right-radius:var(--mdc-shape-small,4px)}.fc-scrollgrid-section-header td{border:none}th.fc-col-header-cell.fc-day{background-color:var(--table-header-background-color);color:var(--primary-text-color);font-size:var(--ha-font-size-xs);font-weight:var(--ha-font-weight-bold);text-transform:uppercase}.fc-daygrid-dot-event:hover{background-color:inherit}.fc-daygrid-day-top{text-align:center;padding-top:5px;justify-content:center}table.fc-scrollgrid-sync-table tbody tr:first-child .fc-daygrid-day-top{padding-top:0}a.fc-daygrid-day-number{float:none!important;font-size:var(--ha-font-size-s);cursor:pointer}.fc .fc-daygrid-day-number{padding:3px!important}.fc .fc-daygrid-day.fc-day-today{background:inherit}td.fc-day-today .fc-daygrid-day-number{height:26px;color:var(--text-primary-color)!important;background-color:var(--primary-color);border-radius:var(--ha-border-radius-circle);display:inline-block;text-align:center;white-space:nowrap;width:max-content;min-width:24px}.fc-daygrid-day-events{margin-top:4px}.fc-event{border-radius:var(--ha-border-radius-sm);line-height:var(--ha-line-height-normal);cursor:pointer}.fc-daygrid-block-event .fc-event-main{padding:0 1px}.fc-day-past .fc-daygrid-day-events{opacity:.5}.fc-icon-x:before{font-family:var(--ha-font-family-body);content:"X"}.fc-popover{background-color:var(--primary-background-color)!important}.fc-popover-header{background-color:var(--secondary-background-color)!important}.fc-theme-standard .fc-list-day-frame{background-color:transparent}.fc-list-event.fc-event td,.fc-list.fc-view{border:none}.fc-list-day.fc-day th{border-bottom:none;border-top:1px solid var(--fc-theme-standard-border-color,#ddd)!important}.fc-list-day-text{font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal)}.fc-list-day-side-text{font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);color:var(--primary-color)}.fc-list-day-frame,.fc-list-table td{padding-top:12px;padding-bottom:12px}:host([narrow]) .fc-dayGridMonth-view .fc-daygrid-dot-event .fc-event-time,:host([narrow]) .fc-dayGridMonth-view .fc-daygrid-dot-event .fc-event-title{display:none}:host([narrow]) .fc-dayGridMonth-view .fc-daygrid-event-harness{margin-top:0!important}:host([narrow]) .fc-dayGridMonth-view .fc-daygrid-day-events{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}:host([narrow]) .fc-dayGridMonth-view .fc-scrollgrid-sync-table{overflow:hidden}.fc-scroller::-webkit-scrollbar{width:.4rem;height:.4rem}.fc-scroller::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.fc-scroller{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`))]}constructor(...e){super(...e),this.narrow=!1,this.addFab=!1,this.events=[],this.calendars=[],this.views=["dayGridMonth","dayGridWeek","dayGridDay","listWeek"],this.initialView="dayGridMonth",this.eventDisplay="auto",this.error=void 0,this._activeView=this.initialView,this._resizeController=new h.P(this,{callback:()=>{var e;return null===(e=this.calendar)||void 0===e?void 0:e.updateSize()}}),this._viewToggleButtons=(0,p.A)((e,t)=>(this._viewButtons||(this._viewButtons=[{label:t("ui.components.calendar.views.dayGridMonth"),value:"dayGridMonth",iconPath:N},{label:t("ui.components.calendar.views.dayGridWeek"),value:"dayGridWeek",iconPath:j},{label:t("ui.components.calendar.views.dayGridDay"),value:"dayGridDay",iconPath:B},{label:t("ui.components.calendar.views.listWeek"),value:"listWeek",iconPath:W}]),this._viewButtons.filter(t=>e.includes(t.value))))}}(0,r.Cg)([(0,v.MZ)({type:Boolean,reflect:!0})],q.prototype,"narrow",void 0),(0,r.Cg)([(0,v.MZ)({attribute:"add-fab",type:Boolean})],q.prototype,"addFab",void 0),(0,r.Cg)([(0,v.MZ)({attribute:!1})],q.prototype,"events",void 0),(0,r.Cg)([(0,v.MZ)({attribute:!1})],q.prototype,"calendars",void 0),(0,r.Cg)([(0,v.MZ)({attribute:!1})],q.prototype,"views",void 0),(0,r.Cg)([(0,v.MZ)({attribute:!1})],q.prototype,"initialView",void 0),(0,r.Cg)([(0,v.MZ)({attribute:!1})],q.prototype,"eventDisplay",void 0),(0,r.Cg)([(0,v.MZ)({attribute:!1})],q.prototype,"error",void 0),(0,r.Cg)([(0,v.wk)()],q.prototype,"_activeView",void 0),(0,r.Cg)([(0,v.P)("style[data-fullcalendar]")],q.prototype,"_fullCalendarStyle",void 0),q=(0,r.Cg)([(0,v.EM)("ha-full-calendar")],q),t()}catch(H){t(H)}})},43036:function(e,t,a){a.d(t,{X:function(){return n}});a(3362),a(62953);var i=a(1087);const r=()=>Promise.all([a.e(32450),a.e(46095),a.e(22093),a.e(31709),a.e(62574),a.e(55076),a.e(68473),a.e(22907)]).then(a.bind(a,43322)),n=(e,t)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-calendar-event-detail",dialogImport:r,dialogParams:t})}},42228:function(e,t,a){a.d(t,{A:function(){return n}});a(3362),a(62953);var i=a(1087);const r=()=>Promise.all([a.e(32450),a.e(46095),a.e(7305),a.e(92769),a.e(3283),a.e(22093),a.e(67897),a.e(62574),a.e(26092),a.e(39005),a.e(55076),a.e(68473),a.e(89765)]).then(a.bind(a,62938)),n=(e,t)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-calendar-event-editor",dialogImport:r,dialogParams:t})}}}]);