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

2 lines
108 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7460],{39809:function(Je,fe){fe.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},49924:function(){},46460:function(Je,fe,m){m.d(fe,{Z:function(){return F}});var e=m(85504),je={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},te=m(59301),F=({message:Y,className:Q,children:pe,style:J={}})=>te.createElement("div",{className:`custom-spinner ${je.idsRingWrapper} ${Q}`},te.createElement("div",{className:je.ldsRing},te.createElement("div",null),te.createElement("div",null),te.createElement("div",null),te.createElement("div",null)),Y?te.createElement("p",{style:J},Y):null,pe,te.createElement(e.Outlet,null))},28940:function(Je,fe,m){m.r(fe),m.d(fe,{default:function(){return cu}});var e=m(59301),je=m(87947),te=m(45918),F=m(85504),Y=m(11108),Q=m(43418),pe=m(71418),J=m(8591),Me=m(57809),L=m(48102),G=m(89344),$=m(40607),re=m(58982),Pe=m(43428),ce=m(81459),se=m(78780),ye=m(87466),ze=m(5703),ne=m(59301),Fe=Object.defineProperty,mt=Object.defineProperties,Et=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,M=(t,n,l)=>n in t?Fe(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Ge=(t,n)=>{for(var l in n||(n={}))gt.call(n,l)&&M(t,l,n[l]);if(tt)for(var l of tt(n))h.call(n,l)&&M(t,l,n[l]);return t},nt=(t,n)=>mt(t,Et(n));const Cn={theme:(0,ye.G)("cmCodeMode","vs-dark"),fontSize:(0,ye.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,ye.G)("cmTabToSpace",!0)};var An=(t=>(t[t.set_font_size=0]="set_font_size",t[t.set_theme=1]="set_theme",t[t.on_tab_to_space=2]="on_tab_to_space",t[t.set_show_editor_setting=3]="set_show_editor_setting",t))(An||{});function On(t,n){switch(n.type){case 3:return nt(Ge({},t),{showEditorSetting:n.payload});case 1:return nt(Ge({},t),{theme:n.payload});case 0:return nt(Ge({},t),{fontSize:n.payload});case 2:return nt(Ge({},t),{tabToSpace:n.payload});default:throw new Error}}var Tn=({isLoading:t,value:n,onChange:l,language:d,onUpdateCode:o,ActionBarRender:u=r=>ne.createElement(bn,{onShowCodeSetting:r})})=>{const[r,a]=(0,e.useReducer)(On,Cn),{theme:i,fontSize:c,showEditorSetting:N,tabToSpace:v}=r,x=(0,e.useRef)(),g=(0,e.useRef)(),w={onFontSizeChange:C=>{a({type:0,payload:C}),(0,ye.t)("cmFontSize",C)},tabToSpace:v,cmFontSize:c,className:"oj",cmCodeMode:i,onTabToSpace:C=>{a({type:2,payload:C}),(0,ye.t)("cmTabToSpace",C)},onCodeModeChange:C=>{a({type:1,payload:C}),(0,ye.t)("cmCodeMode",C)}};function f(){a({type:3,payload:!1})}function R(){a({type:3,payload:!0})}const I={value:n,language:d,theme:i,height:"calc(100% - 56px)",options:{fontSize:c,insertSpaces:v},onChange:C=>{l(C),g.current=C,clearTimeout(x.current),x.current=setTimeout(()=>{o(g.current)},1e4)},onEditBlur:C=>{g.current&&o(g.current)}};return ne.createElement(e.Fragment,null,ne.createElement("div",{className:"code-panel-container"},u(R),!t&&ne.createElement(ce.ZP,Ge({},I))),ne.createElement(se.Z,null,ne.createElement(Pe.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:N,onClose:f},ne.createElement(ze.Z,Ge({},w)))))};function bn({onShowCodeSetting:t}){return ne.createElement("div",{className:"action-bar"},ne.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),ne.createElement("a",{onClick:t},ne.createElement("i",{className:"iconfont icon-shezhi"})))}var Ne=m(24334),lt=m(39809),vt=m(41859),at=m(92832),Be=m(78700),de=m(3113);const{TextArea:Pn}=at.default,jt=5e3;var zn=({callback:t,onCancel:n,notes:l})=>{function d(o){t(o)}return e.createElement(Be.default,{className:"note-form-panel",onFinish:d,initialValues:{notes:l}},e.createElement(Be.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:jt,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${jt}`}]},e.createElement(Pn,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),e.createElement(Be.default.Item,{style:{textAlign:"right"}},e.createElement(de.ZP,{type:"ghost",onClick:n,style:{marginRight:10}}," \u53D6\u6D88 "),e.createElement(de.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},le={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},ft={pagination:"pagination___npPu7",info:"info___aRH6C"},Lt=m(53504),$e=m(30049),Fn=m(50023),Bn=m(21578),ht=m(93745),pt=m(93520),Zn=m(61186),St=m.n(Zn);const{Column:Xe}=Lt.default;var Rn=({submitResult:t,submitting:n,submitRecords:l,page:d,onPageChange:o,topicId:u})=>{const{status:r,id:a,input:i,output:c,expected_output:N,is_file:v,input_file_url:x,output_file_url:g,expected_output_file_url:w,error_msg:f}=t||{},{records:R,records_count:I}=l||{},C=(0,F.useParams)();function U(){v?navigator.clipboard.writeText(Ne.Base64.decode(f)).then(()=>{J.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(Ne.Base64.decode(c)).then(()=>{J.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return e.createElement(pe.Z,{spinning:n,tip:"\u8BC4\u6D4B\u4E2D...",indicator:e.createElement(Fn.Z,{style:{fontSize:24},spin:!0})},a?e.createElement(e.Fragment,null,e.createElement("ul",{className:ft.info},e.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",e.createElement("span",{className:r===ht.h.OK?"c-green":"c-red"},vt.Im[r])),e.createElement("li",{className:ft.error},e.createElement("a",{onClick:U},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",e.createElement(Bn.Z,null)," ")),e.createElement("li",null,e.createElement(F.Link,{to:`/problems/${u}/record-detail/${a}?backId=${C==null?void 0:C.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),r!==ht.h.OK?e.createElement(e.Fragment,null,e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),e.createElement("pre",null,!v&&i,v&&e.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,pt.LR)(x,i)},i)),e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),e.createElement("pre",null,(r===4||r===5)&&Ne.Base64.decode(f),r!=4&&r!=5&&(v?e.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,pt.LR)(g,c)},c):Ne.Base64.decode(c))),e.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),e.createElement("pre",null,!v&&Ne.Base64.decode(N),v&&e.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,pt.LR)(w,N)},N))):null):null,(R==null?void 0:R.length)>0?e.createElement(Lt.default,{dataSource:R,rowKey:"id",pagination:!1},e.createElement(Xe,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(j,P)=>e.createElement("span",null," ",St()(j).format("YYYY-MM-DD HH:mm:ss"))}),e.createElement(Xe,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(j,P)=>{var s;return e.createElement(F.Link,{className:j===0?"c-green":"c-red",to:`/problems/${u}/record-detail/${P.id}?backId=${C==null?void 0:C.save_identifier}`},(s=vt.Im[j])==null?void 0:s.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),e.createElement(Xe,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),e.createElement(Xe,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),e.createElement(Xe,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,I>15?e.createElement($e.Z,{className:ft.pagination,current:d,pageSize:15,total:I,onChange:o}):null)},Mt=m(69713),Un=m(82884),yt=m(60153),_t={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Ae=m(47530);const kn={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var Yn=({hack:t,onTriggerPraise:n,toDiscuss:l})=>{const{language:d,difficulty:o,time_limit:u,username:r,user_path:a,user_praise:i,comments_count:c,praises_count:N,description:v,pass_count:x,submit_count:g}=t,w=(0,F.useLocation)();console.log(t.language,"language");const f=kn[o];return e.createElement(e.Fragment,null,e.createElement("ul",{className:_t.info},e.createElement("li",null,"\u96BE\u5EA6\uFF1A",e.createElement(Un.default,{color:f.color},f.name)),e.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",e.createElement("b",null,u,"\u79D2"))),e.createElement(Ae.Z,{value:v,className:_t.desc}),e.createElement("ul",{className:_t["commit-info"]},e.createElement("li",null,e.createElement(yt.Z,{size:4},e.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",e.createElement("b",null,x))),e.createElement("li",null,e.createElement(yt.Z,{size:4},e.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",e.createElement("b",null,g))," "),e.createElement("li",{style:{flex:"1 0 0"}}),e.createElement("li",null,e.createElement(yt.Z,{size:4},e.createElement("i",{className:"iconfont icon-huifu1",onClick:l})," ",e.createElement("b",null,c))," ")))},xt=m(85960),Gn=Object.defineProperty,wt=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,Qn=Object.prototype.propertyIsEnumerable,Ct=(t,n,l)=>n in t?Gn(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Vn=(t,n)=>{for(var l in n||(n={}))Wn.call(n,l)&&Ct(t,l,n[l]);if(wt)for(var l of wt(n))Qn.call(n,l)&&Ct(t,l,n[l]);return t};const pu=t=>React.createElement("svg",Vn({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u5C55\u5F00\u9898\u76EE"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"100%",id:"show_svg__a"},React.createElement("stop",{stopColor:"#EEF7FF",offset:"0%"}),React.createElement("stop",{stopColor:"#C1E2FF",offset:"100%"}))),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"url(#show_svg__a)",width:40,height:40,rx:8}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M16.057 20.784H8.238A1.22 1.22 0 0 0 7 21.974v6.811a1.22 1.22 0 0 0 1.238 1.19h7.819a1.213 1.213 0 0 0 1.238-1.19v-6.811a1.213 1.213 0 0 0-.376-.847 1.203 1.203 0 0 0-.862-.332v-.01Zm-1.25 6.769H9.423V23.12h5.384v4.433Z",fill:"#4CACFF"}),React.createElement("path",{d:"M16.057 10.005a1.22 1.22 0 0 1 1.238 1.189v6.812a1.213 1.213 0 0 1-.376.846c-.232.222-.542.34-.862.332H8.238A1.213 1.213 0 0 1 7 18.005v-6.811a1.22 1.22 0 0 1 1.238-1.19Zm-1.239 2.41H9.434v4.401h5.384v-4.4Z",fill:"#94CDFF"}),React.createElement("path",{d:"M20.418 12.632h11.189a1.213 1.213 0 0 0 1.238-1.179 1.224 1.224 0 0 0-.371-.857 1.214 1.214 0 0 0-.867-.343H20.418a1.203 1.203 0 0 0-.866.336c-.233.223-.367.53-.372.854.005.323.14.63.372.854.232.223.544.344.866.335ZM31.575 16.027h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 21.595h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 27.163h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557Z",fill:"#1890FF"}))));var Hn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Oe=m(58253);function At(t){return(0,Oe.U2)("comments.json",t)}function Ot(t){return(0,Oe.v_)(`/discusses/${t}/plus.json`,{container_type:"Discuss",type:1})}function Tt(t){return(0,Oe.v_)("comments/reply.json",t)}function bt(t){return(0,Oe.v_)("comments.json",t)}function Jn(t){return(0,Oe.v_)(`comments/${t==null?void 0:t.id}/hidden.json`,t)}function $n(t){return(0,Oe.IV)(`comments/${t==null?void 0:t.id}.json`)}var Xn=m(51810),Ze=m(17849);function Pt({author:t}){return e.createElement("a",{href:`/users/${t.login}`,target:"_blank"},e.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${$.Z.IMG_SERVER}/images/${t.image_url}`,width:"50"}))}function Kn({data:t,index:n,parentDiscussIndex:l,user:d,onSetActionType:o}){const{author:u,can_delete:r,content:a,id:i,time:c}=t;function N(){o({id:i,index:n,type:"delete-discuss",parentDiscussIndex:l,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const v=d.admin||r||u.user_id===d.user_id;return e.createElement("div",{className:"discuss-item-container second-discuss "},e.createElement(Pt,{author:u}),e.createElement("section",null,e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${u.login}`,target:"_blank"},u.name),e.createElement("span",{className:"grey"},c),e.createElement("div",{className:"btn-group",style:{marginBottom:0}},v?e.createElement("a",{onClick:N,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null)),e.createElement(Ae.Z,{className:"discuss-content",value:a})))}var qn=({user:t,data:n,index:l,onPlusDiscuss:d,onSetActionType:o,activeDiscussIndex:u,onReplyDiscuss:r,onSetActiveDiscussIndex:a})=>{const{content:i,children:c,hidden:N,id:v,praise_count:x,time:g,user_praise:w,can_delete:f,author:R}=n;console.log(f&&(!c||c.length==0),"children22");function I(){a(v)}function C(){d(v,!w,l)}function U(){o({id:v,index:l,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function j(){o({id:v,index:l,params:{hidden:N?"0":"1"},type:"hidden-discuss",message:N?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const P=t.admin||t.user_id===R.user_id;return e.createElement("div",{className:"discuss-item-container",key:v},e.createElement(Pt,{author:R}),e.createElement("section",null,e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${R.login}`,target:"_blank"}," ",R.name," "),e.createElement("span",{className:"grey"},g)),e.createElement(Ae.Z,{className:"discuss-content",value:i}),c&&c.length>0?e.createElement("div",{className:"reply-discuss-container"},c.map((s,B)=>e.createElement(Kn,{key:s.id,data:s,index:B,user:t,onSetActionType:o,parentDiscussIndex:l}))):null,e.createElement("div",{className:"btn-group"},(0,Ze.Ny)()?e.createElement("a",{onClick:j,title:N?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},e.createElement("i",{className:N?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,f&&(!c||c.length==0)?e.createElement("a",{onClick:U,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null,e.createElement("a",{onClick:I,title:"\u56DE\u590D"}," ",e.createElement("i",{className:"iconfont icon-huifu1"})," "),e.createElement("a",{onClick:C,className:w?"c-orange":""},e.createElement("i",{className:w?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),e.createElement("span",null,x||""))),e.createElement(Xn.Z,{id:v,activeDiscussIndex:u,onReplyDiscuss:r})))},el=m(35886),ut=m(71278),tl=(t,n,l)=>new Promise((d,o)=>{var u=i=>{try{a(l.next(i))}catch(c){o(c)}},r=i=>{try{a(l.throw(i))}catch(c){o(c)}},a=i=>i.done?d(i.value):Promise.resolve(i.value).then(u,r);a((l=l.apply(t,n)).next())}),nl=({user_praise:t,praise_count:n,praisePlus:l,onCreateDiscuss:d,discuss_count:o})=>{const[u,r]=(0,e.useState)(!1),[a,i]=(0,e.useState)("");function c(g){i(g)}function N(){r(!0)}function v(){r(!1)}function x(){return tl(this,null,function*(){d(a),i(""),r(!1)})}return e.createElement("div",{className:`dis-input-editor-container ${u?"active":""} `},e.createElement("div",{className:u?"text-area hide":"text-area"},e.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:N}),e.createElement("a",{style:{alignItems:"center"}}," ",e.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",o," "),e.createElement("a",{className:"c-light-black",onClick:l,style:{alignItems:"center"},title:t?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},e.createElement("i",{className:`mr3 ${t?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),n?e.createElement("span",null,n):"")),u?e.createElement("div",{className:"input-mask",onClick:v}):null,e.createElement("div",{className:u?"md-container":"md-container hide"},e.createElement(ut.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:a,height:240,onChange:c}),e.createElement("div",{className:"tip-container",onClick:v},e.createElement("a",{className:"btn-send",onClick:x}," \u53D1\u9001 "))))},ll=Object.defineProperty,al=Object.defineProperties,ul=Object.getOwnPropertyDescriptors,zt=Object.getOwnPropertySymbols,rl=Object.prototype.hasOwnProperty,il=Object.prototype.propertyIsEnumerable,Ft=(t,n,l)=>n in t?ll(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,ie=(t,n)=>{for(var l in n||(n={}))rl.call(n,l)&&Ft(t,l,n[l]);if(zt)for(var l of zt(n))il.call(n,l)&&Ft(t,l,n[l]);return t},ol=(t,n)=>al(t,ul(n)),Ke=(t,n,l)=>new Promise((d,o)=>{var u=i=>{try{a(l.next(i))}catch(c){o(c)}},r=i=>{try{a(l.throw(i))}catch(c){o(c)}},a=i=>i.done?d(i.value):Promise.resolve(i.value).then(u,r);a((l=l.apply(t,n)).next())});const cl={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var sl=(t=>(t[t.GET_DISCUSSES=0]="GET_DISCUSSES",t[t.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",t[t.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",t[t.PLUS_DISCUSS=3]="PLUS_DISCUSS",t[t.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",t[t.SET_PAGE=5]="SET_PAGE",t[t.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",t))(sl||{});function dl(t,n){switch(n.type){case 6:return ol(ie({},t),{loading:!0});case 0:return ie(ie({},t),n.payload);case 1:return ie(ie({},t),n.payload);case 4:return ie(ie({},t),n.payload);case 3:return ie(ie({},t),n.payload);case 5:return ie(ie({},t),n.payload);case 2:return ie(ie({},t),n.payload);default:throw new Error}}var ml=({user:t,identifier:n,hack:l,onTriggerPraise:d,setDiscussTotal:o})=>{const[u,r]=(0,e.useReducer)(dl,cl),{loading:a,page:i,data:c,count:N,actionType:v,activeDiscussIndex:x}=u;console.log("---",u);const g=(0,e.useCallback)(()=>Ke(void 0,null,function*(){r({type:6});const s=yield At({container_type:"Practice",container_identifier:n,limit:10,page:i}),{comments:B,disscuss_count:A}=s;r({type:0,payload:{data:B,count:A,loading:!1}}),o(A)}),[i,n]);(0,e.useEffect)(()=>{g()},[n,i]);function w(s){r({type:5,payload:{page:s}})}function f(s){r({type:4,payload:{actionType:s}})}function R(s){r(x===s?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:s}})}function I(s,B,A){return Ke(this,null,function*(){try{const W=yield Ot(s);c[A].user_praise=B,c[A].praise_count=W.praise_count,r({type:3,payload:{data:[...c]}})}catch(W){console.log(W)}})}function C(){return Ke(this,null,function*(){const{id:s,params:B,type:A,index:W,parentDiscussIndex:ae}=v;A==="hidden-discuss"&&(console.log(B,"params"),yield Jn(ie({id:s,container_type:"Practice",container_identifier:n},B)),ae?c[ae].children[W].hidden=B.hidden==1:c[W].hidden=B.hidden==1,r({type:4,payload:{actionType:null,data:[...c]}})),A==="delete-discuss"&&(yield $n({id:s,container_type:"Practice",container_identifier:n}),r({type:4,payload:{actionType:null}}),yield g())})}function U(){r({type:4,payload:{actionType:null}})}function j(s,B){return Ke(this,null,function*(){try{yield Tt({container_type:"Practice",container_identifier:n,comments:{content:B,parent_id:s}}),g()}catch(A){console.log(A)}})}function P(s){return Ke(this,null,function*(){r({type:6}),yield bt({comments:{content:s},container_type:"Practice",container_identifier:n}),g()})}return e.createElement(e.Fragment,null,e.createElement("div",{className:"discuss-panel"},c.length===0?e.createElement(Mt.Z,null):e.createElement(pe.Z,{spinning:a},c.map((s,B)=>e.createElement(qn,{onReplyDiscuss:j,onPlusDiscuss:I,onSetActiveDiscussIndex:R,onSetActionType:f,data:s,index:B,user:t,activeDiscussIndex:x}))),N>10?e.createElement("div",{className:"pagination-container mt10 mb10"},e.createElement($e.Z,{showQuickJumper:!0,onChange:w,current:i,total:N,showTotal:s=>e.createElement("span",{style:{color:"#656F87"}},"\u5171",e.createElement("span",{className:"c-light-primary"},s),"\u6761\u6570\u636E")})):null),e.createElement(nl,{user_praise:l.user_praise,praise_count:l.praises_count,praisePlus:d,discuss_count:l.comments_count,onCreateDiscuss:P}),e.createElement(se.Z,null,e.createElement(Q.default,{centered:!0,title:"\u63D0\u793A",open:!!v,onOk:C,onCancel:U},e.createElement("p",null,v?v.message:"")),e.createElement(el.Z,null)))},Te={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},me={flex_box_center:"flex_box_center___EahWI",flex_space_between:"flex_space_between___zopS4",flex_box_vertical_center:"flex_box_vertical_center___w03mz",flex_box_center_end:"flex_box_center_end___lr0Fp",flex_box_column:"flex_box_column___KFHVi",active:"active___BczOO",line:"line___VC_Ry",list:"list___n9ABd",left:"left___LVHqw",mask:"mask___fP13z",right:"right___iLe52",name:"name___Oz_7h",title:"title___2Sess",a:"a___t7rIW",b:"b___Kb_45",des:"des___CjMBM",tag:"tag___V0PVb"},El=Object.defineProperty,Bt=Object.getOwnPropertySymbols,gl=Object.prototype.hasOwnProperty,vl=Object.prototype.propertyIsEnumerable,Zt=(t,n,l)=>n in t?El(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,fl=(t,n)=>{for(var l in n||(n={}))gl.call(n,l)&&Zt(t,l,n[l]);if(Bt)for(var l of Bt(n))vl.call(n,l)&&Zt(t,l,n[l]);return t};const Mu=t=>React.createElement("svg",fl({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u89C2\u770B"),React.createElement("path",{d:"M11 0a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h10ZM4.4 2.4a.4.4 0 0 0-.4.4v4.4a.4.4 0 0 0 .64.32l2.72-2.04a.6.6 0 0 0 0-.96L4.64 2.48a.4.4 0 0 0-.24-.08Z",fill:"#FFF",fillRule:"evenodd"}));var pl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",Ml=Object.defineProperty,Rt=Object.getOwnPropertySymbols,yl=Object.prototype.hasOwnProperty,_l=Object.prototype.propertyIsEnumerable,Ut=(t,n,l)=>n in t?Ml(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Dl=(t,n)=>{for(var l in n||(n={}))yl.call(n,l)&&Ut(t,l,n[l]);if(Rt)for(var l of Rt(n))_l.call(n,l)&&Ut(t,l,n[l]);return t};const yu=t=>React.createElement("svg",Dl({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var kt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Nl=Object.defineProperty,Yt=Object.getOwnPropertySymbols,Il=Object.prototype.hasOwnProperty,jl=Object.prototype.propertyIsEnumerable,Gt=(t,n,l)=>n in t?Nl(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Ll=(t,n)=>{for(var l in n||(n={}))Il.call(n,l)&&Gt(t,l,n[l]);if(Yt)for(var l of Yt(n))jl.call(n,l)&&Gt(t,l,n[l]);return t};const _u=t=>React.createElement("svg",Ll({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var hl="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",Sl=Object.defineProperty,Wt=Object.getOwnPropertySymbols,xl=Object.prototype.hasOwnProperty,wl=Object.prototype.propertyIsEnumerable,Qt=(t,n,l)=>n in t?Sl(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Cl=(t,n)=>{for(var l in n||(n={}))xl.call(n,l)&&Qt(t,l,n[l]);if(Wt)for(var l of Wt(n))wl.call(n,l)&&Qt(t,l,n[l]);return t};const Du=t=>React.createElement("svg",Cl({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var Vt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Al=Object.defineProperty,Ht=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,Tl=Object.prototype.propertyIsEnumerable,Jt=(t,n,l)=>n in t?Al(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,bl=(t,n)=>{for(var l in n||(n={}))Ol.call(n,l)&&Jt(t,l,n[l]);if(Ht)for(var l of Ht(n))Tl.call(n,l)&&Jt(t,l,n[l]);return t};const Nu=t=>React.createElement("svg",bl({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var $t="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Pl=({style:t={},onClick:n,onAssist:l,onHide:d,data:o,active:u,showLine:r})=>e.createElement(e.Fragment,null,e.createElement("div",{className:u===(o==null?void 0:o.id)?`${me.list} ${me.active}`:me.list,style:t,onClick:()=>n(o)},(o==null?void 0:o.video)&&e.createElement("div",{className:me.left},e.createElement("img",{src:o==null?void 0:o.video_cover}),e.createElement("div",null,e.createElement("img",{src:pl}),e.createElement("span",null,o==null?void 0:o.video_duration)),e.createElement("div",{className:me.mask})),e.createElement("div",{className:me.right},e.createElement("div",{className:me.name},e.createElement("img",{src:$.Z.IMG_SERVER+"/images/"+(o==null?void 0:o.image_url),width:30,height:30}),e.createElement("div",{title:o==null?void 0:o.name,className:me.title},o==null?void 0:o.name),(o==null?void 0:o.is_authority)&&e.createElement("div",{className:me.b},"\u5B98\u65B9"),(o==null?void 0:o.is_excellent)&&e.createElement("div",{className:me.a},"\u7CBE\u9009")),e.createElement("div",{className:me.des},e.createElement(Ae.Z,{showLines:2,showTextOnly:!0,value:(o==null?void 0:o.content)||"\u6682\u65E0\u5185\u5BB9"})),e.createElement("div",{className:me.tag},e.createElement("span",{className:"current",onClick:a=>{a.stopPropagation(),l(o)}},e.createElement("img",{src:o!=null&&o.user_liker?hl:kt}),e.createElement("span",{style:{color:o!=null&&o.user_liker?"#0152d9":"#656f87"}},o==null?void 0:o.praises_count)),e.createElement("span",null,e.createElement("img",{src:Vt}),e.createElement("span",null,o==null?void 0:o.discusses_count)),e.createElement("span",null,e.createElement("img",{src:$t}),e.createElement("span",null,o==null?void 0:o.viewed_count)),(0,Ze.Ny)()&&e.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:a=>{a.stopPropagation(),d(o)}},o!=null&&o.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),r&&e.createElement("div",{className:me.line})),Ee={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},Xt=m(95435),zl=m(49941),Fl=Object.defineProperty,Kt=Object.getOwnPropertySymbols,Bl=Object.prototype.hasOwnProperty,Zl=Object.prototype.propertyIsEnumerable,qt=(t,n,l)=>n in t?Fl(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Rl=(t,n)=>{for(var l in n||(n={}))Bl.call(n,l)&&qt(t,l,n[l]);if(Kt)for(var l of Kt(n))Zl.call(n,l)&&qt(t,l,n[l]);return t};const ju=t=>React.createElement("svg",Rl({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u4E0A\u4F20\u89C6\u9891"),React.createElement("path",{d:"M1.6 0C1.175 0 .768.17.468.474A1.63 1.63 0 0 0 0 1.622v3.243h3.237L7.378 0H1.6Zm7.876 0L5.338 4.865h5.9L15.371 0H9.476Zm7.998 0-4.137 4.865h5.896L23.372 0h-5.898Zm8 0-4.138 4.865h6.66V1.622a1.629 1.629 0 0 0-.467-1.148A1.585 1.585 0 0 0 26.397 0h-.924ZM0 6.487v17.837c0 .43.167.844.468 1.148.3.305.707.475 1.132.474h18.61a6.515 6.515 0 0 1 1.652-6.218 6.31 6.31 0 0 1 6.134-1.675V6.487H0Zm11.998 5.675 6.4 4.056-6.4 4.055v-8.11Zm14.399 6.487c-3.092.002-5.597 2.544-5.595 5.678.001 3.134 2.508 5.674 5.6 5.673C29.494 30 32 27.458 32 24.324c0-1.506-.59-2.95-1.641-4.014a5.561 5.561 0 0 0-3.962-1.661Zm0 2.027c.22.003.428.1.574.266.663.6 1.327 1.352 1.99 2.002a.8.8 0 0 1 0 1.14.788.788 0 0 1-1.125 0l-.638-.646v3.724a.814.814 0 0 1-.392.724.79.79 0 0 1-.815 0 .814.814 0 0 1-.392-.724v-3.724l-.637.646a.79.79 0 0 1-.773.215.803.803 0 0 1-.567-.575.816.816 0 0 1 .212-.783c.651-.664 1.333-1.388 1.99-2.002a.778.778 0 0 1 .575-.266l-.002.003Z",fill:"#0152d9",fillRule:"nonzero"}));var Ul="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",kl=Object.defineProperty,en=Object.getOwnPropertySymbols,Yl=Object.prototype.hasOwnProperty,Gl=Object.prototype.propertyIsEnumerable,tn=(t,n,l)=>n in t?kl(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Wl=(t,n)=>{for(var l in n||(n={}))Yl.call(n,l)&&tn(t,l,n[l]);if(en)for(var l of en(n))Gl.call(n,l)&&tn(t,l,n[l]);return t};const Lu=t=>React.createElement("svg",Wl({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u4E0A\u4F20\u6210\u529F"),React.createElement("path",{d:"M15 0c8.285 0 15 6.717 15 15 0 8.285-6.715 15-15 15-8.283 0-15-6.715-15-15C0 6.717 6.717 0 15 0Zm10.041 7.5v.01a47.934 47.934 0 0 0-11.232 9.386l-4.372-3.3v-.002L7.5 15.08l7.553 7.42A44.625 44.625 0 0 1 25.5 8.55l-.459-1.05Z",fill:"#44D7B6",fillRule:"nonzero"}));var Ql="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Vl=Object.defineProperty,nn=Object.getOwnPropertySymbols,Hl=Object.prototype.hasOwnProperty,Jl=Object.prototype.propertyIsEnumerable,ln=(t,n,l)=>n in t?Vl(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,$l=(t,n)=>{for(var l in n||(n={}))Hl.call(n,l)&&ln(t,l,n[l]);if(nn)for(var l of nn(n))Jl.call(n,l)&&ln(t,l,n[l]);return t};const hu=t=>React.createElement("svg",$l({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},t),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var an="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",Xl=Object.defineProperty,un=Object.getOwnPropertySymbols,Kl=Object.prototype.hasOwnProperty,ql=Object.prototype.propertyIsEnumerable,rn=(t,n,l)=>n in t?Xl(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,we=(t,n)=>{for(var l in n||(n={}))Kl.call(n,l)&&rn(t,l,n[l]);if(un)for(var l of un(n))ql.call(n,l)&&rn(t,l,n[l]);return t},on=(t,n,l)=>new Promise((d,o)=>{var u=i=>{try{a(l.next(i))}catch(c){o(c)}},r=i=>{try{a(l.throw(i))}catch(c){o(c)}},a=i=>i.done?d(i.value):Promise.resolve(i.value).then(u,r);a((l=l.apply(t,n)).next())});const ea=(t,n)=>{var l,d,o;const{uploadInfo:u={}}=n.payload;switch(n.type){case"addVideo":return{videoList:[...t.videoList,{name:u.file.name,size:u.file.size,type:u.file.type,fileHash:u.fileHash,state:u.state,video_id:u.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:t.videoList.filter(r=>r.name!==n.payload.name)};case"replaceVideo":return{videoList:n.payload};case"removeAll":return[];case"updateProgress":return{videoList:t.videoList.map(r=>r.name===n.payload.uploadInfo.file.name?we(we({},r),{loaded:n.payload.progressPercent,video_id:u.videoId,fileHash:u.fileHash}):r)};case"updateTitle":return{videoList:(l=t.videoList)==null?void 0:l.map(r=>r.name===n.payload.item.name?we(we({},r),{title:n.payload.title}):r)};case"updateImg":return{videoList:(d=t.videoList)==null?void 0:d.map(r=>r.name===n.payload.item.name?we(we({},r),{attachment_id:n.payload.attachment_id}):r)};case"updateImg":return{videoList:(o=t.videoList)==null?void 0:o.map(r=>r.name===n.payload.item.name?we(we({},r),{attachment_id:n.payload.attachment_id}):r)};default:return[]}};var cn=({onClose:t,onOk:n,identifier:l,active:d})=>{var o,u;const[r]=Be.default.useForm(),[a,i]=(0,e.useState)({}),[c,N]=(0,e.useState)(!1),[v,x]=(0,e.useState)(!1),[g,w]=(0,e.useReducer)(ea,{videoList:[]}),f=(0,Ze.eY)(),R=(0,F.useParams)(),I=(0,e.useRef)();(0,e.useEffect)(()=>{d&&C()},[d]);const C=()=>on(void 0,null,function*(){var _,b,y,De,X,Ie,Ve,Le,He,D;const z=yield(0,L.M3)(l,{active:d});if((z==null?void 0:z.status)===0){const ee={name:(_=z==null?void 0:z.data)==null?void 0:_.name,content:(b=z==null?void 0:z.data)==null?void 0:b.content};r.setFieldsValue(ee),i(ee),(De=(y=z==null?void 0:z.data)==null?void 0:y.videos)!=null&&De[0]&&w({type:"replaceVideo",payload:[{video_id:(Ve=(Ie=(X=z==null?void 0:z.data)==null?void 0:X.videos)==null?void 0:Ie[0])==null?void 0:Ve.video_id,name:(D=(He=(Le=z==null?void 0:z.data)==null?void 0:Le.videos)==null?void 0:He[0])==null?void 0:D.title,loaded:100}]})}}),U=(_,b)=>{i(we({},b))},j=_=>on(void 0,null,function*(){const b={videos:g.videoList,articles:_};x(!0);let y;d?(b.active=d,y=yield(0,L.gu)(l,b)):y=yield(0,L.bx)(l,b),(y==null?void 0:y.status)===0&&(console.log(d||(y==null?void 0:y.id),44),n(d||(y==null?void 0:y.id))),x(!1)}),P=()=>{const _=document.getElementById("fileUpload");_.value=""},s=_=>{var b='{"Vod":{}}';if(N(!0),I.current){I.current.addFile(_,null,null,null,b);return}(0,zl.o)(f==null?void 0:f.login,"",{create:!I,addFileSuccess:y=>{w({type:"addVideo",payload:{uploadInfo:y}})},onUploadProgress:(y,De,X)=>{const Ie=Math.ceil(X*100);w({type:"updateProgress",payload:{uploadInfo:y,progressPercent:Ie}}),P()},onUploadFailed:y=>{J.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:y=>{N(!1)},onUploadSucceed:y=>{N(!1)},onUploadError:y=>{N(!1)},gotUploader:y=>{y.addFile(_,null,null,null,b),I.current=y}})},B=_=>{var b;const De=_.target.files[0];if(!De){P();return}let X=De.name.toLowerCase();if(X&&X.indexOf(".avi")==-1&&X.indexOf(".flv")==-1&&X.indexOf(".f4v")==-1&&X.indexOf(".m4v")==-1&&X.indexOf(".mov")==-1&&X.indexOf(".mp4")==-1&&X.indexOf(".rmvb")==-1&&X.indexOf(".swf")==-1&&X.indexOf(".webm")==-1&&X.indexOf(".wmv")==-1){J.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),P();return}if(De.size>1024*1024*1024){J.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),P();return}if((b=g.videoList)!=null&&b.find(Ie=>Ie.name===De.name)){J.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),P();return}s(De)},A=(_,b)=>{Q.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:e.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",b?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{P(),w({type:"removeVideo",payload:{name:_}})}})},W=()=>e.createElement("label",{htmlFor:"fileUpload",className:Ee.main},e.createElement("img",{src:Ul,alt:""}),e.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),ae=_=>e.createElement("div",{className:Ee.mainLoading},e.createElement("div",{className:Ee.proWarp},e.createElement("div",{className:Ee.pro},e.createElement("div",{style:{width:_}})),e.createElement("span",null,_||0,"%")),e.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),e.createElement("div",{className:Ee.tip},e.createElement(Xt.Z,{getPopupContainer:b=>b.parentNode,title:e.createElement("div",null,e.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",e.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),e.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),e.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},e.createElement("img",{src:an,alt:""})))),E=_=>e.createElement("div",{className:Ee.mainSucceed},e.createElement("img",{src:Ql,alt:""}),e.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),e.createElement("div",{className:Ee.tip},e.createElement(Xt.Z,{getPopupContainer:b=>b.parentNode,title:e.createElement("div",null,e.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",e.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),e.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),e.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},e.createElement("img",{src:an,alt:""}))),e.createElement("div",{className:Ee.del,onClick:()=>A(_.name,_.loaded==100)},e.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),k=()=>{var _;return e.createElement(e.Fragment,null,(_=g.videoList)==null?void 0:_.map((b,y)=>e.createElement(e.Fragment,{key:y},b.loaded==100?E(b):ae(b.loaded))))},T=()=>{Q.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:t})},O=(o=g.videoList)==null?void 0:o.length;return e.createElement("div",{className:Ee.listForm},e.createElement("header",null,d?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),e.createElement("section",{className:Ee.scroll,id:"sss"},e.createElement("div",{className:Ee.formWrap}," ",e.createElement(Be.default,{form:r,scrollToFirstError:!0,layout:"vertical",onValuesChange:U,onFinish:j},e.createElement(Be.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},e.createElement(at.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((u=a.name)==null?void 0:u.length)||0}/60`})),e.createElement(Be.default.Item,{name:"content",label:"\u5185\u5BB9:"},e.createElement(ut.Z,{defaultValue:a.content||"",watch:!0})))),e.createElement("div",{className:Ee.upload},O?k():W(),e.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:B,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),e.createElement("div",{className:Ee.btns},e.createElement(de.ZP,{onClick:T,type:"primary",ghost:!0},"\u5173\u95ED"),e.createElement(de.ZP,{loading:v,disabled:c,onClick:()=>r.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},ge={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},ta=m(57627),na=Object.defineProperty,sn=Object.getOwnPropertySymbols,la=Object.prototype.hasOwnProperty,aa=Object.prototype.propertyIsEnumerable,dn=(t,n,l)=>n in t?na(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,ua=(t,n)=>{for(var l in n||(n={}))la.call(n,l)&&dn(t,l,n[l]);if(sn)for(var l of sn(n))aa.call(n,l)&&dn(t,l,n[l]);return t};const xu=t=>React.createElement("svg",ua({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},t),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var ra="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",ia=Object.defineProperty,mn=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,ca=Object.prototype.propertyIsEnumerable,En=(t,n,l)=>n in t?ia(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,sa=(t,n)=>{for(var l in n||(n={}))oa.call(n,l)&&En(t,l,n[l]);if(mn)for(var l of mn(n))ca.call(n,l)&&En(t,l,n[l]);return t};const wu=t=>React.createElement("svg",sa({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},t),React.createElement("defs",null,React.createElement("path",{id:"gf_svg__a",d:"m8 0 1.857 1.073h2.146l1.071 1.854L14.931 4v2.144L16 8l-1.069 1.857V12l-1.858 1.072-1.071 1.856H9.857L8 16l-1.855-1.073H4l-1.072-1.856L1.072 12V9.857L0 8l1.072-1.856V4l1.857-1.073 1.072-1.854h2.145L8 0Zm2.91 6.385H4.796V12h1.246v-.451h4.026v.435h1.247V9.196H6.043v-.515h4.866V6.385Zm-.84 3.681v.613H6.042v-.613h4.026ZM9.705 7.24v.588H6.043v-.588h3.663ZM8.615 4l-1.48.137c.055.133.12.284.192.453l.076.175H4v1.426h1.195v-.483h5.61v.483H12V4.765H8.883c-.078-.23-.148-.43-.21-.602L8.616 4Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"gf_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#gf_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#gf_svg__a"}),React.createElement("circle",{cx:.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"}),React.createElement("circle",{cx:-.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"})));var da="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",ma=Object.defineProperty,gn=Object.getOwnPropertySymbols,Ea=Object.prototype.hasOwnProperty,ga=Object.prototype.propertyIsEnumerable,vn=(t,n,l)=>n in t?ma(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,va=(t,n)=>{for(var l in n||(n={}))Ea.call(n,l)&&vn(t,l,n[l]);if(gn)for(var l of gn(n))ga.call(n,l)&&vn(t,l,n[l]);return t};const Cu=t=>React.createElement("svg",va({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var fn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Dt={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},pn=m(95237),rt=m(43604),Ce={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},fa=(t,n,l)=>new Promise((d,o)=>{var u=i=>{try{a(l.next(i))}catch(c){o(c)}},r=i=>{try{a(l.throw(i))}catch(c){o(c)}},a=i=>i.done?d(i.value):Promise.resolve(i.value).then(u,r);a((l=l.apply(t,n)).next())});const Mn=({id:t,cb:n})=>{const[l,d]=(0,e.useState)("");return e.createElement("aside",{className:"mt10"},e.createElement(ut.Z,{defaultValue:l,id:"writeForumsReviewId",onChange:o=>{d(o)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),e.createElement(pn.Z,null,e.createElement(rt.Z,{flex:"1"}),e.createElement(rt.Z,null,e.createElement(de.ZP,{type:"primary",size:"middle",onClick:()=>fa(void 0,null,function*(){l===""?J.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):n(t,l)})},"\u53D1\u9001"))))},pa=({data:t})=>{var n;return e.createElement("div",{className:Ce.thirdlyLevelDiscuss},e.createElement("span",{className:"c-grey-333"},e.createElement("span",{className:"font 14 c-light-primary"},(n=t==null?void 0:t.author)==null?void 0:n.name),"@",e.createElement("span",{className:"font 14 c-light-primary"},t==null?void 0:t.parent_name),":"),e.createElement(Ae.Z,{value:t==null?void 0:t.content}))},Ma=({data:t,onReplyDiscuss:n,thirdlyReply:l,setThirdlyReply:d})=>{var o,u,r,a;const i=(0,Ze.eY)();return console.log(i,"user"),e.createElement("div",{className:Ce.list},e.createElement("img",{src:$.Z.IMG_SERVER+"/images/"+((o=t==null?void 0:t.author)==null?void 0:o.image_url)}),e.createElement("div",{className:Ce.wrap},e.createElement("div",{className:"font14",style:{marginBottom:6}},e.createElement("span",{className:"c-grey-333"},(u=t==null?void 0:t.author)==null?void 0:u.name),(i==null?void 0:i.login)!==((r=t==null?void 0:t.author)==null?void 0:r.login)&&e.createElement("span",{onClick:()=>d(t==null?void 0:t.id),className:"c-grey-999 current",style:{float:"right"}},e.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),e.createElement("span",null,"\u56DE\u590D"))),e.createElement(Ae.Z,{value:t==null?void 0:t.content}),(a=t==null?void 0:t.children)==null?void 0:a.map(c=>e.createElement(pa,{key:c.id,data:c})),l===(t==null?void 0:t.id)&&e.createElement("div",null,e.createElement(Mn,{id:t==null?void 0:t.id,cb:n}),e.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>d(null),className:"c-light-primary current"},e.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),e.createElement("div",{className:Ce.line})))};var ya=({data:t,onReplyDiscuss:n,secondReply:l,setSecondReply:d,thirdlyReply:o,setThirdlyReply:u,onPlusDiscuss:r})=>{var a,i,c,N;const[v,x]=(0,e.useState)(!1);return console.log(t,"data"),e.createElement("div",{className:Ce.discussItem},e.createElement("div",{className:Ce.list},e.createElement("img",{src:$.Z.IMG_SERVER+"/images/"+((a=t==null?void 0:t.author)==null?void 0:a.image_url)}),e.createElement("div",{className:Ce.wrap},e.createElement("div",{className:"font14",style:{marginBottom:6}},e.createElement("span",{className:"c-grey-333 mr30"},(i=t==null?void 0:t.author)==null?void 0:i.name),e.createElement("span",{className:"c-grey-999"},t==null?void 0:t.time)),e.createElement(Ae.Z,{value:t==null?void 0:t.content}),e.createElement("div",{className:Ce.btns},e.createElement("div",{onClick:()=>r(t==null?void 0:t.id),className:t!=null&&t.user_praise?"c-light-primary":"c-grey-999"},e.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),e.createElement("span",null,t==null?void 0:t.praise_count)),e.createElement("div",{onClick:()=>{var g;((g=t==null?void 0:t.children)==null?void 0:g.length)!==0&&(d(null),x(!v))},style:{color:v?"#0152d9":"#999999"}},e.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),e.createElement("span",null,v?"\u6536\u8D77\u8BC4\u8BBA":(c=t==null?void 0:t.children)==null?void 0:c.length)),e.createElement("div",{onClick:()=>{x(!1),d(l===(t==null?void 0:t.id)?null:t==null?void 0:t.id)},style:{color:l===(t==null?void 0:t.id)?"#0152d9":"#999999"}},e.createElement("i",{className:"iconfont icon-huifu3 mr3"}),e.createElement("span",null,l===(t==null?void 0:t.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),l===(t==null?void 0:t.id)&&e.createElement(Mn,{id:t==null?void 0:t.id,cb:(g,w)=>{n(g,w),x(!0)}}),v&&e.createElement("div",{className:Ce.secondLevelDiscuss},(N=t==null?void 0:t.children)==null?void 0:N.map(g=>e.createElement(Ma,{thirdlyReply:o,setThirdlyReply:u,key:g.id,data:g,onReplyDiscuss:n}))))))},it=(t,n,l)=>new Promise((d,o)=>{var u=i=>{try{a(l.next(i))}catch(c){o(c)}},r=i=>{try{a(l.throw(i))}catch(c){o(c)}},a=i=>i.done?d(i.value):Promise.resolve(i.value).then(u,r);a((l=l.apply(t,n)).next())}),_a=({identifier:t,active:n,onOk:l})=>{const[d,o]=(0,e.useState)(""),[u,r]=(0,e.useState)(1),[a,i]=(0,e.useState)([]),[c,N]=(0,e.useState)(0),[v,x]=(0,e.useState)(null),[g,w]=(0,e.useState)(null);(0,e.useEffect)(()=>{f(1),r(1)},[n]);const f=j=>it(void 0,null,function*(){const P=yield At({container_type:"QuestionSolutionArticle",container_identifier:n,limit:5,page:j});P!=null&&P.comments&&(i((P==null?void 0:P.comments)||[]),r(j),N(P==null?void 0:P.disscuss_count))}),R=()=>it(void 0,null,function*(){if(d===""){J.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const j=yield bt({comments:{content:d},container_type:"QuestionSolutionArticle",container_identifier:n});j!=null&&j.discuss&&(o(""),f(u),l())}),I=(j,P,s)=>it(void 0,null,function*(){const B=yield Tt({container_type:"QuestionSolutionArticle",container_identifier:n,comments:{content:P,parent_id:j}});x(null),w(null),f(u)}),C=j=>it(void 0,null,function*(){const P=yield Ot(j);f(u)}),U=j=>{r(j),f(j)};return e.createElement("div",{className:Dt.discuss},e.createElement("aside",{className:Dt.reply,style:{borderWidth:c?1:0}},e.createElement(ut.Z,{defaultValue:d,id:"writeForumsReviewId",onChange:j=>{o(j)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),e.createElement(pn.Z,null,e.createElement(rt.Z,{flex:"1"}),e.createElement(rt.Z,null,e.createElement(de.ZP,{type:"primary",size:"middle",onClick:()=>R()},"\u53D1\u9001")))),a==null?void 0:a.map(j=>e.createElement(ya,{secondReply:v,setSecondReply:x,thirdlyReply:g,setThirdlyReply:w,key:j.id,data:j,onReplyDiscuss:I,onPlusDiscuss:C})),e.createElement($e.Z,{className:Dt.pagination,showTotal:j=>e.createElement("span",{style:{color:"#656F87"}},"\u5171",e.createElement("span",{className:"c-light-primary"},j),"\u6761\u6570\u636E"),current:u,onChange:U,total:c,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},Da=m(19799),Na=Object.defineProperty,yn=Object.getOwnPropertySymbols,Ia=Object.prototype.hasOwnProperty,ja=Object.prototype.propertyIsEnumerable,_n=(t,n,l)=>n in t?Na(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,La=(t,n)=>{for(var l in n||(n={}))Ia.call(n,l)&&_n(t,l,n[l]);if(yn)for(var l of yn(n))ja.call(n,l)&&_n(t,l,n[l]);return t},Nt=(t,n,l)=>new Promise((d,o)=>{var u=i=>{try{a(l.next(i))}catch(c){o(c)}},r=i=>{try{a(l.throw(i))}catch(c){o(c)}},a=i=>i.done?d(i.value):Promise.resolve(i.value).then(u,r);a((l=l.apply(t,n)).next())}),ha=({active:t,identifier:n,onAssist:l,onEdit:d,onArticlesSkip:o,onClose:u,onOk:r,onDelete:a,detailsIndex:i,btnShowStatus:c})=>{var N,v,x,g,w,f,R,I,C,U;const[j,P]=(0,e.useState)(!0),[s,B]=(0,e.useState)({});(0,e.useEffect)(()=>{t&&A()},[t,i]);const A=(T=!0)=>Nt(void 0,null,function*(){T&&P(!0);const O=yield(0,L.wO)(n,{active:t});(O==null?void 0:O.status)===0&&B((O==null?void 0:O.data)||{}),P(!1)}),W=T=>Nt(void 0,null,function*(){const O=yield(0,L.qe)(n,La({active:t},T));(O==null?void 0:O.status)===0&&(A(!1),r())}),ae=T=>Nt(void 0,null,function*(){(yield(0,L.Rg)(n,{active:T==null?void 0:T.id})).status===0&&(A(!1),r())}),E=T=>{Q.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>a(T)})},k=()=>{A(!1),r()};return e.createElement("div",{className:ge.listDetails},e.createElement(ta.Z,{className:"pt20 pl20 pr20",loading:j,active:!0,paragraph:{rows:5}},e.createElement("div",{className:ge.head},e.createElement("div",{className:ge.name},e.createElement("div",{title:s==null?void 0:s.name,className:ge.title},s==null?void 0:s.name),(s==null?void 0:s.is_authority)&&e.createElement("div",{className:ge.b},"\u5B98\u65B9"),(s==null?void 0:s.is_excellent)&&e.createElement("div",{className:ge.a},"\u7CBE\u9009")),e.createElement("div",{className:ge.tag},e.createElement("img",{src:$.Z.IMG_SERVER+"/images/"+(s==null?void 0:s.image_url)}),e.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},s==null?void 0:s.username),e.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",St()(s==null?void 0:s.created_at).format("YYYY-MM-DD")),e.createElement("span",null,e.createElement("img",{src:kt}),e.createElement("span",null,s==null?void 0:s.praises_count)),e.createElement("span",null,e.createElement("img",{src:Vt}),e.createElement("span",null,s==null?void 0:s.discusses_count)),e.createElement("span",null,e.createElement("img",{src:$t}),e.createElement("span",null,s==null?void 0:s.viewed_count)),e.createElement("div",{className:ge.btn},((0,Ze.Ny)()||(s==null?void 0:s.is_self))&&e.createElement(e.Fragment,null,e.createElement(de.ZP,{onClick:()=>E(s),type:"primary",ghost:!0},"\u5220\u9664"),e.createElement(de.ZP,{onClick:()=>d(s),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,Ze.Ny)()&&e.createElement(de.ZP,{onClick:()=>W({is_authority:!(s!=null&&s.is_authority)}),type:"primary"},e.createElement("img",{src:da}),s!=null&&s.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,Ze.Ny)()&&e.createElement(de.ZP,{onClick:()=>W({is_excellent:!(s!=null&&s.is_excellent)}),type:"primary"},e.createElement("img",{src:ra}),s!=null&&s.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),e.createElement("div",{className:ge.scroll},((v=(N=s==null?void 0:s.videos)==null?void 0:N[0])==null?void 0:v.id)&&e.createElement("div",{className:ge.video},e.createElement(pe.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((g=(x=s==null?void 0:s.videos)==null?void 0:x[0])!=null&&g.transcoded)},e.createElement(Da.Z,{poster:(f=(w=s==null?void 0:s.videos)==null?void 0:w[0])==null?void 0:f.cover_url,src:((I=(R=s==null?void 0:s.videos)==null?void 0:R[0])==null?void 0:I.play_url)||"",videoId:(U=(C=s==null?void 0:s.videos)==null?void 0:C[0])==null?void 0:U.id,logWatchHistory:()=>{}}))),e.createElement(Ae.Z,{className:ge.html,value:(s==null?void 0:s.content)||""}),e.createElement("div",{onClick:()=>ae(s),className:ge.g},e.createElement("img",{className:"mr10",src:(s!=null&&s.user_liker,fn)}),e.createElement("span",null,s==null?void 0:s.praises_count)),e.createElement(_a,{onOk:k,active:t,identifier:n})),e.createElement("div",{className:ge.btns},e.createElement(de.ZP,{onClick:()=>u(),type:"primary",ghost:!0},"\u5173\u95ED"),c[0]&&e.createElement(de.ZP,{onClick:T=>o(T,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),c[1]&&e.createElement(de.ZP,{onClick:T=>o(T,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},Sa=Object.defineProperty,Dn=Object.getOwnPropertySymbols,xa=Object.prototype.hasOwnProperty,wa=Object.prototype.propertyIsEnumerable,Nn=(t,n,l)=>n in t?Sa(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Ca=(t,n)=>{for(var l in n||(n={}))xa.call(n,l)&&Nn(t,l,n[l]);if(Dn)for(var l of Dn(n))wa.call(n,l)&&Nn(t,l,n[l]);return t};const bu=t=>React.createElement("svg",Ca({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},t),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var Aa="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",Oa=m(26741),Ta=m(98407),ba=Object.defineProperty,Pa=Object.defineProperties,za=Object.getOwnPropertyDescriptors,In=Object.getOwnPropertySymbols,Fa=Object.prototype.hasOwnProperty,Ba=Object.prototype.propertyIsEnumerable,jn=(t,n,l)=>n in t?ba(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,_e=(t,n)=>{for(var l in n||(n={}))Fa.call(n,l)&&jn(t,l,n[l]);if(In)for(var l of In(n))Ba.call(n,l)&&jn(t,l,n[l]);return t},Za=(t,n)=>Pa(t,za(n)),We=(t,n,l)=>new Promise((d,o)=>{var u=i=>{try{a(l.next(i))}catch(c){o(c)}},r=i=>{try{a(l.throw(i))}catch(c){o(c)}},a=i=>i.done?d(i.value):Promise.resolve(i.value).then(u,r);a((l=l.apply(t,n)).next())}),Ra=({identifier:t,tabStatus:n,setFilterListTotal:l,setListStatus:d})=>{const o={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[u,r]=(0,e.useState)(_e({},o));const[a,i]=(0,e.useState)(!1),[c,N]=(0,e.useState)(0),[v,x]=(0,e.useState)(1),[g,w]=(0,e.useState)(null),[f,R]=(0,e.useState)([]),[I,C]=(0,e.useState)([!0,!0]),[U,j]=(0,e.useState)(0),P=(0,e.useRef)(null);(0,e.useEffect)(()=>{_()},[n]),(0,e.useEffect)(()=>{s()},[g]),(0,e.useEffect)(()=>{A(_e({},o)),_()},[t]),(0,e.useEffect)(()=>(window.addEventListener("resize",B),d(U),()=>{window.removeEventListener("resize",B)}),[U]);const s=()=>We(void 0,null,function*(){if(!g){C([!0,!0]);return}const D=[!0,!0],z=f==null?void 0:f.findIndex(ee=>ee.id===g);z===0&&u.page===1&&(D[0]=!1),(u.page-1)*u.limit+(z+1)===u.total&&(D[1]=!1),C(D)}),B=()=>{var D;if(U){const z=window.innerWidth-((D=P.current)==null?void 0:D.clientWidth);N(z)}},A=D=>We(void 0,null,function*(){var z,ee,Re;i(!0);const oe=yield(0,L.WH)(t,D);return(oe==null?void 0:oe.status)===0&&(R(((z=oe==null?void 0:oe.data)==null?void 0:z.articles)||[]),r(Za(_e({},D),{total:(ee=oe==null?void 0:oe.data)==null?void 0:ee.articles_count})),l((Re=oe==null?void 0:oe.data)==null?void 0:Re.articles_count)),i(!1),oe}),W=()=>{(u==null?void 0:u.sort_direction)===null?u.sort_direction="asc":(u==null?void 0:u.sort_direction)==="asc"?u.sort_direction="desc":(u==null?void 0:u.sort_direction)==="desc"&&(u.sort_direction=null),u.page=1,_(),r(_e({},u)),A(u)},ae=()=>{u.page=1,u.search=u==null?void 0:u.save_search,_(),r(_e({},u)),A(u)},E=()=>{var D;const z=document.getElementsByClassName("btn-resize");z[0].style.visibility="hidden";const ee=window.innerWidth-((D=P.current)==null?void 0:D.clientWidth);N(ee)},k=()=>{E(),j(1)},T=D=>{E(),w(D==null?void 0:D.id),j(3)},O=D=>{E(),w(D==null?void 0:D.id),j(2)},_=()=>{const D=document.getElementsByClassName("btn-resize");D[0].style.visibility="visible",N(0),j(0),w(null)},b=D=>{j(3),w(D),u.page=1,r(_e({},u)),A(u)},y=D=>{j(3),w(D),r(_e({},u)),A(u)},De=D=>{r(_e({},u)),A(u)},X=D=>We(void 0,null,function*(){(yield(0,L.Rg)(t,{active:D==null?void 0:D.id})).status===0&&(A(u),x(v+1))}),Ie=D=>We(void 0,null,function*(){(yield(0,L.rL)(t,{active:D==null?void 0:D.id})).status===0&&(A(u),x(v+1))}),Ve=D=>We(void 0,null,function*(){(yield(0,L.de)(t,{active:D==null?void 0:D.id})).status===0&&(_(),A(u))}),Le=D=>{u.page=D,r(_e({},u)),A(u)},He=(D,z)=>We(void 0,null,function*(){var ee,Re,oe,st;const he=f==null?void 0:f.findIndex(K=>K.id===g);if(console.log(he,z,22),z==="prev"){if(he===void 0){J.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(he===0){if(u.page===1){J.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(u.page!==1){u.page=u.page-1,r(_e({},u));const K=yield A(u);if((K==null?void 0:K.status)===0){const Ue=(oe=K==null?void 0:K.data)==null?void 0:oe.articles[((Re=(ee=K==null?void 0:K.data)==null?void 0:ee.articles)==null?void 0:Re.length)-1];w(Ue==null?void 0:Ue.id),console.log(D.target,555)}}}else{const K=f[he-1];w(K==null?void 0:K.id)}}if(z==="next"){if(he===void 0){J.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((u.page-1)*u.limit+(he+1)===u.total){J.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(he+1===u.limit){u.page=u.page+1,r(_e({},u));const K=yield A(u);if((K==null?void 0:K.status)===0){const Ue=(st=K==null?void 0:K.data)==null?void 0:st.articles[0];w(Ue==null?void 0:Ue.id)}}else{const K=f[he+1];w(K==null?void 0:K.id)}}});return e.createElement("div",{className:Te.wrap,ref:P},e.createElement("div",{className:Te.head},e.createElement("div",{className:Te.sort,onClick:W},e.createElement("span",null,"\u6700\u65B0"),e.createElement("aside",null,e.createElement(Oa.Z,{style:{color:(u==null?void 0:u.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),e.createElement(Ta.Z,{style:{color:(u==null?void 0:u.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),e.createElement(at.default.Search,{value:u.save_search,className:Te["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:D=>{u.save_search=D.target.value,r(_e({},u))},onSearch:ae}),e.createElement("div",{onClick:k,className:Te.btn},e.createElement("img",{src:Aa}),"\u5199\u9898\u89E3")),e.createElement("div",{className:Te.listWarp},e.createElement(pe.Z,{spinning:a,className:"mt20"},f==null?void 0:f.map((D,z)=>{let ee=!0;return z+1===f.length&&z!==0&&(ee=!1),e.createElement(Pl,{active:g,key:D.id,data:D,showLine:ee,onClick:T,onAssist:X,onHide:Ie})}),(f==null?void 0:f.length)===0&&e.createElement(Mt.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),e.createElement($e.Z,{className:Te.pagination,showTotal:D=>e.createElement("span",{style:{color:"#656F87"}},"\u5171",e.createElement("span",{className:"c-light-primary"},D),"\u6761\u6570\u636E"),total:u.total,showSizeChanger:!1,current:u==null?void 0:u.page,onChange:Le,hideOnSinglePage:!0,showQuickJumper:!0}),U>0&&e.createElement("div",{className:Te.fixedRight,style:{width:c}},U===1&&e.createElement(cn,{identifier:t,onClose:_,onOk:b}),U===2&&e.createElement(cn,{active:g,identifier:t,onClose:_,onOk:y}),U===3&&e.createElement(ha,{btnShowStatus:I,onArticlesSkip:He,detailsIndex:v,active:g,identifier:t,onClose:_,onOk:De,onEdit:O,onAssist:X,onDelete:Ve})))},Qe={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},Ua=Object.defineProperty,ka=Object.defineProperties,Ya=Object.getOwnPropertyDescriptors,Ln=Object.getOwnPropertySymbols,Ga=Object.prototype.hasOwnProperty,Wa=Object.prototype.propertyIsEnumerable,hn=(t,n,l)=>n in t?Ua(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,be=(t,n)=>{for(var l in n||(n={}))Ga.call(n,l)&&hn(t,l,n[l]);if(Ln)for(var l of Ln(n))Wa.call(n,l)&&hn(t,l,n[l]);return t},It=(t,n)=>ka(t,Ya(n)),qe=(t,n,l)=>new Promise((d,o)=>{var u=i=>{try{a(l.next(i))}catch(c){o(c)}},r=i=>{try{a(l.throw(i))}catch(c){o(c)}},a=i=>i.done?d(i.value):Promise.resolve(i.value).then(u,r);a((l=l.apply(t,n)).next())}),Qa=({visible:t,onVisible:n,value:l,onChange:d,setIndex:o})=>{var u;const r={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[a,i]=(0,e.useState)(r);const[c,N]=(0,e.useState)([]),[v,x]=(0,e.useState)([]),[g,w]=(0,e.useState)(!1),f=(0,e.useRef)([]),R=(0,e.useRef)(null),I=(0,F.useParams)();(0,e.useEffect)(()=>(I!=null&&I.id&&(R.current=setInterval(()=>{C(30)},3e4)),()=>{clearInterval(R.current)}),[]);const C=E=>qe(void 0,null,function*(){const k=yield(0,L.uc)(I==null?void 0:I.id,{practice_time:E})});(0,e.useEffect)(()=>{A(a),s()},[]),(0,e.useEffect)(()=>(window.addEventListener("click",j),()=>{window.removeEventListener("click",j)}),[I==null?void 0:I.save_identifier,t]),(0,e.useEffect)(()=>{const E=f.current.findIndex(b=>b.identifier===(I==null?void 0:I.save_identifier)),k=f.current[E-1],T=f.current[E+1],O=document.getElementById("oj-prev"),_=document.getElementById("oj-next");k?O.style.display="block":O.style.display="none",T?_.style.display="block":_.style.display="none"},[I==null?void 0:I.save_identifier,f.current]);const U=(E,k)=>{if(E.id===k)return E;for(let T=0,O=E;O=O.parentNode;T++){if(O.id===k)return O;if(O==document.documentElement)return!1}},j=E=>qe(void 0,null,function*(){!U(E.target,"oj-drawer")&&t&&n(!1);const k=f.current.findIndex(_=>_.identifier===(I==null?void 0:I.save_identifier)),T=f.current[k-1],O=f.current[k+1];if(E.target.id==="oj-prev"){if(!T||k===-1){J.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}E.target.style.pointerEvents="none",E.target.style.cursor="not-allowed",yield W(T==null?void 0:T.identifier),o("0"),setTimeout(()=>{E.target.style.pointerEvents="auto",E.target.style.cursor="pointer"},400)}if(E.target.id==="oj-next"||E.target.id==="oj-modal-next"){if(!O||k===-1){J.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}E.target.style.pointerEvents="none",E.target.style.cursor="not-allowed",yield W(O==null?void 0:O.identifier),o("0"),setTimeout(()=>{E.target.style.pointerEvents="auto",E.target.style.cursor="pointer"},400)}});(0,e.useEffect)(()=>{d(I==null?void 0:I.save_identifier);const E=v.findIndex(k=>k.some(T=>T.identifier===(I==null?void 0:I.save_identifier)));i(E===-1?It(be({},a),{page:1}):It(be({},a),{page:E+1}))},[I==null?void 0:I.save_identifier,v]);const P=E=>{a.page=1,a.tag_discipline_id=E,i(be({},a)),A(a)},s=()=>qe(void 0,null,function*(){const E=yield(0,Oe.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});N(E.tag_disciplines||[])}),B=E=>{a.page=1,a.difficulty=typeof E=="number"?E:null,i(be({},a)),A(a)},A=E=>qe(void 0,null,function*(){var k,T;w(!0);const O=yield(0,L.KC)(E);if(O!=null&&O.practices_list){for(var _=(k=O==null?void 0:O.practices_list)==null?void 0:k.length,b=[],y=0;y<_;y+=a==null?void 0:a.per_page)b.push((T=O==null?void 0:O.practices_list)==null?void 0:T.slice(y,y+(a==null?void 0:a.per_page)));i(It(be({},a),{total:O==null?void 0:O.practices_count})),f.current=(O==null?void 0:O.practices_list)||[],x(b)}w(!1)}),W=(E,k)=>qe(void 0,null,function*(){const T=yield(0,Oe.ZP)(`/api/practices/${E}/start`,{method:"get"});(T==null?void 0:T.status)===0&&F.history.push(`/problems/${T==null?void 0:T.identifier}/oj/${E}`)}),ae=E=>{a.page=E,i(be({},a))};return e.createElement("div",{className:Qe.wrap,id:"oj-drawer",style:{left:t?0:-700}},e.createElement("div",{className:Qe.head},e.createElement("div",{className:Qe.title},"\u9898\u76EE\u5217\u8868"),e.createElement(at.default.Search,{value:a==null?void 0:a.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:E=>{a.save_search=E.target.value,i(be({},a))},onSearch:()=>{a.page=1,a.search=a.save_search,i(be({},a)),A(a)}}),e.createElement(Me.default,{value:a==null?void 0:a.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:E=>E.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:P},c.map(E=>e.createElement(Me.default.Option,{key:E.id,value:E.id},E.name))),e.createElement(Me.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:E=>E.parentNode,value:a==null?void 0:a.difficulty,onChange:B},e.createElement(Me.default.Option,{value:1},"\u7B80\u5355"),e.createElement(Me.default.Option,{value:2},"\u9002\u4E2D"),e.createElement(Me.default.Option,{value:3},"\u56F0\u96BE"))),e.createElement("div",{className:Qe.content},e.createElement(pe.Z,{spinning:g},(u=v==null?void 0:v[a.page-1])==null?void 0:u.map(E=>e.createElement("div",{key:E.identifier,className:Qe.list,onClick:k=>W(E.identifier,k)},e.createElement("i",{style:{visibility:l===E.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),e.createElement("span",{style:{fontWeight:l===E.identifier?"bold":400,color:l===E.identifier?"#ffffff":"#bac4cd"},title:E==null?void 0:E.name},E.name),(E==null?void 0:E.difficulty)===1&&e.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(E==null?void 0:E.difficulty)===2&&e.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(E==null?void 0:E.difficulty)===3&&e.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),e.createElement("div",{className:Qe.footer},e.createElement($e.Z,{showTotal:E=>e.createElement("span",{style:{color:"#656F87"}},"\u5171",e.createElement("span",{className:"c-light-primary"},E),"\u6761\u6570\u636E"),total:a.total,pageSize:a==null?void 0:a.per_page,current:a==null?void 0:a.page,showSizeChanger:!1,onChange:ae,showQuickJumper:!0,hideOnSinglePage:!0})))},Va=({hack:t,onTriggerPraise:n,topicId:l,page:d,onPageChange:o,user:u,submitRecords:r,submitting:a,submitResult:i})=>{const[c]=(0,F.useSearchParams)(),N=(0,F.useLocation)(),[v,x]=(0,e.useState)(c.get("tab")||"0"),[g,w]=(0,e.useState)(0),[f,R]=(0,e.useState)(0),[I,C]=(0,e.useState)(0),[U,j]=(0,e.useState)(),[P,s]=(0,e.useState)(!1);function B(W){const ae=W.target.id;if(v==="3"&&ae!==v&&(f===1||f===2)){Q.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{x(ae)}});return}x(ae)}(0,e.useEffect)(()=>xt.Z.subscribe("to-commit-info",()=>{x("1")}),[]);function A(){x("2")}return e.createElement("div",{className:le["left-panel"]},e.createElement("ul",{className:`${le["s-navs"]} ${le["bg-white"]} ${le.b1}`},e.createElement("li",{className:"mr40 current"},e.createElement("img",{onClick:()=>s(!0),src:Hn})),e.createElement("li",{className:le["oj-mr"]},e.createElement("a",{className:v==="0"?le.active:"",id:"0",onClick:B},"\u4EFB\u52A1\u63CF\u8FF0")),e.createElement("li",{className:le["oj-mr"]},e.createElement("a",{className:v==="3"?le.active:"",id:"3",onClick:B},"\u9898\u89E3",I?`(${I})`:"")),e.createElement("li",{className:le["oj-mr"]},e.createElement("a",{className:v==="2"?le.active:"",id:"2",onClick:B},"\u8BC4\u8BBA",g?`(${g})`:"")),e.createElement("li",null,e.createElement("a",{className:v==="1"?le.active:"",id:"1",onClick:B},"\u63D0\u4EA4\u8BB0\u5F55"))),e.createElement("div",{className:`${le["tab-panel-body"]} ${v==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},e.createElement(Yn,{hack:t,onTriggerPraise:n,toDiscuss:A})),e.createElement("div",{className:`${le["tab-panel-body"]} ${v==="1"?"":"hide"}`},r!=null&&r.records_count?e.createElement(Rn,{page:d,onPageChange:o,topicId:l,submitting:a,submitRecords:r,submitResult:i}):e.createElement(Mt.Z,null)),e.createElement("div",{className:`${le["tab-panel-body"]} ${v==="2"?"":"hide"}`,style:{padding:0}},e.createElement(ml,{setDiscussTotal:w,user:u,identifier:t.identifier,hack:t,onTriggerPraise:n})),e.createElement("div",{className:`${le["tab-panel-body"]} ${v==="3"?"":"hide"}`,style:{padding:0}},e.createElement(Ra,{setListStatus:R,setFilterListTotal:C,tabStatus:v,identifier:t.identifier})),e.createElement(Qa,{visible:P,setIndex:x,onVisible:W=>s(W),value:U,onChange:W=>j(W)}))},Ha=m(36088),Ja=m(62522),$a=m(9939),Xa=m(92396),Ka=m(89392),qa=m.n(Ka),eu=m(56102),p=m(59301),tu=Object.defineProperty,nu=Object.defineProperties,lu=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,Sn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,wn=(t,n,l)=>n in t?tu(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Z=(t,n)=>{for(var l in n||(n={}))Sn.call(n,l)&&wn(t,l,n[l]);if(ot)for(var l of ot(n))xn.call(n,l)&&wn(t,l,n[l]);return t},q=(t,n)=>nu(t,lu(n)),au=(t,n)=>{var l={};for(var d in t)Sn.call(t,d)&&n.indexOf(d)<0&&(l[d]=t[d]);if(t!=null&&ot)for(var d of ot(t))n.indexOf(d)<0&&xn.call(t,d)&&(l[d]=t[d]);return l},ve=(t,n,l)=>new Promise((d,o)=>{var u=i=>{try{a(l.next(i))}catch(c){o(c)}},r=i=>{try{a(l.throw(i))}catch(c){o(c)}},a=i=>i.done?d(i.value):Promise.resolve(i.value).then(u,r);a((l=l.apply(t,n)).next())});const{Countdown:Fu}=Y.default,uu={Java:"java",C:"c",Python:"py","C++":"c"};var ru=(t=>(t[t.SET_LOADING=0]="SET_LOADING",t[t.GET_DATA=1]="GET_DATA",t[t.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",t[t.SET_DATA=3]="SET_DATA",t[t.SET_DEBUGING=4]="SET_DEBUGING",t[t.SET_SUBMITING=5]="SET_SUBMITING",t[t.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",t[t.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",t[t.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",t[t.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",t[t.SET_PAGE=10]="SET_PAGE",t[t.GET_LANGUAGE=11]="GET_LANGUAGE",t[t.GET_DRAWER=12]="GET_DRAWER",t))(ru||{});function ct(){return new Date().getTime()}const iu={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function ou(t,n){switch(n.type){case 1:return Z(Z({},t),n.payload);case 3:return q(Z({},t),{data:n.payload});case 0:return q(Z({},t),{loading:n.payload});case 11:return q(Z({},t),{languageList:n.payload});case 12:return q(Z({},t),{drawerData:n.payload});case 9:return q(Z({},t),{showNote:n.payload});case 4:return q(Z({},t),{debuging:n.payload});case 5:return q(Z({},t),{submitting:n.payload});case 2:return q(Z({},t),{submitRecords:n.payload});case 10:return q(Z({},t),{submitRecordPage:n.payload});case 6:return q(Z({},t),{executingMessage:n.payload});case 7:return Z(Z({},t),n.payload);case 8:return Z(Z({},t),n.payload);default:throw new Error}}var cu=({children:t})=>{var n,l,d,o;const[u,r]=(0,e.useReducer)(ou,iu),{id:a}=(0,F.useParams)(),i=(0,F.useLocation)(),[c]=(0,F.useSearchParams)(),{languageValue:N,languageList:v,loading:x,data:g,debugResult:w,submitResult:f,submitRecords:R,submitRecordPage:I,showNote:C,debuging:U,submitting:j,executingMessage:P}=u,[s,B]=(0,e.useState)("#FFF"),[A,W]=(0,e.useState)(null),[ae,E]=(0,e.useState)({}),[k,T]=(0,e.useState)(!1),O=(0,e.useRef)(null),_=(0,e.useRef)(null),b=g==null?void 0:g.user,y=g==null?void 0:g.hack;(0,e.useEffect)(()=>((0,F.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,F.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,F.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,F.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,e.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,e.useEffect)(()=>{var S;if(k){const H=document.getElementById("oj-next"),ue=document.getElementById("oj-modal-next");((S=H==null?void 0:H.style)==null?void 0:S.display)==="none"?ue.style.display="none":ue.style.display="block"}},[k]),(0,e.useEffect)(()=>{function S(){return ve(this,null,function*(){var H,ue,Se;const V=yield(0,L.fu)(a);if(V.status===401)document.location.href="/user/login";else{V.hack=V.practice,V.hack.code=Ne.Base64.decode((H=V==null?void 0:V.hack)==null?void 0:H.code);const xe=`${b==null?void 0:b.login}-language`;localStorage.getItem(xe)&&(V.hack.language=localStorage.getItem(xe)),_.current=qa().cloneDeep(V),_.current.language=(ue=V==null?void 0:V.hack)==null?void 0:ue.language,r({type:1,payload:{loading:!1,data:V}}),r({type:8,payload:{languageValue:(Se=V==null?void 0:V.hack)==null?void 0:Se.language}})}})}a&&S()},[a]),(0,e.useEffect)(()=>{r({type:8,payload:{debugResult:void 0}}),Ie(),T(!1)},[a]),(0,e.useEffect)(()=>{clearTimeout(O.current)},[a]),(0,e.useEffect)(()=>{X()},[a,I]);const De=()=>{window.parent.postMessage("backExercise","*")};function X(){return ve(this,null,function*(){try{const S=yield(0,L.zO)(a,{limit:15,page:I});r({type:2,payload:S})}catch(S){console.log(S)}})}function Ie(){return ve(this,null,function*(){try{const S=yield(0,L.dd)(a);r({type:11,payload:S==null?void 0:S.data})}catch(S){console.log(S)}})}function Ve(S){r({type:10,payload:S})}function Le(S){return ve(this,null,function*(){var H,ue,Se;const V=((Se=(ue=(H=window==null?void 0:window.location)==null?void 0:H.pathname)==null?void 0:ue.split("/"))==null?void 0:Se[2])||a;return yield(0,L.n4)(V,S||{code:Ne.Base64.encode(y.code),language:N})})}function He(){return ve(this,null,function*(){if(!j){r({type:5,payload:!0});try{if(xt.Z.publish("to-commit-info"),(yield Le()).status===0){let ke=function(){return ve(this,null,function*(){const{status:dt,data:Ye}=yield(0,L.rX)(a,"submit"),et=ct()-xe>(Se*V+3)*1e3;if(dt!==0&&!et&&setTimeout(ke,1e3),et){Q.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),r({type:5,payload:!1});return}if(dt===0){Ye.status===2&&Q.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const fu=yield(0,L.zO)(a,{limit:15,page:I});r({type:8,payload:q(Z({},u),{submitResult:Ye,submitting:!1,submitRecords:fu})}),(Ye==null?void 0:Ye.status)===0&&T(!0)}})},H={};if((yield(0,L.bM)(a,H)).status===-1&&c.get("exercisesId")){window.parent.location.href=`/classrooms/${c.get("coursesId")}/exercise/${c.get("exercisesId")}/detail`;return}const{time_limit:Se,test_case_size:V}=y,xe=ct();ke()}}catch(S){r({type:5,payload:!1})}}})}function D(){return ve(this,null,function*(){u.debuging=!0,r({type:4,payload:!0});try{if((yield Le()).status===0){let xe=function(){return ve(this,null,function*(){const{status:ke,message:dt,data:Ye}=yield(0,L.rX)(a,"debug"),et=ct()-V>(H+3)*1e3;if(ke!==0&&!et&&(r({type:6,payload:dt}),setTimeout(xe,1e3)),et){Q.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),r({type:4,payload:!1});return}ke===0&&(r({type:4,payload:!1}),Ye.status===2&&Q.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),r({type:7,payload:q(Z({},u),{debugResult:Ye,debuging:!1})}))})};const{time_limit:H}=y;let ue={input:encodeURIComponent(g.test_case.input)};if((yield(0,L.MU)(a,ue)).status===-1&&c.get("exercisesId")){window.parent.location.href=`/classrooms/${c.get("coursesId")}/exercise/${c.get("exercisesId")}/detail`;return}const V=ct();xe()}else r({type:4,payload:!1})}catch(S){console.log(S)}finally{}})}function z(S){var H;clearTimeout(O.current),O.current=setTimeout(()=>{var ue;Le({code:Ne.Base64.encode(S),language:(ue=_==null?void 0:_.current)==null?void 0:ue.language})},2e3),r({type:3,payload:q(Z({},_==null?void 0:_.current),{hack:q(Z({},(H=_==null?void 0:_.current)==null?void 0:H.hack),{code:S})})})}function ee(S){let H=S.target.value;r({type:3,payload:q(Z({},g),{test_case:{input:H}})})}const Re=S=>ve(void 0,null,function*(){var H;if(r({type:0,payload:!0}),(yield Le()).status===0){r({type:8,payload:{languageValue:S}}),_.current.language=S;const Se=`${b==null?void 0:b.login}-language`;localStorage.setItem(Se,S);const V=yield(0,L.dd)(a);if(V.status===0){const xe=(H=V==null?void 0:V.data)==null?void 0:H.find(ke=>ke.language===S);z(Ne.Base64.decode(xe.code))}setTimeout(()=>{r({type:0,payload:!1})},300)}});function oe(){return ve(this,null,function*(){try{const S=yield(0,L.H7)(a,{language:N});S.status===401?F.history.replace("/login",{from:i.pathname}):(z(Ne.Base64.decode(S.code)),Ie())}catch(S){console.log(S)}})}function st(){Q.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:p.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",p.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return ve(this,null,function*(){const S=yield(0,L.fi)(a,{language:N});S.status===401?F.history.replace("/login",{from:i.pathname}):z(Ne.Base64.decode(S.code))})}})}function he(){r({type:9,payload:!0})}function K(){r({type:9,payload:!1})}function Ue(S){return ve(this,null,function*(){yield(0,L.MK)(a,S),r({type:1,payload:{showNote:!1,data:q(Z({},g),{hack:q(Z({},y),{notes:S.notes})})}})})}const mu={input:(n=g==null?void 0:g.test_case)==null?void 0:n.input,is_file:(l=g==null?void 0:g.test_case)==null?void 0:l.is_file,language:((d=_.current)==null?void 0:d.language)||(y==null?void 0:y.language),code:y==null?void 0:y.code,title:"main."+uu[y==null?void 0:y.language],modify_code:y==null?void 0:y.modify_code,notes:y==null?void 0:y.notes,debugResult:w,debuging:U,submitting:j,executingMessage:P,id:a,languageValue:N,languageList:v,onChangeLanguage:Re,onCancelNote:K,onAddNote:Ue,showNote:C,onShowNote:he,onSubmitCode:He,onChangeCode:z,onChangeInput:ee,onDebugCode:D,onResetCode:oe,onSyncCode:st,onUpdateCode:Le};function Eu(){return ve(this,null,function*(){const{praise_count:S}=yield(0,L.vl)(y.id,{container_type:"Hack",type:1});let H=q(Z({},g),{hack:q(Z({},y),{praises_count:S,user_praise:!y.user_praise})});r({type:3,payload:H})})}const gu={topicId:a,submitResult:f,submitRecords:R,submitting:j,page:I,onPageChange:Ve,hack:y,user:g==null?void 0:g.user,onTriggerPraise:Eu};return console.log(g,_==null?void 0:_.current,"data--------"),p.createElement(p.Fragment,null,p.createElement(pe.Z,{className:"oj-custom-large-spin",size:"large",spinning:x},g?p.createElement("div",{className:"oj-custom-warp"},p.createElement("header",{className:lt.Z.header,style:{minWidth:1200}},p.createElement("div",null,p.createElement("img",{src:`${$.Z.IMG_SERVER}/images/${b.image_url}`,alt:"user",width:30}),p.createElement("span",null,b.name)),p.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},p.createElement("div",null,y.name),p.createElement(Ha.Z,{onChange:S=>{},className:"font12 c-grey-999"})),p.createElement(eu.CopyToClipboard,{text:`${(o=window.location)==null?void 0:o.origin}/problems/${y.identifier}/share`,onCopy:()=>J.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},p.createElement("span",{className:lt.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",p.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),y.edit_privilege?p.createElement(F.Link,{className:lt.Z.btn_back,to:`/problems/${y.identifier}/ojedit`,style:{marginRight:10}}," ",p.createElement(je.Z,null)," \u7F16\u8F91"):null,p.createElement(F.Link,{className:lt.Z.btn_back,onClick:()=>{},to:"/problems"}," ",p.createElement(te.Z,null),"\u9000\u51FA")),p.createElement(G.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:p.createElement(Va,Z({},gu)),rightChild:p.createElement(du,Z({},mu))})):null),p.createElement(Q.default,{centered:!0,closable:!1,width:680,footer:null,open:k,className:"oj-modal"},p.createElement("section",{className:"oj-modal-content"},p.createElement("div",{className:"oj-modal-head"},p.createElement("img",{src:Ja,alt:""}),p.createElement("i",{onClick:()=>T(!1),className:"iconfont icon-guanbi1"})),p.createElement("aside",null,p.createElement("img",{className:"mr30",src:Xa.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",p.createElement("span",{style:{color:"#75d6ba",marginRight:100}},f==null?void 0:f.execute_time,"s"),"\u4F18\u4E8E",p.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(f==null?void 0:f.time_better_than)||100,"%"),"\u7684\u7528\u6237"),p.createElement("aside",{className:"mb50"},p.createElement("img",{src:$a.Z,className:"mr30"}),p.createElement("span",{className:"oj-modal-tt"},p.createElement("span",null,p.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),p.createElement("span",{className:"c-light-primary"},f==null?void 0:f.execute_memory,"mb")),p.createElement("span",null,p.createElement("span",null))),"\u4F18\u4E8E",p.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(f==null?void 0:f.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),p.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function su({languageValue:t,languageList:n,onChangeLanguage:l,title:d,modify_code:o,onSyncCode:u,onShowCodeSetting:r,onResetCode:a}){const i=(0,F.useLocation)(),c=()=>{Q.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:p.createElement(re.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:a})};return p.createElement("div",{className:"action-bar"},p.createElement(Me.default,{className:"oj-select",value:t,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:l},n==null?void 0:n.map(N=>p.createElement(Me.default.Option,{key:N.language,value:N.language},N.language))),p.createElement("span",null),p.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:c},p.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),p.createElement("a",{onClick:r},p.createElement("i",{className:"iconfont icon-shezhi"})))}function du(t){var n=t,{id:l,input:d,is_file:o,showNote:u,onShowNote:r,notes:a,onCancelNote:i,onAddNote:c,debugResult:N,language:v,debuging:x,submitting:g,executingMessage:w,code:f,onSubmitCode:R,onDebugCode:I,onChangeCode:C,onChangeInput:U,onUpdateCode:j}=n,P=au(n,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function s(A){return p.createElement(su,q(Z({},P),{onShowCodeSetting:A}))}const B={id:l,input:d,debugResult:N,debuging:x,is_file:o,submitting:g,executingMessage:w,onDebugCode:I,onChangeCode:C,onSubmitCode:R,onChangeInput:U};return p.createElement("div",{className:"right-panel"},p.createElement(Tn,{onUpdateCode:()=>{},language:v,value:f,onChange:C,ActionBarRender:s}),p.createElement("div",{className:`note-form-area ${u?"active":""}`},p.createElement(zn,{onCancel:i,notes:a,callback:c})),p.createElement(vt.ZP,Z({},B)))}},48102:function(Je,fe,m){m.d(fe,{H7:function(){return Me},KC:function(){return Pe},M3:function(){return ze},MK:function(){return J},MU:function(){return F},Rg:function(){return mt},WH:function(){return ce},X6:function(){return Q},bM:function(){return te},bx:function(){return se},dd:function(){return $},de:function(){return tt},fi:function(){return L},fu:function(){return je},gu:function(){return ye},n4:function(){return G},qe:function(){return Fe},rL:function(){return Et},rX:function(){return pe},uc:function(){return gt},vl:function(){return re},wO:function(){return ne},zO:function(){return Y}});var e=m(58253);function je(h){return(0,e.U2)(`mypractices/${h}.json`,{hidePopLogin:!0})}function te(h,M){return(0,e.v_)(`mypractices/${h}/code_submit.json`,M)}function F(h,M){return(0,e.v_)(`mypractices/${h}/code_debug.json`,M)}function Y(h,M){return M.language&&(M.language=encodeURIComponent(M.language)),(0,e.U2)(`mypractices/${h}/submit_records.json`,M)}function Q(h){return(0,e.U2)("mypractices/record_detail.json",{id:h})}function pe(h,M){return(0,e.U2)(`mypractices/${h}/result.json`,{mode:M})}function J(h,M){return(0,e.v_)(`mypractices/${h}/add_notes.json`,M)}function Me(h,M){return(0,e.v_)(`mypractices/${h}/restore_initial_code.json`,M)}function L(h,M){return(0,e.v_)(`mypractices/${h}/sync_code.json`,M)}function G(h,M){return(0,e.v_)(`mypractices/${h}/update_code.json`,M)}function $(h){return(0,e.v_)(`mypractices/${h}/initial_codes.json`)}function re(h,M){return(0,e.v_)(`discusses/${h}/plus.json`,M)}function Pe(h){return(0,e.U2)("practices/practices_list.json",h)}function ce(h,M){return(0,e.U2)(`practices/${h}/question_solution_articles`,M)}function se(h,M){return(0,e.v_)(`practices/${h}/question_solution_articles`,M)}function ye(h,M){return(0,e.gz)(`practices/${h}/question_solution_articles/${M==null?void 0:M.active}`,M)}function ze(h,M){return(0,e.U2)(`practices/${h}/question_solution_articles/${M==null?void 0:M.active}/edit`,M)}function ne(h,M){return(0,e.U2)(`practices/${h}/question_solution_articles/${M==null?void 0:M.active}`,M)}function Fe(h,M){return(0,e.v_)(`practices/${h}/question_solution_articles/${M==null?void 0:M.active}/set_authority_or_excellent`,M)}function mt(h,M){return(0,e.v_)(`practices/${h}/question_solution_articles/${M==null?void 0:M.active}/praise_or_treads`,M)}function Et(h,M){return(0,e.v_)(`practices/${h}/question_solution_articles/${M==null?void 0:M.active}/hide`)}function tt(h,M){return(0,e.IV)(`practices/${h}/question_solution_articles/${M==null?void 0:M.active}`,M)}function gt(h,M){return(0,e.v_)(`mypractices/${h}/update_practice_time_sum`,M)}},49941:function(Je,fe,m){m.d(fe,{o:function(){return Me}});var e=m(58253),je=m(93125),te=m.n(je);let F="",Y,Q="";function pe(L){J(L)}function J(L){Y=new(te()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(G){console.log("addFileSuccess: "+G.file.name),L.addFileSuccess&&L.addFileSuccess(G),Y.startUpload()},onUploadstarted:function(G){const $=G.file.name;if(G.videoId){var Pe=`/api/users/${F}/video_auths.json`;(0,e.ZP)(Pe,{method:"put",body:{video_id:G.videoId,title:$,file_name:$,virtual_classroom_id:Q}}).then(ce=>{if(ce.status==-1){L.onUploadError&&L.onUploadError(G);return}const se=ce.data;var ye=se.UploadAuth,ze=se.UploadAddress,ne=se.VideoId;Y.setUploadAuthAndAddress(G,ye,ze)}).catch(ce=>{Y.deleteFile(Y._curIndex),Y.nextUpload(),console.log(ce)})}else{var re=`/api/users/${F}/video_auths.json`;const ce="";(0,e.ZP)(re,{method:"Post",body:{title:ce+$,file_name:ce+$,virtual_classroom_id:Q}}).then(se=>{if(se){const Fe=se.data;var ye=Fe.UploadAuth,ze=Fe.UploadAddress,ne=Fe.VideoId;Y.setUploadAuthAndAddress(G,ye,ze,ne)}}).catch(se=>{Y.deleteFile(Y._curIndex),Y.nextUpload(),console.log(se)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(G){L.onUploadSucceed&&L.onUploadSucceed(G),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(G,$,re){L.onUploadFailed&&L.onUploadFailed(G),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(G,$,re){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(G,$,re){L.onUploadProgress&&L.onUploadProgress(G,$,re);var Pe=Math.ceil(re*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(G){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var $=`/api/users/${F}/video_auths.json`;(0,e.ZP)($,{method:"put",body:{video_id:G.videoId}}).then(re=>{var ce=re.data.UploadAuth;Y.resumeUploadWithAuth(ce)}).catch(re=>{console.log(re)})},onUploadEnd:function(G){L.onUploadEnd&&L.onUploadEnd(G),console.log("onUploadEnd: uploaded all the files")}}),L.gotUploader&&L.gotUploader(Y)}function Me(L,G,$){L&&(F=L),G&&(Q=G),pe($)}},78706:function(Je,fe,m){m.d(fe,{BU:function(){return je},Dj:function(){return e},gH:function(){return te},vp:function(){return F}});function e(Y){try{Y.mozRequestFullScreen?Y.mozRequestFullScreen():Y.webkitRequestFullScreen&&Y.webkitRequestFullScreen()}catch(Q){console.log(Q,":e")}}function je(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const te=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function F(){var Y=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,Q=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",Y),window.isFullScreen?window.isFullScreen:Y!=null}}}]);