UNPKG

iobroker.lovelace

Version:

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

2 lines 18.2 kB
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[9997],{28417:function(e,t,r){"use strict";r(50808);var n=r(33367),o=r(93592),i=r(87156),a={getTabbableNodes:function(e){var t=[];return this._collectTabbableNodes(e,t)?o.H._sortByTabIndex(t):t},_collectTabbableNodes:function(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!o.H._isVisible(e))return!1;var r,n=e,a=o.H._normalizedTabIndex(n),s=a>0;a>=0&&t.push(n),r="content"===n.localName||"slot"===n.localName?(0,i.vz)(n).getDistributedNodes():(0,i.vz)(n.shadowRoot||n.root||n).children;for(var c=0;c<r.length;c++)s=this._collectTabbableNodes(r[c],t)||s;return s}};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 c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=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 r,n=p(e);if(t){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function f(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=customElements.get("paper-dialog"),h={get _focusableNodes(){return a.getTabbableNodes(this)}},m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(r,e);var t=u(r);function r(){return c(this,r),t.apply(this,arguments)}return r}((0,n.P)([h],d));customElements.define("ha-paper-dialog",m)},92418:function(e,t,r){"use strict";r.r(t);r(25230);var n=r(55317),o=(r(22626),r(54444),r(15652)),i=r(47181),a=(r(28417),r(52039),r(5986)),s=r(49490),c=r(11654),l=r(90728);function u(e){return(u="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 f(){var e=_(["\n ha-paper-dialog {\n direction: ltr;\n }\n a {\n color: var(--primary-color);\n }\n p {\n margin-top: 0;\n }\n pre {\n margin-bottom: 0;\n font-family: var(--code-font-family, monospace);\n }\n .heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .heading ha-svg-icon {\n cursor: pointer;\n }\n "]);return f=function(){return e},e}function p(){var e=_([""]);return p=function(){return e},e}function d(){var e=_([" <pre>","</pre> "]);return d=function(){return e},e}function h(){var e=_([" <li>","</li> "]);return h=function(){return e},e}function m(){var e=_(["\n <ul>\n ","\n </ul>\n "]);return m=function(){return e},e}function y(){var e=_(["\n First occurred:\n ","\n ("," occurrences) <br />\n "]);return y=function(){return e},e}function v(){var e=_([",\n <a\n href=",'\n target="_blank"\n rel="noreferrer"\n >issues</a\n >']);return v=function(){return e},e}function b(){var e=_(["\n (<a\n href=",'\n target="_blank"\n rel="noreferrer"\n >documentation</a\n >',")\n "]);return b=function(){return e},e}function g(){var e=_(["\n <br />\n Integration: ","\n ","\n "]);return g=function(){return e},e}function w(){var e=_(['\n <ha-paper-dialog\n with-backdrop\n opened\n @opened-changed="','"\n >\n <div class="heading">\n <h2>\n ','\n </h2>\n <mwc-icon-button id="copy" @click=',">\n <ha-svg-icon .path=",'></ha-svg-icon>\n </mwc-icon-button>\n <paper-tooltip\n manual-mode\n for="copy"\n position="left"\n animation-delay="0"\n offset="4"\n >',"</paper-tooltip\n >\n </div>\n <paper-dialog-scrollable>\n <p>\n Logger: ","<br />\n Source: ","\n ","\n <br />\n ","\n Last logged:\n ","\n </p>\n ","\n ","\n </paper-dialog-scrollable>\n </ha-paper-dialog>\n "]);return w=function(){return e},e}function k(){var e=_([""]);return k=function(){return e},e}function _(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function E(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,o)}function P(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){E(i,n,o,a,s,"next",e)}function s(e){E(i,n,o,a,s,"throw",e)}a(void 0)}))}}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e){var t=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 r,n=H(e);if(t){var o=H(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}function j(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?D(e):t}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(){x=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var o=t.placement;if(t.kind===n&&("static"===o||"prototype"===o)){var i="static"===o?e:r;this.defineClassElement(i,t)}}),this)}),this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],o={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,o)}),this),e.forEach((function(e){if(!z(e))return r.push(e);var t=this.decorateElement(e,o);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var i=this.decorateConstructor(r,t);return n.push.apply(n,i.finishers),i.finishers=n,i},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],o=e.decorators,i=o.length-1;i>=0;i--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,o[i])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u<l.length;u++)this.addElementPlacement(l[u],t);r.push.apply(r,l)}}return{element:e,finishers:n,extras:r}},decorateConstructor:function(e,t){for(var r=[],n=t.length-1;n>=0;n--){var o=this.fromClassDescriptor(e),i=this.toClassDescriptor((0,t[n])(o)||o);if(void 0!==i.finisher&&r.push(i.finisher),void 0!==i.elements){e=i.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}(t)||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 t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=F(e.key),n=String(e.placement);if("static"!==n&&"prototype"!==n&&"own"!==n)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 "'+n+'"');var o=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var i={kind:t,key:r,placement:n,descriptor:Object.assign({},o)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(o,"get","The property descriptor of a field descriptor"),this.disallowProperty(o,"set","The property descriptor of a field descriptor"),this.disallowProperty(o,"value","The property descriptor of a field descriptor"),i.initializer=e.initializer),i},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:N(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');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 r=N(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function R(e){var t,r=F(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function C(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function z(e){return e.decorators&&e.decorators.length}function A(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function N(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function F(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function L(e,t,r){return(L="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=H(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var M=function(e,t,r,n){var o=x();if(n)for(var i=0;i<n.length;i++)o=n[i](o);var a=t((function(e){o.initializeInstanceElements(e,s.elements)}),r),s=o.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===i.key&&e.placement===i.placement},n=0;n<e.length;n++){var o,i=e[n];if("method"===i.kind&&(o=t.find(r)))if(A(i.descriptor)||A(o.descriptor)){if(z(i)||z(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(z(i)){if(z(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}C(i,o)}else t.push(i)}return t}(a.d.map(R)),e);return o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}(null,(function(e,t){var r,u,_=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(n,t);var r=T(n);function n(){var t;O(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return t=r.call.apply(r,[this].concat(i)),e(D(t)),t}return n}(t);return{F:_,d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.sz)()],key:"_params",value:void 0},{kind:"field",decorators:[(0,o.sz)()],key:"_manifest",value:void 0},{kind:"field",decorators:[(0,o.IO)("paper-tooltip",!0)],key:"_toolTip",value:void 0},{kind:"method",key:"showDialog",value:(u=P(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._params=t,this._manifest=void 0,e.next=4,this.updateComplete;case 4:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{kind:"method",key:"closeDialog",value:function(){this._params=void 0,(0,i.B)(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"updated",value:function(e){if(L(H(_.prototype),"updated",this).call(this,e),e.has("_params")&&this._params){var t=(0,s.j)(this._params.item);t&&this._fetchManifest(t)}}},{kind:"method",key:"render",value:function(){if(!this._params)return(0,o.dy)(k());var e=this._params.item,t=(0,s.j)(e);return(0,o.dy)(w(),this._openedChanged,this.hass.localize("ui.panel.config.logs.details","level",e.level),this._copyLog,n.a0Z,this.hass.localize("ui.common.copied"),e.name,e.source.join(":"),t?(0,o.dy)(g(),(0,a.Lh)(this.hass.localize,t),this._manifest&&this._manifest.documentation?(0,o.dy)(b(),this._manifest.documentation,this._manifest.is_built_in||this._manifest.issue_tracker?(0,o.dy)(v(),(0,a.H0)(t,this._manifest)):""):""):"",e.count>0?(0,o.dy)(y(),(0,l.Q)(e.first_occurred,this.hass.language),e.count):"",(0,l.Q)(e.timestamp,this.hass.language),e.message.length>1?(0,o.dy)(m(),e.message.map((function(e){return(0,o.dy)(h(),e)}))):e.message[0],e.exception?(0,o.dy)(d(),e.exception):(0,o.dy)(p()))}},{kind:"method",key:"_fetchManifest",value:(r=P(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,a.t4)(this.hass,t);case 3:this._manifest=e.sent,e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e){return r.apply(this,arguments)})},{kind:"method",key:"_openedChanged",value:function(e){e.detail.value||this.closeDialog()}},{kind:"method",key:"_copyLog",value:function(){var e,t=this,r=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("paper-dialog-scrollable"),n=window.getSelection(),o=document.createRange();o.selectNodeContents(r),n.removeAllRanges(),n.addRange(o),document.execCommand("copy"),window.getSelection().removeAllRanges(),this._toolTip.show(),setTimeout((function(){var e;return null===(e=t._toolTip)||void 0===e?void 0:e.hide()}),3e3)}},{kind:"get",static:!0,key:"styles",value:function(){return[c.yu,(0,o.iv)(f())]}}]}}),o.oi);customElements.define("dialog-system-log-detail",M)}}]); //# sourceMappingURL=chunk.5db3632d0bf31f167feb.js.map