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A,CAACE,GAAIoB,EAAUxJ,QAASqJ,EAAalB,QAASA,MAGpE,CAHsBD","sources":["webpack://_N_E/../../libs/osc/speedbump/src/lib/gql/queries.ts","webpack://_N_E/../../libs/osc/speedbump/src/lib/hooks/useFeatureConfigs.ts","webpack://_N_E/../../libs/osc/speedbump/src/lib/use-speedbump.tsx","webpack://_N_E/../../libs/osc/speedbump/src/lib/speedbump.tsx","webpack://_N_E/../../libs/osc/speedbump/src/lib/index.ts","webpack://_N_E/../../libs/osc/speedbump/src/index.ts","webpack://_N_E/./typings/app/goals.ts","webpack://_N_E/../../libs/utilities/url-config/src/lib/url-config.ts","webpack://_N_E/../../libs/utilities/url-config/src/lib/index.ts","webpack://_N_E/../../libs/utilities/url-config/src/index.ts","webpack://_N_E/../../libs/osc/form/src/lib/form.error-icon.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.error.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.connector.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.help-message.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.label-helper.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.label.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.input.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.legend.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.card-number-input.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.select.tsx","webpack://_N_E/../../libs/osc/form/src/lib/form.textarea.tsx","webpack://_N_E/../../libs/osc/form/src/index.ts"],"sourcesContent":["import type * as Types from './types';\n\nimport {\n  useQuery,\n  type QueryClient,\n  type FetchQueryOptions,\n  type UseQueryOptions,\n} from '@tanstack/react-query';\nimport type { DXError } from '@dx-ui/types-graphql';\n\nexport const GetSpeedBumpFeatureConfigsDocument = {\n  operationName: 'featureConfigs',\n  operationString: `query featureConfigs($names: [String!]!) {\n  featureConfigs(names: $names) {\n    name\n    config\n    conditions\n  }\n}`,\n  originalOpName: 'getSpeedBumpFeatureConfigs',\n};\nexport function useGetSpeedBumpFeatureConfigsQuery<\n  TData = Types.GetSpeedBumpFeatureConfigsQuery,\n  TError = DXError\n>(\n  variables: Types.GetSpeedBumpFeatureConfigsQueryVariables,\n  options?: Omit<UseQueryOptions<Types.GetSpeedBumpFeatureConfigsQuery, TError, TData>, 'queryKey'>\n) {\n  return useQuery<Types.GetSpeedBumpFeatureConfigsQuery, TError, TData>({\n    queryKey: [GetSpeedBumpFeatureConfigsDocument, variables],\n    ...options,\n  });\n}\nexport function serverSideGetSpeedBumpFeatureConfigsQuery(\n  queryClient: QueryClient,\n  variables: Types.GetSpeedBumpFeatureConfigsQueryVariables,\n  options?: FetchQueryOptions<Types.GetSpeedBumpFeatureConfigsQuery>\n) {\n  return queryClient.fetchQuery<Types.GetSpeedBumpFeatureConfigsQuery>({\n    queryKey: [GetSpeedBumpFeatureConfigsDocument, variables],\n    ...options,\n  });\n}\n","import type { QueryClient } from '@tanstack/react-query';\nimport {\n  serverSideGetSpeedBumpFeatureConfigsQuery,\n  useGetSpeedBumpFeatureConfigsQuery,\n} from '../gql/queries';\nimport type { OneLinkConfig } from '@dx-ui/framework-i18n';\nimport { CDN_STALE_TIME } from '@dx-ui/framework-react-query';\n\nconst TRANSLATE_RULES_CONFIG_NAME = 'rule-ui-translate-urls';\nconst ONELINK_CONFIG_NAME = 'config-ui-translate-onelink';\n\nexport const names = [TRANSLATE_RULES_CONFIG_NAME, ONELINK_CONFIG_NAME];\n\nexport function useTranslationsConfig({ isEnabled }: { isEnabled?: boolean } = {}) {\n  const { data } = useGetSpeedBumpFeatureConfigsQuery(\n    {\n      names,\n    },\n    {\n      enabled: isEnabled,\n      staleTime: CDN_STALE_TIME,\n    }\n  );\n  const translateRules =\n    data?.featureConfigs?.find((config) => config.name === TRANSLATE_RULES_CONFIG_NAME) || null;\n  const oneLinkConfig =\n    (data?.featureConfigs?.find((config) => config.name === ONELINK_CONFIG_NAME)\n      ?.config as OneLinkConfig) || null;\n\n  return { oneLinkConfig, translateRules };\n}\n\nexport const getSpeedBumpFeatureConfig = (queryClient: QueryClient) => {\n  return serverSideGetSpeedBumpFeatureConfigsQuery(queryClient, { names });\n};\n","import * as React from 'react';\nimport type { Rule } from '@dx-ui/utilities-url-config';\nimport { RuleEngine, getUrlConfig } from '@dx-ui/utilities-url-config';\nimport { isBrowser } from '@dx-ui/utilities-is-browser';\nimport { useTranslationsConfig } from './hooks/useFeatureConfigs';\nimport { getOneLinkProps } from '@dx-ui/framework-i18n';\n\ntype SpeedbumpAttributes = {\n  isEnabled: boolean;\n  isVisible: boolean;\n  onShow: (e: React.SyntheticEvent<HTMLAnchorElement>) => boolean;\n  onHide: () => void;\n  onContinue: () => void;\n};\n\ntype UseSpeedbumpProps = {\n  /** Used to determine whether to show or hide the speedbump.\n   * Also used to determine the destination language code to use in the target url\n   */\n  language: string;\n  appName: string;\n};\n\n/**\n *  Can be used to act as an anchor event target when using the useSpeedbump hook without a link\n */\nexport function makeAnchorEventTarget(absoluteUrl: string) {\n  const url = new URL(absoluteUrl);\n  return {\n    preventDefault: () => undefined,\n    stopPropagation: () => undefined,\n    currentTarget: {\n      href: absoluteUrl,\n      origin: url.origin,\n      pathname: url.pathname,\n    } as unknown as HTMLAnchorElement,\n    target: {\n      href: absoluteUrl,\n    } as unknown as HTMLAnchorElement,\n  } as unknown as React.ChangeEvent<HTMLAnchorElement>;\n}\n\nexport const DocUseSpeedbump: React.FC<React.PropsWithChildren<UseSpeedbumpProps>> = () => null;\n\nfunction transformUrl({\n  href,\n  pathname,\n  language,\n}: {\n  href: string;\n  pathname: string;\n  language: string;\n}) {\n  if (pathname.startsWith('/zh/') && (language === 'zh-hans' || language === 'zh-hant')) {\n    return href.replace('/zh/', `/${language}/`);\n  }\n  return href;\n}\n/**\n * This hook provides the ability to replace in language urls with english only urls.\n * It only works for HTMLAnchorElement links and will not work with other elements as\n * it will look for a `href` attribute on the target or parent element.\n *\n * It will replace the in-language code with `en` and open the location on the window.\n */\nconst useSpeedbump = (\n  language: string,\n  appName?: string,\n  bypassOneLink?: boolean\n): SpeedbumpAttributes => {\n  const DEFAULT_LANGUAGE = 'en';\n  const { oneLinkConfig, translateRules } = useTranslationsConfig();\n  const url = isBrowser ? window.location.href : '';\n  const oneLinkProps = getOneLinkProps(language, appName || '', url, oneLinkConfig);\n  const translateRuleEngine = React.useMemo(\n    () => (translateRules ? new RuleEngine(translateRules as Rule) : null),\n    [translateRules]\n  );\n  const [isEnabled] = React.useState(language !== DEFAULT_LANGUAGE);\n  const [targetLanguage] = React.useState(language);\n  const [isVisible, setIsVisible] = React.useState<boolean>(false);\n  const [eventTarget, setEventTarget] = React.useState<HTMLAnchorElement>();\n  const onShow = (e: React.SyntheticEvent<HTMLAnchorElement>) => {\n    const { target } = e as React.ChangeEvent<HTMLAnchorElement>;\n    setEventTarget(target);\n    const { href, origin, pathname } =\n      e.currentTarget || (target.parentElement as HTMLAnchorElement);\n    if (!translateRuleEngine) {\n      return false;\n    }\n    const url = transformUrl({ href, pathname, language });\n    if (href !== url) {\n      e.currentTarget.href = url;\n    }\n    const urlConfig = getUrlConfig(translateRuleEngine, url, origin, language);\n    const shouldShowSpeedbump = (!oneLinkProps.isOneLink || bypassOneLink) && urlConfig.speedbump;\n    if (isEnabled && shouldShowSpeedbump) {\n      e.preventDefault();\n      e.stopPropagation();\n      setIsVisible(true);\n      return true;\n    }\n    return false;\n  };\n  const onHide = () => {\n    setIsVisible(false);\n  };\n  const onContinue = () => {\n    setIsVisible(false);\n    if (isBrowser && eventTarget) {\n      // hack, will need to revisit. Looks for current element or parent to find the href\n      const href =\n        eventTarget.href ||\n        (eventTarget.parentElement as HTMLAnchorElement).href ||\n        (eventTarget.parentElement?.parentElement as HTMLAnchorElement).href;\n      const enUri = href?.replace(`/${targetLanguage}/`, `/${DEFAULT_LANGUAGE}/`);\n      enUri &&\n      (eventTarget.target === '_blank' ||\n        (eventTarget.parentElement as HTMLAnchorElement)?.target === '_blank' ||\n        (eventTarget.parentElement?.parentElement as HTMLAnchorElement)?.target === '_blank')\n        ? window.open(enUri, eventTarget.target)\n        : (window.location.href = enUri);\n    }\n  };\n  return {\n    isEnabled,\n    isVisible,\n    onShow,\n    onHide,\n    onContinue,\n  };\n};\n\nexport { useSpeedbump };\nexport default useSpeedbump;\n","import type * as React from 'react';\nimport { useTranslation } from 'next-i18next';\nimport { ActionDialog, DialogTitle } from '@dx-ui/osc-dialog-v2';\nimport set from 'lodash/set';\nimport FocusLock from 'react-focus-lock';\n\nexport type SpeedbumpProps = {\n  /**\n   * Configures speed bump content\n   */\n  speedbumpOptions?: {\n    title: string;\n    message?: string;\n    confirmButtonLabel?: string;\n    cancelButtonLabel?: string;\n  };\n  /**\n   * displays the speeedbump or not\n   */\n  isShowing: boolean;\n  /**\n   * handler to close the speedbump\n   */\n  onClose: () => void;\n  /**\n   * handler used to proceed if chosen\n   */\n  onContinue: (event: React.SyntheticEvent<HTMLButtonElement>) => void;\n};\n\n/**\n * Used to display a speedbump when transitioning to a non translated page\n */\nexport const Speedbump: React.FC<React.PropsWithChildren<SpeedbumpProps>> = ({\n  isShowing,\n  onClose: onCloseProp,\n  onContinue: onContinueProp,\n  speedbumpOptions,\n}) => {\n  const [t] = useTranslation('osc-speedbump');\n  const { title, message, confirmButtonLabel, cancelButtonLabel } = speedbumpOptions ?? {};\n  const handleConfirm = (e: React.SyntheticEvent<HTMLButtonElement>) => {\n    if (window?.digitalData && window?._satellite) {\n      set(window.digitalData, 'click.clickID', 'speedbump_continue');\n      window._satellite?.track?.('global_click');\n    }\n    onContinueProp?.(e);\n  };\n  const handleCancel = () => {\n    if (window?.digitalData && window?._satellite) {\n      set(window.digitalData, 'click.clickID', 'speedbump_return');\n      window._satellite?.track?.('global_click');\n    }\n    onCloseProp?.();\n  };\n\n  const handleDismiss = () => {\n    onCloseProp?.();\n  };\n  const titleOptions = !!(title && message)\n    ? { ...{ title } }\n    : { ...{ hasChildrenWithTitle: true } };\n\n  return (\n    <FocusLock as=\"span\" disabled={!isShowing}>\n      <ActionDialog\n        buttonOptions={{\n          cancel: { label: cancelButtonLabel ?? t('back') },\n          confirm: { label: confirmButtonLabel ?? t('continue') },\n        }}\n        isOpen={isShowing}\n        onCancel={handleCancel}\n        onConfirm={handleConfirm}\n        onDismiss={handleDismiss}\n        size=\"sm\"\n        shouldStackButtons={true}\n        {...titleOptions}\n      >\n        <div data-testid=\"speedbumpDialog\" className=\"mt-3\">\n          {message ? (\n            message\n          ) : (\n            <DialogTitle className=\"mb-4 text-center text-xl font-bold\">\n              {title ?? t('title')}\n            </DialogTitle>\n          )}\n        </div>\n      </ActionDialog>\n    </FocusLock>\n  );\n};\n\nexport default Speedbump;\n","export * from './hooks/useFeatureConfigs';\nexport * from './gql/queries';\nexport * from './gql/types';\nexport * from './use-speedbump';\nexport * from './speedbump';\n","export * from './lib';\n","export const Goals = {\n  ForgotInfoLinkClick: 'g-forgot-info-link-click',\n  HidePassword: 'g-hide-password',\n  LoginError: 'g-login-error',\n  OHWSignInSuccess: 'g-IqzR2S0Ai5',\n  NavEngagement: 'g-auth-nav-engagement',\n  ShowPassword: 'g-show-password',\n  SignInSuccess: 'g-auth-sign-in-success',\n  successfulHonorsEnrollment: 'g-successful-honors-enrollment',\n  SignInAfterJoin: 'g-bgQSVS0Q4h',\n} as const;\n\nexport type GoalsType = (typeof Goals)[keyof typeof Goals];\n","import matcher from 'matcher';\nimport type { Rule } from '@dx-shared/rule-engine';\nimport { RuleEngine } from '@dx-shared/rule-engine';\n\nconst HOST_REGEX = new RegExp('^www(.\\\\w+)?.hilton.com$');\nconst ENGLISH = 'en';\nconst SLASH = '/';\nconst DOUBLE_SLASH = '//';\n\n/**\n * Utility to determine if a provided URL supports translations for a non-English page by validating the URL\n * against the tranlate URLs rule.\n *\n * Also corrects OHW URLs to fix the URL origin to the current origin, and appends a trailing slash to the path.\n *\n * The URL config returned contains the following fields:\n * 1. The transformed URL based on the language and/or standardization.\n * 2. A flag indicating if a redirect is necessary if the provided URL doesn't match the final transformed URL.\n * 3. A flag indicating if a speedbump should be displayed if we need to route the user from a non-English URL to an English URL.\n *    The speedbump flag can also be use server side to determine if a page not found error (404) should be displayed to the user.\n * 4. A flag indicating if the URL is an internal application URL.\n * 1475984025\n *\n * @param tranlateUrlsRuleEngine\n * @param url\n * @param origin\n * @param language\n */\nexport function getUrlConfig(\n  tranlateUrlsRuleEngine: RuleEngine,\n  url: string,\n  origin: string,\n  language = ENGLISH,\n  appBasePaths?: string[],\n  facts?: UrlRuleFacts\n): UrlConfig {\n  if (url && url.startsWith('#')) {\n    return { appUrl: false, redirect: false, speedbump: false, url };\n  }\n  // Parse the URL. Sets the origin if the URL is a relative path.\n  const parsedURL: URL = new URL(url, origin);\n  const originalUrl = parsedURL.toString();\n  const originalPath = originalUrl.slice(parsedURL.origin.length);\n  // Correct the host and language in the path of all OHW URLs.\n  const isOHWUrl = HOST_REGEX.test(parsedURL.host);\n  if (isOHWUrl) {\n    // Standarize all URLS by appending a trailing slash.\n    if (!parsedURL.pathname.endsWith(SLASH)) {\n      parsedURL.pathname = `${parsedURL.pathname}${SLASH}`;\n    }\n    // Replace the language in the path to English. Assume all pages are only supported in English\n    // and will swicth it back if the page is supported in-language.\n    parsedURL.pathname = parsedURL.pathname.replace(`/${language}/`, `/${ENGLISH}/`);\n    // If the OHW URL origin doesn't match the current origin, correct the OHW URL with the current origin.\n    if (parsedURL.origin !== origin) {\n      parsedURL.host = origin.slice(origin.indexOf(DOUBLE_SLASH) + 2);\n      parsedURL.protocol = origin.slice(0, origin.indexOf(DOUBLE_SLASH));\n    }\n  }\n\n  let speedbump = false;\n\n  // For non-english languages, determine if the URL is translated\n  if (language !== ENGLISH) {\n    // When sending an URL into the rule engine, use the relative path for OHW URLs, and the absolute path for external URLs.\n    let ruleUrl = isOHWUrl ? parsedURL.pathname : `${parsedURL.origin}${parsedURL.pathname}`;\n    // Standarize all URLS by appending a trailing slash so the rule engine matching is consistent.\n    if (!ruleUrl.endsWith(SLASH)) {\n      ruleUrl = `${ruleUrl}${SLASH}`;\n    }\n\n    // Run the rule to determine if the URL is translated\n    const ruleFacts = { ...(facts || {}), url: ruleUrl, language };\n    const isTranslatedUrl = tranlateUrlsRuleEngine.run(ruleFacts);\n\n    // Display speedbump if URL is not translated\n    speedbump = !isTranslatedUrl;\n    // If a OHW URL and the URL is translated, then replace the language in the path\n    if (isOHWUrl && isTranslatedUrl) {\n      parsedURL.pathname = parsedURL.pathname.replace(`/${ENGLISH}/`, `/${language}/`);\n    }\n  }\n\n  const finalUrl = parsedURL.toString();\n  const finalPath = finalUrl.slice(parsedURL.origin.length);\n  const appUrl =\n    isOHWUrl &&\n    !!appBasePaths?.some((appBasePath) => matcher.isMatch(parsedURL.pathname, appBasePath));\n  const redirect = isOHWUrl && originalPath !== finalPath;\n\n  // Return URL config\n  return { appUrl, redirect, speedbump, url: isOHWUrl ? finalPath : finalUrl };\n}\n\nexport type { Rule };\n\nexport { RuleEngine };\n\nexport type UrlConfig = {\n  appUrl: boolean;\n  redirect: boolean;\n  speedbump: boolean;\n  url: string;\n};\n\nexport type UrlRuleFacts = {\n  brandCode?: string;\n  ctyhocn?: string;\n};\n","export * from './url-config';\n","export * from './lib';\n","import { forwardRef } from 'react';\n\nconst FormErrorIcon = forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(\n  ({ width = 16, height = 16, ...rest }, ref) => (\n    <svg\n      ref={ref}\n      role=\"img\"\n      aria-hidden\n      height={height}\n      width={width}\n      viewBox=\"0 0 24 24\"\n      {...rest}\n    >\n      <g fill=\"currentcolor\">\n        <circle cx=\"12\" cy=\"12\" r=\"12\" />\n      </g>\n      <g transform=\"translate(8.000000, 8.000000)\" stroke=\"#FFFFFF\" strokeLinecap=\"square\">\n        <path d=\"M1,1 L7.00679887,7.00679887\" strokeWidth=\"2\" />\n        <path d=\"M1,7 L7.00679887,0.993201131\" strokeWidth=\"2\" />\n      </g>\n    </svg>\n  )\n);\n\nFormErrorIcon.displayName = 'FormErrorIcon';\n\nexport { FormErrorIcon };\nexport default FormErrorIcon;\n","import cx from 'classnames';\nimport * as React from 'react';\nimport type { FieldError } from 'react-hook-form';\nimport { FormErrorIcon } from './form.error-icon';\n\ntype FormError = {\n  error?: Partial<FieldError>;\n} & React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * The standard error message to be used for forms and form inputs\n */\nconst FormError = React.forwardRef<HTMLDivElement, FormError>(\n  ({ error, className, ...rest }, ref) => {\n    const messages = (error?.types ? Object.values(error.types) : [error?.message]).filter(\n      (v) => typeof v === 'string'\n    );\n    const hasError = messages.length > 0;\n\n    return (\n      <div\n        ref={ref}\n        className={cx(className, {\n          hidden: !hasError,\n          '!mt-0 block': hasError,\n        })}\n        {...rest}\n      >\n        {hasError && (\n          <div className=\"flex flex-col space-y-2\">\n            {messages.map((message) => (\n              <div\n                key={String(message)}\n                className=\"mt-1 flex gap-1 text-sm leading-tight text-danger rtl:space-x-reverse\"\n              >\n                <FormErrorIcon />\n                <span>{message}</span>\n              </div>\n            ))}\n          </div>\n        )}\n      </div>\n    );\n  }\n);\n\nFormError.displayName = 'FormError';\n\nexport { FormError };\nexport default FormError;\n","import * as React from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport { useTranslation } from 'next-i18next';\n\nimport { FormError } from './form.error';\n\nimport type { SubmitHandler, UseFormProps, UseFormReturn } from 'react-hook-form';\nimport type { FormDataStructure } from './form.types';\n\ntype FormProps = {\n  /**\n   * This is an override to the main form error message, used to notify the user that there are errors that need to be fixed. This is not for individual field error messages.\n   */\n  errorMessage?: string;\n  /**\n   * This will return an object with key/value pairs for each input in the form\n   */\n  onSubmit?: (data: any, methods: UseFormReturn) => void;\n  /**\n   * Please reference the [react-hook-form `useForm()` API documentation](https://react-hook-form.com/api/useform)\n   */\n  useFormProps?: UseFormProps<FormDataStructure>;\n  /** Override for the Error Banner Defaults to displaying */\n  hasErrorBanner?: boolean | undefined;\n} & Omit<React.FormHTMLAttributes<HTMLFormElement>, 'onSubmit'>;\n\n/**\n * This is the Form Component that sets up `react-hook-form` with a `<FormProvider/>` and a general error message. All inputs in the form should `useFormContext()` either using `FormInput, FormSelect, FormTextarea, FormConnector` or some other custom component.\n */\nexport const Form: React.FC<React.PropsWithChildren<FormProps>> = ({\n  errorMessage,\n  onSubmit,\n  children,\n  useFormProps = { mode: 'onTouched', criteriaMode: 'all' },\n  hasErrorBanner = true,\n  method = 'POST',\n  ...rest\n}) => {\n  const [t] = useTranslation('osc-form');\n  const memoizedFormProps = React.useMemo(() => useFormProps, [useFormProps]);\n\n  const methods = useForm<FormDataStructure>({\n    mode: 'onTouched',\n    criteriaMode: 'all',\n    ...memoizedFormProps,\n  });\n  const {\n    formState: { errors, isSubmitted },\n  } = methods;\n  const hasErrors = Object.keys(errors).length > 0;\n\n  const onFormSubmit: SubmitHandler<FormDataStructure> = (data) => {\n    if (onSubmit) {\n      onSubmit(data, methods);\n    }\n  };\n\n  const shouldDisplayErrorMessage = hasErrors && isSubmitted;\n  return (\n    <FormProvider {...methods}>\n      {hasErrorBanner && shouldDisplayErrorMessage ? (\n        <div role=\"alert\" className=\"mb-4 bg-danger-alt p-4 text-danger\">\n          <h2>\n            <FormError\n              className=\"mt-0 font-semibold\"\n              error={{ message: errorMessage || t('errorMessage') }}\n            />\n          </h2>\n        </div>\n      ) : null}\n      <form method={method} {...rest} noValidate onSubmit={methods.handleSubmit(onFormSubmit)}>\n        {children}\n      </form>\n    </FormProvider>\n  );\n};\n\nexport type { FormProps };\n","import type { FieldValues, UseFormReturn } from 'react-hook-form';\nimport { useFormContext } from 'react-hook-form';\n\ntype FormConnector<T extends FieldValues> = {\n  children: JSX.Element | ((props: UseFormReturn<T>) => JSX.Element);\n};\n\nconst FormConnector = <T extends FieldValues>({ children }: FormConnector<T>) => {\n  const methods = useFormContext<T>();\n  return typeof children === 'function' ? children(methods) : children;\n};\n\nexport { FormConnector };\nexport default FormConnector;\n","import cx from 'classnames';\nimport * as React from 'react';\nimport { useTranslation } from 'next-i18next';\nimport { Spinner } from '@dx-ui/osc-spinner';\n\ntype FormHelpMessage = {\n  loading?: boolean;\n  message?: string | string[];\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst FormHelpMessage = React.forwardRef<HTMLDivElement, FormHelpMessage>(\n  ({ className, message, loading, id, ...rest }, ref) => {\n    const { t } = useTranslation('osc-form');\n    const messages = Array.isArray(message) ? message : [message];\n\n    return (\n      <div id={id} className=\"grid gap-1 pt-1\">\n        {loading ? (\n          <div className=\"flex gap-2\">\n            <Spinner size=\"sm\" />\n            <p>{t('loading')}</p>\n          </div>\n        ) : (\n          messages &&\n          messages?.map((value, index) => (\n            <div\n              ref={ref}\n              className={cx('items-center space-x-2 text-sm text-text-alt', className)}\n              key={`help-message-${index + 1}`}\n              {...rest}\n            >\n              <p>{value}</p>\n            </div>\n          ))\n        )}\n      </div>\n    );\n  }\n);\n\nFormHelpMessage.displayName = 'FormHelpMessage';\n\nexport { FormHelpMessage };\nexport default FormHelpMessage;\n","import type * as React from 'react';\nimport { useTranslation } from 'next-i18next';\nimport type { FormLabelBase } from './form.types';\n\ntype FormLabelHelper = Pick<FormLabelBase, 'required' | 'optional'>;\n\nconst FormLabelHelper: React.FC<React.PropsWithChildren<FormLabelHelper>> = ({\n  required,\n  optional,\n}) => {\n  const [t] = useTranslation('osc-form');\n\n  const requiredText = required && t('required');\n  const optionalText = optional && t('optional');\n\n  const text = requiredText || optionalText;\n\n  return text ? (\n    <>\n      {' '}\n      <span className=\"font-normal text-text-alt\">({text})</span>\n    </>\n  ) : null;\n};\n\nexport { FormLabelHelper };\nexport default FormLabelHelper;\n","import cx from 'classnames';\nimport type * as React from 'react';\nimport { FormLabelHelper } from './form.label-helper';\nimport type { FormLabelBase } from './form.types';\n\ntype FormLabel = FormLabelBase<HTMLLabelElement>;\n\nconst FormLabel: React.FC<React.PropsWithChildren<FormLabel>> = ({\n  label,\n  required,\n  optional,\n  hasError,\n  className,\n  children,\n  ...rest\n}) => {\n  return (\n    <label\n      className={cx('label', className, {\n        'text-danger': hasError,\n      })}\n      {...rest}\n    >\n      <span>\n        {label}\n        <FormLabelHelper required={required} optional={optional} />\n      </span>\n      {children}\n    </label>\n  );\n};\n\nexport { FormLabel };\nexport default FormLabel;\n","import cx from 'classnames';\nimport * as React from 'react';\nimport { get, useFormContext } from 'react-hook-form';\nimport { useTranslation } from 'next-i18next';\nimport { FormError } from './form.error';\nimport { FormHelpMessage } from './form.help-message';\nimport { FormLabel } from './form.label';\nimport type { FormInputBase } from './form.types';\n\n/**\n * This component is to be used in place of all `<input>` elements including checkbox and radio\n */\nexport const FormInput: React.FC<\n  React.PropsWithChildren<FormInputBase<React.InputHTMLAttributes<HTMLInputElement>>>\n> = ({\n  label,\n  name,\n  required,\n  optional,\n  registerOptions,\n  labelClassName,\n  helpMessage,\n  loading,\n  className,\n  containerClassName,\n  ...rest\n}) => {\n  const id = React.useId();\n  const errorId = `input-error-${id}`;\n  const helperId = `input-helper-${id}`;\n  const [t] = useTranslation('osc-form');\n  const {\n    register,\n    formState: { errors },\n  } = useFormContext();\n  const fieldError = get(errors, name);\n  const hasError = !!fieldError;\n\n  let inputClassName = '';\n  let labelClass = '';\n  switch (rest.type) {\n    case 'checkbox':\n      inputClassName = 'form-checkbox';\n      labelClass = 'label-inline-reverse';\n      break;\n    case 'radio':\n      inputClassName = 'form-radio';\n      labelClass = 'label-inline';\n      break;\n    default:\n      inputClassName = 'form-input w-full';\n      break;\n  }\n\n  return (\n    <div className={containerClassName}>\n      <FormLabel\n        label={label}\n        required={required}\n        optional={optional}\n        hasError={hasError}\n        className={cx('self-start', labelClass, labelClassName)}\n      >\n        <input\n          type=\"text\"\n          {...rest}\n          className={cx(inputClassName, className, {\n            'form-error': hasError,\n          })}\n          aria-invalid={hasError}\n          required={required}\n          aria-describedby={`${errorId} ${helperId} ${rest?.['aria-describedby'] || ''}`}\n          {...register(name, {\n            required: required ? t('requiredError') : false,\n            ...registerOptions,\n          })}\n        />\n      </FormLabel>\n      <FormError id={errorId} error={fieldError} />\n      <FormHelpMessage id={helperId} message={helpMessage} loading={loading} />\n    </div>\n  );\n};\n\nexport default FormInput;\n","import cx from 'classnames';\nimport type * as React from 'react';\nimport { FormLabelHelper } from './form.label-helper';\nimport type { FormLabelBase } from './form.types';\n\ntype FormLegend = FormLabelBase<HTMLLegendElement>;\n\nconst FormLegend: React.FC<React.PropsWithChildren<FormLegend>> = ({\n  label,\n  required,\n  optional,\n  hasError,\n  className,\n  ...rest\n}) => {\n  return (\n    <legend\n      className={cx('label', className, {\n        'text-danger': hasError,\n      })}\n      {...rest}\n    >\n      <span>\n        {label}\n        <FormLabelHelper required={required} optional={optional} />\n      </span>\n    </legend>\n  );\n};\n\nexport { FormLegend };\nexport default FormLegend;\n","import * as React from 'react';\nimport { get, useFormContext } from 'react-hook-form';\nimport { useTranslation } from 'next-i18next';\nimport cardValidator from 'card-validator';\nimport cx from 'classnames';\n\nimport type { FormInputBase } from './form.types';\nimport FormError from './form.error';\nimport FormLabel from './form.label';\n\ntype Validator = typeof cardValidator;\n\nconst formatCardNumber = (cardNumber: string, cardValidator: Validator) => {\n  const cardData = cardValidator.number(cardNumber);\n  if (!cardData.isPotentiallyValid || !cardData?.card) return cardNumber;\n  const cardNumberArray = [...cardNumber];\n  if (cardData?.isPotentiallyValid && cardData?.card?.type) {\n    const validGapIndices = cardData?.card?.gaps?.filter(\n      (gapIndex: number) => cardNumber?.length > gapIndex\n    );\n    validGapIndices?.forEach((gap: number, index: number) => {\n      if (cardNumberArray[gap + index] !== ' ') {\n        cardNumberArray.splice(gap + index, 0, ' ');\n      }\n    });\n  }\n  return cardNumberArray.join('').trim();\n};\n\nconst FormCardNumberInput: React.FC<FormInputBase<React.InputHTMLAttributes<HTMLInputElement>>> = ({\n  className,\n  containerClassName,\n  label,\n  labelClassName,\n  name,\n  registerOptions,\n  required = true,\n  ...rest\n}) => {\n  const {\n    formState: { errors },\n    register,\n    setValue,\n  } = useFormContext();\n  const [cardType, setCardType] = React.useState<string | null>(null);\n  const [t] = useTranslation('osc-form');\n  const id = React.useId();\n  const errorId = `input-error-${id}`;\n  const errorMessage = get(errors, name);\n  const MAX_NUMBER_OF_DIGITS = 19;\n  const MAX_NUMBER_OF_GAPS = 3;\n  return (\n    <div className={containerClassName}>\n      <FormLabel label={label} required={required} className={cx('self-start', labelClassName)}>\n        <div\n          className={cx(\n            'form-input flex before:mr-3 before:inline-block before:h-auto before:w-9 before:bg-cover before:rtl:ml-3',\n            className,\n            {\n              'form-error': !!errorMessage,\n              'before:content-none': !cardType,\n              'before:bg-card-amex': cardType === 'american-express',\n              'before:bg-card-diners-club': cardType === 'diners-club',\n              'before:bg-card-discover': cardType === 'discover' || cardType === 'elo',\n              'before:bg-card-jcb': cardType === 'jcb',\n              'before:bg-card-maestro': cardType === 'maestro',\n              'before:bg-card-mastercard': cardType === 'mastercard',\n              'before:bg-card-unionpay': cardType === 'unionpay',\n              'before:bg-card-visa': cardType === 'visa',\n            }\n          )}\n        >\n          <input\n            {...rest}\n            aria-invalid={!!errorMessage}\n            aria-describedby={errorId}\n            autoComplete=\"cc-number\"\n            className=\"outline-none\"\n            inputMode=\"numeric\"\n            {...register(name, {\n              onChange: ({ target: { value: cardNumber } }) => {\n                setValue(name, formatCardNumber(cardNumber, cardValidator));\n                setCardType(cardValidator.number(cardNumber)?.card?.type ?? null);\n              },\n              required: required ? t('invalidCardNumberError') : false,\n              setValueAs: (value) => value?.replace(/\\s/g, ''),\n              validate: (cardNumber) =>\n                !cardNumber ||\n                cardValidator.number(cardNumber).isValid ||\n                t('invalidCardNumberError'),\n              ...registerOptions,\n            })}\n            required={required}\n            size={MAX_NUMBER_OF_DIGITS + MAX_NUMBER_OF_GAPS}\n          />\n        </div>\n      </FormLabel>\n      {errorMessage ? <FormError id={errorId} error={errorMessage} /> : null}\n    </div>\n  );\n};\n\nexport { FormCardNumberInput };\nexport default FormCardNumberInput;\n","import cx from 'classnames';\nimport * as React from 'react';\nimport { get, useFormContext } from 'react-hook-form';\nimport { useTranslation } from 'next-i18next';\nimport { FormError } from './form.error';\nimport { FormHelpMessage } from './form.help-message';\nimport { FormLabel } from './form.label';\nimport type { FormInputBase } from './form.types';\n\n/**\n * This component is to be used in place of all `<select>` elements including checkbox and radio\n */\nconst FormSelect: React.FC<\n  React.PropsWithChildren<FormInputBase<React.SelectHTMLAttributes<HTMLSelectElement>>>\n> = ({\n  label,\n  name,\n  optional,\n  required,\n  registerOptions,\n  labelClassName,\n  helpMessage,\n  loading,\n  className,\n  containerClassName,\n  children,\n  ...rest\n}) => {\n  const id = React.useId();\n  const errorId = `input-error-${id}`;\n  const helperId = `input-helper-${id}`;\n  const [t] = useTranslation('osc-form');\n  const {\n    register,\n    formState: { errors },\n  } = useFormContext();\n  const fieldError = get(errors, name);\n  const hasError = !!fieldError;\n\n  return (\n    <div className={containerClassName}>\n      <FormLabel\n        label={label}\n        required={required}\n        optional={optional}\n        hasError={hasError}\n        className={cx('self-start', labelClassName)}\n      >\n        <select\n          {...rest}\n          className={cx(className, {\n            'form-select': !rest.multiple,\n            'form-multiselect': rest.multiple,\n            'form-error': hasError,\n          })}\n          required={required}\n          aria-invalid={hasError}\n          aria-describedby={`${errorId} ${helperId}`}\n          {...register(name, {\n            required: required ? t('requiredError') : false,\n            ...registerOptions,\n          })}\n        >\n          {children}\n        </select>\n      </FormLabel>\n      <FormError id={errorId} error={fieldError} />\n      <FormHelpMessage id={helperId} message={helpMessage} loading={loading} />\n    </div>\n  );\n};\n\nexport { FormSelect };\nexport default FormSelect;\n","import cx from 'classnames';\nimport * as React from 'react';\nimport { get, useFormContext } from 'react-hook-form';\nimport { useTranslation } from 'next-i18next';\nimport { FormError } from './form.error';\nimport { FormHelpMessage } from './form.help-message';\nimport { FormLabel } from './form.label';\nimport type { FormInputBase } from './form.types';\n\n/**\n * This component is to be used in place of all `<textarea>` elements\n */\nconst FormTextarea: React.FC<\n  React.PropsWithChildren<FormInputBase<React.TextareaHTMLAttributes<HTMLTextAreaElement>>>\n> = ({\n  label,\n  name,\n  optional,\n  required,\n  registerOptions,\n  labelClassName,\n  helpMessage,\n  loading,\n  className,\n  containerClassName,\n  maxLength,\n  ...rest\n}) => {\n  const id = React.useId();\n  const errorId = `input-error-${id}`;\n  const helperId = `input-helper-${id}`;\n  const [t] = useTranslation('osc-form');\n  const {\n    register,\n    watch,\n    formState: { errors },\n  } = useFormContext();\n  const inputName = name;\n  const inputValue = watch(inputName);\n  const fieldError = get(errors, inputName);\n  const hasError = !!fieldError;\n\n  const length = inputValue?.length || 0;\n  const percent = (maxLength && length / maxLength) || 0;\n  const remaining = maxLength && maxLength - length;\n\n  return (\n    <div className={containerClassName}>\n      <FormLabel\n        label={label}\n        required={required}\n        optional={optional}\n        hasError={hasError}\n        className={cx('self-start', labelClassName)}\n      >\n        <div className=\"relative\">\n          <textarea\n            {...rest}\n            maxLength={maxLength}\n            required={required}\n            className={cx('form-textarea w-full', className, {\n              'form-error': hasError,\n            })}\n            aria-invalid={hasError}\n            aria-describedby={`${errorId} ${helperId}`}\n            {...register(inputName, {\n              required: required ? t('requiredError') : false,\n              ...registerOptions,\n            })}\n          />\n          {!!maxLength && (\n            <p\n              aria-live=\"polite\"\n              className={cx(\n                'pointer-events-none absolute bottom-2 select-none bg-bg/70 px-1 pt-1 text-xs font-normal ltr:right-0.5 rtl:left-0.5',\n                {\n                  'text-text-alt': percent < 0.8,\n                  'text-warn': percent >= 0.8 && percent < 1,\n                  'text-danger': percent >= 1,\n                }\n              )}\n              data-testid=\"form-textarea-counter\"\n            >\n              <span aria-hidden>\n                {length}/{maxLength}\n              </span>\n              <span className=\"sr-only\">{t('remaining', { count: remaining })}</span>\n            </p>\n          )}\n        </div>\n      </FormLabel>\n      <FormError id={errorId} error={fieldError} />\n      <FormHelpMessage id={helperId} message={helpMessage} loading={loading} />\n    </div>\n  );\n};\n\nexport { FormTextarea };\nexport default FormTextarea;\n","export * from './lib/form';\nexport * from './lib/form.connector';\nexport * from './lib/form.error';\nexport * from './lib/form.error-icon';\nexport * from './lib/form.help-message';\nexport * from './lib/form.input';\nexport * from './lib/form.label';\nexport * from './lib/form.label-helper';\nexport * from './lib/form.legend';\nexport * from './lib/form.card-number-input';\nexport * from './lib/form.select';\nexport * from './lib/form.textarea';\nexport * from './lib/form.types';\n"],"names":["GetSpeedBumpFeatureConfigsDocument","operationName","operationString","originalOpName","TRANSLATE_RULES_CONFIG_NAME","ONELINK_CONFIG_NAME","names","makeAnchorEventTarget","absoluteUrl","url","URL","preventDefault","undefined","stopPropagation","currentTarget","href","origin","pathname","target","useSpeedbump","language","appName","bypassOneLink","oneLinkConfig","translateRules","useTranslationsConfig","isEnabled","data","options","useGetSpeedBumpFeatureConfigsQuery","enabled","staleTime","CDN_STALE_TIME","useQuery","queryKey","featureConfigs","find","config","name","isBrowser","window","location","oneLinkProps","getOneLinkProps","translateRuleEngine","React","RuleEngine","targetLanguage","DEFAULT_LANGUAGE","isVisible","setIsVisible","eventTarget","setEventTarget","onShow","e","parentElement","transformUrl","startsWith","urlConfig","getUrlConfig","shouldShowSpeedbump","isOneLink","speedbump","onHide","onContinue","enUri","replace","open","Speedbump","isShowing","onClose","onCloseProp","onContinueProp","speedbumpOptions","t","useTranslation","title","message","confirmButtonLabel","cancelButtonLabel","titleOptions","hasChildrenWithTitle","FocusLock","as","disabled","ActionDialog","buttonOptions","cancel","label","confirm","isOpen","onCancel","handleCancel","digitalData","_satellite","set","track","onConfirm","handleConfirm","onDismiss","handleDismiss","size","shouldStackButtons","div","data-testid","className","DialogTitle","Goals","ForgotInfoLinkClick","HidePassword","LoginError","OHWSignInSuccess","NavEngagement","ShowPassword","SignInSuccess","successfulHonorsEnrollment","SignInAfterJoin","HOST_REGEX","tranlateUrlsRuleEngine","appBasePaths","facts","ENGLISH","appUrl","redirect","parsedURL","originalPath","originalUrl","toString","slice","length","isOHWUrl","test","host","endsWith","SLASH","indexOf","DOUBLE_SLASH","protocol","ruleUrl","isTranslatedUrl","run","ruleFacts","finalUrl","finalPath","some","matcher","appBasePath","FormErrorIcon","forwardRef","width","height","rest","ref","svg","role","aria-hidden","viewBox","g","fill","circle","cx","cy","r","transform","stroke","strokeLinecap","path","d","strokeWidth","displayName","FormError","error","messages","types","Object","values","filter","v","hasError","hidden","map","span","String","Form","errorMessage","onSubmit","children","useFormProps","mode","criteriaMode","hasErrorBanner","method","memoizedFormProps","methods","useForm","formState","errors","isSubmitted","hasErrors","keys","FormProvider","h2","form","noValidate","handleSubmit","onFormSubmit","useFormContext","FormHelpMessage","loading","id","Array","isArray","Spinner","p","value","index","FormLabelHelper","required","optional","requiredText","optionalText","text","FormLabel","FormInput","registerOptions","labelClassName","helpMessage","containerClassName","errorId","helperId","register","fieldError","get","inputClassName","labelClass","type","input","aria-invalid","aria-describedby","FormSelect","select","multiple"],"sourceRoot":"","ignoreList":[]}