{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.jsx","webpack:///./src/icons/ProgressTriadLeft.jsx","webpack:///./src/icons/ProgressTriadCenter.jsx","webpack:///./src/icons/ProgressTriadRight.jsx","webpack:///./src/icons/ProgressTriadLeftMobile.jsx","webpack:///./src/icons/ProgressTriadCenterMobile.jsx","webpack:///./src/icons/ProgressTriadRightMobile.jsx","webpack:///./src/icons/Checkmark.jsx","webpack:///./src/icons/Search.jsx","webpack:///./src/icons/LinkArrow.jsx","webpack:///./src/icons/index.jsx","webpack:///./src/datetime.jsx","webpack:///./src/analytics.jsx","webpack:///./src/status/types.jsx","webpack:///./src/status/mapper.jsx","webpack:///./src/boxes/trackingBox.js","webpack:///./src/boxes/contactBox.js","webpack:///./src/boxes/marketingBox.js","webpack:///./src/boxes/errorBox.js","webpack:///./src/brandedTrackingPage.js","webpack:///./src/DemoTrackingPage.jsx","webpack:///./index.jsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","initialState","fetch","undefined","store","createStore","state","action","getColor","STYLES","primary_color","getCarrierTrackingPageURL","carrier","tracking","trackingInfo","tracking_url","logger","humanReadableName","loggedFetch","async","url","args","response","ok","status","headers","text","browser","detect","versionArray","version","split","includes","canCloneResponses","clone","SVG","style","fill","width","className","viewBox","React","createElement","xmlns","xmlnsXlink","cx","cy","fill-rule","clip-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","Icon","props","ProgressTriadLeft","ProgressTriadCenter","ProgressTriadRight","ProgressTriadLeftMobile","ProgressTriadCenterMobile","ProgressTriadRightMobile","Checkmark","LinkArrow","Search","nil","getMonthShort","date","getUTCMonth","getWeekdayLong","getUTCDay","getDate","getUTCDate","logVisit","method","body","JSON","stringify","err","TrackingStatus","MothershipStatus","EchoStatus","StandardStatus","statusMapper","echoStatusMapper","mothershipStatusMapper","estimated_arrival","standardStatusMapper","arrival","departure","defaultStatusMapper","TrackingBox","renderProgressTriad","leftActive","centerActive","rightActive","isMobile","useMediaQuery","query","Fragment","returnMode","data-testid","href","contact_url","color","estimatedArrivalDate","Date","getMonthLong","renderStatusInTransit","arrivalDate","renderStatusDelivered","renderStatus","onClick","open","propTypes","PropTypes","string","isRequired","bool","ContactBox","contactURL","MarketingBox","marketingURL","logMarketingLinkClick","backgroundImage","marketingImageURL","cursor","ErrorBox","renderMessage","paddingTop","BrandedTrackingPage","setCarrier","useState","setTracking","setReturnMode","isLoading","setIsLoading","isSystemError","setIsSystemError","isNotFoundError","setIsNotFoundError","setTrackingInfo","useEffect","searchParams","URLSearchParams","location","search","carrierParam","toLowerCase","trackingParam","success","trackingInfoResponse","json","fetchTrackingInfo","navbar","NavBar","homeURL","home_url","Container","header","boxStyle","hidePoweredByHR","is_white_label","minHeight","LoadingSpinner","errorMode","marketing_image_url","marketing_url","withRouter","statusParam","departureParam","estimatedArrivalParam","arrivalParam","App","Component","constructor","super","_defineProperty","this","render","Router","Switch","Route","exact","path","component","DemoTrackingPage","_extends","connect","ENV","ReactDOM","Provider","document","getElementById"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC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,WAAYnI,IAAMoI,UACtBC,YAAYxH,GACVyH,MAAMzH,GAAO0H,GAAA,yBAIK,QAHlBC,KAAK3K,MAAQ,GAKf4K,SACE,OACEzI,IAAAC,cAACyI,IAAM,KACL1I,IAAAC,cAAC0I,IAAM,KAGL3I,IAAAC,cAAC2I,IAAK,CAACC,OAAK,EAACC,KAAK,IAAIC,UAAWvD,KAKjCxF,IAAAC,cAAC2I,IAAK,CAACE,KAAK,QAAQC,UAAWC,KAI/BhJ,IAAAC,cAAC2I,IAAK,CACJH,OAAS5H,GACPb,IAAAC,cAACuF,GAAmByD,GAAA,GAAKpI,EAAK,CAAE8G,WAAW,UASzDQ,GAAMe,aAAQ,SAAUrL,GACtB,MAAO,CACLJ,MAAOI,EAAMJ,SAFXyL,CAIHf,IAEH5J,kBAAsC,UAAflB,OAAO8L,KAE9BC,IAASX,OACPzI,IAAAC,cAACoJ,IAAQ,CAAC1L,MAAOA,GACfqC,IAAAC,cAACkI,GAAG,OAENmB,SAASC,eAAe","file":"returnflow.a4ff147fc73a8edb0919.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/public/dist\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([210,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import React from 'react';\nimport { createStore } from 'redux';\nimport { detect } from 'detect-browser';\nimport * as logger from '@happyreturns/jscommons';\n\nconst initialState = {\n // fetch method we should use throughout the codebase\n // TODO: figure out what we wanna do for this codebase and set it up\n fetch: undefined,\n};\n\nconst store = createStore(\n // reducer\n (state = initialState, action) => ({ ...state, ...action.value }),\n);\n\n// returns true if cloning responses is supported on this browser\nfunction canCloneResponses() {\n // It appears that Safari versions <= 11 cannot clone responses, we see an inability\n // to do so by one of our users using Mobile Safari 11.0 ... this thread says that\n // only 11.1 and above can clone -- https://github.com/github/fetch/issues/504\n\n const browser = detect();\n if (browser === null) {\n return false;\n }\n\n // version is typically something lke \"12.1.2\", split so we can access major version\n const versionArray = browser.version.split('.');\n\n // only allow cloning for safari 12 and above, just to be safe\n if (\n browser.name.includes('safari') &&\n versionArray.length > 0 &&\n versionArray[0] <= 11\n ) {\n return false;\n }\n\n return true;\n}\n\n// returns hex strings e.g. \"#FF0000\" for some site-wide colors\n// the switch statement within documents the allowable input values for \"name\"\n// (currently i see no need to make consts out of the color names, but if we expand this system\n// we should consider it -- ss)\nfunction getColor(name) {\n switch (name) {\n case 'primary':\n return STYLES && STYLES.primary_color ? STYLES.primary_color : '#000000';\n case 'gray-light':\n return '#E7E7E7';\n case 'grayish':\n return '#B4B0AC';\n case 'gray':\n return '#A2A2A2';\n case 'gray-dark':\n return '#737373';\n default:\n return '#000000';\n }\n}\n\n// returns the formatted url to load the provided tracking # on the provided carrier's page\n// returns \"undefined\" if carrier is unknown or for some other reason the URL can't be made\nfunction getCarrierTrackingPageURL(carrier, tracking, trackingInfo) {\n if (trackingInfo != null) {\n if (trackingInfo.tracking_url !== '') {\n return trackingInfo.tracking_url;\n }\n\n if (trackingInfo.tracking !== '') {\n tracking = trackingInfo.tracking;\n }\n }\n\n switch (carrier) {\n case 'fedex':\n return `https://www.fedex.com/apps/fedextrack/?tracknumbers=${tracking}`;\n case 'ups':\n case 'ups-easypost':\n return `https://www.ups.com/track?tracknum=${tracking}`;\n case 'usps':\n return `https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=${tracking}`;\n case 'echo':\n return `https://www.echo.com/shipment-tracking?ref=${tracking}`;\n case 'mothership':\n return `https://dashboard.mothership.com/track/${tracking}`;\n default:\n logger.Error('Cannot get URL for unknown carrier ', carrier);\n return undefined;\n }\n}\n\n// returns a human readable version of the provided carrier\n// where carrier is the carrier ID that is used in the shipping service\n//\n// e.g. for fedex will return \"FedEx\"\n// if carrier isunrecognized will return the empty string\nfunction humanReadableName(carrier) {\n switch (carrier) {\n case 'fedex':\n return 'FedEx';\n case 'ups-easypost':\n case 'ups':\n return 'UPS';\n case 'usps':\n return 'USPS';\n case 'dhl':\n return 'DHL';\n case 'dhlecommerce':\n return 'DHL Ecommerce';\n case 'royalmail':\n return 'Royal Mail';\n case 'purolator':\n return 'Purolator';\n case 'pitneybowes':\n return 'Pitney Bowes';\n case 'canadapost':\n return 'Canada Post';\n case 'australiapost':\n return 'Australia Post';\n case 'mothership':\n return 'Mothership';\n case 'echo':\n return 'ECHO';\n }\n return undefined;\n}\n\n// This function performs a basic fetch, with logging\nconst loggedFetch = async function (url, args) {\n // log the request to the Debug stream\n logger.Debug(`fetch'ing url: ${url} and args:`);\n\n const response = await fetch(url, args);\n\n // log the response to the Debug stream\n // In order to do this we need to clone the ReadableStream so that whoever is calling fetch\n // can also read it (stream is consumed when it is read)\n logger.Debug(\n `fetch: response.ok: ${response.ok} status: ${response.status} headers:`,\n response.headers,\n );\n\n let text = '';\n if (canCloneResponses()) {\n const clone = response.clone();\n text = await clone.text();\n logger.Debug(`fetch: response text: ${text}`);\n } else\n logger.Debug(\n 'fetch: cannot show response text, cannot clone due to browser incompatibility',\n );\n\n // only on 500 throw an error (400s could be fine, for example invalid login name)\n if (response.status >= 500) {\n logger.Debug(\n `HTTP ${response.status} occurred while calling url: ${url}, response text is ${text}`,\n );\n }\n\n return response;\n};\n\nexport {\n getColor,\n getCarrierTrackingPageURL,\n humanReadableName,\n store,\n loggedFetch,\n};\n","import React from 'react'\n\nconst SVG = ({\n style = {},\n fill = \"#000\",\n width = \"100%\",\n className = \"\",\n viewBox = \"0 0 86 8\"\n}) => (\n \n \n \n);\n\nexport default SVG;","import React from 'react'\n\nconst SVG = ({\n style = {},\n fill = \"#000\",\n width = \"100%\",\n className = \"\",\n viewBox = \"0 0 86 8\"\n}) => (\n \n \n \n);\n\nexport default SVG;","import React from 'react'\n\nconst SVG = ({\n style = {},\n fill = \"#000\",\n width = \"100%\",\n className = \"\",\n viewBox = \"0 0 86 8\"\n}) => (\n \n \n \n);\n\nexport default SVG;","import React from 'react'\n\nconst SVG = ({\n style = {},\n fill = \"#000\",\n width = \"100%\",\n className = \"\",\n viewBox = \"0 0 98 8\"\n}) => (\n \n \n \n);\n\nexport default SVG;\n\n\n","import React from 'react'\n\nconst SVG = ({\n style = {},\n fill = \"#000\",\n width = \"100%\",\n className = \"\",\n viewBox = \"0 0 98 8\"\n}) => (\n \n \n \n);\n\nexport default SVG;","import React from 'react'\n\nconst SVG = ({\n style = {},\n fill = \"#000\",\n width = \"100%\",\n className = \"\",\n viewBox = \"0 0 98 8\"\n}) => (\n \n \n \n);\n\nexport default SVG\n\n\n","import React from 'react'\n\nconst SVG = ({\n style = {},\n fill = \"#000\",\n width = \"100%\",\n className = \"\",\n viewBox = \"0 0 56 56\"\n}) => (\n \n \n \n />\n \n);\n\nexport default SVG;","import React from 'react'\n\nconst SVG = ({\n style = {},\n fill = \"#000\",\n width = \"100%\",\n className = \"\",\n viewBox = \"0 0 108 104\"\n}) => (\n \n \n \n \n);\n\nexport default SVG;\n\n\n","import React from 'react'\n\nconst SVG = ({\n style = {},\n fill = \"#000\",\n width = \"100%\",\n className = \"\",\n viewBox = \"0 0 12 9\"\n}) => (\n \n \n \n);\n\nexport default SVG;","import React from 'react'\n\n// this file contains SVG soruces for icons, so that we can inline our SVGs and\n// change their color dynamically.\n\n\nimport ProgressTriadLeft from \"./ProgressTriadLeft\";\nimport ProgressTriadCenter from \"./ProgressTriadCenter\";\nimport ProgressTriadRight from \"./ProgressTriadRight\";\nimport ProgressTriadLeftMobile from \"./ProgressTriadLeftMobile\";\nimport ProgressTriadCenterMobile from \"./ProgressTriadCenterMobile\";\nimport ProgressTriadRightMobile from \"./ProgressTriadRightMobile\";\nimport Checkmark from \"./Checkmark\";\nimport Search from \"./Search\";\nimport LinkArrow from \"./LinkArrow\";\n\nconst Icon = props => {\n switch (props.name) {\n case \"progressTriadLeft\":\n return ;\n case \"progressTriadCenter\":\n return ;\n case \"progressTriadRight\":\n return ;\n case \"progressTriadLeftMobile\":\n return ;\n case \"progressTriadCenterMobile\":\n return ;\n case \"progressTriadRightMobile\":\n return ;\n case \"checkmark\":\n return ;\n case \"linkarrow\":\n return ;\n case \"search\":\n return ;\n default:\n return nil;\n }\n};\n\nexport default Icon;","import React from 'react'\n\n\n//--------------------------------------------------------------------------------------------------\n// DATE/TIME METHODS\n//\n// these all IGNORE the time zone. We were initially using Luxon for this but the time zone\n// interpretation created problems, so these methods were built that ignore time zone\n// everything is treated in UTC -- day/month/etc are returned according to UTC\n\n\n// gets the short english language name of the month for the provided date\nexport function getMonthShort(date) {\n switch(date.getUTCMonth()) {\n case 0: return \"Jan\";\n case 1: return \"Feb\";\n case 2: return \"Mar\";\n case 3: return \"Apr\";\n case 4: return \"May\";\n case 5: return \"June\";\n case 6: return \"July\";\n case 7: return \"Aug\";\n case 8: return \"Sept\";\n case 9: return \"Oct\";\n case 10: return \"Nov\";\n case 11: return \"Dec\";\n default: return \"\";\n }\n}\n\n// gets the full english language name of the month for the provided date\nexport function getMonthLong(date) {\n switch(date.getUTCMonth()) {\n case 0: return \"January\";\n case 1: return \"February\";\n case 2: return \"March\";\n case 3: return \"April\";\n case 4: return \"May\";\n case 5: return \"June\";\n case 6: return \"July\";\n case 7: return \"August\";\n case 8: return \"September\";\n case 9: return \"October\";\n case 10: return \"November\";\n case 11: return \"December\";\n default: return \"\";\n }\n}\n\n// gets the english language name of the weekday for the provided date\nexport function getWeekdayLong(date) {\n switch(date.getUTCDay()) {\n case 0: return \"Sunday\";\n case 1: return \"Monday\";\n case 2: return \"Tuesday\";\n case 3: return \"Wednesday\";\n case 4: return \"Thursday\";\n case 5: return \"Friday\";\n case 6: return \"Saturday\";\n default: return \"\";\n }\n}\n\n// for consistency, i'm providing this method, so the caller can use this package for all of their \n// conversions without thinking about specifics\nexport function getDate(date) {\n return date.getUTCDate()\n}\n\n","import React from 'react';\nimport * as logger from '@happyreturns/jscommons';\nimport { loggedFetch } from './utility';\n\n// calls analytics endpoint to log the visit\n// status must be a one of the names in our analytics DB's tracking.status table\nasync function logVisit(carrier, tracking, status) {\n try {\n await loggedFetch(`/visit`, {\n method: 'POST',\n body: JSON.stringify({\n carrier: carrier,\n tracking: tracking,\n status: status,\n }),\n });\n } catch (err) {\n logger.Error('Error logging visit', err);\n }\n}\n\n// calls analytics endpoint to log a click n the marketing link\nasync function logMarketingLinkClick() {\n try {\n // this is async, but no need to wait for it to finish\n await loggedFetch(`/marketinglinkclick`, { method: 'POST' });\n } catch (err) {\n logger.Error('Error logging marketing link click', err);\n }\n}\n\nexport { logVisit, logMarketingLinkClick };\n","// Tracking Statuses\nconst TrackingStatus = {\n Preparing: \"preparing\",\n InTransit: \"intransit\",\n InTransitNoEstimation: \"intransit-noarrival-estimation\",\n Delivered: \"delivered\",\n Exception: \"exception\",\n Unknown: \"unknown\",\n Cancelled: \"cancelled\",\n}\n\n// Mothership Statuses\nconst MothershipStatus = {\n Unallocated: \"Unallocated\",\n FindingDriver: \"FindingDriver\",\n DriverAllocated: \"DriverAllocated\",\n EnrouteToPickup: \"EnrouteToPickup\",\n ArrivedAtPickup: \"ArrivedAtPickup\",\n EnrouteToDelivery: \"EnrouteToDelivery\",\n ArrivedAtDelivery: \"ArrivedAtDelivery\",\n Completed: \"Completed\",\n DeliveryConfirmation: \"DeliveryConfirmation\",\n Cancelled: \"Cancelled\",\n}\n\n// Echo Status\nconst EchoStatus = {\n Ordered: \"ORDERED\",\n Booked: \"BOOKED\",\n CheckedIn: \"CHECKEDIN\",\n Loading: \"LOADING\",\n PickedUp: \"PICKEDUP\",\n Unloading: \"UNLOADING\",\n Delivered: \"DELIVERED\",\n Cancelled: \"CANCELLED\",\n}\n\nconst StandardStatus = {\n Created: \"label_create\",\n Departed: \"scanned\",\n OutForDelivery: \"out_for_delivery\",\n Delivered: \"delivered\",\n MissedDelivery: \"missed\",\n Delayed: \"delayed\",\n Exception: \"exception\",\n InTransit: \"in_transit\",\n Cancelled: \"cancelled\",\n Unknown: \"unknown\",\n}\n\nexport { TrackingStatus, MothershipStatus, EchoStatus, StandardStatus }\n","import { TrackingStatus, MothershipStatus, EchoStatus, StandardStatus } from './types';\n\nfunction statusMapper(carrier, trackingInfo) {\n switch (carrier) {\n case \"echo\":\n return echoStatusMapper(trackingInfo.status)\n case \"mothership\":\n return mothershipStatusMapper(trackingInfo.status)\n case \"fedex\":\n return standardStatusMapper(trackingInfo)\n default:\n return defaultStatusMapper(trackingInfo)\n }\n}\n\n// Status mapping function that is specific to mothership \n// The mothership API doesn't return any departure or arrival\n// dates for shipments, so the status is used instead\nfunction mothershipStatusMapper(status) {\n\n switch(status) {\n case MothershipStatus.Unallocated:\n case MothershipStatus.FindingDriver:\n case MothershipStatus.DriverAllocated:\n case MothershipStatus.EnrouteToPickup:\n case MothershipStatus.ArrivedAtPickup:\n return TrackingStatus.Preparing\n case MothershipStatus.EnrouteToDelivery:\n case MothershipStatus.ArrivedAtDelivery:\n return TrackingStatus.InTransit\n case MothershipStatus.Completed:\n case MothershipStatus.DeliveryConfirmation:\n return TrackingStatus.Delivered\n case MothershipStatus.Cancelled:\n return TrackingStatus.Cancelled\n default:\n return TrackingStatus.Exception\n }\n}\n\n// Status mapping function that is specific to echo\n// The echo API doesn't return any departure or arrival\n// dates for shipments, so the status is used instead\nfunction echoStatusMapper(status) {\n\n switch(status) {\n case EchoStatus.Ordered:\n case EchoStatus.Booked:\n case EchoStatus.CheckedIn:\n case EchoStatus.Loading:\n return TrackingStatus.Preparing\n case EchoStatus.PickedUp:\n case EchoStatus.Unloading:\n return TrackingStatus.InTransit\n case EchoStatus.Delivered:\n return TrackingStatus.Delivered\n case EchoStatus.Cancelled:\n return TrackingStatus.Cancelled\n default:\n return TrackingStatus.Exception\n }\n}\n\nfunction standardStatusMapper(trackingInfo) {\n switch(trackingInfo.status) {\n case StandardStatus.Created:\n return TrackingStatus.Preparing\n\n case StandardStatus.Departed:\n case StandardStatus.OutForDelivery:\n case StandardStatus.InTransit:\n if (trackingInfo.estimated_arrival) {\n return TrackingStatus.InTransit\n } else {\n return TrackingStatus.InTransitNoEstimation\n }\n\n case StandardStatus.Delivered:\n return TrackingStatus.Delivered\n\n case StandardStatus.MissedDelivery:\n case StandardStatus.Delayed:\n case StandardStatus.Exception:\n return TrackingStatus.Exception\n\n case StandardStatus.Cancelled:\n return TrackingStatus.Cancelled\n }\n\n return TrackingStatus.Unknown\n}\n\n// The shipping service doesn't correctly set statuses, it only sets exceptions\n// to determine status, if it isn't exception, use the presence of arrival/departure\n// info to dictate the status we will show\nfunction defaultStatusMapper(trackingInfo) {\n\n if (!trackingInfo) {\n return TrackingStatus.Unknown\n }\n if (trackingInfo.status === \"exception\") {\n return TrackingStatus.Exception\n }\n // if it has arrived, well then certainly it's delivered\n if (trackingInfo.arrival) {\n return TrackingStatus.Delivered\n }\n // ...if we have an estimated arrival, show it's in transit...\n if (trackingInfo.estimated_arrival) {\n return TrackingStatus.InTransit\n }\n // ...if we have only a departure date, show it's in transit but with no estimated arrival...\n if (trackingInfo.departure) {\n return TrackingStatus.InTransitNoEstimation\n } \n // ...otherwise, default to the \"preparing\" screen\n return TrackingStatus.Preparing\n}\n\nexport default statusMapper;\n","import React from 'react';\nimport * as logger from '@happyreturns/jscommons';\nimport { useMediaQuery } from 'react-responsive';\nimport PropTypes from 'prop-types';\nimport Icon from '../icons';\nimport {\n getColor,\n getCarrierTrackingPageURL,\n humanReadableName,\n} from '../utility';\nimport {\n getMonthShort,\n getMonthLong,\n getWeekdayLong,\n getDate,\n} from '../datetime';\nimport { logVisit } from '../analytics';\nimport { TrackingStatus } from '../status/types';\nimport statusMapper from '../status/mapper';\n\nfunction TrackingBox(props) {\n function renderProgressTriad(leftActive, centerActive, rightActive) {\n const isMobile = useMediaQuery({ query: '(max-width: 979px)' });\n\n return (\n
\n \n \n \n
\n );\n }\n\n function renderStatusDelivered() {\n // if no arrival date is supplied and the shipment has been delivered, use the estimated arrival date instead\n const arrivalDate = new Date(\n props.trackingInfo.arrival || props.trackingInfo.estimated_arrival,\n );\n\n return (\n <>\n \n {props.returnMode ? (\n \n Your Return Has Been Received\n \n ) : (\n \n Your Shipment Has Been Delivered!\n \n )}\n {renderProgressTriad(true, true, true)}\n {props.returnMode ? (\n <>\n
\n Received on {getWeekdayLong(arrivalDate)},{' '}\n {getMonthShort(arrivalDate)} {getDate(arrivalDate)}\n
\n
\n You’ll receive an email summary of your refund after your item(s)\n are processed.\n
\n \n ) : (\n <>\n
\n Delivered on {getWeekdayLong(arrivalDate)},{' '}\n {getMonthShort(arrivalDate)} {getDate(arrivalDate)}\n
\n
\n Shipped with {humanReadableName(props.carrier)}\n
\n \n )}\n \n );\n }\n\n function renderStatusInTransit() {\n const estimatedArrivalDate = new Date(props.trackingInfo.estimated_arrival);\n\n return (\n <>\n {props.returnMode ? (\n
\n RETURN EXPECTED\n
\n ) : (\n
\n ESTIMATED DELIVERY\n
\n )}\n
\n {getWeekdayLong(estimatedArrivalDate)}\n
\n
\n {getMonthLong(estimatedArrivalDate)} {getDate(estimatedArrivalDate)}\n
\n {renderProgressTriad(true, true, false)}\n
In Transit
\n {props.returnMode ? (\n
\n Your refund will be initiated after your return has been received.\n
\n ) : (\n
\n Shipped with {humanReadableName(props.carrier)}\n
\n )}\n \n );\n }\n\n function renderStatusInTransitNoEstimatedArrivalDate() {\n return (\n <>\n {props.returnMode ? (\n
\n RETURN STATUS\n
\n ) : (\n
\n SHIPMENT STATUS\n
\n )}\n
\n In\n
\n
Transit
\n {renderProgressTriad(true, true, false)}\n {props.returnMode ? (\n
\n Return date estimate available soon.\n
\n ) : (\n
\n Delivery date estimate available soon.\n
\n )}\n
\n Shipped with {humanReadableName(props.carrier)}\n
\n \n );\n }\n\n function renderStatusPreparing() {\n if (props.returnMode) {\n return (\n <>\n
\n RETURN STATUS\n
\n \n Label\n \n
Created
\n {renderProgressTriad(true, false, false)}\n
\n Return label has been created\n
\n
\n Updates will be provided here once the carrier has received your\n return.\n
\n \n );\n } else {\n return (\n <>\n
\n SHIPMENT STATUS\n
\n \n Preparing\n \n
Shipment
\n {renderProgressTriad(true, false, false)}\n
\n Your shipment will be shipped shortly\n
\n
\n Shipped with {humanReadableName(props.carrier)}\n
\n \n );\n }\n }\n\n function renderError() {\n return (\n <>\n {props.returnMode ? (\n <>\n
\n
\n Return updates temporarily unavailable. Please try again\n shortly.\n
\n
\n \n RETURN EXPECTED\n \n \n ) : (\n <>\n
\n
\n Shipment updates temporarily unavailable. Please try again\n shortly.\n
\n
\n \n ESTIMATED DELIVERY\n \n \n )}\n
\n Temporarily\n
\n
Unable to Display
\n {renderProgressTriad(false, false, false)}\n
\n Status: Temporarily unable to display\n
\n
\n Shipped with {humanReadableName(props.carrier)}\n
\n \n );\n }\n\n function renderCancelled() {\n return (\n <>\n {props.returnMode ? (\n <>\n
\n
\n Your return has been cancelled. Please click{' '}\n \n here\n {' '}\n for details.\n
\n
\n \n ) : (\n <>\n
\n
\n This shipment has been cancelled. Please click{' '}\n \n here\n {' '}\n for details.\n
\n
\n \n )}\n
\n Temporarily\n
\n
Unable to Display
\n {renderProgressTriad(false, false, false)}\n
\n Status: Cancelled\n
\n
\n Shipped with {humanReadableName(props.carrier)}\n
\n \n );\n }\n\n function renderException() {\n return (\n <>\n {props.returnMode ? (\n <>\n \n {/* Only show an underlined \"contact us\" link if the contact url is configured */}\n
\n An issue has occurred with your return. Please click{' '}\n \n here\n {' '}\n for details. If the issue persists please{' '}\n {STYLES.contact_url ? (\n contact us\n ) : (\n 'contact us'\n )}\n .\n
\n \n \n RETURN EXPECTED\n \n \n ) : (\n <>\n \n {/* Only show an underlined \"contact us\" link if the contact url is configured */}\n
\n An issue has occurred with your shipment. Please click{' '}\n \n here\n {' '}\n for details. If the issue persists please{' '}\n {STYLES.contact_url ? (\n contact us\n ) : (\n 'contact us'\n )}\n .\n
\n \n \n ESTIMATED DELIVERY\n \n \n )}\n
\n Temporarily\n
\n
Unable to Display
\n {renderProgressTriad(false, false, false)}\n {STYLES.contact_url ? (\n
\n Status: Please contact us to review\n
\n ) : (\n
\n Status: Unavailable\n
\n )}\n
\n Shipped with {humanReadableName(props.carrier)}\n
\n \n );\n }\n\n // renders a core status message that tells the user where there package is, etc\n function renderStatus() {\n // Map the status for the given carrier and tracking info\n const mappedStatus = statusMapper(props.carrier, props.trackingInfo);\n\n // render and log the appropriate display for the given status\n switch (mappedStatus) {\n case TrackingStatus.Unknown:\n logVisit(props.carrier, props.tracking, 'unknown');\n return renderError();\n case TrackingStatus.Exception:\n logVisit(props.carrier, props.tracking, 'exception');\n return renderException();\n case TrackingStatus.InTransit:\n logVisit(props.carrier, props.tracking, 'intransit');\n return renderStatusInTransit();\n case TrackingStatus.InTransitNoEstimation:\n logVisit(props.carrier, props.tracking, 'intransit');\n return renderStatusInTransitNoEstimatedArrivalDate();\n case TrackingStatus.Delivered:\n logVisit(props.carrier, props.tracking, 'delivered');\n return renderStatusDelivered();\n case TrackingStatus.Cancelled:\n // This visit cannot be logged currently do to a missing\n // status in the analytics db\n logVisit(props.carrier, props.tracking, 'cancelled');\n return renderCancelled();\n default:\n logVisit(props.carrier, props.tracking, 'preparing');\n return renderStatusPreparing();\n }\n }\n\n return (\n
\n {renderStatus()}\n {\n logger.Info('User clicked tracking tracking number section');\n\n // open page specified by prop in a new tab\n const url = getCarrierTrackingPageURL(\n props.carrier,\n props.tracking,\n props.trackingInfo,\n );\n url && window.open(url, '_blank');\n }}\n >\n
\n {humanReadableName(props.carrier)} Tracking: {props.tracking}\n
\n
\n \n );\n}\nTrackingBox.propTypes = {\n // one of the carrier IDs supported by our shipping service, e.g. \"usps\", \"fedex\",\n carrier: PropTypes.string.isRequired,\n\n // tracking # of the package whose status is shown here\n tracking: PropTypes.string.isRequired,\n\n // when this is true, show messaging appropriate for when the customer\n // is returning a package to a retailer\n returnMode: PropTypes.bool.isRequired,\n\n // shipping.TrackingInfo object formatted in JSON\n // As of May 2020 this struct looks like so:\n // type TrackingInfo struct {\n // Tracking string `json:\"tracking\"`\n // Status string `json:\"status\"`\n // Departure *time.Time `json:\"departure\"`\n // EstimatedArrival *time.Time `json:\"estimated_arrival\"`\n // Arrival *time.Time `json:\"arrival\"`\n // }\n // check in shipping's models.go to see the latest....\n //\n // if this is undefined, then an \"unable to track\" system error page will be shown\n trackingInfo: PropTypes.object,\n};\n\nexport default TrackingBox;\n","import React from 'react';\nimport * as logger from '@happyreturns/jscommons';\nimport PropTypes from 'prop-types';\nimport Icon from '../icons';\nimport { getColor } from '../utility';\n\nfunction ContactBox(props) {\n return (\n {\n logger.Info(\"User clicked 'Contact Us' link\");\n\n // open page specified by prop in a new tab\n window.open(props.contactURL, '_blank');\n }}\n >\n
Have Questions?
\n \n Contact Us\n \n
\n \n
\n \n );\n}\nContactBox.propTypes = {\n // url to open when user clicks on contact box\n contactURL: PropTypes.string.isRequired,\n};\n\nexport default ContactBox;\n","import React from 'react';\nimport * as logger from '@happyreturns/jscommons';\nimport PropTypes from 'prop-types';\nimport { logMarketingLinkClick } from '../analytics';\n\nfunction MarketingBox(props) {\n return (\n
\n {\n // we shouldn't log anything/provide feedback if there's no marketing URL provided\n if (!props.marketingURL) return;\n logger.Info('User clicked marketing image');\n\n logMarketingLinkClick();\n\n // open page specified by prop in a new tab\n window.open(props.marketingURL, '_blank');\n }}\n style={{\n backgroundImage: `url(${props.marketingImageURL})`,\n cursor: props.marketingURL ? 'pointer' : 'auto',\n }}\n >
\n \n );\n}\nMarketingBox.propTypes = {\n // url to open when user clicks on marketing box\n marketingURL: PropTypes.string.isRequired,\n\n // image to use as background for box\n // XXX: should we add error handling code for if this url is not a valid image?\n marketingImageURL: PropTypes.string.isRequired,\n};\n\nexport default MarketingBox;\n","import React from 'react';\nimport * as logger from '@happyreturns/jscommons';\nimport Icon from '../icons';\nimport { getColor, PrimaryButton } from '../utility';\nimport PropTypes from 'prop-types';\n\nfunction ErrorBox(props) {\n function renderMessage() {\n let text = 'This tracking link isn’t associated with';\n\n if (props.returnMode) {\n text += ' a return.';\n } else {\n text += ' an order.';\n }\n\n if ((STYLES || {}).contact_url) {\n text +=\n ' Please review your link and try again or click below to contact us.';\n } else {\n text += ' Please review your link.';\n }\n\n return
{text}
;\n }\n\n function renderContactButton() {\n return (\n
\n {\n logger.Info(\"User clicked 'Contact Us' button on error page\");\n window.open((STYLES || {}).contact_url, '_blank');\n }}\n >\n
\n
Contact Us
\n
\n
\n \n );\n }\n\n return (\n
\n
\n \n
\n
\n {props.returnMode\n ? \"Return status can't be found\"\n : \"Delivery status can't be found\"}\n
\n {renderMessage()}\n {(STYLES || {}).contact_url && renderContactButton()}\n
\n );\n}\nErrorBox.propTypes = {\n // when this is true, show messaging appropriate for when the customer\n // is returning a package to a retailer\n returnMode: PropTypes.bool.isRequired,\n};\n\nexport default ErrorBox;\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { withRouter } from 'react-router-dom';\nimport * as logger from '@happyreturns/jscommons';\nimport LoadingSpinner from 'hrreact/components/loadingSpinner';\nimport NavBar from 'hrreact/components/navBar';\nimport Container from 'hrreact/components/container';\nimport TrackingBox from './boxes/trackingBox';\nimport ContactBox from './boxes/contactBox';\nimport MarketingBox from './boxes/marketingBox';\nimport ErrorBox from './boxes/errorBox';\nimport { humanReadableName, loggedFetch } from './utility';\nimport { logVisit } from './analytics';\n\nfunction BrandedTrackingPage(props) {\n //------------------------------------------------------------------------------------------------\n // STATE\n //------------------------------------------------------------------------------------------------\n\n // strings representing carrier and tracking of package being displayed\n const [carrier, setCarrier] = useState(undefined);\n const [tracking, setTracking] = useState(undefined);\n\n // the site currently operates in two modes:\n // - regular mode: a package is being sent from a retailer (or similar) to a customer\n // - return mode: the customer is shipping something back to a retailer (or similar)\n // this boolean flag is true when we're in return mode\n const [returnMode, setReturnMode] = useState(undefined);\n\n //----------\n // AT MOST ONE OF THE FOLLOWING IS TRUTHY, AND DICATES THE RENDERING OF THIS COMPONENT\n //\n // let's start out in the loading mode... once everything is loaded, this flag should be lowered\n const [isLoading, setIsLoading] = useState(true);\n //\n // error flags\n const [isSystemError, setIsSystemError] = useState(false);\n const [isNotFoundError, setIsNotFoundError] = useState(false);\n //\n // tracking content to display\n const [trackingInfo, setTrackingInfo] = useState(undefined);\n //----------\n\n //------------------------------------------------------------------------------------------------\n // LIFECYCLE METHODS\n //------------------------------------------------------------------------------------------------\n useEffect(() => {\n const searchParams = new URLSearchParams(window.location.search);\n let carrierParam = searchParams.get('carrier');\n if (carrierParam) {\n carrierParam = carrierParam.toLowerCase();\n }\n let trackingParam = searchParams.get('tracking');\n let returnMode = searchParams.get('return');\n\n setCarrier(carrierParam);\n setTracking(trackingParam);\n\n // force return mode to false when no URL param is provided\n setReturnMode(!!returnMode);\n\n if (trackingParam) {\n // for now, let's consider this our user ID\n logger.SetUser(carrierParam + '.' + trackingParam);\n\n fetchTrackingInfo(carrierParam, trackingParam);\n }\n // TODO: show failure page when parameters invalid\n }, []);\n\n //------------------------------------------------------------------------------------------------\n // CORE FUNCTIONALITY\n //------------------------------------------------------------------------------------------------\n async function fetchTrackingInfo(carrier, tracking) {\n // this flag will be raised if we successfully fetch the tracking info\n let success = false;\n let url = `/tracking/?tracking=${tracking}`;\n // If carrier is null don't include it in the url.\n // JS will convert it to string 'null' instead of an empty value.\n if (carrier) {\n url += `&carrier=${carrier}`;\n }\n\n try {\n let response = await loggedFetch(url);\n if (!response.ok) {\n const text = await response.text();\n\n // for some reason we get 500s with the text \"This tracking number cannot be found.\"\n // let's log that as a not found\n //\n // XXX: fix response code on shipping server, not-found should be 4xx not 5xx\n if (\n response.status === 404 ||\n text.includes('package not found') ||\n text.includes('This tracking number cannot be found.')\n ) {\n setIsNotFoundError(true);\n } else {\n setIsSystemError(true);\n }\n } else {\n const trackingInfoResponse = await response.json();\n logger.Info('Tracking info successfully retrieved');\n logger.Debug('trackingInfo', trackingInfoResponse);\n\n setTrackingInfo(trackingInfoResponse.trackingInfo);\n setCarrier(trackingInfoResponse.carrier);\n logger.SetUser(\n trackingInfoResponse.carrier +\n '.' +\n trackingInfoResponse.trackingInfo,\n );\n carrier = trackingInfoResponse.carrier;\n success = true;\n }\n } catch (err) {\n logger.Error('Error fetching return methods from the server', err);\n } finally {\n setIsLoading(false);\n }\n\n // if we failed to set the trackingInfo here, that means we won't log the visit\n // by loading the TrackingBox component\n //\n // we still need to log the visit, so let's log the visit here\n //\n // XXX: in the ideal architecture our shipping service would return a status and we could log\n // the visit here for all statuses. i hope to be able to further solidigy the shipping service\n // like this in the future but there are some questions as to how this should be done. (whose\n // responsibility is it to interpret the information coming back from the carrier, the shipping service\n // or tracking?). Hardcoding this logic into shipipng may make it not useful for other products\n // that see the world differently.\n if (!success) {\n logVisit(carrier, tracking, 'unknown');\n }\n }\n\n //------------------------------------------------------------------------------------------------\n // RENDERING\n //------------------------------------------------------------------------------------------------\n function renderNavBar() {\n return ;\n }\n\n // a dedicated function to render the page internals because we have slightly complex logic\n function renderPageContents() {\n // Show loader if it's needed\n if (isLoading) {\n return (\n
\n \n
\n );\n }\n\n // after loading, check for an error mode being asked for by an incoming prop\n if (\n props.errorMode || // errorMode prop is set\n !carrier ||\n !tracking || // carrier or tracking# is missing\n !humanReadableName(carrier) // carrier is not one of our legal carriers\n ) {\n return ;\n }\n\n // If we have a trackingInfo, show the main page layout\n // In case of system error, we also show this layout -- passing a null trackingInfo into\n // the TrackingBox will render it in error mode\n if (trackingInfo || isSystemError) {\n return (\n
\n {/* The first column contains the tracking information and (if present) the contact link */}\n
\n \n\n {(STYLES || {}).contact_url && (\n \n )}\n
\n\n {/* The second column contains the marketing image and link */}\n {/* marketingURL is optional to render the marketing box */}\n {(STYLES || {}).marketing_image_url && (\n \n )}\n
\n );\n }\n\n if (isNotFoundError) {\n return ;\n }\n }\n\n const navbar = renderNavBar();\n\n return (\n STYLES && (\n \n
\n {renderPageContents()}\n
\n \n )\n );\n}\nBrandedTrackingPage.propTypes = {\n // if this is set, instead of showing package status this page will show the\n // provided error message\n errorMode: PropTypes.string,\n};\nexport default withRouter(BrandedTrackingPage);\n","import React, { useEffect, useState } from \"react\";\nimport { withRouter } from \"react-router-dom\";\nimport NavBar from \"hrreact/components/navBar\";\nimport Container from \"hrreact/components/container\";\nimport TrackingBox from \"./boxes/trackingBox\";\nimport ContactBox from \"./boxes/contactBox\";\nimport MarketingBox from \"./boxes/marketingBox\";\n\nfunction DemoTrackingPage() {\n //------------------------------------------------------------------------------------------------\n // STATE\n //------------------------------------------------------------------------------------------------\n\n // string representing carrier of package being displayed\n const [carrier, setCarrier] = useState(\"\");\n // tracking content to display\n const [trackingInfo, setTrackingInfo] = useState({\n tracking: \"\",\n status: \"\",\n departure: \"\",\n estimated_arrival: \"\",\n arrival: \"\",\n });\n //----------\n\n //------------------------------------------------------------------------------------------------\n // LIFECYCLE METHODS\n //------------------------------------------------------------------------------------------------\n useEffect(() => {\n const searchParams = new URLSearchParams(window.location.search);\n\n const carrierParam = searchParams.get(\"carrier\").toLowerCase();\n const trackingParam = searchParams.get(\"tracking\");\n const statusParam = searchParams.get(\"status\");\n const departureParam = searchParams.get(\"departure\");\n const estimatedArrivalParam = searchParams.get(\"estimated-arrival\");\n const arrivalParam = searchParams.get(\"arrival\");\n\n setCarrier(carrierParam);\n setTrackingInfo({\n tracking: trackingParam,\n status: statusParam,\n departure: departureParam,\n estimated_arrival: estimatedArrivalParam,\n arrival: arrivalParam,\n });\n }, []);\n\n //------------------------------------------------------------------------------------------------\n // RENDERING\n //------------------------------------------------------------------------------------------------\n function renderNavBar() {\n return ;\n }\n\n const navbar = renderNavBar();\n\n return (\n STYLES && (\n \n
\n
\n {/* The first column contains the tracking information and (if present) the contact link */}\n
\n \n\n {(STYLES || {}).contact_url && (\n \n )}\n
\n\n {/* The second column contains the marketing image and link */}\n {/* marketingURL is optional to render the marketing box */}\n {(STYLES || {}).marketing_image_url && (\n \n )}\n
\n
\n \n )\n );\n}\n\nexport default withRouter(DemoTrackingPage);\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { Provider, connect } from 'react-redux';\nimport { store } from './src/utility';\nimport {\n withRouter,\n BrowserRouter as Router,\n Route,\n Switch,\n} from 'react-router-dom';\nimport 'babel-polyfill';\nimport BrandedTrackingPage from './src/brandedTrackingPage';\nimport * as logger from '@happyreturns/jscommons';\nimport DemoTrackingPage from './src/DemoTrackingPage';\n\nclass App extends React.Component {\n constructor(props) {\n super(props);\n this.state = {};\n }\n\n componentDidMount = () => {};\n\n render() {\n return (\n \n \n {/* the expected URLs have only query parameters, if we see one of these\n pass it to the branded tracking page. */}\n \n\n {/* This route renders a page that looks like the branded tracking page,\n but all data is passed in via url params for the purposes of sales team demos.\n Required url params: carrier, tracking, status, departure, estimated-arrival, arrival */}\n \n\n {/* if we get an unexpected URL, pass to the tracking page along\n with the error it should show */}\n (\n \n )}\n />\n \n \n );\n }\n}\n\nApp = connect(function (state) {\n return {\n fetch: state.fetch,\n };\n})(App);\n\nlogger.SetLogToConsole(window.ENV === 'local');\n\nReactDOM.render(\n \n \n ,\n document.getElementById('app'),\n);\n"],"sourceRoot":""}