{"version":3,"sources":["assets/images/CRS_Logo.svg","components/CrsBodyDrawer.js","redux/actions/modalDialog.js","generalConfiguration.js","components/CrsPdfPanel.js","utils/ApiCalls.js","utils/geoLocation.js","components/CrsSignaturePanel.js","components/CrsSignatureDrawer.js","components/CrsMainGrid.js","components/CrsModalDialog.js","components/CrsGetSignerDocument.js","components/CrsGetSecurityQuestions.js","components/CrsQuestionItem.js","components/CrsQuestionList.js","components/CrsSecurityQuestions.js","components/CrsSendSecurityToken.js","components/CrsVerifySecurityToken.js","components/CrsAuthentication.js","components/CrsAcknowledgement.js","components/CrsRejectNotice.js","components/CrsDocumentPreviouslySubmitted.js","components/CrsDocumentSignatureRejected.js","components/CrsDocumentCanceled.js","components/CrsDocumentExpired.js","components/CrsBody.js","components/CrsInvalidUrl.js","components/CrsAppBar.js","components/CrsMainPage.js","App.jsx","registerServiceWorker.js","redux/reducers/modalDialog.js","redux/reducers/index.js","redux/store.js","index.jsx","components/CrsSignaturePanel.module.scss","components/CrsMainPage.module.scss"],"names":["module","exports","theme","createMuiTheme","CrsBodyDrawer","props","drawerWidth","show","toolbarStyle","classes","makeStyles","drawer","display","overflowX","width","flexShrink","whiteSpace","drawerOpen","transition","transitions","create","easing","sharp","duration","enteringScreen","drawerClose","leavingScreen","spacing","breakpoints","up","toolbar","useStyles","useState","open","setOpen","handleDrawerClose","Drawer","color","variant","className","clsx","paper","IconButton","onClick","direction","List","tag","Link","to","ListItem","button","key","ListItemIcon","drawerIcon","style","fontSize","ListItemText","drawerContent","primary","showModalDialog","modalDialogInput","type","payload","apiUrl","twoFactorUrl","Urls","Main","Api","CurrentDate","GetDocument","Telemetry","GetQuestions","VerifyAnswer","SendToken","VerifyToken","TermsAndConditions","GenericErrorDialog","title","content","acceptButtonLabel","SubmitConfirmationDialog","rejectButtonLabel","source","RejectConfirmationDialog","SubmitSuccessDialog","RejectionSuccessDialog","InvalidUrlNotice","SecurityQuestions","SecurityQuestionWrongAnswer","SecurityToken","VerificationTokenWrongAnswer","PreviouslySubmitted","SignatureRejected","Canceled","Expired","AnnotationType","CrsPdfPanel","viewer","useRef","dispatch","useDispatch","initializationDone","setInitializationDone","annotations","setAnnotations","React","annotationsManager","setAnnotationsManager","documentViewer","setDocumentViewer","handleOnUserScrollPdf","onUserScrollPdf","onLoadPdfData","iframe","$","contents","documentContainer","document","scroll","scrollTop","Math","round","scrollHeight","clientHeight","console","error","findAnnotations","annotationType","signer","undefined","annotationsFound","filter","annot","annotationFound","data","fieldName","JSON","parse","e","Type","configurePdfTools","css","click","base64ToBlob","base64","Promise","resolve","reject","binaryString","window","atob","len","length","bytes","Uint8Array","i","charCodeAt","Blob","applySignatureAnnotation","signerNumber","signature","getAnnotationsLoadedPromise","then","currentAnnotations","getAnnotationsList","signatureAnnotations","forEach","signatureAnnotation","deleteAnnotation","shift","calculateAnnotationShift","ImageData","createStampAnnotation","X","Y","applyInitialsAnnotation","initials","initialsAnnotations","initialsAnnotation","applyDateAnnotation","dateTime","initialPdfAnnotations","dateAnnotations","dateAnnotation","annotationData","currentAnnotation","height","xShift","yShift","imageData","stampAnnot","StampAnnotation","PageNumber","Width","Height","Author","getCurrentUser","addAnnotation","redrawAnnotation","useEffect","signerDocument","WebViewer","path","disableLogs","disabledElements","licenseKey","current","instance","a","Annotations","annotManager","docViewer","documentImage","pdfBlob","loadDocument","extension","catch","err","on","initialTempPdfAnnotations","pdfData","includesInitials","signatureData","setReadOnly","applySignatureData","exportAnnotations","widgets","links","fields","getDocument","getFileData","xfdfString","arr","blob","reader","FileReader","addEventListener","rawPdfBase64","result","startPos","indexOf","pdfBase64","slice","readAsDataURL","getSignedPdfAsBase64","onCreateSignedPdf","id","ref","sendSignedDocument","documentId","getDocumentUrl","axios","put","headers","Accept","response","status","getGeolocation","navigator","geolocation","getCurrentPosition","position","geoLocation","latitude","coords","longitude","location","root","flexGrow","overflowY","fr","float","emptyImage","CrsSignaturePanel","isCanvasForSignatureFilled","setIsCanvasForSignatureFilled","isCanvasForInitialsFilled","setIsCanvasForInitialsFilled","isActionButtonSubmit","setIsActionButtonSubmit","isSending","setIsSending","isPdfSubmitted","setIsPdfSubmitted","signerName","setSignerName","signerInitials","setSignerInitials","signatureWidth","setSignatureWidth","Date","sessionStart","resizeHandled","setResizeHandled","canvasForSignature","canvasForInitials","modalDialogState","useSelector","state","modalDialog","shallowEqual","require","load","google","families","handleResizeCanvas","event","signatureWidthTemp","handleClearSignedPdf","signedPdf","onClearSignedPdf","isEmpty","onApplySignature","getImageBase64FromText","inputText","canvasWidth","canvasHeigth","font","x","y","canvas","createElement","ctx","getContext","fillText","img","src","toDataURL","getCurrentDateTimeAsString","get","currentDateTime","formatDateTime","dateTimeString","Intl","DateTimeFormat","year","month","day","hour","minute","second","hour12","format","calculateSessionDuration","handleSendTelemetry","allSettled","telemetryDataSources","geoLocationData","sessionDuration","info","value","telemetryData","post","sendTelemetry","signatureRequestId","requestSignerId","uniqueId","modalDialogOutput","isAccepted","SignerRejected","styles","Grid","container","item","xs","Button","signerNameImg","clear","fromDataURL","signerInitialsImg","disabled","pdfContainsInitials","TextField","label","fullWidth","align","onChange","tempSignerName","currentTarget","isDocumentRead","inputProps","maxLength","InputProps","endAdornment","InputAdornment","tempSignerInitials","signatureHeight","clearOnResize","penColor","canvasProps","border","onEnd","initialsWidth","initialsHeight","setCloseDrawer","log","Backdrop","backdrop","CircularProgress","margin","extendedIcon","marginRight","list","fullList","fab","bottom","right","CrsSignatureDrawer","isDrawerOpen","setIsDrawerOpen","handleSetOpenDrawer","isOpen","Fab","aria-label","icon","faSignature","anchor","onClose","CrsMainGrid","isXLarge","useMediaQuery","mainGrid","home","zIndex","center_content","justifyContent","line_break","CrsModalDialog","setTitle","setContent","setAcceptButtonLabel","setRejectButtonLabel","setSource","warn","handleClickButton","accepted","dataset","closeModalDialog","Dialog","aria-labelledby","aria-describedby","disableBackdropClick","disableEscapeKeyDown","DialogTitle","DialogContent","DialogContentText","DialogActions","data-accepted","CrsGetSignerDocument","isGetDocumentCalled","setIsGetDocumentCalled","execute","parsedResponse","onGetSignerDocument","CrsGetSecurityQuestions","personId","signerType","getQuestionstUrl","getQuestions","questions","onGetQuestions","CrsQuestionItem","FormControlLabel","control","Radio","radioLabel","radioValue","selectedValue","textLabel","onChangeText","placeholder","CrsQuestionList","Object","prototype","toString","call","map","question","questionId","questionText","htmlType","htmlPlaceholder","CrsSecurityQuestions","setQuestionId","answer","setAnswer","component","Typography","FormControl","FormLabel","questionsLabel","RadioGroup","name","target","verifyAnswerUrl","twoFactorAnswer","verifyAnswer","parseInt","verificationResponse","onSecurityQuestionValidated","authenticated","buttonLabel","CrsSendSecurityToken","isTokenSent","setIsTokenSent","sendTokenResponse","onTokenSent","success","CrsVerifySecurityToken","securityToken","setSecurityToken","securityTokenComment","inputTextLabel","required","token","verifyTokenUrl","verifyToken","onSecurityTokenValidated","verifyButtonLabel","CrsAuthentication","setQuestions","isSecurityQuestionPassed","setIsSecurityQuestionPassed","isSecurityTokenPassed","setIsSecurityTokenPassed","passed","onUserAuthenticated","ackcontent","textAlign","textJustify","CrsAcknowledgement","Card","CardHeader","CardContent","CardActions","onAccept","onReject","CrsRejectNotice","closeButtonLabel","CrsDocumentPreviouslySubmitted","CrsDocumentSignatureRejected","CrsDocumentCanceled","CrsDocumentExpired","CrsBody","alignItems","padding","mixins","marginLeft","showAcknowledgement","setShowAcknowledgement","isAckAccepted","setAckAccepted","isAckRejected","setAckRejected","setSignerDocument","setIsDocumentRead","setPdfContainsInitials","setSignatureData","setSignedPdf","isUserAuthenticated","setIsUserAuthenticated","showRejectNotice","gettedSignerDocument","requires2fa","signatureComplete","requestStatus","CrsInvalidUrl","CrsAppBar","appBar","appBarShift","menuButton","hide","AppBar","ThemeProvider","Toolbar","edge","noWrap","crslogo","alt","CrsMainPage","baseUrl","getElementsByTagName","getAttribute","CssBaseline","basename","exact","render","match","params","palette","main","text","secondary","light","contrastThreshold","tonalOffset","App","Component","displayName","isLocalhost","Boolean","hostname","registerValidSW","swUrl","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","controller","initialState","modalDialogReducer","action","assign","allReducers","combineReducers","store","createStore","__REDUX_DEVTOOLS_EXTENSION__","rootElement","getElementById","ReactDOM","URL","process","origin","fetch","ready","unregister","reload","checkValidServiceWorker","registerServiceWorker"],"mappings":"yJAAAA,EAAOC,QAAU,IAA0B,sC,iYCiBrCC,EAAQC,YAAe,IAuFdC,EApFO,SAACC,GACnB,IAwCU,IAxCJC,EAAcD,EAAMC,YACpBC,EAAOF,EAAME,KACbC,EAAeH,EAAMG,aA8BrBC,EA7BYC,aAAW,SAACR,GAAD,MAAY,CACrCS,OAAQ,CACJC,QAAS,OACTC,UAAW,SACXC,MAAOR,EACPS,WAAY,EACZC,WAAY,UAEhBC,WAAY,CACRH,MAAOR,EACPY,WAAYhB,EAAMiB,YAAYC,OAAO,QAAS,CAC1CC,OAAQnB,EAAMiB,YAAYE,OAAOC,MACjCC,SAAUrB,EAAMiB,YAAYI,SAASC,kBAG7CC,YAAY,aACRZ,UAAW,SACXK,WAAYhB,EAAMiB,YAAYC,OAAO,QAAS,CAC1CC,OAAQnB,EAAMiB,YAAYE,OAAOC,MACjCC,SAAUrB,EAAMiB,YAAYI,SAASG,gBAEzCZ,MAAOZ,EAAMyB,QAAQ,GAAK,GACzBzB,EAAM0B,YAAYC,GAAG,MAAQ,CAC1Bf,MAAOZ,EAAMyB,QAAQ,GAAK,IAGlCG,QAAStB,KAGGuB,GAjCa,EAmCLC,oBAAS,GAnCJ,mBAmCtBC,EAnCsB,KAmChBC,EAnCgB,KAqCvBC,EAAoB,WACtBD,GAAQ,IAGZ,OAAI3B,EAEI,kBAAC6B,EAAA,EAAD,CAAQC,MAAM,YACVC,QAAQ,YAERC,UAAWC,YAAK/B,EAAQE,QAAT,mBACVF,EAAQQ,WAAagB,GADX,cAEVxB,EAAQgB,aAAeQ,GAFb,IAIfxB,QAAS,CACLgC,MAAOD,aAAI,mBACN/B,EAAQQ,WAAagB,GADf,cAENxB,EAAQg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W,EAAK,UAAMsB,GAAN,sBAEP1B,GAwCV,SAAkCI,GAEhCwB,MAAMxB,GACHzb,MAAK,SAAA6F,GAGkB,MAApBA,EAASC,SACuD,IAAhED,EAASF,QAAQ4E,IAAI,gBAAgBzF,QAAQ,cAG7CkB,UAAU0V,cAAcwB,MAAMld,MAAK,SAAA4b,GACjCA,EAAauB,aAAand,MAAK,WAC7Bb,OAAOqH,SAAS4W,eAKpB5B,GAAgBC,MAGnBnY,OAAM,WACL5F,QAAQ+Q,IACN,oEA5DA4O,CAAwB5B,GAGxBD,GAAgBC,OIvBxB6B,I,mBCfAxnB,EAAOC,QAAU,CAAC,kBAAoB,6CAA6C,gBAAkB,2CAA2C,wBAAwB,iDAAiD,yBAAyB,kDAAkD,mBAAqB,gD,kBCAzTD,EAAOC,QAAU,CAAC,KAAO,0BAA0B,QAAU,6BAA6B,MAAQ,2BAA2B,KAAO,0BAA0B,aAAa,gCAAgC,gBAAgB,mCAAmC,UAAU,6BAA6B,OAAS,+B","file":"static/js/main.50b57dd2.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/CRS_Logo.5edc4411.svg\";","import React, { useState } from 'react';\r\nimport { makeStyles, createMuiTheme } from '@material-ui/core/styles';\r\nimport Drawer from '@material-ui/core/Drawer';\r\nimport List from '@material-ui/core/List';\r\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\r\nimport ChevronRightIcon from '@material-ui/icons/ChevronRight';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\r\nimport ListItemText from '@material-ui/core/ListItemText';\r\nimport HomeIcon from '@material-ui/icons/Home';\r\nimport BorderColorIcon from '@material-ui/icons/BorderColor';\r\nimport clsx from 'clsx';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport {\r\n Link\r\n} from \"react-router-dom\";\r\n\r\nconst theme = createMuiTheme({\r\n});\r\n\r\nconst CrsBodyDrawer = (props) => {\r\n const drawerWidth = props.drawerWidth;\r\n const show = props.show;\r\n const toolbarStyle = props.toolbarStyle;\r\n const useStyles = makeStyles((theme) => ({\r\n drawer: {\r\n display: 'none',\r\n overflowX: 'hidden',\r\n width: drawerWidth,\r\n flexShrink: 0,\r\n whiteSpace: 'nowrap',\r\n },\r\n drawerOpen: {\r\n width: drawerWidth,\r\n transition: theme.transitions.create('width', {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.enteringScreen,\r\n }),\r\n },\r\n drawerClose: {\r\n overflowX: 'hidden',\r\n transition: theme.transitions.create('width', {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.leavingScreen,\r\n }),\r\n width: theme.spacing(7) + 1,\r\n [theme.breakpoints.up('sm')]: {\r\n width: theme.spacing(9) + 1,\r\n },\r\n },\r\n toolbar: toolbarStyle //Taken from caller\r\n }));\r\n\r\n const classes = useStyles();\r\n\r\n const [open, setOpen] = useState(false);\r\n\r\n const handleDrawerClose = () => {\r\n setOpen(false);\r\n };\r\n\r\n if (show) {\r\n return (\r\n \r\n
\r\n \r\n {theme.direction === 'rtl' ? : }\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n\r\n};\r\n\r\nexport default CrsBodyDrawer;","export const showModalDialog = (modalDialogInput) => {\r\n return {\r\n type: 'MODAL_DIALOG_SHOW',\r\n payload: modalDialogInput\r\n };\r\n}\r\n\r\nexport const closeModalDialog = (modalDialogOutput) => {\r\n return {\r\n type: 'MODAL_DIALOG_CLOSED',\r\n payload: modalDialogOutput\r\n };\r\n}","const mainUrl = \"\";\r\nconst apiUrl = `${mainUrl}/api`;\r\nconst twoFactorUrl = `${apiUrl}/TwoFactor`;\r\n\r\nconst Urls = {\r\n Main: mainUrl,\r\n Api: apiUrl,\r\n CurrentDate: `${apiUrl}/CurrentDateTime`,\r\n GetDocument: `${apiUrl}/Document`,\r\n Telemetry: `${apiUrl}/Telemetry`,\r\n GetQuestions: `${twoFactorUrl}/GetQuestions`,\r\n VerifyAnswer: `${twoFactorUrl}/Verify`,\r\n SendToken: `${twoFactorUrl}/SendToken`,\r\n VerifyToken: `${twoFactorUrl}/VerifyToken`\r\n};\r\n\r\nconst TermsAndConditions = {\r\n title: `Terms and Conditions`,\r\n content:\r\n `AerosExpress™ Terms of Use\r\nThroughout this document, “you” and “your” refer to the named insured shown on the accepted application for insurance and “CRS” refers to Crop Risk Services, Inc., Agrinational Insurance Company, Inc., and their subsidiaries and affiliates.\r\n\r\nBy using AerosExpress™ you agree to the following terms and conditions. These terms and conditions of usage (“Terms of Use”) apply to AerosExpress™ and all associated, applications, software, and sites accessible from and or connected to www.croprisksesrvices.com by Crop Risk Services. (“CRS”). AerosExpress™ is the property of Crop Risk Services.\r\n\r\nAccounts, Passwords, Security\r\nAerosExpress™ and associated sites may require you to create a user account. You are solely and entirely responsible for maintaining the confidentiality of your account, including your password, and for any and all activity that occurs under your account, including activity that is a result of your failure to keep the account information secure and confidential. You agree to notify CRS immediately of any unauthorized use of your account, or any other breach of data security. You may not use anyone else’s AerosExpress™ login credentials, password or account at any time without the express written permission and consent of the holder of that password or account. CRS cannot and will not be liable for any damage or loss arising from your failure to comply with these obligations.\r\n\r\nAuthorized User\r\nBy creating an account and using AerosExpress™ you certify you are the person authorized to view, download, edit, and submit data change requests and certifications for the data presented to you. This includes but is not limited to your insurance policy data, tax information, and policyholder information. You agree to notify CRS immediately if any unauthorized data is presented or if you are no longer authorized to view, download, edit, or submit data change requests and certifications for any portion of the data presented to you. You may not attempt to gain unauthorized access to any portion of AerosExpress™ or any of the services or sites connected to it. You may not impersonate, or represent any individual or entity other than those you are explicitly authorized to.\r\n\r\nCertification\r\nIf you use AerosExpress™ to submit data or provide certain information under the Federal crop insurance program, you acknowledge and agree to the following Certification Statement:\r\n\r\nI certify that to the best of my knowledge and belief all of the information on this form is correct. I also understand that failure to report completely and accurately may result in sanctions under my policy, including but not limited to voidance of the policy, and in criminal or civil penalties (18 U.S.C. §1006 and §1014; 7 U.S.C. §1506; 31 U.S.C. §3729, §3730 and any other applicable federal statutes).\r\nContent\r\nAerosExpress™, all text, graphics, trademarks, logos, artwork, user interfaces, visual interfaces, and computer code are the sole property of CRS and are controlled or licensed by CRS and are protected by copyright, patent, trademark, and intellectual property rights. You agree you will not attempt to reverse engineer, probe, scan, or test vulnerability of AerosExpress™ and the sites connected to it. You agree to not utilize any device, software, or routine that will interfere or attempt to disrupt the proper functionality of AerosExpress™ and its connected sites.\r\n\r\nConsent to Conduct Business Electronically\r\nBy creating an account and using AerosExpress™ you consent to conduct business with Crop Risk Services on a full or partial basis through the AerosExpress™ platform. This consent shall continue until written notification is received by CRS Crop Risk Services specifically revoking such consent.\r\n\r\nNondiscrimination Statement\r\nCRS is an equal opportunity provider. The U.S. Department of Agriculture (USDA) prohibits discrimination against its customers, employees, and applicants for employment on the bases of race, color, national origin, age, disability, sex, gender identity, religion, reprisal, and where applicable, political beliefs, marital status, familial or parental status, sexual orientation, or all or part of an individual\"s income is derived from any public assistance program, or protected genetic information in employment or in any program or activity conducted or funded by the Department. (Not all prohibited bases will apply to all programs and/or employment activities).\r\n\r\nPrivacy\r\nCrop Risk Services, Inc.’s privacy policy located at https://www.cropriskservices.com/Main/PrivacyAct applies to this application and all associated sites connected to www.cropriskservices.com. As it pertains to the Federal crop insurance program, you also agree to the Risk Management Agency (“RMA”) Collection of Information and Privacy Act Statement, below.\r\n\r\nRMA Collection of Information and Privacy Act Statement\r\nThe following statements are made in accordance with the Privacy Act of 1974 (5 U.S.C. 552a): The Risk Management Agency (RMA) is authorized by the Federal Crop Insurance Act (7 U.S.C. 1501-1524) or other Acts, and the regulations promulgated thereunder, to solicit the information requested on documents established by RMA or by approved insurance providers (AIPs) that have been approved by the Federal Crop Insurance Corporation (FCIC) to deliver Federal crop insurance. The information is necessary for AIPs and RMA to operate the Federal crop insurance program, determine program eligibility, conduct statistical analysis, and ensure program integrity. Information provided herein may be furnished to other Federal, State, or local agencies, as required or permitted by law, law enforcement agencies, courts or adjudicative bodies, foreign agencies, magistrate, administrative tribunal, AIPs contractors and cooperators, Comprehensive Information Management System (CIMS), congressional offices, or entities under contract with RMA. For insurance agents, certain information may also be disclosed to the public to assist interested individuals in locating agents in a particular area. Disclosure of the information requested is voluntary. However, failure to correctly report the requested information may result in the rejection of this document by the AIP or RMA in accordance with the Standard Reinsurance Agreement between the AIP and FCIC, Federal regulations, or RMA-approved procedures and the denial of program eligibility or benefits derived therefrom. Also, failure to provide true and correct information may result in civil suit or criminal prosecution and the assessment of penalties or pursuit of other remedies.\r\n\r\nOther Terms and Conditions\r\nCRS may make changes to any services offered by AerosExpress™ and the sites connected to it at any time without notice. CRS reserves the right to modify, add, or remove portions of these Terms of Use at any time.`,\r\n rejectNoticeTitle: \"Reject Notice\",\r\n rejectNoticeContent:\r\n `\r\nIn order to use this software application you should accept all terms and conditions.\r\n\r\nIf you don't agree please contact your agent to use the regular signature process.\r\n`,\r\n acceptButtonLabel: \"Accept\",\r\n rejectButtonLabel: \"Decline\",\r\n closeRejectNoticeButtonLabel: \"Close\"\r\n};\r\n\r\nconst GenericErrorDialog = {\r\n title: \"Error\",\r\n content: \"We are unable to validate your information. Please try again or contact our System Support Team at 1-877-551-0410.\",\r\n acceptButtonLabel: \"Accept\"\r\n};\r\n\r\nconst SubmitConfirmationDialog = {\r\n title: \"Do you want to submit the Document?\",\r\n content: `\r\nIf you click on \"Accept\" the document, will be sent as is.\r\nIf you click on \"Cancel\" you can go back and change your Signature.`,\r\n acceptButtonLabel: \"Accept\",\r\n rejectButtonLabel: \"Cancel\",\r\n source: \"SignaturePanel.SubmitConfirmationDialog\"\r\n};\r\n\r\nconst RejectConfirmationDialog = {\r\n title: \"Do you want to Reject Signing the Document?\",\r\n content: `\r\nIf you click on \"Reject\" the document, will be rejected and other signers will be notified that the document was rejected.\r\nIf you click on \"Cancel\" you can go back and apply your Signature.`,\r\n acceptButtonLabel: \"Reject\",\r\n rejectButtonLabel: \"Cancel\",\r\n source: \"SignaturePanel.RejectConfirmationDialog\"\r\n};\r\n\r\nconst SubmitSuccessDialog = {\r\n title: \"Thank You!\",\r\n content: `\r\nYour signed document has been sent successfully.\r\n\r\nYou may save or print a copy of the signed document for your records.\r\n\r\nClose this browser window to exit E-Sign.`,\r\n acceptButtonLabel: \"Done\"\r\n};\r\n\r\nconst RejectionSuccessDialog = {\r\n title: \"Notice\",\r\n content: \"Your rejection has been sent successfully.\",\r\n acceptButtonLabel: \"Accept\"\r\n};\r\n\r\nconst InvalidUrlNotice = {\r\n title: \"Invalid URL\",\r\n content: \"The URL you are using is not correct.\"\r\n};\r\n\r\nconst SecurityQuestions = {\r\n title: \"Login\",\r\n content: \"Please select a question to answer.\",\r\n questionsLabel: \"Once you selected a question please write the corresponding answer.\",\r\n verifyButtonLabel: \"Verify answer\"\r\n};\r\n\r\nconst SecurityQuestionWrongAnswer = {\r\n title: \"Warning\",\r\n content: \"The answer for the security question is not correct. Please try again.\",\r\n acceptButtonLabel: \"Accept\"\r\n};\r\n\r\nconst SecurityToken = {\r\n title: \"Login:\",\r\n content: \"A security token has been sent to your phone.\",\r\n securityTokenComment: \"Please write it below to verify. Do not include hyphens.\",\r\n inputTextLabel: \"Capture token here\",\r\n verifyButtonLabel: \"Verify\"\r\n};\r\n\r\nconst VerificationTokenWrongAnswer = {\r\n title: \"Warning\",\r\n content: \"The security token provided is not correct. Please try again.\",\r\n acceptButtonLabel: \"Accept\"\r\n};\r\n\r\nconst PreviouslySubmitted =\r\n{\r\n title: \"Previously Signed\",\r\n content: \"This document has already been signed. If this is in error please contact our System Support Team at 1-877-551-0410.\"\r\n}\r\n\r\nconst SignatureRejected =\r\n{\r\n title: \"Rejected Document\",\r\n content: \"This document was previously rejected by a signer. If this is in error please contact our System Support Team at 1-877-551-0410.\"\r\n}\r\n\r\nconst Canceled =\r\n{\r\n title: \"Canceled\",\r\n content: \"This document request was canceled. If this is in error please contact our System Support Team at 1-877-551-0410.\"\r\n}\r\n\r\nconst Expired =\r\n{\r\n title: \"Expired\",\r\n content: \"This document request has expired. Documents expire after 7 days. If this is in error please contact our System Support Team at 1-877-551-0410.\"\r\n}\r\n\r\nexport {\r\n TermsAndConditions,\r\n Urls,\r\n SubmitConfirmationDialog,\r\n SubmitSuccessDialog,\r\n GenericErrorDialog,\r\n InvalidUrlNotice,\r\n SecurityQuestions,\r\n SecurityQuestionWrongAnswer,\r\n SecurityToken,\r\n VerificationTokenWrongAnswer,\r\n PreviouslySubmitted,\r\n RejectConfirmationDialog,\r\n RejectionSuccessDialog,\r\n SignatureRejected,\r\n Canceled,\r\n Expired\r\n};","import React,\r\n{\r\n useRef,\r\n useEffect,\r\n useState\r\n} from 'react';\r\nimport WebViewer from '@pdftron/webviewer';\r\nimport * as $ from 'jquery';\r\nimport { useDispatch } from 'react-redux';\r\nimport { showModalDialog } from '../redux/actions';\r\nimport { GenericErrorDialog } from '../generalConfiguration';\r\n\r\nconst AnnotationType = {\r\n Signature: 'Signature',\r\n Initials: 'Initials',\r\n Date: 'Date'\r\n};\r\n\r\nconst CrsPdfPanel = (props) => {\r\n const viewer = useRef(null);\r\n const dispatch = useDispatch();\r\n\r\n const [initializationDone, setInitializationDone] = useState(false);\r\n const [annotations, setAnnotations] = useState(null);\r\n const [annotationsManager, setAnnotationsManager] = React.useState(null);\r\n const [documentViewer, setDocumentViewer] = useState(null);\r\n\r\n const handleOnUserScrollPdf = (onUserScrollPdf, onLoadPdfData) => {\r\n // detect PDFTron scroll to bottom\r\n let iframe = $('[id^=webviewer]').contents();\r\n if (!iframe) {\r\n console.error('handleOnScrollDocument: webviewer not found.');\r\n return;\r\n }\r\n let documentContainer = $('.DocumentContainer', iframe);\r\n let document = $('.document', documentContainer);\r\n $('.DocumentContainer', iframe).scroll(() => {\r\n let scroll = documentContainer.scrollTop();\r\n if (Math.round(scroll) >= (document[0].scrollHeight - documentContainer[0].clientHeight - 8)) { //CLAIM-158 WB 4/30/2021\r\n if (onUserScrollPdf && typeof onUserScrollPdf === 'function') {\r\n onUserScrollPdf(onLoadPdfData);\r\n }\r\n }\r\n });\r\n };\r\n\r\n const findAnnotations = (annotations, annotationType, signer = undefined) => {\r\n let annotationsFound = [];\r\n if (!(annotations && annotationType)) {\r\n console.error('Required info not provided');\r\n return annotationsFound;\r\n }\r\n annotationsFound = annotations.filter(annot => {\r\n let annotationFound = false;\r\n let data = null;\r\n if (annot.fieldName) {\r\n try {\r\n data = JSON.parse(annot.fieldName)[0];\r\n } catch (e) {\r\n console.error('findAnnotations: annotation field name not found');\r\n }\r\n }\r\n if (data) {\r\n annotationFound = data.Type === annotationType;\r\n if (annotationFound && signer) {\r\n annotationFound = annotationFound && data.signer === signer;\r\n }\r\n }\r\n return annotationFound;\r\n });\r\n return annotationsFound;\r\n }\r\n\r\n const configurePdfTools = () => {\r\n let iframe = $('[id^=webviewer]').contents();\r\n $(\"[data-element='shapeToolGroupButton'\", iframe).css('display', 'none');\r\n $(\"[data-element='eraserToolButton'\", iframe).css('display', 'none');\r\n $(\"[data-element='signatureToolButton'\", iframe).css('display', 'none');\r\n $(\"[data-element='selectToolButton'\", iframe).css('display', 'none');\r\n $(\"[data-element='freeTextToolButton'\", iframe).css('display', 'none');\r\n $(\"[data-element='stickyToolButton'\", iframe).css('display', 'none');\r\n $(\"[data-element='toolsButton'\", iframe).css('display', 'none');\r\n $('.divider', iframe).css('display', 'none');\r\n $(\"[data-element='panToolButton'\", iframe).click();\r\n $(\"[data-element='panToolButton'\", iframe).css('display', 'none');\r\n $(\"[data-element='freeHandToolGroupButton'\", iframe).css('display', 'none');\r\n };\r\n\r\n const base64ToBlob = (base64) => {\r\n return new Promise((resolve, reject) => {\r\n if (!base64) {\r\n reject(`base64 not provided`);\r\n }\r\n const binaryString = window.atob(base64);\r\n const len = binaryString.length;\r\n const bytes = new Uint8Array(len);\r\n for (let i = 0; i < len; ++i) {\r\n bytes[i] = binaryString.charCodeAt(i);\r\n }\r\n let blob = new Blob([bytes], { type: 'application/pdf' });\r\n resolve(blob);\r\n });\r\n };\r\n\r\n const applySignatureData = (signatureData) => {\r\n //set false when applying because it is set to read only after it is applied to the PDF. Used when the redo the signature.\r\n annotationsManager.setReadOnly(false);\r\n\r\n if ((signatureData && signatureData.dateTime && signatureData.signature)=== false) {\r\n console.error('applySignatureData: Required info not provided.');\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n }\r\n applyDateAnnotation(documentViewer, annotations, annotationsManager,\r\n props.signerDocument.signerNumber, signatureData.dateTime);\r\n if (signatureData.signature) {\r\n applySignatureAnnotation(documentViewer, annotations, annotationsManager,\r\n props.signerDocument.signerNumber, signatureData.signature);\r\n }\r\n if (signatureData.initials) {\r\n applyInitialsAnnotation(documentViewer, annotations, annotationsManager,\r\n props.signerDocument.signerNumber, signatureData.initials);\r\n }\r\n };\r\n\r\n const applySignatureAnnotation = (documentViewer, annotations, annotationsManager,\r\n signerNumber, signature) => {\r\n if (!(documentViewer && annotations && annotationsManager && signerNumber)) {\r\n console.error('applySignatureAnnotation: signaturaData not provided');\r\n return;\r\n }\r\n if (documentViewer && documentViewer.getAnnotationsLoadedPromise()) {\r\n documentViewer.getAnnotationsLoadedPromise().then(() => {\r\n let currentAnnotations = annotationsManager.getAnnotationsList();\r\n let signatureAnnotations = findAnnotations(currentAnnotations, AnnotationType.Signature, signerNumber);\r\n if (signatureAnnotations.length <= 0) {\r\n console.error('applySignatureAnnotation: Annotations not found.');\r\n }\r\n signatureAnnotations.forEach(signatureAnnotation => {\r\n annotationsManager.deleteAnnotation(signatureAnnotation);\r\n let shift = calculateAnnotationShift(AnnotationType.Signature,\r\n signatureAnnotation.ImageData);\r\n createStampAnnotation(annotations, annotationsManager, signatureAnnotation,\r\n 138, 33, shift.X, shift.Y, signature);\r\n });\r\n });\r\n }\r\n }\r\n\r\n const applyInitialsAnnotation = (documentViewer, annotations, annotationsManager, signerNumber, initials) => {\r\n if (!(documentViewer && annotations)) {\r\n console.error('applyInitialsAnnotation: Required info not provided.');\r\n return;\r\n }\r\n if (documentViewer && documentViewer.getAnnotationsLoadedPromise()) {\r\n documentViewer.getAnnotationsLoadedPromise().then(() => {\r\n let currentAnnotations = annotationsManager.getAnnotationsList();\r\n let initialsAnnotations = findAnnotations(currentAnnotations, AnnotationType.Initials, signerNumber);\r\n if (initialsAnnotations.length <= 0) {\r\n console.error('applyInitialsAnnotation: Annotations not found.');\r\n }\r\n initialsAnnotations.forEach(initialsAnnotation => {\r\n annotationsManager.deleteAnnotation(initialsAnnotation);\r\n let shift = calculateAnnotationShift(AnnotationType.Initials,\r\n initialsAnnotation.ImageData);\r\n createStampAnnotation(annotations, annotationsManager, initialsAnnotation,\r\n 66, 33, shift.X, shift.Y, initials);\r\n });\r\n });\r\n }\r\n }\r\n\r\n const applyDateAnnotation = (documentViewer, annotations, annotationsManager, signerNumber, dateTime) => {\r\n if (!(documentViewer && annotations && annotationsManager && signerNumber)) {\r\n console.error('applyDateAnnotation: Required info not provided');\r\n return;\r\n }\r\n // If can load annotations\r\n if (documentViewer && documentViewer.getAnnotationsLoadedPromise()) {\r\n documentViewer.getAnnotationsLoadedPromise().then(() => {\r\n let initialPdfAnnotations = annotationsManager.getAnnotationsList();\r\n let dateAnnotations = findAnnotations(initialPdfAnnotations, AnnotationType.Date, signerNumber);\r\n if (dateAnnotations.length <= 0) {\r\n console.error('applyDateAnnotation: Annotations not found.');\r\n }\r\n dateAnnotations.forEach(dateAnnotation => {\r\n annotationsManager.deleteAnnotation(dateAnnotation);\r\n let shift = calculateAnnotationShift(AnnotationType.Date, dateAnnotation.ImageData);\r\n createStampAnnotation(annotations, annotationsManager, dateAnnotation,\r\n 70, 10, shift.X, shift.Y, dateTime);\r\n });\r\n });\r\n }\r\n }\r\n\r\n const calculateAnnotationShift = (annotationType, annotationData) => {\r\n let shift = {\r\n X: 0,\r\n Y: 0\r\n };\r\n switch (annotationType) {\r\n case AnnotationType.Signature:\r\n if (annotationData === undefined) {\r\n shift.X = 0;\r\n shift.Y = -25;\r\n }\r\n break;\r\n case AnnotationType.Initials:\r\n if (annotationData === undefined) {\r\n shift.X = 0;\r\n shift.Y = -25;\r\n }\r\n break;\r\n case AnnotationType.Date:\r\n if (annotationData === undefined) {\r\n shift.X = -5;\r\n shift.Y = -13;\r\n }\r\n break;\r\n default:\r\n console.error(`calculateAnnotationShift: Annotatation type non supported: ${annotationType}`);\r\n }\r\n return shift;\r\n }\r\n\r\n const createStampAnnotation =\r\n (annotations, annotationsManager, currentAnnotation, width, height, xShift, yShift, imageData) => {\r\n if (!(annotations && annotationsManager && currentAnnotation)) {\r\n console.error('createStampAnnotation: Required infor not provided.');\r\n return;\r\n }\r\n const stampAnnot = new annotations.StampAnnotation();\r\n stampAnnot.PageNumber = currentAnnotation.PageNumber;\r\n stampAnnot.X = currentAnnotation.X + xShift;\r\n stampAnnot.Y = currentAnnotation.Y + yShift;\r\n stampAnnot.Width = width;\r\n stampAnnot.Height = height;\r\n stampAnnot.fieldName = currentAnnotation.fieldName;\r\n stampAnnot.ImageData = imageData;\r\n stampAnnot.Author = annotationsManager.getCurrentUser();\r\n annotationsManager.addAnnotation(stampAnnot);\r\n annotationsManager.redrawAnnotation(stampAnnot);\r\n };\r\n\r\n /**\r\n * Initialize pdf settings and load document\r\n */\r\n useEffect(() => {\r\n const webViewerDisabledElements =\r\n [\r\n 'AnnotationEdit',\r\n 'TextSelect',\r\n 'CropPage',\r\n 'AnnotationEraserTool',\r\n 'AnnotationCreateSticky',\r\n 'AnnotationCreateFreeHand',\r\n 'AnnotationCreateTextHighlight',\r\n 'AnnotationCreateTextUnderline',\r\n 'AnnotationCreateTextSquiggly',\r\n 'AnnotationCreateTextStrikeout',\r\n 'AnnotationCreateFreeText',\r\n 'AnnotationCreateCallout',\r\n 'AnnotationCreateSignature',\r\n 'AnnotationCreateLine',\r\n 'AnnotationCreateArrow',\r\n 'AnnotationCreatePolyline',\r\n 'AnnotationCreateStamp',\r\n 'AnnotationCreateRectangle',\r\n 'AnnotationCreateEllipse',\r\n 'AnnotationCreatePolygon',\r\n 'AnnotationCreatePolygonCloud',\r\n 'AnnotationCreateDistanceMeasurement',\r\n 'AnnotationCreatePerimeterMeasurement',\r\n 'AnnotationCreateAreaMeasurement',\r\n 'textToolGroupButton',\r\n 'miscToolGroupButton',\r\n 'outlinesPanelButton',\r\n 'notesPanelButton',\r\n 'annotationCommentButton',\r\n 'annotationStyleEditButton',\r\n 'annotationDeleteButton',\r\n 'annotationCropButton',\r\n 'annotationRedactButton',\r\n 'annotationGroupButton',\r\n 'annotationUngroupButton',\r\n 'calibrateButton',\r\n 'linkButton',\r\n 'fileAttachmentDownload',\r\n 'notesPanel',\r\n 'highlightToolButton',\r\n 'freeHandToolButton',\r\n 'copyTextButton',\r\n 'textHighlightToolButton',\r\n 'textUnderlineToolButton',\r\n 'textSquigglyToolButton',\r\n 'textStrikeoutToolButton',\r\n 'signatureModal', // Bug Story 79307 AWade 3/15/21\r\n 'freeHandToolGroupButton' // Bug Story 79307 AWade 3/15/21\r\n ];\r\n\r\n if (props.signerDocument && !initializationDone) {\r\n setInitializationDone(true);\r\n WebViewer(\r\n {\r\n path: '/webviewer/lib',\r\n disableLogs: true,\r\n disabledElements: webViewerDisabledElements,\r\n licenseKey: 'Crop Risk Services, Inc.(cropriskservices.com):OEM:see agreement::B+:AMS(20220911):56A57EFD04D7F60A7360B13AC9A2737860614F8BDF707892FB245B82BD025C903AF4B6F5C7'\r\n },\r\n viewer.current\r\n ).then(async (instance) => { // On WebViewer ready\r\n configurePdfTools();\r\n const { Annotations, annotManager, docViewer } = instance;\r\n setAnnotations(Annotations);\r\n setAnnotationsManager(annotManager);\r\n setDocumentViewer(docViewer);\r\n base64ToBlob(props.signerDocument.documentImage)\r\n .then(pdfBlob => {\r\n instance.loadDocument(pdfBlob, {\r\n extension: \"PDF\" });\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n //TODO: show error\r\n });\r\n \r\n docViewer.on('documentLoaded', () => {\r\n docViewer.getAnnotationsLoadedPromise().then(() => {\r\n let initialTempPdfAnnotations = annotManager.getAnnotationsList();\r\n let pdfData = {};\r\n let tempInitialsAnnotations =\r\n findAnnotations(initialTempPdfAnnotations, AnnotationType.Initials,\r\n props.signerDocument.signerNumber);\r\n if (tempInitialsAnnotations.length > 0) {\r\n pdfData.includesInitials = true;\r\n } else {\r\n pdfData.includesInitials = false;\r\n }\r\n handleOnUserScrollPdf(props.onUserScrollPdf, pdfData);\r\n });\r\n });\r\n });\r\n }\r\n }, [props, initializationDone]);\r\n\r\n /**\r\n * Apply signature\r\n */\r\n useEffect(() => {\r\n const getSignedPdfAsBase64 = (annotationsManager, documentViewer) => {\r\n const pdfMarker = ';base64,';\r\n return new Promise((resolve, reject) => {\r\n annotationsManager.exportAnnotations({ widgets: true, links: true, fields: true })\r\n .then(annotations => {\r\n const doc = documentViewer.getDocument();\r\n doc.getFileData({ xfdfString: annotations })\r\n .then(data => {\r\n const arr = new Uint8Array(data);\r\n const blob = new Blob([arr]);\r\n const reader = new FileReader();\r\n reader.addEventListener('load', () => {\r\n let rawPdfBase64 = reader.result;\r\n let posFound = rawPdfBase64.indexOf(pdfMarker);\r\n let startPos = posFound + pdfMarker.length;\r\n let pdfBase64 = rawPdfBase64.slice(startPos);\r\n resolve(pdfBase64);\r\n });\r\n reader.readAsDataURL(blob);\r\n })\r\n .catch(err => {\r\n reject(err);\r\n });\r\n })\r\n .catch(err => {\r\n reject(err);\r\n });\r\n });\r\n };\r\n\r\n // Applying signature\r\n if (annotations && annotationsManager && documentViewer && props.signatureData) {\r\n let signatureData = props.signatureData;\r\n applySignatureData(signatureData);\r\n getSignedPdfAsBase64(annotationsManager, documentViewer)\r\n .then(pdfBase64 => {\r\n if (props.onCreateSignedPdf && typeof props.onCreateSignedPdf == 'function') {\r\n props.onCreateSignedPdf(pdfBase64);\r\n annotationsManager.setReadOnly(true);\r\n }\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n });\r\n }\r\n });\r\n\r\n return (\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default CrsPdfPanel;","import { Urls } from '../generalConfiguration';\r\nimport axios from 'axios';\r\n\r\nconst getSignerDocument = (documentId) => {\r\n return new Promise((resolve, reject) => {\r\n if (documentId) {\r\n let getDocumentUrl = `${Urls.GetDocument}/${documentId}`;\r\n axios.get(\r\n getDocumentUrl,\r\n { headers: { Accept: 'application/json' } })\r\n .then(response => {\r\n if (response && response.status >= 200 && response.status < 300 && response.data) {\r\n try {\r\n let parsedResponse = JSON.parse(response.data);\r\n resolve(parsedResponse);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n }\r\n })\r\n .catch(err => reject(err));\r\n } else {\r\n reject(`getSignerDocument: documentId not provided.`);\r\n }\r\n });\r\n}\r\n\r\nconst getQuestions = (personId, signerType) => {\r\n return new Promise((resolve, reject) => {\r\n if (typeof personId === 'number' && typeof signerType === 'number') {\r\n let getQuestionstUrl = `${Urls.GetQuestions}/${personId}/${signerType}`;\r\n axios.get(\r\n getQuestionstUrl,\r\n { headers: { Accept: 'application/json' } })\r\n .then(response => {\r\n if (response && response.status >= 200 && response.status < 300 && response.data) {\r\n try {\r\n let parsedResponse = JSON.parse(response.data);\r\n resolve(parsedResponse);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n }\r\n })\r\n .catch(err => reject(err));\r\n } else {\r\n reject(`getQuestions: personId or signerType not provided.`);\r\n }\r\n });\r\n}\r\n\r\nconst verifyAnswer = (personId, signerType, questionId, answer) => {\r\n return new Promise((resolve, reject) => {\r\n if (typeof personId === 'number' && typeof signerType === 'number'\r\n && typeof questionId === 'number' && answer) {\r\n let verifyAnswerUrl = Urls.VerifyAnswer;\r\n let twoFactorAnswer = {\r\n personId,\r\n signerType,\r\n questionId,\r\n answer\r\n }\r\n axios.post(verifyAnswerUrl,\r\n twoFactorAnswer,\r\n { headers: { Accept: 'application/json' } })\r\n .then(response => {\r\n if (response && response.status >= 200 && response.status < 300 && response.data) {\r\n try {\r\n let parsedResponse = JSON.parse(response.data);\r\n resolve(parsedResponse);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n } else {\r\n reject(response);\r\n }\r\n })\r\n .catch(err => reject(err));\r\n } else {\r\n reject(`verifyAnswer: Input parameters are not valid.`);\r\n }\r\n });\r\n};\r\n\r\nconst sendToken = (personId) => {\r\n return new Promise((resolve, reject) => {\r\n if (typeof personId === 'number') {\r\n let getQuestionstUrl = `${Urls.SendToken}/${personId}`;\r\n axios.get(\r\n getQuestionstUrl,\r\n { headers: { Accept: 'application/json' } })\r\n .then(response => {\r\n if (response && response.status >= 200 && response.status < 300 && response.data) {\r\n try {\r\n let parsedResponse = JSON.parse(response.data);\r\n resolve(parsedResponse);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n }\r\n })\r\n .catch(err => reject(err));\r\n } else {\r\n reject(`sendToken: personId not provided.`);\r\n }\r\n });\r\n}\r\n\r\nconst verifyToken = (personId, token) => {\r\n return new Promise((resolve, reject) => {\r\n if (typeof personId === 'number' && token) {\r\n let verifyTokenUrl = `${Urls.VerifyToken}/${personId}/${token}`;\r\n axios.get(\r\n verifyTokenUrl,\r\n { headers: { Accept: 'application/json' } })\r\n .then(response => {\r\n if (response && response.status >= 200 && response.status < 300 && response.data) {\r\n try {\r\n let parsedResponse = JSON.parse(response.data);\r\n resolve(parsedResponse);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n }\r\n })\r\n .catch(err => reject(err));\r\n } else {\r\n reject(`verifyToken: personId or token not provided.`);\r\n }\r\n });\r\n}\r\n\r\nconst getCurrentDateTime = () => {\r\n return new Promise((resolve, reject) => {\r\n axios.get(Urls.CurrentDate, { headers: { Accept: 'application/json' } })\r\n .then(response => {\r\n if (response && response.status >= 200 && response.status < 300 && response.data) {\r\n try {\r\n let currentDateTime = new Date(response.data.currentDateTime);\r\n resolve(currentDateTime);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n }\r\n })\r\n .catch(err => reject(err));\r\n });\r\n};\r\n\r\nconst sendSignedDocument = (documentId, signerDocument) => {\r\n return new Promise((resolve, reject) => {\r\n if (documentId) {\r\n let getDocumentUrl = `${Urls.GetDocument}/${documentId}`;\r\n axios.put(getDocumentUrl, signerDocument, { headers: { Accept: 'application/json' } })\r\n .then(response => {\r\n if (response && response.status >= 200 && response.status < 300 && response.data) {\r\n try {\r\n resolve(response.data);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n } else {\r\n reject(response);\r\n }\r\n })\r\n .catch(err => reject(err));\r\n } else {\r\n reject(`sendSignedDocument: documentId not provided.`);\r\n }\r\n });\r\n};\r\n\r\nconst sendTelemetry = (telemetryData) => {\r\n return new Promise((resolve, reject) => {\r\n if (telemetryData) {\r\n axios.post(Urls.Telemetry, telemetryData, { headers: { Accept: 'application/json' } })\r\n .then(response => {\r\n if (response && response.status >= 200 && response.status < 300 && response.data) {\r\n try {\r\n resolve(response.data);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n } else {\r\n reject(response);\r\n }\r\n })\r\n .catch(err => reject(err));\r\n } else {\r\n reject(`sendTelemetry: telemetryData not provided.`);\r\n }\r\n });\r\n};\r\n\r\nexport {\r\n getSignerDocument,\r\n getQuestions,\r\n verifyAnswer,\r\n sendToken,\r\n verifyToken,\r\n getCurrentDateTime,\r\n sendSignedDocument,\r\n sendTelemetry\r\n};\r\n","const getGeolocation = () => {\r\n return new Promise((resolve, reject) => {\r\n if (navigator && navigator.geolocation && navigator.geolocation.getCurrentPosition) {\r\n navigator.geolocation.getCurrentPosition(\r\n position => {\r\n let geoLocation = {\r\n latitude: position.coords.latitude,\r\n longitude: position.coords.longitude,\r\n location: `${position.coords.latitude}, ${position.coords.longitude}`\r\n };\r\n resolve(geoLocation);\r\n },\r\n err => {\r\n reject(err);\r\n });\r\n } else {\r\n reject('getGeolocation: browser does not support getGeolocationnavigator.geolocation.getCurrentPosition');\r\n }\r\n });\r\n};\r\n\r\nexport default getGeolocation;","import React, { useState, useEffect } from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport styles from './CrsSignaturePanel.module.scss';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '@material-ui/core/Button';\r\nimport Backdrop from '@material-ui/core/Backdrop';\r\nimport CircularProgress from '@material-ui/core/CircularProgress';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport Lock from '@material-ui/icons/Lock';\r\nimport * as $ from 'jquery';\r\nimport SignatureCanvas from 'react-signature-canvas';\r\nimport { SubmitConfirmationDialog } from '../generalConfiguration';\r\nimport { RejectConfirmationDialog } from '../generalConfiguration';\r\nimport { useSelector, shallowEqual, useDispatch } from 'react-redux';\r\nimport { showModalDialog } from '../redux/actions';\r\nimport { GenericErrorDialog, SubmitSuccessDialog, RejectionSuccessDialog} from '../generalConfiguration';\r\nimport { getCurrentDateTime, sendSignedDocument, sendTelemetry } from \"../utils/ApiCalls\";\r\nimport getGeolocation from \"../utils/geoLocation\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n width: '100%',\r\n flexGrow: 0,\r\n overflowY: 'auto !important',\r\n display: 'none',\r\n },\r\n fr: {\r\n float: 'right'\r\n }\r\n}));\r\nconst emptyImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGP6zwAAAgcBApocMXEAAAAASUVORK5CYII=';\r\n\r\nconst CrsSignaturePanel = (props) => {\r\n const classes = useStyles();\r\n\r\n const [isCanvasForSignatureFilled, setIsCanvasForSignatureFilled] = useState(false);\r\n const [isCanvasForInitialsFilled, setIsCanvasForInitialsFilled] = useState(false);\r\n const [isActionButtonSubmit, setIsActionButtonSubmit] = useState(false);\r\n const [isSending, setIsSending] = useState(false);\r\n const [isPdfSubmitted, setIsPdfSubmitted] = useState(false);\r\n const [signerName, setSignerName] = useState('');\r\n const [signerInitials, setSignerInitials] = useState('');\r\n const [signatureWidth, setSignatureWidth] = useState(250);\r\n const [sessionStart] = useState(new Date());\r\n const [resizeHandled, setResizeHandled] = useState(false);\r\n\r\n const signatureHeight = 100;\r\n const initialsWidth = 250;\r\n const initialsHeight = 100;\r\n\r\n var canvasForSignature = null;\r\n var canvasForInitials = null;\r\n\r\n const dispatch = useDispatch();\r\n const modalDialogState = useSelector(state => state.modalDialog, shallowEqual);\r\n\r\n var WebFont = require('webfontloader');\r\n\r\n // load font to be used in Auto Generate\r\n WebFont.load({\r\n google: {\r\n families: ['Mr Dafoe']\r\n }\r\n });\r\n\r\n /**\r\n * Resize Canvas when the window is resized\r\n * @param {any} event\r\n */\r\n const handleResizeCanvas = (event) => {\r\n let signatureWidthTemp = $(\"#signature-div\").width() - 40;\r\n if (signatureWidthTemp) {\r\n setSignatureWidth(signatureWidthTemp);\r\n }\r\n }\r\n\r\n const handleAutoGenerate = (event) => {\r\n if (signerName && canvasForSignature) { // Auto generate signature\r\n let signerNameImg =\r\n getImageBase64FromText(signerName, signatureWidth, 50, '30px Mr Dafoe', 15, 30);\r\n canvasForSignature.clear();\r\n canvasForSignature.fromDataURL(signerNameImg,\r\n { width: signatureWidth, height: signatureHeight });\r\n setIsCanvasForSignatureFilled(true);\r\n }\r\n if (signerInitials && canvasForInitials) { // Auto generate signature\r\n let signerInitialsImg =\r\n getImageBase64FromText(signerInitials, initialsWidth, 50, '30px Mr Dafoe', 15, 30);\r\n canvasForInitials.clear();\r\n canvasForInitials.fromDataURL(signerInitialsImg,\r\n { width: initialsWidth, height: initialsHeight });\r\n setIsCanvasForInitialsFilled(true);\r\n }\r\n\r\n }\r\n\r\n const handleChangeSignerName = (event) => {\r\n let tempSignerName = event.currentTarget.value;\r\n setSignerName(tempSignerName);\r\n\r\n }\r\n\r\n const handleChangeSignerInitials = (event) => {\r\n let tempSignerInitials = event.currentTarget.value;\r\n setSignerInitials(tempSignerInitials);\r\n\r\n }\r\n\r\n const handleClearSignature = (event) => {\r\n if (canvasForSignature) {\r\n canvasForSignature.clear();\r\n setIsCanvasForSignatureFilled(false);\r\n }\r\n handleClearSignedPdf();\r\n }\r\n\r\n const handleClearInitialsButton = (event) => {\r\n if (canvasForInitials) {\r\n canvasForInitials.clear();\r\n setIsCanvasForInitialsFilled(false);\r\n }\r\n handleClearSignedPdf();\r\n }\r\n\r\n const handleClearSignedPdf = (event) => {\r\n if (props.signedPdf) {\r\n props.onClearSignedPdf();\r\n }\r\n let signatureData = {}\r\n signatureData.dateTime = emptyImage;\r\n if (canvasForSignature && canvasForSignature.isEmpty()) {\r\n signatureData.signature = emptyImage; \r\n }\r\n if (canvasForInitials && canvasForInitials.isEmpty()) {\r\n signatureData.initials = emptyImage;\r\n }\r\n if (props.onApplySignature && typeof props.onApplySignature === 'function') {\r\n props.onApplySignature(signatureData);\r\n setIsActionButtonSubmit(false);\r\n }\r\n }\r\n\r\n const handleApplyButton = (event) => {\r\n let signatureData = {};\r\n getCurrentDateTimeAsString()\r\n .then(dateTimeString => {\r\n let dateTime =\r\n getImageBase64FromText(dateTimeString, 400, 50, '35px Arial', 15, 30, 'image/png');\r\n signatureData.dateTime = dateTime;\r\n if (canvasForSignature && !canvasForSignature.isEmpty()) {\r\n signatureData.signature = canvasForSignature.toDataURL('image/png');\r\n }\r\n if (canvasForInitials && !canvasForInitials.isEmpty()) {\r\n signatureData.initials = canvasForInitials.toDataURL('image/png');\r\n }\r\n if (props.onApplySignature && typeof props.onApplySignature === 'function') {\r\n props.onApplySignature(signatureData);\r\n setIsActionButtonSubmit(true);\r\n } else {\r\n console.error('handleApplyButton: Signature not applied');\r\n }\r\n if (props.setCloseDrawer && typeof props.setCloseDrawer === 'function') {\r\n console.log('Calling setCloseDrawer...');\r\n props.setCloseDrawer();\r\n }\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n });\r\n }\r\n\r\n const handleSubmitButton = (event) => {\r\n dispatch(showModalDialog(SubmitConfirmationDialog));\r\n }\r\n\r\n const handleChangeSignatureCanvas = (event) => {\r\n setIsCanvasForSignatureFilled(true);\r\n }\r\n\r\n const handleChangeInitialsCanvas = (event) => {\r\n setIsCanvasForInitialsFilled(true);\r\n }\r\n\r\n const getImageBase64FromText = (inputText, canvasWidth, canvasHeigth, font,\r\n x, y, type = undefined) => {\r\n if (!((typeof inputText === 'string' && inputText) &&\r\n canvasWidth && canvasHeigth, font, x, y)) {\r\n console.error('getImageBase64FromText: inputText cannot be empty.');\r\n return;\r\n }\r\n let canvas = document.createElement(\"canvas\");\r\n canvas.width = canvasWidth;\r\n canvas.height = canvasHeigth;\r\n let ctx = canvas.getContext('2d');\r\n ctx.font = font;\r\n ctx.fillText(inputText, x, y);\r\n let img = document.createElement(\"img\");\r\n img.src = canvas.toDataURL(type);\r\n return img.src;\r\n };\r\n\r\n const getCurrentDateTimeAsString = () => {\r\n return new Promise((resolve, reject) => {\r\n getCurrentDateTime()\r\n .then(dateTime => {\r\n formatDateTime(dateTime)\r\n .then(dateTimeString => {\r\n resolve(dateTimeString);\r\n })\r\n .catch(err => reject(err));\r\n })\r\n .catch(err => reject(err));\r\n });\r\n };\r\n\r\n const formatDateTime = (dateTime) => {\r\n return new Promise((resolve, reject) => {\r\n if (!(dateTime)) {\r\n reject('formatDateTime: dateTime not provided');\r\n }\r\n let dateFormatoptions = {\r\n year: 'numeric', month: 'numeric', day: 'numeric',\r\n hour: 'numeric', minute: 'numeric', second: 'numeric',\r\n hour12: true\r\n };\r\n let dateString = new Intl.DateTimeFormat('en-US', dateFormatoptions).format(dateTime);\r\n resolve(dateString);\r\n });\r\n }\r\n\r\n const calculateSessionDuration = (sessionStart) => {\r\n return new Promise((resolve, reject) => {\r\n if (sessionStart instanceof Date) {\r\n let sessionEnd = new Date();\r\n let sessionDuration = sessionEnd - sessionStart;\r\n resolve(sessionDuration);\r\n } else {\r\n reject('calculateSessionDuration: sessionStart is not a Date');\r\n }\r\n });\r\n };\r\n\r\n const handleRejectButton = (event) => {\r\n dispatch(showModalDialog(RejectConfirmationDialog));\r\n }\r\n\r\n /**\r\n * Handle resize signature div\r\n */\r\n useEffect(() => {\r\n if (resizeHandled === false) {\r\n setResizeHandled(true);\r\n handleResizeCanvas();\r\n window.addEventListener(\"resize\", handleResizeCanvas);\r\n }\r\n }, [resizeHandled]);\r\n\r\n /**\r\n * Handle send signed document and telemetry\r\n */\r\n useEffect(() => {\r\n const handleSendSignedDocument = (event) => {\r\n if (props.documentId && props.signerDocument && props.signedPdf) {\r\n setIsSending(true);\r\n let signerDocument = props.signerDocument;\r\n signerDocument.documentImage = props.signedPdf;\r\n sendSignedDocument(props.documentId, props.signerDocument)\r\n .then(response => {\r\n setIsPdfSubmitted(true);\r\n setIsSending(false);\r\n dispatch(showModalDialog(SubmitSuccessDialog));\r\n })\r\n .catch(err => {\r\n console.error('handleSubmitButton', err);\r\n setIsSending(false);\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n });\r\n } else {\r\n console.error('handleSubmitButton: Necessary information not given.');\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n }\r\n };\r\n\r\n const handleSendTelemetry = (event) => {\r\n if (props.signerDocument) {\r\n\r\n \r\n Promise.allSettled(\r\n [getGeolocation(), calculateSessionDuration(sessionStart)]\r\n )\r\n .then(telemetryDataSources => {\r\n const [geoLocationData, sessionDuration] = telemetryDataSources;\r\n var location = \"\";\r\n var duration = 0;\r\n if (geoLocationData.status === \"rejected\") {\r\n console.info(\"geolocation not enabled\");\r\n } else {\r\n location = geoLocationData.value.location;\r\n }\r\n if (sessionDuration.status === \"rejected\") {\r\n console.info(\"sessionDuration calculation failed\");\r\n } else {\r\n duration = sessionDuration.value;\r\n }\r\n let telemetryData =\r\n {\r\n signatureRequestId: props.signerDocument.signatureRequestId,\r\n requestSignerId: props.signerDocument.requestSignerId,\r\n signerNumber: props.signerDocument.signerNumber,\r\n uniqueId: props.signerDocument.uniqueId,\r\n geoLocation: location,\r\n sessionDuration: duration\r\n }\r\n sendTelemetry(telemetryData)\r\n .then(data => console.info('Telemetry sent successfully. Data:', data))\r\n .catch(err => console.error(err));\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n });\r\n }\r\n };\r\n\r\n const handleSendRejectedDocument = (event) => {\r\n if (props.documentId && props.signerDocument) {\r\n setIsSending(true);\r\n let signerDocument = props.signerDocument;\r\n signerDocument.SignerRejected = true;\r\n sendSignedDocument(props.documentId, props.signerDocument)\r\n .then(response => {\r\n setIsPdfSubmitted(true);\r\n setIsActionButtonSubmit(true);\r\n setIsSending(false);\r\n dispatch(showModalDialog(RejectionSuccessDialog));\r\n })\r\n .catch(err => {\r\n console.error('handleSendRejectedDocument', err);\r\n setIsSending(false);\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n });\r\n } else {\r\n console.error('handleSubmitButton: Necessary information not given.');\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n }\r\n };\r\n\r\n if (modalDialogState.modalDialogOutput &&\r\n modalDialogState.modalDialogOutput.source &&\r\n modalDialogState.modalDialogOutput.source === 'SignaturePanel.SubmitConfirmationDialog'\r\n ) {\r\n if (modalDialogState.modalDialogOutput.isAccepted && !isSending && !isPdfSubmitted) {\r\n handleSendSignedDocument();\r\n handleSendTelemetry();\r\n }\r\n }\r\n if (modalDialogState.modalDialogOutput &&\r\n modalDialogState.modalDialogOutput.source &&\r\n modalDialogState.modalDialogOutput.source === 'SignaturePanel.RejectConfirmationDialog'\r\n ) {\r\n if (modalDialogState.modalDialogOutput.isAccepted && !isSending && !isPdfSubmitted) {\r\n handleSendRejectedDocument();\r\n handleSendTelemetry();\r\n }\r\n }\r\n\r\n });\r\n\r\n\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
Digital Signature
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n }\r\n }\r\n />\r\n \r\n \r\n {props.pdfContainsInitials ?\r\n (\r\n ,\r\n } : {}\r\n }\r\n value={signerInitials}\r\n />)\r\n : (null)\r\n }\r\n \r\n \r\n
\r\n {signerName ? (\r\n
\r\n
\r\n \r\n { canvasForSignature = ref }}\r\n onEnd={handleChangeSignatureCanvas}\r\n disabled={(isPdfSubmitted === true)}/>\r\n \r\n
\r\n
\r\n ) : null}\r\n {signerName && signerInitials ? (\r\n
\r\n
\r\n \r\n { canvasForInitials = ref }}\r\n onEnd={handleChangeInitialsCanvas}\r\n disabled={(isPdfSubmitted === true)}/>\r\n \r\n
\r\n\r\n
\r\n ) : null}\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n BEGIN\r\n isPdfSubmitted === false\r\n // Button is Submit => END\r\n :\r\n // Button is Apply => BEGIN\r\n props.pdfContainsInitials ?\r\n // PDF contains Initials => BEGIN\r\n isCanvasForSignatureFilled &&\r\n isCanvasForInitialsFilled &&\r\n isPdfSubmitted === false\r\n // PDF contains Initials => BEGIN\r\n :\r\n // PDF does not contain Initials => BEGIN\r\n isCanvasForSignatureFilled &&\r\n isPdfSubmitted === false\r\n // PDF does not contain Initials => END\r\n // Button is Apply => END\r\n ))\r\n }\r\n onClick={isActionButtonSubmit ?\r\n handleSubmitButton : handleApplyButton}\r\n >\r\n {isActionButtonSubmit ?\r\n 'Submit' : 'Apply'}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default CrsSignaturePanel;","import React, { useState } from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport Drawer from '@material-ui/core/Drawer';\r\nimport Fab from '@material-ui/core/Fab';\r\nimport CrsSignaturePanel from './CrsSignaturePanel';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faSignature } from '@fortawesome/free-solid-svg-icons';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n '& > *': {\r\n margin: theme.spacing(1),\r\n },\r\n },\r\n extendedIcon: {\r\n marginRight: theme.spacing(3),\r\n\r\n },\r\n list: {\r\n width: 'auto',\r\n height: 'auto',\r\n },\r\n fullList: {\r\n width: 'auto',\r\n height: 'auto',\r\n },\r\n fab: {\r\n position: 'absolute',\r\n bottom: '20px',\r\n right: '20px',\r\n }\r\n}));\r\n\r\nexport default function CrsSignatureDrawer(props) {\r\n\r\n const classes = useStyles();\r\n\r\n const [isDrawerOpen, setIsDrawerOpen] = useState(false);\r\n\r\n const handleSetOpenDrawer = (isOpen) => (event) => {\r\n if (event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) {\r\n return;\r\n }\r\n setIsDrawerOpen(isOpen);\r\n };\r\n\r\n const handleCloseDrawer = () => {\r\n setIsDrawerOpen(false);\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}","import React from 'react';\r\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\r\nimport Grid from '@material-ui/core/Grid';\r\nimport CrsPdfPanel from './CrsPdfPanel';\r\nimport CrsSignaturePanel from './CrsSignaturePanel';\r\nimport CrsSignatureDrawer from './CrsSignatureDrawer';\r\nimport styles from './CrsMainPage.module.scss';\r\n\r\nconst CrsMainGrid = (props) => {\r\n const show = props.show;\r\n const isXLarge = useMediaQuery(\"(min-width:1920px)\");\r\n const isLarge = useMediaQuery(\"(min-width:1280px)\");\r\n let mainGrid = null;\r\n if (isLarge || isXLarge) {\r\n mainGrid = (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n mainGrid = (\r\n <>\r\n \r\n \r\n \r\n );\r\n }\r\n if (show) {\r\n return (\r\n
\r\n {mainGrid}\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nexport default CrsMainGrid;","import React from 'react';\r\nimport { useState, useEffect } from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { useDispatch, useSelector, shallowEqual } from 'react-redux';\r\nimport { showModalDialog, closeModalDialog } from '../redux/actions';\r\n\r\nconst useStyles = makeStyles({\r\n root: {\r\n position: 'fixed',\r\n zIndex: 1,\r\n },\r\n center_content: {\r\n justifyContent: 'center'\r\n },\r\n line_break: {\r\n whiteSpace: 'pre-wrap'\r\n }\r\n});\r\n\r\nconst CrsModalDialog = (props) => {\r\n const dispatch = useDispatch();\r\n const modalDialogState = useSelector(state => state.modalDialog, shallowEqual);\r\n const classes = useStyles();\r\n const [open, setOpen] = useState(false);\r\n const [title, setTitle] = useState(null);\r\n const [content, setContent] = useState(null);\r\n const [acceptButtonLabel, setAcceptButtonLabel] = useState(null);\r\n const [rejectButtonLabel, setRejectButtonLabel] = useState(null);\r\n const [source, setSource] = useState('');\r\n\r\n useEffect(() => {\r\n if (modalDialogState.modalDialogInput) {\r\n if (modalDialogState.modalDialogInput.title) {\r\n setTitle(modalDialogState.modalDialogInput.title);\r\n } else {\r\n setTitle('');\r\n console.warn('CrsModalDialog: Title not provided.');\r\n }\r\n if (modalDialogState.modalDialogInput.content) {\r\n setContent(modalDialogState.modalDialogInput.content);\r\n } else {\r\n setContent(state => state.content);\r\n console.warn('CrsModalDialog: Content not provided');\r\n }\r\n if (modalDialogState.modalDialogInput.acceptButtonLabel) {\r\n setAcceptButtonLabel(modalDialogState.modalDialogInput.acceptButtonLabel);\r\n } else {\r\n setAcceptButtonLabel('Accept');\r\n }\r\n if (modalDialogState.modalDialogInput.rejectButtonLabel) {\r\n setRejectButtonLabel(modalDialogState.modalDialogInput.rejectButtonLabel);\r\n } else {\r\n setRejectButtonLabel('');\r\n }\r\n if (modalDialogState.modalDialogInput.source) {\r\n setSource(modalDialogState.modalDialogInput.source);\r\n } else {\r\n setSource('');\r\n }\r\n setOpen(true);\r\n }\r\n }, [modalDialogState.modalDialogInput]);\r\n\r\n const handleClickButton = (event) => {\r\n setOpen(false);\r\n let accepted = event.currentTarget.dataset.accepted === 'true';\r\n let modalDialogOutput = {\r\n source: source,\r\n isAccepted: accepted\r\n };\r\n dispatch(showModalDialog(null));\r\n dispatch(closeModalDialog(modalDialogOutput));\r\n };\r\n\r\n return (\r\n \r\n {title}\r\n \r\n \r\n {content}\r\n \r\n \r\n \r\n \r\n {rejectButtonLabel ?\r\n : null\r\n }\r\n \r\n \r\n );\r\n};\r\n\r\nexport default CrsModalDialog;","import { useState, useEffect } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport { getSignerDocument } from '../utils/ApiCalls';\r\nimport { showModalDialog } from '../redux/actions';\r\nimport { GenericErrorDialog } from '../generalConfiguration';\r\n\r\nconst CrsGetSignerDocument = (props) => {\r\n const [isGetDocumentCalled, setIsGetDocumentCalled] = useState(false);\r\n\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n if (props.execute === true && props.documentId && !isGetDocumentCalled) {\r\n setIsGetDocumentCalled(true);\r\n getSignerDocument(props.documentId)\r\n .then(signerDocument => {\r\n if (props.onGetSignerDocument && typeof props.onGetSignerDocument === 'function') {\r\n props.onGetSignerDocument(signerDocument);\r\n }\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n });\r\n }\r\n }, [props, isGetDocumentCalled, dispatch]);\r\n\r\n //Does not render anything, just getDocument and set it to a state\r\n return null;\r\n};\r\n\r\nexport default CrsGetSignerDocument;","import { useState, useEffect } from \"react\";\r\nimport { getQuestions } from \"../utils/ApiCalls\";\r\n\r\nconst CrsGetSecurityQuestions = props => {\r\n const [isGetDocumentCalled, setIsGetDocumentCalled] = useState(false);\r\n const signerDocument = typeof props.signerDocument === \"undefined\" ?\r\n null : props.signerDocument;\r\n\r\n useEffect(() => {\r\n if (isGetDocumentCalled === false && signerDocument !== null) {\r\n setIsGetDocumentCalled(true);\r\n const personId = signerDocument.personId,\r\n signerType = signerDocument.signerType;\r\n getQuestions(personId, signerType)\r\n .then(questions => {\r\n if (\r\n props.onGetQuestions &&\r\n typeof props.onGetQuestions === \"function\"\r\n ) {\r\n props.onGetQuestions(questions);\r\n }\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n });\r\n }\r\n }, [isGetDocumentCalled, signerDocument, props]);\r\n\r\n //Does not render anything, just getDocument and set it to a state\r\n return null;\r\n};\r\n\r\nexport default CrsGetSecurityQuestions;\r\n","import React from \"react\";\r\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\r\nimport Radio from \"@material-ui/core/Radio\";\r\nimport TextField from \"@material-ui/core/TextField\";\r\n\r\nconst CrsQuestionItem = props => {\r\n const show = typeof props.show === \"boolean\" ? props.show : true;\r\n\r\n if (show === false) {\r\n return null;\r\n }\r\n\r\n return (\r\n <>\r\n }\r\n label={props.radioLabel}\r\n value={props.radioValue}\r\n />\r\n {props.radioValue === props.selectedValue ? (\r\n \r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nexport default CrsQuestionItem;\r\n","import React from \"react\";\r\nimport CrsQuestionItem from \"./CrsQuestionItem\";\r\n\r\nconst CrsQuestionList = props => {\r\n const show = typeof props.show === \"boolean\" ? props.show : true;\r\n const questions =\r\n Object.prototype.toString.call(props.questions) === \"[object Array]\"\r\n ? props.questions\r\n : [];\r\n if (show === false || questions.length <= 0) {\r\n return null;\r\n }\r\n const questionList = questions.map(question => (\r\n \r\n ));\r\n return questionList;\r\n};\r\n\r\nexport default CrsQuestionList;\r\n","import React from \"react\";\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport RadioGroup from \"@material-ui/core/RadioGroup\";\r\nimport FormControl from \"@material-ui/core/FormControl\";\r\nimport FormLabel from \"@material-ui/core/FormLabel\";\r\nimport CrsQuestionList from \"./CrsQuestionList\";\r\nimport Button from \"@material-ui/core/Button\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport { verifyAnswer } from \"../utils/ApiCalls\";\r\nimport { GenericErrorDialog, SecurityQuestionWrongAnswer } from '../generalConfiguration';\r\nimport { useDispatch } from 'react-redux';\r\nimport { showModalDialog } from '../redux/actions';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\n\r\nconst useStyles = makeStyles({\r\n root: {\r\n position: 'fixed',\r\n zIndex: 1,\r\n },\r\n center_content: {\r\n justifyContent: 'center'\r\n }\r\n});\r\n\r\nconst CrsSecurityQuestions = props => {\r\n const show = typeof props.show === \"boolean\" ? props.show : true;\r\n const questions =\r\n Object.prototype.toString.call(props.questions) === \"[object Array]\"\r\n ? props.questions\r\n : [];\r\n const signerDocument = typeof props.signerDocument === \"undefined\" ?\r\n null : props.signerDocument;\r\n const [questionId, setQuestionId] = React.useState(\"\");\r\n const [answer, setAnswer] = React.useState(\"\");\r\n const dispatch = useDispatch();\r\n const classes = useStyles();\r\n\r\n const handleChangeOption = event => {\r\n setQuestionId(event.target.value);\r\n };\r\n\r\n const handleChangeText = event => {\r\n setAnswer(event.target.value);\r\n };\r\n\r\n const handleOnClickVerifyAnswerButton = (event) => {\r\n const personId = signerDocument.personId,\r\n signerType = signerDocument.signerType;\r\n const questionIdNum = parseInt(questionId);\r\n verifyAnswer(personId, signerType, questionIdNum, answer)\r\n .then(verificationResponse => {\r\n if (props.onSecurityQuestionValidated\r\n && typeof props.onSecurityQuestionValidated === \"function\") {\r\n props.onSecurityQuestionValidated(verificationResponse.authenticated);\r\n }\r\n if (verificationResponse.authenticated === false) {\r\n dispatch(showModalDialog(SecurityQuestionWrongAnswer));\r\n }\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n });\r\n };\r\n\r\n return (\r\n 0}\r\n disableBackdropClick={false}\r\n disableEscapeKeyDown={true}\r\n >\r\n \r\n {props.title}\r\n \r\n \r\n \r\n {props.content}\r\n \r\n \r\n \r\n \r\n \r\n {props.questionsLabel}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {props.buttonLabel}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default CrsSecurityQuestions;\r\n","import { useState, useEffect } from \"react\";\r\nimport { sendToken } from \"../utils/ApiCalls\";\r\nimport { useDispatch } from 'react-redux';\r\nimport { GenericErrorDialog } from '../generalConfiguration';\r\nimport { showModalDialog } from '../redux/actions';\r\n\r\nconst CrsSendSecurityToken = (props) => {\r\n const execute = props.execute;\r\n const signerDocument = typeof props.signerDocument === \"undefined\" ?\r\n null : props.signerDocument;\r\n const [isTokenSent, setIsTokenSent] = useState(false);\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n if (execute === true && signerDocument !== null && isTokenSent === false) {\r\n sendToken(signerDocument.personId)\r\n .then(sendTokenResponse => {\r\n setIsTokenSent(true);\r\n if (props.onTokenSent && typeof props.onTokenSent == \"function\") {\r\n props.onTokenSent(sendTokenResponse.success);\r\n }\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n });\r\n }\r\n });\r\n\r\n // Does not render anything\r\n return null;\r\n};\r\n\r\nexport default CrsSendSecurityToken;","import React, { useState } from 'react';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport Button from '@material-ui/core/Button';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport FormLabel from \"@material-ui/core/FormLabel\";\r\nimport { verifyToken } from \"../utils/ApiCalls\";\r\nimport { GenericErrorDialog, VerificationTokenWrongAnswer } from '../generalConfiguration';\r\nimport { useDispatch } from 'react-redux';\r\nimport { showModalDialog } from '../redux/actions';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\n\r\nconst useStyles = makeStyles({\r\n root: {\r\n position: 'fixed',\r\n zIndex: 1,\r\n },\r\n center_content: {\r\n justifyContent: 'center'\r\n }\r\n});\r\n\r\nconst CrsVerifySecurityToken = (props) => {\r\n const show = typeof props.show === \"boolean\" ? props.show : true;\r\n const signerDocument = typeof props.signerDocument === \"undefined\" ?\r\n null : props.signerDocument;\r\n const [securityToken, setSecurityToken] = useState('');\r\n const dispatch = useDispatch();\r\n const classes = useStyles();\r\n\r\n const handleOnChangeSecurityToken = event => {\r\n setSecurityToken(event.target.value);\r\n };\r\n\r\n const handleVerifySecurityToken = event => {\r\n const personId = signerDocument.personId;\r\n verifyToken(personId, securityToken)\r\n .then(verificationResponse => {\r\n if (props.onSecurityTokenValidated &&\r\n typeof props.onSecurityTokenValidated === \"function\") {\r\n props.onSecurityTokenValidated(verificationResponse.authenticated);\r\n }\r\n if (verificationResponse.authenticated === false) {\r\n dispatch(showModalDialog(VerificationTokenWrongAnswer));\r\n }\r\n })\r\n .catch(err => {\r\n console.error(err);\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n {props.title}\r\n \r\n \r\n \r\n {props.content}\r\n \r\n \r\n {props.securityTokenComment}\r\n \r\n \r\n \r\n \r\n \r\n {props.verifyButtonLabel}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default CrsVerifySecurityToken;","import React, { useState } from \"react\";\r\nimport CrsGetSecurityQuestions from \"./CrsGetSecurityQuestions\";\r\nimport CrsSecurityQuestions from \"./CrsSecurityQuestions\";\r\nimport { useDispatch } from 'react-redux';\r\nimport {\r\n GenericErrorDialog,\r\n SecurityQuestions,\r\n SecurityToken\r\n} from '../generalConfiguration';\r\nimport { showModalDialog } from '../redux/actions';\r\nimport CrsSendSecurityToken from \"./CrsSendSecurityToken\";\r\nimport CrsVerifySecurityToken from \"./CrsVerifySecurityToken\";\r\n\r\nconst CrsAuthentication = props => {\r\n const show = typeof props.show === \"boolean\" ? props.show : true;\r\n const signerDocument = typeof props.signerDocument === \"undefined\" ?\r\n null : props.signerDocument;\r\n const [questions, setQuestions] = useState([]);\r\n const [isSecurityQuestionPassed, setIsSecurityQuestionPassed] = useState(false);\r\n const [isTokenSent, setIsTokenSent] = useState(false);\r\n const [isSecurityTokenPassed, setIsSecurityTokenPassed] = useState(false);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const handleOnGetQuestions = questions => {\r\n setQuestions(questions);\r\n };\r\n\r\n const handleOnTokenSent = success => {\r\n setIsTokenSent(success);\r\n if (success === false) {\r\n dispatch(showModalDialog(GenericErrorDialog));\r\n }\r\n };\r\n\r\n const handleOnSecurityQuestionValidated = (success) => {\r\n setIsSecurityQuestionPassed(success);\r\n };\r\n\r\n const handleOnSecurityTokenValidated = (passed) => {\r\n setIsSecurityTokenPassed(passed);\r\n if (props.onUserAuthenticated\r\n && typeof props.onUserAuthenticated === \"function\") {\r\n props.onUserAuthenticated(passed);\r\n }\r\n };\r\n\r\n if (show === false || signerDocument === null) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default CrsAuthentication;\r\n","import React from 'react';\r\nimport Card from '@material-ui/core/Card';\r\nimport { CardContent, CardActions, Button, CardHeader } from '@material-ui/core';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport styles from './CrsMainPage.module.scss';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\n\r\nconst useStyles = makeStyles({\r\n ackcontent: {\r\n textAlign: \"justify\",\r\n textJustify: \"inter-word\",\r\n whiteSpace: \"pre-wrap\"\r\n }\r\n});\r\n\r\nconst CrsAcknowledgement = (props) => {\r\n const show = props.show;\r\n const classes = useStyles();\r\n\r\n if (show) {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {props.content}\r\n \r\n \r\n \r\n \r\n {props.acceptButtonLabel}\r\n \r\n \r\n {props.rejectButtonLabel}\r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\nexport default CrsAcknowledgement;","import React from 'react';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogContentText from '@material-ui/core/DialogContentText';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport { Button } from '@material-ui/core';\r\n\r\nconst CrsRejectNotice = (props) => {\r\n const show = props.show;\r\n return (\r\n \r\n {props.title}\r\n \r\n {props.content}\r\n \r\n \r\n \r\n {props.closeButtonLabel}\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default CrsRejectNotice;","import React from 'react';\r\nimport Card from '@material-ui/core/Card';\r\nimport { CardContent, CardHeader } from '@material-ui/core';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport { PreviouslySubmitted } from '../generalConfiguration';\r\nimport styles from './CrsMainPage.module.scss';\r\n\r\nconst CrsDocumentPreviouslySubmitted = (props) => {\r\n const show = props.show;\r\n if (show) {\r\n\r\n return (\r\n <>\r\n \r\n
\r\n \r\n \r\n

