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,WAAY,qBACZ,QAAS,UACTL,KAAM,0BACNJ,EACAU,IAAK,yBACLC,UAAW,CACT,QAAS,eACTP,KAAM,aACR,CACF,OASF","sources":["webpack://_N_E/","webpack://_N_E/./src/pages/index.tsx"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/\",\n function () {\n return require(\"private-next-pages/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/\"])\n });\n }\n ","import { AuthEvents, useAuth } from \"@my/api\"\nimport { EventBus } from \"app/events\"\nimport { ExploreProgramsPage } from \"app/features/programs\"\nimport { useAppStore } from \"app/global-state/appStore\"\nimport { Routes } from \"app/routing\"\nimport { analytics } from \"app/telemetry/analytics\"\nimport { Helmet } from \"react-helmet-async\"\nimport { useRouter, useSearchParams } from \"next/navigation\"\nimport { useEffect, useMemo } from \"react\"\nimport { WebSite, WithContext } from \"schema-dts\"\n\nexport default function HomePage() {\n const router = useRouter()\n const params = useSearchParams()\n const { isAuthenticated } = useAuth()\n const { authenticationStartTime, setAuthenticationStartTime } = useAppStore()\n\n const authEvent = useMemo(() => {\n // After the user logs in, Auth0 redirects to \"/\" with code and state params present.\n if (params.get(\"code\") && params.get(\"state\")) {\n return AuthEvents.Login\n }\n return null\n }, [params])\n\n useEffect(() => {\n if (authEvent) {\n EventBus.emit(authEvent)\n\n analytics.track(\"Login\", {\n success: true,\n duration:\n authenticationStartTime ?\n new Date().getTime() - authenticationStartTime.getTime()\n : undefined,\n })\n setAuthenticationStartTime(null)\n }\n }, [authEvent, authenticationStartTime, setAuthenticationStartTime])\n\n // If the user is authenticated or is in the process of logging in, redirect to the chat page.\n if (isAuthenticated || authEvent) {\n router.replace(Routes.home)\n return null\n }\n\n return (\n <>\n \n \n \n )\n}\n\nfunction SeoMetadata() {\n const title = \"Healthy | AI Powered Personalized Health and Wellness App\"\n const description =\n \"Discover a smarter way to track, log, and optimize your health journey with GetHealthy’s AI-powered suggestions.\"\n\n const schema: WithContext = {\n \"@context\": \"https://schema.org\",\n \"@type\": \"WebSite\",\n name: \"Get Healthy\",\n description,\n url: \"https://gethealthy.com\",\n publisher: {\n \"@type\": \"Organization\",\n name: \"Get Healthy\",\n },\n }\n\n return (\n \n {title}\n \n \n \n )\n}\n"],"names":["HomePage","router","useRouter","params","useSearchParams","isAuthenticated","useAuth","authenticationStartTime","setAuthenticationStartTime","useAppStore","authEvent","useMemo","get","AuthEvents","Login","useEffect","EventBus","emit","analytics","track","success","duration","Date","getTime","undefined","replace","Routes","home","SeoMetadata","ExploreProgramsPage","description","Helmet","title","meta","name","content","script","type","JSON","stringify","url","publisher"],"sourceRoot":"","ignoreList":[]}