Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
inetpub
/
wwwroot
/
IRC
/
ClientApp
/
build
/
static
/
js
/
Edit File Name :
main.ffed0fc9.chunk.js
(this["webpackJsonpreact-app"]=this["webpackJsonpreact-app"]||[]).push([[0],{180:function(e,t,n){},454:function(e,t,n){},471:function(e,t,n){},472:function(e,t,n){"use strict";n.r(t);var r=n(3),a=n(20),c=n.n(a),i=n(17),s=(n(180),n(181),n(9)),o=n(46),l=n(168),u=n(5),d="ADD_MESSAGE",j="ADD_MESSAGES",b="ADD_OTHER_MESSAGES",m="REMOVE_MESSAGE",p="CLEAR_MESSAGE",h="GET_ROLES",f="GET_TEMPLATES",O="GET_CHECKLIST",v="GET_SECTIONS",x="GET_SUBSECTIONS",g="GET_COMPONENTS",w="GET_RECOMMENDATIONS",S="GET_SALUTATIONS",y="GET_LOGGEDIN_USER_DETAIL",I="GET_USER_LIST",N="GET_ARTICLE",C="COUNT_ARTICLE",E="DELETE_ARTICLE",R="GET_REVIEW",D={roles:[]},k=n(22),F={messages:{},otherMessage:{},arrayMessages:[]},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case d:return Object(u.a)(Object(u.a)({},e),{},{messages:t.payload});case j:return Object(u.a)(Object(u.a)({},e),{},{arrayMessages:[t.payload].concat(Object(k.a)(e.arrayMessages))});case b:return Object(u.a)(Object(u.a)({},e),{},{otherMessage:t.payload});case m:return Object(u.a)(Object(u.a)({},e),{},{arrayMessages:e.arrayMessages.filter((function(e){return e.id!==t.payload}))});case p:return Object(u.a)(Object(u.a)({},e),{},{messages:{}});default:return e}},A={loggedInUserDetail:{},userList:[]},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case y:return Object(u.a)(Object(u.a)({},e),{},{loggedInUserDetail:t.payload});case I:return Object(u.a)(Object(u.a)({},e),{},{userList:t.payload});default:return e}},_={checkList:[],sections:[],subSections:[],templates:[],components:[],recommendations:[],salutations:[]},L={article:{},review:{},articleCounts:[]},B=Object(o.b)({commonReducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D,t=arguments.length>1?arguments[1]:void 0;return t.type===h?Object(u.a)(Object(u.a)({},e),{},{roles:t.payload}):e},validateReducer:P,userReducer:T,metaReducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case O:return Object(u.a)(Object(u.a)({},e),{},{checkList:t.payload});case v:return Object(u.a)(Object(u.a)({},e),{},{sections:t.payload});case x:return Object(u.a)(Object(u.a)({},e),{},{subSections:t.payload});case f:return Object(u.a)(Object(u.a)({},e),{},{templates:t.payload});case g:return Object(u.a)(Object(u.a)({},e),{},{components:t.payload});case w:return Object(u.a)(Object(u.a)({},e),{},{recommendations:t.payload});case S:return Object(u.a)(Object(u.a)({},e),{},{salutations:t.payload});default:return e}},articleReducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case N:return Object(u.a)(Object(u.a)({},e),{},{article:t.payload});case R:return Object(u.a)(Object(u.a)({},e),{},{review:t.payload});case C:return Object(u.a)(Object(u.a)({},e),{},{articleCounts:t.payload});default:return e}}});function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!0,n=[l.a];return t?Object(o.d)(B,e,o.a.apply(void 0,n)):Object(o.d)(B,e,Object(o.c)(o.a.apply(void 0,n)))}var M=n(16),V=n(10),q=n(8),z=n(6),W=n.n(z),G=n(4),H=n.p+"static/media/logo.b47ed324.png",J={siginIn:"auth/signin",signOut:"auth/signout"},K={templates:"meta/templates",checkList:"meta/checklist",sections:"meta/sections",subSections:"meta/sub-sections",components:"meta/components",salutations:"meta/salutations",recommendations:"meta/recommendations"},Y={roles:"security/roles",emailTemplate:"common/email-template",downloadFiles:"common/download"},$={verifyEmail:"security/verify-email",signup:"security/signup",list:"security/users/list",users:"security/users",userDetails:"security/users/details",forgotPassword:"security/users/forgot-password",resetPassword:"security/users/reset-password",changePassword:"security/users/change-password",changePasswordByUser:"security/users/change-user-password",status:"security/users/status"},X={article:"articles/article",count:"articles/count",start:"articles/start",authors:"articles/authors",attachments:"articles/attachments",metadata:"articles/metadata",confirmation:"articles/submit",assignArticleForEditor:"articles/assign-article/editor",assingedInfo:"articles/assigned-info",updateStatus:"articles/update-status",review:"articles/review",assigntToReviewer:"articles/assign-to-reviewer",reviewDetail:"articles/review-detail",reviewByArticle:"articles/review-by-article",acknowledgeReview:"articles/acknowledge-review",submitDownloadAndReview:"articles/submit-download-review",submitReview:"articles/submit-review",requestRevision:"articles/request-revision",revision:"articles/revision",reviewer:"articles/reviewer"},Q=n(169),Z=n.n(Q),ee="".concat(window.location.origin,"/v1/"),te=function(){return function(e){e({type:p,payload:null})}};function ne(e,t){var n={};n.MessageType=t.MessageType||t.messageType||"Warning",n.Message=t.Message||t.message||t,e&&function(e,t){var n=null,r=[];t&&(t.MessageType?n=t.MessageType:t.data&&t.data.MessageType&&(n=t.data.MessageType),t.Message?r=t.Message:t.data&&t.data.Message&&(r=t.data.Message)),(n||r)&&e({type:d,payload:{type:n,message:r}})}(e,n)}var re,ae=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={headers:{Authorization:localStorage.getItem("AuthToken")}};return e&&(t.headers["content-type"]="multipart/form-data"),t},ce=Z.a.create({baseURL:ee}),ie=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Promise((function(a,c){var i=ue(e,n);ce.get(i,ae()).then((function(e){return de(e,t,a,r)})).catch((function(e){return je(e,t,a)}))}))},se=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(c,i){ce.post(e,n,ae(a)).then((function(e){return de(e,t,c,r)})).catch((function(e){return je(e,t,c)}))}))},oe=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(c,i){ce.put(e,n,ae(a)).then((function(e){return de(e,t,c,r)})).catch((function(e){return je(e,t,c)}))}))},le=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return new Promise((function(a,c){var i="".concat(e,"/").concat(n);ce.delete(i,ae()).then((function(e){return de(e,t,a,r)})).catch((function(e){return je(e,t,a)}))}))},ue=function(e,t){var n=t?Object.entries(t):null,r=e;return n&&n.map((function(e,t){r="".concat(r,0==t?"?":"&","".concat(e[0],"=").concat(e[1]))})),r},de=function(e,t,n,r){var a=e.data;1==a.Status?r&&ne(t,a):void 0==a.Status?200==e.status||(ne(t,"Response status is not 200"),a=null):(ne(t,a),a=null),n(a)},je=function(e,t,n){ne(t,e.message),n(null)};!function(e){e.base="/",e.login="/login",e.viewArticle="/view-article",e.adminSubmission="/admin/submission",e.user="/admin/user",e.forgotPassword="/reset-password",e.resetPassword="/reset-password/send",e.signup="/signup",e.verifyEmailAddress="/email-verification",e.submitter="/submitter",e.submission="/submitter/submission",e.revision="/submitter/revision",e.revisionDetail="/submitter/revision-detail",e.editor="/editor",e.reviewer="/reviewer",e.review="/reviewer/review"}(re||(re={}));var be=re,me=function(e,t){if(e){var n="bearer "+e.Token,r=e.ExpireMinutes,a=e.RefreshToken,c=e.IdleTimeoutMinutes;localStorage.setItem("Role",e.Role),localStorage.setItem("AuthToken",n),localStorage.setItem("UserName",e.Username),localStorage.setItem("RefreshToken",a),localStorage.setItem("IdleTimeOut",c),localStorage.setItem("ExpiresMinutes",r)}},pe=function(e,t){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(J.siginIn,n,e).catch((function(e){return!1}));case 2:(r=t.sent)&&r.Status&&(me(r.Data),window.location.href="/");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},he=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se($.list,n,e,!1);case 2:return r=t.sent,n({type:I,payload:r.Data}),t.abrupt("return",r.Data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},fe=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r,a;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.Id?oe:se,t.next=3,r($.users,n,e);case 3:return a=t.sent,t.abrupt("return",a.Data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Oe=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,le("".concat($.users),n,e);case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},ve=function(e){var t=e.userId,n=e.isInactive;return function(){var e=Object(q.a)(W.a.mark((function e(r){var a;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie("".concat($.status,"/").concat(t,"?isInactive=").concat(n),r);case 2:return a=e.sent,e.abrupt("return",a.Data);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},xe=function(e){var t=e.userName,n=e.newPassword;return function(){var e=Object(q.a)(W.a.mark((function e(r){var a;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,se($.changePasswordByUser,r,{userName:t,newPassword:n});case 2:return a=e.sent,e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},ge=function(e){var t=e.currentPassword,n=e.newPassword,r=e.confirmNewPassword;return function(){var e=Object(q.a)(W.a.mark((function e(a){var c;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,se($.changePassword,a,{currentPassword:t,confirmNewPassword:r,newPassword:n});case 2:return c=e.sent,e.abrupt("return",c);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},we=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se($.signup,n,e);case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Se=function(e){var t=e.email;return function(){var e=Object(q.a)(W.a.mark((function e(n){var r;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,se($.forgotPassword,n,{email:t});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},ye=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se($.resetPassword,n,e);case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Ie=n(1),Ne=function(e){e.user;var t=e.isVisible,n=e.setVisible,a=Object(r.useRef)(),c=Object(s.b)(),i=Object(r.useState)({currentPassword:"",newPassword:"",confirmNewPassword:"",isLoading:!1}),o=Object(V.a)(i,2),l=o[0],d=o[1],j=function(){var e=Object(q.a)(W.a.mark((function e(){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}return e.next=3,c(ge({currentPassword:l.currentPassword,newPassword:l.newPassword,confirmNewPassword:l.confirmNewPassword}));case 3:(n=e.sent)&&n.Status&&b();case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){a.current.resetFields(),d({newPassword:"",currentPassword:"",confirmNewPassword:"",isLoading:!1}),n(!1)};return Object(Ie.jsx)(G.Dialog,{title:"Change Password",visible:t,onCancel:function(){return b()},style:{width:"350px"},children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsxs)(G.Form,{ref:a,rules:{newPassword:[{required:!0,message:"New password is required",trigger:"blur"}]},children:[Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Input,{name:"currentPassword",type:"password",value:l.currentPassword,placeholder:"Old Pasword",onChange:function(e){return d(Object(u.a)(Object(u.a)({},l),{},{currentPassword:e}))}})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Input,{name:"newPassword",type:"password",value:l.newPassword,placeholder:"New Pasword",onChange:function(e){return d(Object(u.a)(Object(u.a)({},l),{},{newPassword:e}))}})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Input,{name:"confirmNewPassword",type:"password",value:l.confirmNewPassword,placeholder:"New Pasword",onChange:function(e){return d(Object(u.a)(Object(u.a)({},l),{},{confirmNewPassword:e}))}})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{onClick:function(){return j()},loading:l.isLoading,children:"Change Password"})})]})})})},Ce=function(e){var t=Object(s.c)((function(e){return e.validateReducer})).messages,n=Object(s.b)(),a=3e3,c=function(e){var t=e.toLowerCase();return"success "!==t&&"warning"!==t&&"info"!==t&&"error"!==t&&(t="info"),t};return Object(r.useEffect)((function(){if(t&&t.message&&void 0!==t.message&&t.message.length>0)if(Array.isArray(t.message))t.message.forEach((function(e){var r=c(t.type);Object(G.Notification)({message:e,type:r,duration:a,offset:50}),setTimeout((function(){n(te())}),a)}));else{var e=c(t.type);"success "!==e&&"warning"!==e&&"info"!==e&&"error"!==e&&(e="info"),Object(G.Notification)({message:t.message,type:e,duration:a,offset:50}),setTimeout((function(){n(te())}),a)}}),[t]),Object(Ie.jsx)(Ie.Fragment,{})},Ee=function(e){return void 0===e||null===e||e==={}||""===e||"null"===e||"object"===typeof e&&0===Object.keys(e).length||"string"===typeof e&&0===e.trim().length},Re=Ee;var De,ke=n(18),Fe=n(40),Pe=n.n(Fe);!function(e){e[e.NEW=1]="NEW",e[e.SUBMITTED=2]="SUBMITTED",e[e.RESUBMITTED=3]="RESUBMITTED",e[e.REVISION=4]="REVISION",e[e.REJECTED=5]="REJECTED",e[e.APPROVED=6]="APPROVED",e[e.ASSIGNEDEDITOR=7]="ASSIGNEDEDITOR",e[e.REVIEWING=9]="REVIEWING",e[e.REVIEWED=10]="REVIEWED"}(De||(De={}));var Ae,Te=De;!function(e){e.Public="Public",e.Submitter="Submitter",e.Administrator="Administrator",e.Editor="Editor",e.Reviewer="Reviewer"}(Ae||(Ae={}));var _e=Ae;function Le(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a={};return a=t===_e.Submitter?Ue(n,r):t===_e.Reviewer?Ve(e,n,r):t===_e.Editor?Me(n,r):Be(n,r),Re(a)?null:Object(Ie.jsx)("div",{className:"article-card__status-block ".concat(a.color),children:Object(Ie.jsx)("span",{children:a.text})})}var Be=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e===Te.REVISION?"Revision Required"===t?{text:"Revision required",color:"yellow"}:"Decline Submission"===t?{text:"Review declined",color:"red"}:"See Comments"===t?{text:"Request to see comments",color:"yellow"}:{text:"Revision required",color:"yellow"}:e===Te.SUBMITTED||e===Te.RESUBMITTED?{text:"Submission",color:"blue"}:e===Te.ASSIGNEDEDITOR?{text:"Need to assign reviewer",color:"yellow"}:e===Te.REVIEWING?{text:"Under review",color:"yellow"}:e===Te.REVIEWED?"Accept Submission"===t?{text:"Submisson accepted",color:"green"}:"Revision Required"===t?{text:"Revision required",color:"yellow"}:"Decline Submission"===t?{text:"Review declined",color:"red"}:"See Comments"===t?{text:"Request to see comments",color:"yellow"}:{text:"Reviewd",color:"green"}:void 0},Ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e===Te.NEW?{text:"Need to submit",color:"blue"}:e===Te.REVISION?"Revision Required"===t?{text:"Revision required",color:"yellow"}:"Decline Submission"===t?{text:"Review declined",color:"red"}:"See Comments"===t?{text:"Request to see comments",color:""}:{text:"Revision required",color:"yellow"}:e===Te.APPROVED?{text:"Approved",color:"green"}:e===Te.REJECTED?{text:"Declined",color:"red"}:{text:"Under review",color:"yellow"}},Me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e===Te.ASSIGNEDEDITOR?{text:"Submission",color:"blue"}:e===Te.REVIEWING?{text:"Under review",color:"yellow"}:e===Te.REVISION?{text:"Revision required",color:"green"}:e===Te.REVIEWED?"Accept Submission"===t?{text:"Submisson accepted",color:"green"}:"Revision Required"===t?{text:"Revision required",color:"yellow"}:"Decline Submission"===t?{text:"Review declined",color:"red"}:"See Comments"===t?{text:"Request to see comments",color:"yellow"}:{text:"Reviewed",color:"green"}:e===Te.APPROVED?{text:"Approved",color:"green"}:e===Te.REJECTED?{text:"Declined",color:"red"}:void 0},Ve=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=e.ReviewStatus;if(t===Te.REVIEWING)return 0===r?{text:"New",color:"blue"}:2===r||1===r?{text:"Under review",color:"yellow"}:4===r?{text:"Review declined",color:"red"}:"Accept Submission"===n?{text:"Submisson accepted",color:"green"}:"Revision Required"===n?{text:"Revision required",color:"yellow"}:"Decline Submission"===n?{text:"Review declined",color:"red"}:"See Comments"===n?{text:"Request to see comments",color:"yellow"}:{text:"Reviewed",color:"green"}};function qe(e){return{__html:e}}var ze=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"string";return{required:!0,message:e,trigger:"blur",type:t}},We=function(){return{validator:function(e,t,n){Re(t)&&n(),t&&t.match(/^[0-9]{10}$/i)?n():n(new Error("Valid mobile number is required"))},trigger:"blur,change"}};function Ge(e){Object(M.g)();var t=localStorage.getItem("AuthToken"),n=Object(s.b)(),a=Object(r.useState)(!1),c=Object(V.a)(a,2),o=c[0],l=c[1],u=Object(r.useState)(!1),d=Object(V.a)(u,2),j=d[0],b=d[1],m=Object(s.c)((function(e){return e.userReducer.loggedInUserDetail})),p=(m.Email,m.FullName),h=(m.UserName,m.RoleName);Object(r.useEffect)((function(){t?I():b(!1)}),[t]);var I=function(){var e=Object(q.a)(W.a.mark((function e(){var t;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie($.userDetails,t);case 2:return n=e.sent,t({type:y,payload:n}),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:if(t=e.sent,!Ee(t.UserName)){e.next=6;break}return N(),e.abrupt("return");case 6:n(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(K.checkList,t);case 2:n=e.sent,t({type:O,payload:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(K.sections,t);case 2:n=e.sent,t({type:v,payload:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(K.subSections,t);case 2:n=e.sent,t({type:x,payload:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(K.templates,t);case 2:n=e.sent,t({type:f,payload:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(K.components,t);case 2:n=e.sent,t({type:g,payload:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(K.recommendations,t);case 2:n=e.sent,t({type:w,payload:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(K.salutations,t);case 2:(n=e.sent)&&n.Status&&t({type:S,payload:n.Data});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),b(!0);case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){n(function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:localStorage.clear(),window.location.href=be.login;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())};return Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsx)(Ce,{}),Object(Ie.jsxs)("div",{className:"app-header",children:[Object(Ie.jsxs)("div",{className:"app-header-logo",children:[Object(Ie.jsx)("img",{src:H}),Object(Ie.jsxs)("h2",{children:[Object(Ie.jsx)(i.b,{to:be.base,children:"B&B Institutional Review Committee - Web Portal"})," "]})]}),j&&Object(Ie.jsxs)("div",{className:"app-header-drop",children:[Object(Ie.jsx)(G.Dropdown,{onCommand:function(e){"logout"===e?N():"changePassword"===e&&l(!0)},menu:Object(Ie.jsxs)(G.Dropdown.Menu,{children:[Object(Ie.jsx)(G.Dropdown.Item,{command:"changePassword",children:"Change Password"}),Object(Ie.jsx)(G.Dropdown.Item,{command:"logout",children:" Log out"})]}),children:Object(Ie.jsxs)("div",{className:"el-dropdown-link drop-title",children:[Object(Ie.jsxs)("div",{className:"drop-title-info",children:[Object(Ie.jsxs)("span",{className:"drop-title-info-title",children:["Welcome ",p]}),Object(Ie.jsxs)("span",{className:"drop-title-info-subtitle",children:["logged in as ",h]})]}),Object(Ie.jsx)("i",{className:"el-icon-caret-bottom el-icon--right"})]})}),Object(Ie.jsx)(Ne,{isVisible:o,setVisible:l})]})]})]})}var He=function(e){return Object(Ie.jsx)("div",{className:"admin-side-bar",children:Object(Ie.jsxs)(G.Menu,{defaultActive:"2",className:"el-menu-vertical-demo",onOpen:function(){},onClose:function(){},children:[Object(Ie.jsx)(G.Menu.SubMenu,{index:"1",title:Object(Ie.jsxs)("span",{children:[Object(Ie.jsx)("i",{className:"el-icon-caret-right"}),"User Module"]}),children:Object(Ie.jsx)(G.Menu.Item,{index:"1-1",children:Object(Ie.jsx)(i.b,{to:be.user,children:" User List"})})}),Object(Ie.jsxs)(G.Menu.Item,{index:"2",children:[Object(Ie.jsx)("i",{className:"el-icon-menu"})," ",Object(Ie.jsx)(i.b,{to:be.adminSubmission,children:" Submission"})]})]})})},Je=function(e){return Object(Ie.jsxs)(G.Layout.Row,{className:"admin-layout",children:[Object(Ie.jsx)(G.Layout.Col,{span:4,children:Object(Ie.jsx)(He,Object(u.a)({},e))}),Object(Ie.jsx)(G.Layout.Col,{span:20,children:Object(Ie.jsx)("div",{className:"admin-container",children:e.children})})]})};function Ke(e){var t=localStorage.getItem("AuthToken"),n=Object(r.useState)(t),a=Object(V.a)(n,2),c=(a[0],a[1],Object(M.g)(),localStorage.getItem("Role"));return Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsx)(Ge,{}),c===_e.Administrator?Object(Ie.jsx)(Je,Object(u.a)({},e)):Object(Ie.jsx)("div",{className:"app-container",children:e.children})]})}var Ye,$e,Xe,Qe,Ze,et,tt,nt=function(){var e=Object(r.useState)({username:"",password:"",role:""}),t=Object(V.a)(e,2),n=t[0],a=t[1],c=Object(s.c)((function(e){return e.commonReducer})),o=c.roles,l=Object(r.useRef)(),d=Object(s.b)(),j=(Object(M.g)(),function(e,t){a(Object(u.a)(Object(u.a)({},n),{},Object(ke.a)({},e,t)))}),b=function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),l.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}return e.next=3,d(pe(n));case 3:e.next=6;break;case 5:return e.abrupt("return",!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(Ie.jsx)("div",{className:"container",children:Object(Ie.jsxs)("div",{className:"login-form",children:[Object(Ie.jsxs)(G.Form,{ref:l,rules:{username:[{required:!0,message:"Please input user name",trigger:"blur"}],password:[{required:!0,message:"Please input password",trigger:"blur"}],role:[{required:!0,message:"Please input user role",trigger:"blur"}]},className:"demo-form-stacked",model:n,labelPosition:"top",labelWidth:"100",children:[Object(Ie.jsx)(G.Form.Item,{label:"Email",prop:"username",children:Object(Ie.jsx)(G.Input,{placeholder:"Email",value:n.username,onChange:function(e){return j("username",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Password",prop:"password",children:Object(Ie.jsx)(G.Input,{placeholder:"Password",type:"password",value:n.password,onChange:function(e){return j("password",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Log in as",prop:"role",children:Object(Ie.jsx)(G.Select,{value:n.role,placeholder:"Role",onChange:function(e){return j("role",e)},children:o&&o.map((function(e,t){return Object(Ie.jsx)(G.Select.Option,{label:e.Name,value:e.Name},t)}))})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:b,nativeType:"submit",children:"Login"})})]}),Object(Ie.jsxs)("div",{className:"login-form__forgot",children:[Object(Ie.jsx)("span",{className:"forgot-link",children:Object(Ie.jsx)(i.b,{to:be.resetPassword,children:"Forgot Password?"})}),Object(Ie.jsx)("span",{className:"forgot-link",children:Object(Ie.jsx)(i.b,{to:be.signup,children:"Sign up"})})]})]})})},rt=function(e){var t=e.list,n=e.onChange,r=e.value,a=function(e,t){var a=Object(k.a)(r),c=a.findIndex((function(t){return t.Id===e.Id}));t?a.push(e):c>-1&&a.splice(c),n(a)},c=function(e){return r.filter((function(t){return t.Id===e.Id})).length>0};return Object(Ie.jsx)("div",{className:"ctrl-check-list",children:t&&t.map((function(e,t){return Object(Ie.jsx)("div",{children:Object(Ie.jsx)(G.Checkbox,{label:e.Name,checked:c(e),onChange:function(t){return a(e,t)}},t)},t)}))})},at=n(113),ct=["title","titleId"];function it(){return it=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},it.apply(this,arguments)}function st(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ot(e,t){var n=e.title,a=e.titleId,c=st(e,ct);return r.createElement("svg",it({height:512,viewBox:"0 0 64 64",width:512,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},c),n?r.createElement("title",{id:a},n):null,Ye||(Ye=r.createElement("linearGradient",{id:"linear-gradient",gradientUnits:"userSpaceOnUse",x1:34.5,x2:34.5,y1:-31.987,y2:-29.421},r.createElement("stop",{offset:0,stopColor:"#f3f7ff"}),r.createElement("stop",{offset:.99,stopColor:"#b5d1ff"}))),$e||($e=r.createElement("linearGradient",{id:"linear-gradient-2",gradientUnits:"userSpaceOnUse",x1:10.396,x2:10.396,y1:30.449,y2:119.699},r.createElement("stop",{offset:0,stopColor:"#048ac4"}),r.createElement("stop",{offset:1,stopColor:"#35489b"}))),Xe||(Xe=r.createElement("linearGradient",{id:"linear-gradient-3",x1:33.5,x2:33.5,xlinkHref:"#linear-gradient",y1:-5.429,y2:153.977})),Qe||(Qe=r.createElement("linearGradient",{id:"linear-gradient-4",x1:50.538,x2:50.538,xlinkHref:"#linear-gradient",y1:-23.429,y2:-3.999})),Ze||(Ze=r.createElement("linearGradient",{id:"linear-gradient-5",x1:27.396,x2:27.396,xlinkHref:"#linear-gradient-2",y1:32.518,y2:84.952})),et||(et=r.createElement("linearGradient",{id:"linear-gradient-6",x1:9,x2:9,xlinkHref:"#linear-gradient-2",y1:16.321,y2:43.66})),tt||(tt=r.createElement("g",{id:"Document"},r.createElement("path",{d:"m56 64h-43a1 1 0 0 1 -1-1v-62a1 1 0 0 1 1-1h32.662a1 1 0 0 1 .707.293l10.338 10.338a1 1 0 0 1 .293.707v51.662a1 1 0 0 1 -1 1z",fill:"url(#linear-gradient)"}),r.createElement("path",{d:"m7 32.946 4-1.767 2.792 4.285h-6.792z",fill:"url(#linear-gradient-2)"}),r.createElement("path",{d:"m55 64h-43a1 1 0 0 1 -1-1v-62a1 1 0 0 1 1-1h33.076l10.924 10.924v52.076a1 1 0 0 1 -1 1z",fill:"url(#linear-gradient-3)"}),r.createElement("path",{d:"m45.076 0v9.924a1 1 0 0 0 1 1h9.924l-4.9-5.9z",fill:"url(#linear-gradient-4)"}),r.createElement("path",{d:"m46.022 52.5h-37.252a1.769 1.769 0 0 1 -1.77-1.77v-16.016h39.022a1.771 1.771 0 0 1 1.77 1.77v14.246a1.77 1.77 0 0 1 -1.77 1.77z",fill:"url(#linear-gradient-5)"}),r.createElement("path",{d:"m11 31.179h-2.232a1.767 1.767 0 0 0 -1.768 1.767 1.767 1.767 0 0 0 1.768 1.768h2.232z",fill:"url(#linear-gradient-6)"}),r.createElement("g",{fill:"#fff"},r.createElement("path",{d:"m14.408 40.18a.868.868 0 0 1 .868-.868 19.487 19.487 0 0 1 3.937.164 3.24 3.24 0 0 1 2.115 2.183 6.323 6.323 0 0 1 .281 2.03 5.664 5.664 0 0 1 -.263 1.828 3.132 3.132 0 0 1 -2.139 2.2 20.9 20.9 0 0 1 -3.931.182.868.868 0 0 1 -.868-.868zm1.735 1.128v4.6c0 .774 1.023.491 1.295.542a4.764 4.764 0 0 0 1.048-.082 1.483 1.483 0 0 0 1.155-1.187 5.614 5.614 0 0 0 .175-1.573 5.138 5.138 0 0 0 -.175-1.529 1.665 1.665 0 0 0 -1.295-1.237 11.548 11.548 0 0 0 -1.661-.082.542.542 0 0 0 -.542.548z"}),r.createElement("path",{d:"m22.729 43.66a4.514 4.514 0 0 1 1.192-3.381 3.843 3.843 0 0 1 2.962-1.113 4.034 4.034 0 0 1 3.038 1.177 4.515 4.515 0 0 1 1.14 3.276 4.5 4.5 0 0 1 -1.131 3.255 4 4 0 0 1 -3.024 1.175 4.045 4.045 0 0 1 -3.047-1.169 4.437 4.437 0 0 1 -1.13-3.22zm1.787-.059a3.219 3.219 0 0 0 .673 2.212 2.318 2.318 0 0 0 3.414.006 3.284 3.284 0 0 0 .665-2.241 3.226 3.226 0 0 0 -.648-2.2 2.4 2.4 0 0 0 -3.448.009 3.241 3.241 0 0 0 -.656 2.213z"}),r.createElement("path",{d:"m38.718 45a.871.871 0 0 1 .518 1.217 3.255 3.255 0 0 1 -.93 1.149 4.046 4.046 0 0 1 -5.095-.486 4.477 4.477 0 0 1 -1.1-3.2 4.7 4.7 0 0 1 1.108-3.331 3.8 3.8 0 0 1 2.912-1.186 3.571 3.571 0 0 1 2.56.931 2.619 2.619 0 0 1 .422.518.868.868 0 0 1 -.538 1.3.856.856 0 0 1 -.941-.4 1.709 1.709 0 0 0 -.416-.484 1.821 1.821 0 0 0 -1.175-.387 1.956 1.956 0 0 0 -1.55.686 3.362 3.362 0 0 0 -.595 2.22 3.609 3.609 0 0 0 .586 2.321 1.9 1.9 0 0 0 1.524.691 1.735 1.735 0 0 0 1.189-.439 1.974 1.974 0 0 0 .472-.656.873.873 0 0 1 1.049-.464z"})))))}var lt,ut,dt,jt,bt,mt,pt,ht=r.forwardRef(ot),ft=(n.p,["title","titleId"]);function Ot(){return Ot=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},Ot.apply(this,arguments)}function vt(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function xt(e,t){var n=e.title,a=e.titleId,c=vt(e,ft);return r.createElement("svg",Ot({height:512,viewBox:"0 0 64 64",width:512,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":a},c),n?r.createElement("title",{id:a},n):null,lt||(lt=r.createElement("linearGradient",{id:"linear-gradient",gradientUnits:"userSpaceOnUse",x1:34.5,x2:34.5,y1:-31.987,y2:-29.421},r.createElement("stop",{offset:0,stopColor:"#f3f7ff"}),r.createElement("stop",{offset:.99,stopColor:"#b5d1ff"}))),ut||(ut=r.createElement("linearGradient",{id:"linear-gradient-2",gradientUnits:"userSpaceOnUse",x1:10.396,x2:10.396,y1:30.449,y2:119.699},r.createElement("stop",{offset:0,stopColor:"#ff5252"}),r.createElement("stop",{offset:1,stopColor:"#d50000"}))),dt||(dt=r.createElement("linearGradient",{id:"linear-gradient-3",x1:33.5,x2:33.5,xlinkHref:"#linear-gradient",y1:-5.429,y2:153.977})),jt||(jt=r.createElement("linearGradient",{id:"linear-gradient-4",x1:50.538,x2:50.538,xlinkHref:"#linear-gradient",y1:-23.429,y2:-3.999})),bt||(bt=r.createElement("linearGradient",{id:"linear-gradient-5",x1:27.396,x2:27.396,xlinkHref:"#linear-gradient-2",y1:32.518,y2:84.952})),mt||(mt=r.createElement("linearGradient",{id:"linear-gradient-6",x1:9,x2:9,xlinkHref:"#linear-gradient-2",y1:16.321,y2:43.66})),pt||(pt=r.createElement("g",{id:"PDF"},r.createElement("path",{d:"m56 64h-43a1 1 0 0 1 -1-1v-62a1 1 0 0 1 1-1h32.662a1 1 0 0 1 .707.293l10.338 10.338a1 1 0 0 1 .293.707v51.662a1 1 0 0 1 -1 1z",fill:"url(#linear-gradient)"}),r.createElement("path",{d:"m7 32.946 4-1.767 2.792 4.285h-6.792z",fill:"url(#linear-gradient-2)"}),r.createElement("path",{d:"m55 64h-43a1 1 0 0 1 -1-1v-62a1 1 0 0 1 1-1h33.076l10.924 10.924v52.076a1 1 0 0 1 -1 1z",fill:"url(#linear-gradient-3)"}),r.createElement("path",{d:"m45.076 0v9.924a1 1 0 0 0 1 1h9.924l-4.9-5.9z",fill:"url(#linear-gradient-4)"}),r.createElement("path",{d:"m46.022 52.5h-37.252a1.769 1.769 0 0 1 -1.77-1.77v-16.016h39.022a1.771 1.771 0 0 1 1.77 1.77v14.246a1.77 1.77 0 0 1 -1.77 1.77z",fill:"url(#linear-gradient-5)"}),r.createElement("path",{d:"m11 31.179h-2.232a1.767 1.767 0 0 0 -1.768 1.767 1.767 1.767 0 0 0 1.768 1.768h2.232z",fill:"url(#linear-gradient-6)"}),r.createElement("g",{fill:"#fff"},r.createElement("path",{d:"m15 47.035v-6.854a.868.868 0 0 1 .868-.869 28.119 28.119 0 0 1 3.977.129 2.416 2.416 0 0 1 1.735 2.514 2.482 2.482 0 0 1 -1.916 2.584 18.245 18.245 0 0 1 -2.651.123.279.279 0 0 0 -.279.279v2.094a.867.867 0 0 1 -.867.867.867.867 0 0 1 -.867-.867zm1.734-5.99v1.879a.279.279 0 0 0 .279.279 7.605 7.605 0 0 0 2.041-.135 1.172 1.172 0 0 0 -.234-2.244 16.962 16.962 0 0 0 -1.807-.059.279.279 0 0 0 -.278.28z"}),r.createElement("path",{d:"m23 40.181a.868.868 0 0 1 .868-.869 19.481 19.481 0 0 1 3.936.164 3.241 3.241 0 0 1 2.116 2.183 6.351 6.351 0 0 1 .281 2.03 5.635 5.635 0 0 1 -.264 1.828 3.132 3.132 0 0 1 -2.139 2.2 20.884 20.884 0 0 1 -3.93.182.868.868 0 0 1 -.868-.865zm1.734.864v5.131a.279.279 0 0 0 .279.279 10.917 10.917 0 0 0 2.065-.082 1.483 1.483 0 0 0 1.154-1.187 5.609 5.609 0 0 0 .176-1.573 5.133 5.133 0 0 0 -.176-1.529 1.664 1.664 0 0 0 -1.3-1.237 14.379 14.379 0 0 0 -1.924-.082.279.279 0 0 0 -.275.28z"}),r.createElement("path",{d:"m31.682 47.035v-6.854a.869.869 0 0 1 .869-.869h4.293a.727.727 0 0 1 .727.727.726.726 0 0 1 -.727.726h-3.144a.279.279 0 0 0 -.279.28v1.474a.279.279 0 0 0 .279.28h2.58a.727.727 0 0 1 .727.726.728.728 0 0 1 -.727.727h-2.58a.279.279 0 0 0 -.279.279v2.5a.868.868 0 0 1 -.868.867.867.867 0 0 1 -.871-.863z"})))))}var gt=r.forwardRef(xt);n.p;var wt=function(e){var t=e.size,n=e.color,r=e.name,a=e.height,c=void 0===a?null:a,i=function(e){switch(e){case"document":return ht;case"pdf":return gt;default:return null}}(r);return Object(Ie.jsx)(i,{width:t,height:t||c,fill:n})};wt.defaultProps={size:"25px",color:"#3a3a3a"};var St,yt=wt,It=n(24);!function(e){e.Uploads="Uploads"}(St||(St={}));var Nt=St,Ct=function(e){var t=e&&null!==e.toLowerCase().match(/.(jpg|jpeg|png)$/i),n=e&&null!==e.toLowerCase().match(/.(pdf)$/i),r=e&&null!==e.toLowerCase().match(/.(xls|xlsx)$/i),a=e&&null!==e.toLowerCase().match(/.(doc|docx)$/i),c=e&&e.indexOf(".");return{isImage:t,isPdf:n,isDocs:a,isXls:r,ext:e&&e.substring(c+1,e.length)}},Et=(n(454),n(59)),Rt=n(174);n(455);var Dt=function(e){var t=e.image,n=e.dowloadLinkUrl,r=e.title,a=e.show,c=e.hostedUrl,i=e.onClose,s=t?"".concat(c,"/").concat(t.serverFileName||""):"";return Object(Ie.jsx)(G.Dialog,{title:r,visible:a,onCancel:function(){return i()},children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsx)(Ie.Fragment,{children:t&&Object(Ie.jsxs)("div",{className:"image-modal__container",children:[Object(Ie.jsx)("span",{onClick:function(e){e.stopPropagation(),window.open(n)},className:"image-modal__download",children:Object(Ie.jsx)(Et.a,{})}),Object(Ie.jsx)(Rt.a,{src:s,zoomSrc:s,zoomScale:1.5})]})})})})},kt=function(e){var t=Object(r.useRef)(),n=(e.enableUpload,e.name),a=e.disabled,c=e.multiple,i=(e.maxFiles,e.value),s=e.onChange,o=e.label,l=e.isPreview,u=e.validExtensions,d=Object(r.useState)(!1),j=Object(V.a)(d,2),b=j[0],m=j[1],p=Object(r.useState)(!1),h=Object(V.a)(p,2),f=h[0],O=h[1];Object(r.useEffect)((function(){Ee(i)&&(t.current.value="")}),[i]);var v=function(e){var r=e.target.files;O(!1);var a=r&&r[0]||null;!function(e,t){var n=t||[];if(0===n.length)return!0;var r=new RegExp(n.join("|"),"g");return(e&&e.name.toLowerCase().match(r)||[]).length>0}(a,u)?(t.current.value="",O(!0),s&&s(n,null)):s&&s(n,a)},x=function(e){e.serverFileName,e.name,e.FileType;return"v1/".concat(Y.downloadFiles,"/").concat(e.serverFileName||e.ServerFileName)};return Object(Ie.jsxs)(Ie.Fragment,{children:[!l&&Object(Ie.jsx)("input",{ref:t,type:"file",style:{display:"none"},multiple:c,name:n,disabled:a,onChange:function(e){return v&&v(e)}}),Object(Ie.jsxs)("div",{className:"upload-container",children:[o&&Object(Ie.jsx)("span",{className:"upload-label",children:o}),i&&Object(Ie.jsx)("div",{className:"upload-item",onClick:function(e){Ct(i.serverFileName||i.ServerFileName||i.name||i.UserFileName).isImage?i&&!Ee(i.serverFileName||i.ServerFileName)&&m(!0):(e.stopPropagation(),window.open(x(i)))},children:!Ee(i.name||i.UserFileName)&&Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsx)("div",{className:"upload-item-icon",children:function(e){var t=Ct(e.serverFileName||e.name),n=t.isDocs,r=t.isImage,a=t.isPdf;return n?Object(Ie.jsx)(yt,{name:"document",size:"20"}):a?Object(Ie.jsx)(yt,{name:"pdf",size:"20"}):r?Ee(e.serverFileName)&&e?Object(Ie.jsx)("img",{src:URL.createObjectURL(e),width:"20",height:"20"}):Object(Ie.jsx)("img",{src:"/".concat(Nt.Uploads,"/").concat(e.serverFileName),width:"20",height:"20"}):Object(Ie.jsx)(at.b,{})}(i)}),Object(Ie.jsxs)("div",{className:"upload-item-name",children:[i.name||i.UserFileName,!l&&Object(Ie.jsx)("div",{className:"btn-remove",children:Object(Ie.jsx)(It.e,{style:{margin:"0px"},size:"12",color:"#fff",onClick:function(e){e.stopPropagation(),t.current.value="",s&&s(n,null)}})})]})]})}),!l&&Object(Ie.jsx)("div",{className:"upload-button",onClick:function(){l||t.current.click()},children:Object(Ie.jsxs)("div",{className:"el-button",children:[Object(Ie.jsx)(at.a,{}),Object(Ie.jsxs)("span",{className:"upload-info",children:["Click to Upload"," "]})]})})]}),f&&Object(Ie.jsxs)("div",{className:"upload-error",children:["Invalid File. Supported files are ",u.toString()]}),b&&Object(Ie.jsx)(Dt,{dowloadLinkUrl:x(i),hostedUrl:"/".concat(Nt.Uploads),show:b,title:i.name||i.serverFileName,image:i,onClose:m})]})};kt.defaultProps={isPreview:!1,enableUpload:!0};var Ft,Pt=kt,At=function(e){var t=e.label,n=e.children;return Object(Ie.jsxs)("div",{className:"wrapper",children:[t&&Object(Ie.jsx)("div",{className:"wrapper-label",children:t}),Object(Ie.jsx)("div",{className:"wrapper-control",children:n})]})},Tt=function(e){var t=e.label,n=e.children;return Object(Ie.jsxs)("div",{className:"hwrapper",children:[t&&Object(Ie.jsx)("div",{className:"hwrapper-label",children:"".concat(t,": ")}),Object(Ie.jsx)("div",{className:"hwrapper-control",children:n})]})},_t=n(67),Lt=n(68),Bt=n.n(Lt),Ut=function(e){var t=e.value,n=e.name;return Object(Ie.jsx)(_t.CKEditor,{config:{},editor:Bt.a,data:t||"",onChange:function(t,r){var a=r.getData();e.onChange&&e.onChange(n,a)}})},Mt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se("".concat(X.article),n,e,!1);case 2:if(!(r=t.sent)||!r.Status){t.next=5;break}return t.abrupt("return",r.Data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Vt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(X.count,n,e,!1);case 2:r=t.sent,Ee(r)||n({type:C,payload:r&&r.Data});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},qt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ie("".concat(X.article,"/").concat(e),n);case 2:return r=t.sent,Ee(r)||n({type:N,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},zt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,le(X.article,n,e);case 2:return r=t.sent,Ee(r)||n({type:E,payload:{id:e,status:r&&r.Status||!1}}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Wt=function(){return function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t({type:N,payload:{}});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Gt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(X.start,n,e);case 2:return r=t.sent,Ee(r)||n({type:N,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Ht=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(X.authors,n,e,!0,!0);case 2:return r=t.sent,Ee(r)||n({type:N,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Jt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(X.attachments,n,e,!0,!0);case 2:return r=t.sent,Ee(r)||n({type:N,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Kt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(X.metadata,n,e,!0,!1);case 2:return r=t.sent,Ee(r)||n({type:N,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Yt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(X.confirmation,n,e,!0,!1);case 2:return r=t.sent,Ee(r)||n({type:N,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},$t=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(X.assignArticleForEditor,n,e,!0);case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Xt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(X.assigntToReviewer,n,e,!0);case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Qt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ie("".concat(X.reviewDetail,"/").concat(e),n);case 2:if(r=t.sent,Ee(r)){t.next=6;break}return n({type:R,payload:r&&r.Data}),t.abrupt("return",r.Data);case 6:return t.abrupt("return",null);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Zt=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ie("".concat(X.reviewByArticle,"/").concat(e),n);case 2:if(!(r=t.sent)||!r.Status){t.next=5;break}return t.abrupt("return",r.Data);case 5:return t.abrupt("return",null);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},en=function(e,t){return function(){var n=Object(q.a)(W.a.mark((function n(r){var a;return W.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,se("".concat(X.acknowledgeReview),r,{reviewId:e,status:t});case 2:return a=n.sent,n.abrupt("return",a);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()},tn=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r,a,c,i,s;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(a in r=new FormData,e)if("files"!==a)r.append(a,e[a]);else for(c=0;c<e.files.length;c++)i=e.files[c],r.append("Files",i.Attachment||null);return t.next=4,se("".concat(X.submitDownloadAndReview),n,r,!0,!0);case 4:return s=t.sent,t.abrupt("return",s);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},nn=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se("".concat(X.submitReview,"/").concat(e),n,{},!0);case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},rn=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ie(X.assingedInfo,n,e);case 2:if(!(r=t.sent).Status){t.next=5;break}return t.abrupt("return",r.Data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},an=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,se(X.updateStatus,n,e);case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},cn=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r,a,c,i,s;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(a in console.clear(),console.log(e),r=new FormData,e)if("Files"!==a)r.append(a,e[a]);else for(c=0;c<e.Files.length;c++)i=e.Files[c],console.log(i.Attachment),r.append("Files",i.Attachment||null);return t.next=6,se("".concat(X.requestRevision),n,r,!0,!0);case 6:return s=t.sent,t.abrupt("return",s);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},sn=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ie("".concat(X.revision,"/").concat(e),n);case 2:if(!(r=t.sent)||!r.Status){t.next=5;break}return t.abrupt("return",r.Data);case 5:return t.abrupt("return",null);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},on=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,le(X.reviewer,n,e);case 2:if(!(r=t.sent)||!r.Status){t.next=5;break}return t.abrupt("return",r.Data);case 5:return t.abrupt("return",null);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()};!function(e){e.CopyrightStatements="copyrightStatements",e.PrivacyStatements="privacyStatements",e.ReviewGuideline="reviewGuideline"}(Ft||(Ft={}));var ln=Ft,un=function(e){var t=Object(r.useRef)(),n=e.onSave,a=e.selectedTab,c=Object(r.useState)({ArticleId:0,SectionId:0,SubSectionId:0,CommentsForEditor:"",CheckList:[],SubSections:[]}),i=Object(V.a)(c,2),o=i[0],l=i[1],d=Object(r.useState)(!1),j=Object(V.a)(d,2),b=j[0],m=j[1],p={SectionId:[ze("Section is required.","number")],CheckList:[ze("Selecte at least one check list.","array")]},h=Object(s.b)(),f=Object(s.c)((function(e){return e.metaReducer})),O=f.checkList,v=f.templates,x=f.sections,g=f.subSections,w=Object(s.c)((function(e){return e.articleReducer})).article;Object(r.useEffect)((function(){var e={ArticleId:0,SectionId:null,SubSectionId:null,CommentsForEditor:"",CheckList:[],SubSections:[]};Ee(w)||(e={ArticleId:w.Id,SectionId:w.SectionId,SubSectionId:w.SubSectionId,CommentsForEditor:w.CommentsForEditor,SubSections:S(w.SectionId),CheckList:w.CheckList&&w.CheckList.map((function(e){return{Id:e.CheckListId,Name:e.CheckListName}}))||[]}),l(e)}),[w,a]);var S=function(e){return g.filter((function(t){return t.SectionId===e}))||[]},y=function(e,t){var n=Object(u.a)({},o);n[e]=t,"SectionId"===e&&(n.SubSections=S(t)),l(n)},I=v.find((function(e){return e.TemplateKey===ln.CopyrightStatements})),N=v.find((function(e){return e.TemplateKey===ln.PrivacyStatements})),C=function(){var e=Object(q.a)(W.a.mark((function e(){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(t){var r,a;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=10;break}return m(!0),r={SectionId:o.SectionId,SubSectionId:o.SubSectionId,CheckList:o.CheckList,Comments:o.CommentsForEditor,ArticleId:o.ArticleId,Steps:1},e.next=5,h(Gt(r));case 5:a=e.sent,m(!1),a&&a.Status&&n&&n(),e.next=11;break;case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsx)("div",{className:"user-form",children:Object(Ie.jsxs)(G.Form,{ref:t,rules:p,className:"demo-form-stacked",model:o,labelPosition:"top",labelWidth:"100",children:[Object(Ie.jsx)(G.Form.Item,{label:I&&I.TemplateTitle,children:Object(Ie.jsx)("div",{children:I&&I.TemplateText})}),Object(Ie.jsx)(G.Form.Item,{label:"Section",prop:"SectionId",children:Object(Ie.jsx)(G.Select,{value:o.SectionId,placeholder:"Section",onChange:function(e){return y("SectionId",e)},children:x&&x.map((function(e,t){return Object(Ie.jsx)(G.Select.Option,{label:e.Name,value:e.Id},t)}))})}),Object(Ie.jsx)(G.Form.Item,{label:"Sub Section",prop:"SubSectionId",children:Object(Ie.jsx)(G.Select,{value:o.SubSectionId,placeholder:"Sub Section",onChange:function(e){return y("SubSectionId",e)},children:o.SubSections&&o.SubSections.map((function(e,t){return Object(Ie.jsx)(G.Select.Option,{label:e.Name,value:e.Id},t)}))})}),Object(Ie.jsx)(G.Form.Item,{label:"CheckList",prop:"CheckList",children:Object(Ie.jsx)(rt,{list:O,value:o.CheckList,onChange:function(e){return y("CheckList",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Comments for the Editor",prop:"CommentsForEditor",children:Object(Ie.jsx)(Ut,{name:"CommentsForEditor",onChange:y,value:o.CommentsForEditor})}),Object(Ie.jsx)(G.Form.Item,{label:N&&N.TemplateTitle,prop:"privacyStatements",children:Object(Ie.jsx)("div",{children:N&&N.TemplateText})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:C,loading:b,disabled:0!=(w.Id||0)&&!w.CanEdit||w.Status===Te.SUBMITTED,children:"Save and Continue"})})]})})},dn={Component:null,Attachment:null,UserFileName:"",ServerFileName:"",FileFormat:"",FileType:"",Size:""},jn=function(e){var t=Object(r.useRef)(),n=e.isVisible,a=e.onSave,c=e.onCancel,i=e.selectedFileData,o=Object(r.useState)(dn),l=Object(V.a)(o,2),d=l[0],j=l[1],b=Object(s.c)((function(e){return e.metaReducer})),m=b.components;Object(r.useEffect)((function(){var e=i.data;j(e?Object(u.a)(Object(u.a)({},e),{},{Component:m.find((function(t){return t.Id===e.ComponentId})),Attachment:e.Attachment||{serverFileName:e.ServerFileName,name:e.UserFileName}}):dn)}),[i]);var p={Component:[ze("Component is required.","object")],UserFileName:[ze("Attachment is required")]},h=function(e,t){var n=Object(u.a)(Object(u.a)({},d),{},Object(ke.a)({},e,t));t&&"Attachment"===e&&(n.UserFileName=t.name),j(n)};return Object(Ie.jsx)(G.Dialog,{title:"Article Address",visible:n,onCancel:c,children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsxs)(G.Form,{model:d,labelPosition:"top",ref:t,rules:p,children:[Object(Ie.jsx)(G.Form.Item,{label:"Article Component",prop:"Component",children:Object(Ie.jsx)(G.Select,{value:d.Component,placeholder:"Please select component",onChange:function(e){return h("Component",e)},children:m&&m.map((function(e,t){return Object(Ie.jsx)(G.Select.Option,{label:e.Name,value:e},t)}))})}),Object(Ie.jsx)(G.Form.Item,{label:"Attachment",prop:"UserFileName",children:Object(Ie.jsx)(Pt,{value:d.Attachment,name:"Attachment",onChange:h,validExtensions:["pdf","doc","docx"]})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:function(){t.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&(n=Object(u.a)(Object(u.a)({},d),{},{ComponentId:d.Component.Id,ComponentName:d.Component.Name}),a&&a(i.index,n),j(dn));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},children:"Save"})})]})})})},bn=function(e){var t=e.onSave,n=Object(r.useState)(!1),a=Object(V.a)(n,2),c=a[0],i=a[1],o=Object(r.useState)({data:null,index:-1}),l=Object(V.a)(o,2),d=l[0],j=l[1],b=Object(s.b)(),m=Object(r.useState)([]),p=Object(V.a)(m,2),h=p[0],f=p[1],O=Object(s.c)((function(e){return e.articleReducer})).article;Object(r.useEffect)((function(){if(!Ee(O)){var e=O.ArticleAttachments||[];f(Object(k.a)(e))}}),[O]);var v=function(){var e=Object(q.a)(W.a.mark((function e(){var n,r,a,c,i,s;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=[1,2,3,4],r=!0,a=0;case 3:if(!(a<n.length)){e.next=10;break}if(r=h.filter((function(e){return e.ComponentId===n[a]})).length>0){e.next=7;break}return e.abrupt("break",10);case 7:a++,e.next=3;break;case 10:if(r){e.next=13;break}return Object(G.Notification)({message:"Please add attachments for Cover Letter, Title Page, Manuscript, Conflict of Interest",type:"error",duration:3e3,offset:50}),e.abrupt("return");case 13:for((c=new FormData).append("ArticleId",O.Id),c.append("Steps","3"),a=0;a<h.length;a++)i=h[a],c.append("Attachments[".concat(a,"].Attachment"),i.Attachment||null),c.append("Attachments[".concat(a,"].FileFormat"),i.FileFormat),c.append("Attachments[".concat(a,"].FileType"),i.FileType),c.append("Attachments[".concat(a,"].ServerFileName"),i.ServerFileName),c.append("Attachments[".concat(a,"].Size"),i.Size),c.append("Attachments[".concat(a,"].UserFileName"),i.UserFileName),c.append("Attachments[".concat(a,"].ComponentId"),i.ComponentId);return e.next=19,b(Jt(c));case 19:(s=e.sent)&&s.Status&&t();case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsxs)("div",{className:"upload-steps__submissions",children:[Object(Ie.jsxs)("div",{className:"upload-steps__submissions-header",children:[Object(Ie.jsx)("div",{children:"Submission Files"}),Object(Ie.jsx)("div",{className:"upload-steps__submissions-header-action",children:Object(Ie.jsx)("div",{children:Object(Ie.jsx)(G.Button,{type:"text",disabled:O.Status===Te.SUBMITTED,onClick:function(){j({index:-1,data:null}),i(!0)},children:"Upload File"})})})]}),Object(Ie.jsx)("div",{className:"upload-steps__submissions-body",children:h.map((function(e,t){return Object(Ie.jsxs)("div",{className:"upload-steps__attachment",children:[Object(Ie.jsxs)("div",{className:"upload-steps__attachment-info",children:[Object(Ie.jsxs)("div",{className:"upload-steps__attachment-info-title",children:[Object(Ie.jsx)(Et.b,{}),e.UserFileName?e.UserFileName:e.Attachment&&e.Attachment.name]}),Object(Ie.jsxs)("div",{className:"upload-steps__attachment-info-subtitle",children:["Component: ",e.ComponentName]})]}),Object(Ie.jsxs)("div",{className:"upload-steps__attachment-action",children:[Object(Ie.jsx)(G.Button,{type:"text",onClick:function(){return function(e){j({index:e,data:Object(u.a)({},h[e])}),i(!0)}(t)},children:"Edit"}),Object(Ie.jsx)(G.Button,{type:"text",onClick:function(){return function(e){var t=Object(k.a)(h);t.splice(e,1),f(t)}(t)},children:"Delete"})]})]},t)}))}),Object(Ie.jsx)(jn,{isVisible:c,setVisible:i,selectedFileData:d,onCancel:function(){i(!1),j({index:-1,data:null})},onSave:function(e,t){return function(e,t){var n=Object(k.a)(h);e>=0?n[e]=t:n.push(t),f(n),i(!1)}(e,t)}}),Object(Ie.jsx)("div",{className:"upload-steps__submissions-footer",children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:v,disabled:!(!h||0!==h.length)||0!=O.Id&&!O.CanEdit||O.Status===Te.SUBMITTED,children:"Save and Continue"})})]})},mn={FullName:"",Salutation:"",Designation:"",Institute:"",PostalAddress:"",MobileNo:"",Email:"",Photo_ServerFileName:"",Photo_UserFileName:"",Photo:null,DigitalSignature_ServerFileName:"",DigitalSignature_UserFileName:"",DigitalSignature:null},pn=function(e){var t=e.coAuthorList,n=e.coAuthorData,a=e.onCancel,c=e.onSave,i=Object(r.useRef)(),o={FullName:[ze("Full name is required.")],Salutation:[ze("Salutation is required.")],Designation:[ze("Designation is required.")],Institute:[ze("Institute is required.")],PostalAddress:[ze("Address is required.")],Email:[{type:"email",message:"Please input correct email address",trigger:"blur,change"}],Photo_UserFileName:[ze("Photo is required.")],DigitalSignature_UserFileName:[ze("Signature is required.")],MobileNo:[We()]},l=Object(r.useState)(mn),d=Object(V.a)(l,2),j=d[0],b=d[1],m=Object(s.c)((function(e){return e.metaReducer})).salutations;console.clear(),console.log(m),Object(r.useEffect)((function(){if(n.index>=0){var e=t[n.index];b(Object(u.a)({},e))}else b(mn)}),[n]);var p=function(e,t){b(Object(u.a)(Object(u.a)({},j),{},Object(ke.a)({},e,t)))},h=function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),i.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(t){var r;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}r=n.index,c&&c(r,j),e.next=6;break;case 5:return e.abrupt("return",!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(Ie.jsx)("div",{children:Object(Ie.jsx)(G.Dialog,{title:"Co-Authors",visible:n.isVisible,onCancel:function(){return a()},children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsxs)(G.Form,{ref:i,rules:o,className:"demo-form-stacked",model:j,labelPosition:"top",labelWidth:"100",children:[Object(Ie.jsx)(G.Layout.Row,{gutter:"20",children:Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Salutation",prop:"Salutation",children:Object(Ie.jsx)(G.Select,{value:j.Salutation,placeholder:"Salutation",onChange:function(e){return p("Salutation",e)},children:m&&m.map((function(e,t){return Object(Ie.jsx)(G.Select.Option,{label:e,value:e},t)}))})})})}),Object(Ie.jsxs)(G.Layout.Row,{gutter:"20",children:[Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Full Name",prop:"FullName",children:Object(Ie.jsx)(G.Input,{value:j.FullName,onChange:function(e){return p("FullName",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Email",prop:"Email",children:Object(Ie.jsx)(G.Input,{value:j.Email,onChange:function(e){return p("Email",e)}})})})]}),Object(Ie.jsxs)(G.Layout.Row,{gutter:"20",children:[Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Mobile",prop:"MobileNo",children:Object(Ie.jsx)(G.Input,{value:j.MobileNo,onChange:function(e){return p("MobileNo",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Address",prop:"PostalAddress",children:Object(Ie.jsx)(G.Input,{value:j.PostalAddress,onChange:function(e){return p("PostalAddress",e)}})})})]}),Object(Ie.jsxs)(G.Layout.Row,{gutter:"20",children:[Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Institute",prop:"Institute",children:Object(Ie.jsx)(G.Input,{value:j.Institute,onChange:function(e){return p("Institute",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Designation",prop:"Designation",children:Object(Ie.jsx)(G.Input,{value:j.Designation,onChange:function(e){return p("Designation",e)}})})})]}),Object(Ie.jsxs)(G.Layout.Row,{children:[Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(Pt,{label:"Photo",value:j.Photo,name:"Photo",onChange:p,validExtensions:["jpg","jpeg","png"]})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(Pt,{label:"DigitalSignature",value:j.DigitalSignature,name:"DigitalSignature",onChange:p,validExtensions:["jpg","jpeg","png"]})})]}),Object(Ie.jsxs)(G.Form.Item,{children:[Object(Ie.jsx)(G.Button,{type:"primary",onClick:h,nativeType:"submit",children:"Save"}),Object(Ie.jsx)(G.Button,{onClick:function(e){i.current.resetFields(),b({})},children:"Reset"})]})]})})})})},hn=function(e){var t=e.CoAuthors,n=e.onEditClicked,r=e.onDelelteClicked,a=[{label:"Name",prop:"FullName",width:180},{label:"Salutation",prop:"Salutation",width:180},{label:"Designation",prop:"Designation",width:180},{label:"Institute",prop:"Institute",width:180},{label:"PostalAddress",prop:"PostalAddress",width:180},{label:"MobileNo",prop:"MobileNo",width:180},{label:"Email",prop:"Email",width:180},{label:"",width:160,fixed:"right",render:function(e,t,a){return Object(Ie.jsxs)("span",{children:[Object(Ie.jsx)(G.Button,{type:"text",size:"small",onClick:function(){return n(a,e)},children:"Edit"}),Object(Ie.jsx)(G.Button,{type:"text",size:"small",onClick:function(){return r(a,e)},children:"Delete"})]})}}];return t&&t.length>0&&Object(Ie.jsx)(G.Table,{columns:a,data:t,fit:!0})},fn=function(e){var t=e.onSave,n=Object(r.useRef)(),a=Object(s.b)(),c={FullName:[ze("Full name is required.")],Salutation:[ze("Salutation is required.")],Designation:[ze("Designation is required.")],Institute:[ze("Institute is required.")],PostalAddress:[ze("Address is required.")],Email:[ze("Email is required."),{type:"email",message:"Please input correct email address",trigger:"blur,change"}],Photo_UserFileName:[ze("Photo is required.")],DigitalSignature_UserFileName:[ze("Signature is required.")],MobileNo:[We()]},i=Object(r.useState)(!1),o=Object(V.a)(i,2),l=o[0],d=o[1],j=Object(r.useState)({index:-1,isVisible:!1}),b=Object(V.a)(j,2),m=b[0],p=b[1],h=Object(r.useState)({ArticleId:0,FullName:"",Salutation:"",Designation:"",Institute:"",PostalAddress:"",MobileNo:"",Email:"",Photo_ServerFileName:"",Photo_UserFileName:"",Photo:null,DigitalSignature_ServerFileName:"",DigitalSignature_UserFileName:"",DigitalSignature:null,Steps:2,CoAuthors:[]}),f=Object(V.a)(h,2),O=f[0],v=f[1],x=Object(s.c)((function(e){return e.articleReducer})).article,g=Object(s.c)((function(e){return e.metaReducer})).salutations;Object(r.useEffect)((function(){Ee(x)||v(Object(u.a)(Object(u.a)({},O),{},{ArticleId:x.Id,FullName:x.InvestigatorName,Salutation:x.InvestigatorSalutation,Designation:x.InvestigatorDesignation,Institute:x.InvestigatorInstitute,PostalAddress:x.InvestigatorPostalAddress,MobileNo:x.InvestigatorMobileNo,Email:x.InvestigatorEmail,Photo_ServerFileName:x.InvestigatorPhoto_ServerFileName,Photo_UserFileName:x.InvestigatorPhoto_UserFileName,Photo:{serverFileName:x.InvestigatorPhoto_ServerFileName,name:x.InvestigatorPhoto_UserFileName},DigitalSignature_ServerFileName:x.InvestigatorDigitalSignature_ServerFileName,DigitalSignature_UserFileName:x.InvestigatorDigitalSignature_UserFileName,DigitalSignature:{serverFileName:x.InvestigatorDigitalSignature_ServerFileName,name:x.InvestigatorDigitalSignature_UserFileName},CoAuthors:x.ArticleCoAuthors&&x.ArticleCoAuthors.map((function(e){return Object(u.a)(Object(u.a)({},e),{},{Photo:!Ee(e.Photo_ServerFileName)&&{serverFileName:e.Photo_ServerFileName,name:e.Photo_UserFileName},DigitalSignature:!Ee(e.DigitalSignature_ServerFileName)&&{serverFileName:e.DigitalSignature_ServerFileName,name:e.DigitalSignature_UserFileName}})}))}))}),[x]);var w=function(e,t){var n=Object(u.a)(Object(u.a)({},O),{},Object(ke.a)({},e,t));t&&"Photo"===e&&(n.Photo_UserFileName=t.name),t&&"DigitalSignature"===e&&(n.DigitalSignature_UserFileName=t.name),v(n)},S=function(){var e=Object(q.a)(W.a.mark((function e(r){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.preventDefault(),n.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(n){var r,c,i;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=12;break}for(c in r=new FormData,O)"CoAuthors"!==c&&O[c]&&r.append("".concat(c),O[c]);return O.CoAuthors&&O.CoAuthors.forEach((function(e,t){for(var n in e)"CoAuthors"!==n&&e[n]&&r.append("CoAuthors[".concat(t,"].").concat(n),e[n])})),d(!0),e.next=7,a(Ht(r));case 7:i=e.sent,d(!1),i&&i.Status&&t(),e.next=13;break;case 12:return e.abrupt("return",!1);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(Ie.jsxs)("div",{style:{width:"900px"},children:[Object(Ie.jsxs)(G.Form,{ref:n,rules:c,className:"demo-form-stacked",model:O,labelPosition:"top",labelWidth:"100",children:[Object(Ie.jsxs)("div",{className:"author-steps__authors",children:[Object(Ie.jsx)(G.Layout.Row,{gutter:"20",children:Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Salutation",prop:"Salutation",children:Object(Ie.jsx)(G.Select,{value:O.Salutation,placeholder:"Salutation",onChange:function(e){return w("Salutation",e)},children:g&&g.map((function(e,t){return Object(Ie.jsx)(G.Select.Option,{label:e,value:e},t)}))})})})}),Object(Ie.jsxs)(G.Layout.Row,{gutter:"20",children:[Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Full Name",prop:"FullName",children:Object(Ie.jsx)(G.Input,{value:O.FullName,onChange:function(e){return w("FullName",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Email",prop:"Email",children:Object(Ie.jsx)(G.Input,{value:O.Email,onChange:function(e){return w("Email",e)}})})})]}),Object(Ie.jsxs)(G.Layout.Row,{gutter:"20",children:[Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Mobile",prop:"MobileNo",children:Object(Ie.jsx)(G.Input,{value:O.MobileNo,onChange:function(e){return w("MobileNo",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Address",prop:"PostalAddress",children:Object(Ie.jsx)(G.Input,{value:O.PostalAddress,onChange:function(e){return w("PostalAddress",e)}})})})]}),Object(Ie.jsxs)(G.Layout.Row,{gutter:"20",children:[Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Institute",prop:"Institute",children:Object(Ie.jsx)(G.Input,{value:O.Institute,onChange:function(e){return w("Institute",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Designation",prop:"Designation",children:Object(Ie.jsx)(G.Input,{value:O.Designation,onChange:function(e){return w("Designation",e)}})})})]}),Object(Ie.jsxs)(G.Layout.Row,{children:[Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{prop:"Photo_UserFileName",children:Object(Ie.jsx)(Pt,{label:"Photo",value:O.Photo,name:"Photo",onChange:w,validExtensions:["jpg","jpeg","png"]})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{prop:"DigitalSignature_UserFileName",children:Object(Ie.jsx)(Pt,{label:"Digital Signature",value:O.DigitalSignature,name:"DigitalSignature",onChange:w,validExtensions:["jpg","jpeg","png"]})})})]})]}),Object(Ie.jsxs)("div",{className:"author-steps__co-authors",children:[Object(Ie.jsx)("div",{className:"author-steps__cauthors",children:Object(Ie.jsx)(G.Button,{onClick:function(){return p({index:-1,isVisible:!0})},children:"Add CoAuthors"})}),Object(Ie.jsx)(hn,{CoAuthors:O.CoAuthors,onDelelteClicked:function(e,t){if(e>=0){var n=Object(u.a)(Object(u.a)({},O),{},{CoAuthors:Object(k.a)(O.CoAuthors)});n.CoAuthors.splice(e,1),v(n)}},onEditClicked:function(e,t){p({index:e,isVisible:!0})}})]}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:S,nativeType:"submit",loading:l,disabled:0!=x.Id&&!x.CanEdit||x.Status===Te.SUBMITTED,children:"Save and Continue"})})]}),Object(Ie.jsx)(pn,{coAuthorData:m,coAuthorList:O.CoAuthors,onSave:function(e,t){var n=Object(u.a)(Object(u.a)({},O),{},{CoAuthors:Object(k.a)(O.CoAuthors)});e>=0?n.CoAuthors[e]=Object(u.a)({},t):n.CoAuthors.push(Object(u.a)({},t)),v(n),p({index:-1,isVisible:!1})},onCancel:function(){return p({index:-1,isVisible:!1})}})]})},On={prefix:"",introduction:"",methods:"",citedReference:"",abstract:""},vn=function(e){var t=Object(s.c)((function(e){return e.articleReducer})).article,n=Object(r.useRef)(),a=Object(r.useState)(On),c=Object(V.a)(a,2),i=c[0],o=c[1];Object(r.useEffect)((function(){Ee(t)||o({prefix:t.ProposalTitle,introduction:t.ProposalIntroduction,methods:t.PropsalMethods,citedReference:t.ProposalCitedReferences,abstract:t.ProposalAbstract})}),[t,e.selectedTab]);var l=e.onSave,d=Object(s.b)(),j=Object(r.useState)(!1),b=Object(V.a)(j,2),m=b[0],p=b[1],h={prefix:[ze("This field is required.")],introduction:[ze("Introduction is required")],methods:[ze("Methods is required")],citedReference:[ze("Cited reference is required")],abstract:[ze("Abstract is required")]},f=function(){var e=Object(q.a)(W.a.mark((function e(){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(n){var r,a;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=8;break}return r=Object(u.a)(Object(u.a)({},i),{},{articleId:t.Id,steps:4}),p(!0),e.next=5,d(Kt(r));case 5:a=e.sent,p(!1),a&&a.Status&&l();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(e,t){o(Object(u.a)(Object(u.a)({},i),{},Object(ke.a)({},e,t)))};return Object(Ie.jsx)("div",{className:"user-form",children:Object(Ie.jsxs)(G.Form,{className:"demo-form-stacked",labelPosition:"top",labelWidth:"100",model:i,ref:n,rules:h,children:[Object(Ie.jsx)(G.Form.Item,{label:"Title",prop:"prefix",children:Object(Ie.jsx)(G.Input,{type:"text",value:i.prefix,onChange:function(e){return O("prefix",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Introduction",prop:"introduction",children:Object(Ie.jsx)(Ut,{name:"introduction",onChange:O,value:i.introduction})}),Object(Ie.jsx)(G.Form.Item,{label:"Methods",prop:"methods",children:Object(Ie.jsx)(Ut,{name:"methods",onChange:O,value:i.methods})}),Object(Ie.jsx)(G.Form.Item,{label:"Cited References",prop:"citedReference",children:Object(Ie.jsx)(Ut,{name:"citedReference",onChange:O,value:i.citedReference})}),Object(Ie.jsx)(G.Form.Item,{label:"Abstract",prop:"abstract",children:Object(Ie.jsx)(Ut,{name:"abstract",onChange:O,value:i.abstract})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:f,loading:m,disabled:0!=t.Id&&!t.CanEdit||t.Status===Te.SUBMITTED,children:"Save and Continue"})})]})})},xn=function(e){var t=e.onConfirmation,n=e.revisionId,a=Object(s.c)((function(e){return e.articleReducer})).article,c=Object(s.b)(),i=Object(r.useState)(!1),o=Object(V.a)(i,2),l=o[0],u=o[1],d=function(){var e=Object(q.a)(W.a.mark((function e(){var r,i;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={articleId:a.Id,revisionId:parseInt(n),steps:5},u(!0),e.next=4,c(Yt(r));case 4:i=e.sent,u(!1),i&&i.Status&&t();case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsxs)("div",{children:[Object(Ie.jsxs)("div",{className:"upload-steps__info",children:['Your submission has been uploaded and is ready to be sent. You may go back to review and adjust any of the information you have entered before continuing. When you are ready, click "Finish Submission"',n]}),Object(Ie.jsx)("div",{children:Object(Ie.jsx)(G.Button,{disabled:0!=a.Id&&!a.CanEdit||a.Status===Te.SUBMITTED,type:"primary",onClick:function(){return d()},loading:l,children:"Finish Submission"})})]})},gn=function(e){var t=Object(r.useState)(1),n=Object(V.a)(t,2),a=n[0],c=n[1],o=Object(r.useState)("1"),l=Object(V.a)(o,2),u=l[0],d=l[1],j=Object(s.b)(),b=Object(M.g)(),m=e.match.params,p=m.articleId,h=m.revisionId,f=Object(s.c)((function(e){return e.articleReducer})).article;Object(r.useEffect)((function(){if(Ee(f))c(1),d("1");else{var e=f.Steps;e<=4&&e++,c(e),Ee(h)||(e=3),d("".concat(e))}}),[f]),Object(r.useEffect)((function(){p?O(p):j(Wt())}),[p]);var O=function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j(qt(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(e){e>a&&c(e)},x=[{label:"1.start",name:"1",component:function(e){return Object(Ie.jsx)(un,{onSave:function(){return v(2),void d("2")},selectedTab:e})}},{label:"2. Authors and CoAuthors",name:"2",component:function(e){return Object(Ie.jsx)(fn,{onSave:function(){return v(3),void d("3")}})}},{label:"3. Upload Submission",name:"3",component:function(e){return Object(Ie.jsx)(bn,{onSave:function(){return v(4),void d("4")}})}},{label:"4. Enter Metadata",name:"4",component:function(e){return Object(Ie.jsx)(vn,{onSave:function(){return v(5),void d("5")},selectedTab:e})}},{label:"5.Confirmation",name:"5",component:function(){return Object(Ie.jsx)(xn,{onConfirmation:function(){return Object(G.Message)({showClose:!0,message:"Congrats, submission completed.",type:"success"}),void b.push("".concat(be.submitter))},revisionId:h})}}];return Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsxs)(G.Breadcrumb,{separator:"/",children:[Object(Ie.jsx)(G.Breadcrumb.Item,{children:Object(Ie.jsx)(i.b,{to:be.submitter,children:"Home"})}),!Ee(h)&&Object(Ie.jsx)(G.Breadcrumb.Item,{children:Object(Ie.jsx)(i.b,{to:"".concat(be.revisionDetail,"/").concat(h),children:"Revision Detail"})}),Object(Ie.jsx)(G.Breadcrumb.Item,{children:"Submission"})]}),Object(Ie.jsx)("div",{className:"submission",children:Object(Ie.jsx)(G.Tabs,{type:"card",value:u,onTabClick:function(e){var t=e.props.name;d(t)},children:x.map((function(e,t){return Object(Ie.jsx)(G.Tabs.Pane,{label:e.label,name:e.name,disabled:(n=t+1,a<n),children:e.component(u)},t);var n}))})})]})},wn=function(e){var t=e.isLoading,n=e.children;return Object(Ie.jsxs)("div",{className:Pe()({"loader-container":t}),children:[t&&Object(Ie.jsx)("div",{className:"loader-loading",children:Object(Ie.jsx)("div",{className:"loader-loading__symbol",children:Object(Ie.jsx)("div",{className:"spinner"})})}),n]})},Sn=function(e){e.onSave;var t=e.files,n=e.title;Object(s.b)();return Object(Ie.jsxs)("div",{className:"attachment__container",children:[Object(Ie.jsxs)("div",{className:"attachment__header",children:[Object(Ie.jsx)("div",{children:n}),Object(Ie.jsx)("div",{className:"attachment__header-action"})]}),Object(Ie.jsx)("div",{className:"attachment__body",children:t&&t.map((function(e,t){return Object(Ie.jsx)("div",{className:"attachment__files",children:Object(Ie.jsxs)("div",{className:"attachment__files-info",children:[Object(Ie.jsx)("div",{className:"attachment__files-info-title",children:Object(Ie.jsx)(Pt,{value:e,isPreview:!0})}),Object(Ie.jsxs)("div",{className:"attachment__files-info-subtitle",children:["Component: ",e.ComponentName]})]})},t)}))})]})},yn=function(e){var t=Object(r.useState)({show:!1,isloading:!1,revision:null}),n=Object(V.a)(t,2),a=n[0],c=n[1],o=e.match.params.revisionId,l=Object(M.g)(),d=Object(s.b)();Object(r.useEffect)((function(){Ee(o)||j(o)}),[o]);var j=function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(sn(t));case 2:n=e.sent,c(Object(u.a)(Object(u.a)({},a),{},{revision:n}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=a.revision,m=a.isloading;return Object(Ie.jsxs)(wn,{isLoading:m,children:[Object(Ie.jsxs)(G.Breadcrumb,{separator:"/",children:[Object(Ie.jsx)(G.Breadcrumb.Item,{children:Object(Ie.jsx)(i.b,{to:be.submitter,children:"Home"})}),Object(Ie.jsx)(G.Breadcrumb.Item,{children:"Revision Detail"})]}),Ee(b)?null:Object(Ie.jsx)("div",{className:"revision",children:Object(Ie.jsx)("div",{className:"revison-content",children:Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)(At,{label:"Comments",children:Object(Ie.jsx)("div",{className:"ck-editor-content",dangerouslySetInnerHTML:qe(b.Comments)})}),Object(Ie.jsx)(At,{children:Object(Ie.jsx)(Sn,{files:b.Attachments,title:"Review Files"})}),Object(Ie.jsx)(At,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:function(){l.push("".concat(be.revision,"/").concat(o,"/").concat(b.ArticleId))},children:"Revise"})})]})})})]})},In=n(53),Nn=function(e){var t=e.article,n=e.actions,r=e.index,a=Object(M.g)(),c=Object(s.c)((function(e){return e.userReducer.loggedInUserDetail})).RoleName,i=t&&(t.Steps||0)/5*100||0,o=t&&(t.ReviewSteps||0)/4*100||0;return Object(Ie.jsxs)("div",{className:"article-card",children:[Object(Ie.jsxs)("div",{className:"article-card__details",children:[Object(Ie.jsx)("div",{className:"article-card__details-col-1",children:Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)(Tt,{label:"Title",children:t.ProposalTitle}),Object(Ie.jsx)(Tt,{label:"Section",children:t.SectionName}),Object(Ie.jsx)(Tt,{label:"Sub-Section",children:t.SubSectionName}),(c===_e.Administrator||c===_e.Editor)&&Object(Ie.jsxs)("div",{className:"article-card__info",children:[t.SubmittedOn&&Object(Ie.jsxs)("div",{className:"article-card__info-detail",children:[Object(Ie.jsxs)("span",{children:["Submitted by"," ","".concat(t.InvestigatorSalutation," ").concat(t.InvestigatorName)," ","on"]}),Object(Ie.jsx)("span",{children:t.DateInString})]}),Object(Ie.jsxs)("div",{className:"article-card__info-block",children:[Object(Ie.jsx)("span",{children:"Submission Number"}),Object(Ie.jsx)("span",{children:t.SubmissionNumber})]})]}),Object(Ie.jsxs)("div",{className:"article-card__status",children:[c===_e.Reviewer?Object(Ie.jsx)("div",{className:"article-card__status-progress",children:Object(Ie.jsx)(G.Progress,{type:"circle",strokeWidth:12,percentage:o})}):Object(Ie.jsx)("div",{className:"article-card__status-progress",children:Object(Ie.jsx)(G.Progress,{type:"circle",strokeWidth:12,percentage:i})}),(c===_e.Administrator||c===_e.Editor)&&Object(Ie.jsxs)("div",{className:"article-card__status-reviewinfo",title:"".concat(t.CompletedReview," Completed Reviews / ").concat(t.TotalReview," Total Reviews "),children:[Object(Ie.jsx)(In.b,{})," ",t.CompletedReview,"/",t.TotalReview]}),Le(t,c,t.Status,t.ReviewRecommendation)]})]})}),c===_e.Reviewer&&Object(Ie.jsxs)("div",{className:"article-card__details-col-2",children:[t&&!Ee(t.ReviewResponsedOnString)&&Object(Ie.jsxs)("div",{className:"info",children:[Object(Ie.jsx)("span",{className:"info-date",children:t.ReviewResponsedOnString}),Object(Ie.jsx)("span",{className:"info-label",children:"Responded On"})]}),t&&!Ee(t.ReviewResponseDueDate)&&Object(Ie.jsxs)("div",{className:"info",children:[Object(Ie.jsx)("span",{className:"info-date",children:t.ReviewResponseDueDateString}),Object(Ie.jsx)("span",{className:"info-label",children:"Response Due Date"})]}),t&&!Ee(t.ReviewDueDateString)&&Object(Ie.jsxs)("div",{className:"info",children:[Object(Ie.jsx)("span",{className:"info-date",children:t.ReviewDueDateString}),Object(Ie.jsx)("span",{className:"info-label",children:"Review Due Date"})]})]})]}),Object(Ie.jsxs)("div",{className:"article-card__action",children:[Object(Ie.jsxs)("div",{className:"article-card__action-left",children:[Object(Ie.jsx)("span",{className:"comment",children:Object(Ie.jsx)(G.Badge,{value:3,children:Object(Ie.jsx)(In.a,{})})}),c!==_e.Reviewer&&Object(Ie.jsxs)(G.Button,{size:"mini",onClick:function(){return a.push("".concat(re.viewArticle,"/").concat(t.Id))},children:[Object(Ie.jsx)(It.d,{}),"View"]})]}),Object(Ie.jsx)("div",{className:"article-card__action-right",children:Object(Ie.jsx)("div",{children:n&&n(t,r)})})]})]})},Cn=function(e){var t=e.data,n=e.totalData,r=e.pageSize,a=e.PageIndex,c=e.handlePageSizeChanged,i=e.handlePageChanged,s=e.actions;return Object(Ie.jsxs)(Ie.Fragment,{children:[t&&t.map((function(e,t){return Object(Ie.jsx)(Nn,{index:t,article:e,actions:s},t)})),0===n&&Object(Ie.jsx)("div",{className:"no-table-data",children:"No Data"}),n>0&&Object(Ie.jsx)(G.Pagination,{layout:"total, sizes, prev, pager, next",total:n,pageSizes:[10,20,50,100],pageSize:r,currentPage:a,onSizeChange:c,onCurrentChange:i})]})};Cn.defaultProps={width:"100%"};var En=Cn,Rn=function(e){var t=e.state,n=e.setState,r=e.onSearchClicked;return Object(Ie.jsx)("div",{className:"submission-search",children:Object(Ie.jsxs)(G.Form,{inline:!0,children:[Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Input,{style:{width:"250px"},value:t.proposalTitle,placeholder:"Article Ttile",onChange:function(e){return function(e,r){n(Object(u.a)(Object(u.a)({},t),{},Object(ke.a)({},e,r)))}("proposalTitle",e)}})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:function(){return r()},children:"Search"})})]})})},Dn=function(e,t){var n=e.selectedTab,a=e.getStatus,c=e.actions;if(null!=t){var i=Object(r.useState)({status:0,PageIndex:1,pageSize:20,propsalTitle:""}),o=Object(V.a)(i,2),l=o[0],d=o[1];Object(r.useEffect)((function(){var e=a();f(Object(u.a)(Object(u.a)({},l),{},{status:e,selectedTab:n}))}),[n]),Object(r.useImperativeHandle)(t,(function(){return{loadData:function(){return Object(q.a)(W.a.mark((function e(){var t;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a(),e.next=3,f(Object(u.a)(Object(u.a)({},l),{},{status:t,selectedTab:n}));case 3:case"end":return e.stop()}}),e)})))()}}}));var j=Object(s.b)(),b=(Object(M.g)(),Object(r.useState)([])),m=Object(V.a)(b,2),p=m[0],h=m[1],f=function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],O(t),e.next=4,j(Mt(t));case 4:n=e.sent,h(n);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:j(Vt(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=0;return p&&p.length>0&&(v=p[0].TotalData),Object(Ie.jsxs)("div",{className:"submitter",children:[Object(Ie.jsx)(Rn,{state:l,setState:d,onSearchClicked:function(){var e=a(),t=Object(u.a)(Object(u.a)({},l),{},{pageIndex:1,pageSize:20,status:e});d(t),f(t)}}),Object(Ie.jsx)(En,{actions:c,data:p,totalData:v,pageSize:l.pageSize,PageIndex:l.PageIndex,handlePageSizeChanged:function(e){var t=Object(u.a)(Object(u.a)({},l),{},{pageSize:e,status:a()});d(t),f(t)},handlePageChanged:function(e){var t=Object(u.a)(Object(u.a)({},l),{},{pageIndex:e,status:a()});d(t),f(t)}})]})}},kn=Object(r.forwardRef)(Dn),Fn=function(e){var t=e.row,n=e.handleEditClick,r=e.handleDelete,a=e.handleRevisionClick;Object(M.g)();return Object(Ie.jsx)(Ie.Fragment,{children:function(){var e=[];t.Status===Te.NEW&&e.push(Object(Ie.jsxs)(G.Button,{size:"mini",onClick:function(){return n(t)},children:[Object(Ie.jsx)(It.c,{}),"Edit"]})),t.Status===Te.REVISION&&t&&e.push(Object(Ie.jsxs)(G.Button,{size:"mini",onClick:function(){return a(t)},children:[Object(Ie.jsx)(In.c,{}),"Revise"]})),t.Status===Te.NEW&&e.push(Object(Ie.jsxs)(G.Button,{size:"mini",onClick:function(){return r(t)},children:[Object(Ie.jsx)(It.f,{}),"Delete"]}));var c=Object(Ie.jsx)("div",{className:"table-actions",children:Object(Ie.jsx)("ul",{children:e})});return e.length>0?c:null}()})},Pn=function(e){var t=e.selectedTab,n=Object(r.useRef)(null),a=Object(s.b)(),c=Object(M.g)();return Object(Ie.jsx)("div",{className:"submitter",children:Object(Ie.jsx)(kn,{selectedTab:t,actions:function(e,t){return Object(Ie.jsx)(Fn,{row:e,handleEditClick:function(e){return c.push("".concat(be.submission,"/").concat(e.Id))},handleDelete:function(e){return t=e,void G.MessageBox.confirm("This will permanently delete. Continue?","Warning",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(Object(q.a)(W.a.mark((function e(){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a(zt(t.Id));case 2:n.current.loadData();case 3:case"end":return e.stop()}}),e)})))).catch((function(){}));var t},handleRevisionClick:function(e){return c.push("".concat(be.revisionDetail,"/").concat(e.RevisionId))}})},getStatus:function(){var e="0";return"NEW"==t?e="".concat(Te.NEW):"SUBMITTED"==t?e=e=[Te.SUBMITTED,Te.ASSIGNEDEDITOR,Te.REVIEWING,Te.REVIEWED,Te.RESUBMITTED].toString():"REVERTED"==t?e="".concat(Te.REVISION):"REJECTED"==t?e="".concat(Te.REJECTED):"APPROVED"==t&&(e="".concat(Te.APPROVED)),e},ref:n})})},An=function(e){var t=e.item,n=e.selectedTab,r=(e.count,Object(s.c)((function(e){return e.articleReducer})).articleCounts);return Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)("span",{className:"tab-title",children:t.label}),Object(Ie.jsx)("span",{className:Pe()("tab-count",{"tab-count-active":n===t.name}),children:function(e){var t=r.find((function(t){return t.Type===e}));return t&&t.Total||0}(t.name)})]})},Tn=[{exact:!0,component:function(){var e=Object(r.useState)("NEW"),t=Object(V.a)(e,2),n=t[0],a=t[1];Object(s.b)(),Object(M.g)();return Object(Ie.jsxs)("div",{children:[Object(Ie.jsxs)("div",{className:"header",children:[Object(Ie.jsx)(G.Breadcrumb,{separator:"/",children:Object(Ie.jsx)(G.Breadcrumb.Item,{children:Object(Ie.jsx)(i.b,{to:be.submitter,children:"Home"})})}),Object(Ie.jsx)("div",{children:Object(Ie.jsx)(i.b,{to:be.submission,className:"el-button el-button--primary",children:"New Submission"})})]}),Object(Ie.jsxs)("div",{className:"submission",children:[Object(Ie.jsx)(G.Tabs,{type:"card",value:n,onTabClick:function(e){var t=e.props.name;a(t)},children:[{label:"New Submission",name:"NEW"},{label:"Under Review",name:"SUBMITTED"},{label:"Need Actions",name:"REVERTED"},{label:"Rejected",name:"REJECTED"},{label:"Approved",name:"APPROVED"}].map((function(e,t){return Object(Ie.jsx)(G.Tabs.Pane,{label:Object(Ie.jsx)(An,{item:e,selectedTab:n,count:24e3}),name:e.name},t)}))}),Object(Ie.jsx)(Pn,{selectedTab:n})]})]})},role:_e.Submitter,title:"Dashboard",path:be.submitter},{exact:!0,component:gn,role:_e.Submitter,title:"Submission",path:be.submission},{exact:!0,component:gn,role:_e.Submitter,title:"Submission",path:"".concat(be.submission,"/:articleId")},{exact:!0,component:gn,role:_e.Submitter,title:"Revision",path:"".concat(be.revision,"/:revisionId/:articleId")},{exact:!0,component:yn,role:_e.Submitter,title:"Submission",path:"".concat(be.revisionDetail,"/:revisionId")}],_n=function(e){var t=Object(s.c)((function(e){return e.metaReducer})),n=(t.checkList,t.templates),r=(t.sections,Object(s.c)((function(e){return e.articleReducer})).article),a=n.find((function(e){return"copyrightStatements"===e.TemplateKey})),c=n.find((function(e){return"privacyStatements"===e.TemplateKey}));return Ee(r)?null:Object(Ie.jsx)("div",{className:"viewArticle__start",children:Object(Ie.jsxs)(G.Form,{className:"demo-form-stacked",labelPosition:"top",labelWidth:"100",children:[Object(Ie.jsx)(G.Form.Item,{label:a&&a.TemplateTitle,children:Object(Ie.jsx)("div",{children:a&&a.TemplateText})}),Object(Ie.jsx)(G.Form.Item,{label:"Section",children:r&&r.SectionName}),Object(Ie.jsx)(G.Form.Item,{label:"CheckList",children:Object(Ie.jsx)("ul",{children:r.CheckList.map((function(e,t){return Object(Ie.jsx)("li",{children:e.CheckListName},t)}))})}),Object(Ie.jsx)(G.Form.Item,{label:"Comments for the Editor",children:Object(Ie.jsx)("div",{className:"ck-editor-content",dangerouslySetInnerHTML:{__html:r.CommentsForEditor}})}),Object(Ie.jsx)(G.Form.Item,{label:c&&c.TemplateTitle,children:Object(Ie.jsx)("div",{className:"ck-editor-content",children:c&&c.TemplateText})})]})})},Ln=function(e){var t=e.ArticleCoAuthors;return Object(Ie.jsx)(Ie.Fragment,{children:Object(Ie.jsxs)("table",{children:[Object(Ie.jsxs)("tr",{className:"co-auth",children:[Object(Ie.jsx)("th",{children:"Name"}),Object(Ie.jsx)("th",{children:"Designation"}),Object(Ie.jsx)("th",{children:"Email"}),Object(Ie.jsx)("th",{children:"Institue"}),Object(Ie.jsx)("th",{children:"Address"}),Object(Ie.jsx)("th",{children:"Mobile"}),Object(Ie.jsx)("th",{children:"Type"}),Object(Ie.jsx)("th",{children:"Signature"})]}),t&&t.map((function(e,t){return Object(Ie.jsxs)("tr",{children:[Object(Ie.jsx)("td",{children:Object(Ie.jsxs)("div",{className:"td-author-info",children:[e.Photo_ServerFileName&&Object(Ie.jsx)("img",{src:"".concat(Nt.Uploads,"/").concat(e.Photo_ServerFileName),width:"40",height:"40"}),"".concat(e.Salutation," ").concat(e.FullName)]})}),Object(Ie.jsx)("td",{children:e.Designation}),Object(Ie.jsx)("td",{children:e.Email}),Object(Ie.jsx)("td",{children:e.Institute}),Object(Ie.jsx)("td",{children:e.PostalAddress}),Object(Ie.jsx)("td",{children:e.MobileNo}),Object(Ie.jsx)("td",{children:e.isAuthor?"Author":"Co-author"}),Object(Ie.jsx)("td",{children:Object(Ie.jsx)("img",{src:"".concat(Nt.Uploads,"/").concat(e.DigitalSignature_ServerFileName),width:"40",height:"40"})})]},t)}))]})})},Bn=function(e){var t=Object(s.c)((function(e){return e.metaReducer})),n=(t.checkList,t.templates),a=(t.sections,Object(r.useState)([])),c=Object(V.a)(a,2),i=c[0],o=c[1],l=Object(s.c)((function(e){return e.articleReducer})).article;Object(r.useEffect)((function(){Ee(l)||o([{Photo_ServerFileName:l.InvestigatorPhoto_ServerFileName,Salutation:l.InvestigatorSalutation,FullName:l.InvestigatorName,Designation:l.InvestigatorDesignation,Email:l.InvestigatorEmail,Institue:l.InvestigatorInstitute,PostalAddress:l.InvestigatorPostalAddress,MobileNo:l.InvestigatorMobileNo,DigitalSignature_ServerFileName:l.InvestigatorDigitalSignature_ServerFileName,isAuthor:!0}].concat(Object(k.a)(l.ArticleCoAuthors)))}),l);n.find((function(e){return"copyrightStatements"===e.TemplateKey})),n.find((function(e){return"privacyStatements"===e.TemplateKey}));return Ee(l)?null:Object(Ie.jsxs)("div",{className:"viewArticle__author",children:[Object(Ie.jsx)("h1",{children:"Author"}),Object(Ie.jsx)("div",{className:"viewArticle__coauthor",children:Object(Ie.jsx)(Ln,{ArticleCoAuthors:i})})]})},Un=function(e){var t=Object(s.c)((function(e){return e.articleReducer})).article;return Ee(t)?null:Object(Ie.jsxs)("div",{className:"viewArticle__attachment",children:[Object(Ie.jsx)("h1",{children:"Attachments"}),Object(Ie.jsx)("div",{children:t.ArticleAttachments.map((function(e,t){return Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)("label",{children:e.ComponentName}),Object(Ie.jsx)(Pt,{isPreview:!0,value:{serverFileName:e.ServerFileName,name:e.UserFileName},name:"Photo"})]},t)}))})]})},Mn=function(e){var t=Object(s.c)((function(e){return e.metaReducer})),n=(t.checkList,t.templates),r=(t.sections,Object(s.c)((function(e){return e.articleReducer})).article);n.find((function(e){return"copyrightStatements"===e.TemplateKey})),n.find((function(e){return"privacyStatements"===e.TemplateKey}));return Ee(r)?null:Object(Ie.jsx)("div",{className:"viewArticle__meta",children:Object(Ie.jsxs)(G.Form,{className:"demo-form-stacked",labelPosition:"top",labelWidth:"100",children:[Object(Ie.jsx)(G.Form.Item,{label:"Title",children:Object(Ie.jsx)("div",{className:"ck-editor-content",dangerouslySetInnerHTML:{__html:r.ProposalTitle}})}),Object(Ie.jsx)(G.Form.Item,{label:"Introduction",children:Object(Ie.jsx)("div",{dangerouslySetInnerHTML:{__html:r.ProposalIntroduction}})}),Object(Ie.jsx)(G.Form.Item,{label:"Methods",children:Object(Ie.jsx)("div",{className:"ck-editor-content",dangerouslySetInnerHTML:{__html:r.PropsalMethods}})}),Object(Ie.jsx)(G.Form.Item,{label:"Cited References",children:Object(Ie.jsx)("div",{className:"ck-editor-content",dangerouslySetInnerHTML:{__html:r.ProposalCitedReferences}})})]})})},Vn=function(e){var t=e.match.params.articleId,n=Object(s.b)();Object(s.c)((function(e){return e.userReducer.loggedInUserDetail})).RoleName;Object(r.useEffect)((function(){t?a(t):n(Wt())}),[t]);var a=function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(qt(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(Ie.jsxs)("div",{children:[Object(Ie.jsxs)(G.Breadcrumb,{separator:"/",children:[Object(Ie.jsx)(G.Breadcrumb.Item,{children:Object(Ie.jsx)(i.b,{to:"/",children:"Home"})}),Object(Ie.jsx)(G.Breadcrumb.Item,{children:"View"})]}),Object(Ie.jsxs)("div",{className:"viewArticle",children:[Object(Ie.jsx)(_n,{}),Object(Ie.jsx)(Mn,{}),Object(Ie.jsx)(Bn,{}),Object(Ie.jsx)(Un,{})]})]})},qn=n(85),zn=n.n(qn),Wn=function(){return function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie(Y.roles,t);case 2:n=e.sent,t({type:h,payload:n.Data});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Gn=function(e){var t=e.param;return function(){var e=Object(q.a)(W.a.mark((function e(n){var r;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ie($.verifyEmail,n,{param:t},!0);case 2:if(!(r=e.sent)){e.next=5;break}return e.abrupt("return",r.Status);case 5:return e.abrupt("return",!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Hn=function(e){return function(){var t=Object(q.a)(W.a.mark((function t(n){var r;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ie("".concat(Y.emailTemplate,"/").concat(e),n);case 2:if(!(r=t.sent)||!r.Status){t.next=5;break}return t.abrupt("return",r.Data);case 5:return t.abrupt("return",null);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Jn=function(e){var t=Object(s.b)(),n=Object(M.g)();Object(r.useEffect)((function(){a()}),[]);var a=function(){var r=Object(q.a)(W.a.mark((function r(){var a;return W.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=zn.a.parse(e.location.search),r.next=3,t(Gn({param:a.param}));case 3:r.sent&&n.push(be.login);case 5:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();return Object(Ie.jsx)("div",{children:"Your email address will be verified and after success redirects to login page."})},Kn=function(e){e.user;var t=Object(r.useRef)(),n=Object(s.b)(),a=Object(M.g)(),c=zn.a.parse(e.location.search),i=Object(r.useState)({Email:"",Password:"",ConfirmPassword:"",isLoading:!1,Code:c.code}),o=Object(V.a)(i,2),l=o[0],d=o[1],j={Email:[{required:!0,message:"Email is required",trigger:"blur"},{type:"email",message:"Please input correct email address",trigger:"blur,change"}],Password:[{required:!0,message:"Please input the password",trigger:"blur"},{validator:function(e,n,r){""===n?r(new Error("Please input the password")):(""!==l.Password&&t.current.validateField("ConfirmPassword"),r())}}],ConfirmPassword:[{required:!0,message:"Please input the password again",trigger:"blur"},{validator:function(e,t,n){""===t?n(new Error("Please input the password again")):t!==l.Password?n(new Error("Two inputs don't match!")):n()}}]},b=function(e,t){return d(Object(u.a)(Object(u.a)({},l),{},Object(ke.a)({},e,t)))};return Object(Ie.jsx)("div",{className:"container",children:Object(Ie.jsx)("div",{className:"sign-up-form",children:Object(Ie.jsx)(G.Form,{ref:t,rules:j,className:"demo-form-stacked",model:l,labelPosition:"top",labelWidth:"100",children:Object(Ie.jsxs)(G.Layout.Row,{gutter:"20",children:[Object(Ie.jsx)(G.Form.Item,{label:"Email",prop:"Email",children:Object(Ie.jsx)(G.Input,{value:l.Email,onChange:function(e){return b("Email",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Password",prop:"Password",children:Object(Ie.jsx)(G.Input,{type:"password",value:l.Password,onChange:function(e){return b("Password",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Confirm Password",prop:"ConfirmPassword",children:Object(Ie.jsx)(G.Input,{type:"password",value:l.ConfirmPassword,onChange:function(e){return b("ConfirmPassword",e)}})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:function(){t.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(t){var r,c,i,s,o;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=10;break}return d(Object(u.a)(Object(u.a)({},l),{},{isLoading:!0})),r=l.Email,c=l.Code,i=l.Password,s=l.ConfirmPassword,e.next=5,n(ye({Email:r,Code:c,Password:i,ConfirmPassword:s}));case 5:o=e.sent,d(Object(u.a)(Object(u.a)({},l),{},{isLoading:!1})),o&&a.push(be.login),e.next=11;break;case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},loading:l.isLoading,children:"Submit"})})]})})})})},Yn=function(e){var t=Object(r.useRef)(),n=Object(s.b)(),a=Object(r.useState)({email:"",isLoading:!1,isSuccessSubmitting:!1}),c=Object(V.a)(a,2),o=c[0],l=c[1],d=function(){var e=Object(q.a)(W.a.mark((function e(){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(t){var r,a;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=9;break}return l(Object(u.a)(Object(u.a)({},o),{},{isSuccessSubmitting:!0,isLoading:!0})),e.next=4,n(Se({email:o.email}));case 4:r=e.sent,(a=Object(u.a)({},o)).isLoading=!1,r&&(a.isSuccessSubmitting=!0),l(a);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsx)("div",{className:"pr-container",children:o.isSuccessSubmitting?Object(Ie.jsxs)("div",{className:"reset-success",children:[Object(Ie.jsx)("h2",{children:"Reset Password"}),Object(Ie.jsx)("div",{className:"reset-success__message",children:"Check your email for a link to reset your password. If it doesn\u2019t appear within a few minutes, check your spam folder."}),Object(Ie.jsx)(i.b,{to:be.login,className:"el-button el-button--primary",children:"Return to sign in"})]}):Object(Ie.jsx)("div",{className:"reset-form",children:Object(Ie.jsxs)(G.Form,{ref:t,rules:{email:[{required:!0,message:"Email is required",trigger:"blur"},{type:"email",message:"Please input correct email address",trigger:"blur,change"}]},model:o,children:[Object(Ie.jsx)(G.Form.Item,{label:"Enter your user account's verified email address and we will send you a password reset link.",prop:"email",children:Object(Ie.jsx)(G.Input,{placeholder:"Enter your email address",value:o.email,onChange:function(e){return l(Object(u.a)(Object(u.a)({},o),{},{email:e}))}})}),Object(Ie.jsx)("div",{className:"irc-form-footer",children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:d,loading:o.isLoading,children:"Submit"})})]})})})},$n=n(175),Xn={Roles:[],Email:"",FullName:"",MobileNumber:"",Country:"",Affiliation:"",Password:"",ConfirmPassword:"",Captcha:""},Qn=function(e){var t=Object(r.useState)(Xn),n=Object(V.a)(t,2),a=n[0],c=n[1],i=Object(r.useState)(!1),o=Object(V.a)(i,2),l=o[0],d=o[1],j=Object(s.c)((function(e){return e.commonReducer})),b=(j.roles,Object(r.useRef)()),m=Object(r.useRef)(),p={FullName:[{required:!0,message:"Full name is required",trigger:"blur"}],Email:[{required:!0,message:"Email is required",trigger:"blur"},{type:"email",message:"Please input correct email address",trigger:"blur,change"}],Password:[{required:!0,message:"Please input the password",trigger:"blur"},{validator:function(e,t,n){""===t?n(new Error("Please input the password")):(""!==a.Password&&b.current.validateField("ConfirmPassword"),n())}}],ConfirmPassword:[{required:!0,message:"Please input the password again",trigger:"blur"},{validator:function(e,t,n){""===t?n(new Error("Please input the password again")):t!==a.Password?n(new Error("Two inputs don't match!")):n()}}]},h=Object(s.b)(),f=Object(M.g)(),O=function(e,t){"IsInactive"===e&&(t=!t),c(Object(u.a)(Object(u.a)({},a),{},Object(ke.a)({},e,t)))},v=function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),b.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(t){var n,r;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=10;break}return d(!0),n=Object(u.a)(Object(u.a)({},a),{},{UserName:a.Email}),e.next=5,h(we(n));case 5:r=e.sent,d(!1),r&&f.push(be.login),e.next=11;break;case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(Ie.jsx)("div",{className:"container",children:Object(Ie.jsx)("div",{className:"sign-up-form",children:Object(Ie.jsx)(G.Form,{ref:b,rules:p,className:"demo-form-stacked",model:a,labelPosition:"top",labelWidth:"100",children:Object(Ie.jsxs)(G.Layout.Row,{gutter:"20",children:[Object(Ie.jsx)(G.Form.Item,{label:"Full Name",prop:"FullName",children:Object(Ie.jsx)(G.Input,{value:a.FullName,onChange:function(e){return O("FullName",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Email",prop:"Email",children:Object(Ie.jsx)(G.Input,{value:a.Email,onChange:function(e){return O("Email",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Mobile",prop:"MobileNumber",children:Object(Ie.jsx)(G.Input,{value:a.MobileNumber,onChange:function(e){return O("MobileNumber",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Country",prop:"Country",children:Object(Ie.jsx)(G.Input,{value:a.Country,onChange:function(e){return O("Country",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Affiliation",prop:"Affiliation",children:Object(Ie.jsx)(G.Input,{value:a.Affiliation,onChange:function(e){return O("Affiliation",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Password",prop:"Password",children:Object(Ie.jsx)(G.Input,{type:"password",value:a.Password,onChange:function(e){return O("Password",e)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Confirm Password",prop:"ConfirmPassword",children:Object(Ie.jsx)(G.Input,{type:"password",value:a.ConfirmPassword,onChange:function(e){return O("ConfirmPassword",e)}})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)($n.a,{ref:m,sitekey:"6LdEjqkeAAAAAAfuSmszHsZMq2N36JRQO9cLVoe8",onChange:function(e){return O("Captcha",e)}})}),Object(Ie.jsxs)(G.Form.Item,{children:[Object(Ie.jsx)(G.Button,{type:"primary",onClick:v,nativeType:"submit",loading:l,children:"Sign up"}),Object(Ie.jsx)(G.Button,{onClick:function(e){b.current.resetFields(),c(Xn)},children:"Reset"})]})]})})})})},Zn=[{exact:!0,component:Kn,role:_e.Public,title:"Reset Password",path:be.forgotPassword},{exact:!0,component:Yn,role:_e.Public,title:"Reset Password",path:be.resetPassword},{exact:!0,component:Qn,role:_e.Public,title:"Sign up",path:be.signup},{exact:!0,component:Jn,role:_e.Public,title:"Verify Email",path:be.verifyEmailAddress},{exact:!0,component:Vn,role:_e.Public,title:"View Article",path:"".concat(be.viewArticle,"/:articleId")}],er=function(e){var t=e.state,n=e.setState,r=e.onSearchClicked,a=e.onAddUserClicked,c=function(e,r){n(Object(u.a)(Object(u.a)({},t),{},Object(ke.a)({},e,r)))};return Object(Ie.jsxs)("div",{className:"user-search",children:[Object(Ie.jsxs)(G.Form,{inline:!0,children:[Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Input,{style:{width:"300px"},value:t.userName,placeholder:"User name",onChange:function(e){return c("userName",e)}})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsxs)(G.Select,{value:t.isActive,placeholder:"IsActive",onChange:function(e){return c("IsActive",e)},children:[Object(Ie.jsx)(G.Select.Option,{label:"Active",value:"true"}),Object(Ie.jsx)(G.Select.Option,{label:"Inactive",value:"false"})]})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:function(){return r()},children:"Search"})})]}),Object(Ie.jsx)("div",{children:Object(Ie.jsx)(G.Button,{onClick:function(){return a({})},children:"Add User"})})]})},tr=function(e){var t=e.state,n=e.setState,a=e.onSaveSuccess,c=Object(r.useState)(!1),i=Object(V.a)(c,2),o=i[0],l=i[1],d=Object(s.c)((function(e){return e.commonReducer})),j=d.roles,b=Object(r.useRef)(),m=Object(s.b)();Object(M.g)();Object(r.useEffect)((function(){p()}),[]);var p=function(){var e=Object(q.a)(W.a.mark((function e(){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(Wn());case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),h=function(e,r){"IsInactive"===e&&(r=!r),n(Object(u.a)(Object(u.a)({},t),{},Object(ke.a)({},e,r)))},f=function(){var e=Object(q.a)(W.a.mark((function e(n){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.preventDefault(),b.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(n){var r,c;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=10;break}return l(!0),r=Object(u.a)(Object(u.a)({},t),{},{UserName:t.Email}),e.next=5,m(fe(r));case 5:c=e.sent,l(!1),c&&a(),e.next=11;break;case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(Ie.jsx)("div",{className:"container",children:Object(Ie.jsx)("div",{className:"user-form",children:Object(Ie.jsxs)(G.Form,{ref:b,rules:{FullName:[{required:!0,message:"Full name is required",trigger:"blur"}],Email:[{required:!0,message:"Email is required",trigger:"blur"},{type:"email",message:"Please input correct email address",trigger:"blur,change"}],RoleId:[{required:!0,message:"Role is required",trigger:"blur"}]},className:"demo-form-stacked",model:t,labelPosition:"top",labelWidth:"100",children:[Object(Ie.jsxs)(G.Layout.Row,{gutter:"20",children:[Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Full Name",prop:"FullName",children:Object(Ie.jsx)(G.Input,{value:t.FullName,onChange:function(e){return h("FullName",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Email",prop:"Email",children:Object(Ie.jsx)(G.Input,{value:t.Email,onChange:function(e){return h("Email",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Mobile",prop:"MobileNumber",children:Object(Ie.jsx)(G.Input,{value:t.MobileNumber,onChange:function(e){return h("MobileNumber",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Country",prop:"Country",children:Object(Ie.jsx)(G.Input,{value:t.Country,onChange:function(e){return h("Country",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Affiliation",prop:"Affiliation",children:Object(Ie.jsx)(G.Input,{value:t.Affiliation,onChange:function(e){return h("Affiliation",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Role",prop:"Roles",children:Object(Ie.jsx)(G.Select,{multiple:!0,value:t.Roles,placeholder:"Role",onChange:function(e){return h("Roles",e)},children:j&&j.map((function(e,t){return Object(Ie.jsx)(G.Select.Option,{label:e.Name,value:e.Name},t)}))})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsx)(G.Form.Item,{label:"Is Active",children:Object(Ie.jsx)(G.Switch,{onText:"",offText:"",value:!t.IsInactive,onChange:function(e){return h("IsInactive",e)}})})}),Object(Ie.jsx)(G.Layout.Col,{span:"12",children:!t.Id&&Object(Ie.jsx)(G.Form.Item,{label:"Password",children:Object(Ie.jsx)(G.Input,{type:"password",value:t.Password,onChange:function(e){return h("Password",e)}})})})]}),Object(Ie.jsx)(G.Layout.Row,{children:Object(Ie.jsx)(G.Layout.Col,{span:"12",children:Object(Ie.jsxs)(G.Form.Item,{children:[Object(Ie.jsx)(G.Button,{type:"primary",onClick:f,nativeType:"submit",loading:o,children:"Save"}),Object(Ie.jsx)(G.Button,{onClick:function(e){b.current.resetFields(),n({})},children:"Reset"})]})})})]})})})},nr=function(e){var t=e.user,n=Object(r.useRef)(),a=Object(s.b)(),c=Object(r.useState)({newPassword:"",isVisible:!1,isLoading:!1}),i=Object(V.a)(c,2),o=i[0],l=i[1],d=function(){var e=Object(q.a)(W.a.mark((function e(){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.current.validate(function(){var e=Object(q.a)(W.a.mark((function e(n){var r;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=5;break}return e.next=3,a(xe({userName:t.UserName,newPassword:o.newPassword}));case 3:(r=e.sent)&&r.Status&&j();case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){n.current.resetFields(),l({newPassword:"",isLoading:!1,isVisible:!1})};return Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsx)(G.Button,{type:"text",size:"small",onClick:function(){return l(Object(u.a)(Object(u.a)({},o),{},{isVisible:!0}))},children:"Reset Password"}),Object(Ie.jsx)(G.Dialog,{title:"Change Password",visible:o.isVisible,onCancel:function(){return j()},style:{width:"350px"},children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsxs)(G.Form,{ref:n,rules:{newPassword:[{required:!0,message:"New password is required",trigger:"blur"}]},children:[Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Input,{name:"newPassword",type:"password",style:{width:"270px"},value:o.newPassword,placeholder:"New Pasword",onChange:function(e){return l(Object(u.a)(Object(u.a)({},o),{},{newPassword:e}))}})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{onClick:function(){return d()},loading:o.isLoading,children:"Change Password"})})]})})})]})},rr=function(e){var t=e.isVisible,n=e.setVisible;return Object(Ie.jsx)(G.Dialog,{title:"Add User",visible:t,onCancel:function(){return n(!1)},children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsx)(tr,Object(u.a)({},e))})})},ar=function(){var e=Object(r.useState)(!1),t=Object(V.a)(e,2),n=t[0],a=t[1],c=Object(r.useState)({Roles:[]}),i=Object(V.a)(c,2),o=i[0],l=i[1],d=Object(r.useState)({userName:"",pageIndex:1,pageSize:20,isActive:"true"}),j=Object(V.a)(d,2),b=j[0],m=j[1];Object(r.useEffect)((function(){O(b)}),[]);var p=Object(s.b)(),h=(Object(M.g)(),Object(s.c)((function(e){return e.userReducer}))),f=h.userList;Object(r.useEffect)((function(){}),[f]);var O=function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(he(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(e){l(e),a(!0)},x=[{label:"User Name",prop:"UserName",width:120},{label:"Name",prop:"FullName"},{label:"Mobile",prop:"MobileNumber",width:120},{label:"Email",prop:"Email",width:300},{label:"Role",prop:"RoleName",width:120},{label:"",width:150,fixed:"right",render:function(e,t,n){return Object(Ie.jsx)(nr,{user:e},n)}},{label:"",width:100,fixed:"right",render:function(e,t,n){return Object(Ie.jsx)("span",{children:Object(Ie.jsx)(G.Button,{type:"text",size:"small",onClick:function(){return w(e)},children:e.IsInactive?"Enable":"Disable"})})}},{label:"",width:160,fixed:"right",render:function(e,t,n){return Object(Ie.jsxs)("span",{children:[Object(Ie.jsx)(G.Button,{type:"text",size:"small",onClick:function(){return v(e)},children:"Edit"}),Object(Ie.jsx)(G.Button,{type:"text",size:"small",onClick:function(){return g(e)},children:"Delete"})]})}}],g=function(e){G.MessageBox.confirm("This will permanently delete the user. Continue?","Warning",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(Object(q.a)(W.a.mark((function t(){return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p(Oe(e.Id));case 2:O(b);case 3:case"end":return t.stop()}}),t)})))).catch((function(){}))},w=function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(ve({userId:t.Id,isInactive:!t.IsInactive}));case 2:O(b);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=0;return f&&f.length>0&&(S=f[0].TotalData),Object(Ie.jsxs)("div",{className:"user",children:[Object(Ie.jsx)(er,{state:b,setState:m,onSearchClicked:function(){var e=Object(u.a)(Object(u.a)({},b),{},{pageIndex:1,pageSize:20});m(e),O(e)},onAddUserClicked:v}),Object(Ie.jsx)(G.Table,{style:{width:"100%"},columns:x,data:f,border:!0}),Object(Ie.jsx)(G.Pagination,{layout:"total, sizes, prev, pager, next",total:S,pageSizes:[10,20,50,100],pageSize:b.pageSize,currentPage:b.pageIndex,onSizeChange:function(e){var t=Object(u.a)(Object(u.a)({},b),{},{pageSize:e});m(t),O(t)},onCurrentChange:function(e){var t=Object(u.a)(Object(u.a)({},b),{},{pageIndex:e});m(t),O(t)}}),Object(Ie.jsx)(rr,{state:o,setState:l,isVisible:n,setVisible:a,onSaveSuccess:function(){a(!1),O(b)}})]})},cr=function(e){var t=e.columns,n=(e.showNoData,e.data),r=e.totalData,a=e.pageSize,c=e.PageIndex,i=e.handlePageSizeChanged,s=e.handlePageChanged;return Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsx)(G.Table,{style:{width:"100%"},columns:t,data:n,border:!0}),r&&0===r&&Object(Ie.jsx)("div",{className:"no-table-data",children:"No Data"}),r&&r>0&&Object(Ie.jsx)(G.Pagination,{layout:"total, sizes, prev, pager, next",total:r,pageSizes:[10,20,50,100],pageSize:a,currentPage:c,onSizeChange:i,onCurrentChange:s})]})};cr.defaultProps={width:"100%",showNoData:!0};var ir,sr=cr,or=function(e){var t=e.row,n=e.dispatch,a=e.articlesRef,c=e.onSave,i=Object(r.useState)(!1),s=Object(V.a)(i,2),o=s[0],l=s[1],d=Object(r.useState)({editorName:"",selectedIndex:-1,remarks:""}),j=Object(V.a)(d,2),b=j[0],m=j[1];Object(r.useEffect)((function(){v("")}),[]);var p=Object(r.useState)([]),h=Object(V.a)(p,2),f=h[0],O=h[1],v=function(){var e=Object(q.a)(W.a.mark((function e(r){var a,c;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(rn({articleId:t.Id,fullname:r,role:_e.Editor}));case 2:a=e.sent,c=a.findIndex((function(e){return e.IsAssigned})),m(Object(u.a)(Object(u.a)({},b),{},{selectedIndex:c})),O(a);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=[{label:"Editor",prop:"FullName",render:function(e,t,n){return Object(Ie.jsx)("div",{onClick:function(){return m(Object(u.a)(Object(u.a)({},b),{},{selectedIndex:n}))},children:e.FullName})}},{label:"Done",prop:"Done",width:120,render:function(e,t,n){return Object(Ie.jsx)("div",{onClick:function(){return m(Object(u.a)(Object(u.a)({},b),{},{selectedIndex:n}))},children:e.Done})}},{label:"Active",prop:"Active",width:120,render:function(e,t,n){return Object(Ie.jsx)("div",{onClick:function(){return m(Object(u.a)(Object(u.a)({},b),{},{selectedIndex:n}))},children:e.Active})}},{label:"",prop:"",width:60,render:function(e,t,n){return Object(Ie.jsx)("div",{onClick:function(){return m(Object(u.a)(Object(u.a)({},b),{},{selectedIndex:n}))},children:Object(Ie.jsx)(G.Radio,{value:"",checked:b.selectedIndex===n})})}}],g=function(){var t=Object(q.a)(W.a.mark((function t(){var r,i,s,o;return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(-1!==b.selectedIndex){t.next=3;break}return Object(G.Message)({message:"At least one editor is required.",type:"warning"}),t.abrupt("return");case 3:return r=b.remarks,i=f[b.selectedIndex].Id,s=e&&e.row.Id,o=_e.Editor,l(!0),t.next=10,n($t({articleId:s,assignTo:i,assignedAs:o,remarks:r}));case 10:t.sent,l(!1),c(),a&&a.current.loadData();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)("div",{className:"margin-bottom-10",children:Object(Ie.jsx)(G.Input,{value:b.editorName,placeholder:"Search Editor",onChange:function(e){return function(e,t){var n;m(Object(u.a)(Object(u.a)({},b),{},(n={},Object(ke.a)(n,e,t),Object(ke.a)(n,"selectedIndex",-1),n))),v(t)}("editorName",e)}})}),Object(Ie.jsx)("div",{className:"margin-bottom-10",children:Object(Ie.jsx)(sr,{showNoData:!1,columns:x,data:f})}),Object(Ie.jsx)("div",{className:"margin-bottom-10",children:Object(Ie.jsx)(G.Input,{type:"textarea",value:b.remarks,onChange:function(e){return m(Object(u.a)(Object(u.a)({},b),{},{remarks:e}))}})}),Object(Ie.jsx)("div",{className:"flex-end",children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:g,loading:o,children:"Save"})})]})},lr=function(e){e.row,e.dispatch;var t=Object(r.useState)({editorName:""}),n=Object(V.a)(t,2),a=(n[0],n[1],Object(r.useState)(!1)),c=Object(V.a)(a,2),i=c[0],s=c[1],o=function(){s(!1)};return Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsxs)(G.Button,{size:"mini",onClick:function(){s(!0)},children:[Object(Ie.jsx)(It.h,{}),"Assign"]}),i&&Object(Ie.jsx)(G.Dialog,{closeOnClickModal:!1,title:"Assign Editor",visible:i,onCancel:o,style:{width:"800px"},children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsx)("div",{children:Object(Ie.jsx)(or,Object(u.a)(Object(u.a)({},e),{},{onSave:o}))})})})]})},ur=function(e){e.row,e.selectedTab,e.articlesRef,Object(M.g)();var t=Object(s.b)();return Object(Ie.jsx)(Ie.Fragment,{children:function(){var n=[];return n.push(Object(Ie.jsx)(lr,Object(u.a)(Object(u.a)({},e),{},{dispatch:t}))),n}()})},dr=function(e){var t=e.selectedTab,n=Object(r.useRef)(null);Object(s.b)(),Object(M.g)();return Object(Ie.jsx)("div",{className:"submitter",children:Object(Ie.jsx)(kn,{selectedTab:t,actions:function(e,r){return Object(Ie.jsx)(ur,{row:e,selectedTab:t,articlesRef:n})},getStatus:function(){var e="0";return"NEW"==t?e="".concat(Te.SUBMITTED):"ONGOINGREVIEW"==t&&(e=[Te.REVISION,Te.REJECTED,Te.APPROVED,Te.ASSIGNEDEDITOR,Te.REVIEWED,Te.REVIEWING].toString()),e},ref:n})})},jr=function(){var e=Object(r.useState)("NEW"),t=Object(V.a)(e,2),n=t[0],a=t[1];return Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)(G.Breadcrumb,{separator:"/",children:Object(Ie.jsx)(G.Breadcrumb.Item,{children:Object(Ie.jsx)(i.b,{to:be.adminSubmission,children:"Home"})})}),Object(Ie.jsxs)("div",{className:"submission",children:[Object(Ie.jsx)(G.Tabs,{type:"card",value:n,onTabClick:function(e){var t=e.props.name;a(t)},children:[{label:"New Submission",name:"NEW"},{label:"On Going Review",name:"ONGOINGREVIEW"}].map((function(e,t){return Object(Ie.jsx)(G.Tabs.Pane,{label:Object(Ie.jsx)(An,{item:e,selectedTab:n,count:24}),name:e.name},t)}))}),Object(Ie.jsx)(dr,{selectedTab:n})]})]})},br=[{exact:!0,component:ar,role:_e.Administrator,title:"User",path:be.user},{exact:!0,component:jr,role:_e.Administrator,title:"Submissions",path:be.adminSubmission}],mr=function(e){var t=e.row,n=e.status,a=e.title,c=e.handleSave,i=Object(r.useState)({remarks:""}),o=Object(V.a)(i,2),l=o[0],d=o[1],j=Object(s.c)((function(e){return e.validateReducer})),b=(j.messages,Object(r.useState)(!1)),m=Object(V.a)(b,2),p=m[0],h=m[1],f=function(){d({remarks:""}),h(!1)},O=function(){var e=Object(q.a)(W.a.mark((function e(r){var a;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={status:n,articleId:t.Id,remarks:l.remarks},e.next=3,c(a);case 3:f();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsxs)(G.Button,{size:"mini",onClick:function(){h(!0)},children:[n===Te.APPROVED?Object(Ie.jsx)(It.b,{}):n===Te.REVISION?Object(Ie.jsx)(It.g,{}):n===Te.REJECTED?Object(Ie.jsx)(It.a,{}):void 0,a]}),p&&Object(Ie.jsx)(G.Dialog,{title:"Are you sure, you want to ".concat(a.toLowerCase()," this article?"),visible:p,onCancel:f,style:{width:"500px"},children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsxs)(G.Form,{children:[Object(Ie.jsx)(G.Form.Item,{label:"Remarks",children:Object(Ie.jsx)(G.Input,{type:"textarea",placeholder:"Remarks",value:l.remarks,onChange:function(e){return d(Object(u.a)(Object(u.a)({},l),{},{remarks:e}))}})}),Object(Ie.jsx)("div",{className:"flex-end",children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:O,children:"Save"})})]})})})]})},pr=function(e){var t=e.title,n=e.onAssignClick;return Object(Ie.jsxs)(G.Button,{size:"mini",onClick:n,children:[Object(Ie.jsx)(It.h,{}),Ee(t)?"Assign":t]})};!function(e){e[e.SignUpTemplate=1]="SignUpTemplate",e[e.ResetPasswordLink=2]="ResetPasswordLink",e[e.SendResetPasReReRwordLinkInMail=3]="SendResetPasReReRwordLinkInMail",e[e.AssingReviewArticle=4]="AssingReviewArticle"}(ir||(ir={}));var hr=ir,fr=n(86),Or=n.n(fr),vr=function(e){return Or()(e).format("YYYY-MM-DD")},xr=function(e,t,n){function a(r){n?e.current&&!e.current.contains(r.target)&&(n.current.contains(r.target)||t&&t()):e.current&&!e.current.contains(r.target)&&t&&t()}Object(r.useEffect)((function(){return document.addEventListener("mousedown",a),function(){document.removeEventListener("mousedown",a)}}))},gr=(n(471),U({})),wr=function(e){var t=e.open,n=(e.containerClassName,Object(r.useRef)(null)),a=Object(r.useState)(document.createElement("div")),i=Object(V.a)(a,2),o=i[0],l=(i[1],Object(r.useState)({left:-1,top:-1,visibility:"hidden"})),d=Object(V.a)(l,2),j=d[0],b=d[1];xr(n,e.handleOutsideClick,e.parentRef),Object(r.useEffect)((function(){return document.body.appendChild(o),document.addEventListener("scroll",m),function(){c.a.unmountComponentAtNode(o),document.body.removeChild(o),document.removeEventListener("scroll",m)}}),[]),Object(r.useEffect)((function(){e.children&&h()}),[e.children]),Object(r.useEffect)((function(){h()}),[j]);var m=function(){t&&e.handleOutsideClick&&e.handleOutsideClick(!1)},p=function(e){return j.top===e.top&&(j.left===e.left&&j.visibility===e.visibility)},h=function(){var t=Object(u.a)({},j);e.parentRef;c.a.render(Object(Ie.jsx)(s.a,{store:gr,children:Object(Ie.jsx)("div",{className:e.containerClassName,style:t,ref:n,children:e.children})}),o,(function(){!function(){if(n&&n.current){var t=e.parentRef,r=n.current.getBoundingClientRect(),a=r.width,c=r.height,i=t&&t.current.getBoundingClientRect(),s=i.x,o=i.y,l=i.width,u=o+i.height,d=s;if(u+c>window.innerHeight&&(u=o-c),u<0&&(u=10),d+a>window.innerWidth){var j=window.innerWidth-(s+l);d=window.innerWidth-a-j}var m={top:u,left:d,visibility:"visible"};p(m)||b(m)}}()}))};return Object(Ie.jsx)("noscript",{})};wr.defaultProps={containerClassName:"irc-popup"};var Sr,yr=wr,Ir=function(e){var t=e.popRef,n=e.setOpen,a=e.open,c=e.dispatch,i=e.name,s=e.onChange,o=e.row,l=e.selectedReviewer,d=Object(r.useState)({name:""}),j=Object(V.a)(d,2),b=j[0],m=j[1],p=Object(r.useState)([]),h=Object(V.a)(p,2),f=(h[0],h[1],Object(r.useState)([])),O=Object(V.a)(f,2),v=O[0],x=O[1],g=Object(r.useState)([]),w=Object(V.a)(g,2),S=w[0],y=w[1];Object(r.useEffect)((function(){y(l)}),[l]),Object(r.useEffect)((function(){I("")}),[]);var I=function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(rn({articleId:o.Id,fullname:t,role:_e.Reviewer}));case 2:n=e.sent,x(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),N=function(e){var t=Object(k.a)(S),n=t.findIndex((function(t){return t.Id===e.Id}));n>=0?t.splice(n,1):t.push(e),s&&s(i,t)},C=function(e){return S&&S.filter((function(t){return t.Id===e.Id})).length>0},E=[{label:"",prop:"",width:60,render:function(e,t,n){return Object(Ie.jsx)("div",{children:Object(Ie.jsx)(G.Checkbox,{checked:C(e),onChange:function(){return N(e)}})})}},{label:"Reviewer",prop:"FullName",render:function(e,t,n){return Object(Ie.jsx)("div",{onClick:function(){return N(e)},children:e.FullName})}},{label:"Done",prop:"Done",width:120,render:function(e,t,n){return Object(Ie.jsx)("div",{onClick:function(){return N(e)},children:e.Done})}},{label:"Active",prop:"Active",width:120,render:function(e,t,n){return Object(Ie.jsx)("div",{onClick:function(){return N(e)},children:e.Active})}}];return Object(Ie.jsx)(yr,{parentRef:t,open:a,handleOutsideClick:function(){return n(!a)},children:Object(Ie.jsxs)("div",{className:"assign-popup",children:[Object(Ie.jsx)("div",{className:"margin-bottom-10",children:Object(Ie.jsx)(G.Input,{value:b.name,placeholder:"Search Reviewer",onChange:function(e){return function(e){m(Object(u.a)(Object(u.a)({},b),{},{name:e})),I(e)}(e)}})}),Object(Ie.jsx)("div",{className:"margin-bottom-10",children:Object(Ie.jsx)(sr,{showNoData:!1,columns:E,data:v})})]})})},Nr=function(e){var t=e.row,n=(e.handleReveiwerSelected,e.selectedReviewer),a=e.onChange,c=Object(r.useRef)(),i=Object(r.useState)({open:!1,reviewers:[]}),o=Object(V.a)(i,2),l=o[0],d=o[1],j=Object(s.b)();return Object(Ie.jsxs)("div",{ref:c,children:[Object(Ie.jsx)("div",{className:"assign-selector",onClick:function(){return d(Object(u.a)(Object(u.a)({},l),{},{open:!l.open}))},children:l.reviewers&&l.reviewers.length>0?l.reviewers.map((function(e){return Object(Ie.jsx)("span",{className:"assign-selector-name",children:e.FullName})})):Object(Ie.jsx)("span",{className:"assign-selector-info",children:n?"Change Reviewer":"Select Reviewer"})}),l.open?Object(Ie.jsx)(Ir,{dispatch:j,name:"reviewers",selectedReviewer:l.reviewers,popRef:c,setOpen:function(e){return d(Object(u.a)(Object(u.a)({},l),{},{open:e}))},open:l.open,row:t,onChange:function(e,t){d(Object(u.a)(Object(u.a)({},l),{},Object(ke.a)({},e,t))),a&&a(e,t)}}):null]})},Cr=function(e){var t=e.onCancel,n=e.row,a=Object(r.useState)(null),c=Object(V.a)(a,2),i=c[0],o=c[1],l=Object(r.useRef)(),d=Object(s.b)(),j=Object(r.useState)({reveiwer:"",loading:!1,responseDueDate:null,reviewDueDate:null,emailText:"",reviewers:[],isLoading:!1}),b=Object(V.a)(j,2),m=b[0],p=b[1];Object(r.useEffect)((function(){}),[n]),Object(r.useEffect)((function(){x()}),[]);var h={responseDueDate:[ze("Response due date is required")],reviewDueDate:[ze("Review due date is required")],reviewers:[ze("Reviewer is required","array")],emailText:[ze("Email text is required.")]},f=function(){var t=Object(q.a)(W.a.mark((function t(){return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l.current.validate(function(){var t=Object(q.a)(W.a.mark((function t(n){return W.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=7;break}return p(Object(u.a)(Object(u.a)({},m),{},{loading:!0})),t.next=4,d(Xt({reviewId:e&&e.row.ReviewId,articleId:e&&e.row.Id,reviewers:m.reviewers&&m.reviewers.map((function(e){return e.Id})),assignedAs:_e.Reviewer,reviewDueDate:m.reviewDueDate,responseDueDate:m.responseDueDate,emailText:m.emailText}));case 4:t.sent,e.onSuccess&&e.onSuccess(),p(Object(u.a)(Object(u.a)({},m),{},{loading:!1}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),O=function(e,t){p(Object(u.a)(Object(u.a)({},m),{},Object(ke.a)({},e,vr(t))))},v=function(e,t){p(Object(u.a)(Object(u.a)({},m),{},Object(ke.a)({},e,t)))},x=function(){var e=Object(q.a)(W.a.mark((function e(){var t;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(Hn(hr.AssingReviewArticle));case 2:t=e.sent,p(Object(u.a)(Object(u.a)({},m),{},{emailText:t.BodyText}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsx)(wn,{isLoading:m.isLoading,children:Object(Ie.jsxs)(G.Form,{ref:l,rules:h,model:m,className:"demo-form-stacked",labelPosition:"top",labelWidth:"100",children:[Object(Ie.jsx)(G.Form.Item,{label:"Reviewer",prop:"reviewers",children:Object(Ie.jsx)(Nr,Object(u.a)(Object(u.a)({name:"reviewers"},e),{},{onChange:v,setSelectedReviewer:o,selectedReviewer:i}))}),Object(Ie.jsx)(G.Form.Item,{label:"Email to be sent to reviewer",prop:"emailText",children:Object(Ie.jsx)(Ut,{name:"emailText",value:m.emailText,onChange:v})}),Object(Ie.jsxs)("div",{className:"flex",children:[Object(Ie.jsx)(G.Form.Item,{className:"margin-right-10",label:"Response Due Date",prop:"responseDueDate",children:Object(Ie.jsx)(G.DatePicker,{value:m.responseDueDate&&new Date(m.responseDueDate),placeholder:"Response Due Date",onChange:function(e){return O("responseDueDate",e)},disabledDate:function(e){return e.getTime()<Date.now()-864e5}})}),Object(Ie.jsx)(G.Form.Item,{label:"Review Due Date",prop:"reviewDueDate",children:Object(Ie.jsx)(G.DatePicker,{value:m.reviewDueDate&&new Date(m.reviewDueDate),placeholder:"Review Due Date",onChange:function(e){return O("reviewDueDate",e)},disabledDate:function(e){return e.getTime()<Date.now()-864e5}})})]}),Object(Ie.jsxs)("div",{className:"flex-end",children:[Object(Ie.jsx)(G.Button,{type:"primary",onClick:f,loading:m.loading,children:"Save"}),Object(Ie.jsx)(G.Button,{type:"danger",onClick:t,children:"Cancel"})]})]})})};!function(e){e[e.ACCEPTED=1]="ACCEPTED",e[e.UNDERREVIEW=2]="UNDERREVIEW",e[e.COMPLETED=3]="COMPLETED",e[e.DECLINED=4]="DECLINED"}(Sr||(Sr={}));var Er=Sr,Rr=function(e){var t=e.review,n=e.handleOnDelete,a=Object(r.useState)({isLoading:!1}),c=Object(V.a)(a,2),i=c[0],o=c[1],l=Object(s.b)(),d=function(e,t){return e&&Object(Ie.jsxs)("div",{className:"box",children:[Object(Ie.jsx)("span",{className:"box-title",children:Or()(e).format("ll")}),Object(Ie.jsx)("span",{className:"box-subtitle",children:t})]})},j=function(){var e=Object(q.a)(W.a.mark((function e(){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(Object(u.a)(Object(u.a)({},i),{},{isLoading:!0})),e.next=3,l(on(t.ReviewerId));case 3:n&&n(t.ReviewerId),o(Object(u.a)(Object(u.a)({},i),{},{isLoading:!1}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsxs)("div",{className:"reviewdetail__reviewers",children:[Object(Ie.jsxs)("div",{className:"reviewdetail__reviewers-name",children:["Reviewer: ",t.ReviewerName]}),Object(Ie.jsxs)("div",{className:"reviewdetail__reviewers-info",children:[d(t.CreatedOn,"Requested On"),d(t.ResponsDueDate,"Response Due Date"),d(t.ReviewDueDate,"Review Due Date"),d(t.AcceptedOn,"Accepted On"),d(t.CompletedOn,"Completed On")]}),Object(Ie.jsx)(Ie.Fragment,{children:Object(Ie.jsxs)("div",{className:"reviewdetail__reviewers-body",children:[!Ee(t.CommentsForEditor)&&Object(Ie.jsx)(At,{label:"Comment for Editor",children:Object(Ie.jsx)("div",{className:"ck-editor-content",dangerouslySetInnerHTML:qe(t.CommentsForEditor)})}),!Ee(t.CommentsForEditorAndAuthor)&&Object(Ie.jsx)(At,{label:"Comment for Editor and Author",children:Object(Ie.jsx)("div",{className:"ck-editor-content",dangerouslySetInnerHTML:qe(t.CommentsForEditorAndAuthor)})}),t.ReviewFiles&&t.ReviewFiles.length>0&&Object(Ie.jsx)(At,{children:Object(Ie.jsx)(Sn,{files:t.ReviewFiles,title:"Review Files"})})]})}),Object(Ie.jsxs)("div",{className:"reviewdetail__reviewers-sblock",children:[Object(Ie.jsx)("div",{className:"article-card__status-progress",children:Object(Ie.jsx)(G.Progress,{type:"circle",strokeWidth:12,percentage:t.Steps/4*100})}),function(){var e="",n="gray",r=t.RecommendationId,a=t.Recommendation,c=t.ReviewStatus;return 0===c?(e="Waiting for Acceptance",n="gray"):Ee(r)||0===r?c===Er.COMPLETED?(e="Review Submitted",n="green"):c===Er.DECLINED?(e="Review Declined",n="red"):c!==Er.ACCEPTED&&c!==Er.UNDERREVIEW||(e="Under Review",n="yellow"):(e=a,n=1==r?"green":2===r||4===r?"yellow":"red"),Object(Ie.jsx)("span",{className:Pe()("review-status",Object(ke.a)({},n,!0)),children:e})}()]}),Object(Ie.jsx)("div",{className:"reviewdetail__reviewers-actionblock",children:Object(Ie.jsxs)(G.Button,{size:"mini",type:"danger",onClick:j,loading:i.isLoading,children:[Object(Ie.jsx)(It.f,{}),"Remove Reviewer"]})})]})},Dr=function(e){var t=e.review,n=(e.dispatch,e.showAddReviewer),a=e.onSuccess,c=Object(r.useState)({isLoading:!1,review:null}),i=Object(V.a)(c,2),s=i[0],o=(i[1],function(e){a&&a()});return Object(Ie.jsxs)(wn,{isLoading:s.isLoading,children:[Object(Ie.jsxs)("div",{className:"reviewdetail-header",children:[Object(Ie.jsx)("h4",{children:t&&t.Title}),Object(Ie.jsxs)(G.Button,{size:"mini",type:"primary",onClick:function(){return n()},children:[Object(Ie.jsx)(It.h,{}),"Add Reviewer"]})]}),t&&Object(Ie.jsx)("div",{children:0===t.Reviews.length?Object(Ie.jsx)("div",{children:"No reveiw request has been requested yet."}):t.Reviews.map((function(e,t){return Object(Ie.jsx)(Rr,{review:e,handleOnDelete:o},t)}))})]})},kr=function(e){var t=Object(r.useState)({name:"",isLoading:!1,review:null,showReviewerForm:!1}),n=Object(V.a)(t,2),a=n[0],c=n[1],i=e.row,o=(e.isVisible,e.setVisible,e.articlesRef,Object(s.b)());Object(r.useEffect)((function(){}),[i.ReviewId]);var l=function(){d(i.Id)};Object(r.useEffect)((function(){i&&i.Id&&d(i.Id)}),[i]);var d=function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(Object(u.a)(Object(u.a)({},a),{},{isLoading:!0})),e.next=3,o(Zt(t));case 3:n=e.sent,c(Object(u.a)(Object(u.a)({},a),{},{isLoading:!1,review:n,showReviewerForm:!1}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(Ie.jsx)(Ie.Fragment,{children:Object(Ie.jsx)("div",{children:a.showReviewerForm?Object(Ie.jsx)(Cr,Object(u.a)(Object(u.a)({},e),{},{onSuccess:l,onCancel:function(){return c(Object(u.a)(Object(u.a)({},a),{},{showReviewerForm:!1}))}})):Object(Ie.jsx)(Dr,{review:a.review,dispatch:o,onSuccess:l,showAddReviewer:function(){return c(Object(u.a)(Object(u.a)({},a),{},{showReviewerForm:!0}))}})})})},Fr={Attachment:null},Pr=function(e){var t=e.isVisible,n=e.onSave,a=e.onCancel,c=e.selectedFileData,i=e.title,o=Object(r.useState)(Fr),l=Object(V.a)(o,2),d=l[0],j=l[1],b=Object(s.c)((function(e){return e.metaReducer}));b.components;Object(r.useEffect)((function(){var e=c.data;j(e?Object(u.a)(Object(u.a)({},e),{},{Attachment:e.Attachment||{serverFileName:e.ServerFileName,name:e.UserFileName}}):Fr)}),[c]);return Object(Ie.jsx)(G.Dialog,{title:i,visible:t,onCancel:a,children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsxs)(G.Form,{model:d,labelPosition:"top",children:[Object(Ie.jsx)(G.Form.Item,{label:"Attachment",children:Object(Ie.jsx)(Pt,{value:d.Attachment,name:"Attachment",onChange:function(e,t){j(Object(u.a)(Object(u.a)({},d),{},Object(ke.a)({},e,t)))}})}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:function(){return function(){var e=Object(u.a)({},d);n&&n(c.index,e),j(Fr)}()},children:"Save"})})]})})})},Ar=function(e){e.onSave;var t=e.attachments,n=e.setAttachments,a=e.title,c=e.isDisabled,i=Object(r.useState)(!1),o=Object(V.a)(i,2),l=o[0],d=o[1],j=Object(r.useState)({data:null,index:-1}),b=Object(V.a)(j,2),m=b[0],p=b[1],h=(Object(s.b)(),Object(s.c)((function(e){return e.articleReducer})).article);Object(r.useEffect)((function(){if(!Ee(h)){var e=h.ArticleAttachments||[];n(Object(k.a)(e))}}),[h]);return Object(Ie.jsxs)("div",{className:"upload-steps__submissions",children:[Object(Ie.jsxs)("div",{className:"upload-steps__submissions-header",children:[Object(Ie.jsx)("div",{children:a}),Object(Ie.jsx)("div",{className:"upload-steps__submissions-header-action",children:Object(Ie.jsx)("div",{children:Object(Ie.jsx)(G.Button,{type:"text",disabled:c,onClick:function(){p({index:-1,data:null}),d(!0)},children:"Upload File"})})})]}),Object(Ie.jsxs)("div",{className:"upload-steps__submissions-body",children:[0===t.length&&Object(Ie.jsx)("div",{style:{padding:"10px",textAlign:"center"},children:"No files choosen"}),t.map((function(e,r){return Object(Ie.jsxs)("div",{className:"upload-steps__attachment",children:[Object(Ie.jsx)("div",{className:"upload-steps__attachment-info",children:Object(Ie.jsxs)("div",{className:"upload-steps__attachment-info-title",children:[Object(Ie.jsx)(Et.b,{}),e.UserFileName?e.UserFileName:e.Attachment&&e.Attachment.name]})}),Object(Ie.jsxs)("div",{className:"upload-steps__attachment-action",children:[Object(Ie.jsx)(G.Button,{type:"text",onClick:function(){return function(e){p({index:e,data:Object(u.a)({},t[e])}),d(!0)}(r)},children:"Edit"}),Object(Ie.jsx)(G.Button,{type:"text",onClick:function(){return function(e){var r=Object(k.a)(t);r.splice(e,1),n(r)}(r)},children:"Delete"})]})]},r)}))]}),Object(Ie.jsx)(Pr,{title:a,isVisible:l,setVisible:d,selectedFileData:m,onCancel:function(){d(!1),p({index:-1,data:null})},onSave:function(e,r){return function(e,r){var a=Object(k.a)(t);e>=0?a[e]=r:a.push(r),n(a),d(!1)}(e,r)}}),Object(Ie.jsx)("div",{className:"upload-steps__submissions-footer"})]})},Tr=function(e){var t=e.row,n=e.title,a=e.dispatch,c=e.loadData,i=Object(r.useState)({isVisible:!1,isLoading:!1,review:null,comments:"",attachments:[]}),s=Object(V.a)(i,2),o=s[0],l=s[1],d=function(){var e=Object(q.a)(W.a.mark((function e(){var n,r,i,s;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.comments,r=o.attachments,i={ArticleId:t.Id,Comments:n,Files:r},l(Object(u.a)(Object(u.a)({},o),{},{isLoading:!0})),e.next=5,a(cn(i));case 5:(s=e.sent)&&s.Status?(l(Object(u.a)(Object(u.a)({},o),{},{isVisible:!1,isLoading:!1})),c()):l(Object(u.a)(Object(u.a)({},o),{},{isLoading:!1}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsx)(G.Button,{size:"mini",onClick:function(){l(Object(u.a)(Object(u.a)({},o),{},{isVisible:!0}))},children:n}),o.isVisible&&Object(Ie.jsx)(G.Dialog,{title:"Request Rivision",visible:o.isVisible,onCancel:function(){l(Object(u.a)(Object(u.a)({},o),{},{isVisible:!1}))},style:{width:"900px"},children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsx)(wn,{isLoading:o.isLoading,children:Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)(At,{label:"Comments For Author",children:Object(Ie.jsx)(Ut,{name:"comments",value:o.comments,onChange:function(e,t){l(Object(u.a)(Object(u.a)({},o),{},{comments:t}))}})}),Object(Ie.jsx)(Ar,{title:"Revision Attachments",attachments:o.attachments,setAttachments:function(e){return l(Object(u.a)(Object(u.a)({},o),{},{attachments:e}))}}),Object(Ie.jsx)(At,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:d,loading:o.isLoading,children:"Request Rivision"})})]})})})})]})},_r=function(e){var t=e.row,n=e.selectedTab,a=e.articlesRef,c=(e.loadData,Object(r.useState)(!1)),i=Object(V.a)(c,2),o=i[0],l=i[1],u=Object(s.b)(),d=(Object(M.g)(),function(){l(!0)}),j=function(){var e=Object(q.a)(W.a.mark((function e(t){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u(an(t));case 2:a.current.loadData();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(Ie.jsxs)(Ie.Fragment,{children:[function(){var e=[];return e.push(Object(Ie.jsx)(mr,{row:t,handleSave:j,status:Te.APPROVED,title:"Approved"})),"NEW"!==n&&"NEEDACTIONS"!==n&&"UNDERREVIEW"!==n||e.push(Object(Ie.jsx)(Tr,{row:t,handleSave:j,status:Te.REVISION,title:"Request Author for Revisions",dispatch:u,loadData:function(){return a.current.loadData()}})),e.push(Object(Ie.jsx)(mr,{row:t,handleSave:j,status:Te.REJECTED,title:"Reject"})),e.push(Object(Ie.jsx)(pr,{title:"Assign Reveiwer",onAssignClick:d})),e}(),o&&Object(Ie.jsx)(G.Dialog,{closeOnClickModal:!1,title:"Assign Reviewer",visible:o,onCancel:function(){return l(!1)},style:{width:"800px"},children:Object(Ie.jsx)(G.Dialog.Body,{children:Object(Ie.jsx)(kr,{row:t,isVisible:o,setVisible:l,articlesRef:a})})})]})},Lr=function(e){var t=e.selectedTab,n=Object(r.useRef)(null);return Object(Ie.jsx)(Ie.Fragment,{children:Object(Ie.jsx)("div",{className:"submitter",children:Object(Ie.jsx)(kn,{selectedTab:t,actions:function(e,r){return Object(Ie.jsx)(_r,{row:e,selectedTab:t,articlesRef:n})},getStatus:function(){var e="0";return"NEW"==t?e="".concat(Te.ASSIGNEDEDITOR):"UNDERREVIEW"==t?e=[Te.REVIEWING].toString():"NEEDACTIONS"==t?e=[Te.REVIEWED,Te.RESUBMITTED].toString():"APPROVED"==t?e=[Te.APPROVED].toString():"REVERTED"==t?e=[Te.REVISION].toString():"REJECTED"==t&&(e=[Te.REJECTED].toString()),e},ref:n})})})},Br=[{exact:!0,component:function(){var e=Object(r.useState)("NEW"),t=Object(V.a)(e,2),n=t[0],a=t[1];Object(s.b)(),Object(M.g)();return Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)(G.Breadcrumb,{separator:"/",children:Object(Ie.jsx)(G.Breadcrumb.Item,{children:Object(Ie.jsx)(i.b,{to:be.adminSubmission,children:"Home"})})}),Object(Ie.jsxs)("div",{className:"submission",children:[Object(Ie.jsx)(G.Tabs,{type:"card",value:n,onTabClick:function(e){var t=e.props.name;a(t)},children:[{label:"New Submissions",name:"NEW"},{label:"Under Review",name:"UNDERREVIEW"},{label:"Need Actions",name:"NEEDACTIONS"},{label:"Approved",name:"APPROVED"},{label:"Revision Requested",name:"REVERTED"},{label:"Rejected",name:"REJECTED"}].map((function(e,t){return Object(Ie.jsx)(G.Tabs.Pane,{label:Object(Ie.jsx)(An,{item:e,selectedTab:n,count:24}),name:e.name},t)}))}),Object(Ie.jsx)(Lr,{selectedTab:n})]})]})},role:_e.Editor,title:"Dashboard",path:be.editor}],Ur=function(e){var t=e.row,n=(e.selectedTab,e.handleReviewClick);return Object(Ie.jsxs)(Ie.Fragment,{children:[" ",function(){var e=[];return!Ee(t.ReviewId)&&e.push(Object(Ie.jsxs)(G.Button,{size:"mini",onClick:function(){return n(t.ReviewId)},children:[Object(Ie.jsx)(In.b,{}),"Review"]})),e}()]})},Mr=function(e){var t=e.selectedTab,n=Object(r.useRef)(null),a=(Object(s.b)(),Object(M.g)());return Object(Ie.jsx)("div",{className:"submitter",children:Object(Ie.jsx)(kn,{selectedTab:t,actions:function(e,n){return Object(Ie.jsx)(Ur,{row:e,selectedTab:t,handleReviewClick:function(e){return a.push("".concat(be.review,"/").concat(e))}})},getStatus:function(){return[Te.REVIEWING].toString()},ref:n})})},Vr=function(e){Object(r.useRef)();var t=e.onSave,n=Object(M.g)(),a=Object(r.useState)({ArticleId:0,SectionId:0,CheckList:[]}),c=Object(V.a)(a,2),i=(c[0],c[1],Object(r.useState)(!1)),o=Object(V.a)(i,2),l=o[0],u=o[1],d=Object(r.useState)(""),j=Object(V.a)(d,2),b=(j[0],j[1],Object(s.b)()),m=Object(s.c)((function(e){return e.metaReducer})),p=(m.checkList,m.templates,m.sections,Object(s.c)((function(e){return e.articleReducer})).review),h=function(){var e=Object(q.a)(W.a.mark((function e(){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(!0),e.next=3,b(en(p.ReviewId,Er.ACCEPTED));case 3:n=e.sent,u(!1),n.Status&&t&&t();case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),f=function(){var e=Object(q.a)(W.a.mark((function e(){var t;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(!0),e.next=3,b(en(p.ReviewId,Er.DECLINED));case 3:t=e.sent,u(!1),t.Status&&n.push(be.base);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Ee(p)?null:Object(Ie.jsx)(wn,{isLoading:l,children:Object(Ie.jsxs)("div",{className:"review",children:[Object(Ie.jsx)(At,{label:"Request for Review",children:"You have been selected as a potentential reviewer of the following submission."}),Object(Ie.jsx)(At,{label:"ArticleTitle",children:p.ArticleTitle}),Object(Ie.jsx)(At,{label:"Abstract",children:Object(Ie.jsx)("p",{children:"The study examines the process of intstitutionalization as it has occured for the scholarly Publishing Servive Program(SPSP), an evolution of the library activities at the University of Anywhere. As an innovation which challenges many of the conventions of library-based publishing, it is necessary to apporach the evaluation of SPSP with a concern for appropriate methods and a consideration of issues of legitimacy in the analysis then provides a basis for recasting evaluation as a political process where innovative programs struggle to maintain those exemplars which make them different while acheiving thw legitimacy which make them possible."})}),Object(Ie.jsx)(At,{children:Object(Ie.jsx)(Sn,{files:p.SubmissoinFiles,title:"Submission Files"})}),Object(Ie.jsx)(At,{label:"Review Schedule",children:Object(Ie.jsxs)("div",{className:"review-reviewDate",children:[Object(Ie.jsxs)("div",{className:"review-reviewDate-info",children:[Object(Ie.jsx)("span",{className:"value",children:vr(p.CreatedOn)}),Object(Ie.jsx)("span",{className:"label",children:"Editor's Request"})]}),Object(Ie.jsxs)("div",{className:"review-reviewDate-info",children:[Object(Ie.jsx)("span",{className:"value",children:vr(p.ResponsDueDate)}),Object(Ie.jsx)("span",{className:"label",children:"Response Due Date"})]}),Object(Ie.jsxs)("div",{className:"review-reviewDate-info",children:[Object(Ie.jsx)("span",{className:"value",children:vr(p.ReviewDueDate)}),Object(Ie.jsx)("span",{className:"label",children:"Review Due Date"})]})]})}),Object(Ie.jsxs)(At,{children:[Object(Ie.jsx)(G.Button,{type:"primary",onClick:h,loading:l,disabled:p.IsAccepted||p.IsCompleted,children:"Accept Review and Continue"}),Object(Ie.jsx)(G.Button,{type:"danger",loading:l,onClick:f,disabled:p.IsAccepted||p.IsCompleted,children:"Decline Review Request"})]})]})})},qr=function(e){var t=e.onSave,n=Object(s.c)((function(e){return e.metaReducer})).templates.find((function(e){return e.TemplateKey===ln.ReviewGuideline})),r=function(){var e=Object(q.a)(W.a.mark((function e(){return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&t();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsxs)(Ie.Fragment,{children:[n&&Object(Ie.jsx)("div",{className:"template",dangerouslySetInnerHTML:qe(n.TemplateText)}),Object(Ie.jsx)(G.Button,{type:"primary",onClick:r,children:"Continue"})]})},zr=function(e){var t=Object(s.c)((function(e){return e.articleReducer})).review,n=e.onSave,a=Object(s.b)(),c=Object(s.c)((function(e){return e.metaReducer})),i=c.recommendations,o=Object(r.useState)(!1),l=Object(V.a)(o,2),d=l[0],j=l[1],b=Object(r.useState)(""),m=Object(V.a)(b,2),p=m[0],h=m[1],f=Object(r.useState)(""),O=Object(V.a)(f,2),v=O[0],x=O[1],g=Object(r.useState)([]),w=Object(V.a)(g,2),S=w[0],y=w[1];Object(r.useEffect)((function(){Ee(t)||(h(t.CommentsForEditor||""),x(t.CommentsForEditorAndAuthor||""),E({RecommendationId:t.RecommendationId}),y(t.ReviewFiles||[]))}),[t]);var I=Object(r.useState)({RecommendationId:""}),N=Object(V.a)(I,2),C=N[0],E=N[1],R=function(){var e=Object(q.a)(W.a.mark((function e(){var r,c;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={reviewId:t.ReviewId,commentsForEditor:p,commentsForEditorAndAuthor:v,recommendationId:C.RecommendationId,files:S},j(!0),e.next=4,a(tn(r));case 4:c=e.sent,j(!1),c&&c.Status&&n();case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsx)(wn,{isLoading:d,children:Object(Ie.jsx)("div",{className:"user-form",children:Object(Ie.jsxs)(G.Form,{className:"demo-form-stacked",labelPosition:"top",labelWidth:"100",children:[t&&t.SubmissoinFiles&&t.SubmissoinFiles.length>0&&Object(Ie.jsx)("div",{className:"margin-bottom-10",children:Object(Ie.jsx)(Sn,{files:t.SubmissoinFiles,title:"Submission Files"})}),Object(Ie.jsx)(G.Form.Item,{label:"Comments for Author and editor",children:Object(Ie.jsx)(_t.CKEditor,{editor:Bt.a,data:v,onChange:function(e,t){var n=t.getData();x(n)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Comment for Editor only",children:Object(Ie.jsx)(_t.CKEditor,{editor:Bt.a,data:p,onChange:function(e,t){var n=t.getData();h(n)}})}),Object(Ie.jsx)(G.Form.Item,{label:"Recommendation",children:Object(Ie.jsx)(G.Select,{value:C.RecommendationId,placeholder:"Recommendation",onChange:function(e){return function(e,t){E(Object(u.a)(Object(u.a)({},C),{},Object(ke.a)({},e,t)))}("RecommendationId",e)},children:i&&i.map((function(e,t){return Object(Ie.jsx)(G.Select.Option,{label:e.Name,value:e.Id},t)}))})}),Object(Ie.jsx)(Ar,{attachments:S,setAttachments:y,title:"Review Attachments"}),Object(Ie.jsx)(G.Form.Item,{children:Object(Ie.jsx)(G.Button,{type:"primary",onClick:R,loading:d,disabled:t.ArticleStatus===Te.REVIEWED,children:"Save and Continue"})})]})})})},Wr=function(e){var t=e.onConfirmation,n=Object(s.c)((function(e){return e.articleReducer})).review,a=Object(s.b)(),c=Object(r.useState)(!1),i=Object(V.a)(c,2),o=i[0],l=i[1],u=function(){var e=Object(q.a)(W.a.mark((function e(){var r;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),e.next=3,a(nn(n.ReviewId));case 3:r=e.sent,l(!1),r&&r.Status&&t();case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)("div",{className:"upload-steps__info",children:'Your submission has been submitted and is ready to be sent. You may go back to review and adjust any of the information you have entered before continuing. When you are ready, click "Finish Review"'}),Object(Ie.jsx)("div",{children:Object(Ie.jsx)(G.Button,{disabled:n.IsCompleted,type:"primary",onClick:function(){return u()},loading:o,children:"Finish Review"})})]})},Gr=function(e){var t=Object(r.useState)(1),n=Object(V.a)(t,2),a=n[0],c=n[1],o=Object(r.useState)(!0),l=Object(V.a)(o,2),u=l[0],d=l[1],j=Object(r.useState)("1"),b=Object(V.a)(j,2),m=b[0],p=b[1],h=Object(s.b)(),f=Object(M.g)(),O=e.match.params.reviewId,v=Object(s.c)((function(e){return e.articleReducer})).review;Object(r.useEffect)((function(){if(v){var e=v.Steps||1;v.IsAccepted&&(1==e?e=3:e<=3&&e++),c(e),p("".concat(e))}}),[v]),Object(r.useEffect)((function(){O?x(O):h(Wt())}),[O]);var x=function(){var e=Object(q.a)(W.a.mark((function e(t){var n;return W.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),e.next=3,h(Qt(t));case 3:if(n=e.sent,d(!1),null!=n){e.next=8;break}return f.push(be.base),e.abrupt("return");case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(e){e>a&&c(e)},w=[{label:"1.Requst",name:"1",component:Object(Ie.jsx)(Vr,{onSave:function(){return g(2),void p("2")}})},{label:"2. Guidelines",name:"2",component:Object(Ie.jsx)(qr,{onSave:function(){return g(3),void p("3")}})},{label:"3. Download & Review",name:"3",component:Object(Ie.jsx)(zr,{onSave:function(){return g(4),void p("4")}})},{label:"4.Confirmation",name:"4",component:Object(Ie.jsx)(Wr,{onConfirmation:function(){return Object(G.Message)({showClose:!0,message:"Congrats, revision completed.",type:"success"}),void f.push("".concat(be.reviewer))}})}];return Object(Ie.jsxs)(Ie.Fragment,{children:[Object(Ie.jsxs)(G.Breadcrumb,{separator:"/",children:[Object(Ie.jsx)(G.Breadcrumb.Item,{children:Object(Ie.jsx)(i.b,{to:be.reviewer,children:"Home"})}),Object(Ie.jsx)(G.Breadcrumb.Item,{children:"Review"})]}),Object(Ie.jsx)("div",{className:"submission",children:Object(Ie.jsx)(wn,{isLoading:u,children:Object(Ie.jsx)(G.Tabs,{type:"card",value:m,onTabClick:function(e){var t=e.props.name;p(t)},children:w.map((function(e,t){return Object(Ie.jsx)(G.Tabs.Pane,{label:e.label,name:e.name,disabled:(n=t+1,a<n),children:e.component},t);var n}))})})})]})},Hr=[{exact:!0,component:function(){var e=Object(r.useState)("NEW"),t=Object(V.a)(e,2),n=t[0],a=t[1];return Object(Ie.jsxs)("div",{children:[Object(Ie.jsx)(G.Breadcrumb,{separator:"/",children:Object(Ie.jsx)(G.Breadcrumb.Item,{children:Object(Ie.jsx)(i.b,{to:be.adminSubmission,children:"Home"})})}),Object(Ie.jsxs)("div",{className:"submission",children:[Object(Ie.jsx)(G.Tabs,{type:"card",value:n,onTabClick:function(e){var t=e.props.name;a(t)},children:[{label:"New Assignment",name:"NEW"},{label:"Ongoing Reviews",name:"ONGOING"},{label:"Completed",name:"COMPLETED"}].map((function(e,t){return Object(Ie.jsx)(G.Tabs.Pane,{label:Object(Ie.jsx)(An,{item:e,selectedTab:n,count:24}),name:e.name},t)}))}),Object(Ie.jsx)(Mr,{selectedTab:n})]})]})},role:_e.Reviewer,title:"Dashboard",path:be.reviewer},{exact:!0,component:Gr,role:_e.Reviewer,title:"Review",path:"".concat(be.review,"/:reviewId")}],Jr=[].concat(Object(k.a)(Zn),Object(k.a)(Tn),Object(k.a)(br),Object(k.a)(Br),Object(k.a)(Hr)),Kr=function(e){return Object(Ie.jsx)("div",{children:"Not Found"})},Yr=n(87),$r=["component"],Xr=function(e){var t=e.component,n=Object(Yr.a)(e,$r),r=localStorage.getItem("AuthToken"),a=localStorage.getItem("Role");return Object(Ie.jsx)(M.b,Object(u.a)(Object(u.a)({},n),{},{render:function(e){return n.role===_e.Public||r&&n.role===a?Object(Ie.jsx)(t,Object(u.a)({},e)):Object(Ie.jsx)(M.a,{to:"/login"})}}))},Qr=["component"],Zr=function(e){e.component;var t=Object(Yr.a)(e,Qr),n=localStorage.getItem("Role");return Object(Ie.jsx)(M.b,Object(u.a)(Object(u.a)({},t),{},{render:function(e){return n===_e.Submitter?Object(Ie.jsx)(M.a,{to:be.submitter}):n===_e.Administrator?Object(Ie.jsx)(M.a,{to:be.adminSubmission}):n===_e.Editor?Object(Ie.jsx)(M.a,{to:be.editor}):n===_e.Reviewer?Object(Ie.jsx)(M.a,{to:be.reviewer}):Object(Ie.jsx)(M.a,{to:"/login"})}}))},ea=function(e){var t=Object(s.b)();return Object(r.useEffect)((function(){t(Wn())}),[]),Object(Ie.jsx)(Ie.Fragment,{children:Object(Ie.jsx)(Ke,{children:Object(Ie.jsxs)(M.d,{children:[Jr.map((function(e,t){return Object(Ie.jsx)(Xr,Object(u.a)({},e),t)})),Object(Ie.jsx)(M.b,{exact:!0,path:"/login",component:nt}),Object(Ie.jsx)(Zr,{exact:!0,path:"/",component:Kr}),Object(Ie.jsx)(M.b,{path:"*",component:Kr})]})})})},ta=n(173),na=U({});G.i18n.use(ta.a);var ra=function(){return Object(Ie.jsx)(s.a,{store:na,children:Object(Ie.jsxs)("div",{className:"app",children:[Object(Ie.jsx)(Ce,{}),Object(Ie.jsx)(ea,{})]})})},aa=document.getElementsByTagName("base")[0].getAttribute("href");a.render(Object(Ie.jsx)(i.a,{basename:aa,children:Object(Ie.jsx)(ra,{})}),document.getElementById("root"))}},[[472,1,2]]]); //# sourceMappingURL=main.ffed0fc9.chunk.js.map
Save