mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-09 02:49:43 +00:00
1 line
225 KiB
JavaScript
1 line
225 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{1:function(e,t,r){"use strict";r.r(t);var n=r(8);r(25),r(26);var o=r(27);r(15),r(87);function i(e){return(i="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=c(["\n .content {\n height: calc(100% - 64px);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n }\n "]);return a=function(){return e},e}function s(){var e=c(['\n <hass-subpage>\n <div class="content">\n <h3>',"</h3>\n <slot>\n <mwc-button @click=",">go back</mwc-button>\n </slot>\n </div>\n </hass-subpage>\n "]);return s=function(){return e},e}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t,r=v(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 d(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function h(e){return e.decorators&&e.decorators.length}function m(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function y(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 v(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}(function(e,t,r,n){var o=function(){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(!h(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=v(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){var t=this.toElementDescriptor(e),r=y(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=y(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(m(i.descriptor)||m(o.descriptor)){if(h(i)||h(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(h(i)){if(h(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}d(i,o)}else t.push(i)}return t}(a.d.map(f)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)})([Object(n.d)("hass-error-screen")],function(e,t){return{F:function(r){function n(){var t,r,o,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var s=arguments.length,c=new Array(s),p=0;p<s;p++)c[p]=arguments[p];return o=this,r=!(a=(t=l(n)).call.apply(t,[this].concat(c)))||"object"!==i(a)&&"function"!=typeof a?u(o):a,e(u(r)),r}return 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&&p(e,t)}(n,t),n}(),d:[{kind:"field",decorators:[Object(n.f)()],key:"error",value:void 0},{kind:"method",key:"render",value:function(){return Object(n.e)(s(),this.error,this._backTapped)}},{kind:"method",key:"_backTapped",value:function(){history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[Object(n.c)(a())]}}]}},n.a),r(89);var b=r(42),g=r(93);function w(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function k(e){return(k="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 E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e){var t,r=C(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 P(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function _(e){return e.decorators&&e.decorators.length}function S(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function x(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 C(e){var t=function(e,t){if("object"!==k(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===k(t)?t:String(t)}function T(e,t,r){return(T="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=D(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 D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A=function(e,t,r,n){var o=function(){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(!_(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=C(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){var t=this.toElementDescriptor(e),r=x(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=x(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(S(i.descriptor)||S(o.descriptor)){if(_(i)||_(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(_(i)){if(_(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}P(i,o)}else t.push(i)}return t}(a.d.map(j)),e);return o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}(null,function(e,t){var r=function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=D(n)).call.apply(t,[this].concat(s)))||"object"!==k(i)&&"function"!=typeof i?E(o):i,e(E(r)),r}return 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&&O(e,t)}(n,t),n}();return{F:r,d:[{kind:"field",decorators:[Object(n.f)()],key:"route",value:void 0},{kind:"field",key:"routerOptions",value:void 0},{kind:"field",key:"_currentPage",value:function(){return""}},{kind:"field",key:"_currentLoadProm",value:void 0},{kind:"field",key:"_cache",value:function(){return{}}},{kind:"field",key:"_initialLoadDone",value:function(){return!1}},{kind:"field",key:"_computeTail",value:function(){return Object(g.a)(function(e){var t=e.path.indexOf("/",1);return-1===t?{prefix:e.prefix+e.path,path:""}:{prefix:e.prefix+e.path.substr(0,t),path:e.path.substr(t)}})}},{kind:"method",key:"update",value:function(e){var t=this;T(D(r.prototype),"update",this).call(this,e);var n=this.routerOptions||{routes:{}};if(!n||!n.initialLoad||this._initialLoadDone)if(e.has("route")){var o=this.route,i=n.defaultPage;o&&""===o.path&&void 0!==i&&Object(b.a)(this,"".concat(o.prefix,"/").concat(i),!0);for(var a=o?function(e,t){if(""===e)return t;var r=e.indexOf("/",1);return-1===r?e.substr(1):e.substr(1,r-1)}(o.path,i||""):"not_found",s=n.routes[a];"string"==typeof s;)a=s,s=n.routes[a];if(this._currentPage!==a){if(!s)return this._currentPage="",void(this.lastChild&&this.removeChild(this.lastChild));this._currentPage=a;var c=s.load?s.load():Promise.resolve();if(c.catch(function(e){if(console.error("Error loading page",a,e),t._currentPage===a){t.removeChild(t.lastChild);var r=document.createElement("hass-error-screen");r.error="Error while loading page ".concat(a,"."),t.appendChild(r)}}),n.showLoading){var l=!1;setTimeout(function(){l||t._currentPage!==a||(t.lastChild&&t.removeChild(t.lastChild),t.appendChild(t.createLoadingScreen()))},400),this._currentLoadProm=c.then(function(){t._currentLoadProm=void 0,t._currentPage===a&&(l=!0,t._createPanel(n,a,s))},function(){t._currentLoadProm=void 0})}else this._createPanel(n,a,s)}else this.lastChild&&this.updatePageEl(this.lastChild,e)}else this.lastChild&&!this._currentLoadProm&&this.updatePageEl(this.lastChild,e)}},{kind:"method",key:"firstUpdated",value:function(e){var t=this;T(D(r.prototype),"firstUpdated",this).call(this,e);var n=this.routerOptions;n&&(n.preloadAll&&Object.values(n.routes).forEach(function(e){return"object"===k(e)&&e.load&&e.load()}),n.initialLoad&&(setTimeout(function(){t._initialLoadDone||t.appendChild(t.createLoadingScreen())},400),n.initialLoad().then(function(){t._initialLoadDone=!0,t.requestUpdate("route")})))}},{kind:"method",key:"createLoadingScreen",value:function(){return document.createElement("hass-loading-screen")}},{kind:"method",key:"rebuild",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==(t=this.route)){e.next=3;break}return e.abrupt("return");case 3:return this.route=void 0,e.next=6,this.updateComplete;case 6:void 0===this.route&&(this.route=t);case 7:case"end":return e.stop()}},e,this)}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){w(i,n,o,a,s,"next",e)}function s(e){w(i,n,o,a,s,"throw",e)}a(void 0)})});return function(){return t.apply(this,arguments)}}()},{kind:"get",key:"pageRendered",value:function(){var e=this;return this.updateComplete.then(function(){return e._currentLoadProm})}},{kind:"method",key:"updatePageEl",value:function(e,t){}},{kind:"get",key:"routeTail",value:function(){return this._computeTail(this.route)}},{kind:"method",key:"_createPanel",value:function(e,t,r){this.lastChild&&this.removeChild(this.lastChild);var n=this._cache[t]||document.createElement(r.tag);this.updatePageEl(n),this.appendChild(n),(e.cacheAll||r.cache)&&(this._cache[t]=n)}}]}},n.b),z=r(43);function R(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function I(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){R(i,n,o,a,s,"next",e)}function s(e){R(i,n,o,a,s,"throw",e)}a(void 0)})}}var F={},L=function(){var e=I(regeneratorRuntime.mark(function e(t,r,n,o,i){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o in F||(F[o]=n().then(function(){var e=document.createElement(o);return t.provideHass(e),r.appendChild(e),e})),e.next=3,F[o];case 3:e.sent.showDialog(i);case 5:case"end":return e.stop()}},e)}));return function(t,r,n,o,i){return e.apply(this,arguments)}}();function H(e){return(H="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 U(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function N(e,t){return!t||"object"!==H(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 B(e,t,r){return(B="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=M(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 M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r(94),r(108),r(41),r(96),r(129),r(66),r(14);var G=r(4),V=r(9);r(35);function $(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n .card-group {\n margin-top: 24px;\n }\n .card-group .title {\n color: var(--primary-text-color);\n font-size: 2em;\n padding-left: 8px;\n margin-bottom: 8px;\n }\n .card-group .description {\n font-size: 0.5em;\n font-weight: 500;\n margin-top: 4px;\n }\n .card-group paper-card {\n --card-group-columns: 4;\n width: calc(\n (100% - 12px * var(--card-group-columns)) / var(--card-group-columns)\n );\n margin: 4px;\n vertical-align: top;\n }\n @media screen and (max-width: 1200px) and (min-width: 901px) {\n .card-group paper-card {\n --card-group-columns: 3;\n }\n }\n @media screen and (max-width: 900px) and (min-width: 601px) {\n .card-group paper-card {\n --card-group-columns: 2;\n }\n }\n @media screen and (max-width: 600px) and (min-width: 0) {\n .card-group paper-card {\n width: 100%;\n margin: 4px 0;\n }\n .content {\n padding: 0;\n }\n }\n ha-call-api-button {\n font-weight: 500;\n color: var(--primary-color);\n }\n .error {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n"]);return $=function(){return e},e}var J=document.createElement("template");J.setAttribute("style","display: none;");var W=Object(n.c)($());J.innerHTML='<dom-module id="hassio-style">\n <template>\n <style>\n '.concat(W.toString(),"\n </style>\n </template>\n</dom-module>"),document.head.appendChild(J.content);var Y=r(12);function K(e){return(K="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 Q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function X(e,t){return!t||"object"!==K(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 Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ee(e,t){return(ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var te=Object(Y.a)(function(e){return function(t){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),X(this,Z(r).apply(this,arguments))}var n,o,i;return 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&&ee(e,t)}(r,e),n=r,(o=[{key:"navigate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];b.a.apply(void 0,[this].concat(t))}}])&&Q(n.prototype,o),i&&Q(n,i),r}()});function re(e){return(re="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 ne(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style include="ha-style hassio-style">\n paper-card {\n cursor: pointer;\n }\n </style>\n <div class="content card-group">\n <div class="title">Add-ons</div>\n <template is="dom-if" if="[[!addons.length]]">\n <paper-card>\n <div class="card-content">\n You don\'t have any add-ons installed yet. Head over to\n <a href="#" on-click="openStore">the add-on store</a> to get\n started!\n </div>\n </paper-card>\n </template>\n <template\n is="dom-repeat"\n items="[[addons]]"\n as="addon"\n sort="sortAddons"\n >\n <paper-card on-click="addonTapped">\n <div class="card-content">\n <hassio-card-content\n hass="[[hass]]"\n title="[[addon.name]]"\n description="[[addon.description]]"\n available="[[addon.available]]"\n icon="[[computeIcon(addon)]]"\n icon-title="[[computeIconTitle(addon)]]"\n icon-class="[[computeIconClass(addon)]]"\n ></hassio-card-content>\n </div>\n </paper-card>\n </template>\n </div>\n ']);return ne=function(){return e},e}function oe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ie(e,t){return!t||"object"!==re(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 ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function se(e,t){return(se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ce=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ie(this,ae(t).apply(this,arguments))}var r,n,o;return 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&&se(e,t)}(t,te(V["a"])),r=t,o=[{key:"template",get:function(){return Object(G.a)(ne())}},{key:"properties",get:function(){return{hass:Object,addons:Array}}}],(n=[{key:"sortAddons",value:function(e,t){return e.name<t.name?-1:1}},{key:"computeIcon",value:function(e){return e.installed!==e.version?"hassio:arrow-up-bold-circle":"hassio:puzzle"}},{key:"computeIconTitle",value:function(e){return e.installed!==e.version?"New version available":"started"===e.state?"Add-on is running":"Add-on is stopped"}},{key:"computeIconClass",value:function(e){return e.installed!==e.version?"update":"started"===e.state?"running":""}},{key:"addonTapped",value:function(e){this.navigate("/hassio/addon/"+e.model.addon.slug),e.target.blur()}},{key:"openStore",value:function(e){this.navigate("/hassio/store"),e.target.blur()}}])&&oe(r.prototype,n),o&&oe(r,o),t}();customElements.define("hassio-addons",ce);r(32);function le(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style include="ha-style hassio-style">\n paper-card {\n display: block;\n margin-bottom: 32px;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n a {\n color: var(--primary-color);\n }\n </style>\n <template is="dom-if" if="[[computeUpdateAvailable(hassInfo)]]">\n <div class="content">\n <div class="card-group">\n <paper-card heading="Update available! 🎉">\n <div class="card-content">\n Home Assistant [[hassInfo.last_version]] is available and you\n are currently running Home Assistant [[hassInfo.version]].\n <template is="dom-if" if="[[error]]">\n <div class="error">Error: [[error]]</div>\n </template>\n </div>\n <div class="card-actions">\n <ha-call-api-button\n hass="[[hass]]"\n path="hassio/homeassistant/update"\n >Update</ha-call-api-button\n >\n <a\n href="https://www.home-assistant.io/latest-release-notes/"\n target="_blank"\n ><mwc-button>Release notes</mwc-button></a\n >\n </div>\n </paper-card>\n </div>\n </div>\n </template>\n ']);return le=function(){return e},e}function ue(e){return(ue="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 pe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fe(e,t){return!t||"object"!==ue(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 de(e,t,r){return(de="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=he(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 he(e){return(he=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function me(e,t){return(me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ye=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),fe(this,he(t).apply(this,arguments))}var r,n,o;return 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&&me(e,t)}(t,V["a"]),r=t,o=[{key:"template",get:function(){return Object(G.a)(le())}},{key:"properties",get:function(){return{hass:Object,hassInfo:Object,error:String}}}],(n=[{key:"ready",value:function(){var e=this;de(he(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var t=e.detail.response;"object"===ue(t.body)?this.errors=t.body.message||"Unknown error":this.errors=t.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}}])&&pe(r.prototype,n),o&&pe(r,o),t}();function ve(e){return(ve="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 be(){var e=we(["\n .content {\n margin: 0 auto;\n }\n "]);return be=function(){return e},e}function ge(){var e=we(['\n <div class="content">\n <hassio-hass-update\n .hass=',"\n .hassInfo=","\n ></hassio-hass-update>\n <hassio-addons\n .hass=","\n .addons=","\n ></hassio-addons>\n </div>\n "]);return ge=function(){return e},e}function we(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function je(e){var t,r=Ce(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 Pe(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function _e(e){return e.decorators&&e.decorators.length}function Se(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function xe(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 Ce(e){var t=function(e,t){if("object"!==ve(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ve(t)?t:String(t)}customElements.define("hassio-hass-update",ye);(function(e,t,r,n){var o=function(){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(!_e(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=Ce(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){var t=this.toElementDescriptor(e),r=xe(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=xe(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(Se(i.descriptor)||Se(o.descriptor)){if(_e(i)||_e(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(_e(i)){if(_e(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}Pe(i,o)}else t.push(i)}return t}(a.d.map(je)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)})([Object(n.d)("hassio-dashboard")],function(e,t){return{F:function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=ke(n)).call.apply(t,[this].concat(s)))||"object"!==ve(i)&&"function"!=typeof i?Ee(o):i,e(Ee(r)),r}return 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&&Oe(e,t)}(n,t),n}(),d:[{kind:"field",decorators:[Object(n.f)()],key:"hass",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"supervisorInfo",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"hassInfo",value:void 0},{kind:"method",key:"render",value:function(){return Object(n.e)(ge(),this.hass,this.hassInfo,this.hass,this.supervisorInfo.addons)}},{kind:"get",static:!0,key:"styles",value:function(){return Object(n.c)(be())}}]}},n.a),r(98),r(45),r(99),r(114);function Te(e){return(Te="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 De(){var e=Ne(['\n paper-radio-group {\n display: block;\n }\n paper-radio-button {\n padding: 0 0 2px 2px;\n }\n paper-radio-button,\n paper-checkbox,\n paper-input[type="password"] {\n display: block;\n margin: 4px 0 4px 48px;\n }\n .pointer {\n cursor: pointer;\n }\n ']);return De=function(){return e},e}function Ae(){var e=Ne(['\n <paper-card\n class="pointer"\n .snapshot=',"\n @click=",'\n >\n <div class="card-content">\n <hassio-card-content\n .hass=',"\n .title=","\n .description=","\n .datetime=","\n .icon=",'\n .\n .icon-class="snapshot"\n ></hassio-card-content>\n </div>\n </paper-card>\n ']);return Ae=function(){return e},e}function ze(){var e=Ne(['\n <paper-card>\n <div class="card-content">\n You don\'t have any snapshots yet.\n </div>\n </paper-card>\n ']);return ze=function(){return e},e}function Re(){var e=Ne(['\n <p class="error">',"</p>\n "]);return Re=function(){return e},e}function Ie(){var e=Ne(['\n <paper-input\n label="Password"\n type="password"\n name="snapshotPassword"\n .value=',"\n @value-changed=","\n ></paper-input>\n "]);return Ie=function(){return e},e}function Fe(){var e=Ne(["\n <paper-checkbox\n .idx=",'\n .checked="{{item.checked}}"\n @checked-changed=',"\n >\n ","\n </paper-checkbox>\n "]);return Fe=function(){return e},e}function Le(){var e=Ne(["\n <paper-checkbox\n .idx=","\n .checked=","\n @checked-changed=","\n >\n ","\n </paper-checkbox>\n "]);return Le=function(){return e},e}function He(){var e=Ne(["\n Folders:\n ","\n Add-ons:\n ","\n "]);return He=function(){return e},e}function Ue(){var e=Ne(['\n <div class="content">\n <div class="card-group">\n <div class="title">\n Create snapshot\n <div class="description">\n Snapshots allow you to easily backup and restore all data of your\n Hass.io instance.\n </div>\n </div>\n <paper-card>\n <div class="card-content">\n <paper-input\n autofocus\n label="Name"\n name="snapshotName"\n .value=',"\n @value-changed=",'\n ></paper-input>\n Type:\n <paper-radio-group\n name="snapshotType"\n .selected=',"\n @selected-changed=",'\n >\n <paper-radio-button name="full">\n Full snapshot\n </paper-radio-button>\n <paper-radio-button name="partial">\n Partial snapshot\n </paper-radio-button>\n </paper-radio-group>\n ','\n Security:\n <paper-checkbox\n name="snapshotHasPassword"\n .checked=',"\n @checked-changed=","\n >\n Password protection\n </paper-checkbox>\n ","\n ",'\n </div>\n <div class="card-actions">\n <mwc-button\n .disabled=',"\n @click=",'\n >\n Create\n </mwc-button>\n </div>\n </paper-card>\n </div>\n\n <div class="card-group">\n <div class="title">Available snapshots</div>\n ',"\n </div>\n </div>\n "]);return Ue=function(){return e},e}function Ne(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Be(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Me(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Be(i,n,o,a,s,"next",e)}function s(e){Be(i,n,o,a,s,"throw",e)}a(void 0)})}}function qe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ge(e,t){return(Ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t,r=Ke(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 $e(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Je(e){return e.decorators&&e.decorators.length}function We(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Ye(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 Ke(e){var t=function(e,t){if("object"!==Te(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Te(t)?t:String(t)}function Qe(e,t,r){return(Qe="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=Xe(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 Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e,t,r,n){var o=function(){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(!Je(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=Ke(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){var t=this.toElementDescriptor(e),r=Ye(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=Ye(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(We(i.descriptor)||We(o.descriptor)){if(Je(i)||Je(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(Je(i)){if(Je(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}$e(i,o)}else t.push(i)}return t}(a.d.map(Ve)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("hassio-snapshots")],function(e,t){var i=function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=Xe(n)).call.apply(t,[this].concat(s)))||"object"!==Te(i)&&"function"!=typeof i?qe(o):i,e(qe(r)),r}return 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&&Ge(e,t)}(n,t),n}();return{F:i,d:[{kind:"field",decorators:[Object(n.f)()],key:"hass",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"supervisorInfo",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"_snapshotName",value:function(){return""}},{kind:"field",decorators:[Object(n.f)()],key:"_snapshotPassword",value:function(){return""}},{kind:"field",decorators:[Object(n.f)()],key:"_snapshotHasPassword",value:function(){return!1}},{kind:"field",decorators:[Object(n.f)()],key:"_snapshotType",value:function(){return"full"}},{kind:"field",decorators:[Object(n.f)()],key:"_snapshots",value:function(){return[]}},{kind:"field",decorators:[Object(n.f)()],key:"_addonList",value:function(){return[]}},{kind:"field",decorators:[Object(n.f)()],key:"_folderList",value:function(){return[{slug:"homeassistant",name:"Home Assistant configuration",checked:!0},{slug:"ssl",name:"SSL",checked:!0},{slug:"share",name:"Share",checked:!0},{slug:"addons/local",name:"Local add-ons",checked:!0}]}},{kind:"field",decorators:[Object(n.f)()],key:"_creatingSnapshot",value:function(){return!1}},{kind:"field",decorators:[Object(n.f)()],key:"_error",value:function(){return""}},{kind:"method",key:"refreshData",value:function(){var e=Me(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(z.l)(this.hass);case 2:return e.next=4,this._updateSnapshots();case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"render",value:function(){var e=this;return Object(n.e)(Ue(),this._snapshotName,this._handleTextValueChanged,this._snapshotType,this._handleRadioValueChanged,"full"===this._snapshotType?void 0:Object(n.e)(He(),this._folderList.map(function(t,r){return Object(n.e)(Le(),r,t.checked,e._folderChecked,t.name)}),this._addonList.map(function(t,r){return Object(n.e)(Fe(),r,e._addonChecked,t.name)})),this._snapshotHasPassword,this._handleCheckboxValueChanged,this._snapshotHasPassword?Object(n.e)(Ie(),this._snapshotPassword,this._handleTextValueChanged):void 0,""!==this._error?Object(n.e)(Re(),this._error):void 0,this._creatingSnapshot,this._createSnapshot,void 0===this._snapshots?void 0:0===this._snapshots.length?Object(n.e)(ze()):this._snapshots.map(function(t){return Object(n.e)(Ae(),t,e._snapshotClicked,e.hass,t.name||t.slug,e._computeDetails(t),t.date,"full"===t.type?"hassio:package-variant-closed":"hassio:package-variant")}))}},{kind:"method",key:"firstUpdated",value:function(e){Qe(Xe(i.prototype),"firstUpdated",this).call(this,e),this._updateSnapshots()}},{kind:"method",key:"updated",value:function(e){e.has("supervisorInfo")&&(this._addonList=this.supervisorInfo.addons.map(function(e){return{slug:e.slug,name:e.name,checked:!0}}).sort(function(e,t){return e.name<t.name?-1:1}))}},{kind:"method",key:"_handleTextValueChanged",value:function(e){var t=e.currentTarget;this["_".concat(t.name)]=e.detail.value}},{kind:"method",key:"_handleCheckboxValueChanged",value:function(e){var t=e.currentTarget;this["_".concat(t.name)]=t.checked}},{kind:"method",key:"_handleRadioValueChanged",value:function(e){var t=e.currentTarget;this["_".concat(t.getAttribute("name"))]=e.detail.value}},{kind:"method",key:"_folderChecked",value:function(e){var t=e.currentTarget,r=t.idx,n=t.checked;this._folderList=this._folderList.map(function(e,t){return t===r?Object.assign({},e,{checked:n}):e})}},{kind:"method",key:"_addonChecked",value:function(e){var t=e.currentTarget,r=t.idx,n=t.checked;this._addonList=this._addonList.map(function(e,t){return t===r?Object.assign({},e,{checked:n}):e})}},{kind:"method",key:"_updateSnapshots",value:function(){var e=Me(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(z.i)(this.hass);case 3:this._snapshots=e.sent,this._snapshots.sort(function(e,t){return e.date<t.date?1:-1}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),this._error=e.t0.message;case 10:case"end":return e.stop()}},e,this,[[0,7]])}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"_createSnapshot",value:function(){var e=Me(regeneratorRuntime.mark(function e(){var t,r,n,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._error="",!this._snapshotHasPassword||this._snapshotPassword.length){e.next=4;break}return this._error="Please enter a password.",e.abrupt("return");case 4:return this._creatingSnapshot=!0,e.next=7,this.updateComplete;case 7:if(t=this._snapshotName||(new Date).toLocaleDateString(navigator.language,{weekday:"long",year:"numeric",month:"short",day:"numeric"}),e.prev=8,"full"!==this._snapshotType){e.next=16;break}return r={name:t},this._snapshotHasPassword&&(r.password=this._snapshotPassword),e.next=14,Object(z.a)(this.hass,r);case 14:e.next=22;break;case 16:return n=this._addonList.filter(function(e){return e.checked}).map(function(e){return e.slug}),i=this._folderList.filter(function(e){return e.checked}).map(function(e){return e.slug}),a={name:t,folders:i,addons:n},this._snapshotHasPassword&&(a.password=this._snapshotPassword),e.next=22,Object(z.b)(this.hass,a);case 22:this._updateSnapshots(),Object(o.a)(this,"hass-api-called",{success:!0,response:null}),e.next=29;break;case 26:e.prev=26,e.t0=e.catch(8),this._error=e.t0.message;case 29:return e.prev=29,this._creatingSnapshot=!1,e.finish(29);case 32:case"end":return e.stop()}},e,this,[[8,26,29,32]])}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"_computeDetails",value:function(e){var t="full"===e.type?"Full snapshot":"Partial snapshot";return e.protected?"".concat(t,", password protected"):t}},{kind:"method",key:"_snapshotClicked",value:function(e){var t,n,i=this;t=this,n={slug:e.currentTarget.snapshot.slug,onDelete:function(){return i._updateSnapshots()}},Object(o.a)(t,"show-dialog",{dialogTag:"dialog-hassio-snapshot",dialogImport:function(){return Promise.all([r.e(0),r.e(3)]).then(r.bind(null,133))},dialogParams:n})}},{kind:"get",static:!0,key:"styles",value:function(){return[W,Object(n.c)(De())]}}]}},n.a);function Ze(e){return(Ze="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 et(){var e=nt(["\n paper-card {\n cursor: pointer;\n }\n .not_available {\n opacity: 0.6;\n }\n a.repo {\n color: var(--primary-text-color);\n }\n "]);return et=function(){return e},e}function tt(){var e=nt(["\n <paper-card\n .addon=","\n class=","\n @click=",'\n >\n <div class="card-content">\n <hassio-card-content\n .hass=',"\n .title=","\n .description=","\n .available=","\n .icon=","\n .iconTitle=","\n .iconClass=","\n ></hassio-card-content>\n </div>\n </paper-card>\n "]);return tt=function(){return e},e}function rt(){var e=nt(['\n <div class="card-group">\n <div class="title">\n ','\n <div class="description">\n Maintained by ','<br />\n <a class="repo" href=',' target="_blank">',"</a>\n </div>\n </div>\n\n ","\n </div>\n "]);return rt=function(){return e},e}function nt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ot(e){return(ot=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function it(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function at(e,t){return(at=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function st(e){var t,r=ft(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 ct(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function lt(e){return e.decorators&&e.decorators.length}function ut(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function pt(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 ft(e){var t=function(e,t){if("object"!==Ze(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ze(t)?t:String(t)}var dt=function(e,t,r,n){var o=function(){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(!lt(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=ft(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){var t=this.toElementDescriptor(e),r=pt(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=pt(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(ut(i.descriptor)||ut(o.descriptor)){if(lt(i)||lt(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(lt(i)){if(lt(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}ct(i,o)}else t.push(i)}return t}(a.d.map(st)),e);return o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}(null,function(e,t){return{F:function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=ot(n)).call.apply(t,[this].concat(s)))||"object"!==Ze(i)&&"function"!=typeof i?it(o):i,e(it(r)),r}return 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&&at(e,t)}(n,t),n}(),d:[{kind:"field",decorators:[Object(n.f)()],key:"hass",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"repo",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"addons",value:void 0},{kind:"method",key:"render",value:function(){var e=this,t=this.repo;return Object(n.e)(rt(),t.name,t.maintainer,t.url,t.url,this.addons.sort(function(e,t){return e.name.toUpperCase()<t.name.toUpperCase()?-1:1}).map(function(t){return Object(n.e)(tt(),t,t.available?"":"not_available",e.addonTapped,e.hass,t.name,t.description,t.available,e.computeIcon(t),e.computeIconTitle(t),e.computeIconClass(t))}))}},{kind:"method",key:"computeIcon",value:function(e){return e.installed&&e.installed!==e.version?"hassio:arrow-up-bold-circle":"hassio:puzzle"}},{kind:"method",key:"computeIconTitle",value:function(e){return e.installed?e.installed!==e.version?"New version available":"Add-on is installed":e.available?"Add-on is not installed":"Add-on is not available on your system"}},{kind:"method",key:"computeIconClass",value:function(e){return e.installed?e.installed!==e.version?"update":"installed":e.available?"":"not_available"}},{kind:"method",key:"addonTapped",value:function(e){Object(b.a)(this,"/hassio/addon/".concat(e.currentTarget.addon.slug))}},{kind:"get",static:!0,key:"styles",value:function(){return[W,Object(n.c)(et())]}}]}},n.a);customElements.define("hassio-addon-repository",dt);r(28);var ht=r(115);function mt(e){return(mt="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 yt(){var e=gt(["\n .add {\n padding: 12px 16px;\n }\n iron-icon {\n color: var(--secondary-text-color);\n margin-right: 16px;\n display: inline-block;\n }\n paper-input {\n width: calc(100% - 49px);\n display: inline-block;\n }\n "]);return yt=function(){return e},e}function vt(){var e=gt(['\n <paper-card>\n <div class="card-content">\n <hassio-card-content\n .hass=',"\n .title=","\n .description=",'\n icon="hassio:github-circle"\n ></hassio-card-content>\n </div>\n <div class="card-actions">\n <ha-call-api-button\n path="hassio/supervisor/options"\n .hass=',"\n .data=",'\n class="warning"\n >\n Remove\n </ha-call-api-button>\n </div>\n </paper-card>\n ']);return vt=function(){return e},e}function bt(){var e=gt(['\n <div class="card-group">\n <div class="title">\n Repositories\n <div class="description">\n Configure which add-on repositories to fetch data from:\n </div>\n </div>\n ','\n\n <paper-card>\n <div class="card-content add">\n <iron-icon icon="hassio:github-circle"></iron-icon>\n <paper-input\n label="Add new repository by URL"\n .value=',"\n @value-changed=",'\n ></paper-input>\n </div>\n <div class="card-actions">\n <ha-call-api-button\n path="hassio/supervisor/options"\n .hass=',"\n .data=","\n >\n Add\n </ha-call-api-button>\n </div>\n </paper-card>\n </div>\n "]);return bt=function(){return e},e}function gt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function wt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kt(e,t){return(kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Et(e){var t,r=St(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 Ot(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function jt(e){return e.decorators&&e.decorators.length}function Pt(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function _t(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 St(e){var t=function(e,t){if("object"!==mt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==mt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===mt(t)?t:String(t)}function xt(e,t,r){return(xt="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=Ct(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 Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e,t,r,n){var o=function(){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(!jt(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=St(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){var t=this.toElementDescriptor(e),r=_t(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=_t(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(Pt(i.descriptor)||Pt(o.descriptor)){if(jt(i)||jt(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(jt(i)){if(jt(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}Ot(i,o)}else t.push(i)}return t}(a.d.map(Et)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("hassio-repositories-editor")],function(e,t){var r=function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=Ct(n)).call.apply(t,[this].concat(s)))||"object"!==mt(i)&&"function"!=typeof i?wt(o):i,e(wt(r)),r}return 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&&kt(e,t)}(n,t),n}();return{F:r,d:[{kind:"field",decorators:[Object(n.f)()],key:"hass",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"repos",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"_repoUrl",value:function(){return""}},{kind:"field",key:"_sortedRepos",value:function(){return Object(g.a)(function(e){return e.filter(function(e){return"core"!==e.slug&&"local"!==e.slug}).sort(function(e,t){return e.name<t.name?-1:1})})}},{kind:"method",key:"render",value:function(){var e=this,t=this._sortedRepos(this.repos);return Object(n.e)(bt(),Object(ht.a)(t,function(e){return e.slug},function(r){return Object(n.e)(vt(),e.hass,r.name,r.url,e.hass,e.computeRemoveRepoData(t,r.url))}),this._repoUrl,this._urlChanged,this.hass,this.computeAddRepoData(t,this._repoUrl))}},{kind:"method",key:"updated",value:function(e){xt(Ct(r.prototype),"updated",this).call(this,e),e.has("repos")&&(this._repoUrl="")}},{kind:"method",key:"_urlChanged",value:function(e){this._repoUrl=e.detail.value}},{kind:"method",key:"computeRemoveRepoData",value:function(e,t){return{addons_repositories:e.filter(function(e){return e.url!==t}).map(function(e){return e.source})}}},{kind:"method",key:"computeAddRepoData",value:function(e,t){var r=e?e.map(function(e){return e.source}):[];return r.push(t),{addons_repositories:r}}},{kind:"get",static:!0,key:"styles",value:function(){return[W,Object(n.c)(yt())]}}]}},n.a);var Tt=r(13);r(90);function Dt(e){return(Dt="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 At(){var e=Rt(["\n :host {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n "]);return At=function(){return e},e}function zt(){var e=Rt(["\n <paper-spinner-lite active></paper-spinner-lite>\n "]);return zt=function(){return e},e}function Rt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function It(e){return(It=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ft(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lt(e,t){return(Lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ht(e){var t,r=qt(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 Ut(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Nt(e){return e.decorators&&e.decorators.length}function Bt(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Mt(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 qt(e){var t=function(e,t){if("object"!==Dt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Dt(t)?t:String(t)}!function(e,t,r,n){var o=function(){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(!Nt(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=qt(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){var t=this.toElementDescriptor(e),r=Mt(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=Mt(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(Bt(i.descriptor)||Bt(o.descriptor)){if(Nt(i)||Nt(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(Nt(i)){if(Nt(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}Ut(i,o)}else t.push(i)}return t}(a.d.map(Ht)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("loading-screen")],function(e,t){return{F:function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=It(n)).call.apply(t,[this].concat(s)))||"object"!==Dt(i)&&"function"!=typeof i?Ft(o):i,e(Ft(r)),r}return 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&&Lt(e,t)}(n,t),n}(),d:[{kind:"method",key:"render",value:function(){return Object(n.e)(zt())}},{kind:"get",static:!0,key:"styles",value:function(){return Object(n.c)(At())}}]}},n.a);function Gt(e){return(Gt="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 Vt(){var e=Yt(["\n hassio-addon-repository {\n margin-top: 24px;\n }\n "]);return Vt=function(){return e},e}function $t(){var e=Yt(["\n <hassio-addon-repository\n .hass=","\n .repo=","\n .addons=","\n ></hassio-addon-repository>\n "]);return $t=function(){return e},e}function Jt(){var e=Yt(["\n <hassio-repositories-editor\n .hass=","\n .repos=","\n ></hassio-repositories-editor>\n\n ","\n "]);return Jt=function(){return e},e}function Wt(){var e=Yt(["\n <loading-screen></loading-screen>\n "]);return Wt=function(){return e},e}function Yt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Kt(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Qt(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Kt(i,n,o,a,s,"next",e)}function s(e){Kt(i,n,o,a,s,"throw",e)}a(void 0)})}}function Xt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zt(e,t){return(Zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function er(e){var t,r=ir(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 tr(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function rr(e){return e.decorators&&e.decorators.length}function nr(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function or(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 ir(e){var t=function(e,t){if("object"!==Gt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Gt(t)?t:String(t)}function ar(e,t,r){return(ar="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=sr(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 sr(e){return(sr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cr=function(e,t){return"local"===e.slug?-1:"local"===t.slug?1:"core"===e.slug?-1:"core"===t.slug?1:e.name.toUpperCase()<t.name.toUpperCase()?-1:1},lr=function(e,t,r,n){var o=function(){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(!rr(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=ir(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){var t=this.toElementDescriptor(e),r=or(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=or(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(nr(i.descriptor)||nr(o.descriptor)){if(rr(i)||rr(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(rr(i)){if(rr(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}tr(i,o)}else t.push(i)}return t}(a.d.map(er)),e);return o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}(null,function(e,t){var r=function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=sr(n)).call.apply(t,[this].concat(s)))||"object"!==Gt(i)&&"function"!=typeof i?Xt(o):i,e(Xt(r)),r}return 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&&Zt(e,t)}(n,t),n}();return{F:r,d:[{kind:"field",decorators:[Object(n.f)()],key:"hass",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"_addons",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"_repos",value:void 0},{kind:"method",key:"refreshData",value:function(){var e=Qt(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._repos=void 0,this._addons=void 0,e.next=4,Object(z.k)(this.hass);case 4:return e.next=6,this._loadData();case 6:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"render",value:function(){var e=this;if(!this._addons||!this._repos)return Object(Tt.g)(Wt());var t=[],r=!0,n=!1,o=void 0;try{for(var i,a=function(){var r=i.value,n=e._addons.filter(function(e){return e.repository===r.slug});if(0===n.length)return"continue";t.push(Object(Tt.g)($t(),e.hass,r,n))},s=this._repos[Symbol.iterator]();!(r=(i=s.next()).done);r=!0)a()}catch(e){n=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw o}}return Object(Tt.g)(Jt(),this.hass,this._repos,t)}},{kind:"method",key:"firstUpdated",value:function(e){var t=this;ar(sr(r.prototype),"firstUpdated",this).call(this,e),this.addEventListener("hass-api-called",function(e){return t.apiCalled(e)}),this._loadData()}},{kind:"method",key:"apiCalled",value:function(e){e.detail.success&&this._loadData()}},{kind:"method",key:"_loadData",value:function(){var e=Qt(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(z.e)(this.hass);case 3:t=e.sent,this._repos=t.repositories,this._repos.sort(cr),this._addons=t.addons,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),alert("Failed to fetch add-on info");case 12:case"end":return e.stop()}},e,this,[[0,9]])}));return function(){return e.apply(this,arguments)}}()},{kind:"get",static:!0,key:"styles",value:function(){return Object(n.c)(Vt())}}]}},n.a);customElements.define("hassio-addon-store",lr);var ur=r(30),pr=r(100);function fr(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n paper-card {\n display: inline-block;\n width: 400px;\n margin-left: 8px;\n }\n .card-content {\n height: 200px;\n color: var(--primary-text-color);\n }\n @media screen and (max-width: 830px) {\n paper-card {\n margin-top: 8px;\n margin-left: 0;\n width: 100%;\n }\n .card-content {\n height: auto;\n }\n }\n .info {\n width: 100%;\n }\n .info td:nth-child(2) {\n text-align: right;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n mwc-button.info {\n max-width: calc(50% - 12px);\n }\n table.info {\n margin-bottom: 10px;\n }\n </style>\n <paper-card>\n <div class="card-content">\n <h2>Host system</h2>\n <table class="info">\n <tbody>\n <tr>\n <td>Hostname</td>\n <td>[[data.hostname]]</td>\n </tr>\n <tr>\n <td>System</td>\n <td>[[data.operating_system]]</td>\n </tr>\n <template is="dom-if" if="[[data.deployment]]">\n <tr>\n <td>Deployment</td>\n <td>[[data.deployment]]</td>\n </tr>\n </template>\n </tbody>\n </table>\n <mwc-button raised on-click="_showHardware" class="info">\n Hardware\n </mwc-button>\n <template is="dom-if" if="[[_featureAvailable(data, \'hostname\')]]">\n <mwc-button raised on-click="_changeHostnameClicked" class="info">\n Change hostname\n </mwc-button>\n </template>\n <template is="dom-if" if="[[errors]]">\n <div class="errors">Error: [[errors]]</div>\n </template>\n </div>\n <div class="card-actions">\n <template is="dom-if" if="[[_featureAvailable(data, \'reboot\')]]">\n <ha-call-api-button\n class="warning"\n hass="[[hass]]"\n path="hassio/host/reboot"\n >Reboot</ha-call-api-button\n >\n </template>\n <template is="dom-if" if="[[_featureAvailable(data, \'shutdown\')]]">\n <ha-call-api-button\n class="warning"\n hass="[[hass]]"\n path="hassio/host/shutdown"\n >Shutdown</ha-call-api-button\n >\n </template>\n <template is="dom-if" if="[[_featureAvailable(data, \'hassos\')]]">\n <ha-call-api-button\n class="warning"\n hass="[[hass]]"\n path="hassio/hassos/config/sync"\n title="Load HassOS configs or updates from USB"\n >Import from USB</ha-call-api-button\n >\n </template>\n <template is="dom-if" if="[[_computeUpdateAvailable(_hassOs)]]">\n <ha-call-api-button hass="[[hass]]" path="hassio/hassos/update"\n >Update</ha-call-api-button\n >\n </template>\n </div>\n </paper-card>\n ']);return fr=function(){return e},e}function dr(e){return(dr="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 hr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mr(e,t){return!t||"object"!==dr(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 yr(e,t,r){return(yr="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=vr(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 vr(e){return(vr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function br(e,t){return(br=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var gr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),mr(this,vr(t).apply(this,arguments))}var r,n,o;return 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&&br(e,t)}(t,Object(ur["a"])(V["a"])),r=t,o=[{key:"template",get:function(){return Object(G.a)(fr())}},{key:"properties",get:function(){return{hass:Object,data:{type:Object,observer:"_dataChanged"},errors:String,_hassOs:Object}}}],(n=[{key:"ready",value:function(){var e=this;yr(vr(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var t=e.detail.response;"object"===dr(t.body)?this.errors=t.body.message||"Unknown error":this.errors=t.body}}},{key:"_dataChanged",value:function(e){var t=this;e.features&&e.features.includes("hassos")?this.hass.callApi("get","hassio/hassos/info").then(function(e){t._hassOs=e.data}):this._hassOs={}}},{key:"_computeUpdateAvailable",value:function(e){return e&&e.version!==e.version_latest}},{key:"_featureAvailable",value:function(e,t){return e&&e.features&&e.features.includes(t)}},{key:"_showHardware",value:function(){var e=this;this.hass.callApi("get","hassio/hardware/info").then(function(t){return e._objectToMarkdown(t.data)},function(){return"Error getting hardware info"}).then(function(t){Object(pr.a)(e,{title:"Hardware",content:t})})}},{key:"_objectToMarkdown",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="";return Object.keys(e).forEach(function(o){"object"!==dr(e[o])?n+="".concat(r,"- ").concat(o,": ").concat(e[o],"\n"):(n+="".concat(r,"- ").concat(o,":\n"),Array.isArray(e[o])?e[o].length&&(n+="".concat(r," - ")+e[o].join("\n".concat(r," - "))+"\n"):n+=t._objectToMarkdown(e[o]," ".concat(r)))}),n}},{key:"_changeHostnameClicked",value:function(){var e=this.data.hostname,t=prompt("Please enter a new hostname:",e);t&&t!==e&&this.hass.callApi("post","hassio/host/options",{hostname:t})}}])&&hr(r.prototype,n),o&&hr(r,o),t}();function wr(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n paper-card {\n display: inline-block;\n width: 400px;\n }\n .card-content {\n height: 200px;\n color: var(--primary-text-color);\n }\n @media screen and (max-width: 830px) {\n paper-card {\n width: 100%;\n }\n .card-content {\n height: auto;\n }\n }\n .info {\n width: 100%;\n }\n .info td:nth-child(2) {\n text-align: right;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n </style>\n <paper-card>\n <div class="card-content">\n <h2>Hass.io supervisor</h2>\n <table class="info">\n <tbody>\n <tr>\n <td>Version</td>\n <td>[[data.version]]</td>\n </tr>\n <tr>\n <td>Latest version</td>\n <td>[[data.last_version]]</td>\n </tr>\n <template is="dom-if" if=\'[[!_equals(data.channel, "stable")]]\'>\n <tr>\n <td>Channel</td>\n <td>[[data.channel]]</td>\n </tr>\n </template>\n </tbody>\n </table>\n <template is="dom-if" if="[[errors]]">\n <div class="errors">Error: [[errors]]</div>\n </template>\n </div>\n <div class="card-actions">\n <ha-call-api-button hass="[[hass]]" path="hassio/supervisor/reload"\n >Reload</ha-call-api-button\n >\n <template is="dom-if" if="[[computeUpdateAvailable(data)]]">\n <ha-call-api-button hass="[[hass]]" path="hassio/supervisor/update"\n >Update</ha-call-api-button\n >\n </template>\n <template is="dom-if" if=\'[[_equals(data.channel, "beta")]]\'>\n <ha-call-api-button\n hass="[[hass]]"\n path="hassio/supervisor/options"\n data="[[leaveBeta]]"\n >Leave beta channel</ha-call-api-button\n >\n </template>\n <template is="dom-if" if=\'[[_equals(data.channel, "stable")]]\'>\n <mwc-button\n on-click="_joinBeta"\n class="warning"\n title="Get beta updates for Home Assistant (RCs), supervisor and host"\n >Join beta channel</mwc-button\n >\n </template>\n </div>\n </paper-card>\n ']);return wr=function(){return e},e}function kr(e){return(kr="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 Er(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Or(e,t){return!t||"object"!==kr(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 jr(e,t,r){return(jr="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=Pr(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 Pr(e){return(Pr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _r(e,t){return(_r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}customElements.define("hassio-host-info",gr);var Sr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Or(this,Pr(t).apply(this,arguments))}var r,n,o;return 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&&_r(e,t)}(t,Object(ur["a"])(V["a"])),r=t,o=[{key:"template",get:function(){return Object(G.a)(wr())}},{key:"properties",get:function(){return{hass:Object,data:Object,errors:String,leaveBeta:{type:Object,value:{channel:"stable"}}}}}],(n=[{key:"ready",value:function(){var e=this;jr(Pr(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var t=e.detail.response;"object"===kr(t.body)?this.errors=t.body.message||"Unknown error":this.errors=t.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}},{key:"_equals",value:function(e,t){return e===t}},{key:"_joinBeta",value:function(){var e=this;if(confirm("WARNING:\nBeta releases are for testers and early adopters and can contain unstable code changes. Make sure you have backups of your data before you activate this feature.\n\nThis inludes beta releases for:\n- Home Assistant (Release Candidates)\n- Hass.io supervisor\n- Host system")){var t="hassio/supervisor/options",r={channel:"beta"},n={method:"post",path:t,data:r};this.hass.callApi("post",t,r).then(function(e){n.success=!0,n.response=e},function(e){n.success=!1,n.response=e}).then(function(){e.fire("hass-api-called",n)})}}}])&&Er(r.prototype,n),o&&Er(r,o),t}();customElements.define("hassio-supervisor-info",Sr);var xr=r(101);function Cr(e){return(Cr="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 Tr(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style include="ha-style">\n paper-card {\n display: block;\n }\n pre {\n overflow-x: auto;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n }\n .fg-green {\n color: var(--primary-text-color) !important;\n }\n </style>\n ','\n <paper-card>\n <div class="card-content" id="content"></div>\n <div class="card-actions">\n <mwc-button on-click="refresh">Refresh</mwc-button>\n </div>\n </paper-card>\n ']);return Tr=function(){return e},e}function Dr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ar(e,t){return!t||"object"!==Cr(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 zr(e,t,r){return(zr="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=Rr(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 Rr(e){return(Rr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ir(e,t){return(Ir=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Fr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ar(this,Rr(t).apply(this,arguments))}var r,n,o;return 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&&Ir(e,t)}(t,V["a"]),r=t,o=[{key:"template",get:function(){return Object(G.a)(Tr(),xr.a)}},{key:"properties",get:function(){return{hass:Object}}}],(n=[{key:"ready",value:function(){zr(Rr(t.prototype),"ready",this).call(this),this.loadData()}},{key:"loadData",value:function(){var e=this;this.hass.callApi("get","hassio/supervisor/logs").then(function(t){for(;e.$.content.lastChild;)e.$.content.removeChild(e.$.content.lastChild);e.$.content.appendChild(Object(xr.b)(t))},function(){e.$.content.innerHTML='<span class="fg-red bold">Error fetching logs</span>'})}},{key:"refresh",value:function(){this.loadData()}}])&&Dr(r.prototype,n),o&&Dr(r,o),t}();function Lr(e){return(Lr="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 Hr(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n .content {\n margin: 4px;\n color: var(--primary-text-color);\n }\n .title {\n margin-top: 24px;\n color: var(--primary-text-color);\n font-size: 2em;\n padding-left: 8px;\n margin-bottom: 8px;\n }\n </style>\n <div class="content">\n <div class="title">Information</div>\n <hassio-supervisor-info\n hass="[[hass]]"\n data="[[supervisorInfo]]"\n ></hassio-supervisor-info>\n <hassio-host-info\n hass="[[hass]]"\n data="[[hostInfo]]"\n ></hassio-host-info>\n <div class="title">System log</div>\n <hassio-supervisor-log hass="[[hass]]"></hassio-supervisor-log>\n </div>\n ']);return Hr=function(){return e},e}function Ur(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nr(e,t){return!t||"object"!==Lr(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 Br(e){return(Br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Mr(e,t){return(Mr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}customElements.define("hassio-supervisor-log",Fr);var qr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Nr(this,Br(t).apply(this,arguments))}var r,n,o;return 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&&Mr(e,t)}(t,V["a"]),r=t,o=[{key:"template",get:function(){return Object(G.a)(Hr())}},{key:"properties",get:function(){return{hass:Object,supervisorInfo:Object,hostInfo:Object}}}],(n=null)&&Ur(r.prototype,n),o&&Ur(r,o),t}();function Gr(e){return(Gr="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 Vr(e){return(Vr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jr(e,t){return(Jr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wr(e){var t,r=Zr(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 Yr(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Kr(e){return e.decorators&&e.decorators.length}function Qr(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Xr(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 Zr(e){var t=function(e,t){if("object"!==Gr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Gr(t)?t:String(t)}customElements.define("hassio-system",qr);!function(e,t,r,n){var o=function(){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(!Kr(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=Zr(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){var t=this.toElementDescriptor(e),r=Xr(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=Xr(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(Qr(i.descriptor)||Qr(o.descriptor)){if(Kr(i)||Kr(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(Kr(i)){if(Kr(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}Yr(i,o)}else t.push(i)}return t}(a.d.map(Wr)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("hassio-tabs-router")],function(e,t){return{F:function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=Vr(n)).call.apply(t,[this].concat(s)))||"object"!==Gr(i)&&"function"!=typeof i?$r(o):i,e($r(r)),r}return 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&&Jr(e,t)}(n,t),n}(),d:[{kind:"field",decorators:[Object(n.f)()],key:"hass",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"supervisorInfo",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"hostInfo",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"hassInfo",value:void 0},{kind:"field",key:"routerOptions",value:function(){return{routes:{dashboard:{tag:"hassio-dashboard"},snapshots:{tag:"hassio-snapshots"},store:{tag:"hassio-addon-store"},system:{tag:"hassio-system"}}}}},{kind:"method",key:"updatePageEl",value:function(e){"setProperties"in e?e.setProperties({hass:this.hass,supervisorInfo:this.supervisorInfo,hostInfo:this.hostInfo,hassInfo:this.hassInfo}):(e.hass=this.hass,e.supervisorInfo=this.supervisorInfo,e.hostInfo=this.hostInfo,e.hassInfo=this.hassInfo)}}]}},A);var en=r(64);function tn(e){return(tn="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 rn(){var e=an(["\n :host {\n color: var(--primary-text-color);\n --paper-card-header-color: var(--primary-text-color);\n }\n paper-tabs {\n margin-left: 12px;\n --paper-tabs-selection-bar-color: #fff;\n text-transform: uppercase;\n }\n "]);return rn=function(){return e},e}function nn(){var e=an(['\n <paper-icon-button\n icon="hassio:refresh"\n @click=',"\n ></paper-icon-button>\n "]);return nn=function(){return e},e}function on(){var e=an(['\n <app-header-layout has-scrolling-region>\n <app-header fixed slot="header">\n <app-toolbar>\n <ha-menu-button hassio></ha-menu-button>\n <div main-title>Hass.io</div>\n ','\n </app-toolbar>\n <paper-tabs\n scrollable\n attr-for-selected="page-name"\n .selected=',"\n @iron-activate=",'\n >\n <paper-tab page-name="dashboard">Dashboard</paper-tab>\n <paper-tab page-name="snapshots">Snapshots</paper-tab>\n <paper-tab page-name="store">Add-on store</paper-tab>\n <paper-tab page-name="system">System</paper-tab>\n </paper-tabs>\n </app-header>\n <hassio-tabs-router\n .route=',"\n .hass=","\n .supervisorInfo=","\n .hostInfo=","\n .hassInfo=","\n ></hassio-tabs-router>\n </app-header-layout>\n "]);return on=function(){return e},e}function an(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function sn(e){return(sn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ln(e,t){return(ln=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function un(e){var t,r=mn(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 pn(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function fn(e){return e.decorators&&e.decorators.length}function dn(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function hn(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 mn(e){var t=function(e,t){if("object"!==tn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===tn(t)?t:String(t)}var yn=["store","snapshots"];!function(e,t,r,n){var o=function(){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(!fn(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=mn(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){var t=this.toElementDescriptor(e),r=hn(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=hn(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(dn(i.descriptor)||dn(o.descriptor)){if(fn(i)||fn(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(fn(i)){if(fn(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}pn(i,o)}else t.push(i)}return t}(a.d.map(un)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("hassio-pages-with-tabs")],function(e,t){return{F:function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=sn(n)).call.apply(t,[this].concat(s)))||"object"!==tn(i)&&"function"!=typeof i?cn(o):i,e(cn(r)),r}return 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&&ln(e,t)}(n,t),n}(),d:[{kind:"field",decorators:[Object(n.f)()],key:"hass",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"route",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"supervisorInfo",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"hostInfo",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"hassInfo",value:void 0},{kind:"method",key:"render",value:function(){var e=this._page;return Object(n.e)(on(),yn.includes(e)?Object(n.e)(nn(),this.refreshClicked):void 0,e,this.handlePageSelected,this.route,this.hass,this.supervisorInfo,this.hostInfo,this.hassInfo)}},{kind:"method",key:"handlePageSelected",value:function(e){var t,r,n,o,i,a,s,c=e.detail.item.getAttribute("page-name");c!==this._page&&Object(b.a)(this,"/hassio/".concat(c)),t=this,r=this.shadowRoot.querySelector("app-header-layout").header.scrollTarget,n=r,o=Math.random(),i=Date.now(),a=n.scrollTop,s=0-a,t._currentAnimationId=o,function e(){var r,c=Date.now()-i;c>200?n.scrollTop=0:t._currentAnimationId===o&&(n.scrollTop=(r=c,-s*(r/=200)*(r-2)+a),requestAnimationFrame(e.bind(t)))}.call(t)}},{kind:"method",key:"refreshClicked",value:function(){"snapshots"===this._page?this.shadowRoot.querySelector("hassio-snapshots").refreshData():this.shadowRoot.querySelector("hassio-addon-store").refreshData()}},{kind:"get",key:"_page",value:function(){return this.route.path.substr(1)}},{kind:"get",static:!0,key:"styles",value:function(){return[en.a,Object(n.c)(rn())]}}]}},n.a);function vn(e){return(vn="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 bn(e,t){return Cn(e)||function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}(e,t)||xn()}function gn(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function wn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kn(e,t){return(kn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function En(e){var t,r=Sn(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 On(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function jn(e){return e.decorators&&e.decorators.length}function Pn(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 Sn(e){var t=function(e,t){if("object"!==vn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===vn(t)?t:String(t)}function xn(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Cn(e){if(Array.isArray(e))return e}function Tn(e,t,r){return(Tn="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=Dn(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 Dn(e){return(Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.get("paper-icon-button").prototype._keyBindings={};var An;!function(e,t,r,n){var o=function(){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(!jn(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,Cn(t)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||xn()).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=Sn(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){var t=this.toElementDescriptor(e),r=_n(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(Pn(i.descriptor)||Pn(o.descriptor)){if(jn(i)||jn(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(jn(i)){if(jn(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}On(i,o)}else t.push(i)}return t}(a.d.map(En)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("hassio-main")],function(e,t){var i=function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=Dn(n)).call.apply(t,[this].concat(s)))||"object"!==vn(i)&&"function"!=typeof i?wn(o):i,e(wn(r)),r}return 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&&kn(e,t)}(n,t),n}();return{F:i,d:[{kind:"field",decorators:[Object(n.f)()],key:"hass",value:void 0},{kind:"field",key:"routerOptions",value:function(){var e=this;return{defaultPage:"dashboard",initialLoad:function(){return e._fetchData()},showLoading:!0,routes:{dashboard:{tag:"hassio-pages-with-tabs",cache:!0},snapshots:"dashboard",store:"dashboard",system:"dashboard",addon:{tag:"hassio-addon-view",load:function(){return Promise.all([r.e(0),r.e(11),r.e(12)]).then(r.bind(null,131))}},ingress:{tag:"hassio-ingress-view",load:function(){return r.e(13).then(r.bind(null,130))}}}}}},{kind:"field",decorators:[Object(n.f)()],key:"_supervisorInfo",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"_hostInfo",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"_hassInfo",value:void 0},{kind:"method",key:"firstUpdated",value:function(e){var t,r,n,a=this;Tn(Dn(i.prototype),"firstUpdated",this).call(this,e),function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e._themes||(e._themes={});var o=t.default_theme;("default"===r||r&&t.themes[r])&&(o=r);var i=Object.assign({},e._themes);if("default"!==o){var a=t.themes[o];Object.keys(a).forEach(function(t){var r="--"+t;e._themes[r]="",i[r]=a[t]})}if(e.updateStyles?e.updateStyles(i):window.ShadyCSS&&window.ShadyCSS.styleSubtree(e,i),n){var s=document.querySelector("meta[name=theme-color]");if(s){s.hasAttribute("default-content")||s.setAttribute("default-content",s.getAttribute("content"));var c=i["--primary-color"]||s.getAttribute("default-content");s.setAttribute("content",c)}}}(this,this.hass.themes,this.hass.selectedTheme,!0),this.addEventListener("hass-api-called",function(e){return a._apiCalled(e)}),this.addEventListener("hass-toggle-menu",function(){Object(o.a)(window.parent.customPanel,a.hass.dockedSidebar?"hass-close-menu":"hass-open-menu")}),window.addEventListener("location-changed",function(e){return Object(o.a)(a,e.type,e.detail,{bubbles:!1})}),t=this,r=document.body,t.addEventListener("show-dialog",(n=I(regeneratorRuntime.mark(function e(n){var o,i,a,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:o=n.detail,i=o.dialogTag,a=o.dialogImport,s=o.dialogParams,L(t,r,a,i,s);case 2:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}))}},{kind:"method",key:"updatePageEl",value:function(e){var t="HASSIO-PAGES-WITH-TABS"===e.nodeName?this.route:this.routeTail;"setProperties"in e?e.setProperties({hass:this.hass,supervisorInfo:this._supervisorInfo,hostInfo:this._hostInfo,hassInfo:this._hassInfo,route:t}):(e.hass=this.hass,e.supervisorInfo=this._supervisorInfo,e.hostInfo=this._hostInfo,e.hassInfo=this._hassInfo,e.route=t)}},{kind:"method",key:"_fetchData",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(){var t,r,n,o,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([Object(z.j)(this.hass),Object(z.g)(this.hass),Object(z.f)(this.hass)]);case 2:t=e.sent,r=bn(t,3),n=r[0],o=r[1],i=r[2],this._supervisorInfo=n,this._hostInfo=o,this._hassInfo=i;case 10:case"end":return e.stop()}},e,this)}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){gn(i,n,o,a,s,"next",e)}function s(e){gn(i,n,o,a,s,"throw",e)}a(void 0)})});return function(){return t.apply(this,arguments)}}()},{kind:"method",key:"_apiCalled",value:function(e){var t=this;if(e.detail.success){var r=1;!function e(){t._fetchData().catch(function(){r+=1,setTimeout(e,1e3*Math.min(r,5))})}()}}}]}},(An=A,function(e){function t(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(r=N(this,(e=M(t)).call.apply(e,[this].concat(o)))).hass=void 0,r.__provideHass=[],r}var r,n,o;return 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&&q(e,t)}(t,An),r=t,(n=[{key:"provideHass",value:function(e){this.__provideHass.push(e),e.hass=this.hass}},{key:"updated",value:function(e){var r=this;B(M(t.prototype),"updated",this).call(this,e),e.has("hass")&&this.__provideHass.forEach(function(e){e.hass=r.hass})}}])&&U(r.prototype,n),o&&U(r,o),t}()))},100:function(e,t,r){"use strict";r.d(t,"a",function(){return o});var n=r(27),o=function(e,t){Object(n.a)(e,"show-dialog",{dialogTag:"dialog-hassio-markdown",dialogImport:function(){return Promise.all([r.e(0),r.e(2)]).then(r.bind(null,120))},dialogParams:t})}},101:function(e,t,r){"use strict";r.d(t,"a",function(){return i}),r.d(t,"b",function(){return a});var n=r(4);function o(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n <style>\n .bold {\n font-weight: bold;\n }\n .italic {\n font-style: italic;\n }\n .underline {\n text-decoration: underline;\n }\n .strikethrough {\n text-decoration: line-through;\n }\n .underline.strikethrough {\n text-decoration: underline line-through;\n }\n .fg-red {\n color: rgb(222, 56, 43);\n }\n .fg-green {\n color: rgb(57, 181, 74);\n }\n .fg-yellow {\n color: rgb(255, 199, 6);\n }\n .fg-blue {\n color: rgb(0, 111, 184);\n }\n .fg-magenta {\n color: rgb(118, 38, 113);\n }\n .fg-cyan {\n color: rgb(44, 181, 233);\n }\n .fg-white {\n color: rgb(204, 204, 204);\n }\n .bg-black {\n background-color: rgb(0, 0, 0);\n }\n .bg-red {\n background-color: rgb(222, 56, 43);\n }\n .bg-green {\n background-color: rgb(57, 181, 74);\n }\n .bg-yellow {\n background-color: rgb(255, 199, 6);\n }\n .bg-blue {\n background-color: rgb(0, 111, 184);\n }\n .bg-magenta {\n background-color: rgb(118, 38, 113);\n }\n .bg-cyan {\n background-color: rgb(44, 181, 233);\n }\n .bg-white {\n background-color: rgb(204, 204, 204);\n }\n </style>\n"]);return o=function(){return e},e}var i=Object(n.a)(o());function a(e){for(var t,r=document.createElement("pre"),n=/\033(?:\[(.*?)[@-~]|\].*?(?:\007|\033\\))/g,o=0,i={bold:!1,italic:!1,underline:!1,strikethrough:!1,foregroundColor:null,backgroundColor:null},a=function(e){var t=document.createElement("span");i.bold&&t.classList.add("bold"),i.italic&&t.classList.add("italic"),i.underline&&t.classList.add("underline"),i.strikethrough&&t.classList.add("strikethrough"),null!==i.foregroundColor&&t.classList.add("fg-".concat(i.foregroundColor)),null!==i.backgroundColor&&t.classList.add("bg-".concat(i.backgroundColor)),t.appendChild(document.createTextNode(e)),r.appendChild(t)};null!==(t=n.exec(e));){var s=t.index;if(a(e.substring(o,s)),o=s+t[0].length,void 0!==t[1]){var c=!0,l=!1,u=void 0;try{for(var p,f=t[1].split(";")[Symbol.iterator]();!(c=(p=f.next()).done);c=!0){var d=p.value;switch(parseInt(d)){case 0:i.bold=!1,i.italic=!1,i.underline=!1,i.strikethrough=!1,i.foregroundColor=null,i.backgroundColor=null;break;case 1:i.bold=!0;break;case 3:i.italic=!0;break;case 4:i.underline=!0;break;case 9:i.strikethrough=!0;break;case 22:i.bold=!1;break;case 23:i.italic=!1;break;case 24:i.underline=!1;break;case 29:i.strikethrough=!1;break;case 30:i.foregroundColor=null;break;case 31:i.foregroundColor="red";break;case 32:i.foregroundColor="green";break;case 33:i.foregroundColor="yellow";break;case 34:i.foregroundColor="blue";break;case 35:i.foregroundColor="magenta";break;case 36:i.foregroundColor="cyan";break;case 37:i.foregroundColor="white";break;case 39:i.foregroundColor=null;break;case 40:i.backgroundColor="black";break;case 41:i.backgroundColor="red";break;case 42:i.backgroundColor="green";break;case 43:i.backgroundColor="yellow";break;case 44:i.backgroundColor="blue";break;case 45:i.backgroundColor="magenta";break;case 46:i.backgroundColor="cyan";break;case 47:i.backgroundColor="white";break;case 49:i.backgroundColor=null}}}catch(e){l=!0,u=e}finally{try{c||null==f.return||f.return()}finally{if(l)throw u}}}}return a(e.substring(o)),r}},26:function(e,t,r){"use strict";r(111),r(109);var n=r(64),o=document.createElement("template");o.setAttribute("style","display: none;"),o.innerHTML='<custom-style>\n <style>\n /*\n Home Assistant default styles.\n\n In Polymer 2.0, default styles should to be set on the html selector.\n (Setting all default styles only on body breaks shadyCSS polyfill.)\n See: https://github.com/home-assistant/home-assistant-polymer/pull/901\n */\n html {\n font-size: 14px;\n height: 100vh;\n\n /* text */\n --primary-text-color: #212121;\n --secondary-text-color: #727272;\n --text-primary-color: #ffffff;\n --disabled-text-color: #bdbdbd;\n\n /* main interface colors */\n --primary-color: #03a9f4;\n --dark-primary-color: #0288d1;\n --light-primary-color: #b3e5fC;\n --accent-color: #ff9800;\n --divider-color: rgba(0, 0, 0, .12);\n\n /* states and badges */\n --state-icon-color: #44739e;\n --state-icon-active-color: #FDD835;\n --state-icon-unavailable-color: var(--disabled-text-color);\n\n /* background and sidebar */\n --card-background-color: #ffffff;\n --primary-background-color: #fafafa;\n --secondary-background-color: #e5e5e5; /* behind the cards on state */\n\n /* sidebar menu */\n --sidebar-text-color: var(--primary-text-color);\n --sidebar-background-color: var(--paper-listbox-background-color); /* backward compatible with existing themes */\n --sidebar-icon-color: rgba(0, 0, 0, 0.5);\n --sidebar-selected-text-color: var(--primary-color);\n --sidebar-selected-icon-color: var(--primary-color);\n\n /* controls */\n --toggle-button-color: var(--primary-color);\n /* --toggle-button-unchecked-color: var(--accent-color); */\n --slider-color: var(--primary-color);\n --slider-secondary-color: var(--light-primary-color);\n --slider-bar-color: var(--disabled-text-color);\n\n /* for label-badge */\n --label-badge-background-color: white;\n --label-badge-text-color: rgb(76, 76, 76);\n --label-badge-red: #DF4C1E;\n --label-badge-blue: #039be5;\n --label-badge-green: #0DA035;\n --label-badge-yellow: #f4b400;\n --label-badge-grey: var(--paper-grey-500);\n\n /*\n Paper-styles color.html depency is stripped on build.\n When a default paper-style color is used, it needs to be copied\n from paper-styles/color.html to here.\n */\n\n --paper-grey-50: #fafafa; /* default for: --paper-toggle-button-unchecked-button-color */\n --paper-grey-200: #eeeeee; /* for ha-date-picker-style */\n --paper-grey-500: #9e9e9e; /* --label-badge-grey */\n\n /* for paper-spinner */\n --google-red-500: #db4437;\n --google-blue-500: #4285f4;\n --google-green-500: #0f9d58;\n --google-yellow-500: #f4b400;\n --paper-spinner-color: var(--primary-color);\n\n /* for paper-slider */\n --paper-green-400: #66bb6a;\n --paper-blue-400: #42a5f5;\n --paper-orange-400: #ffa726;\n\n /* opacity for dark text on a light background */\n --dark-divider-opacity: 0.12;\n --dark-disabled-opacity: 0.38; /* or hint text or icon */\n --dark-secondary-opacity: 0.54;\n --dark-primary-opacity: 0.87;\n\n /* opacity for light text on a dark background */\n --light-divider-opacity: 0.12;\n --light-disabled-opacity: 0.3; /* or hint text or icon */\n --light-secondary-opacity: 0.7;\n --light-primary-opacity: 1.0;\n\n /* derived colors, to keep existing themes mostly working */\n --paper-card-background-color: var(--card-background-color);\n --paper-listbox-background-color: var(--card-background-color);\n --paper-item-icon-color: var(--state-icon-color);\n --paper-item-icon-active-color: var(--state-icon-active-color);\n --table-row-background-color: var(--primary-background-color);\n --table-row-alternative-background-color: var(--secondary-background-color);\n\n /* set our toggle style */\n --paper-toggle-button-checked-ink-color: var(--toggle-button-color);\n --paper-toggle-button-checked-button-color: var(--toggle-button-color);\n --paper-toggle-button-checked-bar-color: var(--toggle-button-color);\n --paper-toggle-button-unchecked-button-color: var(--toggle-button-unchecked-color, var(--paper-grey-50));\n --paper-toggle-button-unchecked-bar-color: var(--toggle-button-unchecked-color, #000000);\n /* set our slider style */\n --paper-slider-knob-color: var(--slider-color);\n --paper-slider-knob-start-color: var(--slider-color);\n --paper-slider-pin-color: var(--slider-color);\n --paper-slider-active-color: var(--slider-color);\n --paper-slider-secondary-color: var(--slider-secondary-color);\n --paper-slider-container-color: var(--slider-bar-color);\n --ha-paper-slider-pin-font-size: 15px;\n\n /* mwc */\n --mdc-theme-primary: var(--primary-color);\n }\n </style>\n\n <style shady-unscoped="">\n /*\n prevent clipping of positioned elements in a small scrollable\n force smooth scrolling if can scroll\n use non-shady selectors so this only targets iOS 9\n conditional mixin set in ha-style-dialog does not work with shadyCSS\n */\n paper-dialog-scrollable:not(.can-scroll) > .scrollable {\n -webkit-overflow-scrolling: auto !important;\n }\n\n paper-dialog-scrollable.can-scroll > .scrollable {\n -webkit-overflow-scrolling: touch !important;\n }\n </style>\n</custom-style><dom-module id="ha-style">\n <template>\n <style>\n '.concat(n.a.cssText,'\n </style>\n </template>\n</dom-module><dom-module id="ha-style-dialog">\n <template>\n <style>\n ').concat(n.b.cssText,"\n </style>\n </template>\n</dom-module>"),document.head.appendChild(o.content)},27:function(e,t,r){"use strict";r.d(t,"a",function(){return n});var n=function(e,t,r,n){n=n||{},r=null==r?{}:r;var o=new Event(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return o.detail=r,e.dispatchEvent(o),o}},30:function(e,t,r){"use strict";var n=r(12),o=r(27);function i(e){return(i="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(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return!t||"object"!==i(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 c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}t.a=Object(n.a)(function(e){return function(t){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),s(this,c(r).apply(this,arguments))}var n,i,u;return 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),n=r,(i=[{key:"fire",value:function(e,t,r){return r=r||{},Object(o.a)(r.node||this,e,t,r)}}])&&a(n.prototype,i),u&&a(n,u),r}()})},32:function(e,t,r){"use strict";var n=r(8),o=(r(15),r(113),r(4)),i=r(9);function a(e){return(a="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 s(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n .container {\n position: relative;\n display: inline-block;\n }\n\n mwc-button {\n transition: all 1s;\n }\n\n .success mwc-button {\n --mdc-theme-primary: white;\n background-color: var(--google-green-500);\n transition: none;\n }\n\n .error mwc-button {\n --mdc-theme-primary: white;\n background-color: var(--google-red-500);\n transition: none;\n }\n\n .progress {\n @apply --layout;\n @apply --layout-center-center;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n </style>\n <div class="container" id="container">\n <mwc-button\n id="button"\n disabled="[[computeDisabled(disabled, progress)]]"\n on-click="buttonTapped"\n >\n <slot></slot>\n </mwc-button>\n <template is="dom-if" if="[[progress]]">\n <div class="progress"><paper-spinner active=""></paper-spinner></div>\n </template>\n </div>\n ']);return s=function(){return e},e}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return!t||"object"!==a(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 u(e,t,r){return(u="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=p(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 p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,p(t).apply(this,arguments))}var r,n,a;return 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&&f(e,t)}(t,i["a"]),r=t,a=[{key:"template",get:function(){return Object(o.a)(s())}},{key:"properties",get:function(){return{hass:{type:Object},progress:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1}}}}],(n=[{key:"tempClass",value:function(e){var t=this.$.container.classList;t.add(e),setTimeout(function(){t.remove(e)},1e3)}},{key:"ready",value:function(){var e=this;u(p(t.prototype),"ready",this).call(this),this.addEventListener("click",function(t){return e.buttonTapped(t)})}},{key:"buttonTapped",value:function(e){this.progress&&e.stopPropagation()}},{key:"actionSuccess",value:function(){this.tempClass("success")}},{key:"actionError",value:function(){this.tempClass("error")}},{key:"computeDisabled",value:function(e,t){return e||t}}])&&c(r.prototype,n),a&&c(r,a),t}();customElements.define("ha-progress-button",d);var h=r(27);function m(e){return(m="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 y(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function v(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <ha-progress-button\n .progress="','"\n @click="','"\n ?disabled="','"\n ><slot></slot\n ></ha-progress-button>\n ']);return v=function(){return e},e}function b(e,t){return!t||"object"!==m(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 g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t,r){return t&&w(e.prototype,t),r&&w(e,r),e}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var O=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=b(this,g(t).call(this))).method="POST",e.data={},e.disabled=!1,e.progress=!1,e}return 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&&E(e,t)}(t,n["a"]),k(t,[{key:"render",value:function(){return Object(n.e)(v(),this.progress,this._buttonTapped,this.disabled)}}]),k(t,[{key:"_buttonTapped",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.progress=!0,t={method:this.method,path:this.path,data:this.data},e.prev=2,e.next=5,this.hass.callApi(this.method,this.path,this.data);case 5:r=e.sent,this.progress=!1,this.progressButton.actionSuccess(),t.success=!0,t.response=r,e.next=18;break;case 12:e.prev=12,e.t0=e.catch(2),this.progress=!1,this.progressButton.actionError(),t.success=!1,t.response=e.t0;case 18:Object(h.a)(this,"hass-api-called",t);case 19:case"end":return e.stop()}},e,this,[[2,12]])}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,s,"next",e)}function s(e){y(i,n,o,a,s,"throw",e)}a(void 0)})});return function(){return t.apply(this,arguments)}}()},{key:"progressButton",get:function(){return this.renderRoot.querySelector("ha-progress-button")}}],[{key:"properties",get:function(){return{hass:{},progress:Boolean,path:String,method:String,data:{},disabled:Boolean}}}]),t}();customElements.define("ha-call-api-button",O)},35:function(e,t,r){"use strict";var n=r(8),o=(r(28),r(6)),i=r(9),a=[60,60,24,7],s=["second","minute","hour","day"];var c=r(12);function l(e){return(l="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 u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){return!t||"object"!==l(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 f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=Object(c.a)(function(e){return function(t){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),p(this,f(r).apply(this,arguments))}var n,o,i;return 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&&d(e,t)}(r,e),n=r,i=[{key:"properties",get:function(){return{hass:Object,localize:{type:Function,computed:"__computeLocalize(hass.localize)"}}}}],(o=[{key:"__computeLocalize",value:function(e){return e}}])&&u(n.prototype,o),i&&u(n,i),r}()});function m(e){return(m="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 y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t,r){return(v="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=b(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 b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function w(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),e}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){function t(){var e,r,n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,(e=!(n=b(t).call(this))||"object"!==m(n)&&"function"!=typeof n?y(r):n).updateRelative=e.updateRelative.bind(y(e)),e}return 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&&k(e,t)}(t,h(i["a"])),w(t,null,[{key:"properties",get:function(){return{hass:Object,datetime:{type:String,observer:"datetimeChanged"},datetimeObj:{type:Object,observer:"datetimeObjChanged"},parsedDateTime:Object}}}]),w(t,[{key:"connectedCallback",value:function(){v(b(t.prototype),"connectedCallback",this).call(this),this.updateInterval=setInterval(this.updateRelative,6e4)}},{key:"disconnectedCallback",value:function(){v(b(t.prototype),"disconnectedCallback",this).call(this),clearInterval(this.updateInterval)}},{key:"datetimeChanged",value:function(e){this.parsedDateTime=e?new Date(e):null,this.updateRelative()}},{key:"datetimeObjChanged",value:function(e){this.parsedDateTime=e,this.updateRelative()}},{key:"updateRelative",value:function(){var e=Object(o.a)(this);this.parsedDateTime?e.innerHTML=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=((n.compareTime||new Date).getTime()-e.getTime())/1e3,i=o>=0?"past":"future";o=Math.abs(o);for(var c=0;c<a.length;c++){if(o<a[c]){o=Math.floor(o),r=t("ui.components.relative_time.duration.".concat(s[c]),"count",o);break}o/=a[c]}return void 0===r&&(r=t("ui.components.relative_time.duration.week","count",o=Math.floor(o))),!1===n.includeTense?r:t("ui.components.relative_time.".concat(i),"time",r)}(this.parsedDateTime,this.localize):e.innerHTML=this.localize("ui.components.relative_time.never")}}]),t}();function O(e){return(O="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 j(){var e=S(["\n iron-icon {\n margin-right: 16px;\n margin-top: 16px;\n float: left;\n color: var(--secondary-text-color);\n }\n iron-icon.update {\n color: var(--paper-orange-400);\n }\n iron-icon.running,\n iron-icon.installed {\n color: var(--paper-green-400);\n }\n iron-icon.hassupdate,\n iron-icon.snapshot {\n color: var(--paper-item-icon-color);\n }\n iron-icon.not_available {\n color: var(--google-red-500);\n }\n .title {\n color: var(--primary-text-color);\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n .addition {\n color: var(--secondary-text-color);\n overflow: hidden;\n position: relative;\n height: 2.4em;\n line-height: 1.2em;\n }\n ha-relative-time {\n display: block;\n }\n "]);return j=function(){return e},e}function P(){var e=S(["\n <ha-relative-time\n .hass=",'\n class="addition"\n .datetime=',"\n ></ha-relative-time>\n "]);return P=function(){return e},e}function _(){var e=S(["\n <iron-icon\n class=","\n .icon=","\n .title=",'\n ></iron-icon>\n <div>\n <div class="title">','</div>\n <div class="addition">\n ',"\n ","\n ","\n </div>\n </div>\n "]);return _=function(){return e},e}function S(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D(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 A(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 R(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function I(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"!==O(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===O(t)?t:String(t)}customElements.define("ha-relative-time",E);!function(e,t,r,n){var o=function(){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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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){var t=this.toElementDescriptor(e),r=I(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=I(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(R(i.descriptor)||R(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}A(i,o)}else t.push(i)}return t}(a.d.map(D)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("hassio-card-content")],function(e,t){return{F:function(r){function n(){var t,r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return o=this,r=!(i=(t=x(n)).call.apply(t,[this].concat(s)))||"object"!==O(i)&&"function"!=typeof i?C(o):i,e(C(r)),r}return 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&&T(e,t)}(n,t),n}(),d:[{kind:"field",decorators:[Object(n.f)()],key:"hass",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"title",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"description",value:void 0},{kind:"field",decorators:[Object(n.f)({type:Boolean})],key:"available",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"datetime",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"iconTitle",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"iconClass",value:void 0},{kind:"field",decorators:[Object(n.f)()],key:"icon",value:function(){return"hass:help-circle"}},{kind:"method",key:"render",value:function(){return Object(n.e)(_(),this.iconClass,this.icon,this.iconTitle,this.title,this.description,!1===this.available?" (Not available)":"",this.datetime?Object(n.e)(P(),this.hass,this.datetime):void 0)}},{kind:"get",static:!0,key:"styles",value:function(){return Object(n.c)(j())}}]}},n.a)},42:function(e,t,r){"use strict";r.d(t,"a",function(){return o});var n=r(27),o=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r?history.replaceState(null,"",t):history.pushState(null,"",t),Object(n.a)(window,"location-changed",{replace:r})}},43:function(e,t,r){"use strict";function n(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}r.d(t,"c",function(){return i}),r.d(t,"k",function(){return a}),r.d(t,"e",function(){return s}),r.d(t,"d",function(){return c}),r.d(t,"j",function(){return l}),r.d(t,"g",function(){return u}),r.d(t,"f",function(){return p}),r.d(t,"i",function(){return f}),r.d(t,"l",function(){return d}),r.d(t,"a",function(){return h}),r.d(t,"b",function(){return m}),r.d(t,"h",function(){return y});var o=function(e){return e.data},i=function(){var e,t=(e=regeneratorRuntime.mark(function e(t){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.callApi("POST","hassio/ingress/session");case 2:r=e.sent,document.cookie="ingress_session=".concat(r.data.session,";path=/api/hassio_ingress/");case 4:case"end":return e.stop()}},e)}),function(){var t=this,r=arguments;return new Promise(function(o,i){var a=e.apply(t,r);function s(e){n(a,o,i,s,c,"next",e)}function c(e){n(a,o,i,s,c,"throw",e)}s(void 0)})});return function(e){return t.apply(this,arguments)}}(),a=function(e){return e.callApi("POST","hassio/addons/reload")},s=function(e){return e.callApi("GET","hassio/addons").then(o)},c=function(e,t){return e.callApi("GET","hassio/addons/".concat(t,"/info")).then(o)},l=function(e){return e.callApi("GET","hassio/supervisor/info").then(o)},u=function(e){return e.callApi("GET","hassio/host/info").then(o)},p=function(e){return e.callApi("GET","hassio/homeassistant/info").then(o)},f=function(e){return e.callApi("GET","hassio/snapshots").then(function(e){return e.data.snapshots})},d=function(e){return e.callApi("POST","hassio/snapshots/reload")},h=function(e,t){return e.callApi("POST","hassio/snapshots/new/full",t)},m=function(e,t){return e.callApi("POST","hassio/snapshots/new/partial",t)},y=function(e,t){return e.callApi("GET","hassio/snapshots/".concat(t,"/info")).then(o)}},64:function(e,t,r){"use strict";r.d(t,"a",function(){return s}),r.d(t,"b",function(){return c});var n=r(8);function o(){var e=a(["\n /* prevent clipping of positioned elements */\n paper-dialog-scrollable {\n --paper-dialog-scrollable: {\n -webkit-overflow-scrolling: auto;\n }\n }\n\n /* force smooth scrolling for iOS 10 */\n paper-dialog-scrollable.can-scroll {\n --paper-dialog-scrollable: {\n -webkit-overflow-scrolling: touch;\n }\n }\n\n .paper-dialog-buttons {\n align-items: flex-end;\n padding: 8px;\n }\n\n .paper-dialog-buttons .warning {\n --mdc-theme-primary: var(--google-red-500);\n }\n\n @media all and (max-width: 450px), all and (max-height: 500px) {\n paper-dialog,\n ha-paper-dialog {\n margin: 0;\n width: 100% !important;\n max-height: calc(100% - 64px);\n\n position: fixed !important;\n bottom: 0px;\n left: 0px;\n right: 0px;\n overflow: scroll;\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n }\n"]);return o=function(){return e},e}function i(){var e=a(["\n :host {\n @apply --paper-font-body1;\n }\n\n app-header-layout,\n ha-app-layout {\n background-color: var(--primary-background-color);\n }\n\n app-header,\n app-toolbar {\n background-color: var(--primary-color);\n font-weight: 400;\n color: var(--text-primary-color, white);\n }\n\n app-toolbar ha-menu-button + [main-title],\n app-toolbar ha-paper-icon-button-arrow-prev + [main-title],\n app-toolbar paper-icon-button + [main-title] {\n margin-left: 24px;\n }\n\n h1 {\n @apply --paper-font-title;\n }\n\n button.link {\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n text-align: left;\n text-decoration: underline;\n cursor: pointer;\n }\n\n .card-actions a {\n text-decoration: none;\n }\n\n .card-actions .warning {\n --mdc-theme-primary: var(--google-red-500);\n }\n"]);return i=function(){return e},e}function a(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var s=Object(n.c)(i()),c=Object(n.c)(o())},66:function(e,t,r){"use strict";r(25);var n=r(8),o=r(27);function i(e){return(i="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=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n <paper-icon-button\n .icon=","\n @click=","\n ></paper-icon-button>\n "]);return a=function(){return e},e}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t,r=m(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 p(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function f(e){return e.decorators&&e.decorators.length}function d(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function h(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 m(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}!function(e,t,r,n){var o=function(){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(!f(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=m(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){var t=this.toElementDescriptor(e),r=h(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=h(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(d(i.descriptor)||d(o.descriptor)){if(f(i)||f(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(f(i)){if(f(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}p(i,o)}else t.push(i)}return t}(a.d.map(u)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("ha-menu-button")],function(e,t){return{F:function(r){function n(){var t,r,o,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var l=arguments.length,u=new Array(l),p=0;p<l;p++)u[p]=arguments[p];return o=this,r=!(a=(t=s(n)).call.apply(t,[this].concat(u)))||"object"!==i(a)&&"function"!=typeof a?c(o):a,e(c(r)),r}return 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)}(n,t),n}(),d:[{kind:"field",decorators:[Object(n.f)({type:Boolean})],key:"hassio",value:function(){return!1}},{kind:"method",key:"render",value:function(){return Object(n.e)(a(),this.hassio?"hassio:menu":"hass:menu",this._toggleMenu)}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"_toggleMenu",value:function(){Object(o.a)(this,"hass-toggle-menu")}}]}},n.a)},87:function(e,t,r){"use strict";var n=r(8);r(66),r(88);function o(e){return(o="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 i(){var e=l(['\n :host {\n display: block;\n height: 100%;\n background-color: var(--primary-background-color);\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n font-size: 20px;\n height: 64px;\n padding: 0 16px;\n pointer-events: none;\n background-color: var(--primary-color);\n font-weight: 400;\n color: var(--text-primary-color, white);\n }\n\n ha-menu-button,\n ha-paper-icon-button-arrow-prev,\n ::slotted([slot="toolbar-icon"]) {\n pointer-events: auto;\n }\n\n [main-title] {\n margin: 0 0 0 24px;\n line-height: 20px;\n flex-grow: 1;\n }\n\n .content {\n position: relative;\n width: 100%;\n height: calc(100% - 64px);\n overflow-y: auto;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n }\n ']);return i=function(){return e},e}function a(){var e=l(["\n <ha-paper-icon-button-arrow-prev\n .hassio=","\n @click=","\n ></ha-paper-icon-button-arrow-prev>\n "]);return a=function(){return e},e}function s(){var e=l(["\n <ha-menu-button .hassio=","></ha-menu-button>\n "]);return s=function(){return e},e}function c(){var e=l(['\n <div class="toolbar">\n ',"\n\n <div main-title>",'</div>\n <slot name="toolbar-icon"></slot>\n </div>\n <div class="content"><slot></slot></div>\n ']);return c=function(){return e},e}function l(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t,r=b(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 h(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function m(e){return e.decorators&&e.decorators.length}function y(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function v(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 b(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}!function(e,t,r,n){var o=function(){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(!m(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=b(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){var t=this.toElementDescriptor(e),r=v(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=v(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(y(i.descriptor)||y(o.descriptor)){if(m(i)||m(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(m(i)){if(m(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}h(i,o)}else t.push(i)}return t}(a.d.map(d)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("hass-subpage")],function(e,t){return{F:function(r){function n(){var t,r,i,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return i=this,r=!(a=(t=u(n)).call.apply(t,[this].concat(c)))||"object"!==o(a)&&"function"!=typeof a?p(i):a,e(p(r)),r}return 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&&f(e,t)}(n,t),n}(),d:[{kind:"field",decorators:[Object(n.f)()],key:"header",value:void 0},{kind:"field",decorators:[Object(n.f)({type:Boolean})],key:"root",value:function(){return!1}},{kind:"field",decorators:[Object(n.f)({type:Boolean})],key:"hassio",value:function(){return!1}},{kind:"method",key:"render",value:function(){return Object(n.e)(c(),this.root?Object(n.e)(s(),this.hassio):Object(n.e)(a(),this.hassio,this._backTapped),this.header)}},{kind:"method",key:"_backTapped",value:function(){history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return Object(n.c)(i())}}]}},n.a)},88:function(e,t,r){"use strict";r(25);function n(e){return(n="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 o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return!t||"object"!==n(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 a(e,t,r){return(a="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=s(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 s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=customElements.get("paper-icon-button"),u=function(e){function t(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return(r=i(this,(e=s(t)).call.apply(e,[this].concat(o)))).hassio=void 0,r}var r,n,u;return 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&&c(e,t)}(t,l),r=t,(n=[{key:"connectedCallback",value:function(){this.icon="ltr"===window.getComputedStyle(this).direction?this.hassio?"hassio:arrow-left":"hass:arrow-left":this.hassio?"hassio:arrow-right":"hass:arrow-right",a(s(t.prototype),"connectedCallback",this).call(this)}}])&&o(r.prototype,n),u&&o(r,u),t}();customElements.define("ha-paper-icon-button-arrow-prev",u)},89:function(e,t,r){"use strict";r(41),r(90);var n=r(8),o=(r(66),r(88),r(64));function i(e){return(i="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=u(["\n .content {\n height: calc(100% - 64px);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n "]);return a=function(){return e},e}function s(){var e=u(["\n <ha-paper-icon-button-arrow-prev\n @click=","\n ></ha-paper-icon-button-arrow-prev>\n "]);return s=function(){return e},e}function c(){var e=u(["\n <ha-menu-button></ha-menu-button>\n "]);return c=function(){return e},e}function l(){var e=u(["\n <app-toolbar>\n ",'\n </app-toolbar>\n <div class="content">\n <paper-spinner-lite active></paper-spinner-lite>\n </div>\n ']);return l=function(){return e},e}function u(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t,r=g(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 m(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function y(e){return e.decorators&&e.decorators.length}function v(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function b(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 g(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}!function(e,t,r,n){var o=function(){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(!y(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(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()).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=g(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){var t=this.toElementDescriptor(e),r=b(e,"finisher"),n=this.toElementDescriptors(e.extras);return{element:t,finisher:r,extras:n}},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=b(e,"finisher"),n=this.toElementDescriptors(e.elements);return{elements:n,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}();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(v(i.descriptor)||v(o.descriptor)){if(y(i)||y(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(y(i)){if(y(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}m(i,o)}else t.push(i)}return t}(a.d.map(h)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([Object(n.d)("hass-loading-screen")],function(e,t){return{F:function(r){function n(){var t,r,o,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return o=this,r=!(a=(t=p(n)).call.apply(t,[this].concat(c)))||"object"!==i(a)&&"function"!=typeof a?f(o):a,e(f(r)),r}return 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&&d(e,t)}(n,t),n}(),d:[{kind:"field",decorators:[Object(n.f)({type:Boolean})],key:"rootnav",value:function(){return!1}},{kind:"method",key:"render",value:function(){return Object(n.e)(l(),this.rootnav?Object(n.e)(c()):Object(n.e)(s(),this._handleBack))}},{kind:"method",key:"_handleBack",value:function(){history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[o.a,Object(n.c)(a())]}}]}},n.a)}}]); |