diff --git a/custom_components/houseplan/const.py b/custom_components/houseplan/const.py index 35bc82f7..88d9b454 100755 --- a/custom_components/houseplan/const.py +++ b/custom_components/houseplan/const.py @@ -51,7 +51,7 @@ SCHEDULED_GRACE_S = 30 * 24 * 3600 FILES_DIR = "houseplan/files" ASSETS_DIR = "houseplan/assets" CONF_ADMIN_ONLY = "admin_only" -VERSION = "1.72.0-beta.1" +VERSION = "1.72.0-beta.2" DECOR_ASSETS_API_VERSION = 1 # #43: the support transport is deliberately not configurable. A user supplied diff --git a/custom_components/houseplan/frontend/houseplan-assets.json b/custom_components/houseplan/frontend/houseplan-assets.json index 8820c57d..99bc1ffe 100644 --- a/custom_components/houseplan/frontend/houseplan-assets.json +++ b/custom_components/houseplan/frontend/houseplan-assets.json @@ -1,169 +1,169 @@ { "schema": 1, - "fingerprint": "ae7c8e5f4037f7411ca44d300e7144531a4d1459ed32af8cb65818605449bfea", + "fingerprint": "7b4d74c1518e5fb1a797d7bcbc7e8b7a5eef380513e51e6901c3c9f537123e91", "entry": "houseplan-card.js", "initialViewFiles": [ - "houseplan-assets/houseplan-card-BSrM0Lhk.js", + "houseplan-assets/houseplan-card-DcH_msOh.js", "houseplan-card.js" ], - "initialViewGzipBytes": 295741, + "initialViewGzipBytes": 295744, "lazyFiles": [ - "houseplan-assets/backdrop-pick-DZzpEyIT.js", - "houseplan-assets/de-BvZPvnYY.js", - "houseplan-assets/editor-BTu1pEFs.js", - "houseplan-assets/fr-DjtFhN-Y.js", - "houseplan-assets/houseplan-editor-runtime-DZKI4RBC.js", - "houseplan-assets/houseplan-onboarding-runtime-CnjofBa1.js", - "houseplan-assets/hp-zigbee-topology-overlay-ut3HMh-r.js", - "houseplan-assets/zigbee-topology-rDtALgJu.js", - "houseplan-assets/zigbee-topology-runtime-DNuifEaQ.js" + "houseplan-assets/backdrop-pick-CXzP7hUG.js", + "houseplan-assets/de-CcfVGZcf.js", + "houseplan-assets/editor-CrMXGx3s.js", + "houseplan-assets/fr-OCiOh_q7.js", + "houseplan-assets/houseplan-editor-runtime-CaF5LJAh.js", + "houseplan-assets/houseplan-onboarding-runtime-BiIOObYb.js", + "houseplan-assets/hp-zigbee-topology-overlay-B7l7_FNi.js", + "houseplan-assets/zigbee-topology-runtime-BFjOXm55.js", + "houseplan-assets/zigbee-topology-x104QxRs.js" ], - "lazyGzipBytes": 234166, + "lazyGzipBytes": 234162, "lazyEditorFiles": [ - "houseplan-assets/backdrop-pick-DZzpEyIT.js", - "houseplan-assets/editor-BTu1pEFs.js", - "houseplan-assets/houseplan-editor-runtime-DZKI4RBC.js", - "houseplan-assets/zigbee-topology-rDtALgJu.js" + "houseplan-assets/backdrop-pick-CXzP7hUG.js", + "houseplan-assets/editor-CrMXGx3s.js", + "houseplan-assets/houseplan-editor-runtime-CaF5LJAh.js", + "houseplan-assets/zigbee-topology-x104QxRs.js" ], - "lazyEditorGzipBytes": 173959, + "lazyEditorGzipBytes": 173958, "lazyOnboardingFiles": [ - "houseplan-assets/backdrop-pick-DZzpEyIT.js", - "houseplan-assets/houseplan-onboarding-runtime-CnjofBa1.js" + "houseplan-assets/backdrop-pick-CXzP7hUG.js", + "houseplan-assets/houseplan-onboarding-runtime-BiIOObYb.js" ], - "lazyOnboardingGzipBytes": 14238, + "lazyOnboardingGzipBytes": 14235, "lazyLocaleFiles": [ - "houseplan-assets/de-BvZPvnYY.js", - "houseplan-assets/fr-DjtFhN-Y.js" + "houseplan-assets/de-CcfVGZcf.js", + "houseplan-assets/fr-OCiOh_q7.js" ], - "lazyLocaleGzipBytes": 49113, + "lazyLocaleGzipBytes": 49109, "files": [ { - "path": "houseplan-assets/backdrop-pick-DZzpEyIT.js", - "sha256": "90e74652d489f1e60b211cc53040d552ac55c7c69b23e86069f20cfc3ee38512", + "path": "houseplan-assets/backdrop-pick-CXzP7hUG.js", + "sha256": "ede625d42274e8806716776cb0e4de9707fa6713bd990f13c564fc9348fe08c5", "rawBytes": 21418, - "gzipBytes": 7283, + "gzipBytes": 7282, "isEntry": false, "imports": [ - "houseplan-assets/houseplan-card-BSrM0Lhk.js" + "houseplan-assets/houseplan-card-DcH_msOh.js" ], "dynamicImports": [] }, { - "path": "houseplan-assets/de-BvZPvnYY.js", - "sha256": "9f3303e77789e32084da7d84bc23988a35264a2c216c88758380ff88e7382b29", + "path": "houseplan-assets/de-CcfVGZcf.js", + "sha256": "ceca4bfbade91448d50b8ce35e0e894fcf58023f692d6ecc11968add4a501661", "rawBytes": 82182, - "gzipBytes": 24826, + "gzipBytes": 24824, "isEntry": false, "imports": [], "dynamicImports": [] }, { - "path": "houseplan-assets/editor-BTu1pEFs.js", - "sha256": "0a9ae05765b95b1a953bba7980c41a3aec5901bcaaf5a0b38eddd7dda4b2f1d3", + "path": "houseplan-assets/editor-CrMXGx3s.js", + "sha256": "70f2f6ee3de165adf92a553886464362fdfcad7dc99e294340e945d82369ece9", "rawBytes": 3826, - "gzipBytes": 1581, + "gzipBytes": 1579, "isEntry": false, "imports": [ - "houseplan-assets/houseplan-card-BSrM0Lhk.js" + "houseplan-assets/houseplan-card-DcH_msOh.js" ], "dynamicImports": [] }, { - "path": "houseplan-assets/fr-DjtFhN-Y.js", - "sha256": "32800d08009e00fe879aa19ade33f3a327d114db43e1236743fea0a77fe37efd", + "path": "houseplan-assets/fr-OCiOh_q7.js", + "sha256": "35feec4d0e40f8d157537b89c32e7cf066fdb984c020c2112303b6863bfa2bfd", "rawBytes": 84312, - "gzipBytes": 24287, + "gzipBytes": 24285, "isEntry": false, "imports": [], "dynamicImports": [] }, { - "path": "houseplan-assets/houseplan-card-BSrM0Lhk.js", - "sha256": "51a395b395bea925d7a7b846cf95918c99add73b71a3d98a5654de525a7f2180", + "path": "houseplan-assets/houseplan-card-DcH_msOh.js", + "sha256": "3ad91eaf921e0d682e4b9c14af09d754d1511b432624cc5e7064d71b00aabe0e", "rawBytes": 1050357, - "gzipBytes": 294946, + "gzipBytes": 294949, "isEntry": false, "imports": [], "dynamicImports": [ - "houseplan-assets/de-BvZPvnYY.js", - "houseplan-assets/editor-BTu1pEFs.js", - "houseplan-assets/fr-DjtFhN-Y.js", - "houseplan-assets/houseplan-editor-runtime-DZKI4RBC.js", - "houseplan-assets/houseplan-onboarding-runtime-CnjofBa1.js", - "houseplan-assets/hp-zigbee-topology-overlay-ut3HMh-r.js" + "houseplan-assets/de-CcfVGZcf.js", + "houseplan-assets/editor-CrMXGx3s.js", + "houseplan-assets/fr-OCiOh_q7.js", + "houseplan-assets/houseplan-editor-runtime-CaF5LJAh.js", + "houseplan-assets/houseplan-onboarding-runtime-BiIOObYb.js", + "houseplan-assets/hp-zigbee-topology-overlay-B7l7_FNi.js" ] }, { - "path": "houseplan-assets/houseplan-editor-runtime-DZKI4RBC.js", - "sha256": "9f72e440692743cad051327d3271b4dc847a688506d658c452edfbc5ea40f369", + "path": "houseplan-assets/houseplan-editor-runtime-CaF5LJAh.js", + "sha256": "9045a38e1be7f4a93f6934c82380b94e2e9df95532bcfd2085d25c5225a00a04", "rawBytes": 608951, - "gzipBytes": 160249, + "gzipBytes": 160252, "isEntry": false, "imports": [ - "houseplan-assets/backdrop-pick-DZzpEyIT.js", - "houseplan-assets/houseplan-card-BSrM0Lhk.js", - "houseplan-assets/zigbee-topology-rDtALgJu.js" + "houseplan-assets/backdrop-pick-CXzP7hUG.js", + "houseplan-assets/houseplan-card-DcH_msOh.js", + "houseplan-assets/zigbee-topology-x104QxRs.js" ], "dynamicImports": [ - "houseplan-assets/zigbee-topology-runtime-DNuifEaQ.js" + "houseplan-assets/zigbee-topology-runtime-BFjOXm55.js" ] }, { - "path": "houseplan-assets/houseplan-onboarding-runtime-CnjofBa1.js", - "sha256": "9f94d25e535d4c716afcebf62a6eda2a135d6ef3d9a35df06004086ff0127bc5", + "path": "houseplan-assets/houseplan-onboarding-runtime-BiIOObYb.js", + "sha256": "1619296b625e2dd17d93ab4bc01e928dec730ddf5b8a56e12a7bc276addf10e6", "rawBytes": 28088, - "gzipBytes": 6955, + "gzipBytes": 6953, "isEntry": false, "imports": [ - "houseplan-assets/backdrop-pick-DZzpEyIT.js", - "houseplan-assets/houseplan-card-BSrM0Lhk.js" + "houseplan-assets/backdrop-pick-CXzP7hUG.js", + "houseplan-assets/houseplan-card-DcH_msOh.js" ], "dynamicImports": [] }, { - "path": "houseplan-assets/hp-zigbee-topology-overlay-ut3HMh-r.js", - "sha256": "44cc78e932500432956f0405570dd4552ecff82ca936a18c4c8c8a75d1725d2a", + "path": "houseplan-assets/hp-zigbee-topology-overlay-B7l7_FNi.js", + "sha256": "4e87b71be6179c03adb570887921e1a86ba8965483be24135f3bce2d27a5ed82", "rawBytes": 6007, - "gzipBytes": 2377, + "gzipBytes": 2380, "isEntry": false, "imports": [ - "houseplan-assets/houseplan-card-BSrM0Lhk.js", - "houseplan-assets/zigbee-topology-rDtALgJu.js", - "houseplan-assets/zigbee-topology-runtime-DNuifEaQ.js" + "houseplan-assets/houseplan-card-DcH_msOh.js", + "houseplan-assets/zigbee-topology-runtime-BFjOXm55.js", + "houseplan-assets/zigbee-topology-x104QxRs.js" ], "dynamicImports": [] }, { - "path": "houseplan-assets/zigbee-topology-rDtALgJu.js", - "sha256": "8cbd5fd28f72ef1dff7472bf8d11f72ed0539e7586e9afd94a50b345449396b0", - "rawBytes": 12382, - "gzipBytes": 4846, - "isEntry": false, - "imports": [ - "houseplan-assets/houseplan-card-BSrM0Lhk.js" - ], - "dynamicImports": [] - }, - { - "path": "houseplan-assets/zigbee-topology-runtime-DNuifEaQ.js", - "sha256": "6aebacb4d38a64c447b42fc0c1fd9e8af30aeec9ed414b8caa72e76d3dd6a3b1", + "path": "houseplan-assets/zigbee-topology-runtime-BFjOXm55.js", + "sha256": "dfd3a3dfc807b9035019ea89187327f20975ad11ff0635f1c9df4ad542d3a6f6", "rawBytes": 3941, "gzipBytes": 1762, "isEntry": false, "imports": [ - "houseplan-assets/houseplan-card-BSrM0Lhk.js", - "houseplan-assets/zigbee-topology-rDtALgJu.js" + "houseplan-assets/houseplan-card-DcH_msOh.js", + "houseplan-assets/zigbee-topology-x104QxRs.js" + ], + "dynamicImports": [] + }, + { + "path": "houseplan-assets/zigbee-topology-x104QxRs.js", + "sha256": "d52ca29eeb5a62e0a00362844d00c66258fef6c375e090b7173515eb78ccf856", + "rawBytes": 12382, + "gzipBytes": 4845, + "isEntry": false, + "imports": [ + "houseplan-assets/houseplan-card-DcH_msOh.js" ], "dynamicImports": [] }, { "path": "houseplan-card.js", - "sha256": "72a73dc69ec2b320184a11d0e841df00acb1da3c57555e7b987c4fa63556a0c5", + "sha256": "e50d3f3c6e84d612ead3f39c6f39d987697dbea608e85d839a41848268cb73a4", "rawBytes": 1183, "gzipBytes": 795, "isEntry": true, "imports": [ - "houseplan-assets/houseplan-card-BSrM0Lhk.js" + "houseplan-assets/houseplan-card-DcH_msOh.js" ], "dynamicImports": [] } diff --git a/custom_components/houseplan/frontend/houseplan-assets/backdrop-pick-DZzpEyIT.js b/custom_components/houseplan/frontend/houseplan-assets/backdrop-pick-CXzP7hUG.js similarity index 94% rename from custom_components/houseplan/frontend/houseplan-assets/backdrop-pick-DZzpEyIT.js rename to custom_components/houseplan/frontend/houseplan-assets/backdrop-pick-CXzP7hUG.js index 1eca2530..ca0aea1a 100644 --- a/custom_components/houseplan/frontend/houseplan-assets/backdrop-pick-DZzpEyIT.js +++ b/custom_components/houseplan/frontend/houseplan-assets/backdrop-pick-CXzP7hUG.js @@ -1,6 +1,6 @@ -globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ae7c8e5f4037f7411ca44d300e7144531a4d1459ed32af8cb65818605449bfea";import{dn as e,c as t,A as i,j as o,k as n,dp as r}from"./houseplan-card-BSrM0Lhk.js";function s(e){const t=e.visualViewport;return t&&Number.isFinite(t.width)&&Number.isFinite(t.height)?{left:Number(t.offsetLeft)||0,top:Number(t.offsetTop)||0,width:Math.max(0,Number(t.width)||0),height:Math.max(0,Number(t.height)||0)}:{left:0,top:0,width:e.innerWidth,height:e.innerHeight}}function a(e,t,i,o=7,n=8){const r=i.left+n,s=i.top+n,a=Math.max(r,i.left+i.width-n),l=Math.max(s,i.top+i.height-n),h=Math.max(0,a-r),d=Math.max(0,l-s),c=Math.min(Math.max(0,t.width),h),u=Math.min(Math.max(0,t.height),d);let p=e.left;p+c>a&&(p=e.right-c),p=Math.min(Math.max(r,p),Math.max(r,a-c));const g=e.bottom+o,_=e.top-o-u;let m="bottom",f=g;return g+u>l&&_>=s?(m="top",f=Math.min(Math.max(s,_),Math.max(s,l-u))):f=Math.min(Math.max(s,g),Math.max(s,l-u)),{left:Math.round(p),top:Math.round(f),side:m,maxWidth:Math.round(h),maxHeight:Math.round(d)}}class l{constructor(e,t,i){this.owner=e,this.name=t,this.keydown=i,this.host=null,this.root=null}window(){return this.owner.ownerDocument.defaultView}dialog(){return this.owner.closest("hp-dialog")}usesPopover(e=!1){const t=this.window();return!e&&!!t&&function(e){const t=e.HTMLElement?.prototype;return"function"==typeof t?.showPopover&&"function"==typeof t?.hidePopover}(t)}get hasFallback(){return!!this.host}containsPath(e){return e.includes(this.owner)||!!this.host&&e.includes(this.host)}ownsActiveElement(){let e=this.owner.ownerDocument.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return!(!e||e!==this.owner&&!this.owner.shadowRoot?.contains(e)&&!this.root?.contains(e))}renderFallback(i,o){const n=this.ensureFallback();return n?(e(t`${i}`,n),n):null}surface(e,t){return t?this.owner.shadowRoot?.querySelector(e)||null:this.root?.querySelector(e)||null}destroy(){this.root&&e(i,this.root),this.host?.remove(),this.host=null,this.root=null}ensureFallback(){if(this.root?.isConnected)return this.root;const e=this.dialog()?.overlayPortal()||this.owner.ownerDocument.body;if(!e)return null;const t=this.owner.ownerDocument.createElement("div");return t.dataset.hpOverlay=this.name,t.style.display="contents",this.keydown&&t.addEventListener("keydown",this.keydown,!0),e.append(t),this.host=t,this.root=t.attachShadow({mode:"open"}),this.root}}let h=0;class d extends n{constructor(){super(...arguments),this.text="",this.ariaLabel="",this.pointerHover=!1,this._open=!1,this._openTimer=0,this._closeTimer=0,this._positionRaf=0,this._forceFallback=!1,this._hoverOwned=!1,this._overlayDispose=null,this._scrollDialog=null,this._descriptionId="hp-help-description-"+ ++h,this._surfacePointerEnter=()=>{const e=this._window();this._closeTimer&&e?.clearTimeout(this._closeTimer),this._closeTimer=0},this._surfacePointerLeave=()=>{this._scheduleClose()},this._outsidePointerDown=e=>{if(!this._open)return;const t=e.composedPath();this._floating.containsPath(t)||this._closeHelp(!1,"outside")},this._dialogScroll=e=>{const t=this._floating.containsPath(e.composedPath()),i=e.target,o=this._dialog(),n=i instanceof Node&&(i===o||i instanceof Element&&i.contains(this));var r;this._open&&(r=n,!t&&r)&&this._closeHelp(!1,"scroll")},this._keyDown=e=>{if(!this._open||e.defaultPrevented)return;if("Escape"===e.key)return e.preventDefault(),e.stopImmediatePropagation(),void this._closeHelp(this._floating.ownsActiveElement(),"escape");const t=this.renderRoot.querySelector(".trigger");if(!t||!e.composedPath().includes(t))return;const i=this._surface();if(!i||i.scrollHeight<=i.clientHeight)return;const o=Math.max(40,.8*i.clientHeight),n={ArrowDown:40,ArrowUp:-40,PageDown:o,PageUp:-o};if("Home"===e.key)i.scrollTop=0;else if("End"===e.key)i.scrollTop=i.scrollHeight;else{if(!(e.key in n))return;i.scrollBy({top:n[e.key],behavior:"auto"})}e.preventDefault(),e.stopImmediatePropagation()},this._floating=new l(this,"help",this._keyDown),this._queuePosition=()=>{if(!this._open||this._positionRaf)return;const e=this._window();e&&(this._positionRaf=e.requestAnimationFrame(()=>{this._positionRaf=0,this._position()||this._closeHelp()}))}}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this._keyDown,!0)}willUpdate(){this.toggleAttribute("data-has-content",this._hasContent())}disconnectedCallback(){const e=this.ownerDocument.defaultView;this._unsubscribeOpenListeners(),this.removeEventListener("keydown",this._keyDown,!0),this._clearTimers(),this._positionRaf&&e?.cancelAnimationFrame(this._positionRaf),this._positionRaf=0,this._closeHelp(!1,"disconnect"),super.disconnectedCallback()}updated(e){if(e.has("pointerHover")&&!this.pointerHover){const e=this._window();this._openTimer&&e?.clearTimeout(this._openTimer),this._openTimer=0,this._hoverOwned&&this._closeHelp(!1,"outside")}this._hasContent()||!this._open?this._open&&e.has("text")&&(this._usesPopover()||this._renderFallback(),this._queuePosition()):this._closeHelp()}_window(){return this._floating.window()}_dialog(){return this._floating.dialog()}_usesPopover(){return this._floating.usesPopover(this._forceFallback)}_hasContent(){return e=this.text,t=this.ariaLabel,"string"==typeof e&&e.trim().length>0&&"string"==typeof t&&t.trim().length>0;var e,t}_clearTimers(){const e=this._window();this._openTimer&&e?.clearTimeout(this._openTimer),this._closeTimer&&e?.clearTimeout(this._closeTimer),this._openTimer=0,this._closeTimer=0}_scheduleOpen(){const e=this._window();this.pointerHover&&e&&!this._open&&!this._openTimer&&(this._closeTimer&&e.clearTimeout(this._closeTimer),this._closeTimer=0,this._openTimer=e.setTimeout(()=>{this._openTimer=0,this.isConnected&&(this._hoverOwned=!0,this._openHelp())},300))}_scheduleClose(){const e=this._window(),t=this.renderRoot.querySelector(".trigger");e&&!t?.matches(":focus-visible")&&(this._openTimer&&e.clearTimeout(this._openTimer),this._closeTimer&&e.clearTimeout(this._closeTimer),this._openTimer=0,this._closeTimer=e.setTimeout(()=>{this._closeTimer=0,this.isConnected&&this._closeHelp()},150))}_triggerPointerEnter(e){this.pointerHover&&"mouse"===e.pointerType&&this._scheduleOpen()}_triggerPointerLeave(e){"mouse"===e.pointerType&&this._scheduleClose()}_triggerFocus(){queueMicrotask(()=>{const e=this.renderRoot.querySelector(".trigger");e?.matches(":focus-visible")&&(this._hoverOwned=!1,this._openHelp())})}_triggerBlur(){this._scheduleClose()}_triggerClick(){this._open?this._closeHelp():(this._hoverOwned=!1,this._openHelp())}_subscribeOpenListeners(){this.ownerDocument.addEventListener("pointerdown",this._outsidePointerDown,!0),this.ownerDocument.addEventListener("keydown",this._keyDown,!0);const e=this._window();e?.addEventListener("resize",this._queuePosition),e?.addEventListener("orientationchange",this._queuePosition),e?.visualViewport?.addEventListener("resize",this._queuePosition),e?.visualViewport?.addEventListener("scroll",this._queuePosition),this._scrollDialog=this._dialog(),this._scrollDialog?.addEventListener("scroll",this._dialogScroll,!0)}_unsubscribeOpenListeners(){this.ownerDocument.removeEventListener("pointerdown",this._outsidePointerDown,!0),this.ownerDocument.removeEventListener("keydown",this._keyDown,!0);const e=this._window();e?.removeEventListener("resize",this._queuePosition),e?.removeEventListener("orientationchange",this._queuePosition),e?.visualViewport?.removeEventListener("resize",this._queuePosition),e?.visualViewport?.removeEventListener("scroll",this._queuePosition),this._scrollDialog?.removeEventListener("scroll",this._dialogScroll,!0),this._scrollDialog=null}async _openHelp(){!this._open&&this._hasContent()&&(this._clearTimers(),this._forceFallback=!1,this._open=!0,this._subscribeOpenListeners(),await this.updateComplete,this._open&&(this._usesPopover()||this._renderFallback(),this._position()?this._overlayDispose=this._dialog()?.registerOverlay({owner:this,group:"transient",close:e=>this._closeHelp("escape"===e&&this._floating.ownsActiveElement(),e)})||null:this._closeHelp()))}_closeHelp(e=!1,t="exclusive"){if(!this._open&&!this._floating.hasFallback)return;this._clearTimers();const i=this._overlayDispose;this._overlayDispose=null,i?.();const o=this.renderRoot.querySelector(".tooltip");if(o?.hidePopover)try{o.matches(":popover-open")&&o.hidePopover()}catch{}this._open=!1,this._hoverOwned=!1,this._unsubscribeOpenListeners(),this._floating.destroy(),e&&this.updateComplete.then(()=>this.renderRoot.querySelector(".trigger")?.focus())}_tooltipTemplate(e){return t`