1export const __rspack_esm_id=94512;export const __rspack_esm_ids=[94512];export const __webpack_modules__={91315(t,i,o){o.r(i);o(47144),o(25744),o(89542);var e=o(89797),s=o(20686),n=o(32379),r=o(66543),c=o(24994),a=o(3499),h=o(83581),l=o(48852),g=(o(95788),o(78793),o(54001),o(82908),o(59676)),_=o(25973);class u extends s.WF{setConfig(t){if(!t.entities?.length)throw new Error("Entities are required");this._config=t}getCardSize(){return this._config?.vertical?2:1}getGridOptions(){let t=1,i=6;return this._config?.vertical&&(t++,i=3),{columns:6,rows:t,min_columns:i,min_rows:t}}_getOnEntities(){return this.hass&&this._config?this._config.entities.map(t=>this.hass.states[t]).filter(t=>void 0!==t&&(0,h.a)(t)):[]}_computeColor(){if(!this._config||!this.hass)return;const t=this._getOnEntities();return 0!==t.length?this._config.color?(0,c.MP)(this._config.color):(0,l.Se)(t[0]):void 0}_computeLabel(){if(!this.hass||!this._config)return"";const t=this._getOnEntities().length,i=this._config.entities.length;return 0===t?this.hass.localize("ui.card.toggle-group.all_off"):t===i?this.hass.localize("ui.card.toggle-group.all_on"):this.hass.localize("ui.card.toggle-group.some_on",{on_count:t,total_count:i})}_handleTap(){if(!this.hass||!this._config)return;const t=this._getOnEntities(),i=(0,a.m)(this._config.entities[0]),o=(0,_.T)(i,0===t.length);this.hass.callService(i,o,{entity_id:this._config.entities}),(0,g.j)(this,"light")}render(){if(!this._config||!this.hass)return s.s6;const t={"--tile-color":this._computeColor()},i=this._computeLabel(),o=this._config.title||i,e=this._config.title?i:void 0;return s.qy` <ha-card style=${(0,r.W)(t)};> <ha-tile-container .vertical=${Boolean(this._config.vertical)}> <ha-tile-icon slot="icon" icon="mdi:power" .interactive=${!0} @action=${this._handleTap}></ha-tile-icon> <ha-tile-info slot="info" .primary=${o} .secondary=${e}></ha-tile-info> </ha-tile-container> </ha-card> `}}u.styles=s.AH`:host{--tile-color:var(--state-inactive-color)}ha-card{backdrop-filter:none;box-shadow:none;background:0 0;border:none;height:100%}ha-tile-icon{--tile-icon-color:var(--tile-color)}`,(0,e.Cg)([(0,n.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,e.Cg)([(0,n.wk)()],u.prototype,"_config",void 0),u=(0,e.Cg)([(0,n.EM)("hui-toggle-group-card")],u),o.d(i,{HuiToggleGroupCard:()=>u})}}; 2//# sourceMappingURL=94512.ab576a13789ca2ee.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.