{"version":3,"sources":["campaign/shared/WizardSteps/WizardSteps.module.css","campaign/LaunchModal/LaunchModal.module.css","campaign/ui/Modal/Modal.module.css","campaign/ui/Backdrop/Backdrop.module.css","campaign/shared/Footer/Footer.module.css","campaign/shared/MetaHeaders.js","FormForAPI.js","FieldWithErrors.js","Loading.js","campaign/ManagerPhoto.js","campaign/shared/HowItWorks.js","campaign/Sidebar.js","campaign/HeroImage.js","campaign/Header.js","campaign/ui/Backdrop/Backdrop.js","campaign/ui/Modal/Modal.js","campaign/PromosModal.js","campaign/shared/Footer/index.js","campaign/Edit.js","campaign/LaunchModal/index.js","campaign/Show.js","history.js","campaign/index.js","campaign/landing.js","campaign/shared/WizardSteps/SingleStep.js","campaign/shared/WizardSteps/index.js","i18n.js","App.js","serviceWorker.js","index.js"],"names":["module","exports","MetaHeaders","props","campaign","Helmet","charSet","title","name","content","description","FormForAPI","onSubmit","validate","initialValues","onSubmitWithErrors","data","a","response","error","reduce","acc","attribute","message","FORM_ERROR","onSuccess","undefined","mutators","setField","state","field","value","changeValue","arrayMutators","render","handleSubmit","submitError","form","submitFailed","meta","className","children","Object","prototype","toString","call","Function","FieldWithErrors","parse","input","React","createElement","component","assign","style","rows","placeholder","touched","Loading","icon","faSpinner","size","spin","ManagerPhoto","uuid","useState","managerPhotoUploading","setManagerPhotoUploading","useForm","type","subscription","managerPhotoUrl","background","backgroundImage","width","height","padding","margin","textAlign","htmlFor","accept","signingUrl","signingUrlHeaders","Accept","uploadRequestHeaders","onProgress","percent","onFinish","publicUrl","onError","id","disabled","scrubFilename","fn","ext","split","pop","HowItWorks","Fragment","Sidebar","required","submitting","pristine","fields","map","index","key","display","onClick","remove","length","push","HeroImage","heroImageUploading","setHeroImageUploading","heroImageProgress","setHeroImageProgress","heroImageUrl","Header","promos","useFieldArray","openPromoModalForEditing","flexDirection","promo","i","Number","parseFloat","toFixed","price","maxVouchers","Backdrop","show","modalClose","classes","Modal","transform","opacity","PromosModal","onClose","open","promoForEditing","fontWeight","Footer","secondaryLink","Container","Children","only","EditCampaign","promoFormOpen","setState","closePromoModal","this","campaignData","t","secondaryFooterLink","marginLeft","color","textDecoration","href","target","rel","values","flexWrap","marginBottom","position","initialValue","onChange","formProps","Component","withTranslation","LaunchModal","url","dashboardLink","campaignActive","setCampaignActive","setCampaignStatusToActive","console","log","SuccessContent","clicked","setClicked","Heading","SubHeading","TextFieldWrapper","TextField","readOnly","classNames","CopyLabel","CopyLabelClicked","copyToClipboard","VisitDashboardLink","AcceptTermsContent","termsAccepted","setTermsAccepted","emailAccepted","setEmailAccepted","errored","setErrored","TermsWrapper","TermsLabel","TermsInput","ErrorMessage","Button","str","el","document","body","appendChild","select","execCommand","removeChild","ShowCampaign","date","isLaunchStep","useTranslation","launchModalOpen","setLaunchModalOpen","subtitle","src","alt","whiteSpace","managerName","bulletPoints","bp","address","phone","website","facebook","instagram","timeframe","Date","toLocaleDateString","day","month","year","ownTerms","ot","history","createBrowserHistory","debounce","func","wait","immediate","timeout","context","args","arguments","later","apply","callNow","clearTimeout","setTimeout","EditCampaignContainer","defaultCampaignData","match","params","componentDidMount","fetch","method","mode","headers","responseJSON","json","update","submit","preview","JSON","stringify","Edit","PreviewCampaignContainer","edit","Show","onEdit","CampaignLanding","slug","stepMapping","1","2","4","SingleStep","stepLabel","stepNumber","currentRoute","isFirst","isLast","isActive","useCallback","slice","StepBoxContainer","StepBox","ConnectorLeft","StepNumber","StepNumberActive","ConnectorRight","StepLabel","withRouter","location","pathname","i18n","use","initReactI18next","LanguageDetector","init","resources","en","translation","de","load","fallbackLng","keySeparator","interpolation","escapeValue","detection","order","lookupQuerystring","lookupCookie","lookupLocalStorage","debug","App","replace","c","r","Math","random","exact","path","to","generateUuid","Boolean","window","hostname","ReactDOM","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch"],"mappings":"4EACAA,EAAOC,QAAU,CAAC,UAAY,+BAA+B,iBAAmB,sCAAsC,QAAU,6BAA6B,WAAa,gCAAgC,iBAAmB,sCAAsC,U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D,MACA,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAOuF,OAAK,EAACC,KAAK,gBAAgBnS,OAAQ,kBACxC,kBAAC,IAAD,CAAUoS,GAAE,wBAAmB,EAAKC,qBAEtC,kBAAC,IAAD,CAAOH,OAAK,EAACC,KAAM,sBAAuBjR,UAAWwM,KACrD,kBAAC,IAAD,CAAOwE,OAAK,EAACC,KAAM,iBAAkBjR,UAAWyN,KAChD,kBAAC,IAAD,CAAOuD,OAAK,EAACC,KAAM,gBAAiBjR,UAAW,SAACjD,GAAD,OAC7C,kBAAC,GAAD,iBAA8BA,EAA9B,CAAqCkN,cAAc,QAErD,kBAAC,IAAD,CAAOgH,KAAK,SAASjR,UAAW6N,Y,GApB1B/N,IAAMsH,WCTJgK,QACW,cAA7BC,OAAOjC,SAASkC,UAEe,UAA7BD,OAAOjC,SAASkC,UAEhBD,OAAOjC,SAASkC,SAAS5E,MACvB,2DCZN6E,IAASzS,OAAO,kBAAC,GAAD,MAAS2K,SAAS+H,eAAe,SD6H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBC,MAAK,SAAAC,GACJA,EAAaC,gBAEdC,OAAM,SAAAhU,GACL6J,QAAQ7J,MAAMA,EAAMI,c","file":"static/js/main.88961342.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"Container\":\"WizardSteps_Container__d1G6X\",\"StepBoxContainer\":\"WizardSteps_StepBoxContainer__wF2LN\",\"StepBox\":\"WizardSteps_StepBox__1Gxw8\",\"StepNumber\":\"WizardSteps_StepNumber__1ZRQI\",\"StepNumberActive\":\"WizardSteps_StepNumberActive__3amyg\",\"StepLabel\":\"WizardSteps_StepLabel__LXdVY\",\"ConnectorRight\":\"WizardSteps_ConnectorRight__gIPOK\",\"ConnectorLeft\":\"WizardSteps_ConnectorLeft__xn1qi\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Heading\":\"LaunchModal_Heading__3qL_x\",\"SubHeading\":\"LaunchModal_SubHeading__2oRlQ\",\"TextField\":\"LaunchModal_TextField__10AF_\",\"TextFieldWrapper\":\"LaunchModal_TextFieldWrapper__2KyBu\",\"CopyLabel\":\"LaunchModal_CopyLabel__2OSCp\",\"CopyLabelClicked\":\"LaunchModal_CopyLabelClicked__2NyD-\",\"VisitDashboardLink\":\"LaunchModal_VisitDashboardLink__qLQbA\",\"TermsWrapper\":\"LaunchModal_TermsWrapper__2XFSj\",\"TermsLabel\":\"LaunchModal_TermsLabel__lREJp\",\"TermsInput\":\"LaunchModal_TermsInput__8XQN3\",\"Button\":\"LaunchModal_Button__mcy6G\",\"ErrorMessage\":\"LaunchModal_ErrorMessage__39ua1\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Modal\":\"Modal_Modal__22E28\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Backdrop\":\"Backdrop_Backdrop__3Ih-G\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Container\":\"Footer_Container__2PC_F\",\"NextLabel\":\"Footer_NextLabel__36Mei\"};","import React from \"react\";\nimport { Helmet } from \"react-helmet\";\n\nexport default function MetaHeaders(props) {\n const campaign = props.campaign;\n\n return (\n \n \n {campaign.title}\n \n {/* */}\n \n );\n}\n","import React from \"react\";\nimport { Form } from \"react-final-form\";\nimport { FORM_ERROR } from \"final-form\";\nimport PropTypes from \"prop-types\";\nimport arrayMutators from \"final-form-arrays\";\n\nfunction FormForAPI(props) {\n const { onSubmit, validate, initialValues } = props;\n\n const onSubmitWithErrors = async data => {\n let response = await onSubmit(data);\n\n if (response.error) {\n if (response.error) {\n return response.error.reduce((acc, error) => {\n acc[error.attribute] = error.message;\n return acc;\n }, {});\n } else {\n return { [FORM_ERROR]: response.message };\n }\n } else {\n if (props.onSuccess) {\n props.onSuccess();\n }\n return undefined;\n }\n };\n\n const setField = (field, value, state, changeValue) =>\n changeValue(state, field, () => value);\n\n const isFunction = value =>\n value &&\n (Object.prototype.toString.call(value) === \"[object Function]\" ||\n \"function\" === typeof value ||\n value instanceof Function);\n\n return (\n \n setField(field, value, state, changeValue),\n ...arrayMutators\n }}\n render={({\n handleSubmit,\n error,\n submitError,\n form,\n submitFailed,\n meta\n }) => (\n
\n {submitFailed && (error || submitError) ? (\n
{error || submitError}
\n ) : null}\n {isFunction(props.children)\n ? props.children({ ...form })\n : props.children}\n
\n )}\n />\n );\n}\n\nFormForAPI.propTypes = {\n onSubmit: PropTypes.func.isRequired,\n initialValues: PropTypes.object.isRequired\n};\n\nexport default FormForAPI;\n","import React from \"react\";\nimport { Field } from \"react-final-form\";\n\nexport default function FieldWithErrors(props) {\n // Patch for empty values not being submitted https://github.com/final-form/react-final-form/issues/130#issuecomment-425482365\n const identity = value => value;\n\n return (\n \n {({ input, meta }) => (\n
\n {React.createElement(\n props.component,\n Object.assign(\n {},\n {\n style: props.style,\n rows: props.rows,\n placeholder: props.placeholder,\n className: props.className,\n },\n input\n ),\n props.children\n )}\n {(meta.error || meta.submitError) && meta.touched && (\n
{meta.error || meta.submitError}
\n )}\n
\n )}\n
\n );\n}\n","import React from \"react\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\n\nexport default function Loading(props) {\n return ;\n}\n","import React, { useState } from \"react\";\nimport ReactS3Uploader from \"react-s3-uploader\";\nimport { Field, useForm } from \"react-final-form\";\nimport Loading from \"../Loading\";\n\nconst API_HOST =\n process.env.NODE_ENV === \"production\" ? \"\" : \"http://localhost:3001\";\n\nexport default function ManagerPhoto(props) {\n const { uuid } = props;\n const [managerPhotoUploading, setManagerPhotoUploading] = useState(false);\n const form = useForm();\n\n return (\n \n {({ input: { value: managerPhotoUrl } }) => (\n \n {managerPhotoUploading ? (\n \n ) : (\n \n {\"+\"}\n \n )}\n {\n setManagerPhotoUploading(true);\n }}\n onFinish={({ publicUrl }) => {\n setManagerPhotoUploading(false);\n form.mutators.setField(\"managerPhotoUrl\", publicUrl);\n }}\n onError={() => {\n setManagerPhotoUploading(false);\n }}\n id=\"managerPhotoUrl\"\n disabled={managerPhotoUploading}\n scrubFilename={fn => {\n const ext = [...fn.split(\".\")].pop();\n return `${uuid}-manager.${ext}`;\n }}\n />\n \n )}\n \n );\n}\n","import React from \"react\";\n\nexport default function HowItWorks(props) {\n return (\n \n

