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

2 lines
39 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7099],{12863:function(te,k,r){r.d(k,{Z:function(){return de}});var h=r(67294),t=r(35973),A=r(94184),se=r.n(A),x=r(5385),G={goback:"goback___jLQ4I",title_name:"title_name___YAPgH"},j=Object.defineProperty,y=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,I=(w,F,P)=>F in w?j(w,F,{enumerable:!0,configurable:!0,writable:!0,value:P}):w[F]=P,z=(w,F)=>{for(var P in F||(F={}))b.call(F,P)&&I(w,P,F[P]);if(y)for(var P of y(F))d.call(F,P)&&I(w,P,F[P]);return w};const K=({dispatch:w,className:F,style:P={},leftDom:B,rigthDom:$,title:D,imgUrl:_})=>((0,h.useEffect)(()=>(w({type:"globalSetting/headerToggle",payload:!1}),()=>{w({type:"globalSetting/headerToggle",payload:!0})}),[]),h.createElement("div",{className:se()("flex item-center justify-between h-64px px-40px",F),style:z({background:`url(${_||r(12907)}) 0 0 / 100% 100% no-repeat`,height:85},P)},B||h.createElement("div",{className:"flex item-center",style:{width:120}},h.createElement("div",{className:`current rounded-full px-30px py-12px c-white ${G.goback}`,onClick:()=>{t.history.push("/")}},"\u8FD4\u56DE\u9996\u9875")),typeof D=="string"?h.createElement("div",{className:`text-36px c-white font-semibold ${G.title_name}`}," ",D):D,$||h.createElement("div",{className:"flex justify-end",style:{width:120}},h.createElement(x.Z,null))));var de=(0,t.connect)(({})=>({}))(K)},5385:function(te,k,r){r.d(k,{Z:function(){return P}});var h=r(35973),t=r(68508),A=r(2453),se=r(85418),x={flex_box_center:"flex_box_center___M4WZx",flex_space_between:"flex_space_between___bwhOs",flex_box_vertical_center:"flex_box_vertical_center___DNlG5",flex_box_center_end:"flex_box_center_end___HBHt4",flex_box_column:"flex_box_column___spgwz",userPic:"userPic___Tl9mK",rightMenu:"rightMenu___YDuVi",menuWrap:"menuWrap___m0MSS",exit:"exit___dTkih",classromediv:"classromediv___TRiTQ",glow:"glow___OjyUr",height67:"height67___HL_eW",login:"login___Dnj59",icon:"icon___B_lfc"},G=r(52262),j=r(65900),y=r(11320),b=r(28706),d=r(67294),I=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,de=(B,$)=>{var D={};for(var _ in B)z.call(B,_)&&$.indexOf(_)<0&&(D[_]=B[_]);if(B!=null&&I)for(var _ of I(B))$.indexOf(_)<0&&K.call(B,_)&&(D[_]=B[_]);return D},w=(B,$,D)=>new Promise((_,O)=>{var le=M=>{try{Z(D.next(M))}catch(V){O(V)}},ne=M=>{try{Z(D.throw(M))}catch(V){O(V)}},Z=M=>M.done?_(M.value):Promise.resolve(M.value).then(le,ne);Z((D=D.apply(B,$)).next())});const F=B=>{var $=B,{homePage:D,user:_,globalSetting:O,loading:le,dispatch:ne,shixunHomeworks:Z}=$,M=de($,["homePage","user","globalSetting","loading","dispatch","shixunHomeworks"]),V,_e,Ee,ye,ce,je,ge,he,pe,m;const W=(V=_.userInfo)==null?void 0:V.is_school_manage,ve=()=>{var J,ue,Be,Fe,De;return(0,b.Ll)()?d.createElement(t.default,{className:`${x.rightMenu} ${x.menuWrap}`},d.createElement(t.default.Item,null,d.createElement(h.Link,{to:"/account/profile"},"\u8D26\u53F7\u7BA1\u7406"))):d.createElement(t.default,{className:`${x.rightMenu} ${x.menuWrap}`},d.createElement(t.default.Item,null,d.createElement(h.Link,{to:`/users/${(J=_.userInfo)==null?void 0:J.login}/classrooms`},"\u4E2A\u4EBA\u4E2D\u5FC3")),((Be=(ue=_.navigationInfo)==null?void 0:ue.top)==null?void 0:Be.laboratory_admin_url)&&d.createElement(t.default.Item,null,d.createElement("a",{href:(De=(Fe=_.navigationInfo)==null?void 0:Fe.top)==null?void 0:De.laboratory_admin_url},"\u540E\u53F0\u7BA1\u7406")),d.createElement(t.default.Item,null,d.createElement(h.Link,{onClick:()=>{localStorage.getItem("Noviceguide")==="0"||ne({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5E95\u90E8\u5F39\u7A97",type:2,href:"/classrooms",text:d.createElement("div",null,"OK\uFF0C\u63A5\u4E0B\u6765\uFF0C\u8BA9\u6211\u4EEC\u5F00\u59CB\u65B0\u5EFA\u3010\u6559\u5B66\u8BFE\u5802\u3011\uFF0C\u8BF7\u60A8\u627E\u5230\u95EA\u5149\u6846\u5E76\u70B9\u51FB \u201C\u6559\u5B66\u8BFE\u5802\u201D\u3002")}})},to:"/account/profile"},"\u8D26\u53F7\u7BA1\u7406")),d.createElement(t.default.Item,{className:x.exit},d.createElement("a",{onClick:()=>w(void 0,null,function*(){(0,b.m5)();let H;try{H=yield(0,j.vR)({}),A.ZP.success(H==null?void 0:H.message)}catch(Re){}(0,b.d8)("_educoder_session","logout",1),(0,b.m5)(),localStorage.removeItem("isfirst"),localStorage.removeItem("SystemUpdateadvtime"),localStorage.removeItem("item"),localStorage.removeItem("iscreate"),H!=null&&H.url?window.location.href=H.url:(h.history.replace("/"),window.location.reload())})},"\u9000\u51FA")))};return(0,G.bg)()?d.createElement(se.Z,{dropdownRender:ve,placement:"bottomRight"},d.createElement("section",null,d.createElement("aside",null,d.createElement("div",{className:Z.actionTabs.type===1?x.classromediv:""},d.createElement("img",{className:`${x.userPic} current ml15`,src:`${(_e=y.Z)==null?void 0:_e.IMG_SERVER}/images/${(Ee=_.userInfo)==null?void 0:Ee.image_url}`,alt:"",onClick:()=>{var J;return h.history.push((0,b.Ll)()?"/account/profile":`/users/${(J=_.userInfo)==null?void 0:J.login}/classrooms`)}}),(0,b.Ll)()&&d.createElement("span",{className:"ml10 font16"},(ye=_.userInfo)==null?void 0:ye.username),d.createElement("i",{className:`iconfont icon-zhankai4 ${x.icon}`}))))):d.createElement("div",{className:`font15 flex item-center gap-10px ${O.isIlearning?x.login:""}`},((ce=O.setting)==null?void 0:ce.sso_login_url)&&d.createElement("a",{target:"_blank",href:(je=O.setting)==null?void 0:je.sso_login_url},d.createElement("img",{src:`${y.Z.IMG_SERVER}/${(ge=O.setting)==null?void 0:ge.login_logo_url}`,width:40}),d.createElement("span",{style:{color:"#fff",fontSize:"14px",fontWeight:500,paddingLeft:"10px"}},(he=O.setting)==null?void 0:he.sso_login_button_name)),!((pe=O.setting)!=null&&pe.hide_account_login)&&d.createElement(d.Fragment,null,d.createElement("span",{className:"current-primary-hover",onClick:()=>{ne({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}})}}," \u767B\u5F55 "),!((m=O.setting)!=null&&m.close_register)&&d.createElement(d.Fragment,null,d.createElement("span",null,"|"),d.createElement("span",{className:"current-primary-hover",onClick:()=>{h.history.push("/user/register")}},"\u6CE8\u518C"))))};var P=(0,h.connect)(({homePage:B,loading:$,user:D,globalSetting:_,shixunHomeworks:O})=>({homePage:B,user:D,globalSetting:_,shixunHomeworks:O,loading:$.models.index}))(F)},6665:function(te,k,r){r.r(k),r.d(k,{default:function(){return ll}});var h=r(52810),t=r(67294),A=r(35973),se=r(12863),x={NewButton:"NewButton___VDj7k",statisticsWrap:"statisticsWrap___qU_NS",sortBtn:"sortBtn___UspKZ"},G=r(57953),j={scoremodal:"scoremodal___TOk5G",title:"title___FCP1o",content:"content____YfnK",bottom:"bottom___JrlWg",yes:"yes___yeexP",no:"no___wZHYL"},y=r(22150),b=r(14446),d=r(2453),I=r(69677),z=r(71577),K=r(33170),de=Object.defineProperty,w=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,B=(n,e,u)=>e in n?de(n,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):n[e]=u,$=(n,e)=>{for(var u in e||(e={}))F.call(e,u)&&B(n,u,e[u]);if(w)for(var u of w(e))P.call(e,u)&&B(n,u,e[u]);return n},D=(n,e,u)=>new Promise((c,s)=>{var E=i=>{try{v(u.next(i))}catch(f){s(f)}},p=i=>{try{v(u.throw(i))}catch(f){s(f)}},v=i=>i.done?c(i.value):Promise.resolve(i.value).then(E,p);v((u=u.apply(n,e)).next())});const _=({open:n,onCancel:e})=>{const[u]=y.default.useForm(),[c,s]=(0,t.useState)(!1);return t.createElement(b.default,{title:!1,footer:!1,open:n,width:610,className:j.scoremodal,closable:!1,centered:!0,onCancel:e},t.createElement("div",{style:{display:"flex",alignItems:"center"}},t.createElement("div",{className:j.title},"\u521B\u5EFA\u7ADE\u8D5B"),t.createElement("span",{onClick:e,style:{cursor:"pointer"},className:j.close},t.createElement("i",{className:"iconfont icon-guanbi",style:{color:"#979797",fontSize:"15px"}}))),t.createElement("div",{className:j.content},t.createElement(y.default,{form:u,layout:"vertical",onFinish:E=>D(void 0,null,function*(){s(!0);let p=yield(0,K.ZP)("/api/competitions.json",{method:"post",body:$({},E)});s(!1),(p==null?void 0:p.status)===0&&(d.ZP.info("\u521B\u5EFA\u6210\u529F"),A.history.push(`/competitions/detail/${p==null?void 0:p.identifier}?type=4`))})},t.createElement(y.default.Item,{label:"\u7ADE\u8D5B\u540D\u79F0",name:"name",className:j.jsinput,rules:[{required:!0,validator:(E,p)=>{var v;return((v=p==null?void 0:p.replaceAll(" ",""))==null?void 0:v.length)>0?Promise.resolve():Promise.reject("\u8BF7\u586B\u5199\u7ADE\u8D5B\u540D\u79F0")}}]},t.createElement(I.default,{maxLength:60,className:j.baseFormItem,showCount:!0})))),t.createElement("div",{className:j.bottom},t.createElement(z.ZP,{className:j.no,onClick:e},"\u53D6\u6D88"),t.createElement(z.ZP,{loading:c,className:j.yes,onClick:()=>{u.submit()}},"\u521B\u5EFA\u7ADE\u8D5B")))};var O=(0,A.connect)(({user:n})=>({user:n}))(_),le={scoremodal:"scoremodal___x5qvD",title:"title___rAePe",content:"content___hTTzf",bottom:"bottom___bAriT",yes:"yes___zsStT",no:"no___qq47w"},ne=r(9430),Z=r(80150),M=(n,e,u)=>new Promise((c,s)=>{var E=i=>{try{v(u.next(i))}catch(f){s(f)}},p=i=>{try{v(u.throw(i))}catch(f){s(f)}},v=i=>i.done?c(i.value):Promise.resolve(i.value).then(E,p);v((u=u.apply(n,e)).next())});const V=({open:n,onCancel:e})=>{const[u,c]=(0,t.useState)(""),[s,E]=(0,t.useState)([]);return t.createElement(b.default,{title:!1,footer:!1,open:n,width:900,className:le.scoremodal,closable:!1,centered:!0,onCancel:e},t.createElement("div",{style:{display:"flex",alignItems:"center"}},t.createElement("div",{className:le.title},"\u8BC1\u4E66\u67E5\u8BE2"),t.createElement("span",{onClick:e,style:{cursor:"pointer"},className:le.close},t.createElement("i",{className:"iconfont icon-guanbi",style:{color:"#979797",fontSize:"15px"}}))),t.createElement("div",{style:{marginTop:30,display:"flex",marginBottom:30}},t.createElement(I.default,{value:u,placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7",onChange:p=>{c(p.target.value)},style:{height:40}}),t.createElement(z.ZP,{style:{marginLeft:10,height:40,width:88},type:"primary",onClick:()=>M(void 0,null,function*(){let p=yield(0,K.ZP)("/api/competitions/get_certificates.json",{method:"get",params:{keywords:u}});(p==null?void 0:p.status)===0&&E(p==null?void 0:p.data)})},"\u67E5\u8BE2")),s.length==0&&t.createElement("div",{className:"tc font16 c-light-black mt40 pb30"},t.createElement("img",{src:r(56022),width:"135",alt:""}),t.createElement("br",null),t.createElement("p",{className:"mt20",style:{fontSize:14}},"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!")),s.length>0&&t.createElement(Z.Gi,{style:{marginLeft:0}},t.createElement(ne.default,{dataSource:s,pagination:!1,columns:[{title:"\u83B7\u5956\u4EBA",align:"left",dataIndex:"province",render:(p,v)=>{var i;return t.createElement("span",null,((i=v==null?void 0:v.user)==null?void 0:i.name)||"- -")}},{title:"\u83B7\u5956\u540D\u79F0",align:"left",dataIndex:"award_name",render:p=>t.createElement("span",null,p||"- -")},{title:"\u8BC1\u4E66\u7F16\u53F7",align:"left",dataIndex:"cert_num",render:p=>t.createElement("span",null,p||"- -")},{title:"\u7ADE\u8D5B\u540D\u79F0",align:"left",dataIndex:"cert_num",render:(p,v)=>{var i;return t.createElement("span",null,((i=v==null?void 0:v.competition)==null?void 0:i.name)||"- -")}},{title:"\u64CD\u4F5C",align:"right",dataIndex:"province",render:(p,v)=>{var i,f;return t.createElement("a",{target:"_blank",href:`/competitions/exports?id=${(i=v==null?void 0:v.competition)==null?void 0:i.id}&user_id=${(f=v==null?void 0:v.user)==null?void 0:f.user_id}`},"\u9884\u89C8\u4E0B\u8F7D")}}]})))};var _e=(0,A.connect)(({user:n})=>({user:n}))(V),Ee=r(52262),ye=r(34562),ce=r(26194),je=r(48148),ge=r(88667),he=r.n(ge),pe={PrevButton:"PrevButton___zvo89",nextButton:"nextButton___ypFUg"},m={listItem:"listItem___ABpZ3",itemImg:"itemImg___NebXe",itemStatus:"itemStatus___QjlPO",Finishedtext:"Finishedtext___Bk5jV",Comingtext:"Comingtext___qEZw8",preparing:"preparing___KegcN",not_passed:"not_passed___CQp4e",unpublish:"unpublish____er2M",review:"review___vUTSe",item_name:"item_name___saA87",jianjie:"jianjie___kJ2uF",flex_warp:"flex_warp___XTAEe",money:"money___fUcG6",com_btn:"com_btn___lKBh6",btn1:"btn1___WfICt",btn2:"btn2___Lja0M"},W=r(28706),ve=r(11713),J=r(83062),ue=r(78045),Be=r(49288),Fe=r(11320),De=r(89485),H=r(78207),Re=r(59990),Pt=r(38161),bt=r(84189),ke=r(96486),wt=Object.defineProperty,St=Object.defineProperties,It=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,Je=(n,e,u)=>e in n?wt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):n[e]=u,N=(n,e)=>{for(var u in e||(e={}))Ot.call(e,u)&&Je(n,u,e[u]);if(Ve)for(var u of Ve(e))Nt.call(e,u)&&Je(n,u,e[u]);return n},ae=(n,e)=>St(n,It(e)),Y=(n,e,u)=>new Promise((c,s)=>{var E=i=>{try{v(u.next(i))}catch(f){s(f)}},p=i=>{try{v(u.throw(i))}catch(f){s(f)}},v=i=>i.done?c(i.value):Promise.resolve(i.value).then(E,p);v((u=u.apply(n,e)).next())});const jt=({user:n,item:e,competitions:u,itemStyles:c,dispatch:s})=>{var E,p,v,i,f,Q,oe,U,R,xe,Pe,re,be,we,Se,g,X,tt,lt,nt,ut,at;let[S,Ie]=(0,t.useState)([]);const[nl,$e]=(0,t.useState)(!1),[ul,q]=(0,t.useState)(!1),[o,al]=(0,t.useState)({}),[ol,me]=(0,t.useState)(!1),[rl,Te]=(0,t.useState)(!1),[il,fe]=(0,t.useState)(!1),[sl,Oe]=(0,t.useState)(),[ot,Le]=(0,t.useState)(!1),[rt,Ze]=(0,t.useState)(!1),[it,ee]=(0,t.useState)(!0),[st]=y.default.useForm(),[dt,dl]=(0,t.useState)([]),[cl,pl]=(0,t.useState)([]),vl=(0,t.useRef)((0,ke.throttle)((a,l)=>ml(a,l),1200,{leading:!0,trailing:!0})).current,Me=ve.default.Option,We=a=>{a.stopPropagation()},ml=(a,l)=>Y(void 0,null,function*(){var C;const T=yield s({type:"account/getSchoolOption",payload:{keyword:a,competition_id:(o==null?void 0:o.identifier)||l,display_aliases:!0}});dl(T==null?void 0:T.schools),a&&a!=""&&pl((C=T==null?void 0:T.schools)==null?void 0:C.filter(L=>L.name.toUpperCase().indexOf(a.toUpperCase())!==-1))}),fl=(a,l)=>{if(a.stopPropagation(),al(l),l!=null&&l.teacher_need_phone||l!=null&&l.member_need_phone){$e(!0);return}if(l!=null&&l.need_check_mail){b.default.confirm({title:"\u63D0\u793A",content:"\u60A8\u6682\u672A\u7ED1\u5B9A\u90AE\u7BB1\uFF0C\u4E3A\u4E86\u540E\u7EED\u7ADE\u8D5B\u5956\u9879\u9881\u53D1\u7B49\u76F8\u5173\u4E8B\u5B9C\u7684\u6B63\u5E38\u4E14\u51C6\u786E\u8FDB\u884C\uFF0C\u8BF7\u5B8C\u6210\u7ED1\u5B9A\u518D\u53C2\u52A0\u62A5\u540D\u3002",onOk:()=>{window.open("/account/secure")}});return}if(l!=null&&l.is_course_manager){(0,W.xg)(l==null?void 0:l.first_category_url);return}if(l!=null&&l.enroll_url){(0,W.xg)(l==null?void 0:l.enroll_url);return}l!=null&&l.external_url?ie(l==null?void 0:l.external_url):_l(a,l,(l==null?void 0:l.mode)===2?"ismodel":l!=null&&l.personal?"personal":l!=null&&l.is_new?`/competitions/detail/${l==null?void 0:l.identifier}?type=3`:`/competitions/${l==null?void 0:l.identifier}/detail/enroll`)},_l=(a,l,C)=>Y(void 0,null,function*(){var T,L,pt,vt,mt,ft,_t,Et,yt,gt,ht,Bt,Ft,Dt,Ct,At,xt;if(a.stopPropagation(),Ie(N({},l)),!(0,H.tJ)(s))return;if(l!=null&&l.is_authentication&&!((T=n==null?void 0:n.userInfo)!=null&&T.authentication)){s({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}});return}if((yield(0,K.ZP)(`/api/competitions/${l==null?void 0:l.identifier}/check_open.json`,{method:"post"})).status===0)if(C==="ismodel")if((l==null?void 0:l.member_of_course)===!0)(0,W.xg)(`/classrooms/${l==null?void 0:l.course_id}`);else{if(!(l!=null&&l.member_of_course)&&!(l!=null&&l.personal)){q(!0),Ie(l);return}if(!(l!=null&&l.invite_code)){d.ZP.info("\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C");return}const ze=(...He)=>Y(void 0,[...He],function*(Ue={}){(yield s({type:"competitions/addApplytojoincourse",payload:ae(N({},Ue),{invite_code:l==null?void 0:l.invite_code,student:1})})).status===0&&(l!=null&&l.is_new?A.history.push(`/competitions/detail/${l==null?void 0:l.identifier}`):(0,W.xg)(`/classrooms/${l==null?void 0:l.course_id}`))});if((L=l==null?void 0:l.need_apply_info)!=null&&L.need_apply_name||(pt=l==null?void 0:l.need_apply_info)!=null&&pt.need_apply_teacher_phone||(vt=l==null?void 0:l.need_apply_info)!=null&&vt.need_apply_student_id||(mt=l==null?void 0:l.need_apply_info)!=null&&mt.need_apply_sex||(ft=l==null?void 0:l.need_apply_info)!=null&&ft.need_apply_phone||(_t=l==null?void 0:l.need_apply_info)!=null&&_t.need_apply_grade||(Et=l==null?void 0:l.need_apply_info)!=null&&Et.need_apply_teacher_name||(yt=l==null?void 0:l.need_apply_info)!=null&&yt.need_apply_school){me(!0);return}ze()}else if(C==="personal")if(l!=null&&l.is_new){if((l==null?void 0:l.enrolled)===!0){(0,W.xg)(`/competitions/detail/${l==null?void 0:l.identifier}?type=1`);return}if(l!=null&&l.teacher_need_phone||l!=null&&l.member_need_phone){a.stopPropagation(),$e(!0);return}if(!(0,H.tJ)(s))return;if(l!=null&&l.need_check_mail){a.stopPropagation(),b.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,content:"\u60A8\u6682\u672A\u7ED1\u5B9A\u90AE\u7BB1\uFF0C\u4E3A\u4E86\u540E\u7EED\u7ADE\u8D5B\u5956\u9879\u9881\u53D1\u7B49\u76F8\u5173\u4E8B\u5B9C\u7684\u6B63\u5E38\u4E14\u51C6\u786E\u8FDB\u884C\uFF0C\u8BF7\u5B8C\u6210\u7ED1\u5B9A\u518D\u53C2\u52A0\u62A5\u540D\u3002",onOk:()=>{window.open("/account/secure")}});return}if(l!=null&&l.is_authentication&&!((gt=n==null?void 0:n.userInfo)!=null&&gt.authentication)){s({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}});return}if(rl)return;const ze=(...He)=>Y(void 0,[...He],function*(Ue={}){Te(!0);let Ne=yield s({type:"competitions/AddTeam",payload:ae(N({},Ue),{identifier:l==null?void 0:l.identifier})});Te(!1),Ne&&Ne.status===0&&(Oe(Ne),fe(!0),s({type:"competitions/getList",payload:N({},u.listParams)}))});if((ht=l==null?void 0:l.need_apply_info)!=null&&ht.need_apply_name||(Bt=l==null?void 0:l.need_apply_info)!=null&&Bt.need_apply_student_id||(Ft=l==null?void 0:l.need_apply_info)!=null&&Ft.need_apply_sex||(Dt=l==null?void 0:l.need_apply_info)!=null&&Dt.need_apply_phone||(Ct=l==null?void 0:l.need_apply_info)!=null&&Ct.need_apply_grade||(At=l==null?void 0:l.need_apply_info)!=null&&At.need_apply_teacher_name||(xt=l==null?void 0:l.need_apply_info)!=null&&xt.need_apply_school){me(!0);return}ze()}else{if((l==null?void 0:l.enrolled)===!0){(0,W.xg)(l!=null&&l.is_new?`/competitions/detail/${l==null?void 0:l.identifier}?type=3`:`/competitions/${l==null?void 0:l.identifier}/detail/enroll`);return}q(!0)}else{if((l==null?void 0:l.enrolled)===!0){(0,W.xg)(C);return}if(C==="personal"){if((l==null?void 0:l.enroll_ended)===!0){d.ZP.info("\u62A5\u540D\u5DF2\u622A\u6B62");return}q(!0),Ie(l)}else q(!0),Ie(l)}}),El=a=>{var l;if(a!=null&&a.external_url)ie(`${a==null?void 0:a.external_url}?login=`+((l=n==null?void 0:n.userInfo)==null?void 0:l.login)+"&websiteName=educoder"),s({type:"competitions/getHeader",payload:{identifier:a==null?void 0:a.identifier}});else{if(a!=null&&a.is_new){(a==null?void 0:a.permission.editable)==!0?["preparing","not_passed","review"].includes(a==null?void 0:a.competition_status)?ie(`/competitions/detail/${a==null?void 0:a.identifier}?type=4`):ie(`/competitions/detail/${a==null?void 0:a.identifier}?type=1`):ie(`/competitions/detail/${a==null?void 0:a.identifier}`);return}((a==null?void 0:a.competition_status)==="ended"||(a==null?void 0:a.competition_status)==="progressing"||(a==null?void 0:a.competition_status)==="apply"||(a==null?void 0:a.competition_status)==="unpublish"||(a==null?void 0:a.competition_status)==="nearly_published"&&(a==null?void 0:a.permission.editable)==!0)&&ie(`/competitions/${a==null?void 0:a.identifier}`)}};function ie(a){(0,W.xg)(a)}function yl(a){return Y(this,null,function*(){if(!it||ct())return;ee(!1);let l=yield s({type:"competitions/JoinTeam",payload:N({identifier:S==null?void 0:S.identifier},a)});l&&l.status===0?(fe(!0),Oe(l),s({type:"competitions/getList",payload:N({},u.listParams)}),Le(!1)):ee(!0)})}function gl(a){return Y(this,null,function*(){if(!it||(ee(!1),ct()))return;let l=yield s({type:"competitions/AddTeam",payload:ae(N({},a),{identifier:(S==null?void 0:S.identifier)||(a==null?void 0:a.identifier)})});l&&l.status===0?(fe(!0),Oe(l),s({type:"competitions/getList",payload:N({},u.listParams)}),Ze(!1)):ee(!0)})}function ct(){var a,l,C;if((a=n==null?void 0:n.userInfo)!=null&&a.is_teacher){if((l=S==null?void 0:S.teacher_staff)!=null&&l.mutiple_limited&&S!=null&&S.enrolled)return d.ZP.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ee(!0),!0}else if((C=S==null?void 0:S.member_staff)!=null&&C.mutiple_limited&&S!=null&&S.enrolled)return d.ZP.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ee(!0),!0;if(S!=null&&S.enroll_ended)return d.ZP.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),ee(!0),!0;console.log("---",S)}const hl=()=>{const a=new Date().getFullYear();return Array(31).fill({}).map(function(l,C){return t.createElement(Me,{key:C,value:a-C},t.createElement("span",null,a-C))})};return t.createElement("div",{className:m.listItem,style:N({},c),onClick:()=>El(e)},t.createElement("div",{style:{position:"relative"}},t.createElement("img",{className:m.itemImg,src:e!=null&&e.image?`${Fe.Z.API_SERVER+(e==null?void 0:e.image)}`:De.I2}),(e==null?void 0:e.competition_status)==="nearly_published"&&t.createElement("span",{className:`${m.itemStatus} ${m.Comingtext}`},"\u5373\u5C06\u53D1\u5E03"),(e==null?void 0:e.competition_status)==="preparing"&&t.createElement("span",{className:`${m.itemStatus} ${m.preparing}`},"\u5F85\u5BA1\u6838"),(e==null?void 0:e.competition_status)==="apply"&&t.createElement("span",{className:`${m.itemStatus}`},"\u6B63\u5728\u62A5\u540D"),(e==null?void 0:e.competition_status)==="not_passed"&&t.createElement("span",{className:`${m.itemStatus} ${m.not_passed}`},"\u88AB\u9A73\u56DE"),(e==null?void 0:e.competition_status)==="review"&&t.createElement("span",{className:`${m.itemStatus} ${m.review}`},"\u5BA1\u6838\u4E2D"),(e==null?void 0:e.competition_status)==="progressing"&&t.createElement("span",{className:`${m.itemStatus}`},"\u8FDB\u884C\u4E2D"),(e==null?void 0:e.competition_status)==="ended"&&t.createElement("span",{className:`${m.itemStatus} ${m.Finishedtext}`},"\u5DF2\u7ED3\u675F"),(e==null?void 0:e.competition_status)==="unpublish"&&t.createElement("span",{className:`${m.itemStatus} ${m.unpublish}`},"\u672A\u53D1\u5E03")),t.createElement(J.Z,{overlayStyle:{maxWidth:800},title:t.createElement("span",null,e==null?void 0:e.name,e!=null&&e.sub_title?`\u2014${e==null?void 0:e.sub_title}`:"")},t.createElement("div",{className:m.item_name},e==null?void 0:e.name,e!=null&&e.sub_title?`\u2014${e==null?void 0:e.sub_title}`:"")),t.createElement(J.Z,{title:(e==null?void 0:e.description)||"\u6682\u65E0\u7B80\u4ECB~"},t.createElement("div",{className:m.jianjie},(e==null?void 0:e.description)||"\u6682\u65E0\u7B80\u4ECB~")),t.createElement("div",{className:m.flex_warp,style:{alignItems:"center"}},t.createElement("div",null,"\u7ADE\u8D5B\u65F6\u95F4\uFF1A",e==null?void 0:e.start_time,"\uFF5E",e==null?void 0:e.end_time),t.createElement("div",{style:{visibility:e!=null&&e.bonus?"visible":"hidden"}},"\xA5",t.createElement("span",{className:m.money},parseInt(e==null?void 0:e.bonus).toLocaleString()))),t.createElement("div",{className:m.flex_warp,style:{marginTop:"1vh"}},t.createElement("div",null,"\u62A5\u540D\u622A\u6B62\u65F6\u95F4\uFF1A",(e==null?void 0:e.enroll_end_time)||"\u6682\u65E0"),e!=null&&e.member_count?t.createElement("div",null," \u5DF2\u62A5\u540D\uFF1A ",(e==null?void 0:e.competition_status)==="nearly_published"?0:e==null?void 0:e.member_count," "):t.createElement("div",null)),t.createElement("div",{className:m.flex_warp},t.createElement("div",null,"\u6D4F\u89C8\u6570\uFF1A",(e==null?void 0:e.visits_count)||0),((e==null?void 0:e.competition_status)==="progressing"||(e==null?void 0:e.competition_status)==="apply")&&(e==null?void 0:e.enroll_end)!=!0&&!(e!=null&&e.external_url)&&(e==null?void 0:e.enroll_end_time)&&t.createElement("div",{className:m.btn1,onClick:a=>fl(a,e)},e!=null&&e.enrolled?"\u5DF2\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"),(e==null?void 0:e.competition_status)==="ended"&&t.createElement("div",{className:`${m.btn2}`,onClick:a=>We(a)},"\u5DF2\u7ED3\u675F"),(e==null?void 0:e.competition_status)==="nearly_published"&&t.createElement("div",{className:`${m.btn2}`,onClick:a=>We(a)},"\u672A\u53D1\u5E03"),(e==null?void 0:e.competition_status)!=="nearly_published"&&(e==null?void 0:e.enroll_end)&&(e==null?void 0:e.competition_status)!=="ended"&&t.createElement("div",{className:`${m.btn2}`,onClick:a=>We(a)},"\u62A5\u540D\u622A\u6B62")),t.createElement(Re.Z,{datas:sl,Header:o,isopen:il,setisopen:fe,isShowPhone:nl,setIsShowPhone:$e,user:n,dispatch:s,onOK:()=>{s({type:"competitions/getList",payload:N({},u.listParams)})}}),t.createElement(b.default,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",centered:!0,open:ul,onCancel:()=>{q(!1)},footer:!1},t.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.createElement(z.ZP,{type:"primary",style:{height:40},onClick:()=>{Le(!0),q(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.createElement(z.ZP,{style:{height:40},onClick:()=>{Ze(!0),q(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),t.createElement(b.default,{title:"\u62A5\u540D\u4FE1\u606F\u586B\u5199",centered:!0,open:ol,width:700,onOk:(0,ke.debounce)(()=>{st.submit()},500),onCancel:()=>{me(!1)}},t.createElement(y.default,{initialValues:ae(N({},n.userInfo),{sex:(E=n==null?void 0:n.userInfo)==null?void 0:E.gender,grade:(p=n==null?void 0:n.userInfo)==null?void 0:p.edu_entry_year,school:(v=o==null?void 0:o.need_apply_info)!=null&&v.need_apply_school&&(o==null?void 0:o.region_rule)===1||(o==null?void 0:o.identifier)==="81bjsjjs"?"":(i=n==null?void 0:n.userInfo)==null?void 0:i.school_name}),form:st,colon:!1,labelCol:{span:5},size:"large",onFinish:a=>Y(void 0,null,function*(){var l,C;const T=(l=dt.find(L=>L.name===(a==null?void 0:a.school)))==null?void 0:l.id;if(!T&&((C=o==null?void 0:o.need_apply_info)!=null&&C.need_apply_school)){d.ZP.info("\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u5B66\u6821");return}if(o.mode===2)(yield s({type:"competitions/addApplytojoincourse",payload:ae(N({},a),{invite_code:o.invite_code,student:1,school_id:T})})).status===0&&(me(!1),o.is_new?A.history.push(`/competitions/detail/${o.identifier}`):(0,W.xg)(`/classrooms/${o.course_id}`));else{let L=yield s({type:"competitions/AddTeam",payload:ae(N({},a),{school_id:T,identifier:o.identifier})});Te(!1),L&&L.status===0&&(me(!1),Oe(L),fe(!0),s({type:"competitions/getList",payload:N({},u.listParams)}))}})},(((f=o==null?void 0:o.need_apply_info)==null?void 0:f.need_apply_name)||((Q=o==null?void 0:o.need_apply_info)==null?void 0:Q.need_apply_teacher_phone)||((oe=o==null?void 0:o.need_apply_info)==null?void 0:oe.need_apply_student_id)||((U=o==null?void 0:o.need_apply_info)==null?void 0:U.need_apply_sex)||((R=o==null?void 0:o.need_apply_info)==null?void 0:R.need_apply_phone)||((xe=o==null?void 0:o.need_apply_info)==null?void 0:xe.need_apply_grade)||((Pe=o==null?void 0:o.need_apply_info)==null?void 0:Pe.need_apply_teacher_name)||((re=o==null?void 0:o.need_apply_info)==null?void 0:re.need_apply_school))&&t.createElement("div",{className:"mb20"},"\u6839\u636E\u7ADE\u8D5B\u5B98\u65B9\u7684\u89C4\u5B9A\uFF0C\u53C2\u8D5B\u4EBA\u5458\u9700\u586B\u5199\u5FC5\u586B\u4FE1\u606F\u624D\u53EF\u5B8C\u6210\u62A5\u540D\uFF0C\u8BF7\u786E\u4FDD\u586B\u5199\u7684\u4FE1\u606F\u51C6\u786E\u5B8C\u6574\u3002"),((be=o==null?void 0:o.need_apply_info)==null?void 0:be.need_apply_name)&&t.createElement(y.default.Item,{label:"\u53C2\u8D5B\u4EBA\u5458\u59D3\u540D",name:"real_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53C2\u8D5B\u4EBA\u5458\u59D3\u540D"},{whitespace:!0,message:"\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"}]},t.createElement(I.default,{placeholder:"\u8BF7\u8F93\u5165\u53C2\u8D5B\u4EBA\u5458\u59D3\u540D",showCount:!0,maxLength:60})),((we=o==null?void 0:o.need_apply_info)==null?void 0:we.need_apply_sex)&&t.createElement(y.default.Item,{label:"\u6027\u522B",name:"sex",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u53C2\u8D5B\u4EBA\u5458\u6027\u522B"}]},t.createElement(ue.ZP.Group,null,t.createElement(ue.ZP,{value:0},"\u7537"),t.createElement(ue.ZP,{value:1},"\u5973"))),((Se=o==null?void 0:o.need_apply_info)==null?void 0:Se.need_apply_student_id)&&t.createElement(y.default.Item,{label:"\u5B66\u53F7",name:"student_id",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53C2\u8D5B\u4EBA\u5458\u5B66\u53F7"},{whitespace:!0,message:"\u5B66\u53F7\u4E0D\u80FD\u4E3A\u7A7A"}]},t.createElement(I.default,{placeholder:"\u8BF7\u8F93\u5165\u53C2\u8D5B\u4EBA\u5458\u5B66\u53F7",showCount:!0,maxLength:60})),((g=o==null?void 0:o.need_apply_info)==null?void 0:g.need_apply_id_number)&&t.createElement(y.default.Item,{label:"\u8EAB\u4EFD\u8BC1\u53F7\u7801",name:"id_number",rules:[{required:!0,pattern:/^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i,message:"\u8BF7\u586B\u5199\u6B63\u786E\u7684\u8EAB\u4EFD\u8BC1\u683C\u5F0F"}]},t.createElement(I.default,{maxLength:18,showCount:!0,placeholder:"\u8BF7\u8F93\u8EAB\u4EFD\u8BC1\u53F7\u7801"})),((X=o==null?void 0:o.need_apply_info)==null?void 0:X.need_apply_phone)&&t.createElement(y.default.Item,{label:"\u7535\u8BDD",name:"phone",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53C2\u8D5B\u4EBA\u5458\u7535\u8BDD"},{whitespace:!0,message:"\u7535\u8BDD\u4E0D\u80FD\u4E3A\u7A7A"}]},t.createElement(I.default,{placeholder:"\u8BF7\u8F93\u5165\u53C2\u8D5B\u4EBA\u5458\u7535\u8BDD",showCount:!0,maxLength:60})),((tt=o==null?void 0:o.need_apply_info)==null?void 0:tt.need_apply_grade)&&t.createElement(y.default.Item,{label:"\u5E74\u7EA7",name:"grade",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u53C2\u8D5B\u4EBA\u5458\u5E74\u7EA7"},(o==null?void 0:o.identifier)==="81bjsjjs"?{validator:(a,l)=>l!==2023?Promise.reject(new Error("\u4E0D\u7B26\u5408\u62A5\u540D\u53C2\u8D5B\u8303\u56F4")):Promise.resolve()}:null].filter(a=>a!==null)},t.createElement(ve.default,{placeholder:"\u8BF7\u9009\u62E9\u53C2\u8D5B\u4EBA\u5458\u5E74\u7EA7",size:"large"},hl())),((lt=o==null?void 0:o.need_apply_info)==null?void 0:lt.need_apply_teacher_name)&&t.createElement(y.default.Item,{label:"\u6307\u5BFC\u8001\u5E08\u59D3\u540D",name:"teacher_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6307\u5BFC\u8001\u5E08\u59D3\u540D"},{whitespace:!0,message:"\u6307\u5BFC\u8001\u5E08\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"}]},t.createElement(I.default,{placeholder:"\u5982\u6CA1\u6709\u6307\u5BFC\u8001\u5E08\u8BF7\u586B\u65E0",showCount:!0,maxLength:60})),((nt=o==null?void 0:o.need_apply_info)==null?void 0:nt.need_apply_teacher_phone)&&t.createElement(y.default.Item,{label:"\u6307\u5BFC\u8001\u5E08\u8054\u7CFB\u65B9\u5F0F",name:"teacher_phone",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6307\u5BFC\u8001\u5E08\u8054\u7CFB\u65B9\u5F0F"},{whitespace:!0,message:"\u6307\u5BFC\u8001\u5E08\u8054\u7CFB\u65B9\u5F0F\u4E0D\u80FD\u4E3A\u7A7A"}]},t.createElement(I.default,{placeholder:"\u8BF7\u8F93\u5165\u6307\u5BFC\u8001\u5E08\u8054\u7CFB\u65B9\u5F0F",showCount:!0,maxLength:60})),((ut=o==null?void 0:o.need_apply_info)==null?void 0:ut.need_apply_school)&&(o==null?void 0:o.region_rule)!==1&&(o==null?void 0:o.identifier)!=="81bjsjjs"&&t.createElement(y.default.Item,{label:"\u5B66\u6821",name:"school",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B66\u6821"}]},t.createElement(Be.Z,{size:"large",showSearch:!0,onChange:a=>vl(a,o.identifier)},cl.map((a,l)=>t.createElement(Me,{key:l,value:a.name},a.name)))),(((at=o==null?void 0:o.need_apply_info)==null?void 0:at.need_apply_school)&&(o==null?void 0:o.region_rule)===1||(o==null?void 0:o.identifier)==="81bjsjjs")&&t.createElement(y.default.Item,{label:"\u5B66\u6821",name:"school",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B66\u6821"}]},t.createElement(ve.default,{showSearch:!0},dt.map((a,l)=>t.createElement(Me,{key:l,value:a.name},a.name)))))),ot?t.createElement(Pt.Z,{dispatch:s,user:n,isjoin:ot,setJoin:Le,JoinTeams:yl,Data:o}):null,rt?t.createElement(bt.Z,{dispatch:s,user:n,isAddmodle:rt,setIsAdd:Ze,createTeam:gl,Data:o}):null)};var Ge=(0,A.connect)(({user:n,competitions:e})=>({user:n,competitions:e}))(jt);const $t=({user:n,competitions:e,dispatch:u,list:c})=>t.createElement(he(),{effect:"coverflow",initialSlide:1,slidesPerView:3,centeredSlides:!0,observer:!0,observeParents:!0,navigation:{nextEl:".swiper-next",prevEl:".swiper-prev"},renderPrevButton:()=>t.createElement("div",{className:`swiper-prev absolute current ${pe.PrevButton} ${(c==null?void 0:c.length)>1?"":"hidden"}`,style:{top:"50%",zIndex:10,left:"140px",transform:"translateY(-50%)"}}),renderNextButton:()=>t.createElement("div",{className:`swiper-next absolute current ${pe.nextButton} ${(c==null?void 0:c.length)>1?"":"hidden"}`,style:{top:"50%",zIndex:10,right:"140px",transform:"translateY(-50%)"}}),coverflowEffect:{rotate:-10,stretch:0,depth:60,modifier:2,slideShadows:!1}},c==null?void 0:c.map((s,E)=>t.createElement("div",{key:E},t.createElement(Ge,{item:s}))));var Tt=(0,A.connect)(({user:n,competitions:e,globalSetting:u})=>({user:n,competitions:e,globalSetting:u}))($t),Lt=r(49542),Zt=r(71230),Mt={conWrap:"conWrap___HvrFF"},Wt=Object.defineProperty,Ce=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Qe=(n,e,u)=>e in n?Wt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):n[e]=u,zt=(n,e)=>{for(var u in e||(e={}))Ke.call(e,u)&&Qe(n,u,e[u]);if(Ce)for(var u of Ce(e))Ye.call(e,u)&&Qe(n,u,e[u]);return n},Ht=(n,e)=>{var u={};for(var c in n)Ke.call(n,c)&&e.indexOf(c)<0&&(u[c]=n[c]);if(n!=null&&Ce)for(var c of Ce(n))e.indexOf(c)<0&&Ye.call(n,c)&&(u[c]=n[c]);return u};const Ut=n=>{var e=n,{competitions:u,globalSetting:c,loading:s,dispatch:E,user:p}=e,v=Ht(e,["competitions","globalSetting","loading","dispatch","user"]),i,f;const[Q,oe]=(0,t.useState)("mine");return t.createElement("div",{className:Mt.conWrap},t.createElement("aside",{className:"edu-container minH500"},t.createElement(Zt.Z,{align:"middle",justify:"space-between",style:{marginBottom:26,marginTop:30}},t.createElement(Z.tp,{dataSource:[{name:"\u6211\u7BA1\u7406\u7684",id:"mine"},{name:"\u6211\u53C2\u4E0E\u7684",id:"join"}],className:"mb20",value:Q,onChange:U=>{u.listParams.page=1,u.listParams.category=U,u.listParams.page=1,E({type:"competitions/getList",payload:zt({},u.listParams)}),oe(U)}})),s?t.createElement(G.Z,null):((i=u.competitions)==null?void 0:i.length)>0?t.createElement("div",{className:"w-full",style:{display:"flex",flexWrap:"wrap",gap:"25px"}},(f=u.competitions)==null?void 0:f.map((U,R)=>t.createElement("div",{key:R,style:{width:"383px"}},t.createElement(Ge,{item:U,itemStyles:{margin:"0"}})))):t.createElement(ce.Z,{styles:{width:"100%"}})))};var Rt=(0,A.connect)(({competitions:n,loading:e,globalSetting:u,user:c})=>({competitions:n,globalSetting:u,loading:e.models.competitions,user:c}))(Ut),kt=r(63831),Vt=Object.defineProperty,Jt=Object.defineProperties,Gt=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,Kt=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,qe=(n,e,u)=>e in n?Vt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):n[e]=u,Ae=(n,e)=>{for(var u in e||(e={}))Kt.call(e,u)&&qe(n,u,e[u]);if(Xe)for(var u of Xe(e))Yt.call(e,u)&&qe(n,u,e[u]);return n},et=(n,e)=>Jt(n,Gt(e)),Qt=(n,e,u)=>new Promise((c,s)=>{var E=i=>{try{v(u.next(i))}catch(f){s(f)}},p=i=>{try{v(u.throw(i))}catch(f){s(f)}},v=i=>i.done?c(i.value):Promise.resolve(i.value).then(E,p);v((u=u.apply(n,e)).next())});const Xt=({user:n,competitions:e,globalSetting:u,dispatch:c,loading:s})=>{var E,p;const[v,i]=(0,t.useState)(!1),[f,Q]=(0,t.useState)(!1),{identifier:oe}=(0,A.useParams)(),[U]=(0,A.useSearchParams)(),[R,xe]=(0,t.useState)(""),[Pe,re]=(0,t.useState)(!1);(0,t.useEffect)(()=>{function g(){return Qt(this,null,function*(){const X=yield c({type:"competitions/getList",payload:et(Ae({},e.listParams),{tab_module_type:"competitions"})});X!=null&&X.un_purchased&&c({type:"globalSetting/setActionTabs",payload:{key:"\u91C7\u8D2D\u63D0\u793A"}})})}g()},[]);const be=g=>{e.listParams.keyword=encodeURIComponent(g),e.listParams.page=1,g&&(0,ye.tk)({name:g,copywriting:g,position:"Competition"}),c({type:"competitions/getList",payload:et(Ae({},e.listParams),{edu:U.get("edu")})})},we=[{id:"",name:"\u5168\u90E8"},{id:"nearly_published",name:"\u5373\u5C06\u53D1\u5E03"},{id:"apply",name:"\u6B63\u5728\u62A5\u540D"},{id:"progressing",name:"\u8FDB\u884C\u4E2D"},{id:"ended",name:"\u5F80\u671F\u6BD4\u8D5B"},n.userInfo.user_id!==2&&{id:"mine",name:"\u6211\u7684\u7ADE\u8D5B"},(0,Ee.Ny)()&&{id:"statistics",name:"\u6570\u636E\u7EDF\u8BA1"}],Se=(0,t.useMemo)(()=>{var g;if(((g=e.competitions)==null?void 0:g.length)==0)return;const X=[...e.competitions||[]];return t.createElement(Tt,{list:X})},[e.competitions]);return t.createElement(t.Fragment,null,t.createElement(se.Z,{className:"absolute w-full",style:{top:0,left:0,zIndex:999},title:"\u5728\u7EBF\u7ADE\u8D5B"}),t.createElement("div",{className:"w-full flex justify-center",style:{minHeight:"100vh",flexWrap:"wrap",alignItems:"flex-start",background:`url(${r(57066)}) 0 0 / 100% 100% no-repeat`}},t.createElement(Z.Du,{style:{width:"85%",marginTop:110,height:60,gap:"25px"},DataProps:we,selectValue:R,onChange:({item:g})=>{xe(g==null?void 0:g.id),(g==null?void 0:g.id)!="statistics"&&(e.count=0,e.listParams.page=1,e.listParams.category=g==null?void 0:g.id,c({type:"competitions/getList",payload:Ae({},e.listParams)}))},extra:oe?null:!u.isSaiaDomain&&t.createElement("div",{className:"w-full",style:{position:"relative"}},t.createElement(Z.k8,{style:{width:404},value:e.listParams.keyword,InputProps:{placeholder:"\u8F93\u5165\u7ADE\u8D5B\u540D\u79F0"},onChange:({item:{value:g}})=>{be(g)}}),((E=e.competitions)==null?void 0:E.length)>0&&t.createElement("div",{className:x.sortBtn,onClick:()=>re(!0)},t.createElement("i",{className:"iconfont icon-tiaozhengpaixu2 font14 mr5"}),"\u8C03\u6574\u6392\u5E8F"))}),t.createElement("div",{className:"w-full flex justify-center item-center",style:{minHeight:"52vh"}},!["mine","statistics"].includes(R)&&(s?t.createElement(G.Z,null):((p=e.competitions)==null?void 0:p.length)>0?t.createElement("div",{className:"w-full"}," ",Se," "):t.createElement(ce.Z,{styles:{width:"100%"}})),["mine","join"].includes(e.listParams.category)&&t.createElement(Rt,null),R=="statistics"&&t.createElement("div",{className:x.statisticsWrap}," ",t.createElement(Lt.Z,null)," ")),!["mine","statistics"].includes(R)&&t.createElement("div",{className:"flex item-center"},t.createElement("div",{className:`h-64px flex item-center justify-center current c-white text-20px font-semibold mr30 ${x.NewButton}`,onClick:()=>i(!0)},"\u521B\u5EFA\u7ADE\u8D5B"),t.createElement("div",{className:`h-64px flex item-center justify-center current c-white text-20px font-semibold ${x.NewButton}`,onClick:()=>Q(!0)},"\u8BC1\u4E66\u67E5\u8BE2"))),t.createElement(O,{open:v,onCancel:()=>i(!1)}),t.createElement(_e,{open:f,onCancel:()=>Q(!1)}),t.createElement(kt.Z,{visible:Pe,onCancel:()=>re(!1),onOk:()=>{c({type:"competitions/getList",payload:Ae({},e.listParams)}),re(!1)}}))};var qt=(0,A.connect)(({user:n,competitions:e,globalSetting:u,loading:c})=>({user:n,competitions:e,globalSetting:u,loading:c.models.competitions}))(Xt),el=r(81398);const tl=({globalSetting:n})=>{var e;switch(Number((e=n==null?void 0:n.setting)==null?void 0:e.theme)){case h.Fy.THEMEONE:return t.createElement(qt,null);case h.Fy.DEFAULT:default:return t.createElement(el.Z,null)}};var ll=(0,A.connect)(({globalSetting:n})=>({globalSetting:n}))(tl)},57066:function(te,k,r){te.exports=r.p+"static/general_bg.e2f8a739.png"},12907:function(te,k,r){te.exports=r.p+"static/defheaderbg.64926935.png"}}]);