"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["80403"],{34238:function(r,e,s){s.a(r,async function(r,t){try{s.r(e),s.d(e,{REDIRECTS:function(){return g}});var a,o,i=s(78261),n=s(72153),c=s(44734),u=s(43080),p=s(69683),h=s(25460),d=s(6454),l=(s(16280),s(28706),s(18111),s(7588),s(5506),s(79432),s(26099),s(23500),s(40445)),_=s(25939),v=s(96196),f=s(77845),y=s(91926),m=s(6030),k=s(28794),b=r([k]);k=(b.then?(await b)():b)[0];var g={supervisor:{redirect:"/hassio/dashboard"},supervisor_logs:{redirect:"/hassio/system"},supervisor_info:{redirect:"/hassio/system"},supervisor_snapshots:{redirect:"/hassio/backups"},supervisor_backups:{redirect:"/hassio/backups"},supervisor_store:{redirect:"/hassio/store"},supervisor_addons:{redirect:"/hassio/dashboard"},supervisor_addon:{redirect:"/hassio/addon",params:{addon:"string"},optional_params:{repository_url:"url"}},supervisor_ingress:{redirect:"/hassio/ingress",params:{addon:"string"}},supervisor_add_addon_repository:{redirect:"/hassio/store",params:{repository_url:"url"}}},C=function(r){function e(){return(0,c.A)(this,e),(0,p.A)(this,e,arguments)}return(0,d.A)(e,r),(0,u.A)(e,[{key:"connectedCallback",value:function(){(0,h.A)(e,"connectedCallback",this,3)([]);var r=this.route.path.substr(1),s=g[r];if(s){var t;try{t=this._createRedirectUrl(s)}catch(o){return void(this._error=this.supervisor.localize("my.error"))}(0,y.o)(t,{replace:!0})}else this._error=this.supervisor.localize("my.not_supported",{link:(0,v.qy)(a||(a=(0,n.A)(['<a target="_blank" rel="noreferrer noopener" href="https://my.home-assistant.io/faq.html#supported-pages"> '," </a>"])),this.supervisor.localize("my.faq_link"))})}},{key:"render",value:function(){return this._error?(0,v.qy)(o||(o=(0,n.A)(['<hass-error-screen .error="','"></hass-error-screen>'])),this._error):v.s6}},{key:"_createRedirectUrl",value:function(r){var e=this._createRedirectParams(r);return"".concat(r.redirect).concat(e)}},{key:"_createRedirectParams",value:function(r){var e=this,s=(0,m.px)();if(!r.params&&!Object.keys(s).length)return"";var t={};return Object.entries(r.params||{}).forEach(function(r){var a=(0,i.A)(r,2),o=a[0],n=a[1];if(!s[o]||!e._checkParamType(n,s[o]))throw Error();t[o]=s[o]}),Object.entries(r.optional_params||{}).forEach(function(r){var a=(0,i.A)(r,2),o=a[0],n=a[1];if(s[o]){if(!e._checkParamType(n,s[o]))throw Error();t[o]=s[o]}}),"?".concat((0,m.KH)(t))}},{key:"_checkParamType",value:function(r,e){return"string"===r||"url"===r&&(e&&e===(0,_.sanitizeUrl)(e))}}])}(v.WF);(0,l.Cg)([(0,f.MZ)({attribute:!1})],C.prototype,"hass",void 0),(0,l.Cg)([(0,f.MZ)({attribute:!1})],C.prototype,"supervisor",void 0),(0,l.Cg)([(0,f.MZ)({attribute:!1})],C.prototype,"route",void 0),(0,l.Cg)([(0,f.wk)()],C.prototype,"_error",void 0),C=(0,l.Cg)([(0,f.EM)("hassio-my-redirect")],C),t()}catch(A){t(A)}})}}]);
//# sourceMappingURL=80403.34e3b81f0494547f.js.map