(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[174,4,5,7,9,10,12,14],{"1vsH":function(e,t,n){"use strict";n.d(t,"i",(function(){return s})),n.d(t,"k",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"h",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return _})),n.d(t,"a",(function(){return b})),n.d(t,"C",(function(){return g})),n.d(t,"B",(function(){return v})),n.d(t,"D",(function(){return h})),n.d(t,"E",(function(){return E})),n.d(t,"s",(function(){return w})),n.d(t,"r",(function(){return y})),n.d(t,"p",(function(){return x})),n.d(t,"o",(function(){return k})),n.d(t,"A",(function(){return j})),n.d(t,"j",(function(){return N})),n.d(t,"z",(function(){return C})),n.d(t,"u",(function(){return q})),n.d(t,"l",(function(){return I})),n.d(t,"x",(function(){return T})),n.d(t,"n",(function(){return D})),n.d(t,"d",(function(){return B})),n.d(t,"b",(function(){return R})),n.d(t,"t",(function(){return F})),n.d(t,"y",(function(){return M})),n.d(t,"w",(function(){return V})),n.d(t,"m",(function(){return P})),n.d(t,"v",(function(){return H})),n.d(t,"q",(function(){return W}));var a=n("zjzt"),r=n("ZZRV"),c=n.n(r),i=n("xKgJ"),o=n("vcnW"),l=n.n(o),s=["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"],u=function(e){var t,n=(t={},Object(a["a"])(t,-1,"\u91cd\u505a\u4e2d"),Object(a["a"])(t,0,"\u672a\u5f00\u542f"),Object(a["a"])(t,1,"\u672a\u901a\u5173"),Object(a["a"])(t,2,"\u6309\u65f6\u901a\u5173"),t);return n[e]||"\u8fdf\u4ea4\u901a\u5173"},d=function(e){var t,n,r,i=(t={},Object(a["a"])(t,-1,{name:"\u91cd\u505a\u4e2d",class:"c-orange"}),Object(a["a"])(t,0,{name:"\u672a\u5f00\u542f",class:"c-black"}),Object(a["a"])(t,1,{name:"\u672a\u901a\u5173",class:"c-red"}),Object(a["a"])(t,2,{name:"\u6309\u65f6\u901a\u5173",class:"c-green"}),Object(a["a"])(t,3,{name:"\u8fdf\u4ea4\u901a\u5173",class:"c-orange"}),t);return c.a.createElement("span",{className:null===i||void 0===i||null===(n=i[e.status])||void 0===n?void 0:n["class"]},null===i||void 0===i||null===(r=i[e.status])||void 0===r?void 0:r["name"])},m=function(e){var t=e.status,n={0:{class:"tag-style bg-blue ml10",name:"\u5f85\u9009\u4e2d"},1:{class:"tag-style bg-blue ml10",name:"\u5f85\u786e\u8ba4"},2:{class:"tag-style bg-pink ml10",name:"\u5df2\u786e\u8ba4"}};try{return c.a.createElement("span",{className:n[t]["class"]},n[t]["name"])}catch(a){console.log("utils.StatusGraduationProjectTags",e.status)}},p={1:"\u672a\u53d1\u5e03",2:"\u8003\u8bd5\u4e2d",3:"\u5df2\u622a\u6b62",4:"\u5df2\u7ed3\u675f"},f={1:"\u672a\u53d1\u5e03",2:"\u63d0\u4ea4\u4e2d",3:"\u5df2\u622a\u6b62",4:"\u5df2\u7ed3\u675f"},_=function(e){var t={"\u5df2\u5f00\u542f\u9632\u4f5c\u5f0a":{class:"tag-style-fzb ml10 iconfont icon-fangzuobi"},"\u516c\u5f00":{class:"tag-style bg-blue ml10"},"\u5df2\u5f00\u542f\u8865\u4ea4":{class:"tag-style bg-green ml10"},"\u672a\u5f00\u542f\u8865\u4ea4":{class:"tag-style bg-pink ml10"},"\u672a\u53d1\u5e03":{class:"tag-style bg-light-blue ml10"},"\u533f\u540d\u4f5c\u54c1":{class:"tag-style bg-cyan ml10"},"\u5df2\u9009\u62e9":{class:"tag-style bg-grey-ede ml10"},"\u5df2\u7ed3\u675f":{class:"tag-style bg-grey-ede ml10"},"\u63d0\u4ea4\u4e2d":{class:"tag-style bg-blue ml10"},"\u533f\u8bc4\u4e2d":{class:"tag-style bg-blue ml10"},"\u7533\u8bc9\u4e2d":{class:"tag-style bg-blue ml10"},"\u8003\u8bd5\u4e2d":{class:"tag-style bg-light-blue ml10"},"\u8865\u4ea4\u4e2d":{class:"tag-style bg-blue ml10"},"\u8bc4\u9605\u4e2d":{class:"tag-style bg-blue ml10"},"\u5f85\u9009\u4e2d":{class:"tag-style bg-blue ml10"},"\u4ea4\u53c9\u8bc4\u9605\u4e2d":{class:"tag-style bg-light-orange ml10"},"\u5df2\u5f00\u542f\u4ea4\u53c9\u8bc4\u9605":{class:"tag-style bg-lightblue-purple ml10"},"\u5f85\u786e\u8ba4":{class:"tag-style bg-lightblue-purple ml10"},"\u5f85\u5904\u7406":{class:"tag-style bg-lightblue-purple ml10"},"\u79c1\u6709":{class:"tag-style bg-lightblue-purple ml10"},"\u672a\u63d0\u4ea4":{class:"tag-style bg-lightblue-purple ml10"},"\u5df2\u786e\u8ba4":{class:"tag-style bg-light-pink ml10"},"\u5df2\u53d1\u5e03":{class:"tag-style bg-light-blue ml10"},"\u5df2\u622a\u6b62":{class:"tag-style bg-light-pink ml10"},"\u5f00\u53d1\u8bfe\u7a0b":{class:"tag-style bg-orange ml10"},"\u5df2\u5f00\u64ad":{class:"tag-style-border border-green c-green ml10"},"\u672a\u5f00\u64ad":{class:"tag-style-border border-light-black ml10"},"\u6309\u65f6\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u8fdf\u4ea4\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u672a\u901a\u5173":{class:"tag-style-border border-light-black ml10"},"\u672a\u5f00\u542f":{class:"tag-style-border border-light-black ml10"}},n=[];e.is_random&&n.push(c.a.createElement("span",{className:"tag-style bg-blue ml10"},"\u968f\u673a"));try{e.status&&e.status.map((function(e,a){n.push(c.a.createElement("span",{key:a,className:t[e]&&t[e]["class"]},e))}))}catch(a){console.log("utils.status.tag:",a,e.status)}return n},b=function(e){var t,n,a={0:{name:"\u672a\u63d0\u4ea4",class:"c-black"},1:{name:"\u6309\u65f6\u63d0\u4ea4",class:"c-green"},2:{name:"\u5ef6\u65f6\u63d0\u4ea4",class:"c-red"}};return c.a.createElement("span",{className:null===(t=a[e.status])||void 0===t?void 0:t["class"]},null===(n=a[e.status])||void 0===n?void 0:n["name"])},g=function(e){e=new Date(e).getTime();var t=6e4,n=60*t,a=24*n,r="",c=(new Date).getTime(),i=c-e;if(i<0)return console.log("\u65f6\u95f4\u4e0d\u5bf9\u52b2,\u670d\u52a1\u5668\u521b\u5efa\u65f6\u95f4\u4e0e\u5f53\u524d\u65f6\u95f4\u4e0d\u540c\u6b65"),"\u521a\u521a";var o=parseInt(i/a,10),l=parseInt(i/n,10),s=parseInt(i/t,10);return r=o>30?""+v(e,"yyyy-MM-dd"):o>1?o+"\u5929\u524d":1==o?"\u6628\u5929":l>=1?l+"\u5c0f\u65f6\u524d":s>=5?s+"\u5206\u949f\u524d":"\u521a\u521a",r},v=function(e,t){"string"==typeof e&&(e.indexOf("T")>=0&&(e=e.replace("T"," ")),e=new Date(Date.parse(e.replace(/-/g,"/")))),e=new Date(e);var n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()},a=[["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"]];for(var r in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/(w+)/.test(t)&&(t=t.replace(RegExp.$1,a[RegExp.$1.length-1][e.getDay()])),n)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?n[r]:("00"+n[r]).substr((""+n[r]).length)));return t},h=function(e){if(!e||e<0)return"0\u79d2";console.log("time:",e);var t=60,n=60*t,a=24*n,r=e/a,c=e/n,i=e/t;return r>=1?parseInt(r.toString())+"\u5929"+Math.floor(c%24)+"\u65f6"+Math.floor(i%60)+"\u5206"+Math.floor(e%60)+"\u79d2":c>1?parseInt(c.toString())+"\u65f6"+Math.floor(i%60)+"\u5206"+Math.floor(e%60)+"\u79d2":i>=1?parseInt(i.toString())+"\u5206"+Math.floor(e%60)+"\u79d2":Math.ceil(e)+"\u79d2"},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=0;if(e){n=e.length;for(var a=0;a=55296&&r<=56319&&(n--,a++)}}return n<=t},w=function(e,t,n){if(t){var a=/[`~!@#$%^&*()\-+=<>?:"{}|,.\/;'\\[\]\xb7~\uff01@#\uffe5%\u2026\u2026&*\uff08\uff09\u2014\u2014\-+={}|\u300a\u300b\uff1f\uff1a\u201c\u201d\u3010\u3011\u3001\uff1b\u2018\u2019\uff0c\u3002\u3001]/im,r=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,c=r.test(t),i=a.test(t);(!0===c||!0===i||t.length<2||t.length>=21)&&n("2-20\u4f4d\u4e2d\u82f1\u6587\u3001\u6570\u5b57\u53ca\u4e0b\u5212\u7ebf")}n()},y=function(e,t,n){if(t){var a=/[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]\xb7~\uff01@#\uffe5%\u2026\u2026&\uff08\uff09\u2014\u2014\-+={}|\u300a\u300b\uff1f\uff1a\u201c\u201d\u3010\u3011\u3001\uff1b\u2018\u2019\uff0c\u3002\u3001]/im,r=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,c=r.test(t),i=a.test(t);(!0===c||!0===i||t.length<2||t.length>=11)&&n("2-10\u4f4d\u4e2d\u82f1\u6587\u3001\u6570\u5b57")}n()},x=function(e){if(!e)return"";for(var t=e.length-1,n="",a=0;a0){n=!1;break}return n}var A,I=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return null===t||void 0===t||null===(e=t.toString())||void 0===e?void 0:e.replace(/\B(?=(\d{3})+(?!\d))/g,",")},T=function(e){var t=document.createElement("a");t.target="_blank",document.body.appendChild(t),t.href=e;var n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),t.dispatchEvent(n),document.body.removeChild(t)},D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.length<=6?e:"".concat(e.substring(0,3),"...").concat(e.substring(e.length-3,e.length))},B=function(){var e=(new Date).getHours(),t=(new Date).getMinutes();return t>=30?(e++,t="00"):t="30",e+":"+t},R=function(){var e=(new Date).getHours(),t=(new Date).getMinutes();return t>=30?(e++,t="00"):t="30",(new Date).toLocaleDateString().replace(/\//g,"-")+" "+e+":"+t};(function(e){e["Number"]="Number",e["String"]="String",e["Boolean"]="Boolean",e["Object"]="Object",e["Array"]="Array",e["Function"]="Function"})(A||(A={}));var L=function(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1)},F=function(e){return L(e)===A.Array?0===e.length:L(e)===A.Object?0===Object.keys(e).length:!e},M=function(e,t){for(var n=[],a=e;a1&&void 0!==arguments[1]?arguments[1]:12,n=t/2-2,a=t/2+3;return e.length>t?e.substr(0,n)+"..."+e.substr(a,t):e},P=function(e){return e>4.5?5:e>4&&e<=4.5?4.5:e>3.5&&e<=4?4:e>3&&e<=3.5?3.5:e>2.5&&e<=3?3:e>2&&e<=2.5?2.5:e>1.5&&e<=2?2:e>1&&e<=1.5?1.5:e>.5&&e<=1?1:e>0&&e<=.5?.5:0},H=function(e){return void 0===e||null===e};var W=function(e){switch(e.container_type){case"ApplyUserAuthentication":if("Apply"===e.tiding_type){if(1===e.auth_type)return window.open("/admins/identity_authentications");if(2===e.auth_type)return window.open("/admins/professional_authentications")}return"System"===e.tiding_type?window.open("/account/certification"):void 0;case"CancelUserAuthentication":return window.open("/account/certification");case"CancelUserProCertification":return window.open("/account/certification");case"ApplyAddDepartment":return"Apply"===e.tiding_type?window.open("/admins/department_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAddSchools":return"Apply"===e.tiding_type?window.open("/admins/unit_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAction":switch(e.parent_container_type){case"ApplyShixun":if("Apply"===e.tiding_type)return window.open("/admins/shixun_authorizations");if("System"===e.tiding_type)return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"ApplySubject":if("Apply"===e.tiding_type)return window.open("/admins/subject_authorizations");if("System"===e.tiding_type)return window.open("/paths/".concat(e.parent_container_id));case"TrialAuthorization":if("Apply"===e.tiding_type)return window.open("/managements/trial_authorization");if("System"===e.tiding_type)return window.open("/account/profile")}return;case"JoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));case"StudentJoinCourse":if("Apply"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/teachers"));if("System"===e.tiding_type)return window.open("/classrooms/".concat(e.belong_container_id,"/students"));case"DealCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/"));case"TeacherJoinCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/"));case"Course":if("Delete"===e.tiding_type)return;return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/"));case"ArchiveCourse":return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/"));case"Shixun":return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"Subject":return window.open("/paths/".concat(e.container_id));case"JournalsForMessage":switch(e.parent_container_type){case"Principal":return"";case"HomeworkCommon":return"normal"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=1")):"";case"GraduationTopic":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return"normal"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=1")):""}case"Memo":return window.open("/forums/".concat(e.parent_container_id));case"Message":return window.open("/forums/");case"Watcher":return window.open("/users/".concat(e.trigger_user.login,"/classrooms"));case"PraiseTread":return"";case"Grade":return"";case"JoinProject":return window.open("/projects/".concat(e.container_id));case"ReporterJoinProject":return window.open("/projects/".concat(e.container_id));case"DealProject":return window.open("/projects/".concat(e.container_id));case"ManagerJoinProject":return window.open("/projects/".concat(e.container_id));case"Poll":switch(e.parent_container_type){case"CommitPoll":return window.open("\t/classrooms/".concat(e.belong_container_id,"/poll/").concat(e.container_id,"/detail"));default:return window.open("\t/classrooms/".concat(e.belong_container_id,"/poll/").concat(e.container_id,"/detail"))}case"Exercise":switch(e.parent_container_type){case"CommitExercise":return window.open("\t/classrooms/".concat(e.belong_container_id,"/exercise/").concat(e.container_id,"/detail?tab=0"));case"ExerciseScore":return window.open("\t/classrooms/".concat(e.belong_container_id,"/exercise/").concat(e.container_id,"/detail?tab=0"));default:return window.open("/classrooms/".concat(e.belong_container_id,"/exercise/").concat(e.container_id,"/detail?tab=0"))}case"StudentGraduationTopic":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"DealStudentTopicSelect":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"GraduationTask":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWork":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWorkScore":return window.open("/classrooms/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.parent_container_id));case"HomeworkCommon":switch(e.parent_container_type){case"AnonymousCommentFail":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"HomeworkPublish":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));case"AnonymousAppeal":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"));default:if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/detail"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/detail"));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail?tabs=0"))}case"StudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/review/").concat(e.container_id));if("practice"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/shixun_homework/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.trigger_user.id,"/review/").concat(e.parent_container_id));case"StudentWorksScoresAppeal":return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.trigger_user.id,"/review/").concat(e.parent_container_id));case"ChallengeWorkScore":return"";case"SendMessage":return window.open("/managements/mirror_repository");case"Journal":return window.open("/issues/".concat(e.parent_container_id));case"Issue":return window.open("/issues/".concat(e.container_id));case"PullRequest":return window.open("/projects/".concat(e.parent_container_id,"/pull_requests"));case"Department":return window.open("/account/profile");case"Library":if("Apply"===e.tiding_type)return window.open("/admins/library_applies");if("System"===e.tiding_type)return window.open("/moop_cases/".concat(e.container_id));case"ProjectPackage":if("Destroyed"===e.tiding_type)return;return"Destroyed_end"===e.tiding_type?void 0:"Apply"===e.tiding_type?window.open("/admins/project_package_applies"):window.open("/crowdsourcing/".concat(e.container_id));case"Discuss":return"Hack"===e.parent_container_type&&e.extra?window.open("/myproblems/".concat(e.extra,"/comment")):window.open("/shixuns/".concat(e.identifier,"/shixun_discuss"));case"Video":return"Apply"===e.tiding_type?window.open("/admins/video_applies"):"System"===e.tiding_type?window.open("/users/".concat(null===(t=Object(i["t"])())||void 0===t?void 0:t.login,"/videos")):"";var t;case"PublicCourseStart":return window.open("/classrooms/".concat(e.container_id,"/informs"));case"SubjectStartCourse":return window.open("/paths/".concat(e.container_id));case"ResubmitStudentWork":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));case"AdjustScore":if("normal"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/common_homework/").concat(e.parent_container_id));if("group"===e.homework_type)return window.open("/classrooms/".concat(e.belong_container_id,"/group_homework/").concat(e.parent_container_id));case"LiveLink":return window.open("/classrooms/".concat(e.belong_container_id,"/course_videos?open=live"));case"Hack":if(e.extra&&"HackDelete"!==e.parent_container_type)return window.open("/problems/".concat(e.extra,"/edit"));default:return}}},"7ahc":function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var a=n("55MS"),r=n("1gHQ"),c=(n("MPZO"),n("bnk9")),i=(n("EkPb"),n("7X0+")),o=n("GZha"),l=(n("VmQ4"),n("QeCE")),s=n("ZZRV"),u=n.n(s),d=n("M0ff"),m=n.n(d),p=(n("4X1q"),l["a"].Option),f={labelCol:{span:4},wrapperCol:{span:20}},_={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 b(e){var t=e.value,n=e.onChange,r=e.mode,c=e.options,i=void 0===c?{}:c,l=Object(s["useRef"])(),d=Object(s["useState"])(),p=Object(o["a"])(d,2),f=p[0],_=p[1];return Object(s["useEffect"])((function(){if(f){var e=function(e){var t=e.getValue();n&&n(t)};return f.on("change",e),function(){f.off("change",e)}}}),[f,n]),Object(s["useEffect"])((function(){f&&f.setOption("mode",r)}),[f,r]),Object(s["useEffect"])((function(){f&&t!==f.getValue()&&f.setValue(t||"")}),[f,t]),Object(s["useEffect"])((function(){if(l.current&&!f){var e=m.a.fromTextArea(l.current,Object(a["a"])({mode:r,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0},i));_(e)}}),[l.current,f]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}t["b"]=function(e){var t=e.callback,n=e.onCancel,a=Object(s["useState"])("python"),d=Object(o["a"])(a,2),m=d[0],g=d[1];function v(e){g(_[e][1])}function h(e){t(e)}return u.a.createElement(i["a"],Object(r["a"])({},f,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:h}),u.a.createElement(i["a"].Item,{label:"\u4ee3\u7801\u8bed\u8a00",name:"language"},u.a.createElement(l["a"],{onChange:v},Object.keys(_).map((function(e){return u.a.createElement(p,{key:e,value:e},_[e][0])})))),u.a.createElement(i["a"].Item,{label:"\u4ee3\u7801\u5185\u5bb9",name:"content",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u4ee3\u7801\u5185\u5bb9"}]},u.a.createElement(b,{mode:m})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(c["a"],{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786e\u5b9a"),u.a.createElement(c["a"],{type:"ghost",onClick:n},"\u53d6\u6d88")))}},"7qnI":function(e,t,n){"use strict";n("CeOx");var a=n("NiCL"),r=n("FGJx"),c=n("o0AO"),i=n("uwZC"),o=n("lpH6"),l=(n("DHCt"),n("CRgH")),s=n("ZZRV"),u=n.n(s),d=n("O2Wb"),m=n.n(d),p=l["a"].TextArea,f=function(e){Object(i["a"])(n,e);var t=Object(o["a"])(n);function n(){return Object(r["a"])(this,n),t.apply(this,arguments)}return Object(c["a"])(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.index,r=t.onAnswerChange,c=t.addChildAnswer,i=t.exerciseIsPublish,o=t.answers,l=t.activeOptionErrorIndex;return u.a.createElement("div",{className:m.a.flex},u.a.createElement("div",{className:"".concat(m.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"\u7b54\u6848(\u586b\u7a7a",n+1,"):"),u.a.createElement("div",{className:"".concat(m.a.flex," ").concat(m.a.flex1),style:{flexDirection:"column"}},o.map((function(t,s){var d="".concat(n,"-").concat(s);return u.a.createElement("div",{className:"".concat(m.a.flex," ").concat(m.a.flex1),key:s},u.a.createElement("div",{className:m.a.flex1,style:{flex:"0 0 1000px"}},u.a.createElement("div",null,u.a.createElement(p,{className:d===l?m.a.error:"",spellCheck:!1,rows:4,value:t||"",defaultValue:"\u8bf7\u8f93\u5165\u53c2\u8003\u7b54\u6848".concat(0==s?"":"(\u53ef\u9009)"),onChange:function(e){return r(n,s,e.target.value)},style:{minHeight:95}}))),!i&&u.a.createElement(u.a.Fragment,null,0!=s&&u.a.createElement(a["a"],{title:"\u5220\u9664"},u.a.createElement("i",{className:"".concat(m.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return e.props.deleteChildAnswer(n,s)},style:{float:"right"}})),0===s&&u.a.createElement(a["a"],{title:"\u5220\u9664"},u.a.createElement("i",{className:"".concat(m.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return e.props.deleteChildAnswermain(n,s)},style:{float:"right"}})),u.a.createElement(a["a"],{title:"\u65b0\u589e\u53c2\u8003\u7b54\u6848"},u.a.createElement("i",{className:"".concat(m.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return c(n)},style:{float:"right",visibility:s==o.length-1?"":"hidden"}}))))}))))}}]),n}(s["Component"]);t["a"]=f},"9Bee":function(e,t,n){"use strict";var a=n("ZZRV"),r=n.n(a),c=(n("Sawj"),n("GZha")),i=n("tVQ9"),o=n.n(i),l=n("PRXW");function s(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var a=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);if(null===t)return e;var n=Object(c["a"])(t,1),r=n[0];return r.length>=a.length?e.slice(a.length):e})).join("\n")}var u=[],d=["
    "],m=new o.a.Renderer,p=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function f(){u.length=0,d=["
      "]}function _(e,t,n,a){if(t>=e.length||e[t].level<=n)return t;var r=e[t];a.push("
    • "+r.text+""),t++;var c=[];return t=_(e,t,r.level,c),c.length>0&&(a.push("
        "),c.forEach((function(e){a.push(e)})),a.push("
      ")),a.push("
    • "),t=_(e,t,n,a),t}function b(){return _(u,0,0,d),d.push("
    "),d.join("")}var g={heading:function(e){var t=p.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],a=s(n,t[3]||""),r=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(r)>=0){var c=E(),i=a;a=c,w[c]={type:"block",expression:i}}return{type:"code",raw:n,lang:r,text:a}}}},v=/(?:\${2})([^\n`]+?)(?:\${2})/gi,h=0,E=function(){return"__special_katext_id_".concat(h++,"__")},w={};function y(){return w}function x(){h=0,w={}}function k(e){return e=e.replace(v,(function(e,t){var n=E();return w[n]={type:"inline",expression:t},n})),e}var j=m.listitem;m.listitem=function(e){return j(k(e))};var O=m.paragraph;m.paragraph=function(e){return O(k(e))};var S=m.tablecell;m.tablecell=function(e,t){return S(k(e),t)},m.code=function(e,t,n){var a=(t||"").match(/\S*/)[0];return a?["latex","katex","math"].indexOf(a)>=0?"

    ".concat(e,"

    "):'
    ').concat(n?e:Object(l["escape"])(e,!0),"
    \n"):'
    '+(n?e:Object(l["escape"])(e,!0))+"
    "},m.heading=function(e,t,n){var a=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return u.push({anchor:a,level:t,text:e}),"'+e+""},o.a.setOptions({silent:!0,smartypants:!0,gfm:!0,pedantic:!1}),o.a.use({tokenizer:g,renderer:m});var N=o.a,C=(n("8+LE"),n("ZRDM")),q=n.n(C),A=n("saPB"),I=/]*>/g;function T(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}t["a"]=function(e){var t=e.value,n=void 0===t?"":t,c=e.className,i=e.style,o=void 0===i?{}:i,l=String(n),s=Object(a["useMemo"])((function(){var e=N(l),t=y();return l.match(/\[TOC\]/)&&(e=e.replace("

    [TOC]

    ",b()),f()),e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var a=t[n],r=a.type,c=a.expression;return Object(A["renderToString"])(T(c)||"",{displayMode:"block"===r,throwOnError:!1,output:"html"})})),e=e.replace(/\u2581/g,"\u2581\u2581\u2581"),x(),q.a.sanitize(e)}),[l]),u=Object(a["useRef"])();function d(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.startsWith("#")){e.preventDefault();var a=document.getElementById(n.replace("#",""));a&&a.scrollIntoView(!0)}}}return Object(a["useEffect"])((function(){if(u.current&&s&&s.match(I)&&window.PR.prettyPrint(),u.current)return u.current.addEventListener("click",d),function(){u.current.removeEventListener("click",d),x(),f()}}),[s,u.current,d]),r.a.createElement("div",{ref:u,style:o,className:"".concat(c||""," markdown-body"),dangerouslySetInnerHTML:{__html:s}})}},"9VGf":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n("ZZRV");function r(e,t){var n=Object(a["useRef"])();Object(a["useEffect"])((function(){n.current=e})),Object(a["useEffect"])((function(){function e(){n.current()}if(null!==t){var a=setInterval(e,t);return function(){return clearInterval(a)}}}),[t])}},BjJ7:function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"f",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return l})),n.d(t,"a",(function(){return s}));var a=n("m3rI");function r(e){var t=!0;if(e.length>0){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=[],a=0;a=0,$=Q?"Cmd":"Ctrl",K=(A={},Object(i["a"])(A,$+"-B","bold"),Object(i["a"])(A,$+"-I","italic"),A),ee=(I={},Object(i["a"])(I,M,"\u6dfb\u52a0\u94fe\u63a5"),Object(i["a"])(I,P,"\u6dfb\u52a0\u4ee3\u7801\u5757"),Object(i["a"])(I,V,"\u6dfb\u52a0\u56fe\u7247"),Object(i["a"])(I,H,"\u6dfb\u52a0\u8868\u683c"),I);t["a"]=function(e){var t=e.defaultValue,n=void 0===t?"":t,s=e.onChange,p=e.width,f=void 0===p?"100%":p,_=e.height,v=void 0===_?400:_,h=e.miniToolbar,E=void 0!==h&&h,w=e.isFocus,k=void 0!==w&&w,j=e.watch,O=e.id,S=void 0===O?"markdown-editor-id":O,C=e.showResizeBar,A=void 0!==C&&C,I=e.noStorage,T=void 0!==I&&I,D=e.showNullButton,B=void 0!==D&&D,R=e.fullScreen,W=void 0!==R&&R,Q=e.onBlur,$=e.onCMBeforeChange,te=e.className,ne=void 0===te?"":te,ae=e.placeholder,re=void 0===ae?"":ae,ce=Object(o["useState"])(null),ie=Object(c["a"])(ce,2),oe=ie[0],le=ie[1],se=Object(o["useState"])(n),ue=Object(c["a"])(se,2),de=ue[0],me=ue[1],pe=Object(o["useState"])(j),fe=Object(c["a"])(pe,2),_e=fe[0],be=fe[1],ge=Object(o["useState"])(W),ve=Object(c["a"])(ge,2),he=ve[0],Ee=ve[1],we=Object(o["useState"])(""),ye=Object(c["a"])(we,2),xe=ye[0],ke=ye[1],je=Object(o["useState"])(0),Oe=Object(c["a"])(je,2),Se=Oe[0],Ne=Oe[1],Ce=Object(o["useState"])(v),qe=Object(c["a"])(Ce,2),Ae=qe[0],Ie=qe[1],Te=Object(o["useState"])(!1),De=Object(c["a"])(Te,2),Be=De[0],Re=De[1],Le=Object(o["useRef"])(),Fe=Object(o["useRef"])(),Me=Object(o["useRef"])(),Ve=Object(o["useRef"])();Object(o["useEffect"])((function(){if(Le.current){var e=function(e,n){var a=n.clipboardData;if(a){var r=a.types.toString(),c=a.items;if("text/html,Files"!==r&&"Files"!==r)return!0;var i=c[1];"Files"===r&&(i=c[0]),"file"===i.kind&&i.type.match(/^image\//i)&&q(i.getAsFile(),(function(e){e.id?t.replaceSelection("![,](/api/attachments/".concat(e.id,")")):F["c"].replace("/user/login",{from:F["c"].location.pathname})}))}return!0},t=u.a.fromTextArea(Le.current,{mode:"markdown",inputStyle:"contenteditable",lineNumbers:!E,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return t.on("paste",e),le(t),function(){t.off("paste",e)}}}),[]);var Pe=Object(o["useCallback"])((function(){if(Fe.current)try{var e=Fe.current.getElementsByClassName("markdown-toolbar-container")[0].offsetHeight,t=Fe.current.getElementsByClassName("markdown-editor-body")[0];t.style.height=he?"calc(100vh - ".concat(e,"px)"):"".concat(Ae-e,"px")}catch(n){console.log(n,"---- to set md editor body height")}}),[Ae,Fe,he]);Object(o["useEffect"])((function(){function e(){var e=new d["default"]((function(e){var t,n=Object(r["a"])(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;(a.target.offsetHeight>0||a.target.offsetWidth>0)&&(Pe(),oe.setSize("100%","100%"),oe.refresh())}}catch(c){n.e(c)}finally{n.f()}}));return e.observe(Le.current.parentElement),e}if(oe){var t=e();return function(){t.unobserve(Le.current.parentElement)}}}),[oe,Pe]),Object(o["useEffect"])((function(){if(oe){for(var e=[],t=function(){var t=a[n];o=Object(c["a"])(t,2);var r=o[0],l=o[1],s=Object(i["a"])({},r,(function(){He(l)}));e.push(s),oe.addKeyMap(s)},n=0,a=Object.entries(K);n0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(S);e>=Se+X&&(!t||t!==de)&&(window.sessionStorage.setItem(S,de),Re(!0))}}),X),Object(o["useEffect"])((function(){be(j)}),[oe,j]),Object(o["useEffect"])((function(){oe&&k&&oe.focus()}),[oe,k]),Object(o["useEffect"])((function(){if(_e&&oe){var e=function(e){var t=e.target;Ve.current&&(Ve.current.scrollTop=Ve.current.scrollHeight*t.scrollTop/t.scrollHeight)},t=oe.getScrollerElement();return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[oe,_e]),Object(o["useEffect"])((function(){if(oe&&$){var e=function(e,t){$(e,t)};return oe.on("beforeChange",e),function(){oe.off("beforeChange",e)}}}),[oe,$]),Object(o["useEffect"])((function(){if(oe&&Q){var e=function(){Q(oe.getValue())};return oe.on("blur",e),function(){oe.off("blur",e)}}}),[oe,Q]),Object(o["useEffect"])((function(){if(oe){var e=function(e){var t=e.getValue();clearTimeout(J),J=setTimeout((function(){me(t),Ne((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),s&&s(t)}),z)};return oe.on("change",e),function(){oe.off("change",e)}}}),[oe,s]),Object(o["useEffect"])((function(){oe&&(null===n||void 0===n?(oe.setValue(""),me("")):n!==oe.getValue()&&(oe.setValue(n),me(n)))}),[oe,n]);var He=Object(o["useCallback"])((function(e){var t=oe.getCursor(),n=oe.getSelection(),a=n.split("\n");switch(e){case"bold":return oe.replaceSelection("**"+n+"**"),""===n&&oe.setCursor(t.line,t.ch+2),oe.focus();case"italic":return oe.replaceSelection("*"+n+"*"),""===n&&oe.setCursor(t.line,t.ch+1),oe.focus();case"code":return oe.replaceSelection("`"+n+"`"),""===n&&oe.setCursor(t.line,t.ch+1),oe.focus();case"inline-latex":return oe.replaceSelection("`$$"+n+"$$`"),""===n&&oe.setCursor(t.line,t.ch+3),oe.focus();case"latex":return oe.replaceSelection("```latex\n"+n+"\n```"),oe.setCursor(t.line+1,n.length+1),oe.focus();case"line-break":return oe.replaceSelection("
    \n"),oe.focus();case"list-ul":return""===n?oe.replaceSelection("- "+n):oe.replaceSelection(a.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),oe.focus();case"list-ol":return""===n?oe.replaceSelection("1. "+n):oe.replaceSelection(a.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),oe.focus();case"add-null-ch":return""===n&&oe.setCursor(t.line,t.ch+1),oe.replaceSelection(U),oe.focus();case"eraser":return oe.setValue(""),oe.focus();case"trigger-watch":return be(!_e),oe.focus();case"trigger-full-screen":return Ee(!he),oe.focus();case M:return void ke(M);case P:return void ke(P);case V:return void ke(V);case H:return void ke(H);default:throw new Error}}),[oe,_e,he]),We=Object(o["useCallback"])((function(e){switch(ke(""),xe){case M:var t=e.title,n=e.link;return oe.replaceSelection("[".concat(t,"](").concat(n,")")),oe.focus();case P:var a=e.language,r=e.content;return oe.replaceSelection(["```"+a,r,"```"].join("\n")),oe.focus();case V:var c=e.src,i=e.alt;return oe.replaceSelection("![ ".concat(i," ]( ").concat(c,' "').concat(i,'" )')),oe.focus();case H:for(var o=e.row,l=e.col,s=e.align,u="\n",d=0;d300&&(t=300);var n=v+t+"px";Ie(n)}},a=Me.current,r=!1,c=0;return a.addEventListener("mousedown",e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),function(){a.removeEventListener("mousedown",e),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)}}}),[oe,Me]),Object(o["useEffect"])((function(){Ie(v)}),[v]);var Je=Y(f),ze=Y(Ae),Xe={width:Je,height:ze},Ue=Object(o["useMemo"])((function(){if(Se){var e=new Date(Se),t=e.getHours(),n=e.getMinutes(),a=e.getSeconds();return t=t<10?"0"+t:t,n=n<10?"0"+n:n,a=a<10?"0"+a:a,"".concat(t,":").concat(n,":").concat(a)}return 0}),[Se]);function Ye(){window.sessionStorage.removeItem(S),Re(!1),Ne(0)}function Qe(){Re(!1),Ne(0),oe.setValue(window.sessionStorage.getItem(S))}return l.a.createElement(o["Fragment"],null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:Fe},l.a.createElement("div",{className:"markdown-editor-container ".concat(ne," ").concat(_e?"on-preview":""," ").concat(E?"mini":""," ").concat(he?"full-screen":""),style:Xe},l.a.createElement(b,{watch:_e,fullScreen:he,showNullButton:B,onActionCallback:He}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:Le,placeholder:re})),_e?l.a.createElement("div",{ref:Ve,className:"preview-container"},l.a.createElement(m["a"],{value:de})):null)),Be?l.a.createElement("div",{className:"markdown-tip"},"\u60a8\u4e0a\u6b21\u6709\u5df2\u4fdd\u5b58\u7684\u6570\u636e\uff0c\u662f\u5426",l.a.createElement("a",{onClick:Qe},"\u6062\u590d")," ? /",l.a.createElement("a",{onClick:Ye},"\u4e0d\u6062\u590d")," \uff08\u6570\u636e\u5df2\u4e8e ",Ue," \u4fdd\u5b58\uff09"):null),A?l.a.createElement("a",{ref:Me,className:"editor-resize"}):null,l.a.createElement(g["a"],null,ee[xe]?l.a.createElement(a["a"],{centered:!0,title:ee[xe],visible:!0,onCancel:Ge,footer:null},Ze):null))}},dejd:function(e,t,n){},kSUc:function(e,t,n){},kqOp:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n("1gHQ"),r=n("FGJx"),c=n("o0AO"),i=n("uwZC"),o=n("lpH6"),l=n("ZZRV"),s=n.n(l),u=n("Ot1p"),d="\u2581",m=function(e){Object(i["a"])(n,e);var t=Object(o["a"])(n);function n(){var e;Object(r["a"])(this,n);for(var a=arguments.length,c=new Array(a),i=0;i-1)){e.next=7;break}return u["b"].info("\u8bf7\u5148\u8f93\u5165 ".concat(R[t]," \u9009\u9879\u7684\u5185\u5bb9")),e.abrupt("return",!1);case 7:if(D.length){e.next=10;break}return u["b"].info("\u8bf7\u8bbe\u7f6e\u672c\u9898\u7684\u6b63\u786e\u7b54\u6848\uff0c\u70b9\u51fb\u9009\u9879A/B...\u5373\u53ef\u5b8c\u6210\u8bbe\u7f6e"),e.abrupt("return",!1);case 10:if(!(D.length<1)){e.next=13;break}return u["b"].info("\u8bf7\u9009\u62e9\u7b54\u6848"),e.abrupt("return",!1);case 13:if(a=d.map((function(e,t){return{choice_text:e,is_answer:D.includes(t)?t+1:0}})),!r.question_id){e.next=20;break}return e.next=17,n({type:"exercise/editExerciseQuestion",payload:{id:r.question_id,question_title:V,question_type:1,question_score:"5.0",question_choices:a.map((function(e){return e.choice_text})),standard_answers:a.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))}});case 17:c=e.sent,e.next=23;break;case 20:return e.next=22,n({type:"exercise/addExerciseQuestion",payload:{categoryId:Y.categoryId,question_title:V,question_type:1,question_score:"5.0",question_choices:a.map((function(e){return e.choice_text})),standard_answers:a.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))}});case 22:c=e.sent;case 23:0===c.status&&(u["b"].success("\u4fdd\u5b58\u6210\u529f"),U(!1),n({type:"exercise/editExercise",payload:Object(f["a"])({},Y)}));case 24:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4e0a\u79fb",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4e0b\u79fb",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7f16\u8f91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],K=function(){var e=Object(p["a"])(m.a.mark((function e(t){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:e.t0=t.id,e.next="del"===e.t0?3:"up"===e.t0||"down"===e.t0?5:"edit"===e.t0?9:11;break;case 3:return q["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u786e\u8ba4\u8981\u5220\u9664\u8fd9\u4e2a\u95ee\u9898\u5417\uff1f",onOk:function(){return Object(p["a"])(m.a.mark((function e(){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(A["i"])({id:r.question_id});case 2:n({type:"exercise/editExercise",payload:Object(f["a"])({},Y)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",11);case 5:return e.next=7,n({type:"exercise/exeriseMoveUpDown",payload:{id:r.question_id,opr:t.id}});case 7:return n({type:"exercise/editExercise",payload:Object(f["a"])({},Y)}),e.abrupt("break",11);case 9:return U(!0),e.abrupt("break",11);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ee=function(){var e;return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},r.key,"\u3001\u591a\u9009\u9898"),"\uff08",r.question_score,"\u5206\uff09"),!r.hideAction&&$.map((function(e,t){return"up"===e.id&&1===r.key||"down"===e.id&&r.key===r.len?null:y.a.createElement(c["a"],{key:t,placement:"bottom",title:e.name},y.a.createElement("span",{onClick:function(){return K(e)},className:e.icon}))}))),y.a.createElement("div",{className:"mt5"},y.a.createElement(T["a"],{value:r.question_title})),y.a.createElement("div",{className:B.a.questionChoices},null===r||void 0===r||null===(e=r.question_choices)||void 0===e?void 0:e.map((function(e,t){return y.a.createElement(i["a"],null,y.a.createElement(o["a"],null,y.a.createElement(C["a"],{key:t,checked:r.standard_answer.includes(t+1),disabled:!0},R[t],".")),y.a.createElement(o["a"],{flex:"1"},y.a.createElement("span",{className:"c-black font14"},y.a.createElement(T["a"],{value:e.choice_text}))))}))))},te=function(){return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},"\u9009\u62e9\u9898"),"\uff08\u5ba2\u89c2\u9898\uff0c\u7531\u7cfb\u7edf\u81ea\u52a8\u8bc4\u5206\uff0c\u8bf7\u8bbe\u7f6e\u6807\u51c6\u7b54\u6848\uff09")),y.a.createElement("p",{className:B.a.titleWrap},y.a.createElement("span",{className:B.a.required},"*"),y.a.createElement("span",{className:B.a.title},"\u9898\u5e72\uff1a")),y.a.createElement(I["a"],{id:"single-question-title",watch:!0,height:155,placeholder:"\u8bf7\u60a8\u8f93\u5165\u9898\u5e72",defaultValue:V,onChange:function(e){return P(e)}}),d.map((function(e,t){return y.a.createElement("div",{className:B.a.choiceWrap,key:t},y.a.createElement(c["a"],{title:"\u70b9\u51fb\u8bbe\u7f6e\u4e3a\u6807\u51c6\u7b54\u6848",placement:"left"},y.a.createElement("div",{className:"".concat(B.a.answer," ").concat(D.includes(t)?B.a.activeAnswer:""),onClick:function(){D.includes(t)?L(D.filter((function(e){return e!==t}))):L([].concat(Object(_["a"])(D),[t]))}},R[t])),y.a.createElement("div",{className:B.a.editorWrap},k===t?y.a.createElement(I["a"],{id:"single-question-option-".concat(t),watch:!0,height:155,placeholder:"\u8bf7\u60a8\u8f93\u5165\u9009\u9879",defaultValue:e,onChange:function(e){d[t]=e,b(d)}}):y.a.createElement("div",{className:B.a.htmlWrap,onClick:function(){return j(t)}},y.a.createElement(T["a"],{value:e}))),t>1&&y.a.createElement(c["a"],{title:"\u5220\u9664"},y.a.createElement("i",{className:"".concat(B.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return b(d.filter((function(e,n){return n!==t})))}})),t<7&&t===d.length-1&&y.a.createElement(c["a"],{title:"\u65b0\u589e\u53c2\u8003\u7b54\u6848"},y.a.createElement("i",{className:"".concat(B.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return b([].concat(Object(_["a"])(d),[""]))}})))})),y.a.createElement("p",{className:"c-orange"},"\u6e29\u99a8\u63d0\u793a\uff1a\u70b9\u51fb\u9009\u9879\u8f93\u5165\u6846\u53ef\u8bbe\u7f6e\u7b54\u6848\uff1b\u9009\u4e2d\u7684\u9009\u9879\u5373\u4e3a\u6b63\u786e\u7b54\u6848\uff0c\u9009\u62e9\u591a\u4e2a\u7b54\u6848\u5373\u4e3a\u591a\u9009\u9898"),y.a.createElement("p",{className:""},"\u5206\u503c\uff1a",y.a.createElement(N["a"],{value:Z,max:1e4,min:-1,onChange:function(e){G(e)}})," \u5206"),y.a.createElement("aside",{className:"tr"},r.question_id&&y.a.createElement(a["a"],{type:"default",onClick:function(){return U(!1)}},"\u53d6\u6d88"),y.a.createElement(a["a"],{className:"ml20",type:"primary",onClick:function(){return Q()}},"\u4fdd\u5b58")))};return y.a.createElement("section",{className:B.a.wrap},!X&&ee(),X&&te())},F=Object(j["a"])((function(e){var t=e.problemset,n=e.loading,a=e.globalSetting;return{problemset:t,globalSetting:a,loading:n.effects}}),null,null,{forwardRef:!0})(Object(w["forwardRef"])(L)),M=(n("9cas"),n("twZV")),V=["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"],P=function(e,t){e.problemset,e.globalSetting,e.loading;var n=e.dispatch,r=(e.onRef,e.editData),l=(Object(v["a"])(e,["problemset","globalSetting","loading","dispatch","onRef","editData"]),Object(w["useState"])([])),s=Object(g["a"])(l,2),d=s[0],b=s[1],h=Object(w["useState"])(),E=Object(g["a"])(h,2),k=E[0],j=E[1],O=Object(w["useState"])([]),C=Object(g["a"])(O,2),A=C[0],D=C[1],R=Object(w["useState"])(""),L=Object(g["a"])(R,2),F=L[0],P=L[1],H=Object(w["useState"])(0),W=Object(g["a"])(H,2),Z=W[0],G=W[1],J=Object(w["useState"])(!1),z=Object(g["a"])(J,2),X=z[0],U=z[1],Y=Object(x["m"])();Object(w["useEffect"])((function(){b(["","","",""])}),[]),Object(w["useEffect"])((function(){if(null===r||void 0===r?void 0:r.question_choices){P(null===r||void 0===r?void 0:r.question_title),G(parseInt(null===r||void 0===r?void 0:r.question_score)),b(null===r||void 0===r?void 0:r.question_choices.map((function(e){return e.choice_text})));var e=[];null===r||void 0===r||r.standard_answer.map((function(t,n){e.push(t-1)})),D(e)}else U(!0)}),[r]),Object(w["useImperativeHandle"])(t,(function(){return{onSave:Q,isEdit:X}}));var Q=function(){var e=Object(p["a"])(m.a.mark((function e(){var t,a,c;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(F){e.next=3;break}return u["b"].info("\u8bf7\u60a8\u8f93\u5165\u9898\u76ee"),e.abrupt("return",!1);case 3:if(t=d.findIndex((function(e){return!e})),!(t>-1)){e.next=7;break}return u["b"].info("\u8bf7\u5148\u8f93\u5165 ".concat(V[t]," \u9009\u9879\u7684\u5185\u5bb9")),e.abrupt("return",!1);case 7:if(A.length){e.next=10;break}return u["b"].info("\u8bf7\u8bbe\u7f6e\u672c\u9898\u7684\u6b63\u786e\u7b54\u6848\uff0c\u70b9\u51fb\u9009\u9879A/B...\u5373\u53ef\u5b8c\u6210\u8bbe\u7f6e"),e.abrupt("return",!1);case 10:if(!(A.length<1)){e.next=13;break}return u["b"].info("\u8bf7\u9009\u62e9\u7b54\u6848"),e.abrupt("return",!1);case 13:if(a=d.map((function(e,t){return{choice_text:e,is_answer:A.includes(t)?t+1:0}})),!r.question_id){e.next=20;break}return e.next=17,Object(S["u"])({id:r.question_id,question_title:F,question_type:1,question_score:Z,question_choices:a.map((function(e){return e.choice_text})),standard_answers:a.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))});case 17:c=e.sent,e.next=23;break;case 20:return e.next=22,Object(S["a"])({exercise_bank_id:Y.topicId,question_title:F,question_type:1,question_score:"5.0",question_choices:a.map((function(e){return e.choice_text})),standard_answers:a.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))});case 22:c=e.sent;case 23:return 0===c.status&&(u["b"].success("\u4fdd\u5b58\u6210\u529f"),U(!1)),e.next=26,n({type:"polls/getExerciseBanks",payload:Object(f["a"])({},Y)});case 26:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4e0a\u79fb",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4e0b\u79fb",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7f16\u8f91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],K=function(){var e=Object(p["a"])(m.a.mark((function e(t){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:e.t0=t.id,e.next="del"===e.t0?3:"up"===e.t0||"down"===e.t0?5:"edit"===e.t0?9:11;break;case 3:return q["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u786e\u8ba4\u8981\u5220\u9664\u8fd9\u4e2a\u95ee\u9898\u5417\uff1f",onOk:function(){return Object(p["a"])(m.a.mark((function e(){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(S["e"])({pollsId:r.question_id});case 2:n({type:"polls/getExerciseBanks",payload:Object(f["a"])({},Y)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",11);case 5:return e.next=7,Object(S["j"])({exerciseId:null===r||void 0===r?void 0:r.question_id,opr:t.id});case 7:return n({type:"polls/getExerciseBanks",payload:Object(f["a"])({},Y)}),e.abrupt("break",11);case 9:return U(!0),e.abrupt("break",11);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ee=function(){var e;return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},r.key,"\u3001\u5355\u9009\u9898"),"\uff08",r.question_score,"\u5206\uff09"),!r.hideAction&&$.map((function(e,t){return"up"===e.id&&1===r.key||"down"===e.id&&r.key===r.len?null:y.a.createElement(c["a"],{key:t,placement:"bottom",title:e.name},y.a.createElement("span",{onClick:function(){return K(e)},className:e.icon}))}))),y.a.createElement("div",{className:"mt5"},y.a.createElement(T["a"],{value:r.question_title})),y.a.createElement("div",{className:B.a.questionChoices},null===r||void 0===r||null===(e=r.question_choices)||void 0===e?void 0:e.map((function(e,t){return y.a.createElement(i["a"],null,y.a.createElement(o["a"],null,y.a.createElement(M["a"],{key:t,checked:r.standard_answer.includes(t+1),disabled:!0},V[t],".")),y.a.createElement(o["a"],{flex:"1"},y.a.createElement("span",{className:"c-black font14"},y.a.createElement(T["a"],{value:e.choice_text}))))}))))},te=function(){return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},"\u9009\u62e9\u9898"),"\uff08\u5ba2\u89c2\u9898\uff0c\u7531\u7cfb\u7edf\u81ea\u52a8\u8bc4\u5206\uff0c\u8bf7\u8bbe\u7f6e\u6807\u51c6\u7b54\u6848\uff09")),y.a.createElement("p",{className:B.a.titleWrap},y.a.createElement("span",{className:B.a.required},"*"),y.a.createElement("span",{className:B.a.title},"\u9898\u5e72\uff1a")),y.a.createElement(I["a"],{id:"single-question-title",watch:!0,height:155,placeholder:"\u8bf7\u60a8\u8f93\u5165\u9898\u5e72",defaultValue:F,onChange:function(e){return P(e)}}),d.map((function(e,t){return y.a.createElement("div",{className:B.a.choiceWrap,key:t},y.a.createElement(c["a"],{title:"\u70b9\u51fb\u8bbe\u7f6e\u4e3a\u6807\u51c6\u7b54\u6848",placement:"left"},y.a.createElement("div",{className:"".concat(B.a.answer," ").concat(A.includes(t)?B.a.activeAnswer:""),onClick:function(){A.includes(t)?D(A.filter((function(e){return e!==t}))):D([].concat(Object(_["a"])(A),[t]))}},V[t])),y.a.createElement("div",{className:B.a.editorWrap},k===t?y.a.createElement(I["a"],{id:"single-question-option-".concat(t),watch:!0,height:155,placeholder:"\u8bf7\u60a8\u8f93\u5165\u9009\u9879",defaultValue:e,onChange:function(e){d[t]=e,b(d)}}):y.a.createElement("div",{className:B.a.htmlWrap,onClick:function(){return j(t)}},y.a.createElement(T["a"],{value:e}))),t>1&&y.a.createElement(c["a"],{title:"\u5220\u9664"},y.a.createElement("i",{className:"".concat(B.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return b(d.filter((function(e,n){return n!==t})))}})),t<7&&t===d.length-1&&y.a.createElement(c["a"],{title:"\u65b0\u589e\u53c2\u8003\u7b54\u6848"},y.a.createElement("i",{className:"".concat(B.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return b([].concat(Object(_["a"])(d),[""]))}})))})),y.a.createElement("p",{className:"c-orange"},"\u6e29\u99a8\u63d0\u793a\uff1a\u70b9\u51fb\u9009\u9879\u8f93\u5165\u6846\u53ef\u8bbe\u7f6e\u7b54\u6848\uff1b\u9009\u4e2d\u7684\u9009\u9879\u5373\u4e3a\u6b63\u786e\u7b54\u6848\uff0c\u9009\u62e9\u591a\u4e2a\u7b54\u6848\u5373\u4e3a\u591a\u9009\u9898"),y.a.createElement("p",{className:""},"\u5206\u503c\uff1a",y.a.createElement(N["a"],{value:Z,max:1e4,min:-1,onChange:function(e){G(e)}})," \u5206"),y.a.createElement("aside",{className:"tr"},r.question_id&&y.a.createElement(a["a"],{type:"default",onClick:function(){return U(!1)}},"\u53d6\u6d88"),y.a.createElement(a["a"],{className:"ml20",type:"primary",onClick:function(){return Q()}},"\u4fdd\u5b58")))};return y.a.createElement("section",{className:B.a.wrap},!X&&ee(),X&&te())},H=Object(j["a"])((function(e){var t=e.problemset,n=e.loading,a=e.globalSetting;return{problemset:t,globalSetting:a,loading:n.effects}}),null,null,{forwardRef:!0})(Object(w["forwardRef"])(P)),W=["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"],Z=function(e,t){e.problemset,e.globalSetting,e.loading;var n=e.dispatch,r=(e.onRef,e.editData),i=(Object(v["a"])(e,["problemset","globalSetting","loading","dispatch","onRef","editData"]),Object(w["useState"])()),o=Object(g["a"])(i,2),l=o[0],s=o[1],d=Object(w["useState"])(""),_=Object(g["a"])(d,2),b=_[0],h=_[1],E=Object(w["useState"])(!1),k=Object(g["a"])(E,2),j=k[0],O=k[1],C=Object(w["useState"])(5),A=Object(g["a"])(C,2),T=A[0],D=A[1],R=Object(x["m"])();Object(w["useEffect"])((function(){(null===r||void 0===r?void 0:r.question_choices)?(h(null===r||void 0===r?void 0:r.question_title),D(null===r||void 0===r?void 0:r.question_score),s(r.standard_answer[0]+"")):O(!0)}),[r]),Object(w["useImperativeHandle"])(t,(function(){return{onSave:L,isEdit:j}}));var L=function(){var e=Object(p["a"])(m.a.mark((function e(){var t,a;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(b){e.next=3;break}return u["b"].info("\u8bf7\u60a8\u8f93\u5165\u9898\u5e72"),e.abrupt("return",!1);case 3:if(l){e.next=6;break}return u["b"].info("\u8bf7\u5148\u70b9\u51fb\u9009\u62e9\u672c\u9009\u62e9\u9898\u7684\u6b63\u786e\u9009\u9879"),e.abrupt("return",!1);case 6:if(t=[{choice_text:"\u6b63\u786e",is_answer:"1"===l?1:0},{choice_text:"\u9519\u8bef",is_answer:"2"===l?2:0}],!r.question_id){e.next=13;break}return e.next=10,Object(S["u"])({id:r.question_id,question_title:b,question_type:2,question_score:T,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))});case 10:a=e.sent,e.next=16;break;case 13:return e.next=15,Object(S["a"])({exercise_bank_id:R.topicId,question_title:b,question_type:2,question_score:T,question_choices:t.map((function(e){return e.choice_text})),standard_answers:t.filter((function(e){return e.is_answer})).map((function(e){return e.is_answer}))});case 15:a=e.sent;case 16:return 0===a.status&&(u["b"].success("\u4fdd\u5b58\u6210\u529f"),O(!1)),n({type:"polls/getExerciseBanks",payload:Object(f["a"])({},R)}),e.abrupt("return",{name:b,choices:t});case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4e0a\u79fb",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4e0b\u79fb",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7f16\u8f91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],V=function(){var e=Object(p["a"])(m.a.mark((function e(t){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:e.t0=t.id,e.next="del"===e.t0?3:"up"===e.t0||"down"===e.t0?5:"edit"===e.t0?9:11;break;case 3:return q["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u786e\u8ba4\u8981\u5220\u9664\u8fd9\u4e2a\u95ee\u9898\u5417\uff1f",onOk:function(){return Object(p["a"])(m.a.mark((function e(){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(S["e"])({pollsId:r.question_id});case 2:n({type:"polls/getExerciseBanks",payload:Object(f["a"])({},R)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",11);case 5:return e.next=7,Object(S["j"])({exerciseId:null===r||void 0===r?void 0:r.question_id,opr:t.id});case 7:return n({type:"polls/getExerciseBanks",payload:Object(f["a"])({},R)}),e.abrupt("break",11);case 9:return O(!0),e.abrupt("break",11);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e;return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},r.key,"\u3001\u5224\u65ad\u9898"),"\uff08",r.question_score,"\u5206\uff09"),!r.hideAction&&F.map((function(e,t){return"up"===e.id&&1===r.key||"down"===e.id&&r.key===r.len?null:y.a.createElement(c["a"],{key:t,placement:"bottom",title:e.name},y.a.createElement("span",{onClick:function(){return V(e)},className:e.icon}))}))),y.a.createElement("div",{className:"mt5"},r.question_title),y.a.createElement("div",{className:B.a.questionChoices},null===r||void 0===r||null===(e=r.question_choices)||void 0===e?void 0:e.map((function(e,t){return y.a.createElement(M["a"],{key:t,checked:r.standard_answer.includes(t+1),disabled:!0},W[t],". ",y.a.createElement("span",{className:"c-black font14"},e.choice_text))}))))},H=function(){return y.a.createElement("aside",null,y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},"\u5224\u65ad\u9898"),"\uff08\u5ba2\u89c2\u9898\uff0c\u7531\u7cfb\u7edf\u81ea\u52a8\u8bc4\u5206\uff0c\u8bf7\u8bbe\u7f6e\u6807\u51c6\u7b54\u6848\uff09"),y.a.createElement("p",{className:B.a.titleWrap},y.a.createElement("span",{className:B.a.required},"*"),y.a.createElement("span",{className:B.a.title},"\u9898\u5e72\uff1a")),y.a.createElement(I["a"],{id:"single-question-title",watch:!0,height:155,placeholder:"\u8bf7\u60a8\u8f93\u5165\u9898\u5e72",defaultValue:b,onChange:function(e){return h(e)}}),y.a.createElement("p",{className:B.a.titleWrap},y.a.createElement("span",{className:B.a.required},"*"),y.a.createElement("span",{className:B.a.title},"\u7b54\u6848\u9009\u9879\uff1a",y.a.createElement("span",{className:B.a.colorGray},"\u70b9\u51fb\u9009\u9879\u53ef\u8bbe\u7f6e\u6b63\u786e\u7b54\u6848"))),y.a.createElement(M["a"].Group,{buttonStyle:"solid",value:l,onChange:function(e){return s(e.target.value)}},y.a.createElement(M["a"].Button,{value:"1",className:"".concat(B.a.radio," mr40")},"\u6b63\u786e"),y.a.createElement(M["a"].Button,{value:"2",className:B.a.radio},"\u9519\u8bef")),y.a.createElement("p",{className:"c-orange"},"\u6e29\u99a8\u63d0\u793a\uff1a\u70b9\u51fb\u9009\u9879\uff0c\u53ef\u4ee5\u76f4\u63a5\u8bbe\u7f6e\u6807\u51c6\u7b54\u6848"),y.a.createElement("p",{className:""},"\u5206\u503c\uff1a",y.a.createElement(N["a"],{value:T,max:1e4,min:-1,onChange:function(e){D(e)}})," \u5206"),y.a.createElement("aside",{className:"tr"},r.question_id&&y.a.createElement(a["a"],{type:"default",onClick:function(){return O(!1)}},"\u53d6\u6d88"),y.a.createElement(a["a"],{className:"ml20",type:"primary",onClick:function(){return L()}},"\u4fdd\u5b58")))};return y.a.createElement("section",{className:B.a.wrap},!j&&P(),j&&H())},G=Object(j["a"])((function(e){var t=e.problemset,n=e.loading,a=e.globalSetting;return{problemset:t,globalSetting:a,loading:n.effects}}),null,null,{forwardRef:!0})(Object(w["forwardRef"])(Z)),J=n("kqOp"),z=n("7qnI"),X=n("1vsH"),U=function(e,t){var n=e.problemset,l=(e.globalSetting,e.loading,e.dispatch),s=e.editData,d=(Object(v["a"])(e,["problemset","globalSetting","loading","dispatch","editData"]),Object(w["useState"])("")),b=Object(g["a"])(d,2),h=b[0],E=b[1],k=Object(w["useState"])(""),j=Object(g["a"])(k,2),O=j[0],A=(j[1],Object(w["useState"])([])),I=Object(g["a"])(A,2),T=I[0],D=I[1],R=Object(w["useState"])(""),L=Object(g["a"])(R,2),F=L[0],M=L[1],V=Object(w["useState"])(),P=Object(g["a"])(V,2),H=P[0],W=P[1],Z=Object(w["useState"])(!1),G=Object(g["a"])(Z,2),U=G[0],Y=G[1],Q=Object(w["useState"])(5),$=Object(g["a"])(Q,2),K=$[0],ee=$[1],te=Object(w["useState"])(!1),ne=Object(g["a"])(te,2),ae=ne[0],re=ne[1],ce=Object(x["m"])();Object(w["useEffect"])((function(){if(null===s||void 0===s?void 0:s.question_title){E(null===s||void 0===s?void 0:s.question_title),W(null===s||void 0===s?void 0:s.is_ordered),ee(null===s||void 0===s?void 0:s.question_score);var e=null===s||void 0===s?void 0:s.standard_answer.map((function(e){return e.answer_text}));D(e)}else re(!0)}),[n.editData]),Object(w["useEffect"])((function(){Y(!1)}),[ae]),Object(w["useImperativeHandle"])(t,(function(){return{onSave:ie,isEdit:ae}}));var ie=function(){var e=Object(p["a"])(m.a.mark((function e(){var t,n,a;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=[],n=!1,T.forEach((function(e,a){t.push({choice_id:a+1,answer_text:[]}),e.forEach((function(e,r){t[a].answer_text.push(e),e&&Object(X["E"])(e,1e4)||(M("".concat(a,"-").concat(r)),u["b"].info(e?"\u7b54\u6848\u4e0d\u80fd\u8d85\u8fc710000\u5b57\u7b26":"\u7b54\u6848\uff1a\u4e0d\u80fd\u4e3a\u7a7a"),n=!0)}))})),!n){e.next=5;break}return e.abrupt("return",!1);case 5:if(!s.question_id){e.next=11;break}return e.next=8,Object(S["u"])({id:s.question_id,question_title:h,question_type:3,question_score:K,is_ordered:H,standard_answers:t});case 8:a=e.sent,e.next=14;break;case 11:return e.next=13,Object(S["a"])({exercise_bank_id:ce.topicId,question_title:h,question_type:3,question_score:K,is_ordered:H,standard_answers:t});case 13:a=e.sent;case 14:return 0===a.status&&(u["b"].success("\u4fdd\u5b58\u6210\u529f"),re(!1)),l({type:"polls/getExerciseBanks",payload:Object(f["a"])({},ce)}),e.abrupt("return",{name:h,analysis:O,standard_answers:t,is_ordered:H});case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(e,t,n){var a=T.slice();if(t&&a.splice(e,t),n&&U)for(var r=0;r1&&y.a.createElement("span",null,y.a.createElement(C["a"],{checked:H,onChange:function(e){return W(e.target.checked)},className:"".concat(B.a.color333," font14")},"\u591a\u4e2a\u586b\u7a7a\u7684\u7b54\u6848\u6709\u987a\u5e8f\u8981\u6c42"),y.a.createElement("span",{className:"".concat(B.a.color999," font12")},"\uff08\u9009\u4e2d\uff0c\u6bcf\u4e2a\u586b\u7a7a\u7684\u7b54\u6848\u987a\u5e8f\u5fc5\u987b\u4e0e\u53c2\u8003\u7b54\u6848\u4e00\u81f4\uff09"))),y.a.createElement("p",{className:""},"\u5206\u503c\uff1a",y.a.createElement(N["a"],{value:K,max:1e4,min:-1,onChange:function(e){ee(e)}})," \u5206"),y.a.createElement("aside",{className:"tr"},s.question_id&&y.a.createElement(a["a"],{type:"default",onClick:function(){return re(!1)}},"\u53d6\u6d88"),y.a.createElement(a["a"],{className:"ml20",type:"primary",onClick:function(){return ie()}},"\u4fdd\u5b58")))},pe=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4e0a\u79fb",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4e0b\u79fb",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7f16\u8f91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],fe=function(){var e=Object(p["a"])(m.a.mark((function e(t){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:e.t0=t.id,e.next="del"===e.t0?3:"up"===e.t0||"down"===e.t0?5:"edit"===e.t0?9:11;break;case 3:return q["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u786e\u8ba4\u8981\u5220\u9664\u8fd9\u4e2a\u95ee\u9898\u5417\uff1f",onOk:function(){return Object(p["a"])(m.a.mark((function e(){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(S["e"])({pollsId:s.question_id});case 2:l({type:"polls/getExerciseBanks",payload:Object(f["a"])({},ce)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",11);case 5:return e.next=7,Object(S["j"])({exerciseId:null===s||void 0===s?void 0:s.question_id,opr:t.id});case 7:return l({type:"polls/getExerciseBanks",payload:Object(f["a"])({},ce)}),e.abrupt("break",11);case 9:return re(!0),e.abrupt("break",11);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_e=function(){var e;return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},s.key,"\u3001\u586b\u7a7a\u9898"),"\uff08",s.question_score,"\u5206\uff09"),!s.hideAction&&pe.map((function(e,t){return"up"===e.id&&1===s.key||"down"===e.id&&s.key===s.len?null:y.a.createElement(c["a"],{key:t,placement:"bottom",title:e.name},y.a.createElement("span",{onClick:function(){return fe(e)},className:e.icon}))}))),y.a.createElement("div",{className:"mt5"},s.question_title),y.a.createElement("div",{className:B.a.questionChoices},null===s||void 0===s||null===(e=s.standard_answer)||void 0===e?void 0:e.map((function(e,t){return y.a.createElement(i["a"],null,y.a.createElement(o["a"],null,"\u7b54\u6848\uff08\u586b\u7a7a",e.choice_id,"\uff09\uff1a"),y.a.createElement(o["a"],{flex:"1"},y.a.createElement(r["a"],{key:t,checked:s.standard_answer.includes(t),disabled:!0,value:e.answer_text})))}))))};return y.a.createElement("section",{className:B.a.wrap},!ae&&_e(),ae&&me())},Y=Object(j["a"])((function(e){var t=e.problemset,n=e.loading,a=e.globalSetting;return{problemset:t,globalSetting:a,loading:n.effects}}),null,null,{forwardRef:!0})(Object(w["forwardRef"])(U)),Q=function(e,t){var n=e.problemset,r=(e.globalSetting,e.loading,e.dispatch),i=(e.onRef,e.editData),o=(Object(v["a"])(e,["problemset","globalSetting","loading","dispatch","onRef","editData"]),Object(w["useState"])("")),l=Object(g["a"])(o,2),s=l[0],d=l[1],_=Object(w["useState"])(""),b=Object(g["a"])(_,2),h=b[0],E=(b[1],Object(w["useState"])("")),k=Object(g["a"])(E,2),j=k[0],O=k[1],C=Object(w["useState"])(5),A=Object(g["a"])(C,2),D=A[0],R=A[1],L=Object(w["useState"])(!1),F=Object(g["a"])(L,2),M=F[0],V=F[1],P=Object(x["m"])();Object(w["useEffect"])((function(){var e;(null===i||void 0===i?void 0:i.question_title)?(d(null===i||void 0===i?void 0:i.question_title),O(null===i||void 0===i||null===(e=i.standard_answer)||void 0===e?void 0:e[0]),R(null===i||void 0===i?void 0:i.question_score)):V(!0)}),[n.editData]),Object(w["useImperativeHandle"])(t,(function(){return{onSave:H,isEdit:M}}));var H=function(){var e=Object(p["a"])(m.a.mark((function e(){var t;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(s){e.next=3;break}return u["b"].info("\u8bf7\u60a8\u8f93\u5165\u9898\u5e72"),e.abrupt("return",!1);case 3:if(!i.question_id){e.next=9;break}return e.next=6,Object(S["u"])({id:i.question_id,question_title:s,question_type:4,question_score:D,standard_answers:[j]});case 6:t=e.sent,e.next=12;break;case 9:return e.next=11,Object(S["a"])({exercise_bank_id:P.topicId,question_title:s,question_type:4,question_score:D,standard_answers:[j]});case 11:t=e.sent;case 12:return 0===t.status&&(u["b"].success("\u4fdd\u5b58\u6210\u529f"),V(!1),r({type:"polls/getExerciseBanks",payload:Object(f["a"])({},P)})),e.abrupt("return",{name:s,answer_texts:[j],analysis:h});case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=function(){return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},"\u7b80\u7b54\u9898"),"\uff08\u4e3b\u89c2\u9898\uff0c\u672a\u4f5c\u7b54\u7684\u60c5\u51b5\u4e0b\u81ea\u52a8\u8bc4\u4e3a\u96f6\u5206\uff09")),y.a.createElement(I["a"],{id:"single-question-title",watch:!0,height:155,placeholder:"\u8bf7\u60a8\u8f93\u5165\u9898\u5e72",defaultValue:s,onChange:function(e){return d(e)}}),y.a.createElement("p",{className:B.a.titleWrap},y.a.createElement("span",{className:B.a.title},"\u53c2\u8003\u7b54\u6848\uff1a")),y.a.createElement(I["a"],{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8bf7\u60a8\u8f93\u5165\u53c2\u8003\u7b54\u6848",defaultValue:j,onChange:function(e){return O(e)}}),y.a.createElement("p",{className:""},"\u5206\u503c\uff1a",y.a.createElement(N["a"],{value:D,max:1e4,min:-1,onChange:function(e){R(e)}})," \u5206"),y.a.createElement("aside",{className:"tr"},i.question_id&&y.a.createElement(a["a"],{type:"default",onClick:function(){return V(!1)}},"\u53d6\u6d88"),y.a.createElement(a["a"],{className:"ml20",type:"primary",onClick:function(){return H()}},"\u4fdd\u5b58")))},Z=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4e0a\u79fb",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4e0b\u79fb",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7f16\u8f91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],G=function(){var e=Object(p["a"])(m.a.mark((function e(t){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:e.t0=t.id,e.next="del"===e.t0?3:"up"===e.t0||"down"===e.t0?5:"edit"===e.t0?9:11;break;case 3:return q["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u786e\u8ba4\u8981\u5220\u9664\u8fd9\u4e2a\u95ee\u9898\u5417\uff1f",onOk:function(){return Object(p["a"])(m.a.mark((function e(){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(S["e"])({pollsId:i.question_id});case 2:r({type:"polls/getExerciseBanks",payload:Object(f["a"])({},P)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",11);case 5:return e.next=7,Object(S["j"])({exerciseId:null===i||void 0===i?void 0:i.question_id,opr:t.id});case 7:return r({type:"polls/getExerciseBanks",payload:Object(f["a"])({},P)}),e.abrupt("break",11);case 9:return V(!0),e.abrupt("break",11);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),J=function(){return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},i.key,"\u3001\u7b80\u7b54\u9898"),"\uff08",i.question_score,"\u5206\uff09"),!i.hideAction&&Z.map((function(e,t){return"up"===e.id&&1===i.key||"down"===e.id&&i.key===i.len?null:y.a.createElement(c["a"],{key:t,placement:"bottom",title:e.name},y.a.createElement("span",{onClick:function(){return G(e)},className:e.icon}))}))),y.a.createElement("div",{className:"mt5"},i.question_title),y.a.createElement("div",{className:B.a.questionChoices},y.a.createElement("p",null,y.a.createElement("strong",null,"\u53c2\u8003\u7b54\u6848\uff1a")),y.a.createElement(T["a"],{value:j})))};return y.a.createElement("section",{className:B.a.wrap},!M&&J(),M&&W())},$=Object(j["a"])((function(e){var t=e.problemset,n=e.loading,a=e.globalSetting;return{problemset:t,globalSetting:a,loading:n.effects}}),null,null,{forwardRef:!0})(Object(w["forwardRef"])(Q)),K=function(e,t){e.problemset,e.globalSetting,e.loading;var n=e.dispatch,l=e.editData,s=(Object(v["a"])(e,["problemset","globalSetting","loading","dispatch","editData"]),Object(w["useState"])("")),d=Object(g["a"])(s,2),_=d[0],b=d[1],h=Object(w["useState"])(""),E=Object(g["a"])(h,2),j=E[0],O=E[1],A=Object(w["useState"])(""),T=Object(g["a"])(A,2),D=T[0],R=(T[1],Object(w["useState"])([])),L=Object(g["a"])(R,2),F=L[0],M=(L[1],Object(w["useState"])("")),V=Object(g["a"])(M,2),P=(V[0],V[1],Object(w["useState"])()),H=Object(g["a"])(P,2),W=H[0],Z=H[1],G=Object(w["useState"])(!1),J=Object(g["a"])(G,2),z=(J[0],J[1]),X=Object(w["useState"])([]),U=Object(g["a"])(X,2),Y=U[0],Q=U[1],$=Object(w["useState"])(!1),K=Object(g["a"])($,2),ee=K[0],te=K[1],ne=Object(x["m"])();Object(w["useEffect"])((function(){var e;l.edit&&te(!0),b(l.shixun_name),O(l.question_title);var t=[];null===(e=l.shixun)||void 0===e||e.map((function(e){t.push(e.challenge_score)})),Q(t)}),[l]),Object(w["useEffect"])((function(){z(!1)}),[ee]),Object(w["useImperativeHandle"])(t,(function(){return{onSave:ae,isEdit:ee}}));var ae=function(){var e=Object(p["a"])(m.a.mark((function e(){var t,a,r;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=[],a=!1,!a){e.next=4;break}return e.abrupt("return",!1);case 4:if(!l.question_id){e.next=10;break}return e.next=7,Object(S["u"])({id:l.question_id,question_title:j,shixun_name:_,shixun_id:l.shixun_id,question_type:5,question_scores:Y});case 7:r=e.sent,e.next=13;break;case 10:return e.next=12,Object(S["a"])({exercise_bank_id:ne.topicId,question_title:j,shixun_name:_,shixun_id:l.shixun_id,question_type:5,question_scores:Y});case 12:r=e.sent;case 13:return 0===r.status&&(u["b"].success("\u4fdd\u5b58\u6210\u529f"),te(!1)),e.next=16,n({type:"polls/getExerciseBanks",payload:Object(f["a"])({},ne)});case 16:return e.abrupt("return",{name:j,analysis:D,standard_answers:t,is_ordered:W});case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){var e;return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},"\u5b9e\u8bad\u9898"),"\uff08\u5ba2\u89c2\u9898\uff0c\u7531\u7cfb\u7edf\u81ea\u52a8\u8bc4\u5206\uff0c\u5141\u8bb8\u624b\u52a8\u8c03\u5206\uff09")),y.a.createElement("div",{className:"mt10"},y.a.createElement(r["a"],{defaultValue:_,onChange:function(e){b(e.target.value)}})),y.a.createElement("div",{className:"mt10"},y.a.createElement(I["a"],{id:"single-question-option-0",height:155,placeholder:"\u8bf7\u8f93\u5165\u5b9e\u8bad\u9898\u5b8c\u6210\u8981\u6c42",defaultValue:j,onChange:function(e){O(e)}})),y.a.createElement("div",{className:"mt20"},null===(e=l.shixun)||void 0===e?void 0:e.map((function(e,t){return y.a.createElement(i["a"],{gutter:[20,20]},y.a.createElement(o["a"],{flex:"1"},t+1,".",e.challenge_name),y.a.createElement(o["a"],null,y.a.createElement(N["a"],{defaultValue:Y[t],onChange:function(e){Y[t]=e,Q(Y),console.log("srore:L",Y[t])}})))}))),y.a.createElement("div",{className:"mt20"},F.length>1&&y.a.createElement("span",null,y.a.createElement(C["a"],{checked:W,onChange:function(e){return Z(e.target.checked)},className:"".concat(B.a.color333," font14")},"\u591a\u4e2a\u586b\u7a7a\u7684\u7b54\u6848\u6709\u987a\u5e8f\u8981\u6c42"),y.a.createElement("span",{className:"".concat(B.a.color999," font12")},"\uff08\u9009\u4e2d\uff0c\u6bcf\u4e2a\u586b\u7a7a\u7684\u7b54\u6848\u987a\u5e8f\u5fc5\u987b\u4e0e\u53c2\u8003\u7b54\u6848\u4e00\u81f4\uff09"))),y.a.createElement("aside",{className:"tr"},!(null===l||void 0===l?void 0:l.edit)&&y.a.createElement(a["a"],{type:"default",onClick:function(){return te(!1)}},"\u53d6\u6d88"),y.a.createElement(a["a"],{className:"ml20",type:"primary",onClick:function(){return ae()}},"\u4fdd\u5b58")))},ce=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4e0a\u79fb",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4e0b\u79fb",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7f16\u8f91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],ie=function(){var e=Object(p["a"])(m.a.mark((function e(t){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:e.t0=t.id,e.next="del"===e.t0?3:"up"===e.t0||"down"===e.t0?5:"edit"===e.t0?9:11;break;case 3:return q["a"].confirm({centered:!0,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u786e\u8ba4\u8981\u5220\u9664\u8fd9\u4e2a\u95ee\u9898\u5417\uff1f",onOk:function(){return Object(p["a"])(m.a.mark((function e(){return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(S["e"])({pollsId:l.question_id});case 2:n({type:"polls/getExerciseBanks",payload:Object(f["a"])({},ne)});case 3:case"end":return e.stop()}}),e)})))()}}),e.abrupt("break",11);case 5:return e.next=7,Object(S["j"])({exerciseId:null===l||void 0===l?void 0:l.question_id,opr:t.id});case 7:return n({type:"polls/getExerciseBanks",payload:Object(f["a"])({},ne)}),e.abrupt("break",11);case 9:return te(!0),e.abrupt("break",11);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe=function(){var e;return y.a.createElement("aside",null,y.a.createElement("div",{className:B.a.questionType},y.a.createElement("div",null,y.a.createElement("span",{className:"font16 c-blue"},l.key,"\u3001\u5b9e\u8bad\u9898"),"\uff08",l.question_score,"\u5206\uff09"),y.a.createElement("div",{className:"tr"},y.a.createElement(k["Link"],{target:"_blank",to:"/shixuns/".concat(l.shixun_identifier,"/challenges")},"\u5b9e\u8bad\u8be6\u60c5"),!l.hideAction&&ce.map((function(e,t){return"up"===e.id&&1===l.key||"down"===e.id&&l.key===l.len?null:y.a.createElement(c["a"],{key:t,placement:"bottom",title:e.name},y.a.createElement("span",{onClick:function(){return ie(e)},className:e.icon}))})))),y.a.createElement("div",{className:"font16"},l.shixun_name),y.a.createElement("div",{className:"mt30"}),null===(e=l.shixun)||void 0===e?void 0:e.map((function(e,t){return y.a.createElement("div",{key:t},"\u7b2c",t+1,"\u5173 ",y.a.createElement("span",{className:"ml10"},e.challenge_name)," ",y.a.createElement("span",{className:"ml10"},e.challenge_score))})))};return y.a.createElement("section",{className:B.a.wrap},!ee&&oe(),ee&&re())},ee=Object(j["a"])((function(e){var t=e.problemset,n=e.loading,a=e.globalSetting;return{problemset:t,globalSetting:a,loading:n.effects}}),null,null,{forwardRef:!0})(Object(w["forwardRef"])(K)),te=(n("2aF/"),n("1kpo")),ne=(n("Rbwl"),n("hTF7")),ae=n("uSYw"),re=n.n(ae),ce=r["a"].Search,ie=[{id:"type",name:"\u7b5b\u9009",children:[{name:"\u5168\u90e8\u5b9e\u8bad",id:"all",type:"type"},{name:"\u6211\u7684\u5b9e\u8bad",id:"mine",type:"type"}]},{id:"diff",name:"\u96be\u5ea6",children:[{name:"\u5168\u90e8",id:"",type:"diff"},{name:"\u521d\u7ea7",id:1,type:"diff"},{name:"\u4e2d\u7ea7",id:2,type:"diff"},{name:"\u4e2d\u9ad8\u7ea7",id:3,type:"diff"},{name:"\u9ad8\u7ea7",id:4,type:"diff"}]}],oe=function(e){var t,n=e.classroomList,r=(e.loading,e.dispatch),c=e.callback,i=Object(x["m"])(),o=(Object(x["l"])(),n.actionTabs,b["a"].useForm()),l=Object(g["a"])(o,1),d=(l[0],n.shixunLists),_=Object(w["useState"])([]),v=Object(g["a"])(_,2),h=v[0],E=v[1],k=Object(w["useState"])({page:1,type:"all",diff:"",status:"published",order:"desc",limit:20,sort:"publish_time",no_jupyter:1}),j=Object(g["a"])(k,2),O=j[0],S=j[1];return Object(w["useEffect"])((function(){r({type:"classroomList/getShixunLists",payload:Object(f["a"])({},O)})}),[i.categoryId]),Object(w["useEffect"])((function(){E([])}),[n.actionTabs.key]),"\u9009\u7528\u5b9e\u8bad\u9879\u76ee"!==n.actionTabs.key?null:y.a.createElement(te["a"],{title:"\u9009\u7528\u5b9e\u8bad\u9879\u76ee",placement:"bottom",height:"100%",closable:!1,visible:"\u9009\u7528\u5b9e\u8bad\u9879\u76ee"===n.actionTabs.key,key:"bottom",className:re.a.drawer,footer:y.a.createElement("div",{className:"tc"},y.a.createElement(a["a"],{size:"large",onClick:function(){r({type:"classroomList/setActionTabs",payload:{key:""}})},style:{marginRight:8}},"\u53d6\u6d88"),y.a.createElement(a["a"],{size:"large",onClick:Object(p["a"])(m.a.mark((function e(){var t;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:h.length>1?u["b"].error("\u53ea\u80fd\u9009\u62e9\u4e00\u4e2a\u5b9e\u8bad\u9879\u76ee"):0===h.length?u["b"].error("\u8bf7\u9009\u62e9\u5b9e\u8bad\u9879\u76ee"):(c&&c(null===d||void 0===d||null===(t=d.shixun_list)||void 0===t?void 0:t.filter((function(e){return e.id===h[0]}))[0]),r({type:"classroomList/setActionTabs",payload:{key:""}}));case 1:case"end":return e.stop()}}),e)}))),type:"primary"},"\u786e\u5b9a"))},y.a.createElement("section",{className:"tc"},y.a.createElement(ce,{placeholder:"\u5b9e\u8bad\u4fe1\u606f/\u9662\u6821\u540d\u79f0/\u521b\u5efa\u8005",enterButton:"\u641c\u7d22",size:"large",className:re.a.search,onSearch:function(e){O.keyword=e,r({type:"classroomList/getShixunLists",payload:Object(f["a"])({},O)})}})),y.a.createElement("section",{className:"edu-container"},ie.map((function(e,t){var n;return y.a.createElement("ul",{className:re.a.menu,key:t},y.a.createElement("li",null,e.name),null===e||void 0===e||null===(n=e.children)||void 0===n?void 0:n.map((function(t,n){return y.a.createElement("li",{key:n,className:O[e.id]==t.id?re.a.actived:"",onClick:function(){O[e.id]=t.id,S(Object(f["a"])({},O)),r({type:"classroomList/getShixunLists",payload:Object(f["a"])({},O)})}},y.a.createElement("strong",null,t.name))})))})),null===d||void 0===d||null===(t=d.shixun_list)||void 0===t?void 0:t.map((function(e,t){return y.a.createElement("div",{className:re.a.listItem,key:t},y.a.createElement(C["a"],{checked:h.includes(e.id),value:e.id,onChange:function(t){h.indexOf(e.id);h.indexOf(e.id)>-1?E(h.filter((function(t){return t!==e.id}))):E(h.concat(e.id))}}),y.a.createElement("div",{className:re.a.info},y.a.createElement("div",{className:re.a.title},y.a.createElement("div",{className:re.a.titleLeft},y.a.createElement("strong",{className:"font16",dangerouslySetInnerHTML:{__html:e.title}}))),y.a.createElement("div",{className:"flex-wrp mt10 font14 c-light-black"},y.a.createElement("span",{className:re.a.description,dangerouslySetInnerHTML:{__html:e.description}})),y.a.createElement("div",{className:" mt15"},e.challenge_names.map((function(e,t){return y.a.createElement("span",{key:t,className:"mr30"},"\u7b2c",t+1,"\u5173 ",e," ")}))),y.a.createElement(s["a"],{dashed:!0}),y.a.createElement("div",{className:"c-light-black mt20"},y.a.createElement("span",null,e.author_name),y.a.createElement("span",{className:"ml15 mr15"},"|"),y.a.createElement("span",null,e.author_school_name),y.a.createElement("span",{className:"ml15 mr15"},"|"),y.a.createElement("span",null,"\u96be\u5ea6\u7cfb\u6570:",e.level),y.a.createElement("span",{className:"ml15 mr15"},"|"),y.a.createElement("span",null,"\u5b66\u4e60\u4eba\u6570:"),y.a.createElement("span",null,e.study_count))))})),y.a.createElement("p",null)),y.a.createElement("div",{className:"tc"},y.a.createElement(ne["a"],{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showQuickJumper:!0,total:null===d||void 0===d?void 0:d.shixuns_count,onChange:function(e){O.page=e,E([]),r({type:"classroomList/getShixunLists",payload:Object(f["a"])({},O)})}})))},le=Object(j["a"])((function(e){var t=e.classroomList,n=e.loading;return{classroomList:t,loading:n}}))(oe),se=n("uLbx"),ue=n.n(se),de=(E["a"].SubMenu,h["a"].Content,h["a"].Sider,function(e){var t,n,d,h,E,j,N,C,q,A,I,T,D,B,R,L,M,V,P,W,Z,J,z,U,Q,K,te,ne,ae,re,ce,ie,oe,se,de,me,pe,fe,_e,be,ge,ve,he,Ee,we,ye,xe,ke,je,Oe,Se,Ne,Ce,qe,Ae,Ie,Te=e.polls,De=(e.globalSetting,e.loading,e.user),Be=e.dispatch,Re=(Object(v["a"])(e,["polls","globalSetting","loading","user","dispatch"]),Object(x["m"])()),Le=(Object(x["l"])(),De.userInfo),Fe=b["a"].useForm(),Me=Object(g["a"])(Fe,1),Ve=Me[0],Pe=Object(w["useState"])([]),He=Object(g["a"])(Pe,2),We=He[0],Ze=He[1],Ge=Object(w["useState"])(!1),Je=Object(g["a"])(Ge,2),ze=Je[0],Xe=Je[1],Ue=[{name:"\u9009\u62e9\u9898",id:0},{name:"\u5224\u65ad\u9898",id:2},{name:"\u586b\u7a7a\u9898",id:3},{name:"\u7b80\u7b54\u9898",id:4},{name:"\u5b9e\u8bad\u9898",id:5}],Ye=Object(w["useRef"])();Object(w["useEffect"])((function(){var e,t,n,a,r,c;(null===(e=Te.exerciseBanks)||void 0===e?void 0:e.exercise_questions)&&(Ze(Object(_["a"])(null===(t=Te.exerciseBanks)||void 0===t?void 0:t.exercise_questions)),Ve.setFieldsValue({exercise_name:null===(n=Te.exerciseBanks)||void 0===n||null===(a=n.exercise)||void 0===a?void 0:a.exercise_name,exercise_description:null===(r=Te.exerciseBanks)||void 0===r||null===(c=r.exercise)||void 0===c?void 0:c.exercise_description}))}),[Te.exerciseBanks]),Object(w["useEffect"])((function(){Be({type:"polls/getExerciseBanks",payload:Object(f["a"])({},Re)})}),[Re.categoryId]);var Qe=function(){var e=Object(p["a"])(m.a.mark((function e(){var t,n,a;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Ve.validateFields();case 2:return a=Ve.getFieldValue(),a.is_md=!0,a.topicId=null===(t=Te.exerciseBanks)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.id,Xe(!1),e.next=8,Object(S["v"])(Object(f["a"])({},a));case 8:Be({type:"polls/getExerciseBanks",payload:Object(f["a"])({},Re)});case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$e=function(){var e=Object(p["a"])(m.a.mark((function e(t){var n;return m.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,null===Ye||void 0===Ye?void 0:Ye.current;case 2:if(n=e.sent,!(null===n||void 0===n?void 0:n.isEdit)){e.next=6;break}return u["b"].error("\u4e0d\u80fd\u540c\u65f6\u7f16\u8f91\u4e24\u9898"),e.abrupt("return");case 6:5===t?Be({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5b9e\u8bad\u9879\u76ee"}}):Ze([].concat(Object(_["a"])(We),[{question_type:t}]));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ke=function(){return null===We||void 0===We?void 0:We.map((function(e,t){return e.key=t+1,e.len=We.length,0===e.question_type?y.a.createElement("aside",null,y.a.createElement(H,{ref:Ye,editData:e}),y.a.createElement(s["a"],null)):1===e.question_type?y.a.createElement("aside",null,y.a.createElement(F,{ref:Ye,editData:e}),y.a.createElement(s["a"],null)):2===e.question_type?y.a.createElement("aside",null,y.a.createElement(G,{ref:Ye,editData:e}),y.a.createElement(s["a"],null)):3===e.question_type?y.a.createElement("aside",null,y.a.createElement(Y,{editData:e}),y.a.createElement(s["a"],null)):4===e.question_type?y.a.createElement("aside",null,y.a.createElement($,{editData:e}),y.a.createElement(s["a"],null)):5===e.question_type?y.a.createElement("aside",null,y.a.createElement(ee,{editData:e}),y.a.createElement(s["a"],null)):void 0}))};return y.a.createElement("section",{className:"edu-container"},y.a.createElement("section",{className:"animated fadeIn"},y.a.createElement("aside",{className:"mt10"},Le&&y.a.createElement(l["a"],{separator:">"},y.a.createElement(l["a"].Item,null,y.a.createElement(k["Link"],{to:"/users/".concat(Le.login,"/topics/personal")},"\u6211\u7684\u9898\u5e93")),y.a.createElement(l["a"].Item,null,y.a.createElement(k["Link"],{to:"/users/".concat(null===Le||void 0===Le?void 0:Le.login,"/topics/").concat(Re.topicId,"/").concat(Re.topictype,"/exercise/detail")},"\u8be6\u60c5")),y.a.createElement(l["a"].Item,null,"\u7f16\u8f91"))),y.a.createElement("aside",{className:[ue.a.title,"mt20"].join(" ")},y.a.createElement(i["a"],{style:{width:"100%"},align:"middle"},y.a.createElement(o["a"],{flex:"1"},y.a.createElement("strong",{className:"font20 ml5"},"\u7f16\u8f91\u8bd5\u5377"),y.a.createElement(X["g"],{status:[(null===(t=Te.exerciseBanks)||void 0===t||null===(n=t.exercise)||void 0===n?void 0:n.is_public)?"\u516c\u5f00":"\u79c1\u6709"]})),y.a.createElement(o["a"],null,y.a.createElement(k["Link"],{className:"font16 c-light-black",to:"/users/".concat(Le.login,"/topics/personal")},"\u8fd4\u56de"))))),y.a.createElement("section",{className:[ue.a.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},!ze&&y.a.createElement("aside",null,y.a.createElement("div",{className:ue.a.containerDesc},y.a.createElement("div",null,null===(d=Te.exerciseBanks)||void 0===d||null===(h=d.exercise)||void 0===h?void 0:h.exercise_name),y.a.createElement("div",null,y.a.createElement(c["a"],{title:"\u7f16\u8f91"},y.a.createElement("span",{onClick:function(){return Xe(!0)},className:"iconfont c-green ml30 icon-bianjishijuan3x"})))),y.a.createElement("div",{className:"c-light-black"},null===(E=Te.exerciseBanks)||void 0===E||null===(j=E.exercise)||void 0===j?void 0:j.exercise_description)),ze&&y.a.createElement(b["a"],{layout:"vertical",form:Ve},y.a.createElement(b["a"].Item,{name:"exercise_name",label:"\u8bd5\u5377\u6807\u9898\uff1a",rules:[{required:!0,message:"\u8bf7\u586b\u5199\u8bd5\u5377\u6807\u9898"}]},y.a.createElement(r["a"],{maxLength:60,placeholder:"\u8bd5\u5377\u6807\u9898\uff0c\u6700\u5927\u9650\u523660\u4e2a\u5b57\u7b26"})),y.a.createElement(b["a"].Item,{label:"\u8bd5\u5377\u987b\u77e5\uff1a",name:"exercise_description"},y.a.createElement(r["a"].TextArea,{rows:6,placeholder:"\u8bf7\u5728\u6b64\u8f93\u5165\u672c\u6b21\u8bd5\u5377\u7b54\u9898\u7684\u76f8\u5173\u8bf4\u660e\uff0c\u6700\u5927\u9650\u5236100\u4e2a\u5b57\u7b26"})),y.a.createElement(b["a"].Item,{className:"tr"},y.a.createElement(a["a"],{type:"primary",onClick:function(){Qe()}},"\u4fdd\u5b58")))),y.a.createElement("p",{className:"mt10",style:{display:"flex"}},y.a.createElement("span",{className:"fl",style:{flex:"1"}},!!(null===(N=Te.exerciseBanks)||void 0===N||null===(C=N.exercise_types)||void 0===C?void 0:C.q_singles)&&y.a.createElement("span",{className:"ml20"},"\u5355\u9009\u9898",null===(q=Te.exerciseBanks)||void 0===q||null===(A=q.exercise_types)||void 0===A?void 0:A.q_singles,"\u9898\uff0c\u5171",null===(I=Te.exerciseBanks)||void 0===I||null===(T=I.exercise_types)||void 0===T?void 0:T.q_singles_scores,"\u5206"),!!(null===(D=Te.exerciseBanks)||void 0===D||null===(B=D.exercise_types)||void 0===B?void 0:B.q_doubles)&&y.a.createElement("span",{className:"ml20"},"\u591a\u9009\u9898",null===(R=Te.exerciseBanks)||void 0===R||null===(L=R.exercise_types)||void 0===L?void 0:L.q_doubles,"\u9898\uff0c\u5171",null===(M=Te.exerciseBanks)||void 0===M||null===(V=M.exercise_types)||void 0===V?void 0:V.q_doubles_scores,"\u5206"),!!(null===(P=Te.exerciseBanks)||void 0===P||null===(W=P.exercise_types)||void 0===W?void 0:W.q_judges)&&y.a.createElement("span",{className:"ml20"},"\u5224\u65ad\u9898",null===(Z=Te.exerciseBanks)||void 0===Z||null===(J=Z.exercise_types)||void 0===J?void 0:J.q_judges,"\u9898\uff0c\u5171",null===(z=Te.exerciseBanks)||void 0===z||null===(U=z.exercise_types)||void 0===U?void 0:U.q_judges_scores,"\u5206"),!!(null===(Q=Te.exerciseBanks)||void 0===Q||null===(K=Q.exercise_types)||void 0===K?void 0:K.q_nulls)&&y.a.createElement("span",{className:"ml20"},"\u586b\u7a7a\u9898",null===(te=Te.exerciseBanks)||void 0===te||null===(ne=te.exercise_types)||void 0===ne?void 0:ne.q_nulls,"\u9898\uff0c\u5171",null===(ae=Te.exerciseBanks)||void 0===ae||null===(re=ae.exercise_types)||void 0===re?void 0:re.q_nulls_scores,"\u5206"),!!(null===(ce=Te.exerciseBanks)||void 0===ce||null===(ie=ce.exercise_types)||void 0===ie?void 0:ie.q_mains)&&y.a.createElement("span",{className:"ml20"},"\u7b80\u7b54\u9898",null===(oe=Te.exerciseBanks)||void 0===oe||null===(se=oe.exercise_types)||void 0===se?void 0:se.q_mains,"\u9898\uff0c\u5171",null===(de=Te.exerciseBanks)||void 0===de||null===(me=de.exercise_types)||void 0===me?void 0:me.q_mains_scores,"\u5206"),!!(null===(pe=Te.exerciseBanks)||void 0===pe||null===(fe=pe.exercise_types)||void 0===fe?void 0:fe.q_shixuns)&&y.a.createElement("span",{className:"ml20"},"\u5b9e\u8bad\u9898",null===(_e=Te.exerciseBanks)||void 0===_e||null===(be=_e.exercise_types)||void 0===be?void 0:be.q_shixuns,"\u9898\uff0c\u5171",null===(ge=Te.exerciseBanks)||void 0===ge||null===(ve=ge.exercise_types)||void 0===ve?void 0:ve.q_shixuns_scores,"\u5206"),!!(null===(he=Te.exerciseBanks)||void 0===he||null===(Ee=he.exercise_types)||void 0===Ee?void 0:Ee.q_pros)&&y.a.createElement("span",{className:"ml20"},"\u7f16\u7a0b\u9898",null===(we=Te.exerciseBanks)||void 0===we||null===(ye=we.exercise_types)||void 0===ye?void 0:ye.q_pros,"\u9898\uff0c\u5171",null===(xe=Te.exerciseBanks)||void 0===xe||null===(ke=xe.exercise_types)||void 0===ke?void 0:ke.q_pros_scores,"\u5206")),y.a.createElement("span",{className:"fr"},!!(null===(je=Te.exerciseBanks)||void 0===je||null===(Oe=je.exercise_types)||void 0===Oe?void 0:Oe.q_counts)&&y.a.createElement("span",null,"\u5408\u8ba1 ",y.a.createElement("span",{className:"color-blue"},null===(Se=Te.exerciseBanks)||void 0===Se||null===(Ne=Se.exercise_types)||void 0===Ne?void 0:Ne.q_counts)," \u9898\uff0c \u5171 ",y.a.createElement("span",{className:"".concat((null===(Ce=Te.exerciseBanks)||void 0===Ce||null===(qe=Ce.exercise_types)||void 0===qe?void 0:qe.q_scores)>100?"color-red font-bd":"color-orange")},null===(Ae=Te.exerciseBanks)||void 0===Ae||null===(Ie=Ae.exercise_types)||void 0===Ie?void 0:Ie.q_scores)," \u5206"))),""!=We&&y.a.createElement("section",{className:[ue.a.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},Ke()),y.a.createElement("section",{style:{display:"flex"},className:[ue.a.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},y.a.createElement("div",{style:{flex:"1"}},Ue.map((function(e,t){return y.a.createElement(a["a"],{className:"mr20",type:"primary",onClick:function(){return $e(e.id)}},y.a.createElement(O["a"],{className:"mr5"}),e.name)})))),y.a.createElement(le,{callback:function(e){We.push({shixun:e.challenge_names.map((function(e){return{challenge_name:e,challenge_score:5}})),shixun_name:e.title,shixun_id:e.id,question_type:5,edit:!0}),Ze(Object(_["a"])(We))}}))});t["default"]=Object(j["a"])((function(e){var t=e.polls,n=e.loading,a=e.user,r=e.globalSetting;return{polls:t,globalSetting:r,user:a,loading:n.effects}}))(de)},uLbx:function(e,t,n){e.exports={flex_box_center:"flex_box_center___1paSn",flex_space_between:"flex_space_between___36S3i",flex_box_vertical_center:"flex_box_vertical_center___3ccMy",flex_box_center_end:"flex_box_center_end___31AGp",flex_box_column:"flex_box_column___1cfjg",bg:"bg___1_34e",containerTitle:"containerTitle___3x8NS",containerDesc:"containerDesc___j5b4j",listItem:"listItem___3eFKb",info:"info___1lfiH",title:"title___1_ERY",titleLeft:"titleLeft___MRBRV",titleRight:"titleRight___XliYN",acitons:"acitons___3Fqbt"}},uSYw:function(e,t,n){e.exports={flex_box_center:"flex_box_center___1Yp6V",flex_space_between:"flex_space_between___15-lw",flex_box_vertical_center:"flex_box_vertical_center___3Z69M",flex_box_center_end:"flex_box_center_end___mA7IH",flex_box_column:"flex_box_column___3xASj",wrp:"wrp___2ltDQ",drawer:"drawer___3_MCx",menu:"menu___aAo09",actived:"actived___3DNqM",actived2:"actived2___3JLKu",listItem:"listItem___39GLP",info:"info___1GUGE",title:"title___1wRiz",titleLeft:"titleLeft___1BA1e",titleRight:"titleRight___2w3Ba",search:"search___vFEeF",description:"description___29YXF",menuCourse:"menuCourse___2vc01"}},xKgJ:function(e,t,n){"use strict";n.d(t,"o",(function(){return l})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return m})),n.d(t,"r",(function(){return p})),n.d(t,"g",(function(){return f})),n.d(t,"s",(function(){return _})),n.d(t,"d",(function(){return b})),n.d(t,"i",(function(){return g})),n.d(t,"j",(function(){return v})),n.d(t,"q",(function(){return h})),n.d(t,"h",(function(){return E})),n.d(t,"p",(function(){return w})),n.d(t,"a",(function(){return y})),n.d(t,"l",(function(){return x})),n.d(t,"m",(function(){return k})),n.d(t,"k",(function(){return j})),n.d(t,"n",(function(){return O})),n.d(t,"t",(function(){return S}));var a,r,c=n("9kvl");(function(e){e[e["SuperAdmin"]=1]="SuperAdmin",e[e["Operation"]=2]="Operation",e[e["CertifiedTeacher"]=5]="CertifiedTeacher",e[e["TrainingProduction"]=8]="TrainingProduction",e[e["UncertifiedTeacher"]=12]="UncertifiedTeacher",e[e["Student"]=15]="Student"})(a||(a={})),function(e){e[e["SuperAdmin"]=1]="SuperAdmin",e[e["Operation"]=2]="Operation",e[e["Admin"]=5]="Admin",e[e["Teacher"]=8]="Teacher",e[e["Assistant"]=12]="Assistant",e[e["Student"]=15]="Student"}(r||(r={}));var i=function(e){var t=Object(c["b"])()._store.getState(),n=t.user,a=n.userInfo;return e.some((function(e){return e==(null===a||void 0===a?void 0:a.role)}))},o=function(e){var t=Object(c["b"])()._store.getState(),n=t.user,a=n.userInfo;return!!(null===a||void 0===a?void 0:a.own)||e.some((function(e){var t;return e==(null===a||void 0===a||null===(t=a.course)||void 0===t?void 0:t.course_role)}))},l=function(){var e=Object(c["b"])()._store.getState(),t=e.user,n=t.userInfo;return n.main_site},s=function(){var e,t=Object(c["b"])()._store.getState(),n=t.user,a=n.userInfo;return null===a||void 0===a||null===(e=a.course)||void 0===e?void 0:e.course_is_end},u=function(){return o([r.SuperAdmin,r.Operation,r.Admin,r.Teacher,r.Assistant])},d=function(){return o([r.SuperAdmin,r.Teacher,r.Admin,r.Assistant,r.Operation])},m=function(){return o([r.SuperAdmin,r.Teacher,r.Admin])},p=function(){return o([r.SuperAdmin])},f=function(){return o([r.SuperAdmin,r.Operation,r.Admin])},_=function(){return o([r.SuperAdmin,r.Operation])},b=function(){return o([r.SuperAdmin,r.Admin])},g=function(){return o([r.SuperAdmin,r.Operation,r.Admin,r.Teacher])},v=function(){return o([r.Assistant])},h=function(){return o([r.Student])},E=function(){return o([r.SuperAdmin,r.Operation,r.Admin,r.Teacher,r.Assistant,r.Student])},w=function(){var e,t=Object(c["b"])()._store.getState(),n=t.user,a=n.userInfo;return null===(null===a||void 0===a||null===(e=a.course)||void 0===e?void 0:e.course_role)},y=function(){return i([a.SuperAdmin,a.Operation,a.CertifiedTeacher,a.TrainingProduction])},x=function(){return i([a.SuperAdmin])},k=function(){return i([a.SuperAdmin,a.Operation])},j=function(){return i([a.Student])},O=function(){var e,t=Object(c["b"])()._store.getState(),n=t.user;return!!(null===(e=n.userInfo)||void 0===e?void 0:e.login)},S=function(){var e=Object(c["b"])()._store.getState(),t=e.user;return t.userInfo}}}]);