feat(form-kit): набор контролов по референсу и оболочка диалогов настроек

Серия 0 из пяти по #600. Ничего из четырёх диалогов ещё не переложено — эта
серия даёт им инструменты и оболочку.

Набор (`form-kit.ts` + `form-kit.styles.ts`), числа из §3.1 SPEC.md референса,
цвета через переменные темы HA:
- полная строка настройки `toggleRow` — сетка 28/1fr/44: иконка, название +
  «?», подпись, тумблер справа; тумблер — нативный чекбокс, нарисованный CSS,
  как у редактора панели: один вид в HA, на стенде и в golden, и всё тот же
  `input[type=checkbox]` для смоков; компактный вариант для однотипных списков;
- `field`, `fieldGrid` (две колонки и 1fr/175), `subsection`, `unitInput`,
  `rangeLine`, `rangeEnds`, `radioRow`, `choiceCards`;
- `valueTiles` (4 колонки), плитки цвета в CSS; `colorField` — компактная
  плашка вокруг существующего `hp-color-opacity` (Q5): свотч открывает ту же
  панель, рядом hex, число прозрачности и Reset; нативного пикера нет;
- `callout` (К5: сообщения о состоянии остаются на виду), `compass` 44 px,
  `footerStatus`, `chip`, `tintBlock`, `textLink`, `divider`;
- `segmented` получил образцы линии, иконки и `disabled`; вид — как в
  референсе: контейнер на канве, активный сегмент на тинте.

Оболочка (`hp-dialog.ts`, атрибут `form-shell` у четырёх диалогов настроек):
ширина 560 через `--hp-dialog-wide-width`, которую `:host([wide])` уже читал;
высота min(940px, 100vh − 48); единственный скроллер — `.content`, тело формы
высотой не владеет (К6, дефект 7 из issue); «✕» 44 px; бейдж имени пространства
в заголовке (`badge`). Generic `wide` и остальные диалоги не тронуты (Q7).

`hp-dialog[form-shell] .body` — без max-height и overflow, канва 16 px.

Фикстуры листа диалогов `test/fixtures/form-kit-card-dialog*.css` пересняты
намеренно; лист панели совпал с замороженным побайтово (К9, AC11).

`editor.loading` → «Загрузка…» в четырёх локалях (дефект 9); aria-текст прежний.

Потолок ленивого редакторского графа 222 900 → 225 900 с доводом в
`bundle-budget.mjs`: рост — CSS-строки набора, не код; значение промежуточное,
серии 1–4 выкидывают старые правила, итог замеряется в конце.

Гейты: typecheck, build, bundle:sync, `npm test` (2791 pass; красными были
только потолок — поднят — и неотслеженные файлы манифеста — добавлены),
`smoke_settings_dialog_cards`, `smoke_room_settings`.

Issue: #600
User-Visible: no
This commit is contained in:
Claude
2026-09-20 09:39:13 +03:00
parent 3b502c7d80
commit 30da00403d
64 changed files with 1711 additions and 500 deletions
+140 -140
View File
@@ -1,309 +1,309 @@
{
"schema": 1,
"fingerprint": "3ab9d99b7b0bb2a8a913345adf926d0479a4524af1e1bf6ab83b55921179e458",
"fingerprint": "6cd9ff192e4efe6961915ababb39139977f92f1fdcb9e36f488f9ae2a4623f97",
"entry": "houseplan-card.js",
"panelEntry": "houseplan-panel.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-CKashuzz.js",
"houseplan-assets/houseplan-card-7SOYFLfq.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 291529,
"initialViewGzipBytes": 291827,
"initialPanelFiles": [
"houseplan-assets/houseplan-card-CKashuzz.js",
"houseplan-assets/houseplan-card-7SOYFLfq.js",
"houseplan-panel.js"
],
"initialPanelGzipBytes": 293052,
"initialPanelGzipBytes": 293351,
"initialPanelOnlyFiles": [
"houseplan-panel.js"
],
"initialPanelOnlyGzipBytes": 2326,
"initialPanelOnlyGzipBytes": 2327,
"lazyFiles": [
"houseplan-assets/backdrop-pick-DoI7yjX7.js",
"houseplan-assets/de-wLkxTRq0.js",
"houseplan-assets/editor-C8bALXQf.js",
"houseplan-assets/form-kit.styles-BpyurJKJ.js",
"houseplan-assets/fr-CA7PIaql.js",
"houseplan-assets/furniture-plan-art.generated-DsJWJE61.js",
"houseplan-assets/houseplan-editor-runtime-D2md8-cr.js",
"houseplan-assets/houseplan-onboarding-runtime-BNHkTOfc.js",
"houseplan-assets/hp-zigbee-topology-overlay-DBlrNIoy.js",
"houseplan-assets/iso-scene-render-BI4uAlBp.js",
"houseplan-assets/live-interaction-runtime-SkGhVBof.js",
"houseplan-assets/pdf-export-B9zDb_0x.js",
"houseplan-assets/summary-panel-runtime-loaded-DYK5EaLe.js",
"houseplan-assets/zigbee-topology-CT-3MG-W.js",
"houseplan-assets/zigbee-topology-runtime-BODqns9j.js"
"houseplan-assets/backdrop-pick-B0ht_PyU.js",
"houseplan-assets/de-C9MexCKy.js",
"houseplan-assets/editor-D6WTAA-K.js",
"houseplan-assets/form-kit.styles-CBC2v9wU.js",
"houseplan-assets/fr-CAs5M4Tb.js",
"houseplan-assets/furniture-plan-art.generated-DZhgXaM_.js",
"houseplan-assets/houseplan-editor-runtime-Dz0092Ox.js",
"houseplan-assets/houseplan-onboarding-runtime-DYZkPKph.js",
"houseplan-assets/hp-zigbee-topology-overlay-Ddf6xAnb.js",
"houseplan-assets/iso-scene-render-B6Ekkgh6.js",
"houseplan-assets/live-interaction-runtime-BGTWkYV6.js",
"houseplan-assets/pdf-export-CE1rhIfT.js",
"houseplan-assets/summary-panel-runtime-loaded-BoTu9cBV.js",
"houseplan-assets/zigbee-topology-CSuj7ZsS.js",
"houseplan-assets/zigbee-topology-runtime-BdEsXPQm.js"
],
"lazyGzipBytes": 441954,
"lazyGzipBytes": 444985,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-DoI7yjX7.js",
"houseplan-assets/editor-C8bALXQf.js",
"houseplan-assets/form-kit.styles-BpyurJKJ.js",
"houseplan-assets/furniture-plan-art.generated-DsJWJE61.js",
"houseplan-assets/houseplan-editor-runtime-D2md8-cr.js",
"houseplan-assets/zigbee-topology-CT-3MG-W.js"
"houseplan-assets/backdrop-pick-B0ht_PyU.js",
"houseplan-assets/editor-D6WTAA-K.js",
"houseplan-assets/form-kit.styles-CBC2v9wU.js",
"houseplan-assets/furniture-plan-art.generated-DZhgXaM_.js",
"houseplan-assets/houseplan-editor-runtime-Dz0092Ox.js",
"houseplan-assets/zigbee-topology-CSuj7ZsS.js"
],
"lazyEditorGzipBytes": 222199,
"lazyEditorGzipBytes": 225236,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-DoI7yjX7.js",
"houseplan-assets/houseplan-onboarding-runtime-BNHkTOfc.js"
"houseplan-assets/backdrop-pick-B0ht_PyU.js",
"houseplan-assets/houseplan-onboarding-runtime-DYZkPKph.js"
],
"lazyOnboardingGzipBytes": 13918,
"lazyOnboardingGzipBytes": 13921,
"lazyLocaleFiles": [
"houseplan-assets/de-wLkxTRq0.js",
"houseplan-assets/fr-CA7PIaql.js"
"houseplan-assets/de-C9MexCKy.js",
"houseplan-assets/fr-CAs5M4Tb.js"
],
"lazyLocaleGzipBytes": 56363,
"lazyLocaleGzipBytes": 56352,
"lazyIsometricFiles": [
"houseplan-assets/iso-scene-render-BI4uAlBp.js"
"houseplan-assets/iso-scene-render-B6Ekkgh6.js"
],
"lazyIsometricGzipBytes": 17646,
"lazyFurnitureArtFiles": [
"houseplan-assets/furniture-plan-art.generated-DsJWJE61.js"
"houseplan-assets/furniture-plan-art.generated-DZhgXaM_.js"
],
"lazyFurnitureArtGzipBytes": 16942,
"lazyFurnitureArtGzipBytes": 16941,
"lazyPdfFiles": [
"houseplan-assets/furniture-plan-art.generated-DsJWJE61.js",
"houseplan-assets/pdf-export-B9zDb_0x.js"
"houseplan-assets/furniture-plan-art.generated-DZhgXaM_.js",
"houseplan-assets/pdf-export-CE1rhIfT.js"
],
"lazyPdfGzipBytes": 126816,
"files": [
{
"path": "houseplan-assets/backdrop-pick-DoI7yjX7.js",
"sha256": "62c404bc9565e6cd2fc49d2964ce885b2708bb5cf4e5559e694084dfb7c4dbd4",
"path": "houseplan-assets/backdrop-pick-B0ht_PyU.js",
"sha256": "4cec93e1379785a8de040a64e822d2dca69d75c9bda65e5bb77582837c8870a5",
"rawBytes": 19959,
"gzipBytes": 6881,
"gzipBytes": 6883,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-wLkxTRq0.js",
"sha256": "c251b8a9490c342574b014d262bc43550afdadfb8b6ca5cd9baa41ea5955e473",
"rawBytes": 93989,
"gzipBytes": 28446,
"path": "houseplan-assets/de-C9MexCKy.js",
"sha256": "32c53acf324602d06bd46254528ca3449ed872a1a27e3f0da9f4d090eebf1b3d",
"rawBytes": 93982,
"gzipBytes": 28439,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-C8bALXQf.js",
"sha256": "8951be375843f6d9ec76f5a16a48d3b3fca3a9a9f991941ed5785ef561c44f48",
"path": "houseplan-assets/editor-D6WTAA-K.js",
"sha256": "0a6c751f06048db9433999be2eee52dd14bea461e65745b9514fc74f31a05312",
"rawBytes": 3833,
"gzipBytes": 1585,
"gzipBytes": 1584,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/form-kit.styles-BpyurJKJ.js",
"sha256": "ff62ec6e8e0d3f6032475d9c33a8d6af25407b5b213b992d62a74cbcfa5c372a",
"rawBytes": 3615,
"gzipBytes": 1234,
"path": "houseplan-assets/form-kit.styles-CBC2v9wU.js",
"sha256": "d09ee9af5f9c4bca94c1ea80a61bd67f655eb71d630f8631493e87cea7f55bae",
"rawBytes": 19728,
"gzipBytes": 4134,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-CA7PIaql.js",
"sha256": "42a3d22c8fcf917574ee780e28e572efef00b73d18f0dabb825bcb7bc74282f7",
"rawBytes": 96460,
"gzipBytes": 27917,
"path": "houseplan-assets/fr-CAs5M4Tb.js",
"sha256": "787efc667679b07b2398a3823d3debe0fdcf21fc34816ca1dcaafb898a882dbe",
"rawBytes": 96446,
"gzipBytes": 27913,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/furniture-plan-art.generated-DsJWJE61.js",
"sha256": "32f1e23fb9841afaaabbada8de19b01763f2efeda19706f7295e294ec22ef415",
"path": "houseplan-assets/furniture-plan-art.generated-DZhgXaM_.js",
"sha256": "617601e04ecc6b996706c81189a3fd9c05b656bdbcfd43c43dcefe8535973192",
"rawBytes": 52033,
"gzipBytes": 16942,
"gzipBytes": 16941,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-CKashuzz.js",
"sha256": "f997a5b6d418897dddcf67067c33081b2e198cf19e3f778240f3e86c15060a19",
"rawBytes": 1035518,
"gzipBytes": 290726,
"path": "houseplan-assets/houseplan-card-7SOYFLfq.js",
"sha256": "d4188ac801d4eeeda52fb96ae456193560fd451eb175c91106ba15a0d37f5276",
"rawBytes": 1036675,
"gzipBytes": 291024,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-wLkxTRq0.js",
"houseplan-assets/editor-C8bALXQf.js",
"houseplan-assets/fr-CA7PIaql.js",
"houseplan-assets/furniture-plan-art.generated-DsJWJE61.js",
"houseplan-assets/houseplan-editor-runtime-D2md8-cr.js",
"houseplan-assets/houseplan-onboarding-runtime-BNHkTOfc.js",
"houseplan-assets/hp-zigbee-topology-overlay-DBlrNIoy.js",
"houseplan-assets/iso-scene-render-BI4uAlBp.js",
"houseplan-assets/live-interaction-runtime-SkGhVBof.js",
"houseplan-assets/pdf-export-B9zDb_0x.js",
"houseplan-assets/summary-panel-runtime-loaded-DYK5EaLe.js"
"houseplan-assets/de-C9MexCKy.js",
"houseplan-assets/editor-D6WTAA-K.js",
"houseplan-assets/fr-CAs5M4Tb.js",
"houseplan-assets/furniture-plan-art.generated-DZhgXaM_.js",
"houseplan-assets/houseplan-editor-runtime-Dz0092Ox.js",
"houseplan-assets/houseplan-onboarding-runtime-DYZkPKph.js",
"houseplan-assets/hp-zigbee-topology-overlay-Ddf6xAnb.js",
"houseplan-assets/iso-scene-render-B6Ekkgh6.js",
"houseplan-assets/live-interaction-runtime-BGTWkYV6.js",
"houseplan-assets/pdf-export-CE1rhIfT.js",
"houseplan-assets/summary-panel-runtime-loaded-BoTu9cBV.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-D2md8-cr.js",
"sha256": "1b57da1a58b48787e22693d1b7f634033d497d02e41ef0f3df8f0cd6309e9b44",
"rawBytes": 689688,
"gzipBytes": 188131,
"path": "houseplan-assets/houseplan-editor-runtime-Dz0092Ox.js",
"sha256": "762766cc523027ba614d2be63d2f88fc1d71290ffaa3208cc92f1edf2cd9c1da",
"rawBytes": 690050,
"gzipBytes": 188264,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-DoI7yjX7.js",
"houseplan-assets/form-kit.styles-BpyurJKJ.js",
"houseplan-assets/furniture-plan-art.generated-DsJWJE61.js",
"houseplan-assets/houseplan-card-CKashuzz.js",
"houseplan-assets/zigbee-topology-CT-3MG-W.js"
"houseplan-assets/backdrop-pick-B0ht_PyU.js",
"houseplan-assets/form-kit.styles-CBC2v9wU.js",
"houseplan-assets/furniture-plan-art.generated-DZhgXaM_.js",
"houseplan-assets/houseplan-card-7SOYFLfq.js",
"houseplan-assets/zigbee-topology-CSuj7ZsS.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-BODqns9j.js"
"houseplan-assets/zigbee-topology-runtime-BdEsXPQm.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-BNHkTOfc.js",
"sha256": "312ea386a10eec5c166b11e649f4e3ba6cd5f2dbee20e1a4aa1249a908ebaac0",
"path": "houseplan-assets/houseplan-onboarding-runtime-DYZkPKph.js",
"sha256": "65360b5e5db006a204b78080c9bf0a66d0f6e2908e961fec2cd7491233c6e068",
"rawBytes": 28289,
"gzipBytes": 7037,
"gzipBytes": 7038,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-DoI7yjX7.js",
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/backdrop-pick-B0ht_PyU.js",
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-DBlrNIoy.js",
"sha256": "497a171f94e1f9c4ba3b0f9cbba85964f7855f2f9054d77b216f2d470e83797c",
"path": "houseplan-assets/hp-zigbee-topology-overlay-Ddf6xAnb.js",
"sha256": "8bb82514164e2553e4954aa899ed76613ba6a7975a2c56d2bf0b9aa6cf865186",
"rawBytes": 10759,
"gzipBytes": 3686,
"gzipBytes": 3689,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js",
"houseplan-assets/zigbee-topology-CT-3MG-W.js",
"houseplan-assets/zigbee-topology-runtime-BODqns9j.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js",
"houseplan-assets/zigbee-topology-CSuj7ZsS.js",
"houseplan-assets/zigbee-topology-runtime-BdEsXPQm.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-BI4uAlBp.js",
"sha256": "08f417675757907d57816ba42c4fe61e0d15ad718fa96e0860abe1793d2f8dbb",
"path": "houseplan-assets/iso-scene-render-B6Ekkgh6.js",
"sha256": "415432da483c183b860b6ddb107fa741bb42b36ee4bc7c93a7c2b978f735c70f",
"rawBytes": 51983,
"gzipBytes": 17646,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-SkGhVBof.js",
"sha256": "66abe7390b746ca77e8b8e95cd1d4c2350387c75065cedf50e0c1c4531107d93",
"path": "houseplan-assets/live-interaction-runtime-BGTWkYV6.js",
"sha256": "d0b356b1606a710e3a80d1f6edc38cf78bd9db12cd26464126adde1fd7060cd5",
"rawBytes": 8216,
"gzipBytes": 3209,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/pdf-export-B9zDb_0x.js",
"sha256": "01d2578e42c220cc68e1e83bcc73911e5ab50dda51803f71b61a4c224e949905",
"path": "houseplan-assets/pdf-export-CE1rhIfT.js",
"sha256": "63cbf195494fa6a5c0ab2eef5898aac214d7fe1aeef3a1440ac935c513a784cf",
"rawBytes": 236247,
"gzipBytes": 109874,
"gzipBytes": 109875,
"isEntry": false,
"imports": [
"houseplan-assets/furniture-plan-art.generated-DsJWJE61.js",
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/furniture-plan-art.generated-DZhgXaM_.js",
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-editor-BPB06SlK.js",
"sha256": "f29242716a9bdd370a61e44b218a49cfd8fae757b7b0e451519fbc2ec6f9010e",
"path": "houseplan-assets/summary-panel-editor-iY1NRI16.js",
"sha256": "426c3c4d0eabbf4c2d1dbf8df7ff7014ea5b056e65c5efc8f0fc94c48a15f7f0",
"rawBytes": 14862,
"gzipBytes": 3426,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-BpyurJKJ.js",
"houseplan-assets/houseplan-card-CKashuzz.js",
"houseplan-assets/summary-panel-runtime-loaded-DYK5EaLe.js"
"houseplan-assets/form-kit.styles-CBC2v9wU.js",
"houseplan-assets/houseplan-card-7SOYFLfq.js",
"houseplan-assets/summary-panel-runtime-loaded-BoTu9cBV.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-metrics-B83OT7Fa.js",
"sha256": "2d60940ab5b5b8e415779c56af19b2e12c392be20fae4993ba7dbeea7aa4b224",
"path": "houseplan-assets/summary-panel-metrics-B46g7DYe.js",
"sha256": "8477c4119923c351e2659b8946631da69cfb91ea5cd3af2c785febc0438d5fed",
"rawBytes": 2611,
"gzipBytes": 1309,
"gzipBytes": 1308,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-runtime-loaded-DYK5EaLe.js",
"sha256": "ca467a6c4015775e2d89dd1d1213939d5512a564319a4571d68175fb392eaa7e",
"path": "houseplan-assets/summary-panel-runtime-loaded-BoTu9cBV.js",
"sha256": "2db5c4726d47f600c97162da9286249d0638e49750c86feeeede4c2a51594e48",
"rawBytes": 72733,
"gzipBytes": 20175,
"gzipBytes": 20176,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-BpyurJKJ.js",
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/form-kit.styles-CBC2v9wU.js",
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": [
"houseplan-assets/summary-panel-editor-BPB06SlK.js",
"houseplan-assets/summary-panel-metrics-B83OT7Fa.js"
"houseplan-assets/summary-panel-editor-iY1NRI16.js",
"houseplan-assets/summary-panel-metrics-B46g7DYe.js"
]
},
{
"path": "houseplan-assets/zigbee-topology-CT-3MG-W.js",
"sha256": "c32ca5d4a1c01274e201bd20f9253f4fc43568c1d2fe8e9af69c6d1b3f8e0f07",
"path": "houseplan-assets/zigbee-topology-CSuj7ZsS.js",
"sha256": "874e793dd0353ec78697255df98c48013350ff97256a523cdb9e355c3dd6f89b",
"rawBytes": 18962,
"gzipBytes": 7426,
"gzipBytes": 7430,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-BODqns9j.js",
"sha256": "2900491477c37854cd96b59bc2bb464d258b012c9b9c941445f80429afe5255f",
"path": "houseplan-assets/zigbee-topology-runtime-BdEsXPQm.js",
"sha256": "235cb8ee128098bda457e3b5f60550c57a2b396c370c509ce9959b1057f401ec",
"rawBytes": 3942,
"gzipBytes": 1765,
"gzipBytes": 1764,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js",
"houseplan-assets/zigbee-topology-CT-3MG-W.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js",
"houseplan-assets/zigbee-topology-CSuj7ZsS.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "b34512df26300f2883541bcf9cf70dd1dc9faba02348bbbf765424599370620a",
"sha256": "d80bb9cbd391bff82457b816441cb521deed2ed858080db45675309233bd66d1",
"rawBytes": 1205,
"gzipBytes": 803,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
},
{
"path": "houseplan-panel.js",
"sha256": "a28954836532479bae91b6fc3ba8e10b027ff914734f599f7da0f65a3bd3170f",
"sha256": "d9479bbcdae8d726306bfb370d0f01df66059a958dffc581b10f9fd70bec0780",
"rawBytes": 6165,
"gzipBytes": 2326,
"gzipBytes": 2327,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-CKashuzz.js"
"houseplan-assets/houseplan-card-7SOYFLfq.js"
],
"dynamicImports": []
}
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 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="3ab9d99b7b0bb2a8a913345adf926d0479a4524af1e1bf6ab83b55921179e458";import{aI as e,l as o,aL as t,e7 as s,A as a,e8 as i,e9 as l,ea as n,E as r,c}from"./houseplan-card-CKashuzz.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__="6cd9ff192e4efe6961915ababb39139977f92f1fdcb9e36f488f9ae2a4623f97";import{aI as e,l as o,aL as t,e7 as s,A as a,e8 as i,e9 as l,ea as n,E as r,c}from"./houseplan-card-7SOYFLfq.js";class f 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,f={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")},h=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}
.computeLabel=${e=>f[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(f.slice(0,3))}
${d(h.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);
${d(h.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)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
-1
View File
@@ -1 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="3ab9d99b7b0bb2a8a913345adf926d0479a4524af1e1bf6ab83b55921179e458";const n={form:".summary-editor",prefix:"summary",cards:[".summary-general",".summary-blocks-card"],footer:".summary-editor-footer",tokens:{surface:"--summary-editor-surface",line:"--summary-editor-line",accent:"--summary-editor-accent"}},e={form:".hpf-form",prefix:"hpf",cards:[".hpf-card"],footer:".hpf-footer",tokens:{surface:"--hpf-surface",line:"--hpf-line",accent:"--hpf-accent"}};function r({cards:n,tokens:e}){return` ${n.join(",\n ")} {\n min-width: 0;\n padding: 14px;\n border: 1px solid var(${e.line});\n border-radius: 11px;\n background: var(${e.surface});\n }`}function i({form:n,footer:e,tokens:r}){return` ${n} input:focus-visible,\n ${n} select:focus-visible,\n ${n} button:focus-visible,\n ${e} button:focus-visible {\n outline: 2px solid var(${r.accent});\n outline-offset: 2px;\n }`}function t({form:n}){return` ${n} button:disabled,\n ${n} input:disabled,\n ${n} select:disabled { opacity: .4; cursor: default; }`}function o({form:n,prefix:e}){return` ${n} .${e}-switch {\n display: flex;\n min-width: 0;\n min-height: 54px;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n margin: 0;\n color: var(--primary-text-color);\n cursor: pointer;\n }`}function a({prefix:n}){return` .${n}-switch-caption { display: grid; min-width: 0; gap: 3px; }\n .${n}-switch-caption strong { font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }\n .${n}-switch-caption small { font-size: .8125rem; color: var(--secondary-text-color); overflow-wrap: anywhere; }`}function s(n,{withSwitch:e=!0}={}){return`${function(n,e){const s=e?`\n${o(n)}\n${a(n)}`:"";return`${r(n)}\n${i(n)}\n${t(n)}${s}`}(n,e)}\n${function(n){const{form:e,prefix:r,tokens:i}=n;return` ${e} { display: grid; gap: 12px; }\n .${r}-head {\n display: flex;\n min-width: 0;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin: 0 0 10px;\n }\n .${r}-head h3 { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 600; }\n .${r}-row {\n display: flex;\n min-width: 0;\n min-height: 44px;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n }\n .${r}-row > .${r}-label { min-width: 0; overflow-wrap: anywhere; }\n .${r}-seg {\n display: flex;\n min-width: 0;\n border: 1px solid var(${i.line});\n border-radius: 9px;\n overflow: hidden;\n }\n .${r}-seg label {\n display: flex;\n min-width: 0;\n min-height: 44px;\n flex: 1 1 0;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 0 12px;\n cursor: pointer;\n text-align: center;\n }\n .${r}-seg label + label { border-left: 1px solid var(${i.line}); }\n .${r}-seg input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }\n .${r}-seg label:has(input:checked) {\n background: var(${i.accent});\n color: var(--text-primary-color, #fff);\n }\n .${r}-seg label:has(input:focus-visible) {\n outline: 2px solid var(${i.accent});\n outline-offset: -2px;\n }\n .${r}-color { display: flex; min-width: 0; align-items: center; gap: 12px; }\n .${r}-color hp-color-opacity { flex: 0 0 auto; }`}(n)}\n`}const c=" hp-dialog .hpf-form {\n --hpf-surface: var(--card-background-color, #fff);\n --hpf-line: var(--hp-line, var(--divider-color, #dce5e7));\n --hpf-accent: var(--hp-accent, var(--primary-color));\n }\n";export{e as C,n as S,r as a,i as b,c,t as d,o as e,s as f,a as g};
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,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="3ab9d99b7b0bb2a8a913345adf926d0479a4524af1e1bf6ab83b55921179e458";import{c as a,A as e}from"./houseplan-card-CKashuzz.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-DYK5EaLe.js";import"./form-kit.styles-BpyurJKJ.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__="6cd9ff192e4efe6961915ababb39139977f92f1fdcb9e36f488f9ae2a4623f97";import{c as a,A as e}from"./houseplan-card-7SOYFLfq.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-BoTu9cBV.js";import"./form-kit.styles-CBC2v9wU.js";const m=m=>{const{host:c,dialog:d,problems:n,t:b}=m,y=n.find(a=>"error"===a.kind),$=d.localShow!==d.baseLocalShow||!d.localOnly&&!s(t(d.draft),d.base),p=$&&!d.busy&&!y,v=a=>n.find(e=>e.path===a),h=a=>a?b(`summary.problem.${a.code}`):"",k=()=>m.close(),g=a`<label class="summary-switch" for="summary-local-show">
<span class="summary-switch-caption"><strong>${b("summary.show_local")}</strong>
<small id="summary-local-show-hint">${b("summary.show_local_hint")}</small></span>
<input id="summary-local-show" data-summary-local-show type="checkbox"
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="3ab9d99b7b0bb2a8a913345adf926d0479a4524af1e1bf6ab83b55921179e458";import{ed as e,J as t,b4 as n,H as i,aa as o,a8 as r,bU as s,bT as a,b3 as l,b2 as c,b5 as d,ee as u,ef as f,bW as m,eg as g}from"./houseplan-card-CKashuzz.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),s=i.binding.slice(o+1),a="device"===r?e.registry.devices?.[s]:null,l="entity"===r?e.registry.entities?.[s]:null,c="device"===r?s:l?.device_id,d="device"===r?a?.area_id:l?.area_id||c&&e.registry.devices?.[c]?.area_id,u="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||d||"",f=u&&e.areaToSpace[u]||i.space||e.firstSpaceId;c&&e.registry.devices?.[c]&&e.spaceIds.has(f)&&(!n.devices.has(c)||"entity"===r&&n.liveEntities.has(s))&&t.add(c)}return t}function b(e,t){return e?.length?t?.length?g(e,t):e:t}function y(e,t){const n=l(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:c(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*_(l,c,d=y){try{let u=0;for(const f of c){const c=l.spaces.find(e=>String(e?.id)===f.id);if(!c)continue;const m=e(c,f),g=d(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const a=t(e);if(!a)continue;const l=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||a;v=b(v,s(l,m.physicalBodies)),yield}const y=m.cellCm/o;u+=a(v)*y*y/1e4}return u}catch{return null}}function h(e,t,n=y){const i=_(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function p(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{_ as cleanFloorAreaSteps,v as representedHaDeviceIds,y as spaceWallGeometry,S as summaryEntityValue,p as summarySystemValue,h as totalCleanFloorAreaM2};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="6cd9ff192e4efe6961915ababb39139977f92f1fdcb9e36f488f9ae2a4623f97";import{ed as e,J as t,b4 as n,H as i,aa as o,a8 as r,bU as s,bT as a,b3 as l,b2 as c,b5 as u,ee as d,ef as f,bW as m,eg as g}from"./houseplan-card-7SOYFLfq.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,l="entity"===r?e.registry.entities?.[s]:null,c="device"===r?s:l?.device_id,u="device"===r?a?.area_id:l?.area_id||c&&e.registry.devices?.[c]?.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;c&&e.registry.devices?.[c]&&e.spaceIds.has(f)&&(!n.devices.has(c)||"entity"===r&&n.liveEntities.has(s))&&t.add(c)}return t}function y(e,t){return e?.length?t?.length?g(e,t):e:t}function _(e,t){const n=l(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:c(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*b(l,c,u=_){try{let d=0;for(const f of c){const c=l.spaces.find(e=>String(e?.id)===f.id);if(!c)continue;const m=e(c,f),g=u(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const a=t(e);if(!a)continue;const l=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||a;v=y(v,s(l,m.physicalBodies)),yield}const _=m.cellCm/o;d+=a(v)*_*_/1e4}return d}catch{return null}}function h(e,t,n=_){const i=b(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function p(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{b as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,p as summarySystemValue,h as totalCleanFloorAreaM2};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="3ab9d99b7b0bb2a8a913345adf926d0479a4524af1e1bf6ab83b55921179e458";import{n as t,b as n}from"./zigbee-topology-CT-3MG-W.js";import{aR as e}from"./houseplan-card-CKashuzz.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__="6cd9ff192e4efe6961915ababb39139977f92f1fdcb9e36f488f9ae2a4623f97";import{n as t,b as n}from"./zigbee-topology-CSuj7ZsS.js";import{aR as e}from"./houseplan-card-7SOYFLfq.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function 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(f(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,p=null,m=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=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 f=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&p?.(n):c&&m?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),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{p as readZhaTopology,m as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
+1 -1
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="3ab9d99b7b0bb2a8a913345adf926d0479a4524af1e1bf6ab83b55921179e458";try{await import("./houseplan-assets/houseplan-card-CKashuzz.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__="6cd9ff192e4efe6961915ababb39139977f92f1fdcb9e36f488f9ae2a4623f97";try{await import("./houseplan-assets/houseplan-card-7SOYFLfq.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