How Vouchers Work

\n
    \n
  1. \n Support Now\n \n COVID-19 is hitting our community hard. Support your favorite local\n business by buying vouchers.\n \n
  2. \n
  3. \n Enjoy Later\n \n Buy vouchers today that can be used tomorrow. Once business can open\n their doors safely, you'll have a discounted voucher to use.\n \n
  4. \n
  5. \n Stronger Together\n Now is time to come together and support our community.\n
  6. \n
\n
\n );\n}\n","import React from \"react\";\nimport HowItWorks from \"./shared/HowItWorks\";\nimport { FieldArray } from \"react-final-form-arrays\";\nimport FieldWithErrors from \"../FieldWithErrors\";\n\nexport default function Sidebar(props) {\n const required = value => (value ? undefined : \"Required\");\n\n return (\n
\n \n

Terms & Conditions

\n Use by{\" \"}\n {\" \"}\n Max vouchers per customer{\" \"}\n \n \n {({ fields }) => (\n
\n {fields.map((name, index) => (\n
\n \n fields.remove(index)}\n className=\"button--remove\"\n >\n ×\n \n
\n ))}\n {fields.length < 5 ? (\n \n ) : null}\n
\n )}\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport ReactS3Uploader from \"react-s3-uploader\";\nimport { Field, useForm } from \"react-final-form\";\nimport Loading from \"../Loading\";\n\nconst API_HOST =\n process.env.NODE_ENV === \"production\" ? \"\" : \"http://localhost:3001\";\n\nexport default function HeroImage(props) {\n const { uuid } = props;\n const [heroImageUploading, setHeroImageUploading] = useState(false);\n const [heroImageProgress, setHeroImageProgress] = useState(null);\n const form = useForm();\n\n return (\n \n {({ input: { value: heroImageUrl } }) => (\n \n {\n setHeroImageUploading(true);\n setHeroImageProgress(percent);\n }}\n onFinish={({ publicUrl }) => {\n setHeroImageUploading(false);\n setHeroImageProgress(null);\n form.mutators.setField(\"heroImageUrl\", publicUrl);\n }}\n onError={() => {\n setHeroImageUploading(false);\n setHeroImageProgress(null);\n }}\n id=\"heroImageUrl\"\n disabled={heroImageUploading}\n scrubFilename={fn => {\n const ext = [...fn.split(\".\")].pop();\n return `${uuid}-hero.${ext}`;\n }}\n />\n {heroImageUploading ? null : (\n \n )}\n {heroImageUploading ? (\n \n Uploading... {heroImageProgress}%\n \n ) : null}\n \n )}\n \n );\n}\n","import React from \"react\";\nimport { Field } from \"react-final-form\";\nimport FieldWithErrors from \"../FieldWithErrors\";\nimport HeroImage from \"./HeroImage\";\nimport { useFieldArray } from \"react-final-form-arrays\";\n\nexport default function Header(props) {\n const required = value => (value ? undefined : \"Required\");\n const { fields: promos } = useFieldArray(\"promos\", {\n subscription: { submitting: true, pristine: true, value: true }\n });\n\n const { uuid, openPromoModalForEditing } = props;\n\n return (\n
\n \n
\n \n
\n \n \n\n \n\n
\n
\n {promos.value.map((promo, i) => (\n
\n \n
\n promos.remove(i)}\n className=\"button--remove promo\"\n >\n ×\n \n openPromoModalForEditing(i)}\n className=\"button promo\"\n >\n Edit\n \n
\n \n \n \n
\n ))}\n {promos.length < 4 ? (\n {\n promos.push({});\n openPromoModalForEditing(null);\n }}\n style={{ margin: \"0 auto\", display: \"block\" }}\n >\n Add a voucher\n \n ) : null}\n
\n
\n
\n );\n}\n","import React from \"react\";\nimport classes from \"./Backdrop.module.css\";\n\nconst Backdrop = props => {\n return props.show ? (\n
\n ) : null;\n};\n\nexport default Backdrop;\n","import React, { Fragment } from \"react\";\nimport classes from \"./Modal.module.css\";\nimport Backdrop from \"../Backdrop/Backdrop\";\n\nconst Modal = props => {\n return (\n \n \n \n { props.show ? props.children : null }\n \n \n );\n};\n\nexport default Modal;\n","import React from \"react\";\nimport FieldWithErrors from \"../FieldWithErrors\";\nimport Modal from \"./ui/Modal/Modal\";\nimport { useFieldArray } from \"react-final-form-arrays\";\n\nexport default function PromosModal(props) {\n const required = value => (value ? undefined : \"Required\");\n const { fields: promos } = useFieldArray(\"promos\", {\n subscription: { submitting: true, pristine: true, value: true }\n });\n\n const { onClose, open, promoForEditing } = props;\n const index = promoForEditing === null ? promos.length - 1 : promoForEditing;\n\n return (\n \n

