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.
2 lines
20 KiB
2 lines
20 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4417],{15411:function(le,z,t){var n=t(59301),o=t(50630),M=t(48136),J=t(248),H=t(43418),a=t(59301);const I=(0,n.forwardRef)(({callback:S,width:N,onChange:U,disabled:W,readOnly:$,type:h="",value:Q="",style:e={}},te)=>{const Y=(0,n.useRef)(),q=(0,n.useRef)(),[r,l]=(0,n.useState)(0),[E,K]=(0,n.useState)(0),[k,ee]=(0,n.useState)(!1),O=()=>{var F=document.createElement("div");F.innerHTML=Y.current.getValue();var y=F.innerText;return S&&S(y),y};(0,n.useImperativeHandle)(te,()=>({getData:O}));const D=F=>{F.preventDefault();const y=F.clientX-r,j=F.clientY-E;document.body.onmousemove=b=>{let p=b.clientX-y,u=b.clientY-j;const i=document.getElementsByClassName("ant-modal")[0],d=window.innerWidth-i.offsetWidth,_=window.innerHeight-i.offsetHeight;p=Math.max(0,Math.min(p,d)),u=Math.max(0,Math.min(u,_)),v(b.clientX,b.clientY,y,j)&&(l(p),K(u))},document.body.onmouseup=function(){document.body.onmousemove=null}},v=(F,y,j,b)=>{const p=document.body.clientHeight,u=document.body.clientWidth;return F<20&&j>F||F>u-20&&j<F||y<20&&b>y||y>p-20&&b<y?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,n.useEffect)(()=>{k&&setTimeout(()=>{const F=document.getElementsByClassName("ant-modal")[0],y=window.innerWidth/2-F.offsetWidth/2,j=window.innerHeight/2-F.offsetHeight/2;l(y),K(j)},0)},[k]);const ne=()=>{W||$||ee(!0)};return a.createElement("div",{style:e},a.createElement("div",{style:{width:N||"100%",position:"relative"},className:`${o.Z.mathFillWrap} ${W||$?"cursorDefault":""}`,onClick:()=>ne()},a.createElement("math-field",{disabled:W,locale:"zh_cn",class:`${o.Z.mathField} ${h}`,readOnly:$,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:Y,style:{width:"100%",fontSize:Q?18:14},value:Q||""})),a.createElement(H.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:r,top:E},title:a.createElement("div",{style:{cursor:"move"},onMouseDown:D},"\u8F93\u5165\u516C\u5F0F"),open:k,onOk:()=>{const F=q.current.getData();Y.current.setValue(F),U(F),ee(!1)},onCancel:()=>{ee(!1)},destroyOnClose:!0,className:"markdown-popup-form"},a.createElement(J.Z,{value:Q,ref:q,onChange:U,showSaveButton:!1})))});z.Z=I},81023:function(le,z,t){var n=t(63144),o=t(59301),M=t(8591),J=t(3113),H=t(43418),a=t(24334),I=t.n(a),S=t(76265),N=t(77794),U=t(19692),W=t(99232),$=t.n(W),h=t(59301),Q=Object.defineProperty,e=Object.defineProperties,te=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,l=(O,D,v)=>D in O?Q(O,D,{enumerable:!0,configurable:!0,writable:!0,value:v}):O[D]=v,E=(O,D)=>{for(var v in D||(D={}))q.call(D,v)&&l(O,v,D[v]);if(Y)for(var v of Y(D))r.call(D,v)&&l(O,v,D[v]);return O},K=(O,D)=>e(O,te(D)),k=(O,D,v)=>new Promise((ne,F)=>{var y=p=>{try{b(v.next(p))}catch(u){F(u)}},j=p=>{try{b(v.throw(p))}catch(u){F(u)}},b=p=>p.done?ne(p.value):Promise.resolve(p.value).then(y,j);b((v=v.apply(O,D)).next())});const ee=({ButtonProps:O,ButtonText:D,form:v,answerKey:ne,hackidentifier:F="",items:y={},setIsSubmitCode:j})=>{const[b,p]=(0,o.useState)(!1);let[u,i]=(0,o.useState)("");const d=(0,n.useParams)(),[_,A]=(0,o.useState)({}),T=d.type==="edit",x=window.location.href.includes("problemset")?1:2;(0,o.useEffect)(()=>{(T||F)&&i(F||d.id)},[d]),(0,o.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);function G(L,B){return k(this,null,function*(){var C;let f=v.getFieldValue("hack_codes"),P=v.getFieldValue(ne);if(!f.code){M.ZP.info("\u7A0B\u5E8F\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF01");return}if(!f.language){M.ZP.info("\u7F16\u7A0B\u8BED\u8A00\u4E0D\u80FD\u4E3A\u7A7A\uFF01");return}if(P.length>0&&((C=P.filter(s=>!s.answer_text))==null?void 0:C.length)>0){M.ZP.info("\u586B\u7A7A\u9879\u4E0D\u80FD\u4E3A\u7A7A\uFF01");return}let c=f.code;return P.length>0&&(P==null||P.map(s=>{s.multi_line?c=c.substring(0,c.indexOf("@\u2581\u2581@"))+s.answer_text+c.substring(c.indexOf("@\u2581\u2581@")+4):c=c.substring(0,c.indexOf("@\u2581@"))+s.answer_text+c.substring(c.indexOf("@\u2581@")+3)})),yield(0,N.n4)(B,L||{code:a.Base64.encode(c),language:f.language,answers:P==null?void 0:P.map(s=>s.answer_text)})})}function w(L,B){return k(this,null,function*(){let C=y.userAnswer,f=a.Base64.decode(y.code);return C.length>0&&(C==null||C.map(c=>{c.multi_line?f=f.substring(0,f.indexOf("@\u2581\u2581@"))+c.value+f.substring(f.indexOf("@\u2581\u2581@")+4):f=f.substring(0,f.indexOf("@\u2581@"))+c.value+f.substring(f.indexOf("@\u2581@")+3)})),yield(0,N.n4)(B,L||{code:a.Base64.encode(f),language:y.language,answers:C==null?void 0:C.map(c=>c.value)})})}function g(){return new Date().getTime()}return h.createElement("div",null,h.createElement(J.ZP,K(E({loading:b},O),{onClick:()=>k(void 0,null,function*(){var L,B,C,f;if(console.log("----",111),D==="\u63D0\u4EA4\u4EE3\u7801"){if(p(!0),b)return;let R=yield(0,S.ZP)(`/api/problems/${u}/start.json`,{method:"get"});const V=yield w(null,R==null?void 0:R.identifier);if((V==null?void 0:V.status)===0){let Z=function(){return k(this,null,function*(){var ae;const{status:re,message:ie,data:oe}=yield(0,N.rX)(R==null?void 0:R.identifier,"submit"),se=g()-X>10*1e3*((ae=y==null?void 0:y.userAnswer)==null?void 0:ae.length);if(re!==0&&!se&&setTimeout(Z,1e3),se){H.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),p(!1);return}re===0&&(p(!1),A(oe),oe.status===2&&(p(!1),H.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"})))})};const X=g();yield(0,N.bM)(R==null?void 0:R.identifier,{}),Z()}else p(!1);j&&j(!0);return}let P=!0;if(yield v.validateFields().then(()=>{P=!1},R=>{var V,X,Z;R.errorFields[0].name.includes("standard_answers")?M.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):M.ZP.error(R.errorFields[0].errors[0]),((V=R.errorFields)==null?void 0:V.length)===0&&(P=!1),v.scrollToField((Z=(X=R==null?void 0:R.errorFields)==null?void 0:X[0])==null?void 0:Z.name,{behavior:"smooth",block:"center"}),P=!0}),P||(p(!0),b))return;let c="",m=v.getFieldsValue();u?c=yield(0,S.ZP)(`/api/problems/${u}.json`,{method:"put",body:K(E({},m),{hack:K(E({},m==null?void 0:m.hack),{sub_discipline_id:(f=(C=m==null?void 0:m.hack)==null?void 0:C.sub_discipline_id)==null?void 0:f[1],difficult:m.difficulty,item_banks_group_id:m.item_banks_group_id}),hack_codes:K(E({},m.hack_codes),{code:a.Base64.encode(m.hack_codes.code)}),update_hack_sets:[E({},m.hack_sets)],is_blank:!0})}):(c=yield(0,S.ZP)("/api/problems.json",{method:"post",body:K(E({},m),{hack:K(E({},m==null?void 0:m.hack),{sub_discipline_id:(B=(L=m==null?void 0:m.hack)==null?void 0:L.sub_discipline_id)==null?void 0:B[1],difficult:m.difficulty,item_banks_group_id:m.item_banks_group_id}),hack_codes:K(E({},m.hack_codes),{code:a.Base64.encode(m.hack_codes.code)}),hack_sets:[E({},m.hack_sets)],is_blank:!0})}),u=c==null?void 0:c.identifier,sessionStorage.projectFill=u,i(u));let s=yield(0,S.ZP)(`/api/problems/${u}/start.json`,{method:"get"});const ue=yield G(null,s==null?void 0:s.identifier);if((ue==null?void 0:ue.status)===0){let V=function(){return k(this,null,function*(){var X;const{status:Z,message:ae,data:re}=yield(0,N.rX)(s==null?void 0:s.identifier,"submit"),oe=g()-R>(m.hack.time_limit+3)*1e3*((X=m==null?void 0:m.standard_answers)==null?void 0:X.length);if(Z!==0&&!oe&&setTimeout(V,1e3),oe){H.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),p(!1);return}Z===0&&(p(!1),A(re),re.status===2&&(p(!1),H.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"})))})};const R=g();yield(0,N.bM)(s==null?void 0:s.identifier,{}),V()}else p(!1)})}),D),(_==null?void 0:_.id)&&_.status!==2&&h.createElement(H.default,{open:(_==null?void 0:_.id)&&_.status!==2,title:"\u8FD0\u884C\u7ED3\u679C",width:1100,footer:!1,onOk:()=>{A({})},onCancel:()=>{A({})}},h.createElement("div",{style:{maxHeight:600,overflow:"auto",marginBottom:15}},h.createElement("div",{style:{marginBottom:20,display:"flex",justifyContent:"space-between",fontSize:14}},h.createElement("div",null,h.createElement("span",{style:{color:"#666666"}},"\u72B6\u6001"),h.createElement("span",{style:{marginLeft:12,color:_.status!==0&&"#E30000"}},U.Im[_.status])),h.createElement("div",null,h.createElement("span",{style:{color:"#666666"}},"\u63D0\u4EA4\u65F6\u95F4"),h.createElement("span",{style:{marginLeft:12}},$()(_.created_at).format("YYYY-MM-DD HH:mm:ss"))),h.createElement("div",null,h.createElement("span",{style:{color:"#666666"}},"\u8BED\u8A00"),h.createElement("span",{style:{marginLeft:12}},_.language)),h.createElement("div",null,h.createElement("span",{style:{color:"#666666"}},"\u6267\u884C\u7528\u65F6"),h.createElement("span",{style:{marginLeft:12}},_.execute_time,"ms"))),h.createElement(U.Y4,E({},_)))))};z.Z=ee},19137:function(le,z,t){t.d(z,{Z:function(){return a}});var n=t(59301),o={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},M=t(92310),J=t.n(M),a=({className:I,style:S={},leftNode:N,leftTitle:U="\u81EA\u6D4B\u8F93\u5165",rightNode:W,rightTitle:$="\u8FD0\u884C\u7ED3\u679C"})=>n.createElement("div",{className:J()(o.result,I),style:S},n.createElement("div",{className:o.left},n.createElement("div",{className:o.title},n.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),n.createElement("span",null,U)),n.createElement("div",{className:o.leftNode},N)),n.createElement("div",{className:o.right},n.createElement("div",{className:o.title},n.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),n.createElement("span",null,$)),n.createElement("div",{className:o.rightNode},W)))},19692:function(le,z,t){t.d(z,{Y4:function(){return j},Im:function(){return ne},ZP:function(){return p}});var n=t(59301),o=t(98135),M=t(3113),J=t(43501),H=t(53547),a=t(1123),I=t(24334),S=t(77353),N=t(31272),U=t(15826),W=t(34376),$=t(76265),h=t(63144),Q=t(19137),e=t(59301),te=Object.defineProperty,Y=Object.defineProperties,q=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,K=(u,i,d)=>i in u?te(u,i,{enumerable:!0,configurable:!0,writable:!0,value:d}):u[i]=d,k=(u,i)=>{for(var d in i||(i={}))l.call(i,d)&&K(u,d,i[d]);if(r)for(var d of r(i))E.call(i,d)&&K(u,d,i[d]);return u},ee=(u,i)=>Y(u,q(i)),O=(u,i,d)=>new Promise((_,A)=>{var T=w=>{try{G(d.next(w))}catch(g){A(g)}},x=w=>{try{G(d.throw(w))}catch(g){A(g)}},G=w=>w.done?_(w.value):Promise.resolve(w.value).then(T,x);G((d=d.apply(u,i)).next())});const{TextArea:D}=o.default,v={visible:!1,tabIndex:"0"},ne={[a.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[a.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var F=(u=>(u[u.SET_VISIBLE=0]="SET_VISIBLE",u[u.SET_TABINDEX=1]="SET_TABINDEX",u))(F||{});function y(u,i){switch(i.type){case 0:return ee(k({},u),{visible:i.payload});case 1:return ee(k({},u),{tabIndex:i.payload});default:throw new Error}}function j(u){const{status:i,error_msg:d,output:_,input:A,expected_output:T,is_file:x,input_file_url:G,output_file_url:w,expected_output_file_url:g,setMonacoValue:L,setData:B}=u,C=(0,n.useRef)(),f=(0,n.useRef)(),P=(0,n.useRef)();let c=null;const m={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch((0,n.useEffect)(()=>{if(_&&!x&&C.current){const s=new W.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});s.open(C.current);const ue=(0,U.pp)(I.Base64.decode(_));s.write(ue),s.setOption("theme",{background:"#1e1e1e"})}if(A&&!x&&f.current){const s=new W.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});s.open(f.current),s.write((0,U.pp)(A)),s.setOption("theme",{background:"#1e1e1e"})}if(T&&!x&&P.current){const s=new W.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});s.open(P.current),s.write((0,U.pp)(I.Base64.decode(T))),s.setOption("theme",{background:"#1e1e1e"})}},[_]),i){case a.h.NOMATCH:c=e.createElement(e.Fragment,null,e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!x&&e.createElement("div",{ref:C}),x&&e.createElement("div",{style:m},e.createElement("a",{style:{fontSize:"16px"},onClick:()=>O(this,null,function*(){const s=yield(0,$.ZP)(w,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});L(s),setTimeout(()=>{B(w)},200)})},_)),e.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!x&&e.createElement("div",{ref:P}),x&&e.createElement("div",{style:m},e.createElement("a",{style:{fontSize:"16px"},onClick:()=>O(this,null,function*(){const s=yield fetch(g,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});L(yield s.text()),setTimeout(()=>{B(g)},200)})},T)));break;case a.h.EXECUTEFAILURE:c=e.createElement(e.Fragment,null,e.createElement("div",{style:{border:"1px #F6F7F9 solid"}},e.createElement("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"}},"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!x&&e.createElement(N.Z,{value:A,style:m}),x&&e.createElement("div",{style:m},e.createElement("a",{onClick:()=>(0,U.LR)(G,A)},A))),e.createElement("div",{style:{border:"1px #F6F7F9 solid",marginTop:"10px"}},e.createElement("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"}},"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error",style:{color:"#E30000",padding:"0 10px"}},I.Base64.decode(d),"111")));break;case a.h.COMPILEFAILURE:c=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},I.Base64.decode(d)));break;case a.h.PODFAILURE:c=e.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case a.h.TIMEOUT:c=e.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return e.createElement(e.Fragment,null," ",c," ")}function b(u){const{status:i,error_msg:d,execute_time:_,output:A,input:T,expected_output:x,is_file:G,input_file_url:w,output_file_url:g,expected_output_file_url:L}=u;let B=null;switch(i){case a.h.OK:B=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",_/1e3,"\u79D2"),e.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),e.createElement("pre",null,I.Base64.decode(A)));break;case a.h.NOMATCH:B=e.createElement(e.Fragment,null,e.createElement("p",null,"\u8F93\u5165\uFF1A",e.createElement("pre",null,T)),e.createElement("p",null,"\u8F93\u51FA\uFF1A",A&&I.Base64.decode(A)),e.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",x&&I.Base64.decode(x)));break;case a.h.EXECUTEFAILURE:B=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",e.createElement("pre",null,T)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},I.Base64.decode(d)));break;case a.h.COMPILEFAILURE:B=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",e.createElement("pre",null,T)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},I.Base64.decode(d)));break;case a.h.PODFAILURE:B=e.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case a.h.TIMEOUT:B=e.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return e.createElement(e.Fragment,null," ",B," ")}var p=({input:u,is_file:i,debuging:d,submitting:_,executingMessage:A,debugResult:T,onChangeInput:x,onDebugCode:G,onSubmitCode:w,hack:g,user:L})=>{const[B,C]=(0,n.useReducer)(y,v),{visible:f,tabIndex:P}=B,[c]=(0,h.useSearchParams)();function m(X){let Z=X.target.id;C({type:1,payload:Z})}function s(){C({type:0,payload:!f})}const ue=(0,n.useMemo)(()=>{if(T){const{status:X}=T;return e.createElement(e.Fragment,null,b(T))}return null},[T]);function R(){C({type:0,payload:!0}),C({type:1,payload:"1"}),G()}const V=X=>O(void 0,null,function*(){let Z=yield(0,$.ZP)(`/api/problems/${X}/start.json`,{method:"get",params:{hack_user_id:L==null?void 0:L.user_id}});Z&&(window.location.href=`/myproblems/${Z==null?void 0:Z.identifier}?type=1`)});return e.createElement("div",{className:"test-case-panel"},e.createElement("div",{className:`test-case-panel-body ${f?"active":""}`},e.createElement("ul",{className:"s-navs"},e.createElement("li",null,e.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),e.createElement(Q.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:e.createElement(D,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:i?"":u,onChange:x}),rightNode:d?e.createElement(S.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):T?ue:e.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),e.createElement("a",{className:`btn-collapse ${f?"up":""}`,onClick:s},f?e.createElement(J.Z,null):e.createElement(H.Z,null)),e.createElement("footer",{className:"footer"},e.createElement("span",null,"\u63A7\u5236\u53F0"),e.createElement("div",{className:"flex-container"},(g==null?void 0:g.is_program)&&(g==null?void 0:g.above_question)&&e.createElement(M.ZP,{onClick:()=>V(g==null?void 0:g.above_question),id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),(g==null?void 0:g.is_program)&&(g==null?void 0:g.under_question)&&e.createElement(M.ZP,{onClick:()=>V(g==null?void 0:g.under_question),id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),e.createElement(M.ZP,{className:"btn-green",type:"ghost",loading:d,onClick:R},"\u8C03\u8BD5\u4EE3\u7801"),c.get("qtype")!=="8"&&e.createElement(M.ZP,{type:"primary",className:"custom-ant-disabled",loading:_,disabled:_,onClick:()=>{C({type:0,payload:!1}),w()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},1123:function(le,z,t){t.d(z,{h:function(){return n}});var n=(o=>(o[o.NOMATCH=-1]="NOMATCH",o[o.OK=0]="OK",o[o.TIMEOUT=2]="TIMEOUT",o[o.PODFAILURE=3]="PODFAILURE",o[o.COMPILEFAILURE=4]="COMPILEFAILURE",o[o.EXECUTEFAILURE=5]="EXECUTEFAILURE",o))(n||{})},77794:function(le,z,t){t.d(z,{H7:function(){return e},MK:function(){return Q},MU:function(){return U},X6:function(){return $},bM:function(){return N},fi:function(){return te},fu:function(){return S},n4:function(){return Y},rX:function(){return h},vl:function(){return q},zO:function(){return W}});var n=t(76265),o=Object.defineProperty,M=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,a=(r,l,E)=>l in r?o(r,l,{enumerable:!0,configurable:!0,writable:!0,value:E}):r[l]=E,I=(r,l)=>{for(var E in l||(l={}))J.call(l,E)&&a(r,E,l[E]);if(M)for(var E of M(l))H.call(l,E)&&a(r,E,l[E]);return r};function S(r,l){return(0,n.U2)(`myproblems/${r}.json`,I({hidePopLogin:!0},l||{}))}function N(r,l){return(0,n.v_)(`myproblems/${r}/code_submit.json`,l)}function U(r,l){return(0,n.v_)(`myproblems/${r}/code_debug.json`,l)}function W(r,l){return l.language&&(l.language=encodeURIComponent(l.language)),(0,n.U2)(`myproblems/${r}/submit_records.json`,l)}function $(r){return(0,n.U2)("myproblems/record_detail.json",{id:r})}function h(r,l){return(0,n.U2)(`myproblems/${r}/result.json`,{mode:l})}function Q(r,l){return(0,n.v_)(`myproblems/${r}/add_notes.json`,l)}function e(r,l){return(0,n.v_)(`myproblems/${r}/restore_initial_code.json`,l)}function te(r){return(0,n.v_)(`myproblems/${r}/sync_code.json`)}function Y(r,l){return(0,n.v_)(`myproblems/${r}/update_code.json`,l)}function q(r,l){return(0,n.v_)(`discusses/${r}/plus.json`,l)}}}]);
|