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AAK,CAChC5B,OAAQ,EACR3B,aAAc,GACdiD,WAAY,eACd,GACAO,OAAQxC,CAAAA,EAAAA,EAAAA,EAAAA,EAAI,CACVb,QAAS,OACTwC,WAAY,SACZtC,IAAK,SACLqB,IAAK,CACH+B,WAAY,CACd,CACF,GACAC,MAAO1C,CAAAA,EAAAA,EAAAA,EAAAA,EAAI,CACT2C,WAAY,OACZC,SAAU,SACVhB,OAAQ,UACRpB,MAAON,EAAAA,EAASA,CAACG,WAAW,EAEhC,GAEKc,EAAAA,GAAAA,CAAAA,EAAAA,CAAAA,CAAAA,oEAmGL,IAAM0B,EAA+C,CACnD,CAACC,EAAAA,EAASA,CAACC,IAAI,CAAC,CA1F4B,CAC5C,CACErB,MAAO,wBACPM,QAAO,CACT,EACA,CACEN,MAAO,uBACPM,QAAO,CACT,EACA,CACEN,MAAO,oCACPM,QAAO,CACT,EACA,CACEN,MAAO,mBACPM,QAAO,CACT,EACA,CACEN,MAAO,cACPM,QAAO,CACT,EACA,CACEN,MAAO,oBACPM,QAAO,CACT,EACA,CACEN,MAAO,eACPM,QAAO,CACT,EACD,CA8DC,CAACc,EAAAA,EAASA,CAACE,KAAK,CAAC,CA5D4B,CAC7C,CACEtB,MAAO,0BACPM,QAAO,CACT,EACA,CACEN,MAAO,uBACPM,QAAO,CACT,EACA,CACEN,MAAO,wBACPM,QAAO,CACT,EACA,CACEN,MAAO,cACPM,QAAO,CACT,EACA,CACEN,MAAO,eACPM,QAAO,CACT,EACD,CAwCC,CAACc,EAAAA,EAASA,CAACG,MAAM,CAAC,CAtC4B,CAC9C,CACEvB,MAAO,2BACPM,QAAO,CACT,EACA,CACEN,MAAO,uBACPM,QAAO,CACT,EACA,CACEN,MAAO,oCACPM,QAAO,CACT,EACA,CACEN,MAAO,sBACPM,QAAO,CACT,EACA,CACEN,MAAO,mBACPM,QAAO,CACT,EACA,CACEN,MAAO,cACPM,QAAO,CACT,EACA,CACEN,MAAO,oBACPM,QAAO,CACT,EACA,CACEN,MA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_E/./components/displays/Modal/ModalDialog.tsx","webpack://_N_E/./components/displays/Stepper.tsx","webpack://_N_E/./components/displays/SurveyProgressDropdown.tsx","webpack://_N_E/./components/hooks/useAuth.ts","webpack://_N_E/./components/inputs/NavLink.tsx","webpack://_N_E/./components/insights/ComparisonIndicator.tsx","webpack://_N_E/./components/insights/ExplainerBox.tsx","webpack://_N_E/./utils/numberFormatting.ts","webpack://_N_E/./utils/surveyUtils.tsx","webpack://_N_E/../survey-client/components/displays/ErrorMessage.tsx","webpack://_N_E/../survey-client/styles/variables.ts","webpack://_N_E/"],"sourcesContent":["import { Box, SxProps, Theme } from \"@mui/material\";\nimport { ReactNode } from \"react\";\nimport { css, CSSObject } from \"@emotion/react\";\n\nconst modalDialogStyles: SxProps = {\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n width: \"auto\",\n maxWidth: \"90%\",\n bgcolor: \"background.paper\",\n boxShadow: 24,\n p: 2,\n borderRadius: 2,\n outline: \"none\",\n maxHeight: \"90vh\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"0.75rem 1rem\",\n};\n\ntype ModalDialogProps = {\n children: ReactNode;\n sx?: SxProps;\n role?: string;\n customCss?: CSSObject;\n};\n\nconst ModalDialog = ({\n children,\n sx = {},\n role = \"dialog\",\n customCss,\n}: ModalDialogProps) => {\n return (\n \n {children}\n \n );\n};\n\nexport default ModalDialog;\n","import { css } from \"@emotion/react\";\nimport { AccessTime } from \"@mui/icons-material\";\nimport { colorVars } from \"../../utils/colorUtils\";\n\nexport enum StepperState {\n INCOMPLETE,\n IN_PROGRESS,\n COMPLETE,\n}\nexport type StepperProps = {\n text: string;\n estimatedTime?: string;\n color?: string;\n state: StepperState;\n};\n\nconst s = {\n container: css({\n display: \"flex\",\n alignItems: \"center\",\n columnGap: \".8rem\",\n height: \"5.8rem\",\n width: \"fit-content\",\n }),\n bar: css({\n width: \".4rem\",\n height: \"100%\",\n borderRadius: 2,\n backgroundColor: colorVars.gray,\n transition: \"all 0.1s ease\",\n }),\n\n time: css({\n display: \"flex\",\n columnGap: \".4rem\",\n alignItems: \"center\",\n color: colorVars.gray2,\n }),\n barComplete: css({\n backgroundColor: colorVars.bluePrimary,\n }),\n barCompleteLight: css({\n backgroundColor: \"white\",\n }),\n};\nexport const renderStepperIcon = (state: StepperState, color?: string) => {\n switch (state) {\n case StepperState.COMPLETE:\n return (\n \n \n \n );\n case StepperState.INCOMPLETE:\n return (\n \n \n \n );\n case StepperState.IN_PROGRESS:\n return (\n \n \n \n );\n }\n};\n\nconst Stepper = ({ text, state, color, estimatedTime }: StepperProps) => {\n return (\n
\n \n {renderStepperIcon(state, color)}\n
\n {estimatedTime && (\n
\n \n \n {estimatedTime}\n

\n
\n )}\n

