"use strict";(self.webpackChunkdevice_management_client=self.webpackChunkdevice_management_client||[]).push([[441],{5441:function(e,r,n){n.r(r),n.d(r,{executeConfigUpdate:function(){return a},handleConfigUpdateResponse:function(){return u}});var s=n(2007),o=n(467),i=n(2284);function u(e){var r,n;if(200===(null===e||void 0===e?void 0:e.status)){var s=null===e||void 0===e?void 0:e.data;if(null!==s&&void 0!==s&&s.error&&null!==s&&void 0!==s&&s.details){var o=s.details,u=!1,a=!1;for(var t in o){var l=o[t];l&&"object"===(0,i.A)(l)&&(!0===l.success&&(u=!0),!1===l.success&&(a=!0))}if(u&&a)return{success:!0,partialSuccess:!0,error:s.error,details:s};if(a&&!u)return{success:!1,error:s.error||"\u914d\u7f6e\u8bbe\u7f6e\u5931\u8d25",details:s}}return null===s||void 0===s||!s.error||null!==s&&void 0!==s&&s.details?{success:!0,partialSuccess:!1}:{success:!1,error:s.error,details:s}}return{success:!1,error:(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.error)||(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.message)||"\u914d\u7f6e\u66f4\u65b0\u5931\u8d25",details:null===e||void 0===e?void 0:e.data}}function a(e,r){return t.apply(this,arguments)}function t(){return t=(0,o.A)((0,s.A)().m((function e(r,n){var i,a,t,l,c,d,v,f,p,h,m,g,A=arguments;return(0,s.A)().w((function(e){for(;;)switch(e.n){case 0:return a=(i=A.length>2&&void 0!==A[2]?A[2]:{}).delayBeforeRefresh,t=void 0===a?500:a,l=i.onSuccess,c=i.onError,d=i.onPartialSuccess,e.p=1,e.n=2,r;case 2:return v=e.v,(f=u(v,i)).success?(n&&setTimeout((0,o.A)((0,s.A)().m((function e(){var r;return(0,s.A)().w((function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,n();case 1:e.n=3;break;case 2:e.p=2,r=e.v,console.error("Failed to refresh config after update:",r);case 3:return e.a(2)}}),e,null,[[0,2]])}))),t),f.partialSuccess&&d?d(f):l&&l(f)):c&&c(f),e.a(2,f);case 3:return e.p=3,g=e.v,m={success:!1,error:(null===g||void 0===g||null===(p=g.response)||void 0===p||null===(p=p.data)||void 0===p?void 0:p.error)||(null===g||void 0===g?void 0:g.message)||"\u914d\u7f6e\u66f4\u65b0\u5931\u8d25",details:null===g||void 0===g||null===(h=g.response)||void 0===h?void 0:h.data},c&&c(m),e.a(2,m)}}),e,null,[[1,3]])}))),t.apply(this,arguments)}}}]);
//# sourceMappingURL=441.49c123d5.chunk.js.map