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AR,SAAgB/F,OAAhB,OAAyB8F,QAAzB,IAAyBA,OAAzB,EAAyBA,EAAQC,OAAO,GAAGC,kBAAeP,GAGtDQ,EAA2B,SAACC,GASvC,MARoB,CAClBH,OAAQ,CACN,CACEnC,IAAK,SACLoC,aAAcE,EAAEC,YAWXC,EAAyB,SACpCN,EACAO,GAaA,OAXyBP,EAAOQ,QAAO,SAACC,EAAUC,GAChD,IACMC,EADWtD,OAAOuD,KAAKL,GACHM,SAASH,EAAII,UAAYJ,EAAII,SAAW,SAMlE,OALKL,EAAIE,KAAWF,EAAIE,GAAY,IACpCF,EAAIE,GAAUI,KAAK,CACjBjD,IAAK4C,EAAII,SACTZ,aAAcQ,EAAIL,UAEbI,IACN,KAaE,SAAeO,EAAtB,oC,wCAAO,WAA6BC,EAAY5C,GAAzC,gGAEqB4C,EAAM7C,OAF3B,cAEG8C,EAFH,yBAGIZ,EACLY,EAAUlB,QAAUkB,EAAUC,eAC9B9C,IALC,yDAQI8B,EAAyBc,IAR7B,0D,sBAYA,SAASG,EACdC,EACAC,GAEAjE,OAAOuD,KAAKS,GAAkBE,SAAQ,SAACZ,GACjB,oBAAbW,GACLA,EAASX,EAAU,CACjBN,QAASgB,EAAiBV,GAAU,GAAGT,oB,sDCrExC,IAAMsB,EAAmB,SAC9BpB,EACAqB,EACAC,GAEA,IACIC,EADcvB,EAAEwB,OAAZjD,MACmBkD,QAAQ,UAAW,IAAIC,UAAU,EAAG,GAE3DH,EAAezH,OAAS,EAC1ByH,EAAiBA,EAAeE,QAAQ,sBAAuB,YACtDF,EAAezH,OAAS,IACjCyH,EAAiBA,EAAeE,QAAQ,eAAgB,UAG1DJ,EAASC,EAAWC,EAAgB,CAAEI,gBAAgB","sources":["webpack://_N_E/./node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://_N_E/./node_modules/date-fns/esm/_lib/toInteger/index.js","webpack://_N_E/./node_modules/date-fns/esm/addDays/index.js","webpack://_N_E/./node_modules/date-fns/esm/addMonths/index.js","webpack://_N_E/./node_modules/date-fns/esm/isPast/index.js","webpack://_N_E/./node_modules/date-fns/esm/subDays/index.js","webpack://_N_E/./node_modules/date-fns/esm/subMonths/index.js","webpack://_N_E/./node_modules/date-fns/esm/sub/index.js","webpack://_N_E/./node_modules/date-fns/esm/toDate/index.js","webpack://_N_E/./src/api/lookupClient.tsx","webpack://_N_E/./src/components/FormButtons.tsx","webpack://_N_E/./src/components/shared/Spinner.tsx","webpack://_N_E/./src/utils/apiErrorMessages.tsx","webpack://_N_E/./src/utils/handleDateChange.ts"],"sourcesContent":["export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isPast\n * @category Common Helpers\n * @summary Is the given date in the past?\n * @pure false\n *\n * @description\n * Is the given date in the past?\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is in the past\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // If today is 6 October 2014, is 2 July 2014 in the past?\n * var result = isPast(new Date(2014, 6, 2))\n * //=> true\n */\n\nexport default function isPast(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getTime() < Date.now();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the days subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\n\nexport default function subDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addDays(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function subMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, -amount);\n}","import subDays from \"../subDays/index.js\";\nimport subMonths from \"../subMonths/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name sub\n * @category Common Helpers\n * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @description\n * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be subtracted\n *\n * | Key | Description |\n * |---------|------------------------------------|\n * | years | Amount of years to be subtracted |\n * | months | Amount of months to be subtracted |\n * | weeks | Amount of weeks to be subtracted |\n * | days | Amount of days to be subtracted |\n * | hours | Amount of hours to be subtracted |\n * | minutes | Amount of minutes to be subtracted |\n * | seconds | Amount of seconds to be subtracted |\n *\n * All values default to 0\n *\n * @returns {Date} the new date with the seconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract the following duration from 15 June 2017 15:29:20\n * const result = sub(new Date(2017, 5, 15, 15, 29, 20), {\n * years: 2,\n * months: 9,\n * weeks: 1,\n * days: 7,\n * hours: 5,\n * minutes: 9,\n * seconds: 30\n * })\n * //=> Mon Sep 1 2014 10:19:50\n */\n\nexport default function sub(dirtyDate, duration) {\n requiredArgs(2, arguments);\n if (!duration || typeof duration !== 'object') return new Date(NaN);\n var years = duration.years ? toInteger(duration.years) : 0;\n var months = duration.months ? toInteger(duration.months) : 0;\n var weeks = duration.weeks ? toInteger(duration.weeks) : 0;\n var days = duration.days ? toInteger(duration.days) : 0;\n var hours = duration.hours ? toInteger(duration.hours) : 0;\n var minutes = duration.minutes ? toInteger(duration.minutes) : 0;\n var seconds = duration.seconds ? toInteger(duration.seconds) : 0; // Subtract years and months\n\n var dateWithoutMonths = subMonths(toDate(dirtyDate), months + years * 12); // Subtract weeks and days\n\n var dateWithoutDays = subDays(dateWithoutMonths, days + weeks * 7); // Subtract hours, minutes and seconds\n\n var minutestoSub = minutes + hours * 60;\n var secondstoSub = seconds + minutestoSub * 60;\n var mstoSub = secondstoSub * 1000;\n var finalDate = new Date(dateWithoutDays.getTime() - mstoSub);\n return finalDate;\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","import { getXCLEARCorrelationInfo } from '@api/utils'\n\nexport const baseLookup = async (\n key: string\n): Promise<{ label: string; value: any }[]> => {\n const response = await fetch(\n `${process.env.NEXT_PUBLIC_LOOKUP_API_ENDPOINT}/lookup?categories=${key}`,\n {\n headers: {\n 'X-CLEAR-CorrelationInfo': getXCLEARCorrelationInfo(),\n },\n }\n )\n\n const data = await response.json()\n\n return data[0].values.map((x: any) => ({\n label: x.text,\n value: x.key,\n }))\n}\n","import React from 'react'\nimport useMedia from 'use-media'\n\nimport { Button, ButtonProps, theme } from '@clear/design-system'\n\nconst aboveMobile = theme?.breakpoints?.[0] as string\n\nexport const BackButton: React.FC = (props) => {\n const isAboveMobile = useMedia({ minWidth: aboveMobile })\n\n return (\n \n )\n}\n\nexport const ContinueButton: React.FC = ({\n text = 'Continue',\n id,\n ...props\n}) => {\n const isAboveMobile = useMedia({ minWidth: aboveMobile })\n\n return (\n \n )\n}\n","import React from 'react'\n\nexport default function Spinner() {\n return (\n
\n
\n
\n
\n
\n
\n \n
\n
\n )\n}\n","import { Enrollment } from '@clear-denver/tpc-openapi-typescript'\n\ninterface ErrorMessage {\n key: string\n errorMessage: string\n}\n\nexport const getGlobalErrorMessage = (errors: any) => {\n return errors?.global?.length ? errors?.global[0].errorMessage : undefined\n}\n\nexport const createGlobalErrorMessage = (e: any) => {\n const globalError = {\n global: [\n {\n key: 'global',\n errorMessage: e.message,\n },\n ],\n }\n return globalError\n}\n\nexport interface ErrorsByProperty {\n [key: string]: Array\n}\n\nexport const getApiErrorsByProperty = (\n errors: Array,\n formState: { [key: string]: any }\n): ErrorsByProperty => {\n const errorsByProperty = errors.reduce((acc: any, err: any) => {\n const formKeys = Object.keys(formState)\n const errorKey = formKeys.includes(err.property) ? err.property : 'global'\n if (!acc[errorKey]) acc[errorKey] = []\n acc[errorKey].push({\n key: err.property,\n errorMessage: err.message,\n })\n return acc\n }, {})\n\n return errorsByProperty\n}\n\nexport async function extractErrors(\n error: Response,\n data: any\n): Promise\nexport async function extractErrors(\n error: Error,\n data: any\n): Promise\nexport async function extractErrors(error: any, data: any) {\n try {\n const errorBody = await error.json()\n return getApiErrorsByProperty(\n errorBody.errors || errorBody.businessErrors,\n data\n )\n } catch {\n return createGlobalErrorMessage(error)\n }\n}\n\nexport function setFormErrors(\n errorsByProperty: ErrorsByProperty,\n setError: T\n) {\n Object.keys(errorsByProperty).forEach((errorKey) => {\n typeof setError === 'function' &&\n setError(errorKey, {\n message: errorsByProperty[errorKey][0].errorMessage,\n })\n })\n}\n","import { ChangeEvent } from 'react'\nimport { UseFormSetValue } from 'react-hook-form'\n\nexport const handleDataChange = (\n e: ChangeEvent,\n setValue: UseFormSetValue,\n fieldName: string\n): void => {\n const { value } = e.target\n let formattedValue = value.replace(/[^0-9]/g, '').substring(0, 8)\n\n if (formattedValue.length > 4) {\n formattedValue = formattedValue.replace(/(\\d{2})(\\d{2})(\\d+)/, '$1/$2/$3')\n } else if (formattedValue.length > 2) {\n formattedValue = formattedValue.replace(/(\\d{2})(\\d+)/, '$1/$2')\n }\n\n setValue(fieldName, formattedValue, { shouldValidate: true })\n}\n"],"names":["requiredArgs","required","args","length","TypeError","toInteger","dirtyNumber","NaN","number","Number","isNaN","Math","ceil","floor","addDays","dirtyDate","dirtyAmount","arguments","date","amount","Date","setDate","getDate","addMonths","dayOfMonth","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","isPast","now","subDays","subMonths","sub","duration","years","months","weeks","days","hours","minutes","seconds","dateWithoutMonths","toDate","dateWithoutDays","minutestoSub","secondstoSub","mstoSub","finalDate","argument","argStr","Object","prototype","toString","call","console","warn","Error","stack","baseLookup","key","fetch","process","headers","getXCLEARCorrelationInfo","response","json","data","values","map","x","label","text","value","aboveMobile","theme","BackButton","props","isAboveMobile","useMedia","minWidth","textProps","display","variant","size","icon","iconPosition","ContinueButton","id","undefined","type","Spinner","className","getGlobalErrorMessage","errors","global","errorMessage","createGlobalErrorMessage","e","message","getApiErrorsByProperty","formState","reduce","acc","err","errorKey","keys","includes","property","push","extractErrors","error","errorBody","businessErrors","setFormErrors","errorsByProperty","setError","forEach","handleDataChange","setValue","fieldName","formattedValue","target","replace","substring","shouldValidate"],"sourceRoot":""}