Add a Voucher

\n
\n \n Voucher Value\n
\n \n \n\n
\n \n Selling Price\n
\n \n \n\n
\n \n Amount Available\n
\n \n \n\n
\n \n
\n
\n );\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\n\nimport classes from './Footer.module.css';\n\nfunction Footer({ secondaryLink, children }) {\n\n return (\n
\n\n {secondaryLink}\n {React.Children.only(children)}\n
\n );\n}\n\nFooter.propTypes = {\n nextStepLabel: PropTypes.string\n};\n\n\nexport default Footer;\n","import React, { Component, Fragment } from \"react\";\nimport MetaHeaders from \"./shared/MetaHeaders\";\nimport FormForAPI from \"../FormForAPI\";\nimport FieldWithErrors from \"../FieldWithErrors\";\nimport { Field, FormSpy } from \"react-final-form\";\nimport { FieldArray } from \"react-final-form-arrays\";\nimport { FORM_ERROR } from \"final-form\";\nimport ManagerPhoto from \"./ManagerPhoto\";\nimport Sidebar from \"./Sidebar\";\nimport Header from \"./Header\";\nimport PromosModal from \"./PromosModal\";\nimport { withTranslation } from 'react-i18next';\nimport Footer from \"./shared/Footer\";\n\nclass EditCampaign extends Component {\n state = {\n promoFormOpen: false,\n promoForEditing: null\n };\n\n openPromoModalForEditing = index => {\n this.setState({\n promoFormOpen: true,\n promoForEditing: index\n });\n };\n\n closePromoModal = () => {\n this.setState({\n promoFormOpen: false,\n promoForEditing: null\n });\n };\n\n\n render() {\n const campaign = this.props.campaignData;\n const { t } = this.props;\n\n const required = value => (value ? undefined : \"Required\");\n const secondaryFooterLink = \n Get Help\n ;\n\n return (\n \n \n \n values.promos.length === 0\n ? { [FORM_ERROR]: \"You must add at least one promo\" }\n : undefined\n }\n children={form => (\n \n \n\n \n\n \n