\r\n {PreviouslySubmitted.title}\r\n

\r\n \r\n {PreviouslySubmitted.content}\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n};\r\n\r\nexport default CrsDocumentPreviouslySubmitted;","import React from 'react';\r\nimport Card from '@material-ui/core/Card';\r\nimport { CardContent, CardHeader } from '@material-ui/core';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport { SignatureRejected } from '../generalConfiguration';\r\nimport styles from './CrsMainPage.module.scss';\r\n\r\nconst CrsDocumentSignatureRejected = (props) => {\r\n const show = props.show;\r\n if (show) {\r\n\r\n return (\r\n <>\r\n \r\n
\r\n \r\n \r\n

\r\n {SignatureRejected.title}\r\n

\r\n \r\n {SignatureRejected.content}\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n\r\n }\r\n else {\r\n return null;\r\n }\r\n};\r\n\r\nexport default CrsDocumentSignatureRejected;","import React from 'react';\r\nimport Card from '@material-ui/core/Card';\r\nimport { CardContent, CardHeader } from '@material-ui/core';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport { Canceled } from '../generalConfiguration';\r\nimport styles from './CrsMainPage.module.scss';\r\n\r\nconst CrsDocumentCanceled = (props) => {\r\n const show = props.show;\r\n if (show) {\r\n\r\n return (\r\n <>\r\n \r\n
\r\n \r\n \r\n

\r\n {Canceled.title}\r\n

\r\n \r\n {Canceled.content}\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n\r\n }\r\n else {\r\n return null;\r\n }\r\n};\r\n\r\nexport default CrsDocumentCanceled;","import React from 'react';\r\nimport Card from '@material-ui/core/Card';\r\nimport { CardContent, CardHeader } from '@material-ui/core';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport { Expired } from '../generalConfiguration';\r\nimport styles from './CrsMainPage.module.scss';\r\n\r\nconst CrsDocumentExpired = (props) => {\r\n const show = props.show;\r\n if (show) {\r\n\r\n return (\r\n <>\r\n \r\n
\r\n \r\n \r\n

\r\n {Expired.title}\r\n

\r\n \r\n {Expired.content}\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n\r\n }\r\n else {\r\n return null;\r\n }\r\n};\r\n\r\nexport default CrsDocumentExpired;","import React, { useState } from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport CrsBodyDrawer from './CrsBodyDrawer';\r\nimport CrsMainGrid from './CrsMainGrid';\r\nimport CrsModalDialog from './CrsModalDialog';\r\nimport CrsGetSignerDocument from './CrsGetSignerDocument';\r\nimport CrsAuthentication from './CrsAuthentication';\r\nimport { TermsAndConditions } from '../generalConfiguration';\r\nimport CrsAcknowledgement from './CrsAcknowledgement';\r\nimport CrsRejectNotice from './CrsRejectNotice';\r\nimport CrsDocumentPreviouslySubmitted from './CrsDocumentPreviouslySubmitted';\r\nimport CrsDocumentSignatureRejected from './CrsDocumentSignatureRejected';\r\nimport CrsDocumentCanceled from './CrsDocumentCanceled'\r\nimport CrsDocumentExpired from './CrsDocumentExpired'\r\nconst CrsBody = (props) => {\r\n const drawerWidth = props.drawerWidth;\r\n const show = typeof props.show === \"boolean\" ? props.show : true;\r\n const useStyles = makeStyles((theme) => ({\r\n toolbar: {\r\n overflowX: 'hidden',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'flex',\r\n padding: theme.spacing(0, 1),\r\n // necessary for content to be below app bar\r\n ...theme.mixins.toolbar,\r\n },\r\n content: {\r\n flexGrow: 1,\r\n padding: '0px',\r\n marginLeft: '0px',\r\n\r\n },\r\n }));\r\n const classes = useStyles();\r\n\r\n const [showAcknowledgement, setShowAcknowledgement] = React.useState(true);\r\n const [isAckAccepted, setAckAccepted] = useState(false);\r\n const [isAckRejected, setAckRejected] = useState(false);\r\n\r\n const [signerDocument, setSignerDocument] = useState(null);\r\n const [isDocumentRead, setIsDocumentRead] = useState(false);\r\n const [pdfContainsInitials, setPdfContainsInitials] = useState(false);\r\n const [signatureData, setSignatureData] = useState(null);\r\n const [signedPdf, setSignedPdf] = useState(null);\r\n const [isUserAuthenticated, setIsUserAuthenticated] = useState(false);\r\n\r\n const handleOnGetSignerDocument = (gettedSignerDocument) => {\r\n setSignerDocument(gettedSignerDocument);\r\n setIsUserAuthenticated(!gettedSignerDocument.requires2fa);\r\n };\r\n\r\n const handleOnUserScrollPdf = (pdfData) => {\r\n if (isDocumentRead === false) {\r\n setIsDocumentRead(true);\r\n if (pdfData.includesInitials) {\r\n setPdfContainsInitials(true);\r\n }\r\n }\r\n };\r\n\r\n const handleOnApplySignature = (signatureData) => {\r\n setSignatureData(signatureData);\r\n }\r\n\r\n const handleOnCreateSignedPdf = (pdfBase64) => {\r\n setSignatureData(null);\r\n setSignedPdf(pdfBase64);\r\n };\r\n\r\n const handleOnClearSignedPdf = () => {\r\n setSignatureData(null);\r\n setSignedPdf(null);\r\n };\r\n\r\n const handleOnUserAuthenticated = (authenticated) => {\r\n setIsUserAuthenticated(authenticated);\r\n };\r\n\r\n if (show) {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n \r\n {\r\n setShowAcknowledgement(false);\r\n setAckRejected(false);\r\n setAckAccepted(true);\r\n }}\r\n onReject={() => {\r\n setShowAcknowledgement(true);\r\n setAckAccepted(false);\r\n setAckRejected(true);\r\n }}\r\n />\r\n {\r\n setShowAcknowledgement(true);\r\n setAckAccepted(false);\r\n setAckRejected(false);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\nexport default CrsBody;","import React from 'react';\r\nimport Card from '@material-ui/core/Card';\r\nimport { CardContent, CardHeader } from '@material-ui/core';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport { InvalidUrlNotice } from '../generalConfiguration';\r\nimport styles from './CrsMainPage.module.scss';\r\n\r\nconst CrsInvalidUrl = (props) => {\r\n return (\r\n \r\n
\r\n \r\n \r\n

\r\n {InvalidUrlNotice.title}\r\n

\r\n \r\n {InvalidUrlNotice.content}\r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default CrsInvalidUrl;","import React from 'react';\r\nimport clsx from 'clsx';\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Toolbar from '@material-ui/core/Toolbar';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport MenuIcon from '@material-ui/icons/Menu';\r\nimport Typography from '@material-ui/core/Typography';\r\nimport styles from './CrsMainPage.module.scss';\r\nimport crslogo from '../assets/images/CRS_Logo.svg';\r\nimport { makeStyles, ThemeProvider, createMuiTheme } from '@material-ui/core/styles';\r\n\r\nconst theme = createMuiTheme({\r\n});\r\n\r\nconst CrsAppBar = (props) => {\r\n const drawerWidth = props.drawerWidth;\r\n const useStyles = makeStyles((theme) => ({\r\n appBar: {\r\n zIndex: theme.zIndex.drawer + 1,\r\n transition: theme.transitions.create(['width', 'margin'], {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.leavingScreen,\r\n }),\r\n height: '70px'\r\n },\r\n appBarShift: {\r\n marginLeft: drawerWidth,\r\n width: `calc(100% - ${drawerWidth}px)`,\r\n transition: theme.transitions.create(['width', 'margin'], {\r\n easing: theme.transitions.easing.sharp,\r\n duration: theme.transitions.duration.enteringScreen,\r\n }),\r\n },\r\n menuButton: {\r\n display: 'none',\r\n marginRight: 26,\r\n },\r\n hide: {\r\n display: 'none',\r\n },\r\n }));\r\n const classes = useStyles();\r\n const [open, setOpen] = React.useState(false);\r\n\r\n const handleDrawerOpen = () => {\r\n setOpen(true);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n {'Crop\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default CrsAppBar;","import React from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport CssBaseline from '@material-ui/core/CssBaseline';\r\nimport {\r\n BrowserRouter as Router,\r\n Route,\r\n Switch\r\n} from \"react-router-dom\";\r\nimport CrsBody from './CrsBody';\r\nimport CrsInvalidUrl from './CrsInvalidUrl';\r\nimport CrsAppBar from './CrsAppBar';\r\n\r\nconst drawerWidth = 300;\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n root: {\r\n display: 'flex',\r\n }\r\n}));\r\n\r\nconst CrsMainPage = () => {\r\n const classes = useStyles();\r\n const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n (\r\n <>\r\n \r\n \r\n )} />\r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default CrsMainPage;","import React, { Component } from 'react';\r\nimport { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';\r\nimport styles from './App.scss';\r\nimport CrsMainPage from './components/CrsMainPage';\r\n\r\nconst theme = createMuiTheme({\r\n palette: {\r\n primary: {\r\n //light: will be calculated from palette.primary.main,\r\n main: '#009CDE',\r\n text: '#000000',\r\n // dark: will be calculated from palette.primary.main,\r\n // contrastText: will be calculated to contrast with palette.primary.main\r\n },\r\n secondary: {\r\n light: '#002554',\r\n main: '#002554',\r\n // dark: will be calculated from palette.secondary.main,\r\n //contrastText: '#000000',\r\n },\r\n // Used by `getContrastText()` to maximize the contrast between\r\n // the background and the text.\r\n contrastThreshold: 3,\r\n // Used by the functions below to shift a color's luminance by approximately\r\n // two indexes within its tonal palette.\r\n // E.g., shift from Red 500 to Red 300 or Red 700.\r\n tonalOffset: 0.2,\r\n },\r\n});\r\n\r\nexport default class App extends Component {\r\n static displayName = App.name;\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","// In production, we register a service worker to serve assets from local cache.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport default function register () {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Lets check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl);\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW (swUrl) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a \"New content is\r\n // available; please refresh.\" message in your web app.\r\n console.log('New content is available; please refresh.');\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker (swUrl) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n if (\r\n response.status === 404 ||\r\n response.headers.get('content-type').indexOf('javascript') === -1\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister () {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","let initialState = {\r\n modalDialogInput: null,\r\n modalDialogOutput: null\r\n};\r\n\r\nconst modalDialogReducer = (state = initialState, action) => {\r\n switch (action.type) {\r\n case 'MODAL_DIALOG_SHOW':\r\n return Object.assign({}, state, {\r\n modalDialogInput: action.payload\r\n });\r\n case 'MODAL_DIALOG_CLOSED':\r\n return Object.assign({}, state, {\r\n modalDialogOutput: action.payload\r\n });\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport default modalDialogReducer;","import modalDialogReducer from './modalDialog';\r\nimport { combineReducers } from 'redux';\r\nexport * from './modalDialog';\r\n\r\nconst allReducers = combineReducers({\r\n modalDialog: modalDialogReducer,\r\n});\r\n\r\nexport default allReducers;","import { createStore } from 'redux';\r\nimport allReducers from '../redux/reducers';\r\n\r\nconst store = createStore(\r\n allReducers,\r\n window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()\r\n);\r\n\r\nexport default store;","import 'bootstrap/dist/css/bootstrap.css';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport App from './App';\r\nimport registerServiceWorker from './registerServiceWorker';\r\nimport { Provider } from 'react-redux';\r\nimport store from './redux/store';\r\n\r\nconst rootElement = document.getElementById('root');\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n rootElement);\r\n\r\nregisterServiceWorker();","// extracted by mini-css-extract-plugin\nmodule.exports = {\"signature__layout\":\"CrsSignaturePanel_signature__layout__3Rt3r\",\"signature__grid\":\"CrsSignaturePanel_signature__grid__3byQ0\",\"signature__grid--blur\":\"CrsSignaturePanel_signature__grid--blur__y_6Vg\",\"signature__grid-canvas\":\"CrsSignaturePanel_signature__grid-canvas__2RnNK\",\"signature__actions\":\"CrsSignaturePanel_signature__actions__1Rkuj\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"home\":\"CrsMainPage_home__1j3yC\",\"toolbar\":\"CrsMainPage_toolbar__2tIeJ\",\"image\":\"CrsMainPage_image__u7aYD\",\"card\":\"CrsMainPage_card__1vr3v\",\"card--blur\":\"CrsMainPage_card--blur__33itX\",\"card--content\":\"CrsMainPage_card--content__3Auxq\",\"card--h\":\"CrsMainPage_card--h__2aJum\",\"action\":\"CrsMainPage_action__ogw74\"};"],"sourceRoot":""}