iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 20.3 kB
JavaScript
/*! For license information please see chunk.1be192de95f5ce5d5087.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[1255],{21157:function(e,n,t){"use strict";t(43437);function r(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(['\n/* Most common used flex styles*/\n<dom-module id="iron-flex">\n <template>\n <style>\n .layout.horizontal,\n .layout.vertical {\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n }\n\n .layout.inline {\n display: -ms-inline-flexbox;\n display: -webkit-inline-flex;\n display: inline-flex;\n }\n\n .layout.horizontal {\n -ms-flex-direction: row;\n -webkit-flex-direction: row;\n flex-direction: row;\n }\n\n .layout.vertical {\n -ms-flex-direction: column;\n -webkit-flex-direction: column;\n flex-direction: column;\n }\n\n .layout.wrap {\n -ms-flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n }\n\n .layout.no-wrap {\n -ms-flex-wrap: nowrap;\n -webkit-flex-wrap: nowrap;\n flex-wrap: nowrap;\n }\n\n .layout.center,\n .layout.center-center {\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n }\n\n .layout.center-justified,\n .layout.center-center {\n -ms-flex-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n }\n\n .flex {\n -ms-flex: 1 1 0.000000001px;\n -webkit-flex: 1;\n flex: 1;\n -webkit-flex-basis: 0.000000001px;\n flex-basis: 0.000000001px;\n }\n\n .flex-auto {\n -ms-flex: 1 1 auto;\n -webkit-flex: 1 1 auto;\n flex: 1 1 auto;\n }\n\n .flex-none {\n -ms-flex: none;\n -webkit-flex: none;\n flex: none;\n }\n </style>\n </template>\n</dom-module>\n/* Basic flexbox reverse styles */\n<dom-module id="iron-flex-reverse">\n <template>\n <style>\n .layout.horizontal-reverse,\n .layout.vertical-reverse {\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n }\n\n .layout.horizontal-reverse {\n -ms-flex-direction: row-reverse;\n -webkit-flex-direction: row-reverse;\n flex-direction: row-reverse;\n }\n\n .layout.vertical-reverse {\n -ms-flex-direction: column-reverse;\n -webkit-flex-direction: column-reverse;\n flex-direction: column-reverse;\n }\n\n .layout.wrap-reverse {\n -ms-flex-wrap: wrap-reverse;\n -webkit-flex-wrap: wrap-reverse;\n flex-wrap: wrap-reverse;\n }\n </style>\n </template>\n</dom-module>\n/* Flexbox alignment */\n<dom-module id="iron-flex-alignment">\n <template>\n <style>\n /**\n * Alignment in cross axis.\n */\n .layout.start {\n -ms-flex-align: start;\n -webkit-align-items: flex-start;\n align-items: flex-start;\n }\n\n .layout.center,\n .layout.center-center {\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n }\n\n .layout.end {\n -ms-flex-align: end;\n -webkit-align-items: flex-end;\n align-items: flex-end;\n }\n\n .layout.baseline {\n -ms-flex-align: baseline;\n -webkit-align-items: baseline;\n align-items: baseline;\n }\n\n /**\n * Alignment in main axis.\n */\n .layout.start-justified {\n -ms-flex-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n }\n\n .layout.center-justified,\n .layout.center-center {\n -ms-flex-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n }\n\n .layout.end-justified {\n -ms-flex-pack: end;\n -webkit-justify-content: flex-end;\n justify-content: flex-end;\n }\n\n .layout.around-justified {\n -ms-flex-pack: distribute;\n -webkit-justify-content: space-around;\n justify-content: space-around;\n }\n\n .layout.justified {\n -ms-flex-pack: justify;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n }\n\n /**\n * Self alignment.\n */\n .self-start {\n -ms-align-self: flex-start;\n -webkit-align-self: flex-start;\n align-self: flex-start;\n }\n\n .self-center {\n -ms-align-self: center;\n -webkit-align-self: center;\n align-self: center;\n }\n\n .self-end {\n -ms-align-self: flex-end;\n -webkit-align-self: flex-end;\n align-self: flex-end;\n }\n\n .self-stretch {\n -ms-align-self: stretch;\n -webkit-align-self: stretch;\n align-self: stretch;\n }\n\n .self-baseline {\n -ms-align-self: baseline;\n -webkit-align-self: baseline;\n align-self: baseline;\n }\n\n /**\n * multi-line alignment in main axis.\n */\n .layout.start-aligned {\n -ms-flex-line-pack: start; /* IE10 */\n -ms-align-content: flex-start;\n -webkit-align-content: flex-start;\n align-content: flex-start;\n }\n\n .layout.end-aligned {\n -ms-flex-line-pack: end; /* IE10 */\n -ms-align-content: flex-end;\n -webkit-align-content: flex-end;\n align-content: flex-end;\n }\n\n .layout.center-aligned {\n -ms-flex-line-pack: center; /* IE10 */\n -ms-align-content: center;\n -webkit-align-content: center;\n align-content: center;\n }\n\n .layout.between-aligned {\n -ms-flex-line-pack: justify; /* IE10 */\n -ms-align-content: space-between;\n -webkit-align-content: space-between;\n align-content: space-between;\n }\n\n .layout.around-aligned {\n -ms-flex-line-pack: distribute; /* IE10 */\n -ms-align-content: space-around;\n -webkit-align-content: space-around;\n align-content: space-around;\n }\n </style>\n </template>\n</dom-module>\n/* Non-flexbox positioning helper styles */\n<dom-module id="iron-flex-factors">\n <template>\n <style>\n .flex,\n .flex-1 {\n -ms-flex: 1 1 0.000000001px;\n -webkit-flex: 1;\n flex: 1;\n -webkit-flex-basis: 0.000000001px;\n flex-basis: 0.000000001px;\n }\n\n .flex-2 {\n -ms-flex: 2;\n -webkit-flex: 2;\n flex: 2;\n }\n\n .flex-3 {\n -ms-flex: 3;\n -webkit-flex: 3;\n flex: 3;\n }\n\n .flex-4 {\n -ms-flex: 4;\n -webkit-flex: 4;\n flex: 4;\n }\n\n .flex-5 {\n -ms-flex: 5;\n -webkit-flex: 5;\n flex: 5;\n }\n\n .flex-6 {\n -ms-flex: 6;\n -webkit-flex: 6;\n flex: 6;\n }\n\n .flex-7 {\n -ms-flex: 7;\n -webkit-flex: 7;\n flex: 7;\n }\n\n .flex-8 {\n -ms-flex: 8;\n -webkit-flex: 8;\n flex: 8;\n }\n\n .flex-9 {\n -ms-flex: 9;\n -webkit-flex: 9;\n flex: 9;\n }\n\n .flex-10 {\n -ms-flex: 10;\n -webkit-flex: 10;\n flex: 10;\n }\n\n .flex-11 {\n -ms-flex: 11;\n -webkit-flex: 11;\n flex: 11;\n }\n\n .flex-12 {\n -ms-flex: 12;\n -webkit-flex: 12;\n flex: 12;\n }\n </style>\n </template>\n</dom-module>\n<dom-module id="iron-positioning">\n <template>\n <style>\n .block {\n display: block;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .invisible {\n visibility: hidden !important;\n }\n\n .relative {\n position: relative;\n }\n\n .fit {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n\n body.fullbleed {\n margin: 0;\n height: 100vh;\n }\n\n .scroll {\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n }\n\n /* fixed position */\n .fixed-bottom,\n .fixed-left,\n .fixed-right,\n .fixed-top {\n position: fixed;\n }\n\n .fixed-top {\n top: 0;\n left: 0;\n right: 0;\n }\n\n .fixed-right {\n top: 0;\n right: 0;\n bottom: 0;\n }\n\n .fixed-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n }\n\n .fixed-left {\n top: 0;\n bottom: 0;\n left: 0;\n }\n </style>\n </template>\n</dom-module>\n']);return r=function(){return e},e}var i=(0,t(50856).d)(r());i.setAttribute("style","display: none;"),document.head.appendChild(i.content)},16755:function(e,n,t){"use strict";t.r(n);var r=t(15652),i=(t(8544),t(37466),t(44817)),o=t(53658),l=(t(91476),t(75502));function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(){var e=m(["\n ha-cover-controls,\n ha-cover-tilt-controls {\n margin-right: -0.57em;\n }\n "]);return a=function(){return e},e}function f(){var e=m(["\n <ha-cover-controls\n .hass=","\n .stateObj=","\n ></ha-cover-controls>\n "]);return f=function(){return e},e}function c(){var e=m(["\n <ha-cover-tilt-controls\n .hass=","\n .stateObj=","\n ></ha-cover-tilt-controls>\n "]);return c=function(){return e},e}function u(){var e=m(["\n <hui-generic-entity-row .hass="," .config=",">\n ","\n </hui-generic-entity-row>\n "]);return u=function(){return e},e}function d(){var e=m(["\n <hui-warning>\n ","\n </hui-warning>\n "]);return d=function(){return e},e}function p(){var e=m([""]);return p=function(){return e},e}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function y(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function h(e,n){return(h=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function x(e){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(e){return!1}}();return function(){var t,r=v(e);if(n){var i=v(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return b(this,t)}}function b(e,n){return!n||"object"!==s(n)&&"function"!=typeof n?w(e):n}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(){g=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,n){["method","field"].forEach((function(t){n.forEach((function(n){n.kind===t&&"own"===n.placement&&this.defineClassElement(e,n)}),this)}),this)},initializeClassElements:function(e,n){var t=e.prototype;["method","field"].forEach((function(r){n.forEach((function(n){var i=n.placement;if(n.kind===r&&("static"===i||"prototype"===i)){var o="static"===i?e:t;this.defineClassElement(o,n)}}),this)}),this)},defineClassElement:function(e,n){var t=n.descriptor;if("field"===n.kind){var r=n.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===r?void 0:r.call(e)}}Object.defineProperty(e,n.key,t)},decorateClass:function(e,n){var t=[],r=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!j(e))return t.push(e);var n=this.decorateElement(e,i);t.push(n.element),t.push.apply(t,n.extras),r.push.apply(r,n.finishers)}),this),!n)return{elements:t,finishers:r};var o=this.decorateConstructor(t,n);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(e,n,t){var r=n[e.placement];if(!t&&-1!==r.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");r.push(e.key)},decorateElement:function(e,n){for(var t=[],r=[],i=e.decorators,o=i.length-1;o>=0;o--){var l=n[e.placement];l.splice(l.indexOf(e.key),1);var s=this.fromElementDescriptor(e),a=this.toElementFinisherExtras((0,i[o])(s)||s);e=a.element,this.addElementPlacement(e,n),a.finisher&&r.push(a.finisher);var f=a.extras;if(f){for(var c=0;c<f.length;c++)this.addElementPlacement(f[c],n);t.push.apply(t,f)}}return{element:e,finishers:r,extras:t}},decorateConstructor:function(e,n){for(var t=[],r=n.length-1;r>=0;r--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,n[r])(i)||i);if(void 0!==o.finisher&&t.push(o.finisher),void 0!==o.elements){e=o.elements;for(var l=0;l<e.length-1;l++)for(var s=l+1;s<e.length;s++)if(e[l].key===e[s].key&&e[l].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[l].key+")")}}return{elements:e,finishers:t}},fromElementDescriptor:function(e){var n={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(n.initializer=e.initializer),n},toElementDescriptors:function(e){var n;if(void 0!==e)return(n=e,function(e){if(Array.isArray(e))return e}(n)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return C(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?C(e,n):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var n=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),n}),this)},toElementDescriptor:function(e){var n=String(e.kind);if("method"!==n&&"field"!==n)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+n+'"');var t=A(e.key),r=String(e.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:n,key:t,placement:r,descriptor:Object.assign({},i)};return"field"!==n?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:O(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var n={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(n,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),n},toClassDescriptor:function(e){var n=String(e.kind);if("class"!==n)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+n+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var t=O(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,n){for(var t=0;t<n.length;t++){var r=(0,n[t])(e);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");e=r}}return e},disallowProperty:function(e,n,t){if(void 0!==e[n])throw new TypeError(t+" can't have a ."+n+" property.")}};return e}function k(e){var n,t=A(e.key);"method"===e.kind?n={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?n={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?n={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(n={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:n};return e.decorators&&(r.decorators=e.decorators),"field"===e.kind&&(r.initializer=e.value),r}function E(e,n){void 0!==e.descriptor.get?n.descriptor.get=e.descriptor.get:n.descriptor.set=e.descriptor.set}function j(e){return e.decorators&&e.decorators.length}function P(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function O(e,n){var t=e[n];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+n+"' to be a function");return t}function A(e){var n=function(e,n){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===s(n)?n:String(n)}function C(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}!function(e,n,t,r){var i=g();if(r)for(var o=0;o<r.length;o++)i=r[o](i);var l=n((function(e){i.initializeInstanceElements(e,s.elements)}),t),s=i.decorateClass(function(e){for(var n=[],t=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},r=0;r<e.length;r++){var i,o=e[r];if("method"===o.kind&&(i=n.find(t)))if(P(o.descriptor)||P(i.descriptor)){if(j(o)||j(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(j(o)){if(j(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}E(o,i)}else n.push(o)}return n}(l.d.map(k)),e);i.initializeClassElements(l.F,s.elements),i.runClassFinishers(l.F,s.finishers)}([(0,r.Mo)("hui-cover-entity-row")],(function(e,n){return{F:function(n){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&h(e,n)}(r,n);var t=x(r);function r(){var n;y(this,r);for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return n=t.call.apply(t,[this].concat(o)),e(w(n)),n}return r}(n),d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.sz)()],key:"_config",value:void 0},{kind:"method",key:"setConfig",value:function(e){if(!e)throw new Error("Configuration error");this._config=e}},{kind:"method",key:"shouldUpdate",value:function(e){return(0,o.G)(this,e)}},{kind:"method",key:"render",value:function(){if(!this._config||!this.hass)return(0,r.dy)(p());var e=this.hass.states[this._config.entity];return e?(0,r.dy)(u(),this.hass,this._config,(0,i.pu)(e)?(0,r.dy)(c(),this.hass,e):(0,r.dy)(f(),this.hass,e)):(0,r.dy)(d(),(0,l.i)(this.hass,this._config.entity))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,r.iv)(a())}}]}}),r.oi)}}]);
//# sourceMappingURL=chunk.1be192de95f5ce5d5087.js.map