(this.webpackJsonpgodiva=this.webpackJsonpgodiva||[]).push([[19,20],{1109:function(e,t,r){e.exports={wrapper:"wrapper--1RtFH"}},1679:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n),o=r(1),c=r(1109),i=r.n(c),s=r(3),u=r.n(s),l=r(27),d=r.n(l),f=r(13),p=r(2),m=r(151),h=r(67),y=r(6),b=r.n(y),v=r(15),w=window,E={},k={},g={};function O(e,t,r){"string"!==typeof e&&(r=t,t=e,e=void 0),Array.isArray(t)||(r=t,t=void 0);var n=document.currentScript&&document.currentScript.src;(e=e||n)&&(E[e]={deps:t,factory:r,src:n,loaded:!1},k[e]&&(k[e].map((function(e){return e()})),delete k[e]))}function j(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.map((function(e){return new Promise((function(t,r){if("!"===e.charAt(0)&&(e=e.slice(1),delete E[e],delete g[e]),E[e]){var n=E[e];if(n.loaded)t(n.factory);else if("function"===typeof n.factory){(n.deps?j.apply(void 0,Object(v.a)(n.deps)):Promise.resolve([])).then((function(e){Array.isArray(e)||(e=[e]),n.factory=n.factory.apply(n,Object(v.a)(e)),n.loaded=!0,t(n.factory)})).catch(r)}else n.loaded=!0,t(n.factory)}else if(/^\w+$/.test(e))k[e]=k[e]||[],k[e].push((function(){j(e).then(t).catch(r)}));else if(!g[e]){var a=document.createElement("script");"undefined"!==typeof a.addEventListener?(a.addEventListener("load",(function(){var n=Object.keys(E).find((function(e){return E[e].src===a.src}));void 0===n&&r("module:".concat(e," missing!")),j(n).then(t).catch(r),document.body.removeChild(a)})),a.src=e,a.async=!0,document.body.appendChild(a),g[e]=!0):r('Your browser is too OLD to run "pico" loader')}}))}));return n.length>1?Promise.all(n):n[0]}function S(){if(w.define){if(!w.define.amd||!w.define.amd.pico)throw new Error("Incompatible mix of defines found!")}else w.define=O;return j.apply(void 0,arguments)}O.amd={pico:!0};var x=r(920),A=r(8);function C(e){e&&(h.a.setVars({primaryColor:e,antdPrimaryColor:e}),f.a.themeStore.setPrimaryColor(e))}t.default=function(){var e=Object(o.a)(a.a.mark((function e(t){var r,n,c,s,l;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f.a.configStore.gpuiUri){e.next=2;break}throw new Error("\u672a\u6307\u5b9agpui.webview.js\u5730\u5740, \u8bf7\u914d\u7f6e`gpuiUri`");case 2:return O("mobx",p),e.next=5,S(f.a.configStore.gpuiUri);case 5:return r=e.sent,e.next=8,f.a.envStore.setGPUI(r);case 8:Object(p.reaction)((function(){return r.params.accessToken}),(function(e){e&&(f.a.authStore.setAuth({accessToken:e}),b.a.additionalHeaders={"X-Gapper-OAuth-Token":e})}),{fireImmediately:!0}),n=window.location.hash.split("?").pop(),c=Object(A.parse)(n,{allowDots:!0}),s=c.colors,C((s||{}).primaryColor),Object(p.reaction)((function(){return r.params.colors}),(function(e){C((e||{}).primaryColor)}),{fireImmediately:!0}),f.a.authStore.setRefreshTokenFunc(Object(o.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.root.refreshAccessToken();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))),b.a.refreshAccessToken=f.a.authStore.refreshTokenFunc,r.params.accessToken?f.a.currentUserStore.getCurrentUser().catch((function(){})):l=setInterval((function(){r.params.accessToken&&(clearInterval(l),f.a.currentUserStore.getCurrentUser().catch((function(){})))}),500),d.a.render(u.a.createElement("div",{className:i.a.wrapper},u.a.createElement(m.a,null,u.a.createElement(x.default,null))),t);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},920:function(e,t,r){"use strict";r.r(t);r(991);var n=r(21),a=(r(71),r(48)),o=(r(921),r(3)),c=r.n(o),i=r(178),s=r(994),u=r.n(s),l=Object(o.lazy)((function(){return r.e(6).then(r.bind(null,997))})),d=Object(o.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(3),r.e(10)]).then(r.bind(null,1101))})),f=Object(o.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(3),r.e(10)]).then(r.bind(null,1098))})),p=Object(o.lazy)((function(){return Promise.all([r.e(1),r.e(16),r.e(12)]).then(r.bind(null,1099))}));t.default=function(){return c.a.createElement(n.a,{locale:u.a},c.a.createElement(o.Suspense,{fallback:c.a.createElement(a.a,null)},c.a.createElement(i.d,null,c.a.createElement(i.b,{exact:!0,path:"/"},c.a.createElement(i.a,{to:"/dashboard"})),c.a.createElement(i.b,{path:"/dashboard",component:l}),c.a.createElement(i.b,{path:["/datasource/add-sql","/datasource/edit-sql/:key"],component:f}),c.a.createElement(i.b,{path:"/datasource",component:d}),c.a.createElement(i.b,{path:"/migration-assistant",component:p}))))}},921:function(e,t,r){}}]);