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__Forums__Detail__id.8c107...

1 line
56 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[125],{"8JLL":function(e,t,r){e.exports={flex_box_center:"flex_box_center___15KPT",flex_space_between:"flex_space_between___1QiSE",flex_box_vertical_center:"flex_box_vertical_center___3bNXy",flex_box_center_end:"flex_box_center_end___1hLE4",flex_box_column:"flex_box_column___3CCm3",reply:"reply___eY1t0",replyList:"replyList___3g6Og",comment:"comment___LHpQl",content:"content___XWl90",commentItem:"commentItem___2Y_u_"}},G8my:function(e,t,r){e.exports={flex:"flex___1FMOA"}},JkjM:function(e,t,r){"use strict";r.r(t);var n=r("9og8"),a=r("PpiC"),o=r("q1tI"),i=r.n(o),c=r("Ty5D"),l=r("9kvl"),u=(r("14J3"),r("BMrR")),s=(r("jCWc"),r("kPKH")),f=(r("+L6B"),r("2/Rp")),h=r("k1fw"),m=r("m3rI"),d=r("LO5M"),p=r.n(d),v=r("h+Ho");function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),c=new I(n||[]);return a(i,"_invoke",{value:k(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",m="suspendedYield",d="executing",p="completed",v={};function g(){}function b(){}function w(){}var E={};u(E,i,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(F([])));x&&x!==r&&n.call(x,i)&&(E=x);var O=w.prototype=g.prototype=Object.create(E);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function k(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===p){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=N(c,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var u=f(t,r,n);if("normal"===u.type){if(a=n.done?p:m,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=p,n.method="throw",n.arg=u.arg)}}}function N(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,N(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function F(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=w,a(O,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=u(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(L.prototype),u(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new L(s(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),u(O,l,"Generator"),u(O,i,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;S(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}var g=function(e){var t,r,o,c,l=e.user,d=e.forumsDetail,g=(e.globalSetting,e.loading,e.dispatch),b=(Object(a["a"])(e,["user","forumsDetail","globalSetting","loading","dispatch"]),d.forumsDetailData||{}),w=b.author_info,E=b.memo,_=b.recommend_shixuns,x=function(){var e=Object(n["a"])(y().mark((function e(){var t;return y().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(null===w||void 0===w?void 0:w.watched)){e.next=6;break}return e.next=3,Object(v["a"])({user_id:w.user_id});case 3:e.t0=e.sent,e.next=9;break;case 6:return e.next=8,Object(v["o"])({user_id:w.user_id});case 8:e.t0=e.sent;case 9:t=e.t0,t&&g({type:"forumsDetail/setForumsDetailData",payload:Object(h["a"])(Object(h["a"])({},d.forumsDetailData),{},{author_info:Object(h["a"])(Object(h["a"])({},w),{},{watched:!(null===w||void 0===w?void 0:w.watched)})})});case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return i.a.createElement("section",{className:p.a.wrap},i.a.createElement("aside",{className:"ml20"},i.a.createElement("div",{className:"bg-white pt40 pb40 pl20 pr20 ".concat(p.a.head)},i.a.createElement("a",{href:"/users/".concat(null===w||void 0===w?void 0:w.login),target:"_blank"},(null===w||void 0===w?void 0:w.image_url)&&i.a.createElement("img",{src:"".concat(m["a"].API_SERVER,"/images/").concat(null===w||void 0===w?void 0:w.image_url)})),i.a.createElement("div",{className:"tc font20"},null===w||void 0===w?void 0:w.username),i.a.createElement("div",{className:"tc c-grey-999"},null===w||void 0===w?void 0:w.identity),(null===(t=l.userInfo)||void 0===t?void 0:t.user_id)!==(null===w||void 0===w?void 0:w.user_id)&&i.a.createElement(u["a"],{justify:"center",className:"mt30 ".concat(p.a.buttonWrap)},i.a.createElement(s["a"],null,i.a.createElement(f["a"],{type:"primary",className:"mr10",onClick:x},(null===w||void 0===w?void 0:w.watched)?"\u53d6\u6d88\u5173\u6ce8":"\u5173\u6ce8")),i.a.createElement(s["a"],null,i.a.createElement(f["a"],{ghost:!0,className:p.a.privateMessage,href:"/messages/".concat(null===(r=l.userInfo)||void 0===r?void 0:r.login,"/message_detail?target_ids=").concat(null===w||void 0===w?void 0:w.user_id),target:"_blank"},"\u79c1\u4fe1")))),!!(null===E||void 0===E||null===(o=E.tag)||void 0===o?void 0:o.length)&&i.a.createElement("div",{className:"bg-white mt10 pt40 pb40 pl20 pr20"},i.a.createElement("div",{className:"font16"},"\u8bdd\u9898\u6807\u7b7e"),i.a.createElement("div",{className:"mt30 ".concat(p.a.tag)},null===E||void 0===E||null===(c=E.tag)||void 0===c?void 0:c.map((function(e){return i.a.createElement("a",null,null===e||void 0===e?void 0:e.name)})))),i.a.createElement("div",{className:"pt10 pb10 pl10 pr10"},i.a.createElement("div",{className:"font16 mb20"},"\u63a8\u8350\u5b9e\u8bad"),i.a.createElement("div",{className:p.a.recommend},null===_||void 0===_?void 0:_.map((function(e){return i.a.createElement("div",{className:p.a.recommendItem},i.a.createElement("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank"},i.a.createElement("img",{alt:e.id,src:"".concat(m["a"].API_SERVER,"/").concat(e.image_url)})),i.a.createElement("div",{className:"".concat(p.a.flex1," ml10")},i.a.createElement("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",title:e.name,className:"".concat(p.a.mWidth147," multi-llipsis1e c-grey-666 mb10")},e.name),i.a.createElement("div",{className:"c-grey-999"},e.myshixuns_count," \u4eba\u5b66\u4e60")))}))))))},b=Object(l["a"])((function(e){var t=e.user,r=e.forumsDetail,n=e.loading,a=e.globalSetting;return{user:t,forumsDetail:r,globalSetting:a,loading:n.models.forumsDetail}}))(g),w=(r("qVdP"),r("jsC+")),E=(r("5Dmo"),r("3S7+")),_=(r("sPJy"),r("bE4q")),x=(r("lUTK"),r("BvKs")),O=(r("5NDa"),r("5rEg")),j=(r("2qtc"),r("kLXV")),L=(r("miYZ"),r("tsqr")),k=r("55Ip"),N=r("wd/R"),D=r.n(N),S=r("9Bee"),I=r("oBTY"),F=r("tJVT"),G=r("Ot1p"),T=r("/MfK"),P=r("8JLL"),C=r.n(P);function Y(){Y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new S(n||[]);return a(i,"_invoke",{value:L(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",m="suspendedYield",d="executing",p="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(I([])));_&&_!==r&&n.call(_,i)&&(w=_);var x=b.prototype=y.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===p){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var u=f(t,r,n);if("normal"===u.type){if(a=n.done?p:m,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=p,n.method="throw",n.arg=u.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=b,a(x,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},O(j.prototype),u(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(s(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function R(e){var t=e.user,r=e.vlist,a=void 0===r?[]:r,o=e.dispatch,c=(e.params,e.id),l=e.memo_replies,f=e.forumsDetail;return i.a.createElement("aside",{className:C.a.comment},a.map((function(e,r){var a,m;return i.a.createElement(u["a"],{key:r,className:C.a.commentItem},i.a.createElement(s["a"],{span:24},i.a.createElement(u["a"],null,i.a.createElement(s["a"],{flex:"1"},i.a.createElement("a",{href:"/users/".concat(e.user_login),target:"_blank",className:"c-light-black"},null===e||void 0===e?void 0:e.username),i.a.createElement("span",{className:"c-light-black ml10"},e.time)),(e.can_delete||e.user_id===(null===(a=t.userInfo)||void 0===a?void 0:a.user_id)||e.user_login===(null===(m=t.userInfo)||void 0===m?void 0:m.login))&&i.a.createElement(s["a"],{className:"forums-comment-delete",style:{display:"none"}},i.a.createElement(E["a"],{title:"\u5220\u9664"},i.a.createElement(T["a"],{className:"current",onClick:function(){j["a"].confirm({centered:!0,width:530,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u63d0\u793a",content:i.a.createElement("div",{className:"font16 tc"},"\u786e\u5b9a\u8981\u5220\u9664\u8be5\u6761\u56de\u590d\u5417\uff1f"),onOk:function(){var t=Object(n["a"])(Y().mark((function t(){var r;return Y().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(v["b"])({id:e.id});case 2:t.sent,r=l.find((function(e){return e.id===c})).children.filter((function(t){return t.id!==e.id})),l.find((function(e){return e.id===c})).children=r,o({type:"forumsDetail/setForumsDetailData",payload:Object(h["a"])(Object(h["a"])({},f.forumsDetailData),{},{memo_replies:Object(I["a"])(l)})});case 6:case"end":return t.stop()}}),t)})));function r(){return t.apply(this,arguments)}return r}()})}}))))),i.a.createElement(s["a"],null,i.a.createElement(S["a"],{value:e.content})))})))}D.a.lang("ZH-cn");var M=R,A=r("1vsH");function V(){V=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new S(n||[]);return a(i,"_invoke",{value:L(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",m="suspendedYield",d="executing",p="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(I([])));_&&_!==r&&n.call(_,i)&&(w=_);var x=b.prototype=y.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===p){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var u=f(t,r,n);if("normal"===u.type){if(a=n.done?p:m,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=p,n.method="throw",n.arg=u.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=b,a(x,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},O(j.prototype),u(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(s(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}D.a.lang("ZH-cn");var H=function(e,t){var r=e.user,l=e.forumsDetail,d=(e.globalSetting,e.loading,e.dispatch),p=e.handleClick,y=(Object(a["a"])(e,["user","forumsDetail","globalSetting","loading","dispatch","handleClick"]),l.forumsDetailData||{}),g=y.memo,b=y.memo_replies,w=Object(c["m"])(),_=Object(o["useState"])(""),x=Object(F["a"])(_,2),O=x[0],j=x[1],k=Object(o["useState"])(""),N=Object(F["a"])(k,2),D=N[0],T=N[1],P=Object(o["useState"])(-1),Y=Object(F["a"])(P,2),R=Y[0],H=Y[1],J=Object(o["useState"])(!1),W=Object(F["a"])(J,2),q=W[0],z=W[1],B=Object(o["useState"])(1),K=Object(F["a"])(B,2),Z=K[0],U=K[1],X=Object(o["useState"])(!1),Q=Object(F["a"])(X,2),$=Q[0],ee=Q[1];Object(o["useImperativeHandle"])(t,(function(){return{onMdFouch:ne}})),Object(o["useEffect"])((function(){z((null===g||void 0===g?void 0:g.replies_count)>10)}),[null===g||void 0===g?void 0:g.replies_count]);var te=function(){var e=Object(n["a"])(V().mark((function e(){var t,r,n;return V().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=Z+1,U(t),e.next=4,Object(v["h"])({id:w.memoId,page:t});case 4:r=e.sent,(null===r||void 0===r?void 0:r.memo_replies)&&(d({type:"forumsDetail/setForumsDetailData",payload:Object(h["a"])(Object(h["a"])({},l.forumsDetailData),{},{memo_replies:[].concat(Object(I["a"])(b),Object(I["a"])(r.memo_replies))})}),z(10===(null===(n=r.memo_replies)||void 0===n?void 0:n.length)));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(e){var t,n,a,o;return Object(h["a"])(Object(h["a"])({},e),{},{image_url:null===(t=r.userInfo)||void 0===t?void 0:t.image_url,children:[],user_id:null===(n=r.userInfo)||void 0===n?void 0:n.user_id,user_login:null===(a=r.userInfo)||void 0===a?void 0:a.login,username:null===(o=r.userInfo)||void 0===o?void 0:o.username,time:"".concat(Object(A["T"])(((new Date).getTime()-new Date(e.created_at).getTime())/1e3),"\u524d")})},ne=function(){ee(!0)};return i.a.createElement("section",{className:C.a.wrap},!!(null===b||void 0===b?void 0:b.length)&&i.a.createElement("aside",{className:C.a.content},i.a.createElement("div",{style:{padding:"10px 15px 5px 15px",justifyContent:"space-between",display:"flex"}},i.a.createElement("span",null,"\u5168\u90e8\u56de\u590d\uff08",g.replies_count,"\uff09")),i.a.createElement("aside",{className:C.a.replyList},null===b||void 0===b?void 0:b.map((function(e,t){var a;return i.a.createElement(u["a"],{gutter:[12,12],key:t},i.a.createElement(s["a"],{flex:"40px"},i.a.createElement("a",{href:"/users/".concat(e.user_login),target:"_blank"},i.a.createElement("img",{alt:"\u7528\u6237\u5934\u50cf",width:"50",height:"50",src:"".concat(m["a"].IMG_SERVER,"/images/").concat(null===e||void 0===e?void 0:e.image_url)}))),i.a.createElement(s["a"],{flex:"1"},i.a.createElement(u["a"],{align:"middle"},i.a.createElement(s["a"],{span:24},i.a.createElement("a",{href:"/users/".concat(e.user_login),target:"_blank"},i.a.createElement("span",{className:"c-light-black"},null===e||void 0===e?void 0:e.username)),i.a.createElement("span",{className:"c-light-black ml10"},e.time)),i.a.createElement(s["a"],{span:24},i.a.createElement("div",{onClick:p},i.a.createElement(S["a"],{value:e.content}))),!!(null===e||void 0===e||null===(a=e.children)||void 0===a?void 0:a.length)&&i.a.createElement(M,{user:r,id:null===e||void 0===e?void 0:e.id,vlist:null===e||void 0===e?void 0:e.children,dispatch:d,params:w,memo_replies:b,forumsDetail:l}),i.a.createElement(s["a"],{span:24,className:"mt5 c-light-black"},R===t?i.a.createElement("aside",null,i.a.createElement(G["a"],{onChange:function(e){T(e)},height:150,isFocus:!0,placeholder:"\u6211\u8981\u56de\u590d..."}),i.a.createElement(u["a"],null,i.a.createElement(s["a"],{span:24,className:"tr"},i.a.createElement(f["a"],{type:"primary",size:"large",onClick:Object(n["a"])(V().mark((function t(){var r;return V().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(""!==D){t.next=4;break}L["b"].error("\u8bf7\u8f93\u5165\u5185\u5bb9"),t.next=9;break;case 4:return t.next=6,Object(v["k"])({parent_id:e.id,content:D});case 6:r=t.sent,T(null),r&&(H(-1),b.find((function(e){return e.id===r.parent_id})).children.push(re(r)),d({type:"forumsDetail/setForumsDetailData",payload:Object(h["a"])(Object(h["a"])({},l.forumsDetailData),{},{memo:Object(h["a"])(Object(h["a"])({},g),{},{replies_count:g.replies_count+1}),memo_replies:Object(I["a"])(b)})}));case 9:case"end":return t.stop()}}),t)})))},"\u53d1\u9001")))):i.a.createElement("div",{className:"tr"},i.a.createElement("span",{className:"iconfont icon-huifu1 mr15 ml30 current",onClick:function(){return H(t)}}),i.a.createElement(E["a"],{title:e.user_praise?"\u53d6\u6d88\u70b9\u8d5e":"\u70b9\u8d5e"},i.a.createElement("span",{className:e.user_praise?"c-orange":"c-gery-888"},i.a.createElement("i",{className:"iconfont icon-dianzan mr3 current",onClick:Object(n["a"])(V().mark((function t(){var r;return V().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(v["i"])({id:e.id,container_type:"Memo",type:e.user_praise?0:1});case 2:r=t.sent,(null===r||void 0===r?void 0:r.praise_count)>=0&&(b.find((function(t){return t.id===e.id})).user_praise=!e.user_praise,b.find((function(t){return t.id===e.id})).praise_count=null===r||void 0===r?void 0:r.praise_count,d({type:"forumsDetail/setForumsDetailData",payload:Object(h["a"])(Object(h["a"])({},l.forumsDetailData),{},{memo_replies:Object(I["a"])(b)})}));case 4:case"end":return t.stop()}}),t)})))}),e.praise_count>0?e.praise_count:"")))))))})))),q&&i.a.createElement("aside",{className:"bg-white pb20",style:{display:"flex",justifyContent:"center"}},i.a.createElement(u["a"],{justify:"space-between"},i.a.createElement(s["a"],null),i.a.createElement(s["a"],null,q&&i.a.createElement("a",{className:"c-black",onClick:te},"\u67e5\u770b\u66f4\u591a\u8bc4\u8bba")))),i.a.createElement("aside",{className:C.a.reply},i.a.createElement(G["a"],{onBlur:function(){return ee(!1)},isFocus:$,defaultValue:O,id:"writeForumsReviewId",onChange:function(e){j(e)},placeholder:"\u6211\u8981\u56de\u590d...",height:240}),i.a.createElement(u["a"],null,i.a.createElement(s["a"],{flex:"1"}),i.a.createElement(s["a"],null,i.a.createElement(f["a"],{type:"primary",size:"large",onClick:Object(n["a"])(V().mark((function e(){var t;return V().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(""!==O){e.next=4;break}L["b"].error("\u8bf7\u8f93\u5165\u5185\u5bb9"),e.next=9;break;case 4:return e.next=6,Object(v["k"])({parent_id:g.id,content:O});case 6:t=e.sent,j(null),t&&d({type:"forumsDetail/setForumsDetailData",payload:Object(h["a"])(Object(h["a"])({},l.forumsDetailData),{},{memo:Object(h["a"])(Object(h["a"])({},g),{},{replies_count:g.replies_count+1}),memo_replies:[re(t)].concat(Object(I["a"])(b))})});case 9:case"end":return e.stop()}}),e)})))},"\u53d1\u9001")))))},J=Object(l["a"])((function(e){var t=e.user,r=e.forumsDetail,n=e.loading,a=e.globalSetting;return{user:t,forumsDetail:r,globalSetting:a,loading:n.models.forumsDetail}}),null,null,{forwardRef:!0})(Object(o["forwardRef"])(H)),W=r("smFo"),q=r.n(W),z=r("RCxd"),B=r("kaH+"),K=r("dhSg");function Z(){Z=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new S(n||[]);return a(i,"_invoke",{value:L(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",m="suspendedYield",d="executing",p="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(I([])));_&&_!==r&&n.call(_,i)&&(w=_);var x=b.prototype=y.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===p){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var u=f(t,r,n);if("normal"===u.type){if(a=n.done?p:m,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=p,n.method="throw",n.arg=u.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=b,a(x,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},O(j.prototype),u(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(s(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}var U={5:"\u6280\u672f\u5206\u4eab",3:"\u64cd\u4f5c\u6307\u5357",16:"\u901a\u77e5\u516c\u544a"},X=function(e){var t,r,c,f,m,d=e.user,p=e.forumsDetail,y=(e.globalSetting,e.loading,e.dispatch),g=(Object(a["a"])(e,["user","forumsDetail","globalSetting","loading","dispatch"]),p.forumsDetailData||{}),b=g.author_info,N=g.memo,I=g.attachments_list,F=Object(o["useRef"])(),G=Object(o["useRef"])(),T=function(){var e=Object(n["a"])(Z().mark((function e(){var t,r;return Z().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t={id:N.id,sticky:N.sticky?0:1},e.next=3,Object(v["m"])(t);case 3:r=e.sent,0===(null===r||void 0===r?void 0:r.status)&&y({type:"forumsDetail/setForumsDetailData",payload:Object(h["a"])(Object(h["a"])({},p.forumsDetailData),{},{memo:Object(h["a"])(Object(h["a"])({},N),{},{sticky:!(null===N||void 0===N?void 0:N.sticky)})})});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=Object(n["a"])(Z().mark((function e(){var t;return Z().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(v["b"])({id:null===N||void 0===N?void 0:N.id});case 2:t=e.sent,0===(null===t||void 0===t?void 0:t.status)&&(L["b"].success("\u5220\u9664\u6210\u529f"),l["c"].push("/forums")),-1===(null===t||void 0===t?void 0:t.status)&&l["c"].push("/forums");case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=Object(n["a"])(Z().mark((function e(){return Z().wrap((function(e){while(1)switch(e.prev=e.next){case 0:j["a"].confirm({centered:!0,width:530,okText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88",title:"\u5956\u52b1\u8bbe\u7f6e",content:i.a.createElement("div",{className:"font14 tc"},i.a.createElement(O["a"],{defaultValue:F.current,onChange:function(e){return F.current=e.target.value}})),onOk:function(){var e=Object(n["a"])(Z().mark((function e(){var t;return Z().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(v["l"])({id:null===N||void 0===N?void 0:N.id,container_type:"Memo",score:F.current?Number(F.current):0,user_id:null===b||void 0===b?void 0:b.user_id});case 2:if(t=e.sent,F.current=null,!((null===t||void 0===t?void 0:t.code)>0)){e.next=8;break}return y({type:"forumsDetail/setForumsDetailData",payload:Object(h["a"])(Object(h["a"])({},p.forumsDetailData),{},{memo:Object(h["a"])(Object(h["a"])({},N),{},{reward:null===t||void 0===t?void 0:t.code})})}),L["b"].success("\u5956\u52b1\u6210\u529f"),e.abrupt("return");case 8:L["b"].success("\u5956\u52b1\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u7cfb\u7edf\u7ba1\u7406\u5458\uff01");case 9:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){G.current.onMdFouch&&G.current.onMdFouch()},R=function(){var e=Object(n["a"])(Z().mark((function e(){var t;return Z().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(v["i"])({id:N.id,container_type:"Memo",type:1});case 2:t=e.sent,(null===t||void 0===t?void 0:t.praise_count)>=0&&y({type:"forumsDetail/setForumsDetailData",payload:Object(h["a"])(Object(h["a"])({},p.forumsDetailData),{},{memo:Object(h["a"])(Object(h["a"])({},N),{},{user_praise:!(null===N||void 0===N?void 0:N.user_praise),memo_praise_count:null===t||void 0===t?void 0:t.praise_count})})});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=i.a.createElement(x["a"],{className:q.a.menu},(null===(t=d.userInfo)||void 0===t?void 0:t.admin)&&(null===N||void 0===N?void 0:N.sticky)&&i.a.createElement(x["a"].Item,null,i.a.createElement("a",{onClick:function(){return T()}},"\u53d6\u6d88\u7f6e\u9876")),(null===(r=d.userInfo)||void 0===r?void 0:r.admin)&&!(null===N||void 0===N?void 0:N.sticky)&&i.a.createElement(x["a"].Item,null,i.a.createElement("a",{onClick:function(){return T()}},"\u7f6e\xa0\xa0\u9876")),i.a.createElement(x["a"].Item,null,i.a.createElement(k["Link"],{to:"/forums/".concat(null===N||void 0===N?void 0:N.id,"/edit")},"\u7f16\xa0\xa0\u8f91")),i.a.createElement(x["a"].Item,null,i.a.createElement("a",{onClick:function(){j["a"].confirm({title:"\u63d0\u793a",icon:i.a.createElement(z["a"],null),content:"\u5e16\u5b50\u5c06\u88ab\u5220\u9664\uff0c\u65e0\u6cd5\u6062\u590d\u3002\u662f\u5426\u786e\u8ba4\u5220\u9664\uff1f",okText:"\u786e\u8ba4",onOk:function(){P()},cancelText:"\u53d6\u6d88"})}},"\u5220\xa0\xa0\u9664"))),A=function(e){var t=e.target,r=t.nodeName,n=t.src;"IMG"===r&&(K["a"].publish("preview-image",n),console.log("src:",n))};return Object(o["useEffect"])((function(){document.body.style.height="100%"}),[]),i.a.createElement("section",{className:q.a.wrap},i.a.createElement(_["a"],{separator:"/",className:"mb5"},i.a.createElement(_["a"].Item,null,i.a.createElement(k["Link"],{to:"/forums/categories/".concat(null===N||void 0===N?void 0:N.forum_id)},U[null===N||void 0===N?void 0:N.forum_id])),i.a.createElement(_["a"].Item,null,"\u8be6\u60c5")),i.a.createElement("header",{className:"bg-white pt40 pb40 pl30 pr30 ".concat(q.a.header)},i.a.createElement(u["a"],{align:"middle"},i.a.createElement(s["a"],{flex:1,className:"font24 mb5"},i.a.createElement("span",{className:q.a.title},null===N||void 0===N?void 0:N.subject),(null===N||void 0===N?void 0:N.sticky)&&i.a.createElement("span",{className:q.a.top},"\u7f6e\u9876"),!!(null===N||void 0===N?void 0:N.reward)&&i.a.createElement(E["a"],{placement:"bottom",title:"\u83b7\u5f97\u5e73\u53f0\u5956\u52b1\u91d1\u5e01\uff1a".concat(null===N||void 0===N?void 0:N.reward)},i.a.createElement("span",{className:"ml10 c-orange-ff7"},i.a.createElement("i",{className:"iconfont icon-gift font16 mr5"}),i.a.createElement("span",{className:"font14"},null===N||void 0===N?void 0:N.reward)))),i.a.createElement(s["a"],null,((null===(c=d.userInfo)||void 0===c?void 0:c.admin)||(null===(f=d.userInfo)||void 0===f?void 0:f.user_id)===(null===b||void 0===b?void 0:b.user_id))&&i.a.createElement(w["a"],{overlay:M},i.a.createElement("i",{className:"fa fa-bars font-16 current c-grey-bcb"})))),i.a.createElement(u["a"],{align:"middle",className:"font14"},i.a.createElement(s["a"],{flex:1,className:"c-grey-999"},i.a.createElement("span",null,D()(null===N||void 0===N?void 0:N.time).fromNow()," \u53d1\u5e03")),i.a.createElement(s["a"],{className:"c-grey-999"},(null===(m=d.userInfo)||void 0===m?void 0:m.admin)&&i.a.createElement(E["a"],{placement:"bottom",title:"\u5e16\u5b50\u5956\u52b1"},i.a.createElement("span",{className:"current pr10 ".concat(q.a.line),onClick:C},i.a.createElement("i",{className:"iconfont icon-jiangli font18 mr5"}))),i.a.createElement("span",{className:"pr10 pl10 ".concat((null===N||void 0===N?void 0:N.replies_count)?q.a.line:"")},i.a.createElement("i",{className:"iconfont icon-liulanyan font18 mr5"}),null===N||void 0===N?void 0:N.viewed_count),!!(null===N||void 0===N?void 0:N.replies_count)&&i.a.createElement(E["a"],{placement:"bottom",title:"\u5199\u8bc4\u8bba"},i.a.createElement("span",{className:"current pl10",onClick:Y},i.a.createElement("i",{className:"iconfont icon-huifu1 font18 mr5"}),null===N||void 0===N?void 0:N.replies_count))))),i.a.createElement("main",{className:"bg-white pt40 pb40 pl40 pr40"},i.a.createElement("div",{onClick:A},i.a.createElement(S["a"],{value:null===N||void 0===N?void 0:N.content})),i.a.createElement("div",{className:"bg-white pl40 pr40 mt40"},i.a.createElement("div",{className:"mt10 mb20 ".concat(q.a.flexCenter)},i.a.createElement("div",{className:"".concat(q.a.like," ").concat((null===N||void 0===N?void 0:N.user_praise)?"":q.a.canLike),onClick:R},i.a.createElement("i",{className:"iconfont icon-dianzan font18"}),i.a.createElement("br",null),i.a.createElement("span",null,null===N||void 0===N?void 0:N.memo_praise_count)))),!!(null===I||void 0===I?void 0:I.length)&&i.a.createElement("div",{className:"mt40"},null===I||void 0===I?void 0:I.map((function(e){return i.a.createElement("div",{className:"c-grey-888 ".concat(q.a.flexCenter)},i.a.createElement("i",{className:"iconfont icon-fujian mr10 font14 c-green-29b"}),i.a.createElement("a",{href:null===e||void 0===e?void 0:e.url,title:null===e||void 0===e?void 0:e.title,className:"".concat(q.a.attachmentName," mr10")},null===e||void 0===e?void 0:e.title),i.a.createElement("span",{className:"font12 c-grey-666 mt3"},null===e||void 0===e?void 0:e.filesize))})))),i.a.createElement(J,{ref:G,handleClick:A}),i.a.createElement(B["a"],null))},Q=Object(l["a"])((function(e){var t=e.user,r=e.forumsDetail,n=e.loading,a=e.globalSetting;return{user:t,forumsDetail:r,globalSetting:a,loading:n.effects}}))(X),$=r("G8my"),ee=r.n($);function te(){te=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new S(n||[]);return a(i,"_invoke",{value:L(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",m="suspendedYield",d="executing",p="completed",v={};function y(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(I([])));_&&_!==r&&n.call(_,i)&&(w=_);var x=b.prototype=y.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===p){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var u=f(t,r,n);if("normal"===u.type){if(a=n.done?p:m,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=p,n.method="throw",n.arg=u.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=b,a(x,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},O(j.prototype),u(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new j(s(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}var re=function(e){e.forumsDetail,e.globalSetting,e.loading;var t=e.dispatch,r=(Object(a["a"])(e,["forumsDetail","globalSetting","loading","dispatch"]),Object(c["m"])());Object(o["useEffect"])((function(){l()}),[r.memoId]);var l=function(){var e=Object(n["a"])(te().mark((function e(){return te().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t({type:"forumsDetail/getForumsDetailData",payload:{id:r.memoId}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return i.a.createElement("section",{className:"edu-container mb20 mt30 ".concat(ee.a.flex)},i.a.createElement(Q,null),i.a.createElement(b,null))};t["default"]=Object(l["a"])((function(e){var t=e.forumsDetail,r=e.loading,n=e.globalSetting;return{forumsDetail:t,globalSetting:n,loading:r.models.forumsDetail}}))(re)},LO5M:function(e,t,r){e.exports={wrap:"wrap___1d4rP",head:"head___1_Uzf",recommendItem:"recommendItem___IStR9",buttonWrap:"buttonWrap___3dpFm",privateMessage:"privateMessage___24GfS",flex1:"flex1___3wIqQ",mWidth147:"mWidth147___3ODny"}},UZu5:function(e,t,r){},"kaH+":function(e,t,r){"use strict";r("+L6B");var n=r("2/Rp"),a=r("tJVT"),o=r("q1tI"),i=r.n(o),c=(r("UZu5"),r("dhSg")),l=r("rLCj"),u=r("dF/Y"),s=r("4i/N");t["a"]=function(){var e=Object(o["useState"])(""),t=Object(a["a"])(e,2),r=t[0],f=t[1],h=Object(o["useState"])(0),m=Object(a["a"])(h,2),d=m[0],p=m[1],v=Object(o["useRef"])("");function y(e){27==e.keyCode&&v.current&&g()}function g(){document.body.style.overflow="auto",f("")}function b(){p(d+90)}return Object(o["useEffect"])((function(){var e=c["a"].subscribe("preview-image",(function(e){f(e),document.body.style.overflow="hidden"}));return e}),[]),Object(o["useEffect"])((function(){return document.addEventListener("keydown",y),function(){document.removeEventListener("keydown",y)}}),[]),Object(o["useEffect"])((function(){v.current=r}),[r]),i.a.createElement(o["Fragment"],null,r?i.a.createElement("div",{className:"image-preview-container"},i.a.createElement("div",{className:"button-group"},i.a.createElement(n["a"],{onClick:b},"\u65cb\u8f6c",i.a.createElement(l["a"],null)),i.a.createElement(n["a"],{href:r},"\u4e0b\u8f7d",i.a.createElement(u["a"],null)),i.a.createElement(n["a"],{onClick:g},"\u5173\u95ed",i.a.createElement(s["a"],null))),i.a.createElement("div",{className:"preview-wrp-group"},i.a.createElement("img",{className:"image-preview",src:r,alt:"\u9884\u89c8\u5927\u56fe",style:{transform:"rotate(".concat(d,"deg)")}}))):null)}},smFo:function(e,t,r){e.exports={wrap:"wrap___1xSvp",header:"header___1niV1",title:"title____shwY",menu:"menu___2Y-rd",top:"top___1_d5Y",line:"line___1kciD",flexCenter:"flexCenter___3bP7s",like:"like___3lXjz",canLike:"canLike___AuDmL",attachmentName:"attachmentName___2SteY"}}}]);