UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

18 lines 15.4 kB
/*! For license information please see 17895.bb7dd81f7feb25cd.js.LICENSE.txt */ "use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["17895"],{57618:function(t,e,i){var r=i(9065),a=i(50778),s=(i(63721),i(71695),i(47021),i(57243)),o=i(19799);const n=["focusin","focusout","pointerdown"];class l extends s.oi{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new o.J(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(t){var e,i;if(!t[d]){switch(t.type){default:return;case"focusin":this.visible=null!==(e=null===(i=this.control)||void 0===i?void 0:i.matches(":focus-visible"))&&void 0!==e&&e;break;case"focusout":case"pointerdown":this.visible=!1}t[d]=!0}}onControlChange(t,e){if(!s.sk)for(const i of n)null==t||t.removeEventListener(i,this),null==e||e.addEventListener(i,this)}update(t){t.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(t)}}(0,r.__decorate)([(0,a.Cb)({type:Boolean,reflect:!0})],l.prototype,"visible",void 0),(0,r.__decorate)([(0,a.Cb)({type:Boolean,reflect:!0})],l.prototype,"inward",void 0);const d=Symbol("handledByFocusRing");let c;const u=(0,s.iv)(c||(c=(t=>t)`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2,0,0,1);box-sizing:border-box;color:var(--md-focus-ring-color,var(--md-sys-color-secondary,#625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));inset:calc(-1*var(--md-focus-ring-outward-offset,2px));outline:var(--md-focus-ring-width,3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border:var(--md-focus-ring-width,3px) solid currentColor;inset:var(--md-focus-ring-inward-offset,0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width,8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width,8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width,8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width,8px)}}@media(prefers-reduced-motion){:host{animation:none}}`));let m=class extends l{};m.styles=[u],m=(0,r.__decorate)([(0,a.Mo)("md-focus-ring")],m)},13823:function(t,e,i){i.d(e,{T:()=>d});i(63721),i(71695),i(19134),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(97003),i(47021);var r=i(57243);i(19083),i(61006);const a=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],s=a.map(n);function o(t){return s.includes(t)}function n(t){return t.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const l=Symbol("privateIgnoreAttributeChangesFor");function d(t){var e;if(r.sk)return t;class i extends t{constructor(){super(...arguments),this[e]=new Set}attributeChangedCallback(t,e,i){if(!o(t))return void super.attributeChangedCallback(t,e,i);if(this[l].has(t))return;this[l].add(t),this.removeAttribute(t),this[l].delete(t);const r=u(t);null===i?delete this.dataset[r]:this.dataset[r]=i,this.requestUpdate(u(t),e)}getAttribute(t){return o(t)?super.getAttribute(c(t)):super.getAttribute(t)}removeAttribute(t){super.removeAttribute(t),o(t)&&(super.removeAttribute(c(t)),this.requestUpdate())}}return e=l,function(t){for(const e of a){const i=n(e),r=c(i),a=u(i);t.createProperty(e,{attribute:i,noAccessor:!0}),t.createProperty(Symbol(r),{attribute:r,noAccessor:!0}),Object.defineProperty(t.prototype,e,{configurable:!0,enumerable:!0,get(){var t;return null!==(t=this.dataset[a])&&void 0!==t?t:null},set(t){var i;const r=null!==(i=this.dataset[a])&&void 0!==i?i:null;t!==r&&(null===t?delete this.dataset[a]:this.dataset[a]=t,this.requestUpdate(e,r))}})}}(i),i}function c(t){return`data-${t}`}function u(t){return t.replace(/-\w/,(t=>t[1].toUpperCase()))}},78755:function(t,e,i){i.d(e,{g:()=>k});var r=i(9065),a=i(50778),s=(i(71695),i(19423),i(47021),i(57618),i(26499),i(23111),i(57243)),o=i(35359),n=i(79840),l=i(13823),d=i(64840);let c,u,m,p,h,v,f,g,b=t=>t;const y=(0,l.T)(s.oi);class x extends y{constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}get isDisabled(){return this.disabled&&"link"!==this.type}willUpdate(t){this.href&&(this.type="link"),super.willUpdate(t)}render(){return this.renderListItem((0,s.dy)(c||(c=b` <md-item> <div slot="container"> ${0} ${0} </div> <slot name="start" slot="start"></slot> <slot name="end" slot="end"></slot> ${0} </md-item> `),this.renderRipple(),this.renderFocusRing(),this.renderBody()))}renderListItem(t){const e="link"===this.type;let i;switch(this.type){case"link":i=(0,n.i0)(u||(u=b`a`));break;case"button":i=(0,n.i0)(m||(m=b`button`));break;default:i=(0,n.i0)(p||(p=b`li`))}const r="text"!==this.type,a=e&&this.target?this.target:s.Ld;return(0,n.dy)(h||(h=b` <${0} id="item" tabindex="${0}" ?disabled=${0} role="listitem" aria-selected=${0} aria-checked=${0} aria-expanded=${0} aria-haspopup=${0} class="list-item ${0}" href=${0} target=${0} @focus=${0} >${0}</${0}> `),i,this.isDisabled||!r?-1:0,this.isDisabled,this.ariaSelected||s.Ld,this.ariaChecked||s.Ld,this.ariaExpanded||s.Ld,this.ariaHasPopup||s.Ld,(0,o.$)(this.getRenderClasses()),this.href||s.Ld,a,this.onFocus,t,i)}renderRipple(){return"text"===this.type?s.Ld:(0,s.dy)(v||(v=b` <md-ripple part="ripple" for="item" ?disabled="${0}"></md-ripple>`),this.isDisabled)}renderFocusRing(){return"text"===this.type?s.Ld:(0,s.dy)(f||(f=b` <md-focus-ring @visibility-changed="${0}" part="focus-ring" for="item" inward></md-focus-ring>`),this.onFocusRingVisibilityChanged)}onFocusRingVisibilityChanged(t){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return(0,s.dy)(g||(g=b` <slot></slot> <slot name="overline" slot="overline"></slot> <slot name="headline" slot="headline"></slot> <slot name="supporting-text" slot="supporting-text"></slot> <slot name="trailing-supporting-text" slot="trailing-supporting-text"></slot> `))}onFocus(){-1===this.tabIndex&&this.dispatchEvent((0,d.oh)())}focus(){var t;null===(t=this.listItemRoot)||void 0===t||t.focus()}}x.shadowRootOptions=Object.assign(Object.assign({},s.oi.shadowRootOptions),{},{delegatesFocus:!0}),(0,r.__decorate)([(0,a.Cb)({type:Boolean,reflect:!0})],x.prototype,"disabled",void 0),(0,r.__decorate)([(0,a.Cb)({reflect:!0})],x.prototype,"type",void 0),(0,r.__decorate)([(0,a.Cb)({type:Boolean,attribute:"md-list-item",reflect:!0})],x.prototype,"isListItem",void 0),(0,r.__decorate)([(0,a.Cb)()],x.prototype,"href",void 0),(0,r.__decorate)([(0,a.Cb)()],x.prototype,"target",void 0),(0,r.__decorate)([(0,a.IO)(".list-item")],x.prototype,"listItemRoot",void 0);let w;const C=(0,s.iv)(w||(w=(t=>t)`:host{display:flex;-webkit-tap-highlight-color:transparent;--md-ripple-hover-color:var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity:var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color:var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity:var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape:8px}a,button,li{background:0 0;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:0;-webkit-tap-highlight-color:transparent;width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, .3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color,var(--md-sys-color-on-surface,#1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight,var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400)));min-height:var(--md-list-item-one-line-container-height,56px);padding-top:var(--md-list-item-top-space,12px);padding-bottom:var(--md-list-item-bottom-space,12px);padding-inline-start:var(--md-list-item-leading-space,16px);padding-inline-end:var(--md-list-item-trailing-space,16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height,72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, .875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight,var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, .6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight,var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}@media(forced-colors:active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}`));let k=class extends x{};k.styles=[C],k=(0,r.__decorate)([(0,a.Mo)("md-list-item")],k)},623:function(t,e,i){i.d(e,{j:()=>p});var r=i(9065),a=i(50778),s=(i(67351),i(71695),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(47021),i(57243)),o=i(7750);let n,l=t=>t;const d=new Set(Object.values(o.E));class c extends s.oi{get items(){return this.listController.items}constructor(){super(),this.listController=new o.g({isItem:t=>t.hasAttribute("md-list-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>"rtl"===getComputedStyle(this).direction,deactivateItem:t=>{t.tabIndex=-1},activateItem:t=>{t.tabIndex=0},isNavigableKey:t=>d.has(t),isActivatable:t=>!t.disabled&&"text"!==t.type}),this.internals=this.attachInternals(),s.sk||(this.internals.role="list",this.addEventListener("keydown",this.listController.handleKeydown))}render(){return(0,s.dy)(n||(n=l` <slot @deactivate-items="${0}" @request-activation="${0}" @slotchange="${0}"> </slot> `),this.listController.onDeactivateItems,this.listController.onRequestActivation,this.listController.onSlotchange)}activateNextItem(){return this.listController.activateNextItem()}activatePreviousItem(){return this.listController.activatePreviousItem()}}(0,r.__decorate)([(0,a.NH)({flatten:!0})],c.prototype,"slotItems",void 0);let u;const m=(0,s.iv)(u||(u=(t=>t)`:host{background:var(--md-list-container-color,var(--md-sys-color-surface,#fef7ff));color:unset;display:flex;flex-direction:column;outline:0;padding:8px 0;position:relative}`));let p=class extends c{};p.styles=[m],p=(0,r.__decorate)([(0,a.Mo)("md-list")],p)},79840:function(t,e,i){i.d(e,{i0:()=>o,dy:()=>d});i(52247),i(71695),i(92745),i(52805),i(9359),i(48136),i(47021);var r=i(2841);const a=Symbol.for(""),s=t=>{if((null==t?void 0:t.r)===a)return null==t?void 0:t._$litStatic$},o=(t,...e)=>({_$litStatic$:e.reduce(((e,i,r)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[r+1]),t[0]),r:a}),n=new Map,l=t=>(e,...i)=>{const r=i.length;let a,o;const l=[],d=[];let c,u=0,m=!1;for(;u<r;){for(c=e[u];u<r&&void 0!==(o=i[u],a=s(o));)c+=a+e[++u],m=!0;u!==r&&d.push(o),l.push(c),u++}if(u===r&&l.push(e[r]),m){const t=l.join("$$lit$$");void 0===(e=n.get(t))&&(l.raw=l,n.set(t,e=l)),i=d}return t(e,...i)},d=l(r.dy);l(r.YP)}}]); //# sourceMappingURL=17895.bb7dd81f7feb25cd.js.map