1 line
48 KiB
JavaScript
1 line
48 KiB
JavaScript
(this.webpackJsonp=this.webpackJsonp||[]).push([[45,6,68],{"+BJd":function(e,t,n){"use strict";n("cIOH"),n("6MrE")},"0Vyc":function(e,t,n){(t=n("JPst")(!1)).push([e.i,"/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.ant-tag {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgba(0, 0, 0, 0.65);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5;\n list-style: none;\n font-feature-settings: 'tnum';\n display: inline-block;\n height: auto;\n margin-right: 8px;\n padding: 0 7px;\n font-size: 12px;\n line-height: 20px;\n white-space: nowrap;\n background: #fafafa;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n cursor: default;\n opacity: 1;\n transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n}\n.ant-tag:hover {\n opacity: 0.85;\n}\n.ant-tag,\n.ant-tag a,\n.ant-tag a:hover {\n color: rgba(0, 0, 0, 0.65);\n}\n.ant-tag > a:first-child:last-child {\n display: inline-block;\n margin: 0 -8px;\n padding: 0 8px;\n}\n.ant-tag .anticon-close {\n display: inline-block;\n font-size: 12px;\n font-size: 10px \\9;\n transform: scale(0.83333333) rotate(0deg);\n margin-left: 3px;\n color: rgba(0, 0, 0, 0.45);\n font-weight: bold;\n cursor: pointer;\n transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n}\n:root .ant-tag .anticon-close {\n font-size: 12px;\n}\n.ant-tag .anticon-close:hover {\n color: rgba(0, 0, 0, 0.85);\n}\n.ant-tag-has-color {\n border-color: transparent;\n}\n.ant-tag-has-color,\n.ant-tag-has-color a,\n.ant-tag-has-color a:hover,\n.ant-tag-has-color .anticon-close,\n.ant-tag-has-color .anticon-close:hover {\n color: #fff;\n}\n.ant-tag-checkable {\n background-color: transparent;\n border-color: transparent;\n}\n.ant-tag-checkable:not(.ant-tag-checkable-checked):hover {\n color: #466aff;\n}\n.ant-tag-checkable:active,\n.ant-tag-checkable-checked {\n color: #fff;\n}\n.ant-tag-checkable-checked {\n background-color: #466aff;\n}\n.ant-tag-checkable:active {\n background-color: #304cd9;\n}\n.ant-tag-hidden {\n display: none;\n}\n.ant-tag-pink {\n color: #eb2f96;\n background: #fff0f6;\n border-color: #ffadd2;\n}\n.ant-tag-pink-inverse {\n color: #fff;\n background: #eb2f96;\n border-color: #eb2f96;\n}\n.ant-tag-magenta {\n color: #eb2f96;\n background: #fff0f6;\n border-color: #ffadd2;\n}\n.ant-tag-magenta-inverse {\n color: #fff;\n background: #eb2f96;\n border-color: #eb2f96;\n}\n.ant-tag-red {\n color: #f5222d;\n background: #fff1f0;\n border-color: #ffa39e;\n}\n.ant-tag-red-inverse {\n color: #fff;\n background: #f5222d;\n border-color: #f5222d;\n}\n.ant-tag-volcano {\n color: #fa541c;\n background: #fff2e8;\n border-color: #ffbb96;\n}\n.ant-tag-volcano-inverse {\n color: #fff;\n background: #fa541c;\n border-color: #fa541c;\n}\n.ant-tag-orange {\n color: #fa8c16;\n background: #fff7e6;\n border-color: #ffd591;\n}\n.ant-tag-orange-inverse {\n color: #fff;\n background: #fa8c16;\n border-color: #fa8c16;\n}\n.ant-tag-yellow {\n color: #fadb14;\n background: #feffe6;\n border-color: #fffb8f;\n}\n.ant-tag-yellow-inverse {\n color: #fff;\n background: #fadb14;\n border-color: #fadb14;\n}\n.ant-tag-gold {\n color: #faad14;\n background: #fffbe6;\n border-color: #ffe58f;\n}\n.ant-tag-gold-inverse {\n color: #fff;\n background: #faad14;\n border-color: #faad14;\n}\n.ant-tag-cyan {\n color: #13c2c2;\n background: #e6fffb;\n border-color: #87e8de;\n}\n.ant-tag-cyan-inverse {\n color: #fff;\n background: #13c2c2;\n border-color: #13c2c2;\n}\n.ant-tag-lime {\n color: #a0d911;\n background: #fcffe6;\n border-color: #eaff8f;\n}\n.ant-tag-lime-inverse {\n color: #fff;\n background: #a0d911;\n border-color: #a0d911;\n}\n.ant-tag-green {\n color: #52c41a;\n background: #f6ffed;\n border-color: #b7eb8f;\n}\n.ant-tag-green-inverse {\n color: #fff;\n background: #52c41a;\n border-color: #52c41a;\n}\n.ant-tag-blue {\n color: #1890ff;\n background: #e6f7ff;\n border-color: #91d5ff;\n}\n.ant-tag-blue-inverse {\n color: #fff;\n background: #1890ff;\n border-color: #1890ff;\n}\n.ant-tag-geekblue {\n color: #2f54eb;\n background: #f0f5ff;\n border-color: #adc6ff;\n}\n.ant-tag-geekblue-inverse {\n color: #fff;\n background: #2f54eb;\n border-color: #2f54eb;\n}\n.ant-tag-purple {\n color: #722ed1;\n background: #f9f0ff;\n border-color: #d3adf7;\n}\n.ant-tag-purple-inverse {\n color: #fff;\n background: #722ed1;\n border-color: #722ed1;\n}\n",""]),e.exports=t},"0X2M":function(e,t,n){"use strict";var a=n("Q3sF"),c=n("xcSo"),r=Array.prototype;e.exports=function(e){var t=e.lastIndexOf;return e===r||a(r,e)&&t===r.lastIndexOf?c:t}},"6MrE":function(e,t,n){var a=n("0Vyc");"string"==typeof a&&(a=[[e.i,a,""]]);n("aET+")(a,{hmr:!0,transform:void 0}),a.locals&&(e.exports=a.locals)},BfIq:function(e,t,n){e.exports=n("k2Gq")},CPca:function(e,t,n){},Dmw4:function(e,t,n){"use strict";n.r(t),n("DjyN");var a=n("NUBc"),c=n("EcSs"),r=n.n(c),o=n("zLi2"),l=n.n(o),i=(n("OaEy"),n("2fM7")),s=n("o+MX"),u=n.n(s),f=n("lHQ6"),d=n.n(f),m=n("FLGM"),p=n.n(m),g=n("cDcd"),h=n.n(g),v=(n("CPca"),n("AH3D"),n("Ynxi"),n("0o9m"),n("2w7y"),n("spEH")),b=n("MT78"),y=function(e){var t=e.data;return Object(g.useEffect)((function(){var e,n,a,c;t&&(e=t,n=document.getElementById("Line"),a=b.init(n),c={color:["#f8e367","#58c0f0","#ff9e48"],title:{show:!1},tooltip:{trigger:"axis"},legend:{data:["提交数","疑修数","合并请求数"],right:"center",bottom:"4%"},grid:{left:"4%",right:"5%",bottom:"16%",containLabel:!0},toolbox:{feature:{}},xAxis:{type:"category",boundaryGap:!1,data:e.dates,axisTick:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},minInterval:1,splitNumber:5},series:[{name:"提交数",type:"line",data:e.commits_count},{name:"疑修数",type:"line",data:e.issues_count},{name:"合并请求数",type:"line",data:e.pull_requests_count}]},a.setOption(c))}),[t]),h.a.createElement("div",{id:"Line",style:{height:"300px"}})},E=n("guyh"),w=n.n(E),j=n("5PDf"),x=n.n(j),k=n("wd/R"),O=n.n(k),C=n("vDqi"),_=n.n(C),S=function(e){var t=e.userLogin,n=e.time,a=e.chooseTime,c=Object(g.useState)(""),r=l()(c,2),o=r[0],i=r[1],s=Object(g.useState)(""),f=l()(s,2),m=f[0],p=f[1];function v(e){for(var t=+b.number.parseDate(m),n=+b.number.parseDate(o),a=[],c=function(){var t=y(r),n=x()(e).call(e,(function(e){return e.date===t}));n&&n.length>0?a.push([n[0].date,n[0].contributions]):a.push([t,0])},r=t;r<=n;r+=864e5)c();return a}function y(e){var t=new Date(e);return t.getFullYear()+"-"+(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-"+(t.getDate()<10?"0"+t.getDate():t.getDate())}return Object(g.useEffect)((function(){var e,t;n&&(e="".concat(n,"-12-31"),t="".concat(n,"-01-01"),i(e),p(t))}),[n]),Object(g.useEffect)((function(){var e;m&&o&&(e="/users/".concat(t,"/headmaps.json"),_.a.get(e,{params:{year:n}}).then((function(e){if(e&&e.data){var t=[],n=!0;e.data.headmaps&&e.data.headmaps.length>0?(t=e.data.headmaps,n=!0):(t=[{contributions:"",date:y(+b.number.parseDate(m))}],n=!1),w()(t).call(t,(c="contributions",function(e,t){return e[c]-t[c]})),function(e,t,n){for(var c,r,l=[],i=r=t>500?6:t<=500&&t>200?5:t<=200&&t>100?4:t<=100&&t>=30?3:t<30&&t>=10?2:1;i>0;i--){var s={gt:d()(t/r*(i-1)+1,0),lte:d()(t/r*i,0)};l.push(s)}var f=document.getElementById("Calendar"),p=b.init(f),g={title:{show:!1},tooltip:{formatter:function(e){return e.data[0]+": "+e.data[1]+"个贡献"}},visualMap:{min:0,max:t,type:"piecewise",orient:"horizontal",left:"center",bottom:40,inRange:{color:n?["#fafafa","#216e39"]:["#fff","#fff"]},show:n,pieces:u()(c=[]).call(c,l,[{max:1,label:"0"}]),itemGap:25},calendar:{top:50,left:40,right:30,cellSize:["auto",13],range:[m,o],splitLine:{show:!1,lineStyle:{color:"#fff",width:1,type:"solid"}},itemStyle:{borderWidth:.5},yearLabel:{show:!1},monthLabel:{nameMap:"cn"},dayLabel:{nameMap:"cn",firstDay:1}},series:{type:"heatmap",coordinateSystem:"calendar",data:v(e)}};p.setOption(g),p.on("click",(function(e){a(e.data)}))}(t,t[t.length-1].contributions,n)}var c})).catch((function(e){})))}),[m,o]),h.a.createElement("div",{id:"Calendar",style:{height:"210px"}})},N=n("NmTA"),A=n("2iEm"),D=(n("+BJd"),n("mr32")),B=n("sYIF"),I=n("PhNK"),P=function(e){var t=e.list;function n(e,t,n,a){var c,r,o,l,i,s,f,d=t.owner,m=t.identifier;switch(e){case"Issue":return u()(c=u()(r="/".concat(d&&d.login,"/")).call(r,m,"/issues/")).call(c,n);case"VersionRelease":return u()(o="/".concat(d&&d.login,"/")).call(o,m,"/releases");case"PullRequest":return u()(l=u()(i="/".concat(d&&d.login,"/")).call(i,m,"/pulls/")).call(l,n);case"CommitLog":var p=a&&a.commit_id;return u()(s=u()(f="/".concat(d&&d.login,"/")).call(f,m,"/commits/")).call(s,Object(I.b)(p));default:return""}}return h.a.createElement("ul",{className:"infosActivity"},p()(t).call(t,(function(e,t){return h.a.createElement("li",null,h.a.createElement(A.a,{to:"/".concat(e.user_login)},h.a.createElement("img",{src:Object(B.h)("".concat(e.user_avatar)),alt:"",className:"aImg"})),h.a.createElement("div",{className:"aInfos"},h.a.createElement(v.a,null,h.a.createElement(A.a,{to:"/".concat(e.user_login),className:"name"},e.user_name),h.a.createElement("span",{className:"time"},e.action_time),e.priority&&("","#e74c3c",c="高"===(a="".concat(e.priority))?"#e67e22":"正常"===a?"#28be6c":"低"===a?"#1abc9c":"#e74c3c",h.a.createElement(D.a,{color:c,className:"",style:{height:"25px",lineHeight:"23px"}},a)),e.issue_status&&h.a.createElement("span",{className:"status"},e.issue_status)),h.a.createElement("p",{className:"aDesc"},h.a.createElement(A.a,{to:n(e.trend_type,e.project,e.trend_id,e.commit_log)},e.action_type,":",e.name))));var a,c})))},T=n("2CTR"),R=n("ZX6M"),M=i.a.Option;t.default=function(e){var t,n=Object(g.useState)(1),c=l()(n,2),o=c[0],s=c[1],f=Object(g.useState)(0),m=l()(f,2),b=m[0],E=m[1],w=Object(g.useState)(void 0),j=l()(w,2),x=j[0],k=j[1],C=Object(g.useState)(O()().get("year")),A=l()(C,2),D=A[0],B=A[1],I=Object(g.useState)(void 0),L=l()(I,2),V=L[0],q=L[1],F=Object(g.useState)(void 0),G=l()(F,2),H=G[0],U=G[1],K=Object(g.useState)(void 0),z=l()(K,2),J=z[0],Q=z[1],X=e.match.params.username,Z=e.current_user,Y=e.menuKey,W=e.user;return Object(g.useEffect)((function(){if(W){var e,t,n=W.username,a=W.login;document.title="0"===Y?u()(e="".concat(n,"(")).call(e,a,")"):u()(t="个人简介-".concat(n,"/")).call(t,a)}}),[Y]),Object(g.useEffect)((function(){if(W){for(var e=W.created_time&&W.created_time.split("-")[0],t=[],n=O()().get("year");n>=d()(e,0);n--)t.push(n);q(t)}}),[W]),Object(g.useEffect)((function(){var e;e="/users/".concat(X,"/project_trends.json"),_.a.get(e,{params:{date:H,limit:5,page:o}}).then((function(e){e&&e.data&&(k(e.data.project_trends),E(e.data.total_count))})).catch((function(e){}))}),[H,o]),Object(g.useEffect)((function(){var e;e="/users/".concat(X,"/statistics/activity.json"),_.a.get(e).then((function(e){e&&e.data&&Q(e.data)})).catch((function(e){}))}),[]),Y&&"0"===Y?h.a.createElement("div",null,h.a.createElement("div",null,h.a.createElement(N.a,r()({},e,{userLogin:X,current:Z&&Z.login===X}))),h.a.createElement("div",{className:"recentStatic"},h.a.createElement("p",{className:"font-18 mb15"},"近期活动统计"),h.a.createElement("div",{className:"echartBox"},h.a.createElement(y,{data:J}))),h.a.createElement("div",{className:"calendarStatic"},h.a.createElement(v.j,{style:{marginBottom:"15px"}},h.a.createElement("span",{className:"font-18"},"贡献度"),h.a.createElement(i.a,{style:{width:"200px"},placeholder:"选择年份",value:D,onSelect:function(e){B(e),U(void 0)}},V&&(t=V,p()(t).call(t,(function(e,t){return h.a.createElement(M,{key:e},e)}))))),h.a.createElement("div",{className:"echartBox"},h.a.createElement(S,{time:D,userLogin:X,chooseTime:function(e){e&&(s(1),U(e[0]))}}))),h.a.createElement("div",{className:"activeStatic"},h.a.createElement("span",{className:"font-18"},"动态"),x&&x.length>0&&h.a.createElement(P,{list:x}),x&&0===x.length&&h.a.createElement(T.a,{_html:"暂无动态"}),b>5&&h.a.createElement("div",{style:{textAlign:"center",paddingBottom:"30px"}},h.a.createElement(a.a,{pageSize:5,current:o,total:b,onChange:function(e){return s(e)}})))):h.a.createElement(R.default,e)}},E7Zm:function(e,t,n){"use strict";var a=n("Ijsr");e.exports=a},Ijsr:function(e,t,n){"use strict";var a=n("Q3sF"),c=n("YqT+"),r=Array.prototype;e.exports=function(e){var t=e.sort;return e===r||a(r,e)&&t===r.sort?c:t}},L0rg:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAAABHNCSVQICAgIfAhkiAAAAmtJREFUaEPtW8FxwjAQxDQQOkioIAYKCKkg6SB5AMMvUAGkBH4eeCR0QAmkABjTgdNBGgBnxVhgGGxJSMgGn19gSafb29PpJA6nVJDHKQjOUjGBuq5bKZfLH3ln2XGc1WKxmKnoecBoo9Fgg19UBGTVd71eV33fD2TnPwBar9fnsNaT7OAs+wHoM4DOZXVIBBqG4S+ESFtMdkKdfpwE6FbCZx+y/hLkzeDao3hbGtDP5XI51FHM9FgsrZDJjICmij9mnIDCarlmFPpN4b4HSwvfB5zmm2CUgTkVjLhrn2q/StcloFGwIkb5Ao4nDHkORuS6Jly30+m8wpJvYLpybiKA8M8ymel4PFZKyPl8aVGV9TESdQGUKXl3Lsj4OJyQqp7nKaeXBDSyohFGW61WE0w0DTDq59p1DQDUFmHFdbW1NCCAgJpcowYI0RZhhVFsLz3soSr3Sf3JZMJuAYw9toBuT/eyD4zyA6AmovRuSitA2+12gMzmXgHoCEB7sv1l+lkB2u12HzabDUsDhSkg2AwA8ltGeZU+VoCqKHSpvgSUtpf9BTfdGRX2hoEShoQQSwmDxt5jZXuhhEGDIdWhVhhVVeoS/QkoZUaUGe2LNY4zI3ZTj3cDnEndS6y/BJkB3vf59aiVNap68DZlDBjXx9m2xuTdNFDgW4HRrRdZARr9yDTEfI+m2BLJYSVAWCo9q64rUspGuxVGbQARzVE4oCmVY01urJsov6HKsZjvg9EaiiJ3vxRc5Z0RY/RU5RjHyQoij+t5qYxVFAGzbtet130H7V9ZgxDND7ddocRWKecu5p8HRJa85vbCMPoPOc/Xd/8AMkUAAAAASUVORK5CYII="},NmTA:function(e,t,n){"use strict";var a=n("zLi2"),c=n.n(a),r=n("o+MX"),o=n.n(r),l=n("FLGM"),i=n.n(l),s=n("cDcd"),u=n.n(s),f=n("spEH"),d=n("2iEm"),m=n("vDqi"),p=n.n(m),g=(n("2qtc"),n("kLXV")),h=(n("T2oS"),n("W9HT")),v=(n("sRBo"),n("kaz8")),b=(n("5NDa"),n("5rEg")),y=n("lHQ6"),E=n.n(y),w=n("ZbhI"),j=n.n(w),x=n("M5Mt"),k=n.n(x),O=n("5PDf"),C=n.n(O),_=n("aqs5"),S=b.a.Search,N=function(e){var t=e.visible,n=e.onCancel,a=e.onSure,r=e.type,l=e.username,f=e.choosed,d=e.history,m=e.showCompeleteDialog,b=e.completeProfile,y=Object(s.useState)(1),w=c()(y,2),x=w[0],O=w[1],N=Object(s.useState)(0),A=c()(N,2),D=A[0],B=A[1],I=Object(s.useState)(!1),P=c()(I,2),T=P[0],R=P[1],M=Object(s.useState)(""),L=c()(M,2),V=L[0],q=L[1],F=Object(s.useState)([]),G=c()(F,2),H=G[0],U=G[1],K=Object(s.useState)([]),z=c()(K,2),J=z[0],Q=z[1],X=Object(s.useState)(!0),Z=c()(X,2),Y=Z[0],W=Z[1],$=Object(s.useState)(!1),ee=c()($,2),te=ee[0],ne=ee[1],ae=Object(s.useState)([]),ce=c()(ae,2),re=ce[0],oe=ce[1],le=Object(s.useState)([]),ie=c()(le,2),se=ie[0],ue=ie[1];function fe(e,t){var n,a=o()(n="/".concat(r||"users","/")).call(n,l,"/projects.json");p.a.get(a,{params:{page:e,limit:20,is_public:"public",search:t,choosed:f}}).then((function(e){if(e&&e.data){var t=V?e.data.projects:(c=H,r=e.data.projects,i()(c).call(c,(function(e,t){if(""!==e){var n=j()(r).call(r,e);n>-1&&k()(r).call(r,n,1)}})),c=o()(c).call(c,r));ue(V?se:t),B(e.data.count),U(t),W(!1);var n=E()(e.data.count/20,0),a=e.data.count%20;R(a>0?n+1:n)}var c,r})).catch((function(e){}))}return Object(s.useEffect)((function(){t?(W(!0),fe()):(q(""),ue([]),oe([]),U([]))}),[t]),Object(s.useEffect)((function(){x>1&&(W(!0),fe(x,void 0))}),[x]),Object(s.useEffect)((function(){t&&f&&f.length>0&&Q(f)}),[t,f]),Object(s.useEffect)((function(){J&&6===J.length?ne(!0):ne(!1)}),[J]),u.a.createElement(g.a,{visible:t,title:"选择精选项目",closable:!0,width:500,className:"ConcentrateBox",onCancel:n,onOk:function(){a&&a(J),Q([])},okText:"确定",cancelText:"取消"},u.a.createElement(h.a,{spinning:Y},u.a.createElement("div",{className:"operateDiv"},u.a.createElement("p",null,"最多可选取6个公开仓库"),u.a.createElement(S,{placeholder:"请输入项目名称进行搜索",onSearch:function(e){e===V&&""===e||(ue(H),J&&J.length>0?function(e){if(e&&e.length>0){for(var t=[],n=0;n<e.length;n++){var a=C()(se).call(se,(function(t){return t.id===e[n]}));a&&a.length>0&&t.push(a[0])}oe(t)}}(J):oe([]),O(1),q(e),fe(1,e))},enterButton:"搜索",allowClear:!0,value:V,onChange:function(e){return q(e.target.value)}})),u.a.createElement("div",{className:"conbox"},u.a.createElement(v.a.Group,{value:J,onChange:function(e){Q(e)}},re&&re.length>0&&i()(re).call(re,(function(e,t){return u.a.createElement(v.a,{value:e.id,disabled:te&&0===C()(J).call(J,(function(t){return t===e.id})).length},e.author&&"".concat(e.author.name,"/"),e.name)})),H&&H.length>0&&i()(H).call(H,(function(e,t){return!(re&&re.length>0&&0!==C()(re).call(re,(function(t){return t.id===e.id})).length)&&u.a.createElement(v.a,{value:e.id,disabled:te&&0===C()(J).call(J,(function(t){return t===e.id})).length},e.author&&"".concat(e.author.name,"/"),e.name)})))),D>20&&x<T&&u.a.createElement("div",{className:"morelist",onClick:function(){return O(x+1)}},"查看更多"),H&&0===H.length&&re&&0===re.length&&u.a.createElement("div",{style:{textAlign:"center"}},"您还没有公开的",V&&"“".concat(V,"”"),"项目,先去",u.a.createElement(_.a,{showCompeleteDialog:m,completeProfile:b,sureFunc:function(){d.push("/projects/deposit/new".concat(r?"/".concat(l):""))},className:"color-blue"},"新建项目"))))};n("CPca"),t.a=function(e){var t=e.userLogin,n=e.current,a=e.showCompeleteDialog,r=e.completeProfile,l=e.history,m=e.type,g=e.title,h=e.typeFlag,v=e.btn,b=e.emptyContent,y=Object(s.useState)(void 0),E=c()(y,2),w=E[0],j=E[1],x=Object(s.useState)(!1),k=c()(x,2),O=k[0],C=k[1],_=Object(s.useState)([]),S=c()(_,2),A=S[0],D=S[1];function B(){var e,n=o()(e="/".concat(m||"users","/")).call(e,t,"/is_pinned_projects.json");p.a.get(n).then((function(e){if(e&&e.data){var t=e.data.projects;if(j(t),t&&t.length>0){var n=i()(t).call(t,(function(e){return e.project_id}));D(n)}}})).catch((function(e){}))}return Object(s.useEffect)((function(){B()}),[]),u.a.createElement(u.a.Fragment,null,u.a.createElement(N,{visible:O,onCancel:function(){return C(!1)},onSure:function(e){var n;e&&0===e.length&&D([]);var a=o()(n="/".concat(m||"users","/")).call(n,t,"/is_pinned_projects/pin.json");p.a.post(a,{is_pinned_project_ids:e}).then((function(e){e&&e.data&&(C(!1),B())})).catch((function(e){}))},username:t,choosed:A,completeProfile:r,showCompeleteDialog:a,history:l,type:m}),u.a.createElement("div",{className:"concentrate"},u.a.createElement(f.j,null,g||u.a.createElement("span",{className:"font-18"},"精选项目"),n&&(v&&w&&w.length>0||!v)&&u.a.createElement("a",{className:"color-blue",onClick:function(){return C(!0)}},v||"自定义精选项目")),w&&w.length>0&&u.a.createElement("div",null,u.a.createElement("ul",{className:"concentrateUl"},i()(w).call(w,(function(e,t){var n,a;return u.a.createElement("li",{key:e.id},u.a.createElement("a",{href:o()(n="/".concat(e.author&&e.author.login,"/")).call(n,e.identifier),className:"name task-hide"},e.name),u.a.createElement("p",{className:"task-hide desc"},e.description),e.topics&&u.a.createElement("div",{className:"viewProListTopics mt10"},i()(a=e.topics).call(a,(function(e){var t;return u.a.createElement(d.a,{to:o()(t="/explore/topic/".concat(e.id,"/")).call(t,encodeURIComponent(e.name)),className:"viewProListTopic mr15 font-13 task-hide"},e.name)}))),u.a.createElement(f.a,null,e.category&&!h&&u.a.createElement("span",{className:"tagName"},e.category.name),u.a.createElement("span",{className:"pariseCount ml2"},u.a.createElement("i",{className:"iconfont icon-xingzhuang"}),e.watchers_count),u.a.createElement("span",{className:"forkCount"},u.a.createElement("i",{className:"iconfont icon-morenfuke_icon1"}),e.forked_count)))}))))),!b&&w&&0===w.length&&n&&u.a.createElement("div",{className:"ConcentrateTip"},u.a.createElement("i",{className:"iconfont icon-tishi2"}),"你还没有设置精选项目,",u.a.createElement("a",{onClick:function(){return C(!0)}},"点击设置")),b&&w&&0===w.length?u.a.createElement("div",{className:"ConcentrateTipImg"},b,u.a.createElement("span",{className:"font-15"},"暂无数据",n&&u.a.createElement("span",null,",",u.a.createElement("a",{className:"color-blue",onClick:function(){return C(!0)}},"点击设置")))):"")}},OG05:function(e,t,n){"use strict";var a=n("pevS"),c=n("hVCs");a({target:"Array",proto:!0,forced:c!==[].lastIndexOf},{lastIndexOf:c})},OLNe:function(e,t,n){"use strict";var a=n("lxfd").match(/firefox\/(\d+)/i);e.exports=!!a&&+a[1]},ThW4:function(e,t,n){},"YqT+":function(e,t,n){"use strict";n("hFpA");var a=n("wY6U");e.exports=a("Array","sort")},ZX6M:function(e,t,n){"use strict";n.r(t),n("/zsF");var a=n("PArb"),c=(n("+L6B"),n("2/Rp")),r=n("zLi2"),o=n.n(r),l=n("cDcd"),i=n.n(l),s=(n("ThW4"),n("p7gc")),u=n("bjH3"),f=n("vDqi"),d=n.n(f);t.default=function(e){var t=e.user,r=e.current_user,f=e.generalFetchUser,m=Object(l.useState)(!1),p=o()(m,2),g=p[0],h=p[1],v=Object(l.useState)(!1),b=o()(v,2),y=b[0],E=b[1],w=Object(l.useState)(""),j=o()(w,2),x=j[0],k=j[1],O=Object(l.useState)(""),C=o()(O,2),_=C[0],S=C[1];return Object(l.useEffect)((function(){t&&t.super_description&&(k(t.super_description),S(t.super_description),E(!0))}),[t&&t.super_description]),i.a.createElement("div",null,x||y?t&&r&&t.login===r.login&&i.a.createElement("div",{className:"editPanel"},g?i.a.createElement("div",null,i.a.createElement(c.a,{ghost:!0,onClick:function(){return _||E(!1),k(_),void h(!1)}},"取消"),i.a.createElement(c.a,{type:"primary",ghost:!0,onClick:function(){var e="/users/".concat(t&&t.login,".json"),n={user:{user_extension_attributes:{super_description:x}}};d.a.put(e,n).then((function(e){e&&e.data&&(S(x),h(!1),E(!!x),f&&f())}))}},"保存")):i.a.createElement(c.a,{type:"primary",ghost:!0,onClick:function(){return h(!0)}},"编辑")):i.a.createElement("div",{className:"emptyDescBox"},i.a.createElement("img",{src:n("L0rg"),alt:"",width:"58px"}),i.a.createElement("p",{className:"emptyMain"},"暂无数据"),r&&t&&r.login===t.login&&i.a.createElement("div",{className:"emptyContent"},i.a.createElement("p",{className:"emptysub"},"您可以在此页面定制化您的个人简介信息,包括开发者介绍,宣传链接,宣传图片等"),i.a.createElement(a.a,{className:"divider"}),i.a.createElement("a",{className:"fullBtn",onClick:function(){E(!0),h(!0)}},"编辑个人简介"))),y?i.a.createElement("div",{className:"padding20"},g?i.a.createElement(s.a,{placeholder:"请输入个人简介",height:500,mdID:"personal-description",initValue:x||"",onChange:function(e){k(e)},isCanAtme:!1}):i.a.createElement(u.a,{className:"break_word_comments imageLayerParent",value:x||"",url:e.history.location})):"")}},eXKH:function(e,t,n){},ex8r:function(e,t,n){},guyh:function(e,t,n){e.exports=n("E7Zm")},hFpA:function(e,t,n){"use strict";var a=n("pevS"),c=n("zhhU"),r=n("Thnc"),o=n("T/97"),l=n("x08Q"),i=n("dBux"),s=n("jBKu"),u=n("Bvq2"),f=n("reVg"),d=n("n2Hk"),m=n("OLNe"),p=n("pGXS"),g=n("SqY4"),h=n("qT3J"),v=[],b=c(v.sort),y=c(v.push),E=u((function(){v.sort(void 0)})),w=u((function(){v.sort(null)})),j=d("sort"),x=!u((function(){if(g)return g<70;if(!(m&&m>3)){if(p)return!0;if(h)return h<603;var e,t,n,a,c="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(a=0;a<47;a++)v.push({k:t+a,v:n})}for(v.sort((function(e,t){return t.v-e.v})),a=0;a<v.length;a++)t=v[a].k.charAt(0),c.charAt(c.length-1)!==t&&(c+=t);return"DGBEFHACIJK"!==c}}));a({target:"Array",proto:!0,forced:E||!w||!j||!x},{sort:function(e){void 0!==e&&r(e);var t=o(this);if(x)return void 0===e?b(t):b(t,e);var n,a,c=[],u=l(t);for(a=0;a<u;a++)a in t&&y(c,t[a]);for(f(c,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:s(t)>s(n)?1:-1}}(e)),n=l(c),a=0;a<n;)t[a]=c[a++];for(;a<u;)i(t,a++);return t}})},hVCs:function(e,t,n){"use strict";var a=n("oLk2"),c=n("pCEo"),r=n("x9K+"),o=n("x08Q"),l=n("n2Hk"),i=Math.min,s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0,f=l("lastIndexOf"),d=u||!f;e.exports=d?function(e){if(u)return a(s,this,arguments)||0;var t=c(this),n=o(t);if(0===n)return-1;var l=n-1;for(arguments.length>1&&(l=i(l,r(arguments[1]))),l<0&&(l=n+l);l>=0;l--)if(l in t&&t[l]===e)return l||0;return-1}:s},k2Gq:function(e,t,n){"use strict";var a=n("0X2M");e.exports=a},mr32:function(e,t,n){"use strict";var a=n("cDcd"),c=n("eHJ2"),r=n.n(c),o=n("BGR+"),l=n("VCL8"),i=n("CtXQ"),s=n("H84U");function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(a=Object.getOwnPropertySymbols(e);c<a.length;c++)t.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(e,a[c])&&(n[a[c]]=e[a[c]])}return n},y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(o,e);var t,n,c=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=v(e);if(t){var c=v(this).constructor;n=Reflect.construct(a,arguments,c)}else n=a.apply(this,arguments);return h(this,n)}}(o);function o(){var e;return m(this,o),(e=c.apply(this,arguments)).handleClick=function(){var t=e.props,n=t.checked,a=t.onChange;a&&a(!n)},e.renderCheckableTag=function(t){var n,c=t.getPrefixCls,o=e.props,l=o.prefixCls,i=o.className,s=o.checked,u=b(o,["prefixCls","className","checked"]),m=c("tag",l),p=r()(m,(d(n={},"".concat(m,"-checkable"),!0),d(n,"".concat(m,"-checkable-checked"),s),n),i);return delete u.onChange,a.createElement("span",f({},u,{className:p,onClick:e.handleClick}))},e}return t=o,(n=[{key:"render",value:function(){return a.createElement(s.a,null,this.renderCheckableTag)}}])&&p(t.prototype,n),o}(a.Component),E=n("09Wf"),w=n("6CfX"),j=n("g0mS");function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(){return(O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function C(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A=new RegExp("^(".concat(E.a.join("|"),")(-inverse)?$")),D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(u,e);var t,n,c,l=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=N(e);if(t){var c=N(this).constructor;n=Reflect.construct(a,arguments,c)}else n=a.apply(this,arguments);return S(this,n)}}(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=l.call(this,e)).state={visible:!0},t.handleIconClick=function(e){e.stopPropagation(),t.setVisible(!1,e)},t.renderTag=function(e){var n=t.props,c=n.children,r=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(a=Object.getOwnPropertySymbols(e);c<a.length;c++)t.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(e,a[c])&&(n[a[c]]=e[a[c]])}return n}(n,["children"]),l="onClick"in r||c&&"a"===c.type,i=Object(o.a)(r,["onClose","afterClose","color","visible","closable","prefixCls"]);return l?a.createElement(j.a,null,a.createElement("span",O({},i,{className:t.getTagClassName(e),style:t.getTagStyle()}),c,t.renderCloseIcon())):a.createElement("span",O({},i,{className:t.getTagClassName(e),style:t.getTagStyle()}),c,t.renderCloseIcon())},Object(w.a)(!("afterClose"in e),"Tag","'afterClose' will be deprecated, please use 'onClose', we will remove this in the next version."),t}return t=u,c=[{key:"getDerivedStateFromProps",value:function(e){return"visible"in e?{visible:e.visible}:null}}],(n=[{key:"getTagStyle",value:function(){var e=this.props,t=e.color,n=e.style,a=this.isPresetColor();return O({backgroundColor:t&&!a?t:void 0},n)}},{key:"getTagClassName",value:function(e){var t,n=e.getPrefixCls,a=this.props,c=a.prefixCls,o=a.className,l=a.color,i=this.state.visible,s=this.isPresetColor(),u=n("tag",c);return r()(u,(k(t={},"".concat(u,"-").concat(l),s),k(t,"".concat(u,"-has-color"),l&&!s),k(t,"".concat(u,"-hidden"),!i),t),o)}},{key:"setVisible",value:function(e,t){var n=this.props,a=n.onClose,c=n.afterClose;a&&a(t),c&&!a&&c(),t.defaultPrevented||"visible"in this.props||this.setState({visible:e})}},{key:"isPresetColor",value:function(){var e=this.props.color;return!!e&&A.test(e)}},{key:"renderCloseIcon",value:function(){return this.props.closable?a.createElement(i.a,{type:"close",onClick:this.handleIconClick}):null}},{key:"render",value:function(){return a.createElement(s.a,null,this.renderTag)}}])&&C(t.prototype,n),c&&C(t,c),u}(a.Component);D.CheckableTag=y,D.defaultProps={closable:!1},Object(l.polyfill)(D),t.a=D},"p77/":function(e,t,n){},p7gc:function(e,t,n){"use strict";var a=n("UtpJ"),c=n.n(a),r=n("O0yt"),o=n.n(r),l=n("Dcj1"),i=n.n(l),s=n("6UaR"),u=n.n(s),f=n("zLi2"),d=n.n(f),m=n("IeeE"),p=n.n(m),g=n("RKTd"),h=n.n(g),v=n("pPxq"),b=n.n(v),y=n("o+MX"),E=n.n(y),w=n("FLGM"),j=n.n(w),x=n("BfIq"),k=n.n(x),O=n("BF1V"),C=n.n(O),_=n("0lTi"),S=n.n(_),N=n("lHQ6"),A=n.n(N),D=n("ZbhI"),B=n.n(D),I=n("UF4K"),P=n.n(I),T=n("xlHU"),R=n.n(T),M=n("5tqG"),L=n.n(M),V=n("cDcd"),q=n.n(V),F=n("sYIF"),G=n("bdgK"),H=n("vDqi"),U=n.n(H);function K(e,t){var n=void 0!==o.a&&i()(e)||e["@@iterator"];if(!n){if(u()(e)||(n=function(e,t){if(e){var n;if("string"==typeof e)return z(e,t);var a=c()(n={}.toString.call(e)).call(n,8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?S()(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,s=!0,f=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){f=!0,l=e},f:function(){try{s||null==n.return||n.return()}finally{if(f)throw l}}}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}n("pb8e"),n("ex8r"),n("p77/"),n("eXKH");var J=window.$,Q=["bold","italic","del","|","list-ul","list-ol","|","code","code-block","link","|","image","table","|","line-break","watch","clear","emoji","fullscreen"],X=["bold","italic","del","|","list-ul","list-ol","|","code","code-block","link","|","inline-latex","latex","|","image","table","|","line-break","watch","clear","emoji","fullscreen"];function Z(e,t,n){window.sessionStorage.removeItem(e+t);var a="#e_tip_"+n;"content"==e?J("#e_tips_"+n).html(" "):J(a).html(" ")}function Y(e,t,n){var a=window.sessionStorage.getItem("content"+t);if(null!==a&&a!==e.getValue()){J("#e_tips_"+n).data("editor",e);var c='您上次有已保存的数据,是否<a style="cursor: pointer;" class="link-color-blue" onclick="md_rec_data(\'content\',\''+t+"','"+n+'\')">恢复</a> ? / <a style="cursor: pointer;" class="link-color-blue" onclick="md_clear_data(\'content\',\''+t+"','"+n+"')\">不恢复</a>";J("#e_tips_"+n).html(c)}return p()((function(){var a,c=new Date,r=c.getHours(),o=c.getMinutes(),l=c.getSeconds();if(r=r<10?"0"+r:r,o=o<10?"0"+o:o,l=l<10?"0"+l:l,""!==h()(a=e.getValue()).call(a)){!function(e,t,n){window.sessionStorage.setItem("content"+t,n)}(0,t,e.getValue());var i="#e_tips_"+n,s=" 数据已于 "+r+":"+o+":"+l+" 保存 ",u=J(i).html();u&&" "!==u&&!1===b()(u).call(u," 数据已于 ")?J(i).html(u.split(" (")[0]+" (".concat(s,")")):J(i).html(s)}}),1e4)}window.md_clear_data=Z,window.md_rec_data=function(e,t,n){null!==window.sessionStorage.getItem(e+t)&&(J("#e_tips_"+n).data("editor").setValue(window.sessionStorage.getItem(e+t)),Z(e,t,n))},t.a=function(e){var t,n,a=e.mdID,c=e.onChange,r=e.onCMBeforeChange,o=e.onCMBlur,l=e.error,i=void 0!==l&&l,s=e.className,u=void 0===s?"":s,f=e.noStorage,m=void 0!==f&&f,p=e.imageExpand,g=void 0===p||p,h=e.placeholder,v=void 0===h?"":h,b=e.width,y=void 0===b?"100%":b,w=e.height,x=void 0===w?400:w,O=e.initValue,_=void 0===O?"":O,N=(e.emoji,e.watch),D=void 0===N||N,I=(e.showNullButton,e.showResizeBar),T=void 0!==I&&I,M=e.startInit,H=void 0===M||M,z=(e.forMember,e.isCanAtme),J=void 0!==z&&z,Z=e.isQuoteIssue,W=void 0!==Z&&Z,$=e.changeAtWhoLoginList,ee=e.owner,te=e.projectsId,ne=e.isFocus,ae=void 0===ne||ne,ce=e.showLatexButton,re=void 0===ce||ce,oe=Object(V.useRef)(),le=Object(V.useRef)(),ie=Object(V.useState)(),se=d()(ie,2),ue=se[0],fe=se[1],de=Object(V.useState)(!1),me=d()(de,2),pe=me[0],ge=me[1],he=Object(V.useState)([]),ve=d()(he,2),be=ve[0],ye=ve[1],Ee=Object(V.useState)([]),we=d()(Ee,2),je=we[0],xe=we[1],ke=Object(V.useState)([]),Oe=d()(ke,2),Ce=Oe[0],_e=Oe[1],Se=Object(V.useRef)([]),Ne=Object(V.useRef)(!1),Ae="mdEditor_".concat(a),De="mdEditors_".concat(a),Be="e_tips_mdEditor_".concat(a),Ie=Object(V.useState)([]),Pe=d()(Ie,2),Te=Pe[0],Re=Pe[1],Me=Object(V.useState)(!1),Le=d()(Me,2),Ve=Le[0],qe=Le[1],Fe=Object(V.useState)([]),Ge=d()(Fe,2),He=Ge[0],Ue=Ge[1],Ke=Object(V.useRef)(!1),ze=Object(V.useRef)([]);function Je(e){var t;U.a.get(E()(t="/v1/".concat(ee,"/")).call(t,te,"/issues"),{params:{only_name:!0,keyword:e,sort_direction:"desc",sort_by:"issues.created_on",limit:500,page:1}}).then((function(t){if(t){!e&&Re(t.data.issues);var n=t.data.issues;Ue(n&&n.length>0?n:void 0)}}))}Object(V.useEffect)((function(){var e;J&&U.a.get(E()(e="/".concat(ee,"/")).call(e,te,"/members.json")).then((function(e){0!==e.data.total_count&&(_e(e.data.users),xe(e.data.users))})),document.addEventListener("click",(function(){Ne.current=!1,ge(!1),Ke.current=!1,qe(!1)})),W&&Je()}),[]);var Qe=q.a.createElement("div",{id:"quoteDiv",className:"quoteDiv"},He&&j()(He).call(He,(function(e,t){return q.a.createElement("li",{className:"quote ".concat(0===t&&"active"),onClick:function(){return function(e){var t,n,a,c;Ke.current=!1,qe(!1);var r=ue.cm,o=r.doc.getCursor(),l=o.line,i=o.ch,s=k()(t=r.getRange({line:l,ch:0},{line:l,ch:i})).call(t,"#");r.replaceRange(E()(n=E()(a=E()(c="[#".concat(e.subject,"](/")).call(c,ee,"/")).call(a,te,"/issues/")).call(n,e.project_issues_index,") "),{line:l,ch:s},{line:l,ch:i}),r.focus();var u=new C.a(ze.current);u.add(e.project_issues_index),ze.current=S()(u)}(e)},onMouseOver:function(){return e=t,document.getElementsByClassName("quote active")[0]&&(document.getElementsByClassName("quote active")[0].className="quote"),void(document.getElementsByClassName("quote")[e]&&(document.getElementsByClassName("quote")[e].className="quote active"));var e}},q.a.createElement("span",{style:{minWidth:"40px"}},q.a.createElement("span",{className:"issueIndex",title:e.project_issues_index},"#",e.project_issues_index)),q.a.createElement("span",{className:"issueName task-hide"},e.subject))})));function Xe(e){var t=document.getElementsByClassName("CodeMirror cm-s-default CodeMirror-wrap")[0].firstChild.style,n=ue.cm.getValue();if(e.shiftKey&&"Digit2"===e.code&&(Ne.current=!0,ge(!0),document.getElementById("at_who_list").style.top=A()(t.getPropertyValue("top").replace("px",""))+62+"px",document.getElementById("at_who_list").style.left=A()(t.getPropertyValue("left").replace("px",""))+20+"px"),e.ctrlKey&&"KeyZ"===e.code&&0!==Ce.length){if(_){var a=[];j()(Ce).call(Ce,(function(e){var t;-1!=B()(_).call(_,e.username)&&"@"===_.charAt(B()(_).call(_,e.username)-1)&&B()(_).call(_,"@".concat(e.username))===B()(n).call(n,"@".concat(e.username))&&(a[a.length]=E()(t="[@".concat(e.username,"](/")).call(t,e.login,")"))})),0!=a.length&&j()(a).call(a,(function(e){n=n.replace(e,"")}))}-1!=B()(n).call(n,"@")&&j()(Ce).call(Ce,(function(e){if(-1!=B()(n).call(n,e.username)&&"@"===n.charAt(B()(n).call(n,e.username)-1)){var t=new C.a(Se.current);t.add(e.login),Se.current=S()(t),ye(S()(t))}}))}e.shiftKey&&"Digit3"===e.code&&W&&(Ke.current=!0,qe(!0),document.getElementById("quoteDiv").style.top=A()(t.getPropertyValue("top").replace("px",""))+62+"px",document.getElementById("quoteDiv").style.left=A()(t.getPropertyValue("left").replace("px",""))+20+"px")}Object(V.useEffect)((function(){if(Ye)if(Ke.current){var e=document.getElementById("quoteDiv"),t=document.getElementsByClassName("quote");Ye.addKeyMap({Up:function(){for(var n,a=0;a<t.length;a++)"quote active"===t[a].className&&(n=a);n>0&&(n<=t.length-4&&(e.scrollTop-=40),t[n].className="quote",t[n-1].className="quote active")},Down:function(){for(var n,a=0;a<t.length;a++)"quote active"===t[a].className&&(n=a);n<t.length-1&&(n>=3&&(e.scrollTop+=40),t[n].className="quote",t[n+1].className="quote active")},Enter:function(){document.getElementsByClassName("quote active")[0]&&document.getElementsByClassName("quote active")[0].click()}})}else Ye.removeKeyMap()}),[Ve]),Object(V.useEffect)((function(){$&&$(be)}),[be]);var Ze=q.a.createElement("div",{className:"at_who_list",id:"at_who_list"},je&&j()(je).call(je,(function(e,t){return q.a.createElement("div",{key:t,className:"at_who ".concat(0===t&&"active"),onClick:function(){!function(e){var t;Ne.current=!1,ge(!1);var n=ue.cm,a=n.doc.getCursor(),c=a.line,r=a.ch,o=k()(t=n.getRange({line:c,ch:0},{line:c,ch:r})).call(t,"@"),l=void 0;j()(je).call(je,(function(t){t.username===e&&(l=t.login)})),n.replaceRange("[@"+e+"]"+"(/".concat(l,") "),{line:c,ch:o},{line:c,ch:r}),n.focus();var i=new C.a(Se.current);i.add(l),Se.current=S()(i),ye(S()(i))}(e.username)},onMouseOver:function(){!function(e){document.getElementsByClassName("at_who active")[0]&&(document.getElementsByClassName("at_who active")[0].className="at_who"),document.getElementsByClassName("at_who")[e]&&(document.getElementsByClassName("at_who")[e].className="at_who active")}(t)}},e.image_url&&q.a.createElement("img",{src:Object(F.h)("/".concat(e.image_url)),alt:""}),q.a.createElement("span",null,e.username))})));Object(V.useEffect)((function(){!ue&&H&&window.editormd(Ae,{width:y,height:x,path:Object(F.l)("/editormd/lib/"),markdown:_,syncScrolling:"single",tex:!0,tocm:!0,emoji:!0,taskList:!0,codeFold:!0,searchReplace:!0,htmlDecode:"style,script,iframe",sequenceDiagram:!0,autoFocus:!1,watch:D,saveHTMLToTextarea:!0,dialogMaskOpacity:.6,placeholder:v,imageUpload:!0,imageFormats:["jpg","jpeg","gif","png","bmp","webp","JPG","JPEG","GIF","PNG","BMP","WEBP"],imageUploadURL:Object(F.k)(),toolbarIcons:function(){return re?X:Q},toolbarIconsClass:{"line-break":"fa-minus",fullScreen:"iconfont icon-fangdaicon font-14"},toolbarCustomIcons:{"inline-latex":"<a title='行内公式' class='latex' ><i name='inline-latex' class='fa iconfont icon-hangneigongshi font-14'></i></a>",latex:"<a title='多行公式' class='latex' ><i name='latex' class='fa iconfont icon-duohanggongshi font-16'></i></a>","null-button":"<a class='pr' title='增加填空'><i class='border-left'><span></span></i><span name='null-button' class='fa fillTip'>点击插入填空项</span><i class='iconfont fa icon-edit font-16' name='null-button'></i></a>"},toolbarHandlers:{"line-break":function(e,t,n,a){e.replaceSelection("<br/>")},"null-button":function(e,t,n,a){""===a&&e.setCursor(n.line,n.ch+1),e.replaceSelection("▁")},fullScreen:function(e,t,n,a){t.addClass("none")},"inline-latex":function(e,t,n,a){e.replaceSelection("$$"+a+"$$"),e.setCursor(n.line,n.ch+2),e.focus()},latex:function(e,t,n,a){e.replaceSelection("```latex\n\n"+a+"```"),e.setCursor(n.line+1,0),e.focus()}},lang:{toolbar:{latex:"多行公式","line-break":"换行",fullScreen:"开启全屏"}},onload:function(){fe(this)}})}),[Ae,ue,H]);var Ye=ue&&ue.cm;return Object(V.useEffect)((function(){Ne.current?Ye.addKeyMap({Up:function(){for(var e,t=document.getElementById("at_who_list"),n=document.getElementsByClassName("at_who"),a=0;a<n.length;a++)"at_who active"===n[a].className&&(e=a);e>0&&(e<=n.length-4&&(t.scrollTop-=40),n[e].className="at_who",n[e-1].className="at_who active")},Down:function(){for(var e,t=document.getElementById("at_who_list"),n=document.getElementsByClassName("at_who"),a=0;a<n.length;a++)"at_who active"===n[a].className&&(e=a);e<n.length-1&&(e>=3&&(t.scrollTop+=40),n[e].className="at_who",n[e+1].className="at_who active")},Enter:function(){if(document.getElementsByClassName("at_who active")[0])document.getElementsByClassName("at_who active")[0].click();else{var e=ue.cm,t=e.doc.getCursor(),n=t.line,a=t.ch;e.replaceRange("\n",{line:n,ch:a},{line:n,ch:a}),ge(!1),Ne.current=!1}}}):Ye&&Ye.removeKeyMap()}),[pe]),Object(V.useEffect)((function(){if(Ne.current&&je){var e=document.getElementsByClassName("CodeMirror cm-s-default CodeMirror-wrap")[0].firstChild.style,t="添加评论..."===v?80:10;document.getElementById("at_who_list").style.left=A()(e.getPropertyValue("left").replace("px",""))+t+"px"}}),[je]),Object(V.useEffect)((function(){if(Ye){var e,t=null;return o&&ue.cm.on("blur",(function(){o(ue.getValue())})),r&&ue.cm.on("beforeChange",(function(e,t){r(e,t)})),m||(t=Y(ue,"MDEditor__".concat(Ae),Ae)),(J||W)&&ue.cm.on("focus",(function(){document.addEventListener("keydown",Xe)})),(J||W)&&ue.cm.on("blur",(function(){document.removeEventListener("keydown",Xe)})),ue.cm.on("change",(function(e){var t=e.getValue();if(t){var n=t.match(/alert\((.*?)\)/g);if(n&&n.length>0)for(var a=0;a<n.length;a++)t=t.replace(n[a],"")}if(c&&c(t),Ke.current){var r=e.doc.getCursor(),o=r.line,l=r.ch,i=Ye.getRange({line:o,ch:0},{line:o,ch:l});-1===B()(i).call(i,"#")||" "===(i=i.substring(k()(i).call(i,"#")+1))?(qe(!1),Ke.current=!1):Je(i)}if(Ne.current){var s,u=e.doc.getCursor(),f=u.line,d=u.ch,m=Ye.getRange({line:f,ch:0},{line:f,ch:d});-1===B()(m).call(m,"@")?(ge(!1),Ne.current=!1):(m=m.substring(k()(m).call(m,"@")+1))?U.a.get(E()(s="/".concat(ee,"/")).call(s,te,"/members.json"),{params:{search:m}}).then((function(e){e&&e.data&&0!==e.data.total_count?xe(e.data.users):xe(void 0)})):xe(Ce)}if(function(e,t,n){if(0!=n.length){var a,c=ue.cm,r=c.getValue();if(_){var o=[];j()(t).call(t,(function(t){var n,a,c,l,i,s,u,f,d=t.username;d=t.project_issues_index,-1!=B()(_).call(_,d)&&_.charAt(B()(_).call(_,d)-1)===e&&B()(_).call(_,E()(n="".concat(e)).call(n,d))===B()(r).call(r,E()(a="".concat(e)).call(a,d))&&(o[o.length]=E()(c=E()(l="[".concat(e)).call(l,d,"](/")).call(c,d,")"),o[o.length]=E()(i=E()(s=E()(u=E()(f="[".concat(e)).call(f,d,"](")).call(u,ee,"/")).call(s,te,"/issues/")).call(i,d,")"))})),0!=o.length&&j()(o).call(o,(function(e){r=r.replace(e,"")}))}var l=new P.a;j()(a=S()(n)).call(a,(function(e){j()(t).call(t,(function(t){t.project_issues_index===e&&l.set(t.project_issues_index,t.project_issues_index)}))}));var i=c.doc.getCursor(),s=i.line,u=i.ch;-1===B()(r).call(r,e)&&(ze.current=[]);var f,d,m=c.getRange({line:s,ch:0},{line:s,ch:u}),p=c.getLine(s);p&&-1!==B()(p).call(p,e)?j()(f=S()(R()(l).call(l))).call(f,(function(t){var n,a,o,i,f=E()(n=E()(a=E()(o=E()(i="[".concat(e)).call(i,t,"](/")).call(o,ee,"/")).call(a,te,"/issues/")).call(n,l.get(t),")");if(L()(m).call(m,f)&&c.setSelection({line:s,ch:k()(m).call(m,e)-1},{line:s,ch:u}),-1===B()(r).call(r,f)){var d=new C.a(ze.current);d.delete(l.get(t)),ze.current=S()(d)}})):j()(d=S()(R()(l).call(l))).call(d,(function(t){var n,a,c,o,i=E()(n=E()(a=E()(c=E()(o="[".concat(e)).call(o,t,"](/")).call(c,ee,"/")).call(a,te,"/issues/")).call(n,l.get(t),")");if(-1===B()(r).call(r,i)){var s=new C.a(ze.current);s.delete(l.get(t)),ze.current=S()(s)}}))}}("#",Te,ze.current),0!=Se.current.length){var p,g=ue.cm,h=g.getValue();if(_){var v=[];j()(Ce).call(Ce,(function(e){var t;-1!=B()(_).call(_,e.username)&&"@"===_.charAt(B()(_).call(_,e.username)-1)&&B()(_).call(_,"@".concat(e.username))===B()(h).call(h,"@".concat(e.username))&&(v[v.length]=E()(t="[@".concat(e.username,"](/")).call(t,e.login,")"))})),0!=v.length&&j()(v).call(v,(function(e){h=h.replace(e,"")}))}var b=new P.a;j()(p=S()(Se.current)).call(p,(function(e){j()(Ce).call(Ce,(function(t){t.login===e&&b.set(t.username,t.login)}))}));var y=g.doc.getCursor(),w=y.line,x=y.ch;-1===B()(h).call(h,"@")&&(Se.current=[],ye([]));var O,N,A=g.getRange({line:w,ch:0},{line:w,ch:x}),D=g.getLine(w);D&&-1!==B()(D).call(D,"@")?j()(O=S()(R()(b).call(b))).call(O,(function(e){var t,n=E()(t="[@".concat(e,"](/")).call(t,b.get(e),")");if(L()(A).call(A,n)&&g.setSelection({line:w,ch:k()(A).call(A,"@")-1},{line:w,ch:x}),-1===B()(h).call(h,n)){var a=new C.a(Se.current);a.delete(b.get(e)),Se.current=S()(a),ye(S()(a))}})):j()(N=S()(R()(b).call(b))).call(N,(function(e){var t,n=E()(t="[@".concat(e,"](/")).call(t,b.get(e),")");if(-1===B()(h).call(h,n)){var a=new C.a(Se.current);a.delete(b.get(e)),Se.current=S()(a),ye(S()(a))}}))}})),e=function(){var e;return oe.current&&(e=new G.default((function(e){var t,n=K(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;(a.target.offsetHeight>0||a.target.offsetWidth>0)&&(ue.resize(),ue.cm.refresh(),ae&&ue.cm.focus())}}catch(e){n.e(e)}finally{n.f()}}))).observe(oe.current),e}(),function(){m||clearInterval(t),e&&e.unobserve(oe.current)}}}),[Ye]),Object(V.useEffect)((function(){ue&&null!=_&&_!==ue.getValue()&&ue.setValue(_.toString())}),[ue,_,Ae]),Object(V.useEffect)((function(){if(le.current){var e=function(e){c=!0,r=e.pageY},t=function(){c=!1},n=function(e){if(c){var t=e.pageY-r;t<0&&(t=0),t>300&&(t=300);var n=x+t+"px";ue.resize("",n)}},a=le.current,c=!1,r=0;return a.addEventListener("mousedown",e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),function(){a.removeEventListener("mousedown",e),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)}}}),[ue,le]),q.a.createElement(V.Fragment,null,q.a.createElement("div",{ref:oe,className:E()(t=E()(n="df editormd-editing ".concat(u," ")).call(n,g&&"editormd-image-click-expand"," ")).call(t,Ve||pe?"quoteBox":""," ")},q.a.createElement("div",{className:"edu-back-greyf5 radius4 editormd ".concat(i?"error":""),id:Ae},Ve&&Qe,pe&&Ze,q.a.createElement("textarea",{style:{display:"none"},id:De,name:"content"}),q.a.createElement("div",{className:"CodeMirror cm-s-defualt",style:{display:"none"}}))),T?q.a.createElement("a",{ref:le,className:"editor-resize"}):null,q.a.createElement("div",{className:"fr rememberTip"},!0===m?null:q.a.createElement("div",{id:Be,className:"edu-txt-right color-grey-cd font-12"})))}},pGXS:function(e,t,n){"use strict";var a=n("lxfd");e.exports=/MSIE|Trident/.test(a)},qT3J:function(e,t,n){"use strict";var a=n("lxfd").match(/AppleWebKit\/(\d+)\./);e.exports=!!a&&+a[1]},reVg:function(e,t,n){"use strict";var a=n("61Qb"),c=Math.floor,r=function(e,t){var n=e.length;if(n<8)for(var o,l,i=1;i<n;){for(l=i,o=e[i];l&&t(e[l-1],o)>0;)e[l]=e[--l];l!==i++&&(e[l]=o)}else for(var s=c(n/2),u=r(a(e,0,s),t),f=r(a(e,s),t),d=u.length,m=f.length,p=0,g=0;p<d||g<m;)e[p+g]=p<d&&g<m?t(u[p],f[g])<=0?u[p++]:f[g++]:p<d?u[p++]:f[g++];return e};e.exports=r},xcSo:function(e,t,n){"use strict";n("OG05");var a=n("wY6U");e.exports=a("Array","lastIndexOf")}}]); |