iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 12.7 kB
JavaScript
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["95424"],{49976:function(e,t,i){i.d(t,{U:()=>n});const n=e=>e.stopPropagation()},76320:function(e,t,i){i.d(t,{T:()=>n,y:()=>a});i(40251);const n=e=>{requestAnimationFrame((()=>setTimeout(e,0)))},a=()=>new Promise((e=>{n(e)}))},49542:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{o:()=>f});var a=i(61701),l=i(16485),d=(i(71695),i(61893),i(9359),i(70104),i(47021),i(57243)),o=i(50778),r=i(27486),s=i(36522),c=i(49976),u=i(1416),h=(i(7285),i(92824),e([l]));l=(h.then?(await h)():h)[0];let p,v,m,y=e=>e;const f=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"];(0,a.Z)([(0,o.Mo)("ha-country-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"language",value(){return"en"}},{kind:"field",decorators:[(0,o.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Array})],key:"countries",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({attribute:"no-sort",type:Boolean})],key:"noSort",value(){return!1}},{kind:"field",key:"_getOptions",value(){return(0,r.Z)(((e,t)=>{let i=[];const n=new Intl.DisplayNames(e,{type:"region",fallback:"code"});return i=t?t.map((e=>({value:e,label:n?n.of(e):e}))):f.map((e=>({value:e,label:n?n.of(e):e}))),this.noSort||i.sort(((t,i)=>(0,u.fe)(t.label,i.label,e))),i}))}},{kind:"method",key:"render",value:function(){const e=this._getOptions(this.language,this.countries);return(0,d.dy)(p||(p=y` <ha-select .label="${0}" .value="${0}" .required="${0}" .helper="${0}" .disabled="${0}" ="${0}" ="${0}" fixedMenuPosition naturalMenuWidth> ${0} </ha-select> `),this.label,this.value,this.required,this.helper,this.disabled,this._changed,c.U,e.map((e=>(0,d.dy)(v||(v=y` <ha-list-item .value="${0}">${0}</ha-list-item> `),e.value,e.label))))}},{kind:"field",static:!0,key:"styles",value(){return(0,d.iv)(m||(m=y`ha-select{width:100%}`))}},{kind:"method",key:"_changed",value:function(e){const t=e.target;""!==t.value&&t.value!==this.value&&(this.value=t.value,(0,s.B)(this,"value-changed",{value:this.value}))}}]}}),d.oi);n()}catch(p){n(p)}}))},7285:function(e,t,i){i.d(t,{M:()=>p});var n=i(61701),a=i(72621),l=(i(71695),i(47021),i(65703)),d=i(46289),o=i(57243),r=i(50778);let s,c,u,h=e=>e,p=(0,n.Z)([(0,r.Mo)("ha-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"renderRipple",value:function(){return this.noninteractive?"":(0,a.Z)(i,"renderRipple",this,3)([])}},{kind:"get",static:!0,key:"styles",value:function(){return[d.W,(0,o.iv)(s||(s=h`:host{padding-left:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-inline-start:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-right:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px));padding-inline-end:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px))}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:48px}span.material-icons:first-of-type{margin-inline-start:0px!important;margin-inline-end:var(--mdc-list-item-graphic-margin,16px)!important;direction:var(--direction)!important}span.material-icons:last-of-type{margin-inline-start:auto!important;margin-inline-end:0px!important;direction:var(--direction)!important}.mdc-deprecated-list-item__meta{display:var(--mdc-list-item-meta-display);align-items:center;flex-shrink:0}:host([graphic=icon]:not([twoline])) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,20px)!important}:host([multiline-secondary]){height:auto}:host([multiline-secondary]) .mdc-deprecated-list-item__text{padding:8px 0}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text{text-overflow:initial;white-space:normal;overflow:auto;display:inline-block;margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text{margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text::before{display:none}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text::before{display:none}:host([disabled]){color:var(--disabled-text-color)}:host([noninteractive]){pointer-events:unset}`)),"rtl"===document.dir?(0,o.iv)(c||(c=h`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`)):(0,o.iv)(u||(u=h``))]}}]}}),l.K)},92824:function(e,t,i){var n=i(61701),a=i(72621),l=(i(71695),i(40251),i(47021),i(60930)),d=i(9714),o=i(57243),r=i(50778),s=i(22381),c=i(76320);i(23334);let u,h,p,v,m=e=>e;(0,n.Z)([(0,r.Mo)("ha-select")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"clearable",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:"inline-arrow",type:Boolean})],key:"inlineArrow",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)()],key:"options",value:void 0},{kind:"method",key:"render",value:function(){return(0,o.dy)(u||(u=m` ${0} ${0} `),(0,a.Z)(i,"render",this,3)([]),this.clearable&&!this.required&&!this.disabled&&this.value?(0,o.dy)(h||(h=m`<ha-icon-button label="clear" ="${0}" .path="${0}"></ha-icon-button>`),this._clearValue,"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"):o.Ld)}},{kind:"method",key:"renderLeadingIcon",value:function(){return this.icon?(0,o.dy)(p||(p=m`<span class="mdc-select__icon"><slot name="icon"></slot></span>`)):o.Ld}},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)(i,"connectedCallback",this,3)([]),window.addEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"firstUpdated",value:async function(){var e;((0,a.Z)(i,"firstUpdated",this,3)([]),this.inlineArrow)&&(null===(e=this.shadowRoot)||void 0===e||null===(e=e.querySelector(".mdc-select__selected-text-container"))||void 0===e||e.classList.add("inline-arrow"))}},{kind:"method",key:"updated",value:function(e){if((0,a.Z)(i,"updated",this,3)([e]),e.has("inlineArrow")){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".mdc-select__selected-text-container");this.inlineArrow?null==e||e.classList.add("inline-arrow"):null==e||e.classList.remove("inline-arrow")}e.get("options")&&(this.layoutOptions(),this.selectByValue(this.value))}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(i,"disconnectedCallback",this,3)([]),window.removeEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"_clearValue",value:function(){!this.disabled&&this.value&&(this.valueSetDirectly=!0,this.select(-1),this.mdcFoundation.handleChange())}},{kind:"field",key:"_translationsUpdated",value(){return(0,s.D)((async()=>{await(0,c.y)(),this.layoutOptions()}),500)}},{kind:"field",static:!0,key:"styles",value(){return[d.W,(0,o.iv)(v||(v=m`:host([clearable]){position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:var(--secondary-text-color)}.mdc-select__anchor{width:var(--ha-select-min-width,200px)}.mdc-select--filled .mdc-select__anchor{height:var(--ha-select-height,56px)}.mdc-select--filled .mdc-floating-label{inset-inline-start:12px;inset-inline-end:initial;direction:var(--direction)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{inset-inline-start:48px;inset-inline-end:initial;direction:var(--direction)}.mdc-select .mdc-select__anchor{padding-inline-start:12px;padding-inline-end:0px;direction:var(--direction)}.mdc-select__anchor .mdc-floating-label--float-above{transform-origin:var(--float-start)}.mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,0px)}:host([clearable]) .mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,12px)}ha-icon-button{position:absolute;top:10px;right:28px;--mdc-icon-button-size:36px;--mdc-icon-size:20px;color:var(--secondary-text-color);inset-inline-start:initial;inset-inline-end:28px;direction:var(--direction)}.inline-arrow{flex-grow:0}`))]}}]}}),l.K)},8331:function(e,t,i){i.a(e,(async function(e,n){try{i.r(t),i.d(t,{HaCountrySelector:()=>h});var a=i(61701),l=(i(71695),i(47021),i(57243)),d=i(50778),o=i(49542),r=e([o]);o=(r.then?(await r)():r)[0];let s,c,u=e=>e,h=(0,a.Z)([(0,d.Mo)("ha-selector-country")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"required",value(){return!0}},{kind:"method",key:"render",value:function(){var e,t;return(0,l.dy)(s||(s=u` <ha-country-picker .hass="${0}" .value="${0}" .label="${0}" .helper="${0}" .countries="${0}" .noSort="${0}" .disabled="${0}" .required="${0}"></ha-country-picker> `),this.hass,this.value,this.label,this.helper,null===(e=this.selector.country)||void 0===e?void 0:e.countries,null===(t=this.selector.country)||void 0===t?void 0:t.no_sort,this.disabled,this.required)}},{kind:"field",static:!0,key:"styles",value(){return(0,l.iv)(c||(c=u`ha-country-picker{width:100%}`))}}]}}),l.oi);n()}catch(s){n(s)}}))},16485:function(e,t,i){i.a(e,(async function(e,t){try{i(71695),i(92745),i(40251),i(47021);var n=i(61449),a=i(40574),l=i(30532),d=i(41674),o=i(49722),r=i(76632),s=i(7884),c=i(35185),u=i(65401),h=i(44180),p=i(49447);const e=async()=>{const e=(0,h.sS)(),t=[];(0,l.shouldPolyfill)()&&await Promise.all([i.e("80210"),i.e("74055")]).then(i.bind(i,98133)),(0,o.shouldPolyfill)()&&await Promise.all([i.e("2142"),i.e("75297"),i.e("80210"),i.e("60251")]).then(i.bind(i,59095)),(0,n.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("68250")]).then(i.bind(i,80561)).then((()=>(0,p.H)()))),(0,u.shouldPolyfill)()&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("65578")]).then(i.bind(i,97995))),(0,a.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("59826")]).then(i.bind(i,31514))),(0,d.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("23649")]).then(i.bind(i,93840))),(0,r.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("42831")]).then(i.bind(i,29559))),(0,s.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("57377")]).then(i.bind(i,39030)).then((()=>i.e("61236").then(i.t.bind(i,4121,23))))),(0,c.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("13870")]).then(i.bind(i,74546))),0!==t.length&&await Promise.all(t).then((()=>(0,p.n)(e)))};await e(),t()}catch(v){t(v)}}),1)}}]);
//# sourceMappingURL=95424.3a0a09b8329e676b.js.map