{"version":3,"file":"utils.mjs","sources":["../../../../../../../../web/src/ui/b2b/utils.ts"],"sourcesContent":["import {\n  AuthFlowType,\n  B2BAuthenticateResponseWithMFA,\n  B2BDiscoveryAuthenticateResponse,\n  B2BMagicLinksDiscoveryAuthenticateResponse,\n  B2BOrganizationsGetBySlugResponse,\n  StytchAPIError,\n  StytchError,\n  StytchEvent,\n  StytchEventType,\n  StytchProjectConfigurationInput,\n} from '@stytch/core/public';\nimport { useEffect, useMemo, useState } from 'react';\nimport useSWRMutation, { MutationFetcher, SWRMutationConfiguration } from 'swr/mutation';\n\nimport { StytchB2BClient } from '../../b2b/StytchB2BClient';\nimport { StytchB2BExtendedLoginConfig } from '../../types';\nimport { readB2BInternals } from '../../utils/internal';\nimport { useConfig, useErrorCallback, useEventCallback, useGlobalReducer, useStytch } from './GlobalContextProvider';\nimport { Action } from './reducer';\nimport type { ProductId, StytchB2BProduct } from './StytchB2BProduct';\nimport { AppScreens } from './types/AppScreens';\nimport { ErrorType } from './types/ErrorType';\n\ntype RecursiveDotNotation<T> = T extends object\n  ? {\n      [K in keyof T]: K extends string\n        ? T[K] extends (...args: never[]) => unknown\n          ? K\n          : T[K] extends object\n            ? `${K}.${RecursiveDotNotation<T[K]>}`\n            : K\n        : never;\n    }[keyof T]\n  : never;\n\ntype ValidStytchMutationKey = `stytch.${RecursiveDotNotation<StytchB2BClient>}`;\n\nconst KeyToStytchEventMap = {\n  'stytch.magicLinks.authenticate': StytchEventType.B2BMagicLinkAuthenticate,\n  'stytch.sso.authenticate': StytchEventType.B2BSSOAuthenticate,\n  'stytch.sso.discoverConnections': StytchEventType.B2BSSODiscoverConnections,\n  'stytch.magicLinks.discovery.authenticate': StytchEventType.B2BMagicLinkDiscoveryAuthenticate,\n  'stytch.discovery.organizations.create': StytchEventType.B2BDiscoveryOrganizationsCreate,\n  'stytch.discovery.intermediateSessions.exchange': StytchEventType.B2BDiscoveryIntermediateSessionExchange,\n  'stytch.magicLinks.email.loginOrSignup': StytchEventType.B2BMagicLinkEmailLoginOrSignup,\n  'stytch.magicLinks.email.discovery.send': StytchEventType.B2BMagicLinkEmailDiscoverySend,\n  'stytch.oauth.authenticate': StytchEventType.B2BOAuthAuthenticate,\n  'stytch.oauth.discovery.authenticate': StytchEventType.B2BOAuthDiscoveryAuthenticate,\n  'stytch.otps.sms.send': StytchEventType.B2BSMSOTPSend,\n  'stytch.otps.sms.authenticate': StytchEventType.B2BSMSOTPAuthenticate,\n  'stytch.totp.create': StytchEventType.B2BTOTPCreate,\n  'stytch.totp.authenticate': StytchEventType.B2BTOTPAuthenticate,\n  'stytch.recoveryCodes.recover': StytchEventType.B2BRecoveryCodesRecover,\n  'stytch.impersonation.authenticate': StytchEventType.B2BImpersonationAuthenticate,\n  'stytch.otps.email.authenticate': StytchEventType.B2BOTPsEmailAuthenticate,\n  'stytch.otps.email.discovery.authenticate': StytchEventType.B2BOTPsEmailDiscoveryAuthenticate,\n  'stytch.otps.email.discovery.send': StytchEventType.B2BOTPsEmailDiscoverySend,\n  'stytch.otps.email.loginOrSignup': StytchEventType.B2BOTPsEmailLoginOrSignup,\n  'stytch.organization.getBySlug': StytchEventType.B2BOrganizationsGetBySlug,\n} satisfies Partial<Record<ValidStytchMutationKey, StytchEventType>>;\n\ntype StytchExternalMutationKey = keyof typeof KeyToStytchEventMap;\n\ntype StytchInternalMutationKey = `internal.${string}`;\n\nexport type StytchMutationKey = StytchExternalMutationKey | StytchInternalMutationKey;\n\nexport function getStytchEventByKey(key: StytchMutationKey): StytchEventType | undefined {\n  return KeyToStytchEventMap[key as StytchExternalMutationKey];\n}\n\nexport const useMutate = <TData, TError, TKey extends StytchMutationKey, TExtraArg = never>(\n  key: TKey,\n  fetcher: MutationFetcher<TData, TExtraArg, TKey>,\n  options: SWRMutationConfiguration<TData, TError, TExtraArg, TKey> = {},\n) => {\n  const onEvent = useEventCallback();\n  const onError = useErrorCallback();\n\n  const result = useSWRMutation<TData, TError, TKey, TExtraArg>(key, fetcher, {\n    throwOnError: false,\n    ...options,\n    onSuccess: (data, key, config) => {\n      const eventType = getStytchEventByKey(key as StytchMutationKey);\n      if (eventType) {\n        onEvent({ type: eventType, data } as StytchEvent<StytchProjectConfigurationInput>);\n      }\n\n      options.onSuccess?.(data, key, config);\n    },\n    onError: (error, key, config) => {\n      onError(error as StytchError);\n\n      options.onError?.(error, key, config);\n    },\n  });\n\n  // Hide the error while mutating. This helps avoid the errors continuing to show after the user has clicked submit\n  // and also ensures repeating errors causes <ErrorText> to re-render which is important for screenreaders to\n  // re-announce them\n  return result.isMutating ? { ...result, error: undefined } : result;\n};\n\n/**\n *\n * This hook triggers a request to retrieve the organization from the slug.\n * The hook only triggers the request if the SDK is being used in an organization flow,\n * and a slug pattern is present. The hook returns an isSearching boolean that can be used\n * to display a loading state while the search is in progress.\n */\nexport const useExtractSlug = () => {\n  const [state, dispatch] = useGlobalReducer();\n  const [pattern, setPattern] = useState<string | null | undefined>();\n  const config = useConfig();\n\n  const stytchClient = useStytch();\n  const slug = config.organizationSlug ?? extractFromPattern(pattern || null, window.location.href);\n\n  const { trigger, isMutating: isSearching } = useMutate<\n    B2BOrganizationsGetBySlugResponse,\n    StytchAPIError,\n    StytchExternalMutationKey,\n    { slug: string }\n  >(\n    'stytch.organization.getBySlug',\n    (_: string, { arg: { slug } }: { arg: { slug: string } }) =>\n      stytchClient.organization.getBySlug({ organization_slug: slug }),\n    {\n      onSuccess: ({ organization }) => {\n        if (organization === null) {\n          dispatch({\n            type: 'set_error_message_and_transition',\n            errorType: ErrorType.Organization,\n            canGoBack: false,\n          });\n        } else {\n          dispatch({\n            type: 'set_organization',\n            organization: {\n              ...organization,\n            },\n          });\n        }\n      },\n    },\n  );\n\n  useEffect(() => {\n    readB2BInternals(stytchClient)\n      .bootstrap.getAsync()\n      .then(({ slugPattern }) => {\n        setPattern(slugPattern);\n      });\n  }, [stytchClient]);\n\n  useEffect(() => {\n    if (\n      slug !== null &&\n      state.flowState.organization === null &&\n      state.screen === AppScreens.Main &&\n      state.flowState.type == AuthFlowType.Organization\n    ) {\n      trigger({ slug });\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps -- SDK-1354\n  }, [slug, state.flowState, state.screen]);\n\n  // The org is pending identification if the slug pattern has not yet been\n  // determined (i.e., `undefined`) or the organization request is in progress\n  const resultPending = pattern === undefined || isSearching;\n\n  return { slug, resultPending };\n};\n\nexport const useBootstrap = () => {\n  const stytchClient = useStytch();\n  const [bootstrap, setBootstrap] = useState(readB2BInternals(stytchClient).bootstrap.getSync());\n\n  useEffect(() => {\n    readB2BInternals(stytchClient)\n      .bootstrap.getAsync()\n      .then((data) => {\n        setBootstrap(data);\n      });\n  }, [stytchClient]);\n\n  return bootstrap;\n};\n\nexport const onAuthenticateSuccess = (\n  data: B2BAuthenticateResponseWithMFA<StytchProjectConfigurationInput>,\n  dispatch: React.Dispatch<Action>,\n  config: StytchB2BExtendedLoginConfig,\n) => {\n  dispatch({\n    type: 'primary_authenticate_success',\n    response: data,\n    includedMfaMethods: config.mfaProductInclude,\n  });\n};\n\nexport const onDiscoveryAuthenticateSuccess = (\n  data: B2BDiscoveryAuthenticateResponse | B2BMagicLinksDiscoveryAuthenticateResponse,\n  dispatch: React.Dispatch<Action>,\n) => {\n  dispatch({\n    type: 'set_discovery_state',\n    email: data.email_address,\n    discoveredOrganizations: data.discovered_organizations,\n  });\n};\n\nexport const extractFromPattern = (pattern: string | null, href: string): string | null => {\n  if (pattern === null) return null;\n\n  const url = new URL(href);\n  url.search = '';\n\n  const currentUrl = url.toString().trim();\n  const regexPattern = pattern.replace(/\\./g, '\\\\.').replace(/\\*/g, '(?:[^.]+)').replace('{{slug}}', '(.+)');\n\n  const regex = new RegExp(regexPattern);\n  const match = currentUrl.match(regex);\n\n  if (match && match[1]) {\n    return match?.[1];\n  }\n\n  return null;\n};\n\nexport function hasProduct(products: StytchB2BProduct[], product: ProductId) {\n  return products.some((p) => p.id === product);\n}\n\nexport function useProductComponents<Type extends 'screens' | 'mainScreen' | 'ssoAndOAuthButtons'>(\n  { products, organizationProducts }: { products: StytchB2BProduct[]; organizationProducts: StytchB2BProduct[] },\n  screenType: Type,\n) {\n  return useMemo(() => {\n    const map = {} as Required<StytchB2BProduct[Type]>;\n    for (const product of [...products, ...organizationProducts]) {\n      if (product[screenType]) Object.assign(map, product[screenType]);\n    }\n    return map;\n  }, [products, organizationProducts, screenType]);\n}\n"],"names":["KeyToStytchEventMap","StytchEventType","B2BMagicLinkAuthenticate","B2BSSOAuthenticate","B2BSSODiscoverConnections","B2BMagicLinkDiscoveryAuthenticate","B2BDiscoveryOrganizationsCreate","B2BDiscoveryIntermediateSessionExchange","B2BMagicLinkEmailLoginOrSignup","B2BMagicLinkEmailDiscoverySend","B2BOAuthAuthenticate","B2BOAuthDiscoveryAuthenticate","B2BSMSOTPSend","B2BSMSOTPAuthenticate","B2BTOTPCreate","B2BTOTPAuthenticate","B2BRecoveryCodesRecover","B2BImpersonationAuthenticate","B2BOTPsEmailAuthenticate","B2BOTPsEmailDiscoveryAuthenticate","B2BOTPsEmailDiscoverySend","B2BOTPsEmailLoginOrSignup","B2BOrganizationsGetBySlug","getStytchEventByKey","key","useMutate","fetcher","options","onEvent","useEventCallback","onError","useErrorCallback","result","useSWRMutation","throwOnError","onSuccess","data","config","eventType","type","error","isMutating","undefined","useExtractSlug","state","dispatch","useGlobalReducer","pattern","setPattern","useState","useConfig","stytchClient","useStytch","slug","organizationSlug","extractFromPattern","window","location","href","trigger","isSearching","_","arg","organization","getBySlug","organization_slug","errorType","ErrorType","Organization","canGoBack","useEffect","readB2BInternals","bootstrap","getAsync","then","slugPattern","flowState","screen","AppScreens","Main","AuthFlowType","resultPending","useBootstrap","setBootstrap","getSync","onAuthenticateSuccess","response","includedMfaMethods","mfaProductInclude","onDiscoveryAuthenticateSuccess","email","email_address","discoveredOrganizations","discovered_organizations","url","URL","search","currentUrl","toString","trim","regexPattern","replace","regex","RegExp","match","hasProduct","products","product","some","p","id","useProductComponents","organizationProducts","screenType","useMemo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