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AAd,EAAc,CAAb,aAC3C,uBAAC,KAAD,KAAoBA,IAEhBkI,IACA,MAAM9H,EAzBZ,UACED,MAAM,QAACgI,EAAO,MAAEzb,EAAK,YAAE0b,EAAW,aAAEC,EAAY,qBAAEC,KAElD,OAAKH,GAAWE,IAAiB3b,EACxBA,EAGL2b,IAAiBC,GAAwBF,EACpCA,OADT,CACS,CAiBgBG,CAAeL,GACpC,OAAOra,EAAS,CACdqS,MAAOgI,EAAQhI,MACfC,M,EAAM,KACD+H,EAAQ/H,M,EADP,CAEJC,gB,oBAAA,I,mECpDH,MAAMjY,EAAS,CACpBqgB,aAAc,mBACdC,sBAAuB,2BACvBC,WAAY,gBACZC,oBAAqB,wBACrBC,KAAM,QACNC,aAAc,iBACdC,SAAU,YACVC,YAAa,gBACbC,MAAO,SACPC,aAAc,iBACdC,eAAgB,mBAChBC,SAAU,YACVC,SAAU,YACVC,IAAK,oBACLC,QAAS,WACTC,WAAY,eACZC,aAAc,iBACdC,kBAAmB,sBACnBC,wBAAyB,8BAKdC,EACX1F,IAEA,MAAMjb,EAAQib,EAAIpG,MAAM,KAAK+L,MAC7B,OACE5gB,GACA6B,OAAOgf,OAAO1hB,GAAQkU,SAAS,IAAIrT,KAE5B,IAAIA,IAEN,IAAI,EAGP8gB,EAA2B,CAC/B3hB,EAAOwgB,oBACPxgB,EAAOugB,YAGIqB,EACX/gB,GAEO8gB,EAAyBzN,SAC9BrT,E","sources":["webpack:///./scripts/apps/home/routes.ts","webpack:///./scripts/apps/register-account/routes.ts","webpack:///./scripts/components/PasswordStrengthMeter.tsx","webpack:///./scripts/components/PasswordStrengthCalculator.tsx","webpack:///./scripts/components/CreatePasswordInput.tsx","webpack:///./scripts/components/InlineError.tsx","webpack:///./scripts/components/Link.tsx","webpack:///./scripts/components/LoginSupportFooter.tsx","webpack:///./scripts/components/ProgressBar.tsx","webpack:///../../../packages/pg-ui/src/components/SocialLoginButtons.tsx","webpack:///../../../packages/domain/src/data/integrations.ts","webpack:///../../../packages/next-utils/src/id-dot/authPerspective.ts","webpack:///../../../packages/next-utils/src/id-dot/sharedRoutes.ts","webpack:///../../../packages/next-utils/src/id-dot/socialAuth.ts","webpack:///./scripts/components/SitesDotSocialLoginButtons.tsx","webpack:///./scripts/components/SvgImage/svgs-raw/emailSent.svg","webpack:///./scripts/components/SvgImage/svgs-raw/emailVerified.svg","webpack:///./scripts/components/SvgImage/svgs-raw/mailbox.svg","webpack:///./scripts/components/SvgImage/svgs-raw/passwordReset.svg","webpack:///./scripts/components/SvgImage/SvgImage.tsx","webpack:///./scripts/components/TextButton.ts","webpack:///./scripts/components/screens/BaseScreen.tsx","webpack:///./scripts/components/screens/layout.ts","webpack:///./scripts/constants/accessControl.ts","webpack:///./scripts/constants/layout.ts","webpack:///./scripts/http/exceptions.ts","webpack:///./scripts/http/httpClientsJs.ts","webpack:///./scripts/http/login.ts","webpack:///./scripts/shared/Material/components/EmailFieldInput.tsx","webpack:///./scripts/shared/globalRoutes.ts","webpack:///./scripts/shared/hooks/useDoesPracticeHaveAccess.ts","webpack:///./scripts/shared/http/register-account.ts","webpack:///./scripts/utils/custom-hooks.ts","webpack:///./scripts/utils/php-js/index.ts","webpack:///./scripts/utils/practice.ts","webpack:///./scripts/utils/string.ts","webpack:///../../../packages/domain/src/sites-mobile-app/messages.ts","webpack:///../../../packages/next-utils/src/useIsNextJs.ts","webpack:///../../../packages/pg-ui/src/base/Material/components/Checkbox.tsx","webpack:///../../../packages/pg-ui/src/base/Material/components/FieldInput.tsx","webpack:///../../../packages/pg-ui/src/base/Material/components/Input.tsx","webpack:///../../../packages/pg-ui/src/base/Material/components/PasswordInput.tsx","webpack:///../../../packages/pg-ui/src/utils/openPopup.ts","webpack:///../../../packages/pg-ui/src/utils/browser.ts","webpack:///../../../packages/pg-ui/src/hooks/useSocialAuth.ts","webpack:///../../../packages/pg-ui/src/icons/EmailIcon.tsx","webpack:///../../../packages/pg-ui/src/icons/social/ColoredGoogleLogo.tsx","webpack:///../../../packages/pg-ui/src/icons/social/FacebookCircleLogo.tsx","webpack:///../../../packages/pg-ui/src/utils/lastUsedSocialProvider.ts","webpack:///../../../packages/pg-util/src/UrlUtils.ts","webpack:///../../../packages/react-final-form/src/Field.tsx","webpack:///../../../packages/register-account/src/routes.ts"],"sourcesContent":["const loginRoutes = {\n  index: '/login',\n  forgotUsername: '/login/forgotusername',\n  forgotUsernameEmailSent: '/login/forgotusername/emailsent',\n  forgotPassword: '/login/forgotpassword',\n  forgotPasswordEmailSent: '/login/forgotpassword/emailsent',\n  resetPassword: '/login/forgotpassword/reset',\n  passwordResetSuccess: '/login/forgotpassword/success',\n  // Temporary: A little landing page for legacy contact verification emails.\n  legacyContactVerification: '/login/contactverification',\n};\n\nexport const routes = {\n  index: '/',\n  checkin: '/checkin',\n  login: loginRoutes,\n};\n","import * as R from 'ramda';\nimport {routes as baseRoutes} from '@practicegenius/register-account/src/routes';\n\n/** routes for registration without the basename */\nexport const routes = baseRoutes;\nexport const basename = '/account/register';\n\n/** routes for registration with the basename */\nexport const registrationRoutes = R.mapObjIndexed(\n  (route: string) => `${basename}${route}`,\n  routes\n);\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport React from 'react';\nimport {InvariantError} from 'ts-invariant';\nimport {styled} from '@mui/material/styles';\nimport {ProgressBar} from './ProgressBar';\n\nexport enum STRENGTH_LEVEL {\n  BLANK,\n  TOO_SHORT,\n  WEAK,\n  OK,\n  GOOD,\n  GREAT,\n}\n\ntype StrengthLevelDetail = {label: string; color: string; progress: number};\ntype StrengthLevelDetails = Map<STRENGTH_LEVEL, StrengthLevelDetail>;\n\ntype Props = {\n  level: STRENGTH_LEVEL;\n  strengthLevels: StrengthLevelDetails;\n};\n\nconst Wrapper = styled('div')({\n  display: 'flex',\n  flexDirection: 'row',\n  alignItems: 'center',\n  justifyContent: 'space-between',\n});\n\nconst ProgressWrapper = styled('div')({\n  width: '83%',\n});\n\nconst Label = styled('div')<{color: string}>(({color}) => ({\n  color,\n  fontSize: '10px',\n  width: '17%',\n  textAlign: 'center',\n}));\n\nconst defaultStrengthLevels: StrengthLevelDetails = new Map<\n  STRENGTH_LEVEL,\n  {label: string; color: string; progress: number}\n>([\n  [STRENGTH_LEVEL.BLANK, {label: 'Blank', color: '#9B9B9B', progress: 0}],\n  [\n    STRENGTH_LEVEL.TOO_SHORT,\n    {label: 'Too short', color: '#FF3539', progress: 0.2},\n  ],\n  [STRENGTH_LEVEL.WEAK, {label: 'Too weak', color: '#FF3539', progress: 0.33}],\n  [STRENGTH_LEVEL.OK, {label: 'So so', color: '#F5A623', progress: 0.5}],\n  [STRENGTH_LEVEL.GOOD, {label: 'Good', color: '#7ED321', progress: 0.75}],\n  [STRENGTH_LEVEL.GREAT, {label: 'Great', color: '#59AD00', progress: 1}],\n]);\n\nexport function PasswordStrengthMeter(props: Props) {\n  if (!props.strengthLevels.has(props.level)) {\n    throw new InvariantError(\n      `Tried to access password strength level details that wasn't provided to PasswordStrengthMeter: Strength Level: ${props.level}.`\n    );\n  }\n\n  const details = props.strengthLevels.get(props.level) as StrengthLevelDetail; // The .has() check above means we'll definitely have details here.\n\n  return (\n    <Wrapper>\n      <ProgressWrapper>\n        <ProgressBar\n          progress={details.progress}\n          barHeight={3}\n          color={details.color}\n        />\n      </ProgressWrapper>\n      <Label color={details.color}>{details.label}</Label>\n    </Wrapper>\n  );\n}\n\nPasswordStrengthMeter.defaultProps = {\n  strengthLevels: defaultStrengthLevels,\n};\n","import React from 'react';\nimport zxcvbn from 'zxcvbn';\nimport {PasswordStrengthMeter, STRENGTH_LEVEL} from './PasswordStrengthMeter';\n\nconst MINIMUM_PASSWORD_LENGTH = 8;\n\nfunction calculatePasswordStrengthLevel(\n  password: string | undefined,\n  userFields: string[]\n): STRENGTH_LEVEL {\n  if (!password) {\n    return STRENGTH_LEVEL.BLANK;\n  }\n\n  if (password.length < MINIMUM_PASSWORD_LENGTH) {\n    return STRENGTH_LEVEL.TOO_SHORT;\n  }\n\n  switch (zxcvbn(password, userFields).score) {\n    case 0:\n      return STRENGTH_LEVEL.WEAK;\n    case 1:\n      return STRENGTH_LEVEL.OK;\n    case 2:\n      return STRENGTH_LEVEL.GOOD;\n    case 3:\n    case 4:\n      return STRENGTH_LEVEL.GREAT;\n    default:\n      throw new Error('Unexpected password score');\n  }\n}\n\nfunction getPasswordSuggestion(password: string, userFields: string[]): string {\n  const {\n    feedback: {suggestions},\n  } = zxcvbn(password, userFields);\n\n  return suggestions[0];\n}\n\n/**\n * Reduce a user down to user fields\n */\nfunction userFields(user?: Record<string, unknown>) {\n  if (!user) {\n    return [];\n  }\n\n  return Object.keys(user)\n    .filter(\n      key => key !== 'password' && typeof user[key] === 'string' && key in user\n    )\n    .map(key => user[key] as string);\n}\n\ntype Props = {\n  user?: Record<string, unknown>;\n  password: string | undefined;\n};\n\nexport class PasswordStrengthCalculator extends React.Component<Props> {\n  calculateStrength(value: string) {\n    return calculatePasswordStrengthLevel(value, userFields(this.props.user));\n  }\n\n  validate(value: string) {\n    const strength = this.calculateStrength(value);\n    if (strength < STRENGTH_LEVEL.OK) {\n      return getPasswordSuggestion(value, userFields(this.props.user));\n    }\n  }\n\n  render() {\n    return (\n      <PasswordStrengthMeter\n        level={this.calculateStrength(this.props.password || '')}\n      />\n    );\n  }\n}\n","import React from 'react';\nimport {PasswordInput} from '@practicegenius/pg-ui/src/base/Material/components/PasswordInput';\nimport {voidOp} from '@practicegenius/pg-util/src/TypescriptUtils';\nimport {PasswordStrengthCalculator} from './PasswordStrengthCalculator';\nimport {InlineError} from './InlineError';\n\n/**\n * Password input for use when inputting a \"new password\"\n *  - Displays current password strength\n *  - Validates input (formState.errors)\n *  - Displays appropriate error messages (recommendation || displayError)\n *\n * See PasswordInput for inputting credentials to log in\n *\n * @deprecated - Prefer pg-ui version for new use-cases\n */\nexport function CreatePasswordInput(\n  props: {\n    name: string;\n    validate?: (validationMessage?: string) => void;\n    user?: Record<string, unknown>;\n  } & React.ComponentProps<typeof PasswordInput>\n) {\n  const {\n    name,\n    value,\n    onChange,\n    user,\n    validate = voidOp,\n    error,\n    ...inputProps\n  } = props;\n  const strengthCalculator: React.Ref<PasswordStrengthCalculator> =\n    React.useRef(null);\n\n  const inlineError = error && (\n    // @ts-ignore - TS thinks InlineError expects string | null, when it really excepts ?string, which is string | null | undefined\n    <InlineError error={error} />\n  );\n\n  return (\n    <>\n      <PasswordInput\n        {...inputProps}\n        name={name}\n        value={value}\n        onChange={onChange}\n        onBlur={() => {\n          value && validate(strengthCalculator.current?.validate(value));\n        }}\n        autoComplete=\"new-password\"\n      />\n      <PasswordStrengthCalculator\n        ref={strengthCalculator}\n        user={user}\n        password={value}\n      />\n      {inlineError}\n    </>\n  );\n}\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport {styled} from '@mui/material/styles';\nimport * as React from 'react';\n\nexport const ErrorMessage = styled('div')({\n  fontSize: '15px',\n  color: '#ff3539',\n  marginBottom: '15px',\n});\n\nexport function InlineError({error}: {error: string | undefined | null}) {\n  if (!error) {\n    return null;\n  }\n\n  return <ErrorMessage>{error}</ErrorMessage>;\n}\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport * as React from 'react';\nimport {styled} from '@mui/material/styles';\nimport {Link as RouterLink} from 'react-router-dom';\n\nconst LinkContainer = styled('a')(({theme}) => ({\n  color: theme.palette.primary.main,\n  fontWeight: 'bold',\n}));\n\nexport function Link({\n  children,\n  ...linkProps\n}: React.ComponentProps<'a'> & {\n  to?: string | {pathname: string; state: any};\n}) {\n  return (\n    <LinkContainer as={linkProps.to ? RouterLink : 'a'} {...linkProps}>\n      {children}\n    </LinkContainer>\n  );\n}\n","import React from 'react';\nimport {styled} from '@mui/material/styles';\nimport {inMobileApp} from '@practicegenius/pg-ui/src/utils/MobileApp';\nimport {LOGIN_ONLY} from '../constants/accessControl';\nimport {useDoesPracticeHaveAccess} from '../shared/hooks/useDoesPracticeHaveAccess';\n\nconst SupportFooter = styled('div')(({theme}) => ({\n  margin: '30px 0 45px',\n  fontSize: '16px',\n  color: theme.palette.secondary.main,\n}));\n\n/** @deprecated */\nexport const LoginSupportFooter = () => {\n  const isLoginOnly = useDoesPracticeHaveAccess(LOGIN_ONLY);\n  if (inMobileApp) return null;\n  const content = isLoginOnly ? null : (\n    <>\n      Need help logging in?\n      <br />\n      Contact our Customer Support Team at{' '}\n      <strong>(800) 560-1469 ext. 3</strong>\n    </>\n  );\n  return <SupportFooter>{content}</SupportFooter>;\n};\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport React from 'react';\nimport {styled} from '@mui/material/styles';\n\nconst Meter = styled('div')<{barHeight: number}>(({barHeight}) => ({\n  position: 'relative',\n  width: '100%',\n  height: `${barHeight}px`,\n  borderRadius: `${barHeight}px`,\n  backgroundColor: '#dcdcdc',\n}));\n\nconst Progress = styled('div')<{barHeight: number; color?: string}>(\n  ({theme, barHeight, color}) => ({\n    position: 'absolute',\n    height: `${barHeight}px`,\n    top: 0,\n    left: 0,\n    borderRadius: `${barHeight}px`,\n    backgroundColor: color || theme.palette.primary.main,\n    transition: 'all 500ms',\n  })\n);\n\n// Progress is a number 0 - 1\nexport function ProgressBar({\n  progress,\n  barHeight,\n  color,\n}: {\n  progress: number;\n  barHeight?: number;\n  color?: string;\n}) {\n  return (\n    <Meter barHeight={barHeight || 7}>\n      <Progress\n        sx={{width: `${progress * 100}%`}}\n        barHeight={barHeight || 7}\n        color={color}\n      />\n    </Meter>\n  );\n}\n","import * as R from 'ramda';\nimport React from 'react';\nimport {SocialAuthIntegration} from '@practicegenius/domain/src/data/integrations';\nimport {\n  Button,\n  ButtonWidth,\n} from '@practicegenius/pg-ui/src/base/Material/components/Button';\nimport Box from '@mui/material/Box';\nimport AppleIcon from '@mui/icons-material/Apple';\nimport {inMobileApp} from '../utils/MobileApp';\nimport {\n  SocialOauthAppSpecificProps,\n  useSocialOauth,\n} from '../hooks/useSocialAuth';\nimport {EmailIcon} from '../icons/EmailIcon';\nimport {ColoredGoogleLogo} from '../icons/social/ColoredGoogleLogo';\nimport {FacebookCircleLogo} from '../icons/social/FacebookCircleLogo';\nimport {SvgIconComponent} from '../icons/types';\n\nexport const socialPlatformLabels: {\n  [k in SocialAuthIntegration]: string;\n} = {\n  facebook: 'Facebook',\n  google: 'Google',\n  apple: 'Apple',\n};\n\nconst socialButtonIcons: Record<\n  SocialAuthIntegration | 'email',\n  SvgIconComponent\n> = {\n  apple: AppleIcon,\n  facebook: props => <FacebookCircleLogo useBrandColor {...props} />,\n  google: ColoredGoogleLogo,\n  email: EmailIcon,\n};\n\nexport type SocialLoginButtonsAppSpecificProps = SocialOauthAppSpecificProps & {\n  buildSocialProviderLoginLink: (props: {\n    provider: SocialAuthIntegration;\n  }) => string;\n  onAuthSuccess: (\n    platform: SocialAuthIntegration,\n    payload: {providerToken: string}\n  ) => unknown;\n};\n\nexport type SocialLoginButtonsProps = {\n  appProps: SocialLoginButtonsAppSpecificProps;\n  platforms: ReadonlyArray<SocialAuthIntegration>;\n};\n\nconst LoginButton = ({\n  appProps,\n  platform,\n  lastUsed,\n}: {\n  appProps: SocialLoginButtonsProps['appProps'];\n  platform: SocialAuthIntegration;\n  lastUsed: boolean;\n}) => {\n  const {startAuth} = useSocialOauth({\n    appProps,\n    enabled: inMobileApp,\n    platform,\n    authPopupUrl: `/login/social_provider/${platform}`,\n    onAuthSuccess: payload => appProps.onAuthSuccess(platform, payload),\n  });\n\n  const ButtonIcon = socialButtonIcons[platform];\n  return (\n    <Button\n      key={platform}\n      // This page is has the same route and param structure in kohana and next.js\n      href={appProps.buildSocialProviderLoginLink({provider: platform})}\n      onClick={e => {\n        if (inMobileApp) {\n          e.preventDefault();\n          startAuth();\n        }\n      }}\n      width={ButtonWidth.FULL_WIDTH}\n      data-external\n      sx={{\n        height: '55px',\n        backgroundColor: 'common.white',\n        color: 'text.secondary',\n        border: '1px solid rgba(0,0,0,0.60)',\n        borderWidth: lastUsed ? '2px' : undefined,\n        '&:hover,&:active,&:focus': {\n          backgroundColor: 'rgba(0, 0, 0, 0.04)',\n        },\n        justifyContent: 'flex-start',\n      }}\n      startIcon={\n        <Box\n          sx={{\n            borderTopLeftRadius: '5px',\n            borderBottomLeftRadius: '5px',\n            width: '75px',\n            height: '55px',\n            display: 'flex',\n            justifyContent: 'center',\n            alignItems: 'center',\n            // Pull icons farther left to more closely match old style\n            marginLeft: '-15px',\n          }}\n        >\n          <ButtonIcon />\n        </Box>\n      }\n    >\n      Continue With {socialPlatformLabels[platform]}\n    </Button>\n  );\n};\n\nexport function SocialLoginButtons(props: SocialLoginButtonsProps) {\n  const lastUsedSocialProvider =\n    props.appProps.lastUsedSocialProviderManager.get();\n\n  // The last used platform always shows at the top of the list\n  const sortedPlatforms = lastUsedSocialProvider\n    ? [\n        lastUsedSocialProvider,\n        ...R.reject(R.equals(lastUsedSocialProvider), props.platforms),\n      ]\n    : props.platforms;\n\n  return (\n    <Box\n      sx={{\n        display: 'flex',\n        flexDirection: 'column',\n        alignItems: 'center',\n        width: '100%',\n      }}\n    >\n      <Box\n        sx={{\n          display: 'flex',\n          flexDirection: 'column',\n          gap: 2,\n          width: '100%',\n          maxWidth: '300px',\n        }}\n      >\n        {sortedPlatforms.map(platform => (\n          <LoginButton\n            appProps={props.appProps}\n            lastUsed={platform === lastUsedSocialProvider}\n            key={platform}\n            platform={platform}\n          />\n        ))}\n      </Box>\n    </Box>\n  );\n}\n","import {z} from 'zod';\n\nexport const socialAuthIntegrationSchema = z.enum([\n  'facebook',\n  'google',\n  'apple',\n]);\n\n/** Third-party integrations through which end-users can use for sites-dot login */\nexport type SocialAuthIntegration = z.infer<typeof socialAuthIntegrationSchema>;\n","import {z} from 'zod';\n\nexport const authPerspectiveSchema = z.enum(['member', 'staff']);\n/** Defines the UX of the login form and adjacent UIs. For example: login attempts from my-dot will declare the 'staff' perspective */\nexport type AuthPerspective = z.infer<typeof authPerspectiveSchema>;\n\nexport const parseAuthPerspective = (\n  value: unknown\n): AuthPerspective | undefined => {\n  const parsed = authPerspectiveSchema.safeParse(value);\n  return parsed?.data;\n};\n","import {socialAuthIntegrationSchema} from '@practicegenius/domain/src/data/integrations';\nimport {z} from 'zod';\nimport {replaceSubdomainInUrl} from '@practicegenius/pg-util/src/UrlUtils';\nimport {authPerspectiveSchema} from './authPerspective';\n\n/** Subdomain of Central Identity Service */\nconst ID_SUBDOMAIN = 'id';\n\nexport const idDotLoginRoutes = {\n  index: '/login',\n  social: {\n    login: '/login/social_provider/:provider',\n    callback: '/login/social_provider/callback',\n  },\n};\n\nexport const idDotApiRoutesForLogin = {\n  authRefresh: '/api/s2s/authRefresh',\n  confirmLogin: '/api/s2s/confirmLogin',\n};\n\nexport const idDotLogoutRoutes = {\n  logout: {\n    index: '/app/logout',\n    initiate: '/app/logout/initiate',\n  },\n};\n\nconst loginErrorQueryParamSchema = z.union([\n  z.object({\n    errorType: z.literal('unregistered_social_account'),\n    provider: socialAuthIntegrationSchema,\n  }),\n  z.object({\n    errorType: z.literal('generic'),\n  }),\n  z.object({\n    errorType: z.literal('registration_not_finished'),\n    token: z.string(),\n    viaSocial: z.literal('1').optional(),\n  }),\n  z.object({}),\n]);\n\nexport const idDotLoginQueryParamsSchema = z.intersection(\n  loginErrorQueryParamSchema,\n  z.object({\n    referrer: z.string().optional(),\n    loginPerspective: authPerspectiveSchema.optional(),\n  })\n);\n\nexport const buildIdBaseUrlFromCurrentUrl = (currentUrl: string) =>\n  replaceSubdomainInUrl(currentUrl, ID_SUBDOMAIN);\n\nexport type IdDotLoginQueryParams = z.infer<typeof idDotLoginQueryParamsSchema>;\n\nexport const buildIdLoginUrlFromCurrentUrl = (\n  currentUrl: string,\n  params: IdDotLoginQueryParams\n) => {\n  const loginUrl = buildIdBaseUrlFromCurrentUrl(currentUrl);\n  loginUrl.pathname = idDotLoginRoutes.index;\n  if (params) {\n    for (const [key, value] of Object.entries(params)) {\n      loginUrl.searchParams.set(key, value);\n    }\n  }\n  return loginUrl;\n};\n\nexport const buildIdLogoutUrlFromCurrentUrl = (currentUrl: string) => {\n  const logoutUrl = buildIdBaseUrlFromCurrentUrl(currentUrl);\n  logoutUrl.pathname = idDotLogoutRoutes.logout.index;\n  return logoutUrl;\n};\n","import {socialAuthIntegrationSchema} from '@practicegenius/domain/src/data/integrations';\nimport {z} from 'zod';\nimport {resolveRoute} from '@practicegenius/pg-util/src/UrlUtils';\nimport {idDotLoginRoutes} from './sharedRoutes';\n\n// @see apps/api-core.patientrewardshub.com/globaluser/Http/Controllers/Social/AuthController.php handleProviderCallback $redirectUrl\nexport const socialProviderCallbackParamsSchema = z.object({\n  provider: socialAuthIntegrationSchema,\n  code: z.string().optional(),\n  token: z.string().optional(),\n});\n\ntype SocialProviderCallbackQueryParams = z.infer<\n  typeof socialProviderCallbackParamsSchema\n>;\n\nexport const buildSocialProviderCallbackLink = (\n  params: SocialProviderCallbackQueryParams\n) => `${idDotLoginRoutes.social.callback}?${new URLSearchParams(params)}`;\n\nexport const socialProviderLoginParamsSchema = z.object({\n  provider: socialAuthIntegrationSchema,\n});\n\ntype SocialProviderLoginParams = z.infer<\n  typeof socialProviderLoginParamsSchema\n>;\n\nexport const buildSocialProviderLoginLink = (\n  params: SocialProviderLoginParams\n) => resolveRoute(idDotLoginRoutes.social.login, params);\n","import React from 'react';\nimport {useIsNextJs} from '@practicegenius/next-utils/src/useIsNextJs';\nimport {\n  SocialLoginButtonsProps,\n  SocialLoginButtons as SharedSocialLoginButtons,\n} from '@practicegenius/pg-ui/src/components/SocialLoginButtons';\nimport {SocialAuthIntegration} from '@practicegenius/domain/src/data/integrations';\nimport {localStorageLastUsedSocialProviderManager} from '@practicegenius/pg-ui/src/utils/lastUsedSocialProvider';\nimport {\n  buildSocialProviderCallbackLink,\n  buildSocialProviderLoginLink,\n} from '@practicegenius/next-utils/src/id-dot/socialAuth';\nimport {loginWithSocialToken} from '../http/login';\nimport {PG_CORE_URL} from '../constants/env';\nimport log from '../utils/logger';\nimport {getWebsocket} from '../utils/websocket';\n\ntype Props = Omit<SocialLoginButtonsProps, 'appProps'> & {\n  onLoginError?: (\n    error: Error,\n    meta: {\n      platform: SocialAuthIntegration;\n      providerToken: string;\n    }\n  ) => unknown;\n};\n\nexport function SocialLoginButtons(props: Props) {\n  const isNextJs = useIsNextJs();\n\n  return (\n    <SharedSocialLoginButtons\n      {...props}\n      appProps={{\n        getWebsocket,\n        lastUsedSocialProviderManager:\n          localStorageLastUsedSocialProviderManager,\n        logger: log,\n        coreServiceUrl: PG_CORE_URL,\n        onAuthSuccess: async (platform, payload) => {\n          const {providerToken} = payload;\n          try {\n            if (isNextJs) {\n              // In the members-app the social callback page handles authenticating through a code (acquired through the web flow)\n              //  and the token (acquired through the mobile flow)\n              // @see apps/sites.patientrewardshub.com/src/next/members-app/pages/login/social_provider/callback.tsx\n              window.location.href = buildSocialProviderCallbackLink({\n                provider: platform,\n                token: providerToken,\n              });\n              return;\n            }\n\n            const loginResponse = await loginWithSocialToken(\n              platform,\n              providerToken\n            );\n\n            window.location.href = loginResponse.redirect;\n          } catch (e) {\n            props.onLoginError?.(e as Error, {platform, providerToken});\n          }\n        },\n        buildSocialProviderLoginLink,\n      }}\n    />\n  );\n}\n","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgEmailSent(props) {\n  return /*#__PURE__*/React.createElement(\"svg\", _extends({\n    width: 100,\n    height: 76,\n    xmlns: \"http://www.w3.org/2000/svg\"\n  }, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M89.933 70.05c0 3.198-2.031 5.789-4.535 5.789H4.535C2.03 75.839 0 73.249 0 70.05V19.882c0-3.196 2.03-5.788 4.535-5.788h80.863c2.504 0 4.535 2.592 4.535 5.788v50.169z\",\n    fill: \"#FFD829\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M50.355 48.759l35.744 27.08c2.17-.425 3.834-2.821 3.834-5.722V19.89c0-3.2-2.024-5.795-4.52-5.795h-.435L50.269 41.348c-2.629 2.066-2.59 5.383.086 7.41\",\n    fill: \"#F1BF33\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M4.243 75.839h80.948c.741 0 1.439-.23 2.057-.628L47.514 38.32c-2.048-1.902-5.339-1.874-7.35.062L2.014 75.095c.659.472 1.418.744 2.23.744\",\n    fill: \"#F1BF33\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M89.933 70.05V19.882c0-3.197-2.039-5.788-4.554-5.788H65.676a3.91 3.91 0 00-2.726 3.73 3.906 3.906 0 003.9 3.913h11.472a3.23 3.23 0 013.224 3.235 3.23 3.23 0 01-3.224 3.236h-.675a3.906 3.906 0 00-3.9 3.912 3.907 3.907 0 003.9 3.912h.675a3.23 3.23 0 013.224 3.235 3.23 3.23 0 01-3.224 3.235H64.15a3.906 3.906 0 00-3.899 3.912 3.906 3.906 0 003.9 3.913h14.171a3.23 3.23 0 013.224 3.235 3.23 3.23 0 01-3.224 3.235h-26.77a3.905 3.905 0 00-3.898 3.912 3.905 3.905 0 003.899 3.912h26.77a3.23 3.23 0 013.223 3.236 3.23 3.23 0 01-3.224 3.235H37.456a3.906 3.906 0 00-3.808 4.747h51.73c2.516 0 4.555-2.591 4.555-5.789\",\n    fill: \"#FFD829\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M86.225 14.765H4.095c-1.036 0-1.983.474-2.753 1.246l41.122 46.025c2.078 2.326 5.418 2.291 7.46-.076l39.338-45.636c-.812-.96-1.867-1.559-3.037-1.559\",\n    fillOpacity: 0.28,\n    fill: \"#000\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M84.929 14.094H4.052c-1.021 0-1.951.397-2.71 1.042l40.493 38.459c2.048 1.943 5.336 1.914 7.346-.064l38.738-38.134c-.799-.801-1.839-1.303-2.99-1.303\",\n    fill: \"#FFE56A\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M47.59 48.693c-1.03 1.232-2.76 1.302-3.867.155L23.69 28.098c-1.106-1.148-1.168-3.075-.14-4.308 1.03-1.231 2.762-1.302 3.867-.155L47.45 44.387c1.107 1.146 1.17 3.074.14 4.306\",\n    fillOpacity: 0.5,\n    fill: \"#FFF\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M99.672 14.764c0 8.06-6.534 14.595-14.594 14.595-8.06 0-14.595-6.534-14.595-14.595C70.483 6.704 77.017.17 85.078.17c8.06 0 14.594 6.534 14.594 14.594\",\n    fill: \"#E73026\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: \"#FFF\",\n    d: \"M84.588 20.349v-9.527h-.049l-3.006 2.075v-2.222l3.047-2.117h2.452v11.79z\"\n  }))));\n}\nexport default __webpack_public_path__ + \"c6b625b015d6afae7b0500318f88b7b1.svg\";\nexport { SvgEmailSent as ReactComponent };","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgEmailVerified(props) {\n  return /*#__PURE__*/React.createElement(\"svg\", _extends({\n    width: 136,\n    height: 185,\n    xmlns: \"http://www.w3.org/2000/svg\"\n  }, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M136 83.504c-17.917-17.088-38.248-35.91-60.995-56.469-3.117-2.898-8.124-2.855-11.185.094L5.333 83.504v7.351l130.667.7v-8.051z\",\n    fill: \"#F1BF33\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: \"#F1BF33\",\n    d: \"M5.333 171.556H136v-88.89H5.333z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M108.01 175.111H32.435c-4.639 0-8.434-3.81-8.434-8.466V66.244c0-4.657 3.795-8.466 8.434-8.466H89.21l27.234 27.337v81.53c0 4.656-3.795 8.466-8.433 8.466\",\n    fill: \"#FFF\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M96.889 124.889a2.222 2.222 0 01-2.222 2.222h-48.89a2.222 2.222 0 110-4.444h48.89c1.227 0 2.222.994 2.222 2.222M96.889 134.667a2.222 2.222 0 01-2.222 2.222h-48.89a2.222 2.222 0 110-4.445h48.89c1.227 0 2.222.995 2.222 2.223M96.889 146.223a2.222 2.222 0 01-2.222 2.221h-48.89a2.222 2.222 0 110-4.444h48.89c1.227 0 2.222.995 2.222 2.223\",\n    fill: \"#717F89\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M135.203 100.402l-57.176 41.97c-3.251 2.385-8.572 2.42-11.882.076L5.441 99.556c0 1.603-.108 3.237-.108 4.82v72.184c0 4.6 2.949 8.329 6.588 8.329h117.49c3.64 0 6.589-3.728 6.589-8.329v-72.185c0-1.439-.29-2.792-.797-3.973\",\n    fill: \"#FFD829\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M135.937 99.556s-.748.607-.763.603l-8.092 5.966c-.027.02-.047.046-.073.067h.069c3.046 0 5.516 2.476 5.516 5.53 0 3.055-2.47 5.531-5.516 5.531h-5.014c-3.046 0-5.516 2.476-5.516 5.53 0 3.055 2.47 5.531 5.516 5.531h1.477c.387.109.794.17 1.216.17 2.372 0 4.49 1.739 4.716 4.106a4.55 4.55 0 01-4.52 5.002h-17.406c-3.112 0-5.636 2.53-5.636 5.651 0 3.116 2.52 5.641 5.627 5.641h10.117c2.373 0 4.49 1.74 4.716 4.108a4.55 4.55 0 01-4.52 5H89.483c-2.864 0-5.417 2.063-5.778 4.913-.436 3.445 2.23 6.38 5.58 6.38h10.42a4.542 4.542 0 014.537 4.549 4.552 4.552 0 01-4.547 4.558H68.243c-.306 0-.597.053-.88.128H65.51a5.073 5.073 0 00-4.972 6.037h4.252v.268H95.69v.064h33.732c3.634 0 6.579-3.74 6.579-8.356v-72.41c0-1.433-.063-4.567-.063-4.567\",\n    fill: \"#F1BF33\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M54.387 150.282a4.003 4.003 0 01-5.585.992L15.933 128.21a4.034 4.034 0 01-.987-5.604 4.003 4.003 0 015.586-.991L53.4 144.679a4.033 4.033 0 01.988 5.603\",\n    fill: \"#FFF\",\n    opacity: 0.5\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M82.873 113.6l-32.204-4.694c-1.03-.15-1.754-1.016-1.615-1.934l3.722-24.588 35.937 5.238-3.722 24.588c-.139.918-1.087 1.54-2.118 1.39\",\n    fill: \"#FF3539\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M89.24 88.547l-37.243-5.429a1.103 1.103 0 01-.944-1.25l.87-5.746c.146-.96 1.057-1.624 2.037-1.481l35.913 5.234c.98.143 1.656 1.038 1.51 2l-.87 5.745c-.09.601-.66 1.016-1.273.927\",\n    fill: \"#FF3539\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: \"#BEA4FF\",\n    d: \"M70.174 111.749l-6.806-.992 5.146-33.995 6.805.992z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M64.271 75.088c-1.492-1.799-.73-3.718.674-4.482 1.405-.763 3.434-.47 4.446 1.615 1.012 2.085 1.205 5.853 1.205 5.853s-4.833-1.186-6.325-2.986zM80.313 78.741c2.037-1.145 2.014-3.21.976-4.426-1.038-1.216-3.037-1.67-4.729-.085-1.692 1.583-3.223 5.032-3.223 5.032s4.938.624 6.976-.521z\",\n    fill: \"#BEA4FF\",\n    fillRule: \"nonzero\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fillOpacity: 0.14,\n    fill: \"#000\",\n    d: \"M88.254 90.656l-35.938-5.239.334-2.204 35.937 5.238z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M89.766 58.667l-2.594 22.352c-.566 4.873 2.867 8.386 7.628 7.808l21.644-3.397-26.678-26.763z\",\n    fillOpacity: 0.28,\n    fill: \"#000\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M88.889 57.778v19.734c0 4.302 3.52 7.821 7.822 7.821h19.733L88.89 57.778z\",\n    fill: \"#E5EBEB\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M34.667 23.555a3.115 3.115 0 00-3.112 3.111 3.115 3.115 0 003.112 3.112 3.115 3.115 0 003.111-3.112 3.115 3.115 0 00-3.11-3.111m0 9.334a6.23 6.23 0 01-6.224-6.223 6.23 6.23 0 016.223-6.222 6.229 6.229 0 016.222 6.222 6.23 6.23 0 01-6.222 6.223M106.667 4c-2.206 0-4 1.794-4 4s1.794 4 4 4 4-1.794 4-4-1.794-4-4-4m0 12c-4.41 0-8-3.59-8-8 0-4.412 3.59-8 8-8 4.411 0 8 3.588 8 8 0 4.41-3.589 8-8 8\",\n    fill: \"#FFE56A\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M121.778 54.222v3.68c0 .422-.399.765-.89.765-.49 0-.888-.343-.888-.765v-3.68h-3.68c-.423 0-.764-.4-.764-.89s.341-.888.764-.888H120v-4.568c0-.422.398-.765.888-.765.491 0 .89.343.89.765v4.568h4.569c.422 0 .764.397.764.888 0 .49-.342.89-.764.89h-4.57zM8.888 58.667v6.052c0 .585-.397 1.059-.888 1.059-.49 0-.889-.474-.889-1.06v-6.051H1.058c-.585 0-1.058-.4-1.058-.89s.473-.888 1.058-.888H7.11v-6.052c0-.585.398-1.06.889-1.06.49 0 .889.475.889 1.06v6.052h6.053c.585 0 1.058.397 1.058.888 0 .49-.473.89-1.058.89H8.889z\",\n    fill: \"#27B1DB\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M108.445 43.556A3.559 3.559 0 01104.889 40a3.56 3.56 0 013.556-3.557A3.56 3.56 0 01112 40.001a3.559 3.559 0 01-3.555 3.555\",\n    fill: \"#FF3539\"\n  }))));\n}\nexport default __webpack_public_path__ + \"1fc0740cf5379cb99917fec05b6eabdb.svg\";\nexport { SvgEmailVerified as ReactComponent };","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgMailbox(props) {\n  return /*#__PURE__*/React.createElement(\"svg\", _extends({\n    width: 130,\n    height: 121,\n    xmlns: \"http://www.w3.org/2000/svg\"\n  }, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M130 82.899h-4.277V48.497c0-12.486-10.163-22.645-22.654-22.645-12.492 0-22.654 10.159-22.654 22.645v34.402H77.8l-.555-34.402c0-13.927 9.234-25.458 27.486-25.258C118.664 23.392 130 34.57 130 48.497v34.402z\",\n    fill: \"#A0EDFF\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: \"#65D6F8\",\n    d: \"M62.174 118.068h9.42v-35.17h-9.42z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fillOpacity: 0.28,\n    fill: \"#000\",\n    d: \"M71.594 98.599l-9.42-9.147v-6.553h9.42z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M23.865 82.899V54.667c0-17.012 13.862-30.802 30.964-30.802h40.439c21.877 1.176 30.964 10.751 30.964 28.037v30.997H23.865z\",\n    fill: \"#65D6F8\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M126.05 47.73H70.965v35.169h55.266v-31.17c0-1.384-.065-2.714-.183-4\",\n    fill: \"#44C8DC\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: \"#65EAEF\",\n    d: \"M70.338 77.874h55.894V64.058H70.338z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M71.594 82.899V48.466c0-13.24-10.684-23.973-23.864-23.973-13.18 0-23.865 10.733-23.865 23.973v34.433h47.73z\",\n    fill: \"#606075\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M72.85 82.899h-2.598V48.495c0-12.486-10.104-22.645-22.523-22.645-12.418 0-22.522 10.159-22.522 22.645V82.9H22.61V48.495c0-13.927 11.269-25.258 25.12-25.258 13.852 0 25.121 11.33 25.121 25.258V82.9z\",\n    fill: \"#A0EDFF\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M70.338 78.502H2.394C1.072 78.502 0 79.487 0 80.7 0 81.915 1.072 82.9 2.394 82.9h67.944v-4.397z\",\n    fill: \"#32D6EA\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: \"#F1443C\",\n    d: \"M83.527 1.256l19.468 7.537-19.468 7.536z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M117.44 35.483c0 1.908-1.608 3.454-3.59 3.454H77.068c-1.983 0-3.59-1.546-3.59-3.454 0-1.908 1.607-3.454 3.59-3.454h36.78c1.983 0 3.59 1.546 3.59 3.454\",\n    fillOpacity: 0.5,\n    fill: \"#FFF\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M82.71 73.478h3.517c2.67 0 4.836-2.108 4.836-4.71 0-2.601-2.165-4.71-4.836-4.71h-3.518c-2.67 0-4.835 2.109-4.835 4.71 0 2.602 2.165 4.71 4.835 4.71\",\n    fillOpacity: 0.1,\n    fill: \"#000\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M78.502 68.768a4.71 4.71 0 119.42 0 4.71 4.71 0 01-9.42 0\",\n    fill: \"#FFF\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M81.014 1.367C81.014.612 81.858 0 82.9 0c1.04 0 1.884.612 1.884 1.367v68.232c0 .755-.843 1.367-1.884 1.367-1.04 0-1.885-.612-1.885-1.367V1.367z\",\n    fill: \"#FFF\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M82.899 70.966c1.053-.06 1.884-.64 1.884-1.356V1.356C84.783.64 83.952.06 82.899 0v70.966z\",\n    fill: \"#B4CCC6\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M48.986 120.58c0-3.469 8.013-6.28 17.898-6.28s17.899 2.811 17.899 6.28H48.986z\",\n    fill: \"#65D6F8\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M62.174 75.382c0 1.724-1.176 3.12-2.628 3.12h-46.87c-1.451 0-2.628-1.396-2.628-3.12V48.338c0-1.724 1.177-3.12 2.628-3.12h46.87c1.452 0 2.628 1.396 2.628 3.12v27.044z\",\n    fill: \"#FFD829\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M57.302 45.217l-7.004 8.372.726 1.293a2.37 2.37 0 00-.883 1.843c0 1.312 1.05 2.376 2.347 2.376.561-.002.824-.002.787 0 1.27.086 2.284 1.249 2.284 2.557 0 1.071-.68 1.966-1.623 2.306h-5.21c-1.348 0-2.441 1.106-2.441 2.47 0 1.365 1.093 2.47 2.44 2.47h3.592a2.444 2.444 0 012.049 2.417c0 1.227-.89 2.224-2.049 2.416h-7.171c-1.348 0-2.44 1.105-2.44 2.47 0 1.047.644 1.936 1.553 2.295h15.285c1.453 0 2.63-1.396 2.63-3.12V48.338c0-1.724-1.177-3.12-2.63-3.12h-2.242z\",\n    fill: \"#F1BF33\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M12.559 45.217c-.357 0-.93.104-1.37.55l22.986 26.718c1.188 1.342 3.096 1.321 4.263-.044l22.63-26.617c-.463-.553-1.217-.607-1.886-.607H12.56z\",\n    fillOpacity: 0.28,\n    fill: \"#000\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M12.858 45.217c-.792 0-1.212.164-1.647.53l23.299 21.89c1.173 1.103 3.057 1.087 4.209-.036L61.056 45.81c-.458-.455-.846-.592-1.852-.592H12.858z\",\n    fill: \"#FFE56A\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M35.974 62.884c-.633.692-1.7.731-2.38.088L21.262 51.32a1.73 1.73 0 01-.086-2.418c.633-.691 1.7-.731 2.38-.087l12.332 11.65a1.73 1.73 0 01.086 2.418\",\n    fillOpacity: 0.5,\n    fill: \"#FFF\"\n  }))));\n}\nexport default __webpack_public_path__ + \"3692fbbf32cf355021035c7dc9e4accb.svg\";\nexport { SvgMailbox as ReactComponent };","var _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgPasswordReset(props) {\n  return /*#__PURE__*/React.createElement(\"svg\", _extends({\n    width: 161,\n    height: 130,\n    xmlns: \"http://www.w3.org/2000/svg\"\n  }, props), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n    fill: \"none\",\n    fillRule: \"evenodd\"\n  }, /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M72.348 62.297h17.304v-8.43c0-4.655-3.874-8.43-8.652-8.43-4.778 0-8.652 3.775-8.652 8.43v8.43zM81 40.221c7.735 0 14.006 6.11 14.006 13.646v13.647H66.994V53.867c0-7.536 6.27-13.646 14.006-13.646z\",\n    fill: \"#BBBDBF\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M69.966 65.283h22.068V54.249c0-6.094-4.94-11.034-11.034-11.034s-11.034 4.94-11.034 11.034v11.034zM81 40.296c7.706 0 13.953 6.247 13.953 13.953V68.2H67.048V54.25c0-7.706 6.246-13.953 13.952-13.953z\",\n    fill: \"#D0D2D3\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M68.43 60.483c0-.888.337-1.697.889-2.306h26.773a3.172 3.172 0 013.164 3.18v22.37a3.172 3.172 0 01-3.164 3.18H69.319a3.424 3.424 0 01-.888-2.307V60.483z\",\n    fill: \"#65D6F8\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M69.818 58.257h-7.133v28.65h7.133z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M65.996 58.257h3.822a3.327 3.327 0 00-.929 2.3v24.05c0 .885.352 1.692.929 2.3h-3.822c-1.828 0-3.31-1.42-3.31-3.171V61.428c0-1.751 1.482-3.17 3.31-3.17\",\n    fill: \"#44C8DC\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M77.05 70.704c0-2.937 3.273-5.117 6.407-3.164.297.186.55.435.738.73 1.629 2.553.423 5.199-1.71 6.056v3.961h-2.97v-3.961a3.91 3.91 0 01-2.465-3.622\",\n    fill: \"#6C6E70\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M77.816 70.032c0 1.873 1.168 3.476 2.825 4.14v4.093l-1.195.022v-3.841c-1.405-.564-2.396-1.923-2.396-3.512 0-1.058.44-2.205 1.148-2.892-.245.55-.382 1.35-.382 1.99z\",\n    fillOpacity: 0.28,\n    fill: \"#000\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M93.862 61.428a3.168 3.168 0 00-3.166-3.17h5.453a3.168 3.168 0 013.166 3.17v22.308a3.168 3.168 0 01-3.166 3.17h-5.453a3.168 3.168 0 003.166-3.17V61.428z\",\n    fill: \"#A0EDFF\"\n  }), /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M119.299 78.846c-8.41 15.05-23.193 25.41-39.033 25.41-21.789 0-39.53-17.332-40.188-38.962l-25.09-1.246c0 36.052 29.225 65.278 65.278 65.278 29.416 0 54.289-19.457 62.448-46.204L119.3 78.846z\",\n    fill: \"#E86342\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M43.865 48.28c6.554-13.312 21.765-23.076 37.26-22.658 23.638.637 39.62 17.73 40.278 39.36l25 .848c0-36.053-29.225-65.277-65.278-65.277-29.416 0-54.289 19.457-62.448 46.203l25.188 1.524z\",\n    fill: \"#FFD13D\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M96.287 127.344a5.622 5.622 0 00-5.2-7.76h-6.737c-2.963 0-5.547-2.282-5.636-5.243a5.41 5.41 0 015.409-5.577h16.974c2.994 0 5.608-2.26 5.802-5.248a5.622 5.622 0 00-4.91-5.95c-6.587 4.24-14.029 6.69-21.723 6.69-21.789 0-39.628-17.986-40.286-39.615l-24.991-.593c0 36.053 29.224 65.278 65.277 65.278a65.38 65.38 0 0016.021-1.982z\",\n    fill: \"#D64122\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M81.126 25.622a40.05 40.05 0 0117.049 3.786h1.452c2.995 0 5.608-2.26 5.802-5.248a5.622 5.622 0 00-5.61-5.996H85.218a5.41 5.41 0 110-10.82h8.998c2.587 0 4.887-1.689 5.59-4.075A65.274 65.274 0 0081.125.552C51.71.552 26.838 20.01 18.678 46.756l22.68 5.746c10.75-20.326 23.928-26.88 39.769-26.88\",\n    fill: \"#F1BA33\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: \"#FFD13D\",\n    d: \"M120.534 64.785H103.27l28.906 28.906 28.906-28.906h-14.675z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: \"#E86342\",\n    d: \"M40.857 65.093H58.12L29.213 36.187.31 65.093h14.675z\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    d: \"M127.381 36.588a3.591 3.591 0 016.621-1.931c7.443 11.694 8.404 22.56 7.9 29.615a3.592 3.592 0 01-7.164-.512c.43-5.978-.404-15.207-6.795-25.247a3.574 3.574 0 01-.562-1.925\",\n    fillOpacity: 0.5,\n    fill: \"#FFF\"\n  })))));\n}\nexport default __webpack_public_path__ + \"ed7cfff2611fe25add4582b850dd17c2.svg\";\nexport { SvgPasswordReset as ReactComponent };","import React from 'react';\nimport * as svgs from './svgs-raw';\n\nexport type $SvgName = keyof typeof svgs;\nexport const svgNames = Object.keys(svgs) as $SvgName[];\n\nexport function SvgImage({name}: {name: $SvgName}) {\n  const Component = svgs[name];\n\n  return <Component />;\n}\n","import {styled} from '@mui/material/styles';\n\n/**\n * Just a <button> with styles reset\n *\n * @deprecated use Material button\n */\nexport const TextButton = styled('button')({\n  margin: 0,\n  padding: 0,\n  border: 'none',\n  background: 'none',\n  color: 'inherit',\n  font: 'inherit',\n  cursor: 'pointer',\n\n  '&:disabled': {\n    opacity: 0.38,\n  },\n});\n\nTextButton.defaultProps = {\n  type: 'button',\n};\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport * as React from 'react';\nimport {Helmet} from 'react-helmet';\nimport {styled} from '@mui/material/styles';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport CloseIcon from '@mui/icons-material/Close';\nimport IconButton from '@mui/material/IconButton';\nimport Box from '@mui/material/Box';\nimport {\n  Button,\n  ButtonVariant,\n  ButtonWidth,\n} from '@practicegenius/pg-ui/src/base/Material/components/Button';\nimport {ProgressBar} from '../ProgressBar';\nimport {BREAKPOINTS} from '../../constants/layout';\n\nconst SectionHeading = styled('h2')({\n  fontSize: '24px',\n});\n\nconst Content = styled('div')({\n  flex: 'auto',\n  margin: '20px 0 20px 0',\n  display: 'flex',\n  flexDirection: 'column',\n});\n\nconst BottomText = styled('div')({\n  fontSize: '14px',\n  textAlign: 'center',\n});\n\nconst Wrapper = styled('div')({\n  marginBottom: '20px',\n});\n\nconst TitleWrapper = styled('div')({\n  display: 'flex',\n  justifyContent: 'space-between',\n  marginBottom: '16px',\n});\n\nconst P = styled('p')({\n  margin: 0,\n});\n\nconst HeaderIconButton = styled(IconButton)({\n  /* Only display for small screens */\n  [`@media (min-width: ${BREAKPOINTS.SMALL})`]: {\n    display: 'none',\n  },\n});\n\nconst HeaderIconPlaceholder = styled('div')(({theme}) => ({\n  width: theme.spacing(5),\n}));\n\nconst ScreenTitle = styled('h3')(({theme}) => ({\n  flex: 1,\n  color: theme.palette.common.black,\n  textAlign: 'center',\n  fontSize: '26px',\n  fontWeight: 300,\n  textTransform: 'none',\n  margin: 0,\n  position: 'relative',\n}));\n\nconst Card = styled('div')({\n  background: '#fff',\n  padding: '30px 45px 45px 45px',\n  minHeight: '600px',\n  width: '560px',\n  margin: '50px auto 20px auto',\n  display: 'flex',\n  flexDirection: 'column',\n\n  border: '1px solid #e5e5ea',\n\n  [`@media (max-width: ${BREAKPOINTS.SMALL})`]: {\n    border: 'none',\n    width: '100%',\n    height: 'auto',\n    padding: '20px 20px 0 20px',\n    margin: 0,\n  },\n\n  [`@media (min-width: ${BREAKPOINTS.SMALL}) and (max-width: ${BREAKPOINTS.MEDIUM})`]:\n    {\n      maxWidth: '560px',\n      width: '90%',\n    },\n});\n\nconst Hr = styled('div')({\n  height: '1px',\n  flex: 1,\n  backgroundColor: '#e5e5ea',\n});\n\nconst Outer = styled('div')({\n  background: '#fff',\n\n  [`@media (max-width: ${BREAKPOINTS.SMALL})`]: {\n    top: 0,\n    left: 0,\n    width: '100%',\n    height: '100%',\n    zIndex: 100,\n    overflowY: 'scroll',\n  },\n});\n\nconst ButtonContainer = styled('div')<{\n  containsMultipleButtons: boolean | undefined;\n}>(({containsMultipleButtons}) => ({\n  display: 'flex',\n  flexDirection: 'row-reverse',\n  justifyContent: containsMultipleButtons ? 'space-between' : 'center',\n\n  [`@media (max-width: ${BREAKPOINTS.SMALL})`]: {\n    flexDirection: 'column',\n    alignItems: 'center',\n  },\n}));\n\ntype CustomWidth = 'extraWide';\ntype CustomHeight = 'tall';\n\nexport type ExtendedButtonProps = Omit<\n  React.ComponentProps<typeof Button>,\n  'variant'\n> & {\n  bottomMargin?: boolean;\n  variant?: 'outlined';\n  /** Specify a custom height variant not defined in the base Button */\n  customWidth?: CustomWidth;\n  /** Specify a custom width variant not defined in the base Button */\n  customHeight?: CustomHeight;\n};\n\ntype Props = {\n  helmetTitle: string;\n  headerTitle: string;\n  title?: string;\n  instructions?: React.ReactNode;\n  children: React.ReactNode;\n  actionButtons?: Array<ExtendedButtonProps>;\n  afterButtons?: React.ReactNode;\n  bottomText?: React.ReactNode;\n  disableModalMode?: boolean;\n  cancelProps?: React.ComponentProps<'a'> | React.ComponentProps<'button'>;\n  hideBackButton?: boolean;\n};\n\nexport function BaseScreen({\n  cancelProps,\n  divider,\n  hideBackButton = false,\n  ...props\n}: Props & {\n  divider?: React.ReactElement<typeof ProgressBar>;\n}) {\n  return (\n    <Outer>\n      <Helmet title={`${props.helmetTitle} | PatientRewardsHub.com`} />\n      <Card>\n        <Wrapper>\n          <TitleWrapper>\n            {hideBackButton ? (\n              <HeaderIconPlaceholder />\n            ) : (\n              <HeaderIconButton\n                title=\"Go Back\"\n                onClick={() => {\n                  window.history.back();\n                }}\n              >\n                <ArrowBackIcon />\n              </HeaderIconButton>\n            )}\n            <ScreenTitle>{props.headerTitle}</ScreenTitle>\n            {cancelProps ? (\n              <HeaderIconButton\n                // @ts-ignore\n                component={'href' in cancelProps ? 'a' : 'button'}\n                {...cancelProps}\n              >\n                <CloseIcon />\n              </HeaderIconButton>\n            ) : (\n              <HeaderIconPlaceholder />\n            )}\n          </TitleWrapper>\n          {divider || <Hr />}\n        </Wrapper>\n        {props.title && <SectionHeading>{props.title}</SectionHeading>}\n        {Boolean(props.instructions) && <P>{props.instructions}</P>}\n        <Content>{props.children}</Content>\n        {props.actionButtons && (\n          <ButtonContainer\n            containsMultipleButtons={Boolean(\n              props.actionButtons && props.actionButtons.length > 1\n            )}\n          >\n            {props.actionButtons.map((buttonProps, i) => (\n              <StyledButton key={i} {...buttonProps}>\n                <Box>{buttonProps.children}</Box>\n              </StyledButton>\n            ))}\n          </ButtonContainer>\n        )}\n        {props.afterButtons}\n      </Card>\n      {Boolean(props.bottomText) && <BottomText>{props.bottomText}</BottomText>}\n    </Outer>\n  );\n}\n\nexport function ProgressScreen({\n  children,\n  progress,\n  ...props\n}: Props & {\n  progress: number;\n}) {\n  return (\n    <BaseScreen {...props} divider={<ProgressBar progress={progress} />}>\n      {children}\n    </BaseScreen>\n  );\n}\n\nconst StyledButton: React.FC<ExtendedButtonProps> = props => {\n  const {\n    bottomMargin = true,\n    variant,\n    color,\n    customHeight,\n    customWidth,\n    ...rest\n  } = props;\n  return (\n    <Button\n      width={ButtonWidth.WIDE}\n      variant={variant as ButtonVariant | undefined}\n      color={color}\n      loadingIndicatorColor=\"primary\"\n      {...rest}\n      sx={theme => ({\n        minHeight: 40,\n        width: customWidth === 'extraWide' ? 300 : undefined,\n        height: customHeight === 'tall' ? 55 : undefined,\n        lineHeight: 'normal',\n        [theme.breakpoints.down('sm')]: {\n          marginBottom: bottomMargin ? '20px' : undefined,\n          width: '100%',\n        },\n      })}\n    />\n  );\n};\n","import {styled} from '@mui/material/styles';\n\nexport const CenteredWrapper = styled('div')({\n  display: 'flex',\n  justifyContent: 'center',\n  height: '100%',\n  alignItems: 'center',\n  flex: 1,\n});\n","export const LOGIN_ONLY = 'login_only';\n\nexport const HAS_SERVICE_ACCESS = 'global';\nexport const HAS_SMS_MESSAGING = 'sms_messaging';\n\n// TODO FLOW-TO-TS Convert to Enum\nexport type AccessControl =\n  | typeof HAS_SERVICE_ACCESS\n  | typeof HAS_SMS_MESSAGING;\n","export const BREAKPOINTS = {\n  SMALL: '30em',\n  MEDIUM: '48em',\n  LARGE: '78em',\n  XLARGE: '120em',\n};\n","import {ValidationException} from '@practicegenius/http-clients-js/src/exceptions';\n\n/** @deprecated use http-clients-js/exceptions.ValidationException instead */\nexport class CrappyValidationException extends ValidationException {\n  // extend ValidationException so instanceof with this works\n  constructor(data: Record<string, unknown>) {\n    super(\n      data,\n      // @ts-expect-error The exact point of this class is to set a fake version of the response\n      {}\n    );\n    this.errors = (data.errors ?? {}) as Record<string, string[]>;\n    this.data = data;\n  }\n}\n","import {makeNoAuthApiClient} from '@practicegenius/http-clients-js/src/ApiClient';\nimport {PG_CORE_URL} from '../constants/env';\n\nexport const coreApiClientNoAuth = makeNoAuthApiClient({\n  baseURL: PG_CORE_URL,\n});\n","import {SocialAuthIntegration} from '@practicegenius/domain/src/data/integrations';\nimport {OauthAuthorizationTokens} from '@practicegenius/register-account/src/data/types';\n\nimport {\n  OauthAuthorizationTokens$Server,\n  UserLoginPayload,\n} from '../types/loginTypes';\nimport {sitesHttpClient} from './AuthApiProvider';\nimport {coreApiClientNoAuth} from './httpClientsJs';\nimport {CrappyValidationException} from './exceptions';\n\nfunction incomingUserLoginPayload(\n  incomingData: UserLoginPayload\n): UserLoginPayload {\n  const {redirect, ...otherData} = incomingData;\n\n  /**\n   * Login unfortunately sends down either a fully qualified url with\n   * protocol, or a relative url that may be missing the \"/\" prefix.\n   */\n  const transformedRedirect = /^http/.test(redirect)\n    ? redirect\n    : `/${redirect}`.replace('//', '/');\n\n  return {\n    ...otherData,\n    redirect: transformedRedirect,\n  };\n}\n\nexport async function loginWithCredentials(\n  login: string,\n  password: string,\n  csrf_token: string,\n  recaptcha_token: string | null,\n  remember_me = false,\n  platform: string\n): Promise<UserLoginPayload> {\n  const response = await sitesHttpClient._unsafe.post(\n    '/login',\n    {\n      login,\n      password,\n      remember_me: Number(remember_me),\n      platform,\n    },\n    {\n      headers: {\n        'X-CSRF-TOKEN': csrf_token,\n        'X-RECAPTCHA-TOKEN': recaptcha_token,\n      },\n    }\n  );\n\n  if (!response.data.success) {\n    throw new CrappyValidationException(response.data);\n  }\n\n  return incomingUserLoginPayload(response.data);\n}\n\nexport async function loginWithSocialToken(\n  provider: SocialAuthIntegration,\n  social_access_token: string\n): Promise<UserLoginPayload> {\n  const response = await sitesHttpClient._unsafe.post('/login', {\n    provider,\n    social_access_token,\n  });\n\n  if (!response.data.success) {\n    throw new CrappyValidationException(response.data);\n  }\n\n  return incomingUserLoginPayload(response.data);\n}\n\nexport function parseAuthorizationTokens(\n  data: OauthAuthorizationTokens$Server\n): OauthAuthorizationTokens {\n  return {\n    tokenType: data.token_type,\n    expiresIn: data.expires_in,\n    accessToken: data.access_token,\n    refreshToken: data.refresh_token,\n  };\n}\n\nfunction serializeAuthorizationTokens(\n  tokens: OauthAuthorizationTokens\n): OauthAuthorizationTokens$Server {\n  return {\n    token_type: tokens.tokenType,\n    expires_in: tokens.expiresIn,\n    access_token: tokens.accessToken,\n    refresh_token: tokens.refreshToken,\n  };\n}\n\nexport async function loginWithOauthAccessTokens(\n  tokens: OauthAuthorizationTokens,\n  optionalData: {\n    remember_me: boolean;\n  } = {remember_me: true}\n): Promise<UserLoginPayload> {\n  const response = await sitesHttpClient._unsafe.post('/login', {\n    ...optionalData,\n    remember_me: Number(optionalData.remember_me),\n    ...serializeAuthorizationTokens(tokens),\n  });\n\n  if (!response.data.success) {\n    throw new CrappyValidationException(response.data);\n  }\n\n  return incomingUserLoginPayload(response.data);\n}\n\n/**\n * POST /global_users/forgot_username email request\n */\nexport async function forgotUsername(data: {email: string}): Promise<{}> {\n  return coreApiClientNoAuth._unsafe.post(\n    '/global_users/forgot_username',\n    data\n  );\n}\n\n/**\n * POST /global_users/forgot_password email request\n */\nexport async function forgotPassword(data: {\n  username_or_email: string;\n}): Promise<void> {\n  return coreApiClientNoAuth._unsafe.post(\n    '/global_users/forgot_password',\n    data\n  );\n}\n\n/**\n * POST /global_users/reset_password/:token email request\n */\nexport async function resetPassword(data: {\n  password: string;\n  password_confirmation: string;\n  token: string;\n}): Promise<OauthAuthorizationTokens> {\n  const {\n    data: tokenData,\n  }: {\n    data: OauthAuthorizationTokens$Server;\n  } = await sitesHttpClient._unsafe.post('/login/renewpassword', data);\n\n  return parseAuthorizationTokens(tokenData);\n}\n","import {Input} from '@practicegenius/pg-ui/src/base/Material/components/Input';\nimport * as React from 'react';\n\ntype Props = Omit<React.ComponentProps<typeof Input>, 'type'> & {\n  autoFocus?: boolean;\n  inputRef?: React.RefObject<HTMLInputElement>;\n};\n\nexport function EmailInput(props: Props) {\n  return (\n    <Input\n      autoCorrect=\"off\"\n      autoComplete=\"off\"\n      autoCapitalize=\"off\"\n      spellCheck={false}\n      {...props}\n      type=\"email\"\n    />\n  );\n}\n","import {CheckInType} from '../apps/earn-points/data/checkIn';\nimport {routes as homeRoutes} from '../apps/home/routes';\nimport {\n  registrationRoutes,\n  basename as registrationIndexRoute,\n} from '../apps/register-account/routes';\n\nexport const globalRoutes = {\n  ...homeRoutes,\n  account: {\n    register: {\n      index: registrationIndexRoute,\n      ...registrationRoutes,\n    },\n  },\n  // TODO fill out incomplete routes\n  points: {\n    index: '/points',\n    checkin: {\n      qr_code: '/points/checkin/qr_code/:id',\n    } as Record<CheckInType, string>,\n  },\n};\n","import {usePhpJs} from '../../utils/php-js';\n\nexport const useDoesPracticeHaveAccess = (feature: string): boolean => {\n  return usePhpJs((phpJs = {}) =>\n    (phpJs.practiceFeatures || []).includes(feature)\n  );\n};\n","import {ValidationException} from '@practicegenius/http-clients-js/src/exceptions';\nimport {coreApiClientNoAuth} from '../../http/httpClientsJs';\n\nexport type LinkedPractice = {\n  name: string;\n  hubUrl: string;\n};\n\nfunction rethrowValidationErrors(\n  transformErrors: (a: any) => any\n): (a: any) => void {\n  return error => {\n    if (error instanceof ValidationException) {\n      throw new ValidationException(\n        transformErrors(error.errors),\n        error.response\n      );\n    }\n\n    throw error;\n  };\n}\n\n/**\n * POST /global_users/registration/rewards_card_verification?include=practice\n */\nexport async function preverifyRewardsCard(cardNumber: string): Promise<{\n  practice: LinkedPractice;\n}> {\n  const {\n    // @ts-ignore\n    data: {\n      included: {practice},\n    },\n  } = await coreApiClientNoAuth._unsafe\n    .post(\n      '/global_users/registration/rewards_card_verification?include=practice',\n      {card_number: cardNumber}\n    )\n    .catch(\n      rethrowValidationErrors(({card_number}) => ({cardNumber: card_number}))\n    );\n\n  return {\n    practice: {\n      ...practice,\n      name: practice.name,\n      hubUrl: practice.hub_url,\n    },\n  };\n}\n\ntype UsernameSuggestions = Array<string>;\n\nexport async function getUsernameSuggestions(\n  count: number\n): Promise<UsernameSuggestions> {\n  const {\n    data: {items},\n  } = await coreApiClientNoAuth._unsafe.get(\n    `/global_users/username_suggestion?count=${count}`\n  );\n  return items;\n}\n","import qs, {ParsedQs} from 'qs';\n\n// TODO this does not need to be a hook\nexport function useQueryParams<T extends ParsedQs>(): T {\n  return qs.parse(window.location.search.slice(1)) as T;\n}\n","import * as React from 'react';\n\ntype PhpJsType = {\n  [x: string]: any;\n};\n\nexport interface PhpJsWindow<PhpJs> extends Window {\n  phpJs: PhpJs;\n}\n\n/**\n * This is currently reading directly from window.\n * This poor excuse of a hook hopes to see this promoted somewhere better...\n * *Really, this is just as legitimate and equivalent to the withPhpJs HoC\n */\nexport function usePhpJs<PhpJs = PhpJsType, Return = PhpJs>(\n  callback: (a: PhpJs) => Return,\n  global: {\n    phpJs: PhpJs;\n  } = window as PhpJsWindow<PhpJs>\n) {\n  return callback(global.phpJs);\n}\n\n/**\n * HoC to pluck out and pass down data from phpJs\n */\nexport const withPhpJs =\n  <PhpJs = PhpJsType, Return = PhpJs>(\n    getPhpJs: (a: PhpJs) => Return,\n    global: {\n      phpJs: PhpJs;\n    } = window as PhpJsWindow<PhpJs>\n  ) =>\n  (component: React.ComponentType<any>): React.ComponentType<any> => {\n    return props =>\n      React.createElement(component, {...getPhpJs(global.phpJs), ...props});\n  };\n","import {urlJoin} from '@practicegenius/pg-util/src/UrlUtils';\nimport {FILES_URL} from '../constants/env';\n\nexport const GENERIC_HUB = 'hub';\n\nexport function getPracticeHubName(): string {\n  const [subdomain] = window.location.host.split('.');\n  return subdomain;\n}\n\nexport const getLogoUrl = (filename: string): string =>\n  urlJoin(FILES_URL, 'identity', filename);\n\nexport const isGenericHub = getPracticeHubName() === GENERIC_HUB;\n","/**\n * Ensure zero padding so that zeroPad(7, 3) === \"007\"\n */\nexport function zeroPad(value: string | number, ensureLength: number): string {\n  const asString = String(Number(value));\n\n  if (asString.length < ensureLength) {\n    return (\n      Array(ensureLength - asString.length)\n        .fill('0')\n        .join('') + asString\n    );\n  }\n\n  return asString;\n}\n\n/**\n * Replace all <br/> with line break, then strip all HTML tags.\n */\nexport function stripHtmlTags(str: string): string {\n  // @ts-ignore\n  return typeof str === 'string' || str instanceof String\n    ? str\n        .replace(/<br\\s*[\\/]?>/gi, '\\r\\n')\n        .replace(/<[^>]*>/g, '')\n        .replace(/ +(?= )/g, '')\n    : str;\n}\n\nexport const capitalize = (str: string): string =>\n  str.charAt(0).toUpperCase() + str.slice(1);\n\nexport const isEmail = (str: string): boolean =>\n  Boolean(\n    str.match(\n      /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$/\n    )\n  );\n","import {Prettify} from '@practicegenius/pg-util/src/TypescriptUtils';\nimport {SocialAuthIntegration} from '../data/integrations';\nimport {GlobalUserProfile} from '../data/users/GlobalUser';\nimport {MobilePushNotification} from './mobile-push-notifications';\nimport {DirectSocialSharePayload} from './social-sharing';\n\nexport type MobileAppMessageChannel =\n  | 'generic'\n  | 'login'\n  | 'socialAuth'\n  | 'pushNotifications'\n  | 'debug'\n  | 'recaptcha';\n\ntype NewFeature = 'recaptcha';\n\nexport type GenericAppToSitesMessage = Prettify<\n  {channel: 'generic'} & (\n    | {\n        type: 'receive_shared_content_code';\n        payload: {\n          shareCode: string;\n        };\n      }\n    | {\n        type: 'handle_mobile_logout';\n        payload: {\n          deviceType: string;\n          token: string | null;\n        };\n      }\n    | {\n        type: 'supports_feature';\n        payload: NewFeature;\n      }\n  )\n>;\n\nexport type DebugAppToSitesMessage = {\n  channel: 'debug';\n  type: 'receive_app_debug_info';\n  payload: {\n    isDebug: boolean;\n  };\n};\n\nexport type PushNotificationsAppToSitesMessage = Prettify<\n  {channel: 'pushNotifications'} & (\n    | {\n        type: 'receive_register_push_notification_token';\n        payload: {\n          deviceType: string;\n          token: string;\n          previousTokens?: string[];\n        };\n      }\n    | {\n        type: 'receive_mobile_push_notification';\n        payload: {\n          notification: MobilePushNotification;\n        };\n      }\n  )\n>;\n\nexport type SocialAuthAppToSitesMessage = {\n  channel: 'socialAuth';\n  type: 'receive_social_auth_success';\n  payload: {\n    platform: SocialAuthIntegration;\n    /** This contains important metadata needed to connect the registering user to a practice user record. */\n    extraData: Record<string, unknown>;\n    token: string;\n  };\n};\n\nexport type ReceiveRecaptchaTokenAppToSitesMessage = {\n  channel: 'recaptcha';\n  type: 'receive_recaptcha_token';\n  payload: {\n    recaptchaToken: string;\n    platform: 'ios' | 'android';\n  };\n};\n\nexport type AppToSitesMessage =\n  | DebugAppToSitesMessage\n  | GenericAppToSitesMessage\n  | PushNotificationsAppToSitesMessage\n  | SocialAuthAppToSitesMessage\n  | ReceiveRecaptchaTokenAppToSitesMessage;\n\nexport type ChannelUpdateSitesToAppMessage = {\n  type: 'channel_update';\n  payload: {\n    channel: MobileAppMessageChannel;\n    ready: boolean;\n  };\n};\n\nexport const makeChannelUpdateMessage = (\n  channel: MobileAppMessageChannel,\n  ready: boolean\n) =>\n  ({\n    type: 'channel_update',\n    payload: {\n      channel,\n      ready,\n    },\n  } as ChannelUpdateSitesToAppMessage);\n\n/** Sites-dot asks the app to open the URL in an external browser */\nexport type RequestOpenExternalUrlSitesToAppMessage = {\n  type: 'request_open_external_url';\n  payload: {\n    url: string;\n  };\n};\n\n/** Sites-dot sends the user profile to the mobile app */\nexport type ReceiveUserProfileSitesToAppMessage = {\n  type: 'receive_user_profile';\n  payload: GlobalUserProfile & {\n    /** The notification data for the active practice user */\n    notificationCounts: {\n      messages: number;\n      appointments: number;\n    };\n    cookie: string;\n  };\n};\n\n/** Sites-dot asks the mobile app to initiate a native social auth workflow with the given provider */\nexport type RequestSocialAuthSitesToAppMessage = {\n  type: 'request_social_auth';\n  payload: {\n    platform: SocialAuthIntegration;\n  };\n};\n\n/** Sites-dot asks the mobile app for app debug info */\nexport type RequestDebugInfoSitesToAppMessage = {\n  type: 'request_app_debug_info';\n};\n\n/** Sites-dot asks the mobile app to open the debug menu */\nexport type OpenMobileDebugSitesToAppMessage = {\n  type: 'open_mobile_debug';\n};\n\n/** Sites-dot asks the mobile app to perform its logout steps */\nexport type RequestLogoutSitesToAppMessage = {\n  type: 'request_logout';\n};\n\n/** Sites-dot informs the mobile app of the user's authentication status */\nexport type NotifyUserAuthenticationStatusSiteToAppMessage = {\n  type: 'notify_user_authenticated_status';\n  payload: {\n    authenticated: boolean;\n  };\n};\n\nexport type RequestScreenWakeLockSitesToAppMessage = {\n  type: 'request_screen_wake_lock';\n  payload: {\n    enabled: boolean;\n  };\n};\n\n/** Old messages sent by sites-dot that don't adhere to the modern {type, payload} format */\nexport type LegacySitesToAppMessage =\n  | {\n      requestLogout: unknown;\n    }\n  | {\n      requestOrientation: 'landscape' | 'portrait';\n    }\n  | ({\n      requestDirectSocialShare: true;\n    } & DirectSocialSharePayload)\n  | {\n      action: 'url_preverification';\n      statusCode: number;\n    }\n  | {\n      type: 'webview_navigated';\n      payload: unknown;\n    };\n\nexport type RequestRecaptchaTokenSitesToAppMessage = {\n  type: 'request_recaptcha_token';\n  payload: {\n    actionName: string;\n  };\n};\n\nexport type RequestAppSupportsFeature = {\n  type: 'supports_feature';\n  feature: NewFeature;\n};\n\n/** Messages sent by sites-dot to the mobile app. There is only one receiving channel in the mobile app,\n *   so channel is not a member of this data structure\n */\nexport type SitesToAppMessage =\n  | ChannelUpdateSitesToAppMessage\n  | RequestOpenExternalUrlSitesToAppMessage\n  | ReceiveUserProfileSitesToAppMessage\n  | RequestSocialAuthSitesToAppMessage\n  | OpenMobileDebugSitesToAppMessage\n  | RequestLogoutSitesToAppMessage\n  | RequestDebugInfoSitesToAppMessage\n  | NotifyUserAuthenticationStatusSiteToAppMessage\n  | RequestScreenWakeLockSitesToAppMessage\n  | LegacySitesToAppMessage\n  | RequestRecaptchaTokenSitesToAppMessage\n  | RequestAppSupportsFeature;\n","/** Detects if rendering in a Next.js environment */\nexport const useIsNextJs = () => {\n  try {\n    // Requiring useRouter this way prevents a bundle-level issue in the router from crashing the app\n    // eslint-disable-next-line @typescript-eslint/no-var-requires,global-require\n    const {useRouter} = require('next/router');\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useRouter();\n    return true;\n  } catch (e) {\n    return false;\n  }\n};\n","import * as React from 'react';\nimport {styled} from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\nimport MuiCheckbox from '@mui/material/Checkbox';\nimport {FieldInput} from './FieldInput';\nimport {makeSxStyles, MuiSxProps} from '../utils/sx-helpers';\n\nconst makeUseStyles = ({\n  noWrap,\n  disabled,\n}: {\n  noWrap: boolean;\n  disabled: boolean;\n}) =>\n  makeSxStyles(theme => ({\n    label: {\n      cursor: 'pointer',\n      display: 'flex',\n      alignItems: 'center',\n      width: (() => (noWrap ? 0 : undefined))(),\n      flex: (() => (noWrap ? 1 : undefined))(),\n    },\n    text: {\n      color: (() =>\n        disabled ? theme.palette.text.disabled : theme.palette.text.primary)(),\n    },\n  }));\n\nconst SxLabel = styled('label')({});\n\nconst StyledCheckbox = styled(MuiCheckbox)(({theme}) => ({\n  padding: '3px',\n  marginRight: theme.spacing(2),\n}));\n\ntype CheckboxProps = React.ComponentProps<typeof MuiCheckbox> & {\n  checked?: boolean;\n  label?: React.ReactNode;\n  labelProps?: React.ComponentProps<typeof Typography>;\n  /** Custom typography component to use for the label */\n  LabelComponent?: React.ComponentType;\n  /** Custom Checkbox component to use for the box */\n  CheckboxComponent?: typeof MuiCheckbox;\n  noWrap?: boolean;\n  sx?: MuiSxProps;\n};\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n  name,\n  label,\n  color = 'primary',\n  labelProps = {variant: 'body2', component: 'span'},\n  LabelComponent,\n  CheckboxComponent,\n  noWrap = false,\n  sx = {},\n  ...props\n}) => {\n  const [styles] = makeUseStyles({noWrap, disabled: Boolean(props.disabled)})();\n  const CheckboxRoot = CheckboxComponent ?? StyledCheckbox;\n\n  const LabelRoot =\n    LabelComponent ??\n    ((({children}) => (\n      <Typography\n        {...labelProps}\n        className=\"label\"\n        sx={styles.text}\n        noWrap={noWrap}\n      >\n        {children}\n      </Typography>\n    )) as React.FC<React.PropsWithChildren>);\n\n  return (\n    <SxLabel sx={{...styles.label, ...sx}} htmlFor={name}>\n      <CheckboxRoot className=\"input\" id={name} color={color} {...props} />\n      <LabelRoot>{label}</LabelRoot>\n    </SxLabel>\n  );\n};\n\nexport const FieldCheckboxGroup: React.FC<{\n  checkboxes: CheckboxProps[];\n}> = ({checkboxes}) => (\n  <>\n    {checkboxes.map((props: CheckboxProps) => (\n      <FieldInput\n        key={props.name}\n        {...props}\n        type=\"checkbox\"\n        component={Checkbox}\n      />\n    ))}\n  </>\n);\n","import * as React from 'react';\nimport {\n  Field,\n  FieldRenderProps,\n} from '@practicegenius/react-final-form/src/Field';\nimport {Input} from './Input';\n\ntype $ObjMap<T extends {}, F extends (v: any) => any> = {\n  [K in keyof T]: F extends (v: T[K]) => infer R ? R : never;\n};\n\ntype FieldProps = React.ComponentProps<typeof Field>;\n\ntype FieldInputProps<T extends React.ComponentType<any>> = Omit<\n  React.ComponentProps<T>,\n  keyof $ObjMap<FieldRenderProps['input'], () => any>\n> & {\n  type?: string;\n  name?: FieldProps['name'];\n  validate?: FieldProps['validate'];\n  initialValue?: FieldProps['initialValue'];\n  format?: FieldProps['format'];\n  parse?: FieldProps['parse'];\n  // This component needs to be refactored to allow for the caller of this to pass in a\n  // function to render the element instead of doing the rendering here\n  // TODO ⏫\n  component?: T;\n  // This is a catch-all to allow any extra props to be passed in. Related to the above TODO\n  [k: string]: any;\n};\n\n/**\n * Light layer on top of Field + Input to eliminate render function boilerplate\n * Works for 90% of use cases. Use Field + Input if this doesn't satisfy your needs!\n */\nexport function FieldInput<ComponentType extends React.ComponentType<any>>({\n  name,\n  initialValue,\n  validate,\n  // @ts-ignore\n  component: Component = Input,\n  type,\n  format,\n  parse,\n  ...otherProps\n}: FieldInputProps<ComponentType>) {\n  const fieldProps = {\n    name: name as string,\n    validate,\n    initialValue,\n    type,\n    format,\n    parse,\n  };\n\n  return (\n    <Field {...fieldProps}>\n      {({input, meta}): React.ReactNode => (\n        // @ts-ignore\n        <Component {...otherProps} {...input} error={meta.displayError} />\n      )}\n    </Field>\n  );\n}\n","import * as React from 'react';\nimport CheckIcon from '@mui/icons-material/Check';\nimport ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';\nimport {RefObject} from 'react';\nimport {IconButton, InputAdornment, TextField} from '@mui/material';\nimport {\n  isNotUndefined,\n  voidOp,\n  isNotNull,\n  isNotNil,\n  isNil,\n} from '@practicegenius/pg-util/src/TypescriptUtils';\n\ntype IconComponent = typeof ErrorOutlineIcon;\n\ntype Props = Omit<React.ComponentProps<typeof TextField>, 'error'> & {\n  id?: string | number;\n  label?: string;\n  name?: string;\n  value?: string;\n  onChange?: React.ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n  helperText?: React.ReactNode;\n  error?: string | null;\n  hasError?: boolean;\n  success?: boolean;\n  icon?: IconComponent;\n  disabled?: boolean;\n  iconClick?: React.MouseEventHandler;\n  innerRef?: RefObject<unknown>;\n  type?: string;\n};\n\nfunction hasError(props: Props): boolean {\n  const {error, hasError = Boolean(error)} = props;\n  return hasError;\n}\n\nfunction getInputIcon(props: Props): IconComponent | null {\n  const {success, icon} = props;\n\n  switch (true) {\n    case hasError(props):\n      return ErrorOutlineIcon;\n    case success:\n      return CheckIcon;\n    default:\n      return isNotUndefined(icon) ? icon : null;\n  }\n}\n\nexport const Input: React.FC<Props> = ({\n  iconClick = voidOp,\n  ...props\n}: Props) => {\n  const {id, helperText, error, hasError: _, innerRef, ...otherProps} = props;\n  const InputProps: React.ComponentProps<typeof TextField>['InputProps'] = {\n    ...props.InputProps,\n  };\n  const Icon = getInputIcon(props);\n\n  if (isNotNull(Icon) && isNil(InputProps.endAdornment)) {\n    InputProps.endAdornment = (\n      <IconButton onClick={iconClick}>\n        <Icon color={hasError(props) ? 'error' : 'action'} />\n      </IconButton>\n    );\n  }\n\n  if (isNotNil(InputProps.endAdornment)) {\n    InputProps.endAdornment = (\n      <InputAdornment position=\"end\">{InputProps.endAdornment}</InputAdornment>\n    );\n  }\n\n  const fieldId = isNotNil(id)\n    ? id.toString()\n    : `${otherProps.name || ''}_input`;\n\n  return (\n    <TextField\n      inputRef={innerRef}\n      margin=\"dense\"\n      size=\"small\"\n      fullWidth\n      {...otherProps}\n      InputProps={InputProps}\n      helperText={error || helperText}\n      error={hasError(props)}\n      id={fieldId}\n    />\n  );\n};\n","import * as React from 'react';\nimport Visibility from '@mui/icons-material/VisibilityRounded';\nimport VisibilityOff from '@mui/icons-material/VisibilityOffRounded';\nimport {Input} from './Input';\n\nexport const PasswordInput: React.FC<React.ComponentProps<typeof Input>> =\n  props => {\n    const passwordRef = React.useRef<HTMLInputElement>(null);\n    const [hidePassword, setHidePassword] = React.useState(true);\n    const togglePassword = () => {\n      setHidePassword(!hidePassword);\n      if (passwordRef && passwordRef.current) {\n        passwordRef.current.focus();\n      }\n    };\n    return (\n      <Input\n        {...props}\n        innerRef={passwordRef}\n        type={hidePassword ? 'password' : 'text'}\n        icon={hidePassword ? VisibilityOff : Visibility}\n        iconClick={togglePassword}\n      />\n    );\n  };\n\nPasswordInput.defaultProps = {\n  label: 'Password',\n};\n","import reduce from 'lodash/reduce';\n\nexport type PopupOptions = {\n  width?: number;\n  height?: number;\n  toolbar?: boolean;\n  location?: boolean;\n  directories?: boolean;\n  status?: boolean;\n  menubar?: boolean;\n  scrollbars?: boolean;\n  resizable?: boolean;\n  copyhistory?: boolean;\n};\n\nconst defaultPopupOptions: PopupOptions = {\n  width: 600,\n  height: 600,\n  toolbar: false,\n  location: false,\n  directories: false,\n  status: false,\n  menubar: false,\n  scrollbars: false,\n  resizable: false,\n  copyhistory: false,\n};\n\ntype PopupLayoutPosition = {\n  left: number;\n  top: number;\n};\n\nfunction getPopupPosition(width: number, height: number): PopupLayoutPosition {\n  const screenLeft =\n    window.screenLeft !== undefined ? window.screenLeft : window.screenX;\n  const screenTop =\n    window.screenTop !== undefined ? window.screenTop : window.screenY;\n\n  const menuHeight = window.outerHeight - window.innerHeight;\n\n  return {\n    left: window.innerWidth / 2 - width / 2 + screenLeft,\n    top: window.innerHeight / 2 - height / 2 + screenTop + menuHeight,\n  };\n}\n\nexport function openPopup(url: string, inputOptions: PopupOptions = {}) {\n  let options: PopupOptions = {\n    ...defaultPopupOptions,\n    ...inputOptions,\n  };\n\n  options = reduce(\n    options,\n    (acc, value, key) => {\n      return {\n        ...acc,\n        // eslint-disable-next-line no-nested-ternary\n        [key]: typeof value !== 'boolean' ? value : value ? 'yes' : 'no',\n      };\n    },\n    {}\n  );\n\n  if (options.width && options.height) {\n    options = {\n      ...options,\n      ...getPopupPosition(options.width, options.height),\n    };\n  }\n\n  const optionsString: string = reduce(\n    // @ts-ignore\n    options,\n    (acc, value, key) => [...acc, `${key}=${value}`],\n    []\n  ).join(', ');\n\n  return window.open(url, '', optionsString);\n}\n","import {getParser, Parser} from 'bowser';\nimport {isClient} from './environment';\n\nexport const browserInfo: Parser.Parser | undefined = isClient\n  ? getParser(window.navigator.userAgent)\n  : undefined;\n\nexport const isBrowser = (browser: string): boolean => {\n  if (!browserInfo) return false;\n\n  return browserInfo.isBrowser(browser);\n};\n","import * as React from 'react';\nimport {SocialAuthIntegration} from '@practicegenius/domain/src/data/integrations';\nimport {openPopup as sharedOpenPopup} from '@practicegenius/pg-ui/src/utils/openPopup';\nimport {\n  AppToSitesMessage,\n  makeChannelUpdateMessage,\n} from '@practicegenius/domain/src/sites-mobile-app/messages';\nimport {addQueryParams} from '@practicegenius/pg-util/src/UrlUtils';\nimport {Logger} from '@practicegenius/domain/src/common/logger';\nimport Echo from 'laravel-echo';\nimport {inMobileApp, postMessageToMobileApp} from '../utils/MobileApp';\nimport {browserInfo} from '../utils/browser';\nimport {LastUsedSocialProviderManager} from '../utils/lastUsedSocialProvider';\nimport {getSocketId} from '../utils/websocket';\n\ntype AlreadyRegisteredLinks = {\n  register: boolean;\n  forgot_password: boolean;\n};\n\ntype AlreadyRegisteredHint = {\n  email: string;\n  links: AlreadyRegisteredLinks;\n};\ntype AlreadySocialRegisteredHint = AlreadyRegisteredHint & {\n  providers: SocialAuthIntegration[];\n};\n\ntype SocialOauthError =\n  | {\n      code: 'account_registered';\n      message: string;\n      hint: AlreadyRegisteredHint;\n    }\n  | {\n      code: 'social_registered';\n      message: string;\n      hint: AlreadySocialRegisteredHint;\n    }\n  | {\n      code: 'generic';\n      errors: Record<string, string>;\n    };\n\nexport type SocialOauthAppSpecificProps = {\n  getWebsocket: () => Echo;\n  lastUsedSocialProviderManager: LastUsedSocialProviderManager;\n  logger: Logger;\n  coreServiceUrl: string;\n};\n\nexport type UseSocialOauthProps = {\n  appProps: SocialOauthAppSpecificProps;\n  /** Enable the social oauth websocket & popup logic */\n  enabled?: boolean;\n  platform: SocialAuthIntegration;\n  authPopupUrl: string;\n  onAuthSuccess: (a: any) => unknown;\n  onAuthError?: (a: SocialOauthError) => unknown;\n};\n\nexport const useSocialOauth = ({\n  appProps,\n  enabled = true,\n  platform,\n  authPopupUrl,\n  onAuthSuccess,\n  onAuthError,\n}: UseSocialOauthProps) => {\n  // In the mobile app, buttons do not start disabled because we auth via the native app\n  const [authDisabled, setAuthDisabled] = React.useState(!inMobileApp);\n  const [socketId, setSocketId] = React.useState<string | null | undefined>(\n    null\n  );\n  const popupRef = React.useRef<Window | null>(null);\n  const _unmounted = React.useRef(false);\n  const isUnmounted = _unmounted.current === true;\n\n  const closePopup = () => popupRef.current?.close();\n\n  const openPopup = (): Window | null => {\n    if (!socketId) {\n      return null;\n    }\n\n    const popup = sharedOpenPopup(\n      addQueryParams(authPopupUrl, {socket_id: socketId})\n    );\n\n    return popup;\n  };\n\n  /** Periodically checks the popup window's status. When it closes, auth is re-enabled */\n  const setupPopupChecker = () => {\n    const check = setInterval(() => {\n      const popup = popupRef.current;\n\n      if (!popup || popup.closed || popup.closed === undefined) {\n        clearInterval(check);\n\n        if (!isUnmounted) {\n          setAuthDisabled(false);\n        }\n      }\n    }, 1000);\n  };\n\n  const startAuth = () => {\n    if (enabled && !authDisabled) {\n      if (inMobileApp) {\n        const openAuthUrl = (url: string) => {\n          postMessageToMobileApp({\n            type: 'request_open_external_url',\n            payload: {\n              url,\n            },\n          });\n        };\n\n        const triggerSdkAuth = () => {\n          postMessageToMobileApp({\n            type: 'request_social_auth',\n            payload: {\n              platform,\n            },\n          });\n        };\n\n        /** if android and facebook, temporarily use the web flow to authenticate the user while the mobile app is being updated with the latest SDK\n         * @see https://practicegenius.atlassian.net/browse/PAT-15695\n         */\n        if (browserInfo?.getOSName() === 'Android' && platform === 'facebook') {\n          // Super-mega edge-case: for registration we build an api-core URL, but this url expects to redirect to the provider.\n          // Instead, we want and endpoint from which we can fetch the URL.\n          // That endpoint happends to be derivable from authPopupUrl, so we'll do some hacky shit for now to make this work.\n          let fetchUrl = authPopupUrl;\n          if (authPopupUrl.startsWith(appProps.coreServiceUrl)) {\n            // split query string, add /url, and rejoin\n            const [url, query] = authPopupUrl.split('?');\n            fetchUrl = `${url}/url?${query}`;\n          }\n          // Otherwise, we have a local path so we need to fetch the full URL\n          return (\n            fetch(fetchUrl, {\n              headers: {\n                Accept: 'application/json',\n              },\n            })\n              .then(res => res.json())\n              // This opens the provider's oauth URL in the device's browser. When successful, that will redirect back to api-core which should redirect back to the app :finger_crossed:\n              .then(data => {\n                // local endpoints return authUrl\n                if ('authUrl' in data) {\n                  return openAuthUrl(data.authUrl);\n                }\n\n                // api-core endpoints return oauth_url\n                if ('oauth_url' in data) {\n                  return openAuthUrl(data.oauth_url);\n                }\n\n                throw new Error('auth url not found in response');\n              })\n              .catch(error => {\n                // If we can't get the URL, then we'll trigger SDK auth as a fallback\n                appProps.logger.error('Failed to fetch authPopupUrl', error);\n                triggerSdkAuth();\n              })\n          );\n        }\n\n        triggerSdkAuth();\n      } else {\n        popupRef.current = openPopup();\n        setupPopupChecker();\n        setAuthDisabled(true);\n      }\n    }\n  };\n\n  const subscribeToWebsocket = async () => {\n    const websocket = appProps.getWebsocket();\n    const getSocketIdResult = await getSocketId(websocket);\n\n    if (getSocketIdResult.status === 'error') {\n      throw new Error(\n        `Could not subscribe to websocket channel for socialauth: ${getSocketIdResult.errorType}`\n      );\n    }\n\n    if (isUnmounted) {\n      return;\n    }\n\n    const newSocketId = getSocketIdResult.socketId;\n\n    setAuthDisabled(false);\n    setSocketId(newSocketId);\n\n    websocket\n      .channel(`socialauth.${newSocketId}`)\n      .listen(`.${platform}`, (payload: any) => {\n        closePopup();\n        appProps.lastUsedSocialProviderManager.set(platform);\n        onAuthSuccess(payload);\n      })\n      .listen(`.${platform}.error`, (payload: any) => {\n        closePopup();\n\n        if (onAuthError) {\n          onAuthError(payload);\n        }\n      });\n  };\n\n  const unsubscribeFromWebsocket = () => {\n    const websocket = appProps.getWebsocket();\n\n    if (typeof socketId === 'string') {\n      websocket.leaveChannel(`socialauth.${socketId}`);\n    }\n  };\n\n  // On Mount/Unmount\n  React.useEffect(() => {\n    // If the hook is not enabled, then do not do not set anything up\n    if (!enabled) {\n      return;\n    }\n\n    if (inMobileApp) {\n      const handlePostMessage = (event: MessageEvent) => {\n        if (typeof event.data !== 'string') return;\n\n        try {\n          const data = JSON.parse(event.data) as AppToSitesMessage;\n          if (\n            data.channel === 'socialAuth' &&\n            data.type === 'receive_social_auth_success' &&\n            data.payload.platform === platform\n          ) {\n            appProps.lastUsedSocialProviderManager.set(platform);\n            onAuthSuccess({\n              providerToken: data.payload.token,\n              extraData: data.payload.extraData,\n            });\n          }\n        } catch (e) {\n          // This might handle messages from other sources and they might not be JSON, so we need to ignore them\n          if (e instanceof SyntaxError) {\n            // JSON failed to parse, so it must not be a known message\n            return;\n          }\n\n          // otherwise, the error is unexpected and should be thrown\n          throw e;\n        }\n      };\n\n      window.addEventListener('message', handlePostMessage, true);\n      postMessageToMobileApp(makeChannelUpdateMessage('socialAuth', true));\n      return () => {\n        _unmounted.current = true;\n        window.removeEventListener('message', handlePostMessage, true);\n        postMessageToMobileApp(makeChannelUpdateMessage('socialAuth', false));\n      };\n    }\n\n    const handlePopupPostMessage = ({\n      data,\n    }: {\n      data: {\n        action: string;\n        payload: any;\n      };\n    }) => {\n      if (data && data.action === 'social_auth_error') {\n        if (onAuthError) {\n          onAuthError({\n            code: 'generic',\n            errors: data.payload.errors,\n          });\n        }\n\n        closePopup();\n      }\n    };\n\n    if (!socketId) subscribeToWebsocket();\n\n    window.addEventListener('message', handlePopupPostMessage, false);\n\n    return () => {\n      _unmounted.current = true;\n      window.removeEventListener('message', handlePopupPostMessage);\n      unsubscribeFromWebsocket();\n    };\n  }, [enabled]);\n\n  return {startAuth, disabled: authDisabled};\n};\n","import {SvgIcon} from '@mui/material';\nimport React from 'react';\nimport {SvgIconComponent} from './types';\n\nexport const EmailIcon: SvgIconComponent = props => (\n  <SvgIcon width={24} height={24} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n    <path d=\"M15.5661 12.6142L20.3469 7.82845V16.6271L15.5661 12.6142ZM9.60921 13.7903L9.69434 13.8755C10.3101 14.4913 11.1292 14.831 12.0004 14.831C12.8708 14.831 13.6899 14.4913 14.3057 13.8755L14.3933 13.787L19.3426 17.9413H4.66066L9.60921 13.7903ZM8.43634 12.6166L3.6531 16.6304V7.8268L8.43634 12.6166ZM13.1369 12.7067C12.5294 13.3143 11.4698 13.3143 10.8647 12.7067L4.81853 6.6531H19.1856L13.1369 12.7067ZM4.47965 5C3.11005 5 2 6.11005 2 7.47965V17.1147C2 18.4851 3.11005 19.5944 4.47965 19.5944H19.5204C20.8899 19.5944 22 18.4851 22 17.1147V7.47965C22 6.11005 20.8899 5 19.5204 5H4.47965Z\" />\n  </SvgIcon>\n);\n","import React from 'react';\nimport {SvgIconComponent} from '../types';\n\n// SVG Source copied from Figma\nexport const ColoredGoogleLogo: SvgIconComponent = props => (\n  // use `svg` instead of `SvgIcon` so the fill color isn't overridden by the theme\n  <svg\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    {...props}\n  >\n    <path\n      d=\"M21.81 10.04H21V10H12V14H17.65C16.83 16.33 14.61 18 12 18C8.69 18 6 15.31 6 12C6 8.69 8.69 6 12 6C13.53 6 14.92 6.58 15.98 7.52L18.81 4.69C17.02 3.03 14.63 2 12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 11.33 21.93 10.68 21.81 10.04Z\"\n      fill={props.fill || '#FFC107'}\n    />\n    {!props.fill && (\n      <>\n        <path\n          d=\"M3.15039 7.35L6.44039 9.76C7.33039 7.55 9.48039 6 12.0004 6C13.5304 6 14.9204 6.58 15.9804 7.52L18.8104 4.69C17.0204 3.03 14.6304 2 12.0004 2C8.16039 2 4.83039 4.17 3.15039 7.35Z\"\n          fill=\"#FF3D00\"\n        />\n        <path\n          d=\"M11.9996 22C14.5796 22 16.9296 21.01 18.6996 19.4L15.5996 16.78C14.6096 17.55 13.3596 18 11.9996 18C9.39961 18 7.18961 16.34 6.35961 14.03L3.09961 16.54C4.74961 19.78 8.10961 22 11.9996 22Z\"\n          fill=\"#4CAF50\"\n        />\n        <path\n          d=\"M21.81 10.04H21V10H12V14H17.65C17.25 15.12 16.53 16.08 15.61 16.79L18.7 19.41C18.49 19.6 22 17 22 12C22 11.33 21.93 10.68 21.81 10.04Z\"\n          fill=\"#1976D2\"\n        />\n      </>\n    )}\n  </svg>\n);\n","import {SvgIcon} from '@mui/material';\nimport React from 'react';\nimport {SocialIconComponent} from '../types';\n\n/** @see https://www.facebook.com/brand/resources/facebookapp/logo */\nconst BRAND_COLOR = '#1877F2';\n\nexport const FacebookCircleLogo: SocialIconComponent = ({\n  useBrandColor,\n  fill,\n  ...props\n}) => (\n  <SvgIcon width={24} height={24} viewBox=\"0 0 24 24\" {...props}>\n    <path\n      d=\"M22 12C22 6.47715 17.5229 2 12 2C6.47715 2 2 6.47715 2 12C2 16.9912 5.65684 21.1283 10.4375 21.8785V14.8906H7.89844V12H10.4375V9.79688C10.4375 7.29063 11.9305 5.90625 14.2146 5.90625C15.3088 5.90625 16.4531 6.10156 16.4531 6.10156V8.5625H15.1922C13.95 8.5625 13.5625 9.3334 13.5625 10.1242V12H16.3359L15.8926 14.8906H13.5625V21.8785C18.3432 21.1283 22 16.9912 22 12Z\"\n      fill={useBrandColor ? BRAND_COLOR : fill}\n    />\n  </SvgIcon>\n);\n\n/**\n * The official Facebook Branding color straight from the brand guidelines\n * @see https://www.facebook.com/brand/resources/facebookapp/logo\n */\nexport const FacebookBrandColor = BRAND_COLOR;\n","import {SocialAuthIntegration} from '@practicegenius/domain/src/data/integrations';\n\n// If we ever have more implementations we'll need to extract this into a different file\nexport type LastUsedSocialProviderManager = {\n  get: () => SocialAuthIntegration | null;\n  set: (provider: SocialAuthIntegration) => void;\n};\n\nconst STORAGE_KEY = 'last-used-social-provider';\n\nconst getLastUsedSocialProvider = () => {\n  return localStorage.getItem(STORAGE_KEY) as SocialAuthIntegration | null;\n};\n\nconst setLastUsedSocialProvider = (provider: SocialAuthIntegration): void => {\n  localStorage.setItem(STORAGE_KEY, provider);\n};\n\nexport const localStorageLastUsedSocialProviderManager: LastUsedSocialProviderManager =\n  {\n    get: getLastUsedSocialProvider,\n    set: setLastUsedSocialProvider,\n  };\n","import qs, {IParseOptions, IStringifyOptions} from 'qs';\nimport * as R from 'ramda';\nimport {compile} from 'path-to-regexp';\nimport {InvariantError} from 'ts-invariant';\n\nexport function urlJoin(...urlPieces: string[] | [string[]]) {\n  let strArray: string[] = [];\n\n  if (Array.isArray(urlPieces[0])) {\n    strArray = urlPieces[0];\n  } else {\n    strArray = urlPieces as string[];\n  }\n\n  const resultArray = [];\n  if (strArray.length === 0) {\n    return '';\n  }\n\n  // If the first part is a plain protocol, we combine it with the next part.\n  if (strArray[0].match(/^[^/:]+:\\/*$/) && strArray.length > 1) {\n    const first = strArray.shift();\n    strArray[0] = first + strArray[0];\n  }\n\n  // There must be two or three slashes in the file protocol, two slashes in anything else.\n  if (strArray[0].match(/^file:\\/\\/\\//)) {\n    strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1:///');\n  } else {\n    strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1://');\n  }\n\n  for (let i = 0; i < strArray.length; i++) {\n    let component = strArray[i];\n\n    if (component === '') {\n      continue;\n    }\n\n    if (i > 0) {\n      // Removing the starting slashes for each component but the first.\n      component = component.replace(/^[\\/]+/, '');\n    }\n    if (i < strArray.length - 1) {\n      // Removing the ending slashes for each component but the last.\n      component = component.replace(/[\\/]+$/, '');\n    } else {\n      // For the last component we will combine multiple slashes to a single one.\n      component = component.replace(/[\\/]+$/, '/');\n    }\n\n    resultArray.push(component);\n  }\n\n  let str = resultArray.join('/');\n  // Each input component is now separated by a single slash except the possible first plain protocol part.\n\n  // remove trailing slash before parameters or hash\n  str = str.replace(/\\/(\\?|&|#[^!])/g, '$1');\n\n  // replace ? in parameters with &\n  const parts = str.split('?');\n  str = parts.shift() + (parts.length > 0 ? '?' : '') + parts.join('&');\n\n  return str;\n}\n\nexport function addQueryParams(\n  url: string,\n  params: Record<string, unknown>,\n  options?: {parseOptions?: IParseOptions; stringifyOptions?: IStringifyOptions}\n): string {\n  const [base, existingQuery] = url.split('?');\n\n  return R.pipe(\n    // Parse the existing query params into an object\n    R.partialRight(qs.parse, [options?.parseOptions]),\n    // Merge existing query params with the new query params. Note: params will take precedence over the existing params.\n    R.mergeLeft(params),\n    // Convert query params object back into a string\n    R.partialRight(qs.stringify, [options?.stringifyOptions]),\n    // Join the base and the query params back into a fully-qualified URL\n    R.pair(base),\n    R.join('?')\n  )(existingQuery);\n}\n\nexport const removeQueryParams = (url: string, params: string[]): string => {\n  const [base, existingQuery] = url.split('?');\n  const queryObject = qs.parse(existingQuery);\n  const updatedQueryObject = R.omit(params, queryObject);\n  const nextParams = Object.keys(updatedQueryObject);\n  return nextParams.length === 0\n    ? base\n    : `${base}?${qs.stringify(updatedQueryObject)}`;\n};\n\nexport const resolveRoute = R.curry(\n  (route: string, data: Record<string, unknown>) =>\n    compile(route, {encode: encodeURIComponent})(data)\n);\n\nexport const replaceSubdomainInUrl = (\n  initialUrl: string | URL,\n  newSubdomain: string\n): URL => {\n  const url = new URL(initialUrl);\n  const [, domain, tld] = url.hostname.split('.');\n  url.hostname = `${newSubdomain}.${domain}.${tld}`;\n  return url;\n};\n\nexport const objectToUrlSearchParams = (\n  obj: Record<string, unknown>\n): URLSearchParams => {\n  const searchParams = new URLSearchParams();\n  Object.entries(obj).forEach(([key, value]) => {\n    if (!value || R.isEmpty(value)) return;\n    if (Array.isArray(value))\n      throw new InvariantError(\n        \"objectToUrlSearchParams does not yet support arrays (because it didn't need it until now and it's not obvious which format is preferred)\"\n      );\n\n    if (typeof value === 'number')\n      return searchParams.append(key, value.toString());\n\n    if (typeof value === 'string') return searchParams.append(key, value);\n\n    throw new InvariantError(\n      `objectToUrlSearchParams does not support type ${typeof value} and it probably shouldn't`\n    );\n  });\n  return searchParams;\n};\n","import * as React from 'react';\nimport {\n  FieldProps as FinalFormFieldProps,\n  FieldRenderProps as FinalFormFieldRenderProps,\n  Field as FinalFormField,\n} from 'react-final-form';\n\ntype FieldError = string;\n\nexport type FieldRenderProps = {\n  input: FinalFormFieldRenderProps<HTMLElement>['input'];\n  meta: FinalFormFieldRenderProps<HTMLElement>['meta'] & {\n    /**\n     * The relevant field error to display considering formState\n     */\n    displayError: FieldError | null | undefined;\n  };\n};\n\n/**\n * Given FieldRenderProps which, if any, error should we display inline?\n */\nfunction fieldRPToError({\n  meta: {touched, error, submitError, submitFailed, dirtySinceLastSubmit},\n}: FinalFormFieldRenderProps<HTMLElement>): FieldError | null | undefined {\n  if ((touched || submitFailed) && error) {\n    return error;\n  }\n\n  if (submitFailed && !dirtySinceLastSubmit && submitError) {\n    return submitError;\n  }\n}\n\ninterface FieldProps\n  extends Omit<FinalFormFieldProps<HTMLElement>, 'children'> {\n  children: (arg0: FieldRenderProps) => React.ReactNode;\n}\n\n/**\n * Our own, slightly enhanced Field component\n * Use in place of react-final-form Field for consistent behavior\n */\nexport const Field: React.FC<FieldProps> = ({children, ...otherProps}) => (\n  <FinalFormField {...otherProps}>\n    {/* @ts-ignore */}\n    {(fieldRP: FieldRenderProps): React.ReactNode => {\n      const displayError = fieldRPToError(fieldRP);\n      return children({\n        input: fieldRP.input,\n        meta: {\n          ...fieldRP.meta,\n          displayError,\n        },\n      });\n    }}\n  </FinalFormField>\n);\n","export const routes = {\n  LinkPractice: '/link-a-practice',\n  NoGenericRegistration: '/no-generic-registration',\n  TellUsMore: '/tell-us-more',\n  RegistrationMethods: '/registration-methods',\n  Name: '/name',\n  NameMismatch: '/name-mismatch',\n  Birthday: '/birthday',\n  PhoneNumber: '/phone-number',\n  Email: '/email',\n  ConfirmEmail: '/confirm-email',\n  EmailConfirmed: '/email-confirmed',\n  Username: '/username',\n  Password: '/password',\n  TOS: '/terms-of-service',\n  Success: '/success',\n  InviteCode: '/invite-code',\n  BusinessCode: '/business-code',\n  AlreadyRegistered: '/already-registered',\n  SocialAlreadyRegistered: '/social-already-registered',\n} as const;\n\ntype RegistrationRoute = typeof routes[keyof typeof routes];\n\nexport const parseRegistrationRoute = (\n  url: string\n): RegistrationRoute | null => {\n  const route = url.split('/').pop();\n  if (\n    route &&\n    Object.values(routes).includes(`/${route}` as RegistrationRoute)\n  ) {\n    return `/${route}` as RegistrationRoute;\n  }\n  return null;\n};\n\nconst skipToRegistrationRoutes = [\n  routes.RegistrationMethods,\n  routes.TellUsMore,\n];\n\nexport const routeCanBeSkippedTo = (\n  route: RegistrationRoute\n): route is typeof skipToRegistrationRoutes[number] => {\n  return skipToRegistrationRoutes.includes(\n    route as typeof skipToRegistrationRoutes[number]\n  );\n};\n"],"names":["routes","index","checkin","login","forgotUsername","forgotUsernameEmailSent","forgotPassword","forgotPasswordEmailSent","resetPassword","passwordResetSuccess","legacyContactVerification","basename","registrationRoutes","route","STRENGTH_LEVEL","Wrapper","styled","display","flexDirection","alignItems","justifyContent","ProgressWrapper","width","Label","color","fontSize","textAlign","defaultStrengthLevels","Map","label","progress","PasswordStrengthMeter","props","strengthLevels","has","level","details","get","ProgressBar","barHeight","userFields","user","Object","keys","filter","key","map","defaultProps","PasswordStrengthCalculator","calculateStrength","value","password","BLANK","length","TOO_SHORT","score","WEAK","OK","GOOD","GREAT","Error","calculatePasswordStrengthLevel","this","validate","feedback","suggestions","getPasswordSuggestion","render","CreatePasswordInput","name","onChange","error","inputProps","strengthCalculator","inlineError","InlineError","PasswordInput","onBlur","current","autoComplete","ref","ErrorMessage","marginBottom","LinkContainer","theme","palette","primary","main","fontWeight","Link","children","linkProps","as","to","SupportFooter","margin","secondary","LoginSupportFooter","isLoginOnly","content","Meter","position","height","borderRadius","backgroundColor","Progress","top","left","transition","sx","socialPlatformLabels","facebook","google","apple","socialButtonIcons","Apple","A","FacebookCircleLogo","useBrandColor","ColoredGoogleLogo","email","EmailIcon","LoginButton","appProps","platform","lastUsed","startAuth","enabled","authPopupUrl","onAuthSuccess","payload","ButtonIcon","Button","href","buildSocialProviderLoginLink","provider","onClick","e","preventDefault","FULL_WIDTH","border","borderWidth","startIcon","Box","borderTopLeftRadius","borderBottomLeftRadius","marginLeft","SocialLoginButtons","lastUsedSocialProvider","lastUsedSocialProviderManager","sortedPlatforms","platforms","gap","maxWidth","socialAuthIntegrationSchema","z","enum","authPerspectiveSchema","idDotLoginRoutes","loginErrorQueryParamSchema","union","object","errorType","literal","token","string","viaSocial","optional","buildSocialProviderCallbackLink","intersection","referrer","loginPerspective","code","params","URLSearchParams","isNextJs","useIsNextJs","getWebsocket","logger","coreServiceUrl","providerToken","window","location","loginResponse","redirect","onLoginError","_g","_extends","assign","bind","n","arguments","t","r","hasOwnProperty","call","apply","SvgEmailSent","xmlns","fill","fillRule","d","fillOpacity","SvgEmailVerified","opacity","SvgMailbox","SvgPasswordReset","SvgImage","Component","TextButton","padding","background","font","cursor","type","SectionHeading","Content","flex","BottomText","TitleWrapper","P","HeaderIconButton","SMALL","HeaderIconPlaceholder","spacing","ScreenTitle","common","black","textTransform","Card","minHeight","MEDIUM","Hr","Outer","zIndex","overflowY","ButtonContainer","containsMultipleButtons","BaseScreen","cancelProps","divider","hideBackButton","title","helmetTitle","history","back","headerTitle","component","Boolean","instructions","actionButtons","buttonProps","i","StyledButton","afterButtons","bottomText","ProgressScreen","bottomMargin","variant","customHeight","customWidth","rest","WIDE","loadingIndicatorColor","lineHeight","breakpoints","down","CenteredWrapper","LOGIN_ONLY","HAS_SMS_MESSAGING","BREAKPOINTS","LARGE","XLARGE","CrappyValidationException","constructor","data","super","errors","coreApiClientNoAuth","baseURL","incomingUserLoginPayload","incomingData","otherData","transformedRedirect","test","replace","csrf_token","recaptcha_token","remember_me","response","_unsafe","post","Number","headers","success","social_access_token","parseAuthorizationTokens","tokenType","token_type","expiresIn","expires_in","accessToken","access_token","refreshToken","refresh_token","tokens","optionalData","serializeAuthorizationTokens","tokenData","EmailInput","autoCorrect","autoCapitalize","spellCheck","globalRoutes","account","register","points","qr_code","useDoesPracticeHaveAccess","feature","phpJs","practiceFeatures","includes","cardNumber","included","practice","card_number","catch","transformErrors","hubUrl","hub_url","count","items","useQueryParams","search","slice","usePhpJs","callback","global","withPhpJs","getPhpJs","getLogoUrl","filename","isGenericHub","subdomain","host","split","getPracticeHubName","stripHtmlTags","str","String","capitalize","charAt","toUpperCase","isEmail","match","makeChannelUpdateMessage","channel","ready","useRouter","SxLabel","StyledCheckbox","marginRight","Checkbox","labelProps","LabelComponent","CheckboxComponent","noWrap","styles","disabled","text","makeUseStyles","CheckboxRoot","LabelRoot","className","htmlFor","id","FieldInput","initialValue","format","parse","otherProps","fieldProps","input","meta","displayError","hasError","Input","iconClick","helperText","_","innerRef","InputProps","Icon","icon","getInputIcon","endAdornment","fieldId","toString","inputRef","size","fullWidth","passwordRef","hidePassword","setHidePassword","focus","defaultPopupOptions","toolbar","directories","status","menubar","scrollbars","resizable","copyhistory","browserInfo","getParser","navigator","userAgent","useSocialOauth","onAuthError","authDisabled","setAuthDisabled","socketId","setSocketId","popupRef","_unmounted","isUnmounted","closePopup","close","handlePostMessage","event","JSON","set","extraData","SyntaxError","addEventListener","removeEventListener","handlePopupPostMessage","action","websocket","getSocketIdResult","newSocketId","listen","leaveChannel","unsubscribeFromWebsocket","openAuthUrl","url","triggerSdkAuth","getOSName","fetchUrl","startsWith","query","fetch","Accept","then","res","json","authUrl","oauth_url","inputOptions","options","acc","screenLeft","screenX","screenTop","screenY","menuHeight","outerHeight","innerHeight","innerWidth","getPopupPosition","optionsString","join","open","socket_id","check","setInterval","popup","closed","clearInterval","setupPopupChecker","viewBox","BRAND_COLOR","FacebookBrandColor","STORAGE_KEY","localStorageLastUsedSocialProviderManager","localStorage","getItem","setItem","urlJoin","urlPieces","strArray","Array","isArray","resultArray","first","shift","push","parts","addQueryParams","base","existingQuery","parseOptions","stringifyOptions","removeQueryParams","queryObject","updatedQueryObject","resolveRoute","encode","encodeURIComponent","Field","fieldRP","touched","submitError","submitFailed","dirtySinceLastSubmit","fieldRPToError","LinkPractice","NoGenericRegistration","TellUsMore","RegistrationMethods","Name","NameMismatch","Birthday","PhoneNumber","Email","ConfirmEmail","EmailConfirmed","Username","Password","TOS","Success","InviteCode","BusinessCode","AlreadyRegistered","SocialAlreadyRegistered","parseRegistrationRoute","pop","values","skipToRegistrationRoutes","routeCanBeSkippedTo"],"sourceRoot":""}