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IAAKJ,EAAMhB,KACXF,UAAU,WACV,aAAW,UAIjBpB,EAAAA,cAAA,WACEA,EAAAA,cAAA,OAAKoB,UAAU,+BACXO,KAAKC,EAAE,gCAEX5B,EAAAA,cAAA,OAAKoB,UAAU,8BACXkB,EAAMhB,QAMdiB,EAASiB,SAAWxD,EAAAA,cAACwC,EAAoB,QAMjDxC,EAAAA,cAAA,OAAKoB,UAAU,+DACViB,GAAaE,EAASiB,SAAWxD,EAAAA,cAACwC,EAAoB,OAIjE,C","sources":["webpack:///./app/javascript/components/DetailedViewHeader/Contacts/SmallContactBlock.jsx","webpack:///./app/javascript/components/DetailedViewHeader/Contacts/index.jsx"],"sourcesContent":["import React, { useState } from 'react';\nimport CryptoJS from \"crypto-js\";\n\nimport { postLocationContactDetailsShown } from '../../../utils/api';\nimport { SvgIco } from '../../SharedComponents/Icons';\n\n\nconst SmallContactBlock = ({ addressLine1,\n contact,\n locationId,\n siteKey,\n streetName,\n }) => {\n\n const [isContactsShown, setIsContactsShown] = useState(false);\n const [contactEmail, setContactEmail] = useState(null);\n\n const address = streetName || addressLine1;\n\n\n const handleEmail = () => {\n const encodedEmail = CryptoJS.enc.Base64.parse(contact.tag);\n const key = CryptoJS.enc.Utf8.parse('75smg2w68qmy2ori75smg2w68qmy2ori');\n const iv = CryptoJS.enc.Utf8.parse('javatzwkbnkmih8t');\n const decryptEmail = CryptoJS.AES.decrypt({ ciphertext: encodedEmail }, key, { iv: iv, mode: CryptoJS.mode.CBC });\n const originalEmail = decryptEmail.toString(CryptoJS.enc.Utf8);\n\n return originalEmail;\n };\n\n const handleClick = () => {\n setIsContactsShown(true);\n setContactEmail(handleEmail());\n postLocationContactDetailsShown(locationId)\n .catch(error => console.log('Error: ', error));\n };\n\n\n return (\n
{ I18n.t('generic.contact_details') }
\n\n