iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
61 lines (50 loc) • 10.1 kB
JavaScript
/*! For license information please see chunk.02c1be13065603946cac.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[4507,1527,6014],{67810:(e,t,r)=>{"use strict";r.d(t,{o:()=>n});r(43437);var o=r(87156);const n={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(e,t){if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),t)if("document"===e)this.scrollTarget=this._doc;else if("string"==typeof e){var r=this.domHost;this.scrollTarget=r&&r.$?r.$[e]:(0,o.vz)(this.ownerDocument).querySelector("#"+e)}else this._isValidScrollTarget()&&(this._oldScrollTarget=e,this._toggleScrollListener(this._shouldHaveListener,e))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(e){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=e)},set _scrollLeft(e){this.scrollTarget===this._doc?window.scrollTo(e,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=e)},scroll:function(e,t){var r;"object"==typeof e?(r=e.left,t=e.top):r=e,r=r||0,t=t||0,this.scrollTarget===this._doc?window.scrollTo(r,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=r,this.scrollTarget.scrollTop=t)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(e,t){var r=t===this._doc?window:t;e?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),r.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(r.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(e){this._shouldHaveListener=e,this._toggleScrollListener(e,this.scrollTarget)}}},25782:(e,t,r)=>{"use strict";r(43437),r(65660),r(47686),r(97968);var o=r(9672),n=r(50856),l=r(33760);(0,o.k)({_template:n.d`
<style include="paper-item-shared-styles"></style>
<style>
:host {
--layout-horizontal;
--layout-center;
--paper-font-subhead;
--paper-item;
--paper-icon-item;
}
.content-icon {
--layout-horizontal;
--layout-center;
width: var(--paper-item-icon-width, 56px);
--paper-item-icon;
}
</style>
<div id="contentIcon" class="content-icon">
<slot name="item-icon"></slot>
</div>
<slot></slot>
`,is:"paper-icon-item",behaviors:[l.U]})},33760:(e,t,r)=>{"use strict";r.d(t,{U:()=>l});r(43437);var o=r(51644),n=r(26110);const l=[o.P,n.a,{hostAttributes:{role:"option",tabindex:"0"}}]},89194:(e,t,r)=>{"use strict";r(43437),r(65660),r(1656),r(47686);var o=r(9672),n=r(50856);(0,o.k)({_template:n.d`
<style>
:host {
overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
--layout-vertical;
--layout-center-justified;
--layout-flex;
}
:host([two-line]) {
min-height: var(--paper-item-body-two-line-min-height, 72px);
}
:host([three-line]) {
min-height: var(--paper-item-body-three-line-min-height, 88px);
}
:host > ::slotted(*) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
:host > ::slotted([secondary]) {
--paper-font-body1;
color: var(--paper-item-body-secondary-color, var(--secondary-text-color));
--paper-item-body-secondary;
}
</style>
<slot></slot>
`,is:"paper-item-body"})},97968:(e,t,r)=>{"use strict";r(65660),r(15495),r(1656),r(47686);const o=document.createElement("template");o.setAttribute("style","display: none;"),o.innerHTML="<dom-module id=\"paper-item-shared-styles\">\n <template>\n <style>\n :host, .paper-item {\n display: block;\n position: relative;\n min-height: var(--paper-item-min-height, 48px);\n padding: 0px 16px;\n }\n\n .paper-item {\n @apply --paper-font-subhead;\n border:none;\n outline: none;\n background: white;\n width: 100%;\n text-align: left;\n }\n\n :host([hidden]), .paper-item[hidden] {\n display: none !important;\n }\n\n :host(.iron-selected), .paper-item.iron-selected {\n font-weight: var(--paper-item-selected-weight, bold);\n\n @apply --paper-item-selected;\n }\n\n :host([disabled]), .paper-item[disabled] {\n color: var(--paper-item-disabled-color, var(--disabled-text-color));\n\n @apply --paper-item-disabled;\n }\n\n :host(:focus), .paper-item:focus {\n position: relative;\n outline: 0;\n\n @apply --paper-item-focused;\n }\n\n :host(:focus):before, .paper-item:focus:before {\n @apply --layout-fit;\n\n background: currentColor;\n content: '';\n opacity: var(--dark-divider-opacity);\n pointer-events: none;\n\n @apply --paper-item-focused-before;\n }\n </style>\n </template>\n</dom-module>",document.head.appendChild(o.content)},4268:(e,t,r)=>{"use strict";function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},l=Object.keys(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function s(e,t){return!0===e?[]:!1===e?[t.fail()]:e}r.d(t,{DD:()=>a,Yj:()=>f,IX:()=>y,hu:()=>p,O7:()=>g,Rx:()=>m,Ry:()=>v,jt:()=>_,Z_:()=>w,n_:()=>T,dt:()=>O,G0:()=>j});class c{constructor(e){const{type:t,schema:r,coercer:o=(e=>e),validator:n=(()=>[]),refiner:l=(()=>[])}=e;this.type=t,this.schema=r,this.coercer=o,this.validator=n,this.refiner=l}}class a extends TypeError{constructor(e,t){const{path:r,value:o,type:n,branch:l}=e,s=i(e,["path","value","type","branch"]);super(`Expected a value of type \`${n}\`${r.length?` for \`${r.join(".")}\``:""} but received \`${JSON.stringify(o)}\`.`),this.value=o,Object.assign(this,s),this.type=n,this.path=r,this.branch=l,this.failures=function*(){yield e,yield*t},this.stack=(new Error).stack,this.__proto__=a.prototype}}function p(e,t){const r=h(e,t);if(r[0])throw r[0]}function d(e,t){const r=t.coercer(e);return p(r,t),r}function h(e,t,r=!1){r&&(e=t.coercer(e));const o=u(e,t),[n]=o;if(n){return[new a(n,o),void 0]}return[void 0,e]}function*u(e,t,r=[],o=[]){const{type:n}=t,i={value:e,type:n,branch:o,path:r,fail:(t={})=>l({value:e,type:n,path:r,branch:[...o,e]},t),check:(e,t,n,l)=>u(e,t,void 0!==n?[...r,l]:r,void 0!==n?[...o,n]:o)},c=s(t.validator(e,i),i),[a]=c;a?(yield a,yield*c):yield*s(t.refiner(e,i),i)}function f(){return T("any",(()=>!0))}function y(e){return new c({type:`Array<${e?e.type:"unknown"}>`,schema:e,coercer:t=>e&&Array.isArray(t)?t.map((t=>d(t,e))):t,*validator(t,r){if(Array.isArray(t)){if(e)for(const[o,n]of t.entries())yield*r.check(n,e,t,o)}else yield r.fail()}})}function g(){return T("boolean",(e=>"boolean"==typeof e))}function b(){return T("never",(()=>!1))}function m(){return T("number",(e=>"number"==typeof e&&!isNaN(e)))}function v(e){const t=e?Object.keys(e):[],r=b();return new c({type:e?`Object<{${t.join(",")}}>`:"Object",schema:e||null,coercer:e?S(e):e=>e,*validator(o,n){if("object"==typeof o&&null!=o){if(e){const l=new Set(Object.keys(o));for(const r of t){l.delete(r);const t=e[r],i=o[r];yield*n.check(i,t,o,r)}for(const e of l){const t=o[e];yield*n.check(t,r,o,e)}}}else yield n.fail()}})}function _(e){return new c({type:e.type+"?",schema:e.schema,validator:(t,r)=>void 0===t||r.check(t,e)})}function w(){return T("string",(e=>"string"==typeof e))}function T(e,t){return new c({type:e,validator:t,schema:null})}function O(e){const t=Object.keys(e);return T(`Type<{${t.join(",")}}>`,(function*(r,o){if("object"==typeof r&&null!=r)for(const n of t){const t=e[n],l=r[n];yield*o.check(l,t,r,n)}else yield o.fail()}))}function j(e){return T(""+e.map((e=>e.type)).join(" | "),(function*(t,r){for(const o of e){const[...e]=r.check(t,o);if(0===e.length)return}yield r.fail()}))}function S(e){const t=Object.keys(e);return r=>{if("object"!=typeof r||null==r)return r;const o={},n=new Set(Object.keys(r));for(const l of t){n.delete(l);const t=e[l],i=r[l];o[l]=d(i,t)}for(const e of n)o[e]=r[e];return o}}}}]);
//# sourceMappingURL=chunk.02c1be13065603946cac.js.map