iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
7 lines • 13.1 kB
JavaScript
;(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[76607],{380:function(t,e,n){n.a(t,async function(t,r){try{n.d(e,{D:function(){return l},P:function(){return c}});n(74423);var i=n(74487),a=n(27734),o=n(46927),s=n(96029),u=t([i]);i=(u.then?(await u)():u)[0];const c=t=>t.first_weekday===o.zt.language?"weekInfo"in Intl.Locale.prototype?new Intl.Locale(t.language).weekInfo.firstDay%7:(0,a.S)(t.language)%7:s.Z.includes(t.first_weekday)?s.Z.indexOf(t.first_weekday):1,l=t=>{const e=c(t);return s.Z[e]};r()}catch(c){r(c)}})},95747:function(t,e,n){n.a(t,async function(t,r){try{n.d(e,{CL:function(){return v},GH:function(){return C},Rl:function(){return f},ZS:function(){return y},aQ:function(){return m},r6:function(){return d},yg:function(){return w}});var i=n(74487),a=n(22786),o=n(72487),s=n(30162),u=n(8480),c=n(69543),l=t([i,u,o,s]);[i,u,o,s]=l.then?(await l)():l;const d=(t,e,n)=>h(e,n.time_zone).format(t),h=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,u.wj)(t.time_zone,e)})),f=t=>g().format(t),g=(0,a.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),m=(t,e,n)=>p(e,n.time_zone).format(t),p=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,u.wj)(t.time_zone,e)})),y=(t,e,n)=>b(e,n.time_zone).format(t),b=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,u.wj)(t.time_zone,e)})),v=(t,e,n)=>(new Date).getFullYear()===t.getFullYear()?y(t,e,n):m(t,e,n),w=(t,e,n)=>_(e,n.time_zone).format(t),_=(0,a.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,u.wj)(t.time_zone,e)})),C=(t,e,n)=>`${(0,o.zB)(t,e,n)}, ${(0,s.fU)(t,e,n)}`;r()}catch(d){r(d)}})},98975:function(t,e,n){n.a(t,async function(t,r){try{n.d(e,{K:function(){return c}});var i=n(74487),a=n(22786),o=n(63927),s=t([i,o]);[i,o]=s.then?(await s)():s;const u=(0,a.A)(t=>new Intl.RelativeTimeFormat(t.language,{numeric:"auto"})),c=(t,e,n,r=!0)=>{const i=(0,o.x)(t,n,e);return r?u(e).format(i.value,i.unit):Intl.NumberFormat(e.language,{style:"unit",unit:i.unit,unitDisplay:"long"}).format(Math.abs(i.value))};r()}catch(u){r(u)}})},8480:function(t,e,n){n.a(t,async function(t,r){try{n.d(e,{fL:function(){return f},n2:function(){return g},wj:function(){return m}});var i,a,o,s=n(74487),u=n(29079),c=n(46927),l=t([s]);s=(l.then?(await l)():l)[0];const d=null===(i=Intl.DateTimeFormat)||void 0===i||null===(a=(o=i.call(Intl)).resolvedOptions)||void 0===a?void 0:a.call(o).timeZone,h=d&&("UTC"===d||"Etc/UTC"===d||d in u)?d:void 0,f=14881==n.j?void 0!==h:null,g=null!=h?h:"UTC",m=(t,e)=>t===c.Wj.local&&h?g:e;r()}catch(d){r(d)}})},96029:function(t,e,n){n.d(e,{Tq:function(){return o},Z:function(){return i},ZV:function(){return r},sj:function(){return a}});const r=["sun","mon","tue","wed","thu","fri","sat"],i=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],a={0:"sun",1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat"},o={sun:"sunday",mon:"monday",tue:"tuesday",wed:"wednesday",thu:"thursday",fri:"friday",sat:"saturday"}},93905:function(t,e,n){n.d(e,{I:function(){return a}});n(16280),n(44114),n(18111),n(7588),n(69112),n(33110);class r{addFromStorage(t){if(!this._storage[t]){const e=this.storage.getItem(t);e&&(this._storage[t]=JSON.parse(e))}}subscribeChanges(t,e){return this._listeners[t]?this._listeners[t].push(e):this._listeners[t]=[e],()=>{this.unsubscribeChanges(t,e)}}unsubscribeChanges(t,e){if(!(t in this._listeners))return;const n=this._listeners[t].indexOf(e);-1!==n&&this._listeners[t].splice(n,1)}hasKey(t){return t in this._storage}getValue(t){return this._storage[t]}setValue(t,e){const n=this._storage[t];this._storage[t]=e;try{void 0===e?this.storage.removeItem(t):this.storage.setItem(t,JSON.stringify(e))}catch(r){}finally{this._listeners[t]&&this._listeners[t].forEach(t=>t(n,e))}}constructor(t=window.localStorage){this._storage={},this._listeners={},this.storage=t,this.storage===window.localStorage&&window.addEventListener("storage",t=>{t.key&&this.hasKey(t.key)&&(this._storage[t.key]=t.newValue?JSON.parse(t.newValue):t.newValue,this._listeners[t.key]&&this._listeners[t.key].forEach(e=>e(t.oldValue?JSON.parse(t.oldValue):t.oldValue,this._storage[t.key])))})}}const i={};function a(t){return(e,n)=>{if("object"==typeof n)throw new Error("This decorator does not support this compilation type.");const a=t.storage||"localStorage";let o;a&&a in i?o=i[a]:(o=new r(window[a]),i[a]=o);const s=t.key||String(n);o.addFromStorage(s);const u=!1!==t.subscribe?t=>o.subscribeChanges(s,(e,r)=>{t.requestUpdate(n,e)}):void 0,c=()=>o.hasKey(s)?t.deserializer?t.deserializer(o.getValue(s)):o.getValue(s):void 0,l=(e,r)=>{let i;t.state&&(i=c()),o.setValue(s,t.serializer?t.serializer(r):r),t.state&&e.requestUpdate(n,i)},d=e.performUpdate;if(e.performUpdate=function(){this.__initialized=!0,d.call(this)},t.subscribe){const t=e.connectedCallback,n=e.disconnectedCallback;e.connectedCallback=function(){t.call(this);const e=this;e.__unbsubLocalStorage||(e.__unbsubLocalStorage=null==u?void 0:u(this))},e.disconnectedCallback=function(){var t;n.call(this);const e=this;null===(t=e.__unbsubLocalStorage)||void 0===t||t.call(e),e.__unbsubLocalStorage=void 0}}const h=Object.getOwnPropertyDescriptor(e,n);let f;if(void 0===h)f={get(){return c()},set(t){(this.__initialized||void 0===c())&&l(this,t)},configurable:!0,enumerable:!0};else{const t=h.set;f=Object.assign(Object.assign({},h),{},{get(){return c()},set(e){(this.__initialized||void 0===c())&&l(this,e),null==t||t.call(this,e)}})}Object.defineProperty(e,n,f)}}},68348:function(t,e,n){n.d(e,{u:function(){return r}});n(18111),n(13579);const r=t=>{var e,n;if(t.some(t=>"tagName"in t&&("HA-MENU"===t.tagName||"HA-CODE-EDITOR"===t.tagName)))return!1;const r=t[0];if("TEXTAREA"===r.tagName||"HA-SELECT"===(null===(e=r.parentElement)||void 0===e?void 0:e.tagName)||"HA-DROPDOWN"===(null===(n=r.parentElement)||void 0===n?void 0:n.tagName))return!1;if("INPUT"!==r.tagName)return!0;switch(r.type){case"button":case"checkbox":case"hidden":case"radio":case"range":return!0;default:return!1}}},76830:function(t,e,n){n.d(e,{d:function(){return r}});n(18111),n(20116);const r=(t,e=!0)=>{if(t.defaultPrevented||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey)return;const n=t.composedPath().find(t=>"A"===t.tagName);if(!n||n.target||n.hasAttribute("download")||"external"===n.getAttribute("rel"))return;let r=n.href;if(!r||-1!==r.indexOf("mailto:"))return;const i=window.location,a=i.origin||i.protocol+"//"+i.host;return r.startsWith(a)&&(r=r.slice(a.length),"#"!==r)?(e&&t.preventDefault(),r):void 0}},63927:function(t,e,n){n.a(t,async function(t,r){try{n.d(e,{x:function(){return f}});var i=n(6946),a=n(52640),o=n(38684),s=n(380),u=t([s]);s=(u.then?(await u)():u)[0];const l=1e3,d=60,h=60*d;function f(t,e=Date.now(),n,r={}){const u=Object.assign(Object.assign({},g),r||{}),c=(+t-+e)/l;if(Math.abs(c)<u.second)return{value:Math.round(c),unit:"second"};const f=c/d;if(Math.abs(f)<u.minute)return{value:Math.round(f),unit:"minute"};const m=c/h;if(Math.abs(m)<u.hour)return{value:Math.round(m),unit:"hour"};const p=new Date(t),y=new Date(e);p.setHours(0,0,0,0),y.setHours(0,0,0,0);const b=(0,i.c)(p,y);if(0===b)return{value:Math.round(m),unit:"hour"};if(Math.abs(b)<u.day)return{value:b,unit:"day"};const v=(0,s.P)(n),w=(0,a.k)(p,{weekStartsOn:v}),_=(0,a.k)(y,{weekStartsOn:v}),C=(0,o.I)(w,_);if(0===C)return{value:b,unit:"day"};if(Math.abs(C)<u.week)return{value:C,unit:"week"};const k=p.getFullYear()-y.getFullYear(),L=12*k+p.getMonth()-y.getMonth();return 0===L?{value:C,unit:"week"}:Math.abs(L)<u.month||0===k?{value:L,unit:"month"}:{value:Math.round(k),unit:"year"}}const g={second:59,minute:59,hour:22,day:5,week:4,month:11};r()}catch(c){r(c)}})},64481:function(t,e,n){n.d(e,{D:function(){return i},J:function(){return o}});n(16280),n(3362),n(55815),n(64979),n(79739);let r=!1;try{r="true"===window.localStorage.getItem("disableViewTransition")}catch(s){}const i=t=>{r=t},a=t=>{if(!(t=>(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name)(t))throw t},o=t=>{if(!document.startViewTransition||r)return t(!1),Promise.resolve();let e=!1;try{const n=document.startViewTransition(()=>{e=!0,t(!0)});return n.ready.catch(a),n.finished.catch(a)}catch(n){return console.warn("View transition failed, falling back to direct execution.",n),e?Promise.reject(n):(t(!1),Promise.resolve())}}},54276:function(t,e,n){n(62953);var r=n(40445),i=n(76482),a=n(91382),o=n(96245),s=n(5124),u=n(67576);let c;class l extends a.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new i.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}l.styles=[o.R,(0,s.AH)(c||(c=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
--ha-ripple-hover-color,
var(--ha-ripple-color, var(--secondary-text-color))
);--md-ripple-pressed-color:var(
--ha-ripple-pressed-color,
var(--ha-ripple-color, var(--secondary-text-color))
)}`))],l=(0,r.Cg)([(0,u.EM)("ha-ripple")],l)},29303:function(t,e,n){n.a(t,async function(t,r){try{n.d(e,{A7:function(){return k},AI:function(){return E},Bl:function(){return T},DZ:function(){return _},N4:function(){return O},Tr:function(){return A},f8:function(){return L},oO:function(){return x},t:function(){return w},tH:function(){return D},vm:function(){return C},yx:function(){return I}});n(18111),n(61701);var i=n(5124),a=n(6946),o=n(80880),s=n(98975),u=n(95747),c=n(22675),l=n(34127),d=(n(67094),t([l,s,u]));[l,s,u]=d.then?(await d)():d;let f,g,m,p,y,b=t=>t;const v="M18.66,2C18.4,2 18.16,2.09 17.97,2.28L16.13,4.13L19.88,7.88L21.72,6.03C22.11,5.64 22.11,5 21.72,4.63L19.38,2.28C19.18,2.09 18.91,2 18.66,2M3.28,4L2,5.28L8.5,11.75L4,16.25V20H7.75L12.25,15.5L18.72,22L20,20.72L13.5,14.25L9.75,10.5L3.28,4M15.06,5.19L11.03,9.22L14.78,12.97L18.81,8.94L15.06,5.19Z";function w(){return{title:"",hidden:!0,filterable:!0}}function _(t,e){return{title:t("ui.panel.config.generic.headers.entity_id"),defaultHidden:e,filterable:!0,sortable:!0}}function C(t){return{title:t("ui.panel.config.generic.headers.domain"),hidden:!0,groupable:!0,filterable:!0,sortable:!1}}function k(t){return{title:t("ui.panel.config.generic.headers.area"),groupable:!0,filterable:!0,sortable:!0,minWidth:"120px"}}function L(t){return{title:t("ui.panel.config.generic.headers.floor"),defaultHidden:!0,groupable:!0,filterable:!0,sortable:!0,minWidth:"120px"}}function T(t){return{title:t("ui.panel.config.generic.headers.category"),defaultHidden:!0,groupable:!0,filterable:!0,sortable:!0}}function D(t,e){return{title:t("ui.panel.config.generic.headers.editable"),type:"icon",showNarrow:!0,sortable:!0,minWidth:"88px",maxWidth:"88px",template:t=>(0,i.qy)(f||(f=b` ${0} `),t.editable?i.s6:(0,i.qy)(g||(g=b` <ha-svg-icon .id="icon-edit-${0}" .path="${0}" style="color:var(--secondary-text-color)"></ha-svg-icon> <ha-tooltip .for="icon-edit-${0}" placement="left"> ${0} </ha-tooltip> `),(0,o.Y)(t.entity_id),v,(0,o.Y)(t.entity_id),e))}}function E(){return{title:"",hidden:!0,filterable:!0,template:t=>t.label_entries.map(t=>t.name).join(" ")}}function O(t,e){return{title:t("ui.card.automation.last_triggered"),sortable:!0,template:n=>I(n.last_triggered,"last-triggered",n.entity_id,t,e)}}const I=(t,e,n,r,l)=>{if(!t||t===c.Hh||t===c.HV)return r("ui.components.relative_time.never");const d=new Date(t),h=new Date,f=(0,a.c)(h,d),g=(0,u.CL)(d,l.locale,l.config),y=e+"-"+(0,o.Y)(n);return(0,i.qy)(m||(m=b` ${0} `),f>3?g:(0,i.qy)(p||(p=b` <ha-tooltip for="${0}">${0}</ha-tooltip> <span id="${0}">${0}</span> `),y,g,y,(0,s.K)(d,l.locale)))};function x(t,e){return{title:t("ui.panel.config.generic.headers.created_at"),defaultHidden:!0,sortable:!0,minWidth:"128px",template:t=>M(t.created_at,e)}}function A(t,e){return{title:t("ui.panel.config.generic.headers.modified_at"),defaultHidden:!0,sortable:!0,minWidth:"128px",template:t=>M(t.modified_at,e)}}const M=(t,e)=>(0,i.qy)(y||(y=b`${0}`),t?(0,u.CL)(new Date(1e3*t),e.locale,e.config):i.s6);r()}catch(h){r(h)}})}}]);