{"version":3,"file":"index-mBs3SRAN.js","sources":["../../src/App.jsx","../../src/main.jsx"],"sourcesContent":["import { createBrowserRouter, RouterProvider } from 'react-router-dom';\nimport { useTranslation } from 'react-i18next';\nimport { Helmet } from 'react-helmet';\nimport CookieConsent from 'react-cookie-consent';\n\nimport { Home } from './pages/Home';\nimport { Dashboard } from './pages/Dashboard';\nimport { Workouts } from './pages/Workouts';\nimport { Workout } from './pages/Workout';\nimport { Tutorial } from './pages/Tutorial';\n\nimport { Navbar } from './components/Navbar';\nimport { Footer } from './components/Footer';\n\nconst LoggetOutRouteWrapper = ({ children }) => {\n const { t } = useTranslation();\n\n return (\n <>\n \n {children}\n \n {t('standalone.cookies')}\n \n \n >\n );\n};\n\nconst RouteWrapper = ({ children }) => {\n const { t } = useTranslation();\n\n return (\n <>\n \n {children}\n \n {t('standalone.cookies')}\n \n >\n );\n};\n\nconst router = createBrowserRouter([\n {\n path: '/',\n element: (\n \n \n \n ),\n },\n {\n path: '/login/:redirectUrl?',\n element: (\n \n \n \n ),\n },\n {\n path: '/dashboard',\n element: (\n \n \n \n ),\n },\n {\n path: '/workouts',\n element: (\n \n \n \n ),\n },\n {\n path: '/workout/:workoutId?',\n element: (\n \n \n \n ),\n },\n {\n path: '/sync',\n element: (\n \n \n \n ),\n },\n]);\n\nfunction App() {\n const { t } = useTranslation();\n const isLocalhost = window.location.hostname === 'localhost';\n\n return (\n <>\n \n {t('appName')}\n {isLocalhost ? (\n \n ) : (\n \n )}\n \n \n >\n );\n}\n\nexport default App;\n","import React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport { NextUIProvider } from '@nextui-org/react';\nimport {\n ApolloClient,\n InMemoryCache,\n ApolloProvider,\n createHttpLink,\n} from '@apollo/client';\nimport { setContext } from '@apollo/client/link/context';\nimport { onError } from '@apollo/client/link/error';\nimport * as Sentry from '@sentry/react';\n\nimport './utils/i18n.js';\n\nimport App from './App.jsx';\nimport './index.css';\n\nSentry.init({\n dsn: 'https://baa135d3a6cbf51cee724f1023044e53@o4506814380769280.ingest.sentry.io/4506814382342144',\n integrations: [\n Sentry.browserTracingIntegration(),\n Sentry.replayIntegration({\n maskAllText: false,\n blockAllMedia: false,\n }),\n ],\n // Performance Monitoring\n tracesSampleRate: 1.0, // Capture 100% of the transactions\n // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled\n tracePropagationTargets: [\n /^https:\\/\\/meutreino\\.fit/,\n /^https:\\/\\/myworkoutskill\\.com/,\n ],\n // Session Replay\n // replaysSessionSampleRate: 0.1, // ORIGINAL: 0.1 - This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.\n replaysSessionSampleRate: 1.0, // ASSIM TÁ 100% o replay rate. This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.\n replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.\n});\n\nconst { VITE_GRAPHQL_URL } = import.meta.env;\n\nconst httpLink = createHttpLink({\n uri: VITE_GRAPHQL_URL,\n});\n\nconst authLink = setContext((_, { headers }) => {\n // get the authentication token from local storage if it exists\n const authToken = localStorage.getItem('authToken');\n // return the headers to the context so httpLink can read them\n return {\n headers: {\n ...headers,\n authorization: authToken ? `bearer ${authToken}` : '',\n },\n };\n});\n\nconst errorLink = onError(({ graphQLErrors, networkError }) => {\n const { pathname, search } = window.location;\n\n client.resetStore();\n localStorage.removeItem('authToken');\n\n if (graphQLErrors) {\n graphQLErrors.forEach(({ message, extensions }) => {\n if (\n !/^\\/login/.test(pathname) &&\n extensions &&\n ['UNAUTHENTICATED', 'FORBIDDEN'].includes(extensions.code)\n ) {\n window.location = `/login${pathname}${search}`;\n }\n });\n }\n\n if (networkError) {\n const { statusCode } = networkError;\n const { pathname, search } = window.location;\n\n if (!/^\\/login/.test(pathname) && [401].includes(statusCode)) {\n window.location = `/login${pathname}${search}`;\n }\n }\n});\n\nconst client = new ApolloClient({\n link: errorLink.concat(authLink.concat(httpLink)),\n cache: new InMemoryCache(),\n});\n\nReactDOM.createRoot(document.getElementById('root')).render(\n \n \n \n \n \n \n \n \n \n);\n"],"names":["LoggetOutRouteWrapper","children","useTranslation","jsxs","Fragment","jsx","Navbar","CookieConsent","Footer","RouteWrapper","router","createBrowserRouter","Home","Dashboard","Workouts","Workout","Tutorial","App","t","isLocalhost","Helmet","RouterProvider","define_import_meta_env_default"],"mappings":"43CAcA,MAAMA,EAAwB,CAAC,CAAE,SAAAC,KAAe,CACxC,KAAA,CAAE,GAAMC,IAEd,OAEIC,EAAA,KAAAC,WAAA,CAAA,SAAA,CAAAC,EAAA,IAACC,EAAO,EAAA,EACPL,EACDI,EAAA,IAACE,EAAA,CACC,SAAS,SACT,MAAO,CAAE,WAAY,SAAU,EAC/B,WAAW,gBACX,WAAY,EAAE,0BAA0B,EACxC,YAAa,CACX,WAAY,UACZ,MAAO,UACP,SAAU,MACZ,EACA,QAAS,IAER,WAAE,oBAAoB,CAAA,CACzB,QACCC,EAAO,EAAA,CACV,CAAA,CAAA,CAEJ,EAEMC,EAAe,CAAC,CAAE,SAAAR,KAAe,CAC/B,KAAA,CAAE,GAAMC,IAEd,OAEIC,EAAA,KAAAC,WAAA,CAAA,SAAA,CAACC,EAAAA,IAAAC,EAAA,CAAO,gBAAe,EAAC,CAAA,EACvBL,EACDI,EAAA,IAACE,EAAA,CACC,SAAS,SACT,MAAO,CAAE,WAAY,SAAU,EAC/B,WAAW,gBACX,WAAY,EAAE,0BAA0B,EACxC,YAAa,CACX,WAAY,UACZ,MAAO,UACP,SAAU,MACZ,EACA,QAAS,IAER,WAAE,oBAAoB,CAAA,CACzB,CACF,CAAA,CAAA,CAEJ,EAEMG,EAASC,EAAoB,CACjC,CACE,KAAM,IACN,QACEN,EAAAA,IAACL,EACC,CAAA,SAAAK,EAAAA,IAACO,GAAK,CAAA,EACR,CAEJ,EACA,CACE,KAAM,uBACN,QACEP,EAAAA,IAACL,EACC,CAAA,SAAAK,EAAAA,IAACO,GAAK,CAAA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