{text}

\n
\n
\n );\n};\n\nexport default Stepper;\n","import { css } from \"@emotion/react\";\nimport { renderStepperIcon, StepperState } from \"./Stepper\";\nimport { colorVars } from \"../../utils/colorUtils\";\nimport { useLayoutEffect, useRef, useState } from \"react\";\nimport {\n ArrowDropDownOutlined,\n ArrowDropUpOutlined,\n} from \"@mui/icons-material\";\nimport { hasSurveysPermissionsSelector } from \"../../atoms/user.atom\";\nimport { useRecoilValue } from \"recoil\";\nimport { AuditType } from \"@monorepo/api-types\";\n\ntype SurveyProgressDropdownProps = {\n page: number;\n maxPage: number;\n setPage: (n: number) => void;\n title?: string;\n auditType: AuditType;\n};\n\nconst s = {\n container: css({\n display: \"flex\",\n flexDirection: \"column\",\n rowGap: \"3.2rem\",\n padding: \"2.4rem\",\n overflow: \"hidden\",\n // transition: \"all 0.3s ease\",\n borderRadius: 8,\n backgroundColor: \"white\",\n }),\n title: css({\n display: \"flex\",\n alignItems: \"center\",\n cursor: \"pointer\",\n justifyContent: \"space-between\",\n }),\n sectionsContainer: css({\n display: \"flex\",\n justifyContent: \"space-between\",\n columnGap: \"1rem\",\n }),\n section: css({\n display: \"flex\",\n overflow: \"hidden\",\n transition: \"all 0.2s ease\",\n flexDirection: \"column\",\n rowGap: \"2.4rem\",\n }),\n header: css({\n position: \"relative\",\n backgroundColor: \"transparent\",\n border: \"none\",\n cursor: \"pointer\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n paddingTop: \"1.8rem\",\n columnGap: \"1.2rem\",\n }),\n rail: css({\n position: \"absolute\",\n height: 6,\n width: \"90%\",\n backgroundColor: colorVars.gray,\n overflow: \"hidden\",\n borderRadius: 20,\n top: 0,\n }),\n bar: css({\n position: \"absolute\",\n backgroundColor: colorVars.green,\n height: 6,\n borderRadius: 20,\n transition: \"all 0.2s ease\",\n }),\n bullet: css({\n display: \"flex\",\n alignItems: \"center\",\n gap: \"1.2rem\",\n svg: {\n flexShrink: 0,\n },\n }),\n arrow: css({\n marginLeft: \"auto\",\n fontSize: \"2.1rem\",\n cursor: \"pointer\",\n color: colorVars.bluePrimary,\n }),\n};\n\nenum SetupSection {\n PREPARE,\n PLAN,\n LAUNCH,\n}\n\ntype DropdownStep = {\n title: string;\n section: SetupSection;\n};\nconst FULL_SURVEY_DROPDOWNS: DropdownStep[] = [\n {\n title: \"About our Core Survey\",\n section: SetupSection.PREPARE,\n },\n {\n title: \"Community engagement\",\n section: SetupSection.PREPARE,\n },\n {\n title: \"Administering the student surveys\",\n section: SetupSection.PREPARE,\n },\n {\n title: \"School headcount\",\n section: SetupSection.PLAN,\n },\n {\n title: \"Survey date\",\n section: SetupSection.PLAN,\n },\n {\n title: \"Introduce surveys\",\n section: SetupSection.LAUNCH,\n },\n {\n title: \"Send surveys\",\n section: SetupSection.LAUNCH,\n },\n];\n\nconst PULSE_SURVEY_DROPDOWNS: DropdownStep[] = [\n {\n title: \"About our Pulse Surveys\",\n section: SetupSection.PREPARE,\n },\n {\n title: \"Community engagement\",\n section: SetupSection.PREPARE,\n },\n {\n title: \"Choose your questions\",\n section: SetupSection.PLAN,\n },\n {\n title: \"Survey date\",\n section: SetupSection.PLAN,\n },\n {\n title: \"Send surveys\",\n section: SetupSection.LAUNCH,\n },\n];\n\nconst SURVEY_BUNDLE_DROPDOWNS: DropdownStep[] = [\n {\n title: \"About our Survey Bundles\",\n section: SetupSection.PREPARE,\n },\n {\n title: \"Community engagement\",\n section: SetupSection.PREPARE,\n },\n {\n title: \"Administering the student surveys\",\n section: SetupSection.PREPARE,\n },\n {\n title: \"Choose your bundles\",\n section: SetupSection.PLAN,\n },\n {\n title: \"School headcount\",\n section: SetupSection.PLAN,\n },\n {\n title: \"Survey date\",\n section: SetupSection.PLAN,\n },\n {\n title: \"Introduce surveys\",\n section: SetupSection.LAUNCH,\n },\n {\n title: \"Send surveys\",\n section: SetupSection.LAUNCH,\n },\n];\n\nconst dropdowns: Record = {\n [AuditType.FULL]: FULL_SURVEY_DROPDOWNS,\n [AuditType.PULSE]: PULSE_SURVEY_DROPDOWNS,\n [AuditType.BUNDLE]: SURVEY_BUNDLE_DROPDOWNS,\n};\nconst SurveyProgressDropdown = ({\n page,\n maxPage,\n setPage,\n title = \"Your progress\",\n auditType,\n}: SurveyProgressDropdownProps) => {\n const hasSurveysPermission = useRecoilValue(hasSurveysPermissionsSelector);\n const renderBullet = (stepNumber: number, text: string) => {\n const iconState =\n stepNumber < page\n ? { state: StepperState.COMPLETE, color: colorVars.green }\n : stepNumber === page\n ? { state: StepperState.IN_PROGRESS, color: colorVars.orange }\n : { state: StepperState.INCOMPLETE, color: colorVars.gray2 };\n return (\n \n stepNumber <= maxPage && hasSurveysPermission.edit\n ? setPage(stepNumber)\n : {}\n }\n >\n {renderStepperIcon(iconState.state, iconState.color)}\n

