2 lines
9.5 KiB
JavaScript
2 lines
9.5 KiB
JavaScript
"use strict";(self.webpackChunkhacs_frontend=self.webpackChunkhacs_frontend||[]).push([["1285"],{65417:function(t,e,n){n.a(t,(async function(t,i){try{n.d(e,{WB:function(){return y},p6:function(){return l}});n(63434),n(96829),n(39527),n(67670);var a=n(16485),o=n(27486),r=n(50177),m=n(70691),u=t([a,m]);[a,m]=u.then?(await u)():u;(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,m.f)(t.time_zone,e)})));const l=(t,e,n)=>c(e,n.time_zone).format(t),c=(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,m.f)(t.time_zone,e)}))),y=((0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,m.f)(t.time_zone,e)}))),(t,e,n)=>{var i,a,o,m;const u=g(e,n.time_zone);if(e.date_format===r.t6.language||e.date_format===r.t6.system)return u.format(t);const l=u.formatToParts(t),c=null===(i=l.find((t=>"literal"===t.type)))||void 0===i?void 0:i.value,y=null===(a=l.find((t=>"day"===t.type)))||void 0===a?void 0:a.value,d=null===(o=l.find((t=>"month"===t.type)))||void 0===o?void 0:o.value,s=null===(m=l.find((t=>"year"===t.type)))||void 0===m?void 0:m.value,f=l.at(l.length-1);let h="literal"===(null==f?void 0:f.type)?null==f?void 0:f.value:"";"bg"===e.language&&e.date_format===r.t6.YMD&&(h="");return{[r.t6.DMY]:`${y}${c}${d}${c}${s}${h}`,[r.t6.MDY]:`${d}${c}${y}${c}${s}${h}`,[r.t6.YMD]:`${s}${c}${d}${c}${y}${h}`}[e.date_format]}),g=(0,o.Z)(((t,e)=>{const n=t.date_format===r.t6.system?void 0:t.language;return t.date_format===r.t6.language||(t.date_format,r.t6.system),new Intl.DateTimeFormat(n,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,m.f)(t.time_zone,e)})}));(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:(0,m.f)(t.time_zone,e)}))),(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,m.f)(t.time_zone,e)}))),(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,m.f)(t.time_zone,e)}))),(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,m.f)(t.time_zone,e)}))),(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,m.f)(t.time_zone,e)}))),(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,m.f)(t.time_zone,e)})));i()}catch(l){i(l)}}))},69027:function(t,e,n){n.a(t,(async function(t,i){try{n.d(e,{o0:function(){return y}});var a=n(16485),o=n(27486),r=n(65417),m=n(823),u=n(70691),l=n(51873),c=t([a,r,m,u]);[a,r,m,u]=c.then?(await c)():c;const y=(t,e,n)=>g(e,n.time_zone).format(t),g=(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,l.y)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,l.y)(t)?"h12":"h23",timeZone:(0,u.f)(t.time_zone,e)})));(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",hour:(0,l.y)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,l.y)(t)?"h12":"h23",timeZone:(0,u.f)(t.time_zone,e)}))),(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",day:"numeric",hour:(0,l.y)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,l.y)(t)?"h12":"h23",timeZone:(0,u.f)(t.time_zone,e)}))),(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,l.y)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,l.y)(t)?"h12":"h23",timeZone:(0,u.f)(t.time_zone,e)})));i()}catch(y){i(y)}}))},21735:function(t,e,n){n.a(t,(async function(t,i){try{n.d(e,{$k:function(){return u},h6:function(){return c}});n(52247),n(95078);var a=n(16485),o=n(27486),r=t([a]);a=(r.then?(await r)():r)[0];const m=t=>t<10?`0${t}`:t,u=(t,e)=>{const n=e.days||0,i=e.hours||0,a=e.minutes||0,o=e.seconds||0,r=e.milliseconds||0;return n>0?`${Intl.NumberFormat(t.language,{style:"unit",unit:"day",unitDisplay:"long"}).format(n)} ${i}:${m(a)}:${m(o)}`:i>0?`${i}:${m(a)}:${m(o)}`:a>0?`${a}:${m(o)}`:o>0?Intl.NumberFormat(t.language,{style:"unit",unit:"second",unitDisplay:"long"}).format(o):r>0?Intl.NumberFormat(t.language,{style:"unit",unit:"millisecond",unitDisplay:"long"}).format(r):null},l=(0,o.Z)((t=>new Intl.DurationFormat(t.language,{style:"long"}))),c=(t,e)=>l(t).format(e);(0,o.Z)((t=>new Intl.DurationFormat(t.language,{style:"digital",hoursDisplay:"auto"}))),(0,o.Z)((t=>new Intl.DurationFormat(t.language,{style:"narrow",daysDisplay:"always"}))),(0,o.Z)((t=>new Intl.DurationFormat(t.language,{style:"narrow",hoursDisplay:"always"}))),(0,o.Z)((t=>new Intl.DurationFormat(t.language,{style:"narrow",minutesDisplay:"always"})));i()}catch(m){i(m)}}))},823:function(t,e,n){n.a(t,(async function(t,i){try{n.d(e,{Vu:function(){return y},Zs:function(){return f},mr:function(){return l},xO:function(){return d}});var a=n(16485),o=n(27486),r=n(70691),m=n(51873),u=t([a,r]);[a,r]=u.then?(await u)():u;const l=(t,e,n)=>c(e,n.time_zone).format(t),c=(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,m.y)(t)?"h12":"h23",timeZone:(0,r.f)(t.time_zone,e)}))),y=(t,e,n)=>g(e,n.time_zone).format(t),g=(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{hour:(0,m.y)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,m.y)(t)?"h12":"h23",timeZone:(0,r.f)(t.time_zone,e)}))),d=(t,e,n)=>s(e,n.time_zone).format(t),s=(0,o.Z)(((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",hour:(0,m.y)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,m.y)(t)?"h12":"h23",timeZone:(0,r.f)(t.time_zone,e)}))),f=(t,e,n)=>h(e,n.time_zone).format(t),h=(0,o.Z)(((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,r.f)(t.time_zone,e)})));i()}catch(l){i(l)}}))},70691:function(t,e,n){n.a(t,(async function(t,i){try{n.d(e,{f:function(){return g}});var a,o,r,m=n(16485),u=n(50177),l=t([m]);m=(l.then?(await l)():l)[0];const c=null===(a=Intl.DateTimeFormat)||void 0===a||null===(o=(r=a.call(Intl)).resolvedOptions)||void 0===o?void 0:o.call(r).timeZone,y=null!=c?c:"UTC",g=(t,e)=>t===u.c_.local&&c?y:e;i()}catch(c){i(c)}}))},51873:function(t,e,n){n.d(e,{y:function(){return o}});n(19083),n(61006);var i=n(27486),a=n(50177);const o=(0,i.Z)((t=>{if(t.time_format===a.zt.language||t.time_format===a.zt.system){const e=t.time_format===a.zt.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===a.zt.am_pm}))},4133:function(t,e,n){n.a(t,(async function(t,i){try{n.d(e,{S:function(){return y}});n(77439),n(19134),n(97003),n(39527),n(13334),n(36993);var a=n(75884),o=(n(35445),n(65417)),r=n(69027),m=n(52745),u=n(81928),l=(n(79924),n(43461),n(79575)),c=t([a,o,r,m]);[a,o,r,m]=c.then?(await c)():c;const y=(t,e,n,i)=>{const a=e.entity_id,o=e.attributes.device_class,r=(0,l.M)(a),m=n[a],c=null==m?void 0:m.translation_key;return c&&t(`component.${m.platform}.entity.${r}.${c}.state_attributes.${i}.name`)||o&&t(`component.${r}.entity_component.${o}.state_attributes.${i}.name`)||t(`component.${r}.entity_component._.state_attributes.${i}.name`)||(0,u.f)(i.replace(/_/g," ").replace(/\bid\b/g,"ID").replace(/\bip\b/g,"IP").replace(/\bmac\b/g,"MAC").replace(/\bgps\b/g,"GPS"))};i()}catch(y){i(y)}}))},81928:function(t,e,n){n.d(e,{f:function(){return i}});const i=t=>t.charAt(0).toUpperCase()+t.slice(1)},79924:function(t,e,n){n(69235),n(12385),n(19134),n(5740),n(11740);const i="^\\d{4}-(0[1-9]|1[0-2])-([12]\\d|0[1-9]|3[01])";new RegExp(i+"$"),new RegExp(i)},43461:function(t,e,n){n(19134),n(5740)},75884:function(t,e,n){n.a(t,(async function(t,i){try{n.d(e,{F_:function(){return r}});n(71695),n(11740),n(92519),n(42179),n(89256),n(24931),n(88463),n(57449),n(19814),n(47021);var a=n(21735),o=t([a]);a=(o.then?(await o)():o)[0];new Set(["temperature","current_temperature","target_temperature","target_temp_temp","target_temp_high","target_temp_low","target_temp_step","min_temp","max_temp"]);const r={climate:{humidity:"%",current_humidity:"%",target_humidity_low:"%",target_humidity_high:"%",target_humidity_step:"%",min_humidity:"%",max_humidity:"%"},cover:{current_position:"%",current_tilt_position:"%"},fan:{percentage:"%"},humidifier:{humidity:"%",current_humidity:"%",min_humidity:"%",max_humidity:"%"},light:{color_temp:"mired",max_mireds:"mired",min_mireds:"mired",color_temp_kelvin:"K",min_color_temp_kelvin:"K",max_color_temp_kelvin:"K",brightness:"%"},sun:{azimuth:"°",elevation:"°"},vacuum:{battery_level:"%"},valve:{current_position:"%"},sensor:{battery_level:"%"},media_player:{volume_level:"%"}};i()}catch(r){i(r)}}))},35445:function(t,e,n){n(71695),n(92745),n(23669),n(11740),n(92519),n(42179),n(89256),n(24931),n(88463),n(57449),n(19814),n(47021);var i=n(57243);n(46799),n(10508);let a,o=t=>t;new Set(["clear-night","cloudy","fog","lightning","lightning-rainy","partlycloudy","pouring","rainy","hail","snowy","snowy-rainy","sunny","windy","windy-variant"]),new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),new Set(["hail","rainy","pouring"]),new Set(["windy","windy-variant"]),new Set(["snowy","snowy-rainy"]),new Set(["lightning","lightning-rainy"]),(0,i.iv)(a||(a=o`.rain{fill:var(--weather-icon-rain-color,#30b3ff)}.sun{fill:var(--weather-icon-sun-color,#fdd93c)}.moon{fill:var(--weather-icon-moon-color,#fcf497)}.cloud-back{fill:var(--weather-icon-cloud-back-color,#d4d4d4)}.cloud-front{fill:var(--weather-icon-cloud-front-color,#f9f9f9)}.snow{fill:var(--weather-icon-snow-color,#f9f9f9);stroke:var(--weather-icon-snow-stroke-color,#d4d4d4);stroke-width:1;paint-order:stroke}`))}}]);
|
|
//# sourceMappingURL=1285.d65cffca784bb9af.js.map
|