UNPKG

iobroker.lovelace

Version:

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

1 lines 19.9 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[64280],{66033:function(e,t,o){o.d(t,{L:function(){return i}});const i=(e,t)=>{const o=e.floor_id;return{area:e,floor:(o?t[o]:void 0)||null}}},14923:function(e,t,o){o.a(e,async function(e,t){try{o(18111),o(61701),o(3362),o(62953);var i=o(40445),a=o(5124),s=o(67576),n=o(1087),r=o(66033),d=(o(11382),o(77729)),l=(o(67094),e([d]));d=(l.then?(await l)():l)[0];let h,c=e=>e;const p="M20 2H4C2.9 2 2 2.9 2 4V20C2 21.11 2.9 22 4 22H20C21.11 22 22 21.11 22 20V4C22 2.9 21.11 2 20 2M4 6L6 4H10.9L4 10.9V6M4 13.7L13.7 4H18.6L4 18.6V13.7M20 18L18 20H13.1L20 13.1V18M20 10.3L10.3 20H5.4L20 5.4V10.3Z";class u extends a.WF{render(){var e,t,o,i;const s=Object.values(this.hass.areas).map(e=>{var t;const{floor:o}=(0,r.L)(e,this.hass.floors);return{value:e.area_id,label:e.name,icon:null!==(t=e.icon)&&void 0!==t?t:void 0,iconPath:p,description:null==o?void 0:o.name}}),n={order:null!==(e=null===(t=this.value)||void 0===t?void 0:t.order)&&void 0!==e?e:[],hidden:null!==(o=null===(i=this.value)||void 0===i?void 0:i.hidden)&&void 0!==o?o:[]};return(0,a.qy)(h||(h=c` <ha-expansion-panel outlined .header="${0}" .expanded="${0}"> <ha-svg-icon slot="leading-icon" .path="${0}"></ha-svg-icon> <ha-items-display-editor .items="${0}" .value="${0}" @value-changed="${0}" .showNavigationButton="${0}"></ha-items-display-editor> </ha-expansion-panel> `),this.label,this.expanded,p,s,n,this._areaDisplayChanged,this.showNavigationButton)}async _areaDisplayChanged(e){var t,o;e.stopPropagation();const i=e.detail.value,a=Object.assign(Object.assign({},this.value),i);0===(null===(t=a.hidden)||void 0===t?void 0:t.length)&&delete a.hidden,0===(null===(o=a.order)||void 0===o?void 0:o.length)&&delete a.order,(0,n.r)(this,"value-changed",{value:a})}constructor(...e){super(...e),this.expanded=!1,this.disabled=!1,this.required=!1,this.showNavigationButton=!1}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)()],u.prototype,"label",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],u.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)()],u.prototype,"helper",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],u.prototype,"expanded",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],u.prototype,"disabled",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],u.prototype,"required",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,attribute:"show-navigation-button"})],u.prototype,"showNavigationButton",void 0),u=(0,i.Cg)([(0,s.EM)("ha-areas-display-editor")],u),t()}catch(h){t(h)}})},11382:function(e,t,o){o(3362),o(62953);var i=o(40445),a=o(5124),s=o(67576),n=o(6412),r=o(1087),d=o(12587);o(67094);let l,h,c,p,u=e=>e;class v extends a.WF{render(){const e=this.noCollapse?a.s6:(0,a.qy)(l||(l=u` <ha-svg-icon .path="${0}" class="summary-icon ${0}"></ha-svg-icon> `),"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",(0,n.H)({expanded:this.expanded}));return(0,a.qy)(h||(h=u` <div class="top ${0}"> <div id="summary" class="${0}" @click="${0}" @keydown="${0}" @focus="${0}" @blur="${0}" role="button" tabindex="${0}" aria-expanded="${0}" aria-controls="sect1" part="summary"> ${0} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${0} <slot class="secondary" name="secondary">${0}</slot> </div> </slot> <slot name="event"></slot> ${0} <slot name="icons"></slot> </div> </div> <div class="container ${0}" @transitionend="${0}" role="region" aria-labelledby="summary" aria-hidden="${0}" tabindex="-1"> ${0} </div> `),(0,n.H)({expanded:this.expanded}),(0,n.H)({noCollapse:this.noCollapse}),this._toggleContainer,this._toggleContainer,this._focusChanged,this._focusChanged,this.noCollapse?-1:0,this.expanded,this.leftChevron?e:a.s6,this.header,this.secondary,this.leftChevron?a.s6:e,(0,n.H)({expanded:this.expanded}),this._handleTransitionEnd,!this.expanded,this._showContent?(0,a.qy)(c||(c=u`<slot></slot>`)):"")}willUpdate(e){super.willUpdate(e),e.has("expanded")&&(this._showContent=this.expanded,setTimeout(()=>{this._container.style.overflow=this.expanded?"initial":"hidden"},300))}_handleTransitionEnd(){this._container.style.removeProperty("height"),this._container.style.overflow=this.expanded?"initial":"hidden",this._showContent=this.expanded}async _toggleContainer(e){if(e.defaultPrevented)return;if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;if(e.preventDefault(),this.noCollapse)return;const t=!this.expanded;(0,r.r)(this,"expanded-will-change",{expanded:t}),this._container.style.overflow="hidden",t&&(this._showContent=!0,await(0,d.E)());const o=this._container.scrollHeight;this._container.style.height=`${o}px`,t||setTimeout(()=>{this._container.style.height="0px"},0),this.expanded=t,(0,r.r)(this,"expanded-changed",{expanded:this.expanded})}_focusChanged(e){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===e.type)}constructor(...e){super(...e),this.expanded=!1,this.outlined=!1,this.leftChevron=!1,this.noCollapse=!1,this._showContent=this.expanded}}v.styles=(0,a.AH)(p||(p=u`:host{display:block}.top{display:flex;align-items:center;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.top.expanded{border-bottom-left-radius:0px;border-bottom-right-radius:0px}.top.focused{background:var(--input-fill-color)}:host([outlined]){box-shadow:none;border-width:1px;border-style:solid;border-color:var(--outline-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.summary-icon{transition:transform 150ms cubic-bezier(.4, 0, .2, 1);direction:var(--direction);margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;border-radius:var(--ha-border-radius-circle)}#summary:focus-visible ha-svg-icon.summary-icon{background-color:var(--ha-color-fill-neutral-normal-active)}::slotted([slot=leading-icon]),:host([left-chevron]) .summary-icon{margin-left:0;margin-right:8px;margin-inline-start:0;margin-inline-end:8px}#summary{flex:1;display:flex;padding:var(--expansion-panel-summary-padding,0 8px);min-height:48px;align-items:center;cursor:pointer;overflow:hidden;font-weight:var(--ha-font-weight-medium);outline:0}#summary.noCollapse{cursor:default}.summary-icon.expanded{transform:rotate(180deg)}.header,::slotted([slot=header]){flex:1;overflow-wrap:anywhere;color:var(--primary-text-color)}.container{padding:var(--expansion-panel-content-padding,0 8px);overflow:hidden;transition:height .3s cubic-bezier(.4, 0, .2, 1);height:0px}.container.expanded{height:auto}.secondary{display:block;color:var(--secondary-text-color);font-size:var(--ha-font-size-s)}`)),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],v.prototype,"expanded",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],v.prototype,"outlined",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"left-chevron",type:Boolean,reflect:!0})],v.prototype,"leftChevron",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"no-collapse",type:Boolean,reflect:!0})],v.prototype,"noCollapse",void 0),(0,i.Cg)([(0,s.MZ)()],v.prototype,"header",void 0),(0,i.Cg)([(0,s.MZ)()],v.prototype,"secondary",void 0),(0,i.Cg)([(0,s.wk)()],v.prototype,"_showContent",void 0),(0,i.Cg)([(0,s.P)(".container")],v.prototype,"_container",void 0),v=(0,i.Cg)([(0,s.EM)("ha-expansion-panel")],v)},43661:function(e,t,o){o.r(t),o.d(t,{HaIconNext:function(){return r}});o(62953);var i=o(40445),a=o(67576),s=o(63091),n=o(67094);class r extends n.HaSvgIcon{constructor(...e){super(...e),this.path="rtl"===s.G.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}}(0,i.Cg)([(0,a.MZ)()],r.prototype,"path",void 0),r=(0,i.Cg)([(0,a.EM)("ha-icon-next")],r)},77729:function(e,t,o){o.a(e,async function(e,t){try{o(89463),o(74423),o(44114),o(26910),o(18111),o(22489),o(61701),o(3362),o(62953);var i=o(40445),a=o(88696),s=o(5124),n=o(67576),r=o(6412),d=o(63672),l=o(75751),h=o(91450),c=o(22786),p=o(93421),u=o(1087),v=o(57237),g=o(52220),m=(o(47680),o(26300)),y=(o(43661),o(17308),o(2846),o(85938),o(67094),e([m,a]));[m,a]=y.then?(await y)():y;let b,x,_,C,f,w,k,M,$,I,L,S=e=>e;const Z="M21 11H3V9H21V11M21 13H3V15H21V13Z",A="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",B="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";class H extends s.WF{render(){const e=this._allItems(this.items,this.value.hidden,this.value.order),t=this._showIcon.value;return(0,s.qy)(b||(b=S` <ha-sortable draggable-selector=".draggable" handle-selector=".handle" @item-moved="${0}"> <ha-md-list> ${0} </ha-md-list> </ha-sortable> `),this._itemMoved,(0,l.u)(e,e=>e.value,(e,o)=>{const i=!this.value.hidden.includes(e.value),{label:a,value:n,description:l,icon:c,iconPath:p,disableSorting:u,disableHiding:g}=e;return(0,s.qy)(x||(x=S` <ha-md-list-item type="button" @click="${0}" .value="${0}" class="${0}" @keydown="${0}" .idx="${0}"> <span slot="headline">${0}</span> ${0} ${0} ${0} ${0} ${0} ${0} </ha-md-list-item> `),this.showNavigationButton?this._navigate:void 0,n,(0,r.H)({hidden:!i,draggable:i&&!u,"drag-selected":this._dragIndex===o}),i&&!u?this._listElementKeydown:void 0,o,a,l?(0,s.qy)(_||(_=S`<span slot="supporting-text">${0}</span>`),l):s.s6,t?c?(0,s.qy)(C||(C=S` <ha-icon class="icon" .icon="${0}" slot="start"></ha-icon> `),(0,h.T)(c,"")):p?(0,s.qy)(f||(f=S` <ha-svg-icon class="icon" .path="${0}" slot="start"></ha-svg-icon> `),p):s.s6:s.s6,this.showNavigationButton?(0,s.qy)(w||(w=S` <ha-icon-next slot="end"></ha-icon-next> <div slot="end" class="separator"></div> `)):s.s6,this.actionsRenderer?(0,s.qy)(k||(k=S` <div slot="end" @click="${0}"> ${0} </div> `),v.d,this.actionsRenderer(e)):s.s6,i&&g?s.s6:(0,s.qy)(M||(M=S`<ha-icon-button .path="${0}" slot="end" .label="${0}" .value="${0}" @click="${0}" .disabled="${0}"></ha-icon-button>`),i?A:B,this._localize("ui.components.items-display-editor."+(i?"hide":"show"),{label:a}),n,this._toggle,g||!1),i&&!u?(0,s.qy)($||($=S` <ha-svg-icon tabindex="${0}" .idx="${0}" @keydown="${0}" class="handle" .path="${0}" slot="end"></ha-svg-icon> `),(0,d.J)(this.showNavigationButton?"0":void 0),o,this.showNavigationButton?this._dragHandleKeydown:void 0,Z):(0,s.qy)(I||(I=S`<ha-svg-icon slot="end"></ha-svg-icon>`)))}))}_toggle(e){e.stopPropagation(),this._dragIndex=null;const t=e.currentTarget.value,o=this._hiddenItems(this.items,this.value.hidden).map(e=>e.value);o.includes(t)?o.splice(o.indexOf(t),1):o.push(t);const i=this._visibleItems(this.items,o,this.value.order).map(e=>e.value);this.value={hidden:o,order:i},(0,u.r)(this,"value-changed",{value:this.value})}_itemMoved(e){e.stopPropagation();const{oldIndex:t,newIndex:o}=e.detail;this._moveItem(t,o)}_moveItem(e,t){if(e===t)return;const o=this._visibleItems(this.items,this.value.hidden,this.value.order).map(e=>e.value),i=o.splice(e,1)[0];o.splice(t,0,i),this.value=Object.assign(Object.assign({},this.value),{},{order:o}),(0,u.r)(this,"value-changed",{value:this.value})}_navigate(e){const t=e.currentTarget.value;(0,u.r)(this,"item-display-navigate-clicked",{value:t}),e.stopPropagation()}_dragHandleKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),null===this._dragIndex?(this._dragIndex=e.target.idx,this.addEventListener("keydown",this._sortKeydown)):(this.removeEventListener("keydown",this._sortKeydown),this._dragIndex=null))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._sortKeydown)}constructor(...e){super(...e),this.items=[],this.showNavigationButton=!1,this.dontSortVisible=!1,this.value={order:[],hidden:[]},this._dragIndex=null,this._showIcon=new a.P(this,{callback:e=>{var t;return(null===(t=e[0])||void 0===t?void 0:t.contentRect.width)>450}}),this._visibleItems=(0,c.A)((e,t,o)=>{const i=(0,g.u1)(o),a=e.filter(e=>!t.includes(e.value));return this.dontSortVisible?[...a.filter(e=>!e.disableSorting),...a.filter(e=>e.disableSorting)]:a.sort((e,t)=>e.disableSorting&&!t.disableSorting?-1:i(e.value,t.value))}),this._allItems=(0,c.A)((e,t,o)=>[...this._visibleItems(e,t,o),...this._hiddenItems(e,t)]),this._hiddenItems=(0,c.A)((e,t)=>e.filter(e=>t.includes(e.value))),this._maxSortableIndex=(0,c.A)((e,t)=>e.filter(e=>!e.disableSorting&&!t.includes(e.value)).length-1),this._keyActivatedMove=(e,t=!1)=>{const o=this._dragIndex;"ArrowUp"===e.key?this._dragIndex=Math.max(0,this._dragIndex-1):this._dragIndex=Math.min(this._maxSortableIndex(this.items,this.value.hidden),this._dragIndex+1),this._moveItem(o,this._dragIndex),setTimeout(async()=>{var e;await this.updateComplete;const o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(`ha-md-list-item:nth-child(${this._dragIndex+1})`);null==o||o.focus(),t&&(this._dragIndex=null)})},this._sortKeydown=e=>{null===this._dragIndex||"ArrowUp"!==e.key&&"ArrowDown"!==e.key?null!==this._dragIndex&&"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this._dragIndex=null,this.removeEventListener("keydown",this._sortKeydown)):(e.preventDefault(),this._keyActivatedMove(e))},this._listElementKeydown=e=>{!e.altKey||"ArrowUp"!==e.key&&"ArrowDown"!==e.key?(!this.showNavigationButton&&"Enter"===e.key||" "===e.key)&&this._dragHandleKeydown(e):(e.preventDefault(),this._dragIndex=e.target.idx,this._keyActivatedMove(e,!0))}}}H.styles=(0,s.AH)(L||(L=S`:host{display:block}.handle{cursor:move;padding:8px;margin:-8px}.separator{width:1px;background-color:var(--divider-color);height:21px;margin:0 -4px}ha-md-list{padding:0}ha-md-list-item{--md-list-item-top-space:0;--md-list-item-bottom-space:0;--md-list-item-leading-space:8px;--md-list-item-trailing-space:8px;--md-list-item-two-line-container-height:48px;--md-list-item-one-line-container-height:48px}ha-md-list-item.drag-selected{--md-focus-ring-color:rgba(var(--rgb-accent-color), 0.6);border-radius:var(--ha-border-radius-md);outline:solid;outline-color:rgba(var(--rgb-accent-color),.6);outline-offset:-2px;outline-width:2px;background-color:rgba(var(--rgb-accent-color),.08)}ha-md-list-item ha-icon-button{margin-left:-12px;margin-right:-12px}ha-md-list-item.hidden{--md-list-item-label-text-color:var(--disabled-text-color);--md-list-item-supporting-text-color:var(--disabled-text-color)}ha-md-list-item.hidden .icon{color:var(--disabled-text-color)}`)),(0,i.Cg)([(0,n.wk)(),(0,p.IW)()],H.prototype,"_localize",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],H.prototype,"items",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"show-navigation-button"})],H.prototype,"showNavigationButton",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"dont-sort-visible"})],H.prototype,"dontSortVisible",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],H.prototype,"value",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],H.prototype,"actionsRenderer",void 0),(0,i.Cg)([(0,n.wk)()],H.prototype,"_dragIndex",void 0),H=(0,i.Cg)([(0,n.EM)("ha-items-display-editor")],H),t()}catch(b){t(b)}})},2846:function(e,t,o){o.d(t,{G:function(){return p},J:function(){return c}});var i=o(40445),a=o(58168),s=o(82553),n=o(5124),r=o(67576);o(54276);let d,l,h=e=>e;const c=[s.R,(0,n.AH)(d||(d=h`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center);gap:var(--ha-md-list-item-gap,16px)}`))];class p extends a.n{renderRipple(){return"text"===this.type?n.s6:(0,n.qy)(l||(l=h`<ha-ripple part="ripple" for="item" ?disabled="${0}"></ha-ripple>`),this.disabled&&"link"!==this.type)}}p.styles=c,p=(0,i.Cg)([(0,r.EM)("ha-md-list-item")],p)},17308:function(e,t,o){var i=o(40445),a=o(49838),s=o(11245),n=o(5124),r=o(67576);let d;class l extends a.B{}l.styles=[s.R,(0,n.AH)(d||(d=(e=>e)`:host{--md-sys-color-surface:var(--card-background-color)}`))],l=(0,i.Cg)([(0,r.EM)("ha-md-list")],l)},85938:function(e,t,o){o(18111),o(22489),o(3362),o(46058),o(62953);var i=o(40445),a=o(5124),s=o(67576),n=o(1087);let r,d=e=>e;class l extends a.WF{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.s6:(0,a.qy)(r||(r=d` <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:var(--ha-border-radius-sm);opacity:.4}.sortable-drag{border-radius:var(--ha-border-radius-sm);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([o.e(85283),o.e(70322)]).then(o.bind(o,80745))).default,i=Object.assign(Object.assign({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&&(i.draggable=this.draggableSelector),this.handleSelector&&(i.handle=this.handleSelector),void 0!==this.invertSwap&&(i.invertSwap=this.invertSwap),this.group&&(i.group=this.group),this.filter&&(i.filter=this.filter),this._sortable=new t(e,i)}_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,n.r)(this,"item-moved",{newIndex:e.newIndex,oldIndex:e.oldIndex})},this._handleAdd=e=>{(0,n.r)(this,"item-added",{index:e.newIndex,data:e.item.sortableData,item:e.item})},this._handleRemove=e=>{(0,n.r)(this,"item-removed",{index:e.oldIndex})},this._handleEnd=async e=>{(0,n.r)(this,"drag-end"),this.rollback&&e.item.placeholder&&(e.item.placeholder.replaceWith(e.item),delete e.item.placeholder)},this._handleStart=()=>{(0,n.r)(this,"drag-start")},this._handleChoose=e=>{this.rollback&&(e.item.placeholder=document.createComment("sort-placeholder"),e.item.after(e.item.placeholder))}}}(0,i.Cg)([(0,s.MZ)({type:Boolean})],l.prototype,"disabled",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,attribute:"no-style"})],l.prototype,"noStyle",void 0),(0,i.Cg)([(0,s.MZ)({type:String,attribute:"draggable-selector"})],l.prototype,"draggableSelector",void 0),(0,i.Cg)([(0,s.MZ)({type:String,attribute:"handle-selector"})],l.prototype,"handleSelector",void 0),(0,i.Cg)([(0,s.MZ)({type:String,attribute:"filter"})],l.prototype,"filter",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],l.prototype,"group",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,attribute:"invert-swap"})],l.prototype,"invertSwap",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],l.prototype,"options",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],l.prototype,"rollback",void 0),l=(0,i.Cg)([(0,s.EM)("ha-sortable")],l)}}]);