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.
2 lines
32 KiB
2 lines
32 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5687],{76198:function(Be,te,r){r.d(te,{$Y:function(){return Ye},A0:function(){return Fe},EP:function(){return _},F_:function(){return q},G9:function(){return se},GB:function(){return ze},GR:function(){return L},GW:function(){return at},Hp:function(){return l},Ir:function(){return ne},N$:function(){return Me},NZ:function(){return We},Nv:function(){return Xe},OA:function(){return Je},OJ:function(){return _e},QF:function(){return nt},RS:function(){return i},RY:function(){return tt},Rj:function(){return Le},SX:function(){return Ne},Tp:function(){return be},Ui:function(){return xe},V1:function(){return ut},Vn:function(){return W},dL:function(){return Qe},fo:function(){return Ze},gK:function(){return I},hK:function(){return D},i3:function(){return k},ib:function(){return o},lS:function(){return m},m5:function(){return C},n4:function(){return e},n_:function(){return j},oP:function(){return $e},p2:function(){return ke},pl:function(){return E},rM:function(){return w},sM:function(){return Z},t2:function(){return Y},tD:function(){return b},u8:function(){return G},um:function(){return dt},vm:function(){return lt},wQ:function(){return x},wj:function(){return Ue},wt:function(){return Ge},yS:function(){return R},yi:function(){return ue},ym:function(){return Ve},z2:function(){return re}});const e="FETCH_TASK_START",ne="FETCH_TASK_FAILURE",ue="FETCH_TASK_SUCCESS",re="UPDATE_TASK_DATA",_="HIDE_EVALUATE_RESULT",C="SHOW_EVALUATE_RESULT",se="UPDATE_TIMESTRAP",q="MOVE_X",x="MOVE_Y",k="TRIGGER_RIGHT_PANEL_MASK ",j="SET_ACTIVE_INDEX",Z="GET_TASK_LIST",l="SHOW_TASK_LIST",D="HIDE_TASK_LIST",o="SET_TASK_STAR",m="TRIGGER_ENLARGE_UNITY3D ",I="TRIGGER_TAB_FIXED ",L="GET_DISCUSSES",b="SHOW_DISCUSSES_LOADING",G="TOP_OR_DOWN_DISCUSS",w="PLUS_DISCUSS",R="SET_ACTION_TYPE",i="SHOW_REWARD_DIALOG",Y="CANCEL_REWARD_DIALOG",W="SET_REWARD",Ne="ACTIVE_DISCUSS_INDEX",je="CREATE_DISCUSS",Ze="DISABLE_DISCUSS",Ge="SHOW_ANSWER_LOADING",E="FETCH_ANSWER_INFO",We="HIGH_TIP_MODAL",Le="SHOW_TIP_MODAL",Ve="SELECT_UNLOCK_ANSWER",_e="SET_CHOOSE_ANSWERS",Ue="EVAL_CHOOSE_START",ut="EVAL_CHOOSE_END",rt="SHOW_REP_loading",ze="FETCH_REP_CONTENT",Me="EDIT_REP_CONTENT",st="SET_REP_PATH",xe="SHOW_EVALUATE_LOADING",Fe="HIDE_EVALUATE_LOADING",ke="SET_EVALUATE_MESSAGE",at="SET_SHOW_DIR",ot="SET_EDITOR_SETTING",Ye="SET_EDITOR_THEME",be="SET_EDITOR_FONTSIZE",$e="SET_REPOS",ct="SHOW_PATH_LIST",Ke="HIDE_PATH_LIST",Je="HIDE_PICTURE_VIEW",lt="SHOW_PICTURE_VIEW",Qe="SHOW_NOTICE",Xe="HIDE_NOTICE",qe="SET_TAB_INDEX",it="SET_SSH_TABS",Et="SET_SSH_CONFIGDATA",et="SET_SSH_CONFIGDATAARR",tt="SET_VNC_LOADING ",dt="ON_TAB_TO_SPACE ",nt="ON_AUTO_FORMAT "},43386:function(Be,te,r){r.d(te,{KQ:function(){return Z},KY:function(){return q},OY:function(){return C},S8:function(){return se},U_:function(){return j},_Z:function(){return re},ae:function(){return _},o7:function(){return ne},rd:function(){return k},wJ:function(){return ue},wg:function(){return x}});var e=r(76265);function ne(l,D=1){return(0,e.U2)("/discusses.json",{container_type:"Shixun",container_identifier:l,page:D-1})}function ue(l,D){return(0,e.v_)(`/discusses/${l}/top_or_down_discuss.json`,{top:D})}function re(l,D){return(0,e.v_)(`/discusses/${l}/disable_or_open_discuss.json`,{is_disable:!!D})}function _(l,D){return(0,e.v_)(`/discusses/${l}/plus.json`,{container_type:"Discuss",type:D?1:0})}function C(l,D){return(0,e.v_)(`/discusses/${l}/hidden.json`,D)}function se(l,D){return(0,e.v_)(`/discusses/${l}/reward_code.json`,D)}function q(l){return(0,e.ZP)(`/api/discusses/${l}.json`,{method:"delete"})}function x(l,D){return(0,e.v_)(`/discusses/${l}/reply.json`,{container_type:"Shixun",content:D})}function k(l){return(0,e.v_)("/discusses.json",l)}function j(l){return(0,e.v_)("/discusses/ai_reply.json",l)}function Z(l,D){return(0,e.v_)(`/discusses/${l}/turing.json`,D)}},51355:function(Be,te,r){r.d(te,{Z:function(){return re}});var e=r(59301),ne=r(44259),ue=r(13879),re=()=>{const[_,C]=(0,e.useState)(""),[se,q]=(0,e.useState)(0);let[x,k]=(0,e.useState)(),[j,Z]=(0,e.useState)();const[l,D]=(0,e.useState)(!1),o=(0,e.useRef)("");(0,e.useEffect)(()=>ne.Z.subscribe("preview-image",Ne=>{C(Ne),console.log(i.current),document.body.style.overflow="hidden"}),[]),(0,e.useEffect)(()=>(document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}),[]),(0,e.useEffect)(()=>{o.current=_},[_]);function m(W){W.keyCode==27&&o.current&&I()}function I(){document.body.style.overflow="auto",k(void 0),Z(void 0),q(0),C("")}function L(){q(se+90)}function b(){x=i.current.width*1.1,j=i.current.height*1.1,Z(j),k(x)}function G(){x=i.current.width/1.1,j=i.current.height/1.1,Z(j),k(x)}const w=(0,e.useRef)(),R=(0,e.useRef)(),i=(0,e.useRef)(),Y=W=>{(W.nativeEvent.target===w.current||W.nativeEvent.target===R.current)&&I()};return e.createElement(e.Fragment,null,_?e.createElement("div",null,e.createElement("div",{className:"preview-wrp-group",ref:R},e.createElement(ue.Z,{className:"image-preview",src:_,style:{display:"none"},preview:{visible:!0,src:_,movable:!1,onVisibleChange:W=>{C("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},28971:function(Be,te,r){r.d(te,{Z:function(){return l}});var e=r(59301),ne=r(8591),ue=r(6848),re=r(71418),_=r(95237),C=r(43604),se=r(53864),q=r(3113),x=r(94646),k=r(76265),j=r(31272),Z=(o,m,I)=>new Promise((L,b)=>{var G=i=>{try{R(I.next(i))}catch(Y){b(Y)}},w=i=>{try{R(I.throw(i))}catch(Y){b(Y)}},R=i=>i.done?L(i.value):Promise.resolve(i.value).then(G,w);R((I=I.apply(o,m)).next())}),l=({id:o,activeDiscussIndex:m,onReplyDiscuss:I,adminOrOperator:L})=>{const[b,G]=(0,e.useState)(""),[w,R]=(0,e.useState)(!1);function i(W){G(W)}function Y(){if(!b){ne.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}I(o,b),G("")}return(0,e.useEffect)(()=>{m!=o&&R(!1)},[m]),e.createElement("div",{key:o,className:"discuss-item-editor",style:{display:m===o?"block":"none",width:"100%"}},e.createElement(x.Z,{miniToolbar:!0,startInit:m===o,defaultValue:b,id:o,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i,extraUse:L&&e.createElement(ue.Z,{color:"#fff",open:w,destroyTooltipOnHide:!0,title:D({id:o,isOpen:w,activeDiscussIndex:m,onChange:i,setIsOpen:R}),overlayStyle:{maxWidth:600}},e.createElement("a",{title:w?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>R(!w)},e.createElement("i",{className:"iconfont icon-dianzan11"})))}),e.createElement("a",{onClick:Y,className:"btn-send"},"\u53D1\u9001"))};const D=o=>{const[m,I]=(0,e.useState)(!1),[L,b]=(0,e.useState)([]),[G,w]=(0,e.useState)(1);(0,e.useEffect)(()=>{o!=null&&o.isOpen?R():(w(1),b([]))},[o==null?void 0:o.isOpen]);const R=()=>Z(void 0,null,function*(){I(!0);const i=yield(0,k.ZP)(`/api/discusses/${o==null?void 0:o.id}/recommend_answer.json`,{method:"get"});(i==null?void 0:i.status)==0&&b(i==null?void 0:i.answer),I(!1)});return e.createElement(re.Z,{spinning:m},e.createElement("div",{style:{color:"#000"}},e.createElement(j.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(L==null?void 0:L[G-1])||""}),e.createElement(_.Z,{justify:"end",align:"middle"},e.createElement(C.Z,null,e.createElement(se.Z,{simple:!0,current:G,pageSize:1,total:(L==null?void 0:L.length)||0,onChange:i=>{w(i)}})),e.createElement(C.Z,null,e.createElement(q.ZP,{onClick:()=>Z(void 0,null,function*(){o==null||o.onChange(L==null?void 0:L[G-1]),o==null||o.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},95687:function(Be,te,r){r.d(te,{Z:function(){return Mt}});var e=r(59301),ne=r(77353),ue=r(38134),re=r(6629),_=r(43418),C=r(3113),se=r(53864),q=r(26220),x=r(78241),k=r(95237),j=r(43604),Z=r(60324),l=r(56511),D=r(63144),o=r(44259),m=r(43386),I=r(57306),L=Object.defineProperty,b=Object.defineProperties,G=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,Y=(u,t,n)=>t in u?L(u,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[t]=n,W=(u,t)=>{for(var n in t||(t={}))R.call(t,n)&&Y(u,n,t[n]);if(w)for(var n of w(t))i.call(t,n)&&Y(u,n,t[n]);return u},Ne=(u,t)=>b(u,G(t)),je=(u,t,n)=>new Promise((g,O)=>{var P=s=>{try{h(n.next(s))}catch(d){O(d)}},V=s=>{try{h(n.throw(s))}catch(d){O(d)}},h=s=>s.done?g(s.value):Promise.resolve(s.value).then(P,V);h((n=n.apply(u,t)).next())});const Ze=({pathsList:u,dispatch:t})=>{const[n]=x.default.useForm(),[g,O]=(0,e.useState)(),[P,V]=(0,e.useState)(!0),[h,s]=(0,e.useState)(!1),[d,fe]=(0,e.useState)({}),[ae,y]=(0,e.useState)({keyword:d,robot:!0,page:1});(0,e.useEffect)(()=>{o.Z.subscribe("ai-replay-show",K=>{fe(K),s(!0)})},[]),(0,e.useEffect)(()=>{d!=null&&d.id&&U()},[d]);const U=K=>je(void 0,null,function*(){V(!0);const A=yield(0,m.U_)(Ne(W({},ae),{keyword:d==null?void 0:d.content,id:d==null?void 0:d.id}));V(!1),A!=null&&A.data&&(ae.page++,y(W({},ae)),O(A==null?void 0:A.data))}),ge=()=>je(void 0,null,function*(){U()}),M=e.createElement("div",null,e.createElement("img",{src:I.wC,width:150}));return e.createElement(e.Fragment,null,e.createElement(_.default,{title:"\u5176\u4ED6\u56DE\u7B54",mask:!0,open:h,okText:"\u6362\u4E00\u6362",cancelText:"",onOk:ge,width:800,height:500,footer:e.createElement(k.Z,{align:"middle",justify:"center"},e.createElement(j.Z,{className:"tc"},e.createElement(C.ZP,{type:"primary",onClick:U},"\u6362\u4E00\u6362"),e.createElement(Z.Z,{content:M,title:"\u5934\u6B4C\u6559\u5E08\u4EA4\u6D41\u793E\u533A"},e.createElement(C.ZP,{type:"dashed"},"\u4EBA\u5DE5\u670D\u52A1")))),onCancel:()=>{s(!1)}},e.createElement("aside",{style:{minHeight:300}},e.createElement(k.Z,null,e.createElement(l.Z,{loading:P},g==null?void 0:g.map(K=>e.createElement(j.Z,{style:{background:"#e9f3f1",padding:"8px 20px",marginBottom:10,borderRadius:20},span:24},K.text)),!(g!=null&&g.length)&&e.createElement("div",{style:{width:"100%",textAlign:"center"}},e.createElement("br",null),e.createElement("img",{src:I.wC,width:150}),e.createElement("br",null),e.createElement("br",null),"\u5934\u6B4C\u6559\u5E08\u4EA4\u6D41\u793E\u533A"))))))};var Ge=(0,D.connect)(({pathsList:u})=>({pathsList:u}))(Ze),E=r(76198),We=r(46961),Le=r(31272),Ve=r(8591),_e=r(6848),Ue=r(28971),ut=r(51355),rt=r(35099),ze=Object.defineProperty,Me=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,Fe=(u,t,n)=>t in u?ze(u,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[t]=n,ke=(u,t)=>{for(var n in t||(t={}))st.call(t,n)&&Fe(u,n,t[n]);if(Me)for(var n of Me(t))xe.call(t,n)&&Fe(u,n,t[n]);return u};const at=u=>React.createElement("svg",ke({width:10,height:9,xmlns:"http://www.w3.org/2000/svg"},u),React.createElement("title",null,"\u6EE1\u610F"),React.createElement("path",{d:"M10 2.731H5.141V0h-1.96L1.675 2.643H0v6.18h7.865L10 2.732Zm-9.431.487h.836v5.03H.569v-5.03Zm8.626.088L7.463 8.249h-5.49V3.218h.031L3.511.575h1.062v2.73h4.622Z",fill:"#000",fillRule:"nonzero"}));var ot="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgMi43MzFINS4xNDFWMGgtMS45NkwxLjY3NSAyLjY0M0gwdjYuMThoNy44NjVMMTAgMi43MzJabS05LjQzMS40ODdoLjgzNnY1LjAzSC41Njl2LTUuMDNabTguNjI2LjA4OEw3LjQ2MyA4LjI0OWgtNS40OVYzLjIxOGguMDMxTDMuNTExLjU3NWgxLjA2MnYyLjczaDQuNjIyWiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9zdmc+",Ye=Object.defineProperty,be=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,Ke=(u,t,n)=>t in u?Ye(u,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[t]=n,Je=(u,t)=>{for(var n in t||(t={}))$e.call(t,n)&&Ke(u,n,t[n]);if(be)for(var n of be(t))ct.call(t,n)&&Ke(u,n,t[n]);return u};const lt=u=>React.createElement("svg",Je({width:10,height:9,xmlns:"http://www.w3.org/2000/svg"},u),React.createElement("title",null,"\u6EE1\u610F"),React.createElement("path",{d:"M10 2.731H5.141V0h-1.96L1.675 2.643H0v6.18h7.865L10 2.732Zm-9.431.487h.836v5.03H.569v-5.03Zm8.626.088L7.463 8.249h-5.49V3.218h.031L3.511.575h1.062v2.73h4.622Z",fill:"#0152D9",fillRule:"nonzero"}));var Qe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgMi43MzFINS4xNDFWMGgtMS45NkwxLjY3NSAyLjY0M0gwdjYuMThoNy44NjVMMTAgMi43MzJabS05LjQzMS40ODdoLjgzNnY1LjAzSC41Njl2LTUuMDNabTguNjI2LjA4OEw3LjQ2MyA4LjI0OWgtNS40OVYzLjIxOGguMDMxTDMuNTExLjU3NWgxLjA2MnYyLjczaDQuNjIyWiIgZmlsbD0iIzAxNTJEOSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9zdmc+",Xe=Object.defineProperty,qe=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,et=(u,t,n)=>t in u?Xe(u,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[t]=n,tt=(u,t)=>{for(var n in t||(t={}))it.call(t,n)&&et(u,n,t[n]);if(qe)for(var n of qe(t))Et.call(t,n)&&et(u,n,t[n]);return u};const dt=u=>React.createElement("svg",tt({width:10,height:9,xmlns:"http://www.w3.org/2000/svg"},u),React.createElement("title",null,"\u4E0D\u6EE1\u610F"),React.createElement("path",{d:"M7.865 0H0v6.18h1.675l1.506 2.644h1.96V6.092H10L7.865 0ZM.57.575h.836v5.03H.569V.576Zm4.003 4.943v2.73H3.51L2.004 5.607h-.03V.576h5.489l1.732 4.942H4.572Z",fill:"#000",fillRule:"nonzero"}));var nt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy44NjUgMEgwdjYuMThoMS42NzVsMS41MDYgMi42NDRoMS45NlY2LjA5MkgxMEw3Ljg2NSAwWk0uNTcuNTc1aC44MzZ2NS4wM0guNTY5Vi41NzZabTQuMDAzIDQuOTQzdjIuNzNIMy41MUwyLjAwNCA1LjYwN2gtLjAzVi41NzZoNS40ODlsMS43MzIgNC45NDJINC41NzJaIiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",vt=Object.defineProperty,mt=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,ft=(u,t,n)=>t in u?vt(u,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[t]=n,ht=(u,t)=>{for(var n in t||(t={}))Dt.call(t,n)&&ft(u,n,t[n]);if(mt)for(var n of mt(t))gt.call(t,n)&&ft(u,n,t[n]);return u};const Ft=u=>React.createElement("svg",ht({width:10,height:9,xmlns:"http://www.w3.org/2000/svg"},u),React.createElement("title",null,"\u4E0D\u6EE1\u610F"),React.createElement("path",{d:"M7.865 0H0v6.18h1.675l1.506 2.644h1.96V6.092H10L7.865 0ZM.57.575h.836v5.03H.569V.576Zm4.003 4.943v2.73H3.51L2.004 5.607h-.03V.576h5.489l1.732 4.942H4.572Z",fill:"#0152D9",fillRule:"nonzero"}));var yt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy44NjUgMEgwdjYuMThoMS42NzVsMS41MDYgMi42NDRoMS45NlY2LjA5MkgxMEw3Ljg2NSAwWk0uNTcuNTc1aC44MzZ2NS4wM0guNTY5Vi41NzZabTQuMDAzIDQuOTQzdjIuNzNIMy41MUwyLjAwNCA1LjYwN2gtLjAzVi41NzZoNS40ODlsMS43MzIgNC45NDJINC41NzJaIiBmaWxsPSIjMDE1MkQ5IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",At=r(76265),Tt=(u,t,n)=>new Promise((g,O)=>{var P=s=>{try{h(n.next(s))}catch(d){O(d)}},V=s=>{try{h(n.throw(s))}catch(d){O(d)}},h=s=>s.done?g(s.value):Promise.resolve(s.value).then(P,V);h((n=n.apply(u,t)).next())});function Nt({data:u,index:t,adminOrOperator:n,parentDiscussIndex:g,shixunIdentifier:O,user:P,onSetRewardData:V,onSetActionType:h,onHandleSubmitDiscusses:s,onTopOrDownDiscuss:d,handleChildrenPlus:fe,anserAuthor:ae,onPlus:y,onHandleRepaly:U,userInfomation:ge}){const{author:M,can_delete:K,content:A,hidden:oe,id:S,reward:J,time:ce,reply_status:T,user_praise:Q,praise_count:pe}=u,[z,N]=(0,e.useState)(!1),[Se,le]=(0,e.useState)(!1),[ve,he]=(0,e.useState)(!1),[ye,X]=(0,e.useState)(!1),ie=()=>{z&&s(S,{reply_status:2})},He=()=>{Se&&s(S,{reply_status:3})},De=()=>{s(S,{reply_status:1})},Ae=()=>{s(S,{reply_status:4})},Ie=()=>{switch(T){case 0:return e.createElement(e.Fragment,null,e.createElement("div",{style:{whiteSpace:"nowrap"},onClick:De,className:`whether-satisfied ${ve?"cursorPoint blue-text-color":""}`,onMouseEnter:()=>{he(!0)},onMouseLeave:()=>{he(!1)}},e.createElement("img",{src:ve?Qe:ot,className:"whether-img SVGColor"}),"\u6EE1\u610F"),e.createElement(Z.Z,{placement:"bottomLeft",content:e.createElement("div",{className:"content"},e.createElement("div",{className:"content-disappoint"},"\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5:"),e.createElement("div",{className:`radius-box marg15 height30-line black6c-optcity ${z?"blue-background cursorPoint blue-background-write":"gray-background"}`,onMouseEnter:()=>{N(!0)},onMouseLeave:()=>{N(!1)},onClick:ie},"\u8BF7",M==null?void 0:M.name.trim(),"\u8001\u5E08\u518D\u5C1D\u8BD5\u56DE\u7B54\u4E00\u6B21\u3002"),e.createElement("div",{className:`radius-box marg15 height30-line black6c-optcity ${Se?"blue-background cursorPoint blue-background-write":"gray-background"}`,onMouseEnter:()=>{le(!0)},onMouseLeave:()=>{le(!1)},onClick:He},"\u53EF\u80FD\u542F\u7528\u4E86\u673A\u5668\u4EBA\uFF0C\u8BF7\u5176\u4ED6\u8001\u5E08\u56DE\u7B54\u3002")),trigger:"click"},e.createElement("div",{style:{whiteSpace:"nowrap"},className:`whether-satisfied ${ye?"cursorPoint blue-text-color":""}`,onMouseEnter:()=>{X(!0)},onMouseLeave:()=>{X(!1)}},e.createElement("img",{src:ye?yt:nt,className:"whether-img SVGColor"}),"\u4E0D\u6EE1\u610F")));case 1:return e.createElement("div",{style:{whiteSpace:"nowrap"},className:`radius-box cursorPoint height30 ${t>0?"gray-background":"blue-background"}`,onClick:Ae},"\u6211\u5F88\u6EE1\u610F");case 2:return e.createElement("div",{style:{whiteSpace:"nowrap"},className:`radius-box height30 ${t>0?"gray-background":"blue-background"}`},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 3:return e.createElement("div",{style:{whiteSpace:"nowrap"},className:`radius-box height30 ${t>0?"gray-background":"blue-background"}`},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u5176\u4ED6\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 4:return e.createElement("div",{style:{whiteSpace:"nowrap"},className:`radius-box height30 ${t>0?"gray-background":"blue-background"}`},"\u6211\u5F88\u6EE1\u610F");default:return e.createElement(e.Fragment,null)}};function Oe(){V({id:S,index:t,user_id:M.user_id,parentDiscussIndex:g})}function Ce(){h({id:S,index:t,params:{hidden:oe?"0":"1",container_identifier:O},type:"hidden-discuss",parentDiscussIndex:g,message:oe?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function we(){h({id:S,index:t,type:"delete-discuss",parentDiscussIndex:g,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Te=()=>{U(S,!Q,g,t)},Re=n||K||M.user_id===P.user_id||M.login===P.login,Ee=(0,D.useLocation)().pathname.split("/")[1]==="tasks";return e.createElement(e.Fragment,null,e.createElement("div",{className:"second-level-discuss"},e.createElement("div",{className:"discuss-info-body"},e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${M.login}`,target:"_blank"},M.name),e.createElement("span",{className:"grey"},ce),J?e.createElement("a",{className:"c-orange gift",title:`\u5DF2\u5956\u52B1\u91D1\u5E01${J}`},e.createElement("i",{className:"iconfont icon-gift c-orange "}),e.createElement("span",null,J)):null)),e.createElement(Le.Z,{className:`discuss-content ${t>0?"content-gray":""}`,value:A})),Ee&&e.createElement("div",{className:"btn-group-succes"},e.createElement("div",{className:"btn-group-gratify"},Ie()),e.createElement("div",{className:"btn-group-other"},e.createElement("div",{className:"discuss-info-body"},e.createElement("div",{className:"btn-group"},n&&e.createElement("a",{onClick:()=>Tt(this,null,function*(){const c=yield(0,At.ZP)(`/api/discusses/${u.id}/update_faq_data.json`,{method:"get"});(c==null?void 0:c.status)==0&&Ve.ZP.success("\u6DFB\u52A0\u6210\u529F")})},"\u52A0\u5165\u5E38\u89C1\u95EE\u9898\u5E93"),P.identity===1?e.createElement("a",{onClick:Oe,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},e.createElement("i",{className:"iconfont icon-jiangli"})):null,n?e.createElement("a",{onClick:Ce,title:oe?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},e.createElement("i",{className:oe?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Re?e.createElement("a",{onClick:we,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null,e.createElement("a",{onClick:Te,className:Q?"c-orange":""},e.createElement("i",{className:Q?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),e.createElement("span",null,pe||"")))))))}var _t=({data:u,index:t,shixunIdentifier:n,adminOrOperator:g,identity:O,onTopOrDownDiscuss:P,onPlusDiscuss:V,onDisableDiscuss:h,onSetActionType:s,onSetRewardData:d,user:fe,activeDiscussIndex:ae,onReplyDiscuss:y,onSetActiveDiscussIndex:U,allowDisableDiscuss:ge,onHandleSubmitDiscusses:M,onHandleRepaly:K,userInfomation:A})=>{const{content:oe,children:S,game_url:J,hidden:ce,id:T,position:Q,praise_count:pe,reward:z,sticky:N,time:Se,user_praise:le,game_passed:ve,ai_reply_text:he,ai_reply_flag:ye,author:X,disable_discuss_status:ie,reply_status:He}=u,[De,Ae]=(0,e.useState)(!1);(0,e.useEffect)(()=>{De&&setTimeout(()=>Ae(!1),800)},[De]);function Ie(){var de;if(!((de=(0,rt.eY)())!=null&&de.authentication)){_.default.confirm({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u9700\u8981\u901A\u8FC7\u5B9E\u540D\u9A8C\u8BC1\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u8BC4\u8BBA\u64CD\u4F5C",okText:"\u524D\u5F80\u5B9E\u540D\u9A8C\u8BC1",cancelText:"\u53D6\u6D88",onOk:()=>{window.open("/account/certification")}});return}console.log(T,"idi---------------------------"),U(T)}function Oe(){P(T,!N,t)}function Ce(){V(T,!le,t)}function we(){d({id:T,index:t,user_id:X.user_id})}function Te(){s({id:T,index:t,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Re(){s({id:T,index:t,params:{hidden:ce?"0":"1",container_identifier:n},type:"hidden-discuss",message:ce?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function Ee(){h(T,ie===0?2:0,t)}const c=de=>{let{nodeName:Pe,src:a}=de.target;Pe==="IMG"&&(o.Z.publish("preview-image",a),console.log("src:",a))};return e.createElement("div",{className:"discuss-item-container",key:T},e.createElement("a",{href:`/users/${X.login}`,target:"_blank"},e.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",src:`${We.Z.IMG_SERVER}/images/${X.image_url}`,width:"50"})),e.createElement("section",null,e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${X.login}`,target:"_blank"},X.name),e.createElement("span",{className:"grey"},Se),Q?e.createElement("span",{className:"c-green"}," [\u7B2C",Q,"\u5173] "):null,J?e.createElement("a",{href:J,target:"_blank",className:"view-code",title:"\u70B9\u51FB\u67E5\u770BTA\u7684\u4EE3\u7801\u9875\u9762"},"\u67E5\u770B"):null,ge&&e.createElement(e.Fragment,null,ie===0&&e.createElement(_e.Z,{title:"\u7981\u6B62\u8BE5\u7528\u6237\u5728\u6B64\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},e.createElement("span",{onClick:Ee,className:"c-red current"},"\u7981\u6B62\u8BC4\u8BBA\u529F\u80FD")),ie===2&&e.createElement(_e.Z,{title:"\u6062\u590D\u8BE5\u7528\u6237\u5728\u6B64\u5B9E\u8DF5\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},e.createElement("span",{onClick:Ee,className:"c-light-primary current"},"\u6062\u590D\u8BC4\u8BBA\u529F\u80FD")),ie===1&&e.createElement(_e.Z,{title:"\u8BE5\u7528\u6237\u5DF2\u88AB\u7CFB\u7EDF\u7BA1\u7406\u5458\u7981\u8A00"},e.createElement("span",{className:"c-red"},"\u88AB\u7BA1\u7406\u5458\u7981\u6B62\u8BC4\u8BBA"))),N?e.createElement("span",{className:"top"},"\u7F6E\u9876"):null,z?e.createElement("a",{className:"c-orange gift",title:`\u5DF2\u5956\u52B1\u91D1\u5E01${z}`},e.createElement("i",{className:"iconfont icon-gift c-orange "}),e.createElement("span",null,z)):null,O<=5?e.createElement("span",{style:{flex:"1",textAlign:"right",color:ve===1?"#29bd8b":""}},ve===1?"\u5DF2\u901A\u5173":"\u672A\u901A\u5173"):null),e.createElement("div",{onClick:c},e.createElement(Le.Z,{className:"discuss-content",value:oe})),ye&&e.createElement("div",{style:{padding:10,borderRadius:4,background:"#f4f4f4"}},e.createElement("br",null),e.createElement("div",{style:{padding:"6px 0"}},he),e.createElement(C.ZP,{style:{background:"#d1e5f9",borderRadius:25,border:"none",display:"inline-flex",justifyItems:"center",alignItems:"center"},onClick:()=>Ae(!0),className:"mr10 mr5 relative c-blue"},e.createElement("span",{className:De?"plus-one-animate":"hide",style:{position:"absolute"}}," ","+1"),e.createElement("span",{className:"c-blue icon-duiwoyouyong mr5"}),e.createElement("span",{className:"c-blue"},"\u5BF9\u6211\u6709\u7528")),e.createElement("span",{className:"c-orange current",onClick:()=>{o.Z.publish("ai-replay-show",{content:oe,id:T})}},"\u5176\u4ED6\u56DE\u7B54")),S&&S.length>0?e.createElement("div",{className:"reply-discuss-containerActive",onClick:c},S.map((de,Pe)=>e.createElement(Nt,{key:de.id,data:de,index:Pe,userInfomation:A,onTopOrDownDiscuss:P,shixunIdentifier:n,onHandleSubmitDiscusses:M,adminOrOperator:g,user:fe,onSetRewardData:d,onSetActionType:s,parentDiscussIndex:t,anserAuthor:X,onHandleRepaly:K}))):null,e.createElement("div",{className:"btn-group"},e.createElement("div",{className:"btn-group-other"},fe.identity===1?e.createElement("a",{onClick:we,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},e.createElement("i",{className:"iconfont icon-jiangli"})):null,g?e.createElement("a",{onClick:Re,title:ce?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},e.createElement("i",{className:ce?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,O<=5?e.createElement("a",{onClick:Oe,className:N?"btn-top":"btn-down",title:N?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"},e.createElement("i",{className:"iconfont icon-zhiding1 "})):null,g&&(!S||S.length==0)?e.createElement("a",{onClick:Te,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null,e.createElement("a",{onClick:Ie,title:"\u56DE\u590D"},e.createElement("i",{className:"iconfont icon-huifu1"})),e.createElement("a",{onClick:Ce,className:le?"c-orange":""},e.createElement("i",{className:le?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),e.createElement("span",null,pe||"")))),e.createElement(Ue.Z,{id:T,activeDiscussIndex:ae,onReplyDiscuss:y,adminOrOperator:g})))},It=r(15826),Ot=Object.defineProperty,Ct=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,St=(u,t,n)=>t in u?Ot(u,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[t]=n,p=(u,t)=>{for(var n in t||(t={}))Rt.call(t,n)&&St(u,n,t[n]);if(pt)for(var n of pt(t))Pt.call(t,n)&&St(u,n,t[n]);return u},$=(u,t)=>Ct(u,wt(t)),ee=(u,t,n)=>new Promise((g,O)=>{var P=s=>{try{h(n.next(s))}catch(d){O(d)}},V=s=>{try{h(n.throw(s))}catch(d){O(d)}},h=s=>s.done?g(s.value):Promise.resolve(s.value).then(P,V);h((n=n.apply(u,t)).next())});const Bt={showRewardDialog:!1,data:null,page:1,loading:!1,actionType:null,activeDiscussIndex:null};function Lt(u,t){switch(t.type){case E.tD:return $(p({},u),{loading:!0});case E.RS:return $(p({},u),{showRewardDialog:!0});case E.t2:return $(p({},u),{showRewardDialog:!1});case E.GR:return p(p({},u),t.payload);case E.u8:return p(p({},u),t.payload);case E.rM:return p(p({},u),t.payload);case E.fo:return p(p({},u),t.payload);case E.yS:return p(p({},u),t.payload);case E.Vn:return p(p({},u),t.payload);case E.SX:return p(p({},u),t.payload);default:throw new Error}}var Mt=({shixunIdentifier:u,identity:t,activeIndex:n,user:g,allowDisableDiscuss:O,userInfo:P,isShixunDetail:V=!1,taskData:h,chatgpt:s,to_user_id:d,challengeId:fe})=>{const[ae,y]=(0,e.useReducer)(Lt,Bt),[U,ge]=(0,e.useState)(!0),[M,K]=(0,e.useState)(null),{page:A,loading:oe,data:S,actionType:J,showRewardDialog:ce,activeDiscussIndex:T}=ae,Q=(0,e.useRef)(),pe=(0,e.useRef)(),z=(0,e.useRef)();function N(a,f){return ee(this,null,function*(){if(!oe)try{y({type:E.tD});const v=yield(0,m.o7)(u,a);console.log("activeDiscussIndex",T),y({type:E.GR,payload:{activeDiscussIndex:f?T:null,page:a,data:v,loading:!1}})}catch(v){console.log(v)}})}(0,e.useEffect)(()=>{if(n===3&&s)clearInterval(z.current),z.current=setInterval(()=>{N(A,!0)},5e3);else return console.log("\u6E05\u9664\u5B9A\u65F6\u5668"),()=>{clearInterval(z.current)};return()=>{clearInterval(z.current)}},[s,n,T]),(0,e.useEffect)(()=>(U||(clearInterval(M),K(setInterval(()=>{N(A,!0)},5e3))),()=>{clearInterval(M)}),[U,A,T]);function Se(a){N(a)}function le(a,f,v){return ee(this,null,function*(){try{const B=yield(0,m.ae)(a,f);c[v].user_praise=f,c[v].praise_count=B.praise_count,y({type:E.rM,payload:{data:$(p({},S),{comments:c})}})}catch(B){console.log(B)}})}function ve(a,f,v,B){return ee(this,null,function*(){try{const F=yield(0,m.ae)(a,f);c[v].children[B].user_praise=f,c[v].children[B].praise_count=F.praise_count,y({type:E.rM,payload:{data:$(p({},S),{comments:c})}})}catch(F){console.log(F)}})}function he(a,f,v){return ee(this,null,function*(){try{if((yield(0,m._Z)(a,f)).status!==0)return;const F=c[v].author.user_id,H=c.map(me=>me.author.user_id===F?$(p({},me),{disable_discuss_status:f}):me);y({type:E.fo,payload:{data:$(p({},S),{comments:H})}})}catch(B){console.log(B)}})}function ye(a,f,v){return ee(this,null,function*(){try{yield(0,m.wJ)(a,f),c[v].sticky=f,y({type:E.u8,payload:{data:$(p({},S),{comments:c})}}),N(ae.page)}catch(B){console.log(B)}})}function X(){y({type:E.yS,payload:{actionType:null}})}function ie(){return ee(this,null,function*(){const{id:a,params:f,type:v,index:B,parentDiscussIndex:F}=J;if(v==="hidden-discuss"&&(yield(0,m.OY)(a,f),F?c[F].children[B].hidden=f.hidden==1:c[B].hidden=f.hidden==1,y({type:E.yS,payload:{actionType:null,data:$(p({},S),{comments:c})}})),v==="delete-discuss"){if(yield(0,m.KY)(a),F||F===0){let H=c[F].children;for(let me=H.length-1;me>=0;me--)if(H[me].id===a){H.splice(me,1);break}c[F].children=H}else for(let H=c.length-1;H>=0;H--)if(c[H].id===a){c.splice(H,1);break}y({type:E.yS,payload:{actionType:null,data:$(p({},S),{comments:c})}})}})}function He(a){y({type:E.yS,payload:{actionType:a}})}function De(){y({type:E.t2})}function Ae(){return ee(this,null,function*(){const{id:a,index:f,score:v,user_id:B,parentDiscussIndex:F}=Q.current,H=yield(0,m.S8)(a,{container_type:"Discusses",score:v,user_id:B});F?c[F].children[f].reward=H.code:c[f].reward=H.code,y({type:E.Vn,payload:{showRewardDialog:!1,data:$(p({},S),{comments:c})}}),Q.current=null})}function Ie(a){Q.current=a,y({type:E.RS})}function Oe(a){Q.current.score=a}function Ce(a,f){return ee(this,null,function*(){try{if((yield(0,m.wg)(a,f)).status===-3){_.default.info({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u4F60\u7684\u8D26\u53F7\u56E0\u4E3A\u53D1\u5E03\u4E86\u4E0D\u5F53\u5185\u5BB9\uFF0C\u73B0\u5DF2\u5C06\u8BC4\u8BBA\u529F\u80FD\u5C4F\u853D\u3002",okText:"\u786E\u5B9A"}),Te(null);return}N(A)}catch(v){console.log(v)}})}function we(a,f){return ee(this,null,function*(){try{const{status:v}=yield(0,m.KQ)(a,f);if(v!==1)return;N(A)}catch(v){console.log(v)}})}function Te(a){y(T===a?{type:E.SX,payload:{activeDiscussIndex:null}}:{type:E.SX,payload:{activeDiscussIndex:a}})}if((0,e.useEffect)(()=>{function a(){return ee(this,null,function*(){n===3&&!S&&u&&(yield N(A))})}a()},[u,n,A,y]),(0,e.useEffect)(()=>o.Z.subscribe("create-discuss",()=>{clearInterval(z.current),N(A),s&&(z.current=setInterval(()=>{N(A)},5e3))}),[u]),!S)return e.createElement(ne.Z,null);const Re=()=>{ge(!U),U?K(setInterval(()=>{N(A,!0)},5e3)):clearInterval(M)},{disscuss_count:Ee,comments:c,all:de,can_hidden:Pe}=S;return console.log(d,"to_user_id"),e.createElement(e.Fragment,null,e.createElement("div",{className:"discuss-container",ref:pe},s&&e.createElement(C.ZP,{type:"primary",style:{float:"right",marginBottom:10},onClick:()=>{(0,It.xg)(`/chatgpt?id=${d}&position=${fe}`)}},"\u8FDB\u5165\u5386\u53F2\u95EE\u7B54"),(h==null?void 0:h.myshixun_manager)&&!s&&e.createElement(C.ZP,{style:{float:"right",marginBottom:10},type:"primary",onClick:Re},U?"\u5F00\u542F\u5B9E\u65F6\u5237\u65B0":"\u505C\u6B62\u5B9E\u65F6\u5237\u65B0"),Ee===0?e.createElement(re.Z,{styles:{clear:"both"}}):null,c.map((a,f)=>e.createElement(_t,{user:g,key:a.id,userInfomation:P,data:a,index:f,identity:t,onPaginationChange:Se,shixunIdentifier:u,onSetActionType:He,onTopOrDownDiscuss:ye,adminOrOperator:Pe,onPlusDiscuss:le,onDisableDiscuss:he,onSetRewardData:Ie,activeDiscussIndex:T,onHandleSubmitDiscusses:we,onSetActiveDiscussIndex:Te,onReplyDiscuss:Ce,allowDisableDiscuss:O,onHandleRepaly:ve})),Ee>10?e.createElement("div",{className:"pagination-container"},e.createElement(se.Z,{showQuickJumper:!0,showSizeChanger:!1,onChange:Se,current:A,total:Ee})):null,e.createElement(Ge,null)),e.createElement(ue.Z,null,e.createElement(_.default,{centered:!0,title:"\u63D0\u793A",open:!!J,onOk:ie,onCancel:X},e.createElement("p",null,J?J.message:"")),e.createElement(_.default,{centered:!0,width:400,title:"\u5956\u52B1\u8BBE\u7F6E",open:ce,onCancel:De,onOk:Ae},e.createElement(q.Z,{placeholder:"\u8BF7\u8F93\u5165\u5956\u52B1\u7684\u91D1\u5E01\u6570\u91CF",min:1,onChange:Oe,style:{width:"228px"}}))))}}}]);
|