You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__MyProblem__RecordDetail_...

1 line
36 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[17527],{43501:function(e,n,t){t.d(n,{Z:function(){return c}});var r=t(1565),i=t(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},o=t(68475),s=function(e,n){return i.createElement(o.Z,(0,r.Z)({},e,{ref:n,icon:a}))};var c=i.forwardRef(s)},89136:function(e,n,t){t.d(n,{Z:function(){return c}});var r=t(1565),i=t(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},o=t(68475),s=function(e,n){return i.createElement(o.Z,(0,r.Z)({},e,{ref:n,icon:a}))};var c=i.forwardRef(s)},53547:function(e,n,t){t.d(n,{Z:function(){return c}});var r=t(1565),i=t(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},o=t(68475),s=function(e,n){return i.createElement(o.Z,(0,r.Z)({},e,{ref:n,icon:a}))};var c=i.forwardRef(s)},7406:function(e,n,t){var r=t(82242),i=t.n(r),a=(t(59301),t(93314)),o=t(3113),s=t(37712);n.Z=function(e){var n=e.img,t=e.buttonProps,r=void 0===t?{}:t,c=e.styles,l=void 0===c?{}:c,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,h=e.ButtonTwo,m=e.imgStyles,v=e.loading,x=void 0!==v&&v;return(0,s.jsxs)("section",{className:"tc animated fadeIn",style:i()(i()({},{color:"#999",margin:"100px auto",visibility:x?"hidden":"visible"}),l),children:[(0,s.jsx)("img",{src:n||a,style:i()(i()({},m),{},{pointerEvents:"none",userSelect:"none"})}),(0,s.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,s.jsx)(o.ZP,i()(i()({className:f,onClick:p},r),{},{children:d})),h&&h]})}},84143:function(e,n,t){t.d(n,{Z:function(){return E}});var r=t(82242),i=t.n(r),a=t(7557),o=t.n(a),s=t(41498),c=t.n(s),l=t(79800),u=t.n(l),d=t(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=t(3113),h=t(74516),m=t(94049),v=t(6848),x=t(6457),g=t(83),_=t(7406),j=t(27065),y=t(6288),b=t(37712),E=function(e){var n,t,r,a,s,l,E=e.editOffice,w=void 0===E?"view":E,C=e.data,N=(e.theme,e.type),k=e.filename,O=e.monacoEditor,T=e.className,I=e.style,S=e.close,Z=e.onClose,L=e.hasMask,P=e.disabledDownload,M=e.onImgDimensions,R=e.showNodata,A=e.recordInfo,F=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),B=u()(F,2),z=(B[0],B[1],(0,d.useState)("")),U=u()(z,2),H=(U[0],U[1]),D=(0,d.useState)(),V=u()(D,2),X=V[0],$=V[1],q="build"===window.ENV?"/react/build":"",W=location.host.startsWith("localhost")?j.Z.PROXY_SERVER:j.Z.API_SERVER,Y=(0,d.useRef)();null!==(n=C)&&void 0!==n&&n.startsWith("/api")&&"txt"!==N&&(C=j.Z.API_SERVER+C);k&&(O.filename=k),(0,d.useEffect)((function(){var e,n=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(e){var n=e.split("=");"_educoder_session"===n[0]&&H(n[1])}))}),[]),(0,d.useEffect)((function(){var e;"office"===N&&(C.indexOf("bigfilescdn.")>-1||C.indexOf("bigfiles1")>-1?$({url:C,fileType:(e=C,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:C.indexOf("model=edit")?"edit":"view"}):J())}),[N,C]);var J=function(){var e=c()(o()().mark((function e(){var n,t,r;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",C),n=C,C.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=6,(0,g.gJ)({attachment_id:t});case 6:(r=e.sent).url=W+r.url,$(r);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){C.startsWith("http")||C.startsWith("blob:")?K():(0,x.Sv)(k||"educoder",C,k)},K=function(){A&&(0,y.fc)({id:null==A?void 0:A.id,watch_type:1,course_id:null==A?void 0:A.course_id}),(0,x.Nd)(k||"educoder",decodeURIComponent(C))};return(0,b.jsxs)("div",{style:i()({},I||{}),className:"".concat(L&&p.bgBlack," ").concat(N?p.wrp:"hide"),children:[S&&(0,b.jsxs)("div",{className:p.close,ref:Y,children:[!!M&&(0,b.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return Y.current},children:(0,b.jsx)("span",{onClick:function(){Z(),M()},children:(0,b.jsx)("i",{className:"icon-yulanpizhu"})})}),!P&&(0,b.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return Y.current},children:(0,b.jsx)("span",{onClick:K,children:(0,b.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,b.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return Y.current},children:(0,b.jsx)("span",{className:"",onClick:Z,children:(0,b.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,b.jsx)("div",{className:"".concat(p[T]," ").concat(T," ").concat(p.monaco," ").concat("txt"===N?"show":"hide"),children:"txt"===N&&(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(m.ZP,i()({},O))})}),"audio"===N&&(0,b.jsx)("audio",{src:"".concat((null===(t=C)||void 0===t?void 0:t.indexOf("http://"))>-1||(null===(r=C)||void 0===r?void 0:r.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(C),autoPlay:!0}),"video"===N&&(0,b.jsx)(b.Fragment,{children:(null===(a=C)||void 0===a?void 0:a.indexOf("http"))>-1?(0,b.jsx)("video",{controls:!0,src:"".concat(C),autoPlay:!0}):(0,b.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(C),autoPlay:!0})}),"office"===N&&X&&(0,b.jsx)("iframe",{src:"".concat(q,"/office.html?key=").concat(X.key,"&url=").concat(btoa(X.url),"&callbackUrl=").concat(W+X.callbackUrl,"&fileType=").concat(X.fileType,"&title=").concat(X.title,"&model=").concat(w,"&officeServer=").concat(j.Z.ONLYOFFICE,"&disabledDownload=").concat(!!P)}),"html"===N&&(0,b.jsx)("iframe",{src:C+"&disposition=inline"}),"pdf"===N&&(0,b.jsx)("iframe",{src:"".concat(q,"/js/pdfview/index.html?url=").concat(C,"&disabledDownload=").concat(!!P)}),"image"===N&&(0,b.jsx)("img",{src:"".concat((null===(s=C)||void 0===s?void 0:s.indexOf("http://"))>-1||(null===(l=C)||void 0===l?void 0:l.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(C)}),("other"===N||"download"===N)&&(0,b.jsx)(b.Fragment,{children:R?(0,b.jsx)(_.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,b.jsx)(f.ZP,{icon:(0,b.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:G,children:"下载"})}):(0,b.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:G,children:[(0,b.jsx)(h.Z,{}),"点击下载"]})})]})}},42783:function(e,n,t){var r=t(82242),i=t.n(r),a=t(37205),o=t.n(a),s=t(91232),c=t.n(s),l=t(79800),u=t.n(l),d=t(59301),p=(t(98253),t(55369)),f=(t(64018),t(63824)),h=t(27065),m=t(15342),v=t(1012),x=t(84143),g=t(37712),_="@▁@",j=/<pre[^>]*>/g;n.Z=function(e){var n=e.value,t=void 0===n?"":n,r=e.className,a=e.showTextOnly,s=e.showLines,l=e.style,y=void 0===l?{}:l,b=e.stylesPrev,E=void 0===b?{}:b,w=e.highlightKeywords,C=e.showProgramFill,N=(e.isProgramFill,e.disabledFill),k=void 0!==N&&N,O=e.programFillValue,T=e.onFillChange,I=void 0===T?function(e){}:T,S=e.onFillBlur,Z=void 0===S?function(){}:S,L=String(t),P=(0,d.useState)(""),M=u()(P,2),R=M[0],A=M[1],F=(0,d.useState)("office"),B=u()(F,2),z=B[0],U=B[1],H=(0,d.useState)([]),D=u()(H,2),V=D[0],X=D[1],$=(0,d.useRef)("a"+(0,v.Z)()),q={},W=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,n){var t=n.replace(/(\n|\r)/g,"").split("}"),r=[];return t.map((function(e){""!=e&&r.push(".".concat($.current," ").concat(e))})),"<style>".concat(r.join("}"),"</style>")}))},Y=(0,d.useMemo)((function(){try{L=L.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+h.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+h.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+h.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")}catch(e){}if(C){var e=-1;return L=L.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(n,t,r){var i;return function(e,n,t){var r=document.createElement(e===_?"input":"textarea");r.style.width="100%",r.style.height=e===_?"40px":"151px",r.rows=5,r.spellcheck=!1,r.name="edu-program-fill",r.placeholder="请输入",r.dataset.id=n;var i=Object.keys(q).length;return q[i]=r,'<span class="edu-program-fill-wrap '.concat(e===_?"":"show",'" style="width:').concat(e===_?"400px":"100%",'" title=').concat(t||"","><span>").concat(r.outerHTML,'<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>')}(n,++e,null==O||null===(i=O[e])||void 0===i?void 0:i.value)})),'<pre style="background:#fff;padding:4px">'.concat(W(L||""),"</pre>")}var n=W(L);n=(0,p.ZP)(n);var t=(0,p.ez)();L.match(/\[TOC\]/)&&(n=n.replace("<p>[TOC]</p>",(0,p.Qv)()),(0,p.Iy)()),n=n.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],i=r.type,a=r.expression;return(0,m.renderToString)(function(e){var n=document.createElement("div");return n.innerHTML=e,0===n.childNodes.length?"":n.childNodes[0].nodeValue}(a)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})})),n=n.replace(/▁/g,"▁▁▁▁▁"),(0,p.AL)();var r=document.createElement("div");return r.innerHTML=n,w?(K(r,w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r.innerHTML):a?r.innerText:(setTimeout((function(){return ne()}),500),r.innerHTML)}),[L,w]);(0,d.useEffect)((function(){Q.current&&Q.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=J,e.onblur=G}))}),[V]),(0,d.useEffect)((function(){if(null!=O&&O.length)try{var e,n=Q.current.querySelectorAll(".edu-program-fill-score"),t=Q.current.querySelectorAll('[name="edu-program-fill"]'),r=c()(t.entries());try{for(r.s();!(e=r.n()).done;){var i,a,o,s=u()(e.value,2),l=s[0],d=s[1];d.value=(null==O||null===(i=O[l])||void 0===i?void 0:i.value)||"","warning"===(null==O||null===(a=O[l])||void 0===a?void 0:a.type)?d.className="program-fill-warning":"success"===(null==O||null===(o=O[l])||void 0===o?void 0:o.type)?d.className="program-fill-success":d.className=""}}catch(e){r.e(e)}finally{r.f()}var p,f=c()(n.entries());try{for(f.s();!(p=f.n()).done;){var h,m,v=u()(p.value,2),x=v[0];v[1].innerHTML=null!=O&&null!==(h=O[x])&&void 0!==h&&h.score?"".concat(null==O||null===(m=O[x])||void 0===m?void 0:m.score,"分"):""}}catch(e){f.e(e)}finally{f.f()}X(O)}catch(e){console.log(e,"error")}}),[O]);var J=function(e){V[e.target.dataset.id]=V[e.target.dataset.id]||{},V[e.target.dataset.id].value=e.target.value,X(o()(V)),I(V,e.target.dataset.id)},G=function(e){V[e.target.dataset.id]=V[e.target.dataset.id]||{},V[e.target.dataset.id].value=e.target.value,X(o()(V)),Z(V,e.target.dataset.id)};function K(e,n){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)K(e,n);else if("IMG"!==e.nodeName)if(e.innerHTML){var t;e.innerHTML=null===(t=e.innerHTML)||void 0===t?void 0:t.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var r=document.createElement("span");r.innerHTML=e.textContent.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(r)}}))}var Q=(0,d.useRef)();function ee(e){var n=e.target;if("A"===n.tagName.toUpperCase()){var t=n.getAttribute("href");if(t.indexOf("office")>-1)e.preventDefault(),A(t),U("office");else if(t.indexOf("application/pdf")>-1)e.preventDefault(),A(t),U("pdf");else if(t.indexOf("text/html")>-1)e.preventDefault(),A(t),U("html");else if(t.startsWith("#")){e.preventDefault();var r=document.getElementById(t.replace("#",""));r&&r.scrollIntoView(!0)}}}p.jb.WebkitLineClamp=s,s&&(y=i()(i()({},y),p.jb));var ne=function(){var e,n=null===(e=Q.current)||void 0===e?void 0:e.querySelectorAll("video");null==n||n.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(f.ZP.isSupported()){var n=new f.ZP;n.loadSource(e.src),n.attachMedia(e)}}))};return(0,d.useEffect)((function(){if(Q.current&&Y&&Y.match(j)&&window.PR.prettyPrint(),Q.current)return Q.current.addEventListener("click",ee),function(){var e;null===(e=Q.current)||void 0===e||e.removeEventListener("click",ee),(0,p.AL)(),(0,p.Iy)()}}),[Y,Q.current,ee]),(0,g.jsxs)(g.Fragment,{children:[a&&(0,g.jsx)("div",{ref:Q,children:Y}),!a&&(0,g.jsx)("div",{ref:Q,style:i()({},y),className:"".concat(r||""," ").concat(k?"disabled-fill":""," markdown-body ").concat($.current),dangerouslySetInnerHTML:{__html:Y}}),(0,g.jsx)(x.Z,{close:!0,data:R,type:null!=R&&R.length?z:"",style:i()({},E),onClose:function(){return A("")}})]})}},96962:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(7880),i="ldsRing___mpBZC",a="idsRingWrapper___Of9_n",o=t(37712),s=function(e){var n=e.message,t=e.className,s=e.children,c=e.style,l=void 0===c?{}:c;return(0,o.jsxs)("div",{className:"custom-spinner ".concat(a," ").concat(t),children:[(0,o.jsxs)("div",{className:i,children:[(0,o.jsx)("div",{}),(0,o.jsx)("div",{}),(0,o.jsx)("div",{}),(0,o.jsx)("div",{})]}),n?(0,o.jsx)("p",{style:l,children:n}):null,s,(0,o.jsx)(r.Outlet,{})]})}},88549:function(e,n,t){t.d(n,{Z:function(){return p}});t(59301);var r="result___gu5zt",i="title___xrnx2",a="left___IAxp9",o="leftNode___HL8fG",s="right___ZXYmw",c="rightNode___jYL5_",l=t(92310),u=t.n(l),d=t(37712),p=function(e){var n=e.className,t=e.style,l=void 0===t?{}:t,p=e.leftNode,f=e.leftTitle,h=void 0===f?"自测输入":f,m=e.rightNode,v=e.rightTitle,x=void 0===v?"运行结果":v;return(0,d.jsxs)("div",{className:u()(r,n),style:l,children:[(0,d.jsxs)("div",{className:a,children:[(0,d.jsxs)("div",{className:i,children:[(0,d.jsx)("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),(0,d.jsx)("span",{children:h})]}),(0,d.jsx)("div",{className:o,children:p})]}),(0,d.jsxs)("div",{className:s,children:[(0,d.jsxs)("div",{className:i,children:[(0,d.jsx)("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),(0,d.jsx)("span",{children:x})]}),(0,d.jsx)("div",{className:c,children:m})]})]})}},71105:function(e,n,t){t.r(n),t.d(n,{default:function(){return b}});var r=t(7557),i=t.n(r),a=t(41498),o=t.n(a),s=t(79800),c=t.n(s),l=t(59301),u=t(96845),d=t(27065),p=t(7880),f=t(71418),h=t(76039),m=t(84804),v=t(94049),x=t(24334),g=t(99232),_=t.n(g),j=t(84143),y=t(37712),b=function(){var e=(0,p.useParams)().submitId,n=(0,l.useState)(""),t=c()(n,2),r=t[0],a=t[1],s=(0,l.useState)(""),g=c()(s,2),b=g[0],E=g[1],w=(0,l.useState)(void 0),C=c()(w,2),N=C[0],k=C[1];(0,l.useEffect)((function(){if(e){var n=function(){var n=o()(i()().mark((function n(){var t;return i()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,h.X6)(e);case 2:t=n.sent,k(t.data);case 4:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();n()}}),[e]);var O=N||{},T=O.status,I=O.created_at,S=O.code,Z=O.name,L=O.language,P=O.pass_sets_count,M=O.set_count,R=O.error_msg,A=O.output,F=O.input,B=O.expected_output,z=(O.execute_memory,O.user),U=O.execute_time,H=O.input_file_url,D=O.output_file_url,V=O.is_file,X=O.expected_output_file_url;return(0,y.jsxs)(f.Z,{spinning:!N,delay:500,children:[(0,y.jsx)("div",{className:"record-detail-info",children:N?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("header",{className:u.Z.header,children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("img",{src:"".concat(d.Z.IMG_SERVER,"/images/").concat(z.image_url),alt:"user",width:30}),(0,y.jsx)("span",{children:z.name})]}),(0,y.jsxs)("h2",{children:[" ",Z," "]}),(0,y.jsx)("button",{className:"ant-btn",onClick:function(){p.history.back()},style:{border:"1px solid #bacffe",color:"#3061d0"},children:"返回该题"})]}),(0,y.jsxs)("div",{className:"record-detail-body",children:[(0,y.jsx)("h2",{children:" 提交记录 "}),(0,y.jsxs)("ul",{className:"record-info",children:[(0,y.jsxs)("li",{children:[" ","状态:",(0,y.jsx)("span",{className:0===T?"c-green":"c-red",children:m.Im[T]})," "]}),(0,y.jsxs)("li",{children:[" ","提交时间:",(0,y.jsx)("span",{children:_()(I).format("YYYY-MM-DD HH:mm:ss")})," "]}),(0,y.jsxs)("li",{children:[" ","语言:",(0,y.jsx)("span",{children:L})," "]}),(0,y.jsxs)("li",{children:[" ","执行用时:",(0,y.jsxs)("span",{children:[1e3*U,"ms"]})," "]}),(0,y.jsxs)("li",{children:[" ","".concat(P," / ").concat(M," 个通过的测试用例")," "]})]}),(0,y.jsx)(m.Y4,{status:T,error_msg:R,execute_time:U,output:A,input:F,expected_output:B,input_file_url:H,output_file_url:D,is_file:V,expected_output_file_url:X,setData:a,setMonacoValue:E}),(0,y.jsx)("h2",{children:" 提交的内容 "}),(0,y.jsx)(v.ZP,{height:"calc(100% - 126px)",width:"100%",language:null==L?void 0:L.toLocaleLowerCase(),value:x.Base64.decode(S),options:{readOnly:!0}})]})]}):null}),(0,y.jsx)(j.Z,{close:!0,data:r,type:r.length?"txt":"",onClose:function(){return a("")},monacoEditor:{value:b,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}}})]})}},84804:function(e,n,t){t.d(n,{Y4:function(){return P},Im:function(){return S},ZP:function(){return R}});var r=t(79800),i=t.n(r),a=t(7557),o=t.n(a),s=t(41498),c=t.n(s),l=t(82242),u=t.n(l),d=t(85573),p=t.n(d),f=t(59301),h=t(98135),m=t(8591),v=t(3113),x=t(43501),g=t(53547),_=t(42541),j=t(24334),y=t(96962),b=t(42783),E=t(6457),w=t(34376),C=t(51136),N=t(7880),k=t(88549),O=t(37712),T=h.Z.TextArea,I={visible:!1,tabIndex:"0"},S=p()(p()(p()(p()(p()(p()({},_.h.NOMATCH,"测试用例结果不匹配"),_.h.OK,"调试通过"),2,"调试超时"),3,"调试pod失败"),4,"编译失败"),5,"执行失败"),Z=function(e){return e[e.SET_VISIBLE=0]="SET_VISIBLE",e[e.SET_TABINDEX=1]="SET_TABINDEX",e}(Z||{});function L(e,n){switch(n.type){case Z.SET_VISIBLE:return u()(u()({},e),{},{visible:n.payload});case Z.SET_TABINDEX:return u()(u()({},e),{},{tabIndex:n.payload});default:throw new Error}}function P(e){var n=e.status,t=e.error_msg,r=e.output,i=e.input,a=e.expected_output,s=e.is_file,l=e.input_file_url,u=e.output_file_url,d=e.expected_output_file_url,p=e.setMonacoValue,h=e.setData,m=(0,f.useRef)(),v=(0,f.useRef)(),x=(0,f.useRef)(),g=null,y={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch((0,f.useEffect)((function(){if(r&&!s&&m.current){var e=new w.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});e.open(m.current);var n=(0,E.pp)(j.Base64.decode(r));e.write(n),e.setOption("theme",{background:"#1e1e1e"})}if(i&&!s&&v.current){var t=new w.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});t.open(v.current),t.write((0,E.pp)(i)),t.setOption("theme",{background:"#1e1e1e"})}if(a&&!s&&x.current){var o=new w.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});o.open(x.current),o.write((0,E.pp)(j.Base64.decode(a))),o.setOption("theme",{background:"#1e1e1e"})}}),[r]),n){case _.h.NOMATCH:g=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("p",{className:"c-red",children:"实际输出:"}),!s&&(0,O.jsx)("div",{ref:m}),s&&(0,O.jsx)("div",{style:y,children:(0,O.jsx)("a",{style:{fontSize:"16px"},onClick:c()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.ZP)(u,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:n=e.sent,p(n),setTimeout((function(){h(u)}),200);case 5:case"end":return e.stop()}}),e)}))),children:r})}),(0,O.jsx)("p",{className:"c-red",children:"预期输出:"}),!s&&(0,O.jsx)("div",{ref:x}),s&&(0,O.jsx)("div",{style:y,children:(0,O.jsx)("a",{style:{fontSize:"16px"},onClick:c()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(d,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return n=e.sent,e.t0=p,e.next=6,n.text();case 6:e.t1=e.sent,(0,e.t0)(e.t1),setTimeout((function(){h(d)}),200);case 9:case"end":return e.stop()}}),e)}))),children:a})})]});break;case _.h.EXECUTEFAILURE:g=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("div",{style:{border:"1px #F6F7F9 solid"},children:[(0,O.jsx)("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"},children:"最后执行的输入:"}),!s&&(0,O.jsx)(b.Z,{value:i,style:y}),s&&(0,O.jsx)("div",{style:y,children:(0,O.jsx)("a",{onClick:function(){return(0,E.LR)(l,i)},children:i})})]}),(0,O.jsxs)("div",{style:{border:"1px #F6F7F9 solid",marginTop:"10px"},children:[(0,O.jsx)("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"},children:"执行出错信息:"}),(0,O.jsxs)("pre",{className:"error",style:{color:"#E30000",padding:"0 10px"},children:[j.Base64.decode(t),"111"]})]})]});break;case _.h.COMPILEFAILURE:g=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("p",{children:"执行出错信息:"}),(0,O.jsx)("pre",{className:"error",children:j.Base64.decode(t)})]});break;case _.h.PODFAILURE:g=(0,O.jsx)("p",{children:"创建pod失败请稍后重试"});break;case _.h.TIMEOUT:g=(0,O.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,O.jsxs)(O.Fragment,{children:[" ",g," "]})}function M(e){var n=e.status,t=e.error_msg,r=e.execute_time,i=e.output,a=e.input,o=e.expected_output,s=(e.is_file,e.input_file_url,e.output_file_url,e.expected_output_file_url,null);switch(n){case _.h.OK:s=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("p",{children:["执行用时:",r/1e3,"秒"]}),(0,O.jsx)("p",{children:"执行结果:"}),(0,O.jsx)("pre",{children:j.Base64.decode(i)})]});break;case _.h.NOMATCH:s=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("p",{children:["输入:",(0,O.jsx)("pre",{children:a})]}),(0,O.jsxs)("p",{children:["输出:",i&&j.Base64.decode(i)]}),(0,O.jsxs)("p",{children:["预期输出:",o&&j.Base64.decode(o)]})]});break;case _.h.EXECUTEFAILURE:case _.h.COMPILEFAILURE:s=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("p",{children:["最后执行的输入:",(0,O.jsx)("pre",{children:a})]}),(0,O.jsx)("p",{children:"执行出错信息:"}),(0,O.jsx)("pre",{className:"error",children:j.Base64.decode(t)})]});break;case _.h.PODFAILURE:s=(0,O.jsx)("p",{children:"创建pod失败请稍后重试"});break;case _.h.TIMEOUT:s=(0,O.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,O.jsxs)(O.Fragment,{children:[" ",s," "]})}var R=function(e){var n=e.input,t=e.is_file,r=e.debuging,a=e.submitting,s=(e.executingMessage,e.debugResult),l=e.onChangeInput,u=e.onDebugCode,d=e.onSubmitCode,p=e.hack,h=e.user,_=(0,f.useReducer)(L,I),j=i()(_,2),b=j[0],E=j[1],w=b.visible,S=(b.tabIndex,(0,N.useSearchParams)()),P=i()(S,1)[0];var R=(0,f.useMemo)((function(){if(s){s.status;return(0,O.jsx)(O.Fragment,{children:M(s)})}return null}),[s]);var A=function(){var e=c()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,C.ZP)("/api/problems/".concat(n,"/start.json"),{method:"get",params:{hack_user_id:null==h?void 0:h.user_id}});case 2:(t=e.sent)&&(window.location.href="/myproblems/".concat(null==t?void 0:t.identifier,"?type=1"));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,O.jsxs)("div",{className:"test-case-panel",children:[(0,O.jsxs)("div",{className:"test-case-panel-body ".concat(w?"active":""),children:[(0,O.jsx)("ul",{className:"s-navs",children:(0,O.jsx)("li",{children:(0,O.jsx)("a",{className:"active",children:"调试代码结果"})})}),(0,O.jsx)(k.Z,{leftTitle:"自定义测试用例",rightTitle:"代码执行结果",style:{height:240},leftNode:(0,O.jsx)(T,{placeholder:"请输入自测用例(如果未填写,自测运行时,系统会自动填充第一个非隐藏的文本类型的测试用例)",value:t?"":n,onChange:l}),rightNode:r?(0,O.jsx)(y.Z,{message:"代码执行中..."}):s?R:(0,O.jsx)("p",{style:{color:"#536879"},children:"请填写测试用例的输入值,点击“调试代码”"})})]}),(0,O.jsx)("a",{className:"btn-collapse ".concat(w?"up":""),onClick:function(){E({type:Z.SET_VISIBLE,payload:!w})},children:w?(0,O.jsx)(x.Z,{}):(0,O.jsx)(g.Z,{})}),(0,O.jsxs)("footer",{className:"footer",children:[(0,O.jsx)("span",{children:"控制台"}),(0,O.jsxs)("div",{className:"flex-container",children:[(null==p?void 0:p.is_program)&&(null==p?void 0:p.above_question)&&(0,O.jsx)(v.ZP,{onClick:function(){return A(null==p?void 0:p.above_question)},id:"oj-prev",className:"btn-blue",type:"ghost",children:"上一题"}),(null==p?void 0:p.is_program)&&(null==p?void 0:p.under_question)&&(0,O.jsx)(v.ZP,{onClick:function(){return A(null==p?void 0:p.under_question)},id:"oj-next",className:"btn-blue",type:"ghost",children:"下一题"}),(0,O.jsx)(v.ZP,{className:"btn-green",type:"ghost",loading:r,onClick:function(){if(!n||t)return m.ZP.error("请输入自测用例"),E({type:Z.SET_VISIBLE,payload:!0}),void E({type:Z.SET_TABINDEX,payload:"0"});E({type:Z.SET_VISIBLE,payload:!0}),E({type:Z.SET_TABINDEX,payload:"1"}),u()},children:"调试代码"}),"8"!==P.get("qtype")&&(0,O.jsx)(v.ZP,{type:"primary",className:"custom-ant-disabled",loading:a,disabled:a,onClick:function(){E({type:Z.SET_VISIBLE,payload:!1}),d()},children:"评测并提交"})]})]})]})}},42541:function(e,n,t){t.d(n,{h:function(){return r}});var r=function(e){return e[e.NOMATCH=-1]="NOMATCH",e[e.OK=0]="OK",e[e.TIMEOUT=2]="TIMEOUT",e[e.PODFAILURE=3]="PODFAILURE",e[e.COMPILEFAILURE=4]="COMPILEFAILURE",e[e.EXECUTEFAILURE=5]="EXECUTEFAILURE",e}({})},76039:function(e,n,t){t.d(n,{H7:function(){return f},MK:function(){return p},MU:function(){return c},X6:function(){return u},bM:function(){return s},fi:function(){return h},fu:function(){return o},n4:function(){return m},rX:function(){return d},vl:function(){return v},zO:function(){return l}});var r=t(82242),i=t.n(r),a=t(51136);function o(e,n){return(0,a.U2)("myproblems/".concat(e,".json"),i()({hidePopLogin:!0},n||{}))}function s(e,n){return(0,a.v_)("myproblems/".concat(e,"/code_submit.json"),n)}function c(e,n){return(0,a.v_)("myproblems/".concat(e,"/code_debug.json"),n)}function l(e,n){return n.language&&(n.language=encodeURIComponent(n.language)),(0,a.U2)("myproblems/".concat(e,"/submit_records.json"),n)}function u(e){return(0,a.U2)("myproblems/record_detail.json",{id:e})}function d(e,n){return(0,a.U2)("myproblems/".concat(e,"/result.json"),{mode:n})}function p(e,n){return(0,a.v_)("myproblems/".concat(e,"/add_notes.json"),n)}function f(e,n){return(0,a.v_)("myproblems/".concat(e,"/restore_initial_code.json"),n)}function h(e){return(0,a.v_)("myproblems/".concat(e,"/sync_code.json"))}function m(e,n){return(0,a.v_)("myproblems/".concat(e,"/update_code.json"),n)}function v(e,n){return(0,a.v_)("discusses/".concat(e,"/plus.json"),n)}},55369:function(e,n,t){t.d(n,{AL:function(){return b},Iy:function(){return p},Qv:function(){return m},ez:function(){return y},jb:function(){return f}});var r=t(79800),i=t.n(r),a=t(32834),o=t.n(a),s=t(11690);var c=[],l=["<ul>"],u=new(o().Renderer),d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){c.length=0,l=["<ul>"]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function h(e,n,t,r){if(n>=e.length||e[n].level<=t)return n;var i=e[n];r.push("<li><a href='#"+i.anchor+"'>"+i.text+"</a>");var a=[];return n=h(e,++n,i.level,a),a.length>0&&(r.push("<ul>"),a.forEach((function(e){r.push(e)})),r.push("</ul>")),r.push("</li>"),n=h(e,n,t,r)}function m(){return h(c,0,0,l),l.push("</ul>"),l.join("")}var v={heading:function(e){var n=d.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[1].length,text:n[2]}},fences:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],r=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var r=t[1];return n.split("\n").map((function(e){var n=e.match(/^\s+/);return null===n?e:i()(n,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(t,n[3]||""),a=n[2]?n[2].trim():n[2];if(["latex","katex","math"].indexOf(a)>=0){var o=_(),s=r;r=o,j[o]={type:"block",expression:s}}return{type:"code",raw:t,lang:a,text:r}}}},x=/(?:\${2})([^\n`]+?)(?:\${2})/gi,g=0,_=function(){return"__special_katext_id_".concat(g++,"__")},j={};function y(){return j}function b(){g=0,j={}}function E(e){return e=e.replace(x,(function(e,n){var t=_();return j[t]={type:"inline",expression:n},t}))}var w=u.listitem;u.listitem=function(e){return w(E(e))};var C=u.paragraph;u.paragraph=function(e){return C(E(e))};var N=u.tablecell;u.tablecell=function(e,n){return N(E(e),n)},u.code=function(e,n,t){var r=(n||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(n,'">').concat(t?e:(0,s.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(t?e:(0,s.escape)(e,!0))+"</code></pre>"},u.heading=function(e,n,t){var r=this.options.headerPrefix+t.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:r,level:n,text:e}),"<h"+n+' id="'+r+'">'+e+"</h"+n+">"},o().setOptions({silent:!0,gfm:!0,pedantic:!1}),o().use({tokenizer:v,renderer:u}),n.ZP=o()},96845:function(e,n){n.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},98135:function(e,n,t){t.d(n,{Z:function(){return L}});var r=t(92310),i=t.n(r),a=t(59301),o=t(36355),s=t(32441),c=t(9937);var l=e=>{const{getPrefixCls:n,direction:t}=(0,a.useContext)(o.E_),{prefixCls:r,className:l}=e,u=n("input-group",r),d=n("input"),[p,f]=(0,c.ZP)(d),h=i()(u,{[`${u}-lg`]:"large"===e.size,[`${u}-sm`]:"small"===e.size,[`${u}-compact`]:e.compact,[`${u}-rtl`]:"rtl"===t},f,l),m=(0,a.useContext)(s.aM),v=(0,a.useMemo)((()=>Object.assign(Object.assign({},m),{isFormItemInput:!1})),[m]);return p(a.createElement("span",{className:h,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},a.createElement(s.aM.Provider,{value:v},e.children)))},u=t(9432),d=t(1565),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},f=t(68475),h=function(e,n){return a.createElement(f.Z,(0,d.Z)({},e,{ref:n,icon:p}))};var m=a.forwardRef(h),v=t(89136),x=t(70521),g=t(16863),_=t(59412),j=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t};const y=e=>e?a.createElement(v.Z,null):a.createElement(m,null),b={click:"onClick",hover:"onMouseOver"};var E=a.forwardRef(((e,n)=>{const{visibilityToggle:t=!0}=e,r="object"==typeof t&&void 0!==t.visible,[s,c]=(0,a.useState)((()=>!!r&&t.visible)),l=(0,a.useRef)(null);a.useEffect((()=>{r&&c(t.visible)}),[r,t]);const d=(0,_.Z)(l),p=()=>{const{disabled:n}=e;n||(s&&d(),c((e=>{var n;const r=!e;return"object"==typeof t&&(null===(n=t.onVisibleChange)||void 0===n||n.call(t,r)),r})))},{className:f,prefixCls:h,inputPrefixCls:m,size:v}=e,E=j(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:w}=a.useContext(o.E_),C=w("input",m),N=w("input-password",h),k=t&&(n=>{const{action:t="click",iconRender:r=y}=e,i=b[t]||"",o=r(s),c={[i]:p,className:`${n}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return a.cloneElement(a.isValidElement(o)?o:a.createElement("span",null,o),c)})(N),O=i()(N,f,{[`${N}-${v}`]:!!v}),T=Object.assign(Object.assign({},(0,x.Z)(E,["suffix","iconRender","visibilityToggle"])),{type:s?"text":"password",className:O,prefixCls:C,suffix:k});return v&&(T.size=v),a.createElement(u.Z,Object.assign({ref:(0,g.sQ)(n,l)},T))})),w=t(11013),C=t(92343),N=t(3113),k=t(19716),O=t(33234),T=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t};var I=a.forwardRef(((e,n)=>{const{prefixCls:t,inputPrefixCls:r,className:s,size:c,suffix:l,enterButton:d=!1,addonAfter:p,loading:f,disabled:h,onSearch:m,onChange:v,onCompositionStart:x,onCompositionEnd:_}=e,j=T(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:y,direction:b}=a.useContext(o.E_),E=a.useRef(!1),I=y("input-search",t),S=y("input",r),{compactSize:Z}=(0,O.ri)(I,b),L=(0,k.Z)((e=>{var n;return null!==(n=null!=c?c:Z)&&void 0!==n?n:e})),P=a.useRef(null),M=e=>{var n;document.activeElement===(null===(n=P.current)||void 0===n?void 0:n.input)&&e.preventDefault()},R=e=>{var n,t;m&&m(null===(t=null===(n=P.current)||void 0===n?void 0:n.input)||void 0===t?void 0:t.value,e,{source:"input"})},A="boolean"==typeof d?a.createElement(w.Z,null):null,F=`${I}-button`;let B;const z=d||{},U=z.type&&!0===z.type.__ANT_BUTTON;B=U||"button"===z.type?(0,C.Tm)(z,Object.assign({onMouseDown:M,onClick:e=>{var n,t;null===(t=null===(n=null==z?void 0:z.props)||void 0===n?void 0:n.onClick)||void 0===t||t.call(n,e),R(e)},key:"enterButton"},U?{className:F,size:L}:{})):a.createElement(N.ZP,{className:F,type:d?"primary":void 0,size:L,disabled:h,key:"enterButton",onMouseDown:M,onClick:R,loading:f,icon:A},d),p&&(B=[B,(0,C.Tm)(p,{key:"addonAfter"})]);const H=i()(I,{[`${I}-rtl`]:"rtl"===b,[`${I}-${L}`]:!!L,[`${I}-with-button`]:!!d},s);return a.createElement(u.Z,Object.assign({ref:(0,g.sQ)(P,n),onPressEnter:e=>{E.current||f||R(e)}},j,{size:L,onCompositionStart:e=>{E.current=!0,null==x||x(e)},onCompositionEnd:e=>{E.current=!1,null==_||_(e)},prefixCls:S,addonAfter:B,suffix:l,onChange:e=>{e&&e.target&&"click"===e.type&&m&&m(e.target.value,e,{source:"clear"}),v&&v(e)},className:H,disabled:h}))})),S=t(1643);const Z=u.Z;Z.Group=l,Z.Search=I,Z.TextArea=S.Z,Z.Password=E;var L=Z}}]);