forked from Gitlink/forgeplus
1 line
23 KiB
JavaScript
1 line
23 KiB
JavaScript
(this.webpackJsonp=this.webpackJsonp||[]).push([[18],{"0Rql":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAQCAYAAABtPJ3XAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALKADAAQAAAABAAAAEAAAAACYv7IkAAABuElEQVRIDdVWr0/DQBT+ujQowgSZwAAKQkhAoAiGTBT2B+ARM/wIAQx2dgYICdRU4PkDBhM4goYEgwODWBBDIjje17VJV9rudkdIeMmt69137333+n6cg1+StR01L6rqMjwFTFKtA7zKoy0juDl3njhnK6LTTjYaauSjg2PRsqUUSlnaHAdfMu+PVXB41XA+szC6c1aESbbbQQsKVSGF2gqwvgxMTfTMv7wB1/dA6w6Qw9Dlt+UKajakXd2TZeFCzwrZ8TJwtAkszvSjZqcBjtUloHkJvHdRjb7Gbj9S/83Yw1HMPoqpUnPvJ9k0hYdnOdRZOMvwWDCN6cyYSxvLea8zZhkGac9m4YkhNopzJqeR2BD2aJExqysJbLhXd18SZ0w4Ll1xgiWV5v2PsfHePFzRvOtth/lbhMleY9abisKoqV1jD8dcWbp0ZRhsnk63fcEKOrxIlTiRb7PPOsvSpSPEUsTiqVSJg97bcL82Hg7YwdgUWLIGCTHEco9gg0H4vHVjwlEd9ZkBbApFpLlGTJQtvmkN5iGsOh3vBtKa59jB2BR0WjP30LCpGMVv0ti/uvwkif/V9fIbUzmWMlmEs/gAAAAASUVORK5CYII="},"3Diz":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n("jsC+")),a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};n("aIZi");var o=n("q1tI"),i=l(o);n("MN5C");var c=l(n("cJAJ")),u=n("i8i4");function l(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.projectsId,n=e.branch,l=e.owner,s=e.changeBranch,f=e.branchList,d=e.tagflag,m=void 0===d||d,p=(0,o.useState)(n),h=a(p,2),g=h[0],v=h[1],y=(0,o.useState)(!1),b=a(y,2),A=b[0],w=b[1],E=(0,o.useRef)(null),O=(0,o.useRef)(null);(0,o.useEffect)((function(){document.addEventListener("click",j,!1)}),[]);var j=function(e){var t=e.target,n=(0,u.findDOMNode)(E.current),r=(0,u.findDOMNode)(O.current);if(n&&r){var a=n.contains(t),o=r.contains(t);a||o||w(!1)}};(0,o.useEffect)((function(){v(n)}),[n]);var x=i.default.createElement("div",{ref:E},i.default.createElement(c.default,{visible:A,changeBranch:function(e){w(!1),s(e)},tagflag:m,projectsId:t,owner:l,branchList:f}));return i.default.createElement(r.default,{placement:"bottomLeft",visible:A,overlay:x,overlayClassName:"branch-tagBox-list",trigger:["click"]},i.default.createElement("div",{className:"branch-tagBox",ref:O,onClick:function(){return w(!A)}},i.default.createElement("span",{className:"color-grey-9 mr3 ml8"},i.default.createElement("i",{className:"iconfont icon-fenzhi2 font-18"})),i.default.createElement("span",{className:"ant-dropdown-link task-hide",style:{fontWeight:"500",minWidth:"45px",maxWidth:"270px"}},g),i.default.createElement("i",{className:"showtag iconfont icon-sanjiaoxing-down font-15 color-grey-9 mr5 ml5 mt1"})))}},FRFo:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n("3S7+")),a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};n("TfFZ");var o=n("q1tI"),i=c(o);function c(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.beforeText,n=e.afterText,c=e.className,u=e.inputId,l=e.timeOut,s=(0,o.useState)((function(){return t})),f=a(s,2),d=f[0],m=f[1],p=(0,o.useCallback)((function(){var e=document.querySelector("#"+u);e?(e.select(),document.execCommand("copy")&&document.execCommand("copy"),document.getSelection().removeAllRanges(),m(n),l&&setTimeout((function(){m(t)}),1500)):console.error("您的CopyTool未设置正确的inputId")}),[]);return i.default.createElement(r.default,{placement:"top",title:d,onVisibleChange:function(){m(t)}},i.default.createElement("i",{className:"iconfont icon-fuzhiicon "+c,style:{color:"#466aff"},onClick:p}))}u.defaultProps={beforeText:"复制链接",afterText:"复制成功",className:"",inputId:"copyText",timeOut:!0},t.default=(0,o.memo)(u)},KcO5:function(e,t,n){"use strict";n.r(t);n("SchZ"),n("dlb6")},MN5C:function(e,t,n){},PhNK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.truncateCommitId=function(e){return e&&e.length>11?e.substring(0,10):e},t.timeFormat=function(e){var t=new Date(1e3*e),n=t.getHours()<10?"0".concat(t.getHours()):t.getHours(),r=t.getMinutes()<10?"0".concat(t.getMinutes()):t.getMinutes();return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+n+":"+r}},"Rs/d":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a,o=(r=["\n display:flex;\n font-weight: bold;\n ","\n align-items: center;\n & img{\n width:30px;\n height:30px;\n border-radius:50%;\n }\n ","\n "],a=["\n display:flex;\n font-weight: bold;\n ","\n align-items: center;\n & img{\n width:30px;\n height:30px;\n border-radius:50%;\n }\n ","\n "],Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(a)}}))),i=l(n("q1tI")),c=l(n("vOnD")),u=n("eO8H");function l(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.url,n=e.name,r=e.column,a=e.id,l=e.login,s=c.default.span(o,r&&"flex-direction: column;text-align:center;",!r&&"\n & span{\n margin-left:8px;\n }");return a?i.default.createElement(u.Link,{to:"/"+l},i.default.createElement(s,null,t&&i.default.createElement("img",{src:t,alt:""}),i.default.createElement("span",null,n))):i.default.createElement(s,null,t&&i.default.createElement("img",{src:t,alt:""}),i.default.createElement("span",null,n))}},VEFH:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=A(n("W9HT")),a=A(n("NUBc")),o=A(n("rgW5")),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n("04bd"),n("YQTV"),n("KcO5");var c=n("q1tI"),u=A(c),l=n("sYIF"),s=n("PhNK"),f=n("spEH"),d=A(n("3Diz")),m=A(n("2CTR")),p=A(n("Rs/d")),h=A(n("bjH3")),g=A(n("0Rql")),v=A(n("vDqi")),y=n("eO8H"),b=A(n("FRFo"));function A(e){return e&&e.__esModule?e:{default:e}}function w(e){return e&&e.length>0&&e.indexOf("%2F")>-1?e.replaceAll("%2F","/"):e}n("r+Iv");var E=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.componentDidMount=function(){n.Init(),n.getBranchs()},n.getBranchs=function(){var e=n.props.match.params,t=e.projectsId,r=e.owner;v.default.get("/"+r+"/"+t+"/branches.json").then((function(e){n.setState({branchList:e.data})})).catch((function(e){}))},n.componentDidUpdate=function(e){n.props.location!==(e&&e.location)&&n.Init()},n.Init=function(){var e=n.props.match.params.branchName,t=n.state.limit,r=n.props.location.search,a=r&&n.UrlParamHash(r).page?parseInt(n.UrlParamHash(r).page):1;n.setState({isSpining:!0,page:a}),n.getCommitList(e,a,t)},n.getCommitList=function(e,t,r){n.setState({isSpining:!0});var a=n.props.match.params,o=a.projectsId,i="/"+a.owner+"/"+o+"/commits.json";v.default.get(i,{params:{sha:w(e),page:t,limit:r}}).then((function(e){if(e&&e.data){n.setState({isSpining:!1});var t=[];e.data.commits&&e.data.commits.length>0&&e.data.commits.map((function(e,n){t.push({name:e.author&&e.author.name,login:e.author&&e.author.login,id:e.author&&e.author.id,image_url:e.author&&e.author.image_url,sha:e.sha,time_from_now:e.time_from_now,message:e.message,timestamp:e.timestamp})})),n.setState({commitDatas:t,dataCount:e.data.total_count,isSpining:!1})}})).catch((function(e){console.log(e)}))},n.changeBranch=function(e){var t=n.props.match.params,r=t.projectsId,a=t.owner;n.props.history.push("/"+a+"/"+r+"/commits/branch/"+e)},n.ChangePage=function(e){n.props.history.push({pathname:n.props.history.location.pathname,search:"page="+e})},n.state={commitDatas:void 0,dataCount:void 0,limit:10,page:1,isSpining:!1,branchList:void 0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"UrlParamHash",value:function(e){for(var t={},n=void 0,r=e.slice(e.indexOf("?")+1).split("&"),a=0;a<r.length;a++)t[(n=r[a].split("="))[0]]=n[1];return t}},{key:"render",value:function(){var e=this.state,t=e.commitDatas,n=e.dataCount,i=e.limit,c=e.page,v=e.isSpining,A=e.branchList,E=this.props,O=E.projectDetail,j=(E.commit_class,E.defaultBranch),x=this.props.match.params,S=x.projectsId,C=x.owner,I=w(x.branchName||j);return u.default.createElement(u.default.Fragment,null,u.default.createElement("div",{className:"main",style:{padding:"0px",border:"none"}},u.default.createElement("div",{className:"f-wrap-between"},u.default.createElement(d.default,{repo_id:O&&O.repo_id,projectsId:S,branch:I,changeBranch:this.changeBranch,owner:C,history:this.props.history,branchList:A})),u.default.createElement(r.default,{spinning:v},u.default.createElement(o.default,{className:"commitList"},t&&t.length>0&&t.map((function(e,t){return u.default.createElement(o.default.Item,{key:t,dot:1===c&&0===t?u.default.createElement("span",{className:"new-conmmit"},"最新"):u.default.createElement("i",{className:"iconfont icon-a-yuanquan2x"})},u.default.createElement("div",{className:"commitList-item f-wrap-between"},u.default.createElement("div",null,u.default.createElement(f.AlignTop,null,u.default.createElement("div",{className:"commitDesc"},u.default.createElement(y.Link,{to:"/"+C+"/"+S+"/commits/"+(0,s.truncateCommitId)(""+e.sha),className:"font-14 color-grey-3 font-bd"},u.default.createElement(h.default,{value:e.message})))),u.default.createElement("p",{className:"f-wrap-alignCenter mt15 pb5"},u.default.createElement(p.default,{id:e.id,url:e.image_url&&(0,l.getImageUrl)("/"+e.image_url)||"https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3025493530,1989042357&fm=26&gp=0.jpg",name:e.name,login:e.login}),e.timestamp&&u.default.createElement("label",{className:"font-14 color-grey-3 ml3"},"提交于 ",(0,s.timeFormat)(e.timestamp)))),u.default.createElement("div",null,u.default.createElement("div",{className:"treecopy"},u.default.createElement("div",null,u.default.createElement("span",{className:"treecopy-cont shadow"},u.default.createElement("img",{src:g.default,alt:"sha",width:"16px"}),u.default.createElement(y.Link,{to:"/"+C+"/"+S+"/commits/"+(0,s.truncateCommitId)(""+e.sha)},(0,s.truncateCommitId)(""+e.sha)),u.default.createElement("input",{type:"text",id:"value"+t,value:""+(0,s.truncateCommitId)(""+e.sha)})),u.default.createElement(b.default,{beforeText:"复制commit id",afterText:"复制成功",inputId:"value"+t})),u.default.createElement("button",{className:"btn-83",onClick:function(){window.location.href="/"+C+"/"+S+"/tree/"+(0,s.truncateCommitId)(e.sha)}},"浏览文件")))))})),t&&0===t.length&&u.default.createElement(m.default,{_html:"暂无数据"})),n>i?u.default.createElement("div",{className:"edu-txt-center pt30 mb30"},u.default.createElement(a.default,{simple:!0,current:c,total:n,pageSize:i,onChange:this.ChangePage})):"")))}}]),t}(c.Component);t.default=E},cJAJ:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n("W9HT")),a=f(n("BvKs")),o=f(n("5rEg")),i=f(n("14Xm")),c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};n("04bd"),n("2WkQ"),n("1vPl");var u=n("q1tI"),l=f(u),s=n("tnhM");function f(e){return e&&e.__esModule?e:{default:e}}function d(e){return function(){var t=e.apply(this,arguments);return new Promise((function(e,n){return function r(a,o){try{var i=t[a](o),c=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(c).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(c)}("next")}))}}t.default=function(e){var t,n,f=(t=d(i.default.mark((function e(t,n){var r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.getBranch)(t,n);case 2:r=e.sent,B(r),H(r),P(!1);case 6:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)}),m=(n=d(i.default.mark((function e(t,n){var r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.getTag)(t,n);case 2:r=e.sent,B(r),H(r),P(!1);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)}),p=e.changeBranch,h=e.tagflag,g=e.projectsId,v=e.owner,y=e.visible,b=(0,u.useState)(void 0),A=c(b,2),w=A[0],E=A[1],O=(0,u.useState)(0),j=c(O,2),x=j[0],S=j[1],C=(0,u.useState)(!0),I=c(C,2),_=I[0],P=I[1],N=(0,u.useState)(void 0),k=c(N,2),T=k[0],B=k[1],M=(0,u.useState)(void 0),R=c(M,2),D=R[0],H=R[1],L=(0,u.useState)("branch"),U=c(L,2),q=U[0],F=U[1];return(0,u.useEffect)((function(){y&&(F("branch"),f(g,v),P(!0))}),[y]),l.default.createElement("div",{className:"overlayBranch"},l.default.createElement("div",{className:"padding15",style:{paddingBottom:"0px"}},l.default.createElement(o.default,{prefix:l.default.createElement("i",{className:"iconfont icon-sousuo_icon1 font-14"}),placeholder:"请输入分支"+(h?"或标签":"")+"名称搜索",autocomplete:"off",className:"OptionsInput",value:w,onChange:function(e){E(e.target.value);var t=e.target.value?T&&T.length>0&&T.filter((function(t){return t.name.indexOf(e.target.value)>-1})):T;H(t)}})),l.default.createElement(a.default,{mode:"horizontal",className:"navUl",selectedKeys:[q],onClick:function(e){F(e.key),P(!0),"branch"===e.key?(f(g,v),S(0)):(m(g,v),S(1))}},l.default.createElement(a.default.Item,{key:"branch"},"分支"),h&&l.default.createElement(a.default.Item,{key:"tag"},"标签")),l.default.createElement(r.default,{spinning:_},l.default.createElement("ul",{className:"OptionsUl",id:"ul-btn"},D&&D.length>0&&D.map((function(e,t){return l.default.createElement("li",{key:t,onClick:function(){return t=e.name,void p(t);var t}},l.default.createElement("a",{className:"task-hide ulALink"},e.name))})),D&&0===D.length&&l.default.createElement("p",{className:"listTips"},"暂无",w,0===x?"分支":"标签","~"))))}},dlb6:function(e,t,n){},"r+Iv":function(e,t,n){},rgW5:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),a=n("TSYQ"),o=n.n(a),i=n("BGR+"),c=n("H84U");function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},f=function(e){return r.createElement(c.a,null,(function(t){var n,a,c=t.getPrefixCls,f=e.prefixCls,d=e.className,m=e.color,p=void 0===m?"":m,h=e.children,g=e.pending,v=e.dot,y=s(e,["prefixCls","className","color","children","pending","dot"]),b=c("timeline",f),A=o()((l(n={},"".concat(b,"-item"),!0),l(n,"".concat(b,"-item-pending"),g),n),d),w=o()((l(a={},"".concat(b,"-item-head"),!0),l(a,"".concat(b,"-item-head-custom"),v),l(a,"".concat(b,"-item-head-").concat(p),!0),a));return r.createElement("li",u({},Object(i.a)(y,["position"]),{className:A}),r.createElement("div",{className:"".concat(b,"-item-tail")}),r.createElement("div",{className:w,style:{borderColor:/blue|red|green|gray/.test(p)?void 0:p}},v),r.createElement("div",{className:"".concat(b,"-item-content")},h))}))};f.defaultProps={color:"blue",pending:!1,position:""};var d=f,m=n("CtXQ");function p(e){return(p="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 h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function g(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(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,r=j(e);if(t){var a=j(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return O(this,n)}}function O(e,t){return!t||"object"!==p(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 j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},S=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&&w(e,t)}(u,e);var t,n,a,i=E(u);function u(){var e;return b(this,u),(e=i.apply(this,arguments)).renderTimeline=function(t){var n,a=t.getPrefixCls,i=e.props,c=i.prefixCls,u=i.pending,l=void 0===u?null:u,s=i.pendingDot,f=i.children,p=i.className,v=i.reverse,b=i.mode,A=x(i,["prefixCls","pending","pendingDot","children","className","reverse","mode"]),w=a("timeline",c),E="boolean"==typeof l?null:l,O=o()(w,(y(n={},"".concat(w,"-pending"),!!l),y(n,"".concat(w,"-reverse"),!!v),y(n,"".concat(w,"-").concat(b),!!b),n),p),j=l?r.createElement(d,{pending:!!l,dot:s||r.createElement(m.default,{type:"loading"})},E):null,S=v?[j].concat(g(r.Children.toArray(f).reverse())):[].concat(g(r.Children.toArray(f)),[j]),C=function(e,t){return"alternate"===b?"right"===e.props.position?"".concat(w,"-item-right"):"left"===e.props.position?"".concat(w,"-item-left"):"".concat(w,t%2==0?"-item-left":"-item-right"):"left"===b?"".concat(w,"-item-left"):"right"===b||"right"===e.props.position?"".concat(w,"-item-right"):""},I=S.filter((function(e){return!!e})),_=r.Children.count(I),P="".concat(w,"-item-last"),N=r.Children.map(I,(function(e,t){var n=t===_-2?P:"",a=t===_-1?P:"";return r.cloneElement(e,{className:o()([e.props.className,!v&&l?n:a,C(e,t)])})}));return r.createElement("ul",h({},A,{className:O}),N)},e}return t=u,(n=[{key:"render",value:function(){return r.createElement(c.a,null,this.renderTimeline)}}])&&A(t.prototype,n),a&&A(t,a),u}(r.Component);S.Item=d,S.defaultProps={reverse:!1,mode:""};t.default=S},tnhM:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUser=t.getSubEntries=t.getHooks=t.getTag=t.getBranch=void 0;var r=o(n("14Xm")),a=o(n("vDqi"));function o(e){return e&&e.__esModule?e:{default:e}}function i(e){return function(){var t=e.apply(this,arguments);return new Promise((function(e,n){return function r(a,o){try{var i=t[a](o),c=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(c).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(c)}("next")}))}}var c,u,l,s,f;t.getBranch=(c=i(r.default.mark((function e(t,n){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.default.get("/"+n+"/"+t+"/branches.json");case 2:return e.abrupt("return",e.sent.data);case 3:case"end":return e.stop()}}),e,void 0)}))),function(e,t){return c.apply(this,arguments)}),t.getTag=(u=i(r.default.mark((function e(t,n){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.default.get("/"+n+"/"+t+"/tags.json");case 2:return e.abrupt("return",e.sent.data);case 3:case"end":return e.stop()}}),e,void 0)}))),function(e,t){return u.apply(this,arguments)}),t.getHooks=(l=i(r.default.mark((function e(t,n){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.default.get("/projects/"+t+"/hooks.json",{params:n});case 2:return e.abrupt("return",e.sent.data);case 3:case"end":return e.stop()}}),e,void 0)}))),function(e,t){return l.apply(this,arguments)}),t.getSubEntries=(s=i(r.default.mark((function e(t,n,o){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.default.get("/"+t+"/"+n+"/sub_entries.json",{params:o});case 2:return e.abrupt("return",e.sent.data);case 3:case"end":return e.stop()}}),e,void 0)}))),function(e,t,n){return s.apply(this,arguments)}),t.getUser=(f=i(r.default.mark((function e(t){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.default.get("/users/"+t+"/hovercard.json");case 2:return e.abrupt("return",e.sent.data);case 3:case"end":return e.stop()}}),e,void 0)}))),function(e){return f.apply(this,arguments)})}}]); |