UNPKG

iobroker.lovelace

Version:

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

14 lines 39 kB
export const __rspack_esm_id=10615;export const __rspack_esm_ids=[10615];export const __webpack_modules__={17079(e,t,i){i.d(t,{X:()=>a});i(44114);class a{hostConnected(){window.addEventListener("undo-change",this._onUndoChange)}hostDisconnected(){window.removeEventListener("undo-change",this._onUndoChange)}get canUndo(){return this._undoStack.length>0}get canRedo(){return this._redoStack.length>0}commit(e){this._undoStack.length>=this._stackLimit&&this._undoStack.shift(),this._undoStack.push({...e}),this._redoStack=[]}undo(){if(0===this._undoStack.length)return;this._redoStack.push({...this._currentConfig()});const e=this._undoStack.pop();this._apply(e),this._host.requestUpdate()}redo(){if(0===this._redoStack.length)return;this._undoStack.push({...this._currentConfig()});const e=this._redoStack.pop();this._apply(e),this._host.requestUpdate()}reset(){this._undoStack=[],this._redoStack=[]}constructor(e,t){this._undoStack=[],this._redoStack=[],this._stackLimit=75,this._apply=()=>{throw new Error("No apply function provided")},this._currentConfig=()=>{throw new Error("No currentConfig function provided")},this._onUndoChange=e=>{e.stopPropagation(),this.undo(),this._host.requestUpdate()},void 0!==t.stackLimit&&(this._stackLimit=t.stackLimit),this._apply=t.apply,this._currentConfig=t.currentConfig,this._host=e,e.addController(this)}}},51758(e,t,i){i.d(t,{Z:()=>a});const a=e=>{const t=window.location.pathname;return e?t+"?"+e:t}},99028(e,t,i){i.a(e,async function(e,a){try{i.r(t),i.d(t,{HaIconButtonArrowNext:()=>p});var o=i(62826),s=i(5124),n=i(22441),r=i(63091),l=i(26300),h=e([l]);l=(h.then?(await h)():h)[0];const c="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class p extends s.WF{render(){return s.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.next")||"Next"}" .path="${this._icon}"></ha-icon-button> `}constructor(...e){super(...e),this.disabled=!1,this._icon="rtl"===r.G.document.dir?c:d}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"label",void 0),(0,o.Cg)([(0,n.wk)()],p.prototype,"_icon",void 0),p=(0,o.Cg)([(0,n.EM)("ha-icon-button-arrow-next")],p),a()}catch(e){a(e)}})},62647(e,t,i){var a=i(62826),o=i(9866),s=i(5124),n=i(22441);class r extends o.A{static get styles(){return[o.A.styles,s.AH`:host{font-size:var(--ha-font-size-m);--wa-color-brand-on-quiet:var( --ha-tab-active-text-color, var(--primary-color) );--wa-color-neutral-on-quiet:var(--wa-color-brand-on-quiet);opacity:.8;color:inherit;--wa-space-l:16px}:host([active]:not([disabled])){opacity:1}@media (hover:hover){:host(:hover:not([disabled]):not([active])) .tab{color:var(--wa-color-brand-on-quiet)}}`]}}r=(0,a.Cg)([(0,n.EM)("ha-tab-group-tab")],r)},66289(e,t,i){i.a(e,async function(e,t){try{var a=i(62826),o=i(42814),s=i(5124),n=i(22441),r=i(36356),l=e([o]);o=(l.then?(await l)():l)[0];class h extends o.A{connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._handleKeyDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown,!0)}handleClick(e){this._dragScrollController.scrolled||super.handleClick(e)}static get styles(){return[o.A.styles,s.AH`:host{--track-width:2px;--track-color:var(--ha-tab-track-color, var(--divider-color));--indicator-color:var( --ha-tab-indicator-color, var(--primary-color) );--wa-color-neutral-on-quiet:var(--indicator-color)}.tab-group-top ::slotted(ha-tab-group-tab[active]){border-block-end:solid var(--track-width) var(--indicator-color);margin-block-end:calc(-1 * var(--track-width))}.tab-group-start ::slotted(ha-tab-group-tab[active]){border-inline-end:solid var(--track-width) var(--indicator-color);margin-inline-end:calc(-1 * var(--track-width))}.tab-group-end ::slotted(ha-tab-group-tab[active]){border-inline-start:solid var(--track-width) var(--indicator-color);margin-inline-start:calc(-1 * var(--track-width))}.scroll-button::part(base):hover{background-color:transparent}`]}constructor(...e){super(...e),this._dragScrollController=new r.q(this,{selector:".nav"}),this.tabTag="ha-tab-group-tab",this.tabOnly=!0,this._handleKeyDown=e=>{(e.altKey||e.metaKey)&&e.stopPropagation()}}}(0,a.Cg)([(0,n.MZ)({attribute:"tab-tag"})],h.prototype,"tabTag",void 0),(0,a.Cg)([(0,n.MZ)({attribute:"tab-only",type:Boolean})],h.prototype,"tabOnly",void 0),h=(0,a.Cg)([(0,n.EM)("ha-tab-group")],h),t()}catch(e){t(e)}})},9022(e,t,i){i.d(t,{i:()=>o});var a=i(1087);const o=(e,t)=>(0,a.r)(e,"show-dialog",{dialogTag:"dialog-list-items",dialogImport:()=>i.e(75939).then(i.bind(i,21006)),dialogParams:t})},34023(e,t,i){i.d(t,{E:()=>o,J:()=>s});var a=i(1087);const o=()=>Promise.all([i.e(32450),i.e(7305),i.e(92769),i.e(3283),i.e(85010),i.e(89100),i.e(42209),i.e(26092),i.e(8851),i.e(66201),i.e(26295),i.e(52808),i.e(93e3),i.e(61023)]).then(i.bind(i,39803)),s=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"dialog-area-registry-detail",dialogImport:o,dialogParams:t})}},14839(e,t,i){i.d(t,{l:()=>s});var a=i(1087);const o=()=>i.e(58938).then(i.bind(i,59502)),s=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"ha-dialog-new-automation",dialogImport:o,dialogParams:t})}},76559(e,t,i){i.d(t,{X:()=>o,n:()=>s});var a=i(1087);const o=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"dialog-add-integration",dialogImport:()=>Promise.all([i.e(92769),i.e(50672)]).then(i.bind(i,60051)),dialogParams:t})},s=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"dialog-yaml-integration",dialogImport:()=>i.e(24096).then(i.bind(i,95683)),dialogParams:t})}},58142(e,t,i){i.d(t,{T:()=>o,o:()=>s});var a=i(1087);const o=()=>Promise.all([i.e(4801),i.e(39763),i.e(32450),i.e(7305),i.e(92769),i.e(3283),i.e(1882),i.e(29406),i.e(26092),i.e(8851),i.e(1535),i.e(26295),i.e(22106),i.e(45181)]).then(i.bind(i,33256)),s=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"dialog-person-detail",dialogImport:o,dialogParams:t})}},46925(e,t,i){i.d(t,{Y:()=>s});var a=i(1087);const o=()=>i.e(856).then(i.bind(i,9579)),s=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"dialog-dashboard-strategy-editor",dialogImport:o,dialogParams:t})}},1412(e,t,i){i.d(t,{z:()=>n});var a=i(1087);const o="show-save-config";let s=!1;const n=(e,t)=>{s||(s=!0,(0,a.r)(e,"register-dialog",{dialogShowEvent:o,dialogTag:"hui-dialog-save-config",dialogImport:()=>i.e(87980).then(i.bind(i,24519))})),(0,a.r)(e,o,t)}},874(e,t,i){i.d(t,{f:()=>n});var a=i(1087);let o=!1;const s="show-edit-view",n=(e,t)=>{o||(o=!0,(e=>{(0,a.r)(e,"register-dialog",{dialogShowEvent:s,dialogTag:"hui-dialog-edit-view",dialogImport:()=>i.e(5590).then(i.bind(i,70997))})})(e)),(0,a.r)(e,s,t)}},29994(e,t,i){i.a(e,async function(e,t){try{i(44114),i(18111),i(22489),i(20116),i(7588),i(61701),i(13579);var a=i(62826),o=i(5124),s=i(22441),n=i(6412),r=i(63672),l=i(22786),h=i(36312),c=i(17079),d=i(1087),p=i(91926),u=i(51758),v=i(6030),g=i(12587),b=i(18350),w=i(29823),_=(i(70947),i(47680),i(26300)),f=i(99028),m=i(90248),y=i(2054),C=(i(67094),i(66289)),V=(i(62647),i(34127)),k=i(2514),x=i(35952),A=i(71730),M=i(25612),$=i(99774),H=i(85547),L=i(9022),S=i(65063),z=i(24673),P=i(42269),E=i(34779),q=i(27560),I=i(14503),Z=i(36918),T=i(41570),R=i(84187),B=i(81619),D=i(34023),U=i(14839),N=i(76559),F=i(96489),K=i(60653),O=i(58142),W=i(82360),J=i(46925),Q=i(1412),X=i(874),Y=i(15656),j=i(53338),G=i(75400),ee=(i(77985),i(87778),i(44249)),te=i(59531),ie=e([b,w,_,f,m,y,C,V,G,z]);[b,w,_,f,m,y,C,V,G,z]=ie.then?(await ie)():ie;const ae="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z",oe="M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z",se="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M17,11H15V9H17V11M13,11H11V9H13V11M9,11H7V9H9V11Z",ne="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",re="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",le="M15,7H20.5L15,1.5V7M8,0H16L22,6V18A2,2 0 0,1 20,20H8C6.89,20 6,19.1 6,18V2A2,2 0 0,1 8,0M4,4V22H20V24H4A2,2 0 0,1 2,22V4H4Z",he="M5,15.5L7.5,20H2.5L5,15.5M9,19H21V17H9V19M5,9.5L7.5,14H2.5L5,9.5M9,13H21V11H9V13M5,3.5L7.5,8H2.5L5,3.5M9,7H21V5H9V7Z",ce="M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z",de="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z",pe="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",ue="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",ve="M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z",ge="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z",be="M12,2A2,2 0 0,1 14,4C14,4.74 13.6,5.39 13,5.73V7H14A7,7 0 0,1 21,14H22A1,1 0 0,1 23,15V18A1,1 0 0,1 22,19H21V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V19H2A1,1 0 0,1 1,18V15A1,1 0 0,1 2,14H3A7,7 0 0,1 10,7H11V5.73C10.4,5.39 10,4.74 10,4A2,2 0 0,1 12,2M7.5,13A2.5,2.5 0 0,0 5,15.5A2.5,2.5 0 0,0 7.5,18A2.5,2.5 0 0,0 10,15.5A2.5,2.5 0 0,0 7.5,13M16.5,13A2.5,2.5 0 0,0 14,15.5A2.5,2.5 0 0,0 16.5,18A2.5,2.5 0 0,0 19,15.5A2.5,2.5 0 0,0 16.5,13Z",we="M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z",_e="M12.5 7C12.5 5.89 13.39 5 14.5 5H18C19.1 5 20 5.9 20 7V9.16C18.84 9.57 18 10.67 18 11.97V14H12.5V7M6 11.96V14H11.5V7C11.5 5.89 10.61 5 9.5 5H6C4.9 5 4 5.9 4 7V9.15C5.16 9.56 6 10.67 6 11.96M20.66 10.03C19.68 10.19 19 11.12 19 12.12V15H5V12C5 10.9 4.11 10 3 10S1 10.9 1 12V17C1 18.1 1.9 19 3 19V21H5V19H19V21H21V19C22.1 19 23 18.1 23 17V12C23 10.79 21.91 9.82 20.66 10.03Z",fe="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z",me="M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z",ye="M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M14,21A2,2 0 0,1 12,23A2,2 0 0,1 10,21";class Ce extends o.WF{get _livePanel(){if(this.panel)return this.hass.panels?.[this.panel.url_path]??this.panel}_renderActionItems(){const e=[];this._editMode?e.push(o.qy`<ha-icon-button slot="toolbar-icon" .path="${fe}" @click="${this._undo}" .disabled="${!this._undoRedoController.canUndo}" id="button-undo"> </ha-icon-button> <ha-tooltip placement="bottom" for="button-undo"> ${this.hass.localize("ui.common.undo")} </ha-tooltip> <ha-icon-button slot="toolbar-icon" .path="${ve}" @click="${this._redo}" .disabled="${!this._undoRedoController.canRedo}" id="button-redo"> </ha-icon-button> <ha-tooltip placement="bottom" for="button-redo"> ${this.hass.localize("ui.common.redo")} </ha-tooltip> <ha-button appearance="filled" size="small" class="exit-edit-mode" @click="${this._editModeDisable}"> ${this.hass.localize("ui.panel.lovelace.menu.exit_edit_mode")} </ha-button> <ha-icon-button .label="${this.hass.localize("ui.panel.lovelace.menu.help")}" .path="${ce}" href="${(0,Z.o)(this.hass,"/dashboards/")}" rel="noreferrer" target="_blank"></ha-icon-button>`):e.push(this._renderNotificationButton());const t="lovelace"===this.panel?.component_name,i=[{icon:he,key:"ui.panel.lovelace.unused_entities.title",overflowAction:this._handleUnusedEntities,visible:this._editMode&&!0,overflow:!0},{icon:oe,key:"ui.panel.lovelace.editor.menu.raw_editor",overflowAction:this._handleRawEditor,visible:this._editMode,overflow:!0},{icon:me,key:"ui.panel.lovelace.editor.menu.manage_dashboards",overflowAction:this._handleManageDashboards,visible:this._editMode&&!0,overflow:!0},{icon:le,key:"ui.panel.lovelace.editor.menu.manage_resources",overflowAction:this._handleManageResources,visible:this._editMode,overflow:!0},{icon:ue,key:"ui.panel.lovelace.menu.add",visible:!1,overflow:this.narrow,subItems:[{icon:ne,key:"ui.panel.lovelace.menu.add_device",visible:!0,action:this._addDevice,overflowAction:this._addDevice},{icon:be,key:"ui.panel.lovelace.menu.create_automation",visible:!0,action:this._createAutomation},{icon:_e,key:"ui.panel.lovelace.menu.create_area",visible:!0,action:this._createArea,overflowAction:this._createArea},{icon:ae,key:"ui.panel.lovelace.menu.add_person",visible:!0,action:this._addPerson,overflowAction:this._addPerson}]},{icon:de,key:"ui.panel.lovelace.menu.search_home_assistant",buttonAction:this._showQuickBar,overflowAction:this._showQuickBar,suffix:this.hass.enableShortcuts&&!R.M?T.c?"(⌘ + K)":"(Ctrl + K)":void 0,visible:!this._editMode&&!this.hass.kioskMode,overflow:this.narrow},{icon:se,key:"ui.panel.lovelace.menu.assist_tooltip",buttonAction:this._showVoiceCommandDialog,overflowAction:this._showVoiceCommandDialog,suffix:this.hass.enableShortcuts&&!R.M?"(A)":void 0,visible:!this._editMode&&this._conversation(this.hass.config.components),overflow:this.narrow},{icon:ge,key:"ui.common.refresh",overflowAction:this._handleRefresh,visible:!this._editMode&&this._yamlMode,overflow:!0},{icon:we,key:"ui.panel.lovelace.unused_entities.title",overflowAction:this._handleUnusedEntities,visible:!this._editMode&&this._yamlMode,overflow:!0},{icon:ge,key:"ui.panel.lovelace.menu.reload_resources",overflowAction:this._handleReloadResources,visible:!this._editMode&&"yaml"===this._resourceMode&&t,overflow:!0},{icon:pe,key:"ui.panel.lovelace.menu.configure_ui",overflowAction:this._enableEditMode,buttonAction:this._enableEditMode,visible:!this._editMode&&this.hass.user?.is_admin&&!this.hass.config.recovery_mode&&!this.hass.kioskMode&&!this.noEdit,overflow:!0,overflow_can_promote:!0}];this.extraActionItems&&this.extraActionItems.forEach(e=>{i.push({icon:e.icon,key:e.labelKey,buttonAction:e.action,overflowAction:e.action,visible:!0,overflow:this.narrow})});const a=i.filter(e=>e.visible&&e.overflow),s=1===a.length&&a[0].overflow_can_promote;return i.filter(e=>e.visible&&(!e.overflow||s)).forEach((t,i)=>{const a=[this.hass.localize(t.key),t.suffix].join(" "),s=t.subItems?o.qy` <ha-dropdown slot="actionItems" @wa-select="${this._handleSubItemSelect}" placement="bottom-end"> <ha-icon-button .id="button-${i}" .path="${t.icon}" slot="trigger" .label="${a}" hide-title></ha-icon-button> ${t.subItems.filter(e=>e.visible).map(e=>o.qy` <ha-dropdown-item .value="${e.key}" .data="${e}"> <ha-svg-icon slot="icon" .path="${e.icon}"> </ha-svg-icon> ${this.hass.localize(e.key)} </ha-dropdown-item> `)} </ha-dropdown> <ha-tooltip placement="bottom" .for="button-${i}"> ${a} </ha-tooltip> `:o.qy` <ha-icon-button slot="actionItems" .id="button-${i}" .path="${t.icon}" .label="${a}" hide-title @click="${t.buttonAction}"></ha-icon-button> <ha-tooltip placement="bottom" .for="button-${i}"> ${a} </ha-tooltip> `;e.push(s)}),a.length&&!s&&e.push(o.qy` <ha-dropdown slot="actionItems" @wa-select="${this._handleOverflowItemSelect}"> <ha-icon-button slot="trigger" id="dashboardmenu" .path="${re}" .label="${this.hass.localize("ui.panel.lovelace.editor.menu.open")}" hide-title></ha-icon-button> ${a.map(e=>{const t=[this.hass.localize(e.key),e.suffix].join(" ");return o.qy`<ha-dropdown-item .value="${e.key}" .data="${e}"> <ha-svg-icon slot="icon" .path="${e.icon}"></ha-svg-icon> ${t} </ha-dropdown-item>`})} </ha-dropdown> `),o.qy`${e}`}render(){const e=this.lovelace?.config.views??[],t="number"==typeof this._curView?e[this._curView]:void 0,i=this._livePanel?(0,$.hL)(this.hass,this._livePanel):void 0,a=t?.background||this.config.background,s=e=>void 0!==e.visible&&(Array.isArray(e.visible)&&!e.visible.some(e=>e.user===this.hass.user?.id)||!1===e.visible),l=o.qy`<ha-tab-group @wa-tab-show="${this._handleViewSelected}"> ${e.map((t,i)=>{const a=t.show_icon_and_title&&t.icon&&t.title,l=t.icon&&!a,h=!l&&!a,c=!this._editMode&&(t.subview||s(t));return o.qy` <ha-tab-group-tab slot="nav" panel="${i}" .active="${this._curView===i}" .disabled="${c}" aria-label="${(0,r.J)(t.title)}" class="${(0,n.H)({"icon-only":Boolean(l),"icon-and-title":Boolean(a),"hide-tab":Boolean(c)})}"> ${this._editMode?o.qy` <ha-icon-button-arrow-prev .hass="${this.hass}" .label="${this.hass.localize("ui.panel.lovelace.editor.edit_view.move_left")}" class="edit-icon view" @click="${this._moveViewLeft}" .disabled="${0===this._curView}"></ha-icon-button-arrow-prev> `:o.s6} ${l||a?o.qy`<ha-icon class="${(0,n.H)({"child-view-icon":Boolean(t.subview)})}" title="${(0,r.J)(t.title)}" .icon="${t.icon}"></ha-icon>`:o.s6} ${a?t.title:o.s6} ${h?t.title||this.hass.localize("ui.panel.lovelace.views.unnamed_view"):o.s6} ${this._editMode?o.qy` <ha-icon-button .title="${this.hass.localize("ui.panel.lovelace.editor.edit_view.edit")}" class="edit-icon view" .path="${pe}" @click="${this._editView}"></ha-icon-button> <ha-icon-button-arrow-next .hass="${this.hass}" .label="${this.hass.localize("ui.panel.lovelace.editor.edit_view.move_right")}" class="edit-icon view" @click="${this._moveViewRight}" .disabled="${this._curView+1===e.length}"></ha-icon-button-arrow-next> `:o.s6} </ha-tab-group-tab> `})} </ha-tab-group>`,h=t?.subview,c=e.filter(e=>!e.subview).length>1;return o.qy` <div class="${(0,n.H)({"edit-mode":this._editMode,narrow:this.narrow})}"> <div class="header"> <slot name="toolbar"> <div class="toolbar"> ${this._editMode?o.qy` <div class="main-title"> ${i||this.hass.localize("ui.panel.lovelace.editor.header")} <ha-icon-button slot="actionItems" .label="${this.hass.localize("ui.panel.lovelace.editor.edit_lovelace.edit_title")}" .path="${pe}" class="edit-icon" @click="${this._editDashboardOrPanel}"></ha-icon-button> </div> <div class="action-items">${this._renderActionItems()}</div> `:o.qy` ${h||this.backButton?o.qy` <ha-icon-button-arrow-prev .hass="${this.hass}" slot="navigationIcon" @click="${this._goBack}"></ha-icon-button-arrow-prev> `:o.qy` <ha-menu-button slot="navigationIcon" .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> `} ${h?o.qy` <div class="main-title">${t.title}</div> `:c?l:o.qy` <div class="main-title"> ${e[0]?.title??i} </div> `} <div class="action-items">${this._renderActionItems()}</div> `} </div> ${this._editMode?o.qy` <div class="tab-bar"> ${l} <ha-icon-button slot="nav" id="add-view" @click="${this._addView}" .label="${this.hass.localize("ui.panel.lovelace.editor.edit_view.add")}" .path="${ue}"></ha-icon-button> </div> `:o.s6} </slot> </div> <hui-view-container class="${this._editMode?"has-tab-bar":""}" .hass="${this.hass}" .theme="${t?.theme}" id="view"> <hui-view-background .hass="${this.hass}" .background="${a}"> </hui-view-background> </hui-view-container> </div> `}_clearParam(e){window.history.replaceState(null,"",(0,u.Z)((0,v.s8)(e)))}firstUpdated(e){super.firstUpdated(e),window.addEventListener("scroll",this._handleWindowScroll,{passive:!0}),this._handleUrlChanged(),(0,M.KQ)(this.hass).then(e=>{this._resourceMode=e.resource_mode})}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this._handleWindowScroll,{passive:!0}),window.addEventListener("popstate",this._handlePopState),window.addEventListener("location-changed",this._locationChanged),window.history.scrollRestoration="manual",this._unsubNotifications=(0,ee.V)(this.hass.connection,e=>{this._persistentNotifications=e?.length||0})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this._handleWindowScroll),window.removeEventListener("popstate",this._handlePopState),window.removeEventListener("location-changed",this._locationChanged),this.toggleAttribute("scrolled",0!==window.scrollY),window.history.scrollRestoration="auto",this._unsubNotifications&&this._unsubNotifications()}_handleUrlChanged(){const e=(0,v.px)();if("1"===e.edit)this._clearParam("edit"),this.hass.user?.is_admin&&"storage"===this.lovelace.mode&&this.lovelace.setEditMode(!0);else if("1"===e.conversation)this._clearParam("conversation"),this._showVoiceCommandDialog();else if(e["more-info-entity-id"]){const t=e["more-info-entity-id"],i=e["more-info-view"];this._clearParam("more-info-entity-id"),i&&this._clearParam("more-info-view"),(0,g.m)(()=>{(0,P.p)(this,{entityId:t,view:(0,z.HD)(i)?i:void 0})})}}willUpdate(e){if(e.has("lovelace")){const t=e.get("lovelace");if(t&&this.lovelace.rawConfig!==t.rawConfig&&!this._configChangedByUndo){const e=this.route.path.split("/")[1];this._undoRedoController.commit({location:e,config:t.rawConfig})}else this._configChangedByUndo=!1}}updated(e){super.updated(e);const t=this._viewRoot.lastChild;let i;e.has("hass")&&t&&(t.hass=this.hass),e.has("narrow")&&t&&(t.narrow=this.narrow);let a=this.route.path.split("/")[1];if(a=a?decodeURI(a):void 0,e.has("route")){const e=this.config.views;if(!a&&e.length)i=e.findIndex(this._isVisible),this._navigateToView(e[i].path||i,!0);else if("hass-unused-entities"===a)i="hass-unused-entities";else if(a){const t=a,o=Number(t);let s=0;for(let i=0;i<e.length;i++)if(e[i].path===t||i===o){s=i;break}i=s}}if(e.has("lovelace")){const o=e.get("lovelace");if(o&&o.config!==this.lovelace.config&&this._cleanupViewCache(),!o||o.editMode!==this.lovelace.editMode){const e=this.config&&this.config.views;"storage"===this.lovelace.mode&&"hass-unused-entities"===a&&(i=e.findIndex(this._isVisible),this._navigateToView(e[i].path||i,!0))}t&&(t.lovelace=this.lovelace)}void 0!==i&&(0,g.m)(()=>{if(e.has("route")){const e=this._restoreScroll&&this._viewScrollPositions[i]||0;this._restoreScroll=!1,requestAnimationFrame(()=>scrollTo({behavior:"auto",top:e}))}this._selectView(i)})}_renderNotificationButton(){return document.body.getElementsByTagName("ha-sidebar").length>0?o.qy`""`:o.qy` <mwc-icon-button style="cursor:pointer;position:relative" label="${this.hass.localize("ui.notification_drawer.title")}" @click="${this._handleShowNotificationDrawer}"> <ha-svg-icon path="${ye}"></ha-svg-icon> ${this._notificationsCount>0?o.qy` <span style="top:-4px;right:-6px;font-size:1rem;position:absolute;min-width:20px;box-sizing:border-box;border-radius:50%;font-weight:400;background-color:var(--accent-color);line-height:24px;text-align:center;padding:0 6px;color:var(--text-primary-color)"> ${this._notificationsCount} </span> `:""} </mwc-icon-button> `}get _notificationsCount(){const e=this.hass.states,t=Object.keys(e).filter(e=>"configurator"===e.substr(0,e.indexOf("."))).map(t=>e[t]).length;return(this._persistentNotifications||0)+t}_handleShowNotificationDrawer(){(0,te.c)(this,{narrow:this.narrow})}get config(){return this.lovelace.config}get _yamlMode(){return"yaml"===this.lovelace.mode}get _editMode(){return this.lovelace.editMode}get _viewRoot(){return this.shadowRoot.getElementById("view")}_goBack(){const e=this.lovelace?.config.views??[],t="number"==typeof this._curView?e[this._curView]:void 0;null!=t?.back_path?(0,p.oo)(t.back_path,{replace:!0}):this.backPath?(0,p.oo)(this.backPath,{replace:!0}):history.length>1?(0,p.OE)():e[0].subview?(0,p.oo)("/"):(0,p.oo)(this.route.prefix,{replace:!0})}_editModeDisable(){this.lovelace.setEditMode(!1),this._undoRedoController.reset()}_editDashboardOrPanel(){this.panel?.component_name===$.JF?this._editPanel():this._editDashboard()}async _editPanel(){if(!this.panel)return;const e=this.panel;await this.hass.loadFragmentTranslation("config");const t=this.hass.systemData?.default_panel||"home";(0,K.x)(this,{urlPath:e.url_path,title:(0,$.hL)(this.hass,e)||e.url_path,icon:(0,$.Q)(e),requireAdmin:e.require_admin||!1,showInSidebar:e.show_in_sidebar||!1,isDefault:e.url_path===t,updatePanel:async t=>{await(0,$.W5)(this.hass,e.url_path,t)}})}async _editDashboard(){const e=this.route?.prefix.slice(1);await this.hass.loadFragmentTranslation("config");const t=(await(0,A.SJ)(this.hass)).find(t=>t.url_path===e);(0,F.B)(this,{dashboard:t,urlPath:e,updateDashboard:async e=>{await(0,A.mQ)(this.hass,t.id,e)},removeDashboard:async()=>{if(!await(0,S.dk)(this,{title:this.hass.localize("ui.panel.config.lovelace.dashboards.confirm_delete_title",{dashboard_title:t.title}),text:this.hass.localize("ui.panel.config.lovelace.dashboards.confirm_delete_text"),confirmText:this.hass.localize("ui.common.delete"),destructive:!0}))return!1;try{return await(0,A.A_)(this.hass,t.id),!0}catch(e){return!1}}})}_navigateToView(e,t){const i=this.lovelace.editMode?`${this.route.prefix}/${e}?${(0,v.$X)({edit:"1"})}`:`${this.route.prefix}/${e}${location.search}`;`${location.pathname}${location.search}`!==i&&(0,p.oo)(i,{replace:t})}_editView(){(0,X.f)(this,{lovelace:this.lovelace,viewIndex:this._curView,saveCallback:(e,t)=>{const i=t.path||e;this._navigateToView(i)}})}_moveViewLeft(e){if(e.stopPropagation(),0===this._curView)return;const t=this.lovelace,i=this._curView,a=this._curView-1;this.config.views[i].path||this._navigateToView(a,!0),t.saveConfig((0,W.Bl)(t.config,i,a)),this._selectView(a)}_moveViewRight(e){if(e.stopPropagation(),this._curView+1===this.lovelace.config.views.length)return;const t=this.lovelace,i=this._curView,a=this._curView+1;this.config.views[i].path||this._navigateToView(a,!0),t.saveConfig((0,W.Bl)(t.config,i,a)),this._selectView(a)}_addView(){(0,X.f)(this,{lovelace:this.lovelace,saveCallback:(e,t)=>{const i=t.path||e;this._navigateToView(i)}})}_handleViewSelected(e){e.preventDefault();const t=Number(e.detail.name);if(t!==this._curView){const e=this.config.views[t].path||t;this._navigateToView(e)}else this._editMode||scrollTo({behavior:"smooth",top:0})}_cleanupViewCache(){const e=null!=this._curView?this._viewCache[this._curView]:void 0;this._viewCache={},e&&null!=this._curView&&(this._viewCache[this._curView]=e)}_selectView(e){if(this._curView===e)return;null!=this._curView&&(this._viewScrollPositions[this._curView]=window.scrollY),e=void 0===e?0:e,this._curView=e;const t=this._viewRoot;if(t.lastChild&&t.removeChild(t.lastChild),"hass-unused-entities"===e){const e=document.createElement("hui-unused-entities");return Promise.all([i.e(67785),i.e(61854)]).then(i.bind(i,39693)).then(()=>{e.hass=this.hass,e.lovelace=this.lovelace,e.narrow=this.narrow}),void t.appendChild(e)}let a;this.config.views[e]?(this._viewCache[e]?a=this._viewCache[e]:(a=document.createElement("hui-view"),a.index=e,this._viewCache[e]=a),a.lovelace=this.lovelace,a.hass=this.hass,a.narrow=this.narrow,t.appendChild(a)):this.lovelace.setEditMode(!0)}async _applyUndoRedo(e){this._configChangedByUndo=!0;try{await this.lovelace.saveConfig(e.config)}catch(e){return this._configChangedByUndo=!1,void(0,B.P)(this,{message:this.hass.localize("ui.panel.lovelace.editor.undo_redo_failed_to_apply_changes",{error:e.message}),duration:4e3,dismissable:!0})}this._navigateToView(e.location)}_undo(){this._undoRedoController.undo()}_redo(){this._undoRedoController.redo()}_handleSubItemSelect(e){const t=e.detail.item.data;t?.action?t.action():t?.overflowAction&&t.overflowAction()}_handleOverflowItemSelect(e){const t=e.detail.item.data;if(t?.subItems){const e=[this.hass.localize(t.key),t.suffix].join(" ");(0,L.i)(this,{title:e,mode:this.narrow?"bottom-sheet":"dialog",items:t.subItems.map(e=>({iconPath:e.icon,label:this.hass.localize(e.key),action:e.action}))})}else t?.overflowAction&&t.overflowAction()}static get styles(){return[I.RF,o.AH`:host{-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none}.header{background-color:var(--app-header-background-color);color:var(--app-header-text-color,#fff);position:fixed;top:0;width:calc(var(--ha-top-app-bar-width,100%) - var(--safe-area-inset-right,0px));-webkit-backdrop-filter:var(--app-header-backdrop-filter,none);backdrop-filter:var(--app-header-backdrop-filter,none);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right);z-index:4}.narrow .header{width:calc(var(--ha-top-app-bar-width,100%) - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));padding-left:var(--safe-area-inset-left)}:host([scrolled]) .header{box-shadow:var(--bar-box-shadow,0px 2px 4px -1px rgba(0,0,0,.2),0px 4px 5px 0px rgba(0,0,0,.14),0px 1px 10px 0px rgba(0,0,0,.12))}.edit-mode .header{background-color:var(--app-header-edit-background-color,#455a64);color:var(--app-header-edit-text-color,#fff)}.toolbar{border-bottom:var(--app-header-border-bottom,none);height:var(--header-height);display:flex;align-items:center;font-size:var(--ha-font-size-xl);padding:0px 12px;font-weight:var(--ha-font-weight-normal);box-sizing:border-box}.edit-mode .toolbar{border-bottom:none}.narrow .toolbar{padding:0 4px}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);flex-grow:1;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;min-width:0}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.action-items{white-space:nowrap;display:flex;align-items:center}.edit-mode .action-items ha-icon-button[disabled]{--ha-color-on-disabled-quiet:color-mix( in srgb, var(--app-header-edit-text-color, #fff) 50%, transparent )}ha-tab-group{--ha-tab-indicator-color:var( --app-header-selection-bar-color, var(--app-header-text-color, white) );--ha-tab-active-text-color:var(--app-header-text-color, white);--ha-tab-track-color:transparent;align-self:flex-end;flex-grow:1;min-width:0;height:100%}ha-tab-group::part(nav){padding:0}ha-tab-group::part(scroll-button){inset-block-end:var(--safe-track-width);background-color:var(--app-header-background-color);background:linear-gradient(90deg,var(--app-header-background-color),transparent);z-index:1}ha-tab-group::part(scroll-button-end){background:linear-gradient(270deg,var(--app-header-background-color),transparent)}.edit-mode ha-tab-group::part(scroll-button){background-color:var(--app-header-edit-background-color,#455a64);background:linear-gradient(90deg,var(--app-header-edit-background-color,#455a64),transparent)}.edit-mode ha-tab-group::part(scroll-button-end){background:linear-gradient(270deg,var(--app-header-edit-background-color,#455a64),transparent)}.edit-mode div[main-title]{pointer-events:auto}.tab-bar{display:flex}.edit-mode ha-tab-group{flex-grow:0;color:var(--app-header-edit-text-color,#fff);--ha-tab-active-text-color:var(--app-header-edit-text-color, #fff);--ha-tab-indicator-color:var(--app-header-edit-text-color, #fff)}ha-tab-group-tab{--ha-tab-group-tab-height:var(--header-height, 56px);height:var(--ha-tab-group-tab-height)}.tab-bar ha-tab-group-tab{--ha-tab-group-tab-height:var(--tab-bar-height, 56px)}ha-tab-group-tab[aria-selected=true] .edit-icon{display:inline-flex}ha-tab-group-tab::part(base){padding-inline-start:var(--ha-tab-padding-start,var(--wa-space-l));padding-inline-end:var(--ha-tab-padding-end,var(--wa-space-l));padding-top:calc((var(--ha-tab-group-tab-height) - 20px)/ 2)}ha-tab-group-tab.icon-and-title::part(base),ha-tab-group-tab.icon-only::part(base){padding-top:calc((var(--ha-tab-group-tab-height) - 20px)/ 2 - 2px);padding-bottom:calc((var(--ha-tab-group-tab-height) - 20px)/ 2 - 4px)}ha-tab-group-tab.icon-and-title ha-icon{margin-inline-end:var(--ha-space-2)}.edit-mode ha-tab-group-tab[aria-selected=true]::part(base){padding:0;margin-top:calc((var(--tab-bar-height,56px) - 48px)/ 2)}.edit-icon{color:var(--accent-color);padding:0 8px;vertical-align:middle;--mdc-theme-text-disabled-on-light:var(--disabled-text-color);direction:var(--direction)}.edit-icon:last-child{padding-left:0}.edit-icon.view{display:none}#add-view{white-space:nowrap;display:flex;align-items:center}#add-view ha-svg-icon{background-color:var(--accent-color);border-radius:var(--ha-border-radius-sm)}a{color:var(--text-primary-color,#fff)}hui-view-container{position:relative;display:flex;min-height:100vh;box-sizing:border-box;padding-top:calc(var(--header-height) + var(--safe-area-inset-top) + var(--view-container-padding-top,0px));padding-right:var(--safe-area-inset-right);padding-inline-end:var(--safe-area-inset-right);padding-bottom:calc(var(--safe-area-inset-bottom) + var(--view-container-padding-bottom,0px))}.narrow hui-view-container{padding-left:var(--safe-area-inset-left);padding-inline-start:var(--safe-area-inset-left)}hui-view-container>*{display:flex;flex-direction:column;flex:1 1 100%;max-width:100%}hui-view-container.has-tab-bar{padding-top:calc(var(--header-height,56px) + calc(var(--tab-bar-height,56px) - 2px) + var(--safe-area-inset-top,0px))}.hide-tab{display:none}.exit-edit-mode{--mdc-theme-primary:var(--app-header-edit-text-color, #fff);--mdc-button-outline-color:var(--app-header-edit-text-color, #fff);--mdc-typography-button-font-size:var(--ha-font-size-m)}.child-view-icon{opacity:.5}`]}constructor(...e){super(...e),this.narrow=!1,this.noEdit=!1,this.backButton=!1,this._resourceMode="storage",this._configChangedByUndo=!1,this._viewCache={},this._viewScrollPositions={},this._restoreScroll=!1,this._undoRedoController=new c.X(this,{apply:e=>this._applyUndoRedo(e),currentConfig:()=>({location:this.route.path.split("/")[1],config:this.lovelace.rawConfig})}),this._conversation=(0,l.A)(e=>(0,h.x)(this.hass.config,"conversation")),this._handleWindowScroll=()=>{this.toggleAttribute("scrolled",0!==window.scrollY)},this._locationChanged=()=>{this._handleUrlChanged()},this._handlePopState=()=>{this._restoreScroll=!0,this._handleUrlChanged()},this._isVisible=e=>Boolean(this._editMode||void 0===e.visible||!0===e.visible||Array.isArray(e.visible)&&e.visible.some(e=>e.user===this.hass.user?.id)),this._handleRefresh=()=>{(0,d.r)(this,"config-refresh")},this._handleReloadResources=()=>{this.hass.callService("lovelace","reload_resources"),(0,S.dk)(this,{title:this.hass.localize("ui.panel.lovelace.reload_resources.refresh_header"),text:this.hass.localize("ui.panel.lovelace.reload_resources.refresh_body"),confirmText:this.hass.localize("ui.common.refresh"),dismissText:this.hass.localize("ui.common.not_now"),confirm:()=>location.reload()})},this._showQuickBar=()=>{(0,E.uq)(this,{showHint:this.hass.enableShortcuts})},this._addDevice=async()=>{await this.hass.loadFragmentTranslation("config"),(0,N.X)(this,{navigateToResult:!0})},this._createAutomation=async()=>{await this.hass.loadFragmentTranslation("config"),(0,U.l)(this,{mode:"automation"})},this._createArea=async()=>{await this.hass.loadFragmentTranslation("config"),(0,D.J)(this,{createEntry:async e=>{const t=await(0,k.L3)(this.hass,e);(0,x.Wu)(this.lovelace.rawConfig)&&(0,d.r)(this,"config-refresh"),(0,B.P)(this,{message:this.hass.localize("ui.panel.lovelace.menu.create_area_success"),action:{action:()=>{(0,p.oo)(`/config/areas/area/${t.area_id}`)},text:this.hass.localize("ui.panel.lovelace.menu.create_area_action")}})}})},this._addPerson=async()=>{await this.hass.loadFragmentTranslation("config"),(0,O.o)(this,{users:[],createEntry:async e=>{await(0,H.Gu)(this.hass,e),(0,B.P)(this,{message:this.hass.localize("ui.panel.lovelace.menu.add_person_success"),action:{action:()=>{(0,p.oo)("/config/person")},text:this.hass.localize("ui.panel.lovelace.menu.add_person_action")}})}})},this._handleRawEditor=()=>{this.lovelace.enableFullEditMode()},this._handleManageDashboards=()=>{(0,p.oo)("/config/lovelace/dashboards")},this._handleManageResources=()=>{(0,p.oo)("/config/lovelace/resources")},this._handleUnusedEntities=()=>{(0,p.oo)(`${this.route?.prefix}/hass-unused-entities`)},this._showVoiceCommandDialog=()=>{(0,q.z)(this,this.hass,{pipeline_id:"last_used"})},this._enableEditMode=async()=>{if(this._yamlMode)(0,S.showAlertDialog)(this,{text:this.hass.localize("ui.panel.lovelace.editor.yaml_unsupported")});else{if((0,x.Wu)(this.lovelace.rawConfig)&&!(0,j.B2)(this.lovelace.rawConfig.strategy)){const e=await(0,Y.Nu)("dashboard",this.lovelace.rawConfig.strategy.type).catch(e=>{});if(e?.noEditor)return void(0,Q.z)(this,{lovelace:this.lovelace,mode:"storage",narrow:this.narrow});const t=this.route?.prefix.slice(1);await this.hass.loadFragmentTranslation("config");const i=(await(0,A.SJ)(this.hass)).find(e=>e.url_path===t);return void(0,J.Y)(this,{config:this.lovelace.rawConfig,title:this._livePanel?(0,$.hL)(this.hass,this._livePanel):void 0,saveConfig:this.lovelace.saveConfig,takeControl:()=>{(0,Q.z)(this,{lovelace:this.lovelace,mode:"storage",narrow:this.narrow})},deleteDashboard:async()=>{if(!await(0,S.dk)(this,{title:this.hass.localize("ui.panel.config.lovelace.dashboards.confirm_delete_title",{dashboard_title:i.title}),text:this.hass.localize("ui.panel.config.lovelace.dashboards.confirm_delete_text"),confirmText:this.hass.localize("ui.common.delete"),destructive:!0}))return!1;try{return await(0,A.A_)(this.hass,i.id),!0}catch(e){return!1}}})}this.lovelace.setEditMode(!0)}}}}(0,a.Cg)([(0,s.MZ)({attribute:!1})],Ce.prototype,"panel",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],Ce.prototype,"hass",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],Ce.prototype,"lovelace",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean})],Ce.prototype,"narrow",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],Ce.prototype,"route",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],Ce.prototype,"extraActionItems",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,attribute:"no-edit"})],Ce.prototype,"noEdit",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],Ce.prototype,"backButton",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],Ce.prototype,"backPath",void 0),(0,a.Cg)([(0,s.wk)()],Ce.prototype,"_curView",void 0),(0,a.Cg)([(0,s.wk)()],Ce.prototype,"_resourceMode",void 0),(0,a.Cg)([(0,s.MZ)()],Ce.prototype,"_persistentNotifications",void 0),Ce=(0,a.Cg)([(0,s.EM)("hui-root")],Ce),t()}catch(e){t(e)}})},41570(e,t,i){i.d(t,{c:()=>a});const a=/Mac/i.test(navigator.userAgent)},84187(e,t,i){i.d(t,{M:()=>a});const a=/(?:iphone|android|ipad)/i.test(navigator.userAgent)}};