{text}

\n \n );\n };\n const [openSections, setOpenSections] = useState({\n prepare: true,\n plan: true,\n launch: true,\n });\n const [open, setOpen] = useState(true);\n const [height, setHeight] = useState(646);\n const prepareRef = useRef(null);\n const planRef = useRef(null);\n const launchRef = useRef(null);\n useLayoutEffect(() => {\n if (prepareRef.current && planRef.current && launchRef.current) {\n setHeight(\n Math.max(\n prepareRef.current.offsetHeight,\n planRef.current.offsetHeight,\n launchRef.current.offsetHeight\n )\n );\n }\n }, [auditType, page]);\n const toggleSection = (section: keyof typeof openSections) =>\n setOpenSections((sections) => ({\n ...sections,\n [section]: !sections[section],\n }));\n const sectionsWithIndex = dropdowns[auditType].map((section, index) => ({\n ...section,\n page: index,\n }));\n\n function getRailWidth(setupSection: SetupSection) {\n const previousSectionsLength = dropdowns[auditType].filter(\n (s, i) => s.section !== setupSection && i < page\n ).length;\n const sectionLength = dropdowns[auditType].filter(\n (s) => s.section === setupSection\n ).length;\n return Math.max(\n Math.min((100 / sectionLength) * (page - previousSectionsLength), 100),\n 0\n );\n }\n\n return (\n
\n {title !== \"\" && (\n
setOpen(!open)}>\n

{title}

\n {open ? (\n setOpen(false)} />\n ) : (\n setOpen(true)}\n />\n )}\n
\n )}\n {page === 0 && (\n

\n The below provides an overview of the steps to launch your survey.\n

\n )}\n
\n \n
\n \n {sectionsWithIndex\n .filter((section) => section.section === SetupSection.PREPARE)\n .map(({ title, page }) => renderBullet(page, title))}\n
\n
\n \n
\n \n {sectionsWithIndex\n .filter((section) => section.section === SetupSection.PLAN)\n .map(({ title, page }) => renderBullet(page, title))}\n
\n
\n \n
\n \n\n {sectionsWithIndex\n .filter((section) => section.section === SetupSection.LAUNCH)\n .map(({ title, page }) => renderBullet(page, title))}\n
\n \n \n \n );\n};\n\nexport default SurveyProgressDropdown;\n","import { useRecoilState } from \"recoil\";\nimport { userAtom } from \"../../atoms/user.atom\";\nimport { useRouter } from \"next/router\";\nimport { useEffect } from \"react\";\nimport {\n AccessTokenStore,\n REFRESH_TOKEN_KEY,\n refreshAccessToken,\n} from \"@monorepo/components\";\nimport { ProtectedUserWithRole, UserRole } from \"@monorepo/api-types\";\nimport { setGtmVariable } from \"apps/dashboard-client/utils/googleTagManagerUtils\";\n\nconst useAuth = (roles?: UserRole[]) => {\n const [userState, setUserState] = useRecoilState(userAtom);\n\n const router = useRouter();\n\n useEffect(() => {\n if (!userState) {\n attemptLogin();\n } else if (\n roles &&\n userState.user_roles.every(\n (role) =>\n role.name !== UserRole.ADMIN && !roles.includes(role.name as UserRole)\n )\n ) {\n router.push(\"/\");\n }\n }, [userState]);\n\n useEffect(() => {\n if (userState?.institution?.disabled && router.pathname !== \"/disabled\") {\n router.push(\"/disabled\");\n }\n }, [userState, router.pathname]);\n\n async function attemptLogin() {\n try {\n const refreshToken = localStorage.getItem(REFRESH_TOKEN_KEY);\n if (!refreshToken) {\n setUserState(null);\n return router.push(\"/login\");\n }\n const { AccessToken, user } = await refreshAccessToken(refreshToken);\n AccessTokenStore.set(AccessToken as string);\n setUserState(user as ProtectedUserWithRole);\n if (user) {\n setGtmVariable({ user });\n }\n } catch (e) {\n return router.push(\"/login\");\n }\n }\n};\n\nexport default useAuth;\n","import React from \"react\";\nimport { css, SerializedStyles } from \"@emotion/react\";\nimport Link from \"next/link\";\nimport { colorVars } from \"../../utils/colorUtils\";\nimport { IconPosition } from \"./Button\";\nimport {\n GTMEventName,\n GTMEvent,\n pushGtmEvent,\n} from \"apps/dashboard-client/utils/googleTagManagerUtils\";\nimport { useRouter } from \"next/router\";\n\ntype NavLinkProps = {\n text: string;\n openInNewTab?: boolean;\n href?: string;\n onClick?: () => void;\n disabled?: boolean;\n icon?: React.ReactElement;\n customCss?: SerializedStyles;\n iconPosition?: IconPosition;\n customGtmEvent?: GTMEvent;\n dataCy?: string;\n};\n\nconst s = {\n link: css({\n textDecoration: \"none\",\n color: colorVars.bluePrimary,\n width: \"fit-content\",\n padding: \"0 4px\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"transparent\",\n outline: \"none\",\n textAlign: \"start\",\n display: \"flex\",\n alignItems: \"center\",\n columnGap: \".6rem\",\n fontFamily: \"OpenSans, sans serif\",\n backgroundColor: \"transparent\",\n fontSize: \"1.6rem\",\n cursor: \"pointer\",\n \":hover\": {\n textDecoration: \"underline\",\n textUnderlineOffset: 1,\n },\n \":active\": {\n borderColor: colorVars.bluePrimary,\n },\n \":focus\": {\n borderColor: colorVars.bluePrimary,\n },\n }),\n disabled: {\n color: colorVars.gray2,\n pointerEvents: \"none\" as const,\n cursor: \"initial\",\n \":hover\": {\n textDecoration: \"none\",\n },\n \":active\": {\n borderColor: \"transparent\",\n },\n \":focus\": {\n borderColor: \"transparent\",\n },\n },\n};\nconst NavLink = ({\n text,\n href,\n onClick,\n openInNewTab,\n icon,\n disabled,\n customCss,\n dataCy,\n customGtmEvent,\n iconPosition = IconPosition.RIGHT,\n}: NavLinkProps) => {\n const router = useRouter();\n return href ? (\n {\n e.stopPropagation();\n if (onClick) {\n onClick();\n }\n pushGtmEvent(\n customGtmEvent || {\n event: GTMEventName.NAV_ITEM_CLICKED,\n resource: null,\n data: {\n from: router.pathname,\n to: href,\n linkText: text,\n },\n }\n );\n }}\n target={openInNewTab ? \"_blank\" : \"_self\"}\n css={[s.link, disabled && s.disabled, customCss]}\n href={href}\n data-cy={dataCy}\n aria-disabled={disabled}\n >\n {icon && iconPosition === IconPosition.LEFT && icon}\n {text}\n {icon && iconPosition === IconPosition.RIGHT && icon}\n \n ) : (\n {\n e.stopPropagation();\n pushGtmEvent(\n customGtmEvent || {\n event: GTMEventName.NAV_ITEM_CLICKED,\n resource: null,\n data: { buttonText: text },\n }\n );\n if (onClick) {\n onClick();\n }\n }}\n aria-disabled={disabled}\n >\n {icon && iconPosition === IconPosition.LEFT && icon}\n {text}\n {icon && iconPosition === IconPosition.RIGHT && icon}\n \n );\n};\n\nexport default NavLink;\n","import { css } from \"@emotion/react\";\nimport {\n MenuOutlined,\n NorthEastOutlined,\n SouthEastOutlined,\n} from \"@mui/icons-material\";\nimport { colorVars, getColor } from \"apps/dashboard-client/utils/colorUtils\";\n\ntype ComparisonIndicatorProps = {\n difference: string;\n numberValue: number;\n neutralStatement?: boolean;\n reverseComparison?: boolean;\n};\n\nconst s = {\n container: css({\n display: \"flex\",\n alignItems: \"center\",\n columnGap: \".4rem\",\n borderRadius: 4,\n padding: \"0 .4rem\",\n width: \"fit-content\",\n }),\n difference: css({\n fontSize: \"1.4rem\",\n }),\n positive: css({\n backgroundColor: getColor(\"green\", 0.2),\n }),\n negative: css({\n backgroundColor: getColor(\"error\", 0.2),\n }),\n neutral: css({ backgroundColor: getColor(\"gray\") }),\n zero: css({\n backgroundColor: getColor(\"gray\"),\n }),\n};\n\nconst ComparisonIndicator = ({\n difference,\n numberValue,\n neutralStatement,\n reverseComparison,\n}: ComparisonIndicatorProps) => {\n const isPositive = numberValue >= 0;\n const isZero = numberValue === 0;\n\n // Switch colors if reverseComparison is enabled. E.g. if a historical comparison is worse, show as green (as this is positive)\n const positiveColor = reverseComparison\n ? getColor(\"error\", 0.2)\n : getColor(\"green\", 0.2);\n const negativeColor = reverseComparison\n ? getColor(\"green\", 0.2)\n : getColor(\"error\", 0.2);\n const iconPositiveColor = reverseComparison\n ? colorVars.error\n : colorVars.green;\n const iconNegativeColor = reverseComparison\n ? colorVars.green\n : colorVars.error;\n\n return (\n \n

