UNPKG

209 kBSource Map (JSON)View Raw
1{"version":3,"file":"index.esm.mjs","sources":["../src/utils/isCheckBoxInput.ts","../src/utils/isDateObject.ts","../src/utils/isNullOrUndefined.ts","../src/utils/isObject.ts","../src/logic/getEventValue.ts","../src/logic/getNodeParentName.ts","../src/logic/isNameInFieldArray.ts","../src/utils/isPlainObject.ts","../src/utils/isWeb.ts","../src/utils/cloneObject.ts","../src/utils/compact.ts","../src/utils/isUndefined.ts","../src/utils/get.ts","../src/utils/isBoolean.ts","../src/utils/isKey.ts","../src/utils/stringToPath.ts","../src/utils/set.ts","../src/constants.ts","../src/useFormContext.tsx","../src/logic/getProxyFormState.ts","../src/utils/isEmptyObject.ts","../src/logic/shouldRenderFormState.ts","../src/utils/convertToArrayPayload.ts","../src/logic/shouldSubscribeByName.ts","../src/useSubscribe.ts","../src/useFormState.ts","../src/utils/isString.ts","../src/logic/generateWatchOutput.ts","../src/useWatch.ts","../src/useController.ts","../src/controller.tsx","../src/form.tsx","../src/logic/appendErrors.ts","../src/logic/generateId.ts","../src/logic/getFocusFieldName.ts","../src/logic/getValidationModes.ts","../src/logic/isWatched.ts","../src/logic/iterateFieldsByAction.ts","../src/logic/updateFieldArrayRootError.ts","../src/utils/isFileInput.ts","../src/utils/isFunction.ts","../src/utils/isHTMLElement.ts","../src/utils/isMessage.ts","../src/utils/isRadioInput.ts","../src/utils/isRegex.ts","../src/logic/getCheckboxValue.ts","../src/logic/getRadioValue.ts","../src/logic/getValidateError.ts","../src/logic/getValueAndMessage.ts","../src/logic/validateField.ts","../src/utils/append.ts","../src/utils/fillEmptyArray.ts","../src/utils/insert.ts","../src/utils/move.ts","../src/utils/prepend.ts","../src/utils/remove.ts","../src/utils/swap.ts","../src/utils/unset.ts","../src/utils/update.ts","../src/useFieldArray.ts","../src/utils/createSubject.ts","../src/utils/isPrimitive.ts","../src/utils/deepEqual.ts","../src/utils/isMultipleSelect.ts","../src/utils/isRadioOrCheckbox.ts","../src/utils/live.ts","../src/utils/objectHasFunction.ts","../src/logic/getDirtyFields.ts","../src/logic/getFieldValueAs.ts","../src/logic/getFieldValue.ts","../src/logic/getResolverOptions.ts","../src/logic/getRuleValue.ts","../src/logic/hasValidation.ts","../src/logic/schemaErrorLookup.ts","../src/logic/skipValidation.ts","../src/logic/unsetEmptyArray.ts","../src/logic/createFormControl.ts","../src/useForm.ts"],"sourcesContent":["import { FieldElement } from '../types';\n\nexport default (element: FieldElement): element is HTMLInputElement =>\n element.type === 'checkbox';\n","export default (value: unknown): value is Date => value instanceof Date;\n","export default (value: unknown): value is null | undefined => value == null;\n","import isDateObject from './isDateObject';\nimport isNullOrUndefined from './isNullOrUndefined';\n\nexport const isObjectType = (value: unknown): value is object =>\n typeof value === 'object';\n\nexport default <T extends object>(value: unknown): value is T =>\n !isNullOrUndefined(value) &&\n !Array.isArray(value) &&\n isObjectType(value) &&\n !isDateObject(value);\n","import isCheckBoxInput from '../utils/isCheckBoxInput';\nimport isObject from '../utils/isObject';\n\ntype Event = { target: any };\n\nexport default (event: unknown) =>\n isObject(event) && (event as Event).target\n ? isCheckBoxInput((event as Event).target)\n ? (event as Event).target.checked\n : (event as Event).target.value\n : event;\n","export default (name: string) =>\n name.substring(0, name.search(/\\.\\d+(\\.|$)/)) || name;\n","import { InternalFieldName } from '../types';\n\nimport getNodeParentName from './getNodeParentName';\n\nexport default (names: Set<InternalFieldName>, name: InternalFieldName) =>\n names.has(getNodeParentName(name));\n","import isObject from './isObject';\n\nexport default (tempObject: object) => {\n const prototypeCopy =\n tempObject.constructor && tempObject.constructor.prototype;\n\n return (\n isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf')\n );\n};\n","export default typeof window !== 'undefined' &&\n typeof window.HTMLElement !== 'undefined' &&\n typeof document !== 'undefined';\n","import isObject from './isObject';\nimport isPlainObject from './isPlainObject';\nimport isWeb from './isWeb';\n\nexport default function cloneObject<T>(data: T): T {\n let copy: any;\n const isArray = Array.isArray(data);\n\n if (data instanceof Date) {\n copy = new Date(data);\n } else if (data instanceof Set) {\n copy = new Set(data);\n } else if (\n !(isWeb && (data instanceof Blob || data instanceof FileList)) &&\n (isArray || isObject(data))\n ) {\n copy = isArray ? [] : {};\n\n if (!isArray && !isPlainObject(data)) {\n copy = data;\n } else {\n for (const key in data) {\n if (data.hasOwnProperty(key)) {\n copy[key] = cloneObject(data[key]);\n }\n }\n }\n } else {\n return data;\n }\n\n return copy;\n}\n","export default <TValue>(value: TValue[]) =>\n Array.isArray(value) ? value.filter(Boolean) : [];\n","export default (val: unknown): val is undefined => val === undefined;\n","import compact from './compact';\nimport isNullOrUndefined from './isNullOrUndefined';\nimport isObject from './isObject';\nimport isUndefined from './isUndefined';\n\nexport default <T>(object: T, path?: string, defaultValue?: unknown): any => {\n if (!path || !isObject(object)) {\n return defaultValue;\n }\n\n const result = compact(path.split(/[,[\\].]+?/)).reduce(\n (result, key) =>\n isNullOrUndefined(result) ? result : result[key as keyof {}],\n object,\n );\n\n return isUndefined(result) || result === object\n ? isUndefined(object[path as keyof T])\n ? defaultValue\n : object[path as keyof T]\n : result;\n};\n","export default (value: unknown): value is boolean => typeof value === 'boolean';\n","export default (value: string) => /^\\w*$/.test(value);\n","import compact from './compact';\n\nexport default (input: string): string[] =>\n compact(input.replace(/[\"|']|\\]/g, '').split(/\\.|\\[/));\n","import { FieldValues } from '../types';\n\nimport isKey from './isKey';\nimport isObject from './isObject';\nimport stringToPath from './stringToPath';\n\nexport default (object: FieldValues, path: string, value?: unknown) => {\n let index = -1;\n const tempPath = isKey(path) ? [path] : stringToPath(path);\n const length = tempPath.length;\n const lastIndex = length - 1;\n\n while (++index < length) {\n const key = tempPath[index];\n let newValue = value;\n\n if (index !== lastIndex) {\n const objValue = object[key];\n newValue =\n isObject(objValue) || Array.isArray(objValue)\n ? objValue\n : !isNaN(+tempPath[index + 1])\n ? []\n : {};\n }\n\n if (key === '__proto__') {\n return;\n }\n\n object[key] = newValue;\n object = object[key];\n }\n return object;\n};\n","export const EVENTS = {\n BLUR: 'blur',\n FOCUS_OUT: 'focusout',\n CHANGE: 'change',\n} as const;\n\nexport const VALIDATION_MODE = {\n onBlur: 'onBlur',\n onChange: 'onChange',\n onSubmit: 'onSubmit',\n onTouched: 'onTouched',\n all: 'all',\n} as const;\n\nexport const INPUT_VALIDATION_RULES = {\n max: 'max',\n min: 'min',\n maxLength: 'maxLength',\n minLength: 'minLength',\n pattern: 'pattern',\n required: 'required',\n validate: 'validate',\n} as const;\n","import React from 'react';\n\nimport { FieldValues, FormProviderProps, UseFormReturn } from './types';\n\nconst HookFormContext = React.createContext<UseFormReturn | null>(null);\n\n/**\n * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @returns return all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nexport const useFormContext = <\n TFieldValues extends FieldValues,\n TContext = any,\n TransformedValues extends FieldValues | undefined = undefined,\n>(): UseFormReturn<TFieldValues, TContext, TransformedValues> =>\n React.useContext(HookFormContext) as UseFormReturn<\n TFieldValues,\n TContext,\n TransformedValues\n >;\n\n/**\n * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @param props - all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nexport const FormProvider = <\n TFieldValues extends FieldValues,\n TContext = any,\n TTransformedValues extends FieldValues | undefined = undefined,\n>(\n props: FormProviderProps<TFieldValues, TContext, TTransformedValues>,\n) => {\n const { children, ...data } = props;\n return (\n <HookFormContext.Provider value={data as unknown as UseFormReturn}>\n {children}\n </HookFormContext.Provider>\n );\n};\n","import { VALIDATION_MODE } from '../constants';\nimport { Control, FieldValues, FormState, ReadFormState } from '../types';\n\nexport default <TFieldValues extends FieldValues, TContext = any>(\n formState: FormState<TFieldValues>,\n control: Control<TFieldValues, TContext>,\n localProxyFormState?: ReadFormState,\n isRoot = true,\n) => {\n const result = {\n defaultValues: control._defaultValues,\n } as typeof formState;\n\n for (const key in formState) {\n Object.defineProperty(result, key, {\n get: () => {\n const _key = key as keyof FormState<TFieldValues> & keyof ReadFormState;\n\n if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {\n control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;\n }\n\n localProxyFormState && (localProxyFormState[_key] = true);\n return formState[_key];\n },\n });\n }\n\n return result;\n};\n","import { EmptyObject } from '../types';\n\nimport isObject from './isObject';\n\nexport default (value: unknown): value is EmptyObject =>\n isObject(value) && !Object.keys(value).length;\n","import { VALIDATION_MODE } from '../constants';\nimport {\n Control,\n FieldValues,\n FormState,\n InternalFieldName,\n ReadFormState,\n} from '../types';\nimport isEmptyObject from '../utils/isEmptyObject';\n\nexport default <T extends FieldValues, K extends ReadFormState>(\n formStateData: Partial<FormState<T>> & { name?: InternalFieldName },\n _proxyFormState: K,\n updateFormState: Control<T>['_updateFormState'],\n isRoot?: boolean,\n) => {\n updateFormState(formStateData);\n const { name, ...formState } = formStateData;\n\n return (\n isEmptyObject(formState) ||\n Object.keys(formState).length >= Object.keys(_proxyFormState).length ||\n Object.keys(formState).find(\n (key) =>\n _proxyFormState[key as keyof ReadFormState] ===\n (!isRoot || VALIDATION_MODE.all),\n )\n );\n};\n","export default <T>(value: T) => (Array.isArray(value) ? value : [value]);\n","import convertToArrayPayload from '../utils/convertToArrayPayload';\n\nexport default <T extends string | string[] | undefined>(\n name?: T,\n signalName?: string,\n exact?: boolean,\n) =>\n !name ||\n !signalName ||\n name === signalName ||\n convertToArrayPayload(name).some(\n (currentName) =>\n currentName &&\n (exact\n ? currentName === signalName\n : currentName.startsWith(signalName) ||\n signalName.startsWith(currentName)),\n );\n","import React from 'react';\n\nimport { Subject } from './utils/createSubject';\n\ntype Props<T> = {\n disabled?: boolean;\n subject: Subject<T>;\n next: (value: T) => void;\n};\n\nexport function useSubscribe<T>(props: Props<T>) {\n const _props = React.useRef(props);\n _props.current = props;\n\n React.useEffect(() => {\n const subscription =\n !props.disabled &&\n _props.current.subject &&\n _props.current.subject.subscribe({\n next: _props.current.next,\n });\n\n return () => {\n subscription && subscription.unsubscribe();\n };\n }, [props.disabled]);\n}\n","import React from 'react';\n\nimport getProxyFormState from './logic/getProxyFormState';\nimport shouldRenderFormState from './logic/shouldRenderFormState';\nimport shouldSubscribeByName from './logic/shouldSubscribeByName';\nimport {\n FieldValues,\n FormState,\n InternalFieldName,\n UseFormStateProps,\n UseFormStateReturn,\n} from './types';\nimport { useFormContext } from './useFormContext';\nimport { useSubscribe } from './useSubscribe';\n\n/**\n * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)\n *\n * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, control } = useForm({\n * defaultValues: {\n * firstName: \"firstName\"\n * }});\n * const { dirtyFields } = useFormState({\n * control\n * });\n * const onSubmit = (data) => console.log(data);\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input {...register(\"firstName\")} placeholder=\"First Name\" />\n * {dirtyFields.firstName && <p>Field is dirty.</p>}\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nfunction useFormState<TFieldValues extends FieldValues = FieldValues>(\n props?: UseFormStateProps<TFieldValues>,\n): UseFormStateReturn<TFieldValues> {\n const methods = useFormContext<TFieldValues>();\n const { control = methods.control, disabled, name, exact } = props || {};\n const [formState, updateFormState] = React.useState(control._formState);\n const _mounted = React.useRef(true);\n const _localProxyFormState = React.useRef({\n isDirty: false,\n isLoading: false,\n dirtyFields: false,\n touchedFields: false,\n validatingFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n });\n const _name = React.useRef(name);\n\n _name.current = name;\n\n useSubscribe({\n disabled,\n next: (\n value: Partial<FormState<TFieldValues>> & { name?: InternalFieldName },\n ) =>\n _mounted.current &&\n shouldSubscribeByName(\n _name.current as InternalFieldName,\n value.name,\n exact,\n ) &&\n shouldRenderFormState(\n value,\n _localProxyFormState.current,\n control._updateFormState,\n ) &&\n updateFormState({\n ...control._formState,\n ...value,\n }),\n subject: control._subjects.state,\n });\n\n React.useEffect(() => {\n _mounted.current = true;\n _localProxyFormState.current.isValid && control._updateValid(true);\n\n return () => {\n _mounted.current = false;\n };\n }, [control]);\n\n return getProxyFormState(\n formState,\n control,\n _localProxyFormState.current,\n false,\n );\n}\n\nexport { useFormState };\n","export default (value: unknown): value is string => typeof value === 'string';\n","import { DeepPartial, FieldValues, Names } from '../types';\nimport get from '../utils/get';\nimport isString from '../utils/isString';\n\nexport default <T>(\n names: string | string[] | undefined,\n _names: Names,\n formValues?: FieldValues,\n isGlobal?: boolean,\n defaultValue?: DeepPartial<T> | unknown,\n) => {\n if (isString(names)) {\n isGlobal && _names.watch.add(names);\n return get(formValues, names, defaultValue);\n }\n\n if (Array.isArray(names)) {\n return names.map(\n (fieldName) => (\n isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)\n ),\n );\n }\n\n isGlobal && (_names.watchAll = true);\n\n return formValues;\n};\n","import React from 'react';\n\nimport generateWatchOutput from './logic/generateWatchOutput';\nimport shouldSubscribeByName from './logic/shouldSubscribeByName';\nimport cloneObject from './utils/cloneObject';\nimport {\n Control,\n DeepPartialSkipArrayKey,\n FieldPath,\n FieldPathValue,\n FieldPathValues,\n FieldValues,\n InternalFieldName,\n UseWatchProps,\n} from './types';\nimport { useFormContext } from './useFormContext';\nimport { useSubscribe } from './useSubscribe';\n\n/**\n * Subscribe to the entire form values change and re-render at the hook level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @param props - defaultValue, disable subscription and match exact name.\n *\n * @example\n * ```tsx\n * const { control } = useForm();\n * const values = useWatch({\n * control,\n * defaultValue: {\n * name: \"data\"\n * },\n * exact: false,\n * })\n * ```\n */\nexport function useWatch<\n TFieldValues extends FieldValues = FieldValues,\n>(props: {\n defaultValue?: DeepPartialSkipArrayKey<TFieldValues>;\n control?: Control<TFieldValues>;\n disabled?: boolean;\n exact?: boolean;\n}): DeepPartialSkipArrayKey<TFieldValues>;\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @param props - defaultValue, disable subscription and match exact name.\n *\n * @example\n * ```tsx\n * const { control } = useForm();\n * const values = useWatch({\n * control,\n * name: \"fieldA\",\n * defaultValue: \"default value\",\n * exact: false,\n * })\n * ```\n */\nexport function useWatch<\n TFieldValues extends FieldValues = FieldValues,\n TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(props: {\n name: TFieldName;\n defaultValue?: FieldPathValue<TFieldValues, TFieldName>;\n control?: Control<TFieldValues>;\n disabled?: boolean;\n exact?: boolean;\n}): FieldPathValue<TFieldValues, TFieldName>;\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @param props - defaultValue, disable subscription and match exact name.\n *\n * @example\n * ```tsx\n * const { control } = useForm();\n * const values = useWatch({\n * control,\n * name: [\"fieldA\", \"fieldB\"],\n * defaultValue: {\n * fieldA: \"data\",\n * fieldB: \"data\"\n * },\n * exact: false,\n * })\n * ```\n */\nexport function useWatch<\n TFieldValues extends FieldValues = FieldValues,\n TFieldNames extends readonly FieldPath<TFieldValues>[] = readonly FieldPath<TFieldValues>[],\n>(props: {\n name: readonly [...TFieldNames];\n defaultValue?: DeepPartialSkipArrayKey<TFieldValues>;\n control?: Control<TFieldValues>;\n disabled?: boolean;\n exact?: boolean;\n}): FieldPathValues<TFieldValues, TFieldNames>;\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * // can skip passing down the control into useWatch if the form is wrapped with the FormProvider\n * const values = useWatch()\n * ```\n */\nexport function useWatch<\n TFieldValues extends FieldValues = FieldValues,\n>(): DeepPartialSkipArrayKey<TFieldValues>;\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * const { control } = useForm();\n * const values = useWatch({\n * name: \"fieldName\"\n * control,\n * })\n * ```\n */\nexport function useWatch<TFieldValues extends FieldValues>(\n props?: UseWatchProps<TFieldValues>,\n) {\n const methods = useFormContext();\n const {\n control = methods.control,\n name,\n defaultValue,\n disabled,\n exact,\n } = props || {};\n const _name = React.useRef(name);\n\n _name.current = name;\n\n useSubscribe({\n disabled,\n subject: control._subjects.values,\n next: (formState: { name?: InternalFieldName; values?: FieldValues }) => {\n if (\n shouldSubscribeByName(\n _name.current as InternalFieldName,\n formState.name,\n exact,\n )\n ) {\n updateValue(\n cloneObject(\n generateWatchOutput(\n _name.current as InternalFieldName | InternalFieldName[],\n control._names,\n formState.values || control._formValues,\n false,\n defaultValue,\n ),\n ),\n );\n }\n },\n });\n\n const [value, updateValue] = React.useState(\n control._getWatch(\n name as InternalFieldName,\n defaultValue as DeepPartialSkipArrayKey<TFieldValues>,\n ),\n );\n\n React.useEffect(() => control._removeUnmounted());\n\n return value;\n}\n","import React from 'react';\n\nimport getEventValue from './logic/getEventValue';\nimport isNameInFieldArray from './logic/isNameInFieldArray';\nimport cloneObject from './utils/cloneObject';\nimport get from './utils/get';\nimport isBoolean from './utils/isBoolean';\nimport isUndefined from './utils/isUndefined';\nimport set from './utils/set';\nimport { EVENTS } from './constants';\nimport {\n ControllerFieldState,\n Field,\n FieldPath,\n FieldPathValue,\n FieldValues,\n InternalFieldName,\n UseControllerProps,\n UseControllerReturn,\n} from './types';\nimport { useFormContext } from './useFormContext';\nimport { useFormState } from './useFormState';\nimport { useWatch } from './useWatch';\n\n/**\n * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns field properties, field and form state. {@link UseControllerReturn}\n *\n * @example\n * ```tsx\n * function Input(props) {\n * const { field, fieldState, formState } = useController(props);\n * return (\n * <div>\n * <input {...field} placeholder={props.name} />\n * <p>{fieldState.isTouched && \"Touched\"}</p>\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * </div>\n * );\n * }\n * ```\n */\nexport function useController<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(\n props: UseControllerProps<TFieldValues, TName>,\n): UseControllerReturn<TFieldValues, TName> {\n const methods = useFormContext<TFieldValues>();\n const { name, disabled, control = methods.control, shouldUnregister } = props;\n const isArrayField = isNameInFieldArray(control._names.array, name);\n const value = useWatch({\n control,\n name,\n defaultValue: get(\n control._formValues,\n name,\n get(control._defaultValues, name, props.defaultValue),\n ),\n exact: true,\n }) as FieldPathValue<TFieldValues, TName>;\n const formState = useFormState({\n control,\n name,\n });\n\n const _registerProps = React.useRef(\n control.register(name, {\n ...props.rules,\n value,\n ...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),\n }),\n );\n\n React.useEffect(() => {\n const _shouldUnregisterField =\n control._options.shouldUnregister || shouldUnregister;\n\n const updateMounted = (name: InternalFieldName, value: boolean) => {\n const field: Field = get(control._fields, name);\n\n if (field && field._f) {\n field._f.mount = value;\n }\n };\n\n updateMounted(name, true);\n\n if (_shouldUnregisterField) {\n const value = cloneObject(get(control._options.defaultValues, name));\n set(control._defaultValues, name, value);\n if (isUndefined(get(control._formValues, name))) {\n set(control._formValues, name, value);\n }\n }\n\n return () => {\n (\n isArrayField\n ? _shouldUnregisterField && !control._state.action\n : _shouldUnregisterField\n )\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, isArrayField, shouldUnregister]);\n\n React.useEffect(() => {\n if (get(control._fields, name)) {\n control._updateDisabledField({\n disabled,\n fields: control._fields,\n name,\n value: get(control._fields, name)._f.value,\n });\n }\n }, [disabled, name, control]);\n\n return {\n field: {\n name,\n value,\n ...(isBoolean(disabled) || formState.disabled\n ? { disabled: formState.disabled || disabled }\n : {}),\n onChange: React.useCallback(\n (event) =>\n _registerProps.current.onChange({\n target: {\n value: getEventValue(event),\n name: name as InternalFieldName,\n },\n type: EVENTS.CHANGE,\n }),\n [name],\n ),\n onBlur: React.useCallback(\n () =>\n _registerProps.current.onBlur({\n target: {\n value: get(control._formValues, name),\n name: name as InternalFieldName,\n },\n type: EVENTS.BLUR,\n }),\n [name, control],\n ),\n ref: (elm) => {\n const field = get(control._fields, name);\n\n if (field && elm) {\n field._f.ref = {\n focus: () => elm.focus(),\n select: () => elm.select(),\n setCustomValidity: (message: string) =>\n elm.setCustomValidity(message),\n reportValidity: () => elm.reportValidity(),\n };\n }\n },\n },\n formState,\n fieldState: Object.defineProperties(\n {},\n {\n invalid: {\n enumerable: true,\n get: () => !!get(formState.errors, name),\n },\n isDirty: {\n enumerable: true,\n get: () => !!get(formState.dirtyFields, name),\n },\n isTouched: {\n enumerable: true,\n get: () => !!get(formState.touchedFields, name),\n },\n isValidating: {\n enumerable: true,\n get: () => !!get(formState.validatingFields, name),\n },\n error: {\n enumerable: true,\n get: () => get(formState.errors, name),\n },\n },\n ) as ControllerFieldState,\n };\n}\n","import { ControllerProps, FieldPath, FieldValues } from './types';\nimport { useController } from './useController';\n\n/**\n * Component based on `useController` hook to work with controlled component.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns provide field handler functions, field and form state.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control } = useForm<FormValues>({\n * defaultValues: {\n * test: \"\"\n * }\n * });\n *\n * return (\n * <form>\n * <Controller\n * control={control}\n * name=\"test\"\n * render={({ field: { onChange, onBlur, value, ref }, formState, fieldState }) => (\n * <>\n * <input\n * onChange={onChange} // send value to hook form\n * onBlur={onBlur} // notify when input is touched\n * value={value} // return updated value\n * ref={ref} // set ref for focus management\n * />\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * <p>{fieldState.isTouched ? \"touched\" : \"\"}</p>\n * </>\n * )}\n * />\n * </form>\n * );\n * }\n * ```\n */\nconst Controller = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(\n props: ControllerProps<TFieldValues, TName>,\n) => props.render(useController<TFieldValues, TName>(props));\n\nexport { Controller };\n","import React from 'react';\n\nimport get from './utils/get';\nimport { FieldValues, FormProps } from './types';\nimport { useFormContext } from './useFormContext';\n\nconst POST_REQUEST = 'post';\n\n/**\n * Form component to manage submission.\n *\n * @param props - to setup submission detail. {@link FormProps}\n *\n * @returns form component or headless render prop.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control, formState: { errors } } = useForm();\n *\n * return (\n * <Form action=\"/api\" control={control}>\n * <input {...register(\"name\")} />\n * <p>{errors?.root?.server && 'Server error'}</p>\n * <button>Submit</button>\n * </Form>\n * );\n * }\n * ```\n */\nfunction Form<\n T extends FieldValues,\n U extends FieldValues | undefined = undefined,\n>(props: FormProps<T, U>) {\n const methods = useFormContext<T>();\n const [mounted, setMounted] = React.useState(false);\n const {\n control = methods.control,\n onSubmit,\n children,\n action,\n method = POST_REQUEST,\n headers,\n encType,\n onError,\n render,\n onSuccess,\n validateStatus,\n ...rest\n } = props;\n\n const submit = async (event?: React.BaseSyntheticEvent) => {\n let hasError = false;\n let type = '';\n\n await control.handleSubmit(async (data) => {\n const formData = new FormData();\n let formDataJson = '';\n\n try {\n formDataJson = JSON.stringify(data);\n } catch {}\n\n for (const name of control._names.mount) {\n formData.append(name, get(data, name));\n }\n\n if (onSubmit) {\n await onSubmit({\n data,\n event,\n method,\n formData,\n formDataJson,\n });\n }\n\n if (action) {\n try {\n const shouldStringifySubmissionData = [\n headers && headers['Content-Type'],\n encType,\n ].some((value) => value && value.includes('json'));\n\n const response = await fetch(action, {\n method,\n headers: {\n ...headers,\n ...(encType ? { 'Content-Type': encType } : {}),\n },\n body: shouldStringifySubmissionData ? formDataJson : formData,\n });\n\n if (\n response &&\n (validateStatus\n ? !validateStatus(response.status)\n : response.status < 200 || response.status >= 300)\n ) {\n hasError = true;\n onError && onError({ response });\n type = String(response.status);\n } else {\n onSuccess && onSuccess({ response });\n }\n } catch (error: unknown) {\n hasError = true;\n onError && onError({ error });\n }\n }\n })(event);\n\n if (hasError && props.control) {\n props.control._subjects.state.next({\n isSubmitSuccessful: false,\n });\n props.control.setError('root.server', {\n type,\n });\n }\n };\n\n React.useEffect(() => {\n setMounted(true);\n }, []);\n\n return render ? (\n <>\n {render({\n submit,\n })}\n </>\n ) : (\n <form\n noValidate={mounted}\n action={action}\n method={method}\n encType={encType}\n onSubmit={submit}\n {...rest}\n >\n {children}\n </form>\n );\n}\n\nexport { Form };\n","import {\n InternalFieldErrors,\n InternalFieldName,\n ValidateResult,\n} from '../types';\n\nexport default (\n name: InternalFieldName,\n validateAllFieldCriteria: boolean,\n errors: InternalFieldErrors,\n type: string,\n message: ValidateResult,\n) =>\n validateAllFieldCriteria\n ? {\n ...errors[name],\n types: {\n ...(errors[name] && errors[name]!.types ? errors[name]!.types : {}),\n [type]: message || true,\n },\n }\n : {};\n","export default () => {\n const d =\n typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\n\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16 + d) % 16 | 0;\n\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n","import { FieldArrayMethodProps, InternalFieldName } from '../types';\nimport isUndefined from '../utils/isUndefined';\n\nexport default (\n name: InternalFieldName,\n index: number,\n options: FieldArrayMethodProps = {},\n): string =>\n options.shouldFocus || isUndefined(options.shouldFocus)\n ? options.focusName ||\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\n : '';\n","import { VALIDATION_MODE } from '../constants';\nimport { Mode, ValidationModeFlags } from '../types';\n\nexport default (mode?: Mode): ValidationModeFlags => ({\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\n isOnBlur: mode === VALIDATION_MODE.onBlur,\n isOnChange: mode === VALIDATION_MODE.onChange,\n isOnAll: mode === VALIDATION_MODE.all,\n isOnTouch: mode === VALIDATION_MODE.onTouched,\n});\n","import { InternalFieldName, Names } from '../types';\n\nexport default (\n name: InternalFieldName,\n _names: Names,\n isBlurEvent?: boolean,\n) =>\n !isBlurEvent &&\n (_names.watchAll ||\n _names.watch.has(name) ||\n [..._names.watch].some(\n (watchName) =>\n name.startsWith(watchName) &&\n /^\\.\\w+/.test(name.slice(watchName.length)),\n ));\n","import { FieldRefs, InternalFieldName, Ref } from '../types';\nimport { get } from '../utils';\nimport isObject from '../utils/isObject';\n\nconst iterateFieldsByAction = (\n fields: FieldRefs,\n action: (ref: Ref, name: string) => 1 | undefined | void,\n fieldsNames?: Set<InternalFieldName> | InternalFieldName[] | 0,\n abortEarly?: boolean,\n) => {\n for (const key of fieldsNames || Object.keys(fields)) {\n const field = get(fields, key);\n\n if (field) {\n const { _f, ...currentField } = field;\n\n if (_f) {\n if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) {\n break;\n } else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) {\n break;\n } else {\n iterateFieldsByAction(currentField, action);\n }\n } else if (isObject(currentField)) {\n iterateFieldsByAction(currentField, action);\n }\n }\n }\n};\n\nexport default iterateFieldsByAction;\n","import {\n FieldError,\n FieldErrors,\n FieldValues,\n InternalFieldName,\n} from '../types';\nimport convertToArrayPayload from '../utils/convertToArrayPayload';\nimport get from '../utils/get';\nimport set from '../utils/set';\n\nexport default <T extends FieldValues = FieldValues>(\n errors: FieldErrors<T>,\n error: Partial<Record<string, FieldError>>,\n name: InternalFieldName,\n): FieldErrors<T> => {\n const fieldArrayErrors = convertToArrayPayload(get(errors, name));\n set(fieldArrayErrors, 'root', error[name]);\n set(errors, name, fieldArrayErrors);\n return errors;\n};\n","import { FieldElement } from '../types';\n\nexport default (element: FieldElement): element is HTMLInputElement =>\n element.type === 'file';\n","export default (value: unknown): value is Function =>\n typeof value === 'function';\n","import isWeb from './isWeb';\n\nexport default (value: unknown): value is HTMLElement => {\n if (!isWeb) {\n return false;\n }\n\n const owner = value ? ((value as HTMLElement).ownerDocument as Document) : 0;\n return (\n value instanceof\n (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement)\n );\n};\n","import { Message } from '../types';\nimport isString from '../utils/isString';\n\nexport default (value: unknown): value is Message => isString(value);\n","import { FieldElement } from '../types';\n\nexport default (element: FieldElement): element is HTMLInputElement =>\n element.type === 'radio';\n","export default (value: unknown): value is RegExp => value instanceof RegExp;\n","import isUndefined from '../utils/isUndefined';\n\ntype CheckboxFieldResult = {\n isValid: boolean;\n value: string | string[] | boolean | undefined;\n};\n\nconst defaultResult: CheckboxFieldResult = {\n value: false,\n isValid: false,\n};\n\nconst validResult = { value: true, isValid: true };\n\nexport default (options?: HTMLInputElement[]): CheckboxFieldResult => {\n if (Array.isArray(options)) {\n if (options.length > 1) {\n const values = options\n .filter((option) => option && option.checked && !option.disabled)\n .map((option) => option.value);\n return { value: values, isValid: !!values.length };\n }\n\n return options[0].checked && !options[0].disabled\n ? // @ts-expect-error expected to work in the browser\n options[0].attributes && !isUndefined(options[0].attributes.value)\n ? isUndefined(options[0].value) || options[0].value === ''\n ? validResult\n : { value: options[0].value, isValid: true }\n : validResult\n : defaultResult;\n }\n\n return defaultResult;\n};\n","type RadioFieldResult = {\n isValid: boolean;\n value: number | string | null;\n};\n\nconst defaultReturn: RadioFieldResult = {\n isValid: false,\n value: null,\n};\n\nexport default (options?: HTMLInputElement[]): RadioFieldResult =>\n Array.isArray(options)\n ? options.reduce(\n (previous, option): RadioFieldResult =>\n option && option.checked && !option.disabled\n ? {\n isValid: true,\n value: option.value,\n }\n : previous,\n defaultReturn,\n )\n : defaultReturn;\n","import { FieldError, Ref, ValidateResult } from '../types';\nimport isBoolean from '../utils/isBoolean';\nimport isMessage from '../utils/isMessage';\n\nexport default function getValidateError(\n result: ValidateResult,\n ref: Ref,\n type = 'validate',\n): FieldError | void {\n if (\n isMessage(result) ||\n (Array.isArray(result) && result.every(isMessage)) ||\n (isBoolean(result) && !result)\n ) {\n return {\n type,\n message: isMessage(result) ? result : '',\n ref,\n };\n }\n}\n","import { ValidationRule } from '../types';\nimport isObject from '../utils/isObject';\nimport isRegex from '../utils/isRegex';\n\nexport default (validationData?: ValidationRule) =>\n isObject(validationData) && !isRegex(validationData)\n ? validationData\n : {\n value: validationData,\n message: '',\n };\n","import { INPUT_VALIDATION_RULES } from '../constants';\nimport {\n Field,\n FieldError,\n FieldValues,\n InternalFieldErrors,\n MaxType,\n Message,\n MinType,\n NativeFieldValue,\n} from '../types';\nimport get from '../utils/get';\nimport isBoolean from '../utils/isBoolean';\nimport isCheckBoxInput from '../utils/isCheckBoxInput';\nimport isEmptyObject from '../utils/isEmptyObject';\nimport isFileInput from '../utils/isFileInput';\nimport isFunction from '../utils/isFunction';\nimport isHTMLElement from '../utils/isHTMLElement';\nimport isMessage from '../utils/isMessage';\nimport isNullOrUndefined from '../utils/isNullOrUndefined';\nimport isObject from '../utils/isObject';\nimport isRadioInput from '../utils/isRadioInput';\nimport isRegex from '../utils/isRegex';\nimport isString from '../utils/isString';\nimport isUndefined from '../utils/isUndefined';\n\nimport appendErrors from './appendErrors';\nimport getCheckboxValue from './getCheckboxValue';\nimport getRadioValue from './getRadioValue';\nimport getValidateError from './getValidateError';\nimport getValueAndMessage from './getValueAndMessage';\n\nexport default async <T extends FieldValues>(\n field: Field,\n formValues: T,\n validateAllFieldCriteria: boolean,\n shouldUseNativeValidation?: boolean,\n isFieldArray?: boolean,\n): Promise<InternalFieldErrors> => {\n const {\n ref,\n refs,\n required,\n maxLength,\n minLength,\n min,\n max,\n pattern,\n validate,\n name,\n valueAsNumber,\n mount,\n disabled,\n } = field._f;\n const inputValue: NativeFieldValue = get(formValues, name);\n if (!mount || disabled) {\n return {};\n }\n const inputRef: HTMLInputElement = refs ? refs[0] : (ref as HTMLInputElement);\n const setCustomValidity = (message?: string | boolean) => {\n if (shouldUseNativeValidation && inputRef.reportValidity) {\n inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');\n inputRef.reportValidity();\n }\n };\n const error: InternalFieldErrors = {};\n const isRadio = isRadioInput(ref);\n const isCheckBox = isCheckBoxInput(ref);\n const isRadioOrCheckbox = isRadio || isCheckBox;\n const isEmpty =\n ((valueAsNumber || isFileInput(ref)) &&\n isUndefined(ref.value) &&\n isUndefined(inputValue)) ||\n (isHTMLElement(ref) && ref.value === '') ||\n inputValue === '' ||\n (Array.isArray(inputValue) && !inputValue.length);\n const appendErrorsCurry = appendErrors.bind(\n null,\n name,\n validateAllFieldCriteria,\n error,\n );\n const getMinMaxMessage = (\n exceedMax: boolean,\n maxLengthMessage: Message,\n minLengthMessage: Message,\n maxType: MaxType = INPUT_VALIDATION_RULES.maxLength,\n minType: MinType = INPUT_VALIDATION_RULES.minLength,\n ) => {\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\n error[name] = {\n type: exceedMax ? maxType : minType,\n message,\n ref,\n ...appendErrorsCurry(exceedMax ? maxType : minType, message),\n };\n };\n\n if (\n isFieldArray\n ? !Array.isArray(inputValue) || !inputValue.length\n : required &&\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\n (isBoolean(inputValue) && !inputValue) ||\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\n (isRadio && !getRadioValue(refs).isValid))\n ) {\n const { value, message } = isMessage(required)\n ? { value: !!required, message: required }\n : getValueAndMessage(required);\n\n if (value) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.required,\n message,\n ref: inputRef,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\n let exceedMax;\n let exceedMin;\n const maxOutput = getValueAndMessage(max);\n const minOutput = getValueAndMessage(min);\n\n if (!isNullOrUndefined(inputValue) && !isNaN(inputValue as number)) {\n const valueNumber =\n (ref as HTMLInputElement).valueAsNumber ||\n (inputValue ? +inputValue : inputValue);\n if (!isNullOrUndefined(maxOutput.value)) {\n exceedMax = valueNumber > maxOutput.value;\n }\n if (!isNullOrUndefined(minOutput.value)) {\n exceedMin = valueNumber < minOutput.value;\n }\n } else {\n const valueDate =\n (ref as HTMLInputElement).valueAsDate || new Date(inputValue as string);\n const convertTimeToDate = (time: unknown) =>\n new Date(new Date().toDateString() + ' ' + time);\n const isTime = ref.type == 'time';\n const isWeek = ref.type == 'week';\n\n if (isString(maxOutput.value) && inputValue) {\n exceedMax = isTime\n ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)\n : isWeek\n ? inputValue > maxOutput.value\n : valueDate > new Date(maxOutput.value);\n }\n\n if (isString(minOutput.value) && inputValue) {\n exceedMin = isTime\n ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)\n : isWeek\n ? inputValue < minOutput.value\n : valueDate < new Date(minOutput.value);\n }\n }\n\n if (exceedMax || exceedMin) {\n getMinMaxMessage(\n !!exceedMax,\n maxOutput.message,\n minOutput.message,\n INPUT_VALIDATION_RULES.max,\n INPUT_VALIDATION_RULES.min,\n );\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name]!.message);\n return error;\n }\n }\n }\n\n if (\n (maxLength || minLength) &&\n !isEmpty &&\n (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))\n ) {\n const maxLengthOutput = getValueAndMessage(maxLength);\n const minLengthOutput = getValueAndMessage(minLength);\n const exceedMax =\n !isNullOrUndefined(maxLengthOutput.value) &&\n inputValue.length > +maxLengthOutput.value;\n const exceedMin =\n !isNullOrUndefined(minLengthOutput.value) &&\n inputValue.length < +minLengthOutput.value;\n\n if (exceedMax || exceedMin) {\n getMinMaxMessage(\n exceedMax,\n maxLengthOutput.message,\n minLengthOutput.message,\n );\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name]!.message);\n return error;\n }\n }\n }\n\n if (pattern && !isEmpty && isString(inputValue)) {\n const { value: patternValue, message } = getValueAndMessage(pattern);\n\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.pattern,\n message,\n ref,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n\n if (validate) {\n if (isFunction(validate)) {\n const result = await validate(inputValue, formValues);\n const validateError = getValidateError(result, inputRef);\n\n if (validateError) {\n error[name] = {\n ...validateError,\n ...appendErrorsCurry(\n INPUT_VALIDATION_RULES.validate,\n validateError.message,\n ),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(validateError.message);\n return error;\n }\n }\n } else if (isObject(validate)) {\n let validationResult = {} as FieldError;\n\n for (const key in validate) {\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\n break;\n }\n\n const validateError = getValidateError(\n await validate[key](inputValue, formValues),\n inputRef,\n key,\n );\n\n if (validateError) {\n validationResult = {\n ...validateError,\n ...appendErrorsCurry(key, validateError.message),\n };\n\n setCustomValidity(validateError.message);\n\n if (validateAllFieldCriteria) {\n error[name] = validationResult;\n }\n }\n }\n\n if (!isEmptyObject(validationResult)) {\n error[name] = {\n ref: inputRef,\n ...validationResult,\n };\n if (!validateAllFieldCriteria) {\n return error;\n }\n }\n }\n }\n\n setCustomValidity(true);\n return error;\n};\n","import convertToArrayPayload from './convertToArrayPayload';\n\nexport default <T>(data: T[], value: T | T[]): T[] => [\n ...data,\n ...convertToArrayPayload(value),\n];\n","export default <T>(value: T | T[]): undefined[] | undefined =>\n Array.isArray(value) ? value.map(() => undefined) : undefined;\n","import convertToArrayPayload from './convertToArrayPayload';\n\nexport default function insert<T>(data: T[], index: number): (T | undefined)[];\nexport default function insert<T>(\n data: T[],\n index: number,\n value: T | T[],\n): T[];\nexport default function insert<T>(\n data: T[],\n index: number,\n value?: T | T[],\n): (T | undefined)[] {\n return [\n ...data.slice(0, index),\n ...convertToArrayPayload(value),\n ...data.slice(index),\n ];\n}\n","import isUndefined from './isUndefined';\n\nexport default <T>(\n data: (T | undefined)[],\n from: number,\n to: number,\n): (T | undefined)[] => {\n if (!Array.isArray(data)) {\n return [];\n }\n\n if (isUndefined(data[to])) {\n data[to] = undefined;\n }\n data.splice(to, 0, data.splice(from, 1)[0]);\n\n return data;\n};\n","import convertToArrayPayload from './convertToArrayPayload';\n\nexport default <T>(data: T[], value: T | T[]): T[] => [\n ...convertToArrayPayload(value),\n ...convertToArrayPayload(data),\n];\n","import compact from './compact';\nimport convertToArrayPayload from './convertToArrayPayload';\nimport isUndefined from './isUndefined';\n\nfunction removeAtIndexes<T>(data: T[], indexes: number[]): T[] {\n let i = 0;\n const temp = [...data];\n\n for (const index of indexes) {\n temp.splice(index - i, 1);\n i++;\n }\n\n return compact(temp).length ? temp : [];\n}\n\nexport default <T>(data: T[], index?: number | number[]): T[] =>\n isUndefined(index)\n ? []\n : removeAtIndexes(\n data,\n (convertToArrayPayload(index) as number[]).sort((a, b) => a - b),\n );\n","export default <T>(data: T[], indexA: number, indexB: number): void => {\n [data[indexA], data[indexB]] = [data[indexB], data[indexA]];\n};\n","import isEmptyObject from './isEmptyObject';\nimport isKey from './isKey';\nimport isObject from './isObject';\nimport isUndefined from './isUndefined';\nimport stringToPath from './stringToPath';\n\nfunction baseGet(object: any, updatePath: (string | number)[]) {\n const length = updatePath.slice(0, -1).length;\n let index = 0;\n\n while (index < length) {\n object = isUndefined(object) ? index++ : object[updatePath[index++]];\n }\n\n return object;\n}\n\nfunction isEmptyArray(obj: unknown[]) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {\n return false;\n }\n }\n return true;\n}\n\nexport default function unset(object: any, path: string | (string | number)[]) {\n const paths = Array.isArray(path)\n ? path\n : isKey(path)\n ? [path]\n : stringToPath(path);\n\n const childObject = paths.length === 1 ? object : baseGet(object, paths);\n\n const index = paths.length - 1;\n const key = paths[index];\n\n if (childObject) {\n delete childObject[key];\n }\n\n if (\n index !== 0 &&\n ((isObject(childObject) && isEmptyObject(childObject)) ||\n (Array.isArray(childObject) && isEmptyArray(childObject)))\n ) {\n unset(object, paths.slice(0, -1));\n }\n\n return object;\n}\n","export default <T>(fieldValues: T[], index: number, value: T) => {\n fieldValues[index] = value;\n return fieldValues;\n};\n","import React from 'react';\n\nimport generateId from './logic/generateId';\nimport getFocusFieldName from './logic/getFocusFieldName';\nimport getValidationModes from './logic/getValidationModes';\nimport isWatched from './logic/isWatched';\nimport iterateFieldsByAction from './logic/iterateFieldsByAction';\nimport updateFieldArrayRootError from './logic/updateFieldArrayRootError';\nimport validateField from './logic/validateField';\nimport appendAt from './utils/append';\nimport cloneObject from './utils/cloneObject';\nimport convertToArrayPayload from './utils/convertToArrayPayload';\nimport fillEmptyArray from './utils/fillEmptyArray';\nimport get from './utils/get';\nimport insertAt from './utils/insert';\nimport isEmptyObject from './utils/isEmptyObject';\nimport moveArrayAt from './utils/move';\nimport prependAt from './utils/prepend';\nimport removeArrayAt from './utils/remove';\nimport set from './utils/set';\nimport swapArrayAt from './utils/swap';\nimport unset from './utils/unset';\nimport updateAt from './utils/update';\nimport { VALIDATION_MODE } from './constants';\nimport {\n Control,\n Field,\n FieldArray,\n FieldArrayMethodProps,\n FieldArrayPath,\n FieldArrayWithId,\n FieldErrors,\n FieldPath,\n FieldValues,\n FormState,\n InternalFieldName,\n RegisterOptions,\n UseFieldArrayProps,\n UseFieldArrayReturn,\n} from './types';\nimport { useFormContext } from './useFormContext';\nimport { useSubscribe } from './useSubscribe';\n\n/**\n * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)\n *\n * @param props - useFieldArray props\n *\n * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, control, handleSubmit, reset, trigger, setError } = useForm({\n * defaultValues: {\n * test: []\n * }\n * });\n * const { fields, append } = useFieldArray({\n * control,\n * name: \"test\"\n * });\n *\n * return (\n * <form onSubmit={handleSubmit(data => console.log(data))}>\n * {fields.map((item, index) => (\n * <input key={item.id} {...register(`test.${index}.firstName`)} />\n * ))}\n * <button type=\"button\" onClick={() => append({ firstName: \"bill\" })}>\n * append\n * </button>\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nexport function useFieldArray<\n TFieldValues extends FieldValues = FieldValues,\n TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>,\n TKeyName extends string = 'id',\n>(\n props: UseFieldArrayProps<TFieldValues, TFieldArrayName, TKeyName>,\n): UseFieldArrayReturn<TFieldValues, TFieldArrayName, TKeyName> {\n const methods = useFormContext();\n const {\n control = methods.control,\n name,\n keyName = 'id',\n shouldUnregister,\n } = props;\n const [fields, setFields] = React.useState(control._getFieldArray(name));\n const ids = React.useRef<string[]>(\n control._getFieldArray(name).map(generateId),\n );\n const _fieldIds = React.useRef(fields);\n const _name = React.useRef(name);\n const _actioned = React.useRef(false);\n\n _name.current = name;\n _fieldIds.current = fields;\n control._names.array.add(name);\n\n props.rules &&\n (control as Control<TFieldValues>).register(\n name as FieldPath<TFieldValues>,\n props.rules as RegisterOptions<TFieldValues>,\n );\n\n useSubscribe({\n next: ({\n values,\n name: fieldArrayName,\n }: {\n values?: FieldValues;\n name?: InternalFieldName;\n }) => {\n if (fieldArrayName === _name.current || !fieldArrayName) {\n const fieldValues = get(values, _name.current);\n if (Array.isArray(fieldValues)) {\n setFields(fieldValues);\n ids.current = fieldValues.map(generateId);\n }\n }\n },\n subject: control._subjects.array,\n });\n\n const updateValues = React.useCallback(\n <\n T extends Partial<\n FieldArrayWithId<TFieldValues, TFieldArrayName, TKeyName>\n >[],\n >(\n updatedFieldArrayValues: T,\n ) => {\n _actioned.current = true;\n control._updateFieldArray(name, updatedFieldArrayValues);\n },\n [control, name],\n );\n\n const append = (\n value:\n | Partial<FieldArray<TFieldValues, TFieldArrayName>>\n | Partial<FieldArray<TFieldValues, TFieldArrayName>>[],\n options?: FieldArrayMethodProps,\n ) => {\n const appendValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = appendAt(\n control._getFieldArray(name),\n appendValue,\n );\n control._names.focus = getFocusFieldName(\n name,\n updatedFieldArrayValues.length - 1,\n options,\n );\n ids.current = appendAt(ids.current, appendValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, appendAt, {\n argA: fillEmptyArray(value),\n });\n };\n\n const prepend = (\n value:\n | Partial<FieldArray<TFieldValues, TFieldArrayName>>\n | Partial<FieldArray<TFieldValues, TFieldArrayName>>[],\n options?: FieldArrayMethodProps,\n ) => {\n const prependValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = prependAt(\n control._getFieldArray(name),\n prependValue,\n );\n control._names.focus = getFocusFieldName(name, 0, options);\n ids.current = prependAt(ids.current, prependValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, prependAt, {\n argA: fillEmptyArray(value),\n });\n };\n\n const remove = (index?: number | number[]) => {\n const updatedFieldArrayValues: Partial<\n FieldArrayWithId<TFieldValues, TFieldArrayName, TKeyName>\n >[] = removeArrayAt(control._getFieldArray(name), index);\n ids.current = removeArrayAt(ids.current, index);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, removeArrayAt, {\n argA: index,\n });\n };\n\n const insert = (\n index: number,\n value:\n | Partial<FieldArray<TFieldValues, TFieldArrayName>>\n | Partial<FieldArray<TFieldValues, TFieldArrayName>>[],\n options?: FieldArrayMethodProps,\n ) => {\n const insertValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = insertAt(\n control._getFieldArray(name),\n index,\n insertValue,\n );\n control._names.focus = getFocusFieldName(name, index, options);\n ids.current = insertAt(ids.current, index, insertValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, insertAt, {\n argA: index,\n argB: fillEmptyArray(value),\n });\n };\n\n const swap = (indexA: number, indexB: number) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n swapArrayAt(updatedFieldArrayValues, indexA, indexB);\n swapArrayAt(ids.current, indexA, indexB);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(\n name,\n updatedFieldArrayValues,\n swapArrayAt,\n {\n argA: indexA,\n argB: indexB,\n },\n false,\n );\n };\n\n const move = (from: number, to: number) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n moveArrayAt(updatedFieldArrayValues, from, to);\n moveArrayAt(ids.current, from, to);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(\n name,\n updatedFieldArrayValues,\n moveArrayAt,\n {\n argA: from,\n argB: to,\n },\n false,\n );\n };\n\n const update = (\n index: number,\n value: FieldArray<TFieldValues, TFieldArrayName>,\n ) => {\n const updateValue = cloneObject(value);\n const updatedFieldArrayValues = updateAt(\n control._getFieldArray<\n FieldArrayWithId<TFieldValues, TFieldArrayName, TKeyName>\n >(name),\n index,\n updateValue as FieldArrayWithId<TFieldValues, TFieldArrayName, TKeyName>,\n );\n ids.current = [...updatedFieldArrayValues].map((item, i) =>\n !item || i === index ? generateId() : ids.current[i],\n );\n updateValues(updatedFieldArrayValues);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(\n name,\n updatedFieldArrayValues,\n updateAt,\n {\n argA: index,\n argB: updateValue,\n },\n true,\n false,\n );\n };\n\n const replace = (\n value:\n | Partial<FieldArray<TFieldValues, TFieldArrayName>>\n | Partial<FieldArray<TFieldValues, TFieldArrayName>>[],\n ) => {\n const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));\n ids.current = updatedFieldArrayValues.map(generateId);\n updateValues([...updatedFieldArrayValues]);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(\n name,\n [...updatedFieldArrayValues],\n <T>(data: T): T => data,\n {},\n true,\n false,\n );\n };\n\n React.useEffect(() => {\n control._state.action = false;\n\n isWatched(name, control._names) &&\n control._subjects.state.next({\n ...control._formState,\n } as FormState<TFieldValues>);\n\n if (\n _actioned.current &&\n (!getValidationModes(control._options.mode).isOnSubmit ||\n control._formState.isSubmitted)\n ) {\n if (control._options.resolver) {\n control._executeSchema([name]).then((result) => {\n const error = get(result.errors, name);\n const existingError = get(control._formState.errors, name);\n\n if (\n existingError\n ? (!error && existingError.type) ||\n (error &&\n (existingError.type !== error.type ||\n existingError.message !== error.message))\n : error && error.type\n ) {\n error\n ? set(control._formState.errors, name, error)\n : unset(control._formState.errors, name);\n control._subjects.state.next({\n errors: control._formState.errors as FieldErrors<TFieldValues>,\n });\n }\n });\n } else {\n const field: Field = get(control._fields, name);\n if (\n field &&\n field._f &&\n !(\n getValidationModes(control._options.reValidateMode).isOnSubmit &&\n getValidationModes(control._options.mode).isOnSubmit\n )\n ) {\n validateField(\n field,\n control._formValues,\n control._options.criteriaMode === VALIDATION_MODE.all,\n control._options.shouldUseNativeValidation,\n true,\n ).then(\n (error) =>\n !isEmptyObject(error) &&\n control._subjects.state.next({\n errors: updateFieldArrayRootError(\n control._formState.errors as FieldErrors<TFieldValues>,\n error,\n name,\n ) as FieldErrors<TFieldValues>,\n }),\n );\n }\n }\n }\n\n control._subjects.values.next({\n name,\n values: { ...control._formValues },\n });\n\n control._names.focus &&\n iterateFieldsByAction(control._fields, (ref, key: string) => {\n if (\n control._names.focus &&\n key.startsWith(control._names.focus) &&\n ref.focus\n ) {\n ref.focus();\n return 1;\n }\n return;\n });\n\n control._names.focus = '';\n\n control._updateValid();\n _actioned.current = false;\n }, [fields, name, control]);\n\n React.useEffect(() => {\n !get(control._formValues, name) && control._updateFieldArray(name);\n\n return () => {\n (control._options.shouldUnregister || shouldUnregister) &&\n control.unregister(name as FieldPath<TFieldValues>);\n };\n }, [name, control, keyName, shouldUnregister]);\n\n return {\n swap: React.useCallback(swap, [updateValues, name, control]),\n move: React.useCallback(move, [updateValues, name, control]),\n prepend: React.useCallback(prepend, [updateValues, name, control]),\n append: React.useCallback(append, [updateValues, name, control]),\n remove: React.useCallback(remove, [updateValues, name, control]),\n insert: React.useCallback(insert, [updateValues, name, control]),\n update: React.useCallback(update, [updateValues, name, control]),\n replace: React.useCallback(replace, [updateValues, name, control]),\n fields: React.useMemo(\n () =>\n fields.map((field, index) => ({\n ...field,\n [keyName]: ids.current[index] || generateId(),\n })) as FieldArrayWithId<TFieldValues, TFieldArrayName, TKeyName>[],\n [fields, keyName],\n ),\n };\n}\n","import { Noop } from '../types';\n\nexport type Observer<T> = {\n next: (value: T) => void;\n};\n\nexport type Subscription = {\n unsubscribe: Noop;\n};\n\nexport type Subject<T> = {\n readonly observers: Observer<T>[];\n subscribe: (value: Observer<T>) => Subscription;\n unsubscribe: Noop;\n} & Observer<T>;\n\nexport default <T>(): Subject<T> => {\n let _observers: Observer<T>[] = [];\n\n const next = (value: T) => {\n for (const observer of _observers) {\n observer.next && observer.next(value);\n }\n };\n\n const subscribe = (observer: Observer<T>): Subscription => {\n _observers.push(observer);\n return {\n unsubscribe: () => {\n _observers = _observers.filter((o) => o !== observer);\n },\n };\n };\n\n const unsubscribe = () => {\n _observers = [];\n };\n\n return {\n get observers() {\n return _observers;\n },\n next,\n subscribe,\n unsubscribe,\n };\n};\n","import { Primitive } from '../types';\n\nimport isNullOrUndefined from './isNullOrUndefined';\nimport { isObjectType } from './isObject';\n\nexport default (value: unknown): value is Primitive =>\n isNullOrUndefined(value) || !isObjectType(value);\n","import isObject from '../utils/isObject';\n\nimport isDateObject from './isDateObject';\nimport isPrimitive from './isPrimitive';\n\nexport default function deepEqual(object1: any, object2: any) {\n if (isPrimitive(object1) || isPrimitive(object2)) {\n return object1 === object2;\n }\n\n if (isDateObject(object1) && isDateObject(object2)) {\n return object1.getTime() === object2.getTime();\n }\n\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (const key of keys1) {\n const val1 = object1[key];\n\n if (!keys2.includes(key)) {\n return false;\n }\n\n if (key !== 'ref') {\n const val2 = object2[key];\n\n if (\n (isDateObject(val1) && isDateObject(val2)) ||\n (isObject(val1) && isObject(val2)) ||\n (Array.isArray(val1) && Array.isArray(val2))\n ? !deepEqual(val1, val2)\n : val1 !== val2\n ) {\n return false;\n }\n }\n }\n\n return true;\n}\n","import { FieldElement } from '../types';\n\nexport default (element: FieldElement): element is HTMLSelectElement =>\n element.type === `select-multiple`;\n","import { FieldElement } from '../types';\n\nimport isCheckBoxInput from './isCheckBoxInput';\nimport isRadioInput from './isRadioInput';\n\nexport default (ref: FieldElement): ref is HTMLInputElement =>\n isRadioInput(ref) || isCheckBoxInput(ref);\n","import { Ref } from '../types';\n\nimport isHTMLElement from './isHTMLElement';\n\nexport default (ref: Ref) => isHTMLElement(ref) && ref.isConnected;\n","import isFunction from './isFunction';\n\nexport default <T>(data: T): boolean => {\n for (const key in data) {\n if (isFunction(data[key])) {\n return true;\n }\n }\n return false;\n};\n","import deepEqual from '../utils/deepEqual';\nimport isNullOrUndefined from '../utils/isNullOrUndefined';\nimport isObject from '../utils/isObject';\nimport isPrimitive from '../utils/isPrimitive';\nimport isUndefined from '../utils/isUndefined';\nimport objectHasFunction from '../utils/objectHasFunction';\n\nfunction markFieldsDirty<T>(data: T, fields: Record<string, any> = {}) {\n const isParentNodeArray = Array.isArray(data);\n\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (\n Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))\n ) {\n fields[key] = Array.isArray(data[key]) ? [] : {};\n markFieldsDirty(data[key], fields[key]);\n } else if (!isNullOrUndefined(data[key])) {\n fields[key] = true;\n }\n }\n }\n\n return fields;\n}\n\nfunction getDirtyFieldsFromDefaultValues<T>(\n data: T,\n formValues: T,\n dirtyFieldsFromValues: Record<\n Extract<keyof T, string>,\n ReturnType<typeof markFieldsDirty> | boolean\n >,\n) {\n const isParentNodeArray = Array.isArray(data);\n\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (\n Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))\n ) {\n if (\n isUndefined(formValues) ||\n isPrimitive(dirtyFieldsFromValues[key])\n ) {\n dirtyFieldsFromValues[key] = Array.isArray(data[key])\n ? markFieldsDirty(data[key], [])\n : { ...markFieldsDirty(data[key]) };\n } else {\n getDirtyFieldsFromDefaultValues(\n data[key],\n isNullOrUndefined(formValues) ? {} : formValues[key],\n dirtyFieldsFromValues[key],\n );\n }\n } else {\n dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);\n }\n }\n }\n\n return dirtyFieldsFromValues;\n}\n\nexport default <T>(defaultValues: T, formValues: T) =>\n getDirtyFieldsFromDefaultValues(\n defaultValues,\n formValues,\n markFieldsDirty(formValues),\n );\n","import { Field, NativeFieldValue } from '../types';\nimport isString from '../utils/isString';\nimport isUndefined from '../utils/isUndefined';\n\nexport default <T extends NativeFieldValue>(\n value: T,\n { valueAsNumber, valueAsDate, setValueAs }: Field['_f'],\n) =>\n isUndefined(value)\n ? value\n : valueAsNumber\n ? value === ''\n ? NaN\n : value\n ? +value\n : value\n : valueAsDate && isString(value)\n ? new Date(value)\n : setValueAs\n ? setValueAs(value)\n : value;\n","import { Field } from '../types';\nimport isCheckBox from '../utils/isCheckBoxInput';\nimport isFileInput from '../utils/isFileInput';\nimport isMultipleSelect from '../utils/isMultipleSelect';\nimport isRadioInput from '../utils/isRadioInput';\nimport isUndefined from '../utils/isUndefined';\n\nimport getCheckboxValue from './getCheckboxValue';\nimport getFieldValueAs from './getFieldValueAs';\nimport getRadioValue from './getRadioValue';\n\nexport default function getFieldValue(_f: Field['_f']) {\n const ref = _f.ref;\n\n if (_f.refs ? _f.refs.every((ref) => ref.disabled) : ref.disabled) {\n return;\n }\n\n if (isFileInput(ref)) {\n return ref.files;\n }\n\n if (isRadioInput(ref)) {\n return getRadioValue(_f.refs).value;\n }\n\n if (isMultipleSelect(ref)) {\n return [...ref.selectedOptions].map(({ value }) => value);\n }\n\n if (isCheckBox(ref)) {\n return getCheckboxValue(_f.refs).value;\n }\n\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\n}\n","import {\n CriteriaMode,\n Field,\n FieldName,\n FieldRefs,\n FieldValues,\n InternalFieldName,\n} from '../types';\nimport { get } from '../utils';\nimport set from '../utils/set';\n\nexport default <TFieldValues extends FieldValues>(\n fieldsNames: Set<InternalFieldName> | InternalFieldName[],\n _fields: FieldRefs,\n criteriaMode?: CriteriaMode,\n shouldUseNativeValidation?: boolean | undefined,\n) => {\n const fields: Record<InternalFieldName, Field['_f']> = {};\n\n for (const name of fieldsNames) {\n const field: Field = get(_fields, name);\n\n field && set(fields, name, field._f);\n }\n\n return {\n criteriaMode,\n names: [...fieldsNames] as FieldName<TFieldValues>[],\n fields,\n shouldUseNativeValidation,\n };\n};\n","import {\n ValidationRule,\n ValidationValue,\n ValidationValueMessage,\n} from '../types';\nimport isObject from '../utils/isObject';\nimport isRegex from '../utils/isRegex';\nimport isUndefined from '../utils/isUndefined';\n\nexport default <T extends ValidationValue>(\n rule?: ValidationRule<T> | ValidationValueMessage<T>,\n) =>\n isUndefined(rule)\n ? rule\n : isRegex(rule)\n ? rule.source\n : isObject(rule)\n ? isRegex(rule.value)\n ? rule.value.source\n : rule.value\n : rule;\n","import { Field } from '../types';\n\nexport default (options: Field['_f']) =>\n options.mount &&\n (options.required ||\n options.min ||\n options.max ||\n options.maxLength ||\n options.minLength ||\n options.pattern ||\n options.validate);\n","import { FieldError, FieldErrors, FieldValues } from '../types';\nimport get from '../utils/get';\nimport isKey from '../utils/isKey';\n\nexport default function schemaErrorLookup<T extends FieldValues = FieldValues>(\n errors: FieldErrors<T>,\n _fields: FieldValues,\n name: string,\n): {\n error?: FieldError;\n name: string;\n} {\n const error = get(errors, name);\n\n if (error || isKey(name)) {\n return {\n error,\n name,\n };\n }\n\n const names = name.split('.');\n\n while (names.length) {\n const fieldName = names.join('.');\n const field = get(_fields, fieldName);\n const foundError = get(errors, fieldName);\n\n if (field && !Array.isArray(field) && name !== fieldName) {\n return { name };\n }\n\n if (foundError && foundError.type) {\n return {\n name: fieldName,\n error: foundError,\n };\n }\n\n names.pop();\n }\n\n return {\n name,\n };\n}\n","import { ValidationModeFlags } from '../types';\n\nexport default (\n isBlurEvent: boolean,\n isTouched: boolean,\n isSubmitted: boolean,\n reValidateMode: {\n isOnBlur: boolean;\n isOnChange: boolean;\n },\n mode: Partial<ValidationModeFlags>,\n) => {\n if (mode.isOnAll) {\n return false;\n } else if (!isSubmitted && mode.isOnTouch) {\n return !(isTouched || isBlurEvent);\n } else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\n return !isBlurEvent;\n } else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\n return isBlurEvent;\n }\n return true;\n};\n","import compact from '../utils/compact';\nimport get from '../utils/get';\nimport unset from '../utils/unset';\n\nexport default <T>(ref: T, name: string) =>\n !compact(get(ref, name)).length && unset(ref, name);\n","import { EVENTS, VALIDATION_MODE } from '../constants';\nimport {\n BatchFieldArrayUpdate,\n ChangeHandler,\n Control,\n DeepPartial,\n DelayCallback,\n EventType,\n Field,\n FieldError,\n FieldErrors,\n FieldNamesMarkedBoolean,\n FieldPath,\n FieldRefs,\n FieldValues,\n FormState,\n GetIsDirty,\n InternalFieldName,\n Names,\n Path,\n PathValue,\n ReadFormState,\n Ref,\n SetFieldValue,\n SetValueConfig,\n Subjects,\n UseFormClearErrors,\n UseFormGetFieldState,\n UseFormGetValues,\n UseFormHandleSubmit,\n UseFormProps,\n UseFormRegister,\n UseFormReset,\n UseFormResetField,\n UseFormReturn,\n UseFormSetError,\n UseFormSetFocus,\n UseFormSetValue,\n UseFormTrigger,\n UseFormUnregister,\n UseFormWatch,\n WatchInternal,\n WatchObserver,\n} from '../types';\nimport cloneObject from '../utils/cloneObject';\nimport compact from '../utils/compact';\nimport convertToArrayPayload from '../utils/convertToArrayPayload';\nimport createSubject from '../utils/createSubject';\nimport deepEqual from '../utils/deepEqual';\nimport get from '../utils/get';\nimport isBoolean from '../utils/isBoolean';\nimport isCheckBoxInput from '../utils/isCheckBoxInput';\nimport isDateObject from '../utils/isDateObject';\nimport isEmptyObject from '../utils/isEmptyObject';\nimport isFileInput from '../utils/isFileInput';\nimport isFunction from '../utils/isFunction';\nimport isHTMLElement from '../utils/isHTMLElement';\nimport isMultipleSelect from '../utils/isMultipleSelect';\nimport isNullOrUndefined from '../utils/isNullOrUndefined';\nimport isObject from '../utils/isObject';\nimport isPrimitive from '../utils/isPrimitive';\nimport isRadioOrCheckbox from '../utils/isRadioOrCheckbox';\nimport isString from '../utils/isString';\nimport isUndefined from '../utils/isUndefined';\nimport isWeb from '../utils/isWeb';\nimport live from '../utils/live';\nimport set from '../utils/set';\nimport unset from '../utils/unset';\n\nimport generateWatchOutput from './generateWatchOutput';\nimport getDirtyFields from './getDirtyFields';\nimport getEventValue from './getEventValue';\nimport getFieldValue from './getFieldValue';\nimport getFieldValueAs from './getFieldValueAs';\nimport getResolverOptions from './getResolverOptions';\nimport getRuleValue from './getRuleValue';\nimport getValidationModes from './getValidationModes';\nimport hasValidation from './hasValidation';\nimport isNameInFieldArray from './isNameInFieldArray';\nimport isWatched from './isWatched';\nimport iterateFieldsByAction from './iterateFieldsByAction';\nimport schemaErrorLookup from './schemaErrorLookup';\nimport skipValidation from './skipValidation';\nimport unsetEmptyArray from './unsetEmptyArray';\nimport updateFieldArrayRootError from './updateFieldArrayRootError';\nimport validateField from './validateField';\n\nconst defaultOptions = {\n mode: VALIDATION_MODE.onSubmit,\n reValidateMode: VALIDATION_MODE.onChange,\n shouldFocusError: true,\n} as const;\n\nexport function createFormControl<\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n>(\n props: UseFormProps<TFieldValues, TContext> = {},\n): Omit<UseFormReturn<TFieldValues, TContext>, 'formState'> {\n let _options = {\n ...defaultOptions,\n ...props,\n };\n let _formState: FormState<TFieldValues> = {\n submitCount: 0,\n isDirty: false,\n isLoading: isFunction(_options.defaultValues),\n isValidating: false,\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n touchedFields: {},\n dirtyFields: {},\n validatingFields: {},\n errors: _options.errors || {},\n disabled: _options.disabled || false,\n };\n let _fields: FieldRefs = {};\n let _defaultValues =\n isObject(_options.defaultValues) || isObject(_options.values)\n ? cloneObject(_options.defaultValues || _options.values) || {}\n : {};\n let _formValues = _options.shouldUnregister\n ? {}\n : cloneObject(_defaultValues);\n let _state = {\n action: false,\n mount: false,\n watch: false,\n };\n let _names: Names = {\n mount: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n };\n let delayErrorCallback: DelayCallback | null;\n let timer = 0;\n const _proxyFormState: ReadFormState = {\n isDirty: false,\n dirtyFields: false,\n validatingFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n };\n const _subjects: Subjects<TFieldValues> = {\n values: createSubject(),\n array: createSubject(),\n state: createSubject(),\n };\n const validationModeBeforeSubmit = getValidationModes(_options.mode);\n const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n const shouldDisplayAllAssociatedErrors =\n _options.criteriaMode === VALIDATION_MODE.all;\n\n const debounce =\n <T extends Function>(callback: T) =>\n (wait: number) => {\n clearTimeout(timer);\n timer = setTimeout(callback, wait);\n };\n\n const _updateValid = async (shouldUpdateValid?: boolean) => {\n if (_proxyFormState.isValid || shouldUpdateValid) {\n const isValid = _options.resolver\n ? isEmptyObject((await _executeSchema()).errors)\n : await executeBuiltInValidation(_fields, true);\n\n if (isValid !== _formState.isValid) {\n _subjects.state.next({\n isValid,\n });\n }\n }\n };\n\n const _updateIsValidating = (names?: string[], isValidating?: boolean) => {\n if (_proxyFormState.isValidating || _proxyFormState.validatingFields) {\n (names || Array.from(_names.mount)).forEach((name) => {\n if (name) {\n isValidating\n ? set(_formState.validatingFields, name, isValidating)\n : unset(_formState.validatingFields, name);\n }\n });\n\n _subjects.state.next({\n validatingFields: _formState.validatingFields,\n isValidating: !isEmptyObject(_formState.validatingFields),\n });\n }\n };\n\n const _updateFieldArray: BatchFieldArrayUpdate = (\n name,\n values = [],\n method,\n args,\n shouldSetValues = true,\n shouldUpdateFieldsAndState = true,\n ) => {\n if (args && method) {\n _state.action = true;\n if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\n shouldSetValues && set(_fields, name, fieldValues);\n }\n\n if (\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.errors, name))\n ) {\n const errors = method(\n get(_formState.errors, name),\n args.argA,\n args.argB,\n );\n shouldSetValues && set(_formState.errors, name, errors);\n unsetEmptyArray(_formState.errors, name);\n }\n\n if (\n _proxyFormState.touchedFields &&\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.touchedFields, name))\n ) {\n const touchedFields = method(\n get(_formState.touchedFields, name),\n args.argA,\n args.argB,\n );\n shouldSetValues && set(_formState.touchedFields, name, touchedFields);\n }\n\n if (_proxyFormState.dirtyFields) {\n _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);\n }\n\n _subjects.state.next({\n name,\n isDirty: _getDirty(name, values),\n dirtyFields: _formState.dirtyFields,\n errors: _formState.errors,\n isValid: _formState.isValid,\n });\n } else {\n set(_formValues, name, values);\n }\n };\n\n const updateErrors = (name: InternalFieldName, error: FieldError) => {\n set(_formState.errors, name, error);\n _subjects.state.next({\n errors: _formState.errors,\n });\n };\n\n const _setErrors = (errors: FieldErrors<TFieldValues>) => {\n _formState.errors = errors;\n _subjects.state.next({\n errors: _formState.errors,\n isValid: false,\n });\n };\n\n const updateValidAndValue = (\n name: InternalFieldName,\n shouldSkipSetValueAs: boolean,\n value?: unknown,\n ref?: Ref,\n ) => {\n const field: Field = get(_fields, name);\n\n if (field) {\n const defaultValue = get(\n _formValues,\n name,\n isUndefined(value) ? get(_defaultValues, name) : value,\n );\n\n isUndefined(defaultValue) ||\n (ref && (ref as HTMLInputElement).defaultChecked) ||\n shouldSkipSetValueAs\n ? set(\n _formValues,\n name,\n shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f),\n )\n : setFieldValue(name, defaultValue);\n\n _state.mount && _updateValid();\n }\n };\n\n const updateTouchAndDirty = (\n name: InternalFieldName,\n fieldValue: unknown,\n isBlurEvent?: boolean,\n shouldDirty?: boolean,\n shouldRender?: boolean,\n ): Partial<\n Pick<FormState<TFieldValues>, 'dirtyFields' | 'isDirty' | 'touchedFields'>\n > => {\n let shouldUpdateField = false;\n let isPreviousDirty = false;\n const output: Partial<FormState<TFieldValues>> & { name: string } = {\n name,\n };\n const disabledField = !!(\n get(_fields, name) &&\n get(_fields, name)._f &&\n get(_fields, name)._f.disabled\n );\n\n if (!isBlurEvent || shouldDirty) {\n if (_proxyFormState.isDirty) {\n isPreviousDirty = _formState.isDirty;\n _formState.isDirty = output.isDirty = _getDirty();\n shouldUpdateField = isPreviousDirty !== output.isDirty;\n }\n\n const isCurrentFieldPristine =\n disabledField || deepEqual(get(_defaultValues, name), fieldValue);\n\n isPreviousDirty = !!(!disabledField && get(_formState.dirtyFields, name));\n isCurrentFieldPristine || disabledField\n ? unset(_formState.dirtyFields, name)\n : set(_formState.dirtyFields, name, true);\n output.dirtyFields = _formState.dirtyFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.dirtyFields &&\n isPreviousDirty !== !isCurrentFieldPristine);\n }\n\n if (isBlurEvent) {\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\n\n if (!isPreviousFieldTouched) {\n set(_formState.touchedFields, name, isBlurEvent);\n output.touchedFields = _formState.touchedFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.touchedFields &&\n isPreviousFieldTouched !== isBlurEvent);\n }\n }\n\n shouldUpdateField && shouldRender && _subjects.state.next(output);\n\n return shouldUpdateField ? output : {};\n };\n\n const shouldRenderByError = (\n name: InternalFieldName,\n isValid?: boolean,\n error?: FieldError,\n fieldState?: {\n dirty?: FieldNamesMarkedBoolean<TFieldValues>;\n isDirty?: boolean;\n touched?: FieldNamesMarkedBoolean<TFieldValues>;\n },\n ) => {\n const previousFieldError = get(_formState.errors, name);\n const shouldUpdateValid =\n _proxyFormState.isValid &&\n isBoolean(isValid) &&\n _formState.isValid !== isValid;\n\n if (props.delayError && error) {\n delayErrorCallback = debounce(() => updateErrors(name, error));\n delayErrorCallback(props.delayError);\n } else {\n clearTimeout(timer);\n delayErrorCallback = null;\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n\n if (\n (error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\n !isEmptyObject(fieldState) ||\n shouldUpdateValid\n ) {\n const updatedFormState = {\n ...fieldState,\n ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),\n errors: _formState.errors,\n name,\n };\n\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n\n _subjects.state.next(updatedFormState);\n }\n };\n\n const _executeSchema = async (name?: InternalFieldName[]) => {\n _updateIsValidating(name, true);\n const result = await _options.resolver!(\n _formValues as TFieldValues,\n _options.context,\n getResolverOptions(\n name || _names.mount,\n _fields,\n _options.criteriaMode,\n _options.shouldUseNativeValidation,\n ),\n );\n _updateIsValidating(name);\n return result;\n };\n\n const executeSchemaAndUpdateState = async (names?: InternalFieldName[]) => {\n const { errors } = await _executeSchema(names);\n\n if (names) {\n for (const name of names) {\n const error = get(errors, name);\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n } else {\n _formState.errors = errors;\n }\n\n return errors;\n };\n\n const executeBuiltInValidation = async (\n fields: FieldRefs,\n shouldOnlyCheckValid?: boolean,\n context: {\n valid: boolean;\n } = {\n valid: true,\n },\n ) => {\n for (const name in fields) {\n const field = fields[name];\n\n if (field) {\n const { _f, ...fieldValue } = field;\n\n if (_f) {\n const isFieldArrayRoot = _names.array.has(_f.name);\n _updateIsValidating([name], true);\n const fieldError = await validateField(\n field,\n _formValues,\n shouldDisplayAllAssociatedErrors,\n _options.shouldUseNativeValidation && !shouldOnlyCheckValid,\n isFieldArrayRoot,\n );\n _updateIsValidating([name]);\n\n if (fieldError[_f.name]) {\n context.valid = false;\n if (shouldOnlyCheckValid) {\n break;\n }\n }\n\n !shouldOnlyCheckValid &&\n (get(fieldError, _f.name)\n ? isFieldArrayRoot\n ? updateFieldArrayRootError(\n _formState.errors,\n fieldError,\n _f.name,\n )\n : set(_formState.errors, _f.name, fieldError[_f.name])\n : unset(_formState.errors, _f.name));\n }\n\n fieldValue &&\n (await executeBuiltInValidation(\n fieldValue,\n shouldOnlyCheckValid,\n context,\n ));\n }\n }\n\n return context.valid;\n };\n\n const _removeUnmounted = () => {\n for (const name of _names.unMount) {\n const field: Field = get(_fields, name);\n\n field &&\n (field._f.refs\n ? field._f.refs.every((ref) => !live(ref))\n : !live(field._f.ref)) &&\n unregister(name as FieldPath<TFieldValues>);\n }\n\n _names.unMount = new Set();\n };\n\n const _getDirty: GetIsDirty = (name, data) => (\n name && data && set(_formValues, name, data),\n !deepEqual(getValues(), _defaultValues)\n );\n\n const _getWatch: WatchInternal<TFieldValues> = (\n names,\n defaultValue,\n isGlobal,\n ) =>\n generateWatchOutput(\n names,\n _names,\n {\n ...(_state.mount\n ? _formValues\n : isUndefined(defaultValue)\n ? _defaultValues\n : isString(names)\n ? { [names]: defaultValue }\n : defaultValue),\n },\n isGlobal,\n defaultValue,\n );\n\n const _getFieldArray = <TFieldArrayValues>(\n name: InternalFieldName,\n ): Partial<TFieldArrayValues>[] =>\n compact(\n get(\n _state.mount ? _formValues : _defaultValues,\n name,\n props.shouldUnregister ? get(_defaultValues, name, []) : [],\n ),\n );\n\n const setFieldValue = (\n name: InternalFieldName,\n value: SetFieldValue<TFieldValues>,\n options: SetValueConfig = {},\n ) => {\n const field: Field = get(_fields, name);\n let fieldValue: unknown = value;\n\n if (field) {\n const fieldReference = field._f;\n\n if (fieldReference) {\n !fieldReference.disabled &&\n set(_formValues, name, getFieldValueAs(value, fieldReference));\n\n fieldValue =\n isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\n ? ''\n : value;\n\n if (isMultipleSelect(fieldReference.ref)) {\n [...fieldReference.ref.options].forEach(\n (optionRef) =>\n (optionRef.selected = (\n fieldValue as InternalFieldName[]\n ).includes(optionRef.value)),\n );\n } else if (fieldReference.refs) {\n if (isCheckBoxInput(fieldReference.ref)) {\n fieldReference.refs.length > 1\n ? fieldReference.refs.forEach(\n (checkboxRef) =>\n (!checkboxRef.defaultChecked || !checkboxRef.disabled) &&\n (checkboxRef.checked = Array.isArray(fieldValue)\n ? !!(fieldValue as []).find(\n (data: string) => data === checkboxRef.value,\n )\n : fieldValue === checkboxRef.value),\n )\n : fieldReference.refs[0] &&\n (fieldReference.refs[0].checked = !!fieldValue);\n } else {\n fieldReference.refs.forEach(\n (radioRef: HTMLInputElement) =>\n (radioRef.checked = radioRef.value === fieldValue),\n );\n }\n } else if (isFileInput(fieldReference.ref)) {\n fieldReference.ref.value = '';\n } else {\n fieldReference.ref.value = fieldValue;\n\n if (!fieldReference.ref.type) {\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n }\n }\n }\n }\n\n (options.shouldDirty || options.shouldTouch) &&\n updateTouchAndDirty(\n name,\n fieldValue,\n options.shouldTouch,\n options.shouldDirty,\n true,\n );\n\n options.shouldValidate && trigger(name as Path<TFieldValues>);\n };\n\n const setValues = <\n T extends InternalFieldName,\n K extends SetFieldValue<TFieldValues>,\n U extends SetValueConfig,\n >(\n name: T,\n value: K,\n options: U,\n ) => {\n for (const fieldKey in value) {\n const fieldValue = value[fieldKey];\n const fieldName = `${name}.${fieldKey}`;\n const field = get(_fields, fieldName);\n\n (_names.array.has(name) ||\n !isPrimitive(fieldValue) ||\n (field && !field._f)) &&\n !isDateObject(fieldValue)\n ? setValues(fieldName, fieldValue, options)\n : setFieldValue(fieldName, fieldValue, options);\n }\n };\n\n const setValue: UseFormSetValue<TFieldValues> = (\n name,\n value,\n options = {},\n ) => {\n const field = get(_fields, name);\n const isFieldArray = _names.array.has(name);\n const cloneValue = cloneObject(value);\n\n set(_formValues, name, cloneValue);\n\n if (isFieldArray) {\n _subjects.array.next({\n name,\n values: { ..._formValues },\n });\n\n if (\n (_proxyFormState.isDirty || _proxyFormState.dirtyFields) &&\n options.shouldDirty\n ) {\n _subjects.state.next({\n name,\n dirtyFields: getDirtyFields(_defaultValues, _formValues),\n isDirty: _getDirty(name, cloneValue),\n });\n }\n } else {\n field && !field._f && !isNullOrUndefined(cloneValue)\n ? setValues(name, cloneValue, options)\n : setFieldValue(name, cloneValue, options);\n }\n\n isWatched(name, _names) && _subjects.state.next({ ..._formState });\n _subjects.values.next({\n name: _state.mount ? name : undefined,\n values: { ..._formValues },\n });\n };\n\n const onChange: ChangeHandler = async (event) => {\n _state.mount = true;\n const target = event.target;\n let name = target.name as string;\n let isFieldValueUpdated = true;\n const field: Field = get(_fields, name);\n const getCurrentFieldValue = () =>\n target.type ? getFieldValue(field._f) : getEventValue(event);\n const _updateIsFieldValueUpdated = (fieldValue: any): void => {\n isFieldValueUpdated =\n Number.isNaN(fieldValue) ||\n fieldValue === get(_formValues, name, fieldValue);\n };\n\n if (field) {\n let error;\n let isValid;\n const fieldValue = getCurrentFieldValue();\n const isBlurEvent =\n event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;\n const shouldSkipValidation =\n (!hasValidation(field._f) &&\n !_options.resolver &&\n !get(_formState.errors, name) &&\n !field._f.deps) ||\n skipValidation(\n isBlurEvent,\n get(_formState.touchedFields, name),\n _formState.isSubmitted,\n validationModeAfterSubmit,\n validationModeBeforeSubmit,\n );\n const watched = isWatched(name, _names, isBlurEvent);\n\n set(_formValues, name, fieldValue);\n\n if (isBlurEvent) {\n field._f.onBlur && field._f.onBlur(event);\n delayErrorCallback && delayErrorCallback(0);\n } else if (field._f.onChange) {\n field._f.onChange(event);\n }\n\n const fieldState = updateTouchAndDirty(\n name,\n fieldValue,\n isBlurEvent,\n false,\n );\n\n const shouldRender = !isEmptyObject(fieldState) || watched;\n\n !isBlurEvent &&\n _subjects.values.next({\n name,\n type: event.type,\n values: { ..._formValues },\n });\n\n if (shouldSkipValidation) {\n _proxyFormState.isValid && _updateValid();\n\n return (\n shouldRender &&\n _subjects.state.next({ name, ...(watched ? {} : fieldState) })\n );\n }\n\n !isBlurEvent && watched && _subjects.state.next({ ..._formState });\n\n if (_options.resolver) {\n const { errors } = await _executeSchema([name]);\n\n _updateIsFieldValueUpdated(fieldValue);\n\n if (isFieldValueUpdated) {\n const previousErrorLookupResult = schemaErrorLookup(\n _formState.errors,\n _fields,\n name,\n );\n const errorLookupResult = schemaErrorLookup(\n errors,\n _fields,\n previousErrorLookupResult.name || name,\n );\n\n error = errorLookupResult.error;\n name = errorLookupResult.name;\n\n isValid = isEmptyObject(errors);\n }\n } else {\n _updateIsValidating([name], true);\n error = (\n await validateField(\n field,\n _formValues,\n shouldDisplayAllAssociatedErrors,\n _options.shouldUseNativeValidation,\n )\n )[name];\n _updateIsValidating([name]);\n\n _updateIsFieldValueUpdated(fieldValue);\n\n if (isFieldValueUpdated) {\n if (error) {\n isValid = false;\n } else if (_proxyFormState.isValid) {\n isValid = await executeBuiltInValidation(_fields, true);\n }\n }\n }\n\n if (isFieldValueUpdated) {\n field._f.deps &&\n trigger(\n field._f.deps as\n | FieldPath<TFieldValues>\n | FieldPath<TFieldValues>[],\n );\n shouldRenderByError(name, isValid, error, fieldState);\n }\n }\n };\n\n const _focusInput = (ref: Ref, key: string) => {\n if (get(_formState.errors, key) && ref.focus) {\n ref.focus();\n return 1;\n }\n return;\n };\n\n const trigger: UseFormTrigger<TFieldValues> = async (name, options = {}) => {\n let isValid;\n let validationResult;\n const fieldNames = convertToArrayPayload(name) as InternalFieldName[];\n\n if (_options.resolver) {\n const errors = await executeSchemaAndUpdateState(\n isUndefined(name) ? name : fieldNames,\n );\n\n isValid = isEmptyObject(errors);\n validationResult = name\n ? !fieldNames.some((name) => get(errors, name))\n : isValid;\n } else if (name) {\n validationResult = (\n await Promise.all(\n fieldNames.map(async (fieldName) => {\n const field = get(_fields, fieldName);\n return await executeBuiltInValidation(\n field && field._f ? { [fieldName]: field } : field,\n );\n }),\n )\n ).every(Boolean);\n !(!validationResult && !_formState.isValid) && _updateValid();\n } else {\n validationResult = isValid = await executeBuiltInValidation(_fields);\n }\n\n _subjects.state.next({\n ...(!isString(name) ||\n (_proxyFormState.isValid && isValid !== _formState.isValid)\n ? {}\n : { name }),\n ...(_options.resolver || !name ? { isValid } : {}),\n errors: _formState.errors,\n });\n\n options.shouldFocus &&\n !validationResult &&\n iterateFieldsByAction(\n _fields,\n _focusInput,\n name ? fieldNames : _names.mount,\n );\n\n return validationResult;\n };\n\n const getValues: UseFormGetValues<TFieldValues> = (\n fieldNames?:\n | FieldPath<TFieldValues>\n | ReadonlyArray<FieldPath<TFieldValues>>,\n ) => {\n const values = {\n ...(_state.mount ? _formValues : _defaultValues),\n };\n\n return isUndefined(fieldNames)\n ? values\n : isString(fieldNames)\n ? get(values, fieldNames)\n : fieldNames.map((name) => get(values, name));\n };\n\n const getFieldState: UseFormGetFieldState<TFieldValues> = (\n name,\n formState,\n ) => ({\n invalid: !!get((formState || _formState).errors, name),\n isDirty: !!get((formState || _formState).dirtyFields, name),\n error: get((formState || _formState).errors, name),\n isValidating: !!get(_formState.validatingFields, name),\n isTouched: !!get((formState || _formState).touchedFields, name),\n });\n\n const clearErrors: UseFormClearErrors<TFieldValues> = (name) => {\n name &&\n convertToArrayPayload(name).forEach((inputName) =>\n unset(_formState.errors, inputName),\n );\n\n _subjects.state.next({\n errors: name ? _formState.errors : {},\n });\n };\n\n const setError: UseFormSetError<TFieldValues> = (name, error, options) => {\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\n const currentError = get(_formState.errors, name) || {};\n\n // Don't override existing error messages elsewhere in the object tree.\n const { ref: currentRef, message, type, ...restOfErrorTree } = currentError;\n\n set(_formState.errors, name, {\n ...restOfErrorTree,\n ...error,\n ref,\n });\n\n _subjects.state.next({\n name,\n errors: _formState.errors,\n isValid: false,\n });\n\n options && options.shouldFocus && ref && ref.focus && ref.focus();\n };\n\n const watch: UseFormWatch<TFieldValues> = (\n name?:\n | FieldPath<TFieldValues>\n | ReadonlyArray<FieldPath<TFieldValues>>\n | WatchObserver<TFieldValues>,\n defaultValue?: DeepPartial<TFieldValues>,\n ) =>\n isFunction(name)\n ? _subjects.values.subscribe({\n next: (payload) =>\n name(\n _getWatch(undefined, defaultValue),\n payload as {\n name?: FieldPath<TFieldValues>;\n type?: EventType;\n value?: unknown;\n },\n ),\n })\n : _getWatch(\n name as InternalFieldName | InternalFieldName[],\n defaultValue,\n true,\n );\n\n const unregister: UseFormUnregister<TFieldValues> = (name, options = {}) => {\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\n _names.mount.delete(fieldName);\n _names.array.delete(fieldName);\n\n if (!options.keepValue) {\n unset(_fields, fieldName);\n unset(_formValues, fieldName);\n }\n\n !options.keepError && unset(_formState.errors, fieldName);\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\n !options.keepIsValidating &&\n unset(_formState.validatingFields, fieldName);\n !_options.shouldUnregister &&\n !options.keepDefaultValue &&\n unset(_defaultValues, fieldName);\n }\n\n _subjects.values.next({\n values: { ..._formValues },\n });\n\n _subjects.state.next({\n ..._formState,\n ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),\n });\n\n !options.keepIsValid && _updateValid();\n };\n\n const _updateDisabledField: Control<TFieldValues>['_updateDisabledField'] = ({\n disabled,\n name,\n field,\n fields,\n value,\n }) => {\n if ((isBoolean(disabled) && _state.mount) || !!disabled) {\n const inputValue = disabled\n ? undefined\n : isUndefined(value)\n ? getFieldValue(field ? field._f : get(fields, name)._f)\n : value;\n set(_formValues, name, inputValue);\n updateTouchAndDirty(name, inputValue, false, false, true);\n }\n };\n\n const register: UseFormRegister<TFieldValues> = (name, options = {}) => {\n let field = get(_fields, name);\n const disabledIsDefined = isBoolean(options.disabled);\n\n set(_fields, name, {\n ...(field || {}),\n _f: {\n ...(field && field._f ? field._f : { ref: { name } }),\n name,\n mount: true,\n ...options,\n },\n });\n _names.mount.add(name);\n\n if (field) {\n _updateDisabledField({\n field,\n disabled: options.disabled,\n name,\n value: options.value,\n });\n } else {\n updateValidAndValue(name, true, options.value);\n }\n\n return {\n ...(disabledIsDefined ? { disabled: options.disabled } : {}),\n ...(_options.progressive\n ? {\n required: !!options.required,\n min: getRuleValue(options.min),\n max: getRuleValue(options.max),\n minLength: getRuleValue<number>(options.minLength) as number,\n maxLength: getRuleValue(options.maxLength) as number,\n pattern: getRuleValue(options.pattern) as string,\n }\n : {}),\n name,\n onChange,\n onBlur: onChange,\n ref: (ref: HTMLInputElement | null): void => {\n if (ref) {\n register(name, options);\n field = get(_fields, name);\n\n const fieldRef = isUndefined(ref.value)\n ? ref.querySelectorAll\n ? (ref.querySelectorAll('input,select,textarea')[0] as Ref) || ref\n : ref\n : ref;\n const radioOrCheckbox = isRadioOrCheckbox(fieldRef);\n const refs = field._f.refs || [];\n\n if (\n radioOrCheckbox\n ? refs.find((option: Ref) => option === fieldRef)\n : fieldRef === field._f.ref\n ) {\n return;\n }\n\n set(_fields, name, {\n _f: {\n ...field._f,\n ...(radioOrCheckbox\n ? {\n refs: [\n ...refs.filter(live),\n fieldRef,\n ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),\n ],\n ref: { type: fieldRef.type, name },\n }\n : { ref: fieldRef }),\n },\n });\n\n updateValidAndValue(name, false, undefined, fieldRef);\n } else {\n field = get(_fields, name, {});\n\n if (field._f) {\n field._f.mount = false;\n }\n\n (_options.shouldUnregister || options.shouldUnregister) &&\n !(isNameInFieldArray(_names.array, name) && _state.action) &&\n _names.unMount.add(name);\n }\n },\n };\n };\n\n const _focusError = () =>\n _options.shouldFocusError &&\n iterateFieldsByAction(_fields, _focusInput, _names.mount);\n\n const _disableForm = (disabled?: boolean) => {\n if (isBoolean(disabled)) {\n _subjects.state.next({ disabled });\n iterateFieldsByAction(\n _fields,\n (ref, name) => {\n const currentField: Field = get(_fields, name);\n if (currentField) {\n ref.disabled = currentField._f.disabled || disabled;\n\n if (Array.isArray(currentField._f.refs)) {\n currentField._f.refs.forEach((inputRef) => {\n inputRef.disabled = currentField._f.disabled || disabled;\n });\n }\n }\n },\n 0,\n false,\n );\n }\n };\n\n const handleSubmit: UseFormHandleSubmit<TFieldValues> =\n (onValid, onInvalid) => async (e) => {\n let onValidError = undefined;\n if (e) {\n e.preventDefault && e.preventDefault();\n e.persist && e.persist();\n }\n let fieldValues = cloneObject(_formValues);\n\n _subjects.state.next({\n isSubmitting: true,\n });\n\n if (_options.resolver) {\n const { errors, values } = await _executeSchema();\n _formState.errors = errors;\n fieldValues = values;\n } else {\n await executeBuiltInValidation(_fields);\n }\n\n unset(_formState.errors, 'root');\n\n if (isEmptyObject(_formState.errors)) {\n _subjects.state.next({\n errors: {},\n });\n try {\n await onValid(fieldValues as TFieldValues, e);\n } catch (error) {\n onValidError = error;\n }\n } else {\n if (onInvalid) {\n await onInvalid({ ..._formState.errors }, e);\n }\n _focusError();\n setTimeout(_focusError);\n }\n\n _subjects.state.next({\n isSubmitted: true,\n isSubmitting: false,\n isSubmitSuccessful: isEmptyObject(_formState.errors) && !onValidError,\n submitCount: _formState.submitCount + 1,\n errors: _formState.errors,\n });\n if (onValidError) {\n throw onValidError;\n }\n };\n\n const resetField: UseFormResetField<TFieldValues> = (name, options = {}) => {\n if (get(_fields, name)) {\n if (isUndefined(options.defaultValue)) {\n setValue(name, cloneObject(get(_defaultValues, name)));\n } else {\n setValue(\n name,\n options.defaultValue as PathValue<\n TFieldValues,\n FieldPath<TFieldValues>\n >,\n );\n set(_defaultValues, name, cloneObject(options.defaultValue));\n }\n\n if (!options.keepTouched) {\n unset(_formState.touchedFields, name);\n }\n\n if (!options.keepDirty) {\n unset(_formState.dirtyFields, name);\n _formState.isDirty = options.defaultValue\n ? _getDirty(name, cloneObject(get(_defaultValues, name)))\n : _getDirty();\n }\n\n if (!options.keepError) {\n unset(_formState.errors, name);\n _proxyFormState.isValid && _updateValid();\n }\n\n _subjects.state.next({ ..._formState });\n }\n };\n\n const _reset: UseFormReset<TFieldValues> = (\n formValues,\n keepStateOptions = {},\n ) => {\n const updatedValues = formValues ? cloneObject(formValues) : _defaultValues;\n const cloneUpdatedValues = cloneObject(updatedValues);\n const isEmptyResetValues = isEmptyObject(formValues);\n const values = isEmptyResetValues ? _defaultValues : cloneUpdatedValues;\n\n if (!keepStateOptions.keepDefaultValues) {\n _defaultValues = updatedValues;\n }\n\n if (!keepStateOptions.keepValues) {\n if (keepStateOptions.keepDirtyValues) {\n for (const fieldName of _names.mount) {\n get(_formState.dirtyFields, fieldName)\n ? set(values, fieldName, get(_formValues, fieldName))\n : setValue(\n fieldName as FieldPath<TFieldValues>,\n get(values, fieldName),\n );\n }\n } else {\n if (isWeb && isUndefined(formValues)) {\n for (const name of _names.mount) {\n const field = get(_fields, name);\n if (field && field._f) {\n const fieldReference = Array.isArray(field._f.refs)\n ? field._f.refs[0]\n : field._f.ref;\n\n if (isHTMLElement(fieldReference)) {\n const form = fieldReference.closest('form');\n if (form) {\n form.reset();\n break;\n }\n }\n }\n }\n }\n\n _fields = {};\n }\n\n _formValues = props.shouldUnregister\n ? keepStateOptions.keepDefaultValues\n ? cloneObject(_defaultValues)\n : {}\n : cloneObject(values);\n\n _subjects.array.next({\n values: { ...values },\n });\n\n _subjects.values.next({\n values: { ...values },\n });\n }\n\n _names = {\n mount: keepStateOptions.keepDirtyValues ? _names.mount : new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n watchAll: false,\n focus: '',\n };\n\n _state.mount =\n !_proxyFormState.isValid ||\n !!keepStateOptions.keepIsValid ||\n !!keepStateOptions.keepDirtyValues;\n\n _state.watch = !!props.shouldUnregister;\n\n _subjects.state.next({\n submitCount: keepStateOptions.keepSubmitCount\n ? _formState.submitCount\n : 0,\n isDirty: isEmptyResetValues\n ? false\n : keepStateOptions.keepDirty\n ? _formState.isDirty\n : !!(\n keepStateOptions.keepDefaultValues &&\n !deepEqual(formValues, _defaultValues)\n ),\n isSubmitted: keepStateOptions.keepIsSubmitted\n ? _formState.isSubmitted\n : false,\n dirtyFields: isEmptyResetValues\n ? {}\n : keepStateOptions.keepDirtyValues\n ? keepStateOptions.keepDefaultValues && _formValues\n ? getDirtyFields(_defaultValues, _formValues)\n : _formState.dirtyFields\n : keepStateOptions.keepDefaultValues && formValues\n ? getDirtyFields(_defaultValues, formValues)\n : keepStateOptions.keepDirty\n ? _formState.dirtyFields\n : {},\n touchedFields: keepStateOptions.keepTouched\n ? _formState.touchedFields\n : {},\n errors: keepStateOptions.keepErrors ? _formState.errors : {},\n isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful\n ? _formState.isSubmitSuccessful\n : false,\n isSubmitting: false,\n });\n };\n\n const reset: UseFormReset<TFieldValues> = (formValues, keepStateOptions) =>\n _reset(\n isFunction(formValues)\n ? formValues(_formValues as TFieldValues)\n : formValues,\n keepStateOptions,\n );\n\n const setFocus: UseFormSetFocus<TFieldValues> = (name, options = {}) => {\n const field = get(_fields, name);\n const fieldReference = field && field._f;\n\n if (fieldReference) {\n const fieldRef = fieldReference.refs\n ? fieldReference.refs[0]\n : fieldReference.ref;\n\n if (fieldRef.focus) {\n fieldRef.focus();\n options.shouldSelect && fieldRef.select();\n }\n }\n };\n\n const _updateFormState = (\n updatedFormState: Partial<FormState<TFieldValues>>,\n ) => {\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n };\n\n const _resetDefaultValues = () =>\n isFunction(_options.defaultValues) &&\n _options.defaultValues().then((values: TFieldValues) => {\n reset(values, _options.resetOptions);\n _subjects.state.next({\n isLoading: false,\n });\n });\n\n return {\n control: {\n register,\n unregister,\n getFieldState,\n handleSubmit,\n setError,\n _executeSchema,\n _getWatch,\n _getDirty,\n _updateValid,\n _removeUnmounted,\n _updateFieldArray,\n _updateDisabledField,\n _getFieldArray,\n _reset,\n _resetDefaultValues,\n _updateFormState,\n _disableForm,\n _subjects,\n _proxyFormState,\n _setErrors,\n get _fields() {\n return _fields;\n },\n get _formValues() {\n return _formValues;\n },\n get _state() {\n return _state;\n },\n set _state(value) {\n _state = value;\n },\n get _defaultValues() {\n return _defaultValues;\n },\n get _names() {\n return _names;\n },\n set _names(value) {\n _names = value;\n },\n get _formState() {\n return _formState;\n },\n set _formState(value) {\n _formState = value;\n },\n get _options() {\n return _options;\n },\n set _options(value) {\n _options = {\n ..._options,\n ...value,\n };\n },\n },\n trigger,\n register,\n handleSubmit,\n watch,\n setValue,\n getValues,\n reset,\n resetField,\n clearErrors,\n unregister,\n setError,\n setFocus,\n getFieldState,\n };\n}\n","import React from 'react';\n\nimport { createFormControl } from './logic/createFormControl';\nimport getProxyFormState from './logic/getProxyFormState';\nimport shouldRenderFormState from './logic/shouldRenderFormState';\nimport deepEqual from './utils/deepEqual';\nimport isFunction from './utils/isFunction';\nimport {\n FieldValues,\n FormState,\n InternalFieldName,\n UseFormProps,\n UseFormReturn,\n} from './types';\nimport { useSubscribe } from './useSubscribe';\n\n/**\n * Custom hook to manage the entire form.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)\n *\n * @param props - form configuration and validation parameters.\n *\n * @returns methods - individual functions to manage the form state. {@link UseFormReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, watch, formState: { errors } } = useForm();\n * const onSubmit = data => console.log(data);\n *\n * console.log(watch(\"example\"));\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input defaultValue=\"test\" {...register(\"example\")} />\n * <input {...register(\"exampleRequired\", { required: true })} />\n * {errors.exampleRequired && <span>This field is required</span>}\n * <button>Submit</button>\n * </form>\n * );\n * }\n * ```\n */\nexport function useForm<\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TTransformedValues extends FieldValues | undefined = undefined,\n>(\n props: UseFormProps<TFieldValues, TContext> = {},\n): UseFormReturn<TFieldValues, TContext, TTransformedValues> {\n const _formControl = React.useRef<\n UseFormReturn<TFieldValues, TContext, TTransformedValues> | undefined\n >();\n const _values = React.useRef<typeof props.values>();\n const [formState, updateFormState] = React.useState<FormState<TFieldValues>>({\n isDirty: false,\n isValidating: false,\n isLoading: isFunction(props.defaultValues),\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n submitCount: 0,\n dirtyFields: {},\n touchedFields: {},\n validatingFields: {},\n errors: props.errors || {},\n disabled: props.disabled || false,\n defaultValues: isFunction(props.defaultValues)\n ? undefined\n : props.defaultValues,\n });\n\n if (!_formControl.current) {\n _formControl.current = {\n ...createFormControl(props),\n formState,\n };\n }\n\n const control = _formControl.current.control;\n control._options = props;\n\n useSubscribe({\n subject: control._subjects.state,\n next: (\n value: Partial<FormState<TFieldValues>> & { name?: InternalFieldName },\n ) => {\n if (\n shouldRenderFormState(\n value,\n control._proxyFormState,\n control._updateFormState,\n true,\n )\n ) {\n updateFormState({ ...control._formState });\n }\n },\n });\n\n React.useEffect(\n () => control._disableForm(props.disabled),\n [control, props.disabled],\n );\n\n React.useEffect(() => {\n if (control._proxyFormState.isDirty) {\n const isDirty = control._getDirty();\n if (isDirty !== formState.isDirty) {\n control._subjects.state.next({\n isDirty,\n });\n }\n }\n }, [control, formState.isDirty]);\n\n React.useEffect(() => {\n if (props.values && !deepEqual(props.values, _values.current)) {\n control._reset(props.values, control._options.resetOptions);\n _values.current = props.values;\n updateFormState((state) => ({ ...state }));\n } else {\n control._resetDefaultValues();\n }\n }, [props.values, control]);\n\n React.useEffect(() => {\n if (props.errors) {\n control._setErrors(props.errors);\n }\n }, [props.errors, control]);\n\n React.useEffect(() => {\n if (!control._state.mount) {\n control._updateValid();\n control._state.mount = true;\n }\n\n if (control._state.watch) {\n control._state.watch = false;\n control._subjects.state.next({ ...control._formState });\n }\n\n control._removeUnmounted();\n });\n\n React.useEffect(() => {\n props.shouldUnregister &&\n control._subjects.values.next({\n values: control._getWatch(),\n });\n }, [props.shouldUnregister, control]);\n\n _formControl.current.formState = getProxyFormState(formState, control);\n\n return _formControl.current;\n}\n"],"names":["insert","insertAt","isCheckBox"],"mappings":";;AAEA,sBAAe,CAAC,OAAqB,KACnC,OAAO,CAAC,IAAI,KAAK,UAAU;;ACH7B,mBAAe,CAAC,KAAc,KAAoB,KAAK,YAAY,IAAI;;ACAvE,wBAAe,CAAC,KAAc,KAAgC,KAAK,IAAI,IAAI;;ACGpE,MAAM,YAAY,GAAG,CAAC,KAAc,KACzC,OAAO,KAAK,KAAK,QAAQ,CAAC;AAE5B,eAAe,CAAmB,KAAc,KAC9C,CAAC,iBAAiB,CAAC,KAAK,CAAC;AACzB,IAAA,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IACrB,YAAY,CAAC,KAAK,CAAC;AACnB,IAAA,CAAC,YAAY,CAAC,KAAK,CAAC;;ACLtB,oBAAe,CAAC,KAAc,KAC5B,QAAQ,CAAC,KAAK,CAAC,IAAK,KAAe,CAAC,MAAM;AACxC,MAAE,eAAe,CAAE,KAAe,CAAC,MAAM,CAAC;AACxC,UAAG,KAAe,CAAC,MAAM,CAAC,OAAO;AACjC,UAAG,KAAe,CAAC,MAAM,CAAC,KAAK;MAC/B,KAAK;;ACVX,wBAAe,CAAC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