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IAAI,CACjB3R,QAAS,kCACX,GACO,EAIX,CACA,MAAO,EACT,GAEJ,KACF,KAAK,UACHqS,EAAW2B,CAAAA,EAAAA,EAAAA,CAAAA,EAA0B,CACnC3B,EAAShf,QAAQ,GACjBgf,EAASnB,KAAK,GACdmB,EAASU,IAAI,CACX,yBACAM,EAAWrT,OAAO,CAClB,MAAO5M,EAAewE,IACb,MAAMka,EAAmB1e,EAAOwE,IAG5C,EACD,KACF,KAAK,eACHya,EAAWgB,EAAWY,YAAY,CAIxC,IAGK5B,CACT,EAuBgDhb,EAC9C,GAEOob,EAAAA,EAAU,GAAGG,KAAK,CAACV,EAC5B,gGC7XO,SAAS8B,0BACdE,CAA2B,EAE3B,OAAOzB,EAAAA,EAAU,GAAGM,IAAI,CAAC,MAAO3f,EAAOoD,KACrC,GAAI,CACF,IAAK,IAAM0b,KAAUgC,EACnB,MAAMhC,EAAOiC,QAAQ,CAAC/gB,EAE1B,CAAE,MAAOnD,EAAgB,CACvB,IAAM+P,EAAU/P,EAA+B+P,OAAO,CACtD,OAAOxJ,EAAQkb,WAAW,CAAC,CAAE1R,QAAAA,CAAQ,EACvC,CAEA,MAAO,EACT,EACF","sources":["webpack://_N_E/./src/components/atoms/FileUpload/FileUpload.tsx","webpack://_N_E/./src/components/atoms/InputTextArea/InputTextArea.tsx","webpack://_N_E/./src/components/atoms/InputRadioButton/InputRadioButton.tsx","webpack://_N_E/./src/components/molecules/InputRadioButtonGroup/InputRadioButtonGroup.tsx","webpack://_N_E/./src/components/molecules/InputRadioButtonsGroup/InputRadioButtonsGroup.tsx","webpack://_N_E/./src/components/molecules/FacebookFormMessage/FacebookFormMessage.tsx","webpack://_N_E/./src/components/molecules/FileUploadGroup/FileUploadGroup.tsx","webpack://_N_E/./src/components/molecules/InputDropDownGroup/InputDropDownGroup.tsx","webpack://_N_E/./src/lib/constants/constants/phones.ts","webpack://_N_E/./src/lib/utils/helpers/phoneHelpers/getPhoneCountryCodePrefix.ts","webpack://_N_E/./src/lib/utils/helpers/phoneHelpers/addPhoneCountryCode.ts","webpack://_N_E/./src/lib/utils/helpers/phoneHelpers/removePhoneCountryCode.ts","webpack://_N_E/./src/components/atoms/InputFieldPhone/InputFieldPhone.tsx","webpack://_N_E/./src/components/molecules/InputFieldPhoneGroup/InputFieldPhoneGroup.tsx","webpack://_N_E/./src/components/atoms/InputFieldPassword/InputFieldPassword.tsx","webpack://_N_E/./src/components/molecules/InputPasswordGroup/InputPasswordGroup.tsx","webpack://_N_E/./src/components/molecules/InputTextAreaGroup/InputTextAreaGroup.tsx","webpack://_N_E/./src/components/atoms/InputToggle/InputToggle.tsx","webpack://_N_E/./src/components/molecules/InputToggleGroup/InputToggleGroup.tsx","webpack://_N_E/./src/components/molecules/ImageCropper/ImageCropper.tsx","webpack://_N_E/./src/components/molecules/ImageDisplayUpload/ImageDisplayUpload.tsx","webpack://_N_E/./src/lib/dataSource/lostApi/pet/inferSpecies/getSpecies.ts","webpack://_N_E/./src/lib/utils/helpers/fileHelpers/fileToDataUrl.ts","webpack://_N_E/./src/components/organisms/ImageDisplayCropperWrapper/ImageDisplayCropperWrapper.tsx","webpack://_N_E/./src/components/organisms/ImageDisplayCropperWrapperGroup/ImageDisplayCropperWrapperGroup.tsx","webpack://_N_E/./src/components/molecules/ImageUploader/ImageUploader.tsx","webpack://_N_E/./src/components/organisms/ImageUploadHandler/ImageUploadHandler.tsx","webpack://_N_E/./src/components/organisms/ImageUploadHandlerGroup/ImageUploadHandlerGroup.tsx","webpack://_N_E/./src/components/molecules/ImageUploadTile/ImageUploadTile.tsx","webpack://_N_E/./src/components/organisms/ImageUploadTileGroup/ImageUploadTileGroup.tsx","webpack://_N_E/./src/components/organisms/ImageUploadTileField/ImageUploadTileField.tsx","webpack://_N_E/./src/lib/hooks/aws/AwsClient.tsx","webpack://_N_E/./src/lib/utils/keyboardInterceptors/DropDownMenuKeyboardInterceptor.tsx","webpack://_N_E/./src/components/molecules/InputPlacesField/InputPlacesField.tsx","webpack://_N_E/./src/components/molecules/InputPlacesGroup/InputPlacesGroup.tsx","webpack://_N_E/./src/components/organisms/InputPlacesProvider/InputPlacesProvider.tsx","webpack://_N_E/./src/lib/utils/helpers/formHelpers/getErrorSetterForField.ts","webpack://_N_E/./src/components/organisms/FormBuilder/FieldBuilder.tsx","webpack://_N_E/./src/lib/dataSource/lostApi/upload/imageUpload.ts","webpack://_N_E/./src/lib/dataSource/lostApi/social/targeting/locationCheck.ts","webpack://_N_E/./src/lib/hooks/checkSocialTargetMarket/useCheckSocialTargetMarket.ts","webpack://_N_E/./src/lib/utils/badWordsFilter/badWordsFilter.ts","webpack://_N_E/./src/lib/utils/debounceAsync/debounceAsync.ts","webpack://_N_E/./src/lib/utils/helpers/maybeCallFunctionWithParams/maybeCallFunctionWithParams.ts","webpack://_N_E/./src/lib/utils/keyboardInterceptors/KeyboardInterceptor.tsx","webpack://_N_E/./src/lib/dataSource/lostApi/auth/exists.ts","webpack://_N_E/./src/lib/dataSource/lostApi/awo/tax/taxId.ts","webpack://_N_E/./src/lib/validations/FormBuilderValidation.ts","webpack://_N_E/./src/lib/validations/validationHelpers.ts","webpack://_N_E/<anon>"],"sourcesContent":["import {\n  ColorShade,\n  ColorType,\n  IColorObject,\n} from '@/components/atoms/Colors/Colors';\nimport Divider from '@/components/atoms/Divider/Divider';\nimport Icon, { IIcon } from '@/components/atoms/Icon/Icon';\nimport InputError from '@/components/atoms/InputError/InputError';\nimport Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport { validImageMimeTypes } from '@/lib/dataSource/lostApi/upload/imageUpload';\nimport React, { LegacyRef, useEffect, useState } from 'react';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\n\n/**\n * The default icon to use\n *\n * @constant {IIcon}\n */\nconst defaultIcon: IIcon = {\n  icon: 'plus',\n  size: 20,\n  colorType: 'base',\n  colorShade: 400,\n};\n\n/**\n * IFileUpload\n *\n * @interface IFileUpload\n */\nexport interface IFileUpload {\n  /**\n   * The name of the input\n   *\n   * @memberof IFileUpload\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The function to call when the value changes\n   *\n   * @memberof IFileUpload\n   * @member {(value: File[]) => void} onChange\n   * @param {File} value - The value of the input\n   * @returns {void}\n   */\n  onChange: (value: File[]) => void;\n  /**\n   * The optional disabled status of the component\n   *\n   * @memberof IFileUpload\n   * @member {boolean} [disabled]\n   */\n  disabled?: boolean;\n  /**\n   * The error message to display\n   *\n   * @memberof IFileUpload\n   * @member {string | FieldError | undefined} [error]\n   * @type {string | FieldError | undefined}\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The ref of the input\n   *\n   * @memberof IFileUpload\n   * @member {LegacyRef<HTMLInputElement> | undefined} [inputRef]\n   */\n  inputRef?: LegacyRef<HTMLInputElement> | undefined;\n  /**\n   * The text to display on upload button\n   *\n   * @memberof IFileUpload\n   * @member {string} [label]\n   */\n  label?: string;\n  /**\n   * Files to be uploaded\n   *\n   * @memberof IFileUpload\n   * @member {File[]} [uploadFiles]\n   */\n  uploadFiles?: File[];\n  /**\n   * The optional color shade of the component\n   *\n   * @memberof IFileUpload\n   * @default 400\n   * @member {ColorShade} [colorShade]\n   */\n  colorShade?: ColorShade;\n  /**\n   * The optional color type of the component\n   *\n   * @memberof IFileUpload\n   * @default 'base'\n   * @member {ColorType} [colorType]\n   */\n  colorType?: ColorType;\n  /**\n   * The optional props for the icon\n   *\n   * @memberof IFileUpload\n   * @default defaultIcon\n   * @member {IIcon} [icon]\n   */\n  icon?: IIcon;\n  /**\n   * Allow multiple files to be uploaded\n   *\n   * @memberof IFileUpload\n   * @default true\n   * @member {boolean} [multiple]\n   */\n  multiple?: boolean;\n  /**\n   * Optional label above the component\n   *\n   * @memberof IFileUpload\n   * @default ''\n   * @member {string} [upperLabel]\n   */\n  upperLabel?: string;\n}\n\n/**\n * FileUpload An input for uploading files\n *\n * @param {IFileUpload} props - The props for the FileUpload component\n * @returns {React.FC<IFileUpload>} Component\n */\nconst FileUpload: React.FC<IFileUpload> = ({\n  name,\n  error,\n  label,\n  onChange,\n  disabled,\n  uploadFiles,\n  colorShade = 400,\n  colorType = 'base',\n  icon = defaultIcon,\n  multiple = true,\n  upperLabel = '',\n}: IFileUpload) => {\n  const [files, setFiles] = useState<File[]>([]);\n  const [buttonHovered, setButtonHovered] = useState(false);\n\n  /** Set files to uploadFiles if uploadFiles is defined */\n  useEffect(() => {\n    if (uploadFiles) {\n      setFiles(uploadFiles);\n    }\n  }, [uploadFiles]);\n\n  /**\n   * Remove Image\n   *\n   * @param {number} index - The index of the image to remove\n   */\n  const removeImage = (index: number) => {\n    const newFiles = [...files];\n    newFiles.splice(index, 1);\n    setFiles(newFiles);\n    onChange(newFiles);\n  };\n\n  /** @returns {void} */\n  const handleClick = () => {\n    document.getElementById(name)?.click();\n  };\n\n  /**\n   * @param {React.ChangeEvent} event - The event that is triggered when the\n   *   input changes\n   * @returns {void}\n   */\n  const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    if (event.target.files) {\n      /**\n       * The new files to set\n       *\n       * @constant {File[]}\n       */\n      const newFiles = multiple\n        ? [...files, ...event.target.files]\n        : [...event.target.files];\n      setFiles(newFiles);\n      setButtonHovered(false);\n      onChange(newFiles);\n    }\n  };\n\n  /**\n   * The classes for the icon\n   *\n   * @constant {string}\n   */\n  const iconClasses = `${icon.classes ? icon.classes : ''} ${\n    label ? 'pr-1' : ''\n  }`;\n\n  /**\n   * Get The color share for the button\n   *\n   * @returns {keyof IColorObject} - The color shade for the button\n   */\n  const getButtonIconColorShade = (): keyof IColorObject => {\n    if (disabled) return 500;\n\n    if (buttonHovered) return 400;\n\n    return colorShade;\n  };\n\n  return (\n    <div data-testid=\"file-upload\">\n      {upperLabel && (\n        <Paragraph size=\"body4\" styling=\"bold\" className=\"pb-4\">\n          {upperLabel}\n        </Paragraph>\n      )}\n      <button\n        data-testid={`file-upload-button${buttonHovered ? '-hovered' : ''}`}\n        onClick={handleClick}\n        onMouseEnter={() => setButtonHovered(true)}\n        onMouseLeave={() => setButtonHovered(false)}\n        onBlur={() => setButtonHovered(false)}\n        disabled={disabled}\n      >\n        <div className=\"flex flex-row items-center\">\n          <Icon\n            {...{\n              ...icon,\n              colorType: buttonHovered ? 'base' : colorType,\n              colorShade: getButtonIconColorShade(),\n            }}\n            classes={iconClasses}\n          />\n          {label && (\n            <Paragraph\n              size=\"body5\"\n              className={`text-${buttonHovered ? 'base' : colorType}-${\n                buttonHovered ? 400 : colorShade\n              }`}\n            >\n              {label}\n            </Paragraph>\n          )}\n        </div>\n      </button>\n      <input\n        data-testid=\"file-upload-input\"\n        id={name}\n        type=\"file\"\n        accept={validImageMimeTypes.join(',')}\n        onChange={handleChange}\n        className=\"hidden\"\n        multiple={multiple}\n      />\n      <InputError error={error} />\n      {files.length > 0 && multiple && (\n        <div className=\"flex flex-col space-y-2 pb-\">\n          <Paragraph size=\"body5\" styling=\"bold\">\n            Files Uploaded\n          </Paragraph>\n          <Divider type=\"lightGrey\" />\n        </div>\n      )}\n      {files.length > 0 &&\n        multiple &&\n        files.map((file, index) => (\n          <div key={index} className=\"flex flex-col\">\n            <div className=\"flex flex-row justify-between items-center\">\n              <Paragraph size=\"body5\" className=\"py-2\">\n                {file.name}\n              </Paragraph>\n              <button\n                onClick={() => {\n                  removeImage(index);\n                }}\n                data-testid=\"file-upload-remove-button\"\n              >\n                <Icon\n                  icon=\"trash\"\n                  size={24}\n                  colorType=\"error\"\n                  colorShade={200}\n                />\n              </button>\n            </div>\n            <Divider type=\"lightGrey\" />\n          </div>\n        ))}\n    </div>\n  );\n};\n\nexport default FileUpload;\n","import InputError from '@/components/atoms/InputError/InputError';\nimport { cva } from 'cva';\nimport React, { LegacyRef, useEffect, useState } from 'react';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\nimport {\n  inputDisabledClasses,\n  inputErrorClasses,\n  labelDisabledClasses,\n} from '../InputField/InputStyling';\n\n/** Input Text Area State The state of the input text area. */\ntype fieldState = 'default' | 'readyOnly' | 'error';\n\n/**\n * IInputTextArea - Interface for the input text area component\n *\n * @interface IInputTextArea\n */\nexport interface IInputTextArea {\n  /**\n   * The name of the input text area.\n   *\n   * @memberof IInputTextArea\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The function to call when the input text area value changes.\n   *\n   * @memberof IInputTextArea\n   * @member {(value: string) => void} [onChange]\n   */\n  onChange?: (value: string) => void;\n  /**\n   * The function to call when the input text area loses focus.\n   *\n   * @memberof IInputTextArea\n   * @member {(value: string) => void} [onBlur]\n   */\n  onBlur?: (value: string) => void;\n  /**\n   * The label text for the input text area.\n   *\n   * @memberof IInputTextArea\n   * @default ''\n   * @member {string} [label]\n   */\n  label?: string;\n  /**\n   * The error message for the input text area.\n   *\n   * @memberof IInputTextArea\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The number of rows for the input text area to show.\n   *\n   * @memberof IInputTextArea\n   * @default 8\n   * @member {number} [rows]\n   */\n  rows?: number;\n  /**\n   * A value for the input text area.\n   *\n   * @memberof IInputTextArea\n   * @default ''\n   * @member {string} [value]\n   */\n  value?: string;\n  /**\n   * Whether or not the input text area is required.\n   *\n   * @memberof IInputTextArea\n   * @default false\n   * @member {boolean} [required]\n   */\n  required?: boolean;\n  /**\n   * The ref of the input text area.\n   *\n   * @memberof IInputTextArea\n   * @default false\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * Whether or not the input text area is read only.\n   *\n   * @memberof IInputTextArea\n   * @member {LegacyRef<HTMLTextAreaElement> | undefined} [inputRef]\n   */\n  inputRef?: LegacyRef<HTMLTextAreaElement> | undefined;\n  /**\n   * The classes for the input text area.\n   *\n   * @memberof IInputTextArea\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n  /**\n   * The upper label for the input text area.\n   *\n   * @memberof IInputTextArea\n   * @default ''\n   * @member {string} [upperLabel]\n   */\n  upperLabel?: string;\n  /**\n   * Uses a floating label that shrinks when input is focused or not empty.\n   *\n   * @memberof IInputTextArea\n   * @member {boolean} [floatingLabel]\n   */\n  floatingLabel?: boolean;\n}\n\n/**\n * Input Text Area Used to display a input text area for a form. Should be used\n * with react-hook-form.\n *\n * @param {IInputTextArea} props - The props for the InputField component\n * @returns {React.FC<IInputTextArea>} InputField Component\n */\nconst InputTextArea: React.FC<IInputTextArea> = ({\n  name,\n  onChange,\n  onBlur,\n  label,\n  error,\n  rows = 8,\n  value = '',\n  required = false,\n  readOnly = false,\n  classes = '',\n  upperLabel = '',\n  floatingLabel,\n}: IInputTextArea) => {\n  const [inputValue, setInputValue] = useState('');\n\n  /** If a value is passed in props, set the input value */\n  useEffect(() => {\n    if (value) setInputValue(value);\n  }, [value]);\n\n  /**\n   * Change Value Change value of input on the prop on change and state\n   *\n   * @param {React.ChangeEvent<HTMLTextAreaElement>} event - The event to get\n   *   the value from\n   */\n  const changeValue = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n    setInputValue(event.target.value);\n    onChange?.(event.target.value);\n  };\n\n  /**\n   * Change value on blur\n   *\n   * @param {React.FocusEvent<HTMLTextAreaElement>} event - The event to get the\n   *   value from\n   */\n  const blurValue = (event: React.FocusEvent<HTMLTextAreaElement>) => {\n    onBlur?.(event.target.value);\n  };\n\n  const testId = `input-text-area-${readOnly}`;\n\n  const inputTextAreaClasses = cva(\n    ['peer resize-none rounded w-full border text-body4', classes],\n    {\n      variants: {\n        state: {\n          default:\n            'border-neutral-700 focus:border-base-400 focus:ring-base-400',\n          readyOnly: inputDisabledClasses,\n          error: inputErrorClasses,\n        },\n        label: {\n          floating: 'pt-[22px] px-3',\n        },\n      },\n    }\n  );\n\n  const currentState: fieldState = readOnly\n    ? 'readyOnly'\n    : error\n    ? 'error'\n    : 'default';\n\n  const labelClass =\n    'absolute origin-[0] font-petco text-base text-neutral-700 duration-300 z-10 bg-white cursor-text left-3 top-3.5 -translate-y-2.5 scale-75 peer-focus:-translate-y-2.5 peer-focus:scale-75 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100';\n\n  const labelClasses = cva(labelClass, {\n    variants: {\n      state: {\n        default: '',\n        readyOnly: labelDisabledClasses,\n        error: '!text-error-200',\n      },\n    },\n  });\n\n  return (\n    <>\n      <div data-testid={testId}>\n        {upperLabel && (\n          <div className=\"mb-4\">\n            <label htmlFor={name} className=\"text-body4 font-petco bold\">\n              {upperLabel}\n            </label>\n          </div>\n        )}\n\n        <div className=\"relative\">\n          <textarea\n            id={name}\n            value={inputValue}\n            onChange={changeValue}\n            onBlur={blurValue}\n            placeholder={floatingLabel ? '' : label}\n            rows={rows}\n            aria-invalid={error ? 'true' : 'false'}\n            required={required}\n            readOnly={readOnly}\n            disabled={readOnly}\n            className={inputTextAreaClasses({\n              state: currentState,\n              label: floatingLabel ? 'floating' : undefined,\n            })}\n            data-testid=\"input-text-area\"\n          />\n          {floatingLabel && (\n            <label\n              htmlFor={name}\n              className={labelClasses({ state: currentState })}\n              data-testid={`input-label-${name}`}\n            >\n              {label}\n            </label>\n          )}\n          {error && <InputError error={error} />}\n        </div>\n      </div>\n    </>\n  );\n};\n\nexport default InputTextArea;\n","import IRegisterFunction from '../InputField/IRegisterFunction';\n\n/**\n * Radio Button Sizes The Size options for a particular Radio Button\n *\n * @type {RadioButtonSize}\n */\nexport type RadioButtonSize = 'small' | 'medium';\n\n/**\n * IInputRadioButton - Interface for the Input Radio Button Component\n *\n * @interface IInputRadioButton\n */\nexport interface IInputRadioButton {\n  /**\n   * The name of the input field.\n   *\n   * @memberof IInputRadioButton\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * Value of a particular radio button.\n   *\n   * @memberof IInputRadioButton\n   * @member {string} value\n   */\n  value: string;\n  /**\n   * The size of a particular radio button.\n   *\n   * @memberof IInputRadioButton\n   * @member {RadioButtonSize} size\n   */\n  size: RadioButtonSize;\n  /**\n   * The register function from react-hook-form.\n   *\n   * @memberof IInputRadioButton\n   * @member {IRegisterFunction} register\n   */\n  register: IRegisterFunction;\n  /**\n   * If the button is readOnly\n   *\n   * @memberof IInputRadioButton\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * The optional classes for the input field.\n   *\n   * @memberof IInputRadioButton\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n}\n\n/**\n * Size Classes Size Classes for our Radio Buttons\n *\n * @constant\n */\nconst sizeClasses = {\n  small: {\n    base: 'w-6 h-6 border-solid border-neutral-500',\n    checked:\n      'checked:bg-base-300 checked:bg-[length:35px_35px] checked:text-base-300 checked:hover:text-base-400 checked:disabled:bg-neutral-500',\n    hover: 'enabled:hover:border-neutral-600',\n    focus:\n      'focus:ring-0 focus:ring-offset-0 focus-visible:border-focus-400 focus-visible:checked:outline-focus-400 focus-visible:checked:outline-[1px] focus-visible:checked:outline-offset-0',\n  },\n\n  medium: {\n    base: 'w-[30px] h-[30px] !bg-none text-base-300 border-neutral-400',\n    checked:\n      'checked:bg-none checked:border-solid checked:border-[5px] checked:border-neutral-100 checked:ring-2 checked:ring-neutral-400 checked:bg-base-300 checked:disabled:bg-neutral-500',\n    hover:\n      'enabled:hover:ring-2 enabled:hover:ring-neutral-500 hover:bg-none hover:bg-neutral-100 enabled:hover:!border-neutral-100 disabled:checked:!border-neutral-100 enabled:hover:border-[5px]',\n    focus:\n      'focus:ring-neutral-400 focus-visible:ring-focus-400 focus:ring-2 focus:bg-neutral-100 focus:!border-neutral-100 focus:ring-offset-0',\n  },\n};\n\n/**\n * Input Radio Button Input Radio Button for a form input.\n *\n * @param {IInputRadioButton} props - The props for the Input Radio Button\n * @returns {React.FC<IInputRadioButton>} Input Radio Button Component\n */\nconst InputRadioButton: React.FC<IInputRadioButton> = ({\n  name,\n  register,\n  size,\n  classes = '',\n  readOnly,\n  value,\n  ...rest\n}: IInputRadioButton) => {\n  const radioClasses = [\n    'form-radio enabled:cursor-pointer disabled:cursor-not-allowed',\n    classes,\n    sizeClasses[size].base,\n    sizeClasses[size].hover,\n    sizeClasses[size].focus,\n    sizeClasses[size].checked,\n  ].join(' ');\n\n  return (\n    <input\n      data-testid={`input-radio-button-${size}`}\n      id={name + '_' + value}\n      type=\"radio\"\n      value={value}\n      name=\"default-radio\"\n      disabled={readOnly}\n      className={radioClasses}\n      {...register(name)}\n      {...rest}\n    />\n  );\n};\n\nexport default InputRadioButton;\n","import IRegisterFunction from '@/components/atoms/InputField/IRegisterFunction';\nimport InputLabel from '@/components/atoms/InputLabel/InputLabel';\nimport InputRadioButton, {\n  RadioButtonSize,\n} from '@/components/atoms/InputRadioButton/InputRadioButton';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\n\n/**\n * IInputRadioButtonGroup - The props for the Input Radio Button Group\n * component.\n *\n * @interface IInputRadioButtonGroup\n */\nexport interface IInputRadioButtonGroup {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IInputRadioButtonGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The label for the input field.\n   *\n   * @memberof IInputRadioButtonGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The value for the radio button field.\n   *\n   * @memberof IInputRadioButtonGroup\n   * @member {string} value\n   */\n  value: string;\n  /**\n   * The size of the radio button.\n   *\n   * @memberof IInputRadioButtonGroup\n   * @member {RadioButtonSize} size\n   */\n  size: RadioButtonSize;\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IInputRadioButtonGroup\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The register function from react-hook-form\n   *\n   * @memberof IInputRadioButtonGroup\n   * @member {IRegisterFunction} register\n   */\n  register: IRegisterFunction;\n  /**\n   * If the input is readOnly\n   *\n   * @memberof IInputRadioButtonGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * The optional classes for the wrapper div.\n   *\n   * @memberof IInputRadioButtonGroup\n   * @default ''\n   * @member {string} [wrapperClasses]\n   */\n  wrapperClasses?: string;\n}\n\n/**\n * Input Radio Button Group Input Radio Button Group for a form input. Should be\n * used with react-hook-form.\n *\n * @param {IInputRadioButtonGroup} props - The props for the\n *   InputRadioButtonGroup\n * @returns {React.FC<IInputRadioButtonGroup>} Input Radio Button Group\n *   Component\n */\nconst InputRadioButtonGroup: React.FC<IInputRadioButtonGroup> = ({\n  name,\n  label,\n  value,\n  register,\n  wrapperClasses = '',\n  size,\n  readOnly = false,\n  ...rest\n}: IInputRadioButtonGroup) => {\n  const labelDisabledClass = readOnly ? '!text-neutral-500' : '';\n\n  return (\n    <div data-testid={`input-radio-button-group-${size}`}>\n      <InputLabel\n        name={name + '_' + value}\n        classes={`flex align-center ${wrapperClasses} ${\n          readOnly ? '!cursor-not-allowed' : '!cursor-pointer'\n        }`}\n      >\n        <InputRadioButton\n          name={name}\n          size={size}\n          value={value}\n          register={register}\n          readOnly={readOnly}\n          classes=\"mr-1.5\"\n          {...rest}\n        />\n        <span className={`font-petco text-body4 ${labelDisabledClass}`}>\n          {label}\n        </span>\n      </InputLabel>\n    </div>\n  );\n};\n\nexport default InputRadioButtonGroup;\n","import InputError from '@/components/atoms/InputError/InputError';\nimport IRegisterFunction from '@/components/atoms/InputField/IRegisterFunction';\nimport InputLabel from '@/components/atoms/InputLabel/InputLabel';\nimport { RadioButtonSize } from '@/components/atoms/InputRadioButton/InputRadioButton';\nimport { cva } from 'cva';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\nimport InputRadioButtonGroup from '../InputRadioButtonGroup/InputRadioButtonGroup';\n\n/**\n * IInputRadioButton Used to handle the Input Radio Button Group props.\n *\n * @interface IInputRadioButton\n */\nexport interface IInputRadioButton {\n  /**\n   * The value of the input field.\n   *\n   * @memberof IInputRadioButton\n   * @member {string} value\n   */\n  value: string;\n  /**\n   * The label for the input field.\n   *\n   * @memberof IInputRadioButton\n   * @member {string} label\n   */\n  label: string;\n}\n\n/**\n * IInputRadioButtonsGroup - The props for the Input Radio Buttons Group\n *\n * @interface IInputRadioButtonsGroup\n */\nexport interface IInputRadioButtonsGroup {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IInputRadioButtonsGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The size of the radio buttons to use.\n   *\n   * @memberof IInputRadioButtonsGroup\n   * @member {RadioButtonSize} [size]\n   */\n  size?: RadioButtonSize;\n  /**\n   * The label of the input radio buttons group.\n   *\n   * @memberof IInputRadioButtonsGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The radio buttons to display.\n   *\n   * @memberof IInputRadioButtonsGroup\n   * @member {IInputRadioButton[]} options\n   */\n  options: IInputRadioButton[];\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IInputRadioButtonsGroup\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The register function from react-hook-form\n   *\n   * @memberof IInputRadioButtonsGroup\n   * @member {IRegisterFunction} register\n   */\n  register: IRegisterFunction;\n  /**\n   * If the input is readonly\n   *\n   * @memberof IInputRadioButtonsGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * The classes for the individual inputs.\n   *\n   * @memberof IInputRadioButtonsGroup\n   * @member {string} [inputClasses]\n   */\n  inputClasses?: string;\n  /**\n   * The optional classes for the wrapper div.\n   *\n   * @memberof IInputRadioButtonsGroup\n   * @default ''\n   * @member {string} [wrapperClasses]\n   */\n  wrapperClasses?: string;\n}\n\n/**\n * Input Radio Buttons Group A Radio Button Input Group for Multiple Radio\n * Buttons.\n *\n * @param {IInputRadioButtonsGroup} props - The props for the Input Radio\n *   Buttons Group\n * @returns {React.FC<IInputRadioButtonsGroup>} Input Radio Buttons Group\n *   Component\n */\nconst InputRadioButtonsGroup: React.FC<IInputRadioButtonsGroup> = ({\n  name,\n  size = 'small',\n  label,\n  options,\n  error,\n  register,\n  readOnly = false,\n  inputClasses = '',\n  wrapperClasses = '',\n  ...rest\n}: IInputRadioButtonsGroup) => {\n  /** Radio Button classes set using CVA */\n  const radioButtonClasses = cva(`flex w-full`, {\n    variants: {\n      state: {\n        binary: 'flex-row space-x-6',\n        multi: 'flex-col space-y-3',\n      },\n    },\n  });\n\n  /**\n   * The states for the radio button group.\n   *\n   * @type {'binary' | 'multi'}\n   */\n  type states = 'binary' | 'multi';\n\n  /** Current State The current state of the radio button group. */\n  const currentState: states = options.length > 2 ? 'multi' : 'binary';\n\n  return (\n    <div className=\"flex flex-col space-y-3\">\n      <InputLabel name={name} classes=\"font-bold font-petco text-body4\">\n        {label}\n      </InputLabel>\n      <div\n        data-testid={`input-radio-buttons-group-${size}`}\n        className={radioButtonClasses({\n          state: currentState,\n          class: wrapperClasses,\n        })}\n      >\n        {options.map((option) => (\n          <InputRadioButtonGroup\n            key={option.value}\n            name={name}\n            size={size}\n            label={option.label}\n            value={option.value}\n            register={register}\n            readOnly={readOnly}\n            wrapperClasses={inputClasses}\n            {...rest}\n          />\n        ))}\n      </div>\n      {error && <InputError error={error} />}\n    </div>\n  );\n};\n\nexport default InputRadioButtonsGroup;\n","import Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport { ILocationDto } from '@/components/molecules/InputPlacesFieldGoogle/InputPlacesFieldGoogle';\nimport { useCheckSocialTargetMarket } from '@/lib/hooks/checkSocialTargetMarket/useCheckSocialTargetMarket';\nimport React, { useEffect, useState } from 'react';\n\n/**\n * IFacebookFormMessageContext\n *\n * @interface IFacebookFormMessageContext\n */\nexport interface IFacebookFormMessageContext {\n  /**\n   * Whether the location is in the target market\n   *\n   * @memberof IFacebookFormMessageContext\n   * @member {boolean} isTargetMarket\n   */\n  isTargetMarket: boolean;\n}\n\n/**\n * IFacebookFormMessageContext\n *\n * @interface IFacebookFormMessageFormData\n */\nexport interface IFacebookFormMessageFormData {\n  /**\n   * The location field of the flow\n   *\n   * @memberof IFacebookFormMessageFormData\n   * @member {ILocationDto} [petLocation]\n   */\n  petLocation?: ILocationDto;\n}\n\n/**\n * IFacebookFormMessageProps\n *\n * @interface IFacebookFormMessageProps\n */\nexport interface IFacebookFormMessageProps {\n  /**\n   * The context for the FacebookFormMessage\n   *\n   * @memberof IFacebookFormMessageProps\n   * @member {IFacebookFormMessageContext} [context]\n   */\n  context?: IFacebookFormMessageContext;\n\n  /**\n   * The form data for the FacebookFormMessage\n   *\n   * @memberof IFacebookFormMessageProps\n   * @member {IFacebookFormMessageFormData} [formData]\n   */\n  formData?: IFacebookFormMessageFormData;\n}\n\n/**\n * Facebook form message component for stepper form\n *\n * @param {IFacebookFormMessageProps} props - The props\n * @returns {React.FC<IFacebookFormMessageProps>} FacebookFormMessage Component\n */\nconst FacebookFormMessage: React.FC<IFacebookFormMessageProps> = ({\n  context = { isTargetMarket: false },\n  formData,\n}: IFacebookFormMessageProps) => {\n  const [loaded, setIsLoaded] = useState(false);\n\n  const { isPetOnSocialTargetMarket } = useCheckSocialTargetMarket({\n    location: formData?.petLocation,\n  });\n\n  // Ensure that context is loaded\n  useEffect(() => {\n    if (context) {\n      setIsLoaded(true);\n    }\n  }, [context]);\n\n  if (!loaded) {\n    return null;\n  }\n\n  return context.isTargetMarket || isPetOnSocialTargetMarket ? (\n    <div\n      className=\"flex flex-col text-left w-full\"\n      data-testid=\"facebook-form-message\"\n    >\n      <div className=\"flex flex-row h-[30px] mb-1 items-center space-x-2\">\n        <Paragraph\n          styling=\"bold\"\n          size=\"body4\"\n          className=\"text-secondaryBase-400\"\n        >\n          {\"We're spreading the word\"}\n        </Paragraph>\n      </div>\n      <Paragraph size=\"body5\">\n        We will share your pet report to a local Petco Love Lost Facebook group\n        based on your search location. You can view this post from your\n        dashboard.\n      </Paragraph>\n    </div>\n  ) : null;\n};\n\nexport default FacebookFormMessage;\n","import FileUpload from '@/components/atoms/FileUpload/FileUpload';\nimport {\n  Control,\n  Controller,\n  FieldError,\n  FieldErrorsImpl,\n  Merge,\n} from 'react-hook-form';\n\n/**\n * IFileUploadGroup\n *\n * @interface IFileUploadGroup\n */\nexport interface IFileUploadGroup {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IFileUploadGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The text to display\n   *\n   * @memberof IFileUploadGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IFileUploadGroup\n   * @member {string | FieldError | undefined} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The label above the File Upload component\n   *\n   * @memberof IFileUploadGroup\n   * @default '''\n   * @member {string} [upperLabel]\n   */\n  upperLabel?: string;\n  /**\n   * The Optional control object from react-hook-form\n   *\n   * @memberof IFileUploadGroup\n   * @member {Control} [control]\n   */\n  control?: Control;\n  /**\n   * The function to call when the value changes\n   *\n   * @memberof IFileUploadGroup\n   * @member {(value: File[]) => void} [onChange]\n   * @param {File} value - The value of the input\n   * @returns {void}\n   */\n  onChange?: (value: File[]) => void;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IFileUploadGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n}\n\n/**\n * FileUploadGroup File Upload input with label\n *\n * @param {IFileUploadGroup} props - The props for the FileUploadGroup component\n * @returns {React.FC<IFileUploadGroup>} Component\n */\nconst FileUploadGroup: React.FC<IFileUploadGroup> = ({\n  name,\n  label,\n  error,\n  upperLabel = '',\n  control,\n  onChange,\n  readOnly,\n}: IFileUploadGroup) => {\n  return (\n    <div data-testid=\"file-upload-group\">\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, ...field } }) => {\n            const { onChange: formOnChange, ...restField } = field;\n            return (\n              <FileUpload\n                label={label}\n                error={error}\n                inputRef={ref}\n                upperLabel={upperLabel}\n                onChange={(value: File[]) => {\n                  onChange && onChange(value);\n                  formOnChange(value);\n                }}\n                disabled={readOnly}\n                {...restField}\n              />\n            );\n          }}\n        />\n      ) : (\n        <FileUpload\n          name={name}\n          label={label}\n          error={error}\n          upperLabel={upperLabel}\n          disabled={readOnly}\n          onChange={(value) => {\n            onChange && onChange(value);\n          }}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default FileUploadGroup;\n","import InputDropDown, {\n  IInputDropDownOption,\n} from '@/components/atoms/InputDropDown/InputDropDown';\nimport {\n  Control,\n  Controller,\n  FieldError,\n  FieldErrorsImpl,\n  Merge,\n} from 'react-hook-form';\n\n/**\n * IInputDropDownError - The props for the Input Drop Down Error component.\n *\n * @interface IInputDropDownError\n */\nexport interface IInputDropDownError {\n  /**\n   * Validation error on the name of the option\n   *\n   * @memberof IInputDropDownError\n   * @member {FieldError} name\n   */\n  name: FieldError;\n  /**\n   * Validation error on the value of the option\n   *\n   * @memberof IInputDropDownError\n   * @member {FieldError} value\n   */\n  value: FieldError;\n}\n\n/**\n * InputDropDownErrors - The acceptable errors returned to the Input Drop Down\n * Group component.\n */\ntype InputDropDownErrors =\n  | IInputDropDownError\n  | FieldError\n  | Merge<FieldError, FieldErrorsImpl<FieldError>>\n  | undefined;\n\n/**\n * IInputDropDownGroup - The props for the Input Drop Down Group component.\n *\n * @interface IInputDropDownGroup\n */\nexport interface IInputDropDownGroup {\n  /**\n   * The name of the input\n   *\n   * @memberof IInputDropDownGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The label for the drop down field.\n   *\n   * @memberof IInputDropDownGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IInputDropDownGroup\n   * @member {InputDropDownErrors} [error]\n   */\n  error?: InputDropDownErrors;\n  /**\n   * The values for the drop down field.\n   *\n   * @memberof IInputDropDownGroup\n   * @member {IInputDropDownOption[]} values\n   */\n  values: IInputDropDownOption[];\n  /**\n   * If the field is read only\n   *\n   * @memberof IInputDropDownGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * The control function from react-hook-form\n   *\n   * @memberof IInputDropDownGroup\n   * @member {Control<any>} [control]\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  control?: Control<any>;\n  /**\n   * The value set to the field used without control\n   *\n   * @memberof IInputDropDownGroup\n   * @member {IInputDropDownOption} [value]\n   */\n  value?: IInputDropDownOption;\n  /**\n   * The onChange function used without control\n   *\n   * @memberof IInputDropDownGroup\n   * @member {Function} [onChange]\n   * @param {IInputDropDownOption} value - The value of the input\n   * @returns {void}\n   */\n  onChange?: (value: IInputDropDownOption) => void;\n}\n\n/**\n * InputDropDownGroup Add Description of the Component\n *\n * @param {IInputDropDownGroup} props - The props for the InputDropDownGroup\n * @returns {React.FC<IInputDropDownGroup>} InputDropDownGroup Component\n */\nconst InputDropDownGroup: React.FC<IInputDropDownGroup> = ({\n  control,\n  name,\n  label,\n  values,\n  error,\n  value,\n  readOnly,\n  onChange,\n}: IInputDropDownGroup) => {\n  /**\n   * Since the error object returned from the custom validation is returned as\n   * an object of errors with the name and value as different keys we need to\n   * check for that and return the correct error.\n   *\n   * @param {InputDropDownErrors} error - The error\n   * @returns {InputDropDownErrors} - The correct error\n   */\n  const inputDropDownError = (\n    error: InputDropDownErrors\n  ):\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined => {\n    if (error) {\n      if ('name' in error) {\n        return error.name;\n      }\n      return error;\n    }\n    return undefined;\n  };\n\n  return (\n    <div data-testid=\"input-drop-down-group\">\n      {/* Look for the Control - Mainly for displaying out in Storybook */}\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, ...field } }) => {\n            const { onChange: formOnChange, ...restField } = field;\n            return (\n              <InputDropDown\n                values={values}\n                label={label}\n                ref={ref}\n                error={inputDropDownError(error)}\n                readOnly={readOnly}\n                onChange={(value: IInputDropDownOption) => {\n                  formOnChange(value);\n                }}\n                {...restField}\n              />\n            );\n          }}\n        />\n      ) : (\n        <InputDropDown\n          values={values}\n          label={label}\n          error={inputDropDownError(error)}\n          value={value}\n          readOnly={readOnly}\n          onChange={onChange && ((value) => onChange(value))}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default InputDropDownGroup;\n","import { IInternalPhoneCountryCodeOptions } from '@/components/atoms/InputFieldInternationalPhone/InputFieldInternationalPhone';\nimport {\n  CountryFlags,\n  CountryToCountryCodeMap,\n  PhoneCountry,\n} from '@/lib/constants/types/phones';\n\n/**\n * The country code map\n *\n * @constant {CountryToCountryCodeMap}\n */\nexport const countryToCountryCodeMap: CountryToCountryCodeMap = {\n  US: 1,\n  CA: 1,\n  AU: 61,\n  MX: 52,\n};\n\n/**\n * The country to flag map\n *\n * @constant {Record<PhoneCountry, CountryFlags>}\n */\nexport const countryToFlagMap: Record<PhoneCountry, CountryFlags> = {\n  US: '🇺🇸',\n  CA: '🇨🇦',\n  MX: '🇲🇽',\n  AU: '🇦🇺',\n};\n\nexport const countryCodeDropdownOptions: IInternalPhoneCountryCodeOptions[] = [\n  { value: 'US', name: '🇺🇸 United States +1' },\n  { value: 'CA', name: '🇨🇦 Canada +1' },\n  { value: 'AU', name: '🇦🇺 Australia +61' },\n  { value: 'MX', name: '🇲🇽 Mexico +57' },\n];\n","import { countryToCountryCodeMap } from '@/lib/constants/constants/phones';\nimport { PhoneCountry } from '@/lib/constants/types/phones';\n\n/**\n * Get the phone country code prefix\n *\n * @param {PhoneCountry} country - The country code\n * @returns {string} The phone country code prefix\n */\nexport default function getPhoneCountryCodePrefix(\n  country: PhoneCountry\n): string {\n  /**\n   * The country code from the country code map\n   *\n   * @constant {number}\n   */\n  const countryCode = countryToCountryCodeMap[country];\n\n  return `+${countryCode} `;\n}\n","import { PhoneCountry } from '@/lib/constants/types/phones';\nimport getPhoneCountryCodePrefix from './getPhoneCountryCodePrefix';\n\n/**\n * Adds the country code to a phone number\n *\n * @param {string} value - The phone number\n * @param {PhoneCountry} country - The country code\n * @returns {string} The phone number with the country code\n */\nexport default function addPhoneCountryCode(\n  value: string,\n  country: PhoneCountry\n): string {\n  /**\n   * The country code prefix\n   *\n   * @constant {string}\n   */\n  const countryCodePrefix = getPhoneCountryCodePrefix(country);\n\n  return `${countryCodePrefix}${value}`;\n}\n","import { PhoneCountry } from '@/lib/constants/types/phones';\nimport getPhoneCountryCodePrefix from '../phoneHelpers/getPhoneCountryCodePrefix';\n\n/**\n * Adds the country code to a phone number\n *\n * @param {string} value - The phone number\n * @param {PhoneCountry} country - The country code\n * @returns {string} The phone number with the country code\n */\nexport default function removePhoneCountryCode(\n  value: string,\n  country: PhoneCountry\n): string {\n  /**\n   * The country code prefix\n   *\n   * @constant {string}\n   */\n  const countryCodePrefix = getPhoneCountryCodePrefix(country);\n\n  return value.replace(countryCodePrefix, '');\n}\n","import InputError from '@/components/atoms/InputError/InputError';\nimport { PhoneCountry } from '@/lib/constants/types/phones';\nimport addPhoneCountryCode from '@/lib/utils/helpers/phoneHelpers/addPhoneCountryCode';\nimport getPhoneCountryCodePrefix from '@/lib/utils/helpers/phoneHelpers/getPhoneCountryCodePrefix';\nimport removePhoneCountryCode from '@/lib/utils/helpers/phoneHelpers/removePhoneCountryCode';\nimport { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\nimport {\n  inputClasses,\n  inputDisabledClasses,\n  inputErrorClasses,\n  labelDisabledClasses,\n} from '../InputField/InputStyling';\n\n/**\n * IInputFieldPhone - Interface for the InputFieldPhone Component\n *\n * @interface IInputFieldPhone\n */\nexport interface IInputFieldPhone {\n  /**\n   * The countries associated with the phone number\n   *\n   * @memberof IInputFieldPhone\n   * @member {PhoneCountry} country\n   */\n  country: PhoneCountry;\n  /**\n   * The error message to display\n   *\n   * @memberof IInputFieldPhone\n   * @member {string | FieldError | undefined} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The Label of the Input\n   *\n   * @memberof IInputFieldPhone\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The Name of the Input\n   *\n   * @memberof IInputFieldPhone\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The function to call when the input value changes\n   *\n   * @memberof IInputFieldPhone\n   * @member {(value: string) => void} onChange\n   * @param {string} value - The input value\n   * @returns {void}\n   */\n  onChange: (value: string) => void;\n  /**\n   * The onBlur function\n   *\n   * @memberof IInputFieldPhone\n   * @member {() => void} [onBlur]\n   * @returns {void}\n   */\n  onBlur?: () => void;\n  /**\n   * If the input is read only\n   *\n   * @memberof IInputFieldPhone\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * If the input is required\n   *\n   * @memberof IInputFieldPhone\n   * @member {boolean} [required]\n   */\n  required?: boolean;\n  /**\n   * A phone number value for the input\n   *\n   * @memberof IInputFieldPhone\n   * @member {string} [value]\n   */\n  value?: string;\n  /**\n   * Whether to add the country code to the input value\n   *\n   * @memberof IInputFieldPhone\n   * @default false\n   * @member {boolean} [addCountryCode]\n   */\n  addCountryCode?: boolean;\n  /**\n   * Whether to format the value when calling the onChange function\n   *\n   * @memberof IInputFieldPhone\n   * @default true\n   * @member {boolean} [formatValueOnChange]\n   */\n  formatValueOnChange?: boolean;\n  /**\n   * If the error should be hidden\n   *\n   * @memberof IInputFieldPhone\n   * @default false\n   * @member {boolean} [hideError]\n   */\n  hideError?: boolean;\n  /**\n   * The optional classes to apply to the input.\n   *\n   * @memberof IInputFieldPhone\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n  /**\n   * The optional input field classes\n   *\n   * @memberof IInputFieldPhone\n   * @default ''\n   * @member {string} [inputFieldClasses]\n   */\n  inputFieldClasses?: string;\n}\n\n/**\n * Format Value Format the input value based on the pattern passed in\n *\n * @param {string} inputValue - The input value\n * @param {number[]} pattern - The pattern to use for formatting\n * @returns {void}\n */\nfunction formatValue(\n  inputValue: string,\n  pattern: [number, number, number]\n): string {\n  let formattedValue = inputValue;\n  if (\n    inputValue.length > pattern[0] &&\n    inputValue.length < pattern[0] + pattern[1] + 1\n  ) {\n    formattedValue =\n      '(' +\n      inputValue.substring(0, pattern[0]) +\n      ') ' +\n      inputValue.substring(pattern[0], inputValue.length);\n  } else if (\n    inputValue.length >= pattern[0] + pattern[1] + 1 &&\n    inputValue.length <= 10\n  ) {\n    formattedValue =\n      '(' +\n      inputValue.substring(0, pattern[0]) +\n      ') ' +\n      inputValue.substring(pattern[0], pattern[0] + pattern[1]) +\n      '-' +\n      inputValue.substring(pattern[0] + pattern[1], inputValue.length);\n  }\n\n  return formattedValue;\n}\n\n/**\n * Used as a wrapper for the formatValue function determine which country is\n * being used for the formatting process this will be called if the country or\n * strippedValue changes\n *\n * @param {string} value - The input value\n * @param {PhoneCountry} country - The country to use for formatting\n * @returns {string} The formatted value\n */\nfunction formatPhoneForCountry(value: string, country: PhoneCountry): string {\n  let formattedValue = '';\n\n  switch (country) {\n    case 'US':\n    case 'CA':\n      formattedValue = formatValue(value, [3, 3, 4]);\n      break;\n    case 'MX':\n      formattedValue = formatValue(value, [2, 4, 4]);\n      break;\n    case 'AU':\n      formattedValue = formatValue(value, [2, 4, 4]);\n      break;\n  }\n\n  return formattedValue;\n}\n\n/**\n * Strip the value of all non-numeric characters\n *\n * @param {string} value - The input value\n * @returns {string} The stripped value\n */\nexport function getStrippedValue(value: string): string {\n  if (!value) {\n    return '';\n  }\n  return value.replace(/[^0-9]/g, '');\n}\n\n/**\n * Get the formatted value based on the country\n *\n * @param {string} value - The input value\n * @param {PhoneCountry} country - The country to use for formatting\n * @returns {string} The formatted value\n */\nfunction getFormattedValue(value: string, country: PhoneCountry): string {\n  if (!value) {\n    return '';\n  }\n  const strippedValue = getStrippedValue(value);\n  const formattedValue = formatPhoneForCountry(strippedValue, country);\n\n  return formattedValue;\n}\n\n/**\n * InputFieldPhone - An input field used for phone numbers.\n *\n * @param {IInputFieldPhone} props - The props for the InputFieldPhone component\n * @returns {React.FC<IInputFieldPhone>} InputFieldPhone Component\n */\nconst InputFieldPhone = forwardRef<HTMLInputElement, IInputFieldPhone>(\n  (\n    {\n      country,\n      error,\n      label,\n      name,\n      onChange,\n      onBlur,\n      readOnly,\n      required,\n      value,\n      classes = '',\n      inputFieldClasses = '',\n      formatValueOnChange = true,\n      addCountryCode: addCountryCodeFlag = false,\n      hideError = false,\n    },\n    ref\n  ) => {\n    /**\n     * The input value\n     *\n     * @constant {string}\n     */\n    const [inputValue, setInputValue] = useState(\n      getFormattedValue(value || '', country) || ''\n    );\n    /**\n     * The input value for display. It will have the country code added before\n     * the phone number if the appropriate flag is passed, and it will be\n     * formatted according to the country\n     *\n     * @constant {string}\n     */\n    const [inputValueForDisplay, setInputValueForDisplay] = useState<string>(\n      getFormattedValue(value || '', country) || ''\n    );\n    /**\n     * The has focus state of the input field\n     *\n     * @constant {boolean}\n     */\n    const [hasFocus, setHasFocus] = useState(false);\n\n    /** Hook to update the input value when the value or country prop changes */\n    useEffect(() => {\n      setInputValue(getFormattedValue(value || '', country) || '');\n    }, [value, country]);\n\n    /**\n     * Hook to update the input value for display when the input value or\n     * related props change\n     */\n    useEffect(() => {\n      /*\n       * When the form is empty and it is not focused, we do not want to add the\n       * country code to the input value for display, so we\n       * set the input value for display to the input value (which should be\n       * empty)\n       */\n      if (!inputValue && !hasFocus) {\n        return setInputValueForDisplay(inputValue);\n      }\n      setInputValueForDisplay(\n        addCountryCodeFlag\n          ? addPhoneCountryCode(inputValue, country)\n          : inputValue\n      );\n    }, [addCountryCodeFlag, country, hasFocus, inputValue, value]);\n\n    /**\n     * Change Value Change the value of the input and call the onChange function\n     * Remove all letters and most special characters (excluding '()-') from the\n     * input value\n     *\n     * @param {React.ChangeEvent<HTMLInputElement>} event - The change event\n     */\n    const changeValue = (event: React.ChangeEvent<HTMLInputElement>) => {\n      /**\n       * The value without the country code\n       *\n       * @constant {string}\n       */\n      const valueWithoutCountryCode = removePhoneCountryCode(\n        event.target.value,\n        country\n      );\n      /**\n       * The formatted value according to the country\n       *\n       * @constant {string}\n       */\n      const formattedValue = getFormattedValue(\n        valueWithoutCountryCode,\n        country\n      );\n      setInputValue(formattedValue);\n      /*\n       * If the formatValueFlag is true, pass the formatted value to the\n       * onChange function otherwise pass the stripped value\n       */\n      onChange(\n        formatValueOnChange\n          ? formattedValue\n          : getStrippedValue(valueWithoutCountryCode)\n      );\n    };\n\n    /**\n     * Handle Blur Set the hasFocus state to false and call the onBlur function\n     *\n     * @returns {void}\n     */\n    const handleBlur = useCallback(() => {\n      setHasFocus(false);\n      onBlur?.();\n    }, [onBlur]);\n\n    // Set the default Label Class and Input Classes\n    let labelClass = '';\n    let inputClass = inputClasses;\n\n    const defaultLabelClasses = 'absolute left-0 px-3 font-petco duration-300';\n    const defaultInputClasses =\n      'w-full h-14 rounded font-petco focus:outline-none focus:ring-2 focus:ring-base-400 focus:border-invisible';\n\n    if (inputValue || hasFocus) {\n      labelClass = `pt-1.5 ${defaultLabelClasses} text-overline`;\n      inputClass = `pt-[26px] pb-1.5 ${defaultInputClasses}`;\n    } else {\n      labelClass = `py-4 ${defaultLabelClasses} text-body4`;\n      inputClass = `${defaultInputClasses}`;\n    }\n\n    if (error) {\n      inputClass = `${inputErrorClasses} ${inputClasses}`;\n      labelClass = `${labelClass} text-error-200`;\n    } else {\n      labelClass = `${labelClass} text-neutral-700`;\n    }\n\n    if (readOnly) {\n      inputClass = `${inputClass} ${inputDisabledClasses}`;\n      labelClass = `${labelClass} ${labelDisabledClasses}`;\n    }\n\n    /**\n     * The max length of the input field\n     *\n     * @constant {number}\n     */\n    const maxLength = addCountryCodeFlag\n      ? 14 + getPhoneCountryCodePrefix(country).length\n      : 14;\n\n    return (\n      <>\n        <div className={`${classes} relative`}>\n          <input\n            id={name}\n            type=\"tel\"\n            value={inputValueForDisplay}\n            aria-invalid={error ? 'true' : 'false'}\n            maxLength={maxLength}\n            onFocus={() => setHasFocus(true)}\n            onBlur={handleBlur}\n            onChange={changeValue}\n            required={required}\n            readOnly={readOnly}\n            disabled={readOnly}\n            className={`${inputClass} ${inputFieldClasses}`}\n            placeholder=\" \"\n            data-testid=\"input-field-phone\"\n            ref={ref}\n          />\n          <label htmlFor={name} className={labelClass}>\n            {label}\n          </label>\n        </div>\n        {!hideError && <InputError error={error} />}\n      </>\n    );\n  }\n);\n\nInputFieldPhone.displayName = 'InputFieldPhone';\n\nexport default InputFieldPhone;\n","import InputFieldPhone from '@/components/atoms/InputFieldPhone/InputFieldPhone';\nimport { PhoneCountry } from '@/lib/constants/types/phones';\nimport {\n  Control,\n  Controller,\n  FieldError,\n  FieldErrorsImpl,\n  Merge,\n} from 'react-hook-form';\n\n/**\n * IInputFieldPhoneGroup\n *\n * @interface IInputFieldPhoneGroup\n */\nexport interface IInputFieldPhoneGroup {\n  /**\n   * The country to be associated with the parsing of the phone number\n   *\n   * @memberof IInputFieldPhoneGroup\n   * @default 'US'\n   * @member {PhoneCountry} [country]\n   */\n  country?: PhoneCountry;\n  /**\n   * The name of the input to be used\n   *\n   * @memberof IInputFieldPhoneGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The label for the input field\n   *\n   * @memberof IInputFieldPhoneGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IInputFieldPhoneGroup\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The control function from react-hook-form\n   *\n   * @memberof IInputFieldPhoneGroup\n   * @member {Control} [control]\n   */\n  control?: Control;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IInputFieldPhoneGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n}\n\n/**\n * InputFieldPhoneGroup A group for the input field phone component\n *\n * @param {IInputFieldPhoneGroup} props - The props for the InputFieldPhoneGroup\n *   component\n * @returns {React.FC<IInputFieldPhoneGroup>} Component\n */\nconst InputFieldPhoneGroup: React.FC<IInputFieldPhoneGroup> = ({\n  name,\n  label,\n  error,\n  control,\n  country = 'US',\n  readOnly,\n}: IInputFieldPhoneGroup) => {\n  return (\n    <div data-testid=\"input-field-phone-group\">\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, ...field } }) => {\n            return (\n              <InputFieldPhone\n                country={country}\n                label={label}\n                ref={ref}\n                error={error}\n                readOnly={readOnly}\n                {...field}\n              />\n            );\n          }}\n        />\n      ) : (\n        <InputFieldPhone\n          country={country}\n          label={label}\n          name={name}\n          readOnly={readOnly}\n          onChange={() => {\n            return;\n          }}\n          error={error}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default InputFieldPhoneGroup;\n","import Icon, { IIcon } from '@/components/atoms/Icon/Icon';\nimport InputError from '@/components/atoms/InputError/InputError';\nimport { LegacyRef, useEffect, useState } from 'react';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\n\n/**\n * IInputFieldPassword\n *\n * @interface IInputFieldPassword\n */\nexport interface IInputFieldPassword {\n  /**\n   * The label of the input field\n   *\n   * @memberof IInputFieldPassword\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The name of the input field\n   *\n   * @memberof IInputFieldPassword\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The value of the input field\n   *\n   * @memberof IInputFieldPassword\n   * @member {string} [value]\n   */\n  value?: string;\n  /**\n   * The error message to display\n   *\n   * @memberof IInputFieldPassword\n   * @member {string | FieldError | undefined} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The ref of the input\n   *\n   * @memberof IInputFieldPassword\n   * @member {LegacyRef<HTMLInputElement> | undefined} [inputRef]\n   */\n  inputRef?: LegacyRef<HTMLInputElement> | undefined;\n  /**\n   * The function to call when the input value changes\n   *\n   * @memberof IInputFieldPassword\n   * @member {(value: string) => void} onChange\n   * @param value\n   * @returns {void}\n   */\n  onChange: (value: string) => void;\n  /**\n   * Whether or not this is a new password field\n   *\n   * @memberof IInputFieldPassword\n   * @member {boolean} [isNewPassword]\n   */\n  isNewPassword?: boolean;\n  /**\n   * Optional disabled property\n   *\n   * @memberof IInputFieldPassword\n   * @member {boolean} [disabled]\n   */\n  disabled?: boolean;\n}\n\n/**\n * InputFieldPassword An input field that can hide and show the password text\n *\n * @param {IInputFieldPassword} props - The props for the InputFieldPassword\n *   component\n * @returns {React.FC<IInputFieldPassword>} Component\n */\nconst InputFieldPassword: React.FC<IInputFieldPassword> = ({\n  label,\n  name,\n  value,\n  error,\n  onChange,\n  disabled,\n  isNewPassword = true,\n}: IInputFieldPassword) => {\n  const [showPassword, setShowPassword] = useState(false);\n  const [password, setPassword] = useState('');\n  const [hasFocus, setHasFocus] = useState(false);\n\n  useEffect(() => {\n    if (value) setPassword(value);\n  }, [value]);\n\n  const iconEye: IIcon = {\n    icon: 'eye',\n    size: 24,\n    colorType: 'base',\n    colorShade: 300,\n  };\n\n  const iconEyeSlash: IIcon = {\n    icon: 'eyeSlash',\n    size: 24,\n    colorType: 'base',\n    colorShade: 300,\n  };\n\n  /** UpdateShowPassword */\n  const updateShowPassword = () => {\n    setShowPassword(!showPassword);\n  };\n\n  /**\n   * Update password value\n   *\n   * @param {string} value - The value of the password\n   */\n  const updatePassword = (value: string) => {\n    setPassword(value);\n    onChange(value);\n  };\n\n  // Set the default Label Class and Input Classes\n  let labelClass = '';\n  let inputClass = '';\n  const defaultLabelClasses = 'absolute left-0 px-3 font-petco duration-300';\n  const defaultInputClasses =\n    'w-full h-14 rounded font-petco focus:outline-none focus:ring-2 focus:ring-base-400 focus:border-invisible';\n\n  if (password || hasFocus) {\n    labelClass = `pt-1.5 ${defaultLabelClasses} text-overline`;\n    inputClass = `pt-[26px] pb-1.5 ${defaultInputClasses}`;\n  } else {\n    labelClass = `py-4  ${defaultLabelClasses} text-body4`;\n    inputClass = `${defaultInputClasses}`;\n  }\n\n  if (error) {\n    inputClass = `${inputClass} border-error-200`;\n    labelClass = `${labelClass} text-error-200`;\n  } else {\n    labelClass = `${labelClass} text-neutral-700`;\n  }\n\n  return (\n    <div data-testid=\"input-field-password\" className=\"relative\">\n      <input\n        id={name}\n        data-testid=\"input-field-password-input\"\n        type={showPassword ? 'text' : 'password'}\n        onFocus={() => setHasFocus(true)}\n        onBlur={() => setHasFocus(false)}\n        name={name}\n        value={password}\n        onChange={(e) => {\n          updatePassword(e.target.value);\n        }}\n        autoComplete={isNewPassword ? 'new-password' : 'current-password'}\n        className={inputClass}\n        disabled={disabled}\n      />\n      <label htmlFor={name} className={labelClass}>\n        {label}\n      </label>\n      <button\n        data-testid=\"input-field-password-button\"\n        onClick={() => updateShowPassword()}\n        className=\"absolute right-2.5 top-4 transform z-[2]\"\n        type=\"button\"\n        disabled={disabled}\n      >\n        {showPassword ? (\n          <Icon\n            {...iconEye}\n            size={iconEye.size}\n            colorType={iconEye.colorType}\n            colorShade={iconEye.colorShade}\n          />\n        ) : (\n          <Icon\n            {...iconEyeSlash}\n            size={iconEyeSlash.size}\n            colorType={iconEyeSlash.colorType}\n            colorShade={iconEyeSlash.colorShade}\n          />\n        )}\n      </button>\n\n      <InputError error={error} />\n    </div>\n  );\n};\n\nexport default InputFieldPassword;\n","import InputFieldPassword from '@/components/atoms/InputFieldPassword/InputFieldPassword';\nimport {\n  Control,\n  Controller,\n  FieldError,\n  FieldErrorsImpl,\n  Merge,\n} from 'react-hook-form';\n\n/**\n * IInputPasswordGroup\n *\n * @interface IInputPasswordGroup\n */\nexport interface IInputPasswordGroup {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IInputPasswordGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The label for the input field.\n   *\n   * @memberof IInputPasswordGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IInputPasswordGroup\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The control function from react-hook-form\n   *\n   * @memberof IInputPasswordGroup\n   * @member {Control} [control]\n   */\n  control?: Control;\n  /**\n   * Whether or not this is a new password\n   *\n   * @memberof IInputPasswordGroup\n   * @member {boolean} [isNewPassword]\n   */\n  isNewPassword?: boolean;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IInputPasswordGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n}\n\n/**\n * InputPasswordGroup A group to use password in react hook form\n *\n * @param {IInputPasswordGroup} props - The props for the InputPasswordGroup\n *   component\n * @returns {React.FC<IInputPasswordGroup>} Component\n */\nconst InputPasswordGroup: React.FC<IInputPasswordGroup> = ({\n  name,\n  label,\n  error,\n  control,\n  isNewPassword,\n  readOnly,\n}: IInputPasswordGroup) => {\n  return (\n    <div data-testid=\"input-password-group\">\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, ...field } }) => {\n            return (\n              <InputFieldPassword\n                label={label}\n                inputRef={ref}\n                error={error}\n                isNewPassword={isNewPassword}\n                disabled={readOnly}\n                {...field}\n              />\n            );\n          }}\n        />\n      ) : (\n        <InputFieldPassword\n          label={label}\n          name={name}\n          error={error}\n          isNewPassword={isNewPassword}\n          disabled={readOnly}\n          onChange={() => {\n            return;\n          }}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default InputPasswordGroup;\n","import InputTextArea from '@/components/atoms/InputTextArea/InputTextArea';\nimport {\n  Control,\n  Controller,\n  FieldError,\n  FieldErrorsImpl,\n  Merge,\n} from 'react-hook-form';\n\n/**\n * IInputTextAreaGroup - The props for the Input Text Area Group\n *\n * @interface IInputTextAreaGroup\n */\nexport interface IInputTextAreaGroup {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IInputTextAreaGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The number of rows for the input text area.\n   *\n   * @memberof IInputTextAreaGroup\n   * @default 5\n   * @member {number} [rows]\n   */\n  rows?: number;\n  /**\n   * The error object from react-hook-form\n   *\n   * @memberof IInputTextAreaGroup\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * The label text for the input text area.\n   *\n   * @memberof IInputTextAreaGroup\n   * @default ''\n   * @member {string} [label]\n   */\n  label?: string;\n  /**\n   * The optional classes for the wrapper div.\n   *\n   * @memberof IInputTextAreaGroup\n   * @default ''\n   * @member {string} [wrapperClasses]\n   */\n  wrapperClasses?: string;\n  /**\n   * The control function from react-hook-form\n   *\n   * @memberof IInputTextAreaGroup\n   * @member {Control} [control]\n   */\n  control?: Control;\n  /**\n   * The Upper label text of the text area input\n   *\n   * @memberof IInputTextAreaGroup\n   * @default ''\n   * @member {string} [upperLabel]\n   */\n  upperLabel?: string;\n  /**\n   * Uses a floating label that shrinks when input is focused or not empty.\n   *\n   * @memberof IInputTextAreaGroup\n   * @member {boolean} [floatingLabel]\n   */\n  floatingLabel?: boolean;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IInputTextAreaGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n}\n\n/**\n * Input Text Area Group Used to display a label, input text area, and error\n * message for a form input. Should be used with react-hook-form.\n *\n * @param {IInputTextAreaGroup} props - The props for the Input Text Area Group\n * @returns {React.FC<IInputTextAreaGroup>} Input Text Area Group Component\n */\nconst InputTextAreaGroup: React.FC<IInputTextAreaGroup> = ({\n  name,\n  rows = 5,\n  error,\n  label = '',\n  wrapperClasses = '',\n  control,\n  upperLabel = '',\n  floatingLabel,\n  readOnly,\n  ...rest\n}: IInputTextAreaGroup) => {\n  return (\n    <div data-testid=\"input-text-area-group\" className={wrapperClasses}>\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, ...field } }) => {\n            return (\n              <InputTextArea\n                inputRef={ref}\n                rows={rows}\n                label={label}\n                error={error}\n                upperLabel={upperLabel}\n                floatingLabel={floatingLabel}\n                readOnly={readOnly}\n                {...field}\n                {...rest}\n              />\n            );\n          }}\n        />\n      ) : (\n        <InputTextArea\n          onChange={() => {\n            return;\n          }}\n          rows={rows}\n          name={name}\n          label={label}\n          upperLabel={upperLabel}\n          floatingLabel={floatingLabel}\n          error={error}\n          {...rest}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default InputTextAreaGroup;\n","import InputLabel from '@/components/atoms/InputLabel/InputLabel';\nimport { Switch } from '@headlessui/react';\nimport { Ref, useEffect, useState } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * IInputToggle - Interface for the Input Toggle Component\n *\n * @interface IInputToggle\n */\nexport interface IInputToggle {\n  /**\n   * The value of the input toggle\n   *\n   * @memberof IInputToggle\n   * @default true\n   * @member {boolean} [value]\n   */\n  value?: boolean;\n  /**\n   * The label for the screen reader aria label\n   *\n   * @memberof IInputToggle\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The name of the input\n   *\n   * @memberof IInputToggle\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The function to call when the toggle is changed\n   *\n   * @memberof IInputToggle\n   * @member {(value: boolean) => void} onChange\n   */\n  onChange: (value: boolean) => void;\n  /**\n   * The classes for the input field.\n   *\n   * @memberof IInputToggle\n   * @member {string} [classes]\n   */\n  classes?: string;\n  /**\n   * The ref for the input field.\n   *\n   * @memberof IInputToggle\n   * @member {Ref<HTMLButtonElement> | undefined} [inputRef]\n   */\n  inputRef?: Ref<HTMLButtonElement> | undefined;\n}\n/**\n * Input Toggle An Input Toggle For Form Inputs\n *\n * @param {IInputToggle} props - The props for the Input Toggle Component\n * @returns {React.FC<IInputToggle>} Input Toggle Component\n */\nconst InputToggle: React.FC<IInputToggle> = ({\n  value = true,\n  name,\n  label,\n  onChange,\n  classes = '',\n}: IInputToggle) => {\n  const [inputValue, setInputValue] = useState<boolean>(value);\n\n  useEffect(() => {\n    setInputValue(value);\n    changeValue(value);\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  /**\n   * Change Value Change the value of the input and call the onChange function\n   *\n   * @param {boolean} event - The event from the input\n   * @returns {void}\n   */\n  const changeValue = (event: boolean) => {\n    setInputValue(event);\n\n    onChange(event);\n  };\n\n  return (\n    <div\n      data-testid=\"input-toggle-group\"\n      className={\n        'flex mt-3 mb-3 w-full justify-between items-center ' + classes\n      }\n    >\n      <InputLabel name={name} classes=\"mr-3 text-body4 font-petco\">\n        {label} {inputValue ? 'on' : 'off'}\n      </InputLabel>\n      <Switch\n        data-testid=\"input-toggle\"\n        name={name}\n        checked={inputValue}\n        onChange={changeValue}\n        className={twMerge(\n          inputValue ? 'bg-base-300' : 'bg-neutral-400',\n          'relative inline-flex h-7 w-[52px] items-center rounded-full',\n          classes\n        )}\n      >\n        <span className=\"sr-only\">{label}</span>\n        <span\n          className={twMerge(\n            inputValue ? 'translate-x-[27px]' : 'translate-x-[3px]',\n            'inline-block h-[22px] w-[22px] transform rounded-full bg-neutral-100 transition'\n          )}\n        />\n      </Switch>\n    </div>\n  );\n};\n\nexport default InputToggle;\n","import InputToggle from '@/components/atoms/InputToggle/InputToggle';\nimport React from 'react';\nimport { Control, Controller } from 'react-hook-form';\n/**\n * IInputToggleGroup\n *\n * @interface IInputToggleGroup\n */\nexport interface IInputToggleGroup {\n  /**\n   * React Hook Form Control Object\n   *\n   * @memberof IInputToggleGroup\n   * @member {Control} [control]\n   */\n  control?: Control;\n  /**\n   * The label for the screen reader aria label\n   *\n   * @memberof IInputToggleGroup\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The name of the input field.\n   *\n   * @memberof IInputToggleGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The value passed down\n   *\n   * @memberof IInputToggleGroup\n   * @member {boolean} [value]\n   */\n  value?: boolean;\n  /**\n   * The optional classes to be applied to the component.\n   *\n   * @memberof IInputToggleGroup\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n}\n\n/**\n * Input Toggle Group A Toggle Group For Form Inputs With A Label It is\n * recommended to use this component with react-hook-form\n *\n * @param {IInputToggleGroup} props - The props for the Input Toggle Group\n * @returns {React.FC<IInputToggleGroup>} Input Toggle Group Component\n */\nconst InputToggleGroup: React.FC<IInputToggleGroup> = ({\n  control,\n  name,\n  label,\n  classes = '',\n  value,\n}: IInputToggleGroup) => {\n  return (\n    <div\n      data-testid=\"input-toggle-group-wrapper\"\n      className={'flex w-full ' + classes}\n    >\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, ...field } }) => {\n            return (\n              <InputToggle\n                label={label}\n                {...field}\n                inputRef={ref}\n                value={value}\n              />\n            );\n          }}\n        />\n      ) : (\n        <InputToggle\n          label={label}\n          value={value}\n          name={name}\n          onChange={() => {\n            return;\n          }}\n          data-testid=\"input-toggle\"\n        />\n      )}\n    </div>\n  );\n};\n\nexport default InputToggleGroup;\n","import Button from '@/components/atoms/Button/Button';\nimport Icon from '@/components/atoms/Icon/Icon';\nimport Loading from '@/components/molecules/Loading/Loading';\nimport { createRef, RefObject } from 'react';\nimport Cropper, { ReactCropperElement } from 'react-cropper';\n\n/**\n * ImageMime Type\n *\n * @type {ImageMime} Available Image Mime Types for Cropper\n */\nexport type ImageMime = 'image/png' | 'image/jpeg' | 'image/gif';\n\n/**\n * ICropperAction\n *\n * @interface ICropperAction\n */\ninterface ICropperAction {\n  /**\n   * The cropper element.\n   *\n   * @memberof ICropperAction\n   * @member {RefObject<ReactCropperElement>} cropperRef\n   */\n  cropperRef: RefObject<ReactCropperElement>;\n}\n\n/**\n * ICropImage Interface for our crop image function.\n *\n * @augments ICropperAction\n * @interface ICropImage\n */\nexport interface ICropImage extends ICropperAction {\n  /**\n   * The quality of the image to be cropped. 0.1 - 1.\n   *\n   * @memberof ICropImage\n   * @member {number} quality\n   */\n  quality: number;\n  /**\n   * The output type of the image to be cropped.\n   *\n   * @memberof ICropImage\n   * @member {ImageMime} outputType\n   */\n  outputType: ImageMime;\n}\n\n/**\n * IRotate Interface for our rotate image function.\n *\n * @augments ICropperAction Interface for our rotate image function.\n * @interface IRotate\n */\ninterface IRotate extends ICropperAction {\n  /**\n   * The Degrees to rotate the image by. ie 90, -90\n   *\n   * @memberof IRotate\n   * @member {number} degree\n   */\n  degree: number;\n}\n\n/**\n * Rotate Rotates the image by specified degrees\n *\n * @param {IRotate} props - The Props of the Rotate function.\n */\nexport const rotate = ({ cropperRef, degree }: IRotate) => {\n  const cropper = cropperRef?.current?.cropper;\n  if (cropper) {\n    cropper.rotate(degree);\n  }\n};\n\n/**\n * IZoom Interface for our zoom image function.\n *\n * @augments ICropperAction\n * @interface IZoom\n */\ninterface IZoom extends ICropperAction {\n  /**\n   * The amount to zoom the image by.\n   *\n   * @memberof IZoom\n   * @member {number} amount\n   */\n  amount: number;\n}\n\n/**\n * Zoom Zooms the image by specified amount\n *\n * @param {IZoom} props - The Interface of the Zoom function.\n */\nexport const zoom = ({ cropperRef, amount }: IZoom) => {\n  const cropper = cropperRef?.current?.cropper;\n  if (cropper) {\n    cropper.zoom(amount);\n  }\n};\n\n/**\n * IImageCropper Interface for our Image Cropper Component.\n *\n * @interface IImageCropper\n */\nexport interface IImageCropper {\n  /**\n   * The image url of the image to be cropped.\n   *\n   * @memberof IImageCropper\n   * @member {string} image\n   */\n  image: string;\n  /**\n   * The function to be called when the image is cropped.\n   *\n   * @memberof IImageCropper\n   * @member {Function} onCrop\n   * @param {ICropImage} props - The Props of the Crop Image function.\n   * @returns {Promise<void>} Crop Image Function\n   */\n  onCrop: ({ cropperRef, quality, outputType }: ICropImage) => Promise<void>;\n  /**\n   * The quality of the image to be cropped. 0.1 - 1.\n   *\n   * @memberof IImageCropper\n   * @member {number} quality\n   */\n  quality: number;\n  /**\n   * The output type of the image to be cropped.\n   *\n   * @memberof IImageCropper\n   * @member {ImageMime} outputType\n   */\n  outputType: ImageMime;\n  /**\n   * The optional function to be called when the image is reuploaded from the\n   * Icon.\n   *\n   * @memberof IImageCropper\n   * @member {Function} [onChangeImage]\n   */\n  onChangeImage?: () => void;\n  /**\n   * The aspect ratio of the image to be cropped.\n   *\n   * @memberof IImageCropper\n   * @member {number} [aspectRatio]\n   */\n  aspectRatio?: number;\n  /**\n   * The optional boolean to disable the submit button.\n   *\n   * @memberof IImageCropper\n   * @default false\n   * @member {boolean} [buttonDisabled]\n   */\n  buttonDisabled?: boolean;\n  /**\n   * The optional boolean to show the loading spinner.\n   *\n   * @memberof IImageCropper\n   * @default false\n   * @member {boolean} [isLoading]\n   */\n  isLoading?: boolean;\n  /**\n   * The label of the submit button\n   *\n   * @memberof IImageCropper\n   * @default 'Continue'\n   * @member {string} [submitLabel]\n   */\n  submitLabel?: string;\n  /**\n   * The optional classes to be applied to the component.\n   *\n   * @memberof IImageCropper\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n}\n\n/**\n * Image Cropper Image Cropper component is used to crop an image.\n *\n * @param {IImageCropper} props - The props of the Image Cropper Component.\n * @returns {React.FC<IImageCropper>} Image Cropper Component\n */\nconst ImageCropper: React.FC<IImageCropper> = ({\n  image,\n  quality,\n  outputType,\n  aspectRatio = 1 / 1,\n  buttonDisabled = false,\n  onCrop,\n  onChangeImage,\n  submitLabel = 'Continue',\n  isLoading,\n  classes = '',\n}: IImageCropper) => {\n  const cropperRef = createRef<ReactCropperElement>();\n  return (\n    <div\n      data-testid=\"image-cropper\"\n      className={`flex flex-col items-center justify-center w-full h-full mx-auto ${classes}`}\n    >\n      {!isLoading ? (\n        <>\n          <div className=\"flex flex-col items-center justify-center mx-auto rounded-2xl object-fit overflow-hidden w-full\">\n            <Cropper\n              src={image}\n              alt=\"Image Cropper\"\n              className=\"object-fit w-full rounded-2xl overflow-hidden\"\n              initialAspectRatio={aspectRatio}\n              aspectRatio={aspectRatio}\n              responsive={true}\n              guides={false}\n              ref={cropperRef}\n              dragMode=\"move\"\n              viewMode={2}\n            />\n          </div>\n          <div className=\"flex justify-center space-x-8 mt-4 sm:space-x-10 sm:mt-6\">\n            <button\n              type=\"button\"\n              onClick={() => rotate({ cropperRef, degree: 90 })}\n              data-testid=\"image-cropper-rotate\"\n              className=\"text-neutral-800 hover:text-base-300\"\n            >\n              <Icon icon=\"rotate\" size={24} />\n              <span className=\"sr-only\">Rotate Right</span>\n            </button>\n            <button\n              type=\"button\"\n              onClick={() => zoom({ cropperRef, amount: -0.1 })}\n              data-testid=\"image-cropper-zoom-out\"\n              className=\"text-neutral-800 hover:text-base-300\"\n            >\n              <Icon icon=\"minimize\" size={24} />\n              <span className=\"sr-only\">Zoom Out</span>\n            </button>\n            <button\n              type=\"button\"\n              onClick={() => zoom({ cropperRef, amount: 0.1 })}\n              data-testid=\"image-cropper-zoom-in\"\n              className=\"text-neutral-800 hover:text-base-300\"\n            >\n              <Icon icon=\"maximize\" size={24} />\n              <span className=\"sr-only\">Zoom In</span>\n            </button>\n\n            <button\n              type=\"button\"\n              onClick={() => onChangeImage && onChangeImage()}\n              data-testid=\"image-cropper-change-image\"\n              className=\"text-neutral-800 hover:text-base-300\"\n            >\n              <Icon icon=\"reupload\" size={24} />\n              <span className=\"sr-only\">Change Image</span>\n            </button>\n          </div>\n          <div className=\"flex justify-center mt-6 sm:mt-9 md:mt-8\">\n            <Button\n              type=\"button\"\n              size=\"md\"\n              color=\"primary\"\n              variant=\"light\"\n              disabled={buttonDisabled}\n              onClick={() => onCrop({ cropperRef, quality, outputType })}\n            >\n              {submitLabel}\n            </Button>\n          </div>\n        </>\n      ) : (\n        <div\n          data-testid=\"image-uploader-handler-loading\"\n          className=\"flex flex-col border-2 items-center justify-center border-neutral-300 rounded-2xl gap-y-4 w-full h-full object-fit\"\n        >\n          <Loading title=\"Processing image\" size={24} />\n        </div>\n      )}\n    </div>\n  );\n};\n\nexport default ImageCropper;\n","import CdnImage from '@/component-library/atoms/CdnImage/CdnImage';\nimport Icon from '@/components/atoms/Icon/Icon';\n\n/**\n * IImageDisplayUpload\n *\n * @interface IImageDisplayUpload\n */\nexport interface IImageDisplayUpload {\n  /**\n   * The Image to Display\n   *\n   * @memberof IImageDisplayUpload\n   * @member {string} image\n   */\n  image: string;\n  /**\n   * On Change Function\n   *\n   * @memberof IImageDisplayUpload\n   * @member {Function} onChange\n   * @param {File | string} image - The image to change to\n   * @returns {void}\n   */\n  onChange: (image: File | string) => void;\n}\n\n/**\n * ImageDisplayUpload An image that is a button used for uploading and\n * displaying photo\n *\n * @param {IImageDisplayUpload} props - The props for the ImageDisplayUpload\n *   component\n * @returns {React.FC<IImageDisplayUpload>} Component\n */\nconst ImageDisplayUpload: React.FC<IImageDisplayUpload> = ({\n  image,\n  onChange,\n}: IImageDisplayUpload) => {\n  /** @returns {void} */\n  const handleClick = () => {\n    document.getElementById('photoUpload')?.click();\n  };\n\n  /**\n   * @param {React.ChangeEvent} event - The event that is triggered when the\n   *   input changes\n   * @returns {void}\n   */\n  const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n    if (event.target.files) {\n      onChange(event.target.files[0]);\n    }\n  };\n  return (\n    <div data-testid=\"image-display-upload\" className=\"relative\">\n      <button\n        type=\"button\"\n        onClick={() => handleClick()}\n        className=\"w-full rounded-xl bg-black relative aspect-square\"\n        data-testid=\"image-display-upload-button\"\n      >\n        <CdnImage\n          src={image}\n          alt=\"Pet Photo\"\n          layout=\"fill\"\n          objectFit=\"cover\"\n          className=\"rounded-xl opacity-75\"\n          priority\n          sizes=\"(max-width: 739px) 100vw, (max-width: 1199px) 66vw, 450px\"\n        />\n      </button>\n      <div className=\"absolute top-0 left-0 w-full h-full flex items-center justify-center pointer-events-none\">\n        <Icon icon=\"camera\" size={32} colorType=\"base\" colorShade={100} />\n      </div>\n      <input\n        data-testid=\"file-upload-input\"\n        id=\"photoUpload\"\n        type=\"file\"\n        accept=\"image/png, image/jpeg\"\n        onChange={handleChange}\n        className=\"hidden\"\n        multiple={false}\n      />\n    </div>\n  );\n};\n\nexport default ImageDisplayUpload;\n","import { IGetImageInferenceRequestData } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/pet/interfaces';\nimport { sdk } from '../../common';\n\n/**\n * The valid interface for the species data\n *\n * @interface ISpeciesData\n */\nexport interface ISpeciesData {\n  /** The species of the pet */\n  species: string;\n}\n\n/**\n * @param {IGetImageInferenceRequestData} data - The request data\n * @returns {Promise<ISpeciesData>} - The response\n */\nexport async function getSpecies(\n  data: IGetImageInferenceRequestData\n): Promise<ISpeciesData> {\n  try {\n    const species = await sdk.inferSpecies().infer(data);\n    return species.data;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n","/**\n * Converts a file to base64.\n *\n * @param {File} file - The file to convert.\n * @returns {Promise<string | ArrayBuffer | null>} The base64 string.\n */\nconst fileToDataUrl = async (\n  file: File\n): Promise<string | ArrayBuffer | null> => {\n  return new Promise((resolve, reject) => {\n    const reader = new FileReader();\n\n    /** When the file is read, resolve the promise with the result. */\n    reader.onload = () => {\n      const base64String = reader.result;\n      resolve(base64String);\n    };\n\n    /** If there's an error reading the file, reject the promise. */\n    reader.onerror = () => {\n      reject(new Error('Unable to read the file as base64.'));\n    };\n\n    reader.readAsDataURL(file);\n  });\n};\n\nexport default fileToDataUrl;\n","import ImageCropper, {\n  ICropImage,\n} from '@/components/molecules/ImageCropper/ImageCropper';\nimport ImageDisplayUpload from '@/components/molecules/ImageDisplayUpload/ImageDisplayUpload';\nimport {\n  IOnCropFunctionResults,\n  OnCropFunction,\n} from '@/components/organisms/ImageUploadHandler/ImageUploadHandler';\nimport { getSpecies } from '@/lib/dataSource/lostApi/pet/inferSpecies/getSpecies';\nimport { uploadImageDataURL } from '@/lib/dataSource/lostApi/upload/imageUpload';\nimport { ToastType, useToastContext } from '@/lib/hooks/toasts/Toast';\nimport fileToDataUrl from '@/lib/utils/helpers/fileHelpers/fileToDataUrl';\nimport generateImageUrl from '@/lib/utils/helpers/photoHelpers/generateImageUrl';\nimport { useEffect, useState } from 'react';\n\n/**\n * IImageDisplayCropperWrapper\n *\n * @interface IImageDisplayCropperWrapper\n */\nexport interface IImageDisplayCropperWrapper {\n  /**\n   * Pet Image\n   *\n   * @memberof IImageDisplayCropperWrapper\n   * @member {string} image\n   */\n  image: string;\n  /**\n   * The optional callback function to be called when the image is cropped.\n   *\n   * @memberof IImageDisplayCropperWrapper\n   * @member {OnCropFunction} [onCrop]\n   */\n  onCrop?: OnCropFunction;\n}\n\n/**\n * ImageDisplayCropperWrapper A wrapper for the ImageDisplayUpload and\n * ImageCropper components\n *\n * @param {IImageDisplayCropperWrapper} props - The props for the\n *   ImageDisplayCropperWrapper component\n * @returns {React.FC<IImageDisplayCropperWrapper>} Component\n */\nconst ImageDisplayCropperWrapper: React.FC<IImageDisplayCropperWrapper> = ({\n  image,\n  onCrop,\n}: IImageDisplayCropperWrapper) => {\n  const [useImage, setUseImage] = useState<string>(image);\n  const [showCropper, setShowCropper] = useState<boolean>(false);\n  useState<boolean>(false);\n  const [cropperLoading, setCropperLoading] = useState<boolean>(false);\n\n  const { dispatch } = useToastContext();\n\n  useEffect(() => {\n    setUseImage(image);\n  }, [image]);\n\n  /**\n   * Handles the toast\n   *\n   * @param {ToastType} type - The type of toast\n   * @param {string} message - The message of the toast\n   * @returns {void} - The toast\n   */\n  const handleToast = (type: ToastType, message: string): void => {\n    dispatch({\n      type: 'ADD_TOAST',\n      toast: {\n        id: '1',\n        type: type,\n        message: message,\n        persistent: false,\n        showIcon: true,\n      },\n    });\n  };\n\n  /**\n   * Crop Image Crops the Image and returns the cropped image back in a dataURL\n   * format.\n   *\n   * @param {ICropImage} props - The props of the ImageCropper.\n   */\n  const cropImage = async ({\n    cropperRef,\n    quality,\n    outputType,\n  }: ICropImage): Promise<void> => {\n    const cropper = cropperRef?.current?.cropper;\n\n    if (cropper) {\n      setCropperLoading(true);\n      const dataURL = cropper\n        .getCroppedCanvas()\n        ?.toDataURL(outputType, quality);\n      const uploadedImages = await uploadImageDataURL(dataURL);\n      const { objectKey } = uploadedImages[0];\n\n      const { species } = await getSpecies({ objectKey: objectKey });\n\n      if (\n        species.toLocaleLowerCase() !== 'dog' &&\n        species.toLocaleLowerCase() !== 'cat'\n      ) {\n        handleToast(\n          'error',\n          'Unable to detect a cat or dog. Please use a different photo.'\n        );\n        /** Update back use to image provided in props */\n        setUseImage(image);\n\n        setCropperLoading(false);\n      } else {\n        /**\n         * At this point we can be sure that onCrop will be called with species:\n         * 'Dog' | 'Cat' only\n         */\n        const onCropParams = { objectKey, species } as IOnCropFunctionResults;\n        setUseImage(generateImageUrl(objectKey));\n        onCrop && onCrop(onCropParams);\n      }\n      setShowCropper(false);\n    }\n  };\n\n  /**\n   * @param {Image[]} file - The files that were accepted.\n   * @returns {Promise<void>}\n   */\n  const handleUpload = async (file: File | string): Promise<void> => {\n    setCropperLoading(false);\n\n    if (typeof file === 'string') {\n      setUseImage(file);\n      setShowCropper(true);\n      return;\n    }\n    const base64Image = await fileToDataUrl(file);\n\n    if (typeof base64Image === 'string') {\n      setUseImage(base64Image);\n      setShowCropper(true);\n    }\n  };\n\n  return (\n    <div\n      data-testid=\"image-display-cropper-wrapper\"\n      className=\"w-full aspect-square justify-center\"\n    >\n      {showCropper ? (\n        <ImageCropper\n          image={useImage}\n          quality={1}\n          outputType=\"image/jpeg\"\n          aspectRatio={1 / 1}\n          onChangeImage={() => {\n            setShowCropper(false);\n          }}\n          onCrop={cropImage}\n          isLoading={cropperLoading}\n          classes=\"w-full h-full aspect-square justify-center\"\n        />\n      ) : (\n        <ImageDisplayUpload image={useImage} onChange={handleUpload} />\n      )}\n    </div>\n  );\n};\n\nexport default ImageDisplayCropperWrapper;\n","import ImageDisplayCropperWrapper, {\n  IImageDisplayCropperWrapper,\n} from '@/components/organisms/ImageDisplayCropperWrapper/ImageDisplayCropperWrapper';\nimport { Control, Controller } from 'react-hook-form';\n\n/**\n * IImageDisplayCropperWrapperGroup\n *\n * @augments IImageDisplayCropperWrapper\n * @interface IImageDisplayCropperWrapperGroup\n */\nexport interface IImageDisplayCropperWrapperGroup\n  extends IImageDisplayCropperWrapper {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IImageDisplayCropperWrapperGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The control function from react-hook-form\n   *\n   * @memberof IImageDisplayCropperWrapperGroup\n   * @member {Control} [control]\n   */\n  control?: Control;\n}\n\n/**\n * ImageDisplayCropperWrapperGroup A controlled Image Display Cropper\n *\n * @param {IImageDisplayCropperWrapperGroup} props - The props for the\n *   ImageDisplayCropperWrapperGroup component\n * @returns {React.FC<IImageDisplayCropperWrapperGroup>} Component\n */\nconst ImageDisplayCropperWrapperGroup: React.FC<\n  IImageDisplayCropperWrapperGroup\n> = ({ name, control, ...rest }: IImageDisplayCropperWrapperGroup) => {\n  return (\n    <div data-testid=\"image-display-cropper-group\">\n      {/* Look for the Control - Mainly for displaying out in Storybook */}\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field }) => (\n            <ImageDisplayCropperWrapper {...rest} onCrop={field.onChange} />\n          )}\n        />\n      ) : (\n        <ImageDisplayCropperWrapper {...rest} />\n      )}\n    </div>\n  );\n};\n\nexport default ImageDisplayCropperWrapperGroup;\n","import Heading from '@/components/atoms/Heading/Heading';\nimport Icon from '@/components/atoms/Icon/Icon';\nimport Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport { useDropzone } from 'react-dropzone';\n\n/**\n * IImageUploader Interface for Image Uploader Component\n *\n * @interface IImageUploader\n */\nexport interface IImageUploader {\n  /**\n   * @memberof IImageUploader\n   * @member {Function} onDrop - The function to call when a file is dropped.\n   * @param {Image[]} acceptedFiles - The files that were accepted.\n   * @returns {Promise<void>}\n   */\n  onDrop: (acceptedFiles: File[]) => Promise<void>;\n}\n\n/**\n * Image Uploader Image Uploader Component\n *\n * @param {IImageUploader} props - The props for the Image Uploader Component\n * @returns {React.FC<IImageUploader>} Image Uploader Component\n */\nconst ImageUploader: React.FC<IImageUploader> = ({\n  onDrop,\n}: IImageUploader) => {\n  /** Drop Zone Setup ref: https://react-dropzone.js.org/ */\n  const { getRootProps, getInputProps, isDragActive } = useDropzone({\n    accept: {\n      'image/jpg': ['.jpg', '.jpeg'],\n      'image/png': ['.png'],\n      'image/gif': ['.gif'],\n    },\n    multiple: false,\n    onDrop: onDrop,\n  });\n\n  const dragActiveStyles = isDragActive ? 'bg-base-100 border-base-100' : '';\n\n  return (\n    <div data-testid=\"image-uploader\" className=\"text-center\">\n      <div\n        data-testid=\"image-uploader-dropzone\"\n        {...getRootProps({\n          className: `flex flex-col border-2 items-center justify-center border-neutral-300 max-w-full w-[327px] h-[217px] sm:w-[680px] sm:h-[450px] md:w-[432px] md:h-72 mx-auto mb-8 rounded-2xl cursor-pointer dropzone transition hover:bg-base-100 hover:border-base-100 ${dragActiveStyles}`,\n        })}\n      >\n        <input {...getInputProps()} data-testid=\"image-uploader-input\" />\n        <Icon\n          icon=\"uploadOutline\"\n          size={65}\n          colorType=\"base\"\n          colorShade={300}\n        />\n        <Heading size=\"h5\">Photo Upload</Heading>\n        <Paragraph size=\"overline\" className=\"text-neutral-600 hidden md:block\">\n          Drag and drop to upload or{' '}\n          <span className=\"underline text-neutral-600\">browse</span>\n        </Paragraph>\n        <Paragraph size=\"overline\" className=\"text-neutral-600 md:hidden\">\n          Click to add a pet photo from your device\n        </Paragraph>\n      </div>\n    </div>\n  );\n};\n\nexport default ImageUploader;\n","import ImageCropper, {\n  ICropImage,\n  ImageMime,\n} from '@/components/molecules/ImageCropper/ImageCropper';\nimport ImageUploader from '@/components/molecules/ImageUploader/ImageUploader';\nimport { uploadImageDataURL } from '@/lib/dataSource/lostApi/upload/imageUpload';\nimport { useState } from 'react';\n\nimport { InferredSpecies } from '@/lib/constants/types/pets';\nimport { getSpecies } from '@/lib/dataSource/lostApi/pet/inferSpecies/getSpecies';\nimport { ToastType, useToastContext } from '@/lib/hooks/toasts/Toast';\nimport fileToDataUrl from '@/lib/utils/helpers/fileHelpers/fileToDataUrl';\nimport { ICreatePhotoUploadPresignedItem } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/photoUpload/interfaces';\n\n/**\n * The allowed species\n *\n * @constant {string[]}\n */\nconst allowedSpecies = ['dog', 'cat'];\n\n/**\n * IOnCropFunctionResults Interface for the On Crop Function Params\n *\n * @interface IOnCropFunctionResults\n */\nexport interface IOnCropFunctionResults {\n  /**\n   * The uploaded image objectKey\n   *\n   * @memberof IOnCropFunctionResults\n   * @member {string} objectKey\n   */\n  objectKey: string;\n  /**\n   * The inferred species\n   *\n   * @memberof IOnCropFunctionResults\n   * @member {InferredSpecies} species\n   */\n  species: InferredSpecies;\n}\n\n/**\n * OnCropFunction Type for the On Crop Function\n *\n * @typedef {Function} OnCropFunction\n */\nexport type OnCropFunction = (params: IOnCropFunctionResults) => void;\n\n/**\n * IImageCropperProps Interface for the Image Cropper component\n *\n * @interface IImageCropperProps\n */\ninterface IImageCropperProps {\n  /**\n   * The quality of the image to be cropped. 0.1 - 1.\n   *\n   * @memberof IImageCropperProps\n   * @member {number} quality\n   */\n  quality: number;\n  /**\n   * The output type of the image to be cropped.\n   *\n   * @memberof IImageCropperProps\n   * @member {ImageMime} outputType\n   */\n  outputType: ImageMime;\n  /**\n   * The function to be called when the image is reuploaded from the Icon.\n   *\n   * @memberof IImageCropperProps\n   * @member {() => void} [onChangeImage]\n   */\n  onChangeImage?: () => void;\n  /**\n   * The aspect ratio of the image to be cropped.\n   *\n   * @memberof IImageCropperProps\n   * @member {number} [aspectRatio]\n   */\n  aspectRatio?: number;\n  /**\n   * The label of the submit button\n   *\n   * @memberof IImageCropperProps\n   * @default 'Continue'\n   * @member {string} [submitLabel]\n   */\n  submitLabel?: string;\n}\n\n/**\n * IImageUploadHandler Interface for the Image Upload Handler\n *\n * @augments IImageCropperProps\n * @interface IImageUploadHandler\n */\nexport interface IImageUploadHandler extends IImageCropperProps {\n  /**\n   * The optional image to be cropped\n   *\n   * @memberof IImageUploadHandler\n   * @default ''\n   * @member {string} [uploadedImage]\n   */\n  uploadedImage?: string;\n  /**\n   * The optional callback function to be called when the image is cropped.\n   *\n   * @memberof IImageUploadHandler\n   * @member {OnCropFunction} [onCrop]\n   */\n  onCrop?: OnCropFunction;\n  /**\n   * What to do when a file is uploaded.\n   *\n   * @memberof IImageUploadHandler\n   * @member {(objectKey: string) => void} [onUploadComplete]\n   */\n  onUploadComplete?: (objectKey: string) => void;\n  /**\n   * The optional max height of the image to be cropped.\n   *\n   * @memberof IImageUploadHandler\n   * @default 1200\n   * @member {number} [maxHeight]\n   */\n  maxHeight?: number;\n  /**\n   * The optional max width of the image to be cropped.\n   *\n   * @memberof IImageUploadHandler\n   * @default 1200\n   * @member {number} [maxWidth]\n   */\n  maxWidth?: number;\n  /**\n   * The optional classes to be applied to the component.\n   *\n   * @memberof IImageUploadHandler\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n}\n\n/**\n * Image Upload Handler The Image upload handler component is used to upload an\n * image and crop it then upload it to the server.\n *\n * @param {IImageUploadHandler} props - The props for the Image Upload Handler\n *   component\n * @returns {React.FC<IImageUploadHandler>} Image Upload Handler Component\n */\nconst ImageUploadHandler: React.FC<IImageUploadHandler> = ({\n  uploadedImage = '',\n  onCrop,\n  onUploadComplete,\n  onChangeImage,\n  maxHeight = 1200,\n  maxWidth = 1200,\n  classes = '',\n  ...rest\n}: IImageUploadHandler) => {\n  const [innerUploadedImage, setInnerUploadedImage] =\n    useState<string>(uploadedImage);\n  const [croppedImage, setCroppedImage] = useState<string>('');\n\n  const [cropperButtonDisabled, setCropperButtonDisabled] =\n    useState<boolean>(false);\n\n  const [cropperLoading, setCropperLoading] = useState<boolean>(false);\n\n  const { dispatch } = useToastContext();\n\n  /**\n   * Handles the toast\n   *\n   * @param {ToastType} type - The type of toast\n   * @param {string} message - The message of the toast\n   * @returns {void} - The toast\n   */\n  const handleToast = (type: ToastType, message: string): void => {\n    dispatch({\n      type: 'ADD_TOAST',\n      toast: {\n        id: '1',\n        type: type,\n        message: message,\n        persistent: false,\n        showIcon: true,\n      },\n    });\n  };\n\n  /**\n   * Function to enable the image uploader after an error\n   *\n   * @returns {void}\n   */\n  const handleCropImageError = () => {\n    /**\n     * This will cause the cropper to hide and the image uploader to be shown\n     * again\n     */\n    setInnerUploadedImage('');\n    /**\n     * This is the optional callback function to be called when the image\n     * changes\n     */\n    onChangeImage && onChangeImage();\n    /** This will cause the loading spinner to hide */\n    setCropperLoading(false);\n    /** This will cause the submit button to be enabled again */\n    setCropperButtonDisabled(false);\n  };\n\n  /**\n   * Crop Image Crops the Image and returns the cropped image back in a dataURL\n   * format.\n   *\n   * @param {ICropImage} props - The props of the ImageCropper.\n   */\n  const cropImage = async ({\n    cropperRef,\n    quality,\n    outputType,\n  }: ICropImage): Promise<void> => {\n    const cropper = cropperRef.current?.cropper;\n\n    if (cropper) {\n      try {\n        setCropperLoading(true);\n        setCropperButtonDisabled(true);\n\n        /**\n         * The dataUrl of the cropped image\n         *\n         * @type {string}\n         */\n        const dataURL: string = cropper\n          .getCroppedCanvas({\n            maxHeight: maxHeight,\n            maxWidth: maxWidth,\n          })\n          ?.toDataURL(outputType, quality);\n\n        /**\n         * The uploaded image objectKey\n         *\n         * @constant {ICreatePhotoUploadPresignedItem[]}\n         */\n        const uploadedImages: ICreatePhotoUploadPresignedItem[] =\n          await uploadImageDataURL(dataURL);\n        /**\n         * The uploaded image objectKey\n         *\n         * @constant {string}\n         */\n        const { objectKey } = uploadedImages[0];\n\n        const { species } = await getSpecies({ objectKey: objectKey });\n\n        if (!allowedSpecies.includes(species.toLocaleLowerCase())) {\n          handleToast(\n            'error',\n            'Unable to detect a cat or dog. Please use a different photo.'\n          );\n          handleCropImageError();\n        } else {\n          setCroppedImage(objectKey);\n          /**\n           * At this point we can be sure that onCrop will be called with\n           * species: 'Dog' | 'Cat' only\n           */\n          const onCropParams = { objectKey, species } as IOnCropFunctionResults;\n          onCrop && onCrop(onCropParams);\n        }\n      } catch (error) {\n        console.error(error);\n        handleToast(\n          'error',\n          'We were not able to process your image. Please try again.'\n        );\n        handleCropImageError();\n      }\n    }\n  };\n\n  /**\n   * @param {Image[]} acceptedFiles - The files that were accepted.\n   * @returns {Promise<void>}\n   */\n  const onDrop = async (acceptedFiles: File[]): Promise<void> => {\n    const base64Image = await fileToDataUrl(acceptedFiles[0]);\n    if (typeof base64Image === 'string') {\n      onUploadComplete && onUploadComplete(base64Image);\n      setInnerUploadedImage(base64Image);\n    }\n  };\n\n  return (\n    <div data-testid=\"image-upload-handler\" className={classes}>\n      {!innerUploadedImage ? (\n        <ImageUploader onDrop={onDrop} />\n      ) : (\n        <>\n          <ImageCropper\n            image={innerUploadedImage}\n            onCrop={cropImage}\n            onChangeImage={() => {\n              setInnerUploadedImage('');\n              onChangeImage && onChangeImage();\n            }}\n            buttonDisabled={cropperButtonDisabled}\n            isLoading={cropperLoading}\n            classes={`w-[328px] max-h-[328px] sm:w-[448px] sm:max-h-[428px] md:w-[432px] md:max-h-[416px] ${\n              cropperLoading && 'h-[218px] sm:h-[296px] md:h-[288px]'\n            }`}\n            {...rest}\n          />\n          <div className=\"hidden\">Cropped Image: {croppedImage}</div>\n        </>\n      )}\n    </div>\n  );\n};\n\nexport default ImageUploadHandler;\n","import ImageUploadHandler, {\n  IImageUploadHandler,\n} from '@/components/organisms/ImageUploadHandler/ImageUploadHandler';\nimport { Control, Controller } from 'react-hook-form';\n\n/**\n * IImageUploadHandlerGroup\n *\n * @augments IImageUploadHandler\n * @interface IImageUploadHandlerGroup\n */\nexport interface IImageUploadHandlerGroup extends IImageUploadHandler {\n  /**\n   * The name of the input to be used for the label's 'for' attribute.\n   *\n   * @memberof IImageUploadHandlerGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The control function from react-hook-form\n   *\n   * @memberof IImageUploadHandlerGroup\n   * @member {Control} [control]\n   */\n  control?: Control;\n}\n\n/**\n * ImageUploadHandlerGroup A controlled Image Upload Handler\n *\n * @param {IImageUploadHandlerGroup} props - The props for the\n *   ImageUploadHandlerGroup component\n * @returns {React.FC<IImageUploadHandlerGroup>} Component\n */\nconst ImageUploadHandlerGroup: React.FC<IImageUploadHandlerGroup> = ({\n  name,\n  control,\n  onCrop,\n  onUploadComplete,\n  ...rest\n}: IImageUploadHandlerGroup) => {\n  return (\n    <div data-testid=\"image-upload-handler-group\">\n      {/* Look for the Control - Mainly for displaying out in Storybook */}\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field }) => (\n            <ImageUploadHandler\n              {...rest}\n              onCrop={(data) => {\n                field.onChange(data);\n                onCrop && onCrop(data);\n              }}\n              onUploadComplete={(image: string) => {\n                field.onChange(image);\n                onUploadComplete && onUploadComplete(image);\n              }}\n            />\n          )}\n        />\n      ) : (\n        <ImageUploadHandler\n          {...rest}\n          onCrop={onCrop}\n          onUploadComplete={onUploadComplete}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default ImageUploadHandlerGroup;\n","import CdnImage from '@/component-library/atoms/CdnImage/CdnImage';\nimport Icon from '@/components/atoms/Icon/Icon';\nimport Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport { IPetPhotoItemData } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/constants/interfaces';\nimport { useMemo } from 'react';\nimport { useDropzone } from 'react-dropzone';\n\n/**\n * IImageUploadTile\n *\n * @interface IImageUploadTile\n */\nexport interface IImageUploadTile {\n  /**\n   * The text to display\n   *\n   * @memberof IImageUploadTile\n   * @member {string} text\n   */\n  text: string;\n  /**\n   * The placeholder image\n   *\n   * @memberof IImageUploadTile\n   * @member {string} placeHolderImage\n   */\n  placeHolderImage: string;\n  /**\n   * The function to call on upload, either on drop or onClick\n   *\n   * @memberof IImageUploadTile\n   * @member {(acceptedFiles: File[]) => void} [onUpload]\n   * @param {File[]} acceptedFiles - The files that were uploaded\n   */\n  onUpload?: (acceptedFiles: File[]) => void;\n  /**\n   * The image to display\n   *\n   * @memberof IImageUploadTile\n   * @member {File[] | string | IPetPhotoItemData} [image]\n   */\n  image?: File[] | string | IPetPhotoItemData;\n  /**\n   * The rank of the image tile\n   *\n   * @memberof IImageUploadTile\n   * @member {number} rank\n   */\n  rank: number;\n  /**\n   * The function to be called to remove the image\n   *\n   * @memberof IImageUploadTile\n   * @member {(rank: number) => void} [onRemove]\n   * @param {number} rank - The rank of the image to remove\n   */\n  onRemove?: (rank: number) => void;\n  /**\n   * Disabled\n   *\n   * @memberof IImageUploadTile\n   * @member {boolean} [disabled]\n   */\n  disabled?: boolean;\n}\n\n/**\n * ImageUploadTile A tile used to upload and display images\n *\n * @param {IImageUploadTile} props - The props for the ImageUploadTile component\n * @returns {React.FC<IImageUploadTile>} Component\n */\nconst ImageUploadTile: React.FC<IImageUploadTile> = ({\n  text,\n  image,\n  placeHolderImage,\n  onUpload,\n  rank,\n  onRemove,\n  disabled,\n}: IImageUploadTile) => {\n  /** Drop Zone Setup ref: https://react-dropzone.js.org/ */\n  const { getRootProps, getInputProps, isDragActive } = useDropzone({\n    accept: {\n      'image/jpg': ['.jpg', '.jpeg'],\n      'image/png': ['.png'],\n      'image/gif': ['.gif'],\n    },\n    multiple: false,\n    onDrop: onUpload,\n    disabled: disabled,\n  });\n\n  const imageIsString = useMemo(() => typeof image === 'string', [image]);\n\n  return (\n    <div\n      data-testid=\"image-upload-tile\"\n      className=\"col-span-2 relative pointer-events-none touch-none\"\n    >\n      {rank !== 1 && imageIsString && (\n        <div className=\"absolute -top-4 -right-4 z-10\">\n          <button\n            data-testid=\"image-remove-button\"\n            onClick={() => onRemove && onRemove(rank)}\n            disabled={disabled}\n            className=\"pointer-events-auto touch-auto bg-neutral-100 hover:bg-neutral-200 focus:ring-focus-400 rounded-full aspect-square h-8 w-8 flex items-center justify-center shadow-md\"\n          >\n            <Icon\n              icon=\"close\"\n              size={24}\n              colorShade={800}\n              colorType={'neutral'}\n            />\n          </button>\n        </div>\n      )}\n      <div\n        data-testid=\"image-tile-wrapper\"\n        {...getRootProps({\n          className: `group rounded-2xl pointer-events-auto touch-auto cursor-pointer dropzone transition aspect-square focus:border-focus-400 ${\n            disabled\n              ? 'bg-neutral-300 border-neutral-400'\n              : 'bg-base-100 border-base-300 hover:bg-base-200'\n          } ${image && '!border-none'} ${isDragActive && '!bg-base-200'}`,\n        })}\n      >\n        {typeof image === 'string' && (\n          <div className=\"w-full h-full relative\">\n            <input\n              {...getInputProps()}\n              disabled={disabled}\n              data-testid=\"image-uploader-input\"\n            />\n            <div className=\"absolute bottom-1.5 left-1.5 z-10 px-1.5 bg-neutral-100 text-neutral-800 rounded-full\">\n              <Paragraph size=\"overline\">\n                {rank === 1 ? 'Main' : rank}\n              </Paragraph>\n            </div>\n            <div className=\"w-full h-full relative rounded-2xl border-2 border-base-300 focus:border-focus-400 overflow-hidden\">\n              <CdnImage\n                src={image}\n                alt=\"uploaded image\"\n                layout=\"fill\"\n                objectFit=\"cover\"\n                priority={true}\n                sizes=\"(max-width: 739px) 295px, (max-width: 1199px) 291px, 194px\"\n                className=\"group-hover:scale-[102%]\"\n              />\n            </div>\n          </div>\n        )}\n        {(!image || typeof image === 'object') && (\n          <div className=\"flex flex-col rounded-2xl items-center justify-center relative h-full w-full  border-2 border-base-300 \">\n            <input\n              {...getInputProps()}\n              disabled={disabled}\n              data-testid=\"image-uploader-input\"\n            />\n            <div className=\"flex flex-col w-full h-full py-8 items-center justify-center\">\n              <div className=\"h-16 w-full relative flex justify-center\">\n                <CdnImage\n                  src={placeHolderImage}\n                  alt=\"Placeholder Image\"\n                  priority={true}\n                  className={`object-contain ${disabled && 'grayscale'}`}\n                  width={64}\n                  height={64}\n                  layout=\"intrinsic\"\n                />\n              </div>\n              <Paragraph\n                size=\"overline\"\n                className={`pt-2 text-center ${\n                  disabled ? 'text-neutral-500' : 'text-base-300'\n                }`}\n              >\n                {text}\n              </Paragraph>\n            </div>\n          </div>\n        )}\n      </div>\n    </div>\n  );\n};\n\nexport default ImageUploadTile;\n","import Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport ImageCropper, {\n  ICropImage,\n} from '@/components/molecules/ImageCropper/ImageCropper';\nimport ImageUploadTile, {\n  IImageUploadTile,\n} from '@/components/molecules/ImageUploadTile/ImageUploadTile';\nimport { getSpecies } from '@/lib/dataSource/lostApi/pet/inferSpecies/getSpecies';\nimport { uploadImageDataURL } from '@/lib/dataSource/lostApi/upload/imageUpload';\nimport { ToastType, useToastContext } from '@/lib/hooks/toasts/Toast';\nimport fileToDataUrl from '@/lib/utils/helpers/fileHelpers/fileToDataUrl';\nimport { SpeciesTypes } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/constants/types';\nimport { IPetPhotoRank } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/users/pets/dto';\nimport { LegacyRef, useEffect, useMemo, useState } from 'react';\n\n/**\n * IImageUploadTileGroup\n *\n * @interface IImageUploadTileGroup\n */\nexport interface IImageUploadTileGroup {\n  /**\n   * The image object with rank as the key\n   *\n   * @memberof IImageUploadTileGroup\n   * @member {IPetPhotoRank} value\n   */\n  value: IPetPhotoRank;\n  /**\n   * The species of the first pet photo\n   *\n   * @memberof IImageUploadTileGroup\n   * @member {SpeciesTypes} petSpecies\n   */\n  petSpecies: SpeciesTypes;\n  /**\n   * Input ref\n   *\n   * @memberof IImageUploadTileGroup\n   * @member {LegacyRef<HTMLInputElement> | undefined} [inputRef]\n   */\n  inputRef?: LegacyRef<HTMLInputElement> | undefined;\n  /**\n   * The name of field\n   *\n   * @memberof IImageUploadTileGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * Whether to show the counter or not\n   *\n   * @memberof IImageUploadTileGroup\n   * @member {boolean} [showCounter]\n   */\n  showCounter?: boolean;\n  /**\n   * The on change function\n   *\n   * @memberof IImageUploadTileGroup\n   * @member {(value: unknown) => void} [onChange]\n   */\n  onChange?: (value: unknown) => void;\n  /**\n   * On image upload callback\n   *\n   * @memberof IImageUploadTileGroup\n   * @member {(image: File[]) => void} [onImageUpload]\n   */\n  onImageUpload?: (image: File[]) => void;\n  /**\n   * On Cropper Close callback\n   *\n   * @memberof IImageUploadTileGroup\n   * @member {() => void} [onCropperClose]\n   */\n  onCropperClose?: () => void;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IImageUploadTileGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n}\n\n/**\n * ImageUploadTileGroup A group of Image Upload Tiles\n *\n * @param {IImageUploadTileGroup} props - The props for the ImageUploadTileGroup\n *   component\n * @returns {React.FC<IImageUploadTileGroup>} Component\n */\nconst ImageUploadTileGroup: React.FC<IImageUploadTileGroup> = ({\n  value,\n  onChange,\n  name,\n  petSpecies,\n  showCounter = true,\n  onImageUpload,\n  onCropperClose,\n  readOnly,\n}: IImageUploadTileGroup) => {\n  const [images, setImages] = useState<IPetPhotoRank>(value);\n  const [imageToCrop, setImageToCrop] = useState<string>('');\n  const [imageRank, setImageRank] = useState<number | null>(null);\n  const [cropperLoading, setCropperLoading] = useState<boolean>(false);\n  const { dispatch } = useToastContext();\n\n  useEffect(() => {\n    setImages(value);\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  /**\n   * Wrapper function to set the images and call the onChange function\n   *\n   * @param {IPetPhotoRank} images The images to set\n   */\n  const setImageHandler = (images: IPetPhotoRank) => {\n    setImages(images);\n    onChange && onChange(images);\n  };\n\n  /**\n   * Handles the toast\n   *\n   * @param {ToastType} type - The type of toast\n   * @param {string} message - The message of the toast\n   * @returns {void} - The toast\n   */\n  const handleToast = (type: ToastType, message: string): void => {\n    dispatch({\n      type: 'ADD_TOAST',\n      toast: {\n        id: '1',\n        type: type,\n        message: message,\n        persistent: false,\n        showIcon: true,\n      },\n    });\n  };\n\n  /** @param {number} rank The rank of the image to remove */\n  const removeImage = (rank: number) => {\n    const newImages = { ...images };\n    switch (rank) {\n      case 2:\n        delete newImages.photo_2;\n        break;\n      case 3:\n        delete newImages.photo_3;\n        break;\n      case 4:\n        delete newImages.photo_4;\n        break;\n    }\n    setImageHandler(newImages);\n  };\n\n  /**\n   * @param {number} rank The rank of the image\n   * @param {string} image The image to crop\n   */\n  const setCropImage = async (rank: number, image: File[]) => {\n    const base64Image = await fileToDataUrl(image[0]);\n    if (typeof base64Image === 'string') {\n      setImageToCrop(base64Image);\n      setImageRank(rank);\n    }\n  };\n\n  /**\n   * Returns the number of uploaded photos\n   *\n   * @returns {number} The number of uploaded photos\n   */\n  const numberOfUploadedPhotos = (): number => {\n    let count = 0;\n    count = Object.keys(images).length;\n    return count;\n  };\n\n  const tileImages = useMemo(() => {\n    if (petSpecies === 'dog') {\n      return {\n        main:\n          process.env.NEXT_PUBLIC_CDN_BASE_URL +\n          '/assets/lost/illustrations/dog.svg',\n        fullBody:\n          process.env.NEXT_PUBLIC_CDN_BASE_URL +\n          '/assets/lost/illustrations/side.svg',\n        face:\n          process.env.NEXT_PUBLIC_CDN_BASE_URL +\n          '/assets/lost/illustrations/face.svg',\n        markings:\n          process.env.NEXT_PUBLIC_CDN_BASE_URL +\n          '/assets/lost/illustrations/paw.svg',\n      };\n    }\n    if (petSpecies === 'cat') {\n      return {\n        main:\n          process.env.NEXT_PUBLIC_CDN_BASE_URL +\n          '/assets/lost/illustrations/cat.svg',\n        fullBody:\n          process.env.NEXT_PUBLIC_CDN_BASE_URL +\n          '/assets/lost/illustrations/cat-side.svg',\n        face:\n          process.env.NEXT_PUBLIC_CDN_BASE_URL +\n          '/assets/lost/illustrations/cat-face.svg',\n        markings:\n          process.env.NEXT_PUBLIC_CDN_BASE_URL +\n          '/assets/lost/illustrations/cat-paw.svg',\n      };\n    }\n  }, [petSpecies]);\n\n  /**\n   * This is the base upload function. It will set the cropper image for the\n   * tile number passed in params and will call the onImageUpload callback if it\n   * exists\n   *\n   * @param {number} tileNumber - The tile number that triggered the event\n   * @param {File[]} image - The image to upload\n   */\n  const onUploadBase = (tileNumber: number, image: File[]) => {\n    onImageUpload && onImageUpload(image);\n    setCropImage(tileNumber, image);\n  };\n\n  const tileOne: IImageUploadTile = {\n    text: 'Main photo',\n    rank: 1,\n    image: images.photo_1,\n    placeHolderImage:\n      tileImages?.main || process.env.NEXT_PUBLIC_CDN_BASE_URL + '',\n    /**\n     * @param {File[]} image - The image to upload\n     * @returns {void}\n     */\n    onUpload: (image: File[]): void => {\n      onUploadBase(1, image);\n    },\n    disabled: readOnly,\n  };\n\n  const tileTwo: IImageUploadTile = {\n    text: \"Photo of pet's full body\",\n    rank: 2,\n    image: images.photo_2,\n    placeHolderImage:\n      tileImages?.fullBody || process.env.NEXT_PUBLIC_CDN_BASE_URL + '',\n    /**\n     * Removes the image\n     *\n     * @returns {void}\n     */\n    onRemove: (): void => removeImage(2),\n    /**\n     * @param {File[]} image - The image to upload\n     * @returns {void}\n     */\n    onUpload: (image: File[]): void => {\n      onUploadBase(2, image);\n    },\n    disabled: readOnly,\n  };\n\n  const tileThree: IImageUploadTile = {\n    text: \"Photo of pet's face\",\n    image: images.photo_3,\n    rank: 3,\n    placeHolderImage:\n      tileImages?.face || process.env.NEXT_PUBLIC_CDN_BASE_URL + '',\n    /**\n     * Removes the image\n     *\n     * @returns {void}\n     */\n    onRemove: (): void => removeImage(3),\n    /**\n     * @param {File[]} image - The image to upload\n     * @returns {void}\n     */\n    onUpload: (image: File[]): void => {\n      onUploadBase(3, image);\n    },\n    disabled: readOnly,\n  };\n\n  const tileFour: IImageUploadTile = {\n    text: 'Photo of markings',\n    image: images.photo_4,\n    rank: 4,\n    placeHolderImage:\n      tileImages?.markings || process.env.NEXT_PUBLIC_CDN_BASE_URL + '',\n    /**\n     * Removes the image\n     *\n     * @returns {void}\n     */\n    onRemove: (): void => removeImage(4),\n    /**\n     * @param {File[]} image - The image to upload\n     * @returns {void}\n     */\n    onUpload: (image: File[]): void => {\n      onUploadBase(4, image);\n    },\n    disabled: readOnly,\n  };\n\n  /**\n   * Crop Image Crops the Image and returns the cropped image back in a dataURL\n   * format.\n   *\n   * @param {ICropImage} props - The props of the ImageCropper.\n   */\n  const cropImage = async ({\n    cropperRef,\n    quality,\n    outputType,\n  }: ICropImage): Promise<void> => {\n    const cropper = cropperRef?.current?.cropper;\n\n    if (cropper) {\n      setCropperLoading(true);\n      const dataURL = cropper\n        .getCroppedCanvas()\n        ?.toDataURL(outputType, quality);\n      const uploadedImages = await uploadImageDataURL(dataURL);\n      const { objectKey } = uploadedImages[0];\n\n      const { species } = await getSpecies({ objectKey: objectKey });\n\n      if (\n        species.toLocaleLowerCase() !== 'dog' &&\n        species.toLocaleLowerCase() !== 'cat'\n      ) {\n        handleToast(\n          'error',\n          'Unable to detect a cat or dog. Please use a different photo.'\n        );\n        /** Update back use to image provided in props */\n        setImageToCrop('');\n\n        setCropperLoading(false);\n      } else if (species.toLocaleLowerCase() !== petSpecies) {\n        handleToast(\n          'error',\n          'The pet species in this photo does not match the pet species of this profile. Please use a different photo.'\n        );\n        /** Update back use to image provided in props */\n        setImageToCrop('');\n\n        setCropperLoading(false);\n      } else {\n        setImageHandler({ ...images, ['photo_' + imageRank]: objectKey });\n\n        setImageToCrop('');\n        setCropperLoading(false);\n      }\n      setImageToCrop('');\n      onCropperClose && onCropperClose();\n    }\n  };\n\n  return (\n    <div data-testid=\"image-upload-tile-group\" className=\"w-full relative\">\n      <input data-testid=\"file-upload-input\" id={name} className=\"hidden\" />\n      <div className=\"w-full relative\">\n        {imageToCrop ? (\n          <div className=\"w-full justify-center relative\">\n            <ImageCropper\n              image={imageToCrop}\n              quality={1}\n              outputType=\"image/jpeg\"\n              aspectRatio={1 / 1}\n              onChangeImage={() => {\n                setImageToCrop('');\n              }}\n              onCrop={cropImage}\n              isLoading={cropperLoading}\n              classes={`w-[328px] max-h-[328px] sm:w-[448px] sm:max-h-[428px] md:w-[432px] md:max-h-[416px] ${\n                cropperLoading && 'h-[218px] sm:h-[296px] md:h-[288px]'\n              }`}\n            />\n          </div>\n        ) : (\n          <div className=\"grid grid-cols-4 gap-4 sm:gap-6 md:gap-8\">\n            {showCounter && (\n              <div className=\"col-span-4 flex flex-col\">\n                <Paragraph\n                  size=\"body4\"\n                  styling=\"bold\"\n                  className=\"text-secondaryBase-400 pb-1\"\n                >\n                  Photos ({numberOfUploadedPhotos()} of 4 added)\n                </Paragraph>\n                <Paragraph size=\"body5\">\n                  Photo searches are based on your{' '}\n                  <span className=\"font-bold\">main photo.</span> Add up to four\n                  photos to strengthen your pet report.\n                </Paragraph>\n              </div>\n            )}\n            <ImageUploadTile {...tileOne} />\n            <ImageUploadTile {...tileTwo} />\n            <ImageUploadTile {...tileThree} />\n            <ImageUploadTile {...tileFour} />\n          </div>\n        )}\n      </div>\n    </div>\n  );\n};\n\nexport default ImageUploadTileGroup;\n","import ImageUploadTileGroup, {\n  IImageUploadTileGroup,\n} from '@/components/organisms/ImageUploadTileGroup/ImageUploadTileGroup';\nimport { SpeciesTypes } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/constants/types';\nimport { IPetPhotoRank } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/users/pets/dto';\nimport { Control, Controller } from 'react-hook-form';\n\n/**\n * IImageUploadTileField\n *\n * @augments Partial<IImageUploadTileGroup>\n * @interface IImageUploadTileField\n */\nexport interface IImageUploadTileField extends Partial<IImageUploadTileGroup> {\n  /**\n   * Name of the field\n   *\n   * @memberof IImageUploadTileField\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The control from the form\n   *\n   * @memberof IImageUploadTileField\n   * @member {Control} [control]\n   */\n  control?: Control;\n  /**\n   * The images to display\n   *\n   * @memberof IImageUploadTileField\n   * @member {IPetPhotoRank} images\n   */\n  images: IPetPhotoRank;\n  /**\n   * The species of the first pet photo\n   *\n   * @memberof IImageUploadTileField\n   * @member {SpeciesTypes} petSpecies\n   */\n  petSpecies: SpeciesTypes;\n  /**\n   * On image upload callback\n   *\n   * @memberof IImageUploadTileField\n   * @member {(image: File[]) => void} [onImageUpload]\n   * @param {File[]} image - The image to upload\n   * @returns {void}\n   */\n  onImageUpload?: (image: File[]) => void;\n  /**\n   * On Cropper Close callback\n   *\n   * @memberof IImageUploadTileField\n   * @member {() => void} [onCropperClose]\n   * @returns {void}\n   */\n  onCropperClose?: () => void;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IImageUploadTileField\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n}\n\n/**\n * ImageUploadTileField The upload component group used for the form\n *\n * @param {IImageUploadTileField} props - The props for the ImageUploadTileField\n *   component\n * @returns {React.FC<IImageUploadTileField>} Component\n */\nconst ImageUploadTileField: React.FC<IImageUploadTileField> = ({\n  control,\n  name,\n  images,\n  petSpecies,\n  readOnly,\n  ...rest\n}: IImageUploadTileField) => {\n  return (\n    <div data-testid=\"image-upload-tile-field\" className=\"w-full\">\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, onChange, value, ...field } }) => {\n            /** If field has no value update it with the required images */\n            if (!value) {\n              onChange(images);\n            }\n            return (\n              <ImageUploadTileGroup\n                {...rest}\n                inputRef={ref}\n                {...field}\n                value={images}\n                petSpecies={petSpecies}\n                onChange={onChange}\n                readOnly={readOnly}\n              />\n            );\n          }}\n        />\n      ) : (\n        <ImageUploadTileGroup\n          value={images}\n          name={name}\n          petSpecies={petSpecies}\n          readOnly={readOnly}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default ImageUploadTileField;\n","import {\n  createContext,\n  ReactNode,\n  useContext,\n  useEffect,\n  useState,\n} from 'react';\n\nimport { LocationClient } from '@aws-sdk/client-location';\n\nimport {\n  CognitoIdentityCredentialProvider,\n  fromCognitoIdentityPool,\n} from '@aws-sdk/credential-providers';\n\n/**\n * Return the AWS Cognito Identity Credentials Provider form an identity pool id\n *\n * @param {string} identityPoolId - AWS Cognito Identity Pool ID\n * @param {string} region - AWS Region\n * @returns {CognitoIdentityCredentialProvider} - AWS Cognito Identity\n *   Credential Provider\n */\nexport const getCredentialsFromIdentityPool = async (\n  identityPoolId: string = process.env.NEXT_PUBLIC_AWS_COGNITO_USER_POOL_ID as string,\n  region = 'us-east-1'\n): Promise<CognitoIdentityCredentialProvider> => {\n  const credentials = fromCognitoIdentityPool({\n    identityPoolId,\n    clientConfig: { region },\n  });\n  return credentials;\n};\n\n/**\n * IAWS Client Config The Interface for what the AWS Client Getter will be\n * expecting\n *\n * @interface\n */\nexport interface IAWSClientConfig {\n  /** AWS Credentials */\n  credentials: CognitoIdentityCredentialProvider;\n  /** AWS Region */\n  region: string;\n}\n\n/**\n * Return the AWS Location Client\n *\n * @param {IAWSClientConfig} config - The AWS Client Config\n * @returns {LocationClient} - AWS Location Client\n */\nexport const getLocationClient = (config: IAWSClientConfig): LocationClient => {\n  return new LocationClient(config);\n};\n\n/**\n * AWS Client Context Used for creating the Context Object for the\n * useAWSClientContext Function\n *\n * @constant\n */\nexport const AWSContext = createContext<{\n  /** AWS Location Client */\n  locationClient: LocationClient | null;\n}>({\n  locationClient: null,\n});\n\n/**\n * IAWS Provider The Interface for what the AWS Provider will be expecting\n *\n * @interface\n */\nexport interface IAWSProvider {\n  /** Children of the Provider */\n  children: ReactNode;\n  /** Optional configuration for the AWS Client */\n  config?: IAWSClientConfig;\n}\n\n/**\n * AWS Provider Used to provide the ability to use AWS Clients to any children\n * of the provider\n *\n * @param {IAWSProvider} children - The children this will be providing Context\n *   to\n * @returns {AWSContext} AWSContext\n */\nexport function AWSProvider({ children, config }: IAWSProvider) {\n  const [locationClient, setLocationClient] = useState<LocationClient>();\n\n  useEffect(() => {\n    /* If a config is provided, use it to get a client */\n    if (config) {\n      const client = getLocationClient(config);\n      setLocationClient(client);\n      /* Else, fallback to getting a client from Cognito credentials */\n    } else {\n      /* Get cognito credentials */\n      getCredentialsFromIdentityPool(\n        process.env.STORYBOOK_AWS_COGNITO_USER_POOL_ID,\n        process.env.STORYBOOK_AWS_SERVICE_REGION\n      )\n        /* Then create config object from Cognito Credentials */\n        .then((cognitoCredentials) => ({\n          credentials: cognitoCredentials,\n          region: process.env.AWS_SERVICE_REGION || 'us-east-1',\n        }))\n        /* Then get a client from created config */\n        .then((config) => getLocationClient(config))\n        /* Finally, set location client */\n        .then((client) => setLocationClient(client));\n    }\n  }, [setLocationClient, config]);\n  return (\n    <AWSContext.Provider\n      value={{ locationClient: locationClient as LocationClient }}\n    >\n      {children}\n    </AWSContext.Provider>\n  );\n}\n\n/**\n * Use AWS Context Used to allow components to interact with the AWS Context\n *\n * @returns {AWSContext} AWSContext\n */\nexport const useAWSClientContext = () => useContext(AWSContext);\n","import React from 'react';\nimport { IInterceptionMap, KeyboardInterceptor } from './KeyboardInterceptor';\n/**\n * IDropdownMenuKeyboardInterceptorHandlers\n *\n * @interface\n */\nexport interface IDropdownMenuKeyboardInterceptorHandlers {\n  /** Function that selects a result. */\n  selectResult: (event?: React.KeyboardEvent) => void;\n  /** Function that selects previous result. */\n  selectPreviousResult: (event?: React.KeyboardEvent) => void;\n  /** Function that selects next result. */\n  selectNextResult: (event?: React.KeyboardEvent) => void;\n}\n\n/**\n * Intercept keyboard events for a dropdown input\n *\n * @param {Function} select - Funciton that selects the currently selected\n *   result or the first result\n * @param {Function} selectNextResult - Funciton that selects the next result\n * @param {Function} selectPreviousResult - Funciton that selects the previous\n *   result\n */\nexport class DropDownMenuKeyboardInterceptor extends KeyboardInterceptor {\n  /**\n   * Constructor for DropdownMenuKeyboardInterceptor\n   *\n   * @param {IDropdownMenuKeyboardInterceptorHandlers} handlers - The handlers\n   */\n  constructor({\n    selectResult,\n    selectNextResult,\n    selectPreviousResult,\n  }: IDropdownMenuKeyboardInterceptorHandlers) {\n    /** @param {React.KeyboardEvent} event - The keyboard event */\n    const tabInterceptor = (event: React.KeyboardEvent) => {\n      event.shiftKey ? selectPreviousResult() : selectNextResult();\n    };\n\n    const interceptionMap: IInterceptionMap = {\n      Enter: selectResult,\n      Tab: tabInterceptor,\n      ArrowUp: selectPreviousResult,\n      ArrowDown: selectNextResult,\n      Escape: selectResult,\n    };\n\n    super(interceptionMap);\n  }\n}\n","import React, { LegacyRef, useCallback, useEffect, useState } from 'react';\nimport { FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\n\nimport { Listbox, Transition } from '@headlessui/react';\n\nimport {\n  LocationClient,\n  SearchForTextResult,\n  SearchPlaceIndexForTextCommand,\n  SearchPlaceIndexForTextCommandOutput,\n} from '@aws-sdk/client-location';\n\nimport { useAWSClientContext } from '@/lib/hooks/aws/AwsClient';\nimport { useComponentFocused } from '@/lib/utils/ComponentFocused/ComponentFocused';\nimport { DropDownMenuKeyboardInterceptor } from '@/lib/utils/keyboardInterceptors/DropDownMenuKeyboardInterceptor';\n\nimport InputField from '@/components/atoms/InputField/InputField';\n\n/**\n * ISearchPlacesIndexForTextConfiguration\n *\n * @interface ISearchPlacesIndexForTextConfiguration\n */\nexport interface ISearchPlacesIndexForTextConfiguration {\n  /**\n   * Array of ISO country codes to filter results by\n   *\n   * @memberof ISearchPlacesIndexForTextConfiguration\n   * @default ['AUS', 'CAN', 'MEX', 'USA']\n   * @member {string[]} [filterCountries]\n   */\n  filterCountries?: string[];\n  /**\n   * Name of the place index resource to use for the search\n   *\n   * @memberof ISearchPlacesIndexForTextConfiguration\n   * @member {string} indexName\n   */\n  indexName: string;\n  /**\n   * Maximum number of results to return\n   *\n   * @memberof ISearchPlacesIndexForTextConfiguration\n   * @default 5\n   * @member {number} [maxResults]\n   */\n  maxResults?: number;\n}\n\n/**\n * Returns places in AWS Location Service index from a text input\n *\n * @param {LocationClient} client - AWS Location Service client\n * @param {string} text - The text to search for\n * @param {ISearchPlacesIndexForTextConfiguration} search Params - indexName and\n *   maxResults. If not provided, defaults to AWS_LOCATION_SERVICES_INDEX_NAME\n *   and maxResults: 5\n * @returns {Promise<SearchForTextResult>} - The results of the search\n */\nexport async function searchPlacesIndexForText(\n  client: LocationClient,\n  text: string,\n  {\n    indexName = process.env.AWS_LOCATION_SERVICE_INDEX_NAME as string,\n    filterCountries = ['AUS', 'CAN', 'MEX', 'USA'],\n    maxResults = 5,\n  }: ISearchPlacesIndexForTextConfiguration\n): Promise<SearchPlaceIndexForTextCommandOutput> {\n  const params = {\n    IndexName: indexName,\n    Text: text,\n    MaxResults: maxResults,\n    FilterCountries: filterCountries,\n  };\n  const command = new SearchPlaceIndexForTextCommand(params);\n\n  return await client.send(command);\n}\n\n/**\n * IInputPlacesField - The props for the Input Places Field component.\n *\n * @interface IInputPlacesField\n */\nexport interface IInputPlacesField {\n  /**\n   * Input field error\n   *\n   * @memberof IInputPlacesField\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [error]\n   */\n  error?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * AWS Location Service index name\n   *\n   * @memberof IInputPlacesField\n   * @member {string} [indexName]\n   */\n  indexName?: string;\n  /**\n   * Input places field label\n   *\n   * @memberof IInputPlacesField\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * Array of ISO country codes to filter results by\n   *\n   * @memberof IInputPlacesField\n   * @default ['AUS', 'CAN', 'MEX', 'USA']\n   * @member {string[]} [filterCountries]\n   */\n  filterCountries?: string[];\n  /**\n   * Maximum number of results to return\n   *\n   * @memberof IInputPlacesField\n   * @default 5\n   * @member {number} [maxResults]\n   */\n  maxResults?: number;\n  /**\n   * Input places field change handler\n   *\n   * @memberof IInputPlacesField\n   * @member {(value: SearchForTextResult) => void} [onChange]\n   * @param {SearchForTextResult} value - The selected result\n   * @returns {void}\n   */\n  onChange?: (value: SearchForTextResult) => void;\n  /**\n   * Input places field value\n   *\n   * @memberof IInputPlacesField\n   * @member {SearchForTextResult} [value]\n   */\n  value?: SearchForTextResult;\n  /**\n   * The function to call when the input value changes.\n   *\n   * @memberof IInputPlacesField\n   * @member {LegacyRef<HTMLInputElement> | undefined} [inputRef]\n   */\n  inputRef?: LegacyRef<HTMLInputElement> | undefined;\n  /**\n   * Read Only\n   *\n   * @memberof IInputPlacesField\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n}\n\n/**\n * Input Places Field The input places field component that allows to search for\n * places in an AWS Location Service index\n *\n * @param {IInputPlacesField} props - The props for the Input Places Field\n * @returns {React.FC<IInputPlacesField>} Input Places Field Component\n */\nconst InputPlacesField: React.FC<IInputPlacesField> = ({\n  error,\n  indexName = process.env.NEXT_PUBLIC_AWS_LOCATION_SERVICE_INDEX_NAME as string,\n  label,\n  filterCountries = ['AUS', 'CAN', 'MEX', 'USA'],\n  maxResults = 5,\n  onChange,\n  readOnly,\n  value,\n}: IInputPlacesField) => {\n  // Used to allow components to interact with the AWS Context\n  const awsClientContext = useAWSClientContext();\n  // Results from Location Client places search\n  const [results, setResults] = useState<SearchForTextResult[]>([]);\n  // Index of currently selected result on the dropdown list\n  const [selectedIndex, setSelectedIndex] = useState<number>(-1);\n  // Currently selected result object\n  const [selectedResult, _setSelectedResult] = useState<SearchForTextResult>();\n  // Value to be used to search for places. Can be passes in props\n  const [inputValue, setInputValue] = useState<string>(\n    (value && value.Place?.Label) || ''\n  );\n\n  // Reference to detect if the component is focused\n  const { ref, isComponentFocused } = useComponentFocused(false);\n\n  /** Reset results to an empty array, and selected index to -1 */\n  const resetInputPlacesField = () => {\n    setResults([]);\n    setSelectedIndex(-1);\n  };\n\n  /**\n   * Reset results to an empty array, and selected index to -1 after making a\n   * selection\n   *\n   * @param {SearchForTextResult} result - The selected result\n   */\n  const setSelectedResult = useCallback(\n    (result: SearchForTextResult | undefined) => {\n      _setSelectedResult(result);\n      resetInputPlacesField();\n    },\n    []\n  );\n\n  /** Select the currently selected result or the first result in the list */\n  const selectResult = () => {\n    const index = selectedIndex > -1 ? selectedIndex : 0;\n    const selectedResult = results[index];\n\n    setSelectedResult(selectedResult);\n  };\n\n  /** Select the previous result from the dropdown options */\n  const selectNextResult = (): void => {\n    if (results.length > 0) {\n      if (selectedIndex < results.length - 1)\n        setSelectedIndex(selectedIndex + 1);\n      else setSelectedIndex(0);\n    }\n  };\n\n  /** Select the previous result from the dropdown options */\n  const selectPreviousResult = (): void => {\n    if (results.length > 0 && selectedIndex > 0)\n      setSelectedIndex(selectedIndex - 1);\n  };\n\n  /** Hook to update inputValue on value prop change */\n  useEffect(() => {\n    if (value) setInputValue(value.Place?.Label as string);\n  }, [value]);\n\n  /**\n   * Hook to react on selectedResult change. It updates input field and calls\n   * callback if provided\n   */\n  useEffect(() => {\n    if (selectedResult) {\n      /* Callback */\n      if (selectedResult && onChange) onChange(selectedResult);\n      /* Update input value */\n      setInputValue(selectedResult.Place?.Label as string);\n    }\n  }, [selectedResult, onChange]);\n\n  /**\n   * Search for places in AWS Location Service index\n   *\n   * @param {string} searchTerm - The text to search for\n   */\n  const searchPlaces = useCallback(\n    async (searchTerm: string) => {\n      if (searchTerm.length > 0) {\n        const { locationClient } = awsClientContext;\n\n        try {\n          const response = await searchPlacesIndexForText(\n            locationClient as LocationClient,\n            searchTerm,\n            { indexName, filterCountries, maxResults }\n          );\n          const { Results: results } = response || {};\n\n          if (results) setResults(results);\n        } catch {\n          setSelectedResult(undefined);\n        }\n      } else {\n        setSelectedResult(undefined);\n        setResults([]);\n      }\n    },\n    [\n      awsClientContext,\n      filterCountries,\n      indexName,\n      maxResults,\n      setSelectedResult,\n    ]\n  );\n\n  /** Hook to act on click outside/inside of the component */\n  useEffect(() => {\n    isComponentFocused && value\n      ? searchPlaces(value.Place?.Label as string)\n      : selectResult();\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isComponentFocused]);\n\n  /**\n   * Handles keyboard events inside the input field container\n   *\n   * @param {React.KeyboardEvent} event - The keyboard event\n   */\n  const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n    const interceptor = new DropDownMenuKeyboardInterceptor({\n      selectResult,\n      selectNextResult,\n      selectPreviousResult,\n    });\n    interceptor.interceptKeyboardEvent(event);\n  };\n\n  /**\n   * Handle list selection\n   *\n   * @param {string} value - Value that changed\n   */\n  const handleListChange = (value: string) => {\n    const selectedResult = results.find(\n      (result: SearchForTextResult) => result.PlaceId === value\n    );\n\n    setSelectedResult(selectedResult);\n  };\n\n  return (\n    <div onKeyDown={handleKeyDown} ref={ref}>\n      <Listbox\n        value=\"test\"\n        as=\"div\"\n        data-testid=\"input-places-field\"\n        onChange={handleListChange}\n        disabled={readOnly}\n      >\n        {() => (\n          <>\n            <div className=\"relative h-full w-full z-[11]\">\n              <InputField\n                label={label}\n                type={'text'}\n                name={'Input Places Field'}\n                onChange={searchPlaces}\n                value={inputValue}\n                error={error}\n                autoComplete=\"off\"\n                readOnly={readOnly}\n              />\n              <Transition\n                show={results.length > 0 && !readOnly}\n                enter=\"transition ease-out duration-200 opacity-100\"\n                enterFrom=\"opacity-0 translate-y-1\"\n                leave=\"transition ease-in duration-200\"\n                leaveFrom=\"opacity-100\"\n                leaveTo=\"opacity-0\"\n                className=\"absolute w-full rounded-md bg-white shadow-lg\"\n              >\n                <Listbox.Options\n                  static\n                  data-testid=\"places-options\"\n                  className=\"max-h-[100] rounded-md rounded-t-none text-base text-left leading-6 shadow-xs overflow-auto focus:outline-none sm:text-sm sm:leading-[0.3125rem] bg-neutral-100 -mt-5\"\n                >\n                  {results.map((result: SearchForTextResult, index: number) => (\n                    <Listbox.Option\n                      key={index}\n                      value={result.PlaceId}\n                      disabled={readOnly}\n                      data-testid={`dropdown-menu-item-${index}`}\n                    >\n                      {() => {\n                        const selected = selectedIndex === index;\n\n                        return (\n                          <div\n                            className={`select-none relative px-3 py-2.5 hover:bg-base-100 cursor-pointer focus:bg-base-200 ${\n                              selected ? 'bg-base-200' : ''\n                            }`}\n                          >\n                            <span\n                              className={\n                                'text-body4 font-petco text-neutral-800 block truncate'\n                              }\n                            >\n                              {result.Place?.Label}\n                            </span>\n                          </div>\n                        );\n                      }}\n                    </Listbox.Option>\n                  ))}\n                </Listbox.Options>\n              </Transition>\n            </div>\n          </>\n        )}\n      </Listbox>\n    </div>\n  );\n};\n\nexport default InputPlacesField;\n","import InputPlacesField, {\n  IInputPlacesField,\n} from '@/components/molecules/InputPlacesField/InputPlacesField';\nimport { Control, Controller } from 'react-hook-form';\n\n/**\n * IInputPlacesGroup\n *\n * @augments IInputPlacesField\n * @interface IInputPlacesGroup\n */\nexport interface IInputPlacesGroup extends IInputPlacesField {\n  /**\n   * The input field name\n   *\n   * @memberof IInputPlacesGroup\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The Optional control object from react-hook-form\n   *\n   * @memberof IInputPlacesGroup\n   * @member {Control} [control]\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  control?: Control<any>;\n  /**\n   * The Optional classes for the input field group\n   *\n   * @memberof IInputPlacesGroup\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n  /**\n   * The Optional label for the input field\n   *\n   * @memberof IInputPlacesGroup\n   * @default ''\n   * @member {string} [inputFieldLabel]\n   */\n  inputFieldLabel?: string;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IInputPlacesGroup\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n}\n\n/**\n * InputPlacesGroup The Input Group for the Input Places Field component\n *\n * @param {IInputPlacesGroup} props - The props for the InputPlacesGroup\n *   component\n * @returns {React.FC<IInputPlacesGroup>} Component\n */\nconst InputPlacesGroup: React.FC<IInputPlacesGroup> = ({\n  label,\n  name,\n  inputFieldLabel = '',\n  classes = '',\n  control,\n  readOnly,\n  ...rest\n}: IInputPlacesGroup) => {\n  /**\n   * Base Data Test Id\n   *\n   * @constant\n   */\n  const dataTestId = 'input-places-group';\n\n  return (\n    <div\n      data-testid={`${dataTestId}${control ? '-control' : ''}`}\n      className={classes}\n    >\n      <div className={inputFieldLabel ? 'mb-2' : ''}>\n        {inputFieldLabel && (\n          <label htmlFor={name} className=\"font-petco font-bold\">\n            {inputFieldLabel}\n          </label>\n        )}\n      </div>\n      {control ? (\n        <Controller\n          control={control}\n          name={name}\n          render={({ field: { ref, ...field } }) => {\n            const { ...restField } = field;\n            return (\n              <InputPlacesField\n                label={label}\n                inputRef={ref}\n                readOnly={readOnly}\n                {...restField}\n              />\n            );\n          }}\n        />\n      ) : (\n        <InputPlacesField label={label} readOnly={readOnly} {...rest} />\n      )}\n    </div>\n  );\n};\n\nexport default InputPlacesGroup;\n","import InputPlacesGroup from '@/components/molecules/InputPlacesGroup/InputPlacesGroup';\nimport {\n  AWSProvider,\n  IAWSClientConfig,\n  getCredentialsFromIdentityPool,\n} from '@/lib/hooks/aws/AwsClient';\nimport { SearchForTextResult } from '@aws-sdk/client-location';\nimport { useEffect, useState } from 'react';\nimport { Control, FieldError, FieldErrorsImpl, Merge } from 'react-hook-form';\n\n/**\n * IInputPlacesProvider\n *\n * @interface IInputPlacesProvider\n */\nexport interface IInputPlacesProvider {\n  /**\n   * The input field name\n   *\n   * @memberof IInputPlacesProvider\n   * @member {string} name\n   */\n  name: string;\n  /**\n   * The label text for the input field\n   *\n   * @memberof IInputPlacesProvider\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * Optional On Change\n   *\n   * @memberof IInputPlacesProvider\n   * @member {(value: SearchForTextResult) => void} [onChange]\n   */\n  onChange?: (value: SearchForTextResult) => void;\n  /**\n   * The Optional control object from react-hook-form\n   *\n   * @memberof IInputPlacesProvider\n   * @member {Control<any>} [control]\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  control?: Control<any>;\n  /**\n   * Errors on the field from react-hook-form\n   *\n   * @memberof IInputPlacesProvider\n   * @member {FieldError | Merge<FieldError, FieldErrorsImpl<FieldError>>} [errors]\n   */\n  errors?:\n    | FieldError\n    | Merge<FieldError, FieldErrorsImpl<FieldError>>\n    | undefined;\n  /**\n   * Optional classes used with the input places group\n   *\n   * @memberof IInputPlacesProvider\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n  /**\n   * The Optional upper label for the Input Places Group\n   *\n   * @memberof IInputPlacesProvider\n   * @member {string} [inputFieldLabel]\n   */\n  inputFieldLabel?: string;\n  /**\n   * The value of the field\n   *\n   * @memberof IInputPlacesProvider\n   * @member {SearchForTextResult} [value]\n   */\n  value?: SearchForTextResult;\n  /**\n   * Optional Read Only\n   *\n   * @memberof IInputPlacesProvider\n   * @member {boolean} [readOnly]\n   */\n  readOnly?: boolean;\n  /**\n   * Client Configuration\n   *\n   * @memberof IInputPlacesProvider\n   * @member {IAWSClientConfig} [clientConfig]\n   */\n  clientConfig?: IAWSClientConfig;\n}\n\n/**\n * InputPlacesProvider Input places field with provider included\n *\n * @param {IInputPlacesProvider} props - The props for the InputPlacesProvider\n *   component\n * @returns {React.FC<IInputPlacesProvider>} Component\n */\nconst InputPlacesProvider: React.FC<IInputPlacesProvider> = ({\n  name,\n  label,\n  onChange,\n  control,\n  errors,\n  classes = '',\n  inputFieldLabel,\n  value,\n  readOnly,\n  clientConfig,\n}: IInputPlacesProvider) => {\n  /** AWS configuration to pass to the provider */\n  const [awsConfig, setAwsConfig] = useState<IAWSClientConfig>();\n\n  /** Get the AWS credentials from the identity pool and set the config */\n  useEffect(() => {\n    getCredentialsFromIdentityPool(\n      process.env.NEXT_PUBLIC_AWS_COGNITO_USER_POOL_ID,\n      process.env.NEXT_PUBLIC_AWS_SERVICE_REGION\n    ).then((credentials) => {\n      const config = {\n        credentials,\n        region: process.env.NEXT_PUBLIC_AWS_SERVICE_REGION as string,\n      };\n      setAwsConfig(clientConfig || config);\n    });\n  }, [clientConfig]);\n\n  return (\n    <div data-testid=\"input-places-provider\">\n      <AWSProvider config={awsConfig} data-testid=\"aws-provider\">\n        <InputPlacesGroup\n          name={name}\n          label={label}\n          control={control}\n          error={errors}\n          classes={classes}\n          inputFieldLabel={inputFieldLabel}\n          value={value}\n          readOnly={readOnly}\n          onChange={onChange}\n        />\n      </AWSProvider>\n    </div>\n  );\n};\n\nexport default InputPlacesProvider;\n","import { ErrorOption, FieldValues, UseFormSetError } from 'react-hook-form';\n\n/** The error setter function */\nexport type FieldErrorSetter = (error: ErrorOption) => void;\n\n/**\n * Get an error setter for an specific field\n *\n * @param {string} fieldName - The field name\n * @param {UseFormSetError<FieldValues>} setError - The setError function\n * @returns {Function} SetError function for the field\n */\nconst getErrorSetterForField = (\n  fieldName: string,\n  setError: UseFormSetError<FieldValues>\n): FieldErrorSetter => {\n  return (error: ErrorOption) => setError(fieldName, error);\n};\n\nexport default getErrorSetterForField;\n","import Divider from '@/components/atoms/Divider/Divider';\nimport IRegisterFunction from '@/components/atoms/InputField/IRegisterFunction';\nimport FacebookFormMessage, {\n  IFacebookFormMessageContext,\n} from '@/components/molecules/FacebookFormMessage/FacebookFormMessage';\nimport FileUploadGroup from '@/components/molecules/FileUploadGroup/FileUploadGroup';\nimport InputButtonGroup from '@/components/molecules/InputButtonGroup/InputButtonGroup';\nimport InputCheckBoxGroup from '@/components/molecules/InputCheckBoxGroup/InputCheckBoxGroup';\nimport InputDropDownGroup from '@/components/molecules/InputDropDownGroup/InputDropDownGroup';\nimport InputFieldDateGroup from '@/components/molecules/InputFieldDateGroup/InputFieldDateGroup';\nimport InputFieldGroup from '@/components/molecules/InputFieldGroup/InputFieldGroup';\nimport InputFieldPhoneGroup from '@/components/molecules/InputFieldPhoneGroup/InputFieldPhoneGroup';\nimport InputPasswordGroup from '@/components/molecules/InputPasswordGroup/InputPasswordGroup';\nimport InputPlacesGroupGoogle from '@/components/molecules/InputPlacesGroupGoogle/InputPlacesGroupGoogle';\nimport InputRadioButtonsGroup from '@/components/molecules/InputRadioButtonsGroup/InputRadioButtonsGroup';\nimport InputTextAreaGroup from '@/components/molecules/InputTextAreaGroup/InputTextAreaGroup';\nimport InputToggleGroup from '@/components/molecules/InputToggleGroup/InputToggleGroup';\nimport ImageDisplayCropperWrapperGroup from '@/components/organisms/ImageDisplayCropperWrapperGroup/ImageDisplayCropperWrapperGroup';\nimport {\n  IImageUploadHandler,\n  OnCropFunction,\n} from '@/components/organisms/ImageUploadHandler/ImageUploadHandler';\nimport ImageUploadHandlerGroup from '@/components/organisms/ImageUploadHandlerGroup/ImageUploadHandlerGroup';\nimport ImageUploadTileField from '@/components/organisms/ImageUploadTileField/ImageUploadTileField';\nimport InputPlacesProvider from '@/components/organisms/InputPlacesProvider/InputPlacesProvider';\nimport { MultiPageFormConfigurationData } from '@/lib/hooks/multiPageForm/configs/Configuration';\nimport getErrorSetterForField from '@/lib/utils/helpers/formHelpers/getErrorSetterForField';\nimport maybeCallFunctionWithParams from '@/lib/utils/helpers/maybeCallFunctionWithParams/maybeCallFunctionWithParams';\nimport appendAttributeIfExists from '@/lib/utils/helpers/ObjectsHelpers/AppendAttributeIfExists';\nimport generateImageUrl from '@/lib/utils/helpers/photoHelpers/generateImageUrl';\nimport FormStorage from '@/lib/utils/storage/form-storage';\nimport {\n  IBaseField,\n  ICropperFormField,\n  IDividerFormField,\n  IDropDownFormField,\n  IFileInputFormField,\n  IImageDisplayCropperWrapperFormField,\n  IImageTilesFormField,\n  IInputButtonsFormField,\n  INodeFormField,\n  IRadioFormField,\n  ITextAreaFormField,\n} from './FieldPropTypes';\n\n/**\n * Interface for the Field Builder props\n *\n * @augments IBaseField\n * @interface IFieldBuilder\n */\ninterface IFieldBuilder extends IBaseField {\n  /**\n   * The optional formStorage\n   *\n   * @memberof IFieldBuilder\n   * @member {FormStorage} [formStorage]\n   */\n  formStorage?: FormStorage;\n  /**\n   * The current form data\n   *\n   * @memberof IFieldBuilder\n   * @member {MultiPageFormConfigurationData} [formData]\n   */\n  formData?: MultiPageFormConfigurationData;\n  /**\n   * A callback to set the hide submit value on the top level form\n   *\n   * @memberof IFieldBuilder\n   * @member {Function} [setHideSubmit]\n   * @param {boolean} hide - The hide value\n   * @returns {void}\n   */\n  setHideSubmit?: (hide: boolean) => void;\n}\n\n/**\n * Field Builder Field Builder Component for the Form Builder\n *\n * @param {IBaseField} props - The props for the Field Builder component\n * @returns {React.FC<IBaseField>} Form Builder Component\n */\nconst FieldBuilder: React.FC<IFieldBuilder> = ({\n  name,\n  label,\n  type,\n  errors,\n  setError,\n  register,\n  control,\n  classes = '',\n  fieldOptions,\n  backHandler,\n  forwardHandler,\n  readOnly,\n  formStorage,\n  setHideSubmit,\n  formData = {},\n}: IFieldBuilder) => {\n  return (() => {\n    switch (type) {\n      case 'text':\n        return (\n          <div className={classes}>\n            <InputFieldGroup\n              type=\"text\"\n              name={name}\n              label={label}\n              control={control}\n              error={errors}\n              readOnly={readOnly}\n            />\n          </div>\n        );\n      case 'number':\n        return (\n          <div className={classes}>\n            <InputFieldGroup\n              type=\"number\"\n              name={name}\n              label={label}\n              control={control}\n              error={errors}\n              readOnly={readOnly}\n              hideSpinner={fieldOptions?.number?.hideSpinner}\n            />\n          </div>\n        );\n      case 'textarea': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {ITextAreaFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          ITextAreaFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.textArea);\n        return (\n          <div className={classes}>\n            {fieldProps && (\n              <InputTextAreaGroup\n                name={name}\n                rows={fieldProps.rows}\n                label={label}\n                error={errors}\n                upperLabel={fieldProps.upperLabel}\n                floatingLabel={fieldProps.floatingLabel}\n                control={control}\n                readOnly={readOnly}\n              />\n            )}\n          </div>\n        );\n      }\n      case 'email':\n        return (\n          <div className={classes}>\n            <InputFieldGroup\n              type=\"email\"\n              name={name}\n              label={label}\n              control={control}\n              error={errors}\n              readOnly={readOnly}\n            />\n          </div>\n        );\n      case 'password':\n        return (\n          <div className={classes}>\n            <InputPasswordGroup\n              name={name}\n              label={label}\n              control={control}\n              error={errors}\n              readOnly={readOnly}\n              isNewPassword={fieldOptions?.password?.isNewPassword}\n            />\n          </div>\n        );\n      case 'resetPassword':\n        return (\n          <div className={classes}>\n            <InputPasswordGroup\n              name={name}\n              label={label}\n              control={control}\n              error={errors}\n              readOnly={readOnly}\n              isNewPassword={false}\n            />\n          </div>\n        );\n      case 'date':\n        return (\n          <div className={'pointer-events-none touch-none ' + classes}>\n            <InputFieldDateGroup\n              name={name}\n              label={label}\n              control={control}\n              error={errors}\n              readOnly={readOnly}\n            />\n          </div>\n        );\n      case 'checkbox':\n        return (\n          <div className={classes}>\n            <InputCheckBoxGroup\n              name={name}\n              label={label}\n              readOnly={readOnly}\n              register={register as IRegisterFunction}\n              error={errors}\n            />\n          </div>\n        );\n      case 'radio': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {IRadioFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          IRadioFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.radioButtons);\n        return (\n          <div className={classes}>\n            {fieldProps && (\n              <InputRadioButtonsGroup\n                name={name}\n                label={label}\n                size={fieldProps.size}\n                register={register as IRegisterFunction}\n                readOnly={readOnly}\n                error={errors}\n                wrapperClasses={fieldProps.wrapperClasses}\n                options={fieldProps.options}\n              />\n            )}\n          </div>\n        );\n      }\n      case 'file': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {IFileInputFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          IFileInputFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.fileInput);\n        return (\n          <div className={classes}>\n            {fieldOptions?.fileInput && (\n              <FileUploadGroup\n                name={name}\n                label={label}\n                error={errors}\n                upperLabel={fieldProps.upperLabel}\n                control={control}\n                readOnly={readOnly}\n              />\n            )}\n          </div>\n        );\n      }\n      case 'node': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {INodeFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          INodeFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.node);\n\n        return <div className={classes}>{fieldProps?.options}</div>;\n      }\n      case 'tel':\n        return (\n          <div className={classes}>\n            <InputFieldPhoneGroup\n              label={label}\n              name={name}\n              error={errors}\n              control={control}\n              readOnly={readOnly}\n            />\n          </div>\n        );\n      case 'uploadPhoto': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {IImageUploadHandler}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          IImageUploadHandler,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.imageUploadHandler);\n        return (\n          <div className={`flex justify-center ${classes}`}>\n            {fieldProps && (\n              <ImageUploadHandlerGroup\n                name={name}\n                control={control}\n                onCrop={fieldProps.onCrop || (forwardHandler as OnCropFunction)}\n                onChangeImage={\n                  fieldProps.onChangeImage ?? (backHandler as () => void)\n                }\n                quality={fieldProps.quality}\n                outputType=\"image/jpeg\"\n                uploadedImage={fieldProps.uploadedImage}\n              />\n            )}\n          </div>\n        );\n      }\n      case 'imageTiles': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {IImageTilesFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          IImageTilesFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.imageTiles);\n        return (\n          <div\n            data-testid=\"image-tiles-wrapper\"\n            className={`flex justify-center ${classes}`}\n          >\n            {fieldProps && fieldProps.petSpecies && (\n              <ImageUploadTileField\n                name={name}\n                control={control}\n                images={fieldProps?.images}\n                petSpecies={fieldProps?.petSpecies}\n                onImageUpload={() => setHideSubmit && setHideSubmit(true)}\n                onCropperClose={() => setHideSubmit && setHideSubmit(false)}\n                showCounter={fieldProps?.showCounter}\n                readOnly={readOnly}\n              />\n            )}\n          </div>\n        );\n      }\n      case 'cropPhoto': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {ICropperFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          ICropperFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.imageCropper);\n        return (\n          <div className={`flex justify-center ${classes}`}>\n            {fieldProps && formStorage && (\n              <ImageUploadHandlerGroup\n                name={name}\n                control={control}\n                uploadedImage={formStorage.get('photo') as string | undefined}\n                onCrop={forwardHandler as OnCropFunction}\n                onChangeImage={backHandler as () => void}\n                aspectRatio={fieldProps.aspectRatio}\n                outputType={fieldProps.outputType}\n                quality={fieldProps.quality}\n                submitLabel={fieldProps.submitLabel}\n              />\n            )}\n          </div>\n        );\n      }\n      case 'inputButtons': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {IInputButtonsFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          IInputButtonsFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.inputButtons);\n        return (\n          <div className={classes}>\n            {fieldProps && formStorage && (\n              <InputButtonGroup\n                name={name}\n                label={label}\n                orientation={fieldProps.orientation}\n                options={fieldProps.options}\n                control={control}\n                onChange={fieldProps.onChange}\n                currentValue={formStorage.get(name) as string | undefined}\n              />\n            )}\n          </div>\n        );\n      }\n      case 'dropDown': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {IDropDownFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          IDropDownFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.dropDown);\n        return (\n          <div className={classes}>\n            {fieldProps && (\n              <InputDropDownGroup\n                name={name}\n                label={label}\n                values={fieldProps.values}\n                control={control}\n                readOnly={readOnly}\n                error={errors}\n              />\n            )}\n          </div>\n        );\n      }\n      case 'location':\n        return (\n          <div className={classes}>\n            <InputPlacesProvider\n              name={name}\n              label={label}\n              control={control}\n              errors={errors}\n              readOnly={readOnly}\n            />\n          </div>\n        );\n      case 'locationGoogle':\n        return (\n          <div className={classes}>\n            <InputPlacesGroupGoogle\n              name={name}\n              label={label}\n              control={control}\n              error={errors}\n              readOnly={readOnly}\n              {...appendAttributeIfExists(\n                'setError',\n                setError && getErrorSetterForField(name, setError)\n              )}\n              {...fieldOptions?.locationGoogle}\n            />\n          </div>\n        );\n      case 'imageDisplayWrapper': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {IImageDisplayCropperWrapperFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          IImageDisplayCropperWrapperFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.imageDisplayWrapper);\n        return (\n          <div className={classes}>\n            {fieldProps && (\n              <ImageDisplayCropperWrapperGroup\n                control={control}\n                name={name}\n                image={generateImageUrl(fieldProps?.image)}\n              />\n            )}\n          </div>\n        );\n      }\n      case 'divider': {\n        /**\n         * The field props. The top level form can pass either the field options\n         * or a function to get the field options\n         *\n         * @constant {IDividerFormField}\n         */\n        const fieldProps = maybeCallFunctionWithParams<\n          IDividerFormField,\n          MultiPageFormConfigurationData\n        >(formData, fieldOptions?.divider);\n        return (\n          <div className={classes}>\n            {fieldProps && <Divider type={fieldProps?.type} />}\n          </div>\n        );\n      }\n      case 'toggle':\n        return (\n          <div className={'w-full ' + classes}>\n            <InputToggleGroup\n              label={label}\n              control={control}\n              name={name}\n              value={fieldOptions?.toggle?.value}\n            />\n          </div>\n        );\n      case 'facebookFormMessage': {\n        return (\n          <div className={classes}>\n            <FacebookFormMessage\n              context={formData.formContext as IFacebookFormMessageContext}\n              formData={formData}\n            />\n          </div>\n        );\n      }\n      default:\n        return (\n          <div className={classes}>\n            <InputFieldGroup\n              type=\"text\"\n              name={name}\n              label={label}\n              control={control}\n              error={errors}\n              readOnly={readOnly}\n            />\n          </div>\n        );\n    }\n  })();\n};\n\nexport default FieldBuilder;\n","import {\n  ICreatePhotoUploadPresignedItem,\n  ICreatePhotoUploadRequestData,\n  ValidImageMimeType,\n} from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/photoUpload/interfaces';\nimport { sdk } from '../common';\n\nexport const validImageMimeTypes = [\n  'image/jpeg',\n  'image/png',\n  'image/gif',\n  'video/mp4',\n  'video/quicktime',\n];\n\n/**\n * Upload Image File to the SDK\n *\n * @param {File} file - The image file to upload\n * @returns {Promise<ICreatePhotoUploadPresignedItem[]>} The uploaded image data\n */\nexport async function uploadImageFile(\n  file: File\n): Promise<ICreatePhotoUploadPresignedItem[]> {\n  try {\n    // Get Mime Type from File\n    const mimeType = file.type;\n    if (!validImageMimeTypes.includes(mimeType)) {\n      throw new Error(`Invalid image mime type: ${mimeType}`);\n    }\n    // Get Buffer from File\n    const buffer = await file.arrayBuffer();\n    // Create Request Data\n    const requestData: ICreatePhotoUploadRequestData = {\n      photos: [\n        {\n          data: buffer,\n          mimeType: mimeType as ValidImageMimeType,\n        },\n      ],\n    };\n    const response = await sdk.photoUpload({}).upload(requestData);\n    return response.data;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n\n/**\n * Upload Image DataURL to the SDK\n *\n * @param {string} image - The image data url string to upload\n * @returns {Promise<ICreatePhotoUploadPresignedItem[]>} The uploaded image data\n */\nexport async function uploadImageDataURL(\n  image: string\n): Promise<ICreatePhotoUploadPresignedItem[]> {\n  try {\n    // Convert Data URL to Buffer\n    const buffer = Buffer.from(image.split(',')[1], 'base64');\n    // Create Request Data\n    const requestData: ICreatePhotoUploadRequestData = {\n      photos: [\n        {\n          data: buffer,\n          mimeType: 'image/jpeg',\n        },\n      ],\n    };\n    const response = await sdk.photoUpload({}).upload(requestData);\n    return response.data;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n","import { sdk } from '@/lib/dataSource/lostApi/common';\nimport { ILocationCheckResponseData } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/social/targeting/dto';\n\n/**\n * Checks if a location is in the target market\n *\n * @param {number} latitude - The location latitude\n * @param {number} longitude - The location longitude\n * @returns {Promise<ILocationCheckResponseData>} Service response\n */\nexport async function checkTargetMarket(\n  latitude: number,\n  longitude: number\n): Promise<ILocationCheckResponseData> {\n  try {\n    const response = await sdk\n      .socialTargeting()\n      .checkLocation({ latitude, longitude });\n    return response.data;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n","import { ILocationDto } from '@/components/molecules/InputPlacesFieldGoogle/InputPlacesFieldGoogle';\nimport { flagFacebookIntegration } from '@/lib/constants/constants/featureFlags';\nimport { checkTargetMarket } from '@/lib/dataSource/lostApi/social/targeting/locationCheck';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useOptimizelyFeature } from '../featureFlags/useOptimizelyFeature';\n\n/**\n * The props for the useCheckSocialTargetMarket hook\n *\n * @interface IUseCheckSocialTargetMarketProps\n */\ninterface IUseCheckSocialTargetMarketProps {\n  /**\n   * The pet location object\n   *\n   * @memberof IUseCheckSocialTargetMarketProps\n   * @member {ILocationDto | null} [location]\n   */\n  location?: ILocationDto | null;\n}\n\n/**\n * The return data for the useCheckSocialTargetMarket hook\n *\n * @interface IUseCheckSocialTargetMarketData\n */\ninterface IUseCheckSocialTargetMarketData {\n  /**\n   * Wether the pet is on the social target market\n   *\n   * @memberof IUseCheckSocialTargetMarketData\n   * @member {boolean} isPetOnSocialTargetMarket\n   */\n  isPetOnSocialTargetMarket: boolean;\n}\n\n/**\n * Hook to check if the pet is on the social target market\n *\n * @param {IUseCheckSocialTargetMarketProps} props - The props for the hook\n * @returns {IUseCheckSocialTargetMarketData} - The return object of the hook\n */\nexport const useCheckSocialTargetMarket = ({\n  location,\n}: IUseCheckSocialTargetMarketProps): IUseCheckSocialTargetMarketData => {\n  const [isPetOnSocialTargetMarket, setIsPetOnSocialTargetMarket] =\n    useState(false);\n\n  const facebookIntegrationFlag = useOptimizelyFeature(flagFacebookIntegration);\n\n  // Set the is pet on social target market\n  const setIsPetOnSocialTargetMarketCallback = useCallback(async () => {\n    try {\n      const isTargetMarketResponse = await checkTargetMarket(\n        location?.coordinates.latitude as number,\n        location?.coordinates.longitude as number\n      );\n      setIsPetOnSocialTargetMarket(isTargetMarketResponse.isTargetMarket);\n    } catch (error) {\n      console.error(error);\n    }\n  }, [location]);\n\n  // Set the is pet on social target market with the callback function\n  useEffect(() => {\n    if (location?.coordinates && facebookIntegrationFlag) {\n      setIsPetOnSocialTargetMarketCallback();\n    }\n  }, [setIsPetOnSocialTargetMarketCallback, location, facebookIntegrationFlag]);\n\n  return {\n    isPetOnSocialTargetMarket,\n  };\n};\n","import Filter from 'bad-words';\n\nconst allowedWords = ['coon', 'willy', 'balls'];\n\n/**\n * A custom version of the bad-words filter with whitelisted/blacklisted words.\n *\n * @returns {Filter} A new instance of the bad-words filter\n */\nexport function badWordsFilter(): Filter {\n  const filter = new Filter();\n  filter.removeWords(...allowedWords);\n\n  return filter;\n}\n","/** The type of a function with an unknown number of params */\nexport type FunctionWithParams<T, Q extends unknown[]> = (...params: Q) => T;\n\n/**\n * Debounce Async\n *\n * @template T - The return type of the callback\n * @template Q - The params type of the callback\n * @param {FunctionWithParams<T, Q>} func - A callback function that takes\n *   params of type Q and returns T\n * @param {number} wait - The number of seconds to wait\n * @returns {Promise<T>} Because of the random nature of this function we need\n *   any's for the return\n */\nexport function debounceAsync<T, Q extends unknown[]>(\n  func: FunctionWithParams<T, Q>,\n  wait: number\n): (...funcArgs: Q) => Promise<T> {\n  let timeoutId: ReturnType<typeof setTimeout> | null = null;\n\n  return (...args: Q): Promise<T> => {\n    return new Promise((resolve) => {\n      if (timeoutId) {\n        clearTimeout(timeoutId);\n      }\n\n      timeoutId = setTimeout(async () => {\n        const result = await func(...args);\n        resolve(result);\n      }, wait);\n    });\n  };\n}\n","/** The Getter type */\nexport type Getter<T, Q> = (params: Q) => T;\n\n/** The Field Options Value or Getter type */\nexport type ValueOrGetter<T, Q = undefined> = T | Getter<T, Q>;\n\n/**\n * Conditionally call a function with params is the provided value is a function\n *\n * @template T - The type of value\n * @template Q - The type of function params\n * @param {Q} params - The params to pass to the function\n * @param {Function | T} maybeAFunction - The function or value\n * @returns {T} - The value\n */\nconst maybeCallFunctionWithParams = <T, Q = undefined>(\n  params: Q,\n  maybeAFunction?: ValueOrGetter<T, Q>\n): T => {\n  if (typeof maybeAFunction === 'function') {\n    return (maybeAFunction as Getter<T, Q>)(params);\n  }\n  return maybeAFunction as T;\n};\n\nexport default maybeCallFunctionWithParams;\n","import React from 'react';\n\n/**\n * IInterceptionMap\n *\n * @returns IInterceptionMap Interface\n * @interface\n */\nexport interface IInterceptionMap {\n  [key: string]: (() => void) | ((event: React.KeyboardEvent) => void);\n}\n\n/**\n * This class can be used to create Keyboard Event Interceptors\n *\n * @function getInterceptor - Function used by the class to get an interceptor\n *   for a key\n * @function interceptKeyboardEvent - Function used by the class to get an\n *   interceptor for a key\n * @property {object} interceptionMap - Object that maps keyboard event codes to\n *   interceptors\n */\nexport class KeyboardInterceptor {\n  private interceptionMap: IInterceptionMap = {};\n\n  /**\n   * Creates a new KeyboardInterceptor based on an interception map\n   *\n   * @param {object} interceptionMap - Object that maps keys to interceptors\n   */\n  constructor(interceptionMap: IInterceptionMap) {\n    this.interceptionMap = interceptionMap;\n  }\n\n  /**\n   * Tries to get an interceptor for a given key\n   *\n   * @param {object} keyboardEvent - React keyboard event object\n   * @returns {Function} Interceptor - The interceptor for the given key\n   */\n  getInterceptor(keyboardEvent: React.KeyboardEvent) {\n    const { key } = keyboardEvent;\n    return this.interceptionMap[key];\n  }\n\n  /**\n   * Intercept keyboard events\n   *\n   * @param {React.KeyboardEvent} keyboardEvent - React keyboard event object\n   */\n  interceptKeyboardEvent(keyboardEvent: React.KeyboardEvent) {\n    const interceptor = this.getInterceptor(keyboardEvent);\n\n    if (interceptor) {\n      keyboardEvent.preventDefault();\n      interceptor(keyboardEvent);\n    }\n  }\n}\n","import { sdk } from '@/lib/dataSource/lostApi/common';\nimport { IServiceMethodResponse } from '@petcolove/lost--client--api-sdk/dist/abstract/service/interfaces';\nimport { IUserExistsDto } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/auth/dto';\n\n/**\n * @param { string } email - Email of the User to Validate\n * @returns {Promise<boolean>} The details of the current user\n */\nexport default async function userExists(email: string): Promise<boolean> {\n  try {\n    const userExists: IServiceMethodResponse = await sdk\n      .userExists({})\n      .exists({\n        email: email\n      });\n    const data = userExists.data as IUserExistsDto;\n    return data.exists;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n","import { sdk } from '@/lib/dataSource/lostApi/common';\nimport { IServiceMethodResponse } from '@petcolove/lost--client--api-sdk/dist/abstract/service/interfaces';\n\n/**\n * @param {string} taxId - Tax ID to Validate\n * @returns {Promise<boolean>} Is the Tax ID being used\n */\nexport default async function taxIdExists(taxId: string): Promise<boolean> {\n  const response: IServiceMethodResponse = await sdk\n    .awoTaxIdExists()\n    .exists(taxId);\n  if (response.statusCode === 200) {\n    return false;\n  }\n  return true;\n}\n","import { IBaseField } from '@/components/organisms/FormBuilder/FieldPropTypes';\nimport userExists from '@/lib/dataSource/lostApi/auth/exists';\nimport taxIdExists from '@/lib/dataSource/lostApi/awo/tax/taxId';\nimport { badWordsFilter } from '@/lib/utils/badWordsFilter/badWordsFilter';\nimport { debounceAsync } from '@/lib/utils/debounceAsync/debounceAsync';\nimport * as yup from 'yup';\nimport { yupSequentialStringSchema } from './validationHelpers';\n\n/**\n * Validate User Doesn't Exist\n *\n * @param {string} value - The value to be validated\n * @param {yup.TestContext} values - The values needed to validate against\n */\nconst validateUserDoesNotExist = async (\n  value: string,\n  values: yup.TestContext<unknown>\n) => {\n  try {\n    const userDoesExist = await userExists(value);\n    if (userDoesExist) {\n      values.createError({ path: 'email', message: 'Email is already taken' });\n      return false;\n    } else {\n      return true;\n    }\n  } catch (e) {\n    values.createError({ path: 'email', message: 'Email is already taken' });\n    return false;\n  }\n};\n\n/**\n * Validate the AWO tax ID exists\n *\n * @param {string} value - The value to be validated\n * @param {yup.TestContext} values - The values needed to validate against\n */\nexport const validateTaxIdExists = async (\n  value?: string,\n  values?: yup.TestContext<unknown>\n) => {\n  if (!value || !values) return false;\n  try {\n    const taxIdDoesExist = await taxIdExists(value);\n    if (taxIdDoesExist) {\n      values.createError({ path: 'taxId', message: 'Tax ID is already taken' });\n      return false;\n    } else {\n      return true;\n    }\n  } catch (e) {\n    values.createError({ path: 'taxId', message: 'Tax ID is already taken' });\n    return false;\n  }\n};\n\n/**\n * Setup Debounced Version of the Validation to use a 100 second pause before\n * pinging the api\n *\n * @constant {Promise<Promise<boolean>>} debouncedUserCheck - Debounced User\n *   Check\n */\nconst debouncedUserCheck = debounceAsync(validateUserDoesNotExist, 100);\n\n/**\n * Setup Debounced Version of the Validation to use a 100 second pause before\n * pinging the api\n *\n * @constant {Promise<Promise<boolean>>} debouncedTaxIdCheck - Debounced Tax Id\n *   check\n */\nexport const debouncedTaxIdCheck = debounceAsync(validateTaxIdExists, 100);\n\n/**\n * Get Yup Type Used to get the correct yup type a given field type.\n *\n * @param {string} type - The Field Type (text, email, etc.)\n * @returns {yup.AnySchema} - The correct yup type for the given field type.\n */\nexport function getYupType(type: string): yup.AnySchema {\n  let yupType: yup.AnySchema = yup.string();\n  switch (type) {\n    case 'text':\n      yupType = yup.string();\n      break;\n    case 'number':\n      yupType = yup.number();\n      break;\n    case 'password':\n      yupType = yup\n        .string()\n        .min(8)\n        .matches(/\\d+/, {\n          message: 'Password must contain a number',\n        })\n        .matches(/[a-z]+/, {\n          message: 'Password must contain a lowercase character',\n        })\n        .matches(/[A-Z]+/, {\n          message: 'Password must contain an uppercase character',\n        })\n        .matches(/[!@#$%^&*()-+]+/, {\n          message: 'Password must contain a special character',\n        });\n      break;\n    case 'location':\n      yupType = yup.object();\n      break;\n    case 'dropDown':\n      yupType = yup.object();\n      break;\n    case 'uploadPhoto':\n      yupType = yup.object();\n      break;\n    case 'imageTiles':\n      yupType = yup.object().shape({\n        photo_1: yup.string().required('A main image is required'),\n        photo_2: yup.string().nullable(),\n        photo_3: yup.string().nullable(),\n        photo_4: yup.string().nullable(),\n      });\n      break;\n    case 'tel':\n      yupType = yup.string().matches(/^\\(\\d{3}\\) \\d{3}-\\d{4}$/, {\n        message: 'Please enter a valid phone number',\n        excludeEmptyString: true,\n      });\n      break;\n    case 'microchip':\n      yupType = yup\n        .string()\n        .nullable()\n        .test(\n          'is-valid-format',\n          'A valid microchip ID should contain only letters and numbers',\n          (value) => {\n            if (!value) {\n              return true;\n            }\n\n            const regex = /^[a-zA-Z0-9]*$/;\n\n            if (!regex.test(value)) {\n              return false;\n            }\n\n            return true;\n          }\n        )\n        .test(\n          'min-length',\n          'Microchip ID should be at least 8 characters',\n          (value) => {\n            if (!value) {\n              return true;\n            }\n\n            const minLength = 8;\n\n            return value.length >= minLength;\n          }\n        )\n        .test(\n          'max-length',\n          'Microchip ID should not exceed 100 characters',\n          (value) => {\n            if (!value) {\n              return true;\n            }\n\n            const maxLength = 100;\n\n            return value.length <= maxLength;\n          }\n        );\n      break;\n    case 'locationGoogle':\n      yupType = yup.object().shape({\n        city: yup\n          .string()\n          .nullable()\n          .max(100, 'City should not exceed 100 characters'),\n        region: yup\n          .string()\n          .required('Region is required')\n          .max(100, 'Region should not exceed 100 characters'),\n        postalCode: yup\n          .string()\n          .nullable()\n          .max(20, 'Postal code should not exceed 20 characters'),\n        streetAddress: yup\n          .string()\n          .nullable()\n          .max(150, 'Street address should not exceed 150 characters'),\n        coordinates: yup\n          .object()\n          .shape({\n            latitude: yup\n              .number()\n              .required('Latitude is required')\n              .min(-90, 'Latitude should be between -90 and 90')\n              .max(90, 'Latitude should be between -90 and 90'),\n            longitude: yup\n              .number()\n              .required('Longitude is required')\n              .min(-180, 'Longitude should be between -180 and 180')\n              .max(180, 'Longitude should be between -180 and 180'),\n          })\n          .required('Coordinates are required'),\n        country: yup\n          .string()\n          .required('Country is required')\n          .max(100, 'Country should not exceed 100 characters'),\n        label: yup\n          .string()\n          .nullable()\n          .max(150, 'Label should not exceed 150 characters'),\n      });\n  }\n  return yupType;\n}\n\n/**\n * Field Builder Validation Used to build all validation types for a given\n * field. Using Yup.\n *\n * @param {IBaseField} field - The field to build the validation for.\n * @returns {yup.AnySchema} - The correct yup type for the given field type.\n */\nexport function fieldBuilderValidation(field: IBaseField): yup.AnySchema {\n  const validations = field.validations;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  let yupField: any;\n  if (validations) {\n    yupField = getYupType(field.type);\n    validations.forEach((validation) => {\n      switch (validation.type) {\n        case 'required':\n          yupField = yupField.required(validation.message);\n          break;\n        case 'email':\n          yupField = yupField.email(validation.message);\n          break;\n        case 'min':\n          yupField = yupField.min(\n            validation.value as number,\n            validation.message\n          );\n          break;\n        case 'max':\n          yupField = yupField.max(\n            validation.value as number,\n            validation.message\n          );\n          break;\n        case 'hasSpecial':\n          yupField = yupField.matches(\n            /^(?=.*[!@#$%^&*()./])/,\n            validation.message\n          );\n          break;\n        case 'hasUpper':\n          yupField = yupField.matches(/^(?=.*[A-Z])/, validation.message);\n          break;\n        case 'hasLower':\n          yupField = yupField.matches(/^(?=.*[a-z])/, validation.message);\n          break;\n        case 'hasNumber':\n          yupField = yupField.matches(/^(?=.*[0-9])/, validation.message);\n          break;\n        case 'url':\n          yupField = yup\n            .string()\n            .required('Website URL is required')\n            /** Tests if the url string starts with http:// or https://. */\n            .test(\n              'starts-with-protocol-or-subdomain',\n              'Website URL must begin with http:// or https://',\n              (value) => {\n                let startsWithProtocol = false;\n                if (value) {\n                  /**\n                   * @constant {string[]} AllowedPrefixes - The allowed prefixes\n                   *   for the url\n                   */\n                  const allowedPrefixes = ['http://', 'https://'];\n                  startsWithProtocol = allowedPrefixes.some((prefix) =>\n                    value.startsWith(prefix)\n                  );\n                }\n                return startsWithProtocol;\n              }\n            )\n            /** Test if the value contains a common Top Level Domain (TLD) */\n            .test(\n              'contains-tld',\n              'Website URL must include top-level domain (e.g. .com, .org, .gov, etc.)',\n              (value) => {\n                let containsTopLevelDomain = false;\n                if (value) {\n                  /**\n                   * @constant {string[]} allowedTopLevelDomains - The allowed\n                   *   top-level domains\n                   */\n                  const allowedTopLevelDomains = [\n                    '.com',\n                    '.org',\n                    '.gov',\n                    '.net',\n                    '.ca',\n                    '.edu',\n                    '.io',\n                  ];\n                  containsTopLevelDomain = allowedTopLevelDomains.some((tld) =>\n                    value.includes(tld)\n                  );\n                }\n                return containsTopLevelDomain;\n              }\n            );\n          break;\n        case 'blockProfanity':\n          yupField = yup\n            .string()\n            .notRequired()\n            .test(\n              'block-profanity',\n              validation.message || 'Use of profanity is not accepted',\n              (value?: string, values?: yup.TestContext<unknown>) => {\n                if (value && values) {\n                  const filter = badWordsFilter();\n\n                  filter.removeWords('coon', 'willy');\n                  if (filter.isProfane(value)) {\n                    values.createError({\n                      path: values.path,\n                      message: 'Use of profanity is not accepted',\n                    });\n                    return false;\n                  } else {\n                    return true;\n                  }\n                }\n                return true;\n              }\n            );\n          break;\n        case 'newUser':\n          yupField = yupSequentialStringSchema([\n            yupField.required(),\n            yupField.email(),\n            yupField.test(\n              'Email is already taken',\n              validation.message,\n              async (value: string, values: yup.TestContext<unknown>) => {\n                return await debouncedUserCheck(value, values);\n              }\n            ),\n          ]);\n          break;\n        case 'customSchema':\n          yupField = validation.customSchema;\n\n          break;\n      }\n    });\n  }\n\n  return yupField;\n}\n\n/**\n * IForm Validation Builder Used as an interface for the form validation builder\n *\n * @interface\n */\nexport interface IFormBuilderValidation {\n  /** The field and the field validation using yup */\n  [key: string]: yup.AnySchema;\n}\n\n/**\n * Form Validation Builder Used to build all validation types for a given form.\n * Using Yup.\n *\n * @param {IBaseField[]} fields - The fields to build the validation for.\n * @returns {yup.ObjectSchema} - The form validation using yup.\n */\nexport function formValidationBuilder(fields: IBaseField[]) {\n  const schema: IFormBuilderValidation = {};\n  // Go through Each Field and Build out the Proper Validation\n  fields.forEach((field) => {\n    schema[field.name] = fieldBuilderValidation(field);\n  });\n\n  return yup.object().shape(schema);\n}\n","import * as yup from 'yup';\nimport { AnyObject } from 'yup/lib/types';\n\n/**\n * Allows for Sequential Schema Validation - this is not natively supported in\n * Yup. This allows us to not process our async request until after other\n * validation has taken place. Based on\n * https://github.com/jquense/yup/issues/851#issuecomment-931295671\n *\n * @param {yup.StringSchema[]} schemas - Schemas to validate against\n * @returns {yup.StringSchema<\n *   string | undefined,\n *   AnyObject,\n *   string | undefined\n * >}\n *   Validation\n */\nexport function yupSequentialStringSchema(\n  schemas: yup.StringSchema[]\n): yup.StringSchema<string | undefined, AnyObject, string | undefined> {\n  return yup.string().test(async (value, context) => {\n    try {\n      for (const schema of schemas) {\n        await schema.validate(value);\n      }\n    } catch (error: unknown) {\n      const message = (error as yup.ValidationError).message;\n      return context.createError({ message });\n    }\n\n    return true;\n  });\n}\n"],"names":["defaultIcon","icon","size","colorType","colorShade","__webpack_exports__","Z","name","error","label","onChange","disabled","uploadFiles","multiple","upperLabel","param","files","setFiles","useState","buttonHovered","setButtonHovered","useEffect","removeImage","newFiles","splice","index","iconClasses","classes","concat","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsxs","div","jsx","Paragraph","styling","className","button","onClick","document","getElementById","click","onMouseEnter","onMouseLeave","onBlur","Icon","input","id","type","accept","validImageMimeTypes","join","event","target","InputError","length","Divider","map","file","rows","value","required","readOnly","floatingLabel","inputValue","setInputValue","inputTextAreaClasses","cva","variants","state","default","readyOnly","inputDisabledClasses","inputErrorClasses","floating","currentState","labelClasses","labelDisabledClasses","Fragment","htmlFor","textarea","placeholder","aria-invalid","undefined","sizeClasses","small","base","checked","hover","focus","medium","InputRadioButton_InputRadioButton","register","rest","radioClasses","jsx_runtime","InputRadioButtonGroup_InputRadioButtonGroup","wrapperClasses","labelDisabledClass","InputLabel","InputRadioButton","span","InputRadioButtonsGroup_InputRadioButtonsGroup","options","inputClasses","radioButtonClasses","binary","multi","class","InputRadioButtonGroup","option","FacebookFormMessage_FacebookFormMessage","context","isTargetMarket","formData","loaded","setIsLoaded","isPetOnSocialTargetMarket","useCheckSocialTargetMarket","location","petLocation","FileUploadGroup_FileUploadGroup","control","Controller","render","field","ref","formOnChange","restField","FileUpload","inputRef","InputDropDownGroup_InputDropDownGroup","values","inputDropDownError","InputDropDown","countryToCountryCodeMap","US","CA","AU","MX","getPhoneCountryCodePrefix","country","countryCode","formatValue","pattern","formattedValue","substring","getStrippedValue","replace","getFormattedValue","strippedValue","formatPhoneForCountry","InputFieldPhone","forwardRef","inputFieldClasses","formatValueOnChange","addCountryCode","addCountryCodeFlag","hideError","inputValueForDisplay","setInputValueForDisplay","hasFocus","setHasFocus","addPhoneCountryCode","countryCodePrefix","handleBlur","useCallback","labelClass","inputClass","defaultLabelClasses","defaultInputClasses","maxLength","onFocus","valueWithoutCountryCode","removePhoneCountryCode","displayName","InputFieldPhoneGroup_InputFieldPhoneGroup","InputFieldPassword_InputFieldPassword","isNewPassword","showPassword","setShowPassword","password","setPassword","iconEye","iconEyeSlash","updateShowPassword","updatePassword","e","autoComplete","InputPasswordGroup_InputPasswordGroup","InputFieldPassword","InputTextAreaGroup_InputTextAreaGroup","InputTextArea","InputToggle_InputToggle","changeValue","Switch","twMerge","InputToggleGroup_InputToggleGroup","InputToggle","rotate","cropperRef","degree","cropper","current","zoom","amount","ImageCropper_ImageCropper","image","quality","outputType","aspectRatio","buttonDisabled","onCrop","onChangeImage","submitLabel","isLoading","createRef","Loading","title","Cropper","src","alt","initialAspectRatio","responsive","guides","dragMode","viewMode","Button","color","variant","ImageDisplayUpload_ImageDisplayUpload","handleClick","CdnImage","layout","objectFit","priority","sizes","getSpecies","data","species","sdk","inferSpecies","infer","fileToDataUrl","Promise","resolve","reject","reader","FileReader","onload","base64String","result","onerror","readAsDataURL","ImageDisplayCropperWrapper_ImageDisplayCropperWrapper","useImage","setUseImage","showCropper","setShowCropper","cropperLoading","setCropperLoading","dispatch","useToastContext","handleToast","message","toast","persistent","showIcon","cropImage","dataURL","getCroppedCanvas","toDataURL","uploadedImages","uploadImageDataURL","objectKey","toLocaleLowerCase","generateImageUrl","handleUpload","base64Image","ImageCropper","ImageDisplayUpload","ImageDisplayCropperWrapperGroup_ImageDisplayCropperWrapperGroup","ImageDisplayCropperWrapper","ImageUploader_ImageUploader","onDrop","getRootProps","getInputProps","isDragActive","useDropzone","Heading","allowedSpecies","ImageUploadHandler_ImageUploadHandler","uploadedImage","onUploadComplete","maxHeight","maxWidth","innerUploadedImage","setInnerUploadedImage","croppedImage","setCroppedImage","cropperButtonDisabled","setCropperButtonDisabled","handleCropImageError","includes","acceptedFiles","ImageUploader","ImageUploadHandlerGroup_ImageUploadHandlerGroup","ImageUploadHandler","ImageUploadTile_ImageUploadTile","text","placeHolderImage","onUpload","rank","onRemove","imageIsString","useMemo","width","height","ImageUploadTileGroup_ImageUploadTileGroup","petSpecies","showCounter","onImageUpload","onCropperClose","images","setImages","imageToCrop","setImageToCrop","imageRank","setImageRank","setImageHandler","newImages","photo_2","photo_3","photo_4","setCropImage","tileImages","main","process","fullBody","face","markings","onUploadBase","tileNumber","tileOne","photo_1","tileTwo","tileThree","tileFour","Object","keys","ImageUploadTile","ImageUploadTileField_ImageUploadTileField","ImageUploadTileGroup","getCredentialsFromIdentityPool","identityPoolId","region","credentials","fromCognitoIdentityPool","clientConfig","getLocationClient","LocationClient","config","AWSContext","createContext","locationClient","AWSProvider","children","setLocationClient","client","env","STORYBOOK_AWS_COGNITO_USER_POOL_ID","STORYBOOK_AWS_SERVICE_REGION","then","cognitoCredentials","AWS_SERVICE_REGION","Provider","useAWSClientContext","useContext","DropDownMenuKeyboardInterceptor","KeyboardInterceptor","constructor","selectResult","selectNextResult","selectPreviousResult","Enter","Tab","shiftKey","ArrowUp","ArrowDown","Escape","searchPlacesIndexForText","indexName","AWS_LOCATION_SERVICE_INDEX_NAME","filterCountries","maxResults","command","SearchPlaceIndexForTextCommand","IndexName","Text","MaxResults","FilterCountries","send","InputPlacesField_InputPlacesField","awsClientContext","results","setResults","selectedIndex","setSelectedIndex","selectedResult","_setSelectedResult","Place","Label","isComponentFocused","useComponentFocused","resetInputPlacesField","setSelectedResult","searchPlaces","searchTerm","response","Results","onKeyDown","interceptor","interceptKeyboardEvent","Listbox","as","find","PlaceId","InputField","Transition","show","enter","enterFrom","leave","leaveFrom","leaveTo","Options","static","Option","selected","InputPlacesGroup_InputPlacesGroup","inputFieldLabel","InputPlacesField","InputPlacesProvider_InputPlacesProvider","errors","awsConfig","setAwsConfig","InputPlacesGroup","formHelpers_getErrorSetterForField","fieldName","setError","FormBuilder_FieldBuilder","fieldOptions","backHandler","forwardHandler","formStorage","setHideSubmit","fieldProps","InputFieldGroup","hideSpinner","number","maybeCallFunctionWithParams","textArea","InputTextAreaGroup","InputPasswordGroup","InputFieldDateGroup","InputCheckBoxGroup","radioButtons","InputRadioButtonsGroup","fileInput","FileUploadGroup","node","InputFieldPhoneGroup","imageUploadHandler","ImageUploadHandlerGroup","imageTiles","ImageUploadTileField","imageCropper","get","inputButtons","InputButtonGroup","orientation","currentValue","dropDown","InputDropDownGroup","InputPlacesProvider","InputPlacesGroupGoogle","appendAttributeIfExists","getErrorSetterForField","locationGoogle","imageDisplayWrapper","ImageDisplayCropperWrapperGroup","divider","InputToggleGroup","toggle","FacebookFormMessage","formContext","uploadImageFile","mimeType","buffer","arrayBuffer","photoUpload","upload","photos","Buffer","from","split","checkTargetMarket","latitude","longitude","socialTargeting","checkLocation","setIsPetOnSocialTargetMarket","facebookIntegrationFlag","useOptimizelyFeature","flagFacebookIntegration","setIsPetOnSocialTargetMarketCallback","isTargetMarketResponse","coordinates","allowedWords","badWordsFilter","filter","Filter","removeWords","debounceAsync","func","wait","timeoutId","args","clearTimeout","setTimeout","params","maybeAFunction","getInterceptor","keyboardEvent","key","interceptionMap","preventDefault","userExists","email","exists","taxIdExists","taxId","awoTaxIdExists","statusCode","validateUserDoesNotExist","userDoesExist","createError","path","validateTaxIdExists","taxIdDoesExist","debouncedUserCheck","debouncedTaxIdCheck","formValidationBuilder","fields","schema","forEach","fieldBuilderValidation","yupField","validations","getYupType","yupType","yup","min","matches","shape","nullable","excludeEmptyString","test","regex","city","max","postalCode","streetAddress","validation","startsWithProtocol","allowedPrefixes","some","startsWith","prefix","containsTopLevelDomain","allowedTopLevelDomains","tld","notRequired","isProfane","yupSequentialStringSchema","customSchema","schemas","validate"],"sourceRoot":""}