1export const __webpack_ids__=["1502"];export const __webpack_modules__={68135:function(e,t,i){i.a(e,async function(e,o){try{i.d(t,{G:()=>c});var a=i(62229),r=i(28105),s=i(43890),n=e([a,s]);[a,s]=n.then?(await n)():n;const d=(0,r.Z)(e=>new Intl.RelativeTimeFormat(e.language,{numeric:"auto"})),c=(e,t,i,o=!0)=>{const a=(0,s.W)(e,i,t);return o?d(t).format(a.value,a.unit):Intl.NumberFormat(t.language,{style:"unit",unit:a.unit,unitDisplay:"long"}).format(Math.abs(a.value))};o()}catch(e){o(e)}})},53049:function(e,t,i){i.d(t,{f:()=>o});const o=e=>e.charAt(0).toUpperCase()+e.slice(1)},43890:function(e,t,i){i.a(e,async function(e,o){try{i.d(t,{W:()=>h});var a=i(7722),r=i(66233),s=i(58104),n=i(34302);const d=1e3,c=60,l=60*c;function h(e,t=Date.now(),i,o={}){const h={...p,...o||{}},u=(+e-+t)/d;if(Math.abs(u)<h.second)return{value:Math.round(u),unit:"second"};const v=u/c;if(Math.abs(v)<h.minute)return{value:Math.round(v),unit:"minute"};const g=u/l;if(Math.abs(g)<h.hour)return{value:Math.round(g),unit:"hour"};const y=new Date(e),_=new Date(t);y.setHours(0,0,0,0),_.setHours(0,0,0,0);const m=(0,a.j)(y,_);if(0===m)return{value:Math.round(g),unit:"hour"};if(Math.abs(m)<h.day)return{value:m,unit:"day"};const b=(0,n.Bt)(i),w=(0,r.z)(y,{weekStartsOn:b}),f=(0,r.z)(_,{weekStartsOn:b}),x=(0,s.p)(w,f);if(0===x)return{value:m,unit:"day"};if(Math.abs(x)<h.week)return{value:x,unit:"week"};const C=y.getFullYear()-_.getFullYear(),E=12*C+y.getMonth()-_.getMonth();return 0===E?{value:x,unit:"week"}:Math.abs(E)<h.month||0===C?{value:E,unit:"month"}:{value:Math.round(C),unit:"year"}}const p={second:45,minute:45,hour:22,day:5,week:4,month:11};o()}catch(u){o(u)}})},31138:function(e,t,i){var o=i(73742),a=i(59048),r=i(26292);class s extends a.oi{render(){return a.dy` ${this.header?a.dy`<h1 class="card-header">${this.header}</h1>`:a.Ld} <slot></slot> `}constructor(...e){super(...e),this.raised=!1}}s.styles=a.iv`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);
1box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,12px);border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:12px 16px 16px;display:block;margin-block-start:0px;margin-block-end:0px;font-weight:var(--ha-font-weight-normal)}:host ::slotted(.card-content:not(:first-child)),slot:not(:first-child)::slotted(.card-content){padding-top:0px;margin-top:-8px}:host ::slotted(.card-content){padding:16px}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:5px 16px}`,(0,o.__decorate)([(0,r.Cb)()],s.prototype,"header",void 0),(0,o.__decorate)([(0,r.Cb)({type:Boolean,reflect:!0})],s.prototype,"raised",void 0),s=(0,o.__decorate)([(0,r.Mo)("ha-card")],s)},63752:function(e,t,i){var o=i(73742),a=i(35423),r=i(21306),s=i(59048),n=i(26292);class d extends a.A{}d.styles=[r.W,s.iv`:host{--mdc-theme-secondary:var(--primary-color)}`],d=(0,o.__decorate)([(0,n.Mo)("ha-checkbox")],d)},82601:function(e,t,i){var o=i(73742),a=i(67466),r=i(86857),s=i(51544),n=i(59048),d=i(26292);class c extends r.H{attach(e){super.attach(e),this.attachableTouchController.attach(e)}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(e,t){e?.removeEventListener("touchend",this._handleTouchEnd),t?.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new a.J(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}c.styles=[s.W,n.iv`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var( 2 --ha-ripple-hover-color, 3 var(--ha-ripple-color, var(--secondary-text-color)) 4 );--md-ripple-pressed-color:var( 5 --ha-ripple-pressed-color, 6 var(--ha-ripple-color, var(--secondary-text-color)) 7 )}`],c=(0,o.__decorate)([(0,d.Mo)("ha-ripple")],c)},21409:function(e,t,i){i(81738),i(94814),i(40589);var o=i(73742),a=i(59048),r=i(26292),s=i(39884);class n extends a.oi{updated(e){e.has("disabled")&&(this.disabled?this._destroySortable():this._createSortable())}disconnectedCallback(){super.disconnectedCallback(),this._shouldBeDestroy=!0,setTimeout(()=>{this._shouldBeDestroy&&(this._destroySortable(),this._shouldBeDestroy=!1)},1)}connectedCallback(){super.connectedCallback(),this._shouldBeDestroy=!1,this.hasUpdated&&!this.disabled&&this._createSortable()}createRenderRoot(){return this}render(){return this.noStyle?a.Ld:a.dy` <style>.sortable-fallback{display:none!important}.sortable-ghost{box-shadow:0 0 0 2px var(--primary-color);background:rgba(var(--rgb-primary-color),.25);border-radius:4px;opacity:.4}.sortable-drag{border-radius:4px;opacity:1;background:var(--card-background-color);box-shadow:0px 4px 8px 3px #00000026;cursor:grabbing}</style> `}async _createSortable(){if(this._sortable)return;const e=this.children[0];if(!e)return;const t=(await Promise.all([i.e("47597"),i.e("4164")]).then(i.bind(i,23038))).default,o={scroll:!0,forceAutoScrollFallback:!0,scrollSpeed:20,animation:150,...this.options,onChoose:this._handleChoose,onStart:this._handleStart,onEnd:this._handleEnd,onUpdate:this._handleUpdate,onAdd:this._handleAdd,onRemove:this._handleRemove};this.draggableSelector&&(o.draggable=this.draggableSelector),this.handleSelector&&(o.handle=this.handleSelector),void 0!==this.invertSwap&&(o.invertSwap=this.invertSwap),this.group&&(o.group=this.group),this.filter&&(o.filter=this.filter),this._sortable=new t(e,o)}_destroySortable(){this._sortable&&(this._sortable.destroy(),this._sortable=void 0)}constructor(...e){super(...e),this.disabled=!1,this.noStyle=!1,this.invertSwap=!1,this.rollback=!0,this._shouldBeDestroy=!1,this._handleUpdate=e=>{(0,s.B)(this,"item-moved",{newIndex:e.newIndex,oldIndex:e.oldIndex})},this._handleAdd=e=>{(0,s.B)(this,"item-added",{index:e.newIndex,data:e.item.sortableData})},this._handleRemove=e=>{(0,s.B)(this,"item-removed",{index:e.oldIndex})},this._handleEnd=async e=>{(0,s.B)(this,"drag-end"),this.rollback&&e.item.placeholder&&(e.item.placeholder.replaceWith(e.item),delete e.item.placeholder)},this._handleStart=()=>{(0,s.B)(this,"drag-start")},this._handleChoose=e=>{this.rollback&&(e.item.placeholder=document.createComment("sort-placeholder"),e.item.after(e.item.placeholder))}}}(0,o.__decorate)([(0,r.Cb)({type:Boolean})],n.prototype,"disabled",void 0),(0,o.__decorate)([(0,r.Cb)({type:Boolean,attribute:"no-style"})],n.prototype,"noStyle",void 0),(0,o.__decorate)([(0,r.Cb)({type:String,attribute:"draggable-selector"})],n.prototype,"draggableSelector",void 0),(0,o.__decorate)([(0,r.Cb)({type:String,attribute:"handle-selector"})],n.prototype,"handleSelector",void 0),(0,o.__decorate)([(0,r.Cb)({type:String,attribute:"filter"})],n.prototype,"filter",void 0),(0,o.__decorate)([(0,r.Cb)({type:String})],n.prototype,"group",void 0),(0,o.__decorate)([(0,r.Cb)({type:Boolean,attribute:"invert-swap"})],n.prototype,"invertSwap",void 0),(0,o.__decorate)([(0,r.Cb)({attribute:!1})],n.prototype,"options",void 0),(0,o.__decorate)([(0,r.Cb)({type:Boolean})],n.prototype,"rollback",void 0),n=(0,o.__decorate)([(0,r.Mo)("ha-sortable")],n)},80044:function(e,t,i){i.d(t,{d:()=>o});const o=e=>"string"==typeof e?{type:"entity",entity:e,show_name:!0}:"type"in e&&e.type?e:{type:"entity",...e}},69887:function(e,t,i){function o(e){return"strategy"in e}i.d(t,{N:()=>o})},52802:function(e,t,i){function o(e){return"strategy"in e}i.d(t,{s:()=>o})},38168:function(e,t,i){i.d(t,{Z:()=>f});
7i(67886),i(65451),i(46015),i(38334),i(94880),i(75643),i(29761);var o=i(73742),a=i(59048),r=i(26292),s=i(31733),n=i(88245),d=i(20480),c=i(39884),l=(i(82601),i(21409),i(95814)),h=i(12156);i(41037),i(48017),i(69760),i(993);const p="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z";class u extends a.oi{firstUpdated(){this.addEventListener("focus",()=>{this._focused=!0}),this.addEventListener("blur",()=>{this._focused=!1}),this.addEventListener("touchstart",()=>{this._touchStarted=!0}),this.addEventListener("touchend",()=>{setTimeout(()=>{this._touchStarted=!1},10)}),this.addEventListener("mouseenter",()=>{this._touchStarted||(this._hover=!0)}),this.addEventListener("mouseleave",()=>{this._hover=!1}),this.addEventListener("click",()=>{this._hover=!0,document.addEventListener("click",this._documentClicked)})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._documentClicked)}render(){const e=(this._hover||this._menuOpened||this._focused)&&!this.hiddenOverlay;return a.dy` <div class="card-wrapper" inert><slot></slot></div> <div class="card-overlay ${(0,s.$)({visible:e})}"> ${this.noEdit?a.dy` <div class="control"> <div class="control-overlay"></div> <ha-svg-icon .path="${"M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z"}"> </ha-svg-icon> </div> `:a.dy` <div class="control" @click="${this._handleOverlayClick}" @keydown="${this._handleOverlayClick}" tabindex="0"> <div class="control-overlay"></div> <ha-svg-icon .path="${p}"> </ha-svg-icon> </div> `} <ha-button-menu class="more" corner="BOTTOM_END" menu-corner="END" .path="${[this.path]}" @action="${this._handleAction}" @opened="${this._handleOpened}" @closed="${this._handleClosed}"> <ha-icon-button slot="trigger" .path="${"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"}"> </ha-icon-button> ${this.noEdit?a.Ld:a.dy` <ha-list-item graphic="icon" @click="${this._handleAction}" .action="${"edit"}"> <ha-svg-icon slot="graphic" .path="${p}"></ha-svg-icon> ${this.hass.localize("ui.panel.lovelace.editor.edit_card.edit")} </ha-list-item> `} ${this.noDuplicate?a.Ld:a.dy` <ha-list-item graphic="icon" @click="${this._handleAction}" .action="${"duplicate"}"> <ha-svg-icon slot="graphic" .path="${"M16,8H14V11H11V13H14V16H16V13H19V11H16M2,12C2,9.21 3.64,6.8 6,5.68V3.5C2.5,4.76 0,8.09 0,12C0,15.91 2.5,19.24 6,20.5V18.32C3.64,17.2 2,14.79 2,12M15,3C10.04,3 6,7.04 6,12C6,16.96 10.04,21 15,21C19.96,21 24,16.96 24,12C24,7.04 19.96,3 15,3M15,19C11.14,19 8,15.86 8,12C8,8.14 11.14,5 15,5C18.86,5 22,8.14 22,12C22,15.86 18.86,19 15,19Z"}"></ha-svg-icon> ${this.hass.localize("ui.panel.lovelace.editor.edit_card.duplicate")} </ha-list-item> `} ${this.noMove?a.Ld:a.dy` <ha-list-item graphic="icon" @click="${this._handleAction}" .action="${"copy"}"> <ha-svg-icon slot="graphic" .path="${"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}"></ha-svg-icon> ${this.hass.localize("ui.panel.lovelace.editor.edit_card.copy")} </ha-list-item> <ha-list-item graphic="icon" @click="${this._handleAction}" .action="${"cut"}"> <ha-svg-icon slot="graphic" .path="${"M19,3L13,9L15,11L22,4V3M12,12.5A0.5,0.5 0 0,1 11.5,12A0.5,0.5 0 0,1 12,11.5A0.5,0.5 0 0,1 12.5,12A0.5,0.5 0 0,1 12,12.5M6,20A2,2 0 0,1 4,18C4,16.89 4.9,16 6,16A2,2 0 0,1 8,18C8,19.11 7.1,20 6,20M6,8A2,2 0 0,1 4,6C4,4.89 4.9,4 6,4A2,2 0 0,1 8,6C8,7.11 7.1,8 6,8M9.64,7.64C9.87,7.14 10,6.59 10,6A4,4 0 0,0 6,2A4,4 0 0,0 2,6A4,4 0 0,0 6,10C6.59,10 7.14,9.87 7.64,9.64L10,12L7.64,14.36C7.14,14.13 6.59,14 6,14A4,4 0 0,0 2,18A4,4 0 0,0 6,22A4,4 0 0,0 10,18C10,17.41 9.87,16.86 9.64,16.36L12,14L19,21H22V20L9.64,7.64Z"}"></ha-svg-icon> ${this.hass.localize("ui.panel.lovelace.editor.edit_card.cut")} </ha-list-item> `} ${this.noDuplicate&&this.noEdit&&this.noMove?a.Ld:a.dy`<li divider role="separator"></li>`} <ha-list-item graphic="icon" class="warning" @click="${this._handleAction}" .action="${"delete"}"> ${this.hass.localize("ui.panel.lovelace.editor.edit_card.delete")} <ha-svg-icon class="warning" slot="graphic" .path="${"M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"}"></ha-svg-icon> </ha-list-item> </ha-button-menu> </div> `}_handleOpened(){this._menuOpened=!0}_handleClosed(){this._menuOpened=!1}_handleOverlayClick(e){e.defaultPrevented||"keydown"===e.type&&"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),this._editCard())}_handleAction(e){switch(e.currentTarget.action){case"edit":this._editCard();break;case"duplicate":this._duplicateCard();break;case"copy":this._copyCard();break;case"cut":this._cutCard();break;
7case"delete":this._deleteCard()}}_duplicateCard(){(0,c.B)(this,"ll-duplicate-card",{path:this.path})}_editCard(){(0,c.B)(this,"ll-edit-card",{path:this.path})}_cutCard(){(0,c.B)(this,"ll-copy-card",{path:this.path}),(0,c.B)(this,"ll-delete-card",{path:this.path,silent:!0})}_copyCard(){(0,c.B)(this,"ll-copy-card",{path:this.path})}_deleteCard(){(0,c.B)(this,"ll-delete-card",{path:this.path,silent:!1})}static get styles(){return[l.Qx,a.iv`.card-overlay{position:absolute;opacity:0;pointer-events:none;inset:0;display:flex;align-items:center;justify-content:center;transition:opacity 180ms ease-in-out}.card-overlay.visible{opacity:1;pointer-events:auto}.card-wrapper{position:relative;height:100%;z-index:0}.control{outline:0!important;cursor:pointer;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:var(--ha-card-border-radius,12px);z-index:0}.control-overlay{position:absolute;inset:0;opacity:.8;background-color:var(--primary-background-color);border:1px solid var(--divider-color);border-radius:var(--ha-card-border-radius,12px);z-index:0}.control ha-svg-icon{display:flex;position:relative;color:var(--primary-text-color);border-radius:50%;padding:8px;background:var(--secondary-background-color);--mdc-icon-size:20px}.more{position:absolute;right:-6px;top:-6px;inset-inline-end:-6px;inset-inline-start:initial}.more ha-icon-button{cursor:pointer;border-radius:50%;background:var(--secondary-background-color);--mdc-icon-button-size:32px;--mdc-icon-size:20px}`]}constructor(...e){super(...e),this.hiddenOverlay=!1,this.noEdit=!1,this.noDuplicate=!1,this.noMove=!1,this._menuOpened=!1,this._hover=!1,this._focused=!1,this._touchStarted=!1,this._documentClicked=e=>{this._hover=e.composedPath().includes(this),document.removeEventListener("click",this._documentClicked)}}}(0,o.__decorate)([(0,r.Cb)({attribute:!1})],u.prototype,"hass",void 0),(0,o.__decorate)([(0,r.Cb)({attribute:!1})],u.prototype,"lovelace",void 0),(0,o.__decorate)([(0,r.Cb)({type:Array})],u.prototype,"path",void 0),(0,o.__decorate)([(0,r.Cb)({type:Boolean,attribute:"hidden-overlay"})],u.prototype,"hiddenOverlay",void 0),(0,o.__decorate)([(0,r.Cb)({type:Boolean,attribute:"no-edit"})],u.prototype,"noEdit",void 0),(0,o.__decorate)([(0,r.Cb)({type:Boolean,attribute:"no-duplicate"})],u.prototype,"noDuplicate",void 0),(0,o.__decorate)([(0,r.Cb)({type:Boolean,attribute:"no-move"})],u.prototype,"noMove",void 0),(0,o.__decorate)([(0,r.SB)()],u.prototype,"_menuOpened",void 0),(0,o.__decorate)([(0,r.SB)()],u.prototype,"_hover",void 0),(0,o.__decorate)([(0,r.SB)()],u.prototype,"_focused",void 0),u=(0,o.__decorate)([(0,r.Mo)("hui-card-edit-mode")],u);var v=i(20434);const g={delay:100,delayOnTouchOnly:!0,direction:"vertical",invertedSwapThreshold:.7,group:"card"},y={...g,sort:!1,group:{name:"card",put:!1}};class _ extends a.oi{setConfig(e){this._config=e}_getKey(e){return this._cardConfigKeys.has(e)||"object"!=typeof e||this._cardConfigKeys.set(e,Math.random().toString()),this._cardConfigKeys.get(e)}render(){if(!this.cards||!this._config)return a.Ld;const e=this._config?.cards??[],t=Boolean(this.lovelace?.editMode&&!this.isStrategy),i=this.importOnly?y:g;return a.dy` <ha-sortable .disabled="${!t}" @drag-start="${this._dragStart}" @drag-end="${this._dragEnd}" draggable-selector=".card" .rollback="${!1}" .options="${i}" @item-moved="${this._cardMoved}" @item-added="${this._cardAdded}" @item-removed="${this._cardRemoved}" invert-swap> <div class="container ${(0,s.$)({"edit-mode":t,"import-only":this.importOnly})}"> ${(0,n.r)(e,e=>this._getKey(e),(e,i)=>{const o=this.cards[i];o.layout="grid";const r=o.getGridOptions(),{rows:n,columns:c}=(0,h.DM)(r),l=[this.viewIndex,this.index,i];return a.dy` <div style="${(0,d.V)({"--column-size":"number"==typeof c?c:void 0,"--row-size":"number"==typeof n?n:void 0})}" class="card ${(0,s.$)({"fit-rows":"number"==typeof n,"full-width":"full"===c})}" .sortableData="${l}"> ${t?a.dy` <hui-card-edit-mode .hass="${this.hass}" .lovelace="${this.lovelace}" .path="${l}" .hiddenOverlay="${this._dragging}" .noEdit="${this.importOnly}" .noDuplicate="${this.importOnly}"> ${o} </hui-card-edit-mode> `:o} </div> `})} ${t&&!this.importOnly?a.dy` <button class="add" @click="${this._addCard}" aria-label="${this.hass.localize("ui.panel.lovelace.editor.section.add_card")}" .title="${this.hass.localize("ui.panel.lovelace.editor.section.add_card")}"> <ha-ripple></ha-ripple> <ha-svg-icon .path="${"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}"></ha-svg-icon> </button> `:a.Ld} </div> </ha-sortable> `}_cardMoved(e){e.stopPropagation();const{oldIndex:t,newIndex:i}=e.detail,o=(0,v.wI)(this.lovelace.config,[this.viewIndex,this.index,t],[this.viewIndex,this.index,i]);this.lovelace.saveConfig(o)}_cardAdded(e){const{index:t,data:i}
7=e.detail,o=i,a=[this.viewIndex,this.index,t],r=(0,v.wI)(this.lovelace.config,o,a);this.lovelace.saveConfig(r)}_cardRemoved(e){e.stopPropagation()}_dragStart(){this._dragging=!0}_dragEnd(){this._dragging=!1}_addCard(){(0,c.B)(this,"ll-create-card",{suggested:["tile","heading"]})}static get styles(){return[l.Qx,a.iv`:host{--base-column-count:12;--row-gap:var(--ha-section-grid-row-gap, 8px);--column-gap:var(--ha-section-grid-column-gap, 8px);--row-height:var(--ha-section-grid-row-height, 56px);display:flex;flex-direction:column;gap:var(--row-gap)}.container{--grid-column-count:calc( 8 var(--base-column-count) * var(--column-span, 1) 9 );display:grid;grid-template-columns:repeat(var(--grid-column-count),minmax(0,1fr));grid-auto-rows:auto;row-gap:var(--row-gap);column-gap:var(--column-gap);padding:0;margin:0 auto}.container.edit-mode{padding:8px;border-radius:var(--ha-card-border-radius,12px);border-start-end-radius:0;border:2px dashed var(--divider-color);min-height:var(--row-height)}.container.import-only{border:none;padding:0!important}.card{border-radius:var(--ha-card-border-radius,12px);position:relative;grid-row:span var(--row-size,1);grid-column:span min(var(--column-size,1),var(--grid-column-count))}.container.edit-mode .card{min-height:calc((var(--row-height) - var(--row-gap))/ 2)}.card.fit-rows{height:calc((var(--row-size,1) * (var(--row-height) + var(--row-gap))) - var(--row-gap))}.card.full-width{grid-column:1/-1}.card:has(> *){display:block}.card:has(> [hidden]){display:none}.add{position:relative;outline:0;grid-row:span 1;grid-column:span 3;background:0 0;cursor:pointer;border-radius:var(--ha-card-border-radius,12px);border:2px dashed var(--primary-color);height:var(--row-height);order:1;--ha-ripple-color:var(--primary-color);--ha-ripple-hover-opacity:0.04;--ha-ripple-pressed-opacity:0.12}.add:focus{border-style:solid}.sortable-ghost{border-radius:var(--ha-card-border-radius,12px)}`]}constructor(...e){super(...e),this.isStrategy=!1,this.cards=[],this.importOnly=!1,this._dragging=!1,this._cardConfigKeys=new WeakMap}}(0,o.__decorate)([(0,r.Cb)({attribute:!1})],_.prototype,"hass",void 0),(0,o.__decorate)([(0,r.Cb)({attribute:!1})],_.prototype,"lovelace",void 0),(0,o.__decorate)([(0,r.Cb)({type:Number})],_.prototype,"index",void 0),(0,o.__decorate)([(0,r.Cb)({attribute:!1,type:Number})],_.prototype,"viewIndex",void 0),(0,o.__decorate)([(0,r.Cb)({attribute:!1})],_.prototype,"isStrategy",void 0),(0,o.__decorate)([(0,r.Cb)({attribute:!1})],_.prototype,"cards",void 0),(0,o.__decorate)([(0,r.Cb)({attribute:"import-only",type:Boolean})],_.prototype,"importOnly",void 0),(0,o.__decorate)([(0,r.SB)()],_.prototype,"_config",void 0),(0,o.__decorate)([(0,r.SB)()],_.prototype,"_dragging",void 0),_=(0,o.__decorate)([(0,r.Mo)("hui-grid-section")],_);var m=i(78879);const b=new Set(["grid"]),w={},f=e=>(0,m.Tw)("section",e,b,w)},2313:function(e,t,i){i.d(t,{F:()=>r,L:()=>a});var o=i(39884);const a=()=>Promise.all([i.e("73614"),i.e("75696"),i.e("15634"),i.e("61523"),i.e("71383"),i.e("62496"),i.e("83980"),i.e("26686")]).then(i.bind(i,63143)),r=(e,t)=>{(0,o.B)(e,"show-dialog",{dialogTag:"hui-dialog-create-card",dialogImport:a,dialogParams:t})}},68162:function(e,t,i){i.d(t,{I:()=>a,x:()=>r});var o=i(39884);const a=()=>Promise.all([i.e("75696"),i.e("61523"),i.e("34236"),i.e("28079")]).then(i.bind(i,2131)),r=(e,t)=>{(0,o.B)(e,"show-dialog",{dialogTag:"hui-dialog-edit-card",dialogImport:a,dialogParams:t})}},20434:function(e,t,i){i.d(t,{BM:()=>k,BN:()=>n,F$:()=>b,K_:()=>_,LG:()=>d,PT:()=>y,Rw:()=>w,TJ:()=>h,Uo:()=>u,YI:()=>v,Z0:()=>s,f1:()=>c,kg:()=>C,ll:()=>f,mA:()=>g,qG:()=>m,vl:()=>l,vs:()=>E,wI:()=>p,xy:()=>x});i(81738),i(94814),i(6989),i(72489);var o=i(80044),a=i(52802),r=i(71796);const s=(e,t,i)=>{const o=(0,r.Cs)("cards",e,t),a=o?[...o,i]:[i];return(0,r.Ty)("cards",e,t,a)},n=(e,t,i)=>{const o=(0,r.Cs)("cards",e,t),a=o?[...o,...i]:[...i];return(0,r.Ty)("cards",e,t,a)},d=(e,t,i)=>{const{cardIndex:o}=(0,r.lJ)(t),a=(0,r.Kx)(t),s=((0,r.Cs)("cards",e,a)??[]).map((e,t)=>t===o?i:e);return(0,r.Ty)("cards",e,a,s)},c=(e,t)=>{const{cardIndex:i}=(0,r.lJ)(t),o=(0,r.Kx)(t),a=((0,r.Cs)("cards",e,o)??[]).filter((e,t)=>
9t!==i);return(0,r.Ty)("cards",e,o,a)},l=(e,t,i)=>{const{cardIndex:o}=(0,r.lJ)(t),a=(0,r.Kx)(t),s=(0,r.Cs)("cards",e,a),n=s?[...s]:[],d=o,c=Math.max(Math.min(i,n.length-1),0),l=n[d];n.splice(d,1),n.splice(c,0,l);return(0,r.Ty)("cards",e,a,n)},h=(e,t,i)=>{const{cardIndex:o,viewIndex:a,sectionIndex:n}=(0,r.lJ)(t),{viewIndex:d,sectionIndex:l}=(0,r.jb)(i);if(a===d&&n===l)throw new Error("You cannot move a card to the view or section it is in.");const h=(0,r.Kx)(t),p=(0,r.Cs)("cards",e,h)[o];let u=s(e,i,p);return u=c(u,t),u},p=(e,t,i)=>{const{cardIndex:o}=(0,r.lJ)(t),a=(0,r.Kx)(t),s=(0,r.Cs)("cards",e,a)[o];let n=c(e,t);return n=((e,t,i)=>{const{cardIndex:o}=(0,r.lJ)(t),a=(0,r.Kx)(t),s=(0,r.Cs)("cards",e,a),n=s?[...s.slice(0,o),i,...s.slice(o)]:[i];return(0,r.Ty)("cards",e,a,n)})(n,i,s),n},u=(e,t,i,o=!1)=>{if(i.path&&t.views.some(e=>e.path===i.path)){if(!o)throw new Error(e.localize("ui.panel.lovelace.editor.edit_view.error_same_url"));i={...i,path:`${i.path}-2`}}return{...t,views:t.views.concat(i)}},v=(e,t,i,o)=>{if(o.path&&t.views.some((e,t)=>e.path===o.path&&t!==i))throw new Error(e.localize("ui.panel.lovelace.editor.edit_view.error_same_url"));return{...t,views:t.views.map((e,t)=>t===i?o:e)}},g=(e,t,i)=>{const o=e.views[t],a=e.views[i];return{...e,views:e.views.map((e,r)=>r===i?o:r===t?a:e)}},y=(e,t)=>({...e,views:e.views.filter((e,i)=>i!==t)}),_=(e,t,i,o)=>{const a=t.views[o];return[y(t,o),u(e,i,a,!0)]},m=(e,t,i)=>{const o=(0,r.an)(e,[t]);if((0,a.s)(o))throw new Error("Deleting sections in a strategy is not supported.");const s=o.sections?[...o.sections,i]:[i];return(0,r.Qr)(e,[t],{...o,sections:s})},b=(e,t,i)=>{const o=(0,r.an)(e,[t]);if((0,a.s)(o))throw new Error("Deleting sections in a strategy is not supported.");const s=o.sections?.filter((e,t)=>t!==i);return(0,r.Qr)(e,[t],{...o,sections:s})},w=(e,t,i)=>{const o=(0,r.an)(e,t);let s=b(e,t[0],t[1]);return s=((e,t,i,o)=>{const s=(0,r.an)(e,[t]);if((0,a.s)(s))throw new Error("Inserting sections in a strategy is not supported.");const n=s.sections?[...s.sections.slice(0,i),o,...s.sections.slice(i)]:[o];return(0,r.Qr)(e,[t],{...s,sections:n})})(s,i[0],i[1],o),s},f=(e,t,i)=>{const o=(0,r.Cs)("badges",e,t),a=o?[...o,i]:[i];return(0,r.Ty)("badges",e,t,a)},x=(e,t,i)=>{const o=(0,r.Cs)("badges",e,t),a=o?[...o,...i]:[...i];return(0,r.Ty)("badges",e,t,a)},C=(e,t,i)=>{const{cardIndex:o}=(0,r.lJ)(t),a=(0,r.Kx)(t),s=((0,r.Cs)("badges",e,a)??[]).map((e,t)=>t===o?i:e);return(0,r.Ty)("badges",e,a,s)},E=(e,t)=>{const{cardIndex:i}=(0,r.lJ)(t),o=(0,r.Kx)(t),a=((0,r.Cs)("badges",e,o)??[]).filter((e,t)=>t!==i);return(0,r.Ty)("badges",e,o,a)},k=(e,t,i)=>{const{cardIndex:a}=(0,r.lJ)(t),s=(0,r.Kx)(t),n=(0,r.Cs)("badges",e,s)[a];let d=E(e,t);return d=((e,t,i)=>{const{cardIndex:o}=(0,r.lJ)(t),a=(0,r.Kx)(t),s=(0,r.Cs)("badges",e,a),n=s?[...s.slice(0,o),i,...s.slice(o)]:[i];return(0,r.Ty)("badges",e,a,n)})(d,i,(0,o.d)(n)),d}},26108:function(e,t,i){i.d(t,{O:()=>a});var o=i(20434);async function a(e,t,i){try{const{path:a,silent:r}=i,s=t.config,n=(0,o.f1)(s,a);if(await t.saveConfig(n),r)return;const d=async()=>{t.saveConfig(s)};t.showToast({message:e.localize("ui.common.successfully_deleted"),duration:8e3,action:{action:d,text:e.localize("ui.common.undo")}})}catch(i){console.error(i),t.showToast({message:e.localize("ui.common.deleting_failed")})}}},71796:function(e,t,i){i.d(t,{Cs:()=>h,Kx:()=>n,Qr:()=>c,Ty:()=>l,an:()=>d,jb:()=>s,lJ:()=>r});i(81738),i(6989);var o=i(69887),a=i(52802);const r=e=>2===e.length?{viewIndex:e[0],cardIndex:e[1]}:{viewIndex:e[0],sectionIndex:e[1],cardIndex:e[2]},s=e=>1===e.length?{viewIndex:e[0]}:{viewIndex:e[0],sectionIndex:e[1]},n=e=>e.slice(0,-1),d=(e,t)=>{const{viewIndex:i,sectionIndex:o}=s(t),r=e.views[i];if(!r)throw new Error("View does not exist");if(void 0===o)return r;if((0,a.s)(r))throw new Error("Can not find section in a strategy view");const n=r.sections?.[o];if(!n)throw new Error("Section does not exist");return n},c=(e,t,i)=>{const{viewIndex:o,sectionIndex:r}=s(t);let n=!1;const d=e.views.map((e,t)=>{if(t!==o)return e;if(void 0===r)return n=!0,i;if((0,a.s)(e))throw new Error("Can not update section in a strategy view");if(void 0===e.sections)throw new Error("Section does not exist");const s=e.sections.map((e,t)=>t!==r?e:(n=!0,i));return{...e,sections:s}});if(!n)throw new Error("Can not update cards in a non-existing view/section");return{...e,views:d}},l=(e,t,i,r)=>{const{viewIndex:n,sectionIndex:d}=s(i);let c=!1;const l=t.views.map((t,i)=>{if(i!==n)return t;if((0,a.s)(t))throw new Error(`Can not update ${e} in a strategy view`);
9if(void 0===d)return c=!0,{...t,[e]:r};if(void 0===t.sections)throw new Error("Section does not exist");const s=t.sections.map((t,i)=>{if(i!==d)return t;if((0,o.N)(t))throw new Error(`Can not update ${e} in a strategy section`);return c=!0,{...t,[e]:r}});return{...t,sections:s}});if(!c)throw new Error(`Can not update ${e} in a non-existing view/section`);return{...t,views:l}},h=(e,t,i)=>{const{viewIndex:r,sectionIndex:n}=s(i),d=t.views[r];if(!d)throw new Error("View does not exist");if((0,a.s)(d))throw new Error("Can not find cards in a strategy view");if(void 0===n)return d[e];const c=d.sections?.[n];if(!c)throw new Error("Section does not exist");if((0,o.N)(c))throw new Error("Can not find cards in a strategy section");if("cards"===e)return c[e];throw new Error(`${e} is not supported in section`)}},41737:function(e,t,i){i.d(t,{z:()=>o});const o="grid"},53153:function(e,t,i){i.a(e,async function(e,t){try{i(81738),i(22960),i(6989);var o=i(73742),a=i(1521),r=i(59048),s=i(26292),n=i(9924),d=i(39884),c=(i(993),i(69887)),l=i(72456),h=i(91320),p=i(38168),u=i(2313),v=i(68162),g=i(20434),y=i(26108),_=i(71796),m=i(36748),b=i(41737),w=e([l]);l=(w.then?(await w)():w)[0];class f extends r.fl{_createCardElement(e){const t=document.createElement("hui-card");return t.hass=this.hass,t.preview=this.preview,t.config=e,t.addEventListener("card-updated",e=>{e.stopPropagation(),this._cards=[...this._cards]}),t.load(),t}createRenderRoot(){return this}willUpdate(e){super.willUpdate(e);const t=e.get("config");!e.has("config")||t&&this.config===t||this._initializeConfig()}disconnectedCallback(){super.disconnectedCallback(),this._clearMediaQueries()}connectedCallback(){super.connectedCallback(),this._listenMediaQueries(),this._updateElement()}update(e){super.update(e),this._layoutElement&&(e.has("hass")&&(this._cards.forEach(e=>{e.hass=this.hass}),this._layoutElement.hass=this.hass),e.has("lovelace")&&(this._layoutElement.lovelace=this.lovelace),e.has("preview")&&(this._layoutElement.preview=this.preview,this._cards.forEach(e=>{e.preview=this.preview})),e.has("importOnly")&&(this._layoutElement.importOnly=this.importOnly),e.has("_cards")&&(this._layoutElement.cards=this._cards),(e.has("hass")||e.has("preview"))&&this._updateElement())}_clearMediaQueries(){this._listeners.forEach(e=>e()),this._listeners=[]}_listenMediaQueries(){if(this._clearMediaQueries(),!this.config?.visibility)return;const e=this.config.visibility,t=1===e.length&&"screen"===e[0].condition&&null!=e[0].media_query;this._listeners=(0,h.av)(this.config.visibility,e=>{this._updateElement(t&&e)})}async _initializeConfig(){let e={...this.config},t=!1;(0,c.N)(e)&&(t=!0,e=await(0,m.dl)(e,this.hass)),e={...e,type:e.type||b.z};let i=!1;if(this._layoutElement&&this._layoutElementType===e.type||(i=!0,this._createLayoutElement(e)),this._createCards(e),this._layoutElement.isStrategy=t,this._layoutElement.hass=this.hass,this._layoutElement.lovelace=this.lovelace,this._layoutElement.index=this.index,this._layoutElement.viewIndex=this.viewIndex,this._layoutElement.cards=this._cards,i){for(;this.lastChild;)this.removeChild(this.lastChild);this._updateElement()}}_updateElement(e){if(!this._layoutElement)return;const t=e||this.preview||!this.config.visibility||(0,h.Ec)(this.config.visibility,this.hass);this.hidden!==!t&&(this.style.setProperty("display",t?"":"none"),this.toggleAttribute("hidden",!t),(0,d.B)(this,"section-visibility-changed",{value:t})),!t&&this._layoutElement.parentElement?this.removeChild(this._layoutElement):t&&!this._layoutElement.parentElement&&this.appendChild(this._layoutElement)}_createLayoutElement(e){this._layoutElement=(0,p.Z)(e),this._layoutElementType=e.type,this._layoutElement.addEventListener("ll-create-card",e=>{e.stopPropagation(),this.lovelace&&(0,u.F)(this,{lovelaceConfig:this.lovelace.config,saveConfig:this.lovelace.saveConfig,path:[this.viewIndex,this.index],suggestedCards:e.detail?.suggested})}),this._layoutElement.addEventListener("ll-edit-card",e=>{if(e.stopPropagation(),!this.lovelace)return;const{cardIndex:t}=(0,_.lJ)(e.detail.path),i=this.config;if((0,c.N)(i))return;const o=i.cards[t];(0,v.x)(this,{lovelaceConfig:this.lovelace.config,saveCardConfig:async e=>{const i=(0,g.LG)(this.lovelace.config,[this.viewIndex,this.index,t],e);await this.lovelace.saveConfig(i)},sectionConfig:i,cardConfig:o})}),this._layoutElement.addEventListener("ll-delete-card",e=>{e.stopPropagation(),this.lovelace&&(0,y.O)(this.hass,this.lovelace,e.detail)}),this._layoutElement.addEventListener("ll-duplicate-card",e=>{if(e.stopPropagation(),!this.lovelace)return;const{cardIndex:t}=(0,_.lJ)(e.detail.path),i=this.config;if((0,c.N)(i))return;const o=i.cards[t];(0,v.x)(this,{lovelaceConfig:this.lovelace.config,saveCardConfig:async e=>{const t=(0,g.Z0)(this.lovelace.config,[this.viewIndex,this.index],e);await this.lovelace.saveConfig(t)},cardConfig:o,sectionConfig:i,isNew:!0})}),this._layoutElement.addEventListener("ll-copy-card",e=>{if(e.stopPropagation(),!this.lovelace)return;const{cardIndex:t}=(0,_.lJ)(e.detail.path),i=this.config;if((0,c.N)(i))return;const o=i.cards[t];this._clipboard=(0,a.Z)(o)})}_createCards(e){e&&e.cards&&Array.isArray(e.cards)?this._cards=e.cards.map(e=>this._createCardElement(e)):this._cards=[]}constructor(...e){super(...e),this.preview=!1,this.importOnly=!1,this._cards=[],this._listeners=[]}}(0,o.__decorate)([(0,s.Cb)({attribute:!1})],f.prototype,"hass",void 0),(0,o.__decorate)([(0,s.Cb)({attribute:!1})],f.prototype,"config",void 0),(0,o.__decorate)([(0,s.Cb)({attribute:!1})],f.prototype,"lovelace",void 0),(0,o.__decorate)([(0,s.Cb)({type:Boolean,reflect:!0})],f.prototype,"preview",void 0),(0,o.__decorate)([(0,s.Cb)({type:Boolean,attribute:"import-only"})],f.prototype,"importOnly",void 0),(0,o.__decorate)([(0,s.Cb)({type:Number})],f.prototype,"index",void 0),(0,o.__decorate)([(0,s.Cb)({attribute:!1,type:Number})],f.prototype,"viewIndex",void 0),(0,o.__decorate)([(0,s.SB)()],f.prototype,"_cards",void 0),(0,o.__decorate)([(0,n.t)({key:"dashboardCardClipboard",state:!1,subscribe:!1,storage:"sessionStorage"})],f.prototype,"_clipboard",void 0),f=(0,o.__decorate)([(0,s.Mo)("hui-section")],f),t()}catch(e){t(e)}})},36748:function(e,t,i){i.d(t,{ar:()=>h,dl:()=>p,lN:()=>d,mQ:()=>u,to:()=>l});i(81738),i(6989);var o=i(25151),a=i(52802),r=i(55769);const s="custom:",n={dashboard:{"original-states":()=>i.e("37154").then(i.bind(i,33510)),map:()=>i.e("91159").then(i.bind(i,11531)),iframe:()=>i.e("80048").then(i.bind(i,54512)),areas:()=>
9Promise.all([i.e("57530"),i.e("27195"),i.e("61617"),i.e("5417"),i.e("25587")]).then(i.bind(i,63982))},view:{"original-states":()=>Promise.all([i.e("88688"),i.e("10868"),i.e("62958"),i.e("64727"),i.e("39280"),i.e("70143")]).then(i.bind(i,20565)),energy:()=>Promise.all([i.e("88688"),i.e("10868"),i.e("62958"),i.e("31459"),i.e("39280"),i.e("52094")]).then(i.bind(i,53767)),map:()=>i.e("76506").then(i.bind(i,51100)),iframe:()=>i.e("40498").then(i.bind(i,4274)),area:()=>Promise.all([i.e("57530"),i.e("27195"),i.e("61617"),i.e("5417"),i.e("35604")]).then(i.bind(i,78590)),"areas-overview":()=>Promise.all([i.e("57530"),i.e("39432"),i.e("27195"),i.e("61617"),i.e("5417"),i.e("97194")]).then(i.bind(i,2278))},section:{}},d=async(e,t)=>{if(t in n[e]){await n[e][t]();const i=`${t}-${e}-strategy`;return customElements.get(i)}if(!t.startsWith(s))throw new Error("Unknown strategy");const i=`ll-strategy-${t.slice(7)}`,o=`ll-strategy-${e}-${t.slice(7)}`;if(!0===await Promise.race([customElements.whenDefined(i),customElements.whenDefined(o),new Promise(e=>{setTimeout(()=>e(!0),5e3)})]))throw new Error(`Timeout waiting for strategy element ${o} to be registered`);return customElements.get(o)??customElements.get(i)},c=async(e,t,i,o)=>{const a=i.type;if(!a)return t("No strategy type found");try{const t=await d(e,a);if((0,r.sR)(t)){if("dashboard"===e&&"generateDashboard"in t)return await t.generateDashboard({config:{strategy:i,views:[]},hass:o});if("view"===e&&"generateView"in t)return await t.generateView({config:{views:[]},view:{strategy:i},hass:o})}const s=(0,r.n2)(i);return await t.generate(s,o)}catch(e){return"timeout"!==e.message&&console.error(e),t(e)}},l=async(e,t)=>{const{strategy:i,...o}=e;return{...o,...await c("dashboard",e=>({views:[{title:"Error",cards:[{type:"markdown",content:`Error loading the dashboard strategy:\n> ${e}`}]}]}),i,t)}},h=async(e,t)=>{const{strategy:i,...o}=e;return{...o,...await c("view",e=>({cards:[{type:"markdown",content:`Error loading the view strategy:\n> ${e}`}]}),i,t)}},p=async(e,t)=>{const{strategy:i,...o}=e;return{...o,...await c("section",e=>({cards:[{type:"markdown",content:`Error loading the section strategy:\n> ${e}`}]}),i,t)}},u=async(e,t)=>{const i=(0,o.Tx)(e)?await l(e,t):{...e};return i.views=await Promise.all(i.views.map(async e=>{const i=(0,a.s)(e)?await h(e,t):{...e};return i.sections&&(i.sections=await Promise.all(i.sections.map(async e=>(0,a.s)(e)?await p(e,t):{...e}))),i})),i}},55769:function(e,t,i){i.d(t,{n2:()=>r,sR:()=>o,ug:()=>a});const o=e=>!("generate"in e),a=e=>2===Object.keys(e).length&&"options"in e&&"object"==typeof e.options,r=e=>{if(!a(e))return e;const t={...e,...e.options};return delete t.options,t}}}; 10//# sourceMappingURL=1502.311228a958fbf711.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.