"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[18188],{92365:function(t,e,n){n.a(t,async function(t,r){try{var i=n(97058),a=n(39980),o=(n(25276),n(23792),n(62062),n(18111),n(61701),n(33110),n(36033),n(45367),n(92731),n(2892),n(26099),n(47764),n(62953),n(80638)),u=t([a]);a=(u.then?(await u)():u)[0];var s=function(t){return c(t.attributes)},c=function(t){return!!t.unit_of_measurement||!!t.state_class},m=new Map,f=function(t,e){var n=JSON.stringify([t,e]),r=m.get(n);return r||(r=new Intl.NumberFormat(t,e),m.set(n,r)),r},d=function(t,e,n){return l(t,e,n).map(function(t){return t.value}).join("")},l=function(t,e,n){var r=e?function(t){switch(t.number_format){case o.jG.comma_decimal:return["en-US","en"];case o.jG.decimal_comma:return["de","es","it"];case o.jG.space_comma:return["fr","sv","cs"];case o.jG.quote_decimal:return["de-CH"];case o.jG.system:return;default:return t.language}}(e):void 0;return(null==e?void 0:e.number_format)===o.jG.none||Number.isNaN(Number(t))?Number.isNaN(Number(t))||""===t||(null==e?void 0:e.number_format)!==o.jG.none?[{type:"literal",value:t}]:f("en-US",v(t,(0,i.A)((0,i.A)({},n),{},{useGrouping:!1}))).formatToParts(Number(t)):f(r,v(t,n)).formatToParts(Number(t))},h=function(t,e){var n,r=null==e?void 0:e.display_precision;return null!=r?{maximumFractionDigits:r,minimumFractionDigits:r}:Number.isInteger(Number(null==t||null===(n=t.attributes)||void 0===n?void 0:n.step))&&Number.isInteger(Number(null==t?void 0:t.state))?{maximumFractionDigits:0}:void 0},v=function(t,e){var n=(0,i.A)({maximumFractionDigits:2},e);if("string"!=typeof t)return n;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){var r=t.indexOf(".")>-1?t.split(".")[1].length:0;n.minimumFractionDigits=r,n.maximumFractionDigits=r}return n};n.d(e,{QL:function(){return l},ZQ:function(){return h},ZV:function(){return d},ty:function(){return c},x:function(){return s}}),r()}catch(g){r(g)}})},28943:function(t,e,n){n.a(t,async function(t,r){try{var i=n(95497),a=(n(28706),n(50113),n(62062),n(18111),n(61701),n(26099),n(92365)),o=t([a]);a=(o.then?(await o)():o)[0];var u=function(t){return t.callWS({type:"radio_frequency/list"})},s=[[1e9,"GHz"],[1e6,"MHz"],[1e3,"kHz"],[1,"Hz"]],c=function(t,e){var n,r=null!==(n=s.find(function(e){var n=(0,i.A)(e,1)[0];return Math.abs(t)>=n}))&&void 0!==n?n:[1,"Hz"],o=(0,i.A)(r,2),u=o[0],c=o[1];return"".concat((0,a.ZV)(t/u,e,{maximumFractionDigits:3})," ").concat(c)},m=function(t,e){return t.map(function(t){return function(t,e){var n=(0,i.A)(t,2),r=n[0],a=n[1];return r===a?c(r,e):"".concat(c(r,e)," – ").concat(c(a,e))}(t,e)}).join(", ")};n.d(e,{V2:function(){return"radio_frequency"},aq:function(){return u},go:function(){return m}}),r()}catch(f){r(f)}})},64615:function(t,e,n){n.a(t,async function(t,r){try{n.r(e);var i=n(36854),a=n(98117),o=n(57567),u=n(25979),s=n(12463),c=n(16472),m=n(92297),f=(n(28706),n(26099),n(3362),n(15697)),d=n(51209),l=n(28943),h=n(13288),v=n(99061),g=t([l]);l=(g.then?(await g)():g)[0];var p=function(t){function e(){var t;(0,o.A)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(t=(0,c.A)(this,e,[].concat(i))).isWide=!1,t.narrow=!1,t._transmitters=[],t._fetched=!1,t.routerOptions={defaultPage:"dashboard",showLoading:!0,routes:{dashboard:{tag:"radio-frequency-config-dashboard",load:function(){return Promise.all([n.e(51843),n.e(57927),n.e(5933),n.e(28403),n.e(18128),n.e(61710),n.e(89707)]).then(n.bind(n,82885))}},devices:{tag:"radio-frequency-devices-page",load:function(){return Promise.all([n.e(67202),n.e(51843),n.e(5933),n.e(98870),n.e(13049),n.e(82590),n.e(73142),n.e(54600),n.e(99467),n.e(70547),n.e(3786),n.e(57425),n.e(79337),n.e(886)]).then(n.bind(n,39204))}}}},t}return(0,s.A)(e,t),(0,u.A)(e,[{key:"willUpdate",value:function(t){(0,m.A)(e,"willUpdate",this,3)([t]),!this._fetched&&this.hass&&(this._fetched=!0,this._fetchTransmitters())}},{key:"_fetchTransmitters",value:(r=(0,a.A)((0,i.A)().m(function t(){var e,n;return(0,i.A)().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,(0,l.aq)(this.hass);case 1:e=t.v,this._transmitters=e.transmitters,t.n=3;break;case 2:t.p=2,n=t.v,(0,h.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.radio_frequency.loading_error"),text:n.message});case 3:return t.a(2)}},t,this,[[0,2]])})),function(){return r.apply(this,arguments)})},{key:"updatePageEl",value:function(t){t.route=this.routeTail,t.hass=this.hass,t.isWide=this.isWide,t.narrow=this.narrow,t.transmitters=this._transmitters}}]);var r}(v.a);(0,f.Cg)([(0,d.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,f.Cg)([(0,d.MZ)({attribute:"is-wide",type:Boolean})],p.prototype,"isWide",void 0),(0,f.Cg)([(0,d.MZ)({type:Boolean})],p.prototype,"narrow",void 0),(0,f.Cg)([(0,d.wk)()],p.prototype,"_transmitters",void 0),p=(0,f.Cg)([(0,d.EM)("radio-frequency-config-dashboard-router")],p),r()}catch(y){r(y)}})}}]);
//# sourceMappingURL=18188.9e09ca8df650275e.js.map