(this["webpackJsonplab-clusters-ui"]=this["webpackJsonplab-clusters-ui"]||[]).push([[19],{802:function(e,r,t){"use strict";t.r(r);var n=t(0),a=t.n(n),s=t(1),c=(t(10),t(2)),o=t.n(c),u=t(32),i=t.n(u),p=t(13),l=t(7),f=t(215),m=t(99),b=t(4),h=t.n(b),d=t(516);r.default=function(){var e=Object(s.a)(a.a.mark((function e(r){var n,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p.a.configStore.gpuiUri){e.next=2;break}throw new Error("\u672a\u6307\u5b9agpui.webview.js\u5730\u5740, \u8bf7\u914d\u7f6e`gpui_uri`");case 2:return d.a("mobx",l),e.next=5,d.b(p.a.configStore.gpuiUri);case 5:return n=e.sent,e.next=8,p.a.envStore.setGPUI(n);case 8:return e.next=10,p.a.envStore.getSystemSettings();case 10:Object(l.reaction)((function(){return n.params.accessToken}),(function(e){p.a.authStore.setAuth({accessToken:e}),h.a.additionalHeaders={"X-Gapper-OAuth-Token":e}}),{fireImmediately:!0}),Object(l.reaction)((function(){return n.params.colors}),(function(e){var r=(e||{}).primaryColor;r&&m.a.setVars({primaryColor:r,antdPrimaryColor:r})}),{fireImmediately:!0}),h.a.refreshAccessToken=Object(s.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.root.refreshAccessToken();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),c=setInterval(Object(s.a)(a.a.mark((function e(){var s,u;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.params.accessToken){e.next=9;break}return clearInterval(c),e.next=4,Promise.all([p.a.currentUserStore.getCurrentUser(),p.a.appStore.getApps()]);case 4:return e.next=6,Promise.all([t.e(14),t.e(17)]).then(t.bind(null,233));case 6:s=e.sent,u=s.default||s,i.a.render(o.a.createElement(f.a,null,o.a.createElement(u,null)),r);case 9:case"end":return e.stop()}}),e)}))),500);case 14:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()}}]);
//# sourceMappingURL=19.0fa5d2d1.chunk.js.map