ha-supervisor/supervisor/api/panel/frontend_es5/05fc2212.js

1 line
200 KiB
JavaScript

"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[9872],{49872:function(e,t,r){r.r(t);var n=r(37500),i=r(63550),o=r(14516),a=r(47181),s=r(83849),c=r(15493),l=(r(34552),r(34154)),d=r(41682),u=r(28166),p=r(26765),f=(r(48811),r(21625),r(1359),r(11654)),h=r(55677),m=(r(51187),r(44577),r(32594)),v=(r(98762),r(9381),r(22098),r(86248),r(20258));function y(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}var b,g,w,k,E,_,C,x=function(){var e,t=(e=regeneratorRuntime.mark((function e(t,r,n,i){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.g7)(t,{title:n.localize("dialog.restart_addon.title",{name:i.name}),text:n.localize("dialog.restart_addon.text"),confirmText:n.localize("dialog.restart_addon.restart"),dismissText:n.localize("common.cancel")});case 2:if(!e.sent){e.next=12;break}return e.prev=4,e.next=7,(0,l.P$)(r,i.slug);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),(0,p.Ys)(t,{title:n.localize("common.failed_to_restart_name",{name:i.name}),text:(0,d.js)(e.t0)});case 12:case"end":return e.stop()}}),e,null,[[4,9]])})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){y(o,n,i,a,s,"next",e)}function s(e){y(o,n,i,a,s,"throw",e)}a(void 0)}))});return function(e,r,n,i){return t.apply(this,arguments)}}();function P(e){return P="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},P(e)}function A(e){return function(e){if(Array.isArray(e))return N(e)}(e)||$(e)||Z(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){O(o,n,i,a,s,"next",e)}function s(e){O(o,n,i,a,s,"throw",e)}a(void 0)}))}}function D(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){return j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},j(e,t)}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Q(e);if(t){var i=Q(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return H(this,r)}}function H(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V(){V=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!I(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.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)||$(t)||Z(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=U(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:B(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=B(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function L(e){var t,r=U(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 I(e){return e.decorators&&e.decorators.length}function F(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 U(e){var t=function(e,t){if("object"!==P(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===P(t)?t:String(t)}function Z(e,t){if(e){if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N(e,t):void 0}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function q(e,t,r){return q="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=Q(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}},q(e,t,r||e)}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}!function(e,t,r,n){var i=V();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(F(o.descriptor)||F(i.descriptor)){if(I(o)||I(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(I(o)){if(I(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}M(o,i)}else t.push(o)}return t}(a.d.map(L)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("hassio-addon-audio")],(function(e,t){var r,o,a=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(n,t);var r=T(n);function n(){var t;z(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(R(t)),t}return n}(t);return{F:a,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_inputDevices",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_outputDevices",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_selectedInput",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_selectedOutput",value:void 0},{kind:"method",key:"render",value:function(){return(0,n.dy)(b||(b=D(["\n <ha-card\n outlined\n .header=",'\n >\n <div class="card-content">\n ',"\n ","\n ",'\n </div>\n <div class="card-actions">\n <ha-progress-button @click=',">\n ","\n </ha-progress-button>\n </div>\n </ha-card>\n "])),this.supervisor.localize("addon.configuration.audio.header"),this._error?(0,n.dy)(g||(g=D(['<ha-alert alert-type="error">',"</ha-alert>"])),this._error):"",this._inputDevices&&(0,n.dy)(w||(w=D(["<ha-select\n .label=","\n @selected=","\n @closed=","\n fixedMenuPosition\n naturalMenuWidth\n .value=","\n >\n ","\n </ha-select>"])),this.supervisor.localize("addon.configuration.audio.input"),this._setInputDevice,m.U,this._selectedInput,this._inputDevices.map((function(e){return(0,n.dy)(k||(k=D(["\n <mwc-list-item .value=",">\n ","\n </mwc-list-item>\n "])),e.device||"",e.name)}))),this._outputDevices&&(0,n.dy)(E||(E=D(["<ha-select\n .label=","\n @selected=","\n @closed=","\n fixedMenuPosition\n naturalMenuWidth\n .value=","\n >\n ","\n </ha-select>"])),this.supervisor.localize("addon.configuration.audio.output"),this._setOutputDevice,m.U,this._selectedOutput,this._outputDevices.map((function(e){return(0,n.dy)(_||(_=D(["\n <mwc-list-item .value=","\n >","</mwc-list-item\n >\n "])),e.device||"",e.name)}))),this._saveSettings,this.supervisor.localize("common.save"))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(C||(C=D(["\n :host,\n ha-card {\n display: block;\n }\n paper-item {\n width: 450px;\n }\n .card-actions {\n text-align: right;\n }\n ha-select {\n width: 100%;\n }\n ha-select:last-child {\n margin-top: 8px;\n }\n "])))]}},{kind:"method",key:"willUpdate",value:function(e){q(Q(a.prototype),"willUpdate",this).call(this,e),e.has("addon")&&this._addonChanged()}},{kind:"method",key:"_setInputDevice",value:function(e){var t=e.target.value;this._selectedInput=t}},{kind:"method",key:"_setOutputDevice",value:function(e){var t=e.target.value;this._selectedOutput=t}},{kind:"method",key:"_addonChanged",value:(o=S(regeneratorRuntime.mark((function e(){var t,r,n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._selectedInput=null===this.addon.audio_input?"default":this.addon.audio_input,this._selectedOutput=null===this.addon.audio_output?"default":this.addon.audio_output,!this._outputDevices){e.next=4;break}return e.abrupt("return");case 4:return t={device:"default",name:this.supervisor.localize("addon.configuration.audio.default")},e.prev=5,e.next=8,(0,v.G)(this.hass);case 8:r=e.sent,n=r.audio,i=Object.keys(n.input).map((function(e){return{device:e,name:n.input[e]}})),o=Object.keys(n.output).map((function(e){return{device:e,name:n.output[e]}})),this._inputDevices=[t].concat(A(i)),this._outputDevices=[t].concat(A(o)),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(5),this._error="Failed to fetch audio hardware",this._inputDevices=[t],this._outputDevices=[t];case 21:case"end":return e.stop()}}),e,this,[[5,16]])}))),function(){return o.apply(this,arguments)})},{kind:"method",key:"_saveSettings",value:(r=S(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,this._error=void 0,n={audio_input:"default"===this._selectedInput?null:this._selectedInput,audio_output:"default"===this._selectedOutput?null:this._selectedOutput},e.prev=4,e.next=7,(0,l.d3)(this.hass,this.addon.slug,n);case 7:if("started"!==(null===(i=this.addon)||void 0===i?void 0:i.state)){e.next=10;break}return e.next=10,x(this,this.hass,this.supervisor,this.addon);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),this._error="Failed to set addon audio device";case 15:r.progress=!1;case 16:case"end":return e.stop()}}),e,this,[[4,12]])}))),function(e){return r.apply(this,arguments)})}]}}),n.oi);var Y,W,K,G,J,X,ee,te=r(77426);r(81545),r(63727),r(83927),r(66255),r(4019),r(18900);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},re(e)}function ne(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function ie(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){ne(o,n,i,a,s,"next",e)}function s(e){ne(o,n,i,a,s,"throw",e)}a(void 0)}))}}function oe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function se(e,t){return se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},se(e,t)}function ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=we(e);if(t){var i=we(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return le(this,r)}}function le(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return de(e)}function de(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ue(){ue=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!he(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return be(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?be(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=ye(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:ve(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=ve(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function pe(e){var t,r=ye(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 fe(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function he(e){return e.decorators&&e.decorators.length}function me(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function ve(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 ye(e){var t=function(e,t){if("object"!==re(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==re(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===re(t)?t:String(t)}function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ge(e,t,r){return ge="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=we(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}},ge(e,t,r||e)}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}var ke,Ee,_e,Ce,xe,Pe=["string","select","boolean","integer","float","schema"],Ae=te.oW.extend([new te.Dy("!secret",{kind:"scalar",construct:function(e){return"!secret ".concat(e)}})]),Oe=["password","secret","token"];!function(e,t,r,n){var i=ue();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(me(o.descriptor)||me(i.descriptor)){if(he(o)||he(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(he(o)){if(he(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}fe(o,i)}else t.push(o)}return t}(a.d.map(pe)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("hassio-addon-config")],(function(e,t){var r,s,c=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&se(e,t)}(n,t);var r=ce(n);function n(){var t;ae(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(de(t)),t}return n}(t);return{F:c,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({type:Boolean})],key:"_configHasChanged",value:function(){return!1}},{kind:"field",decorators:[(0,i.Cb)({type:Boolean})],key:"_valid",value:function(){return!0}},{kind:"field",decorators:[(0,i.SB)()],key:"_canShowSchema",value:function(){return!1}},{kind:"field",decorators:[(0,i.SB)()],key:"_showOptional",value:function(){return!1}},{kind:"field",decorators:[(0,i.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_options",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_yamlMode",value:function(){return!1}},{kind:"field",decorators:[(0,i.IO)("ha-yaml-editor")],key:"_editor",value:void 0},{kind:"field",key:"computeLabel",value:function(){var e=this;return function(t){var r,n,i,o,a,s;return(null===(r=e.addon.translations[e.hass.language])||void 0===r||null===(n=r.configuration)||void 0===n||null===(i=n[t.name])||void 0===i?void 0:i.name)||(null===(o=e.addon.translations.en)||void 0===o||null===(a=o.configuration)||void 0===a||null===(s=a[t.name])||void 0===s?void 0:s.name)||t.name}}},{kind:"field",key:"computeHelper",value:function(){var e=this;return function(t){var r,n,i,o,a,s;return(null===(r=e.addon.translations[e.hass.language])||void 0===r||null===(n=r.configuration)||void 0===n||null===(i=n[t.name])||void 0===i?void 0:i.description)||(null===(o=e.addon.translations.en)||void 0===o||null===(a=o.configuration)||void 0===a||null===(s=a[t.name])||void 0===s?void 0:s.description)||""}}},{kind:"field",key:"_convertSchema",value:function(){return(0,o.Z)((function(e){return e.map((function(e){return"select"===e.type?{name:e.name,required:e.required,selector:{select:{options:e.options}}}:"string"===e.type?e.multiple?{name:e.name,required:e.required,selector:{select:{options:[],multiple:!0,custom_value:!0}}}:{name:e.name,required:e.required,selector:{text:{type:e.format||Oe.includes(e.name)?"password":"text"}}}:"boolean"===e.type?{name:e.name,required:e.required,selector:{boolean:{}}}:"schema"===e.type?{name:e.name,required:e.required,selector:{object:{}}}:"float"===e.type||"integer"===e.type?{name:e.name,required:e.required,selector:{number:{mode:"box"}}}:e}))}))}},{kind:"field",key:"_filteredShchema",value:function(){return(0,o.Z)((function(e,t){return t.filter((function(t){return t.name in e||t.required}))}))}},{kind:"method",key:"render",value:function(){var e=!this._yamlMode&&this._canShowSchema&&this.addon.schema,t=e&&JSON.stringify(this.addon.schema)!==JSON.stringify(this._filteredShchema(this.addon.options,this.addon.schema));return(0,n.dy)(Y||(Y=oe(["\n <h1>",'</h1>\n <ha-card outlined>\n <div class="header">\n <h2>\n ','\n </h2>\n <div class="card-menu">\n <ha-button-menu corner="BOTTOM_START" @action=',">\n <ha-icon-button\n .label=","\n .path=",'\n slot="trigger"\n ></ha-icon-button>\n <mwc-list-item .disabled=',">\n ",'\n </mwc-list-item>\n <mwc-list-item class="warning">\n ','\n </mwc-list-item>\n </ha-button-menu>\n </div>\n </div>\n\n <div class="card-content">\n ',"\n ","\n ","\n </div>\n ",'\n <div class="card-actions right">\n <ha-progress-button\n @click=',"\n .disabled=","\n >\n ","\n </ha-progress-button>\n </div>\n </ha-card>\n "])),this.addon.name,this.supervisor.localize("addon.configuration.options.header"),this._handleAction,this.supervisor.localize("common.menu"),"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",!this._canShowSchema,this._yamlMode?this.supervisor.localize("addon.configuration.options.edit_in_ui"):this.supervisor.localize("addon.configuration.options.edit_in_yaml"),this.supervisor.localize("common.reset_defaults"),e?(0,n.dy)(W||(W=oe(["<ha-form\n .data=","\n @value-changed=","\n .computeLabel=","\n .computeHelper=","\n .schema=","\n ></ha-form>"])),this._options,this._configChanged,this.computeLabel,this.computeHelper,this._convertSchema(this._showOptional?this.addon.schema:this._filteredShchema(this.addon.options,this.addon.schema))):(0,n.dy)(K||(K=oe([" <ha-yaml-editor\n @value-changed=","\n .yamlSchema=","\n ></ha-yaml-editor>"])),this._configChanged,Ae),this._error?(0,n.dy)(G||(G=oe(['<ha-alert alert-type="error">',"</ha-alert>"])),this._error):"",!this._yamlMode||this._canShowSchema&&this.addon.schema||this._valid?"":(0,n.dy)(J||(J=oe(['\n <ha-alert alert-type="error">\n ',"\n </ha-alert>\n "])),this.supervisor.localize("addon.configuration.options.invalid_yaml")),t?(0,n.dy)(X||(X=oe(['<ha-formfield\n class="show-additional"\n .label=',"\n >\n <ha-switch\n @change=","\n .checked=","\n >\n </ha-switch>\n </ha-formfield>"])),this.supervisor.localize("addon.configuration.options.show_unused_optional"),this._toggleOptional,this._showOptional):"",this._saveTapped,!this._configHasChanged||!this._valid,this.supervisor.localize("common.save"))}},{kind:"method",key:"firstUpdated",value:function(e){ge(we(c.prototype),"firstUpdated",this).call(this,e),this._canShowSchema=!this.addon.schema.find((function(e){return!Pe.includes(e.type)})),this._yamlMode=!this._canShowSchema}},{kind:"method",key:"updated",value:function(e){if(e.has("addon")&&(this._options=Object.assign({},this.addon.options)),ge(we(c.prototype),"updated",this).call(this,e),(e.has("_yamlMode")||e.has("_options"))&&this._yamlMode){var t=this._editor;t&&t.setValue(this._options)}}},{kind:"method",key:"_handleAction",value:function(e){switch(e.detail.index){case 0:this._yamlMode=!this._yamlMode;break;case 1:this._resetTapped(e)}}},{kind:"method",key:"_toggleOptional",value:function(){this._showOptional=!this._showOptional}},{kind:"method",key:"_configChanged",value:function(e){this.addon.schema&&this._canShowSchema&&!this._yamlMode?(this._valid=!0,this._configHasChanged=!0,this._options=e.detail.value):(this._configHasChanged=!0,this._valid=e.detail.isValid)}},{kind:"method",key:"_resetTapped",value:(s=ie(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.next=4,(0,p.g7)(this,{title:this.supervisor.localize("confirm.reset_options.title"),text:this.supervisor.localize("confirm.reset_options.text"),confirmText:this.supervisor.localize("common.reset_options"),dismissText:this.supervisor.localize("common.cancel")});case 4:if(e.sent){e.next=8;break}return r.progress=!1,e.abrupt("return");case 8:return this._error=void 0,n={options:null},e.prev=10,e.next=13,(0,l.d3)(this.hass,this.addon.slug,n);case 13:this._configHasChanged=!1,i={success:!0,response:void 0,path:"options"},(0,a.B)(this,"hass-api-called",i),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(10),this._error=this.supervisor.localize("addon.failed_to_reset","error",(0,d.js)(e.t0));case 21:r.progress=!1;case 22:case"end":return e.stop()}}),e,this,[[10,18]])}))),function(e){return s.apply(this,arguments)})},{kind:"method",key:"_saveTapped",value:(r=ie(regeneratorRuntime.mark((function e(t){var r,n,i,o,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.currentTarget,i=this._yamlMode?null===(r=this._editor)||void 0===r?void 0:r.value:this._options,o={success:!0,response:void 0,path:"options"},n.progress=!0,this._error=void 0,e.prev=5,e.next=8,(0,l.su)(this.hass,this.addon.slug,i);case 8:if((c=e.sent).valid){e.next=11;break}throw Error(c.message);case 11:return e.next=13,(0,l.d3)(this.hass,this.addon.slug,{options:i});case 13:if(this._configHasChanged=!1,"started"!==(null===(s=this.addon)||void 0===s?void 0:s.state)){e.next=17;break}return e.next=17,x(this,this.hass,this.supervisor,this.addon);case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(5),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0)),o.success=!1;case 23:n.progress=!1,(0,a.B)(this,"hass-api-called",o);case 25:case"end":return e.stop()}}),e,this,[[5,19]])}))),function(e){return r.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(ee||(ee=oe(["\n :host {\n display: block;\n }\n ha-card {\n display: block;\n }\n .card-actions {\n display: flex;\n justify-content: space-between;\n }\n\n .card-menu {\n float: right;\n z-index: 3;\n --mdc-theme-text-primary-on-background: var(--primary-text-color);\n }\n mwc-list-item[disabled] {\n --mdc-theme-text-primary-on-background: var(--disabled-text-color);\n }\n .header {\n display: flex;\n justify-content: space-between;\n }\n .header h2 {\n color: var(--ha-card-header-color, --primary-text-color);\n font-family: var(--ha-card-header-font-family, inherit);\n font-size: var(--ha-card-header-font-size, 24px);\n letter-spacing: -0.012em;\n line-height: 48px;\n padding: 12px 16px 16px;\n display: block;\n margin-block: 0px;\n font-weight: normal;\n }\n .card-actions.right {\n justify-content: flex-end;\n }\n\n .show-additional {\n padding: 16px;\n }\n "])))]}}]}}),n.oi);function Se(e){return Se="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},Se(e)}function De(e,t){return We(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||Qe(e,t)||qe()}function ze(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function je(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){ze(o,n,i,a,s,"next",e)}function s(e){ze(o,n,i,a,s,"throw",e)}a(void 0)}))}}function Te(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Re(e,t){return Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Re(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ge(e);if(t){var i=Ge(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Le(this,r)}}function Le(e,t){if(t&&("object"===Se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Me(e)}function Me(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ie(){Ie=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ue(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.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,We(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||Qe(t)||qe()).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=$e(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:Ne(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=Ne(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function Fe(e){var t,r=$e(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 Be(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Ue(e){return e.decorators&&e.decorators.length}function Ze(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Ne(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 $e(e){var t=function(e,t){if("object"!==Se(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Se(t)?t:String(t)}function qe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Qe(e,t){if(e){if("string"==typeof e)return Ye(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ye(e,t):void 0}}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function We(e){if(Array.isArray(e))return e}function Ke(e,t,r){return Ke="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=Ge(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}},Ke(e,t,r||e)}function Ge(e){return Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ge(e)}!function(e,t,r,n){var i=Ie();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(Ze(o.descriptor)||Ze(i.descriptor)){if(Ue(o)||Ue(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(Ue(o)){if(Ue(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}Be(o,i)}else t.push(o)}return t}(a.d.map(Fe)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("hassio-addon-network")],(function(e,t){var r,s,c,u=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Re(e,t)}(n,t);var r=Ve(n);function n(){var t;He(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(Me(t)),t}return n}(t);return{F:u,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_showOptional",value:function(){return!1}},{kind:"field",decorators:[(0,i.SB)()],key:"_configHasChanged",value:function(){return!1}},{kind:"field",decorators:[(0,i.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_config",value:void 0},{kind:"method",key:"connectedCallback",value:function(){Ke(Ge(u.prototype),"connectedCallback",this).call(this),this._setNetworkConfig()}},{kind:"method",key:"render",value:function(){var e,t=this;if(!this._config)return(0,n.dy)(ke||(ke=Te([""])));var r=Object.keys(this._config).find((function(e){return null===t._config[e]}));return(0,n.dy)(Ee||(Ee=Te(["\n <ha-card\n outlined\n .header=",'\n >\n <div class="card-content">\n <p>\n ',"\n </p>\n ","\n\n <ha-form\n .data=","\n @value-changed=","\n .computeLabel=","\n .computeHelper=","\n .schema=","\n ></ha-form>\n </div>\n ",'\n <div class="card-actions">\n <ha-progress-button class="warning" @click=',">\n ","\n </ha-progress-button>\n <ha-progress-button\n @click=","\n .disabled=","\n >\n ","\n </ha-progress-button>\n </div>\n </ha-card>\n "])),this.supervisor.localize("addon.configuration.network.header"),this.supervisor.localize("addon.configuration.network.introduction"),this._error?(0,n.dy)(_e||(_e=Te(['<ha-alert alert-type="error">',"</ha-alert>"])),this._error):"",this._config,this._configChanged,this._computeLabel,this._computeHelper,this._createSchema(this._config,this._showOptional,(null===(e=this.hass.userData)||void 0===e?void 0:e.showAdvanced)||!1),r?(0,n.dy)(Ce||(Ce=Te(['<ha-formfield\n class="show-optional"\n .label=',"\n >\n <ha-switch\n @change=","\n .checked=","\n >\n </ha-switch>\n </ha-formfield>"])),this.supervisor.localize("addon.configuration.network.show_disabled"),this._toggleOptional,this._showOptional):"",this._resetTapped,this.supervisor.localize("common.reset_defaults"),this._saveTapped,!this._configHasChanged,this.supervisor.localize("common.save"))}},{kind:"method",key:"update",value:function(e){Ke(Ge(u.prototype),"update",this).call(this,e),e.has("addon")&&this._setNetworkConfig()}},{kind:"field",key:"_createSchema",value:function(){return(0,o.Z)((function(e,t,r){return(t?Object.keys(e):Object.keys(e).filter((function(t){return null!==e[t]}))).map((function(e){return{name:e,selector:{number:{mode:"box",min:0,max:65535,unit_of_measurement:r?e:void 0}}}}))}))}},{kind:"field",key:"_computeLabel",value:function(){return function(e){return""}}},{kind:"field",key:"_computeHelper",value:function(){var e=this;return function(t){var r,n,i,o,a;return(null===(r=e.addon.translations[e.hass.language])||void 0===r||null===(n=r.network)||void 0===n?void 0:n[t.name])||(null===(i=e.addon.translations.en)||void 0===i||null===(o=i.network)||void 0===o?void 0:o[t.name])||(null===(a=e.addon.network_description)||void 0===a?void 0:a[t.name])||t.name}}},{kind:"method",key:"_setNetworkConfig",value:function(){this._config=this.addon.network||{}}},{kind:"method",key:"_configChanged",value:(c=je(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._configHasChanged=!0,this._config=t.detail.value;case 2:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{kind:"method",key:"_resetTapped",value:(s=je(regeneratorRuntime.mark((function e(t){var r,n,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.currentTarget,n={network:null},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,n);case 5:if(this._configHasChanged=!1,o={success:!0,response:void 0,path:"option"},r.actionSuccess(),(0,a.B)(this,"hass-api-called",o),"started"!==(null===(i=this.addon)||void 0===i?void 0:i.state)){e.next=12;break}return e.next=12,x(this,this.hass,this.supervisor,this.addon);case 12:e.next=18;break;case 14:e.prev=14,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_reset","error",(0,d.js)(e.t0)),r.actionError();case 18:case"end":return e.stop()}}),e,this,[[2,14]])}))),function(e){return s.apply(this,arguments)})},{kind:"method",key:"_toggleOptional",value:function(){this._showOptional=!this._showOptional}},{kind:"method",key:"_saveTapped",value:(r=je(regeneratorRuntime.mark((function e(t){var r,n,i,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.currentTarget,this._error=void 0,n={},Object.entries(this._config).forEach((function(e){var t=De(e,2),r=t[0],i=t[1];n[r]=null!=i?i:null})),i={network:n},e.prev=5,e.next=8,(0,l.d3)(this.hass,this.addon.slug,i);case 8:if(this._configHasChanged=!1,s={success:!0,response:void 0,path:"option"},r.actionSuccess(),(0,a.B)(this,"hass-api-called",s),"started"!==(null===(o=this.addon)||void 0===o?void 0:o.state)){e.next=15;break}return e.next=15,x(this,this.hass,this.supervisor,this.addon);case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(5),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0)),r.actionError();case 21:case"end":return e.stop()}}),e,this,[[5,17]])}))),function(e){return r.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(xe||(xe=Te(["\n :host {\n display: block;\n }\n ha-card {\n display: block;\n }\n .card-actions {\n display: flex;\n justify-content: space-between;\n }\n .show-optional {\n padding: 16px;\n }\n "])))]}}]}}),n.oi);var Je,Xe,et,tt,rt,nt,it,ot=r(18199);function at(e){return at="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},at(e)}function st(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lt(e,t){return lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},lt(e,t)}function dt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ft(e);if(t){var i=ft(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ut(this,r)}}function ut(e,t){if(t&&("object"===at(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pt(e)}function pt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ft(e){return ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ft(e)}function ht(){ht=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!yt(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return kt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kt(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=wt(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:gt(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=gt(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function mt(e){var t,r=wt(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 vt(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function yt(e){return e.decorators&&e.decorators.length}function bt(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function gt(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 wt(e){var t=function(e,t){if("object"!==at(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===at(t)?t:String(t)}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Et,_t,Ct,xt,Pt,At;(function(e,t,r,n){var i=ht();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(bt(o.descriptor)||bt(i.descriptor)){if(yt(o)||yt(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(yt(o)){if(yt(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}vt(o,i)}else t.push(o)}return t}(a.d.map(mt)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)})([(0,i.Mo)("hassio-addon-config-tab")],(function(e,t){var r=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lt(e,t)}(n,t);var r=dt(n);function n(){var t;ct(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(pt(t)),t}return n}(t);return{F:r,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"method",key:"render",value:function(){if(!this.addon)return(0,n.dy)(Je||(Je=st(["<ha-circular-progress active></ha-circular-progress>"])));var e=this.addon.options&&Object.keys(this.addon.options).length||this.addon.schema&&Object.keys(this.addon.schema).length;return(0,n.dy)(Xe||(Xe=st(['\n <div class="content">\n ',"\n </div>\n "])),e||this.addon.network||this.addon.audio?(0,n.dy)(et||(et=st(["\n ","\n ","\n ","\n "])),e?(0,n.dy)(tt||(tt=st(["\n <hassio-addon-config\n .hass=","\n .addon=","\n .supervisor=","\n ></hassio-addon-config>\n "])),this.hass,this.addon,this.supervisor):"",this.addon.network?(0,n.dy)(rt||(rt=st(["\n <hassio-addon-network\n .hass=","\n .addon=","\n .supervisor=","\n ></hassio-addon-network>\n "])),this.hass,this.addon,this.supervisor):"",this.addon.audio?(0,n.dy)(nt||(nt=st(["\n <hassio-addon-audio\n .hass=","\n .addon=","\n .supervisor=","\n ></hassio-addon-audio>\n "])),this.hass,this.addon,this.supervisor):""):this.supervisor.localize("addon.configuration.no_configuration"))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(it||(it=st(["\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n }\n "])))]}}]}}),n.oi),r(93546);function Ot(e){return Ot="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},Ot(e)}function St(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Dt(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function zt(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Dt(o,n,i,a,s,"next",e)}function s(e){Dt(o,n,i,a,s,"throw",e)}a(void 0)}))}}function jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tt(e,t){return Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Tt(e,t)}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qt(e);if(t){var i=qt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Rt(this,r)}}function Rt(e,t){if(t&&("object"===Ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Vt(e)}function Vt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lt(){Lt=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Ft(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Nt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nt(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=Zt(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:Ut(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=Ut(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function Mt(e){var t,r=Zt(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 It(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Ft(e){return e.decorators&&e.decorators.length}function Bt(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Ut(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 Zt(e){var t=function(e,t){if("object"!==Ot(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ot(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ot(t)?t:String(t)}function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $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=qt(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}},$t(e,t,r||e)}function qt(e){return qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qt(e)}!function(e,t,r,n){var i=Lt();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(Bt(o.descriptor)||Bt(i.descriptor)){if(Ft(o)||Ft(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(Ft(o)){if(Ft(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}It(o,i)}else t.push(o)}return t}(a.d.map(Mt)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("hassio-addon-documentation-tab")],(function(e,t){var r,o,a=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tt(e,t)}(n,t);var r=Ht(n);function n(){var t;jt(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(Vt(t)),t}return n}(t);return{F:a,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_content",value:void 0},{kind:"method",key:"connectedCallback",value:(o=zt(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return $t(qt(a.prototype),"connectedCallback",this).call(this),e.next=3,this._loadData();case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{kind:"method",key:"render",value:function(){return this.addon?(0,n.dy)(_t||(_t=St(['\n <div class="content">\n <ha-card outlined>\n ','\n <div class="card-content">\n ',"\n </div>\n </ha-card>\n </div>\n "])),this._error?(0,n.dy)(Ct||(Ct=St(['<ha-alert alert-type="error">',"</ha-alert>"])),this._error):"",this._content?(0,n.dy)(xt||(xt=St(["<ha-markdown .content=","></ha-markdown>"])),this._content):(0,n.dy)(Pt||(Pt=St(["<hass-loading-screen no-toolbar></hass-loading-screen>"])))):(0,n.dy)(Et||(Et=St(["<ha-circular-progress active></ha-circular-progress>"])))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(At||(At=St(["\n ha-card {\n display: block;\n }\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n ha-markdown {\n padding: 16px;\n }\n "])))]}},{kind:"method",key:"_loadData",value:(r=zt(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,e.prev=1,e.next=4,(0,l.ii)(this.hass,this.addon.slug);case 4:this._content=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),this._error=this.supervisor.localize("addon.documentation.get_documentation","error",(0,d.js)(e.t0));case 10:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(){return r.apply(this,arguments)})}]}}),n.oi);var Qt,Yt,Wt=r(8636),Kt=r(63864);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},Gt(e)}function Jt(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function Xt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tr(e,t){return tr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},tr(e,t)}function rr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=or(e);if(t){var i=or(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nr(this,r)}}function nr(e,t){if(t&&("object"===Gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ir(e)}function ir(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function or(e){return or=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},or(e)}function ar(){ar=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!lr(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return fr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fr(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=pr(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:ur(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=ur(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function sr(e){var t,r=pr(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 cr(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function lr(e){return e.decorators&&e.decorators.length}function dr(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function ur(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 pr(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 fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var hr=function(e,t,r,n){var i=ar();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(dr(o.descriptor)||dr(i.descriptor)){if(lr(o)||lr(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(lr(o)){if(lr(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}cr(o,i)}else t.push(o)}return t}(a.d.map(sr)),e);return i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}(null,(function(e,t){var r,o,s=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tr(e,t)}(n,t);var r=rr(n);function n(){var t;er(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(ir(t)),t}return n}(t);return{F:s,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)()],key:"method",value:function(){return"POST"}},{kind:"field",decorators:[(0,i.Cb)()],key:"data",value:function(){return{}}},{kind:"field",decorators:[(0,i.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:function(){return!1}},{kind:"field",decorators:[(0,i.Cb)({type:Boolean})],key:"progress",value:function(){return!1}},{kind:"field",decorators:[(0,i.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,i.IO)("ha-progress-button",!0)],key:"_progressButton",value:void 0},{kind:"method",key:"render",value:function(){return(0,n.dy)(Qt||(Qt=Xt(["\n <ha-progress-button\n .progress=","\n @click=","\n ?disabled=","\n ><slot></slot\n ></ha-progress-button>\n "])),this.progress,this._buttonTapped,this.disabled)}},{kind:"method",key:"_buttonTapped",value:(r=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:(0,a.B)(this,"hass-api-called",t);case 19:case"end":return e.stop()}}),e,this,[[2,12]])})),o=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){Jt(o,n,i,a,s,"next",e)}function s(e){Jt(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(Yt||(Yt=Xt(["\n :host([disabled]) {\n pointer-events: none;\n }\n "])))}}]}}),n.oi);customElements.define("ha-call-api-button",hr);r(88324),r(85124),r(14089),r(52039);var mr,vr,yr,br,gr,wr,kr,Er,_r,Cr,xr,Pr,Ar,Or,Sr,Dr,zr,jr,Tr,Hr,Rr,Vr,Lr,Mr,Ir,Fr,Br,Ur,Zr,Nr,$r,qr,Qr,Yr,Wr,Kr,Gr,Jr,Xr,en,tn,rn=r(70203),nn=(r(46586),r(63226),function(e,t){(0,a.B)(e,"show-dialog",{dialogTag:"dialog-hassio-markdown",dialogImport:function(){return r.e(6884).then(r.bind(r,56884))},dialogParams:t})}),on=(r(23432),r(34450));function an(e){return an="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},an(e)}function sn(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function cn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){sn(o,n,i,a,s,"next",e)}function s(e){sn(o,n,i,a,s,"throw",e)}a(void 0)}))}}function ln(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function dn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function un(e,t){return un=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},un(e,t)}function pn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cn(e);if(t){var i=Cn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fn(this,r)}}function fn(e,t){if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hn(e)}function hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mn(){mn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!bn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return En(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?En(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=kn(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:wn(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=wn(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function vn(e){var t,r=kn(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 yn(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function bn(e){return e.decorators&&e.decorators.length}function gn(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function wn(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 kn(e){var t=function(e,t){if("object"!==an(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==an(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===an(t)?t:String(t)}function En(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _n(e,t,r){return _n="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=Cn(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}},_n(e,t,r||e)}function Cn(e){return Cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Cn(e)}var xn,Pn,An,On="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",Sn="M21.8,13H20V21H13V17.67L15.79,14.88L16.5,15C17.66,15 18.6,14.06 18.6,12.9C18.6,11.74 17.66,10.8 16.5,10.8A2.1,2.1 0 0,0 14.4,12.9L14.5,13.61L13,15.13V9.65C13.66,9.29 14.1,8.6 14.1,7.8A2.1,2.1 0 0,0 12,5.7A2.1,2.1 0 0,0 9.9,7.8C9.9,8.6 10.34,9.29 11,9.65V15.13L9.5,13.61L9.6,12.9A2.1,2.1 0 0,0 7.5,10.8A2.1,2.1 0 0,0 5.4,12.9A2.1,2.1 0 0,0 7.5,15L8.21,14.88L11,17.67V21H4V13H2.25C1.83,13 1.42,13 1.42,12.79C1.43,12.57 1.85,12.15 2.28,11.72L11,3C11.33,2.67 11.67,2.33 12,2.33C12.33,2.33 12.67,2.67 13,3L17,7V6H19V9L21.78,11.78C22.18,12.18 22.59,12.59 22.6,12.8C22.6,13 22.2,13 21.8,13M7.5,12A0.9,0.9 0 0,1 8.4,12.9A0.9,0.9 0 0,1 7.5,13.8A0.9,0.9 0 0,1 6.6,12.9A0.9,0.9 0 0,1 7.5,12M16.5,12C17,12 17.4,12.4 17.4,12.9C17.4,13.4 17,13.8 16.5,13.8A0.9,0.9 0 0,1 15.6,12.9A0.9,0.9 0 0,1 16.5,12M12,6.9C12.5,6.9 12.9,7.3 12.9,7.8C12.9,8.3 12.5,8.7 12,8.7C11.5,8.7 11.1,8.3 11.1,7.8C11.1,7.3 11.5,6.9 12,6.9Z",Dn={stable:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",experimental:"M6,22A3,3 0 0,1 3,19C3,18.4 3.18,17.84 3.5,17.37L9,7.81V6A1,1 0 0,1 8,5V4A2,2 0 0,1 10,2H14A2,2 0 0,1 16,4V5A1,1 0 0,1 15,6V7.81L20.5,17.37C20.82,17.84 21,18.4 21,19A3,3 0 0,1 18,22H6M5,19A1,1 0 0,0 6,20H18A1,1 0 0,0 19,19C19,18.79 18.93,18.59 18.82,18.43L16.53,14.47L14,17L8.93,11.93L5.18,18.43C5.07,18.59 5,18.79 5,19M13,10A1,1 0 0,0 12,11A1,1 0 0,0 13,12A1,1 0 0,0 14,11A1,1 0 0,0 13,10Z",deprecated:"M10 3H14V14H10V3M10 21V17H14V21H10Z"},zn={1:"M10,7V9H12V17H14V7H10Z",2:"M9,7V9H13V11H11A2,2 0 0,0 9,13V17H11L15,17V15H11V13H13A2,2 0 0,0 15,11V9A2,2 0 0,0 13,7H9Z",3:"M15,15V13.5A1.5,1.5 0 0,0 13.5,12A1.5,1.5 0 0,0 15,10.5V9C15,7.89 14.1,7 13,7H9V9H13V11H11V13H13V15H9V17H13A2,2 0 0,0 15,15",4:"M9,7V13H13V17H15V7H13V11H11V7H9Z",5:"M9,7V13H13V15H9V17H13A2,2 0 0,0 15,15V13A2,2 0 0,0 13,11H11V9H15V7H9Z",6:"M11,7A2,2 0 0,0 9,9V15A2,2 0 0,0 11,17H13A2,2 0 0,0 15,15V13A2,2 0 0,0 13,11H11V9H15V7H11M11,13H13V15H11V13Z",7:"M11,17L15,9V7H9V9H13L9,17",8:"M11,13H13V15H11M11,9H13V11H11M11,17H13A2,2 0 0,0 15,15V13.5A1.5,1.5 0 0,0 13.5,12A1.5,1.5 0 0,0 15,10.5V9C15,7.89 14.1,7 13,7H11A2,2 0 0,0 9,9V10.5A1.5,1.5 0 0,0 10.5,12A1.5,1.5 0 0,0 9,13.5V15C9,16.11 9.9,17 11,17"};!function(e,t,r,n){var i=mn();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(gn(o.descriptor)||gn(i.descriptor)){if(bn(o)||bn(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(bn(o)){if(bn(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}yn(o,i)}else t.push(o)}return t}(a.d.map(vn)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("hassio-addon-info")],(function(e,t){var r,c,u,m,v,y,b,g,w,k,E,_,C=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&un(e,t)}(n,t);var r=pn(n);function n(){var t;dn(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(hn(t)),t}return n}(t);return{F:C,d:[{kind:"field",decorators:[(0,i.Cb)({type:Boolean})],key:"narrow",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_metrics",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_error",value:void 0},{kind:"field",key:"_addonStoreInfo",value:function(){return(0,o.Z)((function(e,t){return t.find((function(t){return t.slug===e}))}))}},{kind:"method",key:"render",value:function(){var e,t,r,i,o,a=this.addon.detached||this.addon.available?void 0:this._addonStoreInfo(this.addon.slug,this.supervisor.store.addons),s=[{description:this.supervisor.localize("addon.dashboard.cpu_usage"),value:null===(e=this._metrics)||void 0===e?void 0:e.cpu_percent},{description:this.supervisor.localize("addon.dashboard.ram_usage"),value:null===(t=this._metrics)||void 0===t?void 0:t.memory_percent,tooltip:"".concat((0,rn.d)(null===(r=this._metrics)||void 0===r?void 0:r.memory_usage),"/").concat((0,rn.d)(null===(i=this._metrics)||void 0===i?void 0:i.memory_limit))}];return(0,n.dy)(mr||(mr=ln(["\n ","\n ",'\n\n <ha-card outlined>\n <div class="card-content">\n <div class="addon-header">\n ','\n <div class="addon-version light-color">\n ','\n </div>\n </div>\n <div class="description light-color">\n ','\n </div>\n\n <ha-chip-set class="capabilities">\n ',"\n\n <ha-chip\n hasIcon\n class=","\n @click=",'\n id="rating"\n >\n <ha-svg-icon slot="icon" .path=',">\n </ha-svg-icon>\n\n ","\n </ha-chip>\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ",'\n </ha-chip-set>\n\n <div class="description light-color">\n ',".<br />\n ",'\n </div>\n <div class="addon-container">\n <div>\n ',"\n ","\n </div>\n <div>\n ","\n </div>\n </div>\n ","\n ",'\n </div>\n <div class="card-actions">\n <div>\n ',"\n </div>\n <div>\n ","\n </div>\n </div>\n </ha-card>\n\n ","\n "])),this.addon.update_available?(0,n.dy)(vr||(vr=ln(["\n <update-available-card\n .hass=","\n .narrow=","\n .supervisor=","\n .addonSlug=","\n @update-complete=","\n ></update-available-card>\n "])),this.hass,this.narrow,this.supervisor,this.addon.slug,this._updateComplete):"","protected"in this.addon&&!this.addon.protected?(0,n.dy)(yr||(yr=ln(['\n <ha-alert\n alert-type="error"\n .title=',"\n >\n ",'\n <mwc-button\n slot="action"\n .label=',"\n @click=","\n >\n </mwc-button>\n </ha-alert>\n "])),this.supervisor.localize("addon.dashboard.protection_mode.title"),this.supervisor.localize("addon.dashboard.protection_mode.content"),this.supervisor.localize("addon.dashboard.protection_mode.enable"),this._protectionToggled):"",this.narrow?"":this.addon.name,this.addon.version?(0,n.dy)(br||(br=ln(["\n ","\n "])),this._computeIsRunning?(0,n.dy)(gr||(gr=ln(["\n <ha-svg-icon\n .title=",'\n class="running"\n .path=',"\n ></ha-svg-icon>\n "])),this.supervisor.localize("dashboard.addon_running"),On):(0,n.dy)(wr||(wr=ln(["\n <ha-svg-icon\n .title=",'\n class="stopped"\n .path=',"\n ></ha-svg-icon>\n "])),this.supervisor.localize("dashboard.addon_stopped"),On)):(0,n.dy)(kr||(kr=ln([" "," "])),this.addon.version_latest),this.addon.version?(0,n.dy)(Er||(Er=ln(["\n Current version: ",'\n <div class="changelog" @click=','>\n (<span class="changelog-link"\n >',"</span\n >)\n </div>\n "])),this.addon.version,this._openChangelog,this.supervisor.localize("addon.dashboard.changelog")):(0,n.dy)(_r||(_r=ln(['<span class="changelog-link" @click=',"\n >","</span\n >"])),this._openChangelog,this.supervisor.localize("addon.dashboard.changelog")),"stable"!==this.addon.stage?(0,n.dy)(Cr||(Cr=ln([" <ha-chip\n hasIcon\n class=","\n @click=",'\n id="stage"\n >\n <ha-svg-icon\n slot="icon"\n .path=',"\n >\n </ha-svg-icon>\n ","\n </ha-chip>"])),(0,Wt.$)({yellow:"experimental"===this.addon.stage,red:"deprecated"===this.addon.stage}),this._showMoreInfo,Dn[this.addon.stage],this.supervisor.localize("addon.dashboard.capability.stages.".concat(this.addon.stage))):"",(0,Wt.$)({green:Number(this.addon.rating)>=6,yellow:[3,4,5].includes(Number(this.addon.rating)),red:Number(this.addon.rating)>=2}),this._showMoreInfo,zn[this.addon.rating],this.supervisor.localize("addon.dashboard.capability.label.rating"),this.addon.host_network?(0,n.dy)(xr||(xr=ln(["\n <ha-chip\n hasIcon\n @click=",'\n id="host_network"\n >\n <ha-svg-icon slot="icon" .path=',"> </ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,"M17,3A2,2 0 0,1 19,5V15A2,2 0 0,1 17,17H13V19H14A1,1 0 0,1 15,20H22V22H15A1,1 0 0,1 14,23H10A1,1 0 0,1 9,22H2V20H9A1,1 0 0,1 10,19H11V17H7C5.89,17 5,16.1 5,15V5A2,2 0 0,1 7,3H17Z",this.supervisor.localize("addon.dashboard.capability.label.host")):"",this.addon.full_access?(0,n.dy)(Pr||(Pr=ln(["\n <ha-chip\n hasIcon\n @click=",'\n id="full_access"\n >\n <ha-svg-icon slot="icon" .path=',"></ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,"M6,4H18V5H21V7H18V9H21V11H18V13H21V15H18V17H21V19H18V20H6V19H3V17H6V15H3V13H6V11H3V9H6V7H3V5H6V4M11,15V18H12V15H11M13,15V18H14V15H13M15,15V18H16V15H15Z",this.supervisor.localize("addon.dashboard.capability.label.hardware")):"",this.addon.homeassistant_api?(0,n.dy)(Ar||(Ar=ln(["\n <ha-chip\n hasIcon\n @click=",'\n id="homeassistant_api"\n >\n <ha-svg-icon\n slot="icon"\n .path=',"\n ></ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,Sn,this.supervisor.localize("addon.dashboard.capability.label.core")):"",this._computeHassioApi?(0,n.dy)(Or||(Or=ln(["\n <ha-chip hasIcon @click=",' id="hassio_api">\n <ha-svg-icon\n slot="icon"\n .path=',"\n ></ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,Sn,this.supervisor.localize("addon.dashboard.capability.role.".concat(this.addon.hassio_role))||this.addon.hassio_role):"",this.addon.docker_api?(0,n.dy)(Sr||(Sr=ln(["\n <ha-chip hasIcon @click=",' id="docker_api">\n <ha-svg-icon slot="icon" .path=',"></ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,"M21.81 10.25C21.75 10.21 21.25 9.82 20.17 9.82C19.89 9.82 19.61 9.85 19.33 9.9C19.12 8.5 17.95 7.79 17.9 7.76L17.61 7.59L17.43 7.86C17.19 8.22 17 8.63 16.92 9.05C16.72 9.85 16.84 10.61 17.25 11.26C16.76 11.54 15.96 11.61 15.79 11.61H2.62C2.28 11.61 2 11.89 2 12.24C2 13.39 2.18 14.54 2.58 15.62C3.03 16.81 3.71 17.69 4.58 18.23C5.56 18.83 7.17 19.17 9 19.17C9.79 19.17 10.61 19.1 11.42 18.95C12.54 18.75 13.62 18.36 14.61 17.79C15.43 17.32 16.16 16.72 16.78 16C17.83 14.83 18.45 13.5 18.9 12.35H19.09C20.23 12.35 20.94 11.89 21.33 11.5C21.59 11.26 21.78 10.97 21.92 10.63L22 10.39L21.81 10.25M3.85 11.24H5.61C5.69 11.24 5.77 11.17 5.77 11.08V9.5C5.77 9.42 5.7 9.34 5.61 9.34H3.85C3.76 9.34 3.69 9.41 3.69 9.5V11.08C3.7 11.17 3.76 11.24 3.85 11.24M6.28 11.24H8.04C8.12 11.24 8.2 11.17 8.2 11.08V9.5C8.2 9.42 8.13 9.34 8.04 9.34H6.28C6.19 9.34 6.12 9.41 6.12 9.5V11.08C6.13 11.17 6.19 11.24 6.28 11.24M8.75 11.24H10.5C10.6 11.24 10.67 11.17 10.67 11.08V9.5C10.67 9.42 10.61 9.34 10.5 9.34H8.75C8.67 9.34 8.6 9.41 8.6 9.5V11.08C8.6 11.17 8.66 11.24 8.75 11.24M11.19 11.24H12.96C13.04 11.24 13.11 11.17 13.11 11.08V9.5C13.11 9.42 13.05 9.34 12.96 9.34H11.19C11.11 9.34 11.04 9.41 11.04 9.5V11.08C11.04 11.17 11.11 11.24 11.19 11.24M6.28 9H8.04C8.12 9 8.2 8.91 8.2 8.82V7.25C8.2 7.16 8.13 7.09 8.04 7.09H6.28C6.19 7.09 6.12 7.15 6.12 7.25V8.82C6.13 8.91 6.19 9 6.28 9M8.75 9H10.5C10.6 9 10.67 8.91 10.67 8.82V7.25C10.67 7.16 10.61 7.09 10.5 7.09H8.75C8.67 7.09 8.6 7.15 8.6 7.25V8.82C8.6 8.91 8.66 9 8.75 9M11.19 9H12.96C13.04 9 13.11 8.91 13.11 8.82V7.25C13.11 7.16 13.04 7.09 12.96 7.09H11.19C11.11 7.09 11.04 7.15 11.04 7.25V8.82C11.04 8.91 11.11 9 11.19 9M11.19 6.72H12.96C13.04 6.72 13.11 6.65 13.11 6.56V5C13.11 4.9 13.04 4.83 12.96 4.83H11.19C11.11 4.83 11.04 4.89 11.04 5V6.56C11.04 6.64 11.11 6.72 11.19 6.72M13.65 11.24H15.41C15.5 11.24 15.57 11.17 15.57 11.08V9.5C15.57 9.42 15.5 9.34 15.41 9.34H13.65C13.57 9.34 13.5 9.41 13.5 9.5V11.08C13.5 11.17 13.57 11.24 13.65 11.24",this.supervisor.localize("addon.dashboard.capability.label.docker")):"",this.addon.host_pid?(0,n.dy)(Dr||(Dr=ln(["\n <ha-chip hasIcon @click=",' id="host_pid">\n <ha-svg-icon slot="icon" .path=',"></ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,"M5.41,21L6.12,17H2.12L2.47,15H6.47L7.53,9H3.53L3.88,7H7.88L8.59,3H10.59L9.88,7H15.88L16.59,3H18.59L17.88,7H21.88L21.53,9H17.53L16.47,15H20.47L20.12,17H16.12L15.41,21H13.41L14.12,17H8.12L7.41,21H5.41M9.53,9L8.47,15H14.47L15.53,9H9.53Z",this.supervisor.localize("addon.dashboard.capability.label.host_pid")):"","default"!==this.addon.apparmor?(0,n.dy)(zr||(zr=ln(["\n <ha-chip\n hasIcon\n @click=","\n class=",'\n id="apparmor"\n >\n <ha-svg-icon slot="icon" .path=',"></ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,this._computeApparmorClassName,"M12,1L3,5V11C3,16.55 6.84,21.74 12,23C17.16,21.74 21,16.55 21,11V5L12,1Z",this.supervisor.localize("addon.dashboard.capability.label.apparmor")):"",this.addon.auth_api?(0,n.dy)(jr||(jr=ln(["\n <ha-chip hasIcon @click=",' id="auth_api">\n <ha-svg-icon slot="icon" .path=',"></ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,"M7 14C5.9 14 5 13.1 5 12S5.9 10 7 10 9 10.9 9 12 8.1 14 7 14M12.6 10C11.8 7.7 9.6 6 7 6C3.7 6 1 8.7 1 12S3.7 18 7 18C9.6 18 11.8 16.3 12.6 14H16V18H20V14H23V10H12.6Z",this.supervisor.localize("addon.dashboard.capability.label.auth")):"",this.addon.ingress?(0,n.dy)(Tr||(Tr=ln(["\n <ha-chip hasIcon @click=",' id="ingress">\n <ha-svg-icon\n slot="icon"\n .path=',"\n ></ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,"M11.5,11L17.88,16.37L17,16.55L16.36,16.67C15.73,16.8 15.37,17.5 15.65,18.07L15.92,18.65L17.28,21.59L15.86,22.25L14.5,19.32L14.24,18.74C13.97,18.15 13.22,17.97 12.72,18.38L12.21,18.78L11.5,19.35V11M10.76,8.69A0.76,0.76 0 0,0 10,9.45V20.9C10,21.32 10.34,21.66 10.76,21.66C10.95,21.66 11.11,21.6 11.24,21.5L13.15,19.95L14.81,23.57C14.94,23.84 15.21,24 15.5,24C15.61,24 15.72,24 15.83,23.92L18.59,22.64C18.97,22.46 19.15,22 18.95,21.63L17.28,18L19.69,17.55C19.85,17.5 20,17.43 20.12,17.29C20.39,16.97 20.35,16.5 20,16.21L11.26,8.86L11.25,8.87C11.12,8.76 10.95,8.69 10.76,8.69M15,10V8H20V10H15M13.83,4.76L16.66,1.93L18.07,3.34L15.24,6.17L13.83,4.76M10,0H12V5H10V0M3.93,14.66L6.76,11.83L8.17,13.24L5.34,16.07L3.93,14.66M3.93,3.34L5.34,1.93L8.17,4.76L6.76,6.17L3.93,3.34M7,10H2V8H7V10",this.supervisor.localize("addon.dashboard.capability.label.ingress")):"",this.addon.signed?(0,n.dy)(Hr||(Hr=ln(["\n <ha-chip hasIcon @click=",' id="signed">\n <ha-svg-icon slot="icon" .path=',"></ha-svg-icon>\n ","\n </ha-chip>\n "])),this._showMoreInfo,"M23 16V15.5A2.5 2.5 0 0 0 18 15.5V16A1 1 0 0 0 17 17V21A1 1 0 0 0 18 22H23A1 1 0 0 0 24 21V17A1 1 0 0 0 23 16M22 16H19V15.5A1.5 1.5 0 0 1 22 15.5M7 8.9H11V7H7A5 5 0 0 0 7 17H11V15.1H7A3.1 3.1 0 0 1 7 8.9M8 11V13H16V11M13 15.1V17H15V15.1M17 7H13V8.9H17A3.09 3.09 0 0 1 19.94 11A5.12 5.12 0 0 1 20.5 11H21.9A5 5 0 0 0 17 7Z",this.supervisor.localize("addon.dashboard.capability.label.signed")):"",this.addon.description,this.supervisor.localize("addon.dashboard.visit_addon_page","name",(0,n.dy)(Rr||(Rr=ln(["<a href=",' target="_blank" rel="noreferrer"\n >',"</a\n >"])),this.addon.url,this.addon.name)),this.addon.logo?(0,n.dy)(Vr||(Vr=ln(['\n <img\n class="logo"\n src="/api/hassio/addons/','/logo"\n />\n '])),this.addon.slug):"",this.addon.version?(0,n.dy)(Lr||(Lr=ln(["\n <div\n class=","\n >\n <ha-settings-row ?three-line=",'>\n <span slot="heading">\n ','\n </span>\n <span slot="description">\n ',"\n </span>\n <ha-switch\n @change=","\n .checked=","\n haptic\n ></ha-switch>\n </ha-settings-row>\n\n ","\n ","\n ","\n ","\n </div>\n "])),(0,Wt.$)({"addon-options":!0,started:"started"===this.addon.state}),this.narrow,this.supervisor.localize("addon.dashboard.option.boot.title"),this.supervisor.localize("addon.dashboard.option.boot.description"),this._startOnBootToggled,"auto"===this.addon.boot,"once"!==this.addon.startup?(0,n.dy)(Mr||(Mr=ln(["\n <ha-settings-row ?three-line=",'>\n <span slot="heading">\n ','\n </span>\n <span slot="description">\n ',"\n </span>\n <ha-switch\n @change=","\n .checked=","\n haptic\n ></ha-switch>\n </ha-settings-row>\n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.watchdog.title"),this.supervisor.localize("addon.dashboard.option.watchdog.description"),this._watchdogToggled,this.addon.watchdog):"",this.addon.auto_update||null!==(o=this.hass.userData)&&void 0!==o&&o.showAdvanced?(0,n.dy)(Ir||(Ir=ln(["\n <ha-settings-row ?three-line=",'>\n <span slot="heading">\n ','\n </span>\n <span slot="description">\n ',"\n </span>\n <ha-switch\n @change=","\n .checked=","\n haptic\n ></ha-switch>\n </ha-settings-row>\n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.auto_update.title"),this.supervisor.localize("addon.dashboard.option.auto_update.description"),this._autoUpdateToggled,this.addon.auto_update):"",!this._computeCannotIngressSidebar&&this.addon.ingress?(0,n.dy)(Fr||(Fr=ln(["\n <ha-settings-row ?three-line=",'>\n <span slot="heading">\n ','\n </span>\n <span slot="description">\n ',"\n </span>\n <ha-switch\n @change=","\n .checked=","\n haptic\n ></ha-switch>\n </ha-settings-row>\n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.ingress_panel.title"),this.supervisor.localize("addon.dashboard.option.ingress_panel.description"),this._panelToggled,this.addon.ingress_panel):"",this._computeUsesProtectedOptions?(0,n.dy)(Br||(Br=ln(["\n <ha-settings-row ?three-line=",'>\n <span slot="heading">\n ','\n </span>\n <span slot="description">\n ',"\n </span>\n <ha-switch\n @change=","\n .checked=","\n haptic\n ></ha-switch>\n </ha-settings-row>\n "])),this.narrow,this.supervisor.localize("addon.dashboard.option.protected.title"),this.supervisor.localize("addon.dashboard.option.protected.description"),this._protectionToggled,this.addon.protected):""):"",this.addon.version&&"started"===this.addon.state?(0,n.dy)(Ur||(Ur=ln(["<ha-settings-row ?three-line=",'>\n <span slot="heading">\n ','\n </span>\n <code slot="description"> '," </code>\n </ha-settings-row>\n ",""])),this.narrow,this.supervisor.localize("addon.dashboard.hostname"),this.addon.hostname,s.map((function(e){var t;return(0,n.dy)(Zr||(Zr=ln(["\n <supervisor-metric\n .description=","\n .value=","\n .tooltip=","\n ></supervisor-metric>\n "])),e.description,null!==(t=e.value)&&void 0!==t?t:0,e.tooltip)}))):"",this._error?(0,n.dy)(Nr||(Nr=ln(['<ha-alert alert-type="error">',"</ha-alert>"])),this._error):"",this.addon.version||!a||this.addon.available?"":(0,on.I)(this.supervisor.info.supported_arch,this.addon.arch)?(0,n.dy)(qr||(qr=ln(['\n <ha-alert alert-type="warning">\n ',"\n </ha-alert>\n "])),this.supervisor.localize("addon.dashboard.not_available_version","core_version_installed",this.supervisor.core.version,"core_version_needed",a.homeassistant)):(0,n.dy)($r||($r=ln(['\n <ha-alert alert-type="warning">\n ',"\n </ha-alert>\n "])),this.supervisor.localize("addon.dashboard.not_available_arch")),this.addon.version?this._computeIsRunning?(0,n.dy)(Qr||(Qr=ln(['\n <ha-progress-button\n class="warning"\n @click=',"\n >\n ",'\n </ha-progress-button>\n <ha-progress-button\n class="warning"\n @click=',"\n >\n ","\n </ha-progress-button>\n "])),this._stopClicked,this.supervisor.localize("addon.dashboard.stop"),this._restartClicked,this.supervisor.localize("addon.dashboard.restart")):(0,n.dy)(Yr||(Yr=ln(["\n <ha-progress-button @click=",">\n ","\n </ha-progress-button>\n "])),this._startClicked,this.supervisor.localize("addon.dashboard.start")):(0,n.dy)(Wr||(Wr=ln(["\n <ha-progress-button\n .disabled=","\n @click=","\n >\n ","\n </ha-progress-button>\n "])),!this.addon.available,this._installClicked,this.supervisor.localize("addon.dashboard.install")),this.addon.version?(0,n.dy)(Kr||(Kr=ln([" ","\n ",'\n <ha-progress-button\n class="warning"\n @click=',"\n >\n ","\n </ha-progress-button>\n ",""])),this._computeShowWebUI?(0,n.dy)(Gr||(Gr=ln(["\n <a\n href=",'\n tabindex="-1"\n target="_blank"\n rel="noopener"\n >\n <mwc-button>\n ',"\n </mwc-button>\n </a>\n "])),this._pathWebui,this.supervisor.localize("addon.dashboard.open_web_ui")):"",this._computeShowIngressUI?(0,n.dy)(Jr||(Jr=ln(["\n <mwc-button @click=",">\n ","\n </mwc-button>\n "])),this._openIngress,this.supervisor.localize("addon.dashboard.open_web_ui")):"",this._uninstallClicked,this.supervisor.localize("addon.dashboard.uninstall"),this.addon.build?(0,n.dy)(Xr||(Xr=ln(['\n <ha-call-api-button\n class="warning"\n .hass=','\n .path="hassio/addons/','/rebuild"\n >\n ',"\n </ha-call-api-button>\n "])),this.hass,this.addon.slug,this.supervisor.localize("addon.dashboard.rebuild")):""):"",this.addon.long_description?(0,n.dy)(en||(en=ln(['\n <ha-card outlined>\n <div class="card-content">\n <ha-markdown\n .content=',"\n ></ha-markdown>\n </div>\n </ha-card>\n "])),this.addon.long_description):"")}},{kind:"method",key:"updated",value:function(e){_n(Cn(C.prototype),"updated",this).call(this,e),e.has("addon")&&this._loadData()}},{kind:"method",key:"_loadData",value:(_=cn(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("state"in this.addon)||"started"!==this.addon.state){e.next=4;break}return e.next=3,(0,d.yd)(this.hass,"addons/".concat(this.addon.slug));case 3:this._metrics=e.sent;case 4:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{kind:"get",key:"_computeHassioApi",value:function(){return this.addon.hassio_api&&("manager"===this.addon.hassio_role||"admin"===this.addon.hassio_role)}},{kind:"get",key:"_computeApparmorClassName",value:function(){return"profile"===this.addon.apparmor?"green":"disable"===this.addon.apparmor?"red":""}},{kind:"method",key:"_showMoreInfo",value:function(e){var t=e.currentTarget.id;nn(this,{title:this.supervisor.localize("addon.dashboard.capability.".concat(t,".title")),content:"stage"===t?this.supervisor.localize("addon.dashboard.capability.".concat(t,".description"),"icon_stable",'<ha-svg-icon path="'.concat(Dn.stable,'"></ha-svg-icon>'),"icon_experimental",'<ha-svg-icon path="'.concat(Dn.experimental,'"></ha-svg-icon>'),"icon_deprecated",'<ha-svg-icon path="'.concat(Dn.deprecated,'"></ha-svg-icon>')):this.supervisor.localize("addon.dashboard.capability.".concat(t,".description"))})}},{kind:"get",key:"_computeIsRunning",value:function(){var e;return"started"===(null===(e=this.addon)||void 0===e?void 0:e.state)}},{kind:"get",key:"_pathWebui",value:function(){return this.addon.webui.replace("[HOST]",document.location.hostname)}},{kind:"get",key:"_computeShowWebUI",value:function(){return!this.addon.ingress&&this.addon.webui&&this._computeIsRunning}},{kind:"method",key:"_openIngress",value:function(){(0,s.c)("/hassio/ingress/".concat(this.addon.slug))}},{kind:"get",key:"_computeShowIngressUI",value:function(){return this.addon.ingress&&this._computeIsRunning}},{kind:"get",key:"_computeCannotIngressSidebar",value:function(){return!this.addon.ingress||!(0,Kt.I)(this.hass.config.version,0,92)}},{kind:"get",key:"_computeUsesProtectedOptions",value:function(){return this.addon.docker_api||this.addon.full_access||this.addon.host_pid}},{kind:"method",key:"_startOnBootToggled",value:(E=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={boot:"auto"===this.addon.boot?"manual":"auto"},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return E.apply(this,arguments)})},{kind:"method",key:"_watchdogToggled",value:(k=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={watchdog:!this.addon.watchdog},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return k.apply(this,arguments)})},{kind:"method",key:"_autoUpdateToggled",value:(w=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={auto_update:!this.addon.auto_update},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return w.apply(this,arguments)})},{kind:"method",key:"_protectionToggled",value:(g=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={protected:!this.addon.protected},e.prev=2,e.next=5,(0,l.NI)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"security"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return g.apply(this,arguments)})},{kind:"method",key:"_panelToggled",value:(b=cn(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={ingress_panel:!this.addon.ingress_panel},e.prev=2,e.next=5,(0,l.d3)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},(0,a.B)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error=this.supervisor.localize("addon.failed_to_save","error",(0,d.js)(e.t0));case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return b.apply(this,arguments)})},{kind:"method",key:"_openChangelog",value:(y=cn(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,(0,l.CH)(this.hass,this.addon.slug);case 3:t=e.sent,nn(this,{title:this.supervisor.localize("addon.dashboard.changelog"),content:(0,on.H)(this.addon,t)}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.get_changelog"),text:(0,d.js)(e.t0)});case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return y.apply(this,arguments)})},{kind:"method",key:"_updateComplete",value:function(){var e={success:!0,response:void 0,path:"install"};(0,a.B)(this,"hass-api-called",e)}},{kind:"method",key:"_installClicked",value:(v=cn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.fU)(this.hass,this.addon.slug);case 5:n={success:!0,response:void 0,path:"install"},(0,a.B)(this,"hass-api-called",n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.install"),text:(0,d.js)(e.t0)});case 12:r.progress=!1;case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return v.apply(this,arguments)})},{kind:"method",key:"_stopClicked",value:(m=cn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.ow)(this.hass,this.addon.slug);case 5:n={success:!0,response:void 0,path:"stop"},(0,a.B)(this,"hass-api-called",n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.stop"),text:(0,d.js)(e.t0)});case 12:r.progress=!1;case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return m.apply(this,arguments)})},{kind:"method",key:"_restartClicked",value:(u=cn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.P$)(this.hass,this.addon.slug);case 5:n={success:!0,response:void 0,path:"stop"},(0,a.B)(this,"hass-api-called",n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.restart"),text:(0,d.js)(e.t0)});case 12:r.progress=!1;case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return u.apply(this,arguments)})},{kind:"method",key:"_startClicked",value:(c=cn(regeneratorRuntime.mark((function e(t){var r,n,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.prev=2,e.next=5,(0,l.su)(this.hass,this.addon.slug);case 5:if((n=e.sent).valid){e.next=11;break}return e.next=9,(0,p.g7)(this,{title:this.supervisor.localize("addon.dashboard.action_error.start_invalid_config"),text:n.message.split(" Got ")[0],confirm:function(){return o._openConfiguration()},confirmText:this.supervisor.localize("addon.dashboard.action_error.go_to_config"),dismissText:this.supervisor.localize("common.cancel")});case 9:return r.progress=!1,e.abrupt("return");case 11:e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(2),(0,p.Ys)(this,{title:"Failed to validate addon configuration",text:(0,d.js)(e.t0)}),r.progress=!1,e.abrupt("return");case 18:return e.prev=18,e.next=21,(0,l.kP)(this.hass,this.addon.slug);case 21:return e.next=23,(0,l.AD)(this.hass,this.addon.slug);case 23:this.addon=e.sent,i={success:!0,response:void 0,path:"start"},(0,a.B)(this,"hass-api-called",i),e.next=31;break;case 28:e.prev=28,e.t1=e.catch(18),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.start"),text:(0,d.js)(e.t1)});case 31:r.progress=!1;case 32:case"end":return e.stop()}}),e,this,[[2,13],[18,28]])}))),function(e){return c.apply(this,arguments)})},{kind:"method",key:"_openConfiguration",value:function(){(0,s.c)("/hassio/addon/".concat(this.addon.slug,"/config"))}},{kind:"method",key:"_uninstallClicked",value:(r=cn(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.currentTarget).progress=!0,e.next=4,(0,p.g7)(this,{title:this.supervisor.localize("dialog.uninstall_addon.title",{name:this.addon.name}),text:this.supervisor.localize("dialog.uninstall_addon.text"),confirmText:this.supervisor.localize("dialog.uninstall_addon.uninstall"),dismissText:this.supervisor.localize("common.cancel"),destructive:!0});case 4:if(e.sent){e.next=8;break}return r.progress=!1,e.abrupt("return");case 8:return this._error=void 0,e.prev=9,e.next=12,(0,l.Yn)(this.hass,this.addon.slug);case 12:n={success:!0,response:void 0,path:"uninstall"},(0,a.B)(this,"hass-api-called",n),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(9),(0,p.Ys)(this,{title:this.supervisor.localize("addon.dashboard.action_error.uninstall"),text:(0,d.js)(e.t0)});case 19:r.progress=!1;case 20:case"end":return e.stop()}}),e,this,[[9,16]])}))),function(e){return r.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(tn||(tn=ln(['\n :host {\n display: block;\n }\n ha-card {\n display: block;\n margin-bottom: 16px;\n }\n ha-card.warning {\n background-color: var(--error-color);\n color: white;\n }\n ha-card.warning .card-header {\n color: white;\n }\n ha-card.warning .card-content {\n color: white;\n }\n ha-card.warning mwc-button {\n --mdc-theme-primary: white !important;\n }\n .warning {\n color: var(--error-color);\n --mdc-theme-primary: var(--error-color);\n }\n .light-color {\n color: var(--secondary-text-color);\n }\n .addon-header {\n padding-left: 8px;\n font-size: 24px;\n color: var(--ha-card-header-color, --primary-text-color);\n }\n .addon-version {\n float: right;\n font-size: 15px;\n vertical-align: middle;\n }\n .errors {\n color: var(--error-color);\n margin-bottom: 16px;\n }\n .description {\n margin-bottom: 16px;\n }\n img.logo {\n max-width: 100%;\n max-height: 60px;\n margin: 16px 0;\n display: block;\n }\n\n ha-switch {\n display: flex;\n }\n ha-svg-icon.running {\n color: var(--success-color);\n }\n ha-svg-icon.stopped {\n color: var(--error-color);\n }\n ha-call-api-button {\n font-weight: 500;\n color: var(--primary-color);\n }\n protection-enable mwc-button {\n --mdc-theme-primary: white;\n }\n .description a {\n color: var(--primary-color);\n }\n ha-chip {\n text-transform: capitalize;\n --ha-chip-text-color: var(--text-primary-color);\n --ha-chip-background-color: var(--primary-color);\n }\n\n .red {\n --ha-chip-background-color: var(--label-badge-red, #df4c1e);\n }\n .blue {\n --ha-chip-background-color: var(--label-badge-blue, #039be5);\n }\n .green {\n --ha-chip-background-color: var(--label-badge-green, #0da035);\n }\n .yellow {\n --ha-chip-background-color: var(--label-badge-yellow, #f4b400);\n }\n .capabilities {\n margin-bottom: 16px;\n }\n .card-actions {\n justify-content: space-between;\n display: flex;\n }\n .changelog {\n display: contents;\n }\n .changelog-link {\n color: var(--primary-color);\n text-decoration: underline;\n cursor: pointer;\n }\n ha-markdown {\n padding: 16px;\n }\n ha-settings-row {\n padding: 0;\n height: 54px;\n width: 100%;\n }\n ha-settings-row > span[slot="description"] {\n white-space: normal;\n color: var(--secondary-text-color);\n }\n ha-settings-row[three-line] {\n height: 74px;\n }\n\n .addon-options {\n max-width: 90%;\n }\n\n .addon-container {\n display: grid;\n grid-auto-flow: column;\n grid-template-columns: 60% 40%;\n }\n\n .addon-container > div:last-of-type {\n align-self: end;\n }\n\n ha-alert mwc-button {\n --mdc-theme-primary: var(--primary-text-color);\n }\n a {\n text-decoration: none;\n }\n\n update-available-card {\n padding-bottom: 16px;\n }\n\n @media (max-width: 720px) {\n ha-chip {\n line-height: 36px;\n }\n .addon-options {\n max-width: 100%;\n }\n .addon-container {\n display: block;\n }\n }\n '])))]}}]}}),n.oi);function jn(e){return jn="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},jn(e)}function Tn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Hn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rn(e,t){return Rn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Rn(e,t)}function Vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=In(e);if(t){var i=In(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ln(this,r)}}function Ln(e,t){if(t&&("object"===jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Mn(e)}function Mn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function In(e){return In=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},In(e)}function Fn(){Fn=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!Zn(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Qn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qn(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=qn(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:$n(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=$n(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function Bn(e){var t,r=qn(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 Un(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Zn(e){return e.decorators&&e.decorators.length}function Nn(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 qn(e){var t=function(e,t){if("object"!==jn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===jn(t)?t:String(t)}function Qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Yn,Wn,Kn,Gn;(function(e,t,r,n){var i=Fn();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(Nn(o.descriptor)||Nn(i.descriptor)){if(Zn(o)||Zn(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(Zn(o)){if(Zn(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}Un(o,i)}else t.push(o)}return t}(a.d.map(Bn)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)})([(0,i.Mo)("hassio-addon-info-tab")],(function(e,t){var r=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rn(e,t)}(n,t);var r=Vn(n);function n(){var t;Hn(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(Mn(t)),t}return n}(t);return{F:r,d:[{kind:"field",decorators:[(0,i.Cb)({type:Boolean})],key:"narrow",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"method",key:"render",value:function(){return this.addon?(0,n.dy)(Pn||(Pn=Tn(['\n <div class="content">\n <hassio-addon-info\n .narrow=',"\n .route=","\n .hass=","\n .supervisor=","\n .addon=","\n ></hassio-addon-info>\n </div>\n "])),this.narrow,this.route,this.hass,this.supervisor,this.addon):(0,n.dy)(xn||(xn=Tn(["<ha-circular-progress active></ha-circular-progress>"])))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(An||(An=Tn(["\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n "])))]}}]}}),n.oi),r(54736);function Jn(e){return Jn="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},Jn(e)}function Xn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ei(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function ti(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){ei(o,n,i,a,s,"next",e)}function s(e){ei(o,n,i,a,s,"throw",e)}a(void 0)}))}}function ri(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ni(e,t){return ni=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ni(e,t)}function ii(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vi(e);if(t){var i=vi(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return oi(this,r)}}function oi(e,t){if(t&&("object"===Jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ai(e)}function ai(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function si(){si=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!di(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return hi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hi(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=fi(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:pi(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=pi(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function ci(e){var t,r=fi(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 li(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function di(e){return e.decorators&&e.decorators.length}function ui(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function pi(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 fi(e){var t=function(e,t){if("object"!==Jn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Jn(t)?t:String(t)}function hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mi(e,t,r){return mi="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=vi(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}},mi(e,t,r||e)}function vi(e){return vi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},vi(e)}var yi,bi,gi;!function(e,t,r,n){var i=si();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(ui(o.descriptor)||ui(i.descriptor)){if(di(o)||di(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(di(o)){if(di(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}li(o,i)}else t.push(o)}return t}(a.d.map(ci)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("hassio-addon-logs")],(function(e,t){var r,o,a,s=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ni(e,t)}(n,t);var r=ii(n);function n(){var t;ri(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(ai(t)),t}return n}(t);return{F:s,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_content",value:void 0},{kind:"method",key:"connectedCallback",value:(a=ti(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return mi(vi(s.prototype),"connectedCallback",this).call(this),e.next=3,this._loadData();case 3:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{kind:"method",key:"render",value:function(){return(0,n.dy)(Yn||(Yn=Xn(["\n <h1>","</h1>\n <ha-card outlined>\n ",'\n <div class="card-content">\n ','\n </div>\n <div class="card-actions">\n <mwc-button @click=',">\n ","\n </mwc-button>\n </div>\n </ha-card>\n "])),this.addon.name,this._error?(0,n.dy)(Wn||(Wn=Xn(['<ha-alert alert-type="error">',"</ha-alert>"])),this._error):"",this._content?(0,n.dy)(Kn||(Kn=Xn(["<ha-ansi-to-html\n .content=","\n ></ha-ansi-to-html>"])),this._content):"",this._refresh,this.supervisor.localize("common.refresh"))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(Gn||(Gn=Xn(["\n :host,\n ha-card {\n display: block;\n }\n "])))]}},{kind:"method",key:"_loadData",value:(o=ti(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,e.prev=1,e.next=4,(0,l.kr)(this.hass,this.addon.slug);case 4:this._content=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),this._error=this.supervisor.localize("addon.logs.get_logs","error",(0,d.js)(e.t0));case 10:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(){return o.apply(this,arguments)})},{kind:"method",key:"_refresh",value:(r=ti(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._loadData();case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})}]}}),n.oi);function wi(e){return wi="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},wi(e)}function ki(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ei(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _i(e,t){return _i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_i(e,t)}function Ci(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ai(e);if(t){var i=Ai(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xi(this,r)}}function xi(e,t){if(t&&("object"===wi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pi(e)}function Pi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ai(e){return Ai=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ai(e)}function Oi(){Oi=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!zi(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Ri(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ri(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=Hi(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:Ti(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=Ti(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function Si(e){var t,r=Hi(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 Di(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function zi(e){return e.decorators&&e.decorators.length}function ji(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Ti(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 Hi(e){var t=function(e,t){if("object"!==wi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==wi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===wi(t)?t:String(t)}function Ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}!function(e,t,r,n){var i=Oi();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(ji(o.descriptor)||ji(i.descriptor)){if(zi(o)||zi(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(zi(o)){if(zi(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}Di(o,i)}else t.push(o)}return t}(a.d.map(Si)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("hassio-addon-log-tab")],(function(e,t){var r=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_i(e,t)}(n,t);var r=Ci(n);function n(){var t;Ei(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(Pi(t)),t}return n}(t);return{F:r,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"method",key:"render",value:function(){return this.addon?(0,n.dy)(bi||(bi=ki(['\n <div class="content">\n <hassio-addon-logs\n .hass=',"\n .supervisor=","\n .addon=","\n ></hassio-addon-logs>\n </div>\n "])),this.hass,this.supervisor,this.addon):(0,n.dy)(yi||(yi=ki([" <ha-circular-progress active></ha-circular-progress> "])))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(gi||(gi=ki(["\n .content {\n margin: auto;\n padding: 8px;\n max-width: 1024px;\n }\n "])))]}}]}}),n.oi);function Vi(e){return Vi="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},Vi(e)}function Li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mi(e,t){return Mi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mi(e,t)}function Ii(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ui(e);if(t){var i=Ui(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Fi(this,r)}}function Fi(e,t){if(t&&("object"===Vi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Bi(e)}function Bi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ui(e){return Ui=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ui(e)}function Zi(){Zi=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!qi(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Ki(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ki(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=Wi(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:Yi(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=Yi(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function Ni(e){var t,r=Wi(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 $i(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function qi(e){return e.decorators&&e.decorators.length}function Qi(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Yi(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 Wi(e){var t=function(e,t){if("object"!==Vi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Vi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Vi(t)?t:String(t)}function Ki(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Gi,Ji,Xi,eo;!function(e,t,r,n){var i=Zi();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(Qi(o.descriptor)||Qi(i.descriptor)){if(qi(o)||qi(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(qi(o)){if(qi(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}$i(o,i)}else t.push(o)}return t}(a.d.map(Ni)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("hassio-addon-router")],(function(e,t){var r=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mi(e,t)}(n,t);var r=Ii(n);function n(){var t;Li(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(Bi(t)),t}return n}(t);return{F:r,d:[{kind:"field",decorators:[(0,i.Cb)({type:Boolean})],key:"narrow",value:function(){return!1}},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"field",key:"routerOptions",value:function(){return{defaultPage:"info",showLoading:!0,routes:{info:{tag:"hassio-addon-info-tab"},documentation:{tag:"hassio-addon-documentation-tab"},config:{tag:"hassio-addon-config-tab"},logs:{tag:"hassio-addon-log-tab"}}}}},{kind:"method",key:"updatePageEl",value:function(e){e.route=this.routeTail,e.hass=this.hass,e.supervisor=this.supervisor,e.addon=this.addon,e.narrow=this.narrow}}]}}),ot.n);function to(e){return to="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},to(e)}function ro(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function no(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){ro(o,n,i,a,s,"next",e)}function s(e){ro(o,n,i,a,s,"throw",e)}a(void 0)}))}}function io(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function oo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ao(e,t){return ao=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ao(e,t)}function so(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=uo(e);if(t){var i=uo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return co(this,r)}}function co(e,t){if(t&&("object"===to(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return lo(e)}function lo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uo(e){return uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},uo(e)}function po(){po=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(r){t.forEach((function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,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=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!mo(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},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=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],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 i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:r}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return go(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?go(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var r=bo(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 i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:yo(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var r=yo(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:r}},runClassFinishers:function(e,t){for(var r=0;r<t.length;r++){var n=(0,t[r])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,r){if(void 0!==e[t])throw new TypeError(r+" can't have a ."+t+" property.")}};return e}function fo(e){var t,r=bo(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 ho(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function mo(e){return e.decorators&&e.decorators.length}function vo(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function yo(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 bo(e){var t=function(e,t){if("object"!==to(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==to(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===to(t)?t:String(t)}function go(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}!function(e,t,r,n){var i=po();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),r),s=i.decorateClass(function(e){for(var t=[],r=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},n=0;n<e.length;n++){var i,o=e[n];if("method"===o.kind&&(i=t.find(r)))if(vo(o.descriptor)||vo(i.descriptor)){if(mo(o)||mo(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(mo(o)){if(mo(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}ho(o,i)}else t.push(o)}return t}(a.d.map(fo)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("hassio-addon-dashboard")],(function(e,t){var r,m,v,y=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ao(e,t)}(n,t);var r=so(n);function n(){var t;oo(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=r.call.apply(r,[this].concat(o)),e(lo(t)),t}return n}(t);return{F:y,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"supervisor",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"addon",value:void 0},{kind:"field",decorators:[(0,i.Cb)({type:Boolean})],key:"narrow",value:void 0},{kind:"field",decorators:[(0,i.SB)()],key:"_error",value:void 0},{kind:"field",key:"_backPath",value:function(){return new URLSearchParams(window.parent.location.search).get("store")?"/hassio/store":"/hassio/dashboard"}},{kind:"field",key:"_computeTail",value:function(){return(0,o.Z)((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:"render",value:function(){var e;if(this._error)return(0,n.dy)(Gi||(Gi=io(["<hass-error-screen\n .error=","\n ></hass-error-screen>"])),this._error);if(!this.addon||null===(e=this.supervisor)||void 0===e||!e.addon)return(0,n.dy)(Ji||(Ji=io(["<hass-loading-screen></hass-loading-screen>"])));var t=[{translationKey:"addon.panel.info",path:"/hassio/addon/".concat(this.addon.slug,"/info"),iconPath:"M13.5,4A1.5,1.5 0 0,0 12,5.5A1.5,1.5 0 0,0 13.5,7A1.5,1.5 0 0,0 15,5.5A1.5,1.5 0 0,0 13.5,4M13.14,8.77C11.95,8.87 8.7,11.46 8.7,11.46C8.5,11.61 8.56,11.6 8.72,11.88C8.88,12.15 8.86,12.17 9.05,12.04C9.25,11.91 9.58,11.7 10.13,11.36C12.25,10 10.47,13.14 9.56,18.43C9.2,21.05 11.56,19.7 12.17,19.3C12.77,18.91 14.38,17.8 14.54,17.69C14.76,17.54 14.6,17.42 14.43,17.17C14.31,17 14.19,17.12 14.19,17.12C13.54,17.55 12.35,18.45 12.19,17.88C12,17.31 13.22,13.4 13.89,10.71C14,10.07 14.3,8.67 13.14,8.77Z"}];this.addon.documentation&&t.push({translationKey:"addon.panel.documentation",path:"/hassio/addon/".concat(this.addon.slug,"/documentation"),iconPath:"M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z"}),this.addon.version&&t.push({translationKey:"addon.panel.configuration",path:"/hassio/addon/".concat(this.addon.slug,"/config"),iconPath:"M15.9,18.45C17.25,18.45 18.35,17.35 18.35,16C18.35,14.65 17.25,13.55 15.9,13.55C14.54,13.55 13.45,14.65 13.45,16C13.45,17.35 14.54,18.45 15.9,18.45M21.1,16.68L22.58,17.84C22.71,17.95 22.75,18.13 22.66,18.29L21.26,20.71C21.17,20.86 21,20.92 20.83,20.86L19.09,20.16C18.73,20.44 18.33,20.67 17.91,20.85L17.64,22.7C17.62,22.87 17.47,23 17.3,23H14.5C14.32,23 14.18,22.87 14.15,22.7L13.89,20.85C13.46,20.67 13.07,20.44 12.71,20.16L10.96,20.86C10.81,20.92 10.62,20.86 10.54,20.71L9.14,18.29C9.05,18.13 9.09,17.95 9.22,17.84L10.7,16.68L10.65,16L10.7,15.31L9.22,14.16C9.09,14.05 9.05,13.86 9.14,13.71L10.54,11.29C10.62,11.13 10.81,11.07 10.96,11.13L12.71,11.84C13.07,11.56 13.46,11.32 13.89,11.15L14.15,9.29C14.18,9.13 14.32,9 14.5,9H17.3C17.47,9 17.62,9.13 17.64,9.29L17.91,11.15C18.33,11.32 18.73,11.56 19.09,11.84L20.83,11.13C21,11.07 21.17,11.13 21.26,11.29L22.66,13.71C22.75,13.86 22.71,14.05 22.58,14.16L21.1,15.31L21.15,16L21.1,16.68M6.69,8.07C7.56,8.07 8.26,7.37 8.26,6.5C8.26,5.63 7.56,4.92 6.69,4.92A1.58,1.58 0 0,0 5.11,6.5C5.11,7.37 5.82,8.07 6.69,8.07M10.03,6.94L11,7.68C11.07,7.75 11.09,7.87 11.03,7.97L10.13,9.53C10.08,9.63 9.96,9.67 9.86,9.63L8.74,9.18L8,9.62L7.81,10.81C7.79,10.92 7.7,11 7.59,11H5.79C5.67,11 5.58,10.92 5.56,10.81L5.4,9.62L4.64,9.18L3.5,9.63C3.41,9.67 3.3,9.63 3.24,9.53L2.34,7.97C2.28,7.87 2.31,7.75 2.39,7.68L3.34,6.94L3.31,6.5L3.34,6.06L2.39,5.32C2.31,5.25 2.28,5.13 2.34,5.03L3.24,3.47C3.3,3.37 3.41,3.33 3.5,3.37L4.63,3.82L5.4,3.38L5.56,2.19C5.58,2.08 5.67,2 5.79,2H7.59C7.7,2 7.79,2.08 7.81,2.19L8,3.38L8.74,3.82L9.86,3.37C9.96,3.33 10.08,3.37 10.13,3.47L11.03,5.03C11.09,5.13 11.07,5.25 11,5.32L10.03,6.06L10.06,6.5L10.03,6.94Z"},{translationKey:"addon.panel.log",path:"/hassio/addon/".concat(this.addon.slug,"/logs"),iconPath:"M18 7C16.9 7 16 7.9 16 9V15C16 16.1 16.9 17 18 17H20C21.1 17 22 16.1 22 15V11H20V15H18V9H22V7H18M2 7V17H8V15H4V7H2M11 7C9.9 7 9 7.9 9 9V15C9 16.1 9.9 17 11 17H13C14.1 17 15 16.1 15 15V9C15 7.9 14.1 7 13 7H11M11 9H13V15H11V9Z"});var r=this._computeTail(this.route);return(0,n.dy)(Xi||(Xi=io(["\n <hass-tabs-subpage\n .hass=","\n .localizeFunc=","\n .narrow=","\n .route=","\n .tabs=","\n .backPath=",'\n supervisor\n >\n <span slot="header">',"</span>\n <hassio-addon-router\n .route=","\n .narrow=","\n .hass=","\n .supervisor=","\n .addon=","\n ></hassio-addon-router>\n </hass-tabs-subpage>\n "])),this.hass,this.supervisor.localize,this.narrow,r,t,this._backPath,this.addon.name,r,this.narrow,this.hass,this.supervisor,this.addon)}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,h.l,(0,n.iv)(eo||(eo=io(["\n :host {\n color: var(--primary-text-color);\n }\n .content {\n padding: 24px 0 32px;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n width: 600px;\n }\n hassio-addon-logs {\n max-width: calc(100% - 8px);\n min-width: 600px;\n }\n @media only screen and (max-width: 600px) {\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config,\n hassio-addon-logs {\n max-width: 100%;\n min-width: 100%;\n }\n }\n "])))]}},{kind:"method",key:"firstUpdated",value:(v=no(regeneratorRuntime.mark((function e(){var t,r,n,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==this.route.path){e.next=27;break}if(t=(0,c.io)("addon"),!(r=(0,c.io)("repository_url"))){e.next=21;break}return e.next=6,(0,u.Er)(this.hass);case 6:if(e.sent.repositories.find((function(e){return e.source===r}))){e.next=21;break}return e.next=10,(0,p.g7)(this,{title:this.supervisor.localize("my.add_addon_repository_title"),text:this.supervisor.localize("my.add_addon_repository_description",{addon:t,repository:r}),confirmText:this.supervisor.localize("common.add"),dismissText:this.supervisor.localize("common.cancel")});case 10:if(e.sent){e.next=13;break}return this._error=this.supervisor.localize("my.error_repository_not_found"),e.abrupt("return");case 13:return e.prev=13,e.next=16,(0,u.FV)(this.hass,r);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(13),this._error=(0,d.js)(e.t0);case 21:if(!t){e.next=27;break}return e.next=24,(0,u.Er)(this.hass);case 24:n=e.sent,i=n.addons.some((function(e){return e.slug===t})),i?(0,s.c)("/hassio/addon/".concat(t),{replace:!0}):this._error=this.supervisor.localize("my.error_addon_not_found");case 27:this.addEventListener("hass-api-called",(function(e){return o._apiCalled(e)}));case 28:case"end":return e.stop()}}),e,this,[[13,18]])}))),function(){return v.apply(this,arguments)})},{kind:"method",key:"_apiCalled",value:(m=no(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.detail.success){e.next=2;break}return e.abrupt("return");case 2:if((n=null===(r=t.detail.path)||void 0===r?void 0:r.split("/"))&&0!==n.length){e.next=5;break}return e.abrupt("return");case 5:if(i=n[n.length-1],["uninstall","install","update","start","stop"].includes(i)&&(0,a.B)(this,"supervisor-collection-refresh",{collection:"addon"}),"uninstall"!==i){e.next=11;break}window.history.back(),e.next=19;break;case 11:if("install"!==i){e.next=17;break}return e.next=14,(0,l.AD)(this.hass,this.addon.slug);case 14:this.addon=e.sent,e.next=19;break;case 17:return e.next=19,this._routeDataChanged();case 19:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{kind:"method",key:"updated",value:function(e){e.has("route")&&!this.addon&&this._routeDataChanged()}},{kind:"method",key:"_routeDataChanged",value:(r=no(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.route.path.split("/")[1]){e.next=3;break}return e.abrupt("return");case 3:if(e.prev=3,this.supervisor.addon){e.next=9;break}return e.next=7,(0,l.yt)(this.hass);case 7:r=e.sent,(0,a.B)(this,"supervisor-update",{addon:r});case 9:return e.next=11,(0,l.R_)(this.hass,this.supervisor,t);case 11:this.addon=e.sent,e.next=18;break;case 14:e.prev=14,e.t0=e.catch(3),this._error="Error fetching addon info: ".concat((0,d.js)(e.t0)),this.addon=void 0;case 18:case"end":return e.stop()}}),e,this,[[3,14]])}))),function(){return r.apply(this,arguments)})}]}}),n.oi)}}]);