"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[86452],{85331:function(e,n,t){t.d(n,{Z:function(){return P}});var i=t(26801),r=t.n(i),a=t(11006),o=t.n(a),l=t(10574),s=t.n(l),d=t(93923),c=t.n(d),u=t(39343),p=t.n(u),f=t(27161),h=t.n(f),g=t(59301),m=t(48826),v=t(8591),x=t(15830),b=t(22211),y="colorBlue___UHzQq",w=t(14642),k=t.n(w),z=t(37712),S=["dispatch","user","setloading","uploading","setmd5List","content","shixunHomeworks","globalSetting"],j=m.Z.Dragger,$=15728640,P=(0,b.connect)((function(e){var n=e.loading,t=e.globalSetting,i=e.user,r=e.shixunHomeworks;return{globalSetting:t,loading:n.models.competitions,user:i,shixunHomeworks:r}}))((function(e){var n=e.dispatch,t=e.user,i=e.setloading,a=e.uploading,l=e.setmd5List,d=e.content,u=e.shixunHomeworks,f=e.globalSetting;h()(e,S);console.log(f,"globalSetting"),(0,g.useEffect)((function(){function e(){return(e=p()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.ZP)((null==f||null===(n=f.setting)||void 0===n?void 0:n.bigfiles_upload)+"/file/filePatchMerge",{method:"post",body:u.actionTabs.params},!0,!0);case 2:"000000"===(t=e.sent).errorCode&&(P[0].file.percent=100,P[0].file.status="success",Z(c()(P)),i(100),v.ZP.info("上传成功"),l(null==t?void 0:t.data));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}"分片专用504"===u.actionTabs.key&&(n({type:"shixunHomeworks/setActionTabs",payload:{key:""}}),function(){e.apply(this,arguments)}())}),[u.actionTabs.key]);var m,b=(0,g.useState)([]),w=o()(b,2),P=w[0],Z=w[1],_=(0,g.useState)(0),M=o()(_,2),C=M[0],B=M[1],I=(0,g.useState)(!1),N=o()(I,2),O=N[0],H=N[1],T={onRemove:function(e){Z(c()(P.filter((function(n){return n.name!==e.name}))))},multiple:!0,fileList:null==P?void 0:P.map((function(e){return e.file})),customRequest:function(){},beforeUpload:(m=p()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=107374182400,!P.filter((function(e){return e.name===n.name})).length){e.next=4;break}return v.ZP.info("".concat(n.name,"已存在,请重新选择")),e.abrupt("return");case 4:if(!((null==n?void 0:n.size)>t)){e.next=7;break}return v.ZP.info("文件超过".concat(t/1024/1024/1024,"GB,不符合上传要求")),e.abrupt("return",!1);case 7:return Z([{name:n.name,file:n}]),e.abrupt("return",!1);case 9:case"end":return e.stop()}}),e)}))),function(e){return m.apply(this,arguments)})};function E(){return(E=p()(s()().mark((function e(n,t){var r,a,o,d,u,p;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=D(n),e.next=3,(0,x.ZP)((null==f||null===(r=f.setting)||void 0===r?void 0:r.bigfiles_upload)+"/file/fileExists",{method:"get",params:{md5:u,size:n.size,dirName:t}},!1,!0);case 3:if(!((null==(p=e.sent)||null===(a=p.data)||void 0===a?void 0:a.length)>0&&1===(null==p||null===(o=p.data)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.type))){e.next=11;break}return i(100),P[0].file.percent=100,P[0].file.status="success",Z(c()(P)),v.ZP.info("上传成功"),l(null==p?void 0:p.data),e.abrupt("return");case 11:if(!(p.data.length>0&&0===p.data[0].type)){e.next=14;break}return L(p.data[0].id,n,t),e.abrupt("return");case 14:(null==p||null===(d=p.data)||void 0===d?void 0:d.length)<=0&&W(u,n,t);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(e,n,t){return G.apply(this,arguments)}function G(){return G=p()(s()().mark((function e(n,t,i){var r,a,o,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.ZP)((null==f||null===(r=f.setting)||void 0===r?void 0:r.bigfiles_upload)+"/file/newFile",{method:"post",body:{name:t.name,md5:n,size:1,oldName:t.name,dirName:i}},!1,!0);case 2:(null==(o=e.sent)||null===(a=o.data)||void 0===a?void 0:a.length)>0&&L(null==o||null===(l=o.data)||void 0===l||null===(l=l[0])||void 0===l?void 0:l.id,t,i);case 4:case"end":return e.stop()}}),e)}))),G.apply(this,arguments)}function D(e){var n=new(k());if(!e.size)return n.appendBinary(e),n.end();if(e.size<2048)for(var t=Math.ceil(e.size/2),i=0;i2048)for(t=Math.ceil(e.size/2e3),i=0;i{const{componentCls:n,sizePaddingEdgeHorizontal:t,colorSplit:i,lineWidth:r,textPaddingInline:a,orientationMargin:o,verticalMarginInline:s}=e;return{[n]:Object.assign(Object.assign({},(0,l.Wf)(e)),{borderBlockStart:`${r}px solid ${i}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${r}px solid ${i}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${n}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${i}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${r}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${n}-with-text-left`]:{"&::before":{width:100*o+"%"},"&::after":{width:100-100*o+"%"}},[`&-horizontal${n}-with-text-right`]:{"&::before":{width:100-100*o+"%"},"&::after":{width:100*o+"%"}},[`${n}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:a},"&-dashed":{background:"none",borderColor:i,borderStyle:"dashed",borderWidth:`${r}px 0 0`},[`&-horizontal${n}-with-text${n}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${n}-dashed`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${n}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${n}-with-text-left${n}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${n}-inner-text`]:{paddingInlineStart:t}},[`&-horizontal${n}-with-text-right${n}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${n}-inner-text`]:{paddingInlineEnd:t}}})}};var u=(0,s.Z)("Divider",(e=>{const n=(0,d.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[c(n)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),p=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{getPrefixCls:n,direction:t,divider:i}=a.useContext(o.E_),{prefixCls:l,type:s="horizontal",orientation:d="center",orientationMargin:c,className:f,rootClassName:h,children:g,dashed:m,plain:v,style:x}=e,b=p(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),y=n("divider",l),[w,k]=u(y),z=d.length>0?`-${d}`:d,S=!!g,j="left"===d&&null!=c,$="right"===d&&null!=c,P=r()(y,null==i?void 0:i.className,k,`${y}-${s}`,{[`${y}-with-text`]:S,[`${y}-with-text${z}`]:S,[`${y}-dashed`]:!!m,[`${y}-plain`]:!!v,[`${y}-rtl`]:"rtl"===t,[`${y}-no-default-orientation-margin-left`]:j,[`${y}-no-default-orientation-margin-right`]:$},f,h),Z=a.useMemo((()=>"number"==typeof c?c:/^\d+$/.test(c)?Number(c):c),[c]),_=Object.assign(Object.assign({},j&&{marginLeft:Z}),$&&{marginRight:Z});return w(a.createElement("div",Object.assign({className:P,style:Object.assign(Object.assign({},null==i?void 0:i.style),x)},b,{role:"separator"}),g&&"vertical"!==s&&a.createElement("span",{className:`${y}-inner-text`,style:_},g)))}}}]);