{isZero ? \"No change\" : difference}

\n\n {isZero ? (\n \n ) : isPositive ? (\n \n ) : (\n \n )}\n \n );\n};\n\nexport default ComparisonIndicator;\n","import { css } from \"@emotion/react\";\nimport { useState } from \"react\";\nimport { Close, Info } from \"@mui/icons-material\";\nimport { colorVars, getColor } from \"apps/dashboard-client/utils/colorUtils\";\nimport { Modal } from \"@mui/material\";\nimport { SerializedStyles } from \"@emotion/react/dist/emotion-react.cjs\";\nimport ModalDialog from \"../displays/Modal/ModalDialog\";\n\ntype ExplainerBoxProps = {\n text: string | React.ReactElement;\n customCss?: SerializedStyles;\n};\n\nconst s = {\n container: css({\n position: \"relative\",\n display: \"inline-block\",\n }),\n infoBox: css({\n padding: \"1.2rem\",\n\n borderRadius: 4,\n backgroundColor: getColor(\"orange\", 0.2),\n }),\n};\n\nconst ExplainerBox = ({ text, customCss }: ExplainerBoxProps) => {\n const [open, setOpen] = useState(false);\n return (\n
\n {open && (\n setOpen(false)} open={open}>\n \n setOpen(false)}\n />\n
\n

{text}

\n
\n \n
\n )}\n setOpen(true)}\n css={[\n {\n fontSize: \"2.4rem\",\n cursor: \"pointer\",\n color: colorVars.bluePrimary,\n },\n customCss,\n ]}\n />\n
\n );\n};\n\nexport default ExplainerBox;\n","/**\n * Format bytes as human-readable text.\n *\n * @param bytes Number of bytes.\n * @param si True to use metric (SI) units, aka powers of 1000. False to use\n * binary (IEC), aka powers of 1024.\n * @param dp Number of decimal places to display.\n *\n * @return Formatted string.\n */\nexport function prettyBytes(bytes: number, si = false, dp = 1) {\n const thresh = si ? 1000 : 1024;\n\n if (Math.abs(bytes) < thresh) {\n return bytes + \" B\";\n }\n\n const units = si\n ? [\"kB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\n : [\"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"];\n let u = -1;\n const r = 10 ** dp;\n\n do {\n bytes /= thresh;\n ++u;\n } while (\n Math.round(Math.abs(bytes) * r) / r >= thresh &&\n u < units.length - 1\n );\n\n return bytes.toFixed(dp) + \" \" + units[u];\n}\n\nexport function numberWithPolarity(number: number, decimalPlaces = 0) {\n const polarity = number >= 0 ? \"+\" : \"\";\n return polarity + number.toFixed(decimalPlaces);\n}\n","import {\n AuditType,\n AuditWithResponses,\n FetchAllSurveyTemplatesResponse,\n SurveyExecutionFormatted,\n} from \"@monorepo/api-types\";\nimport {\n BoltOutlined,\n JoinFullOutlined,\n LayersOutlined,\n} from \"@mui/icons-material\";\nimport { questions, theme_blocks } from \"@prisma/client\";\nimport { LikertResponseData } from \"../types/surveys\";\n\nexport const DATA_VISIBILITY_LIMIT = 4; // Reporting group minimums\n\nexport function getAllQuestionsFromAudit(\n auditWithResponses: AuditWithResponses\n): (questions & { theme_block: theme_blocks | null })[] {\n return auditWithResponses.survey_campaigns.flatMap((campaign) =>\n campaign.survey_template.survey_template_pages.flatMap((page) =>\n page.survey_template_pages_has_questions.map((stphq) => stphq.question)\n )\n );\n}\n\nexport function sumLikertBreakdowns(\n breakdown1: LikertResponseData[],\n breakdown2: LikertResponseData[]\n): LikertResponseData[] {\n const countMap = new Map();\n\n breakdown1.forEach(({ value, count }) => {\n countMap.set(value, (countMap.get(value) || 0) + count);\n });\n\n breakdown2.forEach(({ value, count }) => {\n countMap.set(value, (countMap.get(value) || 0) + count);\n });\n\n return Array.from(countMap, ([value, count]) => ({ value, count }));\n}\n\nexport const addLikertResponseCounts = (\n countArray: Partial[]\n): LikertResponseData[] => {\n const initialCounts: LikertResponseData[] = [\n { value: \"1\", count: 0 },\n { value: \"2\", count: 0 },\n { value: \"3\", count: 0 },\n { value: \"4\", count: 0 },\n { value: \"5\", count: 0 },\n ];\n\n return countArray.reduce((acc, cur) => {\n acc.forEach((entry) => {\n const curCount = cur.value === entry.value ? cur.count || 0 : 0;\n entry.count += curCount;\n });\n return acc;\n }, initialCounts);\n};\n\nexport function reverseBreakdownValues(\n breakdown: LikertResponseData[]\n): LikertResponseData[] {\n return breakdown.map((b) => {\n const reversedValue = (\n 5 - Number(b.value)\n ).toString() as LikertResponseData[\"value\"];\n return {\n value: reversedValue,\n count: b.count,\n };\n });\n}\n\nexport const findAllSurveyPages = (\n data: FetchAllSurveyTemplatesResponse\n): string[] => {\n const surveyPages = new Set();\n data.forEach((campaign) =>\n campaign.survey_template_pages.forEach((page) => {\n surveyPages.add(page.title || \"\");\n })\n );\n\n const findPosition = (pageTitle: string) => {\n const campaignWithPage = data.find((campaign) =>\n campaign.survey_template_pages.some((page) => page.title === pageTitle)\n );\n const page = campaignWithPage!.survey_template_pages.find(\n (page) => page.title === pageTitle\n );\n return page!.position;\n };\n\n return [...surveyPages].sort((a, b) => findPosition(a) - findPosition(b));\n};\n\nexport const renderSurveyTypeIcon = (\n auditType: AuditType,\n fontSize?: string\n): React.ReactElement => {\n switch (auditType) {\n case AuditType.BUNDLE:\n return ;\n case AuditType.PULSE:\n return ;\n case AuditType.FULL:\n return ;\n }\n};\n\nexport const surveyTypeNames: Record = {\n [AuditType.FULL]: \"Core Survey\",\n [AuditType.BUNDLE]: \"Survey Bundle\",\n [AuditType.PULSE]: \"Pulse Survey\",\n};\n\nexport const getTotalAverage = (data: LikertResponseData[]) => {\n const totalLikertScore = data.reduce(\n (acc, cur) => acc + cur.count * (Number(cur.value) || 0),\n 0\n );\n const totalResponseCount = data.reduce((acc, cur) => acc + cur.count, 0);\n return totalLikertScore / Math.max(totalResponseCount, 1);\n};\n\nexport const calculateTotalRespondents = (\n executions?: SurveyExecutionFormatted[]\n): number => {\n if (!executions) return 0;\n return executions.filter((exec) => !!exec.finished_at).length;\n};\n","import { css, SerializedStyles } from \"@emotion/react\";\nimport { colorVars } from \"../../styles/variables\";\n\ntype ErrorMessageProps = {\n message: string | null;\n customCss?: SerializedStyles;\n};\n\nconst s = {\n container: css({\n width: \"100%\",\n padding: \"1.6rem\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: colorVars.error,\n borderRadius: 8,\n }),\n message: css({\n fontWeight: 400,\n fontSize: \"1.4rem\",\n color: colorVars.error,\n }),\n};\n\nconst ErrorMessage = ({\n message = \"An error occurred\",\n customCss = css({}),\n}: ErrorMessageProps) => {\n return message ? (\n
\n {\" \"}\n

\n {message}\n

\n
\n ) : (\n <>\n );\n};\nexport default ErrorMessage;\n","export const colorVars = {\n gray: \"rgba(244, 243, 242, 1)\",\n gray2: \"rgba(194, 194, 194, 1)\",\n textPrimary: \"rgba(51, 51, 51, 1)\",\n textSecondary: \"rgba(73, 73, 73, 1)\",\n bluePrimary: \"rgba(0, 102, 204, 1)\",\n blueSecondary: \"rgba(6, 86, 166, 1)\",\n pink: \"rgba(235, 74, 122, 1)\",\n yellow: \"rgba(253, 208, 23, 1)\",\n error: \"red\",\n white: \"rgba(244, 243, 242, 1)\",\n};\n"],"names":["modalDialogStyles","position","top","left","transform","width","maxWidth","bgcolor","boxShadow","p","borderRadius","outline","maxHeight","display","flexDirection","gap","__webpack_exports__","Z","children","sx","role","customCss","param","_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","tZ","Box","css","StepperState","colorVars","gray","gray2","bluePrimary","renderStepperIcon","state","color","_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__","svg","height","viewBox","fill","xmlns","path","d","fill-rule","clip-rule","SetupSection","s","container","rowGap","padding","overflow","backgroundColor","title","alignItems","cursor","justifyContent","sectionsContainer","columnGap","section","transition","header","border","paddingTop","rail","bar","green","bullet","flexShrink","arrow","marginLeft","fontSize","dropdowns","AuditType","FULL","PULSE","BUNDLE","page","maxPage","setPage","auditType","hasSurveysPermission","useRecoilValue","hasSurveysPermissionsSelector","renderBullet","stepNumber","text","iconState","COMPLETE","IN_PROGRESS","orange","INCOMPLETE","_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__","BX","div","edit","onClick","openSections","setOpenSections","useState","prepare","plan","launch","open","setOpen","setHeight","prepareRef","useRef","planRef","launchRef","useLayoutEffect","current","Math","max","offsetHeight","toggleSection","sections","sectionsWithIndex","map","index","getRailWidth","setupSection","previousSectionsLength","filter","i","length","min","h2","ArrowDropUpOutlined","ArrowDropDownOutlined","ref","button","concat","img","src","alt","flexGrow","textAlign","userState","setUserState","useRecoilState","userAtom","router","useRouter","attemptLogin","refreshToken","localStorage","getItem","REFRESH_TOKEN_KEY","push","AccessToken","user","refreshAccessToken","AccessTokenStore","set","setGtmVariable","e","useEffect","roles","user_roles","every","name","UserRole","ADMIN","includes","institution","disabled","pathname","link","textDecoration","borderWidth","borderStyle","borderColor","fontFamily","textUnderlineOffset","pointerEvents","href","openInNewTab","icon","dataCy","customGtmEvent","iconPosition","IconPosition","RIGHT","Link","stopPropagation","pushGtmEvent","event","GTMEventName","NAV_ITEM_CLICKED","resource","data","from","to","linkText","target","data-cy","aria-disabled","LEFT","buttonText","difference","positive","getColor","negative","neutral","zero","numberValue","neutralStatement","reverseComparison","isPositive","isZero","positiveColor","negativeColor","iconPositiveColor","error","iconNegativeColor","MenuOutlined","NorthEastOutlined","SouthEastOutlined","infoBox","_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__","Modal","onClose","ModalDialog","Close","alignSelf","Info","prettyBytes","bytes","si","dp","thresh","abs","units","u","r","round","toFixed","numberWithPolarity","number","decimalPlaces","polarity","DATA_VISIBILITY_LIMIT","findAllSurveyPages","surveyPages","Set","forEach","campaign","survey_template_pages","add","findPosition","find","some","pageTitle","sort","a","b","renderSurveyTypeIcon","_emotion_react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__","LayersOutlined","BoltOutlined","JoinFullOutlined","surveyTypeNames","getTotalAverage","totalLikertScore","reduce","acc","cur","count","Number","value","message","fontWeight","HY","textPrimary","textSecondary","blueSecondary","pink","yellow","white"],"sourceRoot":""}