UNPKG

iobroker.lovelace

Version:

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

3 lines 12.3 kB
/*! For license information please see chunk.d6819ccd2c295b0b398e.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[8722,6964,9260,9462,1199,3047,808],{18601:function(t,n,e){"use strict";e.d(n,{qN:function(){return i.q},Wg:function(){return f}});var i=e(78220);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function r(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,n,e){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,n,e){var i=function(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&null!==(t=u(t)););return t}(t,n);if(i){var o=Object.getOwnPropertyDescriptor(i,n);return o.get?o.get.call(e):o.value}})(t,n,e||t)}function l(t,n){return(l=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function c(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,i=u(t);if(n){var o=u(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return h(this,e)}}function h(t,n){return!n||"object"!==o(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&l(t,n)}(h,t);var n,e,i,o=c(h);function h(){return a(this,h),o.apply(this,arguments)}return n=h,(e=[{key:"createRenderRoot",value:function(){return this.attachShadow({mode:"open",delegatesFocus:!0})}},{key:"click",value:function(){this.formElement&&(this.formElement.focus(),this.formElement.click())}},{key:"setAriaLabel",value:function(t){this.formElement&&this.formElement.setAttribute("aria-label",t)}},{key:"firstUpdated",value:function(){var t=this;s(u(h.prototype),"firstUpdated",this).call(this),this.mdcRoot.addEventListener("change",(function(n){t.dispatchEvent(new Event("change",n))}))}}])&&r(n.prototype,e),i&&r(n,i),h}(i.H)},79332:function(t,n,e){"use strict";e.d(n,{a:function(){return i}});e(43437);var i={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(t,n){for(var e in n)t[e]=n[e]},_cloneConfig:function(t){var n={isClone:!0};return this._copyProperties(n,t),n},_getAnimationConfigRecursive:function(t,n,e){var i;if(this.animationConfig)if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else if(i=t?this.animationConfig[t]:this.animationConfig,Array.isArray(i)||(i=[i]),i)for(var o,a=0;o=i[a];a++)if(o.animatable)o.animatable._getAnimationConfigRecursive(o.type||t,n,e);else if(o.id){var r=n[o.id];r?(r.isClone||(n[o.id]=this._cloneConfig(r),r=n[o.id]),this._copyProperties(r,o)):n[o.id]=o}else e.push(o)},getAnimationConfig:function(t){var n={},e=[];for(var i in this._getAnimationConfigRecursive(t,n,e),n)e.push(n[i]);return e}}},96540:function(t,n,e){"use strict";e.d(n,{t:function(){return o}});e(43437);var i={_configureAnimations:function(t){var n=[],e=[];if(t.length>0)for(var i,o=0;i=t[o];o++){var a=document.createElement(i.name);if(a.isNeonAnimation){var r;a.configure||(a.configure=function(t){return null}),r=a.configure(i),e.push({result:r,config:i,neonAnimation:a})}else console.warn(this.is+":",i.name,"not found!")}for(var s=0;s<e.length;s++){var l=e[s].result,c=e[s].config,h=e[s].neonAnimation;try{"function"!=typeof l.cancel&&(l=document.timeline.play(l))}catch(u){l=null,console.warn("Couldnt play","(",c.name,").",u)}l&&n.push({neonAnimation:h,config:c,animation:l})}return n},_shouldComplete:function(t){for(var n=!0,e=0;e<t.length;e++)if("finished"!=t[e].animation.playState){n=!1;break}return n},_complete:function(t){for(var n=0;n<t.length;n++)t[n].neonAnimation.complete(t[n].config);for(n=0;n<t.length;n++)t[n].animation.cancel()},playAnimation:function(t,n){var e=this.getAnimationConfig(t);if(e){this._active=this._active||{},this._active[t]&&(this._complete(this._active[t]),delete this._active[t]);var i=this._configureAnimations(e);if(0!=i.length){this._active[t]=i;for(var o=0;o<i.length;o++)i[o].animation.onfinish=function(){this._shouldComplete(i)&&(this._complete(i),delete this._active[t],this.fire("neon-animation-finish",n,{bubbles:!1}))}.bind(this)}else this.fire("neon-animation-finish",n,{bubbles:!1})}},cancelAnimation:function(){for(var t in this._active){var n=this._active[t];for(var e in n)n[e].animation.cancel()}this._active={}}},o=[e(79332).a,i]},51654:function(t,n,e){"use strict";e.d(n,{Z:function(){return a},n:function(){return r}});e(43437);var i=e(75009),o=e(87156),a={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(t,n){n&&(t?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(t){this.closingReason=this.closingReason||{},this.closingReason.confirmed=t},_onDialogClick:function(t){for(var n=(0,o.vz)(t).path,e=0,i=n.indexOf(this);e<i;e++){var a=n[e];if(a.hasAttribute&&(a.hasAttribute("dialog-dismiss")||a.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(a.hasAttribute("dialog-confirm")),this.close(),t.stopPropagation();break}}}},r=[i.$,a]},22626:function(t,n,e){"use strict";e(43437),e(65660),e(1656);var i=e(51654),o=e(9672),a=e(50856);function r(){var t=function(t,n){n||(n=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}(['\n <style>\n\n :host {\n display: block;\n @apply --layout-relative;\n }\n\n :host(.is-scrolled:not(:first-child))::before {\n content: \'\';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: var(--divider-color);\n }\n\n :host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after {\n content: \'\';\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: var(--divider-color);\n }\n\n .scrollable {\n padding: 0 24px;\n\n @apply --layout-scroll;\n @apply --paper-dialog-scrollable;\n }\n\n .fit {\n @apply --layout-fit;\n }\n </style>\n\n <div id="scrollable" class="scrollable" on-scroll="updateScrollState">\n <slot></slot>\n </div>\n']);return r=function(){return t},t}(0,o.k)({_template:(0,a.d)(r()),is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(i.Z)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}})},50808:function(t,n,e){"use strict";e(43437),e(65660),e(1656),e(47686),e(54242);var i=document.createElement("template");i.setAttribute("style","display: none;"),i.innerHTML='<dom-module id="paper-dialog-shared-styles">\n <template>\n <style>\n :host {\n display: block;\n margin: 24px 40px;\n\n background: var(--paper-dialog-background-color, var(--primary-background-color));\n color: var(--paper-dialog-color, var(--primary-text-color));\n\n @apply --paper-font-body1;\n @apply --shadow-elevation-16dp;\n @apply --paper-dialog;\n }\n\n :host > ::slotted(*) {\n margin-top: 20px;\n padding: 0 24px;\n }\n\n :host > ::slotted(.no-padding) {\n padding: 0;\n }\n\n \n :host > ::slotted(*:first-child) {\n margin-top: 24px;\n }\n\n :host > ::slotted(*:last-child) {\n margin-bottom: 24px;\n }\n\n /* In 1.x, this selector was `:host > ::content h2`. In 2.x <slot> allows\n to select direct children only, which increases the weight of this\n selector, so we have to re-define first-child/last-child margins below. */\n :host > ::slotted(h2) {\n position: relative;\n margin: 0;\n\n @apply --paper-font-title;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-top. */\n :host > ::slotted(h2:first-child) {\n margin-top: 24px;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-bottom. */\n :host > ::slotted(h2:last-child) {\n margin-bottom: 24px;\n @apply --paper-dialog-title;\n }\n\n :host > ::slotted(.paper-dialog-buttons),\n :host > ::slotted(.buttons) {\n position: relative;\n padding: 8px 8px 8px 24px;\n margin: 0;\n\n color: var(--paper-dialog-button-color, var(--primary-color));\n\n @apply --layout-horizontal;\n @apply --layout-end-justified;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(i.content);var o=e(96540),a=e(51654),r=e(9672),s=e(50856);function l(){var t=function(t,n){n||(n=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}(['\n <style include="paper-dialog-shared-styles"></style>\n <slot></slot>\n']);return l=function(){return t},t}(0,r.k)({_template:(0,s.d)(l()),is:"paper-dialog",behaviors:[a.n,o.t],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}})}}]); //# sourceMappingURL=chunk.d6819ccd2c295b0b398e.js.map