(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4841],{1210:function(e,t,r){"use strict";r.d(t,{Z:function(){return k}});var n=r(82394),i=r(21831),o=r(82684),u=r(47999),l=r(49894),s=r(93461),c=r(57384),a=r(12344),f=r(72454),d=r(28598);function h(e,t){var r=e.children;return(0,d.jsx)(f.HS,{ref:t,children:r})}var v=o.forwardRef(h),p=r(32063),b=r(15270),j=r(82531),O=r(66166),w=r(3055),m=r(49125),_=r(91427),x=r(24141);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k=function(e){var t,r=e.after,n=e.afterHidden,h=e.afterWidth,g=e.afterWidthOverride,k=e.before,y=e.beforeWidth,P=e.breadcrumbs,E=e.children,C=e.errors,S=e.headerMenuItems,M=e.navigationItems,A=e.setErrors,D=e.subheaderChildren,N=e.title,W=e.uuid,H=(0,x.i)().width,I="dashboard_after_width_".concat(W),R="dashboard_before_width_".concat(W),T=(0,o.useRef)(null),B=(0,o.useState)(g?h:(0,_.U2)(I,h)),U=B[0],z=B[1],F=(0,o.useState)(!1),X=F[0],q=F[1],K=(0,o.useState)(k?Math.max((0,_.U2)(R,y),13*m.iI):null),L=K[0],Y=K[1],G=(0,o.useState)(!1),J=G[0],Q=G[1],V=(0,o.useState)(null)[1],$=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,te=[];P?te.push.apply(te,(0,i.Z)(P)):(null===ee||void 0===ee?void 0:ee.length)>=1&&te.push.apply(te,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return N}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||X||J||null===V||void 0===V||V(T.current.getBoundingClientRect().width)}),[X,U,J,L,T,V,H]),(0,o.useEffect)((function(){X||(0,_.t8)(I,U)}),[n,X,U,I]),(0,o.useEffect)((function(){J||(0,_.t8)(R,L)}),[J,L,R]);var re=(0,O.Z)(h);return(0,o.useEffect)((function(){g&&re!==h&&z(h)}),[g,h,re]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c.Z,{title:N}),(0,d.jsx)(a.Z,{breadcrumbs:te,menuItems:S,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(t=ee[0])||void 0===t?void 0:t.version}),(0,d.jsxs)(f.Nk,{children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,d.jsx)(f.lm,{children:(0,d.jsx)(b.Z,{navigationItems:M})}),(0,d.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,d.jsxs)(p.Z,{after:r,afterHeightOffset:w.Mz,afterHidden:n,afterMousedownActive:X,afterWidth:U,before:k,beforeHeightOffset:w.Mz,beforeMousedownActive:J,beforeWidth:f.k1+(k?L:0),hideAfterCompletely:!0,leftOffset:k?f.k1:null,mainContainerRef:T,setAfterMousedownActive:q,setAfterWidth:z,setBeforeMousedownActive:Q,setBeforeWidth:Y,children:[D&&(0,d.jsx)(v,{children:D}),E]})})]}),C&&(0,d.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===A||void 0===A?void 0:A(null)},children:(0,d.jsx)(l.Z,Z(Z({},C),{},{onClose:function(){return null===A||void 0===A?void 0:A(null)}}))})]})}},72433:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(75582),o=r(38860),u=r.n(o),l=r(82684),s=r(83455),c=r(1210),a=r(41788),f=r(33699),d=r(82531),h=r(98781),v=r(96510),p=r(28598);function b(){var e=(0,s.Db)(d.ZP.kernels.useUpdate(h.a_[h.qL.PYTHON]),{onSuccess:function(e){return(0,v.wD)(e,{onErrorCallback:function(e,t){console.log(e),alert(t)}})}}),t=(0,i.Z)(e,1)[0],r=(0,l.useCallback)((function(){return t({kernel:{action_type:"interrupt"}})}),[t]);return(0,p.jsx)(c.Z,{title:"Terminal",uuid:"terminal/index",children:(0,p.jsx)(f.Z,{interruptKernel:r})})}b.getInitialProps=(0,n.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,a.Z)(b)},27271:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/terminal",function(){return r(72433)}])}},function(e){e.O(0,[3850,9565,6085,2344,9386,5141,9774,2888,179],(function(){return t=27271,e(e.s=t);var t}));var t=e.O();_N_E=t}]);