fix(touch): refresh device hits and defer pinch zoom save (#613)

Issue: #613
User-Visible: yes
This commit is contained in:
Claude
2026-09-23 05:35:41 +03:00
parent 59fdae817a
commit e95936cdce
50 changed files with 1009 additions and 666 deletions
@@ -1,312 +1,312 @@
{
"schema": 1,
"fingerprint": "1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c",
"fingerprint": "7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d",
"entry": "houseplan-card.js",
"panelEntry": "houseplan-panel.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 290460,
"initialViewGzipBytes": 290838,
"initialPanelFiles": [
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-panel.js"
],
"initialPanelGzipBytes": 291983,
"initialPanelGzipBytes": 292361,
"initialPanelOnlyFiles": [
"houseplan-panel.js"
],
"initialPanelOnlyGzipBytes": 2327,
"initialPanelOnlyGzipBytes": 2326,
"lazyFiles": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/de-CvJX0Ow9.js",
"houseplan-assets/editor-DEOW1N-C.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/fr-DZUVGtpd.js",
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-editor-runtime-tbnt9LnD.js",
"houseplan-assets/houseplan-onboarding-runtime-86SoSEFc.js",
"houseplan-assets/hp-zigbee-topology-overlay-DJtHrXPE.js",
"houseplan-assets/iso-scene-render-B6Aks3Kq.js",
"houseplan-assets/live-interaction-runtime-D4mOBGpd.js",
"houseplan-assets/pdf-export-f90A6VCG.js",
"houseplan-assets/summary-panel-runtime-loaded-CZlfz0Xl.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js",
"houseplan-assets/zigbee-topology-runtime-tN_qTU1Q.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/de-Dd67KZRi.js",
"houseplan-assets/editor-BqYGJdy_.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/fr-B8p_WqZo.js",
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-editor-runtime-Bgfhnyaz.js",
"houseplan-assets/houseplan-onboarding-runtime-CFTGZBOM.js",
"houseplan-assets/hp-zigbee-topology-overlay-I70HvJ5c.js",
"houseplan-assets/iso-scene-render-DYDlHSpW.js",
"houseplan-assets/live-interaction-runtime-oBr6T3-s.js",
"houseplan-assets/pdf-export-jsY2v0QA.js",
"houseplan-assets/summary-panel-runtime-loaded-Cp3oDBoZ.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js",
"houseplan-assets/zigbee-topology-runtime-DOdiOjPF.js"
],
"lazyGzipBytes": 459952,
"lazyGzipBytes": 459941,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/editor-DEOW1N-C.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-editor-runtime-tbnt9LnD.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/editor-BqYGJdy_.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-editor-runtime-Bgfhnyaz.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js"
],
"lazyEditorGzipBytes": 243377,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-onboarding-runtime-86SoSEFc.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-onboarding-runtime-CFTGZBOM.js"
],
"lazyOnboardingGzipBytes": 33822,
"lazyOnboardingGzipBytes": 33820,
"lazyLocaleFiles": [
"houseplan-assets/de-CvJX0Ow9.js",
"houseplan-assets/fr-DZUVGtpd.js"
"houseplan-assets/de-Dd67KZRi.js",
"houseplan-assets/fr-B8p_WqZo.js"
],
"lazyLocaleGzipBytes": 55376,
"lazyIsometricFiles": [
"houseplan-assets/iso-scene-render-B6Aks3Kq.js"
"houseplan-assets/iso-scene-render-DYDlHSpW.js"
],
"lazyIsometricGzipBytes": 17643,
"lazyFurnitureArtFiles": [
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js"
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js"
],
"lazyFurnitureArtGzipBytes": 16939,
"lazyFurnitureArtGzipBytes": 16940,
"lazyPdfFiles": [
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/pdf-export-f90A6VCG.js"
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/pdf-export-jsY2v0QA.js"
],
"lazyPdfGzipBytes": 126826,
"lazyPdfGzipBytes": 126827,
"files": [
{
"path": "houseplan-assets/backdrop-pick-BBzikKL2.js",
"sha256": "89ccbfee082a908b4d357c0d1190e2bf341b0358475b773efb330e49b0f1886f",
"path": "houseplan-assets/backdrop-pick-ChtekkjK.js",
"sha256": "fb263226fc7bf7a9d872823209b3844f0162bdcf3bed278fb79123e00e750b39",
"rawBytes": 74076,
"gzipBytes": 23933,
"gzipBytes": 23935,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-CvJX0Ow9.js",
"sha256": "62d35a977800def77047c802e5509342fb52aa96bfab819b69ab7c6fcba25732",
"path": "houseplan-assets/de-Dd67KZRi.js",
"sha256": "dd8beef1b1848fe6d617084ade594a5022e2b89585bcc5ae52ce80290aa04ea0",
"rawBytes": 92496,
"gzipBytes": 27932,
"gzipBytes": 27930,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-DEOW1N-C.js",
"sha256": "356e862c4531fec75731b6514e3915e0531954d93e9d2a012ebac3f65765c107",
"path": "houseplan-assets/editor-BqYGJdy_.js",
"sha256": "4b98e3971c9d0061f4cbf48e86c7298ccc396287db7b6435577a2d4548906f03",
"rawBytes": 3833,
"gzipBytes": 1585,
"gzipBytes": 1584,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/form-kit.styles-J0n2asaU.js",
"sha256": "f95006c96a719b7ef5cce919d3afb4d851a21f88e7ae05964624d35228076cb9",
"path": "houseplan-assets/form-kit.styles-B_5CMgdi.js",
"sha256": "bda85962b57af51da115177735c9804ca7420bf400704e9fb23e1f9c7e5d453d",
"rawBytes": 25600,
"gzipBytes": 5057,
"gzipBytes": 5056,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-DZUVGtpd.js",
"sha256": "97ec4f07911fd1b3bd87f1e3c7a23695dbdb144ff2ffb871d51120cdf94d801b",
"path": "houseplan-assets/fr-B8p_WqZo.js",
"sha256": "2a7573174d1aac3335014ec134d1abbe04bb4956d32a0c1d69ff99134d263af0",
"rawBytes": 94813,
"gzipBytes": 27444,
"gzipBytes": 27446,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"sha256": "d99385353bbbb5473838377cc98ce0e87b9767588faa09bcc6897c73a2bca826",
"path": "houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"sha256": "983b8b9426569c19dbb8e1d4f63eb7a9b2306f13ed585a735b13f2775cca3fcc",
"rawBytes": 52035,
"gzipBytes": 16939,
"gzipBytes": 16940,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-BObT7Q45.js",
"sha256": "26c0b9d45bb404e6cf448cd8c7ac03a4a91371782bb8121460b4a30c04a40049",
"rawBytes": 1030217,
"gzipBytes": 289656,
"path": "houseplan-assets/houseplan-card-CY6xhpFf.js",
"sha256": "a071fa981f36914383139e644326e72b1e6176b3252ccc3aa78dd72518fa2801",
"rawBytes": 1031490,
"gzipBytes": 290035,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-CvJX0Ow9.js",
"houseplan-assets/editor-DEOW1N-C.js",
"houseplan-assets/fr-DZUVGtpd.js",
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-editor-runtime-tbnt9LnD.js",
"houseplan-assets/houseplan-onboarding-runtime-86SoSEFc.js",
"houseplan-assets/hp-zigbee-topology-overlay-DJtHrXPE.js",
"houseplan-assets/iso-scene-render-B6Aks3Kq.js",
"houseplan-assets/live-interaction-runtime-D4mOBGpd.js",
"houseplan-assets/pdf-export-f90A6VCG.js",
"houseplan-assets/summary-panel-runtime-loaded-CZlfz0Xl.js"
"houseplan-assets/de-Dd67KZRi.js",
"houseplan-assets/editor-BqYGJdy_.js",
"houseplan-assets/fr-B8p_WqZo.js",
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-editor-runtime-Bgfhnyaz.js",
"houseplan-assets/houseplan-onboarding-runtime-CFTGZBOM.js",
"houseplan-assets/hp-zigbee-topology-overlay-I70HvJ5c.js",
"houseplan-assets/iso-scene-render-DYDlHSpW.js",
"houseplan-assets/live-interaction-runtime-oBr6T3-s.js",
"houseplan-assets/pdf-export-jsY2v0QA.js",
"houseplan-assets/summary-panel-runtime-loaded-Cp3oDBoZ.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-tbnt9LnD.js",
"sha256": "1e3621aa6e07d683bd4564e13fd28aafe905c2663fcd4d1387e8d4ed9d172474",
"path": "houseplan-assets/houseplan-editor-runtime-Bgfhnyaz.js",
"sha256": "bdbe0ffab960a7814af052425af929597c229a02633bc9fd7dd3e2e39e128b16",
"rawBytes": 677705,
"gzipBytes": 188436,
"gzipBytes": 188434,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-tN_qTU1Q.js"
"houseplan-assets/zigbee-topology-runtime-DOdiOjPF.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-86SoSEFc.js",
"sha256": "f717ed132f519053820b921188e8c54c0b9489f22d1a71293fb7f4ffb74069dc",
"path": "houseplan-assets/houseplan-onboarding-runtime-CFTGZBOM.js",
"sha256": "a30ae97d1a1ee105d299d7ddf92aff7dbf7c57827f2c58a42327acecb7e7df58",
"rawBytes": 15667,
"gzipBytes": 4832,
"gzipBytes": 4829,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-DJtHrXPE.js",
"sha256": "643cf04bb44044dab3a4d831e4866a118e76c796bd3913cba34c0a4927233777",
"path": "houseplan-assets/hp-zigbee-topology-overlay-I70HvJ5c.js",
"sha256": "dc97d171ad8c66d0adb46d5a94fb727727f2f76db984ac5598b52ef7520504ae",
"rawBytes": 10759,
"gzipBytes": 3687,
"gzipBytes": 3685,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js",
"houseplan-assets/zigbee-topology-runtime-tN_qTU1Q.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js",
"houseplan-assets/zigbee-topology-runtime-DOdiOjPF.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-B6Aks3Kq.js",
"sha256": "7fb99a44f111f3108873c466ac7a0f82f23126ca0939bb279420cda3f49891a0",
"path": "houseplan-assets/iso-scene-render-DYDlHSpW.js",
"sha256": "ac15c4107f62521a9c0ff188784dd8048d3a3c033d990a8646bc1a3306e8493e",
"rawBytes": 51983,
"gzipBytes": 17643,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-D4mOBGpd.js",
"sha256": "d72307dc5213fd81105682bd3cb99bdfe5ab667f3cd708981129e1e68412e80e",
"path": "houseplan-assets/live-interaction-runtime-oBr6T3-s.js",
"sha256": "dfb401c44908a734908c7498fe57e94f4ede193ba6becaecec25bff7e44d4e16",
"rawBytes": 8216,
"gzipBytes": 3210,
"gzipBytes": 3208,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/pdf-export-f90A6VCG.js",
"sha256": "6a7f3d4705720cc9a92a1887fae7e88b1de14a809d61a6360db095570869af37",
"path": "houseplan-assets/pdf-export-jsY2v0QA.js",
"sha256": "95de6a7c44d4972d44572c42994ebafb2fbc81f0a2b273c64129aaa330eba130",
"rawBytes": 236264,
"gzipBytes": 109887,
"isEntry": false,
"imports": [
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-editor-DGDH1Z-d.js",
"sha256": "a3e3731628c6d0edbc5913180c5d143c7d6d3554cf9af074465d81c88f3b787b",
"path": "houseplan-assets/summary-panel-editor-cpiH9JRK.js",
"sha256": "3f4c5c2846bcfb5761333c2fcc60f2b57b47efa00e83a3d2b615cd97f196579b",
"rawBytes": 14862,
"gzipBytes": 3426,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/summary-panel-runtime-loaded-CZlfz0Xl.js"
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-assets/summary-panel-runtime-loaded-Cp3oDBoZ.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-metrics-CRnKPnjo.js",
"sha256": "7d9aa0f49312f3602eefaa33b95a6d64da3c982f3485026e6ed2218de0d6aaa6",
"path": "houseplan-assets/summary-panel-metrics-DVO3nA8Q.js",
"sha256": "e53a0c89f5f9c1854953dec538667a0ef98344b401e461298ea5f430c6b47a68",
"rawBytes": 2611,
"gzipBytes": 1310,
"gzipBytes": 1309,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-runtime-loaded-CZlfz0Xl.js",
"sha256": "02f3b9063bf0bc9a91d165033ce98b09b923804965bd91dcf9a467bd07d19f9c",
"path": "houseplan-assets/summary-panel-runtime-loaded-Cp3oDBoZ.js",
"sha256": "f3d8a2822ed3df349f17587996d8166779e5e7c9ce402c56efeca680f8f80903",
"rawBytes": 72733,
"gzipBytes": 20173,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": [
"houseplan-assets/summary-panel-editor-DGDH1Z-d.js",
"houseplan-assets/summary-panel-metrics-CRnKPnjo.js"
"houseplan-assets/summary-panel-editor-cpiH9JRK.js",
"houseplan-assets/summary-panel-metrics-DVO3nA8Q.js"
]
},
{
"path": "houseplan-assets/zigbee-topology-BXOYIu-9.js",
"sha256": "8fb689936e9da105676dcac047b497bb2ab65dfe80b184b29e68dacaf659bd3e",
"path": "houseplan-assets/zigbee-topology-Cn7gwCu3.js",
"sha256": "58e3ec3368c47a6ababf3538e9724bed821011c8cc4e21f2005f1a05fc6c41ff",
"rawBytes": 18962,
"gzipBytes": 7427,
"gzipBytes": 7428,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-tN_qTU1Q.js",
"sha256": "2eb80ffae43caa09e4006ff3fa910752069a502d94463ef58defdf7c8c8dea34",
"path": "houseplan-assets/zigbee-topology-runtime-DOdiOjPF.js",
"sha256": "1b8ab20cb53758f4e60ed54c27de581790eebb119a402272de079113806d2945",
"rawBytes": 3942,
"gzipBytes": 1767,
"gzipBytes": 1763,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "327b0ff49a66e55a7b6fa00b2acdf4dda91606c2e3538559c5b2b431d6c7986f",
"sha256": "c35a1d67e9778ca5675e016b51eae45b1bebafeb5ade2adb15b74a066a3c14a6",
"rawBytes": 1205,
"gzipBytes": 804,
"gzipBytes": 803,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-panel.js",
"sha256": "234102fcde3bcd24c611dbbfc37c49539b2d89ef0b3ac6529c4f3d10ed77a584",
"sha256": "62e291ba3a12c13facec2582b6a150ede0849125d27d6c9226a310a6427447bd",
"rawBytes": 6165,
"gzipBytes": 2327,
"gzipBytes": 2326,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
}
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";import{az as e,l as o,aC as t,e8 as s,A as a,e9 as i,ea as l,eb as n,E as r,c}from"./houseplan-card-BObT7Q45.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";import{az as e,l as o,aC as t,e8 as s,A as a,e9 as i,ea as l,eb as n,E as r,c}from"./houseplan-card-CY6xhpFf.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";import{c as a,A as e}from"./houseplan-card-BObT7Q45.js";import{s,n as t,a as l,m as r,b as o,c as i,d as u}from"./summary-panel-runtime-loaded-CZlfz0Xl.js";import"./form-kit.styles-J0n2asaU.js";const m=m=>{const{host:c,dialog:d,problems:n,t:b}=m,y=n.find(a=>"error"===a.kind),$=d.localShow!==d.baseLocalShow||!d.localOnly&&!s(t(d.draft),d.base),p=$&&!d.busy&&!y,v=a=>n.find(e=>e.path===a),h=a=>a?b(`summary.problem.${a.code}`):"",k=()=>m.close(),g=a`<label class="summary-switch" for="summary-local-show">
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";import{c as a,A as e}from"./houseplan-card-CY6xhpFf.js";import{s,n as t,a as l,m as r,b as o,c as i,d as u}from"./summary-panel-runtime-loaded-Cp3oDBoZ.js";import"./form-kit.styles-B_5CMgdi.js";const m=m=>{const{host:c,dialog:d,problems:n,t:b}=m,y=n.find(a=>"error"===a.kind),$=d.localShow!==d.baseLocalShow||!d.localOnly&&!s(t(d.draft),d.base),p=$&&!d.busy&&!y,v=a=>n.find(e=>e.path===a),h=a=>a?b(`summary.problem.${a.code}`):"",k=()=>m.close(),g=a`<label class="summary-switch" for="summary-local-show">
<span class="summary-switch-caption"><strong>${b("summary.show_local")}</strong>
<small id="summary-local-show-hint">${b("summary.show_local_hint")}</small></span>
<input id="summary-local-show" data-summary-local-show type="checkbox"
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";import{ee as e,J as t,aX as n,H as i,aa as o,a8 as r,bP as a,bO as s,aW as l,aV as c,aY as d,ef as u,eg as f,bR as m,eh as g}from"./houseplan-card-BObT7Q45.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=d(e.markers);for(const i of Object.values(e.registry.devices||{}))i?.id&&"service"!==i.entry_type&&!n.devices.has(i.id)&&i.area_id&&e.areaToSpace[i.area_id]&&t.add(i.id);for(const i of e.markers||[]){if(i.removed||"virtual"===i.binding)continue;const o=String(i.binding||"").indexOf(":");if(o<1)continue;const r=i.binding.slice(0,o),a=i.binding.slice(o+1),s="device"===r?e.registry.devices?.[a]:null,l="entity"===r?e.registry.entities?.[a]:null,c="device"===r?a:l?.device_id,d="device"===r?s?.area_id:l?.area_id||c&&e.registry.devices?.[c]?.area_id,u="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||d||"",f=u&&e.areaToSpace[u]||i.space||e.firstSpaceId;c&&e.registry.devices?.[c]&&e.spaceIds.has(f)&&(!n.devices.has(c)||"entity"===r&&n.liveEntities.has(a))&&t.add(c)}return t}function y(e,t){return e?.length?t?.length?g(e,t):e:t}function _(e,t){const n=l(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:c(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*h(l,c,d=_){try{let u=0;for(const f of c){const c=l.spaces.find(e=>String(e?.id)===f.id);if(!c)continue;const m=e(c,f),g=d(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const s=t(e);if(!s)continue;const l=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||s;v=y(v,a(l,m.physicalBodies)),yield}const _=m.cellCm/o;u+=s(v)*_*_/1e4}return u}catch{return null}}function p(e,t,n=_){const i=h(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function b(e,t,n,i){if("system"!==e.type)return null;if("device_count"===e.key)return null===t.deviceCount?null:String(t.deviceCount);if("total_area"===e.key)return null===t.areaM2?null:m(t.areaM2,"mi"===n?.config?.unit_system?.length);try{return new Intl.DateTimeFormat(i||void 0,{dateStyle:"short",timeStyle:"short",timeZone:n?.config?.time_zone||void 0}).format(t.now)}catch{return t.now.toLocaleString()}}function S(e,t){const n=e?.states?.[t];if(!n)return null;const i=u(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{h as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,b as summarySystemValue,p as totalCleanFloorAreaM2};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";import{ee as e,J as t,aX as n,H as i,aa as o,a8 as r,bP as a,bO as s,aW as c,aV as l,aY as d,ef as u,eg as f,bR as m,eh as g}from"./houseplan-card-CY6xhpFf.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=d(e.markers);for(const i of Object.values(e.registry.devices||{}))i?.id&&"service"!==i.entry_type&&!n.devices.has(i.id)&&i.area_id&&e.areaToSpace[i.area_id]&&t.add(i.id);for(const i of e.markers||[]){if(i.removed||"virtual"===i.binding)continue;const o=String(i.binding||"").indexOf(":");if(o<1)continue;const r=i.binding.slice(0,o),a=i.binding.slice(o+1),s="device"===r?e.registry.devices?.[a]:null,c="entity"===r?e.registry.entities?.[a]:null,l="device"===r?a:c?.device_id,d="device"===r?s?.area_id:c?.area_id||l&&e.registry.devices?.[l]?.area_id,u="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||d||"",f=u&&e.areaToSpace[u]||i.space||e.firstSpaceId;l&&e.registry.devices?.[l]&&e.spaceIds.has(f)&&(!n.devices.has(l)||"entity"===r&&n.liveEntities.has(a))&&t.add(l)}return t}function y(e,t){return e?.length?t?.length?g(e,t):e:t}function _(e,t){const n=c(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:l(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*h(c,l,d=_){try{let u=0;for(const f of l){const l=c.spaces.find(e=>String(e?.id)===f.id);if(!l)continue;const m=e(l,f),g=d(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const s=t(e);if(!s)continue;const c=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||s;v=y(v,a(c,m.physicalBodies)),yield}const _=m.cellCm/o;u+=s(v)*_*_/1e4}return u}catch{return null}}function p(e,t,n=_){const i=h(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function b(e,t,n,i){if("system"!==e.type)return null;if("device_count"===e.key)return null===t.deviceCount?null:String(t.deviceCount);if("total_area"===e.key)return null===t.areaM2?null:m(t.areaM2,"mi"===n?.config?.unit_system?.length);try{return new Intl.DateTimeFormat(i||void 0,{dateStyle:"short",timeStyle:"short",timeZone:n?.config?.time_zone||void 0}).format(t.now)}catch{return t.now.toLocaleString()}}function S(e,t){const n=e?.states?.[t];if(!n)return null;const i=u(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{h as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,b as summarySystemValue,p as totalCleanFloorAreaM2};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";import{n as t,b as n}from"./zigbee-topology-BXOYIu-9.js";import{aI as e}from"./houseplan-card-BObT7Q45.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(f(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const f=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";import{n as t,b as n}from"./zigbee-topology-Cn7gwCu3.js";import{aI as e}from"./houseplan-card-CY6xhpFf.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(f(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const f=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";try{await import("./houseplan-assets/houseplan-card-BObT7Q45.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale houseplan-card.js: the implementation chunk is unavailable",e)}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";try{await import("./houseplan-assets/houseplan-card-CY6xhpFf.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale houseplan-card.js: the implementation chunk is unavailable",e)}
File diff suppressed because one or more lines are too long
+80
View File
@@ -232,6 +232,81 @@ for (const [type, targetId] of Object.entries(ids)) {
}
}
// #613: Home Assistant nests cards below several shadow roots. Element scroll
// is not composed, so a document listener cannot see the dashboard scroller.
// Move the real card below an external shadow-root scroller, build the cached
// index, then shift it by exactly the distance between two real markers. A
// stale index deterministically returns the former upper marker at the lower
// marker's new painted centre.
const scrollPrepared = await page.evaluate(async () => {
const card = window.__card;
const outer = document.createElement('div');
outer.style.cssText = 'display:block;width:760px;height:620px;';
document.body.replaceChildren(outer);
const root = outer.attachShadow({ mode: 'open' });
const scroller = document.createElement('div');
scroller.style.cssText = 'display:block;width:760px;height:560px;overflow:auto;';
const spacer = document.createElement('div');
spacer.style.height = '90px';
const tail = document.createElement('div');
tail.style.height = '180px';
card.style.cssText = 'display:block;width:760px;height:720px;';
scroller.append(spacer, card, tail);
root.append(scroller);
await card.updateComplete;
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
const upper = card.renderRoot.querySelector('[data-hp="device"][data-id="d_light1"]');
const lower = card.renderRoot.querySelector('[data-hp="device"][data-id="hit-neighbour"]');
const stage = card.renderRoot.querySelector('.stage');
if (!upper || !lower || !stage) return { ready: false };
for (const node of card.renderRoot.querySelectorAll('[data-hp="device"]')) {
node.style.display = node === upper || node === lower ? '' : 'none';
}
const stageRect = stage.getBoundingClientRect();
const x = stageRect.width / 2;
upper.style.left = `${x}px`;
upper.style.top = '190px';
lower.style.left = `${x}px`;
lower.style.top = '250px';
card._deviceHits.invalidate();
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
const centre = (node) => {
const rect = node.getBoundingClientRect();
return { x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 };
};
const beforePoint = centre(lower);
const before = card._deviceHitOwnerAt(beforePoint.x, beforePoint.y)?.id || null;
let scrollInvalidations = 0;
const originalInvalidate = card._deviceHits.invalidate.bind(card._deviceHits);
card._deviceHits.invalidate = () => { scrollInvalidations += 1; originalInvalidate(); };
scroller.scrollTop = 60;
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
const afterPoint = centre(lower);
const after = card._deviceHitOwnerAt(afterPoint.x, afterPoint.y)?.id || null;
window.__hitScrollFixture = { scroller, originalInvalidate };
return {
ready: true,
before,
after,
afterPoint,
shiftedBy: Math.round(beforePoint.y - afterPoint.y),
scrollInvalidations,
};
});
let scrollClicked = null;
if (scrollPrepared.ready) {
await page.mouse.click(scrollPrepared.afterPoint.x, scrollPrepared.afterPoint.y);
scrollClicked = await page.evaluate(async () => {
const card = window.__card;
await card.updateComplete;
return card._infoCard?.id || null;
});
}
const out = {
realFaceKinds: setup.icon.includes('device-shell')
&& !setup.icon.includes('with-values') && !setup.icon.includes('text-shell')
@@ -244,6 +319,11 @@ const out = {
&& entry.neighbourFloor && !entry.neighbourPainted
&& entry.native === entry.targetId && entry.semantic === entry.targetId),
everyPaintedPointOwnsClick: cases.every((entry) => entry.clicked === entry.targetId),
shadowScrollInvalidatesCachedGeometry: scrollPrepared.ready
&& scrollPrepared.shiftedBy === 60 && scrollPrepared.scrollInvalidations >= 1,
shadowScrollResolvesNewPaintedOwner: scrollPrepared.before === 'hit-neighbour'
&& scrollPrepared.after === 'hit-neighbour',
shadowScrollClickUsesNewPaintedOwner: scrollClicked === 'hit-neighbour',
};
if (Object.values(out).some((value) => value !== true)) {
+98
View File
@@ -26,6 +26,104 @@ out.pinchZoomsInPlanEditor = await page.evaluate(() => {
return zoomed && c._path.length === 0;
});
// #613: persistence is a gesture terminal effect, not synchronous work in
// either pointermove path. Count only the zoom key and exercise both the plain
// stage pipeline and the capture path used when a device swallows bubbling.
Object.assign(out, await page.evaluate(async () => {
const c = window.__card;
const storagePrototype = Object.getPrototypeOf(localStorage);
const originalSetItem = storagePrototype.setItem;
let zoomWrites = 0;
storagePrototype.setItem = function setItem(key, value) {
if (key === 'houseplan_card_zoom_v1') zoomWrites += 1;
return originalSetItem.call(this, key, value);
};
const resetPointers = () => {
c._pointers.clear();
c._touchContacts.clear();
c._pinchStart = null;
c._panStart = null;
c._panLock = null;
c._pinchZoomDirty = false;
c._viewportGestureDirty = false;
};
const directPointer = (id, x, target = c._stageEl) => ({
pointerId: id, pointerType: 'touch', clientX: x, clientY: 300,
target, button: 0, isPrimary: id % 2 === 1, composedPath: () => [target],
preventDefault() {},
});
try {
c._setMode('view');
await c.updateComplete;
c._cancelCameraTransition(false);
resetPointers();
const directStart = zoomWrites;
c._stagePointerDown(directPointer(201, 300));
c._stagePointerDown(directPointer(202, 400));
for (const [left, right] of [[285, 415], [270, 430], [250, 450]]) {
c._stagePointerMove(directPointer(201, left));
c._stagePointerMove(directPointer(202, right));
}
const directMoveWrites = zoomWrites - directStart;
c._stagePointerUp(directPointer(201, 250));
const directFirstTerminalWrites = zoomWrites - directStart;
c._stagePointerUp(directPointer(202, 450));
const directTotalWrites = zoomWrites - directStart;
const stage = c._stageEl;
const marker = c.renderRoot.querySelector('.dev[data-entity]')
|| c.renderRoot.querySelector('.dev');
const pointer = (type, id, target, x) => target.dispatchEvent(new PointerEvent(type, {
bubbles: true, composed: true, cancelable: true, pointerId: id,
pointerType: 'touch', clientX: x, clientY: 300,
button: type === 'pointerdown' ? 0 : -1,
}));
const captureGesture = (firstTerminal, secondTerminal, base) => {
resetPointers();
const start = zoomWrites;
pointer('pointerdown', base, stage, 400);
pointer('pointerdown', base + 1, marker, 300);
pointer('pointermove', base, stage, 450);
pointer('pointermove', base + 1, marker, 250);
pointer('pointermove', base, stage, 470);
const moveWrites = zoomWrites - start;
pointer(firstTerminal, base + 1, marker, 250);
const firstWrites = zoomWrites - start;
pointer(secondTerminal, base, stage, 470);
return { moveWrites, firstWrites, totalWrites: zoomWrites - start };
};
const captureTerminals = marker ? [
captureGesture('pointerup', 'pointerup', 210),
captureGesture('pointercancel', 'pointerup', 220),
captureGesture('lostpointercapture', 'pointercancel', 230),
] : [];
c._setMode('plan');
await c.updateComplete;
resetPointers();
const editorStart = zoomWrites;
c._stagePointerDown(directPointer(241, 300));
c._stagePointerDown(directPointer(242, 400));
c._stagePointerMove(directPointer(241, 250));
c._stagePointerMove(directPointer(242, 450));
c._stagePointerUp(directPointer(241, 250));
c._stagePointerUp(directPointer(242, 450));
const editorWrites = zoomWrites - editorStart;
return {
directPinchWritesOnlyAtFinalTerminal: directMoveWrites === 0
&& directFirstTerminalWrites === 0 && directTotalWrites === 1,
capturedPinchWritesOnlyAtFinalTerminal: captureTerminals.length === 3
&& captureTerminals.every((entry) => entry.moveWrites === 0
&& entry.firstWrites === 0 && entry.totalWrites === 1),
editorPinchDoesNotPersistViewZoom: editorWrites === 0,
};
} finally {
storagePrototype.setItem = originalSetItem;
}
}));
// A real device is the safety boundary: neither order of a pinch may arm the
// marker's long press, and both click and contextmenu compatibility events stay
// owned by that gesture. Exercise every terminal path because touch browsers
+138 -138
View File
@@ -1,312 +1,312 @@
{
"schema": 1,
"fingerprint": "1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c",
"fingerprint": "7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d",
"entry": "houseplan-card.js",
"panelEntry": "houseplan-panel.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 290460,
"initialViewGzipBytes": 290838,
"initialPanelFiles": [
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-panel.js"
],
"initialPanelGzipBytes": 291983,
"initialPanelGzipBytes": 292361,
"initialPanelOnlyFiles": [
"houseplan-panel.js"
],
"initialPanelOnlyGzipBytes": 2327,
"initialPanelOnlyGzipBytes": 2326,
"lazyFiles": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/de-CvJX0Ow9.js",
"houseplan-assets/editor-DEOW1N-C.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/fr-DZUVGtpd.js",
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-editor-runtime-tbnt9LnD.js",
"houseplan-assets/houseplan-onboarding-runtime-86SoSEFc.js",
"houseplan-assets/hp-zigbee-topology-overlay-DJtHrXPE.js",
"houseplan-assets/iso-scene-render-B6Aks3Kq.js",
"houseplan-assets/live-interaction-runtime-D4mOBGpd.js",
"houseplan-assets/pdf-export-f90A6VCG.js",
"houseplan-assets/summary-panel-runtime-loaded-CZlfz0Xl.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js",
"houseplan-assets/zigbee-topology-runtime-tN_qTU1Q.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/de-Dd67KZRi.js",
"houseplan-assets/editor-BqYGJdy_.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/fr-B8p_WqZo.js",
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-editor-runtime-Bgfhnyaz.js",
"houseplan-assets/houseplan-onboarding-runtime-CFTGZBOM.js",
"houseplan-assets/hp-zigbee-topology-overlay-I70HvJ5c.js",
"houseplan-assets/iso-scene-render-DYDlHSpW.js",
"houseplan-assets/live-interaction-runtime-oBr6T3-s.js",
"houseplan-assets/pdf-export-jsY2v0QA.js",
"houseplan-assets/summary-panel-runtime-loaded-Cp3oDBoZ.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js",
"houseplan-assets/zigbee-topology-runtime-DOdiOjPF.js"
],
"lazyGzipBytes": 459952,
"lazyGzipBytes": 459941,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/editor-DEOW1N-C.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-editor-runtime-tbnt9LnD.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/editor-BqYGJdy_.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-editor-runtime-Bgfhnyaz.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js"
],
"lazyEditorGzipBytes": 243377,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-onboarding-runtime-86SoSEFc.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-onboarding-runtime-CFTGZBOM.js"
],
"lazyOnboardingGzipBytes": 33822,
"lazyOnboardingGzipBytes": 33820,
"lazyLocaleFiles": [
"houseplan-assets/de-CvJX0Ow9.js",
"houseplan-assets/fr-DZUVGtpd.js"
"houseplan-assets/de-Dd67KZRi.js",
"houseplan-assets/fr-B8p_WqZo.js"
],
"lazyLocaleGzipBytes": 55376,
"lazyIsometricFiles": [
"houseplan-assets/iso-scene-render-B6Aks3Kq.js"
"houseplan-assets/iso-scene-render-DYDlHSpW.js"
],
"lazyIsometricGzipBytes": 17643,
"lazyFurnitureArtFiles": [
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js"
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js"
],
"lazyFurnitureArtGzipBytes": 16939,
"lazyFurnitureArtGzipBytes": 16940,
"lazyPdfFiles": [
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/pdf-export-f90A6VCG.js"
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/pdf-export-jsY2v0QA.js"
],
"lazyPdfGzipBytes": 126826,
"lazyPdfGzipBytes": 126827,
"files": [
{
"path": "houseplan-assets/backdrop-pick-BBzikKL2.js",
"sha256": "89ccbfee082a908b4d357c0d1190e2bf341b0358475b773efb330e49b0f1886f",
"path": "houseplan-assets/backdrop-pick-ChtekkjK.js",
"sha256": "fb263226fc7bf7a9d872823209b3844f0162bdcf3bed278fb79123e00e750b39",
"rawBytes": 74076,
"gzipBytes": 23933,
"gzipBytes": 23935,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-CvJX0Ow9.js",
"sha256": "62d35a977800def77047c802e5509342fb52aa96bfab819b69ab7c6fcba25732",
"path": "houseplan-assets/de-Dd67KZRi.js",
"sha256": "dd8beef1b1848fe6d617084ade594a5022e2b89585bcc5ae52ce80290aa04ea0",
"rawBytes": 92496,
"gzipBytes": 27932,
"gzipBytes": 27930,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-DEOW1N-C.js",
"sha256": "356e862c4531fec75731b6514e3915e0531954d93e9d2a012ebac3f65765c107",
"path": "houseplan-assets/editor-BqYGJdy_.js",
"sha256": "4b98e3971c9d0061f4cbf48e86c7298ccc396287db7b6435577a2d4548906f03",
"rawBytes": 3833,
"gzipBytes": 1585,
"gzipBytes": 1584,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/form-kit.styles-J0n2asaU.js",
"sha256": "f95006c96a719b7ef5cce919d3afb4d851a21f88e7ae05964624d35228076cb9",
"path": "houseplan-assets/form-kit.styles-B_5CMgdi.js",
"sha256": "bda85962b57af51da115177735c9804ca7420bf400704e9fb23e1f9c7e5d453d",
"rawBytes": 25600,
"gzipBytes": 5057,
"gzipBytes": 5056,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-DZUVGtpd.js",
"sha256": "97ec4f07911fd1b3bd87f1e3c7a23695dbdb144ff2ffb871d51120cdf94d801b",
"path": "houseplan-assets/fr-B8p_WqZo.js",
"sha256": "2a7573174d1aac3335014ec134d1abbe04bb4956d32a0c1d69ff99134d263af0",
"rawBytes": 94813,
"gzipBytes": 27444,
"gzipBytes": 27446,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"sha256": "d99385353bbbb5473838377cc98ce0e87b9767588faa09bcc6897c73a2bca826",
"path": "houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"sha256": "983b8b9426569c19dbb8e1d4f63eb7a9b2306f13ed585a735b13f2775cca3fcc",
"rawBytes": 52035,
"gzipBytes": 16939,
"gzipBytes": 16940,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-BObT7Q45.js",
"sha256": "26c0b9d45bb404e6cf448cd8c7ac03a4a91371782bb8121460b4a30c04a40049",
"rawBytes": 1030217,
"gzipBytes": 289656,
"path": "houseplan-assets/houseplan-card-CY6xhpFf.js",
"sha256": "a071fa981f36914383139e644326e72b1e6176b3252ccc3aa78dd72518fa2801",
"rawBytes": 1031490,
"gzipBytes": 290035,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-CvJX0Ow9.js",
"houseplan-assets/editor-DEOW1N-C.js",
"houseplan-assets/fr-DZUVGtpd.js",
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-editor-runtime-tbnt9LnD.js",
"houseplan-assets/houseplan-onboarding-runtime-86SoSEFc.js",
"houseplan-assets/hp-zigbee-topology-overlay-DJtHrXPE.js",
"houseplan-assets/iso-scene-render-B6Aks3Kq.js",
"houseplan-assets/live-interaction-runtime-D4mOBGpd.js",
"houseplan-assets/pdf-export-f90A6VCG.js",
"houseplan-assets/summary-panel-runtime-loaded-CZlfz0Xl.js"
"houseplan-assets/de-Dd67KZRi.js",
"houseplan-assets/editor-BqYGJdy_.js",
"houseplan-assets/fr-B8p_WqZo.js",
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-editor-runtime-Bgfhnyaz.js",
"houseplan-assets/houseplan-onboarding-runtime-CFTGZBOM.js",
"houseplan-assets/hp-zigbee-topology-overlay-I70HvJ5c.js",
"houseplan-assets/iso-scene-render-DYDlHSpW.js",
"houseplan-assets/live-interaction-runtime-oBr6T3-s.js",
"houseplan-assets/pdf-export-jsY2v0QA.js",
"houseplan-assets/summary-panel-runtime-loaded-Cp3oDBoZ.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-tbnt9LnD.js",
"sha256": "1e3621aa6e07d683bd4564e13fd28aafe905c2663fcd4d1387e8d4ed9d172474",
"path": "houseplan-assets/houseplan-editor-runtime-Bgfhnyaz.js",
"sha256": "bdbe0ffab960a7814af052425af929597c229a02633bc9fd7dd3e2e39e128b16",
"rawBytes": 677705,
"gzipBytes": 188436,
"gzipBytes": 188434,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-tN_qTU1Q.js"
"houseplan-assets/zigbee-topology-runtime-DOdiOjPF.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-86SoSEFc.js",
"sha256": "f717ed132f519053820b921188e8c54c0b9489f22d1a71293fb7f4ffb74069dc",
"path": "houseplan-assets/houseplan-onboarding-runtime-CFTGZBOM.js",
"sha256": "a30ae97d1a1ee105d299d7ddf92aff7dbf7c57827f2c58a42327acecb7e7df58",
"rawBytes": 15667,
"gzipBytes": 4832,
"gzipBytes": 4829,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BBzikKL2.js",
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/backdrop-pick-ChtekkjK.js",
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-DJtHrXPE.js",
"sha256": "643cf04bb44044dab3a4d831e4866a118e76c796bd3913cba34c0a4927233777",
"path": "houseplan-assets/hp-zigbee-topology-overlay-I70HvJ5c.js",
"sha256": "dc97d171ad8c66d0adb46d5a94fb727727f2f76db984ac5598b52ef7520504ae",
"rawBytes": 10759,
"gzipBytes": 3687,
"gzipBytes": 3685,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js",
"houseplan-assets/zigbee-topology-runtime-tN_qTU1Q.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js",
"houseplan-assets/zigbee-topology-runtime-DOdiOjPF.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-B6Aks3Kq.js",
"sha256": "7fb99a44f111f3108873c466ac7a0f82f23126ca0939bb279420cda3f49891a0",
"path": "houseplan-assets/iso-scene-render-DYDlHSpW.js",
"sha256": "ac15c4107f62521a9c0ff188784dd8048d3a3c033d990a8646bc1a3306e8493e",
"rawBytes": 51983,
"gzipBytes": 17643,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-D4mOBGpd.js",
"sha256": "d72307dc5213fd81105682bd3cb99bdfe5ab667f3cd708981129e1e68412e80e",
"path": "houseplan-assets/live-interaction-runtime-oBr6T3-s.js",
"sha256": "dfb401c44908a734908c7498fe57e94f4ede193ba6becaecec25bff7e44d4e16",
"rawBytes": 8216,
"gzipBytes": 3210,
"gzipBytes": 3208,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/pdf-export-f90A6VCG.js",
"sha256": "6a7f3d4705720cc9a92a1887fae7e88b1de14a809d61a6360db095570869af37",
"path": "houseplan-assets/pdf-export-jsY2v0QA.js",
"sha256": "95de6a7c44d4972d44572c42994ebafb2fbc81f0a2b273c64129aaa330eba130",
"rawBytes": 236264,
"gzipBytes": 109887,
"isEntry": false,
"imports": [
"houseplan-assets/furniture-plan-art.generated-DUVSzIvq.js",
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/furniture-plan-art.generated-Bnv81nQu.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-editor-DGDH1Z-d.js",
"sha256": "a3e3731628c6d0edbc5913180c5d143c7d6d3554cf9af074465d81c88f3b787b",
"path": "houseplan-assets/summary-panel-editor-cpiH9JRK.js",
"sha256": "3f4c5c2846bcfb5761333c2fcc60f2b57b47efa00e83a3d2b615cd97f196579b",
"rawBytes": 14862,
"gzipBytes": 3426,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/summary-panel-runtime-loaded-CZlfz0Xl.js"
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-assets/summary-panel-runtime-loaded-Cp3oDBoZ.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-metrics-CRnKPnjo.js",
"sha256": "7d9aa0f49312f3602eefaa33b95a6d64da3c982f3485026e6ed2218de0d6aaa6",
"path": "houseplan-assets/summary-panel-metrics-DVO3nA8Q.js",
"sha256": "e53a0c89f5f9c1854953dec538667a0ef98344b401e461298ea5f430c6b47a68",
"rawBytes": 2611,
"gzipBytes": 1310,
"gzipBytes": 1309,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-runtime-loaded-CZlfz0Xl.js",
"sha256": "02f3b9063bf0bc9a91d165033ce98b09b923804965bd91dcf9a467bd07d19f9c",
"path": "houseplan-assets/summary-panel-runtime-loaded-Cp3oDBoZ.js",
"sha256": "f3d8a2822ed3df349f17587996d8166779e5e7c9ce402c56efeca680f8f80903",
"rawBytes": 72733,
"gzipBytes": 20173,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-J0n2asaU.js",
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/form-kit.styles-B_5CMgdi.js",
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": [
"houseplan-assets/summary-panel-editor-DGDH1Z-d.js",
"houseplan-assets/summary-panel-metrics-CRnKPnjo.js"
"houseplan-assets/summary-panel-editor-cpiH9JRK.js",
"houseplan-assets/summary-panel-metrics-DVO3nA8Q.js"
]
},
{
"path": "houseplan-assets/zigbee-topology-BXOYIu-9.js",
"sha256": "8fb689936e9da105676dcac047b497bb2ab65dfe80b184b29e68dacaf659bd3e",
"path": "houseplan-assets/zigbee-topology-Cn7gwCu3.js",
"sha256": "58e3ec3368c47a6ababf3538e9724bed821011c8cc4e21f2005f1a05fc6c41ff",
"rawBytes": 18962,
"gzipBytes": 7427,
"gzipBytes": 7428,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-tN_qTU1Q.js",
"sha256": "2eb80ffae43caa09e4006ff3fa910752069a502d94463ef58defdf7c8c8dea34",
"path": "houseplan-assets/zigbee-topology-runtime-DOdiOjPF.js",
"sha256": "1b8ab20cb53758f4e60ed54c27de581790eebb119a402272de079113806d2945",
"rawBytes": 3942,
"gzipBytes": 1767,
"gzipBytes": 1763,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js",
"houseplan-assets/zigbee-topology-BXOYIu-9.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js",
"houseplan-assets/zigbee-topology-Cn7gwCu3.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "327b0ff49a66e55a7b6fa00b2acdf4dda91606c2e3538559c5b2b431d6c7986f",
"sha256": "c35a1d67e9778ca5675e016b51eae45b1bebafeb5ade2adb15b74a066a3c14a6",
"rawBytes": 1205,
"gzipBytes": 804,
"gzipBytes": 803,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-panel.js",
"sha256": "234102fcde3bcd24c611dbbfc37c49539b2d89ef0b3ac6529c4f3d10ed77a584",
"sha256": "62e291ba3a12c13facec2582b6a150ede0849125d27d6c9226a310a6427447bd",
"rawBytes": 6165,
"gzipBytes": 2327,
"gzipBytes": 2326,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-BObT7Q45.js"
"houseplan-assets/houseplan-card-CY6xhpFf.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";import{az as e,l as o,aC as t,e8 as s,A as a,e9 as i,ea as l,eb as n,E as r,c}from"./houseplan-card-BObT7Q45.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";import{az as e,l as o,aC as t,e8 as s,A as a,e9 as i,ea as l,eb as n,E as r,c}from"./houseplan-card-CY6xhpFf.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";import{c as a,A as e}from"./houseplan-card-BObT7Q45.js";import{s,n as t,a as l,m as r,b as o,c as i,d as u}from"./summary-panel-runtime-loaded-CZlfz0Xl.js";import"./form-kit.styles-J0n2asaU.js";const m=m=>{const{host:c,dialog:d,problems:n,t:b}=m,y=n.find(a=>"error"===a.kind),$=d.localShow!==d.baseLocalShow||!d.localOnly&&!s(t(d.draft),d.base),p=$&&!d.busy&&!y,v=a=>n.find(e=>e.path===a),h=a=>a?b(`summary.problem.${a.code}`):"",k=()=>m.close(),g=a`<label class="summary-switch" for="summary-local-show">
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";import{c as a,A as e}from"./houseplan-card-CY6xhpFf.js";import{s,n as t,a as l,m as r,b as o,c as i,d as u}from"./summary-panel-runtime-loaded-Cp3oDBoZ.js";import"./form-kit.styles-B_5CMgdi.js";const m=m=>{const{host:c,dialog:d,problems:n,t:b}=m,y=n.find(a=>"error"===a.kind),$=d.localShow!==d.baseLocalShow||!d.localOnly&&!s(t(d.draft),d.base),p=$&&!d.busy&&!y,v=a=>n.find(e=>e.path===a),h=a=>a?b(`summary.problem.${a.code}`):"",k=()=>m.close(),g=a`<label class="summary-switch" for="summary-local-show">
<span class="summary-switch-caption"><strong>${b("summary.show_local")}</strong>
<small id="summary-local-show-hint">${b("summary.show_local_hint")}</small></span>
<input id="summary-local-show" data-summary-local-show type="checkbox"
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";import{ee as e,J as t,aX as n,H as i,aa as o,a8 as r,bP as a,bO as s,aW as l,aV as c,aY as d,ef as u,eg as f,bR as m,eh as g}from"./houseplan-card-BObT7Q45.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=d(e.markers);for(const i of Object.values(e.registry.devices||{}))i?.id&&"service"!==i.entry_type&&!n.devices.has(i.id)&&i.area_id&&e.areaToSpace[i.area_id]&&t.add(i.id);for(const i of e.markers||[]){if(i.removed||"virtual"===i.binding)continue;const o=String(i.binding||"").indexOf(":");if(o<1)continue;const r=i.binding.slice(0,o),a=i.binding.slice(o+1),s="device"===r?e.registry.devices?.[a]:null,l="entity"===r?e.registry.entities?.[a]:null,c="device"===r?a:l?.device_id,d="device"===r?s?.area_id:l?.area_id||c&&e.registry.devices?.[c]?.area_id,u="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||d||"",f=u&&e.areaToSpace[u]||i.space||e.firstSpaceId;c&&e.registry.devices?.[c]&&e.spaceIds.has(f)&&(!n.devices.has(c)||"entity"===r&&n.liveEntities.has(a))&&t.add(c)}return t}function y(e,t){return e?.length?t?.length?g(e,t):e:t}function _(e,t){const n=l(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:c(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*h(l,c,d=_){try{let u=0;for(const f of c){const c=l.spaces.find(e=>String(e?.id)===f.id);if(!c)continue;const m=e(c,f),g=d(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const s=t(e);if(!s)continue;const l=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||s;v=y(v,a(l,m.physicalBodies)),yield}const _=m.cellCm/o;u+=s(v)*_*_/1e4}return u}catch{return null}}function p(e,t,n=_){const i=h(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function b(e,t,n,i){if("system"!==e.type)return null;if("device_count"===e.key)return null===t.deviceCount?null:String(t.deviceCount);if("total_area"===e.key)return null===t.areaM2?null:m(t.areaM2,"mi"===n?.config?.unit_system?.length);try{return new Intl.DateTimeFormat(i||void 0,{dateStyle:"short",timeStyle:"short",timeZone:n?.config?.time_zone||void 0}).format(t.now)}catch{return t.now.toLocaleString()}}function S(e,t){const n=e?.states?.[t];if(!n)return null;const i=u(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{h as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,b as summarySystemValue,p as totalCleanFloorAreaM2};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";import{ee as e,J as t,aX as n,H as i,aa as o,a8 as r,bP as a,bO as s,aW as c,aV as l,aY as d,ef as u,eg as f,bR as m,eh as g}from"./houseplan-card-CY6xhpFf.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=d(e.markers);for(const i of Object.values(e.registry.devices||{}))i?.id&&"service"!==i.entry_type&&!n.devices.has(i.id)&&i.area_id&&e.areaToSpace[i.area_id]&&t.add(i.id);for(const i of e.markers||[]){if(i.removed||"virtual"===i.binding)continue;const o=String(i.binding||"").indexOf(":");if(o<1)continue;const r=i.binding.slice(0,o),a=i.binding.slice(o+1),s="device"===r?e.registry.devices?.[a]:null,c="entity"===r?e.registry.entities?.[a]:null,l="device"===r?a:c?.device_id,d="device"===r?s?.area_id:c?.area_id||l&&e.registry.devices?.[l]?.area_id,u="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||d||"",f=u&&e.areaToSpace[u]||i.space||e.firstSpaceId;l&&e.registry.devices?.[l]&&e.spaceIds.has(f)&&(!n.devices.has(l)||"entity"===r&&n.liveEntities.has(a))&&t.add(l)}return t}function y(e,t){return e?.length?t?.length?g(e,t):e:t}function _(e,t){const n=c(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:l(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*h(c,l,d=_){try{let u=0;for(const f of l){const l=c.spaces.find(e=>String(e?.id)===f.id);if(!l)continue;const m=e(l,f),g=d(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const s=t(e);if(!s)continue;const c=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||s;v=y(v,a(c,m.physicalBodies)),yield}const _=m.cellCm/o;u+=s(v)*_*_/1e4}return u}catch{return null}}function p(e,t,n=_){const i=h(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function b(e,t,n,i){if("system"!==e.type)return null;if("device_count"===e.key)return null===t.deviceCount?null:String(t.deviceCount);if("total_area"===e.key)return null===t.areaM2?null:m(t.areaM2,"mi"===n?.config?.unit_system?.length);try{return new Intl.DateTimeFormat(i||void 0,{dateStyle:"short",timeStyle:"short",timeZone:n?.config?.time_zone||void 0}).format(t.now)}catch{return t.now.toLocaleString()}}function S(e,t){const n=e?.states?.[t];if(!n)return null;const i=u(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{h as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,b as summarySystemValue,p as totalCleanFloorAreaM2};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";import{n as t,b as n}from"./zigbee-topology-BXOYIu-9.js";import{aI as e}from"./houseplan-card-BObT7Q45.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(f(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const f=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";import{n as t,b as n}from"./zigbee-topology-Cn7gwCu3.js";import{aI as e}from"./houseplan-card-CY6xhpFf.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(f(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const f=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
+1 -1
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="1ee973d11082b1a8d53ac3d7d98323bdf0e4137264a98f2a988610f6f244cb2c";try{await import("./houseplan-assets/houseplan-card-BObT7Q45.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale houseplan-card.js: the implementation chunk is unavailable",e)}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d666f118b3321f5eca092f330ca7f1a3985cf7ab65ea69a2247c9064d4d2e7d";try{await import("./houseplan-assets/houseplan-card-CY6xhpFf.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale houseplan-card.js: the implementation chunk is unavailable",e)}
+1 -1
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -2,6 +2,10 @@
## Unreleased
- After scrolling a dashboard, taps once again belong to the device directly
under the finger, including inside nested Home Assistant panels; pinch now
saves its final zoom once after the gesture instead of writing local storage
on every move ([#613](https://github.com/Matysh/houseplan-card/issues/613)).
- Space imports now keep robot map routes on the imported copy: transfers to
another Home Assistant instance no longer fail on the old floor ID, and
same-instance copies no longer leave the robot trail on the source floor
+4
View File
@@ -8,6 +8,10 @@
## Не выпущено
- После прокрутки дашборда нажатие снова достаётся устройству прямо под
пальцем, в том числе внутри вложенных панелей Home Assistant; pinch сохраняет
итоговый масштаб один раз после жеста вместо записи в локальное хранилище на
каждом движении ([#613](https://github.com/Matysh/houseplan-card/issues/613)).
- При импорте пространства маршруты карт робота теперь следуют за созданной
копией: перенос в другую установку Home Assistant больше не падает из-за ID
старого этажа, а копия в той же установке не оставляет трек робота на
+22
View File
@@ -271,6 +271,17 @@ const MUTANT_DEFINITIONS = [
replace: ' if (false && painted.length) return nearest(painted, point);',
}],
},
{
id: 'device-hit-scroll-observer-disabled',
guard: 'node demo/smoke_device_hit_capsules.mjs',
because: '#613 AC1/AC2: scroll inside a Home Assistant shadow-root ancestor must invalidate '
+ 'the client-coordinate hit index; document-level observation alone cannot see that event',
patches: [{
file: 'src/device-hit-owner.ts',
find: " source.addEventListener('scroll', handler, { passive: true });",
replace: " if (false) source.addEventListener('scroll', handler, { passive: true });",
}],
},
{
id: 'radar-sources-compared-as-text',
guard: 'node --test --test-name-pattern="#567" test/radar-editor.test.mjs',
@@ -7974,6 +7985,17 @@ const MUTANT_DEFINITIONS = [
replace: " if (this._mode === 'view' && ev.pointerType === 'touch' && false) return; // mutant: re-arm hold",
}],
},
{
id: 'touch-pinch-zoom-persists-per-frame',
guard: 'node demo/smoke_editor_gestures.mjs',
because: '#613 AC3/AC4: synchronous localStorage writes must happen once at the final '
+ 'terminal boundary, never on every direct or capture-path pointermove',
patches: [{
file: 'src/houseplan-card.ts',
find: ' private _markPinchZoomDirty(): void { this._pinchZoomDirty = true; }',
replace: ' private _markPinchZoomDirty(): void { this._saveZoom(); } // mutant: per-frame write',
}],
},
{
id: 'touch-pinch-contextmenu-guard-removed',
guard: 'node demo/smoke_editor_gestures.mjs',
+70
View File
@@ -21,6 +21,76 @@ export interface DeviceHitCandidate {
floorRadius: number;
}
/**
* Every target whose own scroll can move a card in client coordinates.
*
* `scroll` is neither bubbling nor composed. A listener on `document` cannot
* see a Home Assistant dashboard scroller behind a shadow boundary, so walk
* the rendered (slot/shadow-host) ancestry and listen to each target directly.
*/
export function deviceHitScrollSources(host: Node): EventTarget[] {
const sources: EventTarget[] = [];
const seen = new Set<EventTarget>();
const add = (source: EventTarget | null | undefined): void => {
if (!source || seen.has(source)) return;
seen.add(source);
sources.push(source);
};
let current: Node | null = host;
while (current) {
if (current.nodeType === 1 || current.nodeType === 9) add(current);
const assignedSlot = current.nodeType === 1
? (current as Element).assignedSlot : null;
if (assignedSlot) {
current = assignedSlot;
continue;
}
if (current.parentElement) {
current = current.parentElement;
continue;
}
const root = current.getRootNode();
const shadowHost = root.nodeType === 11 && 'host' in root
? (root as ShadowRoot).host : null;
if (shadowHost) {
current = shadowHost;
continue;
}
const document = current.ownerDocument;
current = document && current !== document ? document : null;
}
const document = host.nodeType === 9 ? host as Document : host.ownerDocument;
add(document?.defaultView);
return sources;
}
/** Subscribe to client-coordinate shifts and return an idempotent teardown. */
export function observeDeviceHitGeometryScroll(
host: Node,
invalidate: () => void,
): () => void {
const sources = deviceHitScrollSources(host);
const document = host.nodeType === 9 ? host as Document : host.ownerDocument;
const viewport = document?.defaultView?.visualViewport;
const handler = (): void => invalidate();
for (const source of sources) {
source.addEventListener('scroll', handler, { passive: true });
}
viewport?.addEventListener('scroll', handler, { passive: true });
viewport?.addEventListener('resize', handler, { passive: true });
let active = true;
return (): void => {
if (!active) return;
active = false;
for (const source of sources) source.removeEventListener('scroll', handler);
viewport?.removeEventListener('scroll', handler);
viewport?.removeEventListener('resize', handler);
};
}
const EPSILON = 1e-7;
const distanceSquared = (a: DeviceHitPoint, b: DeviceHitPoint): number => {
+23 -13
View File
@@ -108,7 +108,7 @@ import {
type FixedFloorSelection, type InitialSpaceSelection,
} from './initial-load';
import { TouchGestureClickGuard } from './touch-gesture-click-guard';
import { DeviceHitController } from './device-hit-owner';
import { DeviceHitController, observeDeviceHitGeometryScroll } from './device-hit-owner';
import { selectActiveSpaceModel, selectSpaceModelById } from './space-model-selection';
import {
createEmptySpaceConfig, initialSpaceDisplayDraft, roomTempRangeFromDraft, switchSpacePlanSource, touchSpaceDisplay,
@@ -2048,7 +2048,7 @@ export class HouseplanCard extends LitElement {
private _roomFocus: { spaceId: string; roomId: string } | null = null;
/** Pointer owner captured from the actually painted event path. */
private _roomPointer: RoomFitGestureCandidate | null = null; private readonly _doubleFit = new DoubleFitGestureRecognizer();
private readonly _deviceHits = new DeviceHitController();
private readonly _deviceHits = new DeviceHitController(); private _deviceHitScrollUnsub?: () => void;
private _pointers = new Map<number, { x: number; y: number }>();
private _panStart: { sx: number; sy: number; vx: number; vy: number } | null = null;
/**
@@ -2061,7 +2061,7 @@ export class HouseplanCard extends LitElement {
private _pinchStart: { dist: number; zoom: number } | null = null;
private _safeDayCycleOutline = false;
private _suppressClick = false;
private _viewportGestureDirty = false;
private _viewportGestureDirty = false; private _pinchZoomDirty = false;
private _activateSafeDayCycleOutline(): void { this._safeDayCycleOutline = true; this._stageEl?.classList.add('hp-safe-daycycle-outline'); }
/**
* Pointer events from an interactive child may stop before the stage sees
@@ -2695,6 +2695,8 @@ export class HouseplanCard extends LitElement {
this._summarySlot.connect();
void this._ensureLiveRuntime().catch(() => this.requestUpdate());
this._pointerModality.connect(this.ownerDocument.defaultView);
this._deviceHitScrollUnsub?.();
this._deviceHitScrollUnsub = observeDeviceHitGeometryScroll(this, () => this._invalidateDeviceHitGeometry());
const PointerHoverObserver = this.ownerDocument.defaultView?.MutationObserver;
if (PointerHoverObserver) {
this._pointerHoverObserver = new PointerHoverObserver((records) => {
@@ -2803,6 +2805,7 @@ export class HouseplanCard extends LitElement {
this._languageFailureUnsub = undefined;
this._motionMedia?.removeEventListener?.('change', this._onMotionChange);
this._motionMedia = undefined;
this._deviceHitScrollUnsub?.(); this._deviceHitScrollUnsub = undefined; this._pinchZoomDirty = false;
if (this._vacRaf) { cancelAnimationFrame(this._vacRaf); this._vacRaf = 0; }
if (this._refitRaf) { cancelAnimationFrame(this._refitRaf); this._refitRaf = 0; }
this._warmModeRequest = 0;
@@ -6789,6 +6792,17 @@ export class HouseplanCard extends LitElement {
}
}
private _markPinchZoomDirty(): void { this._pinchZoomDirty = true; }
/** Both capture and stage see terminal events; clearing first makes this idempotent. */
private _finishViewportGesture(): void {
const saveZoom = this._pinchZoomDirty; this._pinchZoomDirty = false;
if (saveZoom) this._saveZoom();
if (!this._viewportGestureDirty) return;
this._viewportGestureDirty = false;
this.requestUpdate();
}
/** Restore the saved space zoom and center the plan. */
private _restoreZoom(): void {
this._clearRoomFocus(true);
@@ -6964,8 +6978,8 @@ export class HouseplanCard extends LitElement {
const cy = (pts[0].y + pts[1].y) / 2 - r.top;
this._zoomAt(cx, cy, this._pinchStart.zoom * scale);
this._viewportGestureDirty = true;
this._markPinchZoomDirty();
this._suppressClick = true;
this._saveZoom();
} else if (this._panStart) {
const ddx = ev.clientX - this._panStart.sx;
const ddy = ev.clientY - this._panStart.sy;
@@ -7104,10 +7118,7 @@ export class HouseplanCard extends LitElement {
// reset click suppression on the next tick (so that a click right after a pan does not fire)
if (this._suppressClick) setTimeout(() => (this._suppressClick = false), 0);
}
if (this._viewportGestureDirty && this._pointers.size === 0 && !acceptedRoom) {
this._viewportGestureDirty = false;
this.requestUpdate();
}
if (this._pointers.size === 0 && !acceptedRoom) this._finishViewportGesture();
if (acceptedRoom) this._fitRoom(acceptedRoom);
}
@@ -7385,7 +7396,8 @@ export class HouseplanCard extends LitElement {
const rect = this._stageEl.getBoundingClientRect();
this._zoomAt((a.x + b.x) / 2 - rect.left, (a.y + b.y) / 2 - rect.top,
this._pinchStart.zoom * scale);
this._saveZoom();
this._viewportGestureDirty = true;
this._markPinchZoomDirty();
}
}
return;
@@ -7408,6 +7420,7 @@ export class HouseplanCard extends LitElement {
if (this._pointers.size === 0) {
this._panStart = null;
this._panLock = null;
this._finishViewportGesture();
}
}
}
@@ -7974,10 +7987,7 @@ export class HouseplanCard extends LitElement {
this._panLock = null;
this._swipeStart = null;
}
if (this._viewportGestureDirty && this._pointers.size === 0) {
this._viewportGestureDirty = false;
this.requestUpdate();
}
if (this._pointers.size === 0) this._finishViewportGesture();
}
private _applyGeometryState(
+56 -1
View File
@@ -1,7 +1,8 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import {
DeviceHitIndex, DevicePointerOwnerLatch, pointInDeviceCapsule, resolveDeviceHitOwner,
DeviceHitIndex, DevicePointerOwnerLatch, deviceHitScrollSources,
observeDeviceHitGeometryScroll, pointInDeviceCapsule, resolveDeviceHitOwner,
} from '../test-build/device-hit-owner.js';
const candidate = (id, x, y, width = 12, height = 12, floorRadius = 22) => ({
@@ -75,3 +76,57 @@ test('#564 pointer owner is held through release and consumed by click', () => {
assert.equal(latch.release(8), null);
latch.clear();
});
test('#613 scroll observation crosses shadow hosts and tears down exactly once', () => {
const target = (fields = {}) => Object.assign(new EventTarget(), fields);
const viewport = new EventTarget();
const win = target({ visualViewport: viewport });
const document = target({
nodeType: 9, parentElement: null, ownerDocument: null, defaultView: win,
getRootNode() { return this; },
});
const body = target({
nodeType: 1, assignedSlot: null, parentElement: null, ownerDocument: document,
getRootNode: () => document,
});
const dashboardScroller = target({
nodeType: 1, assignedSlot: null, parentElement: body, ownerDocument: document,
getRootNode: () => document,
});
const dashboardHost = target({
nodeType: 1, assignedSlot: null, parentElement: dashboardScroller,
ownerDocument: document, getRootNode: () => document,
});
const dashboardRoot = { nodeType: 11, host: dashboardHost };
const shadowScroller = target({
nodeType: 1, assignedSlot: null, parentElement: null, ownerDocument: document,
getRootNode: () => dashboardRoot,
});
const card = target({
nodeType: 1, assignedSlot: null, parentElement: shadowScroller,
ownerDocument: document, getRootNode: () => dashboardRoot,
});
assert.deepEqual(deviceHitScrollSources(card), [
card, shadowScroller, dashboardHost, dashboardScroller, body, document, win,
]);
let invalidations = 0;
const disconnect = observeDeviceHitGeometryScroll(card, () => { invalidations += 1; });
shadowScroller.dispatchEvent(new Event('scroll'));
dashboardScroller.dispatchEvent(new Event('scroll'));
viewport.dispatchEvent(new Event('resize'));
assert.equal(invalidations, 3);
disconnect();
disconnect();
shadowScroller.dispatchEvent(new Event('scroll'));
dashboardScroller.dispatchEvent(new Event('scroll'));
viewport.dispatchEvent(new Event('scroll'));
assert.equal(invalidations, 3);
const reconnect = observeDeviceHitGeometryScroll(card, () => { invalidations += 1; });
dashboardScroller.dispatchEvent(new Event('scroll'));
assert.equal(invalidations, 4);
reconnect();
});