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aAAc,MAAO,WAAY,gBAAiB,KAAM,eAAgB,UAAW,qBAAsB,qBAAsB,UAAW,WAAY,gBAAiB,eAAgB,SAAU,cAAe,cAAe,cAAe,QAAS,eAAgB,cAAe,cAAe,gBAAiB,kBAAmB,gBAAiB,eAAgB,iBAAkB,eAAgB,gBAAiB,gBAAiB,aAAc,iBAAkB,mBAAoB,iBAAkB,iBAAkB,kBAAmB,iBAAkB,eAAgB,cAAe,iBAAkB,gBAAiB,SAAU","file":"/npm/vee-validate@4.15.1/dist/vee-validate.mjs","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/vee-validate@4.15.1/dist/vee-validate.mjs\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n  * vee-validate v4.15.1\n  * (c) 2025 Abdelrahman Awad\n  * @license MIT\n  */\nimport { getCurrentInstance, inject, warn as warn$1, computed, toValue, ref, watch, nextTick, unref, isRef, reactive, onUnmounted, onMounted, provide, onBeforeUnmount, defineComponent, toRef, resolveDynamicComponent, h, readonly, watchEffect, shallowRef } from 'vue';\n\nfunction isCallable(fn) {\n    return typeof fn === 'function';\n}\nfunction isNullOrUndefined(value) {\n    return value === null || value === undefined;\n}\nconst isObject = (obj) => obj !== null && !!obj && typeof obj === 'object' && !Array.isArray(obj);\nfunction isIndex(value) {\n    return Number(value) >= 0;\n}\nfunction toNumber(value) {\n    const n = parseFloat(value);\n    return isNaN(n) ? value : n;\n}\nfunction isObjectLike(value) {\n    return typeof value === 'object' && value !== null;\n}\nfunction getTag(value) {\n    if (value == null) {\n        return value === undefined ? '[object Undefined]' : '[object Null]';\n    }\n    return Object.prototype.toString.call(value);\n}\n// Reference: https://github.com/lodash/lodash/blob/master/isPlainObject.js\nfunction isPlainObject(value) {\n    if (!isObjectLike(value) || getTag(value) !== '[object Object]') {\n        return false;\n    }\n    if (Object.getPrototypeOf(value) === null) {\n        return true;\n    }\n    let proto = value;\n    while (Object.getPrototypeOf(proto) !== null) {\n        proto = Object.getPrototypeOf(proto);\n    }\n    return Object.getPrototypeOf(value) === proto;\n}\nfunction merge(target, source) {\n    Object.keys(source).forEach(key => {\n        if (isPlainObject(source[key]) && isPlainObject(target[key])) {\n            if (!target[key]) {\n                target[key] = {};\n            }\n            merge(target[key], source[key]);\n            return;\n        }\n        target[key] = source[key];\n    });\n    return target;\n}\n/**\n * Constructs a path with dot paths for arrays to use brackets to be compatible with vee-validate path syntax\n */\nfunction normalizeFormPath(path) {\n    const pathArr = path.split('.');\n    if (!pathArr.length) {\n        return '';\n    }\n    let fullPath = String(pathArr[0]);\n    for (let i = 1; i < pathArr.length; i++) {\n        if (isIndex(pathArr[i])) {\n            fullPath += `[${pathArr[i]}]`;\n            continue;\n        }\n        fullPath += `.${pathArr[i]}`;\n    }\n    return fullPath;\n}\n\nconst RULES = {};\n/**\n * Adds a custom validator to the list of validation rules.\n */\nfunction defineRule(id, validator) {\n    // makes sure new rules are properly formatted.\n    guardExtend(id, validator);\n    RULES[id] = validator;\n}\n/**\n * Gets an already defined rule\n */\nfunction resolveRule(id) {\n    return RULES[id];\n}\n/**\n * Guards from extension violations.\n */\nfunction guardExtend(id, validator) {\n    if (isCallable(validator)) {\n        return;\n    }\n    throw new Error(`Extension Error: The validator '${id}' must be a function.`);\n}\n\nfunction set(obj, key, val) {\n\tif (typeof val.value === 'object') val.value = klona(val.value);\n\tif (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === '__proto__') {\n\t\tObject.defineProperty(obj, key, val);\n\t} else obj[key] = val.value;\n}\n\nfunction klona(x) {\n\tif (typeof x !== 'object') return x;\n\n\tvar i=0, k, list, tmp, str=Object.prototype.toString.call(x);\n\n\tif (str === '[object Object]') {\n\t\ttmp = Object.create(x.__proto__ || null);\n\t} else if (str === '[object Array]') {\n\t\ttmp = Array(x.length);\n\t} else if (str === '[object Set]') {\n\t\ttmp = new Set;\n\t\tx.forEach(function (val) {\n\t\t\ttmp.add(klona(val));\n\t\t});\n\t} else if (str === '[object Map]') {\n\t\ttmp = new Map;\n\t\tx.forEach(function (val, key) {\n\t\t\ttmp.set(klona(key), klona(val));\n\t\t});\n\t} else if (str === '[object Date]') {\n\t\ttmp = new Date(+x);\n\t} else if (str === '[object RegExp]') {\n\t\ttmp = new RegExp(x.source, x.flags);\n\t} else if (str === '[object DataView]') {\n\t\ttmp = new x.constructor( klona(x.buffer) );\n\t} else if (str === '[object ArrayBuffer]') {\n\t\ttmp = x.slice(0);\n\t} else if (str.slice(-6) === 'Array]') {\n\t\t// ArrayBuffer.isView(x)\n\t\t// ~> `new` bcuz `Buffer.slice` => ref\n\t\ttmp = new x.constructor(x);\n\t}\n\n\tif (tmp) {\n\t\tfor (list=Object.getOwnPropertySymbols(x); i < list.length; i++) {\n\t\t\tset(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));\n\t\t}\n\n\t\tfor (i=0, list=Object.getOwnPropertyNames(x); i < list.length; i++) {\n\t\t\tif (Object.hasOwnProperty.call(tmp, k=list[i]) && tmp[k] === x[k]) continue;\n\t\t\tset(tmp, k, Object.getOwnPropertyDescriptor(x, k));\n\t\t}\n\t}\n\n\treturn tmp || x;\n}\n\nconst FormContextKey = Symbol('vee-validate-form');\nconst PublicFormContextKey = Symbol('vee-validate-form-context');\nconst FieldContextKey = Symbol('vee-validate-field-instance');\nconst IS_ABSENT = Symbol('Default empty value');\n\nconst isClient = typeof window !== 'undefined';\nfunction isLocator(value) {\n    return isCallable(value) && !!value.__locatorRef;\n}\nfunction isTypedSchema(value) {\n    return !!value && isCallable(value.parse) && value.__type === 'VVTypedSchema';\n}\nfunction isYupValidator(value) {\n    return !!value && isCallable(value.validate);\n}\nfunction hasCheckedAttr(type) {\n    return type === 'checkbox' || type === 'radio';\n}\nfunction isContainerValue(value) {\n    return isObject(value) || Array.isArray(value);\n}\n/**\n * True if the value is an empty object or array\n */\nfunction isEmptyContainer(value) {\n    if (Array.isArray(value)) {\n        return value.length === 0;\n    }\n    return isObject(value) && Object.keys(value).length === 0;\n}\n/**\n * Checks if the path opted out of nested fields using `[fieldName]` syntax\n */\nfunction isNotNestedPath(path) {\n    return /^\\[.+\\]$/i.test(path);\n}\n/**\n * Checks if an element is a native HTML5 multi-select input element\n */\nfunction isNativeMultiSelect(el) {\n    return isNativeSelect(el) && el.multiple;\n}\n/**\n * Checks if an element is a native HTML5 select input element\n */\nfunction isNativeSelect(el) {\n    return el.tagName === 'SELECT';\n}\n/**\n * Checks if a tag name with attrs object will render a native multi-select element\n */\nfunction isNativeMultiSelectNode(tag, attrs) {\n    // The falsy value array is the values that Vue won't add the `multiple` prop if it has one of these values\n    const hasTruthyBindingValue = ![false, null, undefined, 0].includes(attrs.multiple) && !Number.isNaN(attrs.multiple);\n    return tag === 'select' && 'multiple' in attrs && hasTruthyBindingValue;\n}\n/**\n * Checks if a node should have a `:value` binding or not\n *\n * These nodes should not have a value binding\n * For files, because they are not reactive\n * For multi-selects because the value binding will reset the value\n */\nfunction shouldHaveValueBinding(tag, attrs) {\n    return !isNativeMultiSelectNode(tag, attrs) && attrs.type !== 'file' && !hasCheckedAttr(attrs.type);\n}\nfunction isFormSubmitEvent(evt) {\n    return isEvent(evt) && evt.target && 'submit' in evt.target;\n}\nfunction isEvent(evt) {\n    if (!evt) {\n        return false;\n    }\n    if (typeof Event !== 'undefined' && isCallable(Event) && evt instanceof Event) {\n        return true;\n    }\n    // this is for IE and Cypress #3161\n    /* istanbul ignore next */\n    if (evt && evt.srcElement) {\n        return true;\n    }\n    return false;\n}\nfunction isPropPresent(obj, prop) {\n    return prop in obj && obj[prop] !== IS_ABSENT;\n}\n/**\n * Compares if two values are the same borrowed from:\n * https://github.com/epoberezkin/fast-deep-equal\n * We added a case for file matching since `Object.keys` doesn't work with Files.\n *\n * NB: keys with the value undefined are ignored in the evaluation and considered equal to missing keys.\n * */\nfunction isEqual(a, b) {\n    if (a === b)\n        return true;\n    if (a && b && typeof a === 'object' && typeof b === 'object') {\n        if (a.constructor !== b.constructor)\n            return false;\n        // eslint-disable-next-line no-var\n        var length, i, keys;\n        if (Array.isArray(a)) {\n            length = a.length;\n            if (length != b.length)\n                return false;\n            for (i = length; i-- !== 0;)\n                if (!isEqual(a[i], b[i]))\n                    return false;\n            return true;\n        }\n        if (a instanceof Map && b instanceof Map) {\n            if (a.size !== b.size)\n                return false;\n            for (i of a.entries())\n                if (!b.has(i[0]))\n                    return false;\n            for (i of a.entries())\n                if (!isEqual(i[1], b.get(i[0])))\n                    return false;\n            return true;\n        }\n        // We added this part for file comparison, arguably a little naive but should work for most cases.\n        // #3911\n        if (isFile(a) && isFile(b)) {\n            if (a.size !== b.size)\n                return false;\n            if (a.name !== b.name)\n                return false;\n            if (a.lastModified !== b.lastModified)\n                return false;\n            if (a.type !== b.type)\n                return false;\n            return true;\n        }\n        if (a instanceof Set && b instanceof Set) {\n            if (a.size !== b.size)\n                return false;\n            for (i of a.entries())\n                if (!b.has(i[0]))\n                    return false;\n            return true;\n        }\n        if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n            length = a.length;\n            if (length != b.length)\n                return false;\n            for (i = length; i-- !== 0;)\n                if (a[i] !== b[i])\n                    return false;\n            return true;\n        }\n        if (a.constructor === RegExp)\n            return a.source === b.source && a.flags === b.flags;\n        if (a.valueOf !== Object.prototype.valueOf)\n            return a.valueOf() === b.valueOf();\n        if (a.toString !== Object.prototype.toString)\n            return a.toString() === b.toString();\n        // Remove undefined values before object comparison\n        a = normalizeObject(a);\n        b = normalizeObject(b);\n        keys = Object.keys(a);\n        length = keys.length;\n        if (length !== Object.keys(b).length)\n            return false;\n        for (i = length; i-- !== 0;)\n            if (!Object.prototype.hasOwnProperty.call(b, keys[i]))\n                return false;\n        for (i = length; i-- !== 0;) {\n            // eslint-disable-next-line no-var\n            var key = keys[i];\n            if (!isEqual(a[key], b[key]))\n                return false;\n        }\n        return true;\n    }\n    // true if both NaN, false otherwise\n    return a !== a && b !== b;\n}\n/**\n * Returns a new object where keys with an `undefined` value are removed.\n *\n * @param a object to normalize\n */\nfunction normalizeObject(a) {\n    return Object.fromEntries(Object.entries(a).filter(([, value]) => value !== undefined));\n}\nfunction isFile(a) {\n    if (!isClient) {\n        return false;\n    }\n    return a instanceof File;\n}\n\nfunction cleanupNonNestedPath(path) {\n    if (isNotNestedPath(path)) {\n        return path.replace(/\\[|\\]/gi, '');\n    }\n    return path;\n}\nfunction getFromPath(object, path, fallback) {\n    if (!object) {\n        return fallback;\n    }\n    if (isNotNestedPath(path)) {\n        return object[cleanupNonNestedPath(path)];\n    }\n    const resolvedValue = (path || '')\n        .split(/\\.|\\[(\\d+)\\]/)\n        .filter(Boolean)\n        .reduce((acc, propKey) => {\n        if (isContainerValue(acc) && propKey in acc) {\n            return acc[propKey];\n        }\n        return fallback;\n    }, object);\n    return resolvedValue;\n}\n/**\n * Sets a nested property value in a path, creates the path properties if it doesn't exist\n */\nfunction setInPath(object, path, value) {\n    if (isNotNestedPath(path)) {\n        object[cleanupNonNestedPath(path)] = value;\n        return;\n    }\n    const keys = path.split(/\\.|\\[(\\d+)\\]/).filter(Boolean);\n    let acc = object;\n    for (let i = 0; i < keys.length; i++) {\n        // Last key, set it\n        if (i === keys.length - 1) {\n            acc[keys[i]] = value;\n            return;\n        }\n        // Key does not exist, create a container for it\n        if (!(keys[i] in acc) || isNullOrUndefined(acc[keys[i]])) {\n            // container can be either an object or an array depending on the next key if it exists\n            acc[keys[i]] = isIndex(keys[i + 1]) ? [] : {};\n        }\n        acc = acc[keys[i]];\n    }\n}\nfunction unset(object, key) {\n    if (Array.isArray(object) && isIndex(key)) {\n        object.splice(Number(key), 1);\n        return;\n    }\n    if (isObject(object)) {\n        delete object[key];\n    }\n}\n/**\n * Removes a nested property from object\n */\nfunction unsetPath(object, path) {\n    if (isNotNestedPath(path)) {\n        delete object[cleanupNonNestedPath(path)];\n        return;\n    }\n    const keys = path.split(/\\.|\\[(\\d+)\\]/).filter(Boolean);\n    let acc = object;\n    for (let i = 0; i < keys.length; i++) {\n        // Last key, unset it\n        if (i === keys.length - 1) {\n            unset(acc, keys[i]);\n            break;\n        }\n        // Key does not exist, exit\n        if (!(keys[i] in acc) || isNullOrUndefined(acc[keys[i]])) {\n            break;\n        }\n        acc = acc[keys[i]];\n    }\n    const pathValues = keys.map((_, idx) => {\n        return getFromPath(object, keys.slice(0, idx).join('.'));\n    });\n    for (let i = pathValues.length - 1; i >= 0; i--) {\n        if (!isEmptyContainer(pathValues[i])) {\n            continue;\n        }\n        if (i === 0) {\n            unset(object, keys[0]);\n            continue;\n        }\n        unset(pathValues[i - 1], keys[i - 1]);\n    }\n}\n/**\n * A typed version of Object.keys\n */\nfunction keysOf(record) {\n    return Object.keys(record);\n}\n// Uses same component provide as its own injections\n// Due to changes in https://github.com/vuejs/vue-next/pull/2424\nfunction injectWithSelf(symbol, def = undefined) {\n    const vm = getCurrentInstance();\n    return (vm === null || vm === void 0 ? void 0 : vm.provides[symbol]) || inject(symbol, def);\n}\nfunction warn(message) {\n    warn$1(`[vee-validate]: ${message}`);\n}\nfunction resolveNextCheckboxValue(currentValue, checkedValue, uncheckedValue) {\n    if (Array.isArray(currentValue)) {\n        const newVal = [...currentValue];\n        // Use isEqual since checked object values can possibly fail the equality check #3883\n        const idx = newVal.findIndex(v => isEqual(v, checkedValue));\n        idx >= 0 ? newVal.splice(idx, 1) : newVal.push(checkedValue);\n        return newVal;\n    }\n    return isEqual(currentValue, checkedValue) ? uncheckedValue : checkedValue;\n}\n/**\n * Creates a throttled function that only invokes the provided function (`func`) at most once per within a given number of milliseconds\n * (`limit`)\n */\nfunction throttle(func, limit) {\n    let inThrottle;\n    let lastResult;\n    return function (...args) {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const context = this;\n        if (!inThrottle) {\n            inThrottle = true;\n            setTimeout(() => (inThrottle = false), limit);\n            lastResult = func.apply(context, args);\n        }\n        return lastResult;\n    };\n}\nfunction debounceAsync(inner, ms = 0) {\n    let timer = null;\n    let resolves = [];\n    return function (...args) {\n        // Run the function after a certain amount of time\n        if (timer) {\n            clearTimeout(timer);\n        }\n        // @ts-expect-error timer is a number\n        timer = setTimeout(() => {\n            // Get the result of the inner function, then apply it to the resolve function of\n            // each promise that has been created since the last time the inner function was run\n            const result = inner(...args);\n            resolves.forEach(r => r(result));\n            resolves = [];\n        }, ms);\n        return new Promise(resolve => resolves.push(resolve));\n    };\n}\nfunction applyModelModifiers(value, modifiers) {\n    if (!isObject(modifiers)) {\n        return value;\n    }\n    if (modifiers.number) {\n        return toNumber(value);\n    }\n    return value;\n}\nfunction withLatest(fn, onDone) {\n    let latestRun;\n    return async function runLatest(...args) {\n        const pending = fn(...args);\n        latestRun = pending;\n        const result = await pending;\n        if (pending !== latestRun) {\n            return result;\n        }\n        latestRun = undefined;\n        return onDone(result, args);\n    };\n}\nfunction computedDeep({ get, set }) {\n    const baseRef = ref(klona(get()));\n    watch(get, newValue => {\n        if (isEqual(newValue, baseRef.value)) {\n            return;\n        }\n        baseRef.value = klona(newValue);\n    }, {\n        deep: true,\n    });\n    watch(baseRef, newValue => {\n        if (isEqual(newValue, get())) {\n            return;\n        }\n        set(klona(newValue));\n    }, {\n        deep: true,\n    });\n    return baseRef;\n}\nfunction normalizeErrorItem(message) {\n    return Array.isArray(message) ? message : message ? [message] : [];\n}\nfunction resolveFieldOrPathState(path) {\n    const form = injectWithSelf(FormContextKey);\n    const state = path ? computed(() => form === null || form === void 0 ? void 0 : form.getPathState(toValue(path))) : undefined;\n    const field = path ? undefined : inject(FieldContextKey);\n    if (!field && !(state === null || state === void 0 ? void 0 : state.value)) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`field with name ${toValue(path)} was not found`);\n        }\n    }\n    return state || field;\n}\nfunction omit(obj, keys) {\n    const target = {};\n    for (const key in obj) {\n        if (!keys.includes(key)) {\n            target[key] = obj[key];\n        }\n    }\n    return target;\n}\nfunction debounceNextTick(inner) {\n    let lastTick = null;\n    let resolves = [];\n    return function (...args) {\n        // Run the function after a certain amount of time\n        const thisTick = nextTick(() => {\n            if (lastTick !== thisTick) {\n                return;\n            }\n            // Get the result of the inner function, then apply it to the resolve function of\n            // each promise that has been created since the last time the inner function was run\n            const result = inner(...args);\n            resolves.forEach(r => r(result));\n            resolves = [];\n            lastTick = null;\n        });\n        lastTick = thisTick;\n        return new Promise(resolve => resolves.push(resolve));\n    };\n}\n\nfunction normalizeChildren(tag, context, slotProps) {\n    if (!context.slots.default) {\n        return context.slots.default;\n    }\n    if (typeof tag === 'string' || !tag) {\n        return context.slots.default(slotProps());\n    }\n    return {\n        default: () => { var _a, _b; return (_b = (_a = context.slots).default) === null || _b === void 0 ? void 0 : _b.call(_a, slotProps()); },\n    };\n}\n/**\n * Vue adds a `_value` prop at the moment on the input elements to store the REAL value on them, real values are different than the `value` attribute\n * as they do not get casted to strings unlike `el.value` which preserves user-code behavior\n */\nfunction getBoundValue(el) {\n    if (hasValueBinding(el)) {\n        return el._value;\n    }\n    return undefined;\n}\n/**\n * Vue adds a `_value` prop at the moment on the input elements to store the REAL value on them, real values are different than the `value` attribute\n * as they do not get casted to strings unlike `el.value` which preserves user-code behavior\n */\nfunction hasValueBinding(el) {\n    return '_value' in el;\n}\n\nfunction parseInputValue(el) {\n    if (el.type === 'number') {\n        return Number.isNaN(el.valueAsNumber) ? el.value : el.valueAsNumber;\n    }\n    if (el.type === 'range') {\n        return Number.isNaN(el.valueAsNumber) ? el.value : el.valueAsNumber;\n    }\n    return el.value;\n}\nfunction normalizeEventValue(value) {\n    if (!isEvent(value)) {\n        return value;\n    }\n    const input = value.target;\n    // Vue sets the current bound value on `_value` prop\n    // for checkboxes it it should fetch the value binding type as is (boolean instead of string)\n    if (hasCheckedAttr(input.type) && hasValueBinding(input)) {\n        return getBoundValue(input);\n    }\n    if (input.type === 'file' && input.files) {\n        const files = Array.from(input.files);\n        return input.multiple ? files : files[0];\n    }\n    if (isNativeMultiSelect(input)) {\n        return Array.from(input.options)\n            .filter(opt => opt.selected && !opt.disabled)\n            .map(getBoundValue);\n    }\n    // makes sure we get the actual `option` bound value\n    // #3440\n    if (isNativeSelect(input)) {\n        const selectedOption = Array.from(input.options).find(opt => opt.selected);\n        return selectedOption ? getBoundValue(selectedOption) : input.value;\n    }\n    return parseInputValue(input);\n}\n\n/**\n * Normalizes the given rules expression.\n */\nfunction normalizeRules(rules) {\n    const acc = {};\n    Object.defineProperty(acc, '_$$isNormalized', {\n        value: true,\n        writable: false,\n        enumerable: false,\n        configurable: false,\n    });\n    if (!rules) {\n        return acc;\n    }\n    // Object is already normalized, skip.\n    if (isObject(rules) && rules._$$isNormalized) {\n        return rules;\n    }\n    if (isObject(rules)) {\n        return Object.keys(rules).reduce((prev, curr) => {\n            const params = normalizeParams(rules[curr]);\n            if (rules[curr] !== false) {\n                prev[curr] = buildParams(params);\n            }\n            return prev;\n        }, acc);\n    }\n    /* istanbul ignore if */\n    if (typeof rules !== 'string') {\n        return acc;\n    }\n    return rules.split('|').reduce((prev, rule) => {\n        const parsedRule = parseRule(rule);\n        if (!parsedRule.name) {\n            return prev;\n        }\n        prev[parsedRule.name] = buildParams(parsedRule.params);\n        return prev;\n    }, acc);\n}\n/**\n * Normalizes a rule param.\n */\nfunction normalizeParams(params) {\n    if (params === true) {\n        return [];\n    }\n    if (Array.isArray(params)) {\n        return params;\n    }\n    if (isObject(params)) {\n        return params;\n    }\n    return [params];\n}\nfunction buildParams(provided) {\n    const mapValueToLocator = (value) => {\n        // A target param using interpolation\n        if (typeof value === 'string' && value[0] === '@') {\n            return createLocator(value.slice(1));\n        }\n        return value;\n    };\n    if (Array.isArray(provided)) {\n        return provided.map(mapValueToLocator);\n    }\n    // #3073\n    if (provided instanceof RegExp) {\n        return [provided];\n    }\n    return Object.keys(provided).reduce((prev, key) => {\n        prev[key] = mapValueToLocator(provided[key]);\n        return prev;\n    }, {});\n}\n/**\n * Parses a rule string expression.\n */\nconst parseRule = (rule) => {\n    let params = [];\n    const name = rule.split(':')[0];\n    if (rule.includes(':')) {\n        params = rule.split(':').slice(1).join(':').split(',');\n    }\n    return { name, params };\n};\nfunction createLocator(value) {\n    const locator = (crossTable) => {\n        var _a;\n        const val = (_a = getFromPath(crossTable, value)) !== null && _a !== void 0 ? _a : crossTable[value];\n        return val;\n    };\n    locator.__locatorRef = value;\n    return locator;\n}\nfunction extractLocators(params) {\n    if (Array.isArray(params)) {\n        return params.filter(isLocator);\n    }\n    return keysOf(params)\n        .filter(key => isLocator(params[key]))\n        .map(key => params[key]);\n}\n\nconst DEFAULT_CONFIG = {\n    generateMessage: ({ field }) => `${field} is not valid.`,\n    bails: true,\n    validateOnBlur: true,\n    validateOnChange: true,\n    validateOnInput: false,\n    validateOnModelUpdate: true,\n};\nlet currentConfig = Object.assign({}, DEFAULT_CONFIG);\nconst getConfig = () => currentConfig;\nconst setConfig = (newConf) => {\n    currentConfig = Object.assign(Object.assign({}, currentConfig), newConf);\n};\nconst configure = setConfig;\n\n/**\n * Validates a value against the rules.\n */\nasync function validate(value, rules, options = {}) {\n    const shouldBail = options === null || options === void 0 ? void 0 : options.bails;\n    const field = {\n        name: (options === null || options === void 0 ? void 0 : options.name) || '{field}',\n        rules,\n        label: options === null || options === void 0 ? void 0 : options.label,\n        bails: shouldBail !== null && shouldBail !== void 0 ? shouldBail : true,\n        formData: (options === null || options === void 0 ? void 0 : options.values) || {},\n    };\n    const result = await _validate(field, value);\n    return Object.assign(Object.assign({}, result), { valid: !result.errors.length });\n}\n/**\n * Starts the validation process.\n */\nasync function _validate(field, value) {\n    const rules = field.rules;\n    if (isTypedSchema(rules) || isYupValidator(rules)) {\n        return validateFieldWithTypedSchema(value, Object.assign(Object.assign({}, field), { rules }));\n    }\n    // if a generic function or chain of generic functions\n    if (isCallable(rules) || Array.isArray(rules)) {\n        const ctx = {\n            field: field.label || field.name,\n            name: field.name,\n            label: field.label,\n            form: field.formData,\n            value,\n        };\n        // Normalize the pipeline\n        const pipeline = Array.isArray(rules) ? rules : [rules];\n        const length = pipeline.length;\n        const errors = [];\n        for (let i = 0; i < length; i++) {\n            const rule = pipeline[i];\n            const result = await rule(value, ctx);\n            const isValid = typeof result !== 'string' && !Array.isArray(result) && result;\n            if (isValid) {\n                continue;\n            }\n            if (Array.isArray(result)) {\n                errors.push(...result);\n            }\n            else {\n                const message = typeof result === 'string' ? result : _generateFieldError(ctx);\n                errors.push(message);\n            }\n            if (field.bails) {\n                return {\n                    errors,\n                };\n            }\n        }\n        return {\n            errors,\n        };\n    }\n    const normalizedContext = Object.assign(Object.assign({}, field), { rules: normalizeRules(rules) });\n    const errors = [];\n    const rulesKeys = Object.keys(normalizedContext.rules);\n    const length = rulesKeys.length;\n    for (let i = 0; i < length; i++) {\n        const rule = rulesKeys[i];\n        const result = await _test(normalizedContext, value, {\n            name: rule,\n            params: normalizedContext.rules[rule],\n        });\n        if (result.error) {\n            errors.push(result.error);\n            if (field.bails) {\n                return {\n                    errors,\n                };\n            }\n        }\n    }\n    return {\n        errors,\n    };\n}\nfunction isYupError(err) {\n    return !!err && err.name === 'ValidationError';\n}\nfunction yupToTypedSchema(yupSchema) {\n    const schema = {\n        __type: 'VVTypedSchema',\n        async parse(values, context) {\n            var _a;\n            try {\n                const output = await yupSchema.validate(values, { abortEarly: false, context: (context === null || context === void 0 ? void 0 : context.formData) || {} });\n                return {\n                    output,\n                    errors: [],\n                };\n            }\n            catch (err) {\n                // Yup errors have a name prop one them.\n                // https://github.com/jquense/yup#validationerrorerrors-string--arraystring-value-any-path-string\n                if (!isYupError(err)) {\n                    throw err;\n                }\n                if (!((_a = err.inner) === null || _a === void 0 ? void 0 : _a.length) && err.errors.length) {\n                    return { errors: [{ path: err.path, errors: err.errors }] };\n                }\n                const errors = err.inner.reduce((acc, curr) => {\n                    const path = curr.path || '';\n                    if (!acc[path]) {\n                        acc[path] = { errors: [], path };\n                    }\n                    acc[path].errors.push(...curr.errors);\n                    return acc;\n                }, {});\n                return { errors: Object.values(errors) };\n            }\n        },\n    };\n    return schema;\n}\n/**\n * Handles yup validation\n */\nasync function validateFieldWithTypedSchema(value, context) {\n    const typedSchema = isTypedSchema(context.rules) ? context.rules : yupToTypedSchema(context.rules);\n    const result = await typedSchema.parse(value, { formData: context.formData });\n    const messages = [];\n    for (const error of result.errors) {\n        if (error.errors.length) {\n            messages.push(...error.errors);\n        }\n    }\n    return {\n        value: result.value,\n        errors: messages,\n    };\n}\n/**\n * Tests a single input value against a rule.\n */\nasync function _test(field, value, rule) {\n    const validator = resolveRule(rule.name);\n    if (!validator) {\n        throw new Error(`No such validator '${rule.name}' exists.`);\n    }\n    const params = fillTargetValues(rule.params, field.formData);\n    const ctx = {\n        field: field.label || field.name,\n        name: field.name,\n        label: field.label,\n        value,\n        form: field.formData,\n        rule: Object.assign(Object.assign({}, rule), { params }),\n    };\n    const result = await validator(value, params, ctx);\n    if (typeof result === 'string') {\n        return {\n            error: result,\n        };\n    }\n    return {\n        error: result ? undefined : _generateFieldError(ctx),\n    };\n}\n/**\n * Generates error messages.\n */\nfunction _generateFieldError(fieldCtx) {\n    const message = getConfig().generateMessage;\n    if (!message) {\n        return 'Field is invalid';\n    }\n    return message(fieldCtx);\n}\nfunction fillTargetValues(params, crossTable) {\n    const normalize = (value) => {\n        if (isLocator(value)) {\n            return value(crossTable);\n        }\n        return value;\n    };\n    if (Array.isArray(params)) {\n        return params.map(normalize);\n    }\n    return Object.keys(params).reduce((acc, param) => {\n        acc[param] = normalize(params[param]);\n        return acc;\n    }, {});\n}\nasync function validateTypedSchema(schema, values) {\n    const typedSchema = isTypedSchema(schema) ? schema : yupToTypedSchema(schema);\n    const validationResult = await typedSchema.parse(klona(values), { formData: klona(values) });\n    const results = {};\n    const errors = {};\n    for (const error of validationResult.errors) {\n        const messages = error.errors;\n        // Fixes issue with path mapping with Yup 1.0 including quotes around array indices\n        const path = (error.path || '').replace(/\\[\"(\\d+)\"\\]/g, (_, m) => {\n            return `[${m}]`;\n        });\n        results[path] = { valid: !messages.length, errors: messages };\n        if (messages.length) {\n            errors[path] = messages[0];\n        }\n    }\n    return {\n        valid: !validationResult.errors.length,\n        results,\n        errors,\n        values: validationResult.value,\n        source: 'schema',\n    };\n}\nasync function validateObjectSchema(schema, values, opts) {\n    const paths = keysOf(schema);\n    const validations = paths.map(async (path) => {\n        var _a, _b, _c;\n        const strings = (_a = opts === null || opts === void 0 ? void 0 : opts.names) === null || _a === void 0 ? void 0 : _a[path];\n        const fieldResult = await validate(getFromPath(values, path), schema[path], {\n            name: (strings === null || strings === void 0 ? void 0 : strings.name) || path,\n            label: strings === null || strings === void 0 ? void 0 : strings.label,\n            values: values,\n            bails: (_c = (_b = opts === null || opts === void 0 ? void 0 : opts.bailsMap) === null || _b === void 0 ? void 0 : _b[path]) !== null && _c !== void 0 ? _c : true,\n        });\n        return Object.assign(Object.assign({}, fieldResult), { path });\n    });\n    let isAllValid = true;\n    const validationResults = await Promise.all(validations);\n    const results = {};\n    const errors = {};\n    for (const result of validationResults) {\n        results[result.path] = {\n            valid: result.valid,\n            errors: result.errors,\n        };\n        if (!result.valid) {\n            isAllValid = false;\n            errors[result.path] = result.errors[0];\n        }\n    }\n    return {\n        valid: isAllValid,\n        results,\n        errors,\n        source: 'schema',\n    };\n}\n\nlet ID_COUNTER = 0;\nfunction useFieldState(path, init) {\n    const { value, initialValue, setInitialValue } = _useFieldValue(path, init.modelValue, init.form);\n    if (!init.form) {\n        const { errors, setErrors } = createFieldErrors();\n        const id = ID_COUNTER >= Number.MAX_SAFE_INTEGER ? 0 : ++ID_COUNTER;\n        const meta = createFieldMeta(value, initialValue, errors, init.schema);\n        function setState(state) {\n            var _a;\n            if ('value' in state) {\n                value.value = state.value;\n            }\n            if ('errors' in state) {\n                setErrors(state.errors);\n            }\n            if ('touched' in state) {\n                meta.touched = (_a = state.touched) !== null && _a !== void 0 ? _a : meta.touched;\n            }\n            if ('initialValue' in state) {\n                setInitialValue(state.initialValue);\n            }\n        }\n        return {\n            id,\n            path,\n            value,\n            initialValue,\n            meta,\n            flags: { pendingUnmount: { [id]: false }, pendingReset: false },\n            errors,\n            setState,\n        };\n    }\n    const state = init.form.createPathState(path, {\n        bails: init.bails,\n        label: init.label,\n        type: init.type,\n        validate: init.validate,\n        schema: init.schema,\n    });\n    const errors = computed(() => state.errors);\n    function setState(state) {\n        var _a, _b, _c;\n        if ('value' in state) {\n            value.value = state.value;\n        }\n        if ('errors' in state) {\n            (_a = init.form) === null || _a === void 0 ? void 0 : _a.setFieldError(unref(path), state.errors);\n        }\n        if ('touched' in state) {\n            (_b = init.form) === null || _b === void 0 ? void 0 : _b.setFieldTouched(unref(path), (_c = state.touched) !== null && _c !== void 0 ? _c : false);\n        }\n        if ('initialValue' in state) {\n            setInitialValue(state.initialValue);\n        }\n    }\n    return {\n        id: Array.isArray(state.id) ? state.id[state.id.length - 1] : state.id,\n        path,\n        value,\n        errors,\n        meta: state,\n        initialValue,\n        flags: state.__flags,\n        setState,\n    };\n}\n/**\n * Creates the field value and resolves the initial value\n */\nfunction _useFieldValue(path, modelValue, form) {\n    const modelRef = ref(unref(modelValue));\n    function resolveInitialValue() {\n        if (!form) {\n            return unref(modelRef);\n        }\n        return getFromPath(form.initialValues.value, unref(path), unref(modelRef));\n    }\n    function setInitialValue(value) {\n        if (!form) {\n            modelRef.value = value;\n            return;\n        }\n        form.setFieldInitialValue(unref(path), value, true);\n    }\n    const initialValue = computed(resolveInitialValue);\n    // if no form is associated, use a regular ref.\n    if (!form) {\n        const value = ref(resolveInitialValue());\n        return {\n            value,\n            initialValue,\n            setInitialValue,\n        };\n    }\n    // to set the initial value, first check if there is a current value, if there is then use it.\n    // otherwise use the configured initial value if it exists.\n    // prioritize model value over form values\n    // #3429\n    const currentValue = resolveModelValue(modelValue, form, initialValue, path);\n    form.stageInitialValue(unref(path), currentValue, true);\n    // otherwise use a computed setter that triggers the `setFieldValue`\n    const value = computed({\n        get() {\n            return getFromPath(form.values, unref(path));\n        },\n        set(newVal) {\n            form.setFieldValue(unref(path), newVal, false);\n        },\n    });\n    return {\n        value,\n        initialValue,\n        setInitialValue,\n    };\n}\n/*\n  to set the initial value, first check if there is a current value, if there is then use it.\n  otherwise use the configured initial value if it exists.\n  prioritize model value over form values\n  #3429\n*/\nfunction resolveModelValue(modelValue, form, initialValue, path) {\n    if (isRef(modelValue)) {\n        return unref(modelValue);\n    }\n    if (modelValue !== undefined) {\n        return modelValue;\n    }\n    return getFromPath(form.values, unref(path), unref(initialValue));\n}\n/**\n * Creates meta flags state and some associated effects with them\n */\nfunction createFieldMeta(currentValue, initialValue, errors, schema) {\n    const isRequired = computed(() => { var _a, _b, _c; return (_c = (_b = (_a = toValue(schema)) === null || _a === void 0 ? void 0 : _a.describe) === null || _b === void 0 ? void 0 : _b.call(_a).required) !== null && _c !== void 0 ? _c : false; });\n    const meta = reactive({\n        touched: false,\n        pending: false,\n        valid: true,\n        required: isRequired,\n        validated: !!unref(errors).length,\n        initialValue: computed(() => unref(initialValue)),\n        dirty: computed(() => {\n            return !isEqual(unref(currentValue), unref(initialValue));\n        }),\n    });\n    watch(errors, value => {\n        meta.valid = !value.length;\n    }, {\n        immediate: true,\n        flush: 'sync',\n    });\n    return meta;\n}\n/**\n * Creates the error message state for the field state\n */\nfunction createFieldErrors() {\n    const errors = ref([]);\n    return {\n        errors,\n        setErrors: (messages) => {\n            errors.value = normalizeErrorItem(messages);\n        },\n    };\n}\n\nconst DEVTOOLS_FORMS = {};\nconst DEVTOOLS_FIELDS = {};\nconst INSPECTOR_ID = 'vee-validate-inspector';\nconst COLORS = {\n    error: 0xbd4b4b,\n    success: 0x06d77b,\n    unknown: 0x54436b,\n    white: 0xffffff,\n    black: 0x000000,\n    blue: 0x035397,\n    purple: 0xb980f0,\n    orange: 0xf5a962,\n    gray: 0xbbbfca,\n};\nlet SELECTED_NODE = null;\n/**\n * Plugin API\n */\nlet API;\nasync function installDevtoolsPlugin(app) {\n    if ((process.env.NODE_ENV !== 'production')) {\n        if (!isClient) {\n            return;\n        }\n        const devtools = await import('@vue/devtools-api');\n        devtools.setupDevtoolsPlugin({\n            id: 'vee-validate-devtools-plugin',\n            label: 'VeeValidate Plugin',\n            packageName: 'vee-validate',\n            homepage: 'https://vee-validate.logaretm.com/v4',\n            app,\n            logo: 'https://vee-validate.logaretm.com/v4/logo.png',\n        }, api => {\n            API = api;\n            api.addInspector({\n                id: INSPECTOR_ID,\n                icon: 'rule',\n                label: 'vee-validate',\n                noSelectionText: 'Select a vee-validate node to inspect',\n                actions: [\n                    {\n                        icon: 'done_outline',\n                        tooltip: 'Validate selected item',\n                        action: async () => {\n                            if (!SELECTED_NODE) {\n                                // eslint-disable-next-line no-console\n                                console.error('There is not a valid selected vee-validate node or component');\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'field') {\n                                await SELECTED_NODE.field.validate();\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'form') {\n                                await SELECTED_NODE.form.validate();\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'pathState') {\n                                await SELECTED_NODE.form.validateField(SELECTED_NODE.state.path);\n                            }\n                        },\n                    },\n                    {\n                        icon: 'delete_sweep',\n                        tooltip: 'Clear validation state of the selected item',\n                        action: () => {\n                            if (!SELECTED_NODE) {\n                                // eslint-disable-next-line no-console\n                                console.error('There is not a valid selected vee-validate node or component');\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'field') {\n                                SELECTED_NODE.field.resetField();\n                                return;\n                            }\n                            if (SELECTED_NODE.type === 'form') {\n                                SELECTED_NODE.form.resetForm();\n                            }\n                            if (SELECTED_NODE.type === 'pathState') {\n                                SELECTED_NODE.form.resetField(SELECTED_NODE.state.path);\n                            }\n                        },\n                    },\n                ],\n            });\n            api.on.getInspectorTree(payload => {\n                if (payload.inspectorId !== INSPECTOR_ID) {\n                    return;\n                }\n                const forms = Object.values(DEVTOOLS_FORMS);\n                const fields = Object.values(DEVTOOLS_FIELDS);\n                payload.rootNodes = [\n                    ...forms.map(mapFormForDevtoolsInspector),\n                    ...fields.map(field => mapFieldForDevtoolsInspector(field)),\n                ];\n            });\n            api.on.getInspectorState(payload => {\n                if (payload.inspectorId !== INSPECTOR_ID) {\n                    return;\n                }\n                const { form, field, state, type } = decodeNodeId(payload.nodeId);\n                api.unhighlightElement();\n                if (form && type === 'form') {\n                    payload.state = buildFormState(form);\n                    SELECTED_NODE = { type: 'form', form };\n                    api.highlightElement(form._vm);\n                    return;\n                }\n                if (state && type === 'pathState' && form) {\n                    payload.state = buildFieldState(state);\n                    SELECTED_NODE = { type: 'pathState', state, form };\n                    return;\n                }\n                if (field && type === 'field') {\n                    payload.state = buildFieldState({\n                        errors: field.errors.value,\n                        dirty: field.meta.dirty,\n                        valid: field.meta.valid,\n                        touched: field.meta.touched,\n                        value: field.value.value,\n                        initialValue: field.meta.initialValue,\n                    });\n                    SELECTED_NODE = { field, type: 'field' };\n                    api.highlightElement(field._vm);\n                    return;\n                }\n                SELECTED_NODE = null;\n                api.unhighlightElement();\n            });\n        });\n    }\n}\nconst refreshInspector = throttle(() => {\n    setTimeout(async () => {\n        await nextTick();\n        API === null || API === void 0 ? void 0 : API.sendInspectorState(INSPECTOR_ID);\n        API === null || API === void 0 ? void 0 : API.sendInspectorTree(INSPECTOR_ID);\n    }, 100);\n}, 100);\nfunction registerFormWithDevTools(form) {\n    const vm = getCurrentInstance();\n    if (!API) {\n        const app = vm === null || vm === void 0 ? void 0 : vm.appContext.app;\n        if (!app) {\n            return;\n        }\n        installDevtoolsPlugin(app);\n    }\n    DEVTOOLS_FORMS[form.formId] = Object.assign({}, form);\n    DEVTOOLS_FORMS[form.formId]._vm = vm;\n    onUnmounted(() => {\n        delete DEVTOOLS_FORMS[form.formId];\n        refreshInspector();\n    });\n    refreshInspector();\n}\nfunction registerSingleFieldWithDevtools(field) {\n    const vm = getCurrentInstance();\n    if (!API) {\n        const app = vm === null || vm === void 0 ? void 0 : vm.appContext.app;\n        if (!app) {\n            return;\n        }\n        installDevtoolsPlugin(app);\n    }\n    DEVTOOLS_FIELDS[field.id] = Object.assign({}, field);\n    DEVTOOLS_FIELDS[field.id]._vm = vm;\n    onUnmounted(() => {\n        delete DEVTOOLS_FIELDS[field.id];\n        refreshInspector();\n    });\n    refreshInspector();\n}\nfunction mapFormForDevtoolsInspector(form) {\n    const { textColor, bgColor } = getValidityColors(form.meta.value.valid);\n    const formTreeNodes = {};\n    Object.values(form.getAllPathStates()).forEach(state => {\n        setInPath(formTreeNodes, toValue(state.path), mapPathForDevtoolsInspector(state, form));\n    });\n    function buildFormTree(tree, path = []) {\n        const key = [...path].pop();\n        if ('id' in tree) {\n            return Object.assign(Object.assign({}, tree), { label: key || tree.label });\n        }\n        if (isObject(tree)) {\n            return {\n                id: `${path.join('.')}`,\n                label: key || '',\n                children: Object.keys(tree).map(key => buildFormTree(tree[key], [...path, key])),\n            };\n        }\n        if (Array.isArray(tree)) {\n            return {\n                id: `${path.join('.')}`,\n                label: `${key}[]`,\n                children: tree.map((c, idx) => buildFormTree(c, [...path, String(idx)])),\n            };\n        }\n        return { id: '', label: '', children: [] };\n    }\n    const { children } = buildFormTree(formTreeNodes);\n    return {\n        id: encodeNodeId(form),\n        label: form.name,\n        children,\n        tags: [\n            {\n                label: 'Form',\n                textColor,\n                backgroundColor: bgColor,\n            },\n            {\n                label: `${form.getAllPathStates().length} fields`,\n                textColor: COLORS.white,\n                backgroundColor: COLORS.unknown,\n            },\n        ],\n    };\n}\nfunction mapPathForDevtoolsInspector(state, form) {\n    return {\n        id: encodeNodeId(form, state),\n        label: toValue(state.path),\n        tags: getFieldNodeTags(state.multiple, state.fieldsCount, state.type, state.valid, form),\n    };\n}\nfunction mapFieldForDevtoolsInspector(field, form) {\n    return {\n        id: encodeNodeId(form, field),\n        label: unref(field.name),\n        tags: getFieldNodeTags(false, 1, field.type, field.meta.valid, form),\n    };\n}\nfunction getFieldNodeTags(multiple, fieldsCount, type, valid, form) {\n    const { textColor, bgColor } = getValidityColors(valid);\n    return [\n        multiple\n            ? undefined\n            : {\n                label: 'Field',\n                textColor,\n                backgroundColor: bgColor,\n            },\n        !form\n            ? {\n                label: 'Standalone',\n                textColor: COLORS.black,\n                backgroundColor: COLORS.gray,\n            }\n            : undefined,\n        type === 'checkbox'\n            ? {\n                label: 'Checkbox',\n                textColor: COLORS.white,\n                backgroundColor: COLORS.blue,\n            }\n            : undefined,\n        type === 'radio'\n            ? {\n                label: 'Radio',\n                textColor: COLORS.white,\n                backgroundColor: COLORS.purple,\n            }\n            : undefined,\n        multiple\n            ? {\n                label: 'Multiple',\n                textColor: COLORS.black,\n                backgroundColor: COLORS.orange,\n            }\n            : undefined,\n    ].filter(Boolean);\n}\nfunction encodeNodeId(form, stateOrField) {\n    const type = stateOrField ? ('path' in stateOrField ? 'pathState' : 'field') : 'form';\n    const fieldPath = stateOrField ? ('path' in stateOrField ? stateOrField === null || stateOrField === void 0 ? void 0 : stateOrField.path : toValue(stateOrField === null || stateOrField === void 0 ? void 0 : stateOrField.name)) : '';\n    const idObject = { f: form === null || form === void 0 ? void 0 : form.formId, ff: (stateOrField === null || stateOrField === void 0 ? void 0 : stateOrField.id) || fieldPath, type };\n    return btoa(encodeURIComponent(JSON.stringify(idObject)));\n}\nfunction decodeNodeId(nodeId) {\n    try {\n        const idObject = JSON.parse(decodeURIComponent(atob(nodeId)));\n        const form = DEVTOOLS_FORMS[idObject.f];\n        if (!form && idObject.ff) {\n            const field = DEVTOOLS_FIELDS[idObject.ff];\n            if (!field) {\n                return {};\n            }\n            return {\n                type: idObject.type,\n                field,\n            };\n        }\n        if (!form) {\n            return {};\n        }\n        const state = form.getPathState(idObject.ff);\n        return {\n            type: idObject.type,\n            form,\n            state,\n        };\n    }\n    catch (err) {\n        // console.error(`Devtools: [vee-validate] Failed to parse node id ${nodeId}`);\n    }\n    return {};\n}\nfunction buildFieldState(state) {\n    return {\n        'Field state': [\n            { key: 'errors', value: state.errors },\n            {\n                key: 'initialValue',\n                value: state.initialValue,\n            },\n            {\n                key: 'currentValue',\n                value: state.value,\n            },\n            {\n                key: 'touched',\n                value: state.touched,\n            },\n            {\n                key: 'dirty',\n                value: state.dirty,\n            },\n            {\n                key: 'valid',\n                value: state.valid,\n            },\n        ],\n    };\n}\nfunction buildFormState(form) {\n    const { errorBag, meta, values, isSubmitting, isValidating, submitCount } = form;\n    return {\n        'Form state': [\n            {\n                key: 'submitCount',\n                value: submitCount.value,\n            },\n            {\n                key: 'isSubmitting',\n                value: isSubmitting.value,\n            },\n            {\n                key: 'isValidating',\n                value: isValidating.value,\n            },\n            {\n                key: 'touched',\n                value: meta.value.touched,\n            },\n            {\n                key: 'dirty',\n                value: meta.value.dirty,\n            },\n            {\n                key: 'valid',\n                value: meta.value.valid,\n            },\n            {\n                key: 'initialValues',\n                value: meta.value.initialValues,\n            },\n            {\n                key: 'currentValues',\n                value: values,\n            },\n            {\n                key: 'errors',\n                value: keysOf(errorBag.value).reduce((acc, key) => {\n                    var _a;\n                    const message = (_a = errorBag.value[key]) === null || _a === void 0 ? void 0 : _a[0];\n                    if (message) {\n                        acc[key] = message;\n                    }\n                    return acc;\n                }, {}),\n            },\n        ],\n    };\n}\n/**\n * Resolves the tag color based on the form state\n */\nfunction getValidityColors(valid) {\n    return {\n        bgColor: valid ? COLORS.success : COLORS.error,\n        textColor: valid ? COLORS.black : COLORS.white,\n    };\n}\n\n/**\n * Creates a field composite.\n */\nfunction useField(path, rules, opts) {\n    if (hasCheckedAttr(opts === null || opts === void 0 ? void 0 : opts.type)) {\n        return useFieldWithChecked(path, rules, opts);\n    }\n    return _useField(path, rules, opts);\n}\nfunction _useField(path, rules, opts) {\n    const { initialValue: modelValue, validateOnMount, bails, type, checkedValue, label, validateOnValueUpdate, uncheckedValue, controlled, keepValueOnUnmount, syncVModel, form: controlForm, } = normalizeOptions(opts);\n    const injectedForm = controlled ? injectWithSelf(FormContextKey) : undefined;\n    const form = controlForm || injectedForm;\n    const name = computed(() => normalizeFormPath(toValue(path)));\n    const validator = computed(() => {\n        const schema = toValue(form === null || form === void 0 ? void 0 : form.schema);\n        if (schema) {\n            return undefined;\n        }\n        const rulesValue = unref(rules);\n        if (isYupValidator(rulesValue) ||\n            isTypedSchema(rulesValue) ||\n            isCallable(rulesValue) ||\n            Array.isArray(rulesValue)) {\n            return rulesValue;\n        }\n        return normalizeRules(rulesValue);\n    });\n    const isTyped = !isCallable(validator.value) && isTypedSchema(toValue(rules));\n    const { id, value, initialValue, meta, setState, errors, flags } = useFieldState(name, {\n        modelValue,\n        form,\n        bails,\n        label,\n        type,\n        validate: validator.value ? validate$1 : undefined,\n        schema: isTyped ? rules : undefined,\n    });\n    const errorMessage = computed(() => errors.value[0]);\n    if (syncVModel) {\n        useVModel({\n            value,\n            prop: syncVModel,\n            handleChange,\n            shouldValidate: () => validateOnValueUpdate && !flags.pendingReset,\n        });\n    }\n    /**\n     * Handles common onBlur meta update\n     */\n    const handleBlur = (evt, shouldValidate = false) => {\n        meta.touched = true;\n        if (shouldValidate) {\n            validateWithStateMutation();\n        }\n    };\n    async function validateCurrentValue(mode) {\n        var _a, _b;\n        if (form === null || form === void 0 ? void 0 : form.validateSchema) {\n            const { results } = await form.validateSchema(mode);\n            return (_a = results[toValue(name)]) !== null && _a !== void 0 ? _a : { valid: true, errors: [] };\n        }\n        if (validator.value) {\n            return validate(value.value, validator.value, {\n                name: toValue(name),\n                label: toValue(label),\n                values: (_b = form === null || form === void 0 ? void 0 : form.values) !== null && _b !== void 0 ? _b : {},\n                bails,\n            });\n        }\n        return { valid: true, errors: [] };\n    }\n    const validateWithStateMutation = withLatest(async () => {\n        meta.pending = true;\n        meta.validated = true;\n        return validateCurrentValue('validated-only');\n    }, result => {\n        if (flags.pendingUnmount[field.id]) {\n            return result;\n        }\n        setState({ errors: result.errors });\n        meta.pending = false;\n        meta.valid = result.valid;\n        return result;\n    });\n    const validateValidStateOnly = withLatest(async () => {\n        return validateCurrentValue('silent');\n    }, result => {\n        meta.valid = result.valid;\n        return result;\n    });\n    function validate$1(opts) {\n        if ((opts === null || opts === void 0 ? void 0 : opts.mode) === 'silent') {\n            return validateValidStateOnly();\n        }\n        return validateWithStateMutation();\n    }\n    // Common input/change event handler\n    function handleChange(e, shouldValidate = true) {\n        const newValue = normalizeEventValue(e);\n        setValue(newValue, shouldValidate);\n    }\n    // Runs the initial validation\n    onMounted(() => {\n        if (validateOnMount) {\n            return validateWithStateMutation();\n        }\n        // validate self initially if no form was handling this\n        // forms should have their own initial silent validation run to make things more efficient\n        if (!form || !form.validateSchema) {\n            validateValidStateOnly();\n        }\n    });\n    function setTouched(isTouched) {\n        meta.touched = isTouched;\n    }\n    function resetField(state) {\n        var _a;\n        const newValue = state && 'value' in state ? state.value : initialValue.value;\n        setState({\n            value: klona(newValue),\n            initialValue: klona(newValue),\n            touched: (_a = state === null || state === void 0 ? void 0 : state.touched) !== null && _a !== void 0 ? _a : false,\n            errors: (state === null || state === void 0 ? void 0 : state.errors) || [],\n        });\n        meta.pending = false;\n        meta.validated = false;\n        validateValidStateOnly();\n    }\n    const vm = getCurrentInstance();\n    function setValue(newValue, shouldValidate = true) {\n        value.value = vm && syncVModel ? applyModelModifiers(newValue, vm.props.modelModifiers) : newValue;\n        const validateFn = shouldValidate ? validateWithStateMutation : validateValidStateOnly;\n        validateFn();\n    }\n    function setErrors(errors) {\n        setState({ errors: Array.isArray(errors) ? errors : [errors] });\n    }\n    const valueProxy = computed({\n        get() {\n            return value.value;\n        },\n        set(newValue) {\n            setValue(newValue, validateOnValueUpdate);\n        },\n    });\n    const field = {\n        id,\n        name,\n        label,\n        value: valueProxy,\n        meta,\n        errors,\n        errorMessage,\n        type,\n        checkedValue,\n        uncheckedValue,\n        bails,\n        keepValueOnUnmount,\n        resetField,\n        handleReset: () => resetField(),\n        validate: validate$1,\n        handleChange,\n        handleBlur,\n        setState,\n        setTouched,\n        setErrors,\n        setValue,\n    };\n    provide(FieldContextKey, field);\n    if (isRef(rules) && typeof unref(rules) !== 'function') {\n        watch(rules, (value, oldValue) => {\n            if (isEqual(value, oldValue)) {\n                return;\n            }\n            meta.validated ? validateWithStateMutation() : validateValidStateOnly();\n        }, {\n            deep: true,\n        });\n    }\n    if ((process.env.NODE_ENV !== 'production')) {\n        field._vm = getCurrentInstance();\n        watch(() => (Object.assign(Object.assign({ errors: errors.value }, meta), { value: value.value })), refreshInspector, {\n            deep: true,\n        });\n        if (!form) {\n            registerSingleFieldWithDevtools(field);\n        }\n    }\n    // if no associated form return the field API immediately\n    if (!form) {\n        return field;\n    }\n    // associate the field with the given form\n    // extract cross-field dependencies in a computed prop\n    const dependencies = computed(() => {\n        const rulesVal = validator.value;\n        // is falsy, a function schema or a yup schema\n        if (!rulesVal ||\n            isCallable(rulesVal) ||\n            isYupValidator(rulesVal) ||\n            isTypedSchema(rulesVal) ||\n            Array.isArray(rulesVal)) {\n            return {};\n        }\n        return Object.keys(rulesVal).reduce((acc, rule) => {\n            const deps = extractLocators(rulesVal[rule])\n                .map((dep) => dep.__locatorRef)\n                .reduce((depAcc, depName) => {\n                const depValue = getFromPath(form.values, depName) || form.values[depName];\n                if (depValue !== undefined) {\n                    depAcc[depName] = depValue;\n                }\n                return depAcc;\n            }, {});\n            Object.assign(acc, deps);\n            return acc;\n        }, {});\n    });\n    // Adds a watcher that runs the validation whenever field dependencies change\n    watch(dependencies, (deps, oldDeps) => {\n        // Skip if no dependencies or if the field wasn't manipulated\n        if (!Object.keys(deps).length) {\n            return;\n        }\n        const shouldValidate = !isEqual(deps, oldDeps);\n        if (shouldValidate) {\n            meta.validated ? validateWithStateMutation() : validateValidStateOnly();\n        }\n    });\n    onBeforeUnmount(() => {\n        var _a;\n        const shouldKeepValue = (_a = toValue(field.keepValueOnUnmount)) !== null && _a !== void 0 ? _a : toValue(form.keepValuesOnUnmount);\n        const path = toValue(name);\n        if (shouldKeepValue || !form || flags.pendingUnmount[field.id]) {\n            form === null || form === void 0 ? void 0 : form.removePathState(path, id);\n            return;\n        }\n        flags.pendingUnmount[field.id] = true;\n        const pathState = form.getPathState(path);\n        const matchesId = Array.isArray(pathState === null || pathState === void 0 ? void 0 : pathState.id) && (pathState === null || pathState === void 0 ? void 0 : pathState.multiple)\n            ? pathState === null || pathState === void 0 ? void 0 : pathState.id.includes(field.id)\n            : (pathState === null || pathState === void 0 ? void 0 : pathState.id) === field.id;\n        if (!matchesId) {\n            return;\n        }\n        if ((pathState === null || pathState === void 0 ? void 0 : pathState.multiple) && Array.isArray(pathState.value)) {\n            const valueIdx = pathState.value.findIndex(i => isEqual(i, toValue(field.checkedValue)));\n            if (valueIdx > -1) {\n                const newVal = [...pathState.value];\n                newVal.splice(valueIdx, 1);\n                form.setFieldValue(path, newVal);\n            }\n            if (Array.isArray(pathState.id)) {\n                pathState.id.splice(pathState.id.indexOf(field.id), 1);\n            }\n        }\n        else {\n            form.unsetPathValue(toValue(name));\n        }\n        form.removePathState(path, id);\n    });\n    return field;\n}\n/**\n * Normalizes partial field options to include the full options\n */\nfunction normalizeOptions(opts) {\n    const defaults = () => ({\n        initialValue: undefined,\n        validateOnMount: false,\n        bails: true,\n        label: undefined,\n        validateOnValueUpdate: true,\n        keepValueOnUnmount: undefined,\n        syncVModel: false,\n        controlled: true,\n    });\n    const isVModelSynced = !!(opts === null || opts === void 0 ? void 0 : opts.syncVModel);\n    const modelPropName = typeof (opts === null || opts === void 0 ? void 0 : opts.syncVModel) === 'string' ? opts.syncVModel : (opts === null || opts === void 0 ? void 0 : opts.modelPropName) || 'modelValue';\n    const initialValue = isVModelSynced && !('initialValue' in (opts || {}))\n        ? getCurrentModelValue(getCurrentInstance(), modelPropName)\n        : opts === null || opts === void 0 ? void 0 : opts.initialValue;\n    if (!opts) {\n        return Object.assign(Object.assign({}, defaults()), { initialValue });\n    }\n    // TODO: Deprecate this in next major release\n    const checkedValue = 'valueProp' in opts ? opts.valueProp : opts.checkedValue;\n    const controlled = 'standalone' in opts ? !opts.standalone : opts.controlled;\n    const syncVModel = (opts === null || opts === void 0 ? void 0 : opts.modelPropName) || (opts === null || opts === void 0 ? void 0 : opts.syncVModel) || false;\n    return Object.assign(Object.assign(Object.assign({}, defaults()), (opts || {})), { initialValue, controlled: controlled !== null && controlled !== void 0 ? controlled : true, checkedValue,\n        syncVModel });\n}\nfunction useFieldWithChecked(name, rules, opts) {\n    const form = !(opts === null || opts === void 0 ? void 0 : opts.standalone) ? injectWithSelf(FormContextKey) : undefined;\n    const checkedValue = opts === null || opts === void 0 ? void 0 : opts.checkedValue;\n    const uncheckedValue = opts === null || opts === void 0 ? void 0 : opts.uncheckedValue;\n    function patchCheckedApi(field) {\n        const handleChange = field.handleChange;\n        const checked = computed(() => {\n            const currentValue = toValue(field.value);\n            const checkedVal = toValue(checkedValue);\n            return Array.isArray(currentValue)\n                ? currentValue.findIndex(v => isEqual(v, checkedVal)) >= 0\n                : isEqual(checkedVal, currentValue);\n        });\n        function handleCheckboxChange(e, shouldValidate = true) {\n            var _a, _b;\n            if (checked.value === ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.checked)) {\n                if (shouldValidate) {\n                    field.validate();\n                }\n                return;\n            }\n            const path = toValue(name);\n            const pathState = form === null || form === void 0 ? void 0 : form.getPathState(path);\n            const value = normalizeEventValue(e);\n            let newValue = (_b = toValue(checkedValue)) !== null && _b !== void 0 ? _b : value;\n            if (form && (pathState === null || pathState === void 0 ? void 0 : pathState.multiple) && pathState.type === 'checkbox') {\n                newValue = resolveNextCheckboxValue(getFromPath(form.values, path) || [], newValue, undefined);\n            }\n            else if ((opts === null || opts === void 0 ? void 0 : opts.type) === 'checkbox') {\n                newValue = resolveNextCheckboxValue(toValue(field.value), newValue, toValue(uncheckedValue));\n            }\n            handleChange(newValue, shouldValidate);\n        }\n        return Object.assign(Object.assign({}, field), { checked,\n            checkedValue,\n            uncheckedValue, handleChange: handleCheckboxChange });\n    }\n    return patchCheckedApi(_useField(name, rules, opts));\n}\nfunction useVModel({ prop, value, handleChange, shouldValidate }) {\n    const vm = getCurrentInstance();\n    /* istanbul ignore next */\n    if (!vm || !prop) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            // eslint-disable-next-line no-console\n            console.warn('Failed to setup model events because `useField` was not called in setup.');\n        }\n        return;\n    }\n    const propName = typeof prop === 'string' ? prop : 'modelValue';\n    const emitName = `update:${propName}`;\n    // Component doesn't have a model prop setup (must be defined on the props)\n    if (!(propName in vm.props)) {\n        return;\n    }\n    watch(value, newValue => {\n        if (isEqual(newValue, getCurrentModelValue(vm, propName))) {\n            return;\n        }\n        vm.emit(emitName, newValue);\n    });\n    watch(() => getCurrentModelValue(vm, propName), propValue => {\n        if (propValue === IS_ABSENT && value.value === undefined) {\n            return;\n        }\n        const newValue = propValue === IS_ABSENT ? undefined : propValue;\n        if (isEqual(newValue, value.value)) {\n            return;\n        }\n        handleChange(newValue, shouldValidate());\n    });\n}\nfunction getCurrentModelValue(vm, propName) {\n    if (!vm) {\n        return undefined;\n    }\n    return vm.props[propName];\n}\n\nconst FieldImpl = /** #__PURE__ */ defineComponent({\n    name: 'Field',\n    inheritAttrs: false,\n    props: {\n        as: {\n            type: [String, Object],\n            default: undefined,\n        },\n        name: {\n            type: String,\n            required: true,\n        },\n        rules: {\n            type: [Object, String, Function],\n            default: undefined,\n        },\n        validateOnMount: {\n            type: Boolean,\n            default: false,\n        },\n        validateOnBlur: {\n            type: Boolean,\n            default: undefined,\n        },\n        validateOnChange: {\n            type: Boolean,\n            default: undefined,\n        },\n        validateOnInput: {\n            type: Boolean,\n            default: undefined,\n        },\n        validateOnModelUpdate: {\n            type: Boolean,\n            default: undefined,\n        },\n        bails: {\n            type: Boolean,\n            default: () => getConfig().bails,\n        },\n        label: {\n            type: String,\n            default: undefined,\n        },\n        uncheckedValue: {\n            type: null,\n            default: undefined,\n        },\n        modelValue: {\n            type: null,\n            default: IS_ABSENT,\n        },\n        modelModifiers: {\n            type: null,\n            default: () => ({}),\n        },\n        'onUpdate:modelValue': {\n            type: null,\n            default: undefined,\n        },\n        standalone: {\n            type: Boolean,\n            default: false,\n        },\n        keepValue: {\n            type: Boolean,\n            default: undefined,\n        },\n    },\n    setup(props, ctx) {\n        const rules = toRef(props, 'rules');\n        const name = toRef(props, 'name');\n        const label = toRef(props, 'label');\n        const uncheckedValue = toRef(props, 'uncheckedValue');\n        const keepValue = toRef(props, 'keepValue');\n        const { errors, value, errorMessage, validate: validateField, handleChange, handleBlur, setTouched, resetField, handleReset, meta, checked, setErrors, setValue, } = useField(name, rules, {\n            validateOnMount: props.validateOnMount,\n            bails: props.bails,\n            standalone: props.standalone,\n            type: ctx.attrs.type,\n            initialValue: resolveInitialValue(props, ctx),\n            // Only for checkboxes and radio buttons\n            checkedValue: ctx.attrs.value,\n            uncheckedValue,\n            label,\n            validateOnValueUpdate: props.validateOnModelUpdate,\n            keepValueOnUnmount: keepValue,\n            syncVModel: true,\n        });\n        // If there is a v-model applied on the component we need to emit the `update:modelValue` whenever the value binding changes\n        const onChangeHandler = function handleChangeWithModel(e, shouldValidate = true) {\n            handleChange(e, shouldValidate);\n        };\n        const sharedProps = computed(() => {\n            const { validateOnInput, validateOnChange, validateOnBlur, validateOnModelUpdate } = resolveValidationTriggers(props);\n            function baseOnBlur(e) {\n                handleBlur(e, validateOnBlur);\n                if (isCallable(ctx.attrs.onBlur)) {\n                    ctx.attrs.onBlur(e);\n                }\n            }\n            function baseOnInput(e) {\n                onChangeHandler(e, validateOnInput);\n                if (isCallable(ctx.attrs.onInput)) {\n                    ctx.attrs.onInput(e);\n                }\n            }\n            function baseOnChange(e) {\n                onChangeHandler(e, validateOnChange);\n                if (isCallable(ctx.attrs.onChange)) {\n                    ctx.attrs.onChange(e);\n                }\n            }\n            const attrs = {\n                name: props.name,\n                onBlur: baseOnBlur,\n                onInput: baseOnInput,\n                onChange: baseOnChange,\n            };\n            attrs['onUpdate:modelValue'] = e => onChangeHandler(e, validateOnModelUpdate);\n            return attrs;\n        });\n        const fieldProps = computed(() => {\n            const attrs = Object.assign({}, sharedProps.value);\n            if (hasCheckedAttr(ctx.attrs.type) && checked) {\n                attrs.checked = checked.value;\n            }\n            const tag = resolveTag(props, ctx);\n            if (shouldHaveValueBinding(tag, ctx.attrs)) {\n                attrs.value = value.value;\n            }\n            return attrs;\n        });\n        const componentProps = computed(() => {\n            return Object.assign(Object.assign({}, sharedProps.value), { modelValue: value.value });\n        });\n        function slotProps() {\n            return {\n                field: fieldProps.value,\n                componentField: componentProps.value,\n                value: value.value,\n                meta,\n                errors: errors.value,\n                errorMessage: errorMessage.value,\n                validate: validateField,\n                resetField,\n                handleChange: onChangeHandler,\n                handleInput: e => onChangeHandler(e, false),\n                handleReset,\n                handleBlur: sharedProps.value.onBlur,\n                setTouched,\n                setErrors,\n                setValue,\n            };\n        }\n        ctx.expose({\n            value,\n            meta,\n            errors,\n            errorMessage,\n            setErrors,\n            setTouched,\n            setValue,\n            reset: resetField,\n            validate: validateField,\n            handleChange,\n        });\n        return () => {\n            const tag = resolveDynamicComponent(resolveTag(props, ctx));\n            const children = normalizeChildren(tag, ctx, slotProps);\n            if (tag) {\n                return h(tag, Object.assign(Object.assign({}, ctx.attrs), fieldProps.value), children);\n            }\n            return children;\n        };\n    },\n});\nfunction resolveTag(props, ctx) {\n    let tag = props.as || '';\n    if (!props.as && !ctx.slots.default) {\n        tag = 'input';\n    }\n    return tag;\n}\nfunction resolveValidationTriggers(props) {\n    var _a, _b, _c, _d;\n    const { validateOnInput, validateOnChange, validateOnBlur, validateOnModelUpdate } = getConfig();\n    return {\n        validateOnInput: (_a = props.validateOnInput) !== null && _a !== void 0 ? _a : validateOnInput,\n        validateOnChange: (_b = props.validateOnChange) !== null && _b !== void 0 ? _b : validateOnChange,\n        validateOnBlur: (_c = props.validateOnBlur) !== null && _c !== void 0 ? _c : validateOnBlur,\n        validateOnModelUpdate: (_d = props.validateOnModelUpdate) !== null && _d !== void 0 ? _d : validateOnModelUpdate,\n    };\n}\nfunction resolveInitialValue(props, ctx) {\n    // Gets the initial value either from `value` prop/attr or `v-model` binding (modelValue)\n    // For checkboxes and radio buttons it will always be the model value not the `value` attribute\n    if (!hasCheckedAttr(ctx.attrs.type)) {\n        return isPropPresent(props, 'modelValue') ? props.modelValue : ctx.attrs.value;\n    }\n    return isPropPresent(props, 'modelValue') ? props.modelValue : undefined;\n}\nconst Field = FieldImpl;\n\nlet FORM_COUNTER = 0;\nconst PRIVATE_PATH_STATE_KEYS = ['bails', 'fieldsCount', 'id', 'multiple', 'type', 'validate'];\nfunction resolveInitialValues(opts) {\n    const givenInitial = (opts === null || opts === void 0 ? void 0 : opts.initialValues) || {};\n    const providedValues = Object.assign({}, toValue(givenInitial));\n    const schema = unref(opts === null || opts === void 0 ? void 0 : opts.validationSchema);\n    if (schema && isTypedSchema(schema) && isCallable(schema.cast)) {\n        return klona(schema.cast(providedValues) || {});\n    }\n    return klona(providedValues);\n}\nfunction useForm(opts) {\n    var _a;\n    const formId = FORM_COUNTER++;\n    const name = (opts === null || opts === void 0 ? void 0 : opts.name) || 'Form';\n    // Prevents fields from double resetting their values, which causes checkboxes to toggle their initial value\n    let FIELD_ID_COUNTER = 0;\n    // If the form is currently submitting\n    const isSubmitting = ref(false);\n    // If the form is currently validating\n    const isValidating = ref(false);\n    // The number of times the user tried to submit the form\n    const submitCount = ref(0);\n    // field arrays managed by this form\n    const fieldArrays = [];\n    // a private ref for all form values\n    const formValues = reactive(resolveInitialValues(opts));\n    const pathStates = ref([]);\n    const extraErrorsBag = ref({});\n    const pathStateLookup = ref({});\n    const rebuildPathLookup = debounceNextTick(() => {\n        pathStateLookup.value = pathStates.value.reduce((names, state) => {\n            names[normalizeFormPath(toValue(state.path))] = state;\n            return names;\n        }, {});\n    });\n    /**\n     * Manually sets an error message on a specific field\n     */\n    function setFieldError(field, message) {\n        const state = findPathState(field);\n        if (!state) {\n            if (typeof field === 'string') {\n                extraErrorsBag.value[normalizeFormPath(field)] = normalizeErrorItem(message);\n            }\n            return;\n        }\n        // Move the error from the extras path if exists\n        if (typeof field === 'string') {\n            const normalizedPath = normalizeFormPath(field);\n            if (extraErrorsBag.value[normalizedPath]) {\n                delete extraErrorsBag.value[normalizedPath];\n            }\n        }\n        state.errors = normalizeErrorItem(message);\n        state.valid = !state.errors.length;\n    }\n    /**\n     * Sets errors for the fields specified in the object\n     */\n    function setErrors(paths) {\n        keysOf(paths).forEach(path => {\n            setFieldError(path, paths[path]);\n        });\n    }\n    if (opts === null || opts === void 0 ? void 0 : opts.initialErrors) {\n        setErrors(opts.initialErrors);\n    }\n    const errorBag = computed(() => {\n        const pathErrors = pathStates.value.reduce((acc, state) => {\n            if (state.errors.length) {\n                acc[toValue(state.path)] = state.errors;\n            }\n            return acc;\n        }, {});\n        return Object.assign(Object.assign({}, extraErrorsBag.value), pathErrors);\n    });\n    // Gets the first error of each field\n    const errors = computed(() => {\n        return keysOf(errorBag.value).reduce((acc, key) => {\n            const errors = errorBag.value[key];\n            if (errors === null || errors === void 0 ? void 0 : errors.length) {\n                acc[key] = errors[0];\n            }\n            return acc;\n        }, {});\n    });\n    /**\n     * Holds a computed reference to all fields names and labels\n     */\n    const fieldNames = computed(() => {\n        return pathStates.value.reduce((names, state) => {\n            names[toValue(state.path)] = { name: toValue(state.path) || '', label: state.label || '' };\n            return names;\n        }, {});\n    });\n    const fieldBailsMap = computed(() => {\n        return pathStates.value.reduce((map, state) => {\n            var _a;\n            map[toValue(state.path)] = (_a = state.bails) !== null && _a !== void 0 ? _a : true;\n            return map;\n        }, {});\n    });\n    // mutable non-reactive reference to initial errors\n    // we need this to process initial errors then unset them\n    const initialErrors = Object.assign({}, ((opts === null || opts === void 0 ? void 0 : opts.initialErrors) || {}));\n    const keepValuesOnUnmount = (_a = opts === null || opts === void 0 ? void 0 : opts.keepValuesOnUnmount) !== null && _a !== void 0 ? _a : false;\n    // initial form values\n    const { initialValues, originalInitialValues, setInitialValues } = useFormInitialValues(pathStates, formValues, opts);\n    // form meta aggregations\n    const meta = useFormMeta(pathStates, formValues, originalInitialValues, errors);\n    const controlledValues = computed(() => {\n        return pathStates.value.reduce((acc, state) => {\n            const value = getFromPath(formValues, toValue(state.path));\n            setInPath(acc, toValue(state.path), value);\n            return acc;\n        }, {});\n    });\n    const schema = opts === null || opts === void 0 ? void 0 : opts.validationSchema;\n    function createPathState(path, config) {\n        var _a, _b;\n        const initialValue = computed(() => getFromPath(initialValues.value, toValue(path)));\n        const pathStateExists = pathStateLookup.value[toValue(path)];\n        const isCheckboxOrRadio = (config === null || config === void 0 ? void 0 : config.type) === 'checkbox' || (config === null || config === void 0 ? void 0 : config.type) === 'radio';\n        if (pathStateExists && isCheckboxOrRadio) {\n            pathStateExists.multiple = true;\n            const id = FIELD_ID_COUNTER++;\n            if (Array.isArray(pathStateExists.id)) {\n                pathStateExists.id.push(id);\n            }\n            else {\n                pathStateExists.id = [pathStateExists.id, id];\n            }\n            pathStateExists.fieldsCount++;\n            pathStateExists.__flags.pendingUnmount[id] = false;\n            return pathStateExists;\n        }\n        const currentValue = computed(() => getFromPath(formValues, toValue(path)));\n        const pathValue = toValue(path);\n        const unsetBatchIndex = UNSET_BATCH.findIndex(_path => _path === pathValue);\n        if (unsetBatchIndex !== -1) {\n            UNSET_BATCH.splice(unsetBatchIndex, 1);\n        }\n        const isRequired = computed(() => {\n            var _a, _b, _c, _d;\n            const schemaValue = toValue(schema);\n            if (isTypedSchema(schemaValue)) {\n                return (_b = (_a = schemaValue.describe) === null || _a === void 0 ? void 0 : _a.call(schemaValue, toValue(path)).required) !== null && _b !== void 0 ? _b : false;\n            }\n            // Path own schema\n            const configSchemaValue = toValue(config === null || config === void 0 ? void 0 : config.schema);\n            if (isTypedSchema(configSchemaValue)) {\n                return (_d = (_c = configSchemaValue.describe) === null || _c === void 0 ? void 0 : _c.call(configSchemaValue).required) !== null && _d !== void 0 ? _d : false;\n            }\n            return false;\n        });\n        const id = FIELD_ID_COUNTER++;\n        const state = reactive({\n            id,\n            path,\n            touched: false,\n            pending: false,\n            valid: true,\n            validated: !!((_a = initialErrors[pathValue]) === null || _a === void 0 ? void 0 : _a.length),\n            required: isRequired,\n            initialValue,\n            errors: shallowRef([]),\n            bails: (_b = config === null || config === void 0 ? void 0 : config.bails) !== null && _b !== void 0 ? _b : false,\n            label: config === null || config === void 0 ? void 0 : config.label,\n            type: (config === null || config === void 0 ? void 0 : config.type) || 'default',\n            value: currentValue,\n            multiple: false,\n            __flags: {\n                pendingUnmount: { [id]: false },\n                pendingReset: false,\n            },\n            fieldsCount: 1,\n            validate: config === null || config === void 0 ? void 0 : config.validate,\n            dirty: computed(() => {\n                return !isEqual(unref(currentValue), unref(initialValue));\n            }),\n        });\n        pathStates.value.push(state);\n        pathStateLookup.value[pathValue] = state;\n        rebuildPathLookup();\n        if (errors.value[pathValue] && !initialErrors[pathValue]) {\n            nextTick(() => {\n                validateField(pathValue, { mode: 'silent' });\n            });\n        }\n        // Handles when a path changes\n        if (isRef(path)) {\n            watch(path, newPath => {\n                rebuildPathLookup();\n                const nextValue = klona(currentValue.value);\n                pathStateLookup.value[newPath] = state;\n                nextTick(() => {\n                    setInPath(formValues, newPath, nextValue);\n                });\n            });\n        }\n        return state;\n    }\n    /**\n     * Batches validation runs in 5ms batches\n     * Must have two distinct batch queues to make sure they don't override each other settings #3783\n     */\n    const debouncedSilentValidation = debounceAsync(_validateSchema, 5);\n    const debouncedValidation = debounceAsync(_validateSchema, 5);\n    const validateSchema = withLatest(async (mode) => {\n        return (await (mode === 'silent'\n            ? debouncedSilentValidation()\n            : debouncedValidation()));\n    }, (formResult, [mode]) => {\n        // fields by id lookup\n        // errors fields names, we need it to also check if custom errors are updated\n        const currentErrorsPaths = keysOf(formCtx.errorBag.value);\n        // collect all the keys from the schema and all fields\n        // this ensures we have a complete key map of all the fields\n        const paths = [\n            ...new Set([...keysOf(formResult.results), ...pathStates.value.map(p => p.path), ...currentErrorsPaths]),\n        ].sort();\n        // aggregates the paths into a single result object while applying the results on the fields\n        const results = paths.reduce((validation, _path) => {\n            var _a;\n            const expectedPath = _path;\n            const pathState = findPathState(expectedPath) || findHoistedPath(expectedPath);\n            const messages = ((_a = formResult.results[expectedPath]) === null || _a === void 0 ? void 0 : _a.errors) || [];\n            // This is the real path of the field, because it might've been a hoisted field\n            const path = (toValue(pathState === null || pathState === void 0 ? void 0 : pathState.path) || expectedPath);\n            // It is possible that multiple paths are collected across loops\n            // We want to merge them to avoid overriding any iteration's results\n            const fieldResult = mergeValidationResults({ errors: messages, valid: !messages.length }, validation.results[path]);\n            validation.results[path] = fieldResult;\n            if (!fieldResult.valid) {\n                validation.errors[path] = fieldResult.errors[0];\n            }\n            // clean up extra errors if path state exists\n            if (pathState && extraErrorsBag.value[path]) {\n                delete extraErrorsBag.value[path];\n            }\n            // field not rendered\n            if (!pathState) {\n                setFieldError(path, messages);\n                return validation;\n            }\n            // always update the valid flag regardless of the mode\n            pathState.valid = fieldResult.valid;\n            if (mode === 'silent') {\n                return validation;\n            }\n            if (mode === 'validated-only' && !pathState.validated) {\n                return validation;\n            }\n            setFieldError(pathState, fieldResult.errors);\n            return validation;\n        }, {\n            valid: formResult.valid,\n            results: {},\n            errors: {},\n            source: formResult.source,\n        });\n        if (formResult.values) {\n            results.values = formResult.values;\n            results.source = formResult.source;\n        }\n        keysOf(results.results).forEach(path => {\n            var _a;\n            const pathState = findPathState(path);\n            if (!pathState) {\n                return;\n            }\n            if (mode === 'silent') {\n                return;\n            }\n            if (mode === 'validated-only' && !pathState.validated) {\n                return;\n            }\n            setFieldError(pathState, (_a = results.results[path]) === null || _a === void 0 ? void 0 : _a.errors);\n        });\n        return results;\n    });\n    function mutateAllPathState(mutation) {\n        pathStates.value.forEach(mutation);\n    }\n    function findPathState(path) {\n        const normalizedPath = typeof path === 'string' ? normalizeFormPath(path) : path;\n        const pathState = typeof normalizedPath === 'string' ? pathStateLookup.value[normalizedPath] : normalizedPath;\n        return pathState;\n    }\n    function findHoistedPath(path) {\n        const candidates = pathStates.value.filter(state => path.startsWith(toValue(state.path)));\n        return candidates.reduce((bestCandidate, candidate) => {\n            if (!bestCandidate) {\n                return candidate;\n            }\n            return (candidate.path.length > bestCandidate.path.length ? candidate : bestCandidate);\n        }, undefined);\n    }\n    let UNSET_BATCH = [];\n    let PENDING_UNSET;\n    function unsetPathValue(path) {\n        UNSET_BATCH.push(path);\n        if (!PENDING_UNSET) {\n            PENDING_UNSET = nextTick(() => {\n                const sortedPaths = [...UNSET_BATCH].sort().reverse();\n                sortedPaths.forEach(p => {\n                    unsetPath(formValues, p);\n                });\n                UNSET_BATCH = [];\n                PENDING_UNSET = null;\n            });\n        }\n        return PENDING_UNSET;\n    }\n    function makeSubmissionFactory(onlyControlled) {\n        return function submitHandlerFactory(fn, onValidationError) {\n            return function submissionHandler(e) {\n                if (e instanceof Event) {\n                    e.preventDefault();\n                    e.stopPropagation();\n                }\n                // Touch all fields\n                mutateAllPathState(s => (s.touched = true));\n                isSubmitting.value = true;\n                submitCount.value++;\n                return validate()\n                    .then(result => {\n                    const values = klona(formValues);\n                    if (result.valid && typeof fn === 'function') {\n                        const controlled = klona(controlledValues.value);\n                        let submittedValues = (onlyControlled ? controlled : values);\n                        if (result.values) {\n                            submittedValues =\n                                result.source === 'schema'\n                                    ? result.values\n                                    : Object.assign({}, submittedValues, result.values);\n                        }\n                        return fn(submittedValues, {\n                            evt: e,\n                            controlledValues: controlled,\n                            setErrors,\n                            setFieldError,\n                            setTouched,\n                            setFieldTouched,\n                            setValues,\n                            setFieldValue,\n                            resetForm,\n                            resetField,\n                        });\n                    }\n                    if (!result.valid && typeof onValidationError === 'function') {\n                        onValidationError({\n                            values,\n                            evt: e,\n                            errors: result.errors,\n                            results: result.results,\n                        });\n                    }\n                })\n                    .then(returnVal => {\n                    isSubmitting.value = false;\n                    return returnVal;\n                }, err => {\n                    isSubmitting.value = false;\n                    // re-throw the err so it doesn't go silent\n                    throw err;\n                });\n            };\n        };\n    }\n    const handleSubmitImpl = makeSubmissionFactory(false);\n    const handleSubmit = handleSubmitImpl;\n    handleSubmit.withControlled = makeSubmissionFactory(true);\n    function removePathState(path, id) {\n        const idx = pathStates.value.findIndex(s => {\n            return s.path === path && (Array.isArray(s.id) ? s.id.includes(id) : s.id === id);\n        });\n        const pathState = pathStates.value[idx];\n        if (idx === -1 || !pathState) {\n            return;\n        }\n        nextTick(() => {\n            validateField(path, { mode: 'silent', warn: false });\n        });\n        if (pathState.multiple && pathState.fieldsCount) {\n            pathState.fieldsCount--;\n        }\n        if (Array.isArray(pathState.id)) {\n            const idIndex = pathState.id.indexOf(id);\n            if (idIndex >= 0) {\n                pathState.id.splice(idIndex, 1);\n            }\n            delete pathState.__flags.pendingUnmount[id];\n        }\n        if (!pathState.multiple || pathState.fieldsCount <= 0) {\n            pathStates.value.splice(idx, 1);\n            unsetInitialValue(path);\n            rebuildPathLookup();\n            delete pathStateLookup.value[path];\n        }\n    }\n    function destroyPath(path) {\n        keysOf(pathStateLookup.value).forEach(key => {\n            if (key.startsWith(path)) {\n                delete pathStateLookup.value[key];\n            }\n        });\n        pathStates.value = pathStates.value.filter(s => !s.path.startsWith(path));\n        nextTick(() => {\n            rebuildPathLookup();\n        });\n    }\n    const formCtx = {\n        name,\n        formId,\n        values: formValues,\n        controlledValues,\n        errorBag,\n        errors,\n        schema,\n        submitCount,\n        meta,\n        isSubmitting,\n        isValidating,\n        fieldArrays,\n        keepValuesOnUnmount,\n        validateSchema: unref(schema) ? validateSchema : undefined,\n        validate,\n        setFieldError,\n        validateField,\n        setFieldValue,\n        setValues,\n        setErrors,\n        setFieldTouched,\n        setTouched,\n        resetForm,\n        resetField,\n        handleSubmit,\n        useFieldModel,\n        defineInputBinds,\n        defineComponentBinds: defineComponentBinds,\n        defineField,\n        stageInitialValue,\n        unsetInitialValue,\n        setFieldInitialValue,\n        createPathState,\n        getPathState: findPathState,\n        unsetPathValue,\n        removePathState,\n        initialValues: initialValues,\n        getAllPathStates: () => pathStates.value,\n        destroyPath,\n        isFieldTouched,\n        isFieldDirty,\n        isFieldValid,\n    };\n    /**\n     * Sets a single field value\n     */\n    function setFieldValue(field, value, shouldValidate = true) {\n        const clonedValue = klona(value);\n        const path = typeof field === 'string' ? field : field.path;\n        const pathState = findPathState(path);\n        if (!pathState) {\n            createPathState(path);\n        }\n        setInPath(formValues, path, clonedValue);\n        if (shouldValidate) {\n            validateField(path);\n        }\n    }\n    function forceSetValues(fields, shouldValidate = true) {\n        // clean up old values\n        keysOf(formValues).forEach(key => {\n            delete formValues[key];\n        });\n        // set up new values\n        keysOf(fields).forEach(path => {\n            setFieldValue(path, fields[path], false);\n        });\n        if (shouldValidate) {\n            validate();\n        }\n    }\n    /**\n     * Sets multiple fields values\n     */\n    function setValues(fields, shouldValidate = true) {\n        merge(formValues, fields);\n        // regenerate the arrays when the form values change\n        fieldArrays.forEach(f => f && f.reset());\n        if (shouldValidate) {\n            validate();\n        }\n    }\n    function createModel(path, shouldValidate) {\n        const pathState = findPathState(toValue(path)) || createPathState(path);\n        return computed({\n            get() {\n                return pathState.value;\n            },\n            set(value) {\n                var _a;\n                const pathValue = toValue(path);\n                setFieldValue(pathValue, value, (_a = toValue(shouldValidate)) !== null && _a !== void 0 ? _a : false);\n            },\n        });\n    }\n    /**\n     * Sets the touched meta state on a field\n     */\n    function setFieldTouched(field, isTouched) {\n        const pathState = findPathState(field);\n        if (pathState) {\n            pathState.touched = isTouched;\n        }\n    }\n    function isFieldTouched(field) {\n        const pathState = findPathState(field);\n        if (pathState) {\n            return pathState.touched;\n        }\n        // Find all nested paths and consider their touched state\n        return pathStates.value.filter(s => s.path.startsWith(field)).some(s => s.touched);\n    }\n    function isFieldDirty(field) {\n        const pathState = findPathState(field);\n        if (pathState) {\n            return pathState.dirty;\n        }\n        return pathStates.value.filter(s => s.path.startsWith(field)).some(s => s.dirty);\n    }\n    function isFieldValid(field) {\n        const pathState = findPathState(field);\n        if (pathState) {\n            return pathState.valid;\n        }\n        return pathStates.value.filter(s => s.path.startsWith(field)).every(s => s.valid);\n    }\n    /**\n     * Sets the touched meta state on multiple fields\n     */\n    function setTouched(fields) {\n        if (typeof fields === 'boolean') {\n            mutateAllPathState(state => {\n                state.touched = fields;\n            });\n            return;\n        }\n        keysOf(fields).forEach(field => {\n            setFieldTouched(field, !!fields[field]);\n        });\n    }\n    function resetField(field, state) {\n        var _a;\n        const newValue = state && 'value' in state ? state.value : getFromPath(initialValues.value, field);\n        const pathState = findPathState(field);\n        if (pathState) {\n            pathState.__flags.pendingReset = true;\n        }\n        setFieldInitialValue(field, klona(newValue), true);\n        setFieldValue(field, newValue, false);\n        setFieldTouched(field, (_a = state === null || state === void 0 ? void 0 : state.touched) !== null && _a !== void 0 ? _a : false);\n        setFieldError(field, (state === null || state === void 0 ? void 0 : state.errors) || []);\n        nextTick(() => {\n            if (pathState) {\n                pathState.__flags.pendingReset = false;\n            }\n        });\n    }\n    /**\n     * Resets all fields\n     */\n    function resetForm(resetState, opts) {\n        let newValues = klona((resetState === null || resetState === void 0 ? void 0 : resetState.values) ? resetState.values : originalInitialValues.value);\n        newValues = (opts === null || opts === void 0 ? void 0 : opts.force) ? newValues : merge(originalInitialValues.value, newValues);\n        newValues = isTypedSchema(schema) && isCallable(schema.cast) ? schema.cast(newValues) : newValues;\n        setInitialValues(newValues, { force: opts === null || opts === void 0 ? void 0 : opts.force });\n        mutateAllPathState(state => {\n            var _a;\n            state.__flags.pendingReset = true;\n            state.validated = false;\n            state.touched = ((_a = resetState === null || resetState === void 0 ? void 0 : resetState.touched) === null || _a === void 0 ? void 0 : _a[toValue(state.path)]) || false;\n            setFieldValue(toValue(state.path), getFromPath(newValues, toValue(state.path)), false);\n            setFieldError(toValue(state.path), undefined);\n        });\n        (opts === null || opts === void 0 ? void 0 : opts.force) ? forceSetValues(newValues, false) : setValues(newValues, false);\n        setErrors((resetState === null || resetState === void 0 ? void 0 : resetState.errors) || {});\n        submitCount.value = (resetState === null || resetState === void 0 ? void 0 : resetState.submitCount) || 0;\n        nextTick(() => {\n            validate({ mode: 'silent' });\n            mutateAllPathState(state => {\n                state.__flags.pendingReset = false;\n            });\n        });\n    }\n    async function validate(opts) {\n        const mode = (opts === null || opts === void 0 ? void 0 : opts.mode) || 'force';\n        if (mode === 'force') {\n            mutateAllPathState(f => (f.validated = true));\n        }\n        if (formCtx.validateSchema) {\n            return formCtx.validateSchema(mode);\n        }\n        isValidating.value = true;\n        // No schema, each field is responsible to validate itself\n        const validations = await Promise.all(pathStates.value.map(state => {\n            if (!state.validate) {\n                return Promise.resolve({\n                    key: toValue(state.path),\n                    valid: true,\n                    errors: [],\n                    value: undefined,\n                });\n            }\n            return state.validate(opts).then(result => {\n                return {\n                    key: toValue(state.path),\n                    valid: result.valid,\n                    errors: result.errors,\n                    value: result.value,\n                };\n            });\n        }));\n        isValidating.value = false;\n        const results = {};\n        const errors = {};\n        const values = {};\n        for (const validation of validations) {\n            results[validation.key] = {\n                valid: validation.valid,\n                errors: validation.errors,\n            };\n            if (validation.value) {\n                setInPath(values, validation.key, validation.value);\n            }\n            if (validation.errors.length) {\n                errors[validation.key] = validation.errors[0];\n            }\n        }\n        return {\n            valid: validations.every(r => r.valid),\n            results,\n            errors,\n            values,\n            source: 'fields',\n        };\n    }\n    async function validateField(path, opts) {\n        var _a;\n        const state = findPathState(path);\n        if (state && (opts === null || opts === void 0 ? void 0 : opts.mode) !== 'silent') {\n            state.validated = true;\n        }\n        if (schema) {\n            const { results } = await validateSchema((opts === null || opts === void 0 ? void 0 : opts.mode) || 'validated-only');\n            return results[path] || { errors: [], valid: true };\n        }\n        if (state === null || state === void 0 ? void 0 : state.validate) {\n            return state.validate(opts);\n        }\n        const shouldWarn = !state && ((_a = opts === null || opts === void 0 ? void 0 : opts.warn) !== null && _a !== void 0 ? _a : true);\n        if (shouldWarn) {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn$1(`field with path ${path} was not found`);\n            }\n        }\n        return Promise.resolve({ errors: [], valid: true });\n    }\n    function unsetInitialValue(path) {\n        unsetPath(initialValues.value, path);\n    }\n    /**\n     * Sneaky function to set initial field values\n     */\n    function stageInitialValue(path, value, updateOriginal = false) {\n        setFieldInitialValue(path, value);\n        setInPath(formValues, path, value);\n        if (updateOriginal && !(opts === null || opts === void 0 ? void 0 : opts.initialValues)) {\n            setInPath(originalInitialValues.value, path, klona(value));\n        }\n    }\n    function setFieldInitialValue(path, value, updateOriginal = false) {\n        setInPath(initialValues.value, path, klona(value));\n        if (updateOriginal) {\n            setInPath(originalInitialValues.value, path, klona(value));\n        }\n    }\n    async function _validateSchema() {\n        const schemaValue = unref(schema);\n        if (!schemaValue) {\n            return { valid: true, results: {}, errors: {}, source: 'none' };\n        }\n        isValidating.value = true;\n        const formResult = isYupValidator(schemaValue) || isTypedSchema(schemaValue)\n            ? await validateTypedSchema(schemaValue, formValues)\n            : await validateObjectSchema(schemaValue, formValues, {\n                names: fieldNames.value,\n                bailsMap: fieldBailsMap.value,\n            });\n        isValidating.value = false;\n        return formResult;\n    }\n    const submitForm = handleSubmit((_, { evt }) => {\n        if (isFormSubmitEvent(evt)) {\n            evt.target.submit();\n        }\n    });\n    // Trigger initial validation\n    onMounted(() => {\n        if (opts === null || opts === void 0 ? void 0 : opts.initialErrors) {\n            setErrors(opts.initialErrors);\n        }\n        if (opts === null || opts === void 0 ? void 0 : opts.initialTouched) {\n            setTouched(opts.initialTouched);\n        }\n        // if validate on mount was enabled\n        if (opts === null || opts === void 0 ? void 0 : opts.validateOnMount) {\n            validate();\n            return;\n        }\n        // otherwise run initial silent validation through schema if available\n        // the useField should skip their own silent validation if a yup schema is present\n        if (formCtx.validateSchema) {\n            formCtx.validateSchema('silent');\n        }\n    });\n    if (isRef(schema)) {\n        watch(schema, () => {\n            var _a;\n            (_a = formCtx.validateSchema) === null || _a === void 0 ? void 0 : _a.call(formCtx, 'validated-only');\n        });\n    }\n    // Provide injections\n    provide(FormContextKey, formCtx);\n    if ((process.env.NODE_ENV !== 'production')) {\n        registerFormWithDevTools(formCtx);\n        watch(() => (Object.assign(Object.assign({ errors: errorBag.value }, meta.value), { values: formValues, isSubmitting: isSubmitting.value, isValidating: isValidating.value, submitCount: submitCount.value })), refreshInspector, {\n            deep: true,\n        });\n    }\n    function defineField(path, config) {\n        const label = isCallable(config) ? undefined : config === null || config === void 0 ? void 0 : config.label;\n        const pathState = (findPathState(toValue(path)) || createPathState(path, { label }));\n        const evalConfig = () => (isCallable(config) ? config(omit(pathState, PRIVATE_PATH_STATE_KEYS)) : config || {});\n        function onBlur() {\n            var _a;\n            pathState.touched = true;\n            const validateOnBlur = (_a = evalConfig().validateOnBlur) !== null && _a !== void 0 ? _a : getConfig().validateOnBlur;\n            if (validateOnBlur) {\n                validateField(toValue(pathState.path));\n            }\n        }\n        function onInput() {\n            var _a;\n            const validateOnInput = (_a = evalConfig().validateOnInput) !== null && _a !== void 0 ? _a : getConfig().validateOnInput;\n            if (validateOnInput) {\n                nextTick(() => {\n                    validateField(toValue(pathState.path));\n                });\n            }\n        }\n        function onChange() {\n            var _a;\n            const validateOnChange = (_a = evalConfig().validateOnChange) !== null && _a !== void 0 ? _a : getConfig().validateOnChange;\n            if (validateOnChange) {\n                nextTick(() => {\n                    validateField(toValue(pathState.path));\n                });\n            }\n        }\n        const props = computed(() => {\n            const base = {\n                onChange,\n                onInput,\n                onBlur,\n            };\n            if (isCallable(config)) {\n                return Object.assign(Object.assign({}, base), (config(omit(pathState, PRIVATE_PATH_STATE_KEYS)).props || {}));\n            }\n            if (config === null || config === void 0 ? void 0 : config.props) {\n                return Object.assign(Object.assign({}, base), config.props(omit(pathState, PRIVATE_PATH_STATE_KEYS)));\n            }\n            return base;\n        });\n        const model = createModel(path, () => { var _a, _b, _c; return (_c = (_a = evalConfig().validateOnModelUpdate) !== null && _a !== void 0 ? _a : (_b = getConfig()) === null || _b === void 0 ? void 0 : _b.validateOnModelUpdate) !== null && _c !== void 0 ? _c : true; });\n        return [model, props];\n    }\n    function useFieldModel(pathOrPaths) {\n        if (!Array.isArray(pathOrPaths)) {\n            return createModel(pathOrPaths);\n        }\n        return pathOrPaths.map(p => createModel(p, true));\n    }\n    /**\n     * @deprecated use defineField instead\n     */\n    function defineInputBinds(path, config) {\n        const [model, props] = defineField(path, config);\n        function onBlur() {\n            props.value.onBlur();\n        }\n        function onInput(e) {\n            const value = normalizeEventValue(e);\n            setFieldValue(toValue(path), value, false);\n            props.value.onInput();\n        }\n        function onChange(e) {\n            const value = normalizeEventValue(e);\n            setFieldValue(toValue(path), value, false);\n            props.value.onChange();\n        }\n        return computed(() => {\n            return Object.assign(Object.assign({}, props.value), { onBlur,\n                onInput,\n                onChange, value: model.value });\n        });\n    }\n    /**\n     * @deprecated use defineField instead\n     */\n    function defineComponentBinds(path, config) {\n        const [model, props] = defineField(path, config);\n        const pathState = findPathState(toValue(path));\n        function onUpdateModelValue(value) {\n            model.value = value;\n        }\n        return computed(() => {\n            const conf = isCallable(config) ? config(omit(pathState, PRIVATE_PATH_STATE_KEYS)) : config || {};\n            return Object.assign({ [conf.model || 'modelValue']: model.value, [`onUpdate:${conf.model || 'modelValue'}`]: onUpdateModelValue }, props.value);\n        });\n    }\n    const ctx = Object.assign(Object.assign({}, formCtx), { values: readonly(formValues), handleReset: () => resetForm(), submitForm });\n    provide(PublicFormContextKey, ctx);\n    return ctx;\n}\n/**\n * Manages form meta aggregation\n */\nfunction useFormMeta(pathsState, currentValues, initialValues, errors) {\n    const MERGE_STRATEGIES = {\n        touched: 'some',\n        pending: 'some',\n        valid: 'every',\n    };\n    const isDirty = computed(() => {\n        return !isEqual(currentValues, unref(initialValues));\n    });\n    function calculateFlags() {\n        const states = pathsState.value;\n        return keysOf(MERGE_STRATEGIES).reduce((acc, flag) => {\n            const mergeMethod = MERGE_STRATEGIES[flag];\n            acc[flag] = states[mergeMethod](s => s[flag]);\n            return acc;\n        }, {});\n    }\n    const flags = reactive(calculateFlags());\n    watchEffect(() => {\n        const value = calculateFlags();\n        flags.touched = value.touched;\n        flags.valid = value.valid;\n        flags.pending = value.pending;\n    });\n    return computed(() => {\n        return Object.assign(Object.assign({ initialValues: unref(initialValues) }, flags), { valid: flags.valid && !keysOf(errors.value).length, dirty: isDirty.value });\n    });\n}\n/**\n * Manages the initial values prop\n */\nfunction useFormInitialValues(pathsState, formValues, opts) {\n    const values = resolveInitialValues(opts);\n    // these are the mutable initial values as the fields are mounted/unmounted\n    const initialValues = ref(values);\n    // these are the original initial value as provided by the user initially, they don't keep track of conditional fields\n    // this is important because some conditional fields will overwrite the initial values for other fields who had the same name\n    // like array fields, any push/insert operation will overwrite the initial values because they \"create new fields\"\n    // so these are the values that the reset function should use\n    // these only change when the user explicitly changes the initial values or when the user resets them with new values.\n    const originalInitialValues = ref(klona(values));\n    function setInitialValues(values, opts) {\n        if (opts === null || opts === void 0 ? void 0 : opts.force) {\n            initialValues.value = klona(values);\n            originalInitialValues.value = klona(values);\n        }\n        else {\n            initialValues.value = merge(klona(initialValues.value) || {}, klona(values));\n            originalInitialValues.value = merge(klona(originalInitialValues.value) || {}, klona(values));\n        }\n        if (!(opts === null || opts === void 0 ? void 0 : opts.updateFields)) {\n            return;\n        }\n        // update the pristine non-touched fields\n        // those are excluded because it's unlikely you want to change the form values using initial values\n        // we mostly watch them for API population or newly inserted fields\n        // if the user API is taking too much time before user interaction they should consider disabling or hiding their inputs until the values are ready\n        pathsState.value.forEach(state => {\n            const wasTouched = state.touched;\n            if (wasTouched) {\n                return;\n            }\n            const newValue = getFromPath(initialValues.value, toValue(state.path));\n            setInPath(formValues, toValue(state.path), klona(newValue));\n        });\n    }\n    return {\n        initialValues,\n        originalInitialValues,\n        setInitialValues,\n    };\n}\nfunction mergeValidationResults(a, b) {\n    if (!b) {\n        return a;\n    }\n    return {\n        valid: a.valid && b.valid,\n        errors: [...a.errors, ...b.errors],\n    };\n}\nfunction useFormContext() {\n    return inject(PublicFormContextKey);\n}\n\nconst FormImpl = /** #__PURE__ */ defineComponent({\n    name: 'Form',\n    inheritAttrs: false,\n    props: {\n        as: {\n            type: null,\n            default: 'form',\n        },\n        validationSchema: {\n            type: Object,\n            default: undefined,\n        },\n        initialValues: {\n            type: Object,\n            default: undefined,\n        },\n        initialErrors: {\n            type: Object,\n            default: undefined,\n        },\n        initialTouched: {\n            type: Object,\n            default: undefined,\n        },\n        validateOnMount: {\n            type: Boolean,\n            default: false,\n        },\n        onSubmit: {\n            type: Function,\n            default: undefined,\n        },\n        onInvalidSubmit: {\n            type: Function,\n            default: undefined,\n        },\n        keepValues: {\n            type: Boolean,\n            default: false,\n        },\n        name: {\n            type: String,\n            default: 'Form',\n        },\n    },\n    setup(props, ctx) {\n        const validationSchema = toRef(props, 'validationSchema');\n        const keepValues = toRef(props, 'keepValues');\n        const { errors, errorBag, values, meta, isSubmitting, isValidating, submitCount, controlledValues, validate, validateField, handleReset, resetForm, handleSubmit, setErrors, setFieldError, setFieldValue, setValues, setFieldTouched, setTouched, resetField, } = useForm({\n            validationSchema: validationSchema.value ? validationSchema : undefined,\n            initialValues: props.initialValues,\n            initialErrors: props.initialErrors,\n            initialTouched: props.initialTouched,\n            validateOnMount: props.validateOnMount,\n            keepValuesOnUnmount: keepValues,\n            name: props.name,\n        });\n        const submitForm = handleSubmit((_, { evt }) => {\n            if (isFormSubmitEvent(evt)) {\n                evt.target.submit();\n            }\n        }, props.onInvalidSubmit);\n        const onSubmit = props.onSubmit ? handleSubmit(props.onSubmit, props.onInvalidSubmit) : submitForm;\n        function handleFormReset(e) {\n            if (isEvent(e)) {\n                // Prevent default form reset behavior\n                e.preventDefault();\n            }\n            handleReset();\n            if (typeof ctx.attrs.onReset === 'function') {\n                ctx.attrs.onReset();\n            }\n        }\n        function handleScopedSlotSubmit(evt, onSubmit) {\n            const onSuccess = typeof evt === 'function' && !onSubmit ? evt : onSubmit;\n            return handleSubmit(onSuccess, props.onInvalidSubmit)(evt);\n        }\n        function getValues() {\n            return klona(values);\n        }\n        function getMeta() {\n            return klona(meta.value);\n        }\n        function getErrors() {\n            return klona(errors.value);\n        }\n        function slotProps() {\n            return {\n                meta: meta.value,\n                errors: errors.value,\n                errorBag: errorBag.value,\n                values,\n                isSubmitting: isSubmitting.value,\n                isValidating: isValidating.value,\n                submitCount: submitCount.value,\n                controlledValues: controlledValues.value,\n                validate,\n                validateField,\n                handleSubmit: handleScopedSlotSubmit,\n                handleReset,\n                submitForm,\n                setErrors,\n                setFieldError,\n                setFieldValue,\n                setValues,\n                setFieldTouched,\n                setTouched,\n                resetForm,\n                resetField,\n                getValues,\n                getMeta,\n                getErrors,\n            };\n        }\n        // expose these functions and methods as part of public API\n        ctx.expose({\n            setFieldError,\n            setErrors,\n            setFieldValue,\n            setValues,\n            setFieldTouched,\n            setTouched,\n            resetForm,\n            validate,\n            validateField,\n            resetField,\n            getValues,\n            getMeta,\n            getErrors,\n            values,\n            meta,\n            errors,\n        });\n        return function renderForm() {\n            // avoid resolving the form component as itself\n            const tag = props.as === 'form' ? props.as : !props.as ? null : resolveDynamicComponent(props.as);\n            const children = normalizeChildren(tag, ctx, slotProps);\n            if (!tag) {\n                return children;\n            }\n            // Attributes to add on a native `form` tag\n            const formAttrs = tag === 'form'\n                ? {\n                    // Disables native validation as vee-validate will handle it.\n                    novalidate: true,\n                }\n                : {};\n            return h(tag, Object.assign(Object.assign(Object.assign({}, formAttrs), ctx.attrs), { onSubmit, onReset: handleFormReset }), children);\n        };\n    },\n});\nconst Form = FormImpl;\n\nfunction useFieldArray(arrayPath) {\n    const form = injectWithSelf(FormContextKey, undefined);\n    const fields = ref([]);\n    const noOp = () => { };\n    const noOpApi = {\n        fields,\n        remove: noOp,\n        push: noOp,\n        swap: noOp,\n        insert: noOp,\n        update: noOp,\n        replace: noOp,\n        prepend: noOp,\n        move: noOp,\n    };\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('FieldArray requires being a child of `<Form/>` or `useForm` being called before it. Array fields may not work correctly');\n        }\n        return noOpApi;\n    }\n    if (!unref(arrayPath)) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('FieldArray requires a field path to be provided, did you forget to pass the `name` prop?');\n        }\n        return noOpApi;\n    }\n    const alreadyExists = form.fieldArrays.find(a => unref(a.path) === unref(arrayPath));\n    if (alreadyExists) {\n        return alreadyExists;\n    }\n    let entryCounter = 0;\n    function getCurrentValues() {\n        return getFromPath(form === null || form === void 0 ? void 0 : form.values, toValue(arrayPath), []) || [];\n    }\n    function initFields() {\n        const currentValues = getCurrentValues();\n        if (!Array.isArray(currentValues)) {\n            return;\n        }\n        fields.value = currentValues.map((v, idx) => createEntry(v, idx, fields.value));\n        updateEntryFlags();\n    }\n    initFields();\n    function updateEntryFlags() {\n        const fieldsLength = fields.value.length;\n        for (let i = 0; i < fieldsLength; i++) {\n            const entry = fields.value[i];\n            entry.isFirst = i === 0;\n            entry.isLast = i === fieldsLength - 1;\n        }\n    }\n    function createEntry(value, idx, currentFields) {\n        // Skips the work by returning the current entry if it already exists\n        // This should make the `key` prop stable and doesn't cause more re-renders than needed\n        // The value is computed and should update anyways\n        if (currentFields && !isNullOrUndefined(idx) && currentFields[idx]) {\n            return currentFields[idx];\n        }\n        const key = entryCounter++;\n        const entry = {\n            key,\n            value: computedDeep({\n                get() {\n                    const currentValues = getFromPath(form === null || form === void 0 ? void 0 : form.values, toValue(arrayPath), []) || [];\n                    const idx = fields.value.findIndex(e => e.key === key);\n                    return idx === -1 ? value : currentValues[idx];\n                },\n                set(value) {\n                    const idx = fields.value.findIndex(e => e.key === key);\n                    if (idx === -1) {\n                        if ((process.env.NODE_ENV !== 'production')) {\n                            warn(`Attempting to update a non-existent array item`);\n                        }\n                        return;\n                    }\n                    update(idx, value);\n                },\n            }), // will be auto unwrapped\n            isFirst: false,\n            isLast: false,\n        };\n        return entry;\n    }\n    function afterMutation() {\n        updateEntryFlags();\n        // Should trigger a silent validation since a field may not do that #4096\n        form === null || form === void 0 ? void 0 : form.validate({ mode: 'silent' });\n    }\n    function remove(idx) {\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        if (!pathValue || !Array.isArray(pathValue)) {\n            return;\n        }\n        const newValue = [...pathValue];\n        newValue.splice(idx, 1);\n        const fieldPath = pathName + `[${idx}]`;\n        form.destroyPath(fieldPath);\n        form.unsetInitialValue(fieldPath);\n        setInPath(form.values, pathName, newValue);\n        fields.value.splice(idx, 1);\n        afterMutation();\n    }\n    function push(initialValue) {\n        const value = klona(initialValue);\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        const normalizedPathValue = isNullOrUndefined(pathValue) ? [] : pathValue;\n        if (!Array.isArray(normalizedPathValue)) {\n            return;\n        }\n        const newValue = [...normalizedPathValue];\n        newValue.push(value);\n        form.stageInitialValue(pathName + `[${newValue.length - 1}]`, value);\n        setInPath(form.values, pathName, newValue);\n        fields.value.push(createEntry(value));\n        afterMutation();\n    }\n    function swap(indexA, indexB) {\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        if (!Array.isArray(pathValue) || !(indexA in pathValue) || !(indexB in pathValue)) {\n            return;\n        }\n        const newValue = [...pathValue];\n        const newFields = [...fields.value];\n        // the old switcheroo\n        const temp = newValue[indexA];\n        newValue[indexA] = newValue[indexB];\n        newValue[indexB] = temp;\n        const tempEntry = newFields[indexA];\n        newFields[indexA] = newFields[indexB];\n        newFields[indexB] = tempEntry;\n        setInPath(form.values, pathName, newValue);\n        fields.value = newFields;\n        updateEntryFlags();\n    }\n    function insert(idx, initialValue) {\n        const value = klona(initialValue);\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        if (!Array.isArray(pathValue) || pathValue.length < idx) {\n            return;\n        }\n        const newValue = [...pathValue];\n        const newFields = [...fields.value];\n        newValue.splice(idx, 0, value);\n        newFields.splice(idx, 0, createEntry(value));\n        setInPath(form.values, pathName, newValue);\n        fields.value = newFields;\n        afterMutation();\n    }\n    function replace(arr) {\n        const pathName = toValue(arrayPath);\n        form.stageInitialValue(pathName, arr);\n        setInPath(form.values, pathName, arr);\n        initFields();\n        afterMutation();\n    }\n    function update(idx, value) {\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        if (!Array.isArray(pathValue) || pathValue.length - 1 < idx) {\n            return;\n        }\n        setInPath(form.values, `${pathName}[${idx}]`, value);\n        form === null || form === void 0 ? void 0 : form.validate({ mode: 'validated-only' });\n    }\n    function prepend(initialValue) {\n        const value = klona(initialValue);\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        const normalizedPathValue = isNullOrUndefined(pathValue) ? [] : pathValue;\n        if (!Array.isArray(normalizedPathValue)) {\n            return;\n        }\n        const newValue = [value, ...normalizedPathValue];\n        setInPath(form.values, pathName, newValue);\n        form.stageInitialValue(pathName + `[0]`, value);\n        fields.value.unshift(createEntry(value));\n        afterMutation();\n    }\n    function move(oldIdx, newIdx) {\n        const pathName = toValue(arrayPath);\n        const pathValue = getFromPath(form === null || form === void 0 ? void 0 : form.values, pathName);\n        const newValue = isNullOrUndefined(pathValue) ? [] : [...pathValue];\n        if (!Array.isArray(pathValue) || !(oldIdx in pathValue) || !(newIdx in pathValue)) {\n            return;\n        }\n        const newFields = [...fields.value];\n        const movedItem = newFields[oldIdx];\n        newFields.splice(oldIdx, 1);\n        newFields.splice(newIdx, 0, movedItem);\n        const movedValue = newValue[oldIdx];\n        newValue.splice(oldIdx, 1);\n        newValue.splice(newIdx, 0, movedValue);\n        setInPath(form.values, pathName, newValue);\n        fields.value = newFields;\n        afterMutation();\n    }\n    const fieldArrayCtx = {\n        fields,\n        remove,\n        push,\n        swap,\n        insert,\n        update,\n        replace,\n        prepend,\n        move,\n    };\n    form.fieldArrays.push(Object.assign({ path: arrayPath, reset: initFields }, fieldArrayCtx));\n    onBeforeUnmount(() => {\n        const idx = form.fieldArrays.findIndex(i => toValue(i.path) === toValue(arrayPath));\n        if (idx >= 0) {\n            form.fieldArrays.splice(idx, 1);\n        }\n    });\n    // Makes sure to sync the form values with the array value if they go out of sync\n    // #4153\n    watch(getCurrentValues, formValues => {\n        const fieldsValues = fields.value.map(f => f.value);\n        // If form values are not the same as the current values then something overrode them.\n        if (!isEqual(formValues, fieldsValues)) {\n            initFields();\n        }\n    });\n    return fieldArrayCtx;\n}\n\nconst FieldArrayImpl = /** #__PURE__ */ defineComponent({\n    name: 'FieldArray',\n    inheritAttrs: false,\n    props: {\n        name: {\n            type: String,\n            required: true,\n        },\n    },\n    setup(props, ctx) {\n        const { push, remove, swap, insert, replace, update, prepend, move, fields } = useFieldArray(() => props.name);\n        function slotProps() {\n            return {\n                fields: fields.value,\n                push,\n                remove,\n                swap,\n                insert,\n                update,\n                replace,\n                prepend,\n                move,\n            };\n        }\n        ctx.expose({\n            push,\n            remove,\n            swap,\n            insert,\n            update,\n            replace,\n            prepend,\n            move,\n        });\n        return () => {\n            const children = normalizeChildren(undefined, ctx, slotProps);\n            return children;\n        };\n    },\n});\nconst FieldArray = FieldArrayImpl;\n\nconst ErrorMessageImpl = /** #__PURE__ */ defineComponent({\n    name: 'ErrorMessage',\n    props: {\n        as: {\n            type: String,\n            default: undefined,\n        },\n        name: {\n            type: String,\n            required: true,\n        },\n    },\n    setup(props, ctx) {\n        const form = inject(FormContextKey, undefined);\n        const message = computed(() => {\n            return form === null || form === void 0 ? void 0 : form.errors.value[props.name];\n        });\n        function slotProps() {\n            return {\n                message: message.value,\n            };\n        }\n        return () => {\n            // Renders nothing if there are no messages\n            if (!message.value) {\n                return undefined;\n            }\n            const tag = (props.as ? resolveDynamicComponent(props.as) : props.as);\n            const children = normalizeChildren(tag, ctx, slotProps);\n            const attrs = Object.assign({ role: 'alert' }, ctx.attrs);\n            // If no tag was specified and there are children\n            // render the slot as is without wrapping it\n            if (!tag && (Array.isArray(children) || !children) && (children === null || children === void 0 ? void 0 : children.length)) {\n                return children;\n            }\n            // If no children in slot\n            // render whatever specified and fallback to a <span> with the message in it's contents\n            if ((Array.isArray(children) || !children) && !(children === null || children === void 0 ? void 0 : children.length)) {\n                return h(tag || 'span', attrs, message.value);\n            }\n            return h(tag, attrs, children);\n        };\n    },\n});\nconst ErrorMessage = ErrorMessageImpl;\n\nfunction useResetForm() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return function resetForm(state, opts) {\n        if (!form) {\n            return;\n        }\n        return form.resetForm(state, opts);\n    };\n}\n\n/**\n * If a field is dirty or not\n */\nfunction useIsFieldDirty(path) {\n    const fieldOrPath = resolveFieldOrPathState(path);\n    return computed(() => {\n        var _a, _b;\n        if (!fieldOrPath) {\n            return false;\n        }\n        return (_b = ('meta' in fieldOrPath ? fieldOrPath.meta.dirty : (_a = fieldOrPath === null || fieldOrPath === void 0 ? void 0 : fieldOrPath.value) === null || _a === void 0 ? void 0 : _a.dirty)) !== null && _b !== void 0 ? _b : false;\n    });\n}\n\n/**\n * If a field is touched or not\n */\nfunction useIsFieldTouched(path) {\n    const fieldOrPath = resolveFieldOrPathState(path);\n    return computed(() => {\n        var _a, _b;\n        if (!fieldOrPath) {\n            return false;\n        }\n        return (_b = ('meta' in fieldOrPath ? fieldOrPath.meta.touched : (_a = fieldOrPath === null || fieldOrPath === void 0 ? void 0 : fieldOrPath.value) === null || _a === void 0 ? void 0 : _a.touched)) !== null && _b !== void 0 ? _b : false;\n    });\n}\n\n/**\n * If a field is validated and is valid\n */\nfunction useIsFieldValid(path) {\n    const fieldOrPath = resolveFieldOrPathState(path);\n    return computed(() => {\n        var _a, _b;\n        if (!fieldOrPath) {\n            return false;\n        }\n        return (_b = ('meta' in fieldOrPath ? fieldOrPath.meta.valid : (_a = fieldOrPath === null || fieldOrPath === void 0 ? void 0 : fieldOrPath.value) === null || _a === void 0 ? void 0 : _a.valid)) !== null && _b !== void 0 ? _b : false;\n    });\n}\n\n/**\n * If the form is submitting or not\n */\nfunction useIsSubmitting() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.isSubmitting.value) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * If the form is validating or not\n */\nfunction useIsValidating() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.isValidating.value) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * Validates a single field\n */\nfunction useValidateField(path) {\n    const form = injectWithSelf(FormContextKey);\n    const field = path ? undefined : inject(FieldContextKey);\n    return function validateField() {\n        if (field) {\n            return field.validate();\n        }\n        if (form && path) {\n            return form === null || form === void 0 ? void 0 : form.validateField(toValue(path));\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`field with name ${unref(path)} was not found`);\n        }\n        return Promise.resolve({\n            errors: [],\n            valid: true,\n        });\n    };\n}\n\n/**\n * If the form is dirty or not\n */\nfunction useIsFormDirty() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.meta.value.dirty) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * If the form is touched or not\n */\nfunction useIsFormTouched() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.meta.value.touched) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * If the form has been validated and is valid\n */\nfunction useIsFormValid() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.meta.value.valid) !== null && _a !== void 0 ? _a : false;\n    });\n}\n\n/**\n * Validate multiple fields\n */\nfunction useValidateForm() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return function validateField() {\n        if (!form) {\n            return Promise.resolve({ results: {}, errors: {}, valid: true, source: 'none' });\n        }\n        return form.validate();\n    };\n}\n\n/**\n * The number of form's submission count\n */\nfunction useSubmitCount() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        var _a;\n        return (_a = form === null || form === void 0 ? void 0 : form.submitCount.value) !== null && _a !== void 0 ? _a : 0;\n    });\n}\n\n/**\n * Gives access to a field's current value\n */\nfunction useFieldValue(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return computed(() => {\n        if (path) {\n            return getFromPath(form === null || form === void 0 ? void 0 : form.values, toValue(path));\n        }\n        return toValue(field === null || field === void 0 ? void 0 : field.value);\n    });\n}\n\n/**\n * Gives access to a form's values\n */\nfunction useFormValues() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        return (form === null || form === void 0 ? void 0 : form.values) || {};\n    });\n}\n\n/**\n * Gives access to all form errors\n */\nfunction useFormErrors() {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    return computed(() => {\n        return ((form === null || form === void 0 ? void 0 : form.errors.value) || {});\n    });\n}\n\n/**\n * Gives access to a single field error\n */\nfunction useFieldError(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return computed(() => {\n        if (path) {\n            return form === null || form === void 0 ? void 0 : form.errors.value[toValue(path)];\n        }\n        return field === null || field === void 0 ? void 0 : field.errorMessage.value;\n    });\n}\n\nfunction useSubmitForm(cb) {\n    const form = injectWithSelf(FormContextKey);\n    if (!form) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('No vee-validate <Form /> or `useForm` was detected in the component tree');\n        }\n    }\n    const onSubmit = form ? form.handleSubmit(cb) : undefined;\n    return function submitForm(e) {\n        if (!onSubmit) {\n            return;\n        }\n        return onSubmit(e);\n    };\n}\n\n/**\n * Sets a field's error message\n */\nfunction useSetFieldError(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return function setFieldError(message) {\n        if (path && form) {\n            form.setFieldError(toValue(path), message);\n            return;\n        }\n        if (field) {\n            field.setErrors(message || []);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set error message since there is no form context or a field named \"${toValue(path)}\", did you forget to call \"useField\" or \"useForm\"?`);\n        }\n    };\n}\n\n/**\n * Sets a field's touched meta state\n */\nfunction useSetFieldTouched(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return function setFieldTouched(touched) {\n        if (path && form) {\n            form.setFieldTouched(toValue(path), touched);\n            return;\n        }\n        if (field) {\n            field.setTouched(touched);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set touched state since there is no form context or a field named \"${toValue(path)}\", did you forget to call \"useField\" or \"useForm\"?`);\n        }\n    };\n}\n\n/**\n * Sets a field's value\n */\nfunction useSetFieldValue(path) {\n    const form = injectWithSelf(FormContextKey);\n    // We don't want to use self injected context as it doesn't make sense\n    const field = path ? undefined : inject(FieldContextKey);\n    return function setFieldValue(value, shouldValidate = true) {\n        if (path && form) {\n            form.setFieldValue(toValue(path), value, shouldValidate);\n            return;\n        }\n        if (field) {\n            field.setValue(value, shouldValidate);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set value since there is no form context or a field named \"${toValue(path)}\", did you forget to call \"useField\" or \"useForm\"?`);\n        }\n    };\n}\n\n/**\n * Sets multiple fields errors\n */\nfunction useSetFormErrors() {\n    const form = injectWithSelf(FormContextKey);\n    function setFormErrors(fields) {\n        if (form) {\n            form.setErrors(fields);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set errors because a form was not detected, did you forget to use \"useForm\" in a parent component?`);\n        }\n    }\n    return setFormErrors;\n}\n\n/**\n * Sets multiple fields touched or all fields in the form\n */\nfunction useSetFormTouched() {\n    const form = injectWithSelf(FormContextKey);\n    function setFormTouched(fields) {\n        if (form) {\n            form.setTouched(fields);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set touched state because a form was not detected, did you forget to use \"useForm\" in a parent component?`);\n        }\n    }\n    return setFormTouched;\n}\n\n/**\n * Sets multiple fields values\n */\nfunction useSetFormValues() {\n    const form = injectWithSelf(FormContextKey);\n    function setFormValues(fields, shouldValidate = true) {\n        if (form) {\n            form.setValues(fields, shouldValidate);\n            return;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn(`Could not set form values because a form was not detected, did you forget to use \"useForm\" in a parent component?`);\n        }\n    }\n    return setFormValues;\n}\n\nexport { ErrorMessage, Field, FieldArray, FieldContextKey, Form, FormContextKey, IS_ABSENT, PublicFormContextKey, cleanupNonNestedPath, configure, defineRule, isNotNestedPath, normalizeRules, useField, useFieldArray, useFieldError, useFieldValue, useForm, useFormContext, useFormErrors, useFormValues, useIsFieldDirty, useIsFieldTouched, useIsFieldValid, useIsFormDirty, useIsFormTouched, useIsFormValid, useIsSubmitting, useIsValidating, useResetForm, useSetFieldError, useSetFieldTouched, useSetFieldValue, useSetFormErrors, useSetFormTouched, useSetFormValues, useSubmitCount, useSubmitForm, useValidateField, useValidateForm, validate, validateObjectSchema as validateObject };\n"]}