"use strict";(self.webpackChunkcode_editor=self.webpackChunkcode_editor||[]).push([[7852],{15224:function(e,n,t){t.r(n);var o=t(95520),r=t.n(o),l=t(69396),c=t.n(l),a=t(44864),u=t(49684),i=t(68704),s=t(77204),d=t(98436),f=t.n(d),m=t(5476),p=t.n(m),g=t(99324),b=t.n(g),v=t(62400),C=t.n(v),S=t(36512),E=t.n(S),h=t(18428),x=t.n(h),y=t(68416),F=t.n(y),P=t(77872),k=t.n(P),A=t(52184),I=t.n(A),R=t(18583),D=t.n(R),q=t(88084),w=t.n(q),N=t(99860),G=t(8744),L=t(83800),M=t(98640),T=t(58572),j=t(31944),B=t(34432),O=t(71252),_=t.n(O),H=["localeConfig","onDebugProcotolRequest","style","className","scriptPaths","onGetCodeFragment","codeFragmentTree","onAIActionSend","userInfo","menuList"];function z(e,n){var t=C()(e);if(E()){var o=E()(e);n&&(o=x()(o).call(o,(function(n){return F()(e,n).enumerable}))),t.push.apply(t,o)}return t}function J(e){for(var n=1;n<arguments.length;n++){var t,o,r=null!=arguments[n]?arguments[n]:{};n%2?k()(t=z(Object(r),!0)).call(t,(function(n){(0,u.c)(e,n,r[n])})):I()?D()(e,I()(r)):k()(o=z(Object(r))).call(o,(function(n){w()(e,n,F()(r,n))}))}return e}var K=function(e,n){var t=e.localeConfig,l=e.onDebugProcotolRequest,c=e.style,u=e.className,d=e.scriptPaths,m=e.onGetCodeFragment,g=e.codeFragmentTree,v=e.onAIActionSend,C=e.userInfo,S=e.menuList,E=(0,s.c)(e,H),h=(0,o.useState)(1),x=(0,i.c)(h,2),y=x[0],F=x[1],P=(0,o.useState)(""),k=(0,i.c)(P,2),A=k[0],I=k[1],R=(0,o.useRef)(),D=(0,o.useCallback)((function(e){return new(f())((function(n){l(e,n)}))}),[l]),q=(0,o.useMemo)((function(){return{procotolRequest:D}}),[D]),w=(0,o.useCallback)((function(){F(1),p()((function(){F(1.1)}),100)}),[]);(0,o.useImperativeHandle)(n,(function(){var e;return{sendDebugReponse:null===(e=R.current)||void 0===e?void 0:e.sendDebugReponse}}));var O=(0,o.useMemo)((function(){return b()(S).call(S,"debug")}),[S]),z=S.length>0;(0,o.useEffect)((function(){F("debug"===A?.8:1)}),[A]);var K=(0,o.useCallback)((function(e){I(e)}),[]);return r().createElement(T.cp,{value:{localeConfig:t,userInfo:C}},r().createElement(j.c.Provider,{value:q},r().createElement("div",{className:_()(u,B.c.box),style:J(J({display:"flex"},c),{},{height:"100%"})},r().createElement(N.SplitPanel,{style:{border:"none"},canFold:!1,defaultSplit:z?A?"ai"===A?"460px":"360px":"40px":0,min:z?A?"ai"===A?"460px":"360px":"40px":0,disabled:!A,firstSlot:r().createElement(M.c,{onMenuActiveChange:K,ref:R,scriptPaths:d,codeFragmentTree:g,onGetCodeFragment:m,menuList:S,onBeforeDebug:e.onBeforeDebug,onAIActionSend:v}),secondSlot:r().createElement(N.SplitPanel,{style:{border:"none"},mode:"vertical",firstSlot:r().createElement(G.c,(0,a.c)({ref:n},E)),secondSlot:O?r().createElement(L.c,{onClose:w}):null,canFold:!1,defaultSplit:y,max:O&&A?"32px":"0px",disabled:!O})}))))};K.displayName="CodeEditor";var Q=r().forwardRef(K),U=function(e){return r().createElement(r().Fragment,null,r().createElement(Q,null))};c().render(r().createElement(U,null),document.querySelector("#app"))}}]);