fix(adoption): a replaced body stays a reactive host event (#500)

`willUpdate` keys the geometry epoch and render-lifecycle invalidation on
`changed.has('_serverCfg')`. Before #500 every body replacement went through
Lit's accessor and produced that event; the owner wrote its field directly
and the epoch stopped moving on adoption, staging and rollback — the safe
Resize smoke then measured against a stale model (Validate on c360bcc9).
`MutableConfigAdoption` now reports each replaced reference through
`onBodyReplaced`, which the card wires to `requestUpdate(field, previous)`;
echoes and identity-only changes stay silent, exactly as an unchanged
reference never fired the accessor.

Issue: #500
User-Visible: no
This commit is contained in:
claude[bot]
2026-09-10 11:41:16 +00:00
parent 2f41c0b29e
commit 31c2583e46
79 changed files with 14739 additions and 15184 deletions
@@ -1,309 +1,309 @@
{
"schema": 1,
"fingerprint": "5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf",
"fingerprint": "56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4",
"entry": "houseplan-card.js",
"panelEntry": "houseplan-panel.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 298992,
"initialViewGzipBytes": 299771,
"initialPanelFiles": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-card.js",
"houseplan-panel.js"
],
"initialPanelGzipBytes": 301298,
"initialPanelGzipBytes": 302073,
"initialPanelOnlyFiles": [
"houseplan-panel.js"
],
"initialPanelOnlyGzipBytes": 2306,
"initialPanelOnlyGzipBytes": 2302,
"lazyFiles": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/de-DBUfK9Nr.js",
"houseplan-assets/editor-0keqnMJ7.js",
"houseplan-assets/fr-ZUqkYkE7.js",
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/houseplan-editor-runtime-CydVVblm.js",
"houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js",
"houseplan-assets/hp-zigbee-topology-overlay-DcQjr8ux.js",
"houseplan-assets/iso-scene-render-Dj9V5jm8.js",
"houseplan-assets/live-interaction-runtime-B2sEacd_.js",
"houseplan-assets/pdf-export-DEpE7VK0.js",
"houseplan-assets/summary-panel-runtime-loaded-CPSfTezy.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js",
"houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/de-CfuM8tMO.js",
"houseplan-assets/editor-9K9EN2ve.js",
"houseplan-assets/fr-CL6nb6OC.js",
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/houseplan-editor-runtime-DnDMk58C.js",
"houseplan-assets/houseplan-onboarding-runtime-DmAxirgZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-BR_zdv7m.js",
"houseplan-assets/iso-scene-render-CR8avan6.js",
"houseplan-assets/live-interaction-runtime-DcHKiaVf.js",
"houseplan-assets/pdf-export--uT8TAKW.js",
"houseplan-assets/summary-panel-runtime-loaded-3SFAZLpc.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js",
"houseplan-assets/zigbee-topology-runtime-ChgxKB58.js"
],
"lazyGzipBytes": 418227,
"lazyGzipBytes": 418062,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/editor-0keqnMJ7.js",
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/houseplan-editor-runtime-CydVVblm.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/editor-9K9EN2ve.js",
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/houseplan-editor-runtime-DnDMk58C.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js"
],
"lazyEditorGzipBytes": 205644,
"lazyEditorGzipBytes": 205659,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/houseplan-onboarding-runtime-DmAxirgZ.js"
],
"lazyOnboardingGzipBytes": 14151,
"lazyOnboardingGzipBytes": 14160,
"lazyLocaleFiles": [
"houseplan-assets/de-DBUfK9Nr.js",
"houseplan-assets/fr-ZUqkYkE7.js"
"houseplan-assets/de-CfuM8tMO.js",
"houseplan-assets/fr-CL6nb6OC.js"
],
"lazyLocaleGzipBytes": 54855,
"lazyLocaleGzipBytes": 54842,
"lazyIsometricFiles": [
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/iso-scene-render-Dj9V5jm8.js"
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/iso-scene-render-CR8avan6.js"
],
"lazyIsometricGzipBytes": 13461,
"lazyIsometricGzipBytes": 13454,
"lazyFurnitureArtFiles": [
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js"
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js"
],
"lazyFurnitureArtGzipBytes": 10251,
"lazyFurnitureArtGzipBytes": 10255,
"lazyPdfFiles": [
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/pdf-export-DEpE7VK0.js"
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/pdf-export--uT8TAKW.js"
],
"lazyPdfGzipBytes": 120365,
"lazyPdfGzipBytes": 120371,
"files": [
{
"path": "houseplan-assets/backdrop-pick-BulfpEVa.js",
"sha256": "57f46e0fb40b55a83643dc1041a8c5ec99c3d66485823043fc06861709920de4",
"path": "houseplan-assets/backdrop-pick-DeZtEIZS.js",
"sha256": "43b184622c65385149996970db943fe118dd572dd61c5107408034fed28f1160",
"rawBytes": 21134,
"gzipBytes": 7147,
"gzipBytes": 7145,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-DBUfK9Nr.js",
"sha256": "b0c61302ea7c2249f0621a7942effdee3f3c8673490f3ab4f959741208c94cbe",
"path": "houseplan-assets/de-CfuM8tMO.js",
"sha256": "506b16628166d5da449c2dc1a06a835356cea760b5e85b2fc57cfd5ddb639591",
"rawBytes": 91441,
"gzipBytes": 27712,
"gzipBytes": 27705,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-0keqnMJ7.js",
"sha256": "ae010db9f4fbd53649e1f6beae7a823db74743516ee1e584175a21071bfdaf76",
"rawBytes": 3837,
"gzipBytes": 1587,
"path": "houseplan-assets/editor-9K9EN2ve.js",
"sha256": "8753a4fc43be5f170312407d168021559e0fb36f6e792ae7cf89ef43acfcad0a",
"rawBytes": 3832,
"gzipBytes": 1583,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-ZUqkYkE7.js",
"sha256": "384fa06671bfe1ba9f4b5ac8a59707ebace2e7c1eda8aa9f8193bd611e32dfaf",
"path": "houseplan-assets/fr-CL6nb6OC.js",
"sha256": "773009a1d2918e59a7c88f32fd4596805bfadc9839e56ed5a269fcd2a8637239",
"rawBytes": 93719,
"gzipBytes": 27143,
"gzipBytes": 27137,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"sha256": "9d716575d2c50c0b87420aef9abd5654aac1545c4050e097a1687e356a05daf7",
"path": "houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"sha256": "43baaa69d2e72ed20c244efd472ceceaaee09f7f2da9815552434db571af3619",
"rawBytes": 33655,
"gzipBytes": 10251,
"gzipBytes": 10255,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/guard-CHvmsSf0.js",
"sha256": "5235e984db15e7bb9080ec44f11b43038cffb285afe489534f59413280ead9c7",
"path": "houseplan-assets/guard-Ck4umgxm.js",
"sha256": "cf355229f645240b1de7c73317e0bb535501165253f474a9c0d1c9464bf950b0",
"rawBytes": 518,
"gzipBytes": 371,
"gzipBytes": 370,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-yh8-YihB.js",
"sha256": "73b88b18d508bc8e075c49cb898742df9eb29dd70a70db42e9763dc12b6e5c59",
"rawBytes": 1076670,
"gzipBytes": 298188,
"path": "houseplan-assets/houseplan-card-By4JNccM.js",
"sha256": "bc29ba2c27148b5054a6a376a6f163726a423558b6f649a701b2d2873769169b",
"rawBytes": 1078545,
"gzipBytes": 298969,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-DBUfK9Nr.js",
"houseplan-assets/editor-0keqnMJ7.js",
"houseplan-assets/fr-ZUqkYkE7.js",
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/houseplan-editor-runtime-CydVVblm.js",
"houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js",
"houseplan-assets/hp-zigbee-topology-overlay-DcQjr8ux.js",
"houseplan-assets/iso-scene-render-Dj9V5jm8.js",
"houseplan-assets/live-interaction-runtime-B2sEacd_.js",
"houseplan-assets/pdf-export-DEpE7VK0.js",
"houseplan-assets/summary-panel-runtime-loaded-CPSfTezy.js"
"houseplan-assets/de-CfuM8tMO.js",
"houseplan-assets/editor-9K9EN2ve.js",
"houseplan-assets/fr-CL6nb6OC.js",
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/houseplan-editor-runtime-DnDMk58C.js",
"houseplan-assets/houseplan-onboarding-runtime-DmAxirgZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-BR_zdv7m.js",
"houseplan-assets/iso-scene-render-CR8avan6.js",
"houseplan-assets/live-interaction-runtime-DcHKiaVf.js",
"houseplan-assets/pdf-export--uT8TAKW.js",
"houseplan-assets/summary-panel-runtime-loaded-3SFAZLpc.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-CydVVblm.js",
"sha256": "7af93a6b4519b59e91b12b10ceb982e79e73773981c1d006ec9f825a8a418a41",
"rawBytes": 672001,
"gzipBytes": 178857,
"path": "houseplan-assets/houseplan-editor-runtime-DnDMk58C.js",
"sha256": "a334588d13ce7c4457412e248b5ba32b942b75493cd559f34bf1d199512199c3",
"rawBytes": 671956,
"gzipBytes": 178882,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js"
"houseplan-assets/zigbee-topology-runtime-ChgxKB58.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js",
"sha256": "cd9d632b79045c4493012025a45514cf0aaf08c784c2ae93fd3734e119c7cccb",
"rawBytes": 28237,
"gzipBytes": 7004,
"path": "houseplan-assets/houseplan-onboarding-runtime-DmAxirgZ.js",
"sha256": "ff7c1d1997ac741eeb1f22a583bf23f8e9ede4122dbb1c3bc383a2031b0fafb5",
"rawBytes": 28211,
"gzipBytes": 7015,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-DcQjr8ux.js",
"sha256": "2acad806393bd295362b45cedcaa121bcbe53e136a2e91c071463f4ed7fec25f",
"path": "houseplan-assets/hp-zigbee-topology-overlay-BR_zdv7m.js",
"sha256": "db406584e75a4202bd452216cd49dc23d6eba292df756ee79c04d45f36c99ca3",
"rawBytes": 11034,
"gzipBytes": 3732,
"gzipBytes": 3729,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js",
"houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js"
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js",
"houseplan-assets/zigbee-topology-runtime-ChgxKB58.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-Dj9V5jm8.js",
"sha256": "88c036b7404425633b64f71f099c7443b1dd848758998f149a862b10390a5712",
"path": "houseplan-assets/iso-scene-render-CR8avan6.js",
"sha256": "748049f036dc110e65f893ddf091e5c3fad415428de07fc88e18eef7a923b202",
"rawBytes": 38562,
"gzipBytes": 13090,
"gzipBytes": 13084,
"isEntry": false,
"imports": [
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-B2sEacd_.js",
"sha256": "c1fa7f6a58a1ba215be6b78d0f663e776575b574972025ac281689ceb29649cb",
"path": "houseplan-assets/live-interaction-runtime-DcHKiaVf.js",
"sha256": "4aeb2454c259433857caad1e63e3cbd3a6ae2818dc67890a2fc36af4d6bcace0",
"rawBytes": 5196,
"gzipBytes": 2128,
"gzipBytes": 2126,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/pdf-export-DEpE7VK0.js",
"sha256": "41119e049b787a8554bc5a1e766a6676ffdebd2f121dd1c6a4dfc071b98a3ebc",
"path": "houseplan-assets/pdf-export--uT8TAKW.js",
"sha256": "5a255ebcfc11779b29ffb3c996d5397818670b838291a3071b0f8f449e9a85ab",
"rawBytes": 237254,
"gzipBytes": 110114,
"gzipBytes": 110116,
"isEntry": false,
"imports": [
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-editor-DoCYqzD1.js",
"sha256": "450035176dde97d9435338ffb393fdf34105e35dd7ca8c3b7117377eb7781884",
"path": "houseplan-assets/summary-panel-editor-CZYNjuWs.js",
"sha256": "fefa972f0604e6b693502276b9f02967c7e2ee0533c7e4cad317dcb7158c66e3",
"rawBytes": 14824,
"gzipBytes": 3401,
"gzipBytes": 3399,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/summary-panel-runtime-loaded-CPSfTezy.js"
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-assets/summary-panel-runtime-loaded-3SFAZLpc.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-metrics-CDLFRpun.js",
"sha256": "4aa9ee8c9345f89ce1446c19506f44a93c1758f8e39b1b887a66f69feebc7d52",
"path": "houseplan-assets/summary-panel-metrics-Cf2jZWQk.js",
"sha256": "dc931b9421cc8c2091c841ba9e5addd2a8bd1cef9eab6f61cdaf7796227712f5",
"rawBytes": 2610,
"gzipBytes": 1306,
"gzipBytes": 1304,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-runtime-loaded-CPSfTezy.js",
"sha256": "22ddab2c9b679a3dc4b823a05381d11f83905ad3ed6fc5f1a21d9af51d89b2dc",
"rawBytes": 72803,
"gzipBytes": 19896,
"path": "houseplan-assets/summary-panel-runtime-loaded-3SFAZLpc.js",
"sha256": "6db99aae7fc553b29de8ec42c1e6c873a3bdc4364c4a8c81b80157c7293ccda4",
"rawBytes": 72272,
"gzipBytes": 19728,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": [
"houseplan-assets/summary-panel-editor-DoCYqzD1.js",
"houseplan-assets/summary-panel-metrics-CDLFRpun.js"
"houseplan-assets/summary-panel-editor-CZYNjuWs.js",
"houseplan-assets/summary-panel-metrics-Cf2jZWQk.js"
]
},
{
"path": "houseplan-assets/zigbee-topology-IW8V-F7u.js",
"sha256": "dd55f2b592f031a1c5318fffdce18938e0f2ceefdc90965489cb0b6ade2b3af5",
"path": "houseplan-assets/zigbee-topology-B41DZyHP.js",
"sha256": "cfabe26b0c2ea749f595f15b297af9396e0eb12c0b11c44347ed58f37183d851",
"rawBytes": 18961,
"gzipBytes": 7431,
"gzipBytes": 7424,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js",
"sha256": "03214e422e8dd438c064cc454f05cdf4770f32a1b384d2756f9c79200f7747df",
"path": "houseplan-assets/zigbee-topology-runtime-ChgxKB58.js",
"sha256": "d6e49520a5c316c27816c87df68fc9ec60d5db0d4d5cada8e891de2d13b78738",
"rawBytes": 3941,
"gzipBytes": 1764,
"gzipBytes": 1763,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js"
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "c4e8d4da209de178e051ed7e27c86c9ed86ddce4274a95f7170143dddf373be9",
"sha256": "f4d666033ba17325765d15ec12d092d931a72ac1d0cd1f984c3f8bf2a95d56de",
"rawBytes": 1205,
"gzipBytes": 804,
"gzipBytes": 802,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-panel.js",
"sha256": "71c93fe566ec7aea9ff4dbef8b9fa5ac57f932589d44bca0055f086af74a8d8f",
"sha256": "af655511a203e01d2bed655af8a5884a228c2823a55ae0b6c556f86946059d98",
"rawBytes": 6124,
"gzipBytes": 2306,
"gzipBytes": 2302,
"isEntry": true,
"imports": [
"houseplan-card.js"
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,14 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{t as e,l as o,x as t,e5 as s,A as a,e6 as i,e7 as l,e8 as n,dW as r,b as c}from"./houseplan-card-yh8-YihB.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}
.computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(f.slice(0,3))}
${_?c`<div class="default-floor-error" role="alert"
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
${t(s,"editor.default_floor_missing",{id:_})}
</div>`:a}
${d(f.slice(3))}
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h);
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";import{m as e,l as o,t,e3 as s,A as a,e4 as i,e5 as l,e6 as n,dU as r,b as c}from"./houseplan-card-BKVJQukC.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__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{m as e,l as o,t,e3 as s,A as a,e4 as i,e5 as l,e6 as n,dU as r,b as c}from"./houseplan-card-By4JNccM.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
@@ -1 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{dU as r,dV as t,dW as s}from"./houseplan-card-yh8-YihB.js";const e={},a=r(class extends t{constructor(){super(...arguments),this.ot=e}render(r,t){return t()}update(r,[t,e]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,t)=>r===this.ot[t]))return s}else if(this.ot===t)return s;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,e)}});export{a as i};
@@ -0,0 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{dS as r,dT as e,dU as t}from"./houseplan-card-By4JNccM.js";const s={},a=r(class extends e{constructor(){super(...arguments),this.ot=s}render(r,e){return e()}update(r,[e,s]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every((r,e)=>r===this.ot[e]))return t}else if(this.ot===e)return t;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,s)}});export{a as i};
@@ -1 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";import{dS as r,dT as t,dU as e}from"./houseplan-card-BKVJQukC.js";const s={},a=r(class extends t{constructor(){super(...arguments),this.ot=s}render(r,t){return t()}update(r,[t,s]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,t)=>r===this.ot[t]))return e}else if(this.ot===t)return e;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,s)}});export{a as i};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,16 +1,6 @@
<<<<<<<< HEAD:dist/houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js
<<<<<<<< HEAD:dist/houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{l as t,b2 as s,A as e,x as o,b as a,cl as l,cm as i,cn as h,co as c,a$ as n,cp as r,cu as p,cq as d,cr as _,cs as u,ct as g,cv as m,cw as b,dr as $,ds as v,dt as f,a_ as y,b0 as w,du as D}from"./houseplan-card-yh8-YihB.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-BulfpEVa.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,p="none"===o.fill?{...a||h,a:0}:a;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:o.showBorders,showNames:o.showNames,zeroWallStyle:r(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:p,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...m(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await k(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await S(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return C(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const o=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),a=this.host._spaceDialog,l=a?.saved?.find(s=>s.name===t);if(o&&a&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==a.planUrl)try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
${s.map(s=>{return a`
========
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0a76a76ae3d778006d8d7f2d7296a95336a306c743d15efd5166a8249caedeee";import{l as t,b0 as s,A as e,t as a,b as o,cj as l,ck as i,cl as h,cm as c,aZ as n,cn as p,cs as r,co as d,cp as _,cq as u,cr as g,ct as m,cu as b,dp as $,dq as v,dr as f,aY as y,a_ as w,ds as D}from"./houseplan-card-CfF5g1xu.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-uUbYkhJU.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="0a76a76ae3d778006d8d7f2d7296a95336a306c743d15efd5166a8249caedeee";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?o`<hp-help data-help-key=${l}
========
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";import{l as t,b0 as s,A as e,t as a,b as o,cj as l,ck as i,cl as h,cm as c,aZ as n,cn as p,cs as r,co as d,cp as _,cq as u,cr as g,ct as m,cu as b,dp as $,dq as v,dr as f,aY as y,a_ as w,ds as D}from"./houseplan-card-BKVJQukC.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-B1a8Wi9Q.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?o`<hp-help data-help-key=${l}
>>>>>>>> c360bcc9 (test(adoption): ownership lint, post-write smoke, harness seam and docs (#500)):custom_components/houseplan/frontend/houseplan-assets/houseplan-onboarding-runtime-D0Uo9Pw5.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{l as t,b0 as s,A as e,t as a,b as o,cj as l,ck as i,cl as h,cm as c,aZ as n,cn as p,cs as r,co as d,cp as _,cq as u,cr as g,ct as m,cu as b,dp as $,dq as v,dr as f,aY as y,a_ as w,ds as D}from"./houseplan-card-By4JNccM.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-DeZtEIZS.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?o`<hp-help data-help-key=${l}
.text=${a(h,l)} .ariaLabel=${a(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const a=l(e),o=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,r="none"===a.fill?{...o||h,a:0}:o;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:a.showBorders,showNames:a.showNames,zeroWallStyle:p(e),displayTouched:!0,hideDecor:a.hideDecor,hideOpenings:a.hideOpenings,roomColor:a.color,roomOpacity:a.opacity,fillMode:"none"===a.fill?"custom":a.fill,customFill:r,glowEnabled:a.glow,bgColor:a.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:a.tempMin,tempMax:a.tempMax,showLqi:a.showLqi??this.host._config?.show_signal??!0,cardFontScale:a.cardFontScale,labelTemp:a.labelTemp,labelHum:a.labelHum,labelLqi:a.labelLqi,labelLight:a.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=r(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...m(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const a=await k(e);if("reject"===a.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===a.kind)return void(this.host._backdropGuard=a.state);const o=await S(e,a.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:o})}_renderBackdropGuard(){return C(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),a=this.host._spaceDialog;return a&&a.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...a,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const a=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),o=this.host._spaceDialog,l=o?.saved?.find(s=>s.name===t);if(a&&o&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==o.planUrl)try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return o`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return o`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return o`<div class="savedplans">
${s.map(s=>{return o`
>>>>>>>> 1ff91b54 (feat(adoption): one owner for config/layout identity and the adoption sequence):dist/houseplan-assets/houseplan-onboarding-runtime-DR7M2bnZ.js
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
<img src=${this.host._display(s.url)} alt="" loading="lazy" decoding="async" />
<div class="savedmeta">
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
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,12 +1,4 @@
<<<<<<<< HEAD:dist/houseplan-assets/summary-panel-editor-DoCYqzD1.js
<<<<<<<< HEAD:dist/houseplan-assets/summary-panel-editor-DoCYqzD1.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{b as a,A as e}from"./houseplan-card-yh8-YihB.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-CPSfTezy.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__="0a76a76ae3d778006d8d7f2d7296a95336a306c743d15efd5166a8249caedeee";import{b as a,A as e}from"./houseplan-card-CfF5g1xu.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-DZOniG9e.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">
>>>>>>>> 1ff91b54 (feat(adoption): one owner for config/layout identity and the adoption sequence):dist/houseplan-assets/summary-panel-editor-C77DC5Fh.js
========
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";import{b as a,A as e}from"./houseplan-card-BKVJQukC.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-CNC8EpID.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">
>>>>>>>> c360bcc9 (test(adoption): ownership lint, post-write smoke, harness seam and docs (#500)):dist/houseplan-assets/summary-panel-editor-CtqrpdOR.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{b as a,A as e}from"./houseplan-card-By4JNccM.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-3SFAZLpc.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 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{eb as e,P as t,a5 as n,M as i,aq as o,N as r,bq as s,bp as a,a4 as c,a3 as l,az as u,ec as d,ed as f,bs as m,ee as g}from"./houseplan-card-yh8-YihB.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=u(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),s=i.binding.slice(o+1),a="device"===r?e.registry.devices?.[s]:null,c="entity"===r?e.registry.entities?.[s]:null,l="device"===r?s:c?.device_id,u="device"===r?a?.area_id:c?.area_id||l&&e.registry.devices?.[l]?.area_id,d="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||u||"",f=d&&e.areaToSpace[d]||i.space||e.firstSpaceId;l&&e.registry.devices?.[l]&&e.spaceIds.has(f)&&(!n.devices.has(l)||"entity"===r&&n.liveEntities.has(s))&&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*p(c,l,u=_){try{let d=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=u(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const a=t(e);if(!a)continue;const c=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||a;v=y(v,s(c,m.physicalBodies)),yield}const _=m.cellCm/o;d+=a(v)*_*_/1e4}return d}catch{return null}}function h(e,t,n=_){const i=p(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=d(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{p as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,b as summarySystemValue,h as totalCleanFloorAreaM2};
@@ -0,0 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{e9 as e,L as t,a2 as n,J as i,an as o,N as r,bo as a,bn as s,a1 as c,a0 as l,ax as d,ea as u,eb as f,bq as m,ec as g}from"./houseplan-card-By4JNccM.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};
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
@@ -0,0 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{n as t,b as n}from"./zigbee-topology-B41DZyHP.js";import{B as e}from"./houseplan-card-By4JNccM.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 p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(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 g(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 m(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(p(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,f=null,m=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,m=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 p=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&&f?.(n):c&&m?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await g(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 g(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{f as readZhaTopology,m as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
@@ -1,5 +0,0 @@
<<<<<<<< HEAD:custom_components/houseplan/frontend/houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{n as t,b as n}from"./zigbee-topology-IW8V-F7u.js";import{F as e}from"./houseplan-card-yh8-YihB.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 p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(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 g(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 m(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(p(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,f=null,m=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,m=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 p=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&&f?.(n):c&&m?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await g(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 g(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{f as readZhaTopology,m as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
========
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0a76a76ae3d778006d8d7f2d7296a95336a306c743d15efd5166a8249caedeee";import{n as t,b as n}from"./zigbee-topology-CP61k3bH.js";import{B as e}from"./houseplan-card-CfF5g1xu.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 p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(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 g(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 m(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(p(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,f=null,m=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,m=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 p=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&&f?.(n):c&&m?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await g(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 g(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{f as readZhaTopology,m as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
>>>>>>>> 1ff91b54 (feat(adoption): one owner for config/layout identity and the adoption sequence):custom_components/houseplan/frontend/houseplan-assets/zigbee-topology-runtime-9uRhJ6b0.js
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";try{await import("./houseplan-assets/houseplan-card-yh8-YihB.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__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";try{await import("./houseplan-assets/houseplan-card-By4JNccM.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
+146 -146
View File
@@ -1,309 +1,309 @@
{
"schema": 1,
"fingerprint": "5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf",
"fingerprint": "56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4",
"entry": "houseplan-card.js",
"panelEntry": "houseplan-panel.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 298992,
"initialViewGzipBytes": 299771,
"initialPanelFiles": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-card.js",
"houseplan-panel.js"
],
"initialPanelGzipBytes": 301298,
"initialPanelGzipBytes": 302073,
"initialPanelOnlyFiles": [
"houseplan-panel.js"
],
"initialPanelOnlyGzipBytes": 2306,
"initialPanelOnlyGzipBytes": 2302,
"lazyFiles": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/de-DBUfK9Nr.js",
"houseplan-assets/editor-0keqnMJ7.js",
"houseplan-assets/fr-ZUqkYkE7.js",
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/houseplan-editor-runtime-CydVVblm.js",
"houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js",
"houseplan-assets/hp-zigbee-topology-overlay-DcQjr8ux.js",
"houseplan-assets/iso-scene-render-Dj9V5jm8.js",
"houseplan-assets/live-interaction-runtime-B2sEacd_.js",
"houseplan-assets/pdf-export-DEpE7VK0.js",
"houseplan-assets/summary-panel-runtime-loaded-CPSfTezy.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js",
"houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/de-CfuM8tMO.js",
"houseplan-assets/editor-9K9EN2ve.js",
"houseplan-assets/fr-CL6nb6OC.js",
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/houseplan-editor-runtime-DnDMk58C.js",
"houseplan-assets/houseplan-onboarding-runtime-DmAxirgZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-BR_zdv7m.js",
"houseplan-assets/iso-scene-render-CR8avan6.js",
"houseplan-assets/live-interaction-runtime-DcHKiaVf.js",
"houseplan-assets/pdf-export--uT8TAKW.js",
"houseplan-assets/summary-panel-runtime-loaded-3SFAZLpc.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js",
"houseplan-assets/zigbee-topology-runtime-ChgxKB58.js"
],
"lazyGzipBytes": 418227,
"lazyGzipBytes": 418062,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/editor-0keqnMJ7.js",
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/houseplan-editor-runtime-CydVVblm.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/editor-9K9EN2ve.js",
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/houseplan-editor-runtime-DnDMk58C.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js"
],
"lazyEditorGzipBytes": 205644,
"lazyEditorGzipBytes": 205659,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/houseplan-onboarding-runtime-DmAxirgZ.js"
],
"lazyOnboardingGzipBytes": 14151,
"lazyOnboardingGzipBytes": 14160,
"lazyLocaleFiles": [
"houseplan-assets/de-DBUfK9Nr.js",
"houseplan-assets/fr-ZUqkYkE7.js"
"houseplan-assets/de-CfuM8tMO.js",
"houseplan-assets/fr-CL6nb6OC.js"
],
"lazyLocaleGzipBytes": 54855,
"lazyLocaleGzipBytes": 54842,
"lazyIsometricFiles": [
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/iso-scene-render-Dj9V5jm8.js"
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/iso-scene-render-CR8avan6.js"
],
"lazyIsometricGzipBytes": 13461,
"lazyIsometricGzipBytes": 13454,
"lazyFurnitureArtFiles": [
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js"
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js"
],
"lazyFurnitureArtGzipBytes": 10251,
"lazyFurnitureArtGzipBytes": 10255,
"lazyPdfFiles": [
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/pdf-export-DEpE7VK0.js"
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/pdf-export--uT8TAKW.js"
],
"lazyPdfGzipBytes": 120365,
"lazyPdfGzipBytes": 120371,
"files": [
{
"path": "houseplan-assets/backdrop-pick-BulfpEVa.js",
"sha256": "57f46e0fb40b55a83643dc1041a8c5ec99c3d66485823043fc06861709920de4",
"path": "houseplan-assets/backdrop-pick-DeZtEIZS.js",
"sha256": "43b184622c65385149996970db943fe118dd572dd61c5107408034fed28f1160",
"rawBytes": 21134,
"gzipBytes": 7147,
"gzipBytes": 7145,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-DBUfK9Nr.js",
"sha256": "b0c61302ea7c2249f0621a7942effdee3f3c8673490f3ab4f959741208c94cbe",
"path": "houseplan-assets/de-CfuM8tMO.js",
"sha256": "506b16628166d5da449c2dc1a06a835356cea760b5e85b2fc57cfd5ddb639591",
"rawBytes": 91441,
"gzipBytes": 27712,
"gzipBytes": 27705,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-0keqnMJ7.js",
"sha256": "ae010db9f4fbd53649e1f6beae7a823db74743516ee1e584175a21071bfdaf76",
"rawBytes": 3837,
"gzipBytes": 1587,
"path": "houseplan-assets/editor-9K9EN2ve.js",
"sha256": "8753a4fc43be5f170312407d168021559e0fb36f6e792ae7cf89ef43acfcad0a",
"rawBytes": 3832,
"gzipBytes": 1583,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-ZUqkYkE7.js",
"sha256": "384fa06671bfe1ba9f4b5ac8a59707ebace2e7c1eda8aa9f8193bd611e32dfaf",
"path": "houseplan-assets/fr-CL6nb6OC.js",
"sha256": "773009a1d2918e59a7c88f32fd4596805bfadc9839e56ed5a269fcd2a8637239",
"rawBytes": 93719,
"gzipBytes": 27143,
"gzipBytes": 27137,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"sha256": "9d716575d2c50c0b87420aef9abd5654aac1545c4050e097a1687e356a05daf7",
"path": "houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"sha256": "43baaa69d2e72ed20c244efd472ceceaaee09f7f2da9815552434db571af3619",
"rawBytes": 33655,
"gzipBytes": 10251,
"gzipBytes": 10255,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/guard-CHvmsSf0.js",
"sha256": "5235e984db15e7bb9080ec44f11b43038cffb285afe489534f59413280ead9c7",
"path": "houseplan-assets/guard-Ck4umgxm.js",
"sha256": "cf355229f645240b1de7c73317e0bb535501165253f474a9c0d1c9464bf950b0",
"rawBytes": 518,
"gzipBytes": 371,
"gzipBytes": 370,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-yh8-YihB.js",
"sha256": "73b88b18d508bc8e075c49cb898742df9eb29dd70a70db42e9763dc12b6e5c59",
"rawBytes": 1076670,
"gzipBytes": 298188,
"path": "houseplan-assets/houseplan-card-By4JNccM.js",
"sha256": "bc29ba2c27148b5054a6a376a6f163726a423558b6f649a701b2d2873769169b",
"rawBytes": 1078545,
"gzipBytes": 298969,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-DBUfK9Nr.js",
"houseplan-assets/editor-0keqnMJ7.js",
"houseplan-assets/fr-ZUqkYkE7.js",
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/houseplan-editor-runtime-CydVVblm.js",
"houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js",
"houseplan-assets/hp-zigbee-topology-overlay-DcQjr8ux.js",
"houseplan-assets/iso-scene-render-Dj9V5jm8.js",
"houseplan-assets/live-interaction-runtime-B2sEacd_.js",
"houseplan-assets/pdf-export-DEpE7VK0.js",
"houseplan-assets/summary-panel-runtime-loaded-CPSfTezy.js"
"houseplan-assets/de-CfuM8tMO.js",
"houseplan-assets/editor-9K9EN2ve.js",
"houseplan-assets/fr-CL6nb6OC.js",
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/houseplan-editor-runtime-DnDMk58C.js",
"houseplan-assets/houseplan-onboarding-runtime-DmAxirgZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-BR_zdv7m.js",
"houseplan-assets/iso-scene-render-CR8avan6.js",
"houseplan-assets/live-interaction-runtime-DcHKiaVf.js",
"houseplan-assets/pdf-export--uT8TAKW.js",
"houseplan-assets/summary-panel-runtime-loaded-3SFAZLpc.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-CydVVblm.js",
"sha256": "7af93a6b4519b59e91b12b10ceb982e79e73773981c1d006ec9f825a8a418a41",
"rawBytes": 672001,
"gzipBytes": 178857,
"path": "houseplan-assets/houseplan-editor-runtime-DnDMk58C.js",
"sha256": "a334588d13ce7c4457412e248b5ba32b942b75493cd559f34bf1d199512199c3",
"rawBytes": 671956,
"gzipBytes": 178882,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js"
"houseplan-assets/zigbee-topology-runtime-ChgxKB58.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js",
"sha256": "cd9d632b79045c4493012025a45514cf0aaf08c784c2ae93fd3734e119c7cccb",
"rawBytes": 28237,
"gzipBytes": 7004,
"path": "houseplan-assets/houseplan-onboarding-runtime-DmAxirgZ.js",
"sha256": "ff7c1d1997ac741eeb1f22a583bf23f8e9ede4122dbb1c3bc383a2031b0fafb5",
"rawBytes": 28211,
"gzipBytes": 7015,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BulfpEVa.js",
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/backdrop-pick-DeZtEIZS.js",
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-DcQjr8ux.js",
"sha256": "2acad806393bd295362b45cedcaa121bcbe53e136a2e91c071463f4ed7fec25f",
"path": "houseplan-assets/hp-zigbee-topology-overlay-BR_zdv7m.js",
"sha256": "db406584e75a4202bd452216cd49dc23d6eba292df756ee79c04d45f36c99ca3",
"rawBytes": 11034,
"gzipBytes": 3732,
"gzipBytes": 3729,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js",
"houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js"
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js",
"houseplan-assets/zigbee-topology-runtime-ChgxKB58.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-Dj9V5jm8.js",
"sha256": "88c036b7404425633b64f71f099c7443b1dd848758998f149a862b10390a5712",
"path": "houseplan-assets/iso-scene-render-CR8avan6.js",
"sha256": "748049f036dc110e65f893ddf091e5c3fad415428de07fc88e18eef7a923b202",
"rawBytes": 38562,
"gzipBytes": 13090,
"gzipBytes": 13084,
"isEntry": false,
"imports": [
"houseplan-assets/guard-CHvmsSf0.js",
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/guard-Ck4umgxm.js",
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-B2sEacd_.js",
"sha256": "c1fa7f6a58a1ba215be6b78d0f663e776575b574972025ac281689ceb29649cb",
"path": "houseplan-assets/live-interaction-runtime-DcHKiaVf.js",
"sha256": "4aeb2454c259433857caad1e63e3cbd3a6ae2818dc67890a2fc36af4d6bcace0",
"rawBytes": 5196,
"gzipBytes": 2128,
"gzipBytes": 2126,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/pdf-export-DEpE7VK0.js",
"sha256": "41119e049b787a8554bc5a1e766a6676ffdebd2f121dd1c6a4dfc071b98a3ebc",
"path": "houseplan-assets/pdf-export--uT8TAKW.js",
"sha256": "5a255ebcfc11779b29ffb3c996d5397818670b838291a3071b0f8f449e9a85ab",
"rawBytes": 237254,
"gzipBytes": 110114,
"gzipBytes": 110116,
"isEntry": false,
"imports": [
"houseplan-assets/furniture-plan-art.generated-BQsXbVMw.js",
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/furniture-plan-art.generated-BwqLRfKg.js",
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-editor-DoCYqzD1.js",
"sha256": "450035176dde97d9435338ffb393fdf34105e35dd7ca8c3b7117377eb7781884",
"path": "houseplan-assets/summary-panel-editor-CZYNjuWs.js",
"sha256": "fefa972f0604e6b693502276b9f02967c7e2ee0533c7e4cad317dcb7158c66e3",
"rawBytes": 14824,
"gzipBytes": 3401,
"gzipBytes": 3399,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/summary-panel-runtime-loaded-CPSfTezy.js"
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-assets/summary-panel-runtime-loaded-3SFAZLpc.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-metrics-CDLFRpun.js",
"sha256": "4aa9ee8c9345f89ce1446c19506f44a93c1758f8e39b1b887a66f69feebc7d52",
"path": "houseplan-assets/summary-panel-metrics-Cf2jZWQk.js",
"sha256": "dc931b9421cc8c2091c841ba9e5addd2a8bd1cef9eab6f61cdaf7796227712f5",
"rawBytes": 2610,
"gzipBytes": 1306,
"gzipBytes": 1304,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-runtime-loaded-CPSfTezy.js",
"sha256": "22ddab2c9b679a3dc4b823a05381d11f83905ad3ed6fc5f1a21d9af51d89b2dc",
"rawBytes": 72803,
"gzipBytes": 19896,
"path": "houseplan-assets/summary-panel-runtime-loaded-3SFAZLpc.js",
"sha256": "6db99aae7fc553b29de8ec42c1e6c873a3bdc4364c4a8c81b80157c7293ccda4",
"rawBytes": 72272,
"gzipBytes": 19728,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": [
"houseplan-assets/summary-panel-editor-DoCYqzD1.js",
"houseplan-assets/summary-panel-metrics-CDLFRpun.js"
"houseplan-assets/summary-panel-editor-CZYNjuWs.js",
"houseplan-assets/summary-panel-metrics-Cf2jZWQk.js"
]
},
{
"path": "houseplan-assets/zigbee-topology-IW8V-F7u.js",
"sha256": "dd55f2b592f031a1c5318fffdce18938e0f2ceefdc90965489cb0b6ade2b3af5",
"path": "houseplan-assets/zigbee-topology-B41DZyHP.js",
"sha256": "cfabe26b0c2ea749f595f15b297af9396e0eb12c0b11c44347ed58f37183d851",
"rawBytes": 18961,
"gzipBytes": 7431,
"gzipBytes": 7424,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js",
"sha256": "03214e422e8dd438c064cc454f05cdf4770f32a1b384d2756f9c79200f7747df",
"path": "houseplan-assets/zigbee-topology-runtime-ChgxKB58.js",
"sha256": "d6e49520a5c316c27816c87df68fc9ec60d5db0d4d5cada8e891de2d13b78738",
"rawBytes": 3941,
"gzipBytes": 1764,
"gzipBytes": 1763,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js",
"houseplan-assets/zigbee-topology-IW8V-F7u.js"
"houseplan-assets/houseplan-card-By4JNccM.js",
"houseplan-assets/zigbee-topology-B41DZyHP.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "c4e8d4da209de178e051ed7e27c86c9ed86ddce4274a95f7170143dddf373be9",
"sha256": "f4d666033ba17325765d15ec12d092d931a72ac1d0cd1f984c3f8bf2a95d56de",
"rawBytes": 1205,
"gzipBytes": 804,
"gzipBytes": 802,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-yh8-YihB.js"
"houseplan-assets/houseplan-card-By4JNccM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-panel.js",
"sha256": "71c93fe566ec7aea9ff4dbef8b9fa5ac57f932589d44bca0055f086af74a8d8f",
"sha256": "af655511a203e01d2bed655af8a5884a228c2823a55ae0b6c556f86946059d98",
"rawBytes": 6124,
"gzipBytes": 2306,
"gzipBytes": 2302,
"isEntry": true,
"imports": [
"houseplan-card.js"
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
-14
View File
@@ -1,14 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{t as e,l as o,x as t,e5 as s,A as a,e6 as i,e7 as l,e8 as n,dW as r,b as c}from"./houseplan-card-yh8-YihB.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}
.computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(f.slice(0,3))}
${_?c`<div class="default-floor-error" role="alert"
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
${t(s,"editor.default_floor_missing",{id:_})}
</div>`:a}
${d(f.slice(3))}
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h);
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";import{m as e,l as o,t,e3 as s,A as a,e4 as i,e5 as l,e6 as n,dU as r,b as c}from"./houseplan-card-BKVJQukC.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__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{m as e,l as o,t,e3 as s,A as a,e4 as i,e5 as l,e6 as n,dU as r,b as c}from"./houseplan-card-By4JNccM.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
-1
View File
@@ -1 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{dU as r,dV as t,dW as s}from"./houseplan-card-yh8-YihB.js";const e={},a=r(class extends t{constructor(){super(...arguments),this.ot=e}render(r,t){return t()}update(r,[t,e]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,t)=>r===this.ot[t]))return s}else if(this.ot===t)return s;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,e)}});export{a as i};
+1
View File
@@ -0,0 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{dS as r,dT as e,dU as t}from"./houseplan-card-By4JNccM.js";const s={},a=r(class extends e{constructor(){super(...arguments),this.ot=s}render(r,e){return e()}update(r,[e,s]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every((r,e)=>r===this.ot[e]))return t}else if(this.ot===e)return t;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,s)}});export{a as i};
-1
View File
@@ -1 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";import{dS as r,dT as t,dU as e}from"./houseplan-card-BKVJQukC.js";const s={},a=r(class extends t{constructor(){super(...arguments),this.ot=s}render(r,t){return t()}update(r,[t,s]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,t)=>r===this.ot[t]))return e}else if(this.ot===t)return e;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,s)}});export{a as i};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,16 +1,6 @@
<<<<<<<< HEAD:custom_components/houseplan/frontend/houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js
<<<<<<<< HEAD:custom_components/houseplan/frontend/houseplan-assets/houseplan-onboarding-runtime-BRKtwSzg.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{l as t,b2 as s,A as e,x as o,b as a,cl as l,cm as i,cn as h,co as c,a$ as n,cp as r,cu as p,cq as d,cr as _,cs as u,ct as g,cv as m,cw as b,dr as $,ds as v,dt as f,a_ as y,b0 as w,du as D}from"./houseplan-card-yh8-YihB.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-BulfpEVa.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,p="none"===o.fill?{...a||h,a:0}:a;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:o.showBorders,showNames:o.showNames,zeroWallStyle:r(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:p,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...m(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await k(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await S(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return C(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const o=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),a=this.host._spaceDialog,l=a?.saved?.find(s=>s.name===t);if(o&&a&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==a.planUrl)try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
${s.map(s=>{return a`
========
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0a76a76ae3d778006d8d7f2d7296a95336a306c743d15efd5166a8249caedeee";import{l as t,b0 as s,A as e,t as a,b as o,cj as l,ck as i,cl as h,cm as c,aZ as n,cn as p,cs as r,co as d,cp as _,cq as u,cr as g,ct as m,cu as b,dp as $,dq as v,dr as f,aY as y,a_ as w,ds as D}from"./houseplan-card-CfF5g1xu.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-uUbYkhJU.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="0a76a76ae3d778006d8d7f2d7296a95336a306c743d15efd5166a8249caedeee";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?o`<hp-help data-help-key=${l}
========
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";import{l as t,b0 as s,A as e,t as a,b as o,cj as l,ck as i,cl as h,cm as c,aZ as n,cn as p,cs as r,co as d,cp as _,cq as u,cr as g,ct as m,cu as b,dp as $,dq as v,dr as f,aY as y,a_ as w,ds as D}from"./houseplan-card-BKVJQukC.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-B1a8Wi9Q.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?o`<hp-help data-help-key=${l}
>>>>>>>> c360bcc9 (test(adoption): ownership lint, post-write smoke, harness seam and docs (#500)):dist/houseplan-assets/houseplan-onboarding-runtime-D0Uo9Pw5.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{l as t,b0 as s,A as e,t as a,b as o,cj as l,ck as i,cl as h,cm as c,aZ as n,cn as p,cs as r,co as d,cp as _,cq as u,cr as g,ct as m,cu as b,dp as $,dq as v,dr as f,aY as y,a_ as w,ds as D}from"./houseplan-card-By4JNccM.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-DeZtEIZS.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?o`<hp-help data-help-key=${l}
.text=${a(h,l)} .ariaLabel=${a(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const a=l(e),o=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,r="none"===a.fill?{...o||h,a:0}:o;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:a.showBorders,showNames:a.showNames,zeroWallStyle:p(e),displayTouched:!0,hideDecor:a.hideDecor,hideOpenings:a.hideOpenings,roomColor:a.color,roomOpacity:a.opacity,fillMode:"none"===a.fill?"custom":a.fill,customFill:r,glowEnabled:a.glow,bgColor:a.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:a.tempMin,tempMax:a.tempMax,showLqi:a.showLqi??this.host._config?.show_signal??!0,cardFontScale:a.cardFontScale,labelTemp:a.labelTemp,labelHum:a.labelHum,labelLqi:a.labelLqi,labelLight:a.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=r(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...m(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const a=await k(e);if("reject"===a.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===a.kind)return void(this.host._backdropGuard=a.state);const o=await S(e,a.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:o})}_renderBackdropGuard(){return C(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),a=this.host._spaceDialog;return a&&a.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...a,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const a=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),o=this.host._spaceDialog,l=o?.saved?.find(s=>s.name===t);if(a&&o&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==o.planUrl)try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return o`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return o`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return o`<div class="savedplans">
${s.map(s=>{return o`
>>>>>>>> 1ff91b54 (feat(adoption): one owner for config/layout identity and the adoption sequence):custom_components/houseplan/frontend/houseplan-assets/houseplan-onboarding-runtime-DR7M2bnZ.js
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
<img src=${this.host._display(s.url)} alt="" loading="lazy" decoding="async" />
<div class="savedmeta">
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
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,12 +1,4 @@
<<<<<<<< HEAD:custom_components/houseplan/frontend/houseplan-assets/summary-panel-editor-DoCYqzD1.js
<<<<<<<< HEAD:custom_components/houseplan/frontend/houseplan-assets/summary-panel-editor-DoCYqzD1.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{b as a,A as e}from"./houseplan-card-yh8-YihB.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-CPSfTezy.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__="0a76a76ae3d778006d8d7f2d7296a95336a306c743d15efd5166a8249caedeee";import{b as a,A as e}from"./houseplan-card-CfF5g1xu.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-DZOniG9e.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">
>>>>>>>> 1ff91b54 (feat(adoption): one owner for config/layout identity and the adoption sequence):custom_components/houseplan/frontend/houseplan-assets/summary-panel-editor-C77DC5Fh.js
========
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="045c3e1a166366a67437f538c473ec2299bdcc82c9d51096ef49b02b7c4d8a9d";import{b as a,A as e}from"./houseplan-card-BKVJQukC.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-CNC8EpID.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">
>>>>>>>> c360bcc9 (test(adoption): ownership lint, post-write smoke, harness seam and docs (#500)):custom_components/houseplan/frontend/houseplan-assets/summary-panel-editor-CtqrpdOR.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{b as a,A as e}from"./houseplan-card-By4JNccM.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-3SFAZLpc.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 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{eb as e,P as t,a5 as n,M as i,aq as o,N as r,bq as s,bp as a,a4 as c,a3 as l,az as u,ec as d,ed as f,bs as m,ee as g}from"./houseplan-card-yh8-YihB.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=u(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),s=i.binding.slice(o+1),a="device"===r?e.registry.devices?.[s]:null,c="entity"===r?e.registry.entities?.[s]:null,l="device"===r?s:c?.device_id,u="device"===r?a?.area_id:c?.area_id||l&&e.registry.devices?.[l]?.area_id,d="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||u||"",f=d&&e.areaToSpace[d]||i.space||e.firstSpaceId;l&&e.registry.devices?.[l]&&e.spaceIds.has(f)&&(!n.devices.has(l)||"entity"===r&&n.liveEntities.has(s))&&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*p(c,l,u=_){try{let d=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=u(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const a=t(e);if(!a)continue;const c=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||a;v=y(v,s(c,m.physicalBodies)),yield}const _=m.cellCm/o;d+=a(v)*_*_/1e4}return d}catch{return null}}function h(e,t,n=_){const i=p(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=d(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{p as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,b as summarySystemValue,h as totalCleanFloorAreaM2};
@@ -0,0 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{e9 as e,L as t,a2 as n,J as i,an as o,N as r,bo as a,bn as s,a1 as c,a0 as l,ax as d,ea as u,eb as f,bq as m,ec as g}from"./houseplan-card-By4JNccM.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};
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
@@ -0,0 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";import{n as t,b as n}from"./zigbee-topology-B41DZyHP.js";import{B as e}from"./houseplan-card-By4JNccM.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 p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(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 g(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 m(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(p(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,f=null,m=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,m=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 p=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&&f?.(n):c&&m?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await g(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 g(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{f as readZhaTopology,m as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
@@ -1,5 +0,0 @@
<<<<<<<< HEAD:dist/houseplan-assets/zigbee-topology-runtime-CrPRm7sL.js
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";import{n as t,b as n}from"./zigbee-topology-IW8V-F7u.js";import{F as e}from"./houseplan-card-yh8-YihB.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 p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(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 g(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 m(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(p(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,f=null,m=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,m=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 p=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&&f?.(n):c&&m?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await g(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 g(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{f as readZhaTopology,m as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
========
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0a76a76ae3d778006d8d7f2d7296a95336a306c743d15efd5166a8249caedeee";import{n as t,b as n}from"./zigbee-topology-CP61k3bH.js";import{B as e}from"./houseplan-card-CfF5g1xu.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 p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(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 g(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 m(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(p(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,f=null,m=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,m=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 p=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&&f?.(n):c&&m?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await g(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 g(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{f as readZhaTopology,m as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
>>>>>>>> 1ff91b54 (feat(adoption): one owner for config/layout identity and the adoption sequence):dist/houseplan-assets/zigbee-topology-runtime-9uRhJ6b0.js
+1 -1
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5c1b1c61b738b69334f9555c60ee17aa874c642234b0dcca6c358552357c0daf";try{await import("./houseplan-assets/houseplan-card-yh8-YihB.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__="56f5f1e488da9e4803edb06697ad42d013cc5eaec289c0a38bf65e06a505c7d4";try{await import("./houseplan-assets/houseplan-card-By4JNccM.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
+2 -2
View File
@@ -212,8 +212,8 @@ export const LOW_HEADROOM_WARNING_BYTES = 15_000;
* `config-adoption.ts` (+~740 Б gzip: владелец идентичности, делегаты хоста
* с harness-сеттерами ревизий, post-write профиль для четырёх путей, которые
* раньше гейт пропускали); дубли в `_loadFromServer`/`_reloadConfigOnly`/
* summary recovery сняты. Измеренный факт 299 718 Б оставляет 582 Б сверху и
* 1 418 Б до нижней границы полосы; общий бюджет 301 066 Б и долг #367 не
* summary recovery сняты. Измеренный факт 299 771 Б оставляет 529 Б сверху и
* 1 471 Б до нижней границы полосы; общий бюджет 301 066 Б и долг #367 не
* меняются.
*/
export const INITIAL_VIEW_GZIP_CEILING = 300_300;
+40 -12
View File
@@ -54,11 +54,22 @@ const configOf = (cfgResp: AuthoritativeConfigResponse | undefined | null): Serv
const finiteRevision = (value: unknown, fallback: number): number =>
typeof value === 'number' && Number.isFinite(value) ? value : fallback;
/** Host field a body maps to — the name Lit sees in `changedProperties`. */
export type BodyField = '_serverCfg' | '_layout';
/**
* Identity owner. Bodies are stored by reference: the editor mutates the config
* in place and compares `host._serverCfg === cfg`, so cloning here would break
* both (#500 I4). Every other module sees the `ConfigAdoption` type below, where
* the six fields are `readonly`; only the methods of this class write them.
*
* Replacing a body reference is a reactive event for the host: before #500 it
* went through Lit's `_serverCfg`/`_layout` accessors and `willUpdate` keyed
* the geometry epoch and render-lifecycle invalidation on
* `changed.has('_serverCfg')`. `onBodyReplaced` keeps that contract — the card
* wires it to `requestUpdate(name, previous)`; identity-only changes (revision,
* fingerprint) and echoes do not fire it, exactly as an unchanged reference
* never did.
*/
export class MutableConfigAdoption {
config: ServerConfig | null = null;
@@ -69,6 +80,21 @@ export class MutableConfigAdoption {
layoutRev = 0;
layoutFingerprint = '';
constructor(private readonly onBodyReplaced?: (field: BodyField, previous: unknown) => void) {}
private setConfig(next: ServerConfig | null): void {
const previous = this.config;
if (next === previous) return;
this.config = next;
this.onBodyReplaced?.('_serverCfg', previous);
}
private setLayout(next: DeviceLayout): void {
const previous = this.layout;
if (next === previous) return;
this.layout = next;
this.onBodyReplaced?.('_layout', previous);
}
/** Accepted fingerprint, or the live body's when nothing was accepted yet. */
currentConfigFingerprint(): string {
return this.configFingerprint || contentFingerprint(this.config);
@@ -97,7 +123,7 @@ export class MutableConfigAdoption {
const configChanged = nextFingerprint !== this.currentConfigFingerprint();
if (configChanged) {
onConfigReplace();
this.config = next;
this.setConfig(next);
this.configFingerprint = nextFingerprint;
}
this.configRev = cfgResp?.rev ?? this.configRev;
@@ -108,7 +134,7 @@ export class MutableConfigAdoption {
layoutChanged = nextLayoutFingerprint !== this.currentLayoutFingerprint();
if (layoutChanged) {
onLayoutReplace();
this.layout = nextLayout;
this.setLayout(nextLayout);
this.layoutFingerprint = nextLayoutFingerprint;
}
this.layoutRev = layResp?.rev ?? this.layoutRev;
@@ -126,7 +152,7 @@ export class MutableConfigAdoption {
const changed = fingerprint !== contentFingerprint(this.layout);
if (changed) {
onReplace?.();
this.layout = merged;
this.setLayout(merged);
}
this.layoutFingerprint = fingerprint;
this.layoutRev = layResp?.rev ?? this.layoutRev;
@@ -142,7 +168,7 @@ export class MutableConfigAdoption {
*/
stageConfigCandidate(candidate: ServerConfig): void {
const fingerprint = contentFingerprint(candidate);
if (fingerprint !== contentFingerprint(this.config)) this.config = candidate;
if (fingerprint !== contentFingerprint(this.config)) this.setConfig(candidate);
this.configFingerprint = fingerprint;
}
@@ -162,9 +188,9 @@ export class MutableConfigAdoption {
layout: DeviceLayout,
response: { config_rev?: unknown; layout_rev?: unknown } | null | undefined,
): void {
this.config = config;
this.setConfig(config);
this.configFingerprint = contentFingerprint(config);
this.layout = layout;
this.setLayout(layout);
this.layoutFingerprint = contentFingerprint(layout);
this.configRev = finiteRevision(response?.config_rev, this.configRev + 1);
this.layoutRev = finiteRevision(response?.layout_rev, this.layoutRev + 1);
@@ -178,8 +204,8 @@ export class MutableConfigAdoption {
// --- local staging (bodies only; identity untouched) --------------------
/** Editor replaced the working config before a write; revision/fingerprint stay. */
stageLocalConfig(config: ServerConfig | null): void { this.config = config; }
stageLocalLayout(layout: DeviceLayout): void { this.layout = layout; }
stageLocalConfig(config: ServerConfig | null): void { this.setConfig(config); }
stageLocalLayout(layout: DeviceLayout): void { this.setLayout(layout); }
/**
* Browser-harness seam: smokes and capture scripts drive revisions and
@@ -219,7 +245,7 @@ export class MutableConfigAdoption {
const current = this.config;
if (!current || this.configRev !== attempt.revision
|| contentFingerprint(current) !== attempt.attemptedFingerprint) return false;
this.config = attempt.previous;
this.setConfig(attempt.previous);
this.configFingerprint = attempt.previousFingerprint;
return true;
}
@@ -230,10 +256,10 @@ export class MutableConfigAdoption {
restoreCached(cached: Partial<CachedStructuralSnapshot> | null | undefined): boolean {
const config = cached?.config;
if (!config || !Array.isArray(config.spaces)) return false;
this.config = config;
this.setConfig(config);
this.configRev = cached?.rev || 0;
this.configFingerprint = cached?.config_fingerprint || contentFingerprint(config);
this.layout = cached?.layout || {};
this.setLayout(cached?.layout || {});
this.layoutRev = cached?.layout_rev || 0;
this.layoutFingerprint = cached?.layout_fingerprint || contentFingerprint(this.layout);
return true;
@@ -258,7 +284,9 @@ export class MutableConfigAdoption {
/** What every other module holds: the owner with its identity fields read-only. */
export type ConfigAdoption = Readonly<MutableConfigAdoption>;
export const createConfigAdoption = (): ConfigAdoption => new MutableConfigAdoption();
export const createConfigAdoption = (
onBodyReplaced?: (field: BodyField, previous: unknown) => void,
): ConfigAdoption => new MutableConfigAdoption(onBodyReplaced);
// ---------------------------------------------------------------------------
// Host side effects and the single gated sequence.
+5 -1
View File
@@ -916,7 +916,11 @@ export class HouseplanCard extends LitElement {
* test/config-adoption-ownership.test.mjs), revisions and fingerprints
* change only through `_adoption`.
*/
public readonly _adoption: ConfigAdoption = createConfigAdoption();
public readonly _adoption: ConfigAdoption = createConfigAdoption(
// A replaced body is the reactive event `willUpdate` keys the geometry
// epoch on (`changed.has('_serverCfg')`), exactly as the Lit accessor did.
(field, previous) => this.requestUpdate(field, previous),
);
private get _layout(): DeviceLayout { return this._adoption.layout; }
private set _layout(layout: DeviceLayout) { this._adoption.stageLocalLayout(layout); }
// Setters below exist for the browser harness only (smokes seed revisions).
+35
View File
@@ -307,6 +307,41 @@ test('layout: merged re-read keeps the reference on equal content; own replies m
assert.equal(adoption.layoutRev, 8);
});
// --- reactive contract: a replaced body is a host event ------------------------
test('a replaced body reference notifies the host with the field name and previous value; echoes and identity-only changes do not', () => {
const events = [];
const adoption = createConfigAdoption((field, previous) => events.push([field, previous]));
const first = cfg('First');
adoptStructuralResponses(hostStub(adoption), { config: first, rev: 1 }, { layout: { d: {} }, rev: 0 });
assert.deepEqual(events.map(([f]) => f), ['_serverCfg', '_layout'], 'first adoption replaces both bodies');
assert.equal(events[0][1], null);
events.length = 0;
adoptStructuralResponses(hostStub(adoption), { config: cloneOf(first), rev: 2 }, { layout: { d: {} }, rev: 3 });
assert.deepEqual(events, [], 'an echo moves revisions only — no reactive event, no epoch bump (#500)');
adoption.acceptConfigWrite(first, { rev: 3 });
adoption.refreshConfigFingerprint();
adoption.noteLayoutRevision(9);
assert.deepEqual(events, [], 'identity-only changes are not body events');
const second = cfg('Second');
adoption.stageLocalConfig(second);
assert.deepEqual(events, [['_serverCfg', first]]);
adoption.stageLocalConfig(second);
assert.equal(events.length, 1, 'same reference again is not a replacement');
const attempt = adoption.beginOptimistic(second, cfg('Draft'));
adoption.stageLocalConfig(attempt.attempted);
adoption.rollbackOptimistic(attempt);
assert.deepEqual(events.slice(1).map(([f]) => f), ['_serverCfg', '_serverCfg'], 'staging and rollback both replace the body');
events.length = 0;
adoption.acceptPairWrite(cfg('Pair'), { d: {} }, { config_rev: 5, layout_rev: 6 });
assert.deepEqual(events.map(([f]) => f), ['_serverCfg', '_layout']);
events.length = 0;
adoption.adoptMergedLayout(cloneOf(adoption.layout), { rev: 7 });
assert.deepEqual(events, [], 'equal merged layout keeps the reference');
adoption.adoptMergedLayout({ e: {} }, { rev: 8 });
assert.deepEqual(events.map(([f]) => f), ['_layout']);
});
// --- AC5: warm cache round-trip ----------------------------------------------
test('AC5: snapshot → restoreCached reproduces the identity exactly with the persisted LS_CFG keys', () => {
+1 -1
View File
@@ -199,7 +199,7 @@ test('frontend write paths adopt canonical candidates before persistence (#224)'
assert.match(source, /this\._adoption\.stageConfigCandidate\(candidate\);\s*(?:try \{\s*)?await this\._sendConfigCandidate\(candidate\);/);
assert.match(
readFileSync(new URL('../src/config-adoption.ts', import.meta.url), 'utf8'),
/stageConfigCandidate\(candidate: ServerConfig\): void \{\s*const fingerprint = contentFingerprint\(candidate\);\s*if \(fingerprint !== contentFingerprint\(this\.config\)\) this\.config = candidate;/,
/stageConfigCandidate\(candidate: ServerConfig\): void \{\s*const fingerprint = contentFingerprint\(candidate\);\s*if \(fingerprint !== contentFingerprint\(this\.config\)\) this\.setConfig\(candidate\);/,
);
assert.match(
source,