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__Shixuns__Edit__body__Lev...

1 line
65 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([[49205,74324],{74516:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(1565),a=n(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},s=n(68475),l=function(e,t){return a.createElement(s.Z,(0,i.Z)({},e,{ref:t,icon:r}))};var o=a.forwardRef(l)},88845:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(1565),a=n(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},s=n(68475),l=function(e,t){return a.createElement(s.Z,(0,i.Z)({},e,{ref:t,icon:r}))};var o=a.forwardRef(l)},84486:function(e,t,n){n.d(t,{t:function(){return p}});var i=n(82242),a=n.n(i),r=(n(59301),n(3113)),s="buttonFixed___vyq30",l="button___hxmYv",o="buttonWrap___uK8dl",c=n(92310),u=n.n(c),d=n(37712),p=function(e){var t=e.cancelText,n=void 0===t?"取消":t,i=e.okText,c=void 0===i?"确定":i,p=e.loading,h=void 0!==p&&p,f=e.hasOkBtn,m=void 0===f||f,v=e.hasCancelBtn,x=void 0===v||v,g=e.okButtonProps,_=void 0===g?{}:g,b=e.onCancel,j=void 0===b?function(){}:b,y=e.onOk,k=void 0===y?function(){}:y,C=e.className,w=void 0===C?"":C;return(0,d.jsx)("div",{className:u()(s,w),children:(0,d.jsxs)("div",{className:o,children:[x&&(0,d.jsx)(r.ZP,{size:"middle",className:"".concat(l," mr20"),onClick:j,children:n}),m&&(0,d.jsx)(r.ZP,a()(a()({size:"middle",type:"primary",className:"".concat(l," mr20"),loading:h,onClick:k},_),{},{children:c}))]})})}},77984:function(e,t,n){var i=n(82242),a=n.n(i),r=(n(59301),n(93314)),s=n(3113),l=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,i=void 0===n?{}:n,o=e.styles,c=void 0===o?{}:o,u=e.customText,d=e.ButtonText,p=e.ButtonClick,h=e.Buttonclass,f=e.ButtonTwo,m=e.imgStyles,v=e.loading,x=void 0!==v&&v;return(0,l.jsxs)("section",{className:"tc animated fadeIn",style:a()(a()({},{color:"#999",margin:"100px auto",visibility:x?"hidden":"visible"}),c),children:[(0,l.jsx)("img",{src:t||r,style:a()(a()({},m),{},{pointerEvents:"none",userSelect:"none"})}),(0,l.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,l.jsx)(s.ZP,a()(a()({className:h,onClick:p},i),{},{children:d})),f&&f]})}},2701:function(e,t,n){n.d(t,{Z:function(){return k}});var i=n(82242),a=n.n(i),r=n(7557),s=n.n(r),l=n(41498),o=n.n(l),c=n(79800),u=n.n(c),d=n(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},h=n(3113),f=n(74516),m=n(77876),v=n(6848),x=n(41282),g=n(66151),_=n(77984),b=n(57357),j=n(64321),y=n(37712),k=function(e){var t,n,i,r,l,c,k=e.editOffice,C=void 0===k?"view":k,w=e.data,N=(e.theme,e.type),Z=e.filename,S=e.monacoEditor,P=e.className,O=e.style,I=e.close,E=e.onClose,$=e.hasMask,T=e.disabledDownload,F=e.onImgDimensions,R=e.showNodata,V=e.recordInfo,L=(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()(L,2),M=(B[0],B[1],(0,d.useState)("")),D=u()(M,2),W=(D[0],D[1]),A=(0,d.useState)(),z=u()(A,2),X=z[0],G=z[1],H="build"===window.ENV?"/react/build":"",U=location.host.startsWith("localhost")?b.Z.PROXY_SERVER:b.Z.API_SERVER,q=(0,d.useRef)();null!==(t=w)&&void 0!==t&&t.startsWith("/api")&&"txt"!==N&&(w=b.Z.API_SERVER+w);Z&&(S.filename=Z),(0,d.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&W(t[1])}))}),[]),(0,d.useEffect)((function(){var e;"office"===N&&(w.indexOf("bigfilescdn.")>-1||w.indexOf("bigfiles1")>-1?G({url:w,fileType:(e=w,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:w.indexOf("model=edit")?"edit":"view"}):J())}),[N,w]);var J=function(){var e=o()(s()().mark((function e(){var t,n,i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",w),t=w,w.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,g.gJ)({attachment_id:n});case 6:(i=e.sent).url=U+i.url,G(i);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),K=function(){w.startsWith("http")||w.startsWith("blob:")?Y():(0,x.Sv)(Z||"educoder",w,Z)},Y=function(){V&&(0,j.fc)({id:null==V?void 0:V.id,watch_type:1,course_id:null==V?void 0:V.course_id}),(0,x.Nd)(Z||"educoder",decodeURIComponent(w))};return(0,y.jsxs)("div",{style:a()({},O||{}),className:"".concat($&&p.bgBlack," ").concat(N?p.wrp:"hide"),children:[I&&(0,y.jsxs)("div",{className:p.close,ref:q,children:[!!F&&(0,y.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return q.current},children:(0,y.jsx)("span",{onClick:function(){E(),F()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!T&&(0,y.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return q.current},children:(0,y.jsx)("span",{onClick:Y,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return q.current},children:(0,y.jsx)("span",{className:"",onClick:E,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(p[P]," ").concat(P," ").concat(p.monaco," ").concat("txt"===N?"show":"hide"),children:"txt"===N&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(m.ZP,a()({},S))})}),"audio"===N&&(0,y.jsx)("audio",{src:"".concat((null===(n=w)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(i=w)||void 0===i?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(w),autoPlay:!0}),"video"===N&&(0,y.jsx)(y.Fragment,{children:(null===(r=w)||void 0===r?void 0:r.indexOf("http"))>-1?(0,y.jsx)("video",{controls:!0,src:"".concat(w),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(w),autoPlay:!0})}),"office"===N&&X&&(0,y.jsx)("iframe",{src:"".concat(H,"/office.html?key=").concat(X.key,"&url=").concat(btoa(X.url),"&callbackUrl=").concat(U+X.callbackUrl,"&fileType=").concat(X.fileType,"&title=").concat(X.title,"&model=").concat(C,"&officeServer=").concat(b.Z.ONLYOFFICE,"&disabledDownload=").concat(!!T)}),"html"===N&&(0,y.jsx)("iframe",{src:w+"&disposition=inline"}),"pdf"===N&&(0,y.jsx)("iframe",{src:"".concat(H,"/js/pdfview/index.html?url=").concat(encodeURIComponent(w),"&disabledDownload=").concat(!!T)}),"image"===N&&(0,y.jsx)("img",{src:"".concat((null===(l=w)||void 0===l?void 0:l.indexOf("http://"))>-1||(null===(c=w)||void 0===c?void 0:c.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(w)}),("other"===N||"download"===N)&&(0,y.jsx)(y.Fragment,{children:R?(0,y.jsx)(_.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(h.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:K,children:"下载"})}):(0,y.jsxs)(h.ZP,{type:"primary",size:"middle",onClick:K,children:[(0,y.jsx)(f.Z,{}),"点击下载"]})})]})}},24617:function(e,t,n){n.r(t),n.d(t,{PracticeFileType:function(){return J},default:function(){return K}});var i=n(37205),a=n.n(i),r=n(85573),s=n.n(r),l=n(7557),o=n.n(l),c=n(82242),u=n.n(c),d=n(41498),p=n.n(d),h=n(79800),f=n.n(h),m=n(59301),v=n(46681),x=n(85699),g=n(57809),_=n(98135),b=n(36381),j=n(78241),y=n(43418),k=n(8591),C=n(24905),w=n(5112),N=n(60324),Z=n(26220),S=n(81327),P=n(3113),O=n(6848),I=n(53093),E={flex_box_center:"flex_box_center___MjMLk",flex_space_between:"flex_space_between___PcWTa",flex_box_vertical_center:"flex_box_vertical_center___Cq7f3",flex_box_center_end:"flex_box_center_end___sMsFo",flex_box_column:"flex_box_column___n6Hxq",bg:"bg____Ic4Q",radioStyle:"radioStyle___kewjX",formWrap:"formWrap___jcehV",onePart:"onePart___ECsrp",twoPart:"twoPart___WVIpx",title:"title___RpX2E",threePart:"threePart___Tzme_",flexRowCenter:"flexRowCenter___M7zUK",fourPart:"fourPart___HgBFj",testJi:"testJi___s6Skh",upBtn:"upBtn___eKx0D",checkboxs:"checkboxs___B4uNe",averageWarp:"averageWarp___yXrlD",averageCustom:"averageCustom___t5o4x",groupWrap:"groupWrap___eT0sR",customInput:"customInput___pywUD"},$=n(84486),T=n(64165),F=n(99313),R=n(71418),V="wrap___AEhcV",L="content___NDdD8",B="colorBlue___UwyKz",M=n(37712),D=function(e){return null!=e&&e.length?e.filter((function(e,t){return 0!==t})).map((function(e){return e.val})).join("").substr(1):""},W=(0,v.connect)((function(e){return{shixunsDetail:e.shixunsDetail,globalSetting:e.globalSetting}}))((function(e){var t=e.shixunsDetail,n=(e.globalSetting,e.dispatch),i=e.fileType,a=e.path,r=e.onFinish,s=void 0===r?function(){}:r,l=(0,v.useParams)(),c=(0,m.useState)(""),d=f()(c,2),h=d[0],x=d[1],g=(0,m.useState)("1"),b=f()(g,2),j=b[0],k=b[1],C=(0,m.useState)([]),w=f()(C,2),N=w[0],Z=w[1],S=(0,m.useState)(!1),O=f()(S,2),I=O[0],E=O[1],$=(0,m.useState)([]),W=f()($,2),A=W[0],z=W[1],X=[J.OriginalPicturePath,J.ExpectPicturePath,J.PicturePath].includes(i);(0,m.useEffect)((function(){"EditPracticeSetting-SelectFilePath"===t.actionTabs.key&&(x(a||""),G())}),[t.actionTabs.key,a,j]);var G=function(){var e=p()(o()().mark((function e(){var t,i,a,r=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"",E(!0),e.next=4,n({type:"shixunsDetail/".concat("1"===j?"getRepository":"getSecretRepository"),payload:{id:l.id,path:t}});case 4:null!=(i=e.sent)&&i.trees?(a=i.trees.map((function(e){return u()(u()({},e),{name:e.name,val:e.name})})),z(a||[])):z([]),E(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(){var e=p()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s(h),U();case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){x(""),Z([]),z([]),k("1"),n({type:"shixunsDetail/setActionTabs",payload:{}})},q=D(N);return(0,M.jsx)(y.Z,{centered:!0,title:"文件路径",closable:!1,keyboard:!1,open:"EditPracticeSetting-SelectFilePath"===t.actionTabs.key,onOk:H,onCancel:U,children:(0,M.jsxs)("div",{className:V,children:[(0,M.jsxs)(F.Z,{activeKey:j,onChange:function(e){Z([]),k(e)},children:[(0,M.jsx)(F.Z.TabPane,{tab:"代码仓库"},"1"),"exec_path"===i&&(0,M.jsx)(F.Z.TabPane,{tab:"私密代码仓库"},"2")]}),(0,M.jsx)(R.Z,{style:{backgroundColor:"#f5f5f5",height:200},spinning:I,children:(0,M.jsxs)("div",{className:L,children:[(0,M.jsx)("div",{children:!(null==N||!N.length)&&N.map((function(e,t){return(0,M.jsx)("a",{style:{whiteSpace:0===t?"nowrap":""},onClick:function(){return function(e,t){var n=N.filter((function(e,n){return n<=t}));Z(n);var i=D(n);X&&x(i),G(i)}(0,t)},children:e.val},t)}))}),null!=A&&A.length?A.map((function(e,t){return"tree"===e.type?(0,M.jsxs)("a",{onClick:function(){return function(e){if("tree"===e.type){N.length?N.push({val:"/".concat(e.val),path:e.val}):N.push({val:"根目录",path:""},{val:"/".concat(e.val),path:e.val}),Z(N);var t=D(N);X&&x(t),G(t)}}(e)},children:[(0,M.jsx)("i",{className:"iconfont icon-wenjianjia ".concat(B)}),q?"".concat(q,"/"):q,e.name]},t):(0,M.jsxs)("a",{onClick:function(){return function(e){var t=D(N),n="".concat(t?"".concat(t,"/"):t).concat(e);"2"===j&&(n="secret/".concat(n)),i===J.Path?(null==h||!h.includes("".concat(n,"")))&&x("".concat(h).concat(n,"")):i===J.ExecPath&&x(n)}("".concat(e.name))},children:[(0,M.jsx)("i",{className:"iconfont icon-zuoye ".concat(B)}),q?"".concat(q,"/"):q,e.name]},t)})):(0,M.jsx)(T.Z,{style:{margin:"0 0"},image:T.Z.PRESENTED_IMAGE_SIMPLE,imageStyle:{height:60},description:(0,M.jsxs)("div",{children:[(0,M.jsx)("p",{style:{color:"#888",marginBottom:0},children:"私密代码仓库暂无文件。请先开启并上传代码文"}),(0,M.jsx)("span",{style:{color:"#888"},children:"件、标准图片等文件到私密代码仓库"})]}),children:(0,M.jsx)(P.ZP,{type:"primary",onClick:function(){U(),n({type:"practiceSetting/setSideBarTabs",payload:{tabsActive:"warehouse"}}),v.history.push("/shixuns/".concat(l.id,"/edit?tabId=warehouse"))},children:"去上传"})})]})}),(0,M.jsx)("label",{className:"mt5",children:"已选中的文件:"}),(0,M.jsx)(_.Z,{placeholder:"请输入新文件夹名/子文件夹名。src/step1",value:h,onChange:function(e){return x(e.target.value)}})]})})})),A=n(92885),z=n(89392),X=n(64187),G=n(72417),H=n(35503),U=g.default.Option,q=_.Z.TextArea,J=(b.Z.Panel,function(e){return e.Path="path",e.ExecPath="exec_path",e.OriginalPicturePath="original_picture_path",e.ExpectPicturePath="expect_picture_path",e.PicturePath="picture_path",e}({})),K=(0,v.connect)((function(e){return{shixunsDetail:e.shixunsDetail,newCourse:e.newCourse,globalSetting:e.globalSetting,practiceSetting:e.practiceSetting}}))((function(e){var t,n,i,r,l,c,d=e.shixunsDetail,h=e.dispatch,b=e.practiceSetting,T=j.Z.useForm(),F=f()(T,1)[0],R=(0,m.useState)({}),V=f()(R,2),L=V[0],B=V[1],D=(0,m.useState)([]),K=f()(D,2),Y=K[0],Q=K[1],ee=(0,m.useState)({}),te=f()(ee,2),ne=te[0],ie=te[1],ae=(0,m.useState)([]),re=f()(ae,2),se=re[0],le=re[1],oe=(0,m.useState)({hidden:0,input_visible:!1,is_invisible:!1,actual_output_visible:!1,last_match_rule:!1}),ce=f()(oe,2),ue=ce[0],de=ce[1],pe=(0,m.useState)([!1]),he=f()(pe,2),fe=he[0],me=he[1],ve=(0,m.useState)(!1),xe=f()(ve,2),ge=(xe[0],xe[1]),_e=(0,m.useState)(),be=f()(_e,2),je=be[0],ye=be[1],ke=(0,m.useRef)({formValue:{},testSetList:[],uploadData:[]}),Ce=(0,m.useState)(!0),we=f()(Ce,2),Ne=we[0],Ze=we[1],Se=(0,m.useState)(!0),Pe=f()(Se,2),Oe=Pe[0],Ie=Pe[1],Ee=(0,m.useRef)(null),$e=(0,m.useState)(!1),Te=f()($e,2),Fe=Te[0],Re=Te[1],Ve=(0,m.useState)(!1),Le=f()(Ve,2),Be=Le[0],Me=Le[1],De=(0,m.useState)(!1),We=f()(De,2),Ae=We[0],ze=We[1],Xe=(0,v.useParams)(),Ge=(0,m.useState)(!1),He=f()(Ge,2),Ue=He[0],qe=He[1],Je=(0,m.useState)(!1),Ke=f()(Je,2),Ye=Ke[0],Qe=Ke[1],et=(0,m.useState)(!1),tt=f()(et,2),nt=tt[0],it=tt[1],at=(0,m.useState)(!1),rt=f()(at,2),st=rt[0],lt=rt[1],ot=(0,m.useState)(!1),ct=f()(ot,2),ut=ct[0],dt=ct[1],pt=["test_set_rules","go_back_url","next_challenge","position","name","chooses","st","id","path","exec_path","show_type","original_picture_path","expect_picture_path","picture_path","test_set_rules_expression","web_route","test_set_score","test_set_average","exec_time","ignore_space","with_code_file","unity_3d","unity_3d_routes","unity_3d_result","has_web_route","test_sets","is_file","proxy_port"],ht=[];(0,m.useEffect)((function(){ft()}),[]),(0,m.useEffect)((function(){console.log(Y);var e=Y.every((function(e){return 1===e.hidden}));qe(e);var t=Y.every((function(e){return e.is_invisible}));Qe(t);var n=Y.every((function(e){return e.last_match_rule}));it(n);var i=Y.every((function(e){return e.input_visible}));lt(i);var a=Y.every((function(e){return e.actual_output_visible}));dt(a)}),[Y]),(0,m.useEffect)((function(){return"{}"!==JSON.stringify(ke.current.formValue)&&ke.current.testSetList.length&&mt(),function(){clearTimeout(Ee.current)}}),[L,se]);var ft=function(){var e=p()(o()().mark((function e(){var t,n,i,a,r;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ze(!0),e.next=3,h({type:"shixunsDetail/getRepository",payload:{id:Xe.id,path:""}});case 3:return t=e.sent,Ie(null===(null==t?void 0:t.trees)),e.next=7,(0,I.ii)({id:Xe.id,challengeId:Xe.challengesId,tab:1});case 7:(n=e.sent)&&(Ze(!1),a=(null===(i=n.test_sets)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.is_file)||!1,r=u()(u()({},n),{},{is_file:a}),ie(r),parseInt(null==n?void 0:n.code_compile_score)>0&&ze(!0),xt(r));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),mt=function(){clearTimeout(Ee.current),Ee.current=setTimeout(vt,500)},vt=function(){!pt.some((function(e){var t=(0,z.isNumber)(L[e])?String(L[e]):L[e],n=(0,z.isNumber)(ke.current.formValue[e])?String(ke.current.formValue[e]):ke.current.formValue[e];return!(0,z.isEqual)(t,n)}))&&(0,z.isEqual)(ke.current.testSetList,se)&&(0,z.isEqual)(ke.current.uploadData,Y)?h({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}}):h({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!0}})},xt=function(e){if(e.proxy_port=(null==e?void 0:e.proxy_port)||8080,F.setFieldsValue(u()({},e)),B(u()({},e)),null!=e&&e.is_file){var t=e.test_sets||[];Q(t);var n=[{hidden:0,input:"",output:"",score:100}];ke.current={formValue:u()({},e),testSetList:n,uploadData:t},le(n),me(Array(n.length).fill(!1))}else{var i,a=null!==(i=e.test_sets)&&void 0!==i&&i.length?e.test_sets:[{hidden:0,input:"",output:"",score:100}];ke.current={formValue:u()({},e),testSetList:a,uploadData:[]},me(Array(a.length).fill(!1)),le(a)}},gt=function(){var e=p()(o()().mark((function e(t){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Oe){e.next=3;break}return y.Z.confirm({centered:!0,title:"提示",content:"请先上传本关任务的所有代码文件、标准图片等所有必要的文件到代码仓库",okText:"去上传",onOk:function(){h({type:"practiceSetting/setSideBarTabs",payload:{tabsActive:"warehouse"}}),v.history.push("/shixuns/".concat(Xe.id,"/edit?tabId=warehouse"))},cancelText:"取消"}),e.abrupt("return");case 3:h({type:"shixunsDetail/setActionTabs",payload:{key:"EditPracticeSetting-SelectFilePath"}}),ye(t);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_t=function(e){var t=parseInt(F.getFieldValue("code_compile_score")||0),n=Math.floor((100-t)/e.length),i=n+(100-t)%e.length;e=e.map((function(t,a){return a===e.length-1?u()(u()({},t),{},{score:i}):u()(u()({},t),{},{score:n})})),ke.current.testSetList=(0,z.clone)(e),le(e)},bt=function(e){var t=parseInt(F.getFieldValue("code_compile_score")||0),n=Math.floor((100-t)/e.length),i=n+(100-t)%e.length;e=e.map((function(t,a){return a===e.length-1?u()(u()({},t),{},{score:i}):u()(u()({},t),{},{score:n})})),ke.current.uploadData=(0,z.clone)(e),Q(e)},jt=function(){var e=p()(o()().mark((function e(t){var n,i,a,r=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]&&r[1],i=r.length>2&&void 0!==r[2]?r[2]:1,t.path&&!t.path.endsWith("")&&(t.path=t.path+""),e.next=5,(0,I.Rs)(u()(u()({},Xe),{},{tab:1,challenge:u()(u()(u()({},t),{test_set_rules_expression:0===t.test_set_rules?null:t.test_set_rules_expression}),{},{shixunfileexpectpicturepath:t.original_picture_path,shixunfilestandardpicturepath:t.expect_picture_path}),test_set:ht,sync_origin_shixun:n}));case 5:e.sent.status>=0&&(null!=d&&null!==(a=d.detail)&&void 0!==a&&a.copy_for_exercise&&(0,H.m)(h,d,Xe.id,i),v.history.replace("/shixuns/".concat(Xe.id,"/edit/").concat(Xe.challengesId,"/tab=3")));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return console.log(Y,444),(0,M.jsxs)(m.Fragment,{children:[(0,M.jsxs)("section",{className:E.bg,children:[(0,M.jsxs)(j.Z,{form:F,className:E.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(e){var t=F.getFieldValue();B(u()({},t)),"test_set_score"in e&&e.test_set_score&&(F.setFieldsValue({test_set_average:!0}),L.is_file?bt(Y):_t(se)),"test_set_average"in e&&e.test_set_average&&(L.is_file?bt(Y):_t(se)),"unity_3d"in e&&(e.unity_3d||(F.setFieldsValue({with_code_file:!0}),B(u()(u()({},t),{},{with_code_file:!0}))))},onFinish:function(e){var t,n,i=parseInt(F.getFieldValue("code_compile_score")||0);if(e.is_file){if(null==Y||!Y.length)return void k.ZP.error("测试集不能为空");var a=Y.map((function(e){return e.score})).reduce((function(e,t){return e+t}),0)+i;if(e.test_set_score&&100!==a&&null!=se&&se.length)return void k.ZP.error("测试集的评分占比之和必须等于100");ht=Y}if(!e.is_file){var r=se.map((function(e){return e.score})).reduce((function(e,t){return e+t}),0)+i;if(e.test_set_score&&100!==r&&null!=se&&se.length)return void k.ZP.error("测试集的评分占比之和必须等于100");ht=se.map((function(e){return u()(u()({},e),{},{is_file:!1})}))}e.test_set_score||(ht=ht.map((function(e){return u()(u()({},e),{},{is_target:!1,target_name:""})}))),null!=d&&null!==(t=d.detail)&&void 0!==t&&t.is_fork_from_creator&&null!=d&&null!==(n=d.detail)&&void 0!==n&&n.copy_for_exercise&&null!=ne&&ne.has_relation?h({type:"classroomList/setActionTabs",payload:{key:"同步修改",value:e,type:"taskLevel",fn:function(e,t,n){jt(e,t,n)}}}):jt(e)},initialValues:{test_set_rules:0},children:[(0,M.jsx)(G.Z,{activeIndex:1}),(0,M.jsxs)("div",{className:E.onePart,children:[(null===(t=d.detail)||void 0===t?void 0:t.identity)<3&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(j.Z.Item,{label:"嵌入第三方平台:",children:[(0,M.jsx)(j.Z.Item,{name:"unity_3d",noStyle:!0,valuePropName:"checked",children:(0,M.jsx)(C.Z,{disabled:2===(null===(n=d.detail)||void 0===n?void 0:n.shixun_status)})}),(0,M.jsx)("span",{className:"font14 c-light-black",children:"(可以在学员页面直接嵌入第三方平台)"})]}),L.unity_3d&&(null===(i=d.detail)||void 0===i?void 0:i.identity)<3&&(0,M.jsx)(j.Z.Item,{name:"unity_3d_routes",label:"路径:",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,M.jsx)(_.Z,{bordered:!1,disabled:2===(null===(r=d.detail)||void 0===r?void 0:r.shixun_status),placeholder:"请选择版本库中的代码文件。例: src/step1/HelloWorld.java"})})]}),L.unity_3d&&(null===(l=d.detail)||void 0===l?void 0:l.identity)<3&&(0,M.jsxs)(m.Fragment,{children:[(0,M.jsx)(j.Z.Item,{name:"with_code_file",label:"是否需要代码评测:",children:(0,M.jsxs)(w.ZP.Group,{children:[(0,M.jsx)(w.ZP,{value:!0,children:"是"}),(0,M.jsx)(w.ZP,{value:!1,children:"否"})]})}),L.with_code_file?(0,M.jsx)(j.Z.Item,{name:"unity_3d_result",label:"评测结果是否由 Unity3D 决定:",children:(0,M.jsxs)(w.ZP.Group,{children:[(0,M.jsx)(w.ZP,{value:!0,children:"是"}),(0,M.jsx)(w.ZP,{value:!1,children:"否"})]})}):null]})]}),(0,M.jsx)("div",{className:E.twoPart,children:L.with_code_file&&(0,M.jsxs)(m.Fragment,{children:[(0,M.jsx)("div",{className:E.title,children:"评测文件"}),(0,M.jsx)(j.Z.Item,{name:"exec_time",label:(0,M.jsxs)("div",{children:["评测时长限制 ",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(程序编译、执行所允许的最大时长,单位:秒)"})]}),rules:[{required:!0,message:"必填项:不能为空"}],children:(0,M.jsx)(_.Z,{bordered:!1,placeholder:"请输入评测时长",className:E.width300})}),(0,M.jsxs)(j.Z.Item,{label:(0,M.jsxs)("div",{children:["评测结果展示方式 ",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(学员评测本关任务时,查看效果页上需要展现的文件类型)"})]}),children:[(0,M.jsx)(j.Z.Item,{name:"show_type",noStyle:!0,rules:[{required:!0,message:"必填项:不能为空"}],children:(0,M.jsxs)(g.default,{bordered:!1,size:"large",style:{width:600},getPopupContainer:function(e){return e.parentNode},children:[(0,M.jsx)(U,{value:-1,children:"测试集对比"}),(0,M.jsx)(U,{value:1,children:"图片"}),(0,M.jsx)(U,{value:2,children:"apk/exe"}),(0,M.jsx)(U,{value:3,children:"txt"}),(0,M.jsx)(U,{value:4,children:"html"}),(0,M.jsx)(U,{value:5,children:"mp3"}),(0,M.jsx)(U,{value:6,children:"mp4"}),(0,M.jsx)(U,{value:7,children:"LaTeX"}),(0,M.jsx)(U,{value:8,children:"office"}),(0,M.jsx)(U,{value:9,children:"Verilog"})]})}),(0,M.jsx)(N.Z,{overlayClassName:E.popover,placement:"bottomLeft",content:(0,M.jsxs)("p",{className:"font12",children:["图片:处理或输出图片类型的任务,请选填此项",(0,M.jsx)("br",{}),"可以通过设置图片路径和学员答案文件路径,展示代码对应的图片效果",(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),"apk/exe写可执行文件的任务请选填此项",(0,M.jsx)("br",{}),"可以通过设置学员答案文件路径,展示二维码以供扫码下载",(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),"txt输出txt文档类型的任务请选填此项",(0,M.jsx)("br",{}),"可以通过学员答案文件路径设置展示txt文件内容",(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),"htmlweb类型的任务请选填此项",(0,M.jsx)("br",{}),"可以通过Web路由设置展示html效果预览页",(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),"mp3/mp4mp3/mp4文件类型的任务请选填此项",(0,M.jsx)("br",{}),"可以通过学员答案文件路径设置展示mp3/mp4文件内容",(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),"LaTeXLaTeX实验报告的任务请选择此项",(0,M.jsx)("br",{}),"学员可以使用LaTeX系统撰写实验报告最终以PDF格式展示",(0,M.jsx)("br",{}),(0,M.jsx)("span",{className:"c-red",children:"注意选择了LaTeX的关卡需要教师手动对该关卡进行判分"}),(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),"OfficeMicrosoftOffice相关文件的任务请选填此项",(0,M.jsx)("br",{}),"注意学生上传的office文件目录是在/data/bigfiles目录下如果要做评测请读取此目录的文件",(0,M.jsx)("br",{})]}),trigger:"click",children:(0,M.jsx)(x.Z,{className:"ml5 font24 c-light-black"})})]}),(0,M.jsx)(j.Z.Item,{name:"path",label:(0,M.jsxs)("div",{children:["学员任务文件 ",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(该文件将直接显示给学生,需要学生在其中填写代码)"})]}),rules:[{required:!0,message:"必填项:不能为空"}],children:(0,M.jsx)(_.Z,{bordered:!1,placeholder:"点击选择代码文件,可同时选择多个文件",onClick:function(){return gt(J.Path)}})}),(0,M.jsx)(j.Z.Item,{name:"exec_path",label:(0,M.jsxs)("div",{children:["评测执行文件 ",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(点击评测按钮时调用的文件,用于检测学员结果是否正确,可以与“学员任务文件”一致)"})]}),rules:[{required:!0,message:"必填项:不能为空"}],children:(0,M.jsx)(_.Z,{bordered:!1,placeholder:"点击选择代码文件",onClick:function(){return gt(J.ExecPath)}})}),4===L.show_type&&(L.web_route||(null==ne?void 0:ne.has_web_route))&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(j.Z.Item,{name:"proxy_port",label:(0,M.jsxs)("div",{children:["端口号 ",(0,M.jsx)("span",{className:"font12 c-light-black",children:"请注意将服务器程序的端口号映射到以下端口默认8080"})]}),rules:[{required:!0,message:"请输入端口号"},{validator:function(e,t){return/^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/.test(t)||!t?Promise.resolve():Promise.reject(new Error("端口输入范围(0-65535)"))}}],children:(0,M.jsx)(_.Z,{bordered:!1,placeholder:"请输入0-65535的值"})}),(0,M.jsx)(j.Z.Item,{name:"web_route",label:(0,M.jsxs)("div",{children:["Web路由 ",(0,M.jsx)("span",{className:"font12 c-light-black",children:" 网站类型的实践项目请填写Web路由地址"})]}),children:(0,M.jsx)(_.Z,{bordered:!1,placeholder:"网站类型实训请填写Web路由地址。例java/mypage"})})]}),(1===L.show_type||5===L.show_type||6===L.show_type)&&(0,M.jsx)(j.Z.Item,{name:"original_picture_path",label:(0,M.jsxs)("div",{children:["源文件目录 ",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(该目录用于存放需要处理的图片/MP3/MP4等文件建议使用单独的文件夹"})]}),children:(0,M.jsx)(_.Z,{bordered:!1,placeholder:"点击选择文件目录src/step1/sourcefiles",onClick:function(){return gt(J.OriginalPicturePath)}})}),-1!==L.show_type&&(0,M.jsx)(j.Z.Item,{name:"picture_path",label:(0,M.jsxs)("div",{children:["学员答案文件目录 ",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(该目录用于存放学员代码执行后生成的文件,建议使用单独的文件夹)"})]}),children:(0,M.jsx)(_.Z,{bordered:!1,placeholder:"点击选择文件目录src/step1/outputfiles",onClick:function(){return gt(J.PicturePath)}})}),(1===L.show_type||5===L.show_type||6===L.show_type)&&(0,M.jsx)(j.Z.Item,{name:"expect_picture_path",label:(0,M.jsxs)("div",{children:["标准答案文件目录 ",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(该目录用于存放最终作为参考的文件,在评测通过后会展示给学员查看,建议使用单独的文件夹)"})]}),children:(0,M.jsx)(_.Z,{bordered:!1,placeholder:"点击选择文件目录src/step1/expectedfiles",onClick:function(){return gt(J.ExpectPicturePath)}})})]})}),(0,M.jsx)("div",{className:E.threePart,children:L.with_code_file&&(0,M.jsxs)(m.Fragment,{children:[(0,M.jsx)("div",{className:E.title,children:"评测规则"}),(0,M.jsxs)("div",{className:E.flexRowCenter,children:[(0,M.jsx)(j.Z.Item,{className:E.formCustom,name:"test_set_rules",label:"通关判定:",children:(0,M.jsxs)(w.ZP.Group,{className:"ml25",children:[(0,M.jsx)(w.ZP,{className:E.radioStyle,value:0,children:"实际输出与预期输出对比"}),(0,M.jsx)(w.ZP,{className:E.radioStyle,value:1,children:"实际输出满足规则"})]})}),1===L.test_set_rules&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(j.Z.Item,{name:"test_set_rules_expression",style:{marginTop:50,position:"relative",top:40},rules:[{required:!0,message:"必填项:不能为空"}],children:(0,M.jsx)(_.Z,{style:{width:400,marginLeft:-40},bordered:!1,placeholder:"适用于输出结果动态变化的程序"})}),(0,M.jsx)(N.Z,{overlayClassName:E.popover,placement:"bottomLeft",content:(0,M.jsxs)("p",{className:"font12",children:["使用示例1实际输出与预期输出的相对误差在0.01以内,可使用以下表达式:",(0,M.jsx)("br",{}),"(actual-expect)/expect <= 0.01",(0,M.jsx)("br",{}),"使用示例2实际输出结果包含某段字符串hello可使用以下表达式",(0,M.jsx)("br",{}),'string.contains(actual, "hello")',(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),"若需要对输出结果中每个元素进行操作可使用list集合",(0,M.jsx)("br",{}),"示例参考假设程序实际输出为100 1000 10000预期输出为100.01 1000.02 10000.05",(0,M.jsx)("br",{}),"评测要求实际输出列表中元素与预期输出列表中对应元素相对误差在0.01 之内,可使以下表达式:",(0,M.jsx)("br",{}),"list.forEach( 'math.abs( (actualElem-expectElem)/expectElem ) <= 0.01 ' )",(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),(0,M.jsx)("a",{href:"https://www.educoder.net/forums/4346",target:"_blank",style:{background:"#0152d9",color:"#fff"},children:"点击查看详情说明"}),(0,M.jsx)("br",{})]}),trigger:"click",children:(0,M.jsx)(x.Z,{style:{padding:"114px 0 0 9px"},className:"font24 c-light-black"})})]})]}),(0,M.jsx)(j.Z.Item,{className:E.formCustom,name:"ignore_space",label:"空格处理:",children:(0,M.jsxs)(w.ZP.Group,{className:"ml25",children:[(0,M.jsx)(w.ZP,{className:E.radioStyle,value:0,children:"不忽略空格"}),(0,M.jsx)(w.ZP,{className:E.radioStyle,value:1,children:"忽略首尾空格"}),(0,M.jsxs)(w.ZP,{className:E.radioStyle,value:2,children:["忽略所有空格",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(评测过程中自动去掉所有空格进行对比)"})]})]})})]})}),(0,M.jsx)("div",{className:E.fourPart,children:L.with_code_file&&(0,M.jsxs)(m.Fragment,{children:[(0,M.jsx)("div",{className:E.title,children:"测试集"}),(0,M.jsx)(j.Z.Item,{className:E.testJi,name:"test_set_score",label:"得分规范:",children:(0,M.jsxs)(w.ZP.Group,{className:"ml25",children:[(0,M.jsxs)(w.ZP,{value:!1,className:E.radioStyle,children:["通过全部测试集",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(所有测试集都正确时,才能获得金币)"})]}),(0,M.jsxs)(w.ZP,{value:!0,className:E.radioStyle,children:["通过部分测试集",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(部分测试集正确时,按配置的比例获得金币)"})]})]})}),L.test_set_score&&(0,M.jsx)("div",{className:E.averageWarp,children:(0,M.jsx)(j.Z.Item,{className:E.averageCustom,name:"test_set_average",label:"",children:(0,M.jsxs)(w.ZP.Group,{children:[(0,M.jsx)(w.ZP,{style:{margin:"0 40px 0 20px"},value:!0,children:"均分比例"}),(0,M.jsx)(w.ZP,{value:!1,children:"自定义比例"})]})})}),L.test_set_score&&(0,M.jsxs)("div",{children:[(0,M.jsxs)("div",{style:{display:"flex",height:"30px",marginBottom:"10px",paddingLeft:"93px"},children:[(0,M.jsx)(C.Z,{checked:Ae,style:{display:"flex",alignItems:"center"},className:E.checkboxs,onChange:function(e){ze(e.target.checked),F.setFieldsValue({code_compile_score:0}),L.test_set_average&&(L.is_file?bt(Y):_t(se))},children:"启用编译通过即可得分"}),Ae&&(0,M.jsxs)("span",{style:{display:"flex"},children:[(0,M.jsx)(j.Z.Item,{rules:[{required:!0,message:"请输入编译得分"}],name:"code_compile_score",children:(0,M.jsx)(Z.Z,{onChange:function(){L.test_set_average&&(L.is_file?bt(Y):_t(se))},parser:function(e){return isNaN(parseInt(e))?"":parseInt(e)},min:0,max:100,style:{width:"85px",margin:"5px 0px",fontSize:"14px"}})})," ",(0,M.jsx)("span",{style:{display:"flex",alignItems:"center",marginLeft:"5px"},children:"%"})]})]}),(0,M.jsx)("div",{style:{paddingLeft:"85px",color:"#999",fontSize:"12px",marginBottom:"20px"},children:"(请注意该实训题是否有编译过程,若没有则无法获得编译得分)"})]}),(0,M.jsx)(j.Z.Item,{className:E.testJi,name:"is_file",label:"用例类型:",children:(0,M.jsx)(w.ZP.Group,{className:"ml25",children:(0,M.jsxs)(S.Z,{direction:"horizontal",children:[(0,M.jsx)(w.ZP,{value:!1,className:E.radioStyle,children:"文本"}),(0,M.jsx)(w.ZP,{value:!0,className:E.radioStyle,children:"文件"})]})})}),(0,M.jsxs)("div",{style:{marginTop:"20px"},className:E.upBtn,children:[!L.is_file&&(0,M.jsx)(P.ZP,{ghost:!0,disabled:fe.every((function(e){return!e})),type:"primary",className:"mb20",style:{right:"345px"},onClick:function(){return Me(!0)},children:"批量设置"}),(0,M.jsx)(P.ZP,{ghost:!0,type:"primary",className:"mb20",style:{right:"174px"},onClick:function(){return function(){y.Z.confirm({title:"删除测试用例提示",content:"请确认是否将本关卡中的测试用例全部删除?",okText:"确认",cancelText:"取消",onOk:function(){e()}});var e=function(){L.is_file?bt([]):(_t([{hidden:0,input:"",output:"",score:0}]),me([!1]))}}()},children:"一键删除测试用例"}),(0,M.jsx)(P.ZP,{ghost:!0,type:"primary",className:"mb20",style:{right:"4px"},onClick:function(){return Re(!0)},children:"批量上传测试用例"}),L.is_file&&(0,M.jsx)(A.Y2,{showEvaluatingSetting:!0,onEvaluatingChange:function(e,t,n){"hidden"===n&&(e=e?1:0),console.log(e,t);var i=Y.map((function(i,a){return a===t?u()(u()({},i),{},s()({},n,e)):i}));Q(i),console.log(i);var a=i.every((function(t){return t[n]===e}));"hidden"===n?qe(a&&e):"is_invisible"===n?Qe(a&&e):"input_visible"===n?lt(a&&e):"actual_output_visible"===n?dt(a&&e):it(a&&e)},checkAll1:Ue,checkAll2:Ye,checkAll3:nt,checkAll4:st,checkAll5:ut,onSelectAll:function(e,t){"hidden"===t&&(e=e?1:0),console.log(e);var n=Y.map((function(n,i){return u()(u()({},n),{},s()({},t,e))}));Q(n),"hidden"===t?qe(e):"is_invisible"===t?Qe(e):"input_visible"===t?lt(e):"actual_output_visible"===t?dt(e):it(e)},disabled:null==L?void 0:L.test_set_average,inputChange:function(e,t){console.log(e,t);var n=Y.map((function(n,i){return i===t?u()(u()({},n),{},{score:e.target.value?Number(e.target.value):0}):n}));Q(n)},showScore:null==L?void 0:L.test_set_score,data:Y,onRemove:function(e,t){var n=a()(Y);n.splice(t,1),L.test_set_average?bt(n):Q(n)}})]}),!L.is_file&&(0,M.jsx)(C.Z,{checked:fe.every((function(e){return!!e})),onChange:function(e){var t=fe.map((function(){return e.target.checked}));me(t),ge(e.target.checked)},children:"全选"}),!L.is_file&&se.map((function(e,t){return(0,M.jsxs)("div",{className:E.groupWrap,children:[(0,M.jsxs)("div",{className:"font16",children:[(0,M.jsx)(C.Z,{checked:fe[t],onChange:function(e){console.log(fe);var n=a()(fe);n[t]=e.target.checked;var i=n.every((function(e){return e}));me(n),ge(i)}}),(0,M.jsxs)("span",{className:"mr10 ml5",children:["组",t+1," : "]}),L.test_set_score&&(0,M.jsxs)("span",{style:{marginRight:100},children:[(0,M.jsx)(_.Z,{style:{width:85},value:e.score,type:"number",onChange:function(e){var n=se.map((function(n,i){return i===t?u()(u()({},n),{},{score:e.target.value?Number(e.target.value):0}):n})),i={test_set_average:!1};B(u()(u()({},L),i)),F.setFieldsValue(i),le(n)}}),(0,M.jsx)("span",{className:"ml10 mr10",children:"%"})]}),L.test_set_score&&(0,M.jsxs)(C.Z,{className:"font14 ml5",checked:e.is_target,onChange:function(e){var n=se.map((function(n,i){return i===t?u()(u()({},n),{},{is_target:e.target.checked}):n}));le(n)},children:["指标测试集",(0,M.jsx)(O.Z,{title:"如需要输出指标,可以勾选指标测测试集,并对指标进行命名。教师可在实训作业的实训报告页面查看学生的指标是否合格。指标得分计入最终成绩",children:(0,M.jsx)(x.Z,{className:"ml5 font12 c-light-black"})})," "]}),e.is_target&&L.test_set_score&&(0,M.jsx)(_.Z,{value:e.target_name,maxLength:30,style:{width:"50%"},onChange:function(e){var n=se.map((function(n,i){return i===t?u()(u()({},n),{},{target_name:e.target.value}):n}));le(n)}}),(0,M.jsx)("span",{className:"tr flex1",style:{float:"right"},children:0!==t&&(0,M.jsx)(O.Z,{placement:"bottom",title:"删除",children:(0,M.jsx)("span",{className:"font16 c-red current",onClick:function(){var e=se.filter((function(e,n){return n!==t})),n=fe.filter((function(e,n){return n!==t}));me(n),_t(e)},children:"删 除"})})})]}),(0,M.jsx)(q,{bordered:!1,className:"mt10",rows:5,placeholder:"输入",value:e.input,onChange:function(e){var n=se.map((function(n,i){return i===t?u()(u()({},n),{},{input:e.target.value}):n}));le(n)}}),(0,M.jsx)(q,{bordered:!1,className:"mt10",rows:5,placeholder:"预期输出",value:e.output,onChange:function(e){var n=se.map((function(n,i){return i===t?u()(u()({},n),{},{output:e.target.value}):n}));le(n)}}),(0,M.jsxs)("div",{className:"mt10",children:[(0,M.jsxs)("span",{className:"font14 mr15",children:["可见性: ",(0,M.jsx)(O.Z,{title:(0,M.jsxs)("div",{children:[(0,M.jsx)("span",{children:'全部隐藏:隐藏测试集可以防止学生通过"print"等手段直接通关'}),(0,M.jsx)("br",{}),(0,M.jsx)("span",{children:"隐藏输入:勾选后测试输入对学员始终不可见"}),(0,M.jsx)("br",{}),(0,M.jsx)("span",{children:"隐藏预期输出:勾选后预期输出对学员始终不可见"}),(0,M.jsx)("br",{}),(0,M.jsx)("span",{children:"隐藏实际输出:勾选后实际输出对学员始终不可见"}),(0,M.jsx)("br",{})]}),children:(0,M.jsx)(x.Z,{className:"ml5 font12 c-light-black"})})]}),(0,M.jsx)(C.Z,{checked:1===e.hidden,onChange:function(e){var n=se.map((function(n,i){return i===t?u()(u()({},n),{},{hidden:e.target.checked?1:0,input_visible:e.target.checked,is_invisible:e.target.checked,actual_output_visible:e.target.checked}):n}));le(n)},children:(0,M.jsx)("span",{className:"font14",children:"全部隐藏"})}),(0,M.jsx)(C.Z,{checked:1===e.hidden||e.input_visible,onChange:function(n){var i=se.map((function(i,a){if(a===t){var r=n.target.checked&&e.is_invisible&&e.actual_output_visible?1:0;return u()(u()({},i),{},{input_visible:n.target.checked,hidden:r})}return i}));le(i)},children:(0,M.jsx)("span",{className:"font14",children:"隐藏输入"})}),(0,M.jsx)(C.Z,{checked:1===e.hidden||e.is_invisible,onChange:function(n){var i=se.map((function(i,a){if(a===t){var r=n.target.checked&&e.actual_output_visible&&e.input_visible?1:0;return u()(u()({},i),{},{is_invisible:n.target.checked,hidden:r})}return i}));le(i)},children:(0,M.jsx)("span",{className:"font14",children:"隐藏预期输出"})}),(0,M.jsx)(C.Z,{checked:1===e.hidden||e.actual_output_visible,onChange:function(n){var i=se.map((function(i,a){if(a===t){var r=n.target.checked&&e.is_invisible&&e.input_visible?1:0;return u()(u()({},i),{},{actual_output_visible:n.target.checked,hidden:r})}return i}));le(i)},children:(0,M.jsx)("span",{className:"font14",children:"隐藏实际输出"})})]}),(0,M.jsxs)("div",{children:[(0,M.jsx)("span",{className:"font14 mr20",children:"特殊判定:"}),(0,M.jsx)(C.Z,{checked:e.last_match_rule,onChange:function(e){var n=se.map((function(n,i){return i===t?u()(u()({},n),{},{last_match_rule:e.target.checked}):n}));le(n)},children:(0,M.jsxs)("span",{className:"font14",children:["末尾匹配",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(实际输出与预期输出最后一行相同即可通关)"})]})})]})]},t)})),!L.is_file&&(0,M.jsxs)("div",{children:[(0,M.jsx)(P.ZP,{type:"primary",ghost:!0,className:"mt10",onClick:function(){var e=[].concat(a()(se),[{hidden:0,input:"",output:"",score:0}]);me([].concat(a()(fe),[!1])),ge(!1),F.getFieldValue("test_set_average")?_t(e):le(e)},children:"新增测试集"}),(0,M.jsx)("span",{className:" ml20 mt10 font12 c-light-black",children:"温馨提示:公开测试集和隐藏测试集结合使用,可以降低作弊的机率;隐藏测试集,在“提交评测”时也将被系统自动检测"})]})]})})]}),(0,M.jsx)(W,{fileType:je,path:null==L?void 0:L[je],onFinish:function(e){return t=e,n=s()({},je,t),F.setFieldsValue(n),void B(u()(u()({},L),n));var t,n}})]},1),(0,M.jsx)($.t,{onOk:function(){return F.submit()},className:"customFixedButton",onCancel:function(){var e,t=function(){v.history.push("/shixuns/".concat(Xe.id,"/challenges")),h({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};null!=b&&null!==(e=b.sideBar)&&void 0!==e&&e.confirmLeave?y.Z.confirm({title:"离开此页提示",content:"系统可能不会保存您所做的更改。",okText:"离开",cancelText:"取消",onOk:function(){t()}}):t()}},2),(0,M.jsx)(X.Z,{loading:Ne}),(0,M.jsx)(A.ZP,{rootIdentifier:null==d||null===(c=d.detail)||void 0===c?void 0:c.root_identifier,visible:Fe,onClose:function(){return Re(!1)},onOK:function(e){if(null!=e&&e.length){if(F.setFieldsValue({is_file:null==e?void 0:e[0].is_file}),B(u()(u()({},L),{},{is_file:null==e?void 0:e[0].is_file})),null!=e&&e[0].is_file){var t=Y.concat(e.map((function(e){return u()(u()({},e),{},{hidden:0,is_invisible:!1,last_match_rule:!1})})));L.test_set_average?bt(t):Q(t)}if(null==e||!e[0].is_file){var n=null==se?void 0:se.filter((function(e){return e.input||e.output})).concat(e);me(Array(n.length).fill(!1)),L.test_set_average?_t(n):le(n)}}},multiple:!0,defaultMultipleValue:null==L?void 0:L.is_file}),(0,M.jsx)(y.Z,{open:Be,onOk:function(){var e=se.map((function(e,t){return fe[t]?(console.log(u()({},e)),console.log(u()({},ue)),console.log(u()(u()({},e),ue)),u()(u()({},e),ue)):e}));le(e),de({hidden:0,input_visible:!1,is_invisible:!1,actual_output_visible:!1,last_match_rule:!1}),Me(!1)},centered:!0,okText:"确认",cancelText:"取消",onCancel:function(){de({hidden:0,input_visible:!1,is_invisible:!1,actual_output_visible:!1,last_match_rule:!1}),Me(!1)},width:586,title:"批量设置",children:(0,M.jsxs)("div",{children:[(0,M.jsxs)("span",{className:"font14 mr15",children:["可见性: ",(0,M.jsx)(O.Z,{title:(0,M.jsxs)("div",{children:[(0,M.jsx)("span",{children:'全部隐藏:隐藏测试集可以防止学生通过"print"等手段直接通关'}),(0,M.jsx)("br",{}),(0,M.jsx)("span",{children:"隐藏输入:勾选后测试输入对学员始终不可见"}),(0,M.jsx)("br",{}),(0,M.jsx)("span",{children:"隐藏预期输出:勾选后预期输出对学员始终不可见"}),(0,M.jsx)("br",{}),(0,M.jsx)("span",{children:"隐藏实际输出:勾选后实际输出对学员始终不可见"}),(0,M.jsx)("br",{})]}),children:(0,M.jsx)(x.Z,{className:"ml5 font12 c-light-black"})})]}),(0,M.jsx)(C.Z,{checked:1===ue.hidden,onChange:function(e){de(u()(u()({},ue),{},{hidden:e.target.checked?1:0,input_visible:e.target.checked,is_invisible:e.target.checked,actual_output_visible:e.target.checked}))},children:(0,M.jsx)("span",{className:"font14 mr10",children:"全部隐藏"})}),(0,M.jsx)(C.Z,{checked:ue.input_visible,onChange:function(e){var t=e.target.checked&&ue.is_invisible&&ue.actual_output_visible?1:0;de(u()(u()({},ue),{},{hidden:t,input_visible:e.target.checked}))},children:(0,M.jsx)("span",{className:"font14 mr10",children:"隐藏输入"})}),(0,M.jsx)(C.Z,{checked:ue.is_invisible,onChange:function(e){var t=e.target.checked&&ue.input_visible&&ue.actual_output_visible?1:0;de(u()(u()({},ue),{},{hidden:t,is_invisible:e.target.checked}))},children:(0,M.jsx)("span",{className:"font14 mr10",children:"隐藏预期输出"})}),(0,M.jsx)(C.Z,{checked:ue.actual_output_visible,onChange:function(e){var t=e.target.checked&&ue.input_visible&&ue.is_invisible?1:0;de(u()(u()({},ue),{},{hidden:t,actual_output_visible:e.target.checked}))},children:(0,M.jsx)("span",{className:"font14",children:"隐藏实际输出"})}),(0,M.jsxs)("div",{className:"mt10",children:[(0,M.jsx)("span",{className:"font14 mr20",children:"特殊判定:"}),(0,M.jsx)(C.Z,{checked:ue.last_match_rule,onChange:function(e){de(u()(u()({},ue),{},{last_match_rule:e.target.checked}))},children:(0,M.jsxs)("span",{className:"font14",children:["末尾匹配",(0,M.jsx)("span",{className:"font12 c-light-black",children:"(实际输出与预期输出最后一行相同即可通关)"})]})})]})]})})]})}))},72417:function(e,t,n){n.d(t,{Z:function(){return l}});var i=n(59301),a=n(43418),r=n(46681),s=n(37712),l=(0,r.connect)((function(e){return{globalSetting:e.globalSetting,practiceSetting:e.practiceSetting}}))((function(e){var t=e.activeIndex,n=e.isEdit,l=void 0===n||n,o=e.dispatch,c=e.practiceSetting,u=(0,r.useParams)(),d=u.id,p=u.challengesId,h=(0,i.useMemo)((function(){return[{name:"本关任务",url:"/shixuns/".concat(d,"/edit/").concat(p,"/editcheckpoint")},{name:"评测设置",url:"/shixuns/".concat(d,"/edit/").concat(p,"/tab=2")},{name:"参考答案",url:"/shixuns/".concat(d,"/edit/").concat(p,"/tab=3")},{name:"关卡排行榜",url:"/shixuns/".concat(d,"/edit/").concat(p,"/tab=4")}]}),[d,p]);return(0,s.jsx)("ul",{className:"challenge-nav",children:l?h.map((function(e,n){return t===n?(0,s.jsxs)("li",{children:[" ",(0,s.jsx)("a",{className:"active",children:e.name})," "]},e.url):(0,s.jsxs)("li",{children:[" ",(0,s.jsx)("a",{onClick:function(){return t=e.url,i=function(){r.history.push(t),o({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})},void(null!=c&&null!==(n=c.sideBar)&&void 0!==n&&n.confirmLeave?a.Z.confirm({title:"离开此页提示",content:"系统可能不会保存您所做的更改。",okText:"离开",cancelText:"取消",onOk:function(){i()}}):i());var t,n,i},children:e.name})," "]},e.url)})):(0,s.jsxs)("li",{children:[" ",(0,s.jsx)("a",{className:"active",children:h[0].name})," "]},h[0].url)})}))},64187:function(e,t,n){n.d(t,{Z:function(){return s}});n(59301);var i=n(71418),a="loading___lueiN",r=n(37712),s=function(e){return e.loading?(0,r.jsx)("div",{className:a,children:(0,r.jsx)(i.Z,{})}):(0,r.jsx)(r.Fragment,{})}},35503:function(e,t,n){n.d(t,{S:function(){return d},m:function(){return p}});var i=n(7557),a=n.n(i),r=n(41498),s=n.n(r),l=n(41282),o=n(8591),c=n(43418),u=n(37712),d=function(e){var t=document.createElement("textarea");return t.value=e,t.value},p=function(){var e=s()(a()().mark((function e(t,n,i,r,s){var d,p,h;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"shixunsDetail/saveCopyForExercise",payload:{id:i,save_type:r}});case 2:d=e.sent,1===r?(0==(null==d?void 0:d.status)&&o.ZP.success("保存成功"),null!=d&&null!==(p=d.data)&&void 0!==p&&p.exists_same_shixun_name?t({type:"classroomList/setActionTabs",payload:{key:"重名修改",name:null==d||null===(h=d.data)||void 0===h?void 0:h.shixun_name}}):t({type:"classroomList/setActionTabs",payload:{}})):(t({type:"classroomList/setActionTabs",payload:{}}),0===(null==d?void 0:d.status)&&c.Z.info({title:"提示",width:460,icon:null,centered:!0,content:(0,u.jsx)("div",{children:(0,u.jsx)("div",{children:"实训同步修改完成,请验证实训是否可以正常使用。"})}),okText:"前往原实训",onOk:function(){var e;(0,l.xg)("/shixuns/".concat(null==n||null===(e=n.detail)||void 0===e||null===(e=e.fork_from)||void 0===e?void 0:e.fork_identifier,"/challenges"))}}));case 4:case"end":return e.stop()}}),e)})));return function(t,n,i,a,r){return e.apply(this,arguments)}}()},56762:function(e,t,n){n.d(t,{Z:function(){return a}});var i=n(59301);function a(){const[,e]=i.useReducer((e=>e+1),0);return e}},24905:function(e,t,n){n.d(t,{Z:function(){return C}});var i=n(92310),a=n.n(i),r=n(5630),s=n(59301),l=n(36355),o=n(1684),c=n(32441);var u=s.createContext(null),d=n(98447),p=n(14088),h=n(4572),f=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n};const m=(e,t)=>{var n;const{prefixCls:i,className:m,rootClassName:v,children:x,indeterminate:g=!1,style:_,onMouseEnter:b,onMouseLeave:j,skipGroup:y=!1,disabled:k}=e,C=f(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:w,direction:N,checkbox:Z}=s.useContext(l.E_),S=s.useContext(u),{isFormItemInput:P}=s.useContext(c.aM),O=s.useContext(o.Z),I=null!==(n=(null==S?void 0:S.disabled)||k)&&void 0!==n?n:O,E=s.useRef(C.value);s.useEffect((()=>{null==S||S.registerValue(C.value)}),[]),s.useEffect((()=>{if(!y)return C.value!==E.current&&(null==S||S.cancelValue(E.current),null==S||S.registerValue(C.value),E.current=C.value),()=>null==S?void 0:S.cancelValue(C.value)}),[C.value]);const $=w("checkbox",i),[T,F]=(0,d.ZP)($),R=Object.assign({},C);S&&!y&&(R.onChange=function(){C.onChange&&C.onChange.apply(C,arguments),S.toggleOption&&S.toggleOption({label:x,value:C.value})},R.name=S.name,R.checked=S.value.includes(C.value));const V=a()(`${$}-wrapper`,{[`${$}-rtl`]:"rtl"===N,[`${$}-wrapper-checked`]:R.checked,[`${$}-wrapper-disabled`]:I,[`${$}-wrapper-in-form-item`]:P},null==Z?void 0:Z.className,m,v,F),L=a()({[`${$}-indeterminate`]:g},h.A,F),B=g?"mixed":void 0;return T(s.createElement(p.Z,{component:"Checkbox",disabled:I},s.createElement("label",{className:V,style:Object.assign(Object.assign({},null==Z?void 0:Z.style),_),onMouseEnter:b,onMouseLeave:j},s.createElement(r.Z,Object.assign({"aria-checked":B},R,{prefixCls:$,className:L,disabled:I,ref:t})),void 0!==x&&s.createElement("span",null,x))))};var v=s.forwardRef(m),x=n(12295),g=n(83930),_=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n};const b=(e,t)=>{const{defaultValue:n,children:i,options:r=[],prefixCls:o,className:c,rootClassName:p,style:h,onChange:f}=e,m=_(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:b,direction:j}=s.useContext(l.E_),[y,k]=s.useState(m.value||n||[]),[C,w]=s.useState([]);s.useEffect((()=>{"value"in m&&k(m.value||[])}),[m.value]);const N=s.useMemo((()=>r.map((e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e))),[r]),Z=b("checkbox",o),S=`${Z}-group`,[P,O]=(0,d.ZP)(Z),I=(0,g.Z)(m,["value","disabled"]),E=r.length?N.map((e=>s.createElement(v,{prefixCls:Z,key:e.value.toString(),disabled:"disabled"in e?e.disabled:m.disabled,value:e.value,checked:y.includes(e.value),onChange:e.onChange,className:`${S}-item`,style:e.style,title:e.title},e.label))):i,$={toggleOption:e=>{const t=y.indexOf(e.value),n=(0,x.Z)(y);-1===t?n.push(e.value):n.splice(t,1),"value"in m||k(n),null==f||f(n.filter((e=>C.includes(e))).sort(((e,t)=>N.findIndex((t=>t.value===e))-N.findIndex((e=>e.value===t)))))},value:y,disabled:m.disabled,name:m.name,registerValue:e=>{w((t=>[].concat((0,x.Z)(t),[e])))},cancelValue:e=>{w((t=>t.filter((t=>t!==e))))}},T=a()(S,{[`${S}-rtl`]:"rtl"===j},c,p,O);return P(s.createElement("div",Object.assign({className:T,style:h},I,{ref:t}),s.createElement(u.Provider,{value:$},E)))},j=s.forwardRef(b);var y=s.memo(j);const k=v;k.Group=y,k.__ANT_CHECKBOX=!0;var C=k},98447:function(e,t,n){n.d(t,{C2:function(){return l}});var i=n(17313),a=n(37613),r=n(83116);const s=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,i.Wf)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},(0,i.Wf)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,i.Wf)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Object.assign({},(0,i.oN)(e))},[`${t}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`\n ${n}:not(${n}-disabled),\n ${t}:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`\n ${n}-checked:not(${n}-disabled),\n ${t}-checked:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{[`${t}-inner`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function l(e,t){const n=(0,a.TS)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[s(n)]}t.ZP=(0,r.Z)("Checkbox",((e,t)=>{let{prefixCls:n}=t;return[l(n,e)]}))},57809:function(e,t,n){var i=n(92310),a=n.n(i),r=n(77861),s=n(83930),l=n(59301),o=n(53487),c=n(62892),u=n(19080),d=n(36355),p=n(1684),h=n(93891),f=n(19716),m=n(32441),v=n(33234),x=n(14154),g=n(58582),_=n(84443),b=n(66339),j=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n};const y="SECRET_COMBOBOX_MODE_DO_NOT_USE",k=(e,t)=>{var n,{prefixCls:i,bordered:o=!0,className:k,rootClassName:C,getPopupContainer:w,popupClassName:N,dropdownClassName:Z,listHeight:S=256,placement:P,listItemHeight:O=24,size:I,disabled:E,notFoundContent:$,status:T,builtinPlacements:F,dropdownMatchSelectWidth:R,popupMatchSelectWidth:V,direction:L,style:B,allowClear:M}=e,D=j(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:W,getPrefixCls:A,renderEmpty:z,direction:X,virtual:G,popupMatchSelectWidth:H,popupOverflow:U,select:q}=l.useContext(d.E_),J=A("select",i),K=A(),Y=null!=L?L:X,{compactSize:Q,compactItemClassnames:ee}=(0,v.ri)(J,Y),[te,ne]=(0,x.Z)(J),ie=l.useMemo((()=>{const{mode:e}=D;if("combobox"!==e)return e===y?"combobox":e}),[D.mode]),ae="multiple"===ie||"tags"===ie,re=(0,_.Z)(D.suffixIcon,D.showArrow),se=null!==(n=null!=V?V:R)&&void 0!==n?n:H,{status:le,hasFeedback:oe,isFormItemInput:ce,feedbackIcon:ue}=l.useContext(m.aM),de=(0,u.F)(le,T);let pe;pe=void 0!==$?$:"combobox"===ie?null:(null==z?void 0:z("Select"))||l.createElement(h.Z,{componentName:"Select"});const{suffixIcon:he,itemIcon:fe,removeIcon:me,clearIcon:ve}=(0,b.Z)(Object.assign(Object.assign({},D),{multiple:ae,hasFeedback:oe,feedbackIcon:ue,showSuffixIcon:re,prefixCls:J,showArrow:D.showArrow,componentName:"Select"})),xe=!0===M?{clearIcon:ve}:M,ge=(0,s.Z)(D,["suffixIcon","itemIcon"]),_e=a()(N||Z,{[`${J}-dropdown-${Y}`]:"rtl"===Y},C,ne),be=(0,f.Z)((e=>{var t;return null!==(t=null!=I?I:Q)&&void 0!==t?t:e})),je=l.useContext(p.Z),ye=null!=E?E:je,ke=a()({[`${J}-lg`]:"large"===be,[`${J}-sm`]:"small"===be,[`${J}-rtl`]:"rtl"===Y,[`${J}-borderless`]:!o,[`${J}-in-form-item`]:ce},(0,u.Z)(J,de,oe),ee,null==q?void 0:q.className,k,C,ne),Ce=l.useMemo((()=>void 0!==P?P:"rtl"===Y?"bottomRight":"bottomLeft"),[P,Y]),we=(0,g.Z)(F,U);return te(l.createElement(r.ZP,Object.assign({ref:t,virtual:G,showSearch:null==q?void 0:q.showSearch},ge,{style:Object.assign(Object.assign({},null==q?void 0:q.style),B),dropdownMatchSelectWidth:se,builtinPlacements:we,transitionName:(0,c.m)(K,"slide-up",D.transitionName),listHeight:S,listItemHeight:O,mode:ie,prefixCls:J,placement:Ce,direction:Y,suffixIcon:he,menuItemSelectedIcon:fe,removeIcon:me,allowClear:xe,notFoundContent:pe,className:ke,getPopupContainer:w||W,dropdownClassName:_e,disabled:ye})))};const C=l.forwardRef(k),w=(0,o.Z)(C);C.SECRET_COMBOBOX_MODE_DO_NOT_USE=y,C.Option=r.Wx,C.OptGroup=r.Xo,C._InternalPanelDoNotUseOrYouWillBeFired=w,t.default=C},81327:function(e,t,n){n.d(t,{Z:function(){return g}});var i=n(59301),a=n(92310),r=n.n(a),s=n(29541),l=n(36355),o=n(33234);const c=i.createContext({latestIndex:0}),u=c.Provider;var d=e=>{let{className:t,index:n,children:a,split:r,style:s}=e;const{latestIndex:l}=i.useContext(c);return null==a?null:i.createElement(i.Fragment,null,i.createElement("div",{className:t,style:s},a),n<l&&r&&i.createElement("span",{className:`${t}-split`},r))},p=n(2856);function h(e){return["small","middle","large"].includes(e)}function f(e){return!!e&&("number"==typeof e&&!Number.isNaN(e))}var m=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n};const v=i.forwardRef(((e,t)=>{var n,a;const{getPrefixCls:o,space:c,direction:v}=i.useContext(l.E_),{size:x=(null==c?void 0:c.size)||"small",align:g,className:_,rootClassName:b,children:j,direction:y="horizontal",prefixCls:k,split:C,style:w,wrap:N=!1,classNames:Z,styles:S}=e,P=m(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[O,I]=Array.isArray(x)?x:[x,x],E=h(I),$=h(O),T=f(I),F=f(O),R=(0,s.Z)(j,{keepEmpty:!0}),V=void 0===g&&"horizontal"===y?"center":g,L=o("space",k),[B,M]=(0,p.Z)(L),D=r()(L,null==c?void 0:c.className,M,`${L}-${y}`,{[`${L}-rtl`]:"rtl"===v,[`${L}-align-${V}`]:V,[`${L}-gap-row-${I}`]:E,[`${L}-gap-col-${O}`]:$},_,b),W=r()(`${L}-item`,null!==(n=null==Z?void 0:Z.item)&&void 0!==n?n:null===(a=null==c?void 0:c.classNames)||void 0===a?void 0:a.item);let A=0;const z=R.map(((e,t)=>{var n,a;null!=e&&(A=t);const r=e&&e.key||`${W}-${t}`;return i.createElement(d,{className:W,key:r,index:t,split:C,style:null!==(n=null==S?void 0:S.item)&&void 0!==n?n:null===(a=null==c?void 0:c.styles)||void 0===a?void 0:a.item},e)})),X=i.useMemo((()=>({latestIndex:A})),[A]);if(0===R.length)return null;const G={};return N&&(G.flexWrap="wrap"),!$&&F&&(G.columnGap=O),!E&&T&&(G.rowGap=I),B(i.createElement("div",Object.assign({ref:t,className:D,style:Object.assign(Object.assign(Object.assign({},G),null==c?void 0:c.style),w)},P),i.createElement(u,{value:X},z)))}));const x=v;x.Compact=o.ZP;var g=x},8378:function(e,t){t.Z=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}})},31561:function(e,t,n){n.d(t,{Z:function(){return y}});var i=n(1565),a=n(22386),r=n(88703),s=n(52167),l=n(35593),o=n(92310),c=n.n(o),u=n(85510),d=n(59301),p=n(7800),h=n(84462),f=p.Z.ESC,m=p.Z.TAB;var v=(0,d.forwardRef)((function(e,t){var n=e.overlay,i=e.arrow,a=e.prefixCls,r=(0,d.useMemo)((function(){return"function"==typeof n?n():n}),[n]),s=(0,u.sQ)(t,null==r?void 0:r.ref);return d.createElement(d.Fragment,null,i&&d.createElement("div",{className:"".concat(a,"-arrow")}),d.cloneElement(r,{ref:(0,u.Yr)(r)?s:void 0}))})),x={adjustX:1,adjustY:1},g=[0,0],_={topLeft:{points:["bl","tl"],overflow:x,offset:[0,-4],targetOffset:g},top:{points:["bc","tc"],overflow:x,offset:[0,-4],targetOffset:g},topRight:{points:["br","tr"],overflow:x,offset:[0,-4],targetOffset:g},bottomLeft:{points:["tl","bl"],overflow:x,offset:[0,4],targetOffset:g},bottom:{points:["tc","bc"],overflow:x,offset:[0,4],targetOffset:g},bottomRight:{points:["tr","br"],overflow:x,offset:[0,4],targetOffset:g}},b=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function j(e,t){var n,o=e.arrow,p=void 0!==o&&o,x=e.prefixCls,g=void 0===x?"rc-dropdown":x,j=e.transitionName,y=e.animation,k=e.align,C=e.placement,w=void 0===C?"bottomLeft":C,N=e.placements,Z=void 0===N?_:N,S=e.getPopupContainer,P=e.showAction,O=e.hideAction,I=e.overlayClassName,E=e.overlayStyle,$=e.visible,T=e.trigger,F=void 0===T?["hover"]:T,R=e.autoFocus,V=e.overlay,L=e.children,B=e.onVisibleChange,M=(0,s.Z)(e,b),D=d.useState(),W=(0,r.Z)(D,2),A=W[0],z=W[1],X="visible"in e?$:A,G=d.useRef(null),H=d.useRef(null),U=d.useRef(null);d.useImperativeHandle(t,(function(){return G.current}));var q=function(e){z(e),null==B||B(e)};!function(e){var t=e.visible,n=e.triggerRef,i=e.onVisibleChange,a=e.autoFocus,r=e.overlayRef,s=d.useRef(!1),l=function(){var e,a;t&&(null===(e=n.current)||void 0===e||null===(a=e.focus)||void 0===a||a.call(e),null==i||i(!1))},o=function(){var e;return!(null===(e=r.current)||void 0===e||!e.focus||(r.current.focus(),s.current=!0,0))},c=function(e){switch(e.keyCode){case f:l();break;case m:var t=!1;s.current||(t=o()),t?e.preventDefault():l()}};d.useEffect((function(){return t?(window.addEventListener("keydown",c),a&&(0,h.Z)(o,3),function(){window.removeEventListener("keydown",c),s.current=!1}):function(){s.current=!1}}),[t])}({visible:X,triggerRef:U,onVisibleChange:q,autoFocus:R,overlayRef:H});var J,K,Y,Q=function(){return d.createElement(v,{ref:H,overlay:V,prefixCls:g,arrow:p})},ee=d.cloneElement(L,{className:c()(null===(n=L.props)||void 0===n?void 0:n.className,X&&(J=e.openClassName,void 0!==J?J:"".concat(g,"-open"))),ref:(0,u.Yr)(L)?(0,u.sQ)(U,L.ref):void 0}),te=O;return te||-1===F.indexOf("contextMenu")||(te=["click"]),d.createElement(l.Z,(0,i.Z)({builtinPlacements:Z},M,{prefixCls:g,ref:G,popupClassName:c()(I,(0,a.Z)({},"".concat(g,"-show-arrow"),p)),popupStyle:E,action:F,showAction:P,hideAction:te,popupPlacement:w,popupAlign:k,popupTransitionName:j,popupAnimation:y,popupVisible:X,stretch:(K=e.minOverlayWidthMatchTrigger,Y=e.alignPoint,("minOverlayWidthMatchTrigger"in e?K:!Y)?"minWidth":""),popup:"function"==typeof V?Q:Q(),onPopupVisibleChange:q,onPopupClick:function(t){var n=e.onOverlayClick;z(!1),n&&n(t)},getPopupContainer:S}),ee)}var y=d.forwardRef(j)},1012:function(e,t,n){n.d(t,{Z:function(){return d}});var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),a=new Uint8Array(16);function r(){if(!i)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(a)}var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var l=function(e){return"string"==typeof e&&s.test(e)},o=[],c=0;c<256;++c)o.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase();if(!l(n))throw TypeError("Stringified UUID is invalid");return n};var d=function(e,t,n){var i=(e=e||{}).random||(e.rng||r)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=i[a];return t}return u(i)}}}]);