{"version":3,"file":"yup-wiv0U4oi.js","sources":["../../node_modules/yup/es/util/printValue.js","../../node_modules/yup/es/locale.js","../../node_modules/yup/es/util/isSchema.js","../../node_modules/yup/es/Condition.js","../../node_modules/yup/es/util/toArray.js","../../node_modules/yup/es/ValidationError.js","../../node_modules/yup/es/util/runTests.js","../../node_modules/yup/es/Reference.js","../../node_modules/yup/es/util/createValidation.js","../../node_modules/yup/es/util/reach.js","../../node_modules/yup/es/util/ReferenceSet.js","../../node_modules/yup/es/schema.js","../../node_modules/yup/es/mixed.js","../../node_modules/yup/es/util/isAbsent.js","../../node_modules/yup/es/boolean.js","../../node_modules/yup/es/string.js","../../node_modules/yup/es/number.js","../../node_modules/yup/es/util/isodate.js","../../node_modules/yup/es/date.js","../../node_modules/yup/es/util/sortFields.js","../../node_modules/yup/es/util/sortByKeyOrder.js","../../node_modules/yup/es/object.js","../../node_modules/yup/es/array.js","../../node_modules/yup/es/Lazy.js"],"sourcesContent":["const toString = Object.prototype.toString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\n\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && 1 / val < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\n\nfunction printSimpleValue(val, quoteStrings = false) {\n if (val == null || val === true || val === false) return '' + val;\n const typeOf = typeof val;\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return quoteStrings ? `\"${val}\"` : val;\n if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';\n if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n const tag = toString.call(val).slice(8, -1);\n if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);\n if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';\n if (tag === 'RegExp') return regExpToString.call(val);\n return null;\n}\n\nexport default function printValue(value, quoteStrings) {\n let result = printSimpleValue(value, quoteStrings);\n if (result !== null) return result;\n return JSON.stringify(value, function (key, value) {\n let result = printSimpleValue(this[key], quoteStrings);\n if (result !== null) return result;\n return value;\n }, 2);\n}","import printValue from './util/printValue';\nexport let mixed = {\n default: '${path} is invalid',\n required: '${path} is a required field',\n oneOf: '${path} must be one of the following values: ${values}',\n notOneOf: '${path} must not be one of the following values: ${values}',\n notType: ({\n path,\n type,\n value,\n originalValue\n }) => {\n let isCast = originalValue != null && originalValue !== value;\n let msg = `${path} must be a \\`${type}\\` type, ` + `but the final value was: \\`${printValue(value, true)}\\`` + (isCast ? ` (cast from the value \\`${printValue(originalValue, true)}\\`).` : '.');\n\n if (value === null) {\n msg += `\\n If \"null\" is intended as an empty value be sure to mark the schema as \\`.nullable()\\``;\n }\n\n return msg;\n },\n defined: '${path} must be defined'\n};\nexport let string = {\n length: '${path} must be exactly ${length} characters',\n min: '${path} must be at least ${min} characters',\n max: '${path} must be at most ${max} characters',\n matches: '${path} must match the following: \"${regex}\"',\n email: '${path} must be a valid email',\n url: '${path} must be a valid URL',\n uuid: '${path} must be a valid UUID',\n trim: '${path} must be a trimmed string',\n lowercase: '${path} must be a lowercase string',\n uppercase: '${path} must be a upper case string'\n};\nexport let number = {\n min: '${path} must be greater than or equal to ${min}',\n max: '${path} must be less than or equal to ${max}',\n lessThan: '${path} must be less than ${less}',\n moreThan: '${path} must be greater than ${more}',\n positive: '${path} must be a positive number',\n negative: '${path} must be a negative number',\n integer: '${path} must be an integer'\n};\nexport let date = {\n min: '${path} field must be later than ${min}',\n max: '${path} field must be at earlier than ${max}'\n};\nexport let boolean = {\n isValue: '${path} field must be ${value}'\n};\nexport let object = {\n noUnknown: '${path} field has unspecified keys: ${unknown}'\n};\nexport let array = {\n min: '${path} field must have at least ${min} items',\n max: '${path} field must have less than or equal to ${max} items',\n length: '${path} must have ${length} items'\n};\nexport default Object.assign(Object.create(null), {\n mixed,\n string,\n number,\n date,\n object,\n array,\n boolean\n});","const isSchema = obj => obj && obj.__isYupSchema__;\n\nexport default isSchema;","import has from 'lodash/has';\nimport isSchema from './util/isSchema';\n\nclass Condition {\n constructor(refs, options) {\n this.fn = void 0;\n this.refs = refs;\n this.refs = refs;\n\n if (typeof options === 'function') {\n this.fn = options;\n return;\n }\n\n if (!has(options, 'is')) throw new TypeError('`is:` is required for `when()` conditions');\n if (!options.then && !options.otherwise) throw new TypeError('either `then:` or `otherwise:` is required for `when()` conditions');\n let {\n is,\n then,\n otherwise\n } = options;\n let check = typeof is === 'function' ? is : (...values) => values.every(value => value === is);\n\n this.fn = function (...args) {\n let options = args.pop();\n let schema = args.pop();\n let branch = check(...args) ? then : otherwise;\n if (!branch) return undefined;\n if (typeof branch === 'function') return branch(schema);\n return schema.concat(branch.resolve(options));\n };\n }\n\n resolve(base, options) {\n let values = this.refs.map(ref => ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context));\n let schema = this.fn.apply(base, values.concat(base, options));\n if (schema === undefined || schema === base) return base;\n if (!isSchema(schema)) throw new TypeError('conditions must return a schema object');\n return schema.resolve(options);\n }\n\n}\n\nexport default Condition;","export default function toArray(value) {\n return value == null ? [] : [].concat(value);\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport printValue from './util/printValue';\nimport toArray from './util/toArray';\nlet strReg = /\\$\\{\\s*(\\w+)\\s*\\}/g;\nexport default class ValidationError extends Error {\n static formatError(message, params) {\n const path = params.label || params.path || 'this';\n if (path !== params.path) params = _extends({}, params, {\n path\n });\n if (typeof message === 'string') return message.replace(strReg, (_, key) => printValue(params[key]));\n if (typeof message === 'function') return message(params);\n return message;\n }\n\n static isError(err) {\n return err && err.name === 'ValidationError';\n }\n\n constructor(errorOrErrors, value, field, type) {\n super();\n this.value = void 0;\n this.path = void 0;\n this.type = void 0;\n this.errors = void 0;\n this.params = void 0;\n this.inner = void 0;\n this.name = 'ValidationError';\n this.value = value;\n this.path = field;\n this.type = type;\n this.errors = [];\n this.inner = [];\n toArray(errorOrErrors).forEach(err => {\n if (ValidationError.isError(err)) {\n this.errors.push(...err.errors);\n this.inner = this.inner.concat(err.inner.length ? err.inner : err);\n } else {\n this.errors.push(err);\n }\n });\n this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];\n if (Error.captureStackTrace) Error.captureStackTrace(this, ValidationError);\n }\n\n}","import ValidationError from '../ValidationError';\n\nconst once = cb => {\n let fired = false;\n return (...args) => {\n if (fired) return;\n fired = true;\n cb(...args);\n };\n};\n\nexport default function runTests(options, cb) {\n let {\n endEarly,\n tests,\n args,\n value,\n errors,\n sort,\n path\n } = options;\n let callback = once(cb);\n let count = tests.length;\n const nestedErrors = [];\n errors = errors ? errors : [];\n if (!count) return errors.length ? callback(new ValidationError(errors, value, path)) : callback(null, value);\n\n for (let i = 0; i < tests.length; i++) {\n const test = tests[i];\n test(args, function finishTestRun(err) {\n if (err) {\n // always return early for non validation errors\n if (!ValidationError.isError(err)) {\n return callback(err, value);\n }\n\n if (endEarly) {\n err.value = value;\n return callback(err, value);\n }\n\n nestedErrors.push(err);\n }\n\n if (--count <= 0) {\n if (nestedErrors.length) {\n if (sort) nestedErrors.sort(sort); //show parent errors after the nested ones: name.first, name\n\n if (errors.length) nestedErrors.push(...errors);\n errors = nestedErrors;\n }\n\n if (errors.length) {\n callback(new ValidationError(errors, value, path), value);\n return;\n }\n\n callback(null, value);\n }\n });\n }\n}","import { getter } from 'property-expr';\nconst prefixes = {\n context: '$',\n value: '.'\n};\nexport function create(key, options) {\n return new Reference(key, options);\n}\nexport default class Reference {\n constructor(key, options = {}) {\n this.key = void 0;\n this.isContext = void 0;\n this.isValue = void 0;\n this.isSibling = void 0;\n this.path = void 0;\n this.getter = void 0;\n this.map = void 0;\n if (typeof key !== 'string') throw new TypeError('ref must be a string, got: ' + key);\n this.key = key.trim();\n if (key === '') throw new TypeError('ref must be a non-empty string');\n this.isContext = this.key[0] === prefixes.context;\n this.isValue = this.key[0] === prefixes.value;\n this.isSibling = !this.isContext && !this.isValue;\n let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : '';\n this.path = this.key.slice(prefix.length);\n this.getter = this.path && getter(this.path, true);\n this.map = options.map;\n }\n\n getValue(value, parent, context) {\n let result = this.isContext ? context : this.isValue ? value : parent;\n if (this.getter) result = this.getter(result || {});\n if (this.map) result = this.map(result);\n return result;\n }\n /**\n *\n * @param {*} value\n * @param {Object} options\n * @param {Object=} options.context\n * @param {Object=} options.parent\n */\n\n\n cast(value, options) {\n return this.getValue(value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context);\n }\n\n resolve() {\n return this;\n }\n\n describe() {\n return {\n type: 'ref',\n key: this.key\n };\n }\n\n toString() {\n return `Ref(${this.key})`;\n }\n\n static isRef(value) {\n return value && value.__isYupRef;\n }\n\n} // @ts-ignore\n\nReference.prototype.__isYupRef = true;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport mapValues from 'lodash/mapValues';\nimport ValidationError from '../ValidationError';\nimport Ref from '../Reference';\nexport default function createValidation(config) {\n function validate(_ref, cb) {\n let {\n value,\n path = '',\n label,\n options,\n originalValue,\n sync\n } = _ref,\n rest = _objectWithoutPropertiesLoose(_ref, [\"value\", \"path\", \"label\", \"options\", \"originalValue\", \"sync\"]);\n\n const {\n name,\n test,\n params,\n message\n } = config;\n let {\n parent,\n context\n } = options;\n\n function resolve(item) {\n return Ref.isRef(item) ? item.getValue(value, parent, context) : item;\n }\n\n function createError(overrides = {}) {\n const nextParams = mapValues(_extends({\n value,\n originalValue,\n label,\n path: overrides.path || path\n }, params, overrides.params), resolve);\n const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name);\n error.params = nextParams;\n return error;\n }\n\n let ctx = _extends({\n path,\n parent,\n type: name,\n createError,\n resolve,\n options,\n originalValue\n }, rest);\n\n if (!sync) {\n try {\n Promise.resolve(test.call(ctx, value, ctx)).then(validOrError => {\n if (ValidationError.isError(validOrError)) cb(validOrError);else if (!validOrError) cb(createError());else cb(null, validOrError);\n }).catch(cb);\n } catch (err) {\n cb(err);\n }\n\n return;\n }\n\n let result;\n\n try {\n var _ref2;\n\n result = test.call(ctx, value, ctx);\n\n if (typeof ((_ref2 = result) == null ? void 0 : _ref2.then) === 'function') {\n throw new Error(`Validation test of type: \"${ctx.type}\" returned a Promise during a synchronous validate. ` + `This test will finish after the validate call has returned`);\n }\n } catch (err) {\n cb(err);\n return;\n }\n\n if (ValidationError.isError(result)) cb(result);else if (!result) cb(createError());else cb(null, result);\n }\n\n validate.OPTIONS = config;\n return validate;\n}","import { forEach } from 'property-expr';\n\nlet trim = part => part.substr(0, part.length - 1).substr(1);\n\nexport function getIn(schema, path, value, context = value) {\n let parent, lastPart, lastPartDebug; // root path: ''\n\n if (!path) return {\n parent,\n parentPath: path,\n schema\n };\n forEach(path, (_part, isBracket, isArray) => {\n let part = isBracket ? trim(_part) : _part;\n schema = schema.resolve({\n context,\n parent,\n value\n });\n\n if (schema.innerType) {\n let idx = isArray ? parseInt(part, 10) : 0;\n\n if (value && idx >= value.length) {\n throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. ` + `because there is no value at that index. `);\n }\n\n parent = value;\n value = value && value[idx];\n schema = schema.innerType;\n } // sometimes the array index part of a path doesn't exist: \"nested.arr.child\"\n // in these cases the current part is the next schema and should be processed\n // in this iteration. For cases where the index signature is included this\n // check will fail and we'll handle the `child` part on the next iteration like normal\n\n\n if (!isArray) {\n if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: \"${schema._type}\")`);\n parent = value;\n value = value && value[part];\n schema = schema.fields[part];\n }\n\n lastPart = part;\n lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;\n });\n return {\n schema,\n parent,\n parentPath: lastPart\n };\n}\n\nconst reach = (obj, path, value, context) => getIn(obj, path, value, context).schema;\n\nexport default reach;","import Reference from '../Reference';\nexport default class ReferenceSet {\n constructor() {\n this.list = void 0;\n this.refs = void 0;\n this.list = new Set();\n this.refs = new Map();\n }\n\n get size() {\n return this.list.size + this.refs.size;\n }\n\n describe() {\n const description = [];\n\n for (const item of this.list) description.push(item);\n\n for (const [, ref] of this.refs) description.push(ref.describe());\n\n return description;\n }\n\n toArray() {\n return Array.from(this.list).concat(Array.from(this.refs.values()));\n }\n\n resolveAll(resolve) {\n return this.toArray().reduce((acc, e) => acc.concat(Reference.isRef(e) ? resolve(e) : e), []);\n }\n\n add(value) {\n Reference.isRef(value) ? this.refs.set(value.key, value) : this.list.add(value);\n }\n\n delete(value) {\n Reference.isRef(value) ? this.refs.delete(value.key) : this.list.delete(value);\n }\n\n clone() {\n const next = new ReferenceSet();\n next.list = new Set(this.list);\n next.refs = new Map(this.refs);\n return next;\n }\n\n merge(newItems, removeItems) {\n const next = this.clone();\n newItems.list.forEach(value => next.add(value));\n newItems.refs.forEach(value => next.add(value));\n removeItems.list.forEach(value => next.delete(value));\n removeItems.refs.forEach(value => next.delete(value));\n return next;\n }\n\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n// @ts-ignore\nimport cloneDeep from 'nanoclone';\nimport { mixed as locale } from './locale';\nimport Condition from './Condition';\nimport runTests from './util/runTests';\nimport createValidation from './util/createValidation';\nimport printValue from './util/printValue';\nimport Ref from './Reference';\nimport { getIn } from './util/reach';\nimport ValidationError from './ValidationError';\nimport ReferenceSet from './util/ReferenceSet';\nimport toArray from './util/toArray'; // const UNSET = 'unset' as const;\n\nexport default class BaseSchema {\n constructor(options) {\n this.deps = [];\n this.tests = void 0;\n this.transforms = void 0;\n this.conditions = [];\n this._mutate = void 0;\n this._typeError = void 0;\n this._whitelist = new ReferenceSet();\n this._blacklist = new ReferenceSet();\n this.exclusiveTests = Object.create(null);\n this.spec = void 0;\n this.tests = [];\n this.transforms = [];\n this.withMutation(() => {\n this.typeError(locale.notType);\n });\n this.type = (options == null ? void 0 : options.type) || 'mixed';\n this.spec = _extends({\n strip: false,\n strict: false,\n abortEarly: true,\n recursive: true,\n nullable: false,\n presence: 'optional'\n }, options == null ? void 0 : options.spec);\n } // TODO: remove\n\n\n get _type() {\n return this.type;\n }\n\n _typeCheck(_value) {\n return true;\n }\n\n clone(spec) {\n if (this._mutate) {\n if (spec) Object.assign(this.spec, spec);\n return this;\n } // if the nested value is a schema we can skip cloning, since\n // they are already immutable\n\n\n const next = Object.create(Object.getPrototypeOf(this)); // @ts-expect-error this is readonly\n\n next.type = this.type;\n next._typeError = this._typeError;\n next._whitelistError = this._whitelistError;\n next._blacklistError = this._blacklistError;\n next._whitelist = this._whitelist.clone();\n next._blacklist = this._blacklist.clone();\n next.exclusiveTests = _extends({}, this.exclusiveTests); // @ts-expect-error this is readonly\n\n next.deps = [...this.deps];\n next.conditions = [...this.conditions];\n next.tests = [...this.tests];\n next.transforms = [...this.transforms];\n next.spec = cloneDeep(_extends({}, this.spec, spec));\n return next;\n }\n\n label(label) {\n let next = this.clone();\n next.spec.label = label;\n return next;\n }\n\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n } // withContext(): BaseSchema<\n // TCast,\n // TContext,\n // TOutput\n // > {\n // return this as any;\n // }\n\n\n withMutation(fn) {\n let before = this._mutate;\n this._mutate = true;\n let result = fn(this);\n this._mutate = before;\n return result;\n }\n\n concat(schema) {\n if (!schema || schema === this) return this;\n if (schema.type !== this.type && this.type !== 'mixed') throw new TypeError(`You cannot \\`concat()\\` schema's of different types: ${this.type} and ${schema.type}`);\n let base = this;\n let combined = schema.clone();\n\n const mergedSpec = _extends({}, base.spec, combined.spec); // if (combined.spec.nullable === UNSET)\n // mergedSpec.nullable = base.spec.nullable;\n // if (combined.spec.presence === UNSET)\n // mergedSpec.presence = base.spec.presence;\n\n\n combined.spec = mergedSpec;\n combined._typeError || (combined._typeError = base._typeError);\n combined._whitelistError || (combined._whitelistError = base._whitelistError);\n combined._blacklistError || (combined._blacklistError = base._blacklistError); // manually merge the blacklist/whitelist (the other `schema` takes\n // precedence in case of conflicts)\n\n combined._whitelist = base._whitelist.merge(schema._whitelist, schema._blacklist);\n combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist); // start with the current tests\n\n combined.tests = base.tests;\n combined.exclusiveTests = base.exclusiveTests; // manually add the new tests to ensure\n // the deduping logic is consistent\n\n combined.withMutation(next => {\n schema.tests.forEach(fn => {\n next.test(fn.OPTIONS);\n });\n });\n combined.transforms = [...base.transforms, ...combined.transforms];\n return combined;\n }\n\n isType(v) {\n if (this.spec.nullable && v === null) return true;\n return this._typeCheck(v);\n }\n\n resolve(options) {\n let schema = this;\n\n if (schema.conditions.length) {\n let conditions = schema.conditions;\n schema = schema.clone();\n schema.conditions = [];\n schema = conditions.reduce((schema, condition) => condition.resolve(schema, options), schema);\n schema = schema.resolve(options);\n }\n\n return schema;\n }\n /**\n *\n * @param {*} value\n * @param {Object} options\n * @param {*=} options.parent\n * @param {*=} options.context\n */\n\n\n cast(value, options = {}) {\n let resolvedSchema = this.resolve(_extends({\n value\n }, options));\n\n let result = resolvedSchema._cast(value, options);\n\n if (value !== undefined && options.assert !== false && resolvedSchema.isType(result) !== true) {\n let formattedValue = printValue(value);\n let formattedResult = printValue(result);\n throw new TypeError(`The value of ${options.path || 'field'} could not be cast to a value ` + `that satisfies the schema type: \"${resolvedSchema._type}\". \\n\\n` + `attempted value: ${formattedValue} \\n` + (formattedResult !== formattedValue ? `result of cast: ${formattedResult}` : ''));\n }\n\n return result;\n }\n\n _cast(rawValue, _options) {\n let value = rawValue === undefined ? rawValue : this.transforms.reduce((value, fn) => fn.call(this, value, rawValue, this), rawValue);\n\n if (value === undefined) {\n value = this.getDefault();\n }\n\n return value;\n }\n\n _validate(_value, options = {}, cb) {\n let {\n sync,\n path,\n from = [],\n originalValue = _value,\n strict = this.spec.strict,\n abortEarly = this.spec.abortEarly\n } = options;\n let value = _value;\n\n if (!strict) {\n // this._validating = true;\n value = this._cast(value, _extends({\n assert: false\n }, options)); // this._validating = false;\n } // value is cast, we can check if it meets type requirements\n\n\n let args = {\n value,\n path,\n options,\n originalValue,\n schema: this,\n label: this.spec.label,\n sync,\n from\n };\n let initialTests = [];\n if (this._typeError) initialTests.push(this._typeError);\n let finalTests = [];\n if (this._whitelistError) finalTests.push(this._whitelistError);\n if (this._blacklistError) finalTests.push(this._blacklistError);\n runTests({\n args,\n value,\n path,\n sync,\n tests: initialTests,\n endEarly: abortEarly\n }, err => {\n if (err) return void cb(err, value);\n runTests({\n tests: this.tests.concat(finalTests),\n args,\n path,\n sync,\n value,\n endEarly: abortEarly\n }, cb);\n });\n }\n\n validate(value, options, maybeCb) {\n let schema = this.resolve(_extends({}, options, {\n value\n })); // callback case is for nested validations\n\n return typeof maybeCb === 'function' ? schema._validate(value, options, maybeCb) : new Promise((resolve, reject) => schema._validate(value, options, (err, value) => {\n if (err) reject(err);else resolve(value);\n }));\n }\n\n validateSync(value, options) {\n let schema = this.resolve(_extends({}, options, {\n value\n }));\n let result;\n\n schema._validate(value, _extends({}, options, {\n sync: true\n }), (err, value) => {\n if (err) throw err;\n result = value;\n });\n\n return result;\n }\n\n isValid(value, options) {\n return this.validate(value, options).then(() => true, err => {\n if (ValidationError.isError(err)) return false;\n throw err;\n });\n }\n\n isValidSync(value, options) {\n try {\n this.validateSync(value, options);\n return true;\n } catch (err) {\n if (ValidationError.isError(err)) return false;\n throw err;\n }\n }\n\n _getDefault() {\n let defaultValue = this.spec.default;\n\n if (defaultValue == null) {\n return defaultValue;\n }\n\n return typeof defaultValue === 'function' ? defaultValue.call(this) : cloneDeep(defaultValue);\n }\n\n getDefault(options) {\n let schema = this.resolve(options || {});\n return schema._getDefault();\n }\n\n default(def) {\n if (arguments.length === 0) {\n return this._getDefault();\n }\n\n let next = this.clone({\n default: def\n });\n return next;\n }\n\n strict(isStrict = true) {\n let next = this.clone();\n next.spec.strict = isStrict;\n return next;\n }\n\n _isPresent(value) {\n return value != null;\n }\n\n defined(message = locale.defined) {\n return this.test({\n message,\n name: 'defined',\n exclusive: true,\n\n test(value) {\n return value !== undefined;\n }\n\n });\n }\n\n required(message = locale.required) {\n return this.clone({\n presence: 'required'\n }).withMutation(s => s.test({\n message,\n name: 'required',\n exclusive: true,\n\n test(value) {\n return this.schema._isPresent(value);\n }\n\n }));\n }\n\n notRequired() {\n let next = this.clone({\n presence: 'optional'\n });\n next.tests = next.tests.filter(test => test.OPTIONS.name !== 'required');\n return next;\n }\n\n nullable(isNullable = true) {\n let next = this.clone({\n nullable: isNullable !== false\n });\n return next;\n }\n\n transform(fn) {\n let next = this.clone();\n next.transforms.push(fn);\n return next;\n }\n /**\n * Adds a test function to the schema's queue of tests.\n * tests can be exclusive or non-exclusive.\n *\n * - exclusive tests, will replace any existing tests of the same name.\n * - non-exclusive: can be stacked\n *\n * If a non-exclusive test is added to a schema with an exclusive test of the same name\n * the exclusive test is removed and further tests of the same name will be stacked.\n *\n * If an exclusive test is added to a schema with non-exclusive tests of the same name\n * the previous tests are removed and further tests of the same name will replace each other.\n */\n\n\n test(...args) {\n let opts;\n\n if (args.length === 1) {\n if (typeof args[0] === 'function') {\n opts = {\n test: args[0]\n };\n } else {\n opts = args[0];\n }\n } else if (args.length === 2) {\n opts = {\n name: args[0],\n test: args[1]\n };\n } else {\n opts = {\n name: args[0],\n message: args[1],\n test: args[2]\n };\n }\n\n if (opts.message === undefined) opts.message = locale.default;\n if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');\n let next = this.clone();\n let validate = createValidation(opts);\n let isExclusive = opts.exclusive || opts.name && next.exclusiveTests[opts.name] === true;\n\n if (opts.exclusive) {\n if (!opts.name) throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');\n }\n\n if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;\n next.tests = next.tests.filter(fn => {\n if (fn.OPTIONS.name === opts.name) {\n if (isExclusive) return false;\n if (fn.OPTIONS.test === validate.OPTIONS.test) return false;\n }\n\n return true;\n });\n next.tests.push(validate);\n return next;\n }\n\n when(keys, options) {\n if (!Array.isArray(keys) && typeof keys !== 'string') {\n options = keys;\n keys = '.';\n }\n\n let next = this.clone();\n let deps = toArray(keys).map(key => new Ref(key));\n deps.forEach(dep => {\n // @ts-ignore\n if (dep.isSibling) next.deps.push(dep.key);\n });\n next.conditions.push(new Condition(deps, options));\n return next;\n }\n\n typeError(message) {\n let next = this.clone();\n next._typeError = createValidation({\n message,\n name: 'typeError',\n\n test(value) {\n if (value !== undefined && !this.schema.isType(value)) return this.createError({\n params: {\n type: this.schema._type\n }\n });\n return true;\n }\n\n });\n return next;\n }\n\n oneOf(enums, message = locale.oneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._whitelist.add(val);\n\n next._blacklist.delete(val);\n });\n next._whitelistError = createValidation({\n message,\n name: 'oneOf',\n\n test(value) {\n if (value === undefined) return true;\n let valids = this.schema._whitelist;\n let resolved = valids.resolveAll(this.resolve);\n return resolved.includes(value) ? true : this.createError({\n params: {\n values: valids.toArray().join(', '),\n resolved\n }\n });\n }\n\n });\n return next;\n }\n\n notOneOf(enums, message = locale.notOneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._blacklist.add(val);\n\n next._whitelist.delete(val);\n });\n next._blacklistError = createValidation({\n message,\n name: 'notOneOf',\n\n test(value) {\n let invalids = this.schema._blacklist;\n let resolved = invalids.resolveAll(this.resolve);\n if (resolved.includes(value)) return this.createError({\n params: {\n values: invalids.toArray().join(', '),\n resolved\n }\n });\n return true;\n }\n\n });\n return next;\n }\n\n strip(strip = true) {\n let next = this.clone();\n next.spec.strip = strip;\n return next;\n }\n\n describe() {\n const next = this.clone();\n const {\n label,\n meta\n } = next.spec;\n const description = {\n meta,\n label,\n type: next.type,\n oneOf: next._whitelist.describe(),\n notOneOf: next._blacklist.describe(),\n tests: next.tests.map(fn => ({\n name: fn.OPTIONS.name,\n params: fn.OPTIONS.params\n })).filter((n, idx, list) => list.findIndex(c => c.name === n.name) === idx)\n };\n return description;\n }\n\n} // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n// @ts-expect-error\nBaseSchema.prototype.__isYupSchema__ = true;\n\nfor (const method of ['validate', 'validateSync']) BaseSchema.prototype[`${method}At`] = function (path, value, options = {}) {\n const {\n parent,\n parentPath,\n schema\n } = getIn(this, path, value, options.context);\n return schema[method](parent && parent[parentPath], _extends({}, options, {\n parent,\n path\n }));\n};\n\nfor (const alias of ['equals', 'is']) BaseSchema.prototype[alias] = BaseSchema.prototype.oneOf;\n\nfor (const alias of ['not', 'nope']) BaseSchema.prototype[alias] = BaseSchema.prototype.notOneOf;\n\nBaseSchema.prototype.optional = BaseSchema.prototype.notRequired;","import BaseSchema from './schema';\nconst Mixed = BaseSchema;\nexport default Mixed;\nexport function create() {\n return new Mixed();\n} // XXX: this is using the Base schema so that `addMethod(mixed)` works as a base class\n\ncreate.prototype = Mixed.prototype;","const isAbsent = value => value == null;\n\nexport default isAbsent;","import BaseSchema from './schema';\nimport { boolean as locale } from './locale';\nimport isAbsent from './util/isAbsent';\nexport function create() {\n return new BooleanSchema();\n}\nexport default class BooleanSchema extends BaseSchema {\n constructor() {\n super({\n type: 'boolean'\n });\n this.withMutation(() => {\n this.transform(function (value) {\n if (!this.isType(value)) {\n if (/^(true|1)$/i.test(String(value))) return true;\n if (/^(false|0)$/i.test(String(value))) return false;\n }\n\n return value;\n });\n });\n }\n\n _typeCheck(v) {\n if (v instanceof Boolean) v = v.valueOf();\n return typeof v === 'boolean';\n }\n\n isTrue(message = locale.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'true'\n },\n\n test(value) {\n return isAbsent(value) || value === true;\n }\n\n });\n }\n\n isFalse(message = locale.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'false'\n },\n\n test(value) {\n return isAbsent(value) || value === false;\n }\n\n });\n }\n\n}\ncreate.prototype = BooleanSchema.prototype;","import { string as locale } from './locale';\nimport isAbsent from './util/isAbsent';\nimport BaseSchema from './schema'; // eslint-disable-next-line\n\nlet rEmail = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i; // eslint-disable-next-line\n\nlet rUrl = /^((https?|ftp):)?\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i; // eslint-disable-next-line\n\nlet rUUID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\n\nlet isTrimmed = value => isAbsent(value) || value === value.trim();\n\nlet objStringTag = {}.toString();\nexport function create() {\n return new StringSchema();\n}\nexport default class StringSchema extends BaseSchema {\n constructor() {\n super({\n type: 'string'\n });\n this.withMutation(() => {\n this.transform(function (value) {\n if (this.isType(value)) return value;\n if (Array.isArray(value)) return value;\n const strValue = value != null && value.toString ? value.toString() : value;\n if (strValue === objStringTag) return value;\n return strValue;\n });\n });\n }\n\n _typeCheck(value) {\n if (value instanceof String) value = value.valueOf();\n return typeof value === 'string';\n }\n\n _isPresent(value) {\n return super._isPresent(value) && !!value.length;\n }\n\n length(length, message = locale.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n\n test(value) {\n return isAbsent(value) || value.length === this.resolve(length);\n }\n\n });\n }\n\n min(min, message = locale.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n\n test(value) {\n return isAbsent(value) || value.length >= this.resolve(min);\n }\n\n });\n }\n\n max(max, message = locale.max) {\n return this.test({\n name: 'max',\n exclusive: true,\n message,\n params: {\n max\n },\n\n test(value) {\n return isAbsent(value) || value.length <= this.resolve(max);\n }\n\n });\n }\n\n matches(regex, options) {\n let excludeEmptyString = false;\n let message;\n let name;\n\n if (options) {\n if (typeof options === 'object') {\n ({\n excludeEmptyString = false,\n message,\n name\n } = options);\n } else {\n message = options;\n }\n }\n\n return this.test({\n name: name || 'matches',\n message: message || locale.matches,\n params: {\n regex\n },\n test: value => isAbsent(value) || value === '' && excludeEmptyString || value.search(regex) !== -1\n });\n }\n\n email(message = locale.email) {\n return this.matches(rEmail, {\n name: 'email',\n message,\n excludeEmptyString: true\n });\n }\n\n url(message = locale.url) {\n return this.matches(rUrl, {\n name: 'url',\n message,\n excludeEmptyString: true\n });\n }\n\n uuid(message = locale.uuid) {\n return this.matches(rUUID, {\n name: 'uuid',\n message,\n excludeEmptyString: false\n });\n } //-- transforms --\n\n\n ensure() {\n return this.default('').transform(val => val === null ? '' : val);\n }\n\n trim(message = locale.trim) {\n return this.transform(val => val != null ? val.trim() : val).test({\n message,\n name: 'trim',\n test: isTrimmed\n });\n }\n\n lowercase(message = locale.lowercase) {\n return this.transform(value => !isAbsent(value) ? value.toLowerCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n test: value => isAbsent(value) || value === value.toLowerCase()\n });\n }\n\n uppercase(message = locale.uppercase) {\n return this.transform(value => !isAbsent(value) ? value.toUpperCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n test: value => isAbsent(value) || value === value.toUpperCase()\n });\n }\n\n}\ncreate.prototype = StringSchema.prototype; //\n// String Interfaces\n//","import { number as locale } from './locale';\nimport isAbsent from './util/isAbsent';\nimport BaseSchema from './schema';\n\nlet isNaN = value => value != +value;\n\nexport function create() {\n return new NumberSchema();\n}\nexport default class NumberSchema extends BaseSchema {\n constructor() {\n super({\n type: 'number'\n });\n this.withMutation(() => {\n this.transform(function (value) {\n let parsed = value;\n\n if (typeof parsed === 'string') {\n parsed = parsed.replace(/\\s/g, '');\n if (parsed === '') return NaN; // don't use parseFloat to avoid positives on alpha-numeric strings\n\n parsed = +parsed;\n }\n\n if (this.isType(parsed)) return parsed;\n return parseFloat(parsed);\n });\n });\n }\n\n _typeCheck(value) {\n if (value instanceof Number) value = value.valueOf();\n return typeof value === 'number' && !isNaN(value);\n }\n\n min(min, message = locale.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n\n test(value) {\n return isAbsent(value) || value >= this.resolve(min);\n }\n\n });\n }\n\n max(max, message = locale.max) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n\n test(value) {\n return isAbsent(value) || value <= this.resolve(max);\n }\n\n });\n }\n\n lessThan(less, message = locale.lessThan) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n less\n },\n\n test(value) {\n return isAbsent(value) || value < this.resolve(less);\n }\n\n });\n }\n\n moreThan(more, message = locale.moreThan) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n more\n },\n\n test(value) {\n return isAbsent(value) || value > this.resolve(more);\n }\n\n });\n }\n\n positive(msg = locale.positive) {\n return this.moreThan(0, msg);\n }\n\n negative(msg = locale.negative) {\n return this.lessThan(0, msg);\n }\n\n integer(message = locale.integer) {\n return this.test({\n name: 'integer',\n message,\n test: val => isAbsent(val) || Number.isInteger(val)\n });\n }\n\n truncate() {\n return this.transform(value => !isAbsent(value) ? value | 0 : value);\n }\n\n round(method) {\n var _method;\n\n let avail = ['ceil', 'floor', 'round', 'trunc'];\n method = ((_method = method) == null ? void 0 : _method.toLowerCase()) || 'round'; // this exists for symemtry with the new Math.trunc\n\n if (method === 'trunc') return this.truncate();\n if (avail.indexOf(method.toLowerCase()) === -1) throw new TypeError('Only valid options for round() are: ' + avail.join(', '));\n return this.transform(value => !isAbsent(value) ? Math[method](value) : value);\n }\n\n}\ncreate.prototype = NumberSchema.prototype; //\n// Number Interfaces\n//","/* eslint-disable */\n\n/**\n *\n * Date.parse with progressive enhancement for ISO 8601 \n * NON-CONFORMANT EDITION.\n * © 2011 Colin Snover \n * Released under MIT license.\n */\n// 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm\nvar isoReg = /^(\\d{4}|[+\\-]\\d{6})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:[ T]?(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,\\.](\\d{1,}))?)?(?:(Z)|([+\\-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\nexport default function parseIsoDate(date) {\n var numericKeys = [1, 4, 5, 6, 7, 10, 11],\n minutesOffset = 0,\n timestamp,\n struct;\n\n if (struct = isoReg.exec(date)) {\n // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC\n for (var i = 0, k; k = numericKeys[i]; ++i) struct[k] = +struct[k] || 0; // allow undefined days and months\n\n\n struct[2] = (+struct[2] || 1) - 1;\n struct[3] = +struct[3] || 1; // allow arbitrary sub-second precision beyond milliseconds\n\n struct[7] = struct[7] ? String(struct[7]).substr(0, 3) : 0; // timestamps without timezone identifiers should be considered local time\n\n if ((struct[8] === undefined || struct[8] === '') && (struct[9] === undefined || struct[9] === '')) timestamp = +new Date(struct[1], struct[2], struct[3], struct[4], struct[5], struct[6], struct[7]);else {\n if (struct[8] !== 'Z' && struct[9] !== undefined) {\n minutesOffset = struct[10] * 60 + struct[11];\n if (struct[9] === '+') minutesOffset = 0 - minutesOffset;\n }\n\n timestamp = Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]);\n }\n } else timestamp = Date.parse ? Date.parse(date) : NaN;\n\n return timestamp;\n}","// @ts-ignore\nimport isoParse from './util/isodate';\nimport { date as locale } from './locale';\nimport isAbsent from './util/isAbsent';\nimport Ref from './Reference';\nimport BaseSchema from './schema';\nlet invalidDate = new Date('');\n\nlet isDate = obj => Object.prototype.toString.call(obj) === '[object Date]';\n\nexport function create() {\n return new DateSchema();\n}\nexport default class DateSchema extends BaseSchema {\n constructor() {\n super({\n type: 'date'\n });\n this.withMutation(() => {\n this.transform(function (value) {\n if (this.isType(value)) return value;\n value = isoParse(value); // 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.\n\n return !isNaN(value) ? new Date(value) : invalidDate;\n });\n });\n }\n\n _typeCheck(v) {\n return isDate(v) && !isNaN(v.getTime());\n }\n\n prepareParam(ref, name) {\n let param;\n\n if (!Ref.isRef(ref)) {\n let cast = this.cast(ref);\n if (!this._typeCheck(cast)) throw new TypeError(`\\`${name}\\` must be a Date or a value that can be \\`cast()\\` to a Date`);\n param = cast;\n } else {\n param = ref;\n }\n\n return param;\n }\n\n min(min, message = locale.min) {\n let limit = this.prepareParam(min, 'min');\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n\n test(value) {\n return isAbsent(value) || value >= this.resolve(limit);\n }\n\n });\n }\n\n max(max, message = locale.max) {\n let limit = this.prepareParam(max, 'max');\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n\n test(value) {\n return isAbsent(value) || value <= this.resolve(limit);\n }\n\n });\n }\n\n}\nDateSchema.INVALID_DATE = invalidDate;\ncreate.prototype = DateSchema.prototype;\ncreate.INVALID_DATE = invalidDate;","import has from 'lodash/has'; // @ts-expect-error\n\nimport toposort from 'toposort';\nimport { split } from 'property-expr';\nimport Ref from '../Reference';\nimport isSchema from './isSchema';\nexport default function sortFields(fields, excludedEdges = []) {\n let edges = [];\n let nodes = new Set();\n let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));\n\n function addNode(depPath, key) {\n let node = split(depPath)[0];\n nodes.add(node);\n if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);\n }\n\n for (const key in fields) if (has(fields, key)) {\n let value = fields[key];\n nodes.add(key);\n if (Ref.isRef(value) && value.isSibling) addNode(value.path, key);else if (isSchema(value) && 'deps' in value) value.deps.forEach(path => addNode(path, key));\n }\n\n return toposort.array(Array.from(nodes), edges).reverse();\n}","function findIndex(arr, err) {\n let idx = Infinity;\n arr.some((key, ii) => {\n var _err$path;\n\n if (((_err$path = err.path) == null ? void 0 : _err$path.indexOf(key)) !== -1) {\n idx = ii;\n return true;\n }\n });\n return idx;\n}\n\nexport default function sortByKeyOrder(keys) {\n return (a, b) => {\n return findIndex(keys, a) - findIndex(keys, b);\n };\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport has from 'lodash/has';\nimport snakeCase from 'lodash/snakeCase';\nimport camelCase from 'lodash/camelCase';\nimport mapKeys from 'lodash/mapKeys';\nimport mapValues from 'lodash/mapValues';\nimport { getter } from 'property-expr';\nimport { object as locale } from './locale';\nimport sortFields from './util/sortFields';\nimport sortByKeyOrder from './util/sortByKeyOrder';\nimport runTests from './util/runTests';\nimport ValidationError from './ValidationError';\nimport BaseSchema from './schema';\n\nlet isObject = obj => Object.prototype.toString.call(obj) === '[object Object]';\n\nfunction unknown(ctx, value) {\n let known = Object.keys(ctx.fields);\n return Object.keys(value).filter(key => known.indexOf(key) === -1);\n}\n\nconst defaultSort = sortByKeyOrder([]);\nexport default class ObjectSchema extends BaseSchema {\n constructor(spec) {\n super({\n type: 'object'\n });\n this.fields = Object.create(null);\n this._sortErrors = defaultSort;\n this._nodes = [];\n this._excludedEdges = [];\n this.withMutation(() => {\n this.transform(function coerce(value) {\n if (typeof value === 'string') {\n try {\n value = JSON.parse(value);\n } catch (err) {\n value = null;\n }\n }\n\n if (this.isType(value)) return value;\n return null;\n });\n\n if (spec) {\n this.shape(spec);\n }\n });\n }\n\n _typeCheck(value) {\n return isObject(value) || typeof value === 'function';\n }\n\n _cast(_value, options = {}) {\n var _options$stripUnknown;\n\n let value = super._cast(_value, options); //should ignore nulls here\n\n\n if (value === undefined) return this.getDefault();\n if (!this._typeCheck(value)) return value;\n let fields = this.fields;\n let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;\n\n let props = this._nodes.concat(Object.keys(value).filter(v => this._nodes.indexOf(v) === -1));\n\n let intermediateValue = {}; // is filled during the transform below\n\n let innerOptions = _extends({}, options, {\n parent: intermediateValue,\n __validating: options.__validating || false\n });\n\n let isChanged = false;\n\n for (const prop of props) {\n let field = fields[prop];\n let exists = has(value, prop);\n\n if (field) {\n let fieldValue;\n let inputValue = value[prop]; // safe to mutate since this is fired in sequence\n\n innerOptions.path = (options.path ? `${options.path}.` : '') + prop; // innerOptions.value = value[prop];\n\n field = field.resolve({\n value: inputValue,\n context: options.context,\n parent: intermediateValue\n });\n let fieldSpec = 'spec' in field ? field.spec : undefined;\n let strict = fieldSpec == null ? void 0 : fieldSpec.strict;\n\n if (fieldSpec == null ? void 0 : fieldSpec.strip) {\n isChanged = isChanged || prop in value;\n continue;\n }\n\n fieldValue = !options.__validating || !strict ? // TODO: use _cast, this is double resolving\n field.cast(value[prop], innerOptions) : value[prop];\n\n if (fieldValue !== undefined) {\n intermediateValue[prop] = fieldValue;\n }\n } else if (exists && !strip) {\n intermediateValue[prop] = value[prop];\n }\n\n if (intermediateValue[prop] !== value[prop]) {\n isChanged = true;\n }\n }\n\n return isChanged ? intermediateValue : value;\n }\n\n _validate(_value, opts = {}, callback) {\n let errors = [];\n let {\n sync,\n from = [],\n originalValue = _value,\n abortEarly = this.spec.abortEarly,\n recursive = this.spec.recursive\n } = opts;\n from = [{\n schema: this,\n value: originalValue\n }, ...from]; // this flag is needed for handling `strict` correctly in the context of\n // validation vs just casting. e.g strict() on a field is only used when validating\n\n opts.__validating = true;\n opts.originalValue = originalValue;\n opts.from = from;\n\n super._validate(_value, opts, (err, value) => {\n if (err) {\n if (!ValidationError.isError(err) || abortEarly) {\n return void callback(err, value);\n }\n\n errors.push(err);\n }\n\n if (!recursive || !isObject(value)) {\n callback(errors[0] || null, value);\n return;\n }\n\n originalValue = originalValue || value;\n\n let tests = this._nodes.map(key => (_, cb) => {\n let path = key.indexOf('.') === -1 ? (opts.path ? `${opts.path}.` : '') + key : `${opts.path || ''}[\"${key}\"]`;\n let field = this.fields[key];\n\n if (field && 'validate' in field) {\n field.validate(value[key], _extends({}, opts, {\n // @ts-ignore\n path,\n from,\n // inner fields are always strict:\n // 1. this isn't strict so the casting will also have cast inner values\n // 2. this is strict in which case the nested values weren't cast either\n strict: true,\n parent: value,\n originalValue: originalValue[key]\n }), cb);\n return;\n }\n\n cb(null);\n });\n\n runTests({\n sync,\n tests,\n value,\n errors,\n endEarly: abortEarly,\n sort: this._sortErrors,\n path: opts.path\n }, callback);\n });\n }\n\n clone(spec) {\n const next = super.clone(spec);\n next.fields = _extends({}, this.fields);\n next._nodes = this._nodes;\n next._excludedEdges = this._excludedEdges;\n next._sortErrors = this._sortErrors;\n return next;\n }\n\n concat(schema) {\n let next = super.concat(schema);\n let nextFields = next.fields;\n\n for (let [field, schemaOrRef] of Object.entries(this.fields)) {\n const target = nextFields[field];\n\n if (target === undefined) {\n nextFields[field] = schemaOrRef;\n } else if (target instanceof BaseSchema && schemaOrRef instanceof BaseSchema) {\n nextFields[field] = schemaOrRef.concat(target);\n }\n }\n\n return next.withMutation(() => next.shape(nextFields, this._excludedEdges));\n }\n\n getDefaultFromShape() {\n let dft = {};\n\n this._nodes.forEach(key => {\n const field = this.fields[key];\n dft[key] = 'default' in field ? field.getDefault() : undefined;\n });\n\n return dft;\n }\n\n _getDefault() {\n if ('default' in this.spec) {\n return super._getDefault();\n } // if there is no default set invent one\n\n\n if (!this._nodes.length) {\n return undefined;\n }\n\n return this.getDefaultFromShape();\n }\n\n shape(additions, excludes = []) {\n let next = this.clone();\n let fields = Object.assign(next.fields, additions);\n next.fields = fields;\n next._sortErrors = sortByKeyOrder(Object.keys(fields));\n\n if (excludes.length) {\n // this is a convenience for when users only supply a single pair\n if (!Array.isArray(excludes[0])) excludes = [excludes];\n next._excludedEdges = [...next._excludedEdges, ...excludes];\n }\n\n next._nodes = sortFields(fields, next._excludedEdges);\n return next;\n }\n\n pick(keys) {\n const picked = {};\n\n for (const key of keys) {\n if (this.fields[key]) picked[key] = this.fields[key];\n }\n\n return this.clone().withMutation(next => {\n next.fields = {};\n return next.shape(picked);\n });\n }\n\n omit(keys) {\n const next = this.clone();\n const fields = next.fields;\n next.fields = {};\n\n for (const key of keys) {\n delete fields[key];\n }\n\n return next.withMutation(() => next.shape(fields));\n }\n\n from(from, to, alias) {\n let fromGetter = getter(from, true);\n return this.transform(obj => {\n if (obj == null) return obj;\n let newObj = obj;\n\n if (has(obj, from)) {\n newObj = _extends({}, obj);\n if (!alias) delete newObj[from];\n newObj[to] = fromGetter(obj);\n }\n\n return newObj;\n });\n }\n\n noUnknown(noAllow = true, message = locale.noUnknown) {\n if (typeof noAllow === 'string') {\n message = noAllow;\n noAllow = true;\n }\n\n let next = this.test({\n name: 'noUnknown',\n exclusive: true,\n message: message,\n\n test(value) {\n if (value == null) return true;\n const unknownKeys = unknown(this.schema, value);\n return !noAllow || unknownKeys.length === 0 || this.createError({\n params: {\n unknown: unknownKeys.join(', ')\n }\n });\n }\n\n });\n next.spec.noUnknown = noAllow;\n return next;\n }\n\n unknown(allow = true, message = locale.noUnknown) {\n return this.noUnknown(!allow, message);\n }\n\n transformKeys(fn) {\n return this.transform(obj => obj && mapKeys(obj, (_, key) => fn(key)));\n }\n\n camelCase() {\n return this.transformKeys(camelCase);\n }\n\n snakeCase() {\n return this.transformKeys(snakeCase);\n }\n\n constantCase() {\n return this.transformKeys(key => snakeCase(key).toUpperCase());\n }\n\n describe() {\n let base = super.describe();\n base.fields = mapValues(this.fields, value => value.describe());\n return base;\n }\n\n}\nexport function create(spec) {\n return new ObjectSchema(spec);\n}\ncreate.prototype = ObjectSchema.prototype;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport isAbsent from './util/isAbsent';\nimport isSchema from './util/isSchema';\nimport printValue from './util/printValue';\nimport { array as locale } from './locale';\nimport runTests from './util/runTests';\nimport ValidationError from './ValidationError';\nimport BaseSchema from './schema';\nexport function create(type) {\n return new ArraySchema(type);\n}\nexport default class ArraySchema extends BaseSchema {\n constructor(type) {\n super({\n type: 'array'\n }); // `undefined` specifically means uninitialized, as opposed to\n // \"no subtype\"\n\n this.innerType = void 0;\n this.innerType = type;\n this.withMutation(() => {\n this.transform(function (values) {\n if (typeof values === 'string') try {\n values = JSON.parse(values);\n } catch (err) {\n values = null;\n }\n return this.isType(values) ? values : null;\n });\n });\n }\n\n _typeCheck(v) {\n return Array.isArray(v);\n }\n\n get _subType() {\n return this.innerType;\n }\n\n _cast(_value, _opts) {\n const value = super._cast(_value, _opts); //should ignore nulls here\n\n\n if (!this._typeCheck(value) || !this.innerType) return value;\n let isChanged = false;\n const castArray = value.map((v, idx) => {\n const castElement = this.innerType.cast(v, _extends({}, _opts, {\n path: `${_opts.path || ''}[${idx}]`\n }));\n\n if (castElement !== v) {\n isChanged = true;\n }\n\n return castElement;\n });\n return isChanged ? castArray : value;\n }\n\n _validate(_value, options = {}, callback) {\n var _options$abortEarly, _options$recursive;\n\n let errors = [];\n let sync = options.sync;\n let path = options.path;\n let innerType = this.innerType;\n let endEarly = (_options$abortEarly = options.abortEarly) != null ? _options$abortEarly : this.spec.abortEarly;\n let recursive = (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive;\n let originalValue = options.originalValue != null ? options.originalValue : _value;\n\n super._validate(_value, options, (err, value) => {\n if (err) {\n if (!ValidationError.isError(err) || endEarly) {\n return void callback(err, value);\n }\n\n errors.push(err);\n }\n\n if (!recursive || !innerType || !this._typeCheck(value)) {\n callback(errors[0] || null, value);\n return;\n }\n\n originalValue = originalValue || value; // #950 Ensure that sparse array empty slots are validated\n\n let tests = new Array(value.length);\n\n for (let idx = 0; idx < value.length; idx++) {\n let item = value[idx];\n let path = `${options.path || ''}[${idx}]`; // object._validate note for isStrict explanation\n\n let innerOptions = _extends({}, options, {\n path,\n strict: true,\n parent: value,\n index: idx,\n originalValue: originalValue[idx]\n });\n\n tests[idx] = (_, cb) => innerType.validate(item, innerOptions, cb);\n }\n\n runTests({\n sync,\n path,\n value,\n errors,\n endEarly,\n tests\n }, callback);\n });\n }\n\n clone(spec) {\n const next = super.clone(spec);\n next.innerType = this.innerType;\n return next;\n }\n\n concat(schema) {\n let next = super.concat(schema);\n next.innerType = this.innerType;\n if (schema.innerType) next.innerType = next.innerType ? // @ts-expect-error Lazy doesn't have concat()\n next.innerType.concat(schema.innerType) : schema.innerType;\n return next;\n }\n\n of(schema) {\n // FIXME: this should return a new instance of array without the default to be\n let next = this.clone();\n if (!isSchema(schema)) throw new TypeError('`array.of()` sub-schema must be a valid yup schema not: ' + printValue(schema)); // FIXME(ts):\n\n next.innerType = schema;\n return next;\n }\n\n length(length, message = locale.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n\n test(value) {\n return isAbsent(value) || value.length === this.resolve(length);\n }\n\n });\n }\n\n min(min, message) {\n message = message || locale.min;\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n\n // FIXME(ts): Array\n test(value) {\n return isAbsent(value) || value.length >= this.resolve(min);\n }\n\n });\n }\n\n max(max, message) {\n message = message || locale.max;\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n\n test(value) {\n return isAbsent(value) || value.length <= this.resolve(max);\n }\n\n });\n }\n\n ensure() {\n return this.default(() => []).transform((val, original) => {\n // We don't want to return `null` for nullable schema\n if (this._typeCheck(val)) return val;\n return original == null ? [] : [].concat(original);\n });\n }\n\n compact(rejector) {\n let reject = !rejector ? v => !!v : (v, i, a) => !rejector(v, i, a);\n return this.transform(values => values != null ? values.filter(reject) : values);\n }\n\n describe() {\n let base = super.describe();\n if (this.innerType) base.innerType = this.innerType.describe();\n return base;\n }\n\n nullable(isNullable = true) {\n return super.nullable(isNullable);\n }\n\n defined() {\n return super.defined();\n }\n\n required(msg) {\n return super.required(msg);\n }\n\n}\ncreate.prototype = ArraySchema.prototype; //\n// Interfaces\n//","import isSchema from './util/isSchema';\nexport function create(builder) {\n return new Lazy(builder);\n}\n\nclass Lazy {\n constructor(builder) {\n this.type = 'lazy';\n this.__isYupSchema__ = true;\n this.__inputType = void 0;\n this.__outputType = void 0;\n\n this._resolve = (value, options = {}) => {\n let schema = this.builder(value, options);\n if (!isSchema(schema)) throw new TypeError('lazy() functions must return a valid schema');\n return schema.resolve(options);\n };\n\n this.builder = builder;\n }\n\n resolve(options) {\n return this._resolve(options.value, options);\n }\n\n cast(value, options) {\n return this._resolve(value, options).cast(value, options);\n }\n\n validate(value, options, maybeCb) {\n // @ts-expect-error missing public callback on type\n return this._resolve(value, options).validate(value, options, maybeCb);\n }\n\n validateSync(value, options) {\n return this._resolve(value, options).validateSync(value, options);\n }\n\n validateAt(path, value, options) {\n return this._resolve(value, options).validateAt(path, value, options);\n }\n\n validateSyncAt(path, value, options) {\n return this._resolve(value, options).validateSyncAt(path, value, options);\n }\n\n describe() {\n return null;\n }\n\n isValid(value, options) {\n return this._resolve(value, options).isValid(value, options);\n }\n\n isValidSync(value, options) {\n return this._resolve(value, options).isValidSync(value, options);\n }\n\n}\n\nexport default Lazy;"],"names":["toString","errorToString","regExpToString","symbolToString","SYMBOL_REGEXP","printNumber","val","printSimpleValue","quoteStrings","typeOf","tag","printValue","value","result","key","mixed","path","type","originalValue","isCast","msg","string","number","date","boolean","object","array","isSchema","obj","Condition","refs","options","has","is","then","otherwise","check","values","args","schema","branch","base","ref","toArray","_extends","target","i","source","strReg","ValidationError","message","params","_","err","errorOrErrors","field","once","cb","fired","runTests","endEarly","tests","errors","sort","callback","count","nestedErrors","test","prefixes","create","Reference","prefix","getter","parent","context","_objectWithoutPropertiesLoose","excluded","sourceKeys","createValidation","config","validate","_ref","label","sync","rest","name","resolve","item","Ref","createError","overrides","nextParams","mapValues","error","ctx","validOrError","_ref2","trim","part","getIn","lastPart","lastPartDebug","forEach","_part","isBracket","isArray","idx","ReferenceSet","description","acc","e","next","newItems","removeItems","BaseSchema","locale","_value","spec","cloneDeep","fn","before","combined","mergedSpec","v","conditions","condition","resolvedSchema","formattedValue","formattedResult","rawValue","_options","from","strict","abortEarly","initialTests","finalTests","maybeCb","reject","defaultValue","def","isStrict","s","isNullable","opts","isExclusive","keys","deps","dep","enums","valids","resolved","invalids","strip","meta","n","list","c","method","parentPath","alias","Mixed","isAbsent","BooleanSchema","rEmail","rUrl","rUUID","isTrimmed","objStringTag","StringSchema","strValue","length","min","max","regex","excludeEmptyString","isNaN","NumberSchema","parsed","less","more","_method","avail","isoReg","parseIsoDate","numericKeys","minutesOffset","timestamp","struct","k","invalidDate","isDate","DateSchema","isoParse","param","cast","limit","sortFields","fields","excludedEdges","edges","nodes","excludes","b","addNode","depPath","node","split","toposort","findIndex","arr","ii","_err$path","sortByKeyOrder","a","isObject","unknown","known","defaultSort","ObjectSchema","_options$stripUnknown","props","intermediateValue","innerOptions","isChanged","prop","exists","fieldValue","inputValue","fieldSpec","recursive","nextFields","schemaOrRef","dft","additions","picked","to","fromGetter","newObj","noAllow","unknownKeys","allow","mapKeys","camelCase","snakeCase","ArraySchema","_opts","cast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