globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f75fcd3764d3a1a73710cfa9cac88454a450e0d29e090f3339b5f5d853594786";import{aB as e,A as t,c as s,l as r,ec as i,bH as a,bG as o}from"./houseplan-card-DrP8_MdR.js";import{a as n,b as l,d as m,e as c,g as u,S as d}from"./form-kit.styles-1SWKbgIc.js";const h=Object.freeze({blocks:10,values:20,title:48,label:64}),y=e=>"string"==typeof e?e.trim():"",p=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),g=e=>!!e&&"object"==typeof e;function f(e){return`${e}-${globalThis.crypto?.randomUUID?.()||`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}`}function b(e){return{version:1,title:e("summary.default_title"),show_on_mobile:!0,blocks:[{id:"summary-default",title:e("summary.default_block"),visible:!0,scope:{type:"all"},values:[{id:"summary-device-count",label:e("summary.system.device_count"),source:{type:"system",key:"device_count"}},{id:"summary-total-area",label:e("summary.system.total_area"),source:{type:"system",key:"total_area"}},{id:"summary-datetime",label:e("summary.system.datetime"),source:{type:"system",key:"datetime"}}]}]}}function v(e){if(!g(e))return!1;const t=e;return!(1!==t.version||"string"!=typeof t.title||"boolean"!=typeof t.show_on_mobile||!Array.isArray(t.blocks))&&t.blocks.every(e=>{if(!g(e)||"string"!=typeof e.id||"string"!=typeof e.title||"boolean"!=typeof e.visible||!g(e.scope)||!Array.isArray(e.values))return!1;const t=e.scope;return("all"===t.type||"space"===t.type&&"string"==typeof t.space_id)&&e.values.every(e=>{if(!g(e)||"string"!=typeof e.id||"string"!=typeof e.label||!g(e.source))return!1;const t=e.source;return"entity"===t.type&&"string"==typeof t.entity_id||"system"===t.type&&"string"==typeof t.key&&["device_count","total_area","datetime"].includes(t.key)})})}function _(e){return structuredClone(e)}function w(e,t){return e.blocks.filter(e=>e.visible&&("all"===e.scope.type||"space"===e.scope.type&&e.scope.space_id===t))}function k(e,t,s,r){const i=[],a=function(e){const t=new Map,s=new Map;for(const r of e?.blocks||[]){"space"===r.scope.type&&t.set(r.id,r.scope.space_id);for(const e of r.values)"entity"===e.source.type&&s.set(e.id,e.source.entity_id)}return{scopes:t,sources:s}}(t),o=new Set,n=new Set,l=(e,t,s)=>{const r=y(e);r?(e=>[...e].length)(r)>t&&i.push({path:s,kind:"error",code:"limit"}):i.push({path:s,kind:"error",code:"required"})};return l(e.title,h.title,"title"),e.blocks.length>h.blocks&&i.push({path:"blocks",kind:"error",code:"limit"}),e.blocks.forEach((e,t)=>{const m=`blocks.${t}`;if(l(e.id,h.label,`${m}.id`),l(e.title,h.title,`${m}.title`),o.has(e.id)&&i.push({path:`${m}.id`,kind:"error",code:"duplicate_id"}),o.add(e.id),"space"===e.scope.type){const t=y(e.scope.space_id);t?s.has(t)||i.push({path:`${m}.scope`,kind:a.scopes.get(e.id)===t?"warning":"error",code:"missing_space"}):i.push({path:`${m}.scope`,kind:"error",code:"required"})}else"all"!==e.scope.type&&i.push({path:`${m}.scope`,kind:"error",code:"required"});e.values.length>h.values&&i.push({path:`${m}.values`,kind:"error",code:"limit"}),e.values.forEach((e,t)=>{const s=`${m}.values.${t}`;if(l(e.id,h.label,`${s}.id`),l(e.label,h.label,`${s}.label`),n.has(e.id)&&i.push({path:`${s}.id`,kind:"error",code:"duplicate_id"}),n.add(e.id),"entity"===e.source.type){const t=y(e.source.entity_id);t?r.has(t)||i.push({path:`${s}.source`,kind:a.sources.get(e.id)===t?"warning":"error",code:"missing_entity"}):i.push({path:`${s}.source`,kind:"error",code:"required"})}else"system"===e.source.type&&["device_count","total_area","datetime"].includes(e.source.key)||i.push({path:`${s}.source`,kind:"error",code:"invalid_source"})})}),i}function x(e){return{...e,version:1,title:y(e.title),show_on_mobile:!1!==e.show_on_mobile,blocks:e.blocks.map(e=>({...e,id:y(e.id),title:y(e.title),visible:!1!==e.visible,scope:"space"===e.scope.type?{...e.scope,type:"space",space_id:y(e.scope.space_id)}:{...e.scope,type:"all"},values:e.values.map(e=>({...e,id:y(e.id),label:y(e.label),source:"entity"===e.source.type?{...e.source,type:"entity",entity_id:y(e.source.entity_id)}:{...e.source,type:"system",key:e.source.key}}))}))}}function S(e){const t=e.showOnMobile||!1===e.narrow;return e.view&&e.localShow&&t&&e.fits}function M(e){const t=Number(e);return Number.isFinite(t)?Math.max(.5,Math.min(3,Math.round(20*t)/20)):1}function $(e,t){return JSON.stringify(e)===JSON.stringify(t)}function C(e,t,s){if(t<0||t>=e.length||s<0||s>=e.length||t===s)return[...e];const r=[...e],[i]=r.splice(t,1);return r.splice(s,0,i),r}function D(e){return{id:f("b"),title:e("summary.new_block"),visible:!0,scope:{type:"all"},values:[]}}function z(e){return{id:f("v"),label:"",source:{type:"entity",entity_id:""}}}const T=`\n hp-dialog[data-kind='summary'] {\n --hp-dialog-wide-width: 920px;\n --ha-dialog-width-md: 920px;\n --summary-editor-surface: var(--card-background-color, #fff);\n --summary-editor-muted: color-mix(in srgb, var(--summary-editor-surface) 96%, var(--primary-text-color, #303638));\n --summary-editor-line: var(--divider-color, #dce5e7);\n --summary-editor-accent: var(--primary-color, var(--hp-accent));\n --summary-editor-accent-soft: color-mix(in srgb, var(--summary-editor-surface) 94%, var(--summary-editor-accent));\n }\n hp-dialog[data-kind='summary'] .summary-editor {\n box-sizing: border-box;\n container: summary-editor / inline-size;\n width: 100%;\n min-width: 0;\n min-height: 0;\n max-height: none;\n padding: 14px 17px 18px;\n gap: 12px;\n flex: 1 1 auto;\n overflow-y: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n color: var(--primary-text-color);\n background: var(--summary-editor-muted);\n font-size: .875rem;\n line-height: 1.4;\n }\n .summary-editor *,\n .summary-editor-footer * { box-sizing: border-box; }\n .summary-editor h3 { margin: 0; font-size: 1rem; line-height: 1.3; }\n .summary-editor p { margin: 0; overflow-wrap: anywhere; }\n${n(d)}\n .summary-general-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px 18px;\n margin-top: 12px;\n }\n .summary-general-grid:has(> .summary-switch:only-child) { grid-template-columns: minmax(0, 1fr); }\n .summary-editor .summary-field { min-width: 0; }\n .summary-editor .summary-field > label {\n display: block;\n margin: 0 0 5px;\n color: var(--secondary-text-color);\n font-size: .8125rem;\n font-weight: 600;\n }\n .summary-editor input[type='text'],\n .summary-editor input[type='search'],\n .summary-editor select {\n display: block;\n width: 100%;\n min-width: 0;\n max-width: 100%;\n min-height: 44px;\n margin: 0;\n padding: 8px 10px;\n color: var(--primary-text-color);\n background: var(--summary-editor-surface);\n border: 1px solid var(--summary-editor-line);\n border-radius: 7px;\n font: inherit;\n font-size: .875rem;\n line-height: 1.4;\n }\n .summary-editor select { cursor: pointer; }\n .summary-editor [aria-invalid='true'] {\n border-color: var(--error-color, #db4437);\n }\n${l(d)}\n .summary-editor button { font: inherit; }\n${m(d)}\n .summary-editor svg { display: block; flex: 0 0 auto; width: 20px; height: 20px; }\n${c(d)}\n${u(d)}\n /* The native checkbox itself is the visible 44px hit target. No hidden\n duplicate control or optimistic storage write is needed for the switch. */\n .summary-editor .summary-switch input {\n appearance: none;\n position: relative;\n width: 44px;\n height: 44px;\n flex: 0 0 44px;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: 6px;\n background: transparent;\n cursor: pointer;\n }\n .summary-switch input::before {\n content: '';\n position: absolute;\n width: 36px;\n height: 22px;\n inset: 11px 4px;\n border: 1px solid var(--summary-editor-line);\n border-radius: 12px;\n background: color-mix(in srgb, var(--summary-editor-surface) 65%, var(--secondary-text-color));\n }\n .summary-switch input::after {\n content: '';\n position: absolute;\n width: 16px;\n height: 16px;\n top: 14px;\n left: 7px;\n border-radius: 50%;\n background: var(--text-primary-color, #fff);\n box-shadow: 0 1px 2px rgb(0 0 0 / 20%);\n }\n .summary-switch input:checked::before {\n background: var(--summary-editor-accent);\n border-color: var(--summary-editor-accent);\n }\n .summary-switch input:checked::after { left: 21px; }\n .summary-switch:has(input:disabled) { cursor: default; }\n .summary-switch:has(input:disabled) .summary-switch-caption { opacity: .6; }\n .summary-blocks-heading {\n display: flex;\n min-width: 0;\n align-items: flex-start;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 8px 12px;\n margin-bottom: 12px;\n }\n .summary-blocks-heading > div { min-width: 0; flex: 1 1 220px; }\n .summary-blocks-heading p { margin-top: 4px; color: var(--secondary-text-color); font-size: .8125rem; }\n .summary-block-count {\n padding: 4px 8px;\n border-radius: 10px;\n color: var(--primary-text-color);\n background: var(--summary-editor-accent-soft);\n font-size: .75rem;\n font-weight: 600;\n overflow-wrap: anywhere;\n }\n .summary-editor-blocks { display: grid; min-width: 0; gap: 10px; }\n .summary-editor-block {\n min-width: 0;\n border: 1px solid var(--summary-editor-line);\n border-radius: 10px;\n background: var(--summary-editor-muted);\n }\n .summary-block-head {\n display: grid;\n grid-template-columns: 44px 92px minmax(0, 1fr) 44px;\n align-items: center;\n gap: 8px;\n min-width: 0;\n padding: 8px;\n border-bottom: 1px solid var(--summary-editor-line);\n border-radius: 10px 10px 0 0;\n background: var(--summary-editor-surface);\n }\n .summary-editor .summary-block-title { font-weight: 700; }\n .summary-order { display: grid; grid-template-columns: repeat(2, 44px); gap: 4px; }\n .summary-icon-button,\n .summary-drag {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n min-width: 44px;\n height: 44px;\n padding: 0;\n color: var(--secondary-text-color);\n border: 1px solid var(--summary-editor-line);\n border-radius: 7px;\n background: var(--summary-editor-surface);\n cursor: pointer;\n }\n .summary-drag { border: 0; background: transparent; cursor: grab; user-select: none; }\n .summary-drag:active { cursor: grabbing; }\n .summary-drag[draggable='false'] { cursor: default; }\n .summary-icon-button:hover:not(:disabled) {\n color: var(--summary-editor-accent);\n border-color: var(--summary-editor-accent);\n background: var(--summary-editor-accent-soft);\n }\n .summary-visibility[aria-pressed='true'] {\n color: var(--summary-editor-accent);\n border-color: color-mix(in srgb, var(--summary-editor-line) 45%, var(--summary-editor-accent));\n background: var(--summary-editor-accent-soft);\n }\n .summary-scope {\n display: grid;\n grid-column: 3 / -1;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 8px;\n min-width: 0;\n }\n .summary-scope > select:only-child { grid-column: 1 / -1; }\n .summary-block-title-error,\n .summary-scope-problem { grid-column: 3 / -1; }\n .summary-block-body { min-width: 0; padding: 10px; }\n .summary-editor-values { display: grid; min-width: 0; gap: 7px; }\n .summary-editor-value {\n display: grid;\n grid-template-columns: 44px 92px minmax(0, .9fr) minmax(0, 1.2fr) 44px;\n align-items: start;\n min-width: 0;\n padding: 5px;\n gap: 7px;\n border: 1px solid var(--summary-editor-line);\n border-radius: 8px;\n background: var(--summary-editor-surface);\n }\n .summary-value-label,\n .summary-source-field { min-width: 0; }\n .summary-source {\n display: flex;\n width: 100%;\n min-width: 0;\n min-height: 44px;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 7px 9px;\n color: var(--primary-text-color);\n text-align: left;\n border: 1px solid var(--summary-editor-line);\n border-radius: 7px;\n background: var(--summary-editor-surface);\n cursor: pointer;\n }\n .summary-source-caption { display: grid; min-width: 0; gap: 2px; }\n .summary-source-caption strong { font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }\n .summary-source-caption small { color: var(--secondary-text-color); font-size: .75rem; overflow-wrap: anywhere; }\n .summary-editor .summary-value-remove {\n color: var(--error-color, #db4437);\n border-color: transparent;\n background: color-mix(in srgb, var(--summary-editor-surface) 94%, var(--error-color, #db4437));\n }\n .summary-editor .summary-value-remove:hover:not(:disabled) { border-color: var(--error-color, #db4437); }\n .summary-source-picker {\n min-width: 0;\n margin-top: 7px;\n padding: 10px;\n border: 1px solid var(--summary-editor-line);\n border-radius: 10px;\n background: var(--summary-editor-surface);\n box-shadow: 0 6px 18px rgb(0 0 0 / 18%);\n }\n .summary-editor .summary-source-picker > label {\n display: block;\n margin: 0 0 5px;\n font-size: .8125rem;\n font-weight: 600;\n overflow-wrap: anywhere;\n }\n .summary-source-results {\n display: grid;\n max-height: min(360px, 48vh);\n margin-top: 8px;\n overflow-y: auto;\n overscroll-behavior: contain;\n }\n .summary-source-results button {\n display: grid;\n min-width: 0;\n min-height: 44px;\n padding: 7px 9px;\n align-content: center;\n color: var(--primary-text-color);\n text-align: left;\n overflow-wrap: anywhere;\n background: transparent;\n border: 0;\n border-radius: 7px;\n cursor: pointer;\n }\n .summary-source-results button:hover:not(:disabled),\n .summary-source-results button[aria-selected='true'] { background: var(--summary-editor-accent-soft); }\n .summary-source-results button.broken { color: var(--warning-color, #f59e0b); }\n .summary-source-results small { color: var(--secondary-text-color); font-size: .75rem; overflow-wrap: anywhere; }\n .summary-source-group {\n padding: 9px 8px 4px;\n color: var(--secondary-text-color);\n font-size: .8125rem;\n font-weight: 600;\n overflow-wrap: anywhere;\n }\n .summary-refine { padding: 9px; color: var(--secondary-text-color); overflow-wrap: anywhere; }\n .summary-problem { margin: 5px 0; font-size: .8125rem; overflow-wrap: anywhere; }\n .summary-problem.error { color: var(--error-color, #db4437); }\n .summary-problem.warning { color: var(--warning-color, #f59e0b); }\n .summary-local-hint { color: var(--secondary-text-color); }\n .summary-block-footer { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--summary-editor-line); }\n .summary-delete-block {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 12px;\n border: 1px solid color-mix(in srgb, var(--summary-editor-line) 35%, var(--error-color, #db4437));\n border-radius: 7px;\n color: var(--error-color, #db4437);\n background: var(--summary-editor-surface);\n white-space: normal;\n overflow-wrap: anywhere;\n cursor: pointer;\n }\n .summary-add {\n display: inline-flex;\n min-width: 44px;\n min-height: 44px;\n align-items: center;\n justify-content: center;\n gap: 7px;\n padding: 8px 12px;\n border: 1px dashed color-mix(in srgb, var(--summary-editor-line) 40%, var(--summary-editor-accent));\n border-radius: 8px;\n color: var(--summary-editor-accent);\n background: var(--summary-editor-accent-soft);\n white-space: normal;\n overflow-wrap: anywhere;\n cursor: pointer;\n }\n .summary-editor .summary-add,\n .summary-editor .summary-delete-block { font-weight: 600; }\n .summary-add-value { width: 100%; }\n .summary-add-block { margin-top: 10px; }\n .summary-add:hover:not(:disabled) { border-style: solid; }\n .summary-delete-block:hover:not(:disabled) { background: color-mix(in srgb, var(--summary-editor-surface) 94%, var(--error-color, #db4437)); }\n .summary-reload { margin-top: 8px; min-height: 44px; white-space: normal; }\n hp-dialog[data-kind='summary'] .summary-editor-footer {\n min-height: 66px;\n padding: 11px 17px;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: 8px;\n border-top: 1px solid var(--summary-editor-line);\n background: var(--summary-editor-surface);\n }\n hp-dialog[data-kind='summary'] .summary-editor-footer button {\n min-width: 44px;\n min-height: 44px;\n height: auto;\n margin: 0;\n padding: 9px 14px;\n border: 1px solid var(--summary-editor-line);\n border-radius: 8px;\n color: var(--primary-text-color);\n background: var(--summary-editor-surface);\n font-size: .875rem;\n line-height: 1.4;\n white-space: normal;\n overflow-wrap: anywhere;\n }\n hp-dialog[data-kind='summary'] .summary-editor-footer button.on {\n border-color: var(--summary-editor-accent);\n color: var(--text-primary-color, #fff);\n background: var(--summary-editor-accent);\n }\n hp-dialog[data-kind='summary'] .summary-editor-footer button:disabled { opacity: .4; cursor: default; }\n @container summary-editor (max-width: 800px) {\n .summary-general-grid { grid-template-columns: minmax(0, 1fr); }\n .summary-editor-value { grid-template-columns: 44px 92px minmax(0, 1fr) 44px; }\n .summary-value-label { grid-column: 3; }\n .summary-source-field { grid-column: 3; }\n .summary-value-remove { grid-column: 4; grid-row: 1; }\n .summary-scope { grid-template-columns: minmax(0, 1fr); }\n }\n @container summary-editor (max-width: 480px) {\n .summary-general,\n .summary-blocks-card { padding: 10px; }\n .summary-block-head { grid-template-columns: 44px minmax(0, 1fr) 44px; }\n .summary-block-head > .summary-order { grid-column: 2; }\n .summary-block-title { grid-column: 1 / 3; grid-row: 2; }\n .summary-visibility { grid-column: 3; grid-row: 2; }\n .summary-scope,\n .summary-block-title-error,\n .summary-scope-problem { grid-column: 1 / -1; }\n .summary-editor-value { grid-template-columns: 44px minmax(0, 1fr) 44px; }\n .summary-editor-value > .summary-order { grid-column: 2; }\n .summary-value-label { grid-column: 1 / -1; grid-row: 2; }\n .summary-source-field { grid-column: 1 / -1; grid-row: 3; }\n .summary-value-remove { grid-column: 3; grid-row: 1; }\n }\n`,R=String.raw` .summary-control { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--divider-color); border-radius: 8px; overflow: hidden; background: var(--card-background-color, #fff); } .summary-control > button { width: 46px; height: 46px; margin: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-right: 1px solid var(--divider-color); color: var(--primary-text-color); background: transparent; cursor: pointer; transition: background-color 160ms ease; } .summary-control > button:last-child { border-right: 0; } .summary-control > button:hover { background: var(--secondary-background-color); } .summary-control > button.on { color: var(--text-primary-color, #fff); background: var(--primary-color); } .summary-control > button:focus-visible { outline: 2px solid var(--primary-color); outline-offset: -3px; } svg.summary-icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; fill: none; } .summary-control.kiosk { position: absolute; z-index: 31; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); box-shadow: 0 4px 14px rgb(0 0 0 / 22%); } .summary-overlay, .summary-measure { box-sizing: border-box; font-size: .875rem; line-height: 1.35; color: var(--primary-text-color); background: var(--secondary-background-color); border: 1px solid var(--divider-color); border-radius: 12px; box-shadow: 0 8px 26px rgb(0 0 0 / 16%); } .summary-overlay { position: absolute; z-index: 24; display: flex; flex-direction: column; height: fit-content; max-height: var(--summary-height-cap); overflow: hidden; pointer-events: auto; touch-action: pan-y; } .summary-overlay[inert] { pointer-events: none; } .summary-overlay.right { top: var(--summary-top); right: calc(12px + env(safe-area-inset-right)); bottom: auto; width: max-content; min-width: min(280px, var(--summary-width-cap)); max-width: min(420px, var(--summary-width-cap)); } .summary-overlay.bottom { right: auto; bottom: var(--summary-bottom); left: 50%; width: max-content; min-width: min(360px, var(--summary-width-cap)); max-width: var(--summary-width-cap); transform: translateX(-50%); } .summary-overlay h2, .summary-measure h2 { box-sizing: border-box; flex: 0 0 auto; min-height: 48px; margin: 0; padding: 14px; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; background: var(--card-background-color, #fff); border-bottom: 1px solid var(--divider-color); } .summary-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px; } .summary-block { min-width: 0; margin: 0 0 9px; border: 1px solid var(--divider-color); border-radius: 11px; background: var(--card-background-color, #fff); } .summary-block:last-child { margin-bottom: 0; } .summary-block h3 { box-sizing: border-box; min-height: 43px; margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--divider-color); font-size: .875rem; line-height: 1.25; overflow-wrap: anywhere; } .summary-value { box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 10px; align-items: baseline; min-height: 36px; margin: 0 11px; padding: 8px 0; border-bottom: 1px solid var(--divider-color); } .summary-value:last-child { border-bottom: 0; } .summary-value span, .summary-value strong { min-width: 0; overflow-wrap: anywhere; } .summary-value span { color: var(--secondary-text-color); } .summary-value strong { text-align: right; font-weight: 700; } /* Значение появляется плавно, а не скачком после скелета (#509). */ .summary-value strong:not(.summary-value-pending) { animation: summary-value-in 140ms ease both; } /* Скелет: прямоугольник в высоту строки на месте значения. Плашка, сетка и высота строки те же, что с готовым значением, — панель не прыгает. */ .summary-value-pending { display: flex; align-items: center; justify-content: flex-end; min-height: 1.2em; } .summary-value-pending i { display: block; width: 4.5em; max-width: 100%; height: 1.2em; border-radius: 5px; background: var(--secondary-text-color, #7a7f87); opacity: 0.18; animation: summary-skeleton-pulse 1200ms ease-in-out infinite; } @keyframes summary-skeleton-pulse { 0%, 100% { opacity: 0.12; } 50% { opacity: 0.28; } } @keyframes summary-value-in { from { opacity: 0; } to { opacity: 1; } } @media (prefers-reduced-motion: reduce) { /* Прямоугольник остаётся — исчезает только моторика (#509). */ .summary-value-pending i { animation: none; opacity: 0.18; } .summary-value strong:not(.summary-value-pending) { animation: none; } } .summary-empty { margin: 0; padding: 10px 11px; color: var(--secondary-text-color); } .summary-measure { position: fixed; z-index: -1; top: -10000px; left: -10000px; width: 280px; visibility: hidden; pointer-events: none; } .summary-safe-probe { position: fixed; z-index: -1; top: -10000px; left: -10000px; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); visibility: hidden; pointer-events: none; } @media (prefers-reduced-motion: reduce) { .summary-control > button { transition: none; } } ${T} `,I=String.raw` /* #505: the summary form follows its own neutral, wide design. Keep every override scoped so the other editor/dialog surfaces stay intact. */ :host([data-kind='summary']) ha-dialog { --ha-dialog-surface-background: var(--card-background-color, #fff); --ha-dialog-border-radius: 15px; --ha-icon-button-size: 44px; --dialog-box-shadow: inset 0 0 0 1px var(--divider-color, #dce5e7), 0 18px 60px rgb(25 34 38 / 26%); } :host([data-kind='summary']) .surface { border: 1px solid var(--divider-color, #dce5e7); border-radius: 15px; box-shadow: 0 18px 60px rgb(25 34 38 / 26%); } :host([data-kind='summary']) .header { min-height: 70px; flex-shrink: 0; padding: 12px 17px; border-color: var(--divider-color, #dce5e7); } :host([data-kind='summary']) .title { font-size: 1.375rem; font-weight: 600; } :host([data-kind='summary']) .close { width: 44px; height: 44px; border-radius: 8px; } :host([data-kind='summary']) .content { flex: 1 1 auto; } :host([data-kind='summary']) .footer { flex-shrink: 0; } `,L={settings:["M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065","M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"],sidebar:["M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12","M15 4l0 16"],eye:["M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0","M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"],eyeOff:["M10.585 10.587a2 2 0 0 0 2.829 2.828","M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87","M3 3l18 18"],plus:["M12 5l0 14","M5 12l14 0"],chevron:["M6 9l6 6l6 -6"],up:["M12 19V5m-6 6 6-6 6 6"],down:["M12 5v14m-6-6 6 6 6-6"],close:["m6 6 12 12M6 18 18 6"],grip:["M9 5h.01M15 5h.01M9 12h.01M15 12h.01M9 19h.01M15 19h.01"]};function A(t){return e``}class E{constructor(e){this.repaint=e,this.phase="hidden",this.wanted=!1,this.side=null,this.pending=!1,this.element=null,this.animation=null,this.timeout=null,this.media=null,this.generation=0,this.motionChanged=()=>{this.media?.matches&&(this.settle(this.wanted),this.repaint())}}get mounted(){return"hidden"!==this.phase}get interactive(){return this.wanted&&this.mounted}sync(e,t,s=!1){const r=null!==this.side&&this.side!==t;this.side=t,s||r?this.settle(e):e!==this.wanted&&(this.wanted=e,this.phase=e?"entering":this.mounted?"exiting":"hidden",this.pending=this.mounted)}updated(e){if(!this.pending)return void(this.element=this.mounted?e:null);if(!e)return;this.pending=!1;const t=e.ownerDocument.defaultView,s=t?.matchMedia?.("(prefers-reduced-motion: reduce)");if(!t||s?.matches||"function"!=typeof e.animate)return this.element=e,this.settle(this.wanted),void this.repaint();const r=this.element===e?t.getComputedStyle(e):null,i="bottom"===this.side?"0px 18px":"18px 0px",a={opacity:r?.opacity||"0",translate:r?.translate||i};this.cancel(),this.element=e;const o=this.generation;this.media=s||null,this.media?.addEventListener("change",this.motionChanged);const n=e.animate([a,{opacity:this.wanted?"1":"0",translate:this.wanted?"0px 0px":i}],{duration:190,easing:"ease",fill:"both"});this.animation=n;const l=()=>{o===this.generation&&n===this.animation&&(this.settle(this.wanted),this.repaint())};n.finished.then(l,()=>{}),this.timeout=setTimeout(l,250)}reset(){this.settle(!1),this.side=null}settle(e){this.cancel(),this.wanted=e,this.pending=!1,this.phase=e?"visible":"hidden",e||(this.element=null)}cancel(){this.generation++,this.animation?.cancel(),this.animation=null,null!==this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.media?.removeEventListener("change",this.motionChanged),this.media=null}}const q={en:{"summary.default_title":"Summary","summary.default_block":"General","summary.system.device_count":"Device count","summary.system.total_area":"Total room area","summary.system.datetime":"Date and time","summary.new_block":"New block","summary.value_name":"Value name","summary.delete_block_title":"Delete block?","summary.delete_block_body":"This block contains values. It will be removed from the draft.","summary.save_failed":"Could not save the summary panel.","summary.conflict":"The configuration changed in another window. Load the current version to start again.","summary.reload_current":"Load current configuration","summary.unavailable":"Source unavailable","summary.empty_block":"No values in this block","summary.empty_space":"No values for this space","summary.measure_block":"Block","summary.measure_label":"Status","summary.controls":"Summary panel controls","summary.settings":"Summary panel settings","summary.show":"Show summary panel","summary.hide":"Hide summary panel","summary.hidden_mobile":"The panel is enabled locally but disabled on mobile","summary.hidden_narrow_unknown":"The panel is enabled locally and is waiting for Home Assistant to report the screen mode","summary.hidden_small":"The panel is enabled locally but this card is too small","summary.show_local":"Show panel on this card","summary.backend_required":"Update the House Plan integration to edit shared panel contents. Local display settings are still available.","summary.local_only":"You can change settings for this card. Shared panel contents are managed by an administrator.","summary.general_settings":"General settings","summary.blocks":"Blocks","summary.blocks_hint":"Arrange blocks, choose where they appear and add values.","summary.block_count":"{count} of {limit}","summary.show_local_hint":"The same setting as the show button in the House Plan header.","summary.show_mobile_hint":"Allow the panel in Home Assistant’s narrow screen mode.","summary.hide_block":"Hide block","summary.show_block":"Show block","summary.delete_block":"Delete block","summary.scope":"Show block in","summary.system_source":"System value","summary.no_search_results":"No matching entities","summary.refine_search":"More entities match. Refine the search to see them.","summary.current_source":"Current unavailable source","summary.storage_unavailable":"These screen settings work for this session but cannot be saved in this browser.","summary.load_failed":"Could not open the panel settings.","summary.unsupported_schema":"This panel was created by a newer House Plan version and cannot be shown here.","summary.panel_title":"Panel title","summary.show_mobile":"Display on mobile devices","summary.block_title":"Block title","summary.up":"Move up","summary.down":"Move down","summary.drag":"Drag to reorder","summary.select_source":"Select a source","summary.scope_all":"All spaces","summary.scope_space":"Specific space","summary.system_group":"System values","summary.entities_group":"Home Assistant entities","summary.search_entities":"Search entities by name or entity ID","summary.limit_values":"A block can contain up to 20 values","summary.add_value":"Add value","summary.limit_blocks":"The panel can contain up to 10 blocks","summary.add_block":"Add block","summary.problem.required":"Fill in this field.","summary.problem.limit":"The allowed limit has been exceeded.","summary.problem.duplicate_id":"This internal identifier is duplicated.","summary.problem.invalid_source":"Select a valid source.","summary.problem.missing_entity":"This entity is no longer available. Select another source to replace it.","summary.problem.missing_space":"This space is no longer available. Select another scope to replace it."},ru:{"summary.default_title":"Сводная информация","summary.default_block":"Общее","summary.system.device_count":"Количество устройств","summary.system.total_area":"Общая площадь комнат","summary.system.datetime":"Дата и время","summary.new_block":"Новый блок","summary.value_name":"Название показателя","summary.delete_block_title":"Удалить блок?","summary.delete_block_body":"В блоке есть показатели. Он будет удалён из черновика.","summary.save_failed":"Не удалось сохранить сводную панель.","summary.conflict":"Конфигурация изменилась в другом окне. Загрузите актуальную версию, чтобы начать заново.","summary.reload_current":"Загрузить актуальную конфигурацию","summary.unavailable":"Источник недоступен","summary.empty_block":"В этом блоке нет показателей","summary.empty_space":"Нет показателей для этого пространства","summary.measure_block":"Блок","summary.measure_label":"Состояние","summary.controls":"Управление сводной панелью","summary.settings":"Настройки сводной панели","summary.show":"Показать сводную панель","summary.hide":"Скрыть сводную панель","summary.hidden_mobile":"Панель включена локально, но отключена на мобильных устройствах","summary.hidden_narrow_unknown":"Панель включена локально и ожидает от Home Assistant информацию о режиме экрана","summary.hidden_small":"Панель включена локально, но карточка слишком мала","summary.show_local":"Показывать панель в этой карточке","summary.backend_required":"Обновите интеграцию House Plan, чтобы менять общее содержимое панели. Локальные настройки доступны.","summary.local_only":"Вы можете менять настройки этой карточки. Общим содержимым панели управляет администратор.","summary.general_settings":"Основные настройки","summary.blocks":"Блоки","summary.blocks_hint":"Настройте порядок, область отображения и показатели.","summary.block_count":"{count} из {limit}","summary.show_local_hint":"То же состояние, что у кнопки показа в шапке House Plan.","summary.show_mobile_hint":"Разрешает показ в узком режиме Home Assistant.","summary.hide_block":"Скрыть блок","summary.show_block":"Показать блок","summary.delete_block":"Удалить блок","summary.scope":"Где показывать блок","summary.system_source":"Системный показатель","summary.no_search_results":"Подходящие сущности не найдены","summary.refine_search":"Найдено больше сущностей. Уточните поиск, чтобы увидеть остальные.","summary.current_source":"Текущий недоступный источник","summary.storage_unavailable":"Настройки экрана действуют в этой сессии, но браузер не может их сохранить.","summary.load_failed":"Не удалось открыть настройки панели.","summary.unsupported_schema":"Эта панель создана в более новой версии House Plan и не может быть здесь показана.","summary.panel_title":"Название панели","summary.show_mobile":"Отображать на мобильных устройствах","summary.block_title":"Название блока","summary.up":"Выше","summary.down":"Ниже","summary.drag":"Перетащить для изменения порядка","summary.select_source":"Выберите источник","summary.scope_all":"Все пространства","summary.scope_space":"Определённое пространство","summary.system_group":"Системные показатели","summary.entities_group":"Сущности Home Assistant","summary.search_entities":"Поиск сущностей по названию или entity ID","summary.limit_values":"В блоке может быть не больше 20 показателей","summary.add_value":"Добавить значение","summary.limit_blocks":"В панели может быть не больше 10 блоков","summary.add_block":"Добавить блок","summary.problem.required":"Заполните это поле.","summary.problem.limit":"Превышено допустимое ограничение.","summary.problem.duplicate_id":"Внутренний идентификатор повторяется.","summary.problem.invalid_source":"Выберите корректный источник.","summary.problem.missing_entity":"Эта сущность больше недоступна. Выберите другой источник, чтобы заменить её.","summary.problem.missing_space":"Это пространство больше недоступно. Выберите другую область, чтобы заменить его."},de:{"summary.default_title":"Übersicht","summary.default_block":"Allgemein","summary.system.device_count":"Anzahl der Geräte","summary.system.total_area":"Gesamte Raumfläche","summary.system.datetime":"Datum und Uhrzeit","summary.new_block":"Neuer Block","summary.value_name":"Bezeichnung","summary.delete_block_title":"Block löschen?","summary.delete_block_body":"Dieser Block enthält Werte und wird aus dem Entwurf entfernt.","summary.save_failed":"Die Übersicht konnte nicht gespeichert werden.","summary.conflict":"Die Konfiguration wurde in einem anderen Fenster geändert. Laden Sie die aktuelle Version, um neu zu beginnen.","summary.reload_current":"Aktuelle Konfiguration laden","summary.unavailable":"Quelle nicht verfügbar","summary.empty_block":"Keine Werte in diesem Block","summary.empty_space":"Keine Werte für diesen Bereich","summary.measure_block":"Block","summary.measure_label":"Status","summary.controls":"Steuerung der Übersicht","summary.settings":"Einstellungen der Übersicht","summary.show":"Übersicht anzeigen","summary.hide":"Übersicht ausblenden","summary.hidden_mobile":"Die Übersicht ist lokal aktiv, aber auf Mobilgeräten deaktiviert","summary.hidden_narrow_unknown":"Die Übersicht ist lokal aktiv und wartet auf den Bildschirmmodus von Home Assistant","summary.hidden_small":"Die Übersicht ist lokal aktiv, aber diese Karte ist zu klein","summary.show_local":"Übersicht in dieser Karte anzeigen","summary.backend_required":"Aktualisieren Sie die House-Plan-Integration, um gemeinsame Inhalte zu bearbeiten. Lokale Einstellungen bleiben verfügbar.","summary.local_only":"Sie können Einstellungen dieser Karte ändern. Gemeinsame Inhalte verwaltet ein Administrator.","summary.general_settings":"Grundeinstellungen","summary.blocks":"Blöcke","summary.blocks_hint":"Reihenfolge, Anzeigebereiche und Werte festlegen.","summary.block_count":"{count} von {limit}","summary.show_local_hint":"Dieselbe Einstellung wie die Anzeigetaste im House-Plan-Kopfbereich.","summary.show_mobile_hint":"Erlaubt die Anzeige im schmalen Bildschirmmodus von Home Assistant.","summary.hide_block":"Block ausblenden","summary.show_block":"Block anzeigen","summary.delete_block":"Block löschen","summary.scope":"Block anzeigen in","summary.system_source":"Systemwert","summary.no_search_results":"Keine passenden Entitäten","summary.refine_search":"Weitere Entitäten stimmen überein. Verfeinern Sie die Suche, um sie zu sehen.","summary.current_source":"Aktuelle nicht verfügbare Quelle","summary.storage_unavailable":"Diese Bildschirmeinstellungen gelten für diese Sitzung, können aber in diesem Browser nicht gespeichert werden.","summary.load_failed":"Die Panel-Einstellungen konnten nicht geöffnet werden.","summary.unsupported_schema":"Dieses Panel wurde mit einer neueren House-Plan-Version erstellt und kann hier nicht angezeigt werden.","summary.panel_title":"Titel der Übersicht","summary.show_mobile":"Auf Mobilgeräten anzeigen","summary.block_title":"Blocktitel","summary.up":"Nach oben","summary.down":"Nach unten","summary.drag":"Zum Sortieren ziehen","summary.select_source":"Quelle auswählen","summary.scope_all":"Alle Bereiche","summary.scope_space":"Bestimmter Bereich","summary.system_group":"Systemwerte","summary.entities_group":"Home-Assistant-Entitäten","summary.search_entities":"Entitäten nach Name oder Entity-ID suchen","summary.limit_values":"Ein Block kann bis zu 20 Werte enthalten","summary.add_value":"Wert hinzufügen","summary.limit_blocks":"Die Übersicht kann bis zu 10 Blöcke enthalten","summary.add_block":"Block hinzufügen","summary.problem.required":"Füllen Sie dieses Feld aus.","summary.problem.limit":"Das zulässige Limit wurde überschritten.","summary.problem.duplicate_id":"Diese interne Kennung wird mehrfach verwendet.","summary.problem.invalid_source":"Wählen Sie eine gültige Quelle.","summary.problem.missing_entity":"Diese Entität ist nicht mehr verfügbar. Wählen Sie zum Ersetzen eine andere Quelle.","summary.problem.missing_space":"Dieser Bereich ist nicht mehr verfügbar. Wählen Sie zum Ersetzen einen anderen Geltungsbereich."},fr:{"summary.default_title":"Résumé","summary.default_block":"Général","summary.system.device_count":"Nombre d’appareils","summary.system.total_area":"Surface totale des pièces","summary.system.datetime":"Date et heure","summary.new_block":"Nouveau bloc","summary.value_name":"Nom de la valeur","summary.delete_block_title":"Supprimer le bloc ?","summary.delete_block_body":"Ce bloc contient des valeurs et sera supprimé du brouillon.","summary.save_failed":"Impossible d’enregistrer le panneau de résumé.","summary.conflict":"La configuration a changé dans une autre fenêtre. Chargez la version actuelle pour recommencer.","summary.reload_current":"Charger la configuration actuelle","summary.unavailable":"Source indisponible","summary.empty_block":"Aucune valeur dans ce bloc","summary.empty_space":"Aucune valeur pour cet espace","summary.measure_block":"Bloc","summary.measure_label":"État","summary.controls":"Commandes du panneau de résumé","summary.settings":"Paramètres du panneau de résumé","summary.show":"Afficher le panneau de résumé","summary.hide":"Masquer le panneau de résumé","summary.hidden_mobile":"Le panneau est activé localement mais désactivé sur mobile","summary.hidden_narrow_unknown":"Le panneau est activé localement et attend le mode d’écran de Home Assistant","summary.hidden_small":"Le panneau est activé localement mais cette carte est trop petite","summary.show_local":"Afficher le panneau dans cette carte","summary.backend_required":"Mettez à jour l’intégration House Plan pour modifier le contenu partagé. Les réglages locaux restent disponibles.","summary.local_only":"Vous pouvez modifier les réglages de cette carte. Le contenu partagé est géré par un administrateur.","summary.general_settings":"Paramètres généraux","summary.blocks":"Blocs","summary.blocks_hint":"Définissez l’ordre, les espaces d’affichage et les valeurs.","summary.block_count":"{count} sur {limit}","summary.show_local_hint":"Le même réglage que le bouton d’affichage dans l’en-tête de House Plan.","summary.show_mobile_hint":"Autorise l’affichage dans le mode écran étroit de Home Assistant.","summary.hide_block":"Masquer le bloc","summary.show_block":"Afficher le bloc","summary.delete_block":"Supprimer le bloc","summary.scope":"Afficher le bloc dans","summary.system_source":"Valeur système","summary.no_search_results":"Aucune entité correspondante","summary.refine_search":"D’autres entités correspondent. Affinez la recherche pour les afficher.","summary.current_source":"Source actuelle indisponible","summary.storage_unavailable":"Ces réglages d’écran s’appliquent à cette session, mais ce navigateur ne peut pas les enregistrer.","summary.load_failed":"Impossible d’ouvrir les paramètres du panneau.","summary.unsupported_schema":"Ce panneau a été créé par une version plus récente de House Plan et ne peut pas être affiché ici.","summary.panel_title":"Titre du panneau","summary.show_mobile":"Afficher sur les appareils mobiles","summary.block_title":"Titre du bloc","summary.up":"Monter","summary.down":"Descendre","summary.drag":"Faire glisser pour réorganiser","summary.select_source":"Sélectionner une source","summary.scope_all":"Tous les espaces","summary.scope_space":"Espace spécifique","summary.system_group":"Valeurs système","summary.entities_group":"Entités Home Assistant","summary.search_entities":"Rechercher par nom ou identifiant d’entité","summary.limit_values":"Un bloc peut contenir jusqu’à 20 valeurs","summary.add_value":"Ajouter une valeur","summary.limit_blocks":"Le panneau peut contenir jusqu’à 10 blocs","summary.add_block":"Ajouter un bloc","summary.problem.required":"Remplissez ce champ.","summary.problem.limit":"La limite autorisée est dépassée.","summary.problem.duplicate_id":"Cet identifiant interne est dupliqué.","summary.problem.invalid_source":"Sélectionnez une source valide.","summary.problem.missing_entity":"Cette entité n’est plus disponible. Sélectionnez une autre source pour la remplacer.","summary.problem.missing_space":"Cet espace n’est plus disponible. Sélectionnez une autre portée pour le remplacer."}};const B=new WeakMap,N=e=>null===e||"object"!=typeof e&&"function"!=typeof e?null:e;function H(e){return e}function O(e){const t=e.localName;return"string"==typeof t&&t?t:"node"}function U(e){const t=e,s=N(t.parentNode);if(s)return s;const r=N(t.host);if(r)return r;if("function"!=typeof t.getRootNode)return null;const i=N(t.getRootNode.call(e));return i&&i!==e?N(i.host):null}function j(e,t){const s=t.children;if(s){const t=Array.from(s).indexOf(e);if(t>=0)return`${O(e)}:${t}`}return N(e.host)===t?"shadow-root":null}function P(e){const t=function(e){const t=[],s=new Set;let r=e;for(let e=0;r&&e<32&&!s.has(r);e++)t.push(r),s.add(r),r=U(r);return t}(e),s=t.findIndex(e=>"hui-masonry-view"===O(e));if(s<0)return{kind:"not-masonry"};const r=t[s].cards;if(!r)return{kind:"unresolved"};const i=Array.from(r),a=new Set(t.slice(0,s)),o=i.findIndex(e=>{const t=N(e);return!!t&&a.has(t)});if(o<0)return{kind:"unresolved"};const n=N(i[o]);if(!n)return{kind:"unresolved"};const l=function(e,t){if(e===t)return"";const s=[];let r=e;const i=new Set;for(let e=0;r&&e<32&&!i.has(r);e++){if(r===t)return s.join("/");i.add(r);const e=U(r);if(!e)return null;const a=j(r,e);if(!a)return null;s.unshift(a),r=e}return r===t?s.join("/"):null}(e,n);if(null===l)return{kind:"unresolved"};const m=`masonry-v2:${o}${l?`/${l}`:""}`;return B.set(e,m),{kind:"resolved",slot:m}}function K(e){const t=B.get(e);if(t)return t;const s=P(e);if("resolved"===s.kind)return s.slot;if("unresolved"===s.kind)return null;const r=function(e){let t=e;for(let e=0;t&&e<16;e++){if("hui-card"===O(t))return t;t=U(t)}return e}(e),i=B.get(r);if(i)return i;const a=function(e){const t=[];let s=e;for(let e=0;s&&e<16;e++){const e=U(s);if(!e){t.unshift(O(s));break}const r=H(e).children,i=r?Array.from(r).indexOf(s):-1;t.unshift(`${O(s)}:${Math.max(0,i)}`),s=e}return t.join("/")||"root"}(r);return B.set(r,a),a}const W=(e,t)=>{const s=t?.attributes?.friendly_name;return"string"==typeof s&&s.trim()?s.trim():e};function F(e,t){const s=e||{},r=Object.keys(s);if(t&&r.length===t.labels.size){let e=!0;for(const i of r)if(t.labels.get(i)!==W(i,s[i])){e=!1;break}if(e)return t}const i=r.map(e=>{const t=W(e,s[e]);return{id:e,label:t,search:`${t}\n${e}`.toLocaleLowerCase()}}).sort((e,t)=>e.label.localeCompare(t.label)||e.id.localeCompare(t.id));return{entries:i,labels:new Map(i.map(e=>[e.id,e.label])),rebuilds:(t?.rebuilds||0)+1}}function G(e,t,s=100){const r=t.trim().toLocaleLowerCase(),i=r?e.entries.filter(e=>e.search.includes(r)):e.entries,a=Math.max(0,Math.floor(s));return{entries:i.slice(0,a),total:i.length,truncated:i.length>a}}var V=Object.freeze({__proto__:null,LoadedSummaryPanelRuntime:class{constructor(e){this.dialog=null,this.local={version:1,show:!1,icon_scale:1,font_scale:1},this.storageKey=null,this.stage={width:0,height:0,minimumHeight:162,controlTop:0},this.clock=new Date,this.clockTimer=0,this.deviceMemo=null,this.areaMemo=null,this.storageUnavailable=!1,this.clockContext="",this.editorRenderer=null,this.editorLoad=null,this.metricsModule=null,this.metricsLoad=null,this.metricsRefresh=0,this.areaSteps=null,this.areaStepsEpoch=-1,this.styleSheet=null,this.entityIndex=null,this.lifecycleGeneration=0,this.lifecycleIdentity="",this.connected=!1,this.presentation=new E(()=>this.host.requestUpdate()),this.dialogStyleSheet=null,this.styledDialogRoots=new WeakSet,this.translate=e=>this.t(e),this.host=e}get dialogOpen(){return!!this.dialog}entityIds(){return function(e){if(!e||!v(e))return[];const t=new Set;for(const s of e.blocks)for(const e of s.values){if("entity"!==e.source.type)continue;const s=y(e.source.entity_id);s&&t.add(s)}return[...t]}(this.config().config)}connect(){this.ensureStyle(),this.connected=!0,this.syncLifecycle(),this.loadLocal()}disconnect(){this.connected=!1,this.resetLifecycle()}leaveRoute(){this.resetLifecycle()}applyLocalScaleForCurrentIdentity(){const e=this.preferenceKey();return!!e&&(e!==this.storageKey&&this.loadLocal(),e===this.storageKey&&(this.host._kioskScale={icon:this.local.icon_scale,font:this.local.font_scale},!0))}visibility(e){if("hidden"===e)return this.clockTimer&&clearTimeout(this.clockTimer),this.clockTimer=0,this.syncPresentation(!0),void this.host.requestUpdate();this.clock=new Date,this.syncClock(),this.host.requestUpdate()}updated(){this.syncLifecycle(),this.syncNativeNarrow(),this.loadLocal(),this.measureLayout(),this.syncClock(),this.ensureDialogStyle(),this.presentation.updated(this.host.renderRoot.querySelector(".summary-overlay"))}willUpdate(){this.syncLifecycle()}observeHassComposition(){if(this.syncLifecycle(),!this.dialog||this.dialog.localOnly)return!1;const e=this.entityIndex;return this.refreshEntityIndex(),this.entityIndex!==e}resized(){this.measureLayout()}closeDialogIfIdle(){return!(!this.dialog||this.dialog.busy)&&(this.dialog=null,this.host.requestUpdate(),!0)}blocksOtherDialogs(){return!!this.dialog}saveScale(e){this.saveLocal({icon_scale:e.icon??this.local.icon_scale,font_scale:e.font??this.local.font_scale})}renderMeasure(){const e=this.config().config?.title;return e&&"view"===this.host._mode?s`
`:t}renderPanel(){const e=this.config().config;if(this.syncPresentation(),!e)return t;const r=this.layout();if(!this.presentation.mounted)return t;this.ensureMetrics();const i=w(e,this.host._space),a=e=>e.stopPropagation();return s``}renderControls(e=!1){if("view"!==this.host._mode)return t;const r=this.config(),i=this.layout(),a=this.local.show&&(r.unsupported?this.t("summary.unsupported_schema"):r.config?.show_on_mobile||!0!==this.host.narrow?r.config?.show_on_mobile||null!==this.host.narrow?i.fits?"":this.t("summary.hidden_small"):this.t("summary.hidden_narrow_unknown"):this.t("summary.hidden_mobile"))||this.t(this.local.show?"summary.hide":"summary.show"),o=e=>e.stopPropagation();return s`