"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[20838],{5058:function(n,t,r){var e=r(36854),o=r(98117),u=r(73010),i=(r(74423),r(23792),r(26099),r(3362),r(31415),r(17642),r(58004),r(33853),r(45876),r(32475),r(15024),r(31698),r(21699),r(47764),r(62953),function(n){return n.data}),s=function(n){return"object"===(0,u.A)(n)?"object"===(0,u.A)(n.body)?n.body.message||"Unknown error, see supervisor logs":n.body||n.message||"Unknown error, see supervisor logs":n},c=new Set([502,503,504]),a=function(n){return!!(n&&n.status_code&&c.has(n.status_code))||!(!n||!n.message||!n.message.includes("ERR_CONNECTION_CLOSED")&&!n.message.includes("ERR_CONNECTION_RESET"))},f=function(){var n=(0,o.A)((0,e.A)().m(function n(t,r){return(0,e.A)().w(function(n){for(;;)if(0===n.n)return n.a(2,t({type:"supervisor/api",endpoint:"/".concat(r,"/stats"),method:"get"}))},n)}));return function(t,r){return n.apply(this,arguments)}}();r.d(t,{PS:function(){return i},Tv:function(){return a},VR:function(){return s},lE:function(){return f}})},66451:function(n,t,r){var e=r(36854),o=r(98117),u=(r(26099),r(3362),r(79435)),i=r(5058),s=function(){var n=(0,o.A)((0,e.A)().m(function n(t,r,o){var s,c;return(0,e.A)().w(function(n){for(;;)switch(n.n){case 0:if(!(0,u.v)(t.config.version,2021,2,4)){n.n=1;break}return n.a(2,t.callWS({type:"supervisor/api",endpoint:r,method:(null==o?void 0:o.method)||"get",timeout:null!==(s=null==o?void 0:o.timeout)&&void 0!==s?s:null,data:null==o?void 0:o.data}));case 1:return c=i.PS,n.n=2,t.callApi((o.method||"get").toUpperCase(),"hassio".concat(r),null==o?void 0:o.data);case 2:return n.a(2,c(n.v))}},n)}));return function(t,r,e){return n.apply(this,arguments)}}();r.d(t,{X:function(){return s}})},97765:function(n,t,r){r.r(t);var e=r(36854),o=r(98117),u=(r(26099),r(3362),r(66451)),i=function(){var n=(0,o.A)((0,e.A)().m(function n(t){return(0,e.A)().w(function(n){for(;;)if(0===n.n)return n.a(2,(0,u.X)(t,"/store"))},n)}));return function(t){return n.apply(this,arguments)}}(),s=function(){var n=(0,o.A)((0,e.A)().m(function n(t){return(0,e.A)().w(function(n){for(;;)if(0===n.n)return n.a(2,(0,u.X)(t,"/store/repositories"))},n)}));return function(t){return n.apply(this,arguments)}}(),c=function(){var n=(0,o.A)((0,e.A)().m(function n(t,r){return(0,e.A)().w(function(n){for(;;)if(0===n.n)return n.a(2,(0,u.X)(t,"/store/repositories",{method:"post",data:{repository:r}}))},n)}));return function(t,r){return n.apply(this,arguments)}}(),a=function(){var n=(0,o.A)((0,e.A)().m(function n(t,r){return(0,e.A)().w(function(n){for(;;)if(0===n.n)return n.a(2,(0,u.X)(t,"/store/repositories/".concat(r),{method:"delete"}))},n)}));return function(t,r){return n.apply(this,arguments)}}();r.d(t,{addStoreRepository:function(){return c},fetchStoreRepositories:function(){return s},fetchSupervisorStore:function(){return i},removeStoreRepository:function(){return a}})}}]);
//# sourceMappingURL=20838.5bda3fada2d2f1fb.js.map