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

1 line
39 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[81],{"500L":function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));r("DZo9");var n=r("8z0m"),o=(r("+L6B"),r("2/Rp")),a=(r("2qtc"),r("kLXV")),i=r("9og8"),c=r("k1fw"),u=r("oBTY"),l=(r("miYZ"),r("tsqr")),s=r("tJVT"),f=r("q1tI"),h=r.n(f),p=r("m3rI"),m=r("wzkS"),d=r("y5JW");function v(){v=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",m="executing",d="completed",y={};function g(){}function w(){}function b(){}var E={};l(E,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(E=_);var L=b.prototype=g.prototype=Object.create(E);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(L),l(L,u,"Generator"),l(L,i,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function y(t){var e=[];return t&&t.length>0&&(e=t.map((function(t){return{uid:t.id,id:t.id,name:t.title+d["c"]+t.filesize,url:t.url,filesize:t.filesize,status:"done",response:{id:t.id}}}))),e}e["b"]=function(t){var e=t.value,r=t.onChange,y=t.className,g=t.maxSize,w=void 0===g?150:g,b=t.title,E=void 0===b?"\u4e0a\u4f20\u9644\u4ef6":b,x=t.showRemoveModal,_=void 0!==x&&x,L=t.accept,j=void 0===L?"":L,O=t.number,k=void 0===O?1e3:O,N=Object(f["useState"])(!1),S=Object(s["a"])(N,2),I=S[0],P=S[1],T=Object(f["useState"])([]),G=Object(s["a"])(T,2),F=G[0],C=G[1],W={multiple:!0,disabled:I,accept:j,withCredentials:!0,fileList:e,beforeUpload:function(t,e){var r=t.size/1024/1024;return F.concat(e).length>k?(l["b"].error("\u6700\u591a\u53ea\u80fd\u4e0a\u4f20".concat(k,"\u4e2a\u6587\u4ef6")),!1):r<w||(l["b"].error("\u8be5\u6587\u4ef6\u65e0\u6cd5\u4e0a\u4f20\u3002\u8d85\u8fc7\u6587\u4ef6\u5927\u5c0f\u9650\u5236(".concat(w,"MB),\u5efa\u8bae\u4e0a\u4f20\u5230\u767e\u5ea6\u4e91\u7b49\u5176\u5b83\u5171\u4eab\u5de5\u5177\u91cc\uff0c\u7136\u540e\u518dtxt\u6587\u6863\u91cc\u7ed9\u51fa\u94fe\u63a5\u4ee5\u53ca\u5171\u4eab\u5bc6\u7801\u5e76\u4e0a\u4f20")),!1)},action:"".concat(p["a"].API_SERVER,"/api/attachments.json"),onChange:function(t){var e=Object(u["a"])(t.fileList);e.length>=k?P(!0):P(!1),C(Object(u["a"])(e)),e=e.map((function(t){var e,r;(null===t||void 0===t||null===(e=t.response)||void 0===e?void 0:e.id)&&(t.url="/api/attachments/".concat(null===t||void 0===t||null===(r=t.response)||void 0===r?void 0:r.id));return-1===t.name.indexOf(d["c"])&&(t.name="".concat(t.name).concat(d["c"]).concat(Object(d["a"])(t.size))),Object(c["a"])({},t)})),console.log("info:",t),r(e)},onRemove:function(){var t=Object(i["a"])(v().mark((function t(e){var r;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=function(){var t=Object(i["a"])(v().mark((function t(){var r,n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=e.response?e.response.id:e.id,!r){t.next=8;break}return t.next=4,Object(m["d"])(e.response?e.response.id:e.uid);case 4:return n=t.sent,t.abrupt("return",n);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),!_){t.next=5;break}return t.abrupt("return",new Promise((function(t,e){a["a"].confirm({centered:!0,width:530,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u63d0\u793a",content:h.a.createElement("div",{className:"tc font16"},"\u662f\u5426\u786e\u8ba4\u5220\u9664?"),onOk:function(){var e=Object(i["a"])(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:e.sent,l["b"].success("\u5220\u9664\u6210\u529f"),t(!0);case 5:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}(),onCancel:function(){return t(!1)}})})));case 5:return t.next=7,r();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}()};function R(t){t.preventDefault(),t.stopPropagation()}return h.a.createElement("div",{className:"multi-upload ".concat(y||"")},h.a.createElement(n["a"],W,h.a.createElement(o["a"],{disabled:I,type:"primary",ghost:!0},E),h.a.createElement("span",{onClick:R,style:{marginLeft:10}},"(\u5355\u4e2a\u6587\u4ef6\u6700\u5927",w,"M) ")))}},"99tC":function(t,e,r){"use strict";r.r(e);r("+L6B");var n=r("2/Rp"),o=(r("sRBo"),r("kaz8")),a=(r("14J3"),r("BMrR")),i=(r("jCWc"),r("kPKH")),c=(r("giR+"),r("fyUT")),u=(r("5NDa"),r("5rEg")),l=(r("sPJy"),r("bE4q")),s=(r("miYZ"),r("tsqr")),f=r("k1fw"),h=r("9og8"),p=(r("y8nQ"),r("Vl3Y")),m=r("tJVT"),d=r("q1tI"),v=r.n(d),y=r("9kvl"),g=r("55Ip"),w=r("Ot1p"),b=r("XYT7"),E=r("W3jR"),x=r.n(E),_=r("500L");function L(){L=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof y?e:y,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",m="executing",d="completed",v={};function y(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(T([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=y.prototype=Object.create(b);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}var j=function(t){var e,r,E=t.shixunHomeworks,j=(t.newCourse,t.globalSetting),O=t.loading,k=t.dispatch,N=t.match,S=p["a"].useForm(),I=Object(m["a"])(S,1),P=I[0],T=Object(d["useState"])({}),G=Object(m["a"])(T,2),F=G[0],C=G[1],W=Object(d["useState"])(!1),R=Object(m["a"])(W,2),Y=R[0],z=R[1],A=(Object(d["useRef"])(),E.commonHomeWorkEditDefaultData);Object(d["useEffect"])((function(){B()}),[N.params.categoryId]);var B=function(){var t=Object(h["a"])(L().mark((function t(){var e,r;return L().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,k({type:"shixunHomeworks/editCommonHomeWorkDefaultData",payload:Object(f["a"])(Object(f["a"])({},N.params),{},{type:3})});case 2:e=t.sent,e&&(r=Object(f["a"])({attachment_ids:Object(_["a"])(e.attachments),reference_attachment_ids:Object(_["a"])(e.ref_attachments)},e),P.setFieldsValue(Object(f["a"])({},r)),C(Object(f["a"])({},r)),z(!0));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),V=function(){var t=Object(h["a"])(L().mark((function t(e){var r,n,o,a;return L().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(F.min_num>F.max_num)){t.next=3;break}return s["b"].info("\u6700\u5927\u4eba\u6570\u4e0d\u80fd\u5c0f\u4e8e\u6700\u5c0f\u4eba\u6570"),t.abrupt("return");case 3:return r=Object(f["a"])({},F),r.attachment_ids&&(r.attachment_ids=null===r||void 0===r||null===(n=r.attachment_ids)||void 0===n?void 0:n.map((function(t){return t.response.id}))),r.reference_attachment_ids&&(r.reference_attachment_ids=null===r||void 0===r||null===(o=r.reference_attachment_ids)||void 0===o?void 0:o.map((function(t){return t.response.id}))),t.next=8,Object(b["o"])(Object(f["a"])(Object(f["a"])(Object(f["a"])({},N.params),r),{},{type:3}));case 8:a=t.sent,0===(null===a||void 0===a?void 0:a.status)&&y["c"].push("/classrooms/".concat(N.params.coursesId,"/group_homework/").concat(N.params.categoryId,"/detail"));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return v.a.createElement("section",{className:x.a.bg},A.course_name&&v.a.createElement("section",{className:"animated fadeIn"},v.a.createElement("aside",{className:"mt10"},A.category&&v.a.createElement(l["a"],{separator:">"},v.a.createElement(l["a"].Item,null,v.a.createElement(g["Link"],{to:"/classrooms/".concat(A.course_id,"/group_homework")},A.course_name)),v.a.createElement(l["a"].Item,null,v.a.createElement(g["Link"],{to:"/classrooms/".concat(A.course_id,"/group_homework")},A.category.category_name)),v.a.createElement(l["a"].Item,null,"\u7f16\u8f91\u8be6\u60c5")))),v.a.createElement("aside",{className:"font24 bold mt20 mb20"},"\u7f16\u8f91\u5206\u7ec4\u4f5c\u4e1a"),v.a.createElement(p["a"],{form:P,className:x.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){console.log("onchange: ",P.getFieldsValue()),C(Object(f["a"])({},P.getFieldsValue()))},onFinish:V},v.a.createElement("div",{className:x.a.fieldWrap},v.a.createElement(p["a"].Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u6807\u9898"}]},v.a.createElement(u["a"],{maxLength:60,suffix:"".concat((null===(e=F.name)||void 0===e?void 0:e.length)||0,"/60"),placeholder:"\u4f8b\u5982\uff1a\u4ecePython\u7a0b\u5e8f\u8bbe\u8ba1-\u5165\u95e8\u7cbe\u901a"}))),v.a.createElement("div",{className:x.a.mdWrap},v.a.createElement(p["a"].Item,{name:"description",label:"\u7b80\u4ecb:",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u4f5c\u4e1a\u7684\u7b80\u4ecb"},{max:5e3,message:"\u4f5c\u4e1a\u7b80\u4ecb\u6700\u5927\u9650\u52365000\u4e2a\u5b57\u7b26"}]},v.a.createElement(w["a"],{watch:!0,defaultValue:A.description})),v.a.createElement("div",null,v.a.createElement(p["a"].Item,{name:"attachment_ids"},Y&&v.a.createElement(_["b"],null))),v.a.createElement(a["a"],{gutter:[20,20]},v.a.createElement(i["a"],{flex:"230px"},v.a.createElement(p["a"].Item,{name:"min_num",label:"\u5206\u7ec4\u8bbe\u7f6e",rules:[{required:!0,message:"\u8bf7\u586b\u5199\u6bcf\u7ec4\u6700\u5c0f\u4eba\u6570"}]},v.a.createElement(c["a"],{style:{width:200},min:1,placeholder:"\u8bf7\u586b\u5199\u6bcf\u7ec4\u6700\u5c0f\u4eba\u6570"}))),v.a.createElement(i["a"],{flex:"230px"},v.a.createElement(p["a"].Item,{name:"max_num",label:v.a.createElement("div",null,"\xa0"),rules:[{required:!0,message:"\u8bf7\u586b\u5199\u6bcf\u7ec4\u6700\u5927\u4eba\u6570"}]},v.a.createElement(c["a"],{style:{width:200},max:10,placeholder:"\u8bf7\u586b\u5199\u6bcf\u7ec4\u6700\u5927\u4eba\u6570"}))),v.a.createElement(i["a"],null,v.a.createElement("div",{className:"mt30"},"\uff08\u5b66\u751f\u63d0\u4ea4\u4f5c\u54c1\u65f6\u9700\u8981\u5173\u8054\u540c\u7ec4\u6210\u5458\uff0c\u7ec4\u5185\u6210\u5458\u4f5c\u54c1\u5171\u4eab\uff09"))),!(null===j||void 0===j||null===(r=j.setting)||void 0===r?void 0:r.is_local)&&v.a.createElement(a["a"],null,v.a.createElement(i["a"],null,v.a.createElement(p["a"].Item,{name:"base_on_project",valuePropName:"checked"},v.a.createElement(o["a"],{value:!0,defaultChecked:!0},"\u57fa\u4e8e\u9879\u76ee\u5b9e\u65bd")),v.a.createElement("span",{className:"c-light-black"},"\uff08\u9009\u4e2d\uff0c\u5219\u5fc5\u987b\u5728\u672c\u5e73\u53f0\u521b\u5efa\u9879\u76ee\uff0c\u9879\u76ee\u7ba1\u7406\u5458\u53ef\u4ee5\u63d0\u4ea4\u4f5c\u54c1\uff1b\u4e0d\u9009\u4e2d\uff0c\u65e0\u9700\u5728\u5e73\u53f0\u521b\u5efa\u9879\u76ee\uff0c\u4efb\u610f\u5c0f\u7ec4\u6210\u5458\u5747\u53ef\u4ee5\u63d0\u4ea4\u4f5c\u54c1\uff09")))),v.a.createElement("div",{className:x.a.mdWrap},v.a.createElement(p["a"].Item,{name:"reference_answer",label:"\u53c2\u8003\u7b54\u6848:"},v.a.createElement(w["a"],{defaultValue:A.reference_answer,watch:!0})),v.a.createElement("div",null,v.a.createElement(p["a"].Item,{name:"reference_attachment_ids"},Y&&v.a.createElement(_["b"],null)))),v.a.createElement("div",{className:x.a.backgroundFa},v.a.createElement("div",{className:"pt40 mb30"},v.a.createElement(p["a"].Item,null,v.a.createElement(n["a"],{size:"large",type:"primary",className:"".concat(x.a.button," mr20"),htmlType:"submit",loading:O["newCourse/editCourse"]||O["newCourse/submitCourse"]},"\u63d0\u4ea4"),v.a.createElement(n["a"],{size:"large",type:"primary",ghost:!0,className:x.a.button,onClick:function(){return y["c"].push("/classrooms/".concat(N.params.coursesId,"/group_homework"))}},"\u53d6\u6d88"))))))};e["default"]=Object(y["a"])((function(t){var e=t.shixunHomeworks,r=t.newCourse,n=t.loading,o=t.globalSetting;return{shixunHomeworks:e,newCourse:r,globalSetting:o,loading:n.effects}}))(j)},W3jR:function(t,e,r){t.exports={bg:"bg___3idds",flexRow:"flexRow___2J5Em",flexJustifyCenter:"flexJustifyCenter___E5Twu",flexAlignEnd:"flexAlignEnd___1jlWD",flexAlignCenter:"flexAlignCenter___2WvhR",flexColumn:"flexColumn___3LYUh",formWrap:"formWrap___2OBLh",titleWrap:"titleWrap___3ca0Y",fieldWrap:"fieldWrap___2USfO",mdWrap:"mdWrap___2_AYT",backgroundFa:"backgroundFa___3KV9f",button:"button___3doAh"}},wzkS:function(t,e,r){"use strict";r.d(e,"c",(function(){return i})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return u})),r.d(e,"a",(function(){return s})),r.d(e,"e",(function(){return f}));var n=r("9og8"),o=r("ErOA");function a(){a=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",m="suspendedYield",d="executing",v="completed",y={};function g(){}function w(){}function b(){}var E={};s(E,c,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,c)&&(E=_);var L=b.prototype=g.prototype=Object.create(E);function j(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=h(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=p;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?v:m,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},j(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(L),s(L,l,"Generator"),s(L,c,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function i(t){return Object(o["c"])("libraries/".concat(t,".json"))}function c(){return Object(o["c"])("library_tags.json")}function u(t){return l.apply(this,arguments)}function l(){return l=Object(n["a"])(a().mark((function t(e){var r;return a().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(o["b"])("attachments/".concat(e,".json"));case 2:return r=t.sent,t.abrupt("return",0===r.status);case 4:case"end":return t.stop()}}),t)}))),l.apply(this,arguments)}function s(t){return Object(o["f"])("libraries.json",t)}function f(t,e){return Object(o["g"])("libraries/".concat(t,".json"),e)}},y5JW:function(t,e,r){"use strict";r.d(e,"c",(function(){return m})),r.d(e,"a",(function(){return d}));r("DZo9");var n=r("8z0m"),o=(r("+L6B"),r("2/Rp")),a=r("9og8"),i=r("k1fw"),c=r("oBTY"),u=(r("miYZ"),r("tsqr")),l=r("q1tI"),s=r.n(l),f=r("m3rI"),h=r("wzkS");function p(){p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",m="suspendedYield",d="executing",v="completed",y={};function g(){}function w(){}function b(){}var E={};l(E,i,(function(){return this}));var x=Object.getPrototypeOf,_=x&&x(x(T([])));_&&_!==r&&n.call(_,i)&&(E=_);var L=b.prototype=g.prototype=Object.create(E);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:m,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(L),l(L,u,"Generator"),l(L,i,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var m="\u3000\u3000";function d(t){var e=["Bytes","KB","MB","GB","TB"];if(0==t)return"0 Byte";var r=parseInt(""+Math.floor(Math.log(t)/Math.log(1024)),10);return(t/Math.pow(1024,r)).toFixed(1)+" "+e[r]}e["b"]=function(t){var e=t.value,r=void 0===e?[]:e,l=t.onChange,v=t.className,y=t.maxSize,g=void 0===y?150:y,w=t.title,b=void 0===w?"\u6587\u4ef6\u4e0a\u4f20":w,E=t.accept,x=void 0===E?null:E,_={multiple:!1,fileList:r,accept:x,withCredentials:!0,beforeUpload:function(t){var e=t.size/1024/1024;return e<g||(u["b"].error("\u8be5\u6587\u4ef6\u65e0\u6cd5\u4e0a\u4f20\u3002\u8d85\u8fc7\u6587\u4ef6\u5927\u5c0f\u9650\u5236(".concat(g,"MB),\u5efa\u8bae\u4e0a\u4f20\u5230\u767e\u5ea6\u4e91\u7b49\u5176\u5b83\u5171\u4eab\u5de5\u5177\u91cc\uff0c\u7136\u540e\u518dtxt\u6587\u6863\u91cc\u7ed9\u51fa\u94fe\u63a5\u4ee5\u53ca\u5171\u4eab\u5bc6\u7801\u5e76\u4e0a\u4f20")),!1)},action:"".concat(f["a"].API_SERVER,"/api/attachments.json"),onChange:function(t){var e=Object(c["a"])(t.fileList);e=e.map((function(t){return-1===t.name.indexOf(m)&&(t.name="".concat(t.name).concat(m).concat(d(t.size))),Object(i["a"])({},t)})),l(e)},onRemove:function(){var t=Object(a["a"])(p().mark((function t(e){var r,n;return p().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=e.response?e.response.id:e.uid,!r){t.next=8;break}return t.next=4,Object(h["d"])(e.response?e.response.id:e.id);case 4:return n=t.sent,t.abrupt("return",n);case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}()};function L(t){t.preventDefault(),t.stopPropagation()}return s.a.createElement("div",{className:"single-upload ".concat(v||"")},s.a.createElement(n["a"],_,s.a.createElement(o["a"],{type:"primary",title:r.length>0?"\u6bcf\u6b21\u53ea\u80fd\u4e0a\u4f20\u4e00\u4e2a\u8d44\u6e90\uff0c \u5220\u9664\u4e0b\u9762\u8d44\u6e90\u53ef\u91cd\u65b0\u4e0a\u4f20 ":"",disabled:r.length>0,ghost:!0},b),s.a.createElement("span",{onClick:L,style:{marginLeft:10}},"(\u5355\u4e2a\u6587\u4ef6\u6700\u5927",g,"M) ")))}}}]);