|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[93260,4977,80416,88314],{51811:function(e,n,t){function i(e){var n=!0;if(e.length>0){for(var t=0;t<e.length;t++)if(0==e[t].compile_success||!e[t].compile_success){n=!1;break}}else n=!1;return n}function s(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i<e.length;i++){var s=e[i],l=n?"".concat(n,"/").concat(s.name):"".concat(s.name);t.push({title:s.name,isLeaf:"tree"!==s.type,key:l})}return t}function l(e,n,t){for(var i=0;i<e.length;i++){var s=e[i];if(s.key===n){s.children=t;break}s.children&&l(s.children,n,t)}return e}function a(e,n,t){var i;return function(){var s=this,l=arguments,a=function(){i=null,t||e.apply(s,l)},r=t&&!i;clearTimeout(i),i=setTimeout(a,n),r&&e.apply(s,l)}}t.d(n,{Ax:function(){return l},Ds:function(){return a},KI:function(){return r},SI:function(){return s},f1:function(){return i}});var r=t(67871).Z.API_SERVER},97598:function(e,n,t){t.d(n,{Z:function(){return v}});var i=t(26801),s=t.n(i),l=t(10574),a=t.n(l),r=t(39343),c=t.n(r),o=t(11006),u=t.n(o),d=t(27161),p=t.n(d),m=t(3113),h=t(59301),f=t(37712),x=["children"],v=function(e){var n=e.children,t=p()(e,x),i=(0,h.useState)(!1),l=u()(i,2),r=l[0],o=l[1];return(0,f.jsx)(m.ZP,s()(s()({},t),{},{loading:r,onClick:function(){var e=c()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o(!0),e.next=4,t.onClick(n);case 4:o(!1),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),o(!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),children:n}))}},72864:function(e,n,t){t.d(n,{Z:function(){return a}});t(59301);var i="digitalLabel___tImKs",s="active___Ck70Q",l=t(37712),a=function(e){var n=e.number,t=e.active,a=e.className;return(0,l.jsx)("div",{className:"".concat(i," ").concat(t?s:""," ").concat(a),children:n})}},57732:function(e,n,t){var i=t(26801),s=t.n(i),l=(t(59301),t(93314)),a=t(3113),r=t(37712);n.Z=function(e){var n=e.img,t=e.buttonProps,i=void 0===t?{}:t,c=e.styles,o=void 0===c?{}:c,u=e.customText,d=e.ButtonText,p=e.ButtonClick,m=e.Buttonclass,h=e.ButtonTwo,f=e.imgStyles,x=e.loading,v=void 0!==x&&x;return(0,r.jsxs)("section",{className:"tc animated fadeIn",style:s()(s()({},{color:"#999",margin:"100px auto",visibility:v?"hidden":"visible"}),o),children:[(0,r.jsx)("img",{src:n||l,style:s()({},f)}),(0,r.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,r.jsx)(a.ZP,s()(s()({className:m,onClick:p},i),{},{children:d})),h&&h]})}},78075:function(e,n,t){t.d(n,{Z:function(){return b}});var i=t(26801),s=t.n(i),l=t(10574),a=t.n(l),r=t(39343),c=t.n(r),o=t(11006),u=t.n(o),d=t(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},m=t(3113),h=t(98915),f=t(55989),x=t(6848),v=t(85578),g=t(86018),j=t(57732),_=t(67871),y=t(37712),b=function(e){var n,t,i,l,r,o,b,w=e.editOffice,k=void 0===w?"view":w,Z=e.data,N=(e.theme,e.type),C=e.filename,I=e.monacoEditor,P=e.className,A=e.style,E=e.close,S=e.onClose,q=e.hasMask,T=e.disabledDownload,F=e.onImgDimensions,B=e.showNodata,D=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),M=u()(D,2),L=(M[0],M[1],(0,d.useState)("")),R=u()(L,2),O=(R[0],R[1]),z=(0,d.useState)(),V=u()(z,2),U=V[0],H=V[1],W="build"===window.ENV?"/react/build":"",K=location.host.startsWith("localhost")?_.Z.PROXY_SERVER:_.Z.API_SERVER;console.log("disabledDownload---",T);var Y=(0,d.useRef)();null!==(n=Z)&&void 0!==n&&n.startsWith("/api")&&"txt"!==N&&(Z=_.Z.API_SERVER+Z),C&&(I.filename=C),(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]&&O(n[1])}))}),[]),(0,d.useEffect)((function(){"office"===N&&G()}),[N,Z]);var G=function(){var e=c()(a()().mark((function e(){var n,t,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",Z),n=Z,Z.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=6,(0,g.gJ)({attachment_id:t});case 6:i=e.sent,H(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=function(){Z.startsWith("http")||Z.startsWith("blob:")?Q():(0,v.Sv)(C||"educoder",Z,C)},Q=function(){(0,v.Nd)(C||"educoder",decodeURIComponent(Z))};return console.log(Z,"data"),(0,y.jsxs)("div",{style:s()({},A||{}),className:"".concat(q&&p.bgBlack," ").concat(N?p.wrp:"hide"),children:[E&&(0,y.jsxs)("div",{className:p.close,ref:Y,children:[!!F&&(0,y.jsx)(x.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return Y.current},children:(0,y.jsx)("span",{onClick:function(){S(),F()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!T&&(0,y.jsx)(x.Z,{title:"点击下载此文件",getPopupContainer:function(){return Y.current},children:(0,y.jsx)("span",{onClick:Q,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(x.Z,{title:"关闭",getPopupContainer:function(){return Y.current},children:(0,y.jsx)("span",{className:"",onClick:S,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)(f.ZP,s()({},I))}),"audio"===N&&(0,y.jsx)("audio",{src:(null===(t=Z)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(i=Z)&&void 0!==i&&i.startsWith("/api")?Z:"data:image/png;base64,".concat(Z),autoPlay:!0}),"video"===N&&(0,y.jsx)(y.Fragment,{children:(null===(l=Z)||void 0===l?void 0:l.indexOf("http"))>-1||null!==(r=Z)&&void 0!==r&&r.startsWith("/api")?(0,y.jsx)("video",{controls:!0,src:"".concat(Z),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(Z),autoPlay:!0})}),"office"===N&&U&&(0,y.jsx)("iframe",{src:"".concat(W,"/office.html?key=").concat(U.key,"&url=").concat(K+U.url,"&callbackUrl=").concat(K+U.callbackUrl,"&fileType=").concat(U.fileType,"&title=").concat(U.title,"&model=").concat(k,"&officeServer=").concat(_.Z.ONLYOFFICE,"&disabledDownload=").concat(!!T)}),"html"===N&&(0,y.jsx)("iframe",{src:Z+"&disposition=inline"}),"pdf"===N&&(0,y.jsx)("iframe",{src:"".concat(W,"/js/pdfview/index.html?url=").concat(Z,"&disabledDownload=").concat(!!T)}),"image"===N&&(0,y.jsx)("img",{src:(null===(o=Z)||void 0===o?void 0:o.indexOf("http"))>-1||null!==(b=Z)&&void 0!==b&&b.startsWith("/api")?Z:"data:image/png;base64,".concat(Z)}),("other"===N||"download"===N)&&(0,y.jsx)(y.Fragment,{children:B?(0,y.jsx)(j.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(m.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:J,children:"下载"})}):(0,y.jsxs)(m.ZP,{type:"primary",size:"middle",onClick:J,children:[(0,y.jsx)(h.Z,{}),"点击下载"]})})]})}},29918:function(e,n,t){t.d(n,{t:function(){return S}});var i=t(27161),s=t.n(i),l=t(98190),a=t.n(l),r=t(22060),c=t.n(r),o=t(26801),u=t.n(o),d=t(11006),p=t.n(d),m=t(59301),h=t(1056),f=t(78673),x=t(78241),v=t(95237),g=t(43604),j=t(85731),_=t(57809),y=t(68006),b=t(22211),w=t(34566),k=t(59718),Z=t(37712),N=["key","name"],C=h.Z.TextArea,I=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}],P=function(e){var n=e.value,t=e.onChange;return(0,Z.jsx)(f.Z,{checked:n,onChange:function(e){t(e)}})},A="@▁@",E="@▁▁@",S=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.scoreByBlank,l=void 0!==i&&i,r=e.hackidentifier,o=e.answerKey,d=(0,m.useState)(!1),f=p()(d,2),S=f[0],q=f[1],T=(0,m.useState)(!1),F=p()(T,2),B=(F[0],F[1],(0,b.useParams)().type,function(e,n){for(var t=n.line,i=0,s=0;s<t;s++)i+=e.getLine(s).split(A).length-1;for(var l=0;l<t;l++)i+=e.getLine(l).split(E).length-1;var a=e.getLine(t).substring(0,n.ch);return i+=a.split(A).length-1,i+=a.split(E).length-1}),D=function(){var e=t.getFieldValue(o);t.setFieldsValue(c()({},o,e.map((function(e,n){return u()(u()({},e),{},{position:n+1})}))))},M=(0,m.useRef)(),L=function(e,n){for(var t=0;t<e;t++)M.current({position:null,answer_text:""},n+t);D()},R=(0,m.useRef)(),O=function(e){R.current(e),D()},z=x.Z.useWatch(o,t);return(0,Z.jsxs)("div",{className:w.Z.wrap,children:[(0,Z.jsx)(x.Z.Item,{label:"试题描述",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}],children:(0,Z.jsx)(y.h,{scrollId:"name",watch:!0,height:140})}),(0,Z.jsx)("div",{className:w.Z.questionTitleEditorWrap,children:(0,Z.jsx)(x.Z.Item,{label:"程序代码",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}],children:(0,Z.jsx)(y.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:function(e,n){var i=t.getFieldValue(o);console.log("--preAnswerData",i,n),t.setFieldsValue(c()({},o,null==i?void 0:i.map((function(e,t){var i;return u()(u()({},e),{},{position:t+1,multi_line:null==n||null===(i=n[t])||void 0===i?void 0:i.multiLine})}))))},placeholder:n,onCMBeforeChange:function(e,n){!function(e,n,t,i){var s=e.getRange(n.from,n.to),l=0;if(n.text.forEach((function(e){l+=e.split(A).length-1})),n.text.forEach((function(e){l+=e.split(E).length-1})),"setValue"!==n.origin)if(!s||-1===s.indexOf(A)&&-1===s.indexOf(E)){if(l>0){var a=B(e,n.from);console.log("新增".concat(l,"个,之前有").concat(a,"个")),t(l,a)}}else{var r=s.split(A).length-1+s.split(E).length-1,c=B(e,n.from);console.log("删除".concat(r,"个, 前面有").concat(c,"个,新增").concat(l,"个")),i(r>1?Array.from({length:r},(function(e,n){return c+n})):c)}}(e,n,L,O)}})})}),(0,Z.jsx)(x.Z.List,{name:o,rules:[{validator:function(e,n){if(0===(null==n?void 0:n.length))return Promise.reject(new Error("答案不能为空"));var t,i=a()(n);try{for(i.s();!(t=i.n()).done;){var s=(t.value||{}).answer_text;if(0===(null==s?void 0:s.length))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,n,t){var i=n.add,a=n.remove;t.errors;return M.current=i,R.current=a,(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(x.Z.Item,{label:"填空项答案",required:!0,labelCol:{span:24}}),e.map((function(e,n){var t,i,a=e.key,r=e.name,c=s()(e,N);return(0,Z.jsxs)(v.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,Z.jsxs)(g.Z,{flex:"0 0 auto",className:"".concat(w.Z.blankIndex),children:["填空项",n+1]}),(0,Z.jsx)(g.Z,{flex:1,children:(0,Z.jsxs)(v.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,Z.jsx)(g.Z,{children:(0,Z.jsx)(x.Z.Item,u()(u()({},c),{},{name:[r,"answer_text"],noStyle:!0,children:null!=z&&null!==(t=z[r])&&void 0!==t&&t.multi_line||null!=z&&null!==(i=z[r])&&void 0!==i&&i.multiLine?(0,Z.jsx)(C,{spellCheck:!1,style:{marginLeft:10,width:550}}):(0,Z.jsx)(h.Z,{style:{marginLeft:10,width:550},className:w.Z.blankInput,size:"large",maxLength:1e3,onBlur:function(e){}})}))}),l&&(0,Z.jsx)(g.Z,{flex:"224px",children:(0,Z.jsx)(x.Z.Item,u()(u()({},c),{},{name:[r,"score"],label:"分值",rules:[{required:!0}],children:(0,Z.jsx)(j.Z,{size:"large",className:w.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"按空给分请输入分值"})}))})]})})]},a)}))]})}}),(0,Z.jsx)("div",{onClick:function(){return q(!0)},children:(0,Z.jsx)(x.Z.Item,{name:["hack","analysis"],label:"题目解析",labelCol:{span:24},children:(0,Z.jsx)(y.x,{placeholder:"请编辑题目解析(非必填)",isEdit:S})})}),(0,Z.jsx)(x.Z.Item,{label:"编程语言",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"请选择编程语言"}],children:(0,Z.jsx)(_.default,{size:"large",children:I.map((function(e){return(0,Z.jsxs)(_.default.Option,{value:e.key,children:[" ",e.title]},e.title)}))})}),(0,Z.jsxs)(x.Z.Item,{label:"最大评测时长(秒)",style:{marginTop:30},labelCol:{span:24},required:!0,children:[(0,Z.jsx)(x.Z.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"请输入单个测试集评测时长限制"},{type:"number",min:3,message:"最小限制时间是3秒"}],noStyle:!0,children:(0,Z.jsx)(j.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})}),(0,Z.jsx)("span",{className:"ml10 font14",children:"秒"})]}),(0,Z.jsxs)(v.Z,{align:"middle",style:{marginTop:30},children:[(0,Z.jsx)(x.Z.Item,{name:["hack","allow_student_debug"],children:(0,Z.jsx)(P,{})}),(0,Z.jsx)(g.Z,{className:"ml10",children:"允许学生答题时进行代码调试"})]}),(0,Z.jsx)(x.Z.Item,{label:"测试用例",required:!0}),(0,Z.jsxs)("div",{style:{background:"#F6F7F9",padding:15},children:[(0,Z.jsx)(x.Z.Item,{label:"输入",labelCol:{span:24},name:["hack_sets","input"],children:(0,Z.jsx)(C,{rows:4})}),(0,Z.jsx)(x.Z.Item,{label:"输出",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"请输入输出内容"}],children:(0,Z.jsx)(C,{rows:4})})]}),(0,Z.jsx)(k.Z,{answerKey:o,hackidentifier:r,ButtonText:"自测运行",ButtonProps:{ghost:!0,icon:(0,Z.jsx)("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}},form:t})]})}},59718:function(e,n,t){var i=t(26801),s=t.n(i),l=t(10574),a=t.n(l),r=t(39343),c=t.n(r),o=t(11006),u=t.n(o),d=t(22211),p=t(59301),m=t(8591),h=t(3113),f=t(43418),x=t(24334),v=t(15830),g=t(43272),j=t(22983),_=t(9498),y=t.n(_),b=t(37712);n.Z=function(e){var n=e.ButtonProps,t=e.ButtonText,i=e.form,l=e.answerKey,r=e.hackidentifier,o=void 0===r?"":r,_=e.items,w=void 0===_?{}:_,k=(0,p.useState)(!1),Z=u()(k,2),N=Z[0],C=Z[1],I=(0,p.useState)(""),P=u()(I,2),A=P[0],E=P[1],S=(0,d.useParams)(),q=(0,p.useState)({}),T=u()(q,2),F=T[0],B=T[1],D="edit"===S.type;window.location.href.includes("problemset");function M(e,n){return L.apply(this,arguments)}function L(){return(L=c()(a()().mark((function e(n,t){var s,r,c,o,u;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.getFieldValue("hack_codes"),c=i.getFieldValue(l),r.code){e.next=5;break}return m.ZP.info("程序代码不能为空!"),e.abrupt("return");case 5:if(r.language){e.next=8;break}return m.ZP.info("编程语言不能为空!"),e.abrupt("return");case 8:if(!(c.length>0&&(null===(s=c.filter((function(e){return!e.answer_text})))||void 0===s?void 0:s.length)>0)){e.next=11;break}return m.ZP.info("填空项不能为空!"),e.abrupt("return");case 11:return o=r.code,c.length>0&&(null==c||c.map((function(e){o=e.multi_line?o.substring(0,o.indexOf("@▁▁@"))+e.answer_text+o.substring(o.indexOf("@▁▁@")+4):o.substring(0,o.indexOf("@▁@"))+e.answer_text+o.substring(o.indexOf("@▁@")+3)}))),e.next=15,(0,g.n4)(t,n||{code:x.Base64.encode(o),language:r.language});case 15:return u=e.sent,e.abrupt("return",u);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e,n){return O.apply(this,arguments)}function O(){return(O=c()(a()().mark((function e(n,t){var i,s,l,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=w.userAnswer,l=x.Base64.decode(w.code),!(s.length>0&&(null===(i=s.filter((function(e){return!e.value})))||void 0===i?void 0:i.length)>0)){e.next=6;break}return m.ZP.info("填空项不能为空!"),e.abrupt("return");case 6:return s.length>0&&(null==s||s.map((function(e){l=e.multi_line?l.substring(0,l.indexOf("@▁▁@"))+e.value+l.substring(l.indexOf("@▁▁@")+4):l.substring(0,l.indexOf("@▁@"))+e.value+l.substring(l.indexOf("@▁@")+3)}))),e.next=9,(0,g.n4)(t,n||{code:x.Base64.encode(l),language:w.language});case 9:return r=e.sent,e.abrupt("return",r);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(){return(new Date).getTime()}return(0,p.useEffect)((function(){(D||o)&&E(o||S.id)}),[S]),(0,p.useEffect)((function(){return function(){sessionStorage.removeItem("projectFill")}}),[]),(0,b.jsxs)("div",{children:[(0,b.jsx)(h.ZP,s()(s()({loading:N},n),{},{onClick:c()(a()().mark((function e(){var n,l,r,o,u,d,p,h,j,_,y,b,w,k;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("运行调试"!==t){e.next=20;break}if(C(!0),!N){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,(0,v.ZP)("/api/problems/".concat(A,"/start.json"),{method:"get"});case 6:return n=e.sent,e.next=9,R(null,null==n?void 0:n.identifier);case 9:if(0!==(null==(l=e.sent)?void 0:l.status)){e.next=18;break}return r=function(){var e=c()(a()().mark((function e(){var t,i,s,l,c;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.rX)(null==n?void 0:n.identifier,"submit");case 2:if(t=e.sent,i=t.status,t.message,s=t.data,l=z(),c=l-o>6e3,0===i||c||setTimeout(r,1e3),!c){e.next=13;break}return f.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"}),C(!1),e.abrupt("return");case 13:0===i&&(C(!1),B(s),2===s.status&&(C(!1),f.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"})));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),o=z(),e.next=15,(0,g.bM)(null==n?void 0:n.identifier,{});case 15:r(),e.next=19;break;case 18:C(!1);case 19:return e.abrupt("return");case 20:return u=!0,e.next=23,i.validateFields().then((function(){u=!1}),(function(e){var n,t;e.errorFields[0].name.includes("standard_answers")?m.ZP.error("填空项答案不能为空"):m.ZP.error(e.errorFields[0].errors[0]),0===(null===(n=e.errorFields)||void 0===n?void 0:n.length)&&(u=!1),i.scrollToField(null==e||null===(t=e.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"}),u=!0}));case 23:if(!u){e.next=25;break}return e.abrupt("return");case 25:if(C(!0),!N){e.next=28;break}return e.abrupt("return");case 28:if(d="",p=i.getFieldsValue(),A){e.next=39;break}return e.next=33,(0,v.ZP)("/api/problems.json",{method:"post",body:s()(s()({},p),{},{hack:s()(s()({},null==p?void 0:p.hack),{},{sub_discipline_id:null==p||null===(h=p.hack)||void 0===h||null===(h=h.sub_discipline_id)||void 0===h?void 0:h[1],difficult:p.difficulty,item_banks_group_id:p.item_banks_group_id}),hack_codes:s()(s()({},p.hack_codes),{},{code:x.Base64.encode(p.hack_codes.code)}),hack_sets:[s()({},p.hack_sets)],is_blank:!0})});case 33:d=e.sent,A=null===(j=d)||void 0===j?void 0:j.identifier,sessionStorage.projectFill=A,E(A),e.next=42;break;case 39:return e.next=41,(0,v.ZP)("/api/problems/".concat(A,".json"),{method:"put",body:s()(s()({},p),{},{hack:s()(s()({},null==p?void 0:p.hack),{},{sub_discipline_id:null==p||null===(_=p.hack)||void 0===_||null===(_=_.sub_discipline_id)||void 0===_?void 0:_[1],difficult:p.difficulty,item_banks_group_id:p.item_banks_group_id}),hack_codes:s()(s()({},p.hack_codes),{},{code:x.Base64.encode(p.hack_codes.code)}),update_hack_sets:[s()({},p.hack_sets)],is_blank:!0})});case 41:d=e.sent;case 42:return e.next=44,(0,v.ZP)("/api/problems/".concat(A,"/start.json"),{method:"get"});case 44:return y=e.sent,e.next=47,M(null,null==y?void 0:y.identifier);case 47:if(0!==(null==(b=e.sent)?void 0:b.status)){e.next=56;break}return w=function(){var e=c()(a()().mark((function e(){var n,t,i,s,l;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.rX)(null==y?void 0:y.identifier,"submit");case 2:if(n=e.sent,t=n.status,n.message,i=n.data,s=z(),l=s-k>1e3*(p.hack.time_limit+3),0===t||l||setTimeout(w,1e3),!l){e.next=13;break}return f.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"}),C(!1),e.abrupt("return");case 13:0===t&&(C(!1),B(i),2===i.status&&(C(!1),f.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"})));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=z(),e.next=53,(0,g.bM)(null==y?void 0:y.identifier,{});case 53:w(),e.next=57;break;case 56:C(!1);case 57:case"end":return e.stop()}}),e)}))),children:t})),(null==F?void 0:F.id)&&2!==F.status&&(0,b.jsx)(f.Z,{open:(null==F?void 0:F.id)&&2!==F.status,title:"运行结果",width:1100,footer:!1,onOk:function(){B({})},onCancel:function(){B({})},children:(0,b.jsxs)("div",{style:{maxHeight:600,overflow:"auto",marginBottom:15},children:[(0,b.jsxs)("div",{style:{marginBottom:20,display:"flex",justifyContent:"space-between",fontSize:14},children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"状态"}),(0,b.jsx)("span",{style:{marginLeft:12,color:0!==F.status&&"#E30000"},children:j.Im[F.status]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"提交时间"}),(0,b.jsx)("span",{style:{marginLeft:12},children:y()(F.created_at).format("YYYY-MM-DD HH:mm:ss")})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"语言"}),(0,b.jsx)("span",{style:{marginLeft:12},children:F.language})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"执行用时"}),(0,b.jsxs)("span",{style:{marginLeft:12},children:[F.execute_time,"ms"]})]})]}),(0,b.jsx)(j.Y4,s()({},F))]})})]})}},62182:function(e,n,t){t.d(n,{u:function(){return k}});var i=t(27161),s=t.n(i),l=t(11006),a=t.n(l),r=t(22060),c=t.n(r),o=t(26801),u=t.n(o),d=t(59301),p=t(95237),m=t(43604),h=t(6848),f=t(78241),x=t(34566),v=t(71029),g=t(87306),j=t(68006),_=t(37712),y=["key","name"],b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],w=function(e){var n=e.value,t=e.onChange,i=e.choiceTextKey,s=e.answerKey,l=e.index,a=e.isEdit,r=e.setInputActive,o=e.form,d=e.choiceOptionsPath,f=e.allowChangeMode,y=e.showAddIcon,w=e.addItem,k=e.deleteItem,Z=1===(null==n?void 0:n[s]),N=function(){var e;Z?t(u()(u()({},n),{},c()({},s,0))):(f||(e=o.getFieldValue(d),o.setFieldValue(d,e.map((function(e){return u()(u()({},e),{},c()({},s,0))})))),t(u()(u()({},n),{},c()({},s,1))))};return(0,_.jsxs)(p.Z,{className:x.Z.choiceWrap,align:"middle",wrap:!1,children:[(0,_.jsx)(m.Z,{onClick:N,className:"".concat(x.Z.choiceIndex," ").concat(Z?x.Z.activeAnswer:""),children:b[l]}),(0,_.jsx)(m.Z,{flex:1,className:"".concat(x.Z.editorWrap," ml15"),onClick:r,children:(0,_.jsx)(j.x,{height:155,placeholder:"请您输入选项",isEdit:a,value:null==n?void 0:n[i],onChange:function(e){t(u()(u()({},n),{},c()({},i,e)))}})}),(0,_.jsx)(m.Z,{flex:"0 0 auto",className:"ml15",children:(0,_.jsx)("div",{onClick:N,className:"".concat(x.Z.setAnswerBtn," ").concat(Z?x.Z.activeAnswer:""),children:Z?"正确答案":"设为答案"})}),(0,_.jsxs)(m.Z,{className:x.Z.actionWrapper,children:[(0,_.jsx)(h.Z,{title:"新增参考答案",children:(0,_.jsx)(v.Z,{className:x.Z.addIcon,onClick:w,style:{visibility:y?"visible":"hidden"}})}),(0,_.jsx)(h.Z,{title:"删除",children:(0,_.jsx)(g.Z,{className:x.Z.deleteIcon,onClick:k,style:{visibility:l>1?"visible":"hidden"}})})]})]})},k=function(e){var n=e.questionTitlePlaceholder,t=e.titleKey,i=e.choiceKey,l=e.analysisKey,r=e.choiceTextKey,o=e.answerKey,p=e.choiceOptionsPath,m=e.allowChangeMode,h=void 0===m||m,v=e.form,g=e.showAnalysis,k=void 0===g||g,Z=(0,d.useState)(),N=a()(Z,2),C=N[0],I=N[1],P=(0,d.useState)(!1),A=a()(P,2),E=A[0],S=A[1];return(0,_.jsxs)("div",{className:x.Z.wrap,children:[(0,_.jsx)("div",{className:x.Z.questionTitleEditorWrap,children:(0,_.jsx)(f.Z.Item,{label:"题干",name:t,labelCol:{span:24},rules:[{required:!0}],children:(0,_.jsx)(j.h,{scrollId:Array.isArray(t)?t.join("_"):"".concat(t),watch:!0,height:140,placeholder:n})})}),(0,_.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),(0,_.jsx)(f.Z.List,{name:i,rules:[{validator:function(e,n){var t=n.some((function(e){return 1===e[o]})),i=n.findIndex((function(e){var n;return(null===(n=e[r])||void 0===n?void 0:n.length)<=0}));return-1!==i?Promise.reject(new Error("请先输入".concat(b[i],"选项的内容"))):t?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e,n){var t=n.add,i=n.remove;return(0,_.jsxs)("div",{id:Array.isArray(p)?p.join("_"):"".concat(p),children:[e.map((function(n,l){var a=n.key,m=n.name,x=s()(n,y),g=C===a,j=l<7&&l===e.length-1;return(0,d.createElement)(f.Z.Item,u()(u()({},x),{},{key:a,name:m,noStyle:!0}),(0,_.jsx)(w,{choiceTextKey:r,answerKey:o,index:l,isEdit:g,setInputActive:function(){I(a)},form:v,choiceOptionsPath:p,allowChangeMode:h,showAddIcon:j,addItem:function(){var e;return t((e={},c()(e,r,""),c()(e,o,0),e))},deleteItem:function(){return i(m)}}))})),e.length<8&&(0,_.jsx)("div",{className:"".concat(x.Z.addBtn," mb30"),onClick:function(){var e;return t((e={},c()(e,r,""),c()(e,o,0),e))},children:"添加选项"})]})}}),k&&(0,_.jsx)("div",{onClick:function(){return S(!0)},children:(0,_.jsx)(f.Z.Item,{name:l,label:"题目解析",labelCol:{span:24},children:(0,_.jsx)(j.x,{placeholder:"请编辑题目解析(非必填)",isEdit:E})})})]})}},14755:function(e,n,t){t.d(n,{r:function(){return j}});var i=t(26801),s=t.n(i),l=t(27161),a=t.n(l),r=(t(59301),t(74997)),c=t(78241),o=t(95237),u=t(85731),d=t(6848),p=t(34566),m=t(87306),h=t(68006),f=t(62182),x=t(37712),v=["key","name"],g=r.Z.Panel,j=function(e){var n=e.questionTitlePlaceholder,t=(e.choiceKey,e.form),i=e.withScore;return(0,x.jsxs)("div",{className:p.Z.wrap,children:[(0,x.jsx)("div",{className:p.Z.questionTitleEditorWrap,children:(0,x.jsx)(c.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,x.jsx)(h.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,x.jsx)(c.Z.Item,{label:"小题",required:!0,labelCol:{span:24}}),(0,x.jsx)(c.Z.List,{name:"sub_item_banks",rules:[{validator:function(e,n){return n?Promise.resolve():Promise.reject(new Error("请添加小题"))}}],children:function(e,n){var l=n.add,h=n.remove;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(r.Z,{className:e.length>0?p.Z.collapseWrapper:"",bordered:!1,expandIcon:function(e){var n=e.isActive;return(0,x.jsx)("i",{className:"iconfont icon-weizhankai ".concat(n?p.Z.open:p.Z.close),style:{fontSize:14,transition:"all .2s"}})},children:e.map((function(e,n){var l=e.key,r=e.name,j=a()(e,v);return(0,x.jsx)(g,{className:p.Z.panel,forceRender:!0,header:(0,x.jsxs)("div",{className:p.Z.panelHeader,children:["第",n+1,"小题",(0,x.jsx)("span",{children:"(单选题)"})]}),extra:(0,x.jsxs)(o.Z,{align:"middle",onClick:function(e){return e.stopPropagation()},children:[i&&(0,x.jsx)(c.Z.Item,s()(s()({},j),{},{rules:[{required:!0,message:"请输入小题分值"}],label:"分值",name:[r,"question_score"],className:p.Z.blankInputNumberWrapper,children:(0,x.jsx)(u.Z,{className:p.Z.blankInput,placeholder:"请输入当前小题分数",min:.1,precision:1,max:100,style:{width:150}})})),(0,x.jsx)(d.Z,{title:"删除",children:(0,x.jsx)(m.Z,{className:"".concat(p.Z.deleteIcon," ml40"),onClick:function(){return h(r)}})})]}),children:(0,x.jsx)(c.Z.Item,s()(s()({},j),{},{name:r,children:(0,x.jsx)(f.u,{questionTitlePlaceholder:"请编辑选择题题干内容",allowChangeMode:!1,form:t,choiceKey:[r,"choices"],titleKey:[r,"name"],analysisKey:[r,"analysis"],choiceOptionsPath:["sub_item_banks",r,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"})}))},l)}))}),e.length<20&&(0,x.jsx)("div",{className:"".concat(p.Z.addBtn),onClick:function(){return l({name:"",choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),analysis:""})},children:"添加小题"})]})}})]})}},98608:function(e,n,t){t.d(n,{u:function(){return S}});var i=t(27161),s=t.n(i),l=t(98190),a=t.n(l),r=t(22060),c=t.n(r),o=t(26801),u=t.n(o),d=t(11006),p=t.n(d),m=t(93923),h=t.n(m),f=t(59301),x=t(43418),v=t(95237),g=t(43604),j=t(1056),_=t(6848),y=t(78673),b=t(78241),w=t(85731),k=t(68006),Z=t(87306),N=t(34566),C=t(37712),I=["key","name"],P=function(e){var n=e.value,t=e.onChange;return(0,C.jsxs)(v.Z,{align:"middle",className:"ml20",gutter:[40,20],children:[null==n?void 0:n.map((function(e,i){return(0,C.jsxs)(g.Z,{className:N.Z.blankWrapper,children:[(0,C.jsx)(j.Z,{className:N.Z.blankInput,defaultValue:e,maxLength:1e3,onBlur:function(e){var s=h()(n),l=e.target.value.trim();s[i]=l,t(s)}}),(0,C.jsx)(_.Z,{title:"删除",children:(0,C.jsx)(Z.Z,{className:N.Z.deleteIcon,style:{marginLeft:15,visibility:i>0?"visible":"hidden"},onClick:function(){return function(e){x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:N.Z.modal,onOk:function(){var i=h()(n);i.splice(e,1),t(i)}})}(i)}})})]},"".concat(e,"_").concat(i))})),(0,C.jsx)(g.Z,{children:(0,C.jsx)("div",{className:"".concat(N.Z.addBtn),onClick:function(){var e;(e=h()(n)).push(""),t(e)},children:"新增答案"})})]})},A=function(e){var n=e.value,t=void 0===n||n,i=e.onChange;return(0,C.jsx)(y.Z,{checked:!t,onChange:function(e){i(!e)}})},E="▁",S=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.scoreByBlank,l=void 0!==i&&i,r=e.answerKey,o=(0,f.useState)(!1),d=p()(o,2),m=d[0],h=d[1],x=function(e,n){for(var t=n.line,i=0,s=0;s<t;s++)i+=e.getLine(s).split(E).length-1;return i+=e.getLine(t).substring(0,n.ch).split(E).length-1},_=function(){var e=t.getFieldValue(r);t.setFieldsValue(c()({},r,e.map((function(e,n){return u()(u()({},e),{},{position:n+1})}))))},y=(0,f.useRef)(),Z=function(e,n){for(var t=0;t<e;t++)y.current({position:null,answer_text:[""]},n+t);_()},S=(0,f.useRef)(),q=function(e){S.current(e),_()},T=b.Z.useWatch(r,t);return(0,C.jsxs)("div",{className:N.Z.wrap,children:[(0,C.jsx)("div",{className:N.Z.questionTitleEditorWrap,children:(0,C.jsx)(b.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,C.jsx)(k.h,{scrollId:"name",watch:!0,height:140,placeholder:n,showNullButton:!0,onCMBeforeChange:function(e,n){!function(e,n,t,i){var s=e.getRange(n.from,n.to),l=0;if(n.text.forEach((function(e){l+=e.split(E).length-1})),"setValue"!==n.origin)if(s&&-1!==s.indexOf(E)){var a=s.split(E).length-1,r=x(e,n.from);console.log("删除".concat(a,"个, 前面有").concat(r,"个,新增").concat(l,"个")),i(a>1?Array.from({length:a},(function(e,n){return r+n})):r)}else if(l>0){var c=x(e,n.from);console.log("新增".concat(l,"个,之前有").concat(c,"个")),t(l,c)}}(e,n,Z,q)}})})}),(0,C.jsx)(b.Z.List,{name:r,rules:[{validator:function(e,n){if(0===(null==n?void 0:n.length))return Promise.reject(new Error("答案不能为空"));var t,i=a()(n);try{for(i.s();!(t=i.n()).done;){var s=(t.value||{}).answer_text;if(null!=s&&s.some((function(e){return 0===(null==e?void 0:e.length)})))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,n,t){var i=n.add,a=n.remove;t.errors;return y.current=i,S.current=a,(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(b.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),e.map((function(e,n){var t=e.key,i=e.name,a=s()(e,I);return(0,C.jsxs)(v.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,C.jsxs)(g.Z,{flex:"0 0 auto",className:"".concat(N.Z.blankIndex),children:["填空项",n+1]}),(0,C.jsxs)(g.Z,{flex:1,children:[(0,C.jsxs)(v.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,C.jsx)(g.Z,{children:(0,C.jsx)(b.Z.Item,u()(u()({},a),{},{name:[i,"answer_text"],noStyle:!0,children:(0,C.jsx)(P,{})}))}),l&&(0,C.jsx)(g.Z,{flex:"224px",children:(0,C.jsx)(b.Z.Item,u()(u()({},a),{},{name:[i,"score"],label:"分值",rules:[{required:!0}],className:N.Z.blankInputNumberWrapper,children:(0,C.jsx)(w.Z,{className:N.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"按空给分请输入分值"})}))})]}),(0,C.jsx)(b.Z.Item,u()(u()({},a),{},{name:[i,"position"],noStyle:!0,children:(0,C.jsx)(j.Z,{type:"hidden"})}))]})]},t)}))]})}}),(null==T?void 0:T.length)>1&&(0,C.jsxs)(v.Z,{align:"middle",className:(null==T?void 0:T.length)>1?"mb30":"".concat(N.Z.hide),children:[(0,C.jsx)(b.Z.Item,{name:"is_ordered",children:(0,C.jsx)(A,{})}),(0,C.jsx)(g.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,C.jsx)("div",{onClick:function(){return h(!0)},children:(0,C.jsx)(b.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,C.jsx)(k.x,{placeholder:"请编辑题目解析(非必填)",isEdit:m})})})]})}},74215:function(e,n,t){t.d(n,{Z:function(){return b}});var i,s=t(27161),l=t.n(s),a=t(11006),r=t.n(a),c=t(26801),o=t.n(c),u=t(22060),d=t.n(u),p=t(59301),m=t(95237),h=t(43604),f=t(78241),x=t(34566),v=t(68006),g=t(37712),j=["key","name"],_=(i={},d()(i,"正确","T"),d()(i,"错误","F"),i),y=function(e){var n=e.value,t=e.onChange,i=e.form,s=1===(null==n?void 0:n.is_answer),l=null==n?void 0:n.choice_text,a=function(){var e=i.getFieldsValue().choices.map((function(e){return{choice_text:e.choice_text,is_answer:0}}));i.setFieldsValue({choices:e}),t(o()(o()({},n),{},{is_answer:1}))};return(0,g.jsxs)(m.Z,{className:x.Z.choiceWrap,align:"middle",wrap:!1,children:[(0,g.jsx)(h.Z,{onClick:a,className:"".concat(x.Z.choiceIndex," ").concat(x.Z.judgementIndex," ").concat(s?x.Z.activeAnswer:""),children:_[l]}),(0,g.jsx)(h.Z,{flex:1,className:"".concat(x.Z.editorWrap," ml15"),children:(0,g.jsx)("div",{className:"".concat(x.Z.inputBorder," ").concat(x.Z.placeholder," ").concat(s?x.Z.activeJudgementAnswer:""),children:l})}),(0,g.jsx)(h.Z,{flex:"0 0 auto",className:"ml15",children:(0,g.jsx)("div",{onClick:a,className:"".concat(x.Z.setAnswerBtn," ").concat(s?x.Z.activeAnswer:""),children:s?"正确答案":"设为答案"})})]})},b=function(e){var n=e.questionTitlePlaceholder,t=(e.choiceKey,e.form),i=(0,p.useState)(!1),s=r()(i,2),a=s[0],c=s[1];return(0,g.jsxs)("div",{className:x.Z.wrap,children:[(0,g.jsx)("div",{className:x.Z.questionTitleEditorWrap,children:(0,g.jsx)(f.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,g.jsx)(v.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,g.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,g.jsx)(f.Z.List,{name:"choices",rules:[{validator:function(e,n){return n.some((function(e){return 1===(null==e?void 0:e.is_answer)}))?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e){return(0,g.jsx)("div",{id:"choices",children:e.map((function(e){var n=e.key,i=e.name,s=l()(e,j);return(0,p.createElement)(f.Z.Item,o()(o()({},s),{},{key:n,name:i,noStyle:!0}),(0,g.jsx)(y,{form:t}))}))})}})}),(0,g.jsx)("div",{onClick:function(){return c(!0)},children:(0,g.jsx)(f.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,g.jsx)(v.x,{placeholder:"请编辑题目解析(非必填)",isEdit:a})})})]})}},68006:function(e,n,t){t.d(n,{h:function(){return p},x:function(){return m}});var i=t(26801),s=t.n(i),l=t(27161),a=t.n(l),r=t(22387),c=t(34566),o=(t(59301),t(80416)),u=t(37712),d=["value","onChange","scrollId"],p=function(e){var n=e.value,t=e.onChange,i=e.scrollId,l=a()(e,d);return(0,u.jsx)("div",{id:i||"",children:(0,u.jsx)(r.Z,s()(s()({},l),{},{hidetoolBar:!0,defaultValue:n,onChange:function(e,n){console.log("a:",e,n),null!=n&&n.length?t(e,n):t(e)}}))})},m=function(e){var n=e.value,t=e.onChange,i=e.placeholder,s=e.height,l=void 0===s?140:s;return e.isEdit?(0,u.jsx)(r.Z,{watch:!0,isFocus:!0,height:l,placeholder:i,defaultValue:n,onChange:t}):(0,u.jsx)("div",{style:{cursor:"pointer"},children:n?(0,u.jsx)(o.Z,{className:c.Z.inputBorder,value:n}):(0,u.jsx)("div",{className:"".concat(c.Z.inputBorder," ").concat(c.Z.placeholder),children:i})})}},20331:function(e,n,t){t.d(n,{W:function(){return A}});var i=t(98190),s=t.n(i),l=t(11006),a=t.n(l),r=t(26801),c=t.n(r),o=t(27161),u=t.n(o),d=t(59301),p=t(8591),m=t(12563),h=t(78241),f=t(78673),x=t(95237),v=t(43604),g=t(6848),j=t(1056),_=t(85731),y=t(34566),b=t(68006),w=t(22387),k=t(98815),Z=t(37712),N=["value","onChange"],C=["key","name"],I=function(e){var n=e.value,t=e.onChange,i=u()(e,N);return(0,Z.jsx)(w.Z,c()(c()({},i),{},{defaultValue:null==n?void 0:n[0],onChange:function(e){t([e])}}))},P=function(e){var n=e.value,t=void 0===n?[]:n,i=e.onClose;return(0,Z.jsx)(m.Z,{closable:!0,onClose:i,className:y.Z.keywordTag,children:null==t?void 0:t.join(" 或 ")})},A=function(e){var n=e.questionTitlePlaceholder,t=e.form,i=e.showKeywords,l=e.isMustKeyWords,r=void 0===l?i:l,o=(0,d.useState)(!1),m=a()(o,2),w=m[0],N=m[1],A=(0,d.useState)(""),E=a()(A,2),S=E[0],q=E[1],T=h.Z.useWatch("use_keywords",t),F=h.Z.useWatch("question_score",t);return(0,Z.jsxs)("div",{className:y.Z.wrap,children:[(0,Z.jsx)("div",{className:y.Z.questionTitleEditorWrap,children:(0,Z.jsx)(h.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,Z.jsx)(b.h,{scrollId:"name",watch:!0,height:140,placeholder:n})})}),(0,Z.jsx)(h.Z.Item,{label:"参考答案",name:"answer_texts",labelCol:{span:24},children:(0,Z.jsx)(I,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),i&&!r&&(0,Z.jsx)(h.Z.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked",children:(0,Z.jsx)(f.Z,{defaultChecked:!0})}),i&&r&&(0,Z.jsxs)(x.Z,{align:"middle",className:"mb30",children:[(0,Z.jsx)(h.Z.Item,{name:"use_keywords",valuePropName:"checked",children:(0,Z.jsx)(f.Z,{})}),(0,Z.jsx)(v.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,Z.jsx)(v.Z,{children:(0,Z.jsx)(g.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,Z.jsx)(k.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(T||!r)&&(0,Z.jsx)(h.Z.List,{name:"keywords",rules:[{validator:function(e,n){return r?null!=n&&n.length?(null==n?void 0:n.reduce((function(e,n){return e+n.score}),0))>parseFloat(F)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请输入关键词")):Promise.resolve()}}],children:function(e,n){var i=n.add,l=n.remove;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"".concat(y.Z.title," mb10"),children:r?"关键词":(0,Z.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,Z.jsxs)(x.Z,{align:"middle",className:"font14 mb30",children:[(0,Z.jsx)(v.Z,{flex:1,children:(0,Z.jsx)(j.Z,{value:S,onChange:function(e){q(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var n,l,a,r,c,o="".concat(null===(n=e.target)||void 0===n?void 0:n.value).replaceAll(" ",""),u=null==o||null===(l=o.split("|"))||void 0===l?void 0:l.filter((function(e){return!!e})),d=t.getFieldValue("keywords"),m=(null==d||null===(a=d.map((function(e){return null==e?void 0:e.keyword})))||void 0===a?void 0:a.flat())||[],h=s()(u);try{for(h.s();!(r=h.n()).done;){var f=r.value;if(m.includes(f))return void p.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){h.e(e)}finally{h.f()}(c=o)&&(new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~!@#¥……&*()—【】‘;:”“。,、?「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==c||(p.ZP.warning("关键词不能只输入一个“|”字符!"),0))&&(i({keyword:u,score:1}),q(""))},className:y.Z.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,Z.jsx)(v.Z,{flex:"148px",style:{textAlign:"right",color:"#9096A3"},children:"“回车键”保存关键词"})]}),e.map((function(e){var n=e.key,t=e.name,i=u()(e,C);return(0,Z.jsx)(x.Z,{className:"mb20",style:{marginRight:148},children:(0,Z.jsx)(v.Z,{flex:1,children:(0,Z.jsxs)(x.Z,{align:"middle",justify:"space-between",children:[(0,Z.jsx)(h.Z.Item,c()(c()({},i),{},{name:[t,"keyword"],children:(0,Z.jsx)(P,{onClose:function(){return l(t)}})})),r&&(0,Z.jsx)(h.Z.Item,c()(c()({},i),{},{name:[t,"score"],label:"分值",rules:[{required:!0}],className:y.Z.blankInputNumberWrapper,children:(0,Z.jsx)(_.Z,{className:y.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},n)}))]})}}),(0,Z.jsx)("div",{onClick:function(){return N(!0)},children:(0,Z.jsx)(h.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,Z.jsx)(b.x,{placeholder:"请编辑题目解析(非必填)",isEdit:w})})})]})}},80416:function(e,n,t){t.d(n,{Z:function(){return V}});var i=t(26801),s=t.n(i),l=t(93923),a=t.n(l),r=t(98190),c=t.n(r),o=t(11006),u=t.n(o),d=t(59301),p=(t(31020),t(32834)),m=t.n(p),h=t(11690);var f=[],x=["<ul>"],v=new(m().Renderer),g=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function j(){f.length=0,x=["<ul>"]}var _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function y(e,n,t,i){if(n>=e.length||e[n].level<=t)return n;var s=e[n];i.push("<li><a href='#"+s.anchor+"'>"+s.text+"</a>");var l=[];return n=y(e,++n,s.level,l),l.length>0&&(i.push("<ul>"),l.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),n=y(e,n,t,i)}function b(){return y(f,0,0,x),x.push("</ul>"),x.join("")}var w={heading:function(e){var n=g.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],i=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var i=t[1];return n.split("\n").map((function(e){var n=e.match(/^\s+/);return null===n?e:u()(n,1)[0].length>=i.length?e.slice(i.length):e})).join("\n")}(t,n[3]||""),s=n[2]?n[2].trim():n[2];if(["latex","katex","math"].indexOf(s)>=0){var l=N(),a=i;i=l,C[l]={type:"block",expression:a}}return{type:"code",raw:t,lang:s,text:i}}}},k=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Z=0,N=function(){return"__special_katext_id_".concat(Z++,"__")},C={};function I(){return C}function P(){Z=0,C={}}function A(e){return e=e.replace(k,(function(e,n){var t=N();return C[t]={type:"inline",expression:n},t}))}var E=v.listitem;v.listitem=function(e){return E(A(e))};var S=v.paragraph;v.paragraph=function(e){return S(A(e))};var q=v.tablecell;v.tablecell=function(e,n){return q(A(e),n)},v.code=function(e,n,t){var i=(n||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(n,'">').concat(t?e:(0,h.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(t?e:(0,h.escape)(e,!0))+"</code></pre>"},v.heading=function(e,n,t){var i=this.options.headerPrefix+t.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return f.push({anchor:i,level:n,text:e}),"<h"+n+' id="'+i+'">'+e+"</h"+n+">"},m().setOptions({silent:!0,gfm:!0,pedantic:!1}),m().use({tokenizer:w,renderer:v});var T=m(),F=(t(64018),t(76980)),B=t(67871),D=t(15342),M=t(1012),L=t(78075),R=t(37712),O="@▁@",z=/<pre[^>]*>/g;var V=function(e){var n=e.value,t=void 0===n?"":n,i=e.className,l=e.showTextOnly,r=e.showLines,o=e.style,p=void 0===o?{}:o,m=e.stylesPrev,h=void 0===m?{}:m,f=e.highlightKeywords,x=e.showProgramFill,v=(e.isProgramFill,e.disabledFill),g=void 0!==v&&v,y=e.programFillValue,w=e.onFillChange,k=void 0===w?function(e){}:w,Z=e.onFillBlur,N=void 0===Z?function(){}:Z,C=String(t),A=(0,d.useState)(""),E=u()(A,2),S=E[0],q=E[1],V=(0,d.useState)("office"),U=u()(V,2),H=U[0],W=U[1],K=(0,d.useState)([]),Y=u()(K,2),G=Y[0],J=Y[1],Q=(0,d.useRef)("a"+(0,M.Z)()),X={},$=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,n){var t=n.replace(/(\n|\r)/g,"").split("}"),i=[];return t.map((function(e){""!=e&&i.push(".".concat(Q.current," ").concat(e))})),"<style>".concat(i.join("}"),"</style>")}))},ee=(0,d.useMemo)((function(){try{C=C.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+B.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+B.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+B.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(x){var e=-1;return C=C.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,(function(n,t,i){return function(e,n){var t=document.createElement(e===O?"input":"textarea");t.style.width="100%",t.style.height=e===O?"40px":"151px",t.rows=5,t.spellcheck=!1,t.name="edu-program-fill",t.placeholder="请输入",t.dataset.id=n;var i=Object.keys(X).length;return X[i]=t,'<span class="edu-program-fill-wrap '.concat(e===O?"":"show",'" style="width:').concat(e===O?"200px":"100%",'"><span>').concat(t.outerHTML,'<span class="edu-program-fill-score"></span></span></span>')}(n,++e)})),'<pre style="background:#fff;padding:4px">'.concat($(C||""),"</pre>")}var n=T(C);n=$(n);var t=I();C.match(/\[TOC\]/)&&(n=n.replace("<p>[TOC]</p>",b()),j()),n=n.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var i=t[n],s=i.type,l=i.expression;return(0,D.renderToString)(function(e){var n=document.createElement("div");return n.innerHTML=e,0===n.childNodes.length?"":n.childNodes[0].nodeValue}(l)||"",{displayMode:"block"===s,throwOnError:!1,output:"html"})})),n=n.replace(/▁/g,"▁▁▁"),P();var i=document.createElement("div");return i.innerHTML=n,f?(ie(i,f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):l?i.innerText:(setTimeout((function(){return ae()}),500),console.log("dom.innerHTML:",i.innerHTML),i.innerHTML)}),[C,f]);(0,d.useEffect)((function(){se.current&&se.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=ne,e.onblur=te}))}),[G]),(0,d.useEffect)((function(){if(null!=y&&y.length){var e,n=se.current.querySelectorAll(".edu-program-fill-score"),t=se.current.querySelectorAll('[name="edu-program-fill"]'),i=c()(t.entries());try{for(i.s();!(e=i.n()).done;){var s,l=u()(e.value,2),a=l[0],r=l[1];r.value=null===(s=y[a])||void 0===s?void 0:s.value,"warning"===y[a].type?r.className="program-fill-warning":"success"===y[a].type?r.className="program-fill-success":r.className=""}}catch(e){i.e(e)}finally{i.f()}var o,d=c()(n.entries());try{for(d.s();!(o=d.n()).done;){var p,m,h=u()(o.value,2),f=h[0];h[1].innerHTML=null!==(p=y[f])&&void 0!==p&&p.score?"".concat(null===(m=y[f])||void 0===m?void 0:m.score,"分"):""}}catch(e){d.e(e)}finally{d.f()}J(y)}}),[y]);var ne=function(e){G[e.target.dataset.id]=G[e.target.dataset.id]||{},G[e.target.dataset.id].value=e.target.value,J(a()(G)),k(G,e.target.dataset.id)},te=function(e){G[e.target.dataset.id]=G[e.target.dataset.id]||{},G[e.target.dataset.id].value=e.target.value,J(a()(G)),N(G,e.target.dataset.id)};function ie(e,n){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)ie(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 i=document.createElement("span");i.innerHTML=e.textContent.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(i)}}))}var se=(0,d.useRef)();function le(e){var n=e.target;if("A"===n.tagName.toUpperCase()){var t=n.getAttribute("href");if(t.indexOf("office")>-1)e.preventDefault(),q(t),W("office");else if(t.indexOf("application/pdf")>-1)e.preventDefault(),q(t),W("pdf");else if(t.indexOf("text/html")>-1)e.preventDefault(),q(t),W("html");else if(t.startsWith("#")){e.preventDefault();var i=document.getElementById(t.replace("#",""));i&&i.scrollIntoView(!0)}}}_.WebkitLineClamp=r,r&&(p=s()(s()({},p),_));var ae=function(){var e,n=null===(e=se.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.Z.isSupported()){var n=new F.Z;n.loadSource(e.src),n.attachMedia(e)}}))};return(0,d.useEffect)((function(){if(se.current&&ee&&ee.match(z)&&window.PR.prettyPrint(),se.current)return se.current.addEventListener("click",le),function(){var e;null===(e=se.current)||void 0===e||e.removeEventListener("click",le),P(),j()}}),[ee,se.current,le]),(0,R.jsxs)(R.Fragment,{children:[l&&(0,R.jsx)("div",{ref:se,children:ee}),!l&&(0,R.jsx)("div",{ref:se,style:s()({},p),className:"".concat(i||""," ").concat(g?"disabled-fill":""," markdown-body ").concat(Q.current),dangerouslySetInnerHTML:{__html:ee}}),(0,R.jsx)(L.Z,{close:!0,data:S,type:null!=S&&S.length?H:"",style:s()({},h),onClose:function(){return q("")}})]})}},23410:function(e,n,t){t.d(n,{Z:function(){return r}});t(59301);var i=t(22211),s="ldsRing___mpBZC",l="idsRingWrapper___Of9_n",a=t(37712),r=function(e){var n=e.message,t=e.className,r=(e.children,e.style),c=void 0===r?{}:r;return(0,a.jsxs)("div",{className:"".concat(l," ").concat(t),children:[(0,a.jsxs)("div",{className:s,children:[(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{})]}),n?(0,a.jsx)("p",{style:c,children:n}):null,(0,a.jsx)(i.Outlet,{})]})}},74921:function(e,n,t){t.d(n,{h:function(){return v}});var i=t(26801),s=t.n(i),l=t(11006),a=t.n(l),r=t(59301),c=t(57809),o=t(78241),u=t(3113),d=t(89780),p=t.n(d),m=(t(83164),t(45215),t(37712)),h=c.default.Option,f={labelCol:{span:4},wrapperCol:{span:20}},x={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function v(e){var n=e.value,t=e.onChange,i=e.mode,l=e.options,c=void 0===l?{}:l,o=(0,r.useRef)(),u=(0,r.useState)(),d=a()(u,2),h=d[0],f=d[1];return(0,r.useEffect)((function(){if(h){var e=function(e){var n=e.getValue();t&&t(n)};return h.on("change",e),function(){h.off("change",e)}}}),[h,t]),(0,r.useEffect)((function(){h&&h.setOption("mode",i)}),[h,i]),(0,r.useEffect)((function(){h&&(n===h.getValue()&&""!==n||setTimeout((function(){h.setValue(n||"")}),300))}),[h,n]),(0,r.useEffect)((function(){if(o.current&&!h){var e=p().fromTextArea(o.current,s()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},c));f(e)}}),[o.current,h]),(0,m.jsx)("div",{className:"my-codemirror-container",children:(0,m.jsx)("textarea",{ref:o})})}n.Z=function(e){var n=e.callback,t=e.onCancel,i=(0,r.useState)("python"),l=a()(i,2),d=l[0],p=l[1];return(0,m.jsxs)(o.Z,s()(s()({},f),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},children:[(0,m.jsx)(o.Z.Item,{label:"代码语言",name:"language",children:(0,m.jsx)(c.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){p(x[e][1])},children:Object.keys(x).map((function(e){return(0,m.jsx)(h,{value:e,children:x[e][0]},e)}))})}),(0,m.jsx)(o.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,m.jsx)(v,{mode:d})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(u.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))}},22387:function(e,n,t){t.d(n,{Z:function(){return ue}});var i=t(98190),s=t.n(i),l=t(10574),a=t.n(l),r=t(39343),c=t.n(r),o=t(11006),u=t.n(o),d=t(22060),p=t.n(d),m=t(59301),h=t(89780),f=t.n(h),x=t(76374),v=(t(83164),t(6313),t(25717),t(99498),t(25419),t(67549),t(80416)),g=t(37712),j=function(e){var n=e.value,t=void 0===n?"":n,i=(e.className,e.showTextOnly,e.showLines,e.style,(0,m.useMemo)((function(){return""}),[t]));return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},_=t(26801),y=t.n(_),b=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function w(e){var n=e.onActionCallback,t=e.title,i=e.icon,s=e.actionName,l=e.className,a=void 0===l?"":l,r=e.children;return(0,g.jsxs)("a",{title:t,className:a,onClick:function(){n(s)},children:[(0,g.jsx)("i",{className:"md-iconfont ".concat(i)}),r]})}var k=function(e){var n=e.watch,t=e.showNullButton,i=e.showNullProgramButton,s=e.onActionCallback,l=e.fullScreen,a=e.insertTemp,r=e.hidetoolBar,c=[].concat(b,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return(0,g.jsxs)("ul",{className:"markdown-toolbar-container",children:[!r&&c.map((function(e,n){return(0,g.jsx)("li",{children:e.actionName?(0,g.jsx)(w,y()(y()({},e),{},{onActionCallback:s})):(0,g.jsx)("span",{className:"v-line"})},n)})),t?(0,g.jsx)("li",{children:(0,g.jsx)(w,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:s,children:(0,g.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("li",{children:(0,g.jsx)(w,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:s,children:(0,g.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,g.jsx)("li",{children:(0,g.jsx)(w,{icon:"icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:s,children:(0,g.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,a&&(0,g.jsx)("li",{children:(0,g.jsx)(w,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:s,children:(0,g.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),(0,g.jsx)("li",{className:"btn-full-screen",children:(0,g.jsx)(w,{icon:"".concat(l?"icon-shrink":"icon-enlarge"),title:l?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:s})})]})},Z=t(90463),N=t(78241),C=t(1056),I=t(3113),P={labelCol:{span:4},wrapperCol:{span:20}},A=function(e){var n=e.callback,t=e.onCancel;return(0,g.jsxs)(N.Z,y()(y()({},P),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},children:[(0,g.jsx)(N.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,g.jsx)(C.Z,{})}),(0,g.jsx)(N.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,g.jsx)(C.Z,{})}),(0,g.jsxs)("div",{className:"flex-container flex-end",children:[(0,g.jsx)(I.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,g.jsx)(I.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},E=t(74921),S=t(8591),q=t(51811),T=N.Z.useForm,F={width:280,marginRight:10},B={labelCol:{span:5},wrapperCol:{span:19}},D=function(e){var n=e.callback,t=e.onCancel,i=T(),s=u()(i,1)[0],l=(0,m.useRef)();function a(e,n){-1!==e.status?s.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):S.ZP.error(e.message)}return(0,g.jsxs)(N.Z,y()(y()({form:s},B),{},{className:"upload-image-panel",onFinish:function(e){n(y()(y()({},e),{},{name:l.current}))},style:{width:470,overflow:"hidden"},children:[(0,g.jsx)(N.Z.Item,{label:"图片地址",required:!0,children:(0,g.jsxs)("div",{className:"flex-container",children:[(0,g.jsx)(N.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}],children:(0,g.jsx)(C.Z,{style:F})}),(0,g.jsx)(M,{onFileChange:function(e){var n=e.target.files[0];l.current=n.name,L(n,a)}})]})}),(0,g.jsx)(N.Z.Item,{label:"图片描述",name:"alt",children:(0,g.jsx)(C.Z,{style:{width:264}})}),(0,g.jsxs)(N.Z.Item,{style:{textAlign:"right"},children:[(0,g.jsx)(I.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,g.jsx)(I.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function M(e){var n=e.onFileChange;return(0,g.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,g.jsx)("input",{type:"file",onChange:n})]})}function L(e,n){if(!e)throw new String("没有文件");var t=new FormData;t.append("editormd-image-file",e),t.append("file_param_name","editormd-image-file"),t.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),i.addEventListener("error",(function(e){console.error(e)}),!1),i.open("POST","".concat(q.KI,"/api/attachments.json")),i.send(t)}var R,O,z=t(5112),V=t(85731),U=z.ZP.Group,H={margin:"0 8px"},W=function(e){var n=e.callback,t=e.onCancel;return(0,g.jsxs)(N.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,g.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,g.jsx)("span",{style:H,children:"单元格数:"}),(0,g.jsx)("span",{style:H,children:"行数"}),(0,g.jsx)(N.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,g.jsx)(V.Z,{})}),(0,g.jsx)("span",{style:H,children:"列数"}),(0,g.jsx)(N.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,g.jsx)(V.Z,{})})]}),(0,g.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,g.jsx)("span",{style:H,children:"对齐方式:"}),(0,g.jsx)(N.Z.Item,{name:"align",children:(0,g.jsxs)(U,{children:[(0,g.jsx)(z.ZP,{value:"default",children:(0,g.jsx)("i",{className:"fa fa-align-justify"})}),(0,g.jsx)(z.ZP,{value:"left",children:(0,g.jsx)("i",{className:"fa fa-align-left"})}),(0,g.jsx)(z.ZP,{value:"center",children:(0,g.jsx)("i",{className:"fa fa-align-center"})}),(0,g.jsx)(z.ZP,{value:"right",children:(0,g.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,g.jsxs)("div",{className:"flex-container flex-end",children:[(0,g.jsx)(I.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,g.jsx)(I.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},K=t(67871),Y=t(15830),G=t(1012),J=t(43418),Q="link",X="upload-image",$="code-block",ee="add-table",ne="------------",te={default:ne,left:":".concat(ne),center:":".concat(ne,":"),right:"".concat(ne,":")},ie=t(86219);var se="@▁▁@";function le(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ae=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",re=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],ce=(R={},p()(R,ae+"-B","bold"),p()(R,ae+"-I","italic"),R),oe=(O={},p()(O,Q,"添加链接"),p()(O,$,"添加代码块"),p()(O,X,"添加文件"),p()(O,ee,"添加表格"),O),ue=function(e){var n=e.defaultValue,t=void 0===n?"":n,i=e.onChange,l=e.width,r=void 0===l?"100%":l,o=e.height,d=void 0===o?400:o,h=e.miniToolbar,_=void 0!==h&&h,y=e.isFocus,b=void 0!==y&&y,w=e.watch,N=e.insertTemp,C=e.mode,I=void 0===C?"markdown":C,P=e.id,q=void 0===P?"markdown-editor-id":P,T=e.showResizeBar,F=void 0!==T&&T,B=e.noStorage,M=void 0!==B&&B,R=e.showNullButton,O=void 0!==R&&R,z=e.showNullProgramButton,V=void 0!==z&&z,U=e.hidetoolBar,H=void 0!==U&&U,ne=e.fullScreen,ae=void 0!==ne&&ne,ue=e.onBlur,de=e.onCMBeforeChange,pe=e.onFullScreen,me=e.className,he=void 0===me?"":me,fe=e.disablePaste,xe=void 0!==fe&&fe,ve=e.disabled,ge=void 0!==ve&&ve,je=e.disabledFill,_e=void 0!==je&&je,ye=e.placeholder,be=void 0===ye?"":ye,we=e.values,ke=void 0===we?"":we,Ze=(0,m.useState)(null),Ne=u()(Ze,2),Ce=Ne[0],Ie=Ne[1],Pe=(0,m.useState)(t),Ae=u()(Pe,2),Ee=Ae[0],Se=Ae[1],qe=(0,m.useState)(w),Te=u()(qe,2),Fe=Te[0],Be=Te[1],De=(0,m.useState)(ae),Me=u()(De,2),Le=Me[0],Re=Me[1],Oe=(0,m.useState)(""),ze=u()(Oe,2),Ve=ze[0],Ue=ze[1],He=(0,m.useState)(0),We=u()(He,2),Ke=We[0],Ye=We[1],Ge=(0,m.useState)(d),Je=u()(Ge,2),Qe=Je[0],Xe=Je[1],$e=(0,m.useState)(!1),en=u()($e,2),nn=(en[0],en[1]),tn=(0,m.useRef)((0,G.Z)()),sn=(0,m.useRef)(!1),ln=(0,m.useRef)(),an=(0,m.useRef)(),rn=(0,m.useRef)(),cn=(0,m.useRef)(),on=(0,m.useRef)(),un=function(){var e=c()(a()().mark((function e(){var n,t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.ZP)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tn.current}});case 2:null!=(t=e.sent)&&null!==(n=t.attachments)&&void 0!==n&&n.length&&(console.log("cm:",Ce,an),t.attachments.map((function(e){e.content_type.indexOf("image")>-1?Ce.replaceSelection(".concat(e.content_type,")")):e.content_type.indexOf("video")>-1?Ce.replaceSelection('<video width="100%" controls src="'.concat(K.Z.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):e.content_type.indexOf("pdf")>-1?Ce.replaceSelection('<a href="'.concat(K.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):Ce.replaceSelection("[".concat(e.name,"](").concat(K.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Se(ke),null==Ce||Ce.setValue(ke),window.scrollTo(0,e)}),[ke]),(0,m.useEffect)((function(){null==pe||pe(Le)}),[Le]),(0,m.useEffect)((function(){if(an.current){var e=function(e,t){if(!xe){var i=t.clipboardData;if(i){var s=i.types.toString(),l=i.items;if("Files"===s||i.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==I)return;try{var a,r=l[1];"file"===(null===(a=l[0])||void 0===a?void 0:a.kind)&&(r=l[0]);var c=r.getAsFile(),o=c.name.split(".").pop();L(c,(function(e){var t,i,s;e.id?(null==c||null===(t=c.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection(".concat(e.content_type,")")):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(K.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==c||null===(s=c.type)||void 0===s?void 0:s.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(K.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(c.type,'&disposition=inline" target="_blank">').concat(c.name,"</a>")):re.includes(o)?n.replaceSelection('<a href="'.concat(K.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(c.name,"</a>")):n.replaceSelection("[".concat(c.name,"](").concat(K.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(t){S.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=f().fromTextArea(an.current,{mode:I,lineNumbers:!_,lineWrapping:!0,value:t,autoCloseTags:!V,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",be):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),i=t.getCursor(),s=t.getLine(i.line),l=s.charAt(i.ch-1),a=s.lastIndexOf("@▁@",i.ch),r=s.lastIndexOf("@▁▁@",i.ch),c=a>r?a:r,o=a>r?3:4;if(-1===se.indexOf(l))return null;if(console.log("change1:",n,e,s,i,c,a,r,l),c>=0&&i.ch-c<5){var u=c+o;return t.replaceRange("",{line:i.line,ch:c},{line:i.line,ch:u}),{line:i.line,ch:u}}return null}(e);t&&n.preventDefault()}})),b&&n.focus(),n.on("paste",e),n.on("dragleave",(function(e,n){rn.current.classList.remove("mouse-hover-md")})),n.on("dragover",(function(e,n){rn.current.classList.add("mouse-hover-md")})),n.on("drop",(function(e,t){var i;if(rn.current.classList.add("mouse-hover-md"),(i=t.dataTransfer.files).length>0){t.preventDefault(),t.stopPropagation();for(var s=function(){var e=i[l],t=e.name.split(".").pop();L(e,(function(i){var s,l,a;i.id?(null==e||null===(s=e.type)||void 0===s?void 0:s.indexOf("image"))>-1?n.replaceSelection(".concat(i.content_type,")")):(null==e||null===(l=e.type)||void 0===l?void 0:l.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(K.Z.API_SERVER,"/api/attachments/").concat(i.id,'"></video>')):(null==e||null===(a=e.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(K.Z.API_SERVER,"/api/attachments/").concat(i.id,"?type=").concat(e.type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):re.includes(t)?n.replaceSelection('<a href="'.concat(K.Z.API_SERVER,"/api/attachments/").concat(i.id,'?type=office&disposition=inline" target="_blank">').concat(e.name,"</a>")):n.replaceSelection("[".concat(e.name,"](").concat(K.Z.API_SERVER,"/api/attachments/").concat(i.id,"?type=").concat(i.content_type,")")):401===(null==i?void 0:i.status)&&(document.location.href="/user/login")}))},l=0;l<i.length;l++)s()}})),ge&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),Ie(n),function(){n.off("paste",e)}}}),[]);var dn=(0,m.useCallback)((function(){rn.current}),[Qe,rn,Le]);(0,m.useEffect)((function(){if(Ce){var e=function(){var e=new x.Z((function(e){var n,t=s()(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(dn(),Ce.setSize("100%","100%"),Ce.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(an.current.parentElement),e}();return function(){var n,t;null!==(n=an.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=an.current)||void 0===t?void 0:t.parentElement)}}}),[Ce,dn]),(0,m.useEffect)((function(){if(Ce){for(var e=[],n=function(){var n=u()(i[t],2),s=n[0],l=n[1],a=p()({},s,(function(){pn(l)}));e.push(a),Ce.addKeyMap(a)},t=0,i=Object.entries(ce);t<i.length;t++)n();return ln.current=setInterval((function(){sn.current&&un()}),4e3),function(){clearInterval(ln.current);for(var n=0,t=e;n<t.length;n++){var i=t[n];Ce.removeKeyMap(i)}}}}),[Ce]),(0,m.useEffect)((function(){ae!==Le&&Re(ae)}),[ae]),(0,ie.Z)((function(){if(!M&&Ke>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(q);e>=Ke+1e4&&(!n||n!==Ee)&&(window.sessionStorage.setItem(q,Ee),nn(!0))}}),1e4),(0,m.useEffect)((function(){Be(w)}),[Ce,w]),(0,m.useEffect)((function(){Ce&&b&&Ce.focus()}),[Ce,b]),(0,m.useEffect)((function(){if(Fe&&Ce){var e=function(e){var n=e.target;if(on.current){var t=n.scrollTop/n.scrollHeight;on.current.scrollTop=on.current.scrollHeight*t}},n=Ce.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Ce,Fe]),(0,m.useEffect)((function(){if(Ce&&de){var e=function(e,n){de(e,n)};return Ce.on("beforeChange",e),function(){Ce.off("beforeChange",e)}}}),[Ce,de]),(0,m.useEffect)((function(){if(Ce&&ue){var e=function(){ue(Ce.getValue())};return Ce.on("blur",e),function(){Ce.off("blur",e)}}}),[Ce,ue]),(0,m.useEffect)((function(){if(Ce){var e=function(e,n){var t=e.getValue();Se(t),Ye((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(V?i(t,vn(t)):i(t))};return Ce.on("change",e),function(){Ce.off("change",e)}}}),[Ce,i]),(0,m.useEffect)((function(){if(Ce)if(null==t)Ce.setValue(""),Se("");else{var e=window.scrollY||window.pageYOffset;t!==Ce.getValue()&&(Ce.setValue(t),Se(t),Ce.setCursor(ge?1:Ce.lineCount(),0),window.scrollTo(0,e))}}),[Ce,t]);var pn=(0,m.useCallback)((function(e){var n=Ce.getCursor(),t=Ce.getSelection(),i=t.split("\n");switch(e){case"bold":return Ce.replaceSelection("**"+t+"**"),""===t&&Ce.setCursor(n.line,n.ch+2),Ce.focus();case"italic":return Ce.replaceSelection("*"+t+"*"),""===t&&Ce.setCursor(n.line,n.ch+1),Ce.focus();case"code":return Ce.replaceSelection("`"+t+"`"),""===t&&Ce.setCursor(n.line,n.ch+1),Ce.focus();case"inline-latex":return Ce.replaceSelection("`$$"+t+"$$`"),""===t&&Ce.setCursor(n.line,n.ch+3),Ce.focus();case"latex":return Ce.replaceSelection("```latex\n"+t+"\n```"),Ce.setCursor(n.line+1,t.length+1),Ce.focus();case"line-break":return Ce.replaceSelection("<br/>\n"),Ce.focus();case"list-ul":return""===t?Ce.replaceSelection("- "+t):Ce.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Ce.focus();case"list-ol":return""===t?Ce.replaceSelection("1. "+t):Ce.replaceSelection(i.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Ce.focus();case"add-null-ch":return""===t&&Ce.setCursor(n.line,n.ch),Ce.replaceSelection("▁"),Ce.focus();case"add-signal":return""===t&&Ce.setCursor(n.line,n.ch),Ce.replaceSelection("@▁@"),Ce.focus();case"add-multiple":return""===t&&Ce.setCursor(n.line,n.ch),Ce.replaceSelection(se),Ce.focus();case"inster-template-1":return""===t&&Ce.setCursor(n.line,n.ch),Ce.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),Ce.focus();case"eraser":return Ce.setValue(""),Ce.focus();case"trigger-watch":return Be(!Fe),Ce.focus();case"trigger-full-screen":return Re(!Le),Ce.focus();case Q:return void Ue(Q);case $:return void Ue($);case X:return void Ue(X);case ee:return void Ue(ee);default:throw new Error}}),[Ce,Fe,Le]),mn=(0,m.useCallback)((function(e){switch(Ue(""),Ve){case Q:var n=e.title,t=e.link;return Ce.replaceSelection("[".concat(n,"](").concat(t,")")),Ce.focus();case $:var i=e.language,s=e.content;return Ce.replaceSelection(["```"+i,s,"```"].join("\n")),Ce.focus();case X:var l=e.src,a=e.alt;return a?Ce.replaceSelection(".concat(l,' "').concat(a,'" )')):Ce.replaceSelection("")),Ce.focus();case ee:for(var r=e.row,c=e.col,o=e.align,u="\n",d=0;d<r;d++){for(var p=[],m=[],h=0;h<c;h++)1===d&&m.push(te[o]),p.push(" ");1===d&&(u+="| ".concat(m.join(" | ")," |\n")),u+="| ".concat(p.join(1===c?"":" | ")," |\n")}return Ce.replaceSelection(u+"\n"),Ce.focus();default:throw new Error}}),[Ce,Ve]),hn=(0,m.useMemo)((function(){switch(Ve){case Q:return(0,g.jsx)(A,{callback:mn,onCancel:fn});case $:return(0,g.jsx)(E.Z,{callback:mn,onCancel:fn});case X:return(0,g.jsx)(D,{callback:mn,onCancel:fn});case ee:return(0,g.jsx)(W,{callback:mn,onCancel:fn});default:return null}}),[Ve]);function fn(){Ue("")}(0,m.useEffect)((function(){if(cn.current){var e=function(e){s=!0,l=e.pageY},n=function(){s=!1},t=function(e){if(s){var n=e.pageY-l;n<0&&(n=0),n>300&&(n=300),Xe(d+n+"px")}},i=cn.current,s=!1,l=0;return i.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){i.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[Ce,cn]),(0,m.useEffect)((function(){Xe(d)}),[d]);var xn={width:le(r),height:le(Qe)},vn=((0,m.useMemo)((function(){if(Ke){var e=new Date(Ke),n=e.getHours(),t=e.getMinutes(),i=e.getSeconds();return t=t<10?"0"+t:t,i=i<10?"0"+i:i,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(i)}return 0}),[Ke]),function(e){var n=[];if(V){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,i){n.push({multiLine:!("@▁@"===e)})}))}return n});return(0,g.jsxs)(m.Fragment,{children:[(0,g.jsx)("div",{className:"markdown-editor-wrapper",ref:rn,children:(0,g.jsxs)("div",{className:"markdown-editor-container ".concat(he," ").concat(Fe?"on-preview":""," ").concat(_?"mini":""," ").concat(Le?"full-screen":""),style:xn,children:[(0,g.jsx)(k,{insertTemp:N,watch:Fe,fullScreen:Le,showNullButton:O,showNullProgramButton:V,onActionCallback:pn,hidetoolBar:H,uuid:tn.current,setOpenPhones:function(){sn.current=!0}}),(0,g.jsxs)("div",{className:"markdown-editor-body",children:[(0,g.jsx)("div",{className:"codemirror-container",children:(0,g.jsx)("textarea",{ref:an,placeholder:be})}),Fe?(0,g.jsxs)("div",{ref:on,className:"preview-container",children:["stex"===I&&(0,g.jsx)(j,{value:Ee}),"stex"!==I&&(0,g.jsx)(v.Z,{disabledFill:_e,showProgramFill:V,value:Ee})]}):null]})]})}),F?(0,g.jsx)("a",{ref:cn,className:"editor-resize"}):null,(0,g.jsx)(Z.Z,{children:oe[Ve]?(0,g.jsx)(J.Z,{centered:!0,title:oe[Ve],open:!0,onCancel:fn,footer:null,className:"markdown-popup-form",children:hn}):null})]})}},90463:function(e,n,t){t.d(n,{Z:function(){return m}});var i=t(94312),s=t.n(i),l=t(24127),a=t.n(l),r=t(93242),c=t.n(r),o=t(10564),u=t.n(o),d=t(59301),p=t(4676),m=function(e){c()(t,e);var n=u()(t);function t(e){var i;s()(this,t),i=n.call(this,e);var l=window.document;return i.node=l.createElement("div"),l.body.appendChild(i.node),i}return a()(t,[{key:"render",value:function(){var e=this.props.children;return(0,p.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(d.Component)},86219:function(e,n,t){t.d(n,{Z:function(){return s}});var i=t(59301);function s(e,n){var t=(0,i.useRef)();(0,i.useEffect)((function(){t.current=e})),(0,i.useEffect)((function(){if(null!==n){var e=setInterval((function(){t.current()}),n);return function(){return clearInterval(e)}}}),[n])}},65879:function(e,n,t){t.d(n,{Z:function(){return _}});var i=t(11006),s=t.n(i),l=t(59301),a=t(43418),r=t(48826),c=t(3113),o=t(67871),u=t(85578),d=t(22211),p="customModal___bVzUV",m="content___oKhZq",h="upload___nPxEL",f="infoText___gZEJF",x="okBtn___CVo2A",v="fileList___tauGN",g="fileName___T_8JX",j=t(37712),_=function(e){var n=e.visible,t=e.onOk,i=e.onCancel,_=(0,l.useState)([]),y=s()(_,2),b=y[0],w=y[1],k=(0,l.useState)(!1),Z=s()(k,2),N=Z[0],C=Z[1],I=(0,d.useParams)();(0,l.useEffect)((function(){n||(w([]),C(!1))}),[n]);var P=function(){var e="".concat(o.Z.API_SERVER,"/api/courses/").concat(I.coursesId,"/exercises/down_template");(0,u.Nd)(null,e)},A=function(){w([])};return(0,j.jsx)(a.Z,{title:"导入试题",open:n,onOk:function(){C(!0),t(b,(function(){C(!1)}))},centered:!0,wrapClassName:p,onCancel:function(){i()},width:663,okText:"确认",okButtonProps:{className:x},cancelText:"取消",confirmLoading:N,children:(0,j.jsxs)("div",{className:m,children:[(0,j.jsxs)("aside",{children:[(0,j.jsx)("div",{style:{fontWeight:600},children:"步骤1"}),(0,j.jsxs)("ul",{children:[(0,j.jsxs)("li",{children:[(0,j.jsx)("span",{style:{color:"#5F6367"},children:"根据模板要求编辑需要上传的试题"}),(0,j.jsx)("span",{style:{color:"#0152d9",cursor:"pointer",marginLeft:20},onClick:P,children:"下载考试试题模板"}),(0,j.jsx)("i",{className:"iconfont icon-xiazai4 ml10",onClick:P,style:{fontSize:14,cursor:"pointer",color:"#0152d9"}})]}),(0,j.jsx)("li",{style:{color:"#FA6400"},className:"mt10",children:"提示"}),(0,j.jsx)("li",{className:f,children:"1、目前仅支持Excel格式模板; "}),(0,j.jsx)("li",{className:f,children:"2、不支持组合题和实训题导入;"}),(0,j.jsx)("li",{className:f,children:"3、每次最多导入300题;"}),(0,j.jsx)("li",{className:f,children:"4、填空题导入最多支持5个填空项。"})]})]}),(0,j.jsxs)("aside",{style:{marginTop:22},children:[(0,j.jsx)("div",{style:{fontWeight:600},children:"步骤2"}),(0,j.jsxs)("ul",{style:{flex:1},children:[(0,j.jsx)("li",{style:{color:"#5F6367"},children:"上传编辑好的试题文档,确定导入"}),n&&(0,j.jsx)(r.Z,{action:"".concat(o.Z.API_SERVER,"/api/attachments.json"),beforeUpload:function(e){var n={name:e.name,uid:e.uid,file:e};return w([n]),!1},onRemove:A,withCredentials:!0,fileList:b,accept:".xls,.xlsx",showUploadList:!1,children:(0,j.jsx)(c.ZP,{className:h,type:"primary",icon:(0,j.jsx)("i",{className:"iconfont icon-shangchuan3",style:{fontSize:14}}),children:"上传文件"})}),b.map((function(e,n){return(0,j.jsxs)("div",{className:v,children:[(0,j.jsx)("span",{className:g,children:null==e?void 0:e.name}),(0,j.jsx)("i",{className:"iconfont icon-shanchu12",style:{color:"#F65160",fontSize:16,cursor:"pointer"},onClick:A})]},n)}))]})]})]})})}},22983:function(e,n,t){t.d(n,{Y4:function(){return q},Im:function(){return A},ZP:function(){return F}});var i,s=t(11006),l=t.n(s),a=t(10574),r=t.n(a),c=t(39343),o=t.n(c),u=t(26801),d=t.n(u),p=t(22060),m=t.n(p),h=t(59301),f=t(1056),x=t(3113),v=t(42884),g=t(20114),j=t(29483),_=t(24334),y=t(23410),b=t(80416),w=t(85578),k=t(34376),Z=t(15830),N=t(22211),C=t(37712),I=f.Z.TextArea,P={visible:!1,tabIndex:"0"},A=(i={},m()(i,j.h.NOMATCH,"测试用例结果不匹配"),m()(i,j.h.OK,"调试通过"),m()(i,2,"调试超时"),m()(i,3,"调试pod失败"),m()(i,4,"编译失败"),m()(i,5,"执行失败"),i),E=function(e){return e[e.SET_VISIBLE=0]="SET_VISIBLE",e[e.SET_TABINDEX=1]="SET_TABINDEX",e}(E||{});function S(e,n){switch(n.type){case E.SET_VISIBLE:return d()(d()({},e),{},{visible:n.payload});case E.SET_TABINDEX:return d()(d()({},e),{},{tabIndex:n.payload});default:throw new Error}}function q(e){var n=e.status,t=e.error_msg,i=e.output,s=e.input,l=e.expected_output,a=e.is_file,c=e.input_file_url,u=e.output_file_url,d=e.expected_output_file_url,p=e.setMonacoValue,m=e.setData,f=(0,h.useRef)(),x=(0,h.useRef)(),v=(0,h.useRef)(),g=null,y={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch((0,h.useEffect)((function(){if(i&&!a&&f.current){var e=new k.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});e.open(f.current);var n=(0,w.pp)(_.Base64.decode(i));e.write(n),e.setOption("theme",{background:"#1e1e1e"})}if(s&&!a&&x.current){var t=new k.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});t.open(x.current),t.write((0,w.pp)(s)),t.setOption("theme",{background:"#1e1e1e"})}if(l&&!a&&v.current){var r=new k.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});r.open(v.current),r.write((0,w.pp)(_.Base64.decode(l))),r.setOption("theme",{background:"#1e1e1e"})}}),[i]),n){case j.h.NOMATCH:g=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("p",{className:"c-red",children:"实际输入:"}),!a&&(0,C.jsx)("div",{ref:x}),a&&(0,C.jsx)("div",{style:y,children:(0,C.jsx)("a",{style:{fontSize:"16px"},onClick:o()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(c,{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(){m(c)}),200);case 9:case"end":return e.stop()}}),e)}))),children:s})}),(0,C.jsx)("p",{className:"c-red",children:"实际输出:"}),!a&&(0,C.jsx)("div",{ref:f}),a&&(0,C.jsx)("div",{style:y,children:(0,C.jsx)("a",{style:{fontSize:"16px"},onClick:o()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.ZP)(u,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:n=e.sent,p(n),setTimeout((function(){m(u)}),200);case 5:case"end":return e.stop()}}),e)}))),children:i})}),(0,C.jsx)("p",{className:"c-red",children:"预期输出:"}),!a&&(0,C.jsx)("div",{ref:v}),a&&(0,C.jsx)("div",{style:y,children:(0,C.jsx)("a",{style:{fontSize:"16px"},onClick:o()(r()().mark((function e(){var n;return r()().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(){m(d)}),200);case 9:case"end":return e.stop()}}),e)}))),children:l})})]});break;case j.h.EXECUTEFAILURE:g=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("div",{style:{border:"1px #F6F7F9 solid"},children:[(0,C.jsx)("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"},children:"最后执行的输入:"}),!a&&(0,C.jsx)(b.Z,{value:s,style:y}),a&&(0,C.jsx)("div",{style:y,children:(0,C.jsx)("a",{onClick:function(){return(0,w.LR)(c,s)},children:s})})]}),(0,C.jsxs)("div",{style:{border:"1px #F6F7F9 solid",marginTop:"10px"},children:[(0,C.jsx)("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"},children:"执行出错信息:"}),(0,C.jsxs)("pre",{className:"error",style:{color:"#E30000",padding:"0 10px"},children:[_.Base64.decode(t),"111"]})]})]});break;case j.h.COMPILEFAILURE:g=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("p",{children:"最后执行的输入:"}),!a&&(0,C.jsx)("div",{ref:x}),a&&(0,C.jsx)("div",{style:y,children:(0,C.jsx)("a",{onClick:function(){return(0,w.LR)(c,s)},children:s})}),(0,C.jsx)("p",{children:"执行出错信息:"}),(0,C.jsx)("pre",{className:"error",children:_.Base64.decode(t)})]});break;case j.h.PODFAILURE:g=(0,C.jsx)("p",{children:"创建pod失败,请稍后重试"});break;case j.h.TIMEOUT:g=(0,C.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,C.jsxs)(C.Fragment,{children:[" ",g," "]})}function T(e){var n=e.status,t=e.error_msg,i=e.execute_time,s=e.output,l=e.input,a=e.expected_output,r=(e.is_file,e.input_file_url,e.output_file_url,e.expected_output_file_url,null);switch(n){case j.h.OK:r=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("p",{children:["执行用时:",i/1e3,"秒"]}),(0,C.jsx)("p",{children:"执行结果:"}),(0,C.jsx)("pre",{children:_.Base64.decode(s)})]});break;case j.h.NOMATCH:r=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("p",{children:["输入:",(0,C.jsx)("pre",{children:l})]}),(0,C.jsxs)("p",{children:["输出:",s&&_.Base64.decode(s)]}),(0,C.jsxs)("p",{children:["预期输出:",a&&_.Base64.decode(a)]})]});break;case j.h.EXECUTEFAILURE:case j.h.COMPILEFAILURE:r=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("p",{children:["最后执行的输入:",(0,C.jsx)("pre",{children:l})]}),(0,C.jsx)("p",{children:"执行出错信息:"}),(0,C.jsx)("pre",{className:"error",children:_.Base64.decode(t)})]});break;case j.h.PODFAILURE:r=(0,C.jsx)("p",{children:"创建pod失败,请稍后重试"});break;case j.h.TIMEOUT:r=(0,C.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,C.jsxs)(C.Fragment,{children:[" ",r," "]})}var F=function(e){var n=e.input,t=e.debuging,i=e.submitting,s=e.executingMessage,a=e.debugResult,c=e.onChangeInput,u=e.onDebugCode,d=e.onSubmitCode,p=e.hack,m=e.user,f=(0,h.useReducer)(S,P),j=l()(f,2),_=j[0],b=j[1],w=_.visible,k=_.tabIndex,A=(0,N.useSearchParams)(),q=l()(A,1)[0];function F(e){var n=e.target.id;b({type:E.SET_TABINDEX,payload:n})}var B=(0,h.useMemo)((function(){if(a){a.status;return(0,C.jsx)(C.Fragment,{children:T(a)})}return null}),[a]);var D=function(){var e=o()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.ZP)("/api/problems/".concat(n,"/start.json"),{method:"get",params:{hack_user_id:null==m?void 0:m.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,C.jsxs)("div",{className:"test-case-panel",children:[(0,C.jsxs)("div",{className:"test-case-panel-body ".concat(w?"active":""),children:[(0,C.jsxs)("ul",{className:"s-navs",children:[(0,C.jsx)("li",{children:(0,C.jsx)("a",{className:"0"===k?"active":"",id:"0",onClick:F,children:"自定义测试用例"})}),(0,C.jsx)("li",{children:(0,C.jsx)("a",{className:"1"===k?"active":"",id:"1",onClick:F,children:"代码执行结果"})})]}),(0,C.jsx)("div",{className:"tab-panel-body ".concat("0"===k?"":"hide"),children:(0,C.jsx)(I,{placeholder:"请填写测试用例的输入值,点击“调试代码”",value:n,onChange:c})}),(0,C.jsx)("div",{className:"tab-panel-body ".concat("1"===k?"":"hide"),children:t?(0,C.jsx)(y.Z,{message:s}):a?(0,C.jsxs)("section",{style:{height:200},children:[" ",B," "]}):(0,C.jsx)("p",{className:"tip",children:"请填写测试用例的输入值,点击“调试代码”"})})]}),(0,C.jsx)("a",{className:"btn-collapse ".concat(w?"up":""),onClick:function(){b({type:E.SET_VISIBLE,payload:!w})},children:w?(0,C.jsx)(v.Z,{}):(0,C.jsx)(g.Z,{})}),(0,C.jsxs)("footer",{className:"footer",children:[(0,C.jsx)("span",{children:"控制台"}),(0,C.jsxs)("div",{className:"flex-container",children:[(null==p?void 0:p.is_program)&&(null==p?void 0:p.above_question)&&(0,C.jsx)(x.ZP,{onClick:function(){return D(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,C.jsx)(x.ZP,{onClick:function(){return D(null==p?void 0:p.under_question)},id:"oj-next",className:"btn-blue",type:"ghost",children:"下一题"}),(0,C.jsx)(x.ZP,{className:"btn-green",type:"ghost",loading:t,onClick:function(){b({type:E.SET_VISIBLE,payload:!0}),b({type:E.SET_TABINDEX,payload:"1"}),u()},children:"调试代码"}),"8"!==q.get("qtype")&&(0,C.jsx)(x.ZP,{type:"primary",className:"custom-ant-disabled",loading:i,disabled:i,onClick:function(){b({type:E.SET_VISIBLE,payload:!1}),d()},children:"评测并提交"})]})]})]})}},29483:function(e,n,t){t.d(n,{h:function(){return i}});var i=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}({})},43272:function(e,n,t){t.d(n,{H7:function(){return m},MK:function(){return p},MU:function(){return c},X6:function(){return u},bM:function(){return r},fi:function(){return h},fu:function(){return a},n4:function(){return f},rX:function(){return d},vl:function(){return x},zO:function(){return o}});var i=t(26801),s=t.n(i),l=t(15830);function a(e,n){return(0,l.U2)("myproblems/".concat(e,".json"),s()({hidePopLogin:!0},n||{}))}function r(e,n){return(0,l.v_)("myproblems/".concat(e,"/code_submit.json"),n)}function c(e,n){return(0,l.v_)("myproblems/".concat(e,"/code_debug.json"),n)}function o(e,n){return n.language&&(n.language=encodeURIComponent(n.language)),(0,l.U2)("myproblems/".concat(e,"/submit_records.json"),n)}function u(e){return(0,l.U2)("myproblems/record_detail.json",{id:e})}function d(e,n){return(0,l.U2)("myproblems/".concat(e,"/result.json"),{mode:n})}function p(e,n){return(0,l.v_)("myproblems/".concat(e,"/add_notes.json"),n)}function m(e){return(0,l.v_)("myproblems/".concat(e,"/restore_initial_code.json"))}function h(e){return(0,l.v_)("myproblems/".concat(e,"/sync_code.json"))}function f(e,n){return(0,l.v_)("myproblems/".concat(e,"/update_code.json"),n)}function x(e,n){return(0,l.v_)("discusses/".concat(e,"/plus.json"),n)}},7387:function(e,n,t){var i=t(10574),s=t.n(i),l=t(39343),a=t.n(l),r=t(11006),c=t.n(r),o=t(59301),u=t(6848),d=t(1056),p=t(8591),m=t(84527),h=t(37712);n.Z=function(e){var n=e.defaultValue,t=e.onFinish,i=(0,o.useState)(!1),l=c()(i,2),r=l[0],f=l[1],x=(0,o.useState)(n),v=c()(x,2),g=v[0],j=v[1];return(0,o.useEffect)((function(){j(n)}),[n]),(0,h.jsx)("div",{children:r?(0,h.jsx)(d.Z,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:g,onChange:function(e){j(e.target.value)},onBlur:a()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==g||null===(n=g.replaceAll(" ",""))||void 0===n?void 0:n.length)<=0)){e.next=3;break}return p.ZP.error("试卷标题不能为空"),e.abrupt("return");case 3:return e.next=5,t(g);case 5:e.sent&&f(!1);case 7:case"end":return e.stop()}}),e)}))),onPressEnter:a()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==g||null===(n=g.replaceAll(" ",""))||void 0===n?void 0:n.length)<=0)){e.next=3;break}return p.ZP.error("试卷标题不能为空"),e.abrupt("return");case 3:return e.next=5,t(g);case 5:e.sent&&f(!1);case 7:case"end":return e.stop()}}),e)})))}):(0,h.jsxs)("div",{className:m.Z.title,children:[g,(0,h.jsx)(u.Z,{title:"点击编辑试卷名称",children:(0,h.jsx)("i",{className:"".concat(m.Z.editIcon," iconfont icon-bianji_Hover"),onClick:function(){return f(!0)}})})]})})}},41920:function(e,n,t){t.r(n),t.d(n,{default:function(){return It},useCourseOptions:function(){return Ct}});var i=t(26801),s=t.n(i),l=t(98190),a=t.n(l),r=t(10574),c=t.n(r),o=t(39343),u=t.n(o),d=t(11006),p=t.n(d),m=t(59301),h=t(22211),f=t(78241),x=t(66104),v=t(8591),g=t(71418),j=t(1056),_=t(19842),y=t(5112),b=t(85731),w=t(3113),k=t(84527),Z=t(74251),N=t(59650),C=t(97598),I=t(43418),P=t(20834),A=t(81228),E=t(59981),S=t(38854),q="moreSpan___hbStq",T="bg___Ya739",F="title___BC46y",B="bottomdiv___uaPr6",D="spanBtn___jjgnA",M="addQuestionBtn___qOlYW",L="saveBtn___ulgem",R="left___i8aTX",O="scrollWrapper___Jk80T",z="Button___auxWm",V="titleleft___xZGbq",U="more_style___nhWCX",H="qcount___ID7OA",W="score___T7dbm",K="qtitle___qJBFd",Y="qcountclick___m_VKG",G="right___CBabI",J="edit___WHuql",Q="delete___Pa6db",X="shixun___oObBe",$="scoreByBlankRadio___r4AWn",ee="scoreinput___O8EhL",ne="modalconfirm___Ru9B_",te="scoremodal___BdW7P",ie="close___blHYk",se="content___jlm9o",le="items___i3TrH",ae="bottom___zMQZ6",re="yes___lOPY6",ce="no___gtzKI",oe="formcenter___fCxkm",ue="radiogroup___oXWHc",de="easy___ANNVD",pe="medium___ov7N3",me="hard___n4afW",he="formcenterselect___lYa4f",fe="selectitems___c9Pt5",xe="morebottom____I_ev",ve="titleTooltip___CAyYg",ge=t(85578),je=t(15830),_e=t(57732),ye=t(93923),be=t.n(ye),we=t(6848),ke=t(45591),Ze=t(80416),Ne=t(37712),Ce=function(e){var n=e.Itemid,t=e.setqitem,i=e.qitem,l=e.data,a=e.getdata,r=e.bigitem,o=e.setBigqitem,d=e.isedit,h=(0,m.useState)([]),f=p()(h,2),x=f[0],j=f[1],_=(0,m.useState)(!1),y=p()(_,2),b=y[0],w=y[1];(0,m.useEffect)((function(){l.length>0&&j(be()(l)||[])}),[l]);var k=function(){var e=u()(c()().mark((function e(t,i){var s;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d){e.next=3;break}return v.ZP.info("请先保存或取消当前正在编辑的试题。"),e.abrupt("return");case 3:if(t.destination){e.next=5;break}return e.abrupt("return");case 5:return w(!0),e.next=8,(0,je.ZP)("/api/examination_banks/".concat(n,"/examination_banks_item_banks/").concat(null==i?void 0:i[t.source.index].question_id,"/adjust_position.json"),{method:"post",body:{id:n,itemid:null==i?void 0:i[t.source.index].question_id,position:t.destination.index}});case 8:s=e.sent,w(!1),0===s.status&&a({id:null==i?void 0:i[t.source.index].question_id});case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();return(0,Ne.jsx)("div",{children:(0,Ne.jsx)(ke.Z5,{onDragEnd:function(e){return k(e,x)},children:(0,Ne.jsx)(ke.bK,{droppableId:"droppable",children:function(e,n){return(0,Ne.jsxs)("div",s()(s()({ref:e.innerRef},e.droppableProps),{},{children:[(0,Ne.jsx)(g.Z,{spinning:b,children:x.map((function(e,n){return(0,Ne.jsx)(ke._l,{draggableId:n.toString(),index:n,children:function(l,a){var c;return(0,Ne.jsx)("aside",s()(s()(s()({ref:l.innerRef},l.draggableProps),l.dragHandleProps),{},{children:(0,Ne.jsx)(we.Z,{title:(0,Ne.jsx)(Ze.Z,{value:e.question_title}),color:"#fff",placement:"left",overlayClassName:ve,children:(0,Ne.jsxs)("div",{onClick:function(){d?v.ZP.info("请先保存或取消当前正在编辑的试题。"):(t(s()(s()({},e),{},{index:n+1})),o(r),(0,ge.k3)())},className:"".concat(H," ").concat(e.question_id===(null==i?void 0:i.question_id)?Y:""),children:[(0,Ne.jsxs)("span",{className:W,children:[null==e?void 0:e.question_score,"分"]}),(0,Ne.jsxs)("span",{className:K,children:[n+1,"、",(0,Ne.jsx)(Ze.Z,{value:8===(null==e?void 0:e.question_type)?null==e||null===(c=e.program_attr)||void 0===c?void 0:c.description:e.question_title,showTextOnly:!0})]})]})})}))}},n)}))}),e.placeholder]}))}})})})},Ie=t(62182),Pe=t(57809),Ae=t(78673),Ee=t(42884),Se=t(20114),qe=t(98815),Te=t(80045),Fe=function(e){var n,t=e.form,i=e.TagDiscipline,s=e.exerciseitem,l=e.qitem,a=e.getTagData,r=(0,m.useState)(!1),o=p()(r,2),d=o[0],h=o[1],x=(0,m.useState)(!1),g=p()(x,2),_=g[0],b=g[1],k=(0,m.useState)(""),Z=p()(k,2),N=Z[0],C=Z[1];return(0,m.useEffect)((function(){var e;d&&t.setFieldsValue({difficulty:l.difficulty||2,tag_discipline_ids:(null==i||null===(e=i.tag_disciplines)||void 0===e||null===(e=e.filter((function(e){return(null==e?void 0:e.id)===l.tag_discipline_ids})))||void 0===e?void 0:e.length)>0?l.tag_discipline_ids:"",repeat_answer:!l.repeat_answer})}),[d]),(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)("div",{onClick:function(){h(!d)},style:{width:"100%",textAlign:"center",color:"#3061D0",marginTop:50,cursor:"pointer"},children:["更多设置 ",d?(0,Ne.jsx)(Se.Z,{}):(0,Ne.jsx)(Ee.Z,{})]}),(0,Ne.jsxs)("div",{style:{marginTop:30,overflow:"hidden",height:d?"100%":0},children:[(0,Ne.jsx)(f.Z.Item,{className:oe,rules:[{required:!0,message:"请先选择难度"}],label:"难度",name:"difficulty",children:(0,Ne.jsxs)(y.ZP.Group,{className:ue,children:[(0,Ne.jsx)(y.ZP.Button,{className:de,value:1,children:"简单"}),(0,Ne.jsx)(y.ZP.Button,{className:pe,value:2,children:"适中"}),(0,Ne.jsx)(y.ZP.Button,{className:me,value:3,children:"困难"})]})}),(0,Ne.jsx)(f.Z.Item,{className:he,label:"知识点",children:(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsx)(f.Z.Item,{name:"tag_discipline_ids",style:{marginBottom:12},children:(0,Ne.jsx)(Pe.default,{className:fe,showSearch:!0,listHeight:200,dropdownStyle:{zIndex:9},allowClear:!0,optionFilterProp:"children",filterOption:function(e,n){return n.key.indexOf(e.toLowerCase())>=0},children:null==i||null===(n=i.tag_disciplines)||void 0===n?void 0:n.map((function(e){return(0,Ne.jsx)(Pe.default.Option,{value:e.id,children:(0,Ne.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,Ne.jsx)("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e.name}),(0,Ne.jsx)("span",{children:"personal"===e.type?"(自用)":""})]})},e.name+e.id)}))})}),(0,Ne.jsxs)("div",{style:{marginLeft:20,marginTop:"-16px",lineHeight:"48px",height:48,fontSize:14},children:[(0,Ne.jsx)("span",{children:"没有合适的知识点?"}),(0,Ne.jsx)("a",{onClick:function(){b(!0)},style:{marginLeft:3,color:"#3061D0"},children:"新建知识点"})]})]})}),(0,Ne.jsx)(f.Z.Item,{className:he,children:(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsx)(f.Z.Item,{name:"repeat_answer",valuePropName:"checked",children:(0,Ne.jsx)(Ae.Z,{})}),(0,Ne.jsxs)("div",{style:{marginLeft:10,marginTop:"-16px",lineHeight:"40px",height:48,color:"#000000"},children:["不允许学生重复答题",(0,Ne.jsx)(we.Z,{placement:"right",title:"选中后,学生必须作答完成才能进入下一题,且进入下一题之后不允许再修改该题答案",children:(0,Ne.jsx)(qe.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})]})]})})]}),(0,Ne.jsxs)(I.Z,{title:!1,footer:!1,open:_,width:640,centered:!0,closable:!1,className:te,children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsx)("div",{className:F,children:"新建知识点"}),(0,Ne.jsx)("span",{onClick:function(){return b(!1)},className:ie,children:"X"})]}),(0,Ne.jsxs)("div",{children:[(0,Ne.jsx)(Te.Z,{style:{color:"#FF8C29",marginRight:10}}),"新建的知识点仅本人可见,平台审核列入公开知识点后,对所有用户可见。 平台有权删除不合适的知识点,请认真填写知识点名称。"]}),(0,Ne.jsx)(j.Z,{showCount:!0,maxLength:20,style:{marginBottom:30,marginTop:30,height:46},onChange:function(e){C(e.target.value)},placeholder:"请输入知识点名称"}),(0,Ne.jsxs)("div",{className:ae,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){b(!1)},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:u()(c()().mark((function e(){var n,i,l;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N){e.next=3;break}return v.ZP.info("知识点名称不能为空"),e.abrupt("return");case 3:return e.next=5,(0,je.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:N,sub_discipline_id:null==s||null===(n=s.exercise)||void 0===n?void 0:n.sub_discipline_id}});case 5:0===(null==(i=e.sent)?void 0:i.status)&&(t.setFieldsValue({knowledge:N}),a(null===(l=s.exercise)||void 0===l?void 0:l.sub_discipline_id)),b(!1);case 8:case"end":return e.stop()}}),e)}))),children:"确认"})]})]})]})},Be=function(e){var n=e.qitem,t=e.setisedit,i=e.TagDiscipline,l=e.exerciseitem,a=e.seveeditor,r=e.deleteitem,o=e.getTagData,d=e.init,h=f.Z.useForm(),x=p()(h,1)[0];return(0,m.useEffect)((function(){var e;x.setFieldsValue(s()(s()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)}))}),[n]),(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)(f.Z,{form:x,colon:!1,onFinish:function(e){var t,i=s()(s()({},e),{},{item_type:null==n?void 0:n.question_type,choices:null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e){return s()(s()({},e),{},{is_answer:e.standard_boolean})}))});a(s()(s()({},n),i))},onFinishFailed:function(){var e=u()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),x.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsxs)("div",{style:{flex:1},children:[(0,Ne.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,Ne.jsx)("span",{children:1===(null==n?void 0:n.question_type)?"多选题":"单选题"})]}),1===(null==n?void 0:n.question_type)&&(0,Ne.jsx)(f.Z.Item,{name:"use_blank_score",noStyle:!0,children:(0,Ne.jsx)(y.ZP.Group,{className:$,optionType:"button",options:[{label:"全对给分",value:!1},{label:"漏选给分",value:!0}]})}),(0,Ne.jsx)(f.Z.Item,{className:ee,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,Ne.jsx)(b.Z,{style:{width:150},placeholder:"请输入当前小题分数",max:100,min:.1})}),(0,Ne.jsxs)("span",{style:{marginLeft:20,color:"red",cursor:"pointer"},onClick:function(){r()},children:[(0,Ne.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]})]}),(0,Ne.jsx)(Ie.u,{form:x,questionTitlePlaceholder:"请编辑选择题题干内容",titleKey:"name",choiceKey:"choices",analysisKey:"analysis",choiceOptionsPath:"choices",choiceTextKey:"choice_text",answerKey:"standard_boolean"}),(0,Ne.jsx)(Fe,{getTagData:o,qitem:n,exerciseitem:l,TagDiscipline:i,form:x})]}),(0,Ne.jsxs)("div",{className:xe,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e;x.setFieldsValue(s()(s()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)}))},children:"重置"}),(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e;n.isadd?(t(!1),d()):(x.setFieldsValue(s()(s()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)})),t(!1))},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:u()(c()().mark((function e(){return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.submit();case 1:case"end":return e.stop()}}),e)}))),children:"保存题目"})]})]})},De=t(98608),Me=function(e){var n=e.qitem,t=e.TagDiscipline,i=e.exerciseitem,l=e.setisedit,a=e.seveeditor,r=e.deleteitem,o=e.getTagData,d=e.init,h=f.Z.useForm(),x=p()(h,1)[0],g=f.Z.useWatch("use_blank_score",x);return(0,m.useEffect)((function(){x.setFieldsValue(s()(s()({},n),{},{standard_answers:n.standard_answer||[],name:n.question_title,repeat_answer:!n.repeat_answer}))}),[n]),(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)(f.Z,{form:x,colon:!1,onValuesChange:function(e,n){if(null!=e&&e.standard_answers){var t,i,s,l=(null===(t=x.getFieldValue("standard_answers"))||void 0===t?void 0:t.length)>0&&(null===(i=x.getFieldValue("standard_answers"))||void 0===i||null===(i=i.map((function(e){return e.score})))||void 0===i?void 0:i.filter((function(e){return e})));if((null==l?void 0:l.length)>0)x.setFieldsValue({question_score:(null==l?void 0:l.length)>0&&(null===(s=l.reduce((function(e,n){return e+n})))||void 0===s?void 0:s.toFixed(1))})}},onFinish:function(e){var t;a(s()(s()(s()({},n),e),{},{item_type:null==n?void 0:n.question_type,standard_answers:null===(t=e.standard_answers)||void 0===t?void 0:t.map((function(e,n){return s()(s()({},e),{},{position:e.choice_id||n+1})})),standard_answer:void 0}))},onFinishFailed:function(){var e=u()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),x.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsxs)("div",{style:{flex:1},children:[(0,Ne.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,Ne.jsx)("span",{children:"填空题"})]}),(0,Ne.jsx)(f.Z.Item,{name:"use_blank_score",noStyle:!0,children:(0,Ne.jsx)(y.ZP.Group,{className:$,optionType:"button",options:[{label:"按空给分",value:!0},{label:"按题给分",value:!1}]})}),(0,Ne.jsx)(f.Z.Item,{className:ee,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,Ne.jsx)(b.Z,{style:{width:150},placeholder:"请输入当前小题分数",size:"middle",disabled:g,max:100,min:.1})}),(0,Ne.jsxs)("span",{style:{marginLeft:20,color:"red",cursor:"pointer"},onClick:function(){r()},children:[(0,Ne.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}})," 删除"]})]}),(0,Ne.jsx)(De.u,{form:x,questionTitlePlaceholder:"请编辑填空题题干内容",scoreByBlank:g,answerKey:"standard_answers"}),(0,Ne.jsx)(Fe,{getTagData:o,qitem:n,exerciseitem:i,TagDiscipline:t,form:x})]}),(0,Ne.jsxs)("div",{className:xe,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){x.setFieldsValue(s()(s()({},n),{},{standard_answers:n.standard_answer,name:n.question_title,repeat_answer:!n.repeat_answer}))},children:"重置"}),(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){n.isadd?(l(!1),d()):(x.setFieldsValue(s()(s()({},n),{},{standard_answers:n.standard_answer,name:n.question_title,repeat_answer:!n.repeat_answer})),l(!1))},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:function(){x.submit()},children:"保存题目"})]})]})},Le=t(74215),Re=function(e){var n=e.qitem,t=e.setisedit,i=e.TagDiscipline,l=e.exerciseitem,a=e.seveeditor,r=e.deleteitem,o=e.getTagData,d=e.init,h=f.Z.useForm(),x=p()(h,1)[0];return(0,m.useEffect)((function(){var e;x.setFieldsValue(s()(s()({},n),{},{name:n.question_title,repeat_answer:!n.repeat_answer,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})}))}))}),[n]),(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)(f.Z,{form:x,colon:!1,onFinish:function(e){a(s()(s()({},n),e))},onFinishFailed:function(){var e=u()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),x.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsxs)("div",{style:{flex:1},children:[(0,Ne.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,Ne.jsx)("span",{children:"判断题"})]}),(0,Ne.jsx)(f.Z.Item,{className:ee,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,Ne.jsx)(b.Z,{style:{width:150},placeholder:"请输入当前小题分数",max:100,min:.1})}),(0,Ne.jsxs)("span",{style:{marginLeft:20,color:"red",cursor:"pointer"},onClick:function(){r()},children:[(0,Ne.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]})]}),(0,Ne.jsx)(Le.Z,{form:x,questionTitlePlaceholder:"请编辑判断题题干内容",choiceKey:""}),(0,Ne.jsx)(Fe,{getTagData:o,qitem:n,exerciseitem:l,TagDiscipline:i,form:x})]}),(0,Ne.jsxs)("div",{className:xe,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e;x.setFieldsValue(s()(s()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)}))},children:"重置"}),(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e;n.isadd?(t(!1),d()):(x.setFieldsValue(s()(s()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)})),t(!1))},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:function(){x.submit()},children:"保存题目"})]})]})},Oe=t(14755),ze=function(e){var n=e.qitem,t=e.setisedit,i=e.TagDiscipline,l=e.exerciseitem,a=e.seveeditor,r=e.deleteitem,o=e.getTagData,d=e.init,h=f.Z.useForm(),x=p()(h,1)[0];return(0,m.useEffect)((function(){var e;x.setFieldsValue(s()(s()({},n),{},{name:n.question_title,sub_item_banks:null===(e=n.sub_exercise_questions)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{name:e.question_title,choices:e.question_choices.map((function(e){return s()(s()({},e),{},{is_answer:null!=e&&e.standard_boolean?1:0})}))})})),repeat_answer:!n.repeat_answer}))}),[n]),(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)(f.Z,{form:x,colon:!1,onValuesChange:function(e,n){if(null!=e&&e.sub_item_banks){var t,i,s=(null===(t=x.getFieldValue("sub_item_banks"))||void 0===t?void 0:t.length)>0&&(null===(i=x.getFieldValue("sub_item_banks"))||void 0===i||null===(i=i.map((function(e){return e.question_score})))||void 0===i?void 0:i.filter((function(e){return e})));(null==s?void 0:s.length)>0&&x.setFieldsValue({question_score:parseFloat(null==s?void 0:s.reduce((function(e,n){return parseFloat(e)+parseFloat(n)}))).toFixed(1)})}},onFinish:function(e){var t;a(s()(s()(s()({},n),e),{},{sub_item_banks:null==e||null===(t=e.sub_item_banks)||void 0===t?void 0:t.map((function(e){return s()(s()({},e),{},{item_type:0,id:(null==e?void 0:e.question_id)||""})}))}))},onFinishFailed:function(){var e=u()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),x.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsxs)("div",{style:{flex:1},children:[(0,Ne.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,Ne.jsx)("span",{children:"组合题"})]}),(0,Ne.jsx)(f.Z.Item,{className:ee,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,Ne.jsx)(b.Z,{style:{width:150},placeholder:"请输入当前小题分数",disabled:!0,max:100,min:.1})}),(0,Ne.jsxs)("span",{style:{marginLeft:20,color:"red",cursor:"pointer"},onClick:function(){r()},children:[(0,Ne.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]})]}),(0,Ne.jsx)(Oe.r,{form:x,withScore:!0,choiceKey:"",questionTitlePlaceholder:"请编辑组合题题干内容"}),(0,Ne.jsx)(Fe,{getTagData:o,qitem:n,exerciseitem:l,TagDiscipline:i,form:x})]}),(0,Ne.jsxs)("div",{className:xe,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e;x.setFieldsValue(s()(s()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)}))},children:"重置"}),(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e;n.isadd?(t(!1),d()):(x.setFieldsValue(s()(s()({},n),{},{name:null==n?void 0:n.question_title,choices:null==n||null===(e=n.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=n&&n.repeat_answer)})),t(!1))},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:function(){x.submit()},children:"保存题目"})]})]})},Ve=t(29918),Ue=t(24334),He=function(e){var n=e.qitem,t=e.TagDiscipline,i=e.exerciseitem,l=e.setisedit,a=e.seveeditor,r=e.deleteitem,o=e.getTagData,d=e.init,h=f.Z.useForm(),x=p()(h,1)[0];return(0,m.useEffect)((function(){var e,t,i,l;x.setFieldsValue(s()(s()({},n),{},{standard_answers:n.standard_answer,difficulty:n.difficulty,item_banks_group_id:n.item_banks_group_id,hack:s()(s()({},n),{},{time_limit:(null==n||null===(e=n.hack)||void 0===e?void 0:e.time_limit)||3}),hack_codes:{language:null==n||null===(t=n.program_attr)||void 0===t?void 0:t.language,code:Ue.Base64.decode((null==n||null===(i=n.program_attr)||void 0===i?void 0:i.code)||"")},hack_sets:s()({},null==n||null===(l=n.hack_sets)||void 0===l?void 0:l[0]),repeat_answer:!n.repeat_answer}))}),[n]),(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)(f.Z,{form:x,colon:!1,onValuesChange:function(e,n){if(null!=e&&e.standard_answers){var t,i,s,l=(null===(t=x.getFieldValue("standard_answers"))||void 0===t?void 0:t.length)>0&&(null===(i=x.getFieldValue("standard_answers"))||void 0===i||null===(i=i.map((function(e){return e.score})))||void 0===i?void 0:i.filter((function(e){return e})));if((null==l?void 0:l.length)>0)x.setFieldsValue({question_score:(null==l?void 0:l.length)>0&&(null===(s=l.reduce((function(e,n){return e+n})))||void 0===s?void 0:s.toFixed(1))})}},onFinish:function(e){var t;a(s()(s()(s()({},n),e),{},{item_type:null==n?void 0:n.question_type,standard_answers:null===(t=e.standard_answers)||void 0===t?void 0:t.map((function(e,n){return s()(s()({},e),{},{position:e.choice_id||n+1})})),standard_answer:void 0}))},onFinishFailed:function(){var e=u()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),x.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsxs)("div",{style:{flex:1},children:[(0,Ne.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,Ne.jsx)("span",{children:"程序填空题"})]}),(0,Ne.jsx)(f.Z.Item,{className:ee,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,Ne.jsx)(b.Z,{style:{width:150},placeholder:"请输入当前小题分数",size:"middle",disabled:!0,max:100,min:.1})}),(0,Ne.jsxs)("span",{style:{marginLeft:20,color:"red",cursor:"pointer"},onClick:function(){r()},children:[(0,Ne.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}})," 删除"]})]}),(0,Ne.jsx)(Ve.t,{form:x,questionTitlePlaceholder:"请编辑填空题题干内容",scoreByBlank:!0,hackidentifier:null==n?void 0:n.hack_identifier,answerKey:"standard_answers"}),(0,Ne.jsx)(Fe,{getTagData:o,qitem:n,exerciseitem:i,TagDiscipline:t,form:x})]}),(0,Ne.jsxs)("div",{className:xe,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e,t,i;x.setFieldsValue(s()(s()({},n),{},{standard_answers:n.standard_answer,difficulty:n.difficult,item_banks_group_id:n.item_banks_group_id,hack:s()({},n),hack_codes:{language:null==n||null===(e=n.program_attr)||void 0===e?void 0:e.language,code:Ue.Base64.decode(null==n||null===(t=n.program_attr)||void 0===t?void 0:t.code)},hack_sets:s()({},null==n||null===(i=n.hack_sets)||void 0===i?void 0:i[0]),repeat_answer:!n.repeat_answer}))},children:"重置"}),(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e,t,i;n.isadd?(l(!1),d()):(x.setFieldsValue(s()(s()({},n),{},{standard_answers:n.standard_answer,difficulty:n.difficult,item_banks_group_id:n.item_banks_group_id,hack:s()({},n),hack_codes:{language:null==n||null===(e=n.program_attr)||void 0===e?void 0:e.language,code:Ue.Base64.decode(null==n||null===(t=n.program_attr)||void 0===t?void 0:t.code)},hack_sets:s()({},null==n||null===(i=n.hack_sets)||void 0===i?void 0:i[0]),repeat_answer:!n.repeat_answer})),l(!1))},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:function(){x.submit()},children:"保存题目"})]})]})},We=t(22387),Ke=function(e){var n,t=e.qitem,i=e.setqitem,l=e.setisedit,a=(e.TagDiscipline,e.exerciseitem,e.seveeditor),r=e.deleteitem,o=f.Z.useForm(),d=p()(o,1)[0];return(0,m.useEffect)((function(){var e,n;d.setFieldsValue(s()(s()({},t),{},{name:null==t?void 0:t.question_title,choices:null==t||null===(e=t.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=t&&t.repeat_answer)})),t.shixun=null==t||null===(n=t.shixun)||void 0===n?void 0:n.map((function(e){return s()(s()({},e),{},{defaultscore:e.challenge_score})}))}),[]),(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)(f.Z,{form:d,colon:!1,onFinish:function(e){var n,i,l=s()(s()({},e),{},{question_scores:null==t||null===(n=t.shixun)||void 0===n?void 0:n.map((function(e){return e.challenge_score})),item_type:null==t?void 0:t.question_type,choices:null==e||null===(i=e.choices)||void 0===i?void 0:i.map((function(e){return s()(s()({},e),{},{is_answer:e.standard_boolean})}))});a(s()(s()({},t),l))},onFinishFailed:function(){var e=u()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),d.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsxs)("div",{style:{flex:1},children:[(0,Ne.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,Ne.jsx)("span",{children:"实训题"})]}),(0,Ne.jsx)(f.Z.Item,{className:ee,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,Ne.jsx)(b.Z,{style:{width:150},placeholder:"请输入当前小题分数",disabled:!0,max:100,min:.1})}),(0,Ne.jsxs)("span",{style:{marginLeft:20,color:"red",cursor:"pointer"},onClick:function(){r()},children:[(0,Ne.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]})]}),(0,Ne.jsx)(f.Z.Item,{label:"题干",name:"question_title",labelCol:{span:24},rules:[{required:!0}],children:(0,Ne.jsx)(We.Z,{watch:!0,height:140,placeholder:"",defaultValue:t.question_title})})]}),(0,Ne.jsx)("div",{children:(0,Ne.jsxs)("p",{children:[(0,Ne.jsx)("span",{style:{color:"red"},children:"*"}),"关卡名称"]})}),null==t||null===(n=t.shixun)||void 0===n?void 0:n.map((function(e,n){return(0,Ne.jsxs)("div",{style:{display:"flex",marginBottom:20},children:[(0,Ne.jsxs)("div",{style:{flex:1},children:[n+1,"、",e.challenge_name]}),(0,Ne.jsxs)("div",{children:[(0,Ne.jsx)("span",{style:{color:"red"},children:"*"}),"分值",(0,Ne.jsx)(b.Z,{value:null==e?void 0:e.challenge_score,onChange:function(n){var l;e.challenge_score=n;var a=parseFloat(null==t||null===(l=t.shixun)||void 0===l?void 0:l.map((function(e){return e.challenge_score})).reduce((function(e,n){return parseFloat(e)+parseFloat(n)})));d.setFieldsValue({question_score:a}),i(s()({},t))},max:100,min:1,style:{marginLeft:10,width:150},placeholder:"请输入当前小题分数",size:"middle"})]})]})})),(0,Ne.jsxs)("div",{className:xe,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e,n;d.setFieldsValue(s()(s()({},t),{},{name:null==t?void 0:t.question_title,choices:null==t||null===(e=t.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=t&&t.repeat_answer)})),t.shixun=null==t||null===(n=t.shixun)||void 0===n?void 0:n.map((function(e){return s()(s()({},e),{},{challenge_score:e.defaultscore})})),i(s()({},t))},children:"重置"}),(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){var e,n;d.setFieldsValue(s()(s()({},t),{},{name:null==t?void 0:t.question_title,choices:null==t||null===(e=t.question_choices)||void 0===e?void 0:e.map((function(e){return s()(s()({},e),{},{standard_boolean:null!=e&&e.standard_boolean?1:0})})),repeat_answer:!(null!=t&&t.repeat_answer)})),t.shixun=null==t||null===(n=t.shixun)||void 0===n?void 0:n.map((function(e){return s()(s()({},e),{},{challenge_score:e.defaultscore})})),i(s()({},t)),l(!1)},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:u()(c()().mark((function e(){var n,i,s;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==t||null===(n=t.shixun)||void 0===n||null===(i=n.map)||void 0===i?void 0:i.call(n,(function(e){return e.challenge_score})).filter((function(e){return e})).length)<(null==t||null===(s=t.shixun)||void 0===s?void 0:s.length))){e.next=3;break}return v.ZP.info("分数不能为空"),e.abrupt("return");case 3:d.submit();case 4:case"end":return e.stop()}}),e)}))),children:"保存题目"})]})]})},Ye="warp___w1JUC",Ge="indexTag___LPncW",Je="normalWrap___pEIzs",Qe="redio___I6tXM",Xe="redioitem___cS4Gp",$e="redioitemyes___JBDmk",en="title___XAohQ",nn="titleyes____bNQk",tn="yestag___zQnb1",sn="checkbox___MHadU",ln="checkboxitem___KX7mB",an="checkboxitemyes___MpOWf",rn="bottom___FkHfO",cn="bottomitem___AS0Qp",on="left___U23z1",un="right___yJVEk",dn="completion___Bu5G6",pn="content___LySPW",mn="items___ETMq9",hn="simple___XX5t0",fn="shixunWrapper___w6oIG",xn="shixun___ePWKn",vn="score___nGh9k",gn="qtitle___DAMW1",jn="program___Mm1qL",_n="combination___Sw7S6",yn="qtype___Xdl60",bn=t(95237),wn=t(43604),kn=["A.","B.","C.","D.","E.","F.","G.","H.","I.","J.","K.","L.","M.","N.","O.","P.","Q.","R.","S.","T.","U.","V.","W.","X.","Y.","Z."],Zn=function(e){var n,t,i,s,l,a,r,c,o,u=e.qitem;return(0,Ne.jsxs)("div",{className:Ye,children:[(0===(null==u?void 0:u.question_type)||2===(null==u?void 0:u.question_type))&&(0,Ne.jsx)("div",{className:Je,children:null==u||null===(n=u.question_choices)||void 0===n?void 0:n.map((function(e,n){return(0,Ne.jsxs)("div",{className:Qe,children:[!(null!=e&&e.standard_boolean)&&(0,Ne.jsx)("span",{className:Xe}),(null==e?void 0:e.standard_boolean)&&(0,Ne.jsx)("i",{className:"".concat($e," icon-duigou1")}),(0,Ne.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?nn:en," ").concat(Ge),children:0===(null==u?void 0:u.question_type)?kn[n]:""}),(0,Ne.jsx)(Ze.Z,{className:null!=e&&e.standard_boolean?nn:en,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,Ne.jsx)("div",{className:tn,children:"正确答案"})]},n)}))}),1===(null==u?void 0:u.question_type)&&(0,Ne.jsx)("div",{className:Je,children:null==u||null===(t=u.question_choices)||void 0===t?void 0:t.map((function(e,n){return(0,Ne.jsxs)("div",{className:sn,children:[!(null!=e&&e.standard_boolean)&&(0,Ne.jsx)("span",{className:ln}),(null==e?void 0:e.standard_boolean)&&(0,Ne.jsx)("i",{className:"".concat(an," icon-duigou1")}),(0,Ne.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?nn:en," ").concat(Ge),children:kn[n]}),(0,Ne.jsx)(Ze.Z,{className:null!=e&&e.standard_boolean?nn:en,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,Ne.jsx)("div",{className:tn,children:"正确答案"})]},n)}))}),3===(null==u?void 0:u.question_type)&&(0,Ne.jsx)("div",{className:dn,children:null==u||null===(i=u.standard_answer)||void 0===i?void 0:i.map((function(e,n){var t;return(0,Ne.jsxs)("div",{style:{display:"flex"},children:[(0,Ne.jsxs)("span",{className:en,children:["填空项",n+1]}),(0,Ne.jsx)(bn.Z,{gutter:[30,20],className:"".concat(pn," mb20"),children:null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,n){return(0,Ne.jsx)(wn.Z,{children:(0,Ne.jsx)("div",{className:mn,children:e})},n)}))})]},n)}))}),4===(null==u?void 0:u.question_type)&&(0,Ne.jsxs)("div",{className:hn,children:[(0,Ne.jsx)("span",{className:en,children:"参考答案"}),(0,Ne.jsx)(Ze.Z,{className:pn,value:(null==u||null===(s=u.standard_answer)||void 0===s?void 0:s[0])||""})]}),5===(null==u?void 0:u.question_type)&&(0,Ne.jsx)("div",{className:fn,children:null==u||null===(l=u.shixun)||void 0===l?void 0:l.map((function(e,n){return(0,Ne.jsxs)("div",{className:"".concat(xn," mb30"),children:[(0,Ne.jsxs)("span",{className:vn,children:["(",null==e?void 0:e.challenge_score,"分)"]}),(0,Ne.jsxs)("span",{className:gn,children:[(null==u?void 0:u.index)+"."+(n+1),"、",null==e?void 0:e.challenge_name]})]},n)}))}),6===(null==u?void 0:u.question_type)&&(0,Ne.jsx)("div",{className:jn,children:(0,Ne.jsx)(Ze.Z,{className:pn,value:(null==u?void 0:u.description)||"- -"})}),7===(null==u?void 0:u.question_type)&&(null==u||null===(a=u.sub_exercise_questions)||void 0===a?void 0:a.map((function(e,n){var t;return(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)("div",{className:_n,children:[(0,Ne.jsxs)("span",{className:vn,children:[null==e?void 0:e.question_score,"分"]}),(0,Ne.jsx)("span",{className:yn,children:"单选题"}),(0,Ne.jsxs)("span",{className:gn,children:[n+1,"、",null==e?void 0:e.question_title]})]}),(0,Ne.jsx)("div",{className:Ye,style:{padding:"30px 58px",paddingBottom:0},children:(0,Ne.jsx)("div",{children:null==e||null===(t=e.question_choices)||void 0===t?void 0:t.map((function(e,n){return(0,Ne.jsxs)("div",{className:Qe,children:[!(null!=e&&e.standard_boolean)&&(0,Ne.jsx)("span",{className:Xe}),(null==e?void 0:e.standard_boolean)&&(0,Ne.jsx)("i",{className:"".concat($e," icon-duigou1")}),(0,Ne.jsx)("span",{className:"".concat(null!=e&&e.standard_boolean?nn:en," ").concat(Ge),children:kn[n]}),(0,Ne.jsx)(Ze.Z,{className:null!=e&&e.standard_boolean?nn:en,value:null==e?void 0:e.choice_text}),(null==e?void 0:e.standard_boolean)&&(0,Ne.jsx)("div",{className:tn,children:"正确答案"})]},n)}))})})]},n)}))),8===(null==u?void 0:u.question_type)&&(0,Ne.jsx)("div",{children:(0,Ne.jsx)(Ze.Z,{disabledFill:!0,className:pn,showProgramFill:!0,value:Ue.Base64.decode((null==u||null===(r=u.program_attr)||void 0===r?void 0:r.code)||"")})}),((null==u?void 0:u.question_type)<=4||[6,8].includes(null==u?void 0:u.question_type))&&(0,Ne.jsxs)("div",{className:rn,children:[(0,Ne.jsxs)("div",{className:"".concat(cn," mb30"),children:[(0,Ne.jsx)("span",{className:on,children:"解析"}),(0,Ne.jsx)(Ze.Z,{className:un,value:(null==u?void 0:u.analysis)||""})]}),(0,Ne.jsxs)("div",{className:"".concat(cn," mb30"),children:[(0,Ne.jsx)("span",{className:on,children:"难度"}),(0,Ne.jsx)("span",{className:un,children:1===(null==u?void 0:u.difficulty)?"简单":2===(null==u?void 0:u.difficulty)?"适中":"困难"})]}),(0,Ne.jsxs)("div",{className:cn,children:[(0,Ne.jsx)("span",{className:on,children:"知识点"}),(0,Ne.jsx)("span",{className:un,children:(null==u||null===(c=u.tag_discipline_names)||void 0===c?void 0:c.length)<=0?"- -":null==u||null===(o=u.tag_discipline_names)||void 0===o?void 0:o.toString()})]})]})]})},Nn=t(65879),Cn=t(20331),In=function(e){var n=e.qitem,t=e.setisedit,i=e.TagDiscipline,l=e.exerciseitem,a=e.seveeditor,r=e.deleteitem,o=e.getTagData,d=e.init,h=f.Z.useForm(),x=p()(h,1)[0];return(0,m.useEffect)((function(){x.setFieldsValue(s()(s()({},n),{},{name:n.question_title,answer_texts:n.standard_answer,repeat_answer:!n.repeat_answer}))}),[n]),(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)(f.Z,{form:x,colon:!1,onFinish:function(e){a(s()(s()({},n),e))},onFinishFailed:function(){var e=u()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.ZP.error(n.errorFields[0].errors[0]),x.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsxs)("div",{style:{flex:1},children:[(0,Ne.jsx)("span",{style:{display:"inline-flex",border:"1px solid #9096A3",borderRadius:"50%",width:10,height:10,marginRight:5,background:"#9096A3"}}),(0,Ne.jsx)("span",{children:"简答题"})]}),(0,Ne.jsx)(f.Z.Item,{className:ee,name:"question_score",label:"分值",rules:[{required:!0,message:"请输入分值"}],children:(0,Ne.jsx)(b.Z,{style:{width:150},placeholder:"请输入当前小题分数",max:100,min:.1})}),(0,Ne.jsxs)("span",{style:{marginLeft:20,color:"red",cursor:"pointer"},onClick:function(){r()},children:[(0,Ne.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除"]})]}),(0,Ne.jsx)(Cn.W,{form:x,showKeywords:!0,questionTitlePlaceholder:"请编辑简答题题干内容"}),(0,Ne.jsx)(Fe,{getTagData:o,qitem:n,exerciseitem:l,TagDiscipline:i,form:x})]}),(0,Ne.jsxs)("div",{className:xe,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){x.setFieldsValue(s()(s()({},n),{},{name:null==n?void 0:n.question_title,answer_texts:n.standard_answer||[],repeat_answer:!(null!=n&&n.repeat_answer)}))},children:"重置"}),(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){n.isadd?(t(!1),d()):(x.setFieldsValue(s()(s()({},n),{},{name:null==n?void 0:n.question_title,answer_texts:n.standard_answer||[],repeat_answer:!(null!=n&&n.repeat_answer)})),t(!1))},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:function(){x.submit()},children:"保存题目"})]})]})},Pn=function(e){var n,t,i=e.setScoreShow,s=e.ScoreShow,l=e.exerciseitem,a=e.getdata,r=(0,m.useState)(!1),o=p()(r,2),d=o[0],h=o[1];function f(){return x.apply(this,arguments)}function x(){return(x=u()(c()().mark((function e(){var n,t,i,s;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==l||null===(n=l.exercise_question_types)||void 0===n||null===(n=n.filter((function(e){return e.Singlequestion})))||void 0===n?void 0:n.map((function(e){return{question_type:e.question_type,score:e.Singlequestion}})),e.next=3,(0,je.ZP)("/api/examination_banks/".concat(null==l||null===(t=l.exercise)||void 0===t?void 0:t.id,"/batch_set_score.json"),{method:"POST",body:{question_arr:i}});case 3:0===(null==(s=e.sent)?void 0:s.status)&&a();case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,Ne.jsxs)("div",{children:[s&&(0,Ne.jsxs)(I.Z,{title:!1,footer:!1,open:s,width:640,centered:!0,zIndex:10,closable:!1,className:te,onCancel:function(){i(!1)},children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Ne.jsxs)("div",{className:F,children:["批量设置分值",(0,Ne.jsxs)("div",{className:W,children:["总分 ",(null==l?void 0:l.exercise_question_types.length)>0&&(null==l||null===(n=l.exercise_types)||void 0===n?void 0:n.q_scores)]})]}),(0,Ne.jsx)("span",{onClick:function(){return i(!1)},className:ie,children:"X"})]}),(0,Ne.jsxs)("div",{className:se,children:[(0,Ne.jsx)("span",{children:"题型名称"}),(0,Ne.jsx)("span",{children:"小题总数"}),(0,Ne.jsx)("span",{children:"题型总分"}),(0,Ne.jsx)("span",{children:"操作"})]}),null==l||null===(t=l.exercise_question_types)||void 0===t||null===(t=t.filter((function(e){return"实训题"!==e.name&&"组合题"!==e.name})))||void 0===t?void 0:t.map((function(e,n){var t;return(0,Ne.jsxs)("div",{className:le,children:[(0,Ne.jsx)("span",{children:null==e?void 0:e.name}),(0,Ne.jsx)("span",{children:null==e||null===(t=e.items)||void 0===t?void 0:t.length}),(0,Ne.jsx)("span",{children:null==e?void 0:e.score}),(0,Ne.jsxs)("span",{children:["每题",(0,Ne.jsx)(b.Z,{min:.1,max:100,onChange:function(n){e.Singlequestion=n},defaultValue:e.Singlequestion,style:{width:90,height:38,margin:"0px 10px",display:"flex",alignItems:"center"}}),"分"]})]},n)})),(0,Ne.jsxs)("div",{className:ae,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){i(!1)},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:function(){var e;null!=l&&l.use_blank_score&&null!=l&&null!==(e=l.exercise_question_types)&&void 0!==e&&null!==(e=e.filter((function(e){return"填空题"===e.name})))&&void 0!==e&&null!==(e=e[0])&&void 0!==e&&e.Singlequestion?h(!0):(f(),i(!1))},children:"确认"})]})]}),(0,Ne.jsxs)(I.Z,{title:!1,footer:!1,centered:!0,open:d,zIndex:20,width:640,closable:!1,className:te,children:[(0,Ne.jsxs)("div",{style:{marginTop:40},children:["填空题中存在",(0,Ne.jsx)("span",{style:{color:"#FA6400"},children:"按空给分"}),"的小题,若批量设置分值会统一将填空题改为按题给分"]}),(0,Ne.jsxs)("div",{className:ae,children:[(0,Ne.jsx)(w.ZP,{className:ce,onClick:function(){h(!1)},children:"取消"}),(0,Ne.jsx)(w.ZP,{className:re,onClick:function(){f(),h(!1),i(!1)},children:"确认"})]})]})]})},An=t(99313),En=t(72315),Sn=t(41867),qn="scoremodal___upTFR",Tn="selectWrapper___HH3RX",Fn="allqingchu___BFF1D",Bn="title___hFasb",Dn="bottom___A1n1C",Mn="yes___P1zzb",Ln="no___xZqXd",Rn="titlecount___fqA9P",On="add___MqV0R",zn="search___NREgv",Vn="searchIcon___qny3A",Un="tabWrap___dR18c",Hn="previewModal___uSiGS",Wn="warp___aLZwN",Kn="mainPart___OdEo7",Yn="shixunbutton___Eoa1i",Gn="redio___LJ4js",Jn="redioitem___YicCC",Qn="redioitemyes___lX4Nr",Xn="title___pi1jH",$n="titleyes___jiEh7",et="yestag___DLWoP",nt="qcount___U9kkL",tt="qtitle___kyg0t",it="checkbox___vjiBw",st="checkboxitem___HW3CP",lt="checkboxitemyes___kpjek",at="bottom___uG8Zq",rt="bottomitem___TnJQQ",ct="left___M8WXX",ot="right____dkCI",ut="completion___H6RmA",dt="content___a2hGC",pt="items___D8mLd",mt="simple___fQ0OS",ht="shixun___nB6Jk",ft="combination___YrOdz",xt="program___lG0JA",vt=["A.","B.","C.","D.","E.","F.","G.","H.","I.","J.","K.","L.","M.","N.","O.","P.","Q.","R.","S.","T.","U.","V.","W.","X.","Y.","Z."],gt=function(e){var n,t,i,s,l,a,r,c,o,u=e.qitem;return(0,Ne.jsxs)("div",{className:Wn,children:[(0,Ne.jsxs)("div",{className:Kn,children:[(0,Ne.jsxs)("div",{className:nt,children:[8===(null==u?void 0:u.question_type)&&(0,Ne.jsx)(Ze.Z,{className:dt,showProgramFill:!0,value:null==u||null===(n=u.program_attr)||void 0===n?void 0:n.description}),8!=(null==u?void 0:u.question_type)&&(0,Ne.jsx)(Ze.Z,{className:tt,value:(null==u?void 0:u.name)||(null==u?void 0:u.title)})]}),(0===(null==u?void 0:u.question_type)||2===(null==u?void 0:u.question_type))&&(0,Ne.jsx)("div",{children:null==u||null===(t=u.choices)||void 0===t?void 0:t.map((function(e,n){return(0,Ne.jsxs)("div",{className:Gn,children:[!(null!=e&&e.is_answer)&&(0,Ne.jsx)("span",{className:Jn}),(null==e?void 0:e.is_answer)&&(0,Ne.jsx)("i",{className:"".concat(Qn," icon-duigou1")}),(0,Ne.jsx)(Ze.Z,{className:null!=e&&e.is_answer?$n:Xn,value:vt[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,Ne.jsx)("div",{className:et,children:"正确答案"})]})}))}),1===(null==u?void 0:u.question_type)&&(0,Ne.jsx)("div",{children:null==u||null===(i=u.choices)||void 0===i?void 0:i.map((function(e,n){return(0,Ne.jsxs)("div",{className:it,children:[!(null!=e&&e.is_answer)&&(0,Ne.jsx)("span",{className:st}),(null==e?void 0:e.is_answer)&&(0,Ne.jsx)("i",{className:"".concat(lt," icon-duigou1")}),(0,Ne.jsx)(Ze.Z,{className:null!=e&&e.is_answer?$n:Xn,value:vt[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,Ne.jsx)("div",{className:et,children:"正确答案"})]})}))}),3===(null==u?void 0:u.question_type)&&(0,Ne.jsx)("div",{className:ut,children:null==u||null===(s=u.standard_answer)||void 0===s?void 0:s.map((function(e,n){var t;return(0,Ne.jsxs)("div",{style:{display:"flex"},children:[(0,Ne.jsxs)("span",{className:Xn,children:["填空项",n+1]}),(0,Ne.jsx)("div",{className:dt,children:null==e||null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,n){return(0,Ne.jsx)("div",{className:pt,children:e})}))})]})}))}),4===(null==u?void 0:u.question_type)&&(0,Ne.jsxs)("div",{className:mt,children:[(0,Ne.jsx)("span",{className:Xn,children:"参考答案"}),(0,Ne.jsx)(Ze.Z,{className:dt,value:(null==u||null===(l=u.answer_texts)||void 0===l?void 0:l[0])||"- -"})]}),5===(null==u?void 0:u.question_type)&&(null==u||null===(a=u.challenge_names)||void 0===a?void 0:a.map((function(e,n){return(0,Ne.jsx)("div",{className:ht,children:(0,Ne.jsxs)("span",{className:tt,children:[(0,Ne.jsxs)("span",{style:{marginRight:10},children:["第",(0,ge.EM)(n+1),"题"]}),e]})})}))),6===(null==u?void 0:u.question_type)&&(0,Ne.jsx)("div",{className:xt,children:(0,Ne.jsx)(Ze.Z,{className:dt,value:(null==u||null===(r=u.program_attr)||void 0===r?void 0:r.description)||"- -"})}),7===(null==u?void 0:u.question_type)&&(null==u||null===(c=u.sub_item_banks)||void 0===c?void 0:c.map((function(e,n){var t;return(0,Ne.jsxs)("div",{children:[(0,Ne.jsx)("div",{className:ft,children:(0,Ne.jsx)("span",{className:tt,children:null==e?void 0:e.name})}),(0,Ne.jsx)("div",{className:Wn,style:{padding:"0px",paddingTop:20},children:(0,Ne.jsx)("div",{children:null==e||null===(t=e.choices)||void 0===t?void 0:t.map((function(e,n){return(0,Ne.jsxs)("div",{className:Gn,children:[!(null!=e&&e.is_answer)&&(0,Ne.jsx)("span",{className:Jn}),(null==e?void 0:e.is_answer)&&(0,Ne.jsx)("i",{className:"".concat(Qn," icon-duigou1")}),(0,Ne.jsx)(Ze.Z,{className:null!=e&&e.is_answer?$n:Xn,value:vt[n]+(null==e?void 0:e.choice_text)}),(null==e?void 0:e.is_answer)&&(0,Ne.jsx)("div",{className:et,children:"正确答案"})]})}))})})]})}))),8===(null==u?void 0:u.question_type)&&(0,Ne.jsx)("div",{children:(0,Ne.jsx)(Ze.Z,{disabledFill:!0,className:dt,showProgramFill:!0,value:Ue.Base64.decode((null==u||null===(o=u.program_attr)||void 0===o?void 0:o.code)||"")})}),5===(null==u?void 0:u.question_type)&&(0,Ne.jsxs)("div",{style:{background:"#F6F7F9",padding:"0px 20px",height:46,lineHeight:"46px",marginTop:40,display:"flex",alignItems:"center"},children:[(0,Ne.jsxs)("div",{style:{flex:1,alignItems:"center",display:"flex"},children:[(0,Ne.jsxs)("div",{style:{marginRight:30},children:[(0,Ne.jsx)("span",{style:{marginRight:10},children:"创建者"}),(0,Ne.jsx)("span",{style:{color:"#000000"},children:(null==u?void 0:u.author_name)||"- -"})]}),(0,Ne.jsxs)("div",{style:{marginRight:30},children:[(0,Ne.jsx)("span",{style:{marginRight:10},children:"所属单位"}),(0,Ne.jsx)("span",{style:{color:"#000000"},children:(null==u?void 0:u.author_school_name)||"- -"})]}),(0,Ne.jsxs)("div",{style:{marginRight:30},children:[(0,Ne.jsx)("span",{style:{marginRight:10},children:"学习人数"}),(0,Ne.jsx)("span",{style:{color:"#000000"},children:(null==u?void 0:u.study_count)||"0"})]})]}),(0,Ne.jsxs)("a",{className:Yn,href:"/shixuns/".concat(null==u?void 0:u.identifier,"/challenges?exercise=true"),target:"_blank",children:[(0,Ne.jsx)("i",{onClick:function(){},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"实训详情"]})]})]}),((null==u?void 0:u.question_type)<=4||[6,8].includes(null==u?void 0:u.question_type))&&(0,Ne.jsxs)("div",{className:at,children:[(0,Ne.jsxs)("div",{className:rt,children:[(0,Ne.jsx)("span",{className:ct,children:"解析"}),(0,Ne.jsx)(Ze.Z,{className:ot,value:(null==u?void 0:u.analysis)||""})]}),(0,Ne.jsxs)("div",{className:rt,children:[(0,Ne.jsx)("span",{className:ct,children:"难度"}),(0,Ne.jsx)("span",{className:ot,children:1===(null==u?void 0:u.difficulty)?"简单":2===(null==u?void 0:u.difficulty)?"适中":"困难"})]}),(0,Ne.jsxs)("div",{className:rt,children:[(0,Ne.jsx)("span",{className:ct,children:"知识点"}),(0,Ne.jsx)("span",{className:ot,children:null==u?void 0:u.tag_discipline})]})]})]})},jt=t(50699),_t=t(70319),yt=function(e){var n,t=e.setScoreShow,i=e.ScoreShow,l=e.onOk,r=e.isshixuns,o=e.isloadings,d=(0,m.useState)({type:"1",page:1,per_page:10,updated_at:"",quotes:""}),h=p()(d,2),x=h[0],g=h[1],y=(0,m.useState)([]),b=p()(y,2),k=b[0],Z=b[1],C=(0,m.useState)([]),P=p()(C,2),A=P[0],E=P[1],S=(0,m.useState)([]),q=p()(S,2),T=q[0],F=q[1],B=(0,m.useState)([]),D=p()(B,2),M=D[0],L=D[1],R=(0,m.useState)(!1),O=p()(R,2),z=O[0],V=O[1],U=f.Z.useForm(),H=p()(U,1)[0],W=(0,m.useState)(),K=p()(W,2),Y=K[0],G=K[1],J=(0,m.useState)(!1),Q=p()(J,2),X=Q[0],$=Q[1],ee=(0,m.useState)(r),ne=p()(ee,2),te=ne[0],ie=ne[1],se=(0,m.useState)([]),le=p()(se,2),ae=le[0],re=le[1],ce=(0,m.useState)(0),oe=p()(ce,2),ue=oe[0],de=oe[1],pe=(0,m.useState)(!0),me=p()(pe,2),he=me[0],fe=me[1],xe=[{name:"全部",value:"",question_type:0},{name:"编程题",value:"PROGRAM",question_type:6},{name:"单选题",value:"SINGLE",question_type:0},{name:"多选题",value:"MULTIPLE",question_type:1},{name:"判断题",value:"JUDGMENT",question_type:2},{name:"填空题",value:"COMPLETION",question_type:3},{name:"简答题",value:"SUBJECTIVE",question_type:4},{name:"实训题",value:"SHIXUN",question_type:5},{name:"组合题",value:"COMBINATION",question_type:7},{name:"程序填空题",value:"BPROGRAM",question_type:8}],ve=(0,m.useState)([]),ge=p()(ve,2),_e=ge[0],ye=ge[1],we=(0,m.useRef)(new Set),ke=(0,m.useRef)(new Set),Ce=[{name:"简单",value:1},{name:"适中",value:2},{name:"困难",value:3}],Ie=(0,m.useState)(!1),Ae=p()(Ie,2),Ee=Ae[0],Se=Ae[1];function qe(e){return Te.apply(this,arguments)}function Te(){return(Te=u()(c()().mark((function e(n){var t,i,l,a,r,o,u,d;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V(!0),g(s()({},n)),!te){e.next=9;break}return e.next=5,(0,je.ZP)("/api/shixun_lists.json",{method:"get",params:s()(s()({},n),{},{discipline_id:(null==n||null===(t=n.courseid)||void 0===t?void 0:t[0])||null,sub_discipline_id:(null==n||null===(i=n.courseid)||void 0===i?void 0:i[1])||null,limit:n.per_page})});case 5:l=e.sent,L(l),e.next=19;break;case 9:if(!((null==T?void 0:T.length)<=0&&"5"===n.type)){e.next=13;break}return L([]),V(!1),e.abrupt("return");case 13:return o="5"===n.type?null==T?void 0:T.filter((function(e){return!ae.includes(e)})):null,u="5"===n.type?null==T?void 0:T.filter((function(e){return ae.includes(e)})):null,e.next=17,(0,je.ZP)("/api/item_banks.json",{method:"get",params:s()(s()({},n),{},{discipline_id:(null==n||null===(a=n.courseid)||void 0===a?void 0:a[0])||null,sub_discipline_id:(null==n||null===(r=n.courseid)||void 0===r?void 0:r[1])||null,ids:o,shixun_ids:u,type:"5"===n.type?null:n.type})});case 17:d=e.sent,L(d);case 19:V(!1);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fe(){return(Fe=u()(c()().mark((function e(){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,je.ZP)("/api/disciplines.json",{method:"get",params:{source:"question",group_id:0,group_type:"5"===x.type?null:x.type,clazz:"ItemBanksGroup"}});case 2:n=e.sent,Z((0,N.L)(null==n?void 0:n.disciplines));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Be(e){return De.apply(this,arguments)}function De(){return(De=u()(c()().mark((function e(n){var t,i,l,a,r,o,u;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V(!0),r=null===(t=n.list)||void 0===t?void 0:t.filter((function(e){return!ae.includes(e)})),o=null===(i=n.list)||void 0===i?void 0:i.filter((function(e){return ae.includes(e)})),0!==r.length||0!==o.length){e.next=7;break}return V(!1),L([]),e.abrupt("return");case 7:return e.next=9,(0,je.ZP)("/api/item_banks.json",{method:"get",params:s()(s()({},n),{},{discipline_id:(null==n||null===(l=n.courseid)||void 0===l?void 0:l[0])||null,sub_discipline_id:(null==n||null===(a=n.courseid)||void 0===a?void 0:a[1])||null,ids:r,shixun_ids:o,type:"5"===n.type?null:n.type})});case 9:u=e.sent,V(!1),L(u);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,m.useEffect)((function(){i&&(qe(x),function(){Fe.apply(this,arguments)}(),H.setFieldsValue({item_type:null,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null}),he&&te&&(H.setFieldsValue({item_type:"SHIXUN"}),fe(!1)))}),[i]),(0,m.useEffect)((function(){ue>0&&setTimeout((function(){de(0)}),2e3)}),[ue]),(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)(I.Z,{title:!1,footer:!1,open:i,width:1200,centered:!0,className:qn,onCancel:function(){t(!1)},children:[(0,Ne.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,Ne.jsx)("div",{className:Bn,children:"题库选题"})}),(0,Ne.jsx)(An.Z,{className:Un,activeKey:x.type,onChange:function(e){x.type=e,x.page=1,x.updated_at="",x.quotes="",x.item_type=null,x.courseid="",x.tag_discipline_id=null,x.difficulty=null,x.keyword=null,H.setFieldsValue({item_type:null,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null}),Se(!1),"5"===x.type&&(te=!1,ie(!1)),g(s()({},x)),qe(s()({},x))},items:[{label:"公共",key:"1"},{label:"团队共享",key:"3"},{label:"收藏夹",key:"2"},{label:"我创建的",key:"0"},{label:(0,Ne.jsxs)("div",{children:["已选",T.length>0&&(0,Ne.jsx)("span",{className:Rn,children:T.length}),ue>0&&(0,Ne.jsxs)("span",{className:On,children:["+",ue]})]}),key:"5"}]}),(0,Ne.jsxs)(f.Z,{layout:"inline",form:H,onValuesChange:function(e,n){var t=Object.values(n).some((function(e){return null!==e&&""!==e&&void 0!==e})),i=""===n.keyword;if(Se(t||!i),x.page=1,"SHIXUN"===(null==n?void 0:n.item_type)){if("5"===x.type?ie(!1):ie(!0),e.keyword||""===e.keyword)return;H.submit()}else{if(null!=e&&e.courseid&&H.setFieldsValue({tag_discipline_id:""}),ie(!1),e.keyword||""===e.keyword)return;H.submit()}},onFinish:function(e){g(s()(s()({},x),e)),qe(s()(s()({},x),e))},children:[(0,Ne.jsx)(f.Z.Item,{name:"item_type",children:(0,Ne.jsx)(Pe.default,{className:Tn,placeholder:"题型",style:{width:110},size:"middle",allowClear:!0,children:xe.map((function(e){return(0,Ne.jsx)(Pe.default.Option,{children:e.name},e.value)}))})}),(0,Ne.jsx)(f.Z.Item,{name:"courseid",children:(0,Ne.jsx)(_.Z,{className:Tn,style:{width:160},size:"middle",placeholder:"方向&课程",options:k})}),!te&&(0,Ne.jsx)(f.Z.Item,{name:"tag_discipline_id",children:(0,Ne.jsx)(Pe.default,{className:Tn,placeholder:"知识点",style:{width:160},size:"middle",allowClear:!0,children:null==M||null===(n=M.tag_disciplines)||void 0===n?void 0:n.map((function(e){return(0,Ne.jsx)(Pe.default.Option,{children:e.name},e.id)}))})}),(0,Ne.jsx)(f.Z.Item,{name:te?"diff":"difficulty",children:(0,Ne.jsxs)(Pe.default,{className:Tn,placeholder:"难度",style:{width:118},size:"middle",allowClear:!0,children:[!te&&Ce.map((function(e){return(0,Ne.jsx)(Pe.default.Option,{children:e.name},e.value)})),te&&[{name:"初级",value:1},{name:"中级",value:2},{name:"中高级",value:3},{name:"高级",value:4}].map((function(e){return(0,Ne.jsx)(Pe.default.Option,{children:e.name},e.value)}))]})}),Ee&&(0,Ne.jsxs)("span",{className:Fn,onClick:function(){H.resetFields(),Se(!1),H.submit()},children:[(0,Ne.jsx)("i",{className:"iconfont icon-guanbi4"}),(0,Ne.jsx)("span",{children:"清除筛选条件"})]}),(0,Ne.jsx)(f.Z.Item,{style:{flex:"0 0 auto",marginRight:0,marginLeft:"auto"},name:"keyword",children:(0,Ne.jsx)(j.Z.Search,{className:zn,placeholder:"请输入关键词搜索",allowClear:!0,suffix:(0,Ne.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(Vn),onClick:function(){return H.submit()}}),onSearch:function(e){H.submit()}})})]}),(0,Ne.jsxs)("div",{style:{background:"#F6F7F9",display:"flex",alignItems:"center",marginTop:18,height:40,paddingLeft:10,paddingRight:20},children:[(0,Ne.jsxs)("div",{onClick:function(){"asc"===x.updated_at?x.updated_at="desc":x.updated_at="asc",g(s()(s()({},x),{},{page:1})),qe(s()(s()({},x),{},{page:1}))},children:[" ",x.updated_at?(0,Ne.jsx)("img",{src:"asc"===x.updated_at?jt.Z:_t.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):(0,Ne.jsx)("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"按更新时间排序"]}),(0,Ne.jsxs)("div",{onClick:function(){"asc"===x.quotes?x.quotes="desc":x.quotes="asc",g(s()(s()({},x),{},{page:1})),qe(s()(s()({},x),{},{page:1}))},style:{marginLeft:20},children:[" ",x.quotes?(0,Ne.jsx)("img",{src:"asc"===x.quotes?jt.Z:_t.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):(0,Ne.jsx)("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"按使用次数排序"]})]}),(0,Ne.jsx)(En.Z,{style:{marginTop:2,marginBottom:20},scroll:{y:260},dataSource:(null==M?void 0:M.items)||(null==M?void 0:M.shixun_list),pagination:!1,loading:z,rowKey:function(e){return e.id},rowSelection:{type:"checkbox",selectedRowKeys:A,onSelect:function(e,n,t){if(n)te&&re([].concat(be()(ae),[e.id])),E([].concat(be()(A),[e.id])),ye([].concat(be()(_e),[e])),e.identifier?we.current.add(e.id):ke.current.add(e.id),de(1),F([].concat(be()(T),[e.id]));else{var i=_e.filter((function(n){return n.id!==e.id}));ye(i);var l=i.map((function(e){return e.id}));E(be()(l)),e.identifier?we.current.delete(e.id):ke.current.delete(e.id);var a=T.filter((function(n){return n!==e.id}));if(F(a),te){var r=ae.filter((function(n){return n!==e.id}));re(be()(r))}if("5"===x.type)return void Be(s()(s()({},x),{},{list:be()(a)}))}},onSelectAll:function(e,n,t){if(e){var i=t.map((function(e){return e.id}));te&&re([].concat(be()(ae),be()(i))),ye([].concat(be()(_e),be()(t))),E([].concat(be()(A),be()(i))),F([].concat(be()(T),be()(i)));var l,r=a()(t);try{for(r.s();!(l=r.n()).done;){var c=l.value;c.identifier?we.current.add(c.id):ke.current.add(c.id)}}catch(e){r.e(e)}finally{r.f()}}else{var o=t.map((function(e){return e.id})),u=A.filter((function(e){return!o.some((function(n){return n===e}))})),d=_e.filter((function(e){return!o.some((function(n){return n===e.id}))}));if(ye(d),E(be()(u)),F(be()(u)),te){var p=ae.filter((function(e){return!o.some((function(n){return n===e.id}))}));re(be()(p))}"5"===x.type&&Be(s()(s()({},x),{},{list:be()(u)}));var m,h=a()(o);try{for(h.s();!(m=h.n()).done;){var f=m.value;f.identifier?we.current.delete(f):ke.current.delete(f)}}catch(e){h.e(e)}finally{h.f()}}}},columns:[{title:"题型",dataIndex:"item_type",key:"item_type",render:function(e,n,t){var i;return(0,Ne.jsx)("span",{children:te||null!=n&&n.challenge_names?"实训题":null==xe||null===(i=xe.filter((function(n){return n.value===e})))||void 0===i||null===(i=i[0])||void 0===i?void 0:i.name})}},{title:"试题名称",dataIndex:"name",width:te?"30%":"60%",key:"name",render:function(e,n,t){var i;return(0,Ne.jsx)(Ze.Z,{showLines:1,showTextOnly:!0,value:te||null!=n&&n.challenge_names?(null==n?void 0:n.title)||e:"BPROGRAM"==(null==n?void 0:n.item_type)?null==n||null===(i=n.program_attr)||void 0===i?void 0:i.description:e},1)}},{title:"创建者",dataIndex:"author_name",key:"author_name",hidden:!te,render:function(e,n,t){var i;return(0,Ne.jsx)("span",{children:e?null==e||null===(i=e.split("、"))||void 0===i?void 0:i[0]:"- -"})}},{title:"所属单位",dataIndex:"author_school_name",key:"author_school_name",hidden:!te,render:function(e,n,t){return(0,Ne.jsx)("span",{children:e||"- -"})}},{title:"难度",dataIndex:"difficulty",key:"difficulty",render:function(e,n,t){var i,s;return(0,Ne.jsx)("span",{children:te||null!=n&&n.challenge_names?(null==n?void 0:n.level)||(null==Ce||null===(i=Ce.filter((function(n){return n.value===e})))||void 0===i||null===(i=i[0])||void 0===i?void 0:i.name):null==Ce||null===(s=Ce.filter((function(n){return n.value===e})))||void 0===s||null===(s=s[0])||void 0===s?void 0:s.name})}},{title:"使用次数",dataIndex:"quotes",key:"quotes",render:function(e,n,t){return(0,Ne.jsx)("span",{children:te||null!=n&&n.challenge_names?(null==n?void 0:n.study_count)||(null==n?void 0:n.stu_num):e})}},{title:"操作",dataIndex:"id",key:"item_type",render:function(e,n,t){return(0,Ne.jsx)("div",{style:{flex:1,textAlign:"start"},children:(0,Ne.jsx)("a",{onClick:function(){var e;G(s()(s()({},n),{},{question_type:te||null!=n&&n.challenge_names?5:null==xe||null===(e=xe.filter((function(e){return e.value===(null==n?void 0:n.item_type)})))||void 0===e||null===(e=e[0])||void 0===e?void 0:e.question_type})),$(!0)},children:"查看"})})}}].filter((function(e){return!e.hidden}))}),(0,Ne.jsx)(Sn.Z,{current:x.page,total:(null==M?void 0:M.items_count)||(null==M?void 0:M.shixuns_count),style:{marginBottom:20},defaultPageSize:x.per_page,showTotal:function(e){return(0,Ne.jsxs)("span",{children:["共 ",(0,Ne.jsx)("span",{style:{color:"#165DFF"},children:e})," 条数据"]})},pageSize:x.per_page,onChange:function(e,n){x.page=e,x.per_page=n,g(s()({},x)),qe(s()({},x))}}),(0,Ne.jsxs)("div",{className:Dn,children:[(0,Ne.jsx)(w.ZP,{className:Ln,onClick:function(){t(!1)},children:"取消"}),(0,Ne.jsx)(w.ZP,{loading:o,style:{width:o&&75},className:Mn,onClick:u()(c()().mark((function e(){return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==T?void 0:T.length)<=0)){e.next=3;break}return v.ZP.info("当前暂未选择数据"),e.abrupt("return");case 3:l(be()(ke.current),be()(we.current),!0,null==T?void 0:T.length);case 4:case"end":return e.stop()}}),e)}))),children:"确认"})]})]}),(0,Ne.jsx)(I.Z,{open:X,title:"题目详情",footer:!1,className:Hn,width:1e3,centered:!0,onCancel:function(){$(!1)},onOk:function(){$(!1)},children:(0,Ne.jsx)(gt,{qitem:Y})})]})},bt=t(37823),wt=[{name:"单选题",id:0,count:"q_singles",score:"q_singles_scores",nameType:"SINGLE"},{name:"多选题",id:1,count:"q_doubles",score:"q_doubles_scores",nameType:"MULTIPLE"},{name:"判断题",id:2,count:"q_judges",score:"q_judges_scores",nameType:"JUDGMENT"},{name:"填空题",id:3,count:"q_nulls",score:"q_nulls_scores",nameType:"COMPLETION"},{name:"简答题",id:4,count:"q_mains",score:"q_mains_scores",nameType:"SUBJECTIVE"},{name:"实训题",id:5,count:"q_shixuns",score:"q_shixuns_scores",nameType:"PRACTICAL"},{name:"编程题",id:6,count:"q_pros",score:"q_pros_scores",nameType:"PROGRAM"},{name:"组合题",id:7,count:"q_combinations",score:"q_combinations_scores",nameType:"COMBINATION"},{name:"程序填空题",id:8,count:"q_combinations",score:"q_combinations_scores",nameType:"BPROGRAM"}],kt=(0,h.connect)((function(e){return{user:e.user,dispatch:e.dispatch}}))((function(e){var n,t,i,l,a=e.user,r=e.dispatch,o=e.itemid,d=e.setisedits,x=(0,m.useState)(),_=p()(x,2),y=_[0],b=_[1],k=(0,m.useState)(!1),N=p()(k,2),C=N[0],Y=N[1],$=(0,m.useState)(),ee=p()($,2),te=ee[0],ie=ee[1],se=(0,m.useState)(),le=p()(se,2),ae=le[0],re=le[1],ce=(0,m.useState)(!1),oe=p()(ce,2),ue=oe[0],de=oe[1],pe=(0,m.useState)(!1),me=p()(pe,2),he=me[0],fe=me[1],xe=(0,m.useState)(),ve=p()(xe,2),ye=ve[0],be=ve[1],we=(0,m.useState)(!1),ke=p()(we,2),Ie=ke[0],Pe=ke[1],Ae=(0,m.useState)(!1),Ee=p()(Ae,2),Se=Ee[0],qe=Ee[1],Te=(0,m.useState)(!1),Fe=p()(Te,2),De=Fe[0],Le=Fe[1],Oe=(0,m.useState)(!1),Ve=p()(Oe,2),We=Ve[0],Ye=Ve[1],Ge=(0,m.useState)(!1),Je=p()(Ge,2),Qe=Je[0],Xe=Je[1],$e=(0,m.useState)(!1),en=p()($e,2),nn=(en[0],en[1],f.Z.useForm()),tn=p()(nn,1)[0],sn=(0,m.useState)(!1),ln=p()(sn,2),an=ln[0],rn=ln[1],cn=(0,m.useRef)(null);(0,m.useEffect)((function(){un(),r({type:"globalSetting/footerToggle",payload:!1})}),[]),(0,m.useEffect)((function(){d(he)}),[he]);var on=function(){var e=u()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r({type:"newExercisePaper/getTagDiscipline",payload:{sub_discipline_id:n}});case 2:t=e.sent,be(t);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();function un(){return dn.apply(this,arguments)}function dn(){return(dn=u()(c()().mark((function e(){var n,t,i,l,a;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return de(!0),Y(!0),e.next=4,r({type:"newExercisePaper/editExercise",payload:{id:o}});case 4:l=e.sent,de(!1),Y(!1),b(l),null!=l&&null!==(n=l.exercise)&&void 0!==n&&n.sub_discipline_id&&on(null==l||null===(a=l.exercise)||void 0===a?void 0:a.sub_discipline_id),ie(s()(s()({},null==l||null===(t=l.exercise_question_types)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.items)||void 0===t?void 0:t[0]),{},{index:1})),re(s()(s()({},null==l||null===(i=l.exercise_question_types)||void 0===i?void 0:i[0]),{},{indexs:1}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pn(e){return mn.apply(this,arguments)}function mn(){return(mn=u()(c()().mark((function e(n){var t,i,l,a,u,d,p,m,h;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return de(!0),Y(!0),e.next=4,r({type:"newExercisePaper/editExercise",payload:{id:o}});case 4:u=e.sent,b(u),d=[],null==u||null===(t=u.exercise_question_types)||void 0===t||t.map((function(e){var n;null==e||null===(n=e.items)||void 0===n||n.map((function(e,n){d.push(s()(s()({},e),{},{index:n+1}))}))})),p=null===(i=d.filter((function(e){return e.question_id===(null==n?void 0:n.id)})))||void 0===i?void 0:i[0],m=null==u||null===(l=u.exercise_question_types)||void 0===l?void 0:l.map((function(e,n){if((null==p?void 0:p.question_type)===(null==e?void 0:e.question_type))return s()(s()({},e),{},{indexs:n+1})})),h=null===(a=m.filter((function(e){return e})))||void 0===a?void 0:a[0],re(s()({},h)),ie(s()({},p)),de(!1),Y(!1);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hn(e){return fn.apply(this,arguments)}function fn(){return(fn=u()(c()().mark((function e(n){var t,i,l,a;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s()(s()({},n),{},{difficulty:(null==n?void 0:n.difficulty)||2,item_type:n.question_type,sub_discipline_id:null==y||null===(t=y.exercise)||void 0===t?void 0:t.sub_discipline_id,tag_discipline_ids:[],repeat_answer:!n.repeat_answer}),l={},8===n.question_type&&(l=s()(s()({},n),{},{hack:s()(s()({},null==n?void 0:n.hack),{},{difficult:n.difficulty}),hack_codes:s()(s()({},n.hack_codes),{},{code:Ue.Base64.encode(n.hack_codes.code)}),hack_sets:[s()({},n.hack_sets)],is_blank:!0})),n.tag_discipline_ids&&(i.tag_discipline_ids=Array.isArray(n.tag_discipline_ids)?n.tag_discipline_ids:[n.tag_discipline_ids],l.tag_discipline_ids=Array.isArray(n.tag_discipline_ids)?n.tag_discipline_ids:[n.tag_discipline_ids]),sessionStorage.projectFill&&(l.hack_identifier=sessionStorage.projectFill),e.next=7,(0,je.ZP)("/api/examination_banks/".concat(o,"/examination_banks_item_banks/create_item_bank.json"),{method:"post",body:8===n.question_type?l:i});case 7:0===(null==(a=e.sent)?void 0:a.status)&&(fe(!1),pn(a)),(0,ge.k3)();case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var xn=function(){var e=u()(c()().mark((function e(n,t){var i,s;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==n.length){e.next=4;break}return v.ZP.warning("请上传文件"),t(),e.abrupt("return");case 4:return e.next=6,(0,Z.Hb)(o,null===(i=n[0])||void 0===i?void 0:i.file);case 6:0===(s=e.sent).status&&(v.ZP.success("成功导入".concat(null==s?void 0:s.success,"条")),Pe(!1),un()),t();case 9:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();function vn(){return gn.apply(this,arguments)}function gn(){return gn=u()(c()().mark((function e(){return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:I.Z.confirm({title:"提示",content:"确定要删除这个试题吗?",okText:"确定",centered:!0,className:ne,onOk:function(){var e=u()(c()().mark((function e(){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!te.question_id){e.next=7;break}return e.next=3,(0,je.ZP)("/api/examination_banks/".concat(o,"/examination_banks_item_banks/").concat(te.question_id,".json"),{method:"delete"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(un(),fe(!1)),e.next=10;break;case 7:ie({}),fe(!1),un();case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),cancelText:"取消"});case 1:case"end":return e.stop()}}),e)}))),gn.apply(this,arguments)}var jn=function(){var e=u()(c()().mark((function e(n){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,je.ZP)("/api/examination_banks/".concat(o,"/examination_banks_item_banks.json"),{method:"post",body:s()({},n)});case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),_n=(0,bt.I)(),yn=_n.overflow,bn=_n.handleMouseEnter,wn=_n.handleMouseLeave,kn=function(){var e=u()(c()().mark((function e(n){var t,i,s,l;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y(!0),e.next=3,(0,je.ZP)("/api/examination_banks/".concat(o,"/sort_question_type.json"),{method:"post",body:{question_type:n}});case 3:if(t=e.sent,Y(!1),0!==(null==t?void 0:t.status)){e.next=11;break}return e.next=8,r({type:"newExercisePaper/editExercise",payload:{id:o}});case 8:s=e.sent,b(s),null!=s&&null!==(i=s.exercise)&&void 0!==i&&i.sub_discipline_id&&on(null==s||null===(l=s.exercise)||void 0===l?void 0:l.sub_discipline_id);case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Cn=function(){return!!he&&(v.ZP.info("请先保存或取消当前正在编辑的试题。"),!0)};return(0,Ne.jsxs)("div",{children:[(0,Ne.jsx)(g.Z,{spinning:ue,children:(0,Ne.jsx)("div",{className:T,children:(0,Ne.jsxs)("div",{style:{textAlign:"center"},children:[0===(null==y||null===(n=y.exercise_types)||void 0===n?void 0:n.q_counts)&&!he&&(0,Ne.jsx)(_e.Z,{customText:"还没有试题,从底部操作栏来添加吧~"}),((null==y||null===(t=y.exercise_types)||void 0===t?void 0:t.q_counts)>0||he)&&(0,Ne.jsxs)("div",{style:{marginTop:20,borderTop:"1px solid #DCDCDC",display:"flex",alignItems:"stretch"},children:[(0,Ne.jsx)("div",{style:{backgroundColor:"#F6F7F9"},children:(0,Ne.jsx)(A.Z,{offsetTop:10,children:(0,Ne.jsx)(E.Z,{className:R,active:!0,loading:C,children:(0,Ne.jsxs)("div",{className:R,children:[(0,Ne.jsx)(w.ZP,{onClick:function(){Cn()||qe(!0)},className:z,children:"批量设置分值"}),(0,Ne.jsx)("div",{className:O,style:{overflow:yn},onMouseEnter:bn,onMouseLeave:wn,children:null==y||null===(i=y.exercise_question_types)||void 0===i?void 0:i.map((function(e,n){return(0,Ne.jsxs)("div",{className:"mb30",children:[(0,Ne.jsxs)("div",{className:F,children:[(0,Ne.jsxs)("div",{className:V,children:[(0,Ne.jsxs)("span",{style:{color:"#000000",fontWeight:400,fontSize:12},children:[" ",(0,ge.EM)(n+1),"、【",e.name,"】"]}),(0,Ne.jsxs)("span",{style:{color:"#464F66",fontSize:12},children:["(",e.count,"小题,共",e.score,"分)"]})]}),(0,Ne.jsx)(S.Z,{dropdownRender:function(){return function(e,n){return(0,Ne.jsxs)(P.Z,{children:[(0,Ne.jsx)(P.Z.Item,{disabled:0===n,onClick:u()(c()().mark((function e(){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==n){e.next=2;break}return e.abrupt("return");case 2:if(!Cn()){e.next=4;break}return e.abrupt("return");case 4:return t=(0,ge.rz)(null==y?void 0:y.exercise_question_types,n,n-1),e.next=7,kn(t.map((function(e){return e.name})));case 7:case"end":return e.stop()}}),e)}))),children:(0,Ne.jsx)("span",{className:q,children:"上移"})},"1"),(0,Ne.jsx)(P.Z.Item,{disabled:n===(null==y?void 0:y.exercise_question_types.length)-1,onClick:u()(c()().mark((function e(){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n!==(null==y?void 0:y.exercise_question_types.length)-1){e.next=2;break}return e.abrupt("return");case 2:if(!Cn()){e.next=4;break}return e.abrupt("return");case 4:return t=(0,ge.rz)(null==y?void 0:y.exercise_question_types,n,n+1),e.next=7,kn(t.map((function(e){return e.name})));case 7:case"end":return e.stop()}}),e)}))),children:(0,Ne.jsx)("span",{className:q,children:"下移"})},"2"),(0,Ne.jsx)(P.Z.Item,{onClick:function(){var n;tn.setFieldsValue({name:e.name,item_type_en:null===(n=wt.find((function(n){return n.id==e.question_type})))||void 0===n?void 0:n.nameType}),rn(!0)},children:(0,Ne.jsx)("span",{className:q,children:"重命名"})},"3")]})}(e,n)},placement:"bottomLeft",children:(0,Ne.jsx)("div",{className:U,children:(0,Ne.jsx)("i",{className:"iconfont icon-sandian font12"})})})]}),(0,Ne.jsx)(Ce,{isedit:he,setBigqitem:re,bigitem:s()(s()({},e),{},{indexs:n+1}),setqitem:ie,qitem:te,Itemid:o,getdata:pn,data:e.items})]},n)}))})]})})})}),(0,Ne.jsx)(E.Z,{className:G,active:!0,loading:ue,children:(0,Ne.jsxs)("div",{className:G,ref:cn,children:[(null==ae?void 0:ae.question_type)===(null==te?void 0:te.question_type)&&(0,Ne.jsxs)("div",{className:F,children:[(0,Ne.jsxs)("div",{style:{flex:1},children:[(0,Ne.jsxs)("span",{style:{color:"#000000",fontWeight:600,fontSize:16},children:[" ",(null==ae?void 0:ae.indexs)&&(0,ge.EM)(null==ae?void 0:ae.indexs),"、【",null==ae?void 0:ae.name,"】"]}),(0,Ne.jsxs)("span",{style:{color:"#464F66",fontSize:16,fontWeight:400},children:["(",null==ae?void 0:ae.count,"小题,共",null==ae?void 0:ae.score,"分)"]})]}),(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[5===(null==te?void 0:te.question_type)&&!he&&(0,Ne.jsxs)("a",{className:X,href:"/shixuns/".concat(null==te?void 0:te.shixun_identifier,"/challenges?exercise=true"),target:"_blank",children:[(0,Ne.jsx)("i",{onClick:function(){},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"实训详情"]}),!he&&(0,Ne.jsx)("i",{onClick:function(){vn()},style:{marginRight:20},className:"".concat(Q," iconfont icon-shanchu13 mr5 ")}),!he&&(0,Ne.jsx)("i",{onClick:function(){var e;6===(null==te?void 0:te.question_type)?h.history.push("/problems/newedit/".concat(null==te?void 0:te.hack_identifier,"?type=exercises&express_id=").concat(null==y||null===(e=y.exercise)||void 0===e?void 0:e.id,"&question_id=").concat(null==te?void 0:te.question_id,"&score=").concat(null==te?void 0:te.question_score,"&exercise=true&callback_url=").concat(location.pathname,"$?type=2")):fe(!0)},className:"".concat(J," iconfont icon-bianji_Hover mr5 ")})]})]}),!he&&(0,Ne.jsxs)("div",{children:[(0,Ne.jsxs)("div",{className:H,children:[(0,Ne.jsxs)("span",{className:W,children:[null==te?void 0:te.question_score,"分"]}),(0,Ne.jsx)(Ze.Z,{className:K,value:(null==te?void 0:te.index)+"、"+"".concat(8==(null==te?void 0:te.question_type)?null==te||null===(l=te.program_attr)||void 0===l?void 0:l.description:null==te?void 0:te.question_title)})]}),(0,Ne.jsx)(Zn,{TagDiscipline:ye,qitem:te})]}),he&&(0,Ne.jsxs)("div",{children:[(null==te?void 0:te.question_type)<=1&&(0,Ne.jsx)(Be,{getTagData:on,deleteitem:vn,seveeditor:hn,exerciseitem:y,TagDiscipline:ye,setisedit:fe,qitem:te,init:un}),5===(null==te?void 0:te.question_type)&&(0,Ne.jsx)(Ke,{setqitem:ie,deleteitem:vn,seveeditor:hn,exerciseitem:y,TagDiscipline:ye,setisedit:fe,qitem:te}),3===(null==te?void 0:te.question_type)&&(0,Ne.jsx)(Me,{getTagData:on,deleteitem:vn,seveeditor:hn,exerciseitem:y,TagDiscipline:ye,setisedit:fe,qitem:te,init:un}),2===(null==te?void 0:te.question_type)&&(0,Ne.jsx)(Re,{getTagData:on,deleteitem:vn,seveeditor:hn,exerciseitem:y,TagDiscipline:ye,setisedit:fe,qitem:te,init:un}),4===(null==te?void 0:te.question_type)&&(0,Ne.jsx)(In,{getTagData:on,deleteitem:vn,seveeditor:hn,exerciseitem:y,TagDiscipline:ye,setisedit:fe,qitem:te,init:un}),7===(null==te?void 0:te.question_type)&&(0,Ne.jsx)(ze,{getTagData:on,deleteitem:vn,seveeditor:hn,exerciseitem:y,TagDiscipline:ye,setisedit:fe,qitem:te,init:un}),8===(null==te?void 0:te.question_type)&&(0,Ne.jsx)(He,{getTagData:on,deleteitem:vn,seveeditor:hn,exerciseitem:y,TagDiscipline:ye,setisedit:fe,qitem:te,init:un})]})]})})]})]})})}),(0,Ne.jsx)("div",{className:B,children:(0,Ne.jsxs)("div",{style:{width:1200,margin:"0px auto",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,Ne.jsx)("span",{className:D,onClick:function(){Cn()||(Le(!0),Ye(!1))},children:"题库选题"}),(0,Ne.jsx)("span",{className:D,onClick:function(){Cn()||Pe(!0)},children:"导入试题"}),(0,Ne.jsx)("span",{className:D,onClick:u()(c()().mark((function e(){var n,t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Cn()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,Z.JP)(o);case 4:0===(n=e.sent).status&&window.open("/classrooms/coursesId/exercise/".concat(n.exercise_id,"/").concat(null===(t=a.userInfo)||void 0===t?void 0:t.login,"/initate_answer"));case 6:case"end":return e.stop()}}),e)}))),children:"模拟考试"}),(0,Ne.jsx)("span",{className:D,onClick:function(){Cn()||window.open("/paperlibrary/see/".concat(o))},children:"试卷预览"}),null==wt?void 0:wt.map((function(e,n){return(0,Ne.jsx)(w.ZP,{className:M,type:"primary",onClick:function(){if(!Cn()){if(5===e.id)return Le(!0),void Ye(!0);var n,t,i,s;if(6!==e.id)fe(!0),2===e.id?ie({question_type:e.id,isadd:!0,repeat_answer:!0,choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],question_choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],difficulty:2,standard_answers:[],question_score:"",tag_discipline_ids:"",question_title:"",analysis:""}):ie({question_type:e.id,question_choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),standard_answers:[],repeat_answer:!0,difficulty:2,isadd:!0,tag_discipline_ids:"",question_score:"",analysis:"",sub_item_banks:[],question_title:"",is_ordered:!0,use_keywords:!1,use_blank_score:!0,keywords:[],allow_student_debug:!1});else h.history.push("/problems/newcreate?difficult=".concat(null==y||null===(n=y.exercise)||void 0===n?void 0:n.difficulty,"&sub_discipline_id=").concat(null==y||null===(t=y.exercise)||void 0===t?void 0:t.sub_discipline_id,"&express_id=").concat(null==y||null===(i=y.exercise)||void 0===i?void 0:i.id,"&callback_url=/paperlibrary/add/").concat(null==y||null===(s=y.exercise)||void 0===s?void 0:s.id,"?type=2"))}},children:e.name},n)})),(0,Ne.jsxs)("span",{className:L,onClick:function(){Cn()||(v.ZP.info("创建成功"),window.open("/paperlibrary?defaultActiveKey=0"))},children:[(0,Ne.jsx)("i",{className:"iconfont icon-baocun1",style:{fontSize:15,marginRight:5}}),"保存试卷"]})]})}),(0,Ne.jsx)(Pn,{setScoreShow:qe,ScoreShow:Se,exerciseitem:y,getdata:un}),De&&(0,Ne.jsx)(yt,{setScoreShow:Le,isshixuns:We,ScoreShow:De,isloadings:Qe,onOk:function(){var e=u()(c()().mark((function e(n,t,i,l){var a,r;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Xe(!0),a={exam_id:o,item_bank_ids:n,shixun_ids:t},e.next=4,jn(s()(s()({},a),{},{check_only:i}));case 4:if(r=e.sent,Xe(!1),0!==(null==r?void 0:r.status)){e.next=14;break}return e.next=9,jn(a);case 9:Le(!1),un(),v.ZP.info("添加成功"),e.next=15;break;case 14:-2===r.status&&I.Z.confirm({title:"提示",content:"当前已选择".concat(l,"道试题,已加入过的试题或未发布的编程题将不会重复加入"),onOk:function(){var e=u()(c()().mark((function e(){return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jn(a);case 2:Le(!1),un(),v.ZP.info("添加成功");case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 15:case"end":return e.stop()}}),e)})));return function(n,t,i,s){return e.apply(this,arguments)}}()}),(0,Ne.jsx)(Nn.Z,{visible:Ie,onCancel:function(){return Pe(!1)},onOk:xn}),(0,Ne.jsx)(I.Z,{centered:!0,title:"编辑题型名称",open:an,width:500,onOk:function(){return tn.submit()},onCancel:function(){return rn(!1)},children:(0,Ne.jsxs)(f.Z,{form:tn,initialValues:{},onFinish:function(){var e=u()(c()().mark((function e(n){return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.RK)(s()({id:o},n));case 2:0==e.sent.status&&(v.ZP.success("修改成功"),un(),rn(!1));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,Ne.jsx)(f.Z.Item,{style:{marginBottom:0},name:"name",rules:[{required:!0,message:"请输入题型名称"},{whitespace:!0,message:"请勿输入空格"}],children:(0,Ne.jsx)(j.Z,{size:"large",maxLength:6,showCount:!0})}),(0,Ne.jsx)(f.Z.Item,{hidden:!0,name:"item_type_en",children:(0,Ne.jsx)(j.Z,{size:"large"})})]})})]})})),Zt=t(72864),Nt=t(7387),Ct=function(){var e=(0,m.useState)([]),n=p()(e,2),t=n[0],i=n[1];return(0,m.useEffect)((function(){var e=function(){var e=u()(c()().mark((function e(){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.d1)({source:"question"});case 2:null!=(n=e.sent)&&n.disciplines&&i((0,N.L)(null==n?void 0:n.disciplines));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),t},It=(0,h.connect)((function(e){return{user:e.user,newExercisePaper:e.newExercisePaper,dispatch:e.dispatch}}))((function(e){e.user;var n,t,i,l,r,o,d=e.newExercisePaper,N=e.dispatch,I=(0,h.useParams)(),P=Ct(),A=f.Z.useForm(),E=p()(A,1)[0],S=(0,m.useState)(),q=p()(S,2),T=q[0],F=q[1],B=(0,m.useState)(!1),D=p()(B,2),M=D[0],L=D[1],R=(0,m.useState)(1),O=p()(R,2),z=O[0],V=O[1],U=(0,m.useState)(""),H=p()(U,2),W=H[0],K=H[1],Y=(0,h.useSearchParams)(),G=p()(Y,1)[0],J=(0,m.useState)(!1),Q=p()(J,2),X=Q[0],$=Q[1];return(0,m.useEffect)((function(){"2"===G.get("type")&&(K(I.id),V(2))}),[G.get("type")]),(0,m.useEffect)((function(){if(I.id){if(!P.length)return;var e=function(){var e=u()(c()().mark((function e(){var n,t,i,l,r,o,u,d,p,m,h,f,x;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L(!0),e.next=3,(0,Z.Di)({id:I.id});case 3:i=e.sent,L(!1),l=null==i||null===(n=i.exercise)||void 0===n?void 0:n.sub_discipline_id,r=[],o=a()(P);try{for(o.s();!(u=o.n()).done;){d=u.value,p=a()(d.children);try{for(p.s();!(m=p.n()).done;)(h=m.value).value===l&&(r=[d.value,h.value])}catch(e){p.e(e)}finally{p.f()}}}catch(e){o.e(e)}finally{o.f()}f=null==i||null===(t=i.exercise)||void 0===t?void 0:t.time,x=s()(s()({},i.exercise),{},{sub_discipline_id:r,time:-1===f?null:f}),F(x);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}else F({time:60,difficulty:2});N({type:"globalSetting/footerToggle",payload:!1})}),[P]),(0,Ne.jsx)("div",{style:{background:"#ffffff",marginTop:-8,padding:8,minHeight:"100vh",paddingBottom:64},children:(0,Ne.jsxs)("section",{className:"edu-container",children:[(0,Ne.jsx)("section",{className:"animated fadeIn",children:(0,Ne.jsx)("aside",{style:{marginTop:15},children:(0,Ne.jsxs)(x.Z,{separator:">",children:[(0,Ne.jsx)(x.Z.Item,{children:(0,Ne.jsx)(h.Link,{to:"/paperlibrary",children:"试卷库"})}),(0,Ne.jsx)(x.Z.Item,{children:"人工组卷"})]})})}),(0,Ne.jsxs)("div",{className:"bg-white",children:[(0,Ne.jsxs)("div",{style:{display:"flex",justifyContent:"center",paddingTop:20,alignItems:"center"},children:[(0,Ne.jsxs)("div",{onClick:function(){X?v.ZP.info("请先保存或取消当前正在编辑的试题。"):V(1)},className:1===z?k.Z.selectdiv:k.Z.divitem,children:[(0,Ne.jsx)(Zt.Z,{number:1,active:1===z,className:"mr10"}),(0,Ne.jsx)("span",{children:"试卷基础信息"})]}),(0,Ne.jsx)("div",{style:{width:188,border:"1px dotted #9096A3",margin:"0px 30px",height:1}}),(0,Ne.jsxs)("div",{onClick:function(){I.id||W?(V(2),W||K(I.id)):v.ZP.info("请先保存基础信息再新建试题")},className:1!==z?k.Z.selectdiv:k.Z.divitem,children:[(0,Ne.jsx)(Zt.Z,{number:2,active:1!==z,className:"mr10"}),(0,Ne.jsx)("span",{children:"编辑试题"})]})]}),2===z&&(0,Ne.jsxs)("div",{className:"tc",children:[(0,Ne.jsx)(Nt.Z,{defaultValue:null==d||null===(n=d.editData)||void 0===n||null===(n=n.exercise)||void 0===n?void 0:n.exercise_name,onFinish:function(){var e=u()(c()().mark((function e(n){var t,i,s,l,a,r;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.trim()!==(null==d||null===(t=d.editData)||void 0===t||null===(t=t.exercise)||void 0===t?void 0:t.exercise_name)){e.next=2;break}return e.abrupt("return",!0);case 2:return e.next=4,(0,Z.w0)({id:"".concat(null==d||null===(i=d.editData)||void 0===i||null===(i=i.exercise)||void 0===i?void 0:i.id),sub_discipline_id:null==d||null===(s=d.editData)||void 0===s||null===(s=s.exercise)||void 0===s?void 0:s.sub_discipline_id,time:"".concat(null==d||null===(l=d.editData)||void 0===l||null===(l=l.exercise)||void 0===l?void 0:l.time),exercise_name:n,exercise_description:null==d||null===(a=d.editData)||void 0===a||null===(a=a.exercise)||void 0===a?void 0:a.exercise_description,difficulty:null==d||null===(r=d.editData)||void 0===r||null===(r=r.exercise)||void 0===r?void 0:r.difficulty});case 4:if(0!==e.sent.status){e.next=9;break}return E.setFieldValue("exercise_name",n),N({type:"newExercisePaper/modifyTitle",payload:n}),e.abrupt("return",!0);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()}),(0,Ne.jsxs)("div",{style:{fontSize:14},children:[(0,Ne.jsxs)("span",{style:{color:"#5F6368"},children:["答题时长",(0,Ne.jsx)("span",{style:{color:"#000000",marginLeft:8},children:null==d||null===(t=d.editData)||void 0===t||null===(t=t.exercise)||void 0===t?void 0:t.time})]}),(0,Ne.jsxs)("span",{style:{margin:"0px 30px",color:"#5F6368"},children:["难度",(0,Ne.jsx)("span",{style:{color:"#000000",marginLeft:8},children:1===(null==d||null===(i=d.editData)||void 0===i||null===(i=i.exercise)||void 0===i?void 0:i.difficulty)?"简单":2===(null==d||null===(l=d.editData)||void 0===l||null===(l=l.exercise)||void 0===l?void 0:l.difficulty)?"适中":"困难"})]}),(0,Ne.jsxs)("span",{style:{marginRight:30,color:"#5F6368"},children:["试题总数",(0,Ne.jsx)("span",{style:{color:"#000000",marginLeft:8},children:(null==d||null===(r=d.editData)||void 0===r||null===(r=r.exercise_types)||void 0===r?void 0:r.q_counts)||0})]}),(0,Ne.jsxs)("span",{style:{color:"#5F6368"},children:["总分",(0,Ne.jsx)("span",{style:{color:"#000000",marginLeft:8},children:null==d||null===(o=d.editData)||void 0===o||null===(o=o.exercise_types)||void 0===o?void 0:o.q_scores})]})]})]})]}),1===z&&(0,Ne.jsxs)(g.Z,{spinning:M,size:"middle",style:{position:"fixed",maxHeight:"100vh"},className:"mt30",children:[(0,Ne.jsx)("section",{className:[k.Z.bg,"mt20"].join(" "),style:{padding:"30px 120px 300px 120px"},children:T&&(0,Ne.jsxs)(f.Z,{layout:"horizontal",form:E,colon:!1,labelCol:{span:4},wrapperCol:{span:20},className:k.Z.formWrap,initialValues:T,children:[(0,Ne.jsx)(f.Z.Item,{name:"exercise_name",label:"试卷名称",className:k.Z.baseLineHeight,rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请填写试卷标题")}}],children:(0,Ne.jsx)(j.Z,{maxLength:60,className:k.Z.baseFormItem,placeholder:"请输入试卷名称",showCount:!0})}),(0,Ne.jsx)(f.Z.Item,{label:"方向&课程",name:"sub_discipline_id",className:k.Z.baseLineHeight,rules:[{required:!0,message:"请选择课程"}],children:(0,Ne.jsx)(_.Z,{className:k.Z.baseFormItem,allowClear:!1,placeholder:"请选择方向&课程",options:P,popupClassName:k.Z.cascaderPopup,dropdownMenuColumnStyle:{padding:"8px 12px",fontSize:14}})}),(0,Ne.jsx)(f.Z.Item,{label:"难度",name:"difficulty",className:k.Z.radioBtnWrapper,rules:[{required:!0,message:"请选择难度"}],children:(0,Ne.jsxs)(y.ZP.Group,{className:k.Z.radiogroup,children:[(0,Ne.jsx)(y.ZP.Button,{className:k.Z.easy,value:1,children:"简单"}),(0,Ne.jsx)(y.ZP.Button,{className:k.Z.medium,value:2,children:"适中"}),(0,Ne.jsx)(y.ZP.Button,{className:k.Z.hard,value:3,children:"困难"})]})}),(0,Ne.jsx)(f.Z.Item,{label:"答题时长",className:k.Z.baseLineHeight,children:(0,Ne.jsxs)("div",{style:{display:"flex",width:"100%"},children:[(0,Ne.jsx)(f.Z.Item,{name:"time",noStyle:!0,children:(0,Ne.jsx)(b.Z,{min:1,className:k.Z.baseFormItem,max:9999,style:{width:220},maxLength:60,placeholder:"请填写答题时长"})}),(0,Ne.jsx)("span",{style:{marginLeft:"10px",width:"40px",lineHeight:"46px",fontSize:14},children:"分钟"})]})}),(0,Ne.jsx)(f.Z.Item,{label:"试卷须知",name:"exercise_description",children:(0,Ne.jsx)(j.Z.TextArea,{rows:6,maxLength:65535,placeholder:"请在此输入本次试卷答题的相关说明,最大限制65535个字符"})})]})}),(0,Ne.jsxs)("div",{className:k.Z.bottmodiv,children:[(0,Ne.jsx)(w.ZP,{className:"".concat(k.Z.cancelBtn," mr5"),type:"primary",onClick:function(){h.history.push("/paperlibrary")},children:"取消"}),(0,Ne.jsx)(C.Z,{className:"".concat(k.Z.confirmBtn," ml15"),type:"primary",onClick:u()(c()().mark((function e(){var n,t,i,l;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E.validateFields();case 2:if((n=E.getFieldsValue()).sub_discipline_id=n.sub_discipline_id[1],!I.id){e.next=10;break}return e.next=7,(0,Z.w0)(s()({id:I.id},n));case 7:return 0===e.sent.status&&(K(I.id),V(2),h.history.replace("/paperlibrary/add/".concat(I.id,"?type=2"))),e.abrupt("return");case 10:return e.next=12,(0,Z.un)(n);case 12:0===(t=e.sent).status&&(K(null==t||null===(i=t.data)||void 0===i?void 0:i.exam_id),V(2),h.history.replace("/paperlibrary/add/".concat(null==t||null===(l=t.data)||void 0===l?void 0:l.exam_id,"?type=2")));case 14:case"end":return e.stop()}}),e)}))),children:"下一步"})]})]}),2===z&&(0,Ne.jsx)("div",{children:(0,Ne.jsx)(kt,{setisedits:$,itemid:W})})]})})}))},37823:function(e,n,t){t.d(n,{I:function(){return a}});var i=t(11006),s=t.n(i),l=t(59301),a=function(){var e=(0,l.useState)("hidden"),n=s()(e,2),t=n[0],i=n[1];return{overflow:t,handleMouseEnter:function(){return i("auto")},handleMouseLeave:function(){return i("hidden")}}}},70319:function(e,n,t){t(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;n.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},50699:function(e,n,t){t(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;n.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},34566:function(e,n){n.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankWrapper:"blankWrapper___nC45e",blankInput:"blankInput___pEHsx",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},84527:function(e,n){n.Z={flex_box_center:"flex_box_center___ycN2f",flex_space_between:"flex_space_between___LcS9e",flex_box_vertical_center:"flex_box_vertical_center___uwjPm",flex_box_center_end:"flex_box_center_end___Pc903",flex_box_column:"flex_box_column___AXEdv",bg:"bg___fm2Cw",title:"title___J3MCU",editIcon:"editIcon___i4Zll",titleLeft:"titleLeft___da61c",titleRight:"titleRight___EsdL6",formWrap:"formWrap___YTxC3",baseLineHeight:"baseLineHeight___TprCB",radioBtnWrapper:"radioBtnWrapper___Mt_XG",radiogroup:"radiogroup___EvkWh",easy:"easy___mSxtg",medium:"medium___NIaWN",hard:"hard___mddnD",baseFormItem:"baseFormItem___csbyb",cascaderPopup:"cascaderPopup___BttnF",selectdiv:"selectdiv___TAr4i",divitem:"divitem___iaXB2",bottmodiv:"bottmodiv___bmp6p",cancelBtn:"cancelBtn___Q4ZcL",confirmBtn:"confirmBtn___nRiCD"}},93314:function(e){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJY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