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.73d2e149.chunk.js
(this["webpackJsonpreact-app"]=this["webpackJsonpreact-app"]||[]).push([[0],{176:function(e,t,n){},450:function(e,t,n){},465:function(e,t,n){"use strict";n.r(t);var r=n(3),a=n(17),c=n(23),s=(n(176),n(177),n(15)),i=n(44),o=n(164),u=n(6),l="ADD_MESSAGE",d="ADD_MESSAGES",b="ADD_OTHER_MESSAGES",j="REMOVE_MESSAGE",p="CLEAR_MESSAGE",m="GET_ROLES",f="GET_TEMPLATES",h="GET_CHECKLIST",O="GET_SECTIONS",x="GET_COMPONENTS",v="GET_LOGGEDIN_USER_DETAIL",g="GET_USER_LIST",w="GET_ARTICLE",y={roles:[]},C=n(27),S={messages:{},otherMessage:{},arrayMessages:[]},I={loggedInUserDetail:{},userList:[]},N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case v:return Object(u.a)(Object(u.a)({},e),{},{loggedInUserDetail:t.payload});case g:return Object(u.a)(Object(u.a)({},e),{},{userList:t.payload});default:return e}},P={checkList:[],sections:[],templates:[],components:[]},E={article:{}},F=Object(i.b)({commonReducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments.length>1?arguments[1]:void 0;return t.type===m?Object(u.a)(Object(u.a)({},e),{},{roles:t.payload}):e},validateReducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case l:return Object(u.a)(Object(u.a)({},e),{},{messages:t.payload});case d:return Object(u.a)(Object(u.a)({},e),{},{arrayMessages:[t.payload].concat(Object(C.a)(e.arrayMessages))});case b:return Object(u.a)(Object(u.a)({},e),{},{otherMessage:t.payload});case j: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}},userReducer:N,metaReducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case h:return Object(u.a)(Object(u.a)({},e),{},{checkList:t.payload});case O:return Object(u.a)(Object(u.a)({},e),{},{sections:t.payload});case f:return Object(u.a)(Object(u.a)({},e),{},{templates:t.payload});case x:return Object(u.a)(Object(u.a)({},e),{},{components:t.payload});default:return e}},submitterReducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;return t.type===w?Object(u.a)(Object(u.a)({},e),{},{article:t.payload}):e}});var k=n(16),D=n(14),A=n(4),R=n.p+"static/media/logo.b47ed324.png",T=n(13),L=n(7),_=n.n(L),M={siginIn:"auth/signin",signOut:"auth/signout"},U={templates:"meta/templates",checkList:"meta/checklist",sections:"meta/sections",components:"meta/components"},B={roles:"security/roles",downloadFiles:"common/files/download"},z={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"},G={article:"submitter/article",start:"submitter/start",authors:"submitter/authors",attachments:"submitter/attachments",metadata:"submitter/metadata",confirmation:"submitter/confirmation"},V=n(165),q=n.n(V),H="".concat(window.location.origin,"/v1/"),W=function(){return function(e){e({type:p,payload:{}})}};function K(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:l,payload:{type:n,message:r}})}(e,n)}var J,Q=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},$=q.a.create({baseURL:H}),X=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 s=te(e,n);$.get(s,Q()).then((function(e){return ne(e,t,a,r)})).catch((function(e){return re(e,t,c)}))}))},Y=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,s){$.post(e,n,Q(a)).then((function(e){return ne(e,t,c,r)})).catch((function(e){return re(e,t,c)}))}))},Z=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,s){$.put(e,n,Q(a)).then((function(e){return ne(e,t,c,r)})).catch((function(e){return re(e,t,c)}))}))},ee=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return new Promise((function(a,c){var s="".concat(e,"/").concat(n);$.delete(s,Q()).then((function(e){return ne(e,t,a,r)})).catch((function(e){return re(e,t,a)}))}))},te=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},ne=function(e,t,n,r){var a=e.data;1==a.Status?r&&K(t,a):void 0==a.Status?200==e.status||(K(t,"Response status is not 200"),a=null):(K(t,a),a=null),n(a)},re=function(e,t,n){K(t,e.message),n(null)};!function(e){e.base="/",e.login="/login",e.forgotPassword="/reset-password",e.resetPassword="/reset-password/send",e.signup="/signup",e.verifyEmailAddress="/emailVerification",e.submitter="/submitter",e.submission="/submitter/submission",e.user="/user"}(J||(J={}));var ae=J,ce=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)}},se=function(e,t){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(M.siginIn,n,e).catch((function(e){return!1}));case 2:(r=t.sent)&&r.Status&&(ce(r.Data),window.location.href="/");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},ie=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(z.list,n,e,!1);case 2:return r=t.sent,n({type:g,payload:r.Data}),t.abrupt("return",r.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(T.a)(_.a.mark((function t(n){var r,a;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.Id?Z:Y,t.next=3,r(z.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)}}()},ue=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ee("".concat(z.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)}}()},le=function(e){var t=e.userId,n=e.isInactive;return function(){var e=Object(T.a)(_.a.mark((function e(r){var a;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X("".concat(z.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)}}()},de=function(e){var t=e.userName,n=e.newPassword;return function(){var e=Object(T.a)(_.a.mark((function e(r){var a;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y(z.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)}}()},be=function(e){var t=e.currentPassword,n=e.newPassword,r=e.confirmNewPassword;return function(){var e=Object(T.a)(_.a.mark((function e(a){var c;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y(z.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)}}()},je=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(z.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)}}()},pe=function(e){var t=e.email;return function(){var e=Object(T.a)(_.a.mark((function e(n){var r;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y(z.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)}}()},me=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(z.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)}}()},fe=n(2),he=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(D.a)(i,2),l=o[0],d=o[1],b=function(){var e=Object(T.a)(_.a.mark((function e(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(t){var n;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}return e.next=3,c(be({currentPassword:l.currentPassword,newPassword:l.newPassword,confirmNewPassword:l.confirmNewPassword}));case 3:(n=e.sent)&&n.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(){a.current.resetFields(),d({newPassword:"",currentPassword:"",confirmNewPassword:"",isLoading:!1}),n(!1)};return Object(fe.jsx)(A.Dialog,{title:"Change Password",visible:t,onCancel:function(){return j()},style:{width:"350px"},children:Object(fe.jsx)(A.Dialog.Body,{children:Object(fe.jsxs)(A.Form,{ref:a,rules:{newPassword:[{required:!0,message:"New password is required",trigger:"blur"}]},children:[Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.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(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.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(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.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(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{onClick:function(){return b()},loading:l.isLoading,children:"Change Password"})})]})})})};function Oe(e){Object(k.g)();var t=localStorage.getItem("AuthToken"),n=Object(s.b)(),a=Object(r.useState)(!1),c=Object(D.a)(a,2),i=c[0],o=c[1],u=Object(r.useState)(!1),l=Object(D.a)(u,2),d=l[0],b=l[1],j=Object(s.c)((function(e){return e.userReducer.loggedInUserDetail})),p=(j.Email,j.FullName);j.UserName;Object(r.useEffect)((function(){t?(n(function(){var e=Object(T.a)(_.a.mark((function e(t){var n;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X(z.userDetails,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(T.a)(_.a.mark((function e(t){var n;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X(U.checkList,t);case 2:n=e.sent,t({type:h,payload:n});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n(function(){var e=Object(T.a)(_.a.mark((function e(t){var n;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X(U.sections,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(T.a)(_.a.mark((function e(t){var n;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X(U.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(T.a)(_.a.mark((function e(t){var n;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X(U.components,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)}}()),b(!0)):b(!1)}),[t]);var m=function(){n(function(){var e=Object(T.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:localStorage.clear(),window.location.href=ae.login;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())};return Object(fe.jsxs)("div",{className:"app-header",children:[Object(fe.jsxs)("div",{className:"app-header-logo",children:[Object(fe.jsx)("img",{src:R}),Object(fe.jsx)("h2",{children:"B&B Institutional Review Committee - Web Portal"})]}),d&&Object(fe.jsxs)("div",{children:[Object(fe.jsx)(A.Dropdown,{onCommand:function(e){"logout"===e?m():"changePassword"===e&&o(!0)},menu:Object(fe.jsxs)(A.Dropdown.Menu,{children:[Object(fe.jsx)(A.Dropdown.Item,{command:"changePassword",children:"Change Password"}),Object(fe.jsx)(A.Dropdown.Item,{command:"logout",children:" Log out"}),Object(fe.jsx)(A.Dropdown.Item,{divided:!0,children:"Info"})]}),children:Object(fe.jsxs)("span",{className:"el-dropdown-link drop-title",children:["Welcome ",p,Object(fe.jsx)("i",{className:"el-icon-caret-bottom el-icon--right"})]})}),Object(fe.jsx)(he,{isVisible:i,setVisible:o})]})]})}function xe(e){var t=localStorage.getItem("AuthToken"),n=Object(r.useState)(t),a=Object(D.a)(n,2),c=(a[0],a[1],Object(k.g)());return t&&"null"!==t||c.push(ae.login),Object(fe.jsxs)(fe.Fragment,{children:[Object(fe.jsx)(Oe,{}),Object(fe.jsx)("div",{className:"app-container",children:e.children})]})}var ve,ge,we,ye,Ce,Se,Ie,Ne=n(19),Pe=function(){var e=Object(r.useState)({username:"",password:"",role:""}),t=Object(D.a)(e,2),n=t[0],a=t[1],i=Object(s.c)((function(e){return e.commonReducer})),o=i.roles,l=Object(r.useRef)(),d=Object(s.b)(),b=(Object(k.g)(),function(e,t){a(Object(u.a)(Object(u.a)({},n),{},Object(Ne.a)({},e,t)))}),j=function(){var e=Object(T.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),l.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}return e.next=3,d(se(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(fe.jsx)("div",{className:"container",children:Object(fe.jsxs)("div",{className:"login-form",children:[Object(fe.jsxs)(A.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(fe.jsx)(A.Form.Item,{label:"Name",prop:"username",children:Object(fe.jsx)(A.Input,{value:n.username,onChange:function(e){return b("username",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Password",prop:"password",children:Object(fe.jsx)(A.Input,{type:"password",value:n.password,onChange:function(e){return b("password",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Log in as",prop:"role",children:Object(fe.jsx)(A.Select,{value:n.role,placeholder:"Role",onChange:function(e){return b("role",e)},children:o&&o.map((function(e,t){return Object(fe.jsx)(A.Select.Option,{label:e.Name,value:e.Name},t)}))})}),Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{type:"primary",onClick:j,nativeType:"submit",children:"Login"})})]}),Object(fe.jsxs)("div",{className:"login-form__forgot",children:[Object(fe.jsx)("span",{className:"forgot-link",children:Object(fe.jsx)(c.b,{to:ae.resetPassword,children:"Forgot Password?"})}),Object(fe.jsx)("span",{className:"forgot-link",children:Object(fe.jsx)(c.b,{to:ae.signup,children:"Sign up"})})]})]})})},Ee=function(e){var t=e.list,n=e.onChange,r=e.value,a=function(e,t){var a=Object(C.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(fe.jsx)("div",{className:"ctrl-check-list",children:t&&t.map((function(e,t){return Object(fe.jsx)("div",{children:Object(fe.jsx)(A.Checkbox,{label:e.Name,checked:c(e),onChange:function(t){return a(e,t)}},t)},t)}))})},Fe=n(109),ke=["title","titleId"];function De(){return De=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},De.apply(this,arguments)}function Ae(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 Re(e,t){var n=e.title,a=e.titleId,c=Ae(e,ke);return r.createElement("svg",De({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,ve||(ve=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"}))),ge||(ge=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"}))),we||(we=r.createElement("linearGradient",{id:"linear-gradient-3",x1:33.5,x2:33.5,xlinkHref:"#linear-gradient",y1:-5.429,y2:153.977})),ye||(ye=r.createElement("linearGradient",{id:"linear-gradient-4",x1:50.538,x2:50.538,xlinkHref:"#linear-gradient",y1:-23.429,y2:-3.999})),Ce||(Ce=r.createElement("linearGradient",{id:"linear-gradient-5",x1:27.396,x2:27.396,xlinkHref:"#linear-gradient-2",y1:32.518,y2:84.952})),Se||(Se=r.createElement("linearGradient",{id:"linear-gradient-6",x1:9,x2:9,xlinkHref:"#linear-gradient-2",y1:16.321,y2:43.66})),Ie||(Ie=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 Te,Le,_e,Me,Ue,Be,ze,Ge=r.forwardRef(Re),Ve=(n.p,["title","titleId"]);function qe(){return qe=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},qe.apply(this,arguments)}function He(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 We(e,t){var n=e.title,a=e.titleId,c=He(e,Ve);return r.createElement("svg",qe({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,Te||(Te=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"}))),Le||(Le=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"}))),_e||(_e=r.createElement("linearGradient",{id:"linear-gradient-3",x1:33.5,x2:33.5,xlinkHref:"#linear-gradient",y1:-5.429,y2:153.977})),Me||(Me=r.createElement("linearGradient",{id:"linear-gradient-4",x1:50.538,x2:50.538,xlinkHref:"#linear-gradient",y1:-23.429,y2:-3.999})),Ue||(Ue=r.createElement("linearGradient",{id:"linear-gradient-5",x1:27.396,x2:27.396,xlinkHref:"#linear-gradient-2",y1:32.518,y2:84.952})),Be||(Be=r.createElement("linearGradient",{id:"linear-gradient-6",x1:9,x2:9,xlinkHref:"#linear-gradient-2",y1:16.321,y2:43.66})),ze||(ze=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 Ke=r.forwardRef(We);n.p;var Je=function(e){var t=e.size,n=e.color,r=e.name,a=e.height,c=void 0===a?null:a,s=function(e){switch(e){case"document":return Ge;case"pdf":return Ke;default:return null}}(r);return Object(fe.jsx)(s,{width:t,height:t||c,fill:n})};Je.defaultProps={size:"25px",color:"#3a3a3a"};var Qe,$e=Je,Xe=n(168);!function(e){e.Uploads="Uploads"}(Qe||(Qe={}));var Ye=Qe,Ze=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(450),n(81)),tt=n(171);n(451);var nt=function(e){var t=e.image,n=e.dowloadLinkUrl,r=e.title,a=e.show,c=e.hostedUrl,s=e.onClose,i=t?"".concat(c,"/").concat(t.ServerFileName||""):"";return Object(fe.jsx)(A.Dialog,{title:r,visible:a,onCancel:function(){return s()},children:Object(fe.jsx)(A.Dialog.Body,{children:Object(fe.jsx)(fe.Fragment,{children:t&&Object(fe.jsxs)("div",{className:"image-modal__container",children:[Object(fe.jsx)("span",{onClick:function(e){e.stopPropagation(),window.open(n)},className:"image-modal__download",children:Object(fe.jsx)(et.a,{})}),Object(fe.jsx)(tt.a,{src:i,zoomSrc:i,zoomScale:1.5})]})})})})},rt=function(e){return void 0===e||null===e||e==={}||""===e||"object"===typeof e&&0===Object.keys(e).length||"string"===typeof e&&0===e.trim().length};n(106);var at,ct=function(e){var t=Object(r.useRef)(),n=e.name,a=e.disabled,c=e.multiple,s=(e.maxFiles,e.value),i=e.onChange,o=e.label,u=Object(r.useState)(!1),l=Object(D.a)(u,2),d=l[0],b=l[1],j=function(e){var t=e.target.files,r=t&&t[0]||null;i&&i(n,r)};return Object(fe.jsxs)(fe.Fragment,{children:[Object(fe.jsx)("input",{ref:t,type:"file",style:{display:"none"},multiple:c,name:n,disabled:a,onChange:function(e){return j&&j(e)}}),Object(fe.jsxs)("div",{className:"upload-container",children:[Object(fe.jsx)("span",{className:"upload-label",children:o}),s&&Object(fe.jsxs)("div",{className:"upload-item",onClick:function(){return s&&!rt(s.serverFileName)&&b(!0)},children:[function(e){var t=Ze(e.serverFileName||e.name),n=t.isDocs,r=t.isImage,a=t.isPdf;return n?Object(fe.jsx)($e,{name:"document",size:"20"}):a?Object(fe.jsx)($e,{name:"pdf",size:"20"}):r?rt(e.serverFileName)&&e?Object(fe.jsx)("img",{src:URL.createObjectURL(e),width:"20",height:"20"}):Object(fe.jsx)("img",{src:"/".concat(Ye.Uploads,"/").concat(e.serverFileName),width:"20",height:"20"}):Object(fe.jsx)(Fe.b,{})}(s),Object(fe.jsxs)("div",{className:"upload-item-name",children:[s.name,Object(fe.jsx)("div",{className:"btn-remove",children:Object(fe.jsx)(Xe.a,{style:{margin:"0px"},size:"12",color:"#fff",onClick:function(e){e.stopPropagation(),t.current.value="",i&&i(n,null)}})})]})]}),Object(fe.jsx)("div",{onClick:function(){t.current.click()},children:Object(fe.jsxs)("div",{className:"el-button",children:[Object(fe.jsx)(Fe.a,{}),Object(fe.jsxs)("span",{className:"upload-info",children:["Click to Upload"," "]})]})})]}),d&&Object(fe.jsx)(nt,{dowloadLinkUrl:function(e){e.serverFileName,e.name,e.FileType;return"".concat(B.downloadFiles)}(s),hostedUrl:"/".concat(Ye.Uploads),show:d,title:s.name||s.serverFileName,image:s,onClose:b})]})},st=n(56),it=n(57),ot=n.n(it),ut=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y("".concat(G.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)}}()},lt=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,X("".concat(G.article,"/").concat(e),n);case 2:return r=t.sent,rt(r)||n({type:w,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},dt=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(G.start,n,e);case 2:return r=t.sent,rt(r)||n({type:w,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},bt=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(G.authors,n,e,!0,!0);case 2:return r=t.sent,rt(r)||n({type:w,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(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(G.attachments,n,e,!0,!0);case 2:return r=t.sent,rt(r)||n({type:w,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},pt=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(G.metadata,n,e,!0,!1);case 2:return r=t.sent,rt(r)||n({type:w,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},mt=function(e){return function(){var t=Object(T.a)(_.a.mark((function t(n){var r;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(G.confirmation,n,e,!0,!1);case 2:return r=t.sent,rt(r)||n({type:w,payload:r&&r.Data}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},ft=function(e){var t=Object(r.useRef)(),n=e.onSave,a=Object(r.useState)({ArticleId:0,SectionId:0,CheckList:[]}),c=Object(D.a)(a,2),i=c[0],o=c[1],l=Object(r.useState)(!1),d=Object(D.a)(l,2),b=d[0],j=d[1],p=Object(r.useState)(""),m=Object(D.a)(p,2),f=m[0],h=m[1],O=Object(s.b)(),x=Object(s.c)((function(e){return e.metaReducer})),v=x.checkList,g=x.templates,w=x.sections,y=Object(s.c)((function(e){return e.submitterReducer})).article;Object(r.useEffect)((function(){rt(y)||(h(y.CommentsForEditor),o({ArticleId:y.Id,SectionId:y.SectionId,CheckList:y.CheckList&&y.CheckList.map((function(e){return{Id:e.CheckListId,Name:e.CheckListName}}))||[]}))}),[y]);var C=function(e,t){o(Object(u.a)(Object(u.a)({},i),{},Object(Ne.a)({},e,t)))},S=g.find((function(e){return"copyrightStatements"===e.TemplateKey})),I=g.find((function(e){return"privacyStatements"===e.TemplateKey})),N=function(){var e=Object(T.a)(_.a.mark((function e(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(t){var r,a;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=10;break}return j(!0),r={SectionId:i.SectionId,CheckList:i.CheckList,Comments:f,ArticleId:i.ArticleId,Steps:1},e.next=5,O(dt(r));case 5:a=e.sent,j(!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(fe.jsx)("div",{className:"user-form",children:Object(fe.jsxs)(A.Form,{ref:t,rules:{},className:"demo-form-stacked",model:i,labelPosition:"top",labelWidth:"100",children:[Object(fe.jsx)(A.Form.Item,{label:S&&S.TemplateTitle,prop:"SectionId",children:Object(fe.jsx)("div",{children:S&&S.TemplateText})}),Object(fe.jsx)(A.Form.Item,{label:"Section",prop:"SectionId",children:Object(fe.jsx)(A.Select,{value:i.SectionId,placeholder:"Section",onChange:function(e){return C("SectionId",e)},children:w&&w.map((function(e,t){return Object(fe.jsx)(A.Select.Option,{label:e.Name,value:e.Id},t)}))})}),Object(fe.jsx)(A.Form.Item,{label:"CheckList",prop:"CheckList",children:Object(fe.jsx)(Ee,{list:v,value:i.CheckList,onChange:function(e){return C("CheckList",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Comments for the Editor",prop:"CommentsForEditor",children:Object(fe.jsx)(st.CKEditor,{editor:ot.a,data:f,onChange:function(e,t){var n=t.getData();h(n)}})}),Object(fe.jsx)(A.Form.Item,{label:I&&I.TemplateTitle,prop:"privacyStatements",children:Object(fe.jsx)("div",{children:I&&I.TemplateText})}),Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{type:"primary",onClick:N,loading:b,children:"Save and Continue"})})]})})},ht={Component:null,Attachment:null,UserFileName:"",ServerFileName:"",FileFormat:"",FileType:"",Size:""},Ot=function(e){var t=e.isVisible,n=e.onSave,a=e.onCancel,c=e.selectedFileData,i=Object(r.useState)(ht),o=Object(D.a)(i,2),l=o[0],d=o[1],b=Object(s.c)((function(e){return e.metaReducer})),j=b.components;Object(r.useEffect)((function(){var e=c.data;d(e?Object(u.a)(Object(u.a)({},e),{},{Component:j.find((function(t){return t.Id===e.ComponentId})),Attachment:e.Attachment||{serverFileName:e.ServerFileName,name:e.UserFileName}}):ht)}),[c]);var p=function(e,t){console.clear(),console.log(l),console.log(e,t),d(Object(u.a)(Object(u.a)({},l),{},Object(Ne.a)({},e,t)))};return Object(fe.jsx)(A.Dialog,{title:"Shipping Address",visible:t,onCancel:a,children:Object(fe.jsx)(A.Dialog.Body,{children:Object(fe.jsxs)(A.Form,{model:l,labelPosition:"top",children:[Object(fe.jsx)(A.Form.Item,{label:"Article Component",children:Object(fe.jsx)(A.Select,{value:l.Component,placeholder:"Please select component",onChange:function(e){return p("Component",e)},children:j&&j.map((function(e,t){return Object(fe.jsx)(A.Select.Option,{label:e.Name,value:e},t)}))})}),Object(fe.jsx)(A.Form.Item,{label:"Attachment",children:Object(fe.jsx)(ct,{value:l.Attachment,name:"Attachment",onChange:p})}),Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{type:"primary",onClick:function(){return function(){var e=Object(u.a)(Object(u.a)({},l),{},{ComponentId:l.Component.Id,ComponentName:l.Component.Name});n&&n(c.index,e),d(ht)}()},children:"Save"})})]})})})},xt=function(e){var t=e.onSave,n=Object(r.useState)(!1),a=Object(D.a)(n,2),c=a[0],i=a[1],o=Object(r.useState)({data:null,index:-1}),l=Object(D.a)(o,2),d=l[0],b=l[1],j=Object(s.b)(),p=Object(r.useState)([]),m=Object(D.a)(p,2),f=m[0],h=m[1],O=Object(s.c)((function(e){return e.submitterReducer})).article;Object(r.useEffect)((function(){if(!rt(O)){var e=O.ArticleAttachments||[];h(Object(C.a)(e))}}),[O]);var x=function(){var e=Object(T.a)(_.a.mark((function e(){var n,r,a,c;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for((n=new FormData).append("ArticleId",O.Id),n.append("Steps","3"),r=0;r<f.length;r++)a=f[r],n.append("Attachments[".concat(r,"].Attachment"),a.Attachment||null),n.append("Attachments[".concat(r,"].FileFormat"),a.FileFormat),n.append("Attachments[".concat(r,"].FileType"),a.FileType),n.append("Attachments[".concat(r,"].ServerFileName"),a.ServerFileName),n.append("Attachments[".concat(r,"].Size"),a.Size),n.append("Attachments[".concat(r,"].UserFileName"),a.UserFileName),n.append("Attachments[".concat(r,"].ComponentId"),a.ComponentId);return e.next=6,j(jt(n));case 6:(c=e.sent)&&c.Status&&t();case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(fe.jsxs)("div",{className:"upload-steps__submissions",children:[Object(fe.jsxs)("div",{className:"upload-steps__submissions-header",children:[Object(fe.jsx)("div",{children:"Submission Files"}),Object(fe.jsx)("div",{className:"upload-steps__submissions-header-action",children:Object(fe.jsx)("div",{children:Object(fe.jsx)(A.Button,{type:"text",onClick:function(){b({index:-1,data:null}),i(!0)},children:"Upload File"})})})]}),Object(fe.jsx)("div",{className:"upload-steps__submissions-body",children:f.map((function(e,t){return Object(fe.jsxs)("div",{className:"upload-steps__attachment",children:[Object(fe.jsxs)("div",{className:"upload-steps__attachment-info",children:[Object(fe.jsxs)("div",{className:"upload-steps__attachment-info-title",children:[Object(fe.jsx)(et.b,{}),e.UserFileName?e.UserFileName:e.Attachment.name]}),Object(fe.jsxs)("div",{className:"upload-steps__attachment-info-subtitle",children:["Component: ",e.ComponentName]})]}),Object(fe.jsxs)("div",{className:"upload-steps__attachment-action",children:[Object(fe.jsx)(A.Button,{type:"text",onClick:function(){return function(e){b({index:e,data:Object(u.a)({},f[e])}),i(!0)}(t)},children:"Edit"}),Object(fe.jsx)(A.Button,{type:"text",onClick:function(){return function(e){var t=Object(C.a)(f);t.splice(e,1),h(t)}(t)},children:"Delete"})]})]},t)}))}),Object(fe.jsx)(Ot,{isVisible:c,setVisible:i,selectedFileData:d,onCancel:function(){i(!1),b({index:-1,data:null})},onSave:function(e,t){return function(e,t){var n=Object(C.a)(f);e>=0?n[e]=t:n.push(t),h(n),i(!1)}(e,t)}}),Object(fe.jsx)("div",{className:"upload-steps__submissions-footer",children:Object(fe.jsx)(A.Button,{type:"primary",onClick:x,disabled:f&&0===f.length,children:"Save and Continue"})})]})},vt={FullName:"",Salutation:"",Designation:"",Institute:"",PostalAddress:"",MobileNo:"",Email:"",Photo_ServerFileName:"",Photo_UserFileName:"",Photo:null,DigitalSignature_ServerFileName:"",DigitalSignature_UserFileName:"",DigitalSignature:null},gt=function(e){var t=e.coAuthorList,n=e.coAuthorData,a=e.onCancel,c=e.onSave,s=Object(r.useRef)(),i=Object(r.useState)(vt),o=Object(D.a)(i,2),l=o[0],d=o[1];Object(r.useEffect)((function(){if(n.index>=0){var e=t[n.index];console.clear(),console.log(e),d(Object(u.a)({},e))}else d(vt)}),[n]);var b=function(e,t){d(Object(u.a)(Object(u.a)({},l),{},Object(Ne.a)({},e,t)))},j=function(){var e=Object(T.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),s.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(t){var r;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=5;break}r=n.index,c&&c(r,l),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(fe.jsx)("div",{children:Object(fe.jsx)(A.Dialog,{title:"Co-Authors",visible:n.isVisible,onCancel:function(){return a()},children:Object(fe.jsx)(A.Dialog.Body,{children:Object(fe.jsxs)(A.Form,{ref:s,rules:{},className:"demo-form-stacked",model:l,labelPosition:"top",labelWidth:"100",children:[Object(fe.jsxs)(A.Layout.Row,{gutter:"20",children:[Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Salutation",prop:"Salutation",children:Object(fe.jsx)(A.Input,{value:l.Salutation,onChange:function(e){return b("Salutation",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Designation",prop:"Designation",children:Object(fe.jsx)(A.Input,{value:l.Designation,onChange:function(e){return b("Designation",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Full Name",prop:"FullName",children:Object(fe.jsx)(A.Input,{value:l.FullName,onChange:function(e){return b("FullName",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Email",prop:"Email",children:Object(fe.jsx)(A.Input,{value:l.Email,onChange:function(e){return b("Email",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Institute",prop:"Institute",children:Object(fe.jsx)(A.Input,{value:l.Institute,onChange:function(e){return b("Institute",e)}})})}),Object(fe.jsxs)(A.Layout.Col,{span:"12",children:[" ",Object(fe.jsx)(A.Form.Item,{label:"Address",prop:"PostalAddress",children:Object(fe.jsx)(A.Input,{value:l.PostalAddress,onChange:function(e){return b("PostalAddress",e)}})})]}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Mobile",prop:"MobileNo",children:Object(fe.jsx)(A.Input,{value:l.MobileNo,onChange:function(e){return b("MobileNo",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12"})]}),Object(fe.jsxs)(A.Layout.Row,{children:[Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(ct,{label:"Photo",value:l.Photo,name:"Photo",onChange:b})}),Object(fe.jsxs)(A.Layout.Col,{span:"12",children:[" ",Object(fe.jsx)(ct,{label:"DigitalSignature",value:l.DigitalSignature,name:"DigitalSignature",onChange:b})]})]}),Object(fe.jsxs)(A.Form.Item,{children:[Object(fe.jsx)(A.Button,{type:"primary",onClick:j,nativeType:"submit",children:"Save"}),Object(fe.jsx)(A.Button,{onClick:function(e){s.current.resetFields(),d({})},children:"Reset"})]})]})})})})},wt=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(fe.jsxs)("span",{children:[Object(fe.jsx)(A.Button,{type:"text",size:"small",onClick:function(){return n(a,e)},children:"Edit"}),Object(fe.jsx)(A.Button,{type:"text",size:"small",onClick:function(){return r(a,e)},children:"Delete"})]})}}];return t&&t.length>0&&Object(fe.jsx)(A.Table,{columns:a,data:t,fit:!0})},yt=function(e){var t=e.onSave,n=Object(r.useRef)(),a=Object(s.b)(),c=Object(r.useState)(!1),i=Object(D.a)(c,2),o=i[0],l=i[1],d=Object(r.useState)({index:-1,isVisible:!1}),b=Object(D.a)(d,2),j=b[0],p=b[1],m=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(D.a)(m,2),h=f[0],O=f[1],x=Object(s.c)((function(e){return e.submitterReducer})).article;Object(r.useEffect)((function(){rt(x)||O(Object(u.a)(Object(u.a)({},h),{},{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:!rt(e.Photo_ServerFileName)&&{serverFileName:e.Photo_ServerFileName,name:e.Photo_UserFileName},DigitalSignature:!rt(e.DigitalSignature_ServerFileName)&&{serverFileName:e.DigitalSignature_ServerFileName,name:e.DigitalSignature_UserFileName}})}))}))}),[x]);var v=function(e,t){O(Object(u.a)(Object(u.a)({},h),{},Object(Ne.a)({},e,t)))},g=function(){var e=Object(T.a)(_.a.mark((function e(r){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.preventDefault(),n.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(n){var r,c,s;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=12;break}for(c in r=new FormData,h)"CoAuthors"!==c&&r.append("".concat(c),h[c]);return h.CoAuthors&&h.CoAuthors.forEach((function(e,t){for(var n in e)"CoAuthors"!==n&&r.append("CoAuthors[".concat(t,"].").concat(n),e[n])})),l(!0),e.next=7,a(bt(r));case 7:s=e.sent,l(!1),s&&s.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(fe.jsxs)("div",{children:[Object(fe.jsxs)(A.Form,{ref:n,rules:{},className:"demo-form-stacked",model:h,labelPosition:"top",labelWidth:"100",children:[Object(fe.jsxs)("div",{className:"author-steps__authors",children:[Object(fe.jsxs)(A.Layout.Row,{gutter:"20",children:[Object(fe.jsx)(A.Layout.Col,{span:"6",children:Object(fe.jsx)(A.Form.Item,{label:"Salutation",prop:"Salutation",children:Object(fe.jsx)(A.Input,{value:h.Salutation,onChange:function(e){return v("Salutation",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"6",children:Object(fe.jsx)(A.Form.Item,{label:"Designation",prop:"Designation",children:Object(fe.jsx)(A.Input,{value:h.Designation,onChange:function(e){return v("Designation",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"6",children:Object(fe.jsx)(A.Form.Item,{label:"Full Name",prop:"FullName",children:Object(fe.jsx)(A.Input,{value:h.FullName,onChange:function(e){return v("FullName",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"6",children:Object(fe.jsx)(A.Form.Item,{label:"Email",prop:"Email",children:Object(fe.jsx)(A.Input,{value:h.Email,onChange:function(e){return v("Email",e)}})})}),Object(fe.jsxs)(A.Layout.Col,{span:"6",children:[" ",Object(fe.jsx)(A.Form.Item,{label:"Institute",prop:"Institute",children:Object(fe.jsx)(A.Input,{value:h.Institute,onChange:function(e){return v("Institute",e)}})})]}),Object(fe.jsxs)(A.Layout.Col,{span:"6",children:[" ",Object(fe.jsx)(A.Form.Item,{label:"Address",prop:"PostalAddress",children:Object(fe.jsx)(A.Input,{value:h.PostalAddress,onChange:function(e){return v("PostalAddress",e)}})})]}),Object(fe.jsx)(A.Layout.Col,{span:"6",children:Object(fe.jsx)(A.Form.Item,{label:"Mobile",prop:"MobileNo",children:Object(fe.jsx)(A.Input,{value:h.MobileNo,onChange:function(e){return v("MobileNo",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"6"})]}),Object(fe.jsxs)(A.Layout.Row,{children:[Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(ct,{label:"Photo",value:h.Photo,name:"Photo",onChange:v})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(ct,{label:"Digital Signature",value:h.DigitalSignature,name:"DigitalSignature",onChange:v})})]})]}),Object(fe.jsxs)("div",{className:"author-steps__co-authors",children:[Object(fe.jsx)("div",{className:"author-steps__cauthors",children:Object(fe.jsx)(A.Button,{onClick:function(){return p({index:-1,isVisible:!0})},children:"Add CoAuthors"})}),Object(fe.jsx)(wt,{CoAuthors:h.CoAuthors,onDelelteClicked:function(e,t){if(e>=0){var n=Object(u.a)(Object(u.a)({},h),{},{CoAuthors:Object(C.a)(h.CoAuthors)});n.CoAuthors.splice(e,1),O(n)}},onEditClicked:function(e,t){console.clear(),console.log(e,t),p({index:e,isVisible:!0})}})]}),Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{type:"primary",onClick:g,nativeType:"submit",loading:o,children:"Save and Continue"})})]}),Object(fe.jsx)(gt,{coAuthorData:j,coAuthorList:h.CoAuthors,onSave:function(e,t){var n=Object(u.a)(Object(u.a)({},h),{},{CoAuthors:Object(C.a)(h.CoAuthors)});e>=0?n.CoAuthors[e]=Object(u.a)({},t):n.CoAuthors.push(Object(u.a)({},t)),O(n),p({index:-1,isVisible:!1})},onCancel:function(){return p({index:-1,isVisible:!1})}})]})},Ct=function(e){var t=Object(s.c)((function(e){return e.submitterReducer})).article;Object(r.useEffect)((function(){rt(t)||(j(t.ProposalTitle),h(t.ProposalIntroduction||""),g(t.PropsalMethods||""),S(t.ProposalCitedReferences||""))}),[t]);var n=e.onSave,a=Object(s.b)(),c=Object(r.useState)(!1),i=Object(D.a)(c,2),o=i[0],u=i[1],l=Object(r.useState)(""),d=Object(D.a)(l,2),b=d[0],j=d[1],p=Object(r.useState)(""),m=Object(D.a)(p,2),f=m[0],h=m[1],O=Object(r.useState)(""),x=Object(D.a)(O,2),v=x[0],g=x[1],w=Object(r.useState)(""),y=Object(D.a)(w,2),C=y[0],S=y[1],I=function(){var e=Object(T.a)(_.a.mark((function e(){var r,c;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={articleId:t.Id,steps:4,prefix:b,introduction:f,methods:v,citedReference:C},u(!0),console.clear(),console.log(r,t),e.next=6,a(pt(r));case 6:c=e.sent,u(!1),c&&c.Status&&n();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(fe.jsx)("div",{className:"user-form",children:Object(fe.jsxs)(A.Form,{className:"demo-form-stacked",labelPosition:"top",labelWidth:"100",children:[Object(fe.jsx)(A.Form.Item,{label:"Acknowledge the copyright statements",children:Object(fe.jsx)(A.Input,{type:"textarea",value:b,onChange:function(e){return j(e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Introduction",children:Object(fe.jsx)(st.CKEditor,{editor:ot.a,data:f,onChange:function(e,t){var n=t.getData();h(n)}})}),Object(fe.jsx)(A.Form.Item,{label:"Methods",children:Object(fe.jsx)(st.CKEditor,{editor:ot.a,data:v,onChange:function(e,t){var n=t.getData();g(n)}})}),Object(fe.jsx)(A.Form.Item,{label:"Cited References",children:Object(fe.jsx)(st.CKEditor,{editor:ot.a,data:C,onChange:function(e,t){var n=t.getData();S(n)}})}),Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{type:"primary",onClick:I,loading:o,children:"Save and Continue"})})]})})},St=function(e){var t=e.onConfirmation,n=Object(s.c)((function(e){return e.submitterReducer})).article,a=Object(s.b)(),c=Object(r.useState)(!1),i=Object(D.a)(c,2),o=i[0],u=i[1],l=function(){var e=Object(T.a)(_.a.mark((function e(){var r,c;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={articleId:n.Id,steps:5},u(!0),e.next=4,a(mt(r));case 4:c=e.sent,u(!1),c&&c.Status&&t();case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(fe.jsxs)("div",{children:[Object(fe.jsx)("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"'}),Object(fe.jsx)("div",{children:Object(fe.jsx)(A.Button,{type:"primary",onClick:function(){return l()},loading:o,children:"Finish Submission"})})]})},It=function(e){var t=Object(r.useState)(1),n=Object(D.a)(t,2),a=n[0],i=n[1],o=Object(r.useState)("1"),u=Object(D.a)(o,2),l=u[0],d=u[1],b=Object(s.b)(),j=(Object(k.g)(),e.match.params.articleId);Object(r.useEffect)((function(){j&&p(j)}),[j]);var p=function(){var e=Object(T.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b(lt(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(e){e>a&&i(e)},f=[{label:"1.start",name:"1",component:Object(fe.jsx)(ft,{onSave:function(){return m(2),void d("2")}})},{label:"2. Authors and CoAuthors",name:"2",component:Object(fe.jsx)(yt,{onSave:function(){return m(3),void d("3")}})},{label:"3. Upload Submission",name:"3",component:Object(fe.jsx)(xt,{onSave:function(){return m(4),void d("4")}})},{label:"4. Enter Metadata",name:"4",component:Object(fe.jsx)(Ct,{onSave:function(){return m(5),void d("5")}})},{label:"5.Confirmation",name:"5",component:Object(fe.jsx)(St,{onConfirmation:function(){Object(A.Message)({showClose:!0,message:"Congrats, submission completed.",type:"success"})}})}];return Object(fe.jsxs)(fe.Fragment,{children:[Object(fe.jsxs)(A.Breadcrumb,{separator:"/",children:[Object(fe.jsx)(A.Breadcrumb.Item,{children:Object(fe.jsx)(c.b,{to:ae.submitter,children:"Home"})}),Object(fe.jsx)(A.Breadcrumb.Item,{children:"Submission"})]}),Object(fe.jsx)("div",{className:"submission",children:Object(fe.jsx)(A.Tabs,{type:"card",value:l,onTabClick:function(e){var t=e.props.name;d(t)},children:f.map((function(e,t){return Object(fe.jsx)(A.Tabs.Pane,{label:e.label,name:e.name,disabled:!1,children:e.component},t)}))})})]})},Nt=function(e){var t=e.state,n=e.setState,r=e.onSearchClicked;return Object(fe.jsxs)("div",{className:"submission-search",children:[Object(fe.jsxs)(A.Form,{inline:!0,children:[Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Input,{style:{width:"300px"},value:t.proposalTitle,placeholder:"Proposal Ttile",onChange:function(e){return function(e,r){n(Object(u.a)(Object(u.a)({},t),{},Object(Ne.a)({},e,r)))}("proposalTitle",e)}})}),Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{type:"primary",onClick:function(){return r()},children:"Search"})})]}),Object(fe.jsx)("div",{children:Object(fe.jsx)(c.b,{to:ae.submission,className:"el-button el-button--default",children:"New Submission"})})]})};!function(e){e[e.PENDING=1]="PENDING",e[e.SUBMITTED=2]="SUBMITTED",e[e.REVERTED=3]="REVERTED",e[e.REJECTED=4]="REJECTED",e[e.ARCHIVED=5]="ARCHIVED"}(at||(at={}));var Pt,Et=at,Ft=function(e){var t=e.selectedTab,n=Object(r.useState)(!1),a=Object(D.a)(n,2),c=(a[0],a[1],Object(r.useState)({Roles:[]})),i=Object(D.a)(c,2),o=(i[0],i[1],Object(r.useState)({status:0,PageIndex:1,pageSize:20,propsalTitle:""})),l=Object(D.a)(o,2),d=l[0],b=l[1];Object(r.useEffect)((function(){var e=0;"My Queue"==t||"My Queue"==t?e=Et.PENDING:"Submitted"==t?e=Et.SUBMITTED:"Reverted"==t?e=Et.REVERTED:"Rejected"==t?e=Et.REJECTED:"Archived"==t&&(e=Et.ARCHIVED),x(Object(u.a)(Object(u.a)({},d),{},{status:e}))}),[t]);var j=Object(s.b)(),p=Object(r.useState)([]),m=Object(D.a)(p,2),f=m[0],h=m[1],O=Object(k.g)(),x=function(){var e=Object(T.a)(_.a.mark((function e(t){var n;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],e.next=3,j(ut(t));case 3:n=e.sent,h(n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=[{label:"Section",prop:"SectionName",width:120},{label:"Name",prop:"FullName",render:function(e,t,n){return Object(fe.jsxs)("span",{children:[e.InvestigatorSalutation," ",e.InvestigatorName]})}},{label:"Propsal Title",prop:"PropsalTitle",width:120},{label:"",width:160,fixed:"right",render:function(e,t,n){return Object(fe.jsxs)("span",{children:[Object(fe.jsx)(A.Button,{type:"text",size:"small",onClick:function(){return O.push("".concat(ae.submission,"/").concat(e.Id))},children:"Edit"}),Object(fe.jsx)(A.Button,{type:"text",size:"small",onClick:function(){return g(e)},children:"Delete"})]})}}],g=function(e){A.MessageBox.confirm("This will permanently delete. Continue?","Warning",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(Object(T.a)(_.a.mark((function e(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))).catch((function(){}))},w=0;return f&&f.length>0&&(w=f[0].TotalData),Object(fe.jsxs)("div",{children:[Object(fe.jsx)(Nt,{state:d,setState:b,onSearchClicked:function(){var e=Object(u.a)(Object(u.a)({},d),{},{pageIndex:1,pageSize:20});b(e),x(e)}}),Object(fe.jsx)(A.Table,{style:{width:"100%"},columns:v,data:f,border:!0}),Object(fe.jsx)(A.Pagination,{layout:"total, sizes, prev, pager, next",total:w,pageSizes:[10,20,50,100],pageSize:d.pageSize,currentPage:d.PageIndex,onSizeChange:function(e){var t=Object(u.a)(Object(u.a)({},d),{},{pageSize:e});b(t),x(t)},onCurrentChange:function(e){var t=Object(u.a)(Object(u.a)({},d),{},{pageIndex:e});b(t),x(t)}})]})},kt=function(){var e=Object(r.useState)("My Queue"),t=Object(D.a)(e,2),n=t[0],a=t[1];Object(s.b)(),Object(k.g)();return Object(fe.jsxs)("div",{children:[Object(fe.jsx)(A.Breadcrumb,{separator:"/",children:Object(fe.jsx)(A.Breadcrumb.Item,{children:Object(fe.jsx)(c.b,{to:ae.submitter,children:"Home"})})}),Object(fe.jsxs)("div",{className:"submission",children:[Object(fe.jsx)(A.Tabs,{type:"card",value:n,onTabClick:function(e){var t=e.props.name;a(t)},children:[{label:"My Queue",name:"My Queue"},{label:"Submitted",name:"Submitted"},{label:"Reverted",name:"Reverted"},{label:"Rejected",name:"Rejected"},{label:"Archived",name:"Archived"}].map((function(e,t){return Object(fe.jsx)(A.Tabs.Pane,{label:e.label,name:e.name},t)}))}),Object(fe.jsx)(Ft,{selectedTab:n})]})]})};!function(e){e.Public="Public",e.Submitter="Submitter",e.Administrator="Administrator",e.Editor="Editor",e.Reviewer="Reviewer"}(Pt||(Pt={}));var Dt=Pt,At=[{exact:!0,component:kt,role:Dt.Submitter,title:"Dashboard",path:ae.submitter},{exact:!0,component:It,role:Dt.Submitter,title:"Submission",path:ae.submission},{exact:!0,component:It,role:Dt.Submitter,title:"Submission",path:"".concat(ae.submission,"/:articleId")}],Rt=n(169),Tt=n.n(Rt),Lt=function(e){e.user;var t=Object(r.useRef)(),n=Object(s.b)(),a=Object(k.g)(),c=Tt.a.parse(e.location.search),i=Object(r.useState)({Email:"",Password:"",ConfirmPassword:"",isLoading:!1,Code:c.code}),o=Object(D.a)(i,2),l=o[0],d=o[1],b={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()}}]},j=function(e,t){return d(Object(u.a)(Object(u.a)({},l),{},Object(Ne.a)({},e,t)))};return Object(fe.jsx)("div",{className:"container",children:Object(fe.jsx)("div",{className:"sign-up-form",children:Object(fe.jsx)(A.Form,{ref:t,rules:b,className:"demo-form-stacked",model:l,labelPosition:"top",labelWidth:"100",children:Object(fe.jsxs)(A.Layout.Row,{gutter:"20",children:[Object(fe.jsx)(A.Form.Item,{label:"Email",prop:"Email",children:Object(fe.jsx)(A.Input,{value:l.Email,onChange:function(e){return j("Email",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Password",prop:"Password",children:Object(fe.jsx)(A.Input,{type:"password",value:l.Password,onChange:function(e){return j("Password",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Confirm Password",prop:"ConfirmPassword",children:Object(fe.jsx)(A.Input,{type:"password",value:l.ConfirmPassword,onChange:function(e){return j("ConfirmPassword",e)}})}),Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{type:"primary",onClick:function(){t.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(t){var r,c,s,i,o;return _.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,s=l.Password,i=l.ConfirmPassword,e.next=5,n(me({Email:r,Code:c,Password:s,ConfirmPassword:i}));case 5:o=e.sent,d(Object(u.a)(Object(u.a)({},l),{},{isLoading:!1})),o&&a.push(ae.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"})})]})})})})},_t=function(e){var t=Object(r.useRef)(),n=Object(s.b)(),a=Object(r.useState)({email:"",isLoading:!1,isSuccessSubmitting:!1}),i=Object(D.a)(a,2),o=i[0],l=i[1],d=function(){var e=Object(T.a)(_.a.mark((function e(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(t){var r,a;return _.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(pe({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(fe.jsx)("div",{className:"pr-container",children:o.isSuccessSubmitting?Object(fe.jsxs)("div",{className:"reset-success",children:[Object(fe.jsx)("h2",{children:"Reset Password"}),Object(fe.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(fe.jsx)(c.b,{to:ae.login,className:"el-button el-button--primary",children:"Return to sign in"})]}):Object(fe.jsx)("div",{className:"reset-form",children:Object(fe.jsxs)(A.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(fe.jsx)(A.Form.Item,{label:"Enter your user account's verified email address and we will send you a password reset link.",prop:"email",children:Object(fe.jsx)(A.Input,{placeholder:"Enter your email address",value:o.email,onChange:function(e){return l(Object(u.a)(Object(u.a)({},o),{},{email:e}))}})}),Object(fe.jsx)("div",{className:"irc-form-footer",children:Object(fe.jsx)(A.Button,{type:"primary",onClick:d,loading:o.isLoading,children:"Submit"})})]})})})},Mt={Roles:[],Email:"",FullName:"",MobileNumber:"",Country:"",Affiliation:"",Password:"",ConfirmPassword:""},Ut=function(e){var t=Object(r.useState)(Mt),n=Object(D.a)(t,2),a=n[0],c=n[1],i=Object(r.useState)(!1),o=Object(D.a)(i,2),l=o[0],d=o[1],b=Object(s.c)((function(e){return e.commonReducer})),j=(b.roles,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&&j.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()}}]},m=Object(s.b)(),f=Object(k.g)(),h=function(e,t){"IsInactive"===e&&(t=!t),c(Object(u.a)(Object(u.a)({},a),{},Object(Ne.a)({},e,t)))},O=function(){var e=Object(T.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),j.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(t){var n,r;return _.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,m(je(n));case 5:r=e.sent,d(!1),r&&f.push(ae.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(fe.jsx)("div",{className:"container",children:Object(fe.jsx)("div",{className:"sign-up-form",children:Object(fe.jsx)(A.Form,{ref:j,rules:p,className:"demo-form-stacked",model:a,labelPosition:"top",labelWidth:"100",children:Object(fe.jsxs)(A.Layout.Row,{gutter:"20",children:[Object(fe.jsx)(A.Form.Item,{label:"Full Name",prop:"FullName",children:Object(fe.jsx)(A.Input,{value:a.FullName,onChange:function(e){return h("FullName",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Email",prop:"Email",children:Object(fe.jsx)(A.Input,{value:a.Email,onChange:function(e){return h("Email",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Mobile",prop:"MobileNumber",children:Object(fe.jsx)(A.Input,{value:a.MobileNumber,onChange:function(e){return h("MobileNumber",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Country",prop:"Country",children:Object(fe.jsx)(A.Input,{value:a.Country,onChange:function(e){return h("Country",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Affiliation",prop:"Affiliation",children:Object(fe.jsx)(A.Input,{value:a.Affiliation,onChange:function(e){return h("Affiliation",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Password",prop:"Password",children:Object(fe.jsx)(A.Input,{type:"password",value:a.Password,onChange:function(e){return h("Password",e)}})}),Object(fe.jsx)(A.Form.Item,{label:"Confirm Password",prop:"ConfirmPassword",children:Object(fe.jsx)(A.Input,{type:"password",value:a.ConfirmPassword,onChange:function(e){return h("ConfirmPassword",e)}})}),Object(fe.jsxs)(A.Form.Item,{children:[Object(fe.jsx)(A.Button,{type:"primary",onClick:O,nativeType:"submit",loading:l,children:"Sign up"}),Object(fe.jsx)(A.Button,{onClick:function(e){j.current.resetFields(),c(Mt)},children:"Reset"})]})]})})})})},Bt=[{exact:!0,component:Lt,role:Dt.Public,title:"Reset Password",path:ae.forgotPassword},{exact:!0,component:_t,role:Dt.Public,title:"Reset Password",path:ae.resetPassword},{exact:!0,component:Ut,role:Dt.Public,title:"Sign up",path:ae.signup}],zt=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(Ne.a)({},e,r)))};return Object(fe.jsxs)("div",{className:"user-search",children:[Object(fe.jsxs)(A.Form,{inline:!0,children:[Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Input,{style:{width:"300px"},value:t.userName,placeholder:"User name",onChange:function(e){return c("userName",e)}})}),Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsxs)(A.Select,{value:t.isActive,placeholder:"IsActive",onChange:function(e){return c("IsActive",e)},children:[Object(fe.jsx)(A.Select.Option,{label:"Active",value:"true"}),Object(fe.jsx)(A.Select.Option,{label:"Inactive",value:"false"})]})}),Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{type:"primary",onClick:function(){return r()},children:"Search"})})]}),Object(fe.jsx)("div",{children:Object(fe.jsx)(A.Button,{onClick:function(){return a({})},children:"Add User"})})]})},Gt=function(){return function(){var e=Object(T.a)(_.a.mark((function e(t){var n;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X(B.roles,t);case 2:n=e.sent,t({type:m,payload:n.Data});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},Vt=function(e){var t=e.state,n=e.setState,a=e.onSaveSuccess,c=Object(r.useState)(!1),i=Object(D.a)(c,2),o=i[0],l=i[1],d=Object(s.c)((function(e){return e.commonReducer})),b=d.roles,j=Object(r.useRef)(),p=Object(s.b)();Object(k.g)();Object(r.useEffect)((function(){m()}),[]);var m=function(){var e=Object(T.a)(_.a.mark((function e(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(Gt());case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),f=function(e,r){"IsInactive"===e&&(r=!r),n(Object(u.a)(Object(u.a)({},t),{},Object(Ne.a)({},e,r)))},h=function(){var e=Object(T.a)(_.a.mark((function e(n){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.preventDefault(),j.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(n){var r,c;return _.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,p(oe(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(fe.jsx)("div",{className:"container",children:Object(fe.jsx)("div",{className:"user-form",children:Object(fe.jsxs)(A.Form,{ref:j,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(fe.jsxs)(A.Layout.Row,{gutter:"20",children:[Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Full Name",prop:"FullName",children:Object(fe.jsx)(A.Input,{value:t.FullName,onChange:function(e){return f("FullName",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Email",prop:"Email",children:Object(fe.jsx)(A.Input,{value:t.Email,onChange:function(e){return f("Email",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Mobile",prop:"MobileNumber",children:Object(fe.jsx)(A.Input,{value:t.MobileNumber,onChange:function(e){return f("MobileNumber",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Country",prop:"Country",children:Object(fe.jsx)(A.Input,{value:t.Country,onChange:function(e){return f("Country",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Affiliation",prop:"Affiliation",children:Object(fe.jsx)(A.Input,{value:t.Affiliation,onChange:function(e){return f("Affiliation",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Role",prop:"Roles",children:Object(fe.jsx)(A.Select,{multiple:!0,value:t.Roles,placeholder:"Role",onChange:function(e){return f("Roles",e)},children:b&&b.map((function(e,t){return Object(fe.jsx)(A.Select.Option,{label:e.Name,value:e.Name},t)}))})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsx)(A.Form.Item,{label:"Is Active",children:Object(fe.jsx)(A.Switch,{onText:"",offText:"",value:!t.IsInactive,onChange:function(e){return f("IsInactive",e)}})})}),Object(fe.jsx)(A.Layout.Col,{span:"12",children:!t.Id&&Object(fe.jsx)(A.Form.Item,{label:"Password",children:Object(fe.jsx)(A.Input,{type:"password",value:t.Password,onChange:function(e){return f("Password",e)}})})})]}),Object(fe.jsx)(A.Layout.Row,{children:Object(fe.jsx)(A.Layout.Col,{span:"12",children:Object(fe.jsxs)(A.Form.Item,{children:[Object(fe.jsx)(A.Button,{type:"primary",onClick:h,nativeType:"submit",loading:o,children:"Save"}),Object(fe.jsx)(A.Button,{onClick:function(e){j.current.resetFields(),n({})},children:"Reset"})]})})})]})})})},qt=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(D.a)(c,2),o=i[0],l=i[1],d=function(){var e=Object(T.a)(_.a.mark((function e(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.current.validate(function(){var e=Object(T.a)(_.a.mark((function e(n){var r;return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=5;break}return e.next=3,a(de({userName:t.UserName,newPassword:o.newPassword}));case 3:(r=e.sent)&&r.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(){n.current.resetFields(),l({newPassword:"",isLoading:!1,isVisible:!1})};return Object(fe.jsxs)(fe.Fragment,{children:[Object(fe.jsx)(A.Button,{type:"text",size:"small",onClick:function(){return l(Object(u.a)(Object(u.a)({},o),{},{isVisible:!0}))},children:"Change Password"}),Object(fe.jsx)(A.Dialog,{title:"Change Password",visible:o.isVisible,onCancel:function(){return b()},style:{width:"350px"},children:Object(fe.jsx)(A.Dialog.Body,{children:Object(fe.jsxs)(A.Form,{ref:n,rules:{newPassword:[{required:!0,message:"New password is required",trigger:"blur"}]},children:[Object(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.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(fe.jsx)(A.Form.Item,{children:Object(fe.jsx)(A.Button,{onClick:function(){return d()},loading:o.isLoading,children:"Change Password"})})]})})})]})},Ht=function(e){var t=e.isVisible,n=e.setVisible;return Object(fe.jsx)(A.Dialog,{title:"Add User",visible:t,onCancel:function(){return n(!1)},children:Object(fe.jsx)(A.Dialog.Body,{children:Object(fe.jsx)(Vt,Object(u.a)({},e))})})},Wt=function(){var e=Object(r.useState)(!1),t=Object(D.a)(e,2),n=t[0],a=t[1],c=Object(r.useState)({Roles:[]}),i=Object(D.a)(c,2),o=i[0],l=i[1],d=Object(r.useState)({userName:"",pageIndex:1,pageSize:20,isActive:"true"}),b=Object(D.a)(d,2),j=b[0],p=b[1];Object(r.useEffect)((function(){O(j)}),[]);var m=Object(s.b)(),f=(Object(k.g)(),Object(s.c)((function(e){return e.userReducer}))),h=f.userList;Object(r.useEffect)((function(){}),[h]);var O=function(){var e=Object(T.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(ie(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(e){l(e),a(!0)},v=[{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(fe.jsx)(qt,{user:e},n)}},{label:"",width:100,fixed:"right",render:function(e,t,n){return Object(fe.jsx)("span",{children:Object(fe.jsx)(A.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(fe.jsxs)("span",{children:[Object(fe.jsx)(A.Button,{type:"text",size:"small",onClick:function(){return x(e)},children:"Edit"}),Object(fe.jsx)(A.Button,{type:"text",size:"small",onClick:function(){return g(e)},children:"Delete"})]})}}],g=function(e){A.MessageBox.confirm("This will permanently delete the user. Continue?","Warning",{confirmButtonText:"OK",cancelButtonText:"Cancel",type:"warning"}).then(Object(T.a)(_.a.mark((function t(){return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m(ue(e.Id));case 2:O(j);case 3:case"end":return t.stop()}}),t)})))).catch((function(){}))},w=function(){var e=Object(T.a)(_.a.mark((function e(t){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(le({userId:t.Id,isInactive:!t.IsInactive}));case 2:O(j);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=0;return h&&h.length>0&&(y=h[0].TotalData),Object(fe.jsxs)("div",{className:"user",children:[Object(fe.jsx)(zt,{state:j,setState:p,onSearchClicked:function(){var e=Object(u.a)(Object(u.a)({},j),{},{pageIndex:1,pageSize:20});p(e),O(e)},onAddUserClicked:x}),Object(fe.jsx)(A.Table,{style:{width:"100%"},columns:v,data:h,border:!0}),Object(fe.jsx)(A.Pagination,{layout:"total, sizes, prev, pager, next",total:y,pageSizes:[10,20,50,100],pageSize:j.pageSize,currentPage:j.pageIndex,onSizeChange:function(e){var t=Object(u.a)(Object(u.a)({},j),{},{pageSize:e});p(t),O(t)},onCurrentChange:function(e){var t=Object(u.a)(Object(u.a)({},j),{},{pageIndex:e});p(t),O(t)}}),Object(fe.jsx)(Ht,{state:o,setState:l,isVisible:n,setVisible:a,onSaveSuccess:function(){a(!1),O(j)}}),Object(fe.jsx)(qt,{})]})},Kt=[{exact:!0,component:Wt,role:Dt.Administrator,title:"User",path:ae.user}],Jt=[].concat(Object(C.a)(Bt),Object(C.a)(At),Object(C.a)(Kt)),Qt=function(e){return Object(fe.jsx)("div",{children:"Not Found"})},$t=n(82),Xt=["component"],Yt=function(e){var t=e.component,n=Object($t.a)(e,Xt),r=localStorage.getItem("AuthToken"),a=localStorage.getItem("Role");return Object(fe.jsx)(k.b,Object(u.a)(Object(u.a)({},n),{},{render:function(e){return n.role===Dt.Public||r&&n.role===a?Object(fe.jsx)(t,Object(u.a)({},e)):Object(fe.jsx)(k.a,{to:"/login"})}}))},Zt=["component"],en=function(e){e.component;var t=Object($t.a)(e,Zt),n=localStorage.getItem("Role");return Object(fe.jsx)(k.b,Object(u.a)(Object(u.a)({},t),{},{render:function(e){return n===Dt.Submitter?Object(fe.jsx)(k.a,{to:ae.submitter}):n===Dt.Administrator?Object(fe.jsx)(k.a,{to:ae.user}):Object(fe.jsx)(k.a,{to:"/login"})}}))},tn=function(e){var t=Object(s.c)((function(e){return e.userReducer.loggedInUserDetail})),n=(t.Email,t.FullName,t.UserName,t.RoleName,Object(s.b)());return Object(r.useEffect)((function(){n(Gt())}),[]),Object(fe.jsx)(xe,{children:Object(fe.jsxs)(k.d,{children:[Jt.map((function(e,t){return Object(fe.jsx)(Yt,Object(u.a)({},e),t)})),Object(fe.jsx)(k.b,{path:"/login",component:Pe}),Object(fe.jsx)(en,{exact:!0,path:"/",component:Qt}),Object(fe.jsx)(k.b,{path:"*",component:Qt})]})})},nn=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(A.Notification)({message:e,type:r,duration:a,offset:50}),setTimeout((function(){n(W())}),a)}));else{var e=c(t.type);"success "!==e&&"warning"!==e&&"info"!==e&&"error"!==e&&(e="info"),Object(A.Notification)({message:t.message,type:e,duration:a,offset:50}),setTimeout((function(){n(W())}),a)}}),[t]),Object(fe.jsx)(fe.Fragment,{})},rn=n(170),an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!0,n=[o.a];return t?Object(i.d)(F,e,i.a.apply(void 0,n)):Object(i.d)(F,e,Object(i.c)(i.a.apply(void 0,n)))}({});A.i18n.use(rn.a);var cn=function(){return Object(fe.jsx)(s.a,{store:an,children:Object(fe.jsxs)("div",{className:"app",children:[Object(fe.jsx)(tn,{}),Object(fe.jsx)(nn,{})]})})},sn=document.getElementsByTagName("base")[0].getAttribute("href");a.render(Object(fe.jsx)(c.a,{basename:sn,children:Object(fe.jsx)(cn,{})}),document.getElementById("root"))}},[[465,1,2]]]); //# sourceMappingURL=main.73d2e149.chunk.js.map
Save