{t('teamMessage')}

\n \n\n
\n \n\n \n
\n\n

You are supporting

\n
\n \n {({ fields }) => {\n return (\n
\n {fields.map((name, index) => (\n
\n \n {index ? (\n fields.remove(index)}\n className=\"button--remove\"\n >\n ×\n \n ) : null}\n
\n ))}\n {fields.length < 7 ? (\n fields.push(\" \")}\n >\n Add another reason\n \n ) : null}\n
\n );\n }}\n \n
\n\n

Visit Us

\n\n \n\n \n\n \n\n \n\n \n
\n \n {t('showPreview')}\n \n
\n \n\n \n\n \n\n \n formProps.pristine\n ? null\n : this.props.onChange(formProps.values)\n }\n />\n \n )}\n />{\" \"}\n {/* END FormForAPI */}\n\n
\n );\n }\n}\n\nexport default withTranslation()(EditCampaign);\n","import React, { useState } from \"react\";\nimport classNames from 'classnames';\n\nimport Modal from \"./../ui/Modal/Modal\";\n\nimport classes from './LaunchModal.module.css';\n\nconst LaunchModal = ({ onClose, open, url, dashboardLink }) => {\n const [campaignActive, setCampaignActive] = useState(false);\n\n const setCpActive = () => {\n console.log('setting to active');\n setCampaignActive(true);\n };\n\n return (\n \n {!campaignActive && }\n {campaignActive && }\n \n );\n};\n\nexport default LaunchModal;\n\n\nconst SuccessContent = ({ url, dashboardLink, }) => {\n const [clicked, setClicked] = useState(false);\n\n return (<>\n Voucher Campaign is Live!\n\n Invite Customers\n
\n \n {\n setClicked(true);\n copyToClipboard(url)\n }}\n >\n Copy\n \n
\n Visit Dashboard\n )\n};\n\nconst AcceptTermsContent = ({ setCampaignStatusToActive }) => {\n const [termsAccepted, setTermsAccepted] = useState(false);\n const [emailAccepted, setEmailAccepted] = useState(false);\n const [errored, setErrored] = useState(false);\n\n const clickHandler = () => {\n console.log(termsAccepted);\n console.log(emailAccepted);\n if (!termsAccepted || !emailAccepted) {\n setErrored(true);\n return;\n }\n console.log('both accepted');\n // make api call here and when it succeeds call setCampaignStatusToActive\n setCampaignStatusToActive(true);\n };\n\n return (
\n Payment has been connected!\n\n Please accept the terms of use and data processing agreement\n \n \n {errored && Please Accept all Terms before proceeding}\n \n Activate Campaign\n \n
)\n};\n\nconst copyToClipboard = str => {\n const el = document.createElement('textarea');\n el.value = str;\n document.body.appendChild(el);\n el.select();\n document.execCommand('copy');\n document.body.removeChild(el);\n};\n","import React, { useState } from \"react\";\nimport HowItWorks from \"./shared/HowItWorks\";\nimport MetaHeaders from \"./shared/MetaHeaders\";\nimport { useTranslation } from 'react-i18next';\nimport Footer from \"./shared/Footer\";\nimport LaunchModal from './LaunchModal';\n\nconst API_HOST =\n process.env.NODE_ENV === \"production\" ? \"\" : \"http://localhost:3001\";\n\nconst formattedDate = date =>\n new Date(date).toLocaleDateString(\"en-US\", {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\"\n });\n\nfunction ShowCampaign({ isLaunchStep, uuid, ...props }) {\n const campaign = props.campaignData;\n const { t } = useTranslation();\n const [launchModalOpen, setLaunchModalOpen] = useState(true);\n\n const onClose = () => setLaunchModalOpen(false);\n\n const secondaryFooterLink = \n {\"< Edit Voucher Campaign\"}\n ;\n\n return (\n
\n \n\n
\n
\n

{campaign.title}

\n

{campaign.subtitle}

\n
\n\n
\n \"company\"/\n
\n\n
\n
\n

Support local business

\n {campaign.promos.map(promo => (\n
\n \n
\n ))}\n \n Buy Voucher\n \n
\n
\n
\n\n {isLaunchStep && }\n\n
\n

{t('teamMessage')}

\n

{campaign.description}

\n\n
\n \"company's\n {campaign.managerName}\n
\n\n

You are supporting

\n
    \n {campaign.bulletPoints.map((bp, i) => (\n
  • {bp}
  • \n ))}\n
\n\n

Visit us

\n

{campaign.address}

\n

\n {campaign.phone ? (\n {campaign.phone}\n ) : null}\n

\n

\n {campaign.website ? (\n {campaign.website}\n ) : null}\n

\n

\n {campaign.facebook ? (\n \n {campaign.facebook}\n \n ) : null}\n

\n

\n {campaign.instagram ? (\n \n @{campaign.instagram}\n \n ) : null}\n

\n
\n\n
\n \n\n

Terms & Conditions

\n
    \n
  • Use by {formattedDate(campaign.timeframe)}
  • \n {campaign.ownTerms.map((ot, index) => (\n
  • {ot}
  • \n ))}\n
\n
\n {!isLaunchStep &&
\n \n {t('connectPayment')}\n \n
}\n
\n );\n}\n\nexport default ShowCampaign;\n","import { createBrowserHistory } from 'history'\n\nconst history = createBrowserHistory()\n\nexport default history\n","import React from \"react\";\nimport EditCampaign from \"./Edit\";\nimport ShowCampaign from \"./Show\";\nimport history from \"../history\";\nimport Loading from \"../Loading\";\nconst API_HOST =\n process.env.NODE_ENV === \"production\" ? \"\" : \"http://localhost:3001\";\n\n// Credit David Walsh (https://davidwalsh.name/javascript-debounce-function)\n\n// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\nfunction debounce(func, wait, immediate) {\n var timeout;\n\n // This is the function that is actually executed when\n // the DOM event is triggered.\n return function executedFunction() {\n // Store the context of this and any\n // parameters passed to executedFunction\n var context = this;\n var args = arguments;\n\n // The function to be called after\n // the debounce time has elapsed\n var later = function() {\n // null timeout to indicate the debounce ended\n timeout = null;\n\n // Call function now if you did not on the leading end\n if (!immediate) func.apply(context, args);\n };\n\n // Determine if you should call the function\n // on the leading or trail end\n var callNow = immediate && !timeout;\n\n // This will reset the waiting every function execution.\n // This is the step that prevents the function from\n // being executed because it will never reach the\n // inside of the previous setTimeout\n clearTimeout(timeout);\n\n // Restart the debounce waiting period.\n // setTimeout returns a truthy value (it differs in web vs node)\n timeout = setTimeout(later, wait);\n\n // Call immediately if you're dong a leading\n // end execution\n if (callNow) func.apply(context, args);\n };\n}\n\nexport class EditCampaignContainer extends React.Component {\n /* Only props which require non-null default values */\n defaultCampaignData = {\n bulletPoints: [\"\"],\n ownTerms: [],\n promos: []\n };\n\n state = {\n uuid: this.props.match.params.uuid\n };\n\n componentDidMount = async () => {\n const responseJSON = await fetch(\n `${API_HOST}/campaigns/${this.state.uuid}`,\n {\n method: \"GET\",\n mode: \"cors\",\n headers: {\n \"Access-Control-Request-Headers\": \"Authorization\",\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\"\n }\n }\n );\n const response = await responseJSON.json();\n console.log(\"loaded\", response);\n if (response) {\n this.setState({ campaignData: response });\n } else {\n this.setState({ campaignData: this.defaultCampaignData });\n }\n };\n\n update = debounce(values => this.submit(values), 300);\n\n preview = async campaignData => {\n await this.submit(campaignData);\n this.setState({ campaignData });\n history.push(`/preview/${this.state.uuid}`);\n return {};\n };\n\n submit = async campaignData => {\n const responseJSON = await fetch(`${API_HOST}/campaigns`, {\n method: \"POST\",\n mode: \"cors\",\n headers: {\n \"Access-Control-Request-Headers\": \"Authorization\",\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\"\n },\n body: JSON.stringify({ campaign: campaignData })\n });\n const response = await responseJSON.json();\n console.log(\"submitted\", campaignData, response);\n return {};\n };\n\n render() {\n return this.state.campaignData ? (\n \n ) : (\n
\n \n
\n );\n }\n}\n\nexport class PreviewCampaignContainer extends React.Component {\n state = {\n uuid: this.props.match.params.uuid\n };\n\n componentDidMount = async () => {\n console.log(this.props.isLaunchStep);\n const responseJSON = await fetch(\n `${API_HOST}/campaigns/${this.state.uuid}`,\n {\n method: \"GET\",\n mode: \"cors\",\n headers: {\n \"Access-Control-Request-Headers\": \"Authorization\",\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\"\n }\n }\n );\n const response = await responseJSON.json();\n console.log(\"loaded\", response);\n this.setState({ campaignData: response });\n };\n\n edit = () => {\n history.push(`/new-campaign/${this.state.uuid}`);\n };\n\n render() {\n return this.state.campaignData ? (\n \n ) : (\n
\n \n
\n );\n }\n}\n","import React from 'react'\nimport ShowCampaign from \"./Show\";\nimport Loading from \"../Loading\";\nconst API_HOST =\n process.env.NODE_ENV === \"production\" ? \"\" : \"http://localhost:3001\";\n\nexport default class CampaignLanding extends React.Component {\n state = {\n slug: this.props.match.params.slug\n };\n\n componentDidMount = async () => {\n const responseJSON = await fetch(\n `${API_HOST}/campaigns/${this.state.slug}`,\n {\n method: \"GET\",\n mode: \"cors\",\n headers: {\n \"Access-Control-Request-Headers\": \"Authorization\",\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\"\n }\n }\n );\n const response = await responseJSON.json();\n console.log(\"loaded\", response);\n this.setState({ campaignData: response });\n };\n edit = () => {}\n\n render() {\n return this.state.campaignData ? (\n \n ) : (\n
\n \n
\n );\n }\n}\n","import React, { useCallback } from \"react\";\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nimport classes from \"./WizardSteps.module.css\";\n\n// should be updated when the routes for the 3rd n 4th step are added\nconst stepMapping = {\n 1: 'new-campaign',\n 2: 'preview',\n 4: 'launch'\n};\n\nfunction SingleStep({\n stepLabel,\n stepNumber,\n currentRoute,\n isFirst=false,\n isLast=false\n}) {\n const isActive = useCallback(()=> {\n return stepMapping[stepNumber.toString()] === currentRoute.slice(1).split('/')[0];\n }, [stepNumber, currentRoute]);\n\n return
\n
\n {!isFirst && }\n \n {stepNumber}\n \n {!isLast && }\n\n
\n \n
;\n}\n\nSingleStep.propTypes = {\n stepLabel: PropTypes.string.isRequired,\n stepNumber: PropTypes.number.isRequired,\n currentRoute: PropTypes.string.isRequired, // location.pathname\n isFirst: PropTypes.bool,\n isLast: PropTypes.bool\n};\n\nexport default SingleStep;\n","import React from 'react';\nimport { withRouter } from 'react-router-dom';\n\nimport classes from './WizardSteps.module.css';\nimport SingleStep from \"./SingleStep\";\n\nfunction WizardSteps({location}) {\n\n return (\n
\n \n \n \n \n\n\n
\n );\n}\n\nexport default withRouter(WizardSteps);\n","import i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport LanguageDetector from 'i18next-browser-languagedetector';\n\n\nimport en from '../src/assets/translations/en/translation.json';\nimport de from '../src/assets/translations/de/translation.json';\n\ni18n\n .use(initReactI18next)\n .use(LanguageDetector)\n .init({\n resources: {\n en: {\n translation: en,\n },\n de: {\n translation: de,\n },\n },\n load: 'languageOnly',\n fallbackLng: 'en',\n keySeparator: false,\n interpolation: {\n escapeValue: false,\n },\n // detector options\n detection: {\n order: [ 'querystring','navigator', 'cookie', 'localStorage'],\n lookupQuerystring: 'locale',\n lookupCookie: 'locale',\n lookupLocalStorage: 'locale',\n },\n debug: true\n\n });\n\nexport default i18n;\n","import React from 'react';\nimport {\n Router,\n Switch,\n Route,\n Redirect\n} from \"react-router-dom\";\nimport './App.scss';\nimport { EditCampaignContainer, PreviewCampaignContainer } from './campaign'\nimport CampaignLanding from './campaign/landing'\nimport history from './history'\nimport WizardSteps from \"./campaign/shared/WizardSteps\";\nimport './i18n';\n\nfunction uuidv4() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); // eslint-disable-line\n return v.toString(16);\n });\n}\n\nclass App extends React.Component {\n generateUuid() {\n const uuid = uuidv4();\n return uuid;\n }\n\n render() {\n return (\n
\n \n \n \n \n \n }/>\n \n \n \n \n }/>\n \n \n \n
\n );\n }\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}