{"version":3,"file":"index-CC9BasiJ.js","sources":["../../../../../node_modules/.pnpm/valibot@1.0.0-beta.8_typescript@5.7.2/node_modules/valibot/dist/index.js"],"sourcesContent":["// src/storages/globalConfig/globalConfig.ts\nvar store;\nfunction setGlobalConfig(config2) {\n store = { ...store, ...config2 };\n}\nfunction getGlobalConfig(config2) {\n return {\n lang: config2?.lang ?? store?.lang,\n message: config2?.message,\n abortEarly: config2?.abortEarly ?? store?.abortEarly,\n abortPipeEarly: config2?.abortPipeEarly ?? store?.abortPipeEarly\n };\n}\nfunction deleteGlobalConfig() {\n store = void 0;\n}\n\n// src/storages/globalMessage/globalMessage.ts\nvar store2;\nfunction setGlobalMessage(message, lang) {\n if (!store2) store2 = /* @__PURE__ */ new Map();\n store2.set(lang, message);\n}\nfunction getGlobalMessage(lang) {\n return store2?.get(lang);\n}\nfunction deleteGlobalMessage(lang) {\n store2?.delete(lang);\n}\n\n// src/storages/schemaMessage/schemaMessage.ts\nvar store3;\nfunction setSchemaMessage(message, lang) {\n if (!store3) store3 = /* @__PURE__ */ new Map();\n store3.set(lang, message);\n}\nfunction getSchemaMessage(lang) {\n return store3?.get(lang);\n}\nfunction deleteSchemaMessage(lang) {\n store3?.delete(lang);\n}\n\n// src/storages/specificMessage/specificMessage.ts\nvar store4;\nfunction setSpecificMessage(reference, message, lang) {\n if (!store4) store4 = /* @__PURE__ */ new Map();\n if (!store4.get(reference)) store4.set(reference, /* @__PURE__ */ new Map());\n store4.get(reference).set(lang, message);\n}\nfunction getSpecificMessage(reference, lang) {\n return store4?.get(reference)?.get(lang);\n}\nfunction deleteSpecificMessage(reference, lang) {\n store4?.get(reference)?.delete(lang);\n}\n\n// src/utils/_stringify/_stringify.ts\nfunction _stringify(input) {\n const type = typeof input;\n if (type === \"string\") {\n return `\"${input}\"`;\n }\n if (type === \"number\" || type === \"bigint\" || type === \"boolean\") {\n return `${input}`;\n }\n if (type === \"object\" || type === \"function\") {\n return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? \"null\";\n }\n return type;\n}\n\n// src/utils/_addIssue/_addIssue.ts\nfunction _addIssue(context, label, dataset, config2, other) {\n const input = other && \"input\" in other ? other.input : dataset.value;\n const expected = other?.expected ?? context.expects ?? null;\n const received = other?.received ?? _stringify(input);\n const issue = {\n kind: context.kind,\n type: context.type,\n input,\n expected,\n received,\n message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : \"R\"}eceived ${received}`,\n requirement: context.requirement,\n path: other?.path,\n issues: other?.issues,\n lang: config2.lang,\n abortEarly: config2.abortEarly,\n abortPipeEarly: config2.abortPipeEarly\n };\n const isSchema = context.kind === \"schema\";\n const message = other?.message ?? context.message ?? getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? getSchemaMessage(issue.lang) : null) ?? config2.message ?? getGlobalMessage(issue.lang);\n if (message) {\n issue.message = typeof message === \"function\" ? (\n // @ts-expect-error\n message(issue)\n ) : message;\n }\n if (isSchema) {\n dataset.typed = false;\n }\n if (dataset.issues) {\n dataset.issues.push(issue);\n } else {\n dataset.issues = [issue];\n }\n}\n\n// src/utils/_getByteCount/_getByteCount.ts\nvar textEncoder;\nfunction _getByteCount(input) {\n if (!textEncoder) {\n textEncoder = new TextEncoder();\n }\n return textEncoder.encode(input).length;\n}\n\n// src/utils/_getGraphemeCount/_getGraphemeCount.ts\nvar segmenter;\nfunction _getGraphemeCount(input) {\n if (!segmenter) {\n segmenter = new Intl.Segmenter();\n }\n const segments = segmenter.segment(input);\n let count = 0;\n for (const _ of segments) {\n count++;\n }\n return count;\n}\n\n// src/utils/_getStandardProps/_getStandardProps.ts\nfunction _getStandardProps(context) {\n return {\n version: 1,\n vendor: \"valibot\",\n validate(value2) {\n return context[\"~run\"]({ value: value2 }, getGlobalConfig());\n }\n };\n}\n\n// src/utils/_getWordCount/_getWordCount.ts\nvar store5;\nfunction _getWordCount(locales, input) {\n if (!store5) {\n store5 = /* @__PURE__ */ new Map();\n }\n if (!store5.get(locales)) {\n store5.set(locales, new Intl.Segmenter(locales, { granularity: \"word\" }));\n }\n const segments = store5.get(locales).segment(input);\n let count = 0;\n for (const segment of segments) {\n if (segment.isWordLike) {\n count++;\n }\n }\n return count;\n}\n\n// src/utils/_isLuhnAlgo/_isLuhnAlgo.ts\nvar NON_DIGIT_REGEX = /\\D/gu;\nfunction _isLuhnAlgo(input) {\n const number2 = input.replace(NON_DIGIT_REGEX, \"\");\n let length2 = number2.length;\n let bit = 1;\n let sum = 0;\n while (length2) {\n const value2 = +number2[--length2];\n bit ^= 1;\n sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value2] : value2;\n }\n return sum % 10 === 0;\n}\n\n// src/utils/_isValidObjectKey/_isValidObjectKey.ts\nfunction _isValidObjectKey(object2, key) {\n return Object.hasOwn(object2, key) && key !== \"__proto__\" && key !== \"prototype\" && key !== \"constructor\";\n}\n\n// src/utils/_joinExpects/_joinExpects.ts\nfunction _joinExpects(values, separator) {\n const list = [...new Set(values)];\n if (list.length > 1) {\n return `(${list.join(` ${separator} `)})`;\n }\n return list[0] ?? \"never\";\n}\n\n// src/utils/entriesFromList/entriesFromList.ts\nfunction entriesFromList(list, schema) {\n const entries = {};\n for (const key of list) {\n entries[key] = schema;\n }\n return entries;\n}\n\n// src/utils/getDotPath/getDotPath.ts\nfunction getDotPath(issue) {\n if (issue.path) {\n let key = \"\";\n for (const item of issue.path) {\n if (typeof item.key === \"string\" || typeof item.key === \"number\") {\n if (key) {\n key += `.${item.key}`;\n } else {\n key += item.key;\n }\n } else {\n return null;\n }\n }\n return key;\n }\n return null;\n}\n\n// src/utils/isOfKind/isOfKind.ts\nfunction isOfKind(kind, object2) {\n return object2.kind === kind;\n}\n\n// src/utils/isOfType/isOfType.ts\nfunction isOfType(type, object2) {\n return object2.type === type;\n}\n\n// src/utils/isValiError/isValiError.ts\nfunction isValiError(error) {\n return error instanceof ValiError;\n}\n\n// src/utils/ValiError/ValiError.ts\nvar ValiError = class extends Error {\n /**\n * The error issues.\n */\n issues;\n /**\n * Creates a Valibot error with useful information.\n *\n * @param issues The error issues.\n */\n constructor(issues) {\n super(issues[0].message);\n this.name = \"ValiError\";\n this.issues = issues;\n }\n};\n\n// src/actions/args/args.ts\nfunction args(schema) {\n return {\n kind: \"transformation\",\n type: \"args\",\n reference: args,\n async: false,\n schema,\n \"~run\"(dataset, config2) {\n const func = dataset.value;\n dataset.value = (...args_) => {\n const argsDataset = this.schema[\"~run\"]({ value: args_ }, config2);\n if (argsDataset.issues) {\n throw new ValiError(argsDataset.issues);\n }\n return func(...argsDataset.value);\n };\n return dataset;\n }\n };\n}\n\n// src/actions/args/argsAsync.ts\nfunction argsAsync(schema) {\n return {\n kind: \"transformation\",\n type: \"args\",\n reference: argsAsync,\n async: false,\n schema,\n \"~run\"(dataset, config2) {\n const func = dataset.value;\n dataset.value = async (...args2) => {\n const argsDataset = await schema[\"~run\"]({ value: args2 }, config2);\n if (argsDataset.issues) {\n throw new ValiError(argsDataset.issues);\n }\n return func(...argsDataset.value);\n };\n return dataset;\n }\n };\n}\n\n// src/actions/await/awaitAsync.ts\nfunction awaitAsync() {\n return {\n kind: \"transformation\",\n type: \"await\",\n reference: awaitAsync,\n async: true,\n async \"~run\"(dataset) {\n dataset.value = await dataset.value;\n return dataset;\n }\n };\n}\n\n// src/regex.ts\nvar BASE64_REGEX = /^(?:[\\da-z+/]{4})*(?:[\\da-z+/]{2}==|[\\da-z+/]{3}=)?$/iu;\nvar BIC_REGEX = /^[A-Z]{6}(?!00)[\\dA-Z]{2}(?:[\\dA-Z]{3})?$/u;\nvar CUID2_REGEX = /^[a-z][\\da-z]*$/u;\nvar DECIMAL_REGEX = /^[+-]?\\d+(?:\\.\\d+)?$/u;\nvar DIGITS_REGEX = /^\\d+$/u;\nvar EMAIL_REGEX = /^[\\w+-]+(?:\\.[\\w+-]+)*@[\\da-z]+(?:[.-][\\da-z]+)*\\.[a-z]{2,}$/iu;\nvar EMOJI_REGEX = (\n // eslint-disable-next-line redos-detector/no-unsafe-regex, regexp/no-dupe-disjunctions -- false positives\n /^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}))*)+$/u\n);\nvar HEXADECIMAL_REGEX = /^(?:0[hx])?[\\da-f]+$/iu;\nvar HEX_COLOR_REGEX = /^#(?:[\\da-f]{3,4}|[\\da-f]{6}|[\\da-f]{8})$/iu;\nvar IMEI_REGEX = /^\\d{15}$|^\\d{2}-\\d{6}-\\d{6}-\\d$/u;\nvar IPV4_REGEX = (\n // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive\n /^(?:(?:[1-9]|1\\d|2[0-4])?\\d|25[0-5])(?:\\.(?:(?:[1-9]|1\\d|2[0-4])?\\d|25[0-5])){3}$/u\n);\nvar IPV6_REGEX = /^(?:(?:[\\da-f]{1,4}:){7}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){1,7}:|(?:[\\da-f]{1,4}:){1,6}:[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){1,5}(?::[\\da-f]{1,4}){1,2}|(?:[\\da-f]{1,4}:){1,4}(?::[\\da-f]{1,4}){1,3}|(?:[\\da-f]{1,4}:){1,3}(?::[\\da-f]{1,4}){1,4}|(?:[\\da-f]{1,4}:){1,2}(?::[\\da-f]{1,4}){1,5}|[\\da-f]{1,4}:(?::[\\da-f]{1,4}){1,6}|:(?:(?::[\\da-f]{1,4}){1,7}|:)|fe80:(?::[\\da-f]{0,4}){0,4}%[\\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\\d)?\\d)\\.){3}(?:25[0-5]|(?:2[0-4]|1?\\d)?\\d)|(?:[\\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\\d)?\\d)\\.){3}(?:25[0-5]|(?:2[0-4]|1?\\d)?\\d))$/iu;\nvar IP_REGEX = /^(?:(?:[1-9]|1\\d|2[0-4])?\\d|25[0-5])(?:\\.(?:(?:[1-9]|1\\d|2[0-4])?\\d|25[0-5])){3}$|^(?:(?:[\\da-f]{1,4}:){7}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){1,7}:|(?:[\\da-f]{1,4}:){1,6}:[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){1,5}(?::[\\da-f]{1,4}){1,2}|(?:[\\da-f]{1,4}:){1,4}(?::[\\da-f]{1,4}){1,3}|(?:[\\da-f]{1,4}:){1,3}(?::[\\da-f]{1,4}){1,4}|(?:[\\da-f]{1,4}:){1,2}(?::[\\da-f]{1,4}){1,5}|[\\da-f]{1,4}:(?::[\\da-f]{1,4}){1,6}|:(?:(?::[\\da-f]{1,4}){1,7}|:)|fe80:(?::[\\da-f]{0,4}){0,4}%[\\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\\d)?\\d)\\.){3}(?:25[0-5]|(?:2[0-4]|1?\\d)?\\d)|(?:[\\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\\d)?\\d)\\.){3}(?:25[0-5]|(?:2[0-4]|1?\\d)?\\d))$/iu;\nvar ISO_DATE_REGEX = /^\\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\\d|0[1-9]|3[01])$/u;\nvar ISO_DATE_TIME_REGEX = /^\\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\\d|0[1-9]|3[01])T(?:0\\d|1\\d|2[0-3]):[0-5]\\d$/u;\nvar ISO_TIME_REGEX = /^(?:0\\d|1\\d|2[0-3]):[0-5]\\d$/u;\nvar ISO_TIME_SECOND_REGEX = /^(?:0\\d|1\\d|2[0-3])(?::[0-5]\\d){2}$/u;\nvar ISO_TIMESTAMP_REGEX = /^\\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\\d|0[1-9]|3[01])T(?:0\\d|1\\d|2[0-3])(?::[0-5]\\d){2}(?:\\.\\d{1,9})?(?:Z|[+-](?:0\\d|1\\d|2[0-3])(?::?[0-5]\\d)?)$/u;\nvar ISO_WEEK_REGEX = /^\\d{4}-W(?:0[1-9]|[1-4]\\d|5[0-3])$/u;\nvar MAC48_REGEX = /^(?:[\\da-f]{2}:){5}[\\da-f]{2}$|^(?:[\\da-f]{2}-){5}[\\da-f]{2}$|^(?:[\\da-f]{4}\\.){2}[\\da-f]{4}$/iu;\nvar MAC64_REGEX = /^(?:[\\da-f]{2}:){7}[\\da-f]{2}$|^(?:[\\da-f]{2}-){7}[\\da-f]{2}$|^(?:[\\da-f]{4}\\.){3}[\\da-f]{4}$|^(?:[\\da-f]{4}:){3}[\\da-f]{4}$/iu;\nvar MAC_REGEX = /^(?:[\\da-f]{2}:){5}[\\da-f]{2}$|^(?:[\\da-f]{2}-){5}[\\da-f]{2}$|^(?:[\\da-f]{4}\\.){2}[\\da-f]{4}$|^(?:[\\da-f]{2}:){7}[\\da-f]{2}$|^(?:[\\da-f]{2}-){7}[\\da-f]{2}$|^(?:[\\da-f]{4}\\.){3}[\\da-f]{4}$|^(?:[\\da-f]{4}:){3}[\\da-f]{4}$/iu;\nvar NANO_ID_REGEX = /^[\\w-]+$/u;\nvar OCTAL_REGEX = /^(?:0o)?[0-7]+$/iu;\nvar ULID_REGEX = /^[\\da-hjkmnp-tv-z]{26}$/iu;\nvar UUID_REGEX = /^[\\da-f]{8}(?:-[\\da-f]{4}){3}-[\\da-f]{12}$/iu;\n\n// src/actions/base64/base64.ts\nfunction base64(message) {\n return {\n kind: \"validation\",\n type: \"base64\",\n reference: base64,\n async: false,\n expects: null,\n requirement: BASE64_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"Base64\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/bic/bic.ts\nfunction bic(message) {\n return {\n kind: \"validation\",\n type: \"bic\",\n reference: bic,\n async: false,\n expects: null,\n requirement: BIC_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"BIC\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/brand/brand.ts\nfunction brand(name) {\n return {\n kind: \"transformation\",\n type: \"brand\",\n reference: brand,\n async: false,\n name,\n \"~run\"(dataset) {\n return dataset;\n }\n };\n}\n\n// src/actions/bytes/bytes.ts\nfunction bytes(requirement, message) {\n return {\n kind: \"validation\",\n type: \"bytes\",\n reference: bytes,\n async: false,\n expects: `${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const length2 = _getByteCount(dataset.value);\n if (length2 !== this.requirement) {\n _addIssue(this, \"bytes\", dataset, config2, {\n received: `${length2}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/check/check.ts\nfunction check(requirement, message) {\n return {\n kind: \"validation\",\n type: \"check\",\n reference: check,\n async: false,\n expects: null,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement(dataset.value)) {\n _addIssue(this, \"input\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/check/checkAsync.ts\nfunction checkAsync(requirement, message) {\n return {\n kind: \"validation\",\n type: \"check\",\n reference: checkAsync,\n async: true,\n expects: null,\n requirement,\n message,\n async \"~run\"(dataset, config2) {\n if (dataset.typed && !await this.requirement(dataset.value)) {\n _addIssue(this, \"input\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/checkItems/checkItems.ts\nfunction checkItems(requirement, message) {\n return {\n kind: \"validation\",\n type: \"check_items\",\n reference: checkItems,\n async: false,\n expects: null,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n for (let index = 0; index < dataset.value.length; index++) {\n const item = dataset.value[index];\n if (!this.requirement(item, index, dataset.value)) {\n _addIssue(this, \"item\", dataset, config2, {\n input: item,\n path: [\n {\n type: \"array\",\n origin: \"value\",\n input: dataset.value,\n key: index,\n value: item\n }\n ]\n });\n }\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/checkItems/checkItemsAsync.ts\nfunction checkItemsAsync(requirement, message) {\n return {\n kind: \"validation\",\n type: \"check_items\",\n reference: checkItemsAsync,\n async: true,\n expects: null,\n requirement,\n message,\n async \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const requirementResults = await Promise.all(\n dataset.value.map(this.requirement)\n );\n for (let index = 0; index < dataset.value.length; index++) {\n if (!requirementResults[index]) {\n const item = dataset.value[index];\n _addIssue(this, \"item\", dataset, config2, {\n input: item,\n path: [\n {\n type: \"array\",\n origin: \"value\",\n input: dataset.value,\n key: index,\n value: item\n }\n ]\n });\n }\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/creditCard/creditCard.ts\nvar CREDIT_CARD_REGEX = /^(?:\\d{14,19}|\\d{4}(?: \\d{3,6}){2,4}|\\d{4}(?:-\\d{3,6}){2,4})$/u;\nvar SANITIZE_REGEX = /[- ]/gu;\nvar PROVIDER_REGEX_LIST = [\n // American Express\n /^3[47]\\d{13}$/u,\n // Diners Club\n /^3(?:0[0-5]|[68]\\d)\\d{11,13}$/u,\n // Discover\n /^6(?:011|5\\d{2})\\d{12,15}$/u,\n // JCB\n /^(?:2131|1800|35\\d{3})\\d{11}$/u,\n // Mastercard\n /^5[1-5]\\d{2}|(?:222\\d|22[3-9]\\d|2[3-6]\\d{2}|27[01]\\d|2720)\\d{12}$/u,\n // UnionPay\n /^(?:6[27]\\d{14,17}|81\\d{14,17})$/u,\n // Visa\n /^4\\d{12}(?:\\d{3,6})?$/u\n];\nfunction creditCard(message) {\n return {\n kind: \"validation\",\n type: \"credit_card\",\n reference: creditCard,\n async: false,\n expects: null,\n requirement(input) {\n let sanitized;\n return CREDIT_CARD_REGEX.test(input) && // Remove any hyphens and blanks\n (sanitized = input.replace(SANITIZE_REGEX, \"\")) && // Check if it matches a provider\n PROVIDER_REGEX_LIST.some((regex2) => regex2.test(sanitized)) && // Check if passes luhn algorithm\n _isLuhnAlgo(sanitized);\n },\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement(dataset.value)) {\n _addIssue(this, \"credit card\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/cuid2/cuid2.ts\nfunction cuid2(message) {\n return {\n kind: \"validation\",\n type: \"cuid2\",\n reference: cuid2,\n async: false,\n expects: null,\n requirement: CUID2_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"Cuid2\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/decimal/decimal.ts\nfunction decimal(message) {\n return {\n kind: \"validation\",\n type: \"decimal\",\n reference: decimal,\n async: false,\n expects: null,\n requirement: DECIMAL_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"decimal\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/description/description.ts\nfunction description(description_) {\n return {\n kind: \"metadata\",\n type: \"description\",\n reference: description,\n description: description_\n };\n}\n\n// src/actions/digits/digits.ts\nfunction digits(message) {\n return {\n kind: \"validation\",\n type: \"digits\",\n reference: digits,\n async: false,\n expects: null,\n requirement: DIGITS_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"digits\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/email/email.ts\nfunction email(message) {\n return {\n kind: \"validation\",\n type: \"email\",\n reference: email,\n expects: null,\n async: false,\n requirement: EMAIL_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"email\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/emoji/emoji.ts\nfunction emoji(message) {\n return {\n kind: \"validation\",\n type: \"emoji\",\n reference: emoji,\n async: false,\n expects: null,\n requirement: EMOJI_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"emoji\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/empty/empty.ts\nfunction empty(message) {\n return {\n kind: \"validation\",\n type: \"empty\",\n reference: empty,\n async: false,\n expects: \"0\",\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.length > 0) {\n _addIssue(this, \"length\", dataset, config2, {\n received: `${dataset.value.length}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/endsWith/endsWith.ts\nfunction endsWith(requirement, message) {\n return {\n kind: \"validation\",\n type: \"ends_with\",\n reference: endsWith,\n async: false,\n expects: `\"${requirement}\"`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !dataset.value.endsWith(this.requirement)) {\n _addIssue(this, \"end\", dataset, config2, {\n received: `\"${dataset.value.slice(-this.requirement.length)}\"`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/everyItem/everyItem.ts\nfunction everyItem(requirement, message) {\n return {\n kind: \"validation\",\n type: \"every_item\",\n reference: everyItem,\n async: false,\n expects: null,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !dataset.value.every(this.requirement)) {\n _addIssue(this, \"item\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/excludes/excludes.ts\nfunction excludes(requirement, message) {\n const received = _stringify(requirement);\n return {\n kind: \"validation\",\n type: \"excludes\",\n reference: excludes,\n async: false,\n expects: `!${received}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.includes(this.requirement)) {\n _addIssue(this, \"content\", dataset, config2, { received });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/filterItems/filterItems.ts\nfunction filterItems(operation) {\n return {\n kind: \"transformation\",\n type: \"filter_items\",\n reference: filterItems,\n async: false,\n operation,\n \"~run\"(dataset) {\n dataset.value = dataset.value.filter(this.operation);\n return dataset;\n }\n };\n}\n\n// src/actions/findItem/findItem.ts\nfunction findItem(operation) {\n return {\n kind: \"transformation\",\n type: \"find_item\",\n reference: findItem,\n async: false,\n operation,\n \"~run\"(dataset) {\n dataset.value = dataset.value.find(this.operation);\n return dataset;\n }\n };\n}\n\n// src/actions/finite/finite.ts\nfunction finite(message) {\n return {\n kind: \"validation\",\n type: \"finite\",\n reference: finite,\n async: false,\n expects: null,\n requirement: Number.isFinite,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement(dataset.value)) {\n _addIssue(this, \"finite\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/graphemes/graphemes.ts\nfunction graphemes(requirement, message) {\n return {\n kind: \"validation\",\n type: \"graphemes\",\n reference: graphemes,\n async: false,\n expects: `${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const count = _getGraphemeCount(dataset.value);\n if (count !== this.requirement) {\n _addIssue(this, \"graphemes\", dataset, config2, {\n received: `${count}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/hash/hash.ts\nvar HASH_LENGTHS = {\n md4: 32,\n md5: 32,\n sha1: 40,\n sha256: 64,\n sha384: 96,\n sha512: 128,\n ripemd128: 32,\n ripemd160: 40,\n tiger128: 32,\n tiger160: 40,\n tiger192: 48,\n crc32: 8,\n crc32b: 8,\n adler32: 8\n};\nfunction hash(types, message) {\n return {\n kind: \"validation\",\n type: \"hash\",\n reference: hash,\n expects: null,\n async: false,\n requirement: RegExp(\n types.map((type) => `^[a-f0-9]{${HASH_LENGTHS[type]}}$`).join(\"|\"),\n \"iu\"\n ),\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"hash\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/hexadecimal/hexadecimal.ts\nfunction hexadecimal(message) {\n return {\n kind: \"validation\",\n type: \"hexadecimal\",\n reference: hexadecimal,\n async: false,\n expects: null,\n requirement: HEXADECIMAL_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"hexadecimal\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/hexColor/hexColor.ts\nfunction hexColor(message) {\n return {\n kind: \"validation\",\n type: \"hex_color\",\n reference: hexColor,\n async: false,\n expects: null,\n requirement: HEX_COLOR_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"hex color\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/imei/imei.ts\nfunction imei(message) {\n return {\n kind: \"validation\",\n type: \"imei\",\n reference: imei,\n async: false,\n expects: null,\n requirement(input) {\n return IMEI_REGEX.test(input) && _isLuhnAlgo(input);\n },\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement(dataset.value)) {\n _addIssue(this, \"IMEI\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/includes/includes.ts\nfunction includes(requirement, message) {\n const expects = _stringify(requirement);\n return {\n kind: \"validation\",\n type: \"includes\",\n reference: includes,\n async: false,\n expects,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !dataset.value.includes(this.requirement)) {\n _addIssue(this, \"content\", dataset, config2, {\n received: `!${expects}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/integer/integer.ts\nfunction integer(message) {\n return {\n kind: \"validation\",\n type: \"integer\",\n reference: integer,\n async: false,\n expects: null,\n requirement: Number.isInteger,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement(dataset.value)) {\n _addIssue(this, \"integer\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/ip/ip.ts\nfunction ip(message) {\n return {\n kind: \"validation\",\n type: \"ip\",\n reference: ip,\n async: false,\n expects: null,\n requirement: IP_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"IP\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/ipv4/ipv4.ts\nfunction ipv4(message) {\n return {\n kind: \"validation\",\n type: \"ipv4\",\n reference: ipv4,\n async: false,\n expects: null,\n requirement: IPV4_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"IPv4\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/ipv6/ipv6.ts\nfunction ipv6(message) {\n return {\n kind: \"validation\",\n type: \"ipv6\",\n reference: ipv6,\n async: false,\n expects: null,\n requirement: IPV6_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"IPv6\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/isoDate/isoDate.ts\nfunction isoDate(message) {\n return {\n kind: \"validation\",\n type: \"iso_date\",\n reference: isoDate,\n async: false,\n expects: null,\n requirement: ISO_DATE_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"date\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/isoDateTime/isoDateTime.ts\nfunction isoDateTime(message) {\n return {\n kind: \"validation\",\n type: \"iso_date_time\",\n reference: isoDateTime,\n async: false,\n expects: null,\n requirement: ISO_DATE_TIME_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"date-time\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/isoTime/isoTime.ts\nfunction isoTime(message) {\n return {\n kind: \"validation\",\n type: \"iso_time\",\n reference: isoTime,\n async: false,\n expects: null,\n requirement: ISO_TIME_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"time\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/isoTimeSecond/isoTimeSecond.ts\nfunction isoTimeSecond(message) {\n return {\n kind: \"validation\",\n type: \"iso_time_second\",\n reference: isoTimeSecond,\n async: false,\n expects: null,\n requirement: ISO_TIME_SECOND_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"time-second\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/isoTimestamp/isoTimestamp.ts\nfunction isoTimestamp(message) {\n return {\n kind: \"validation\",\n type: \"iso_timestamp\",\n reference: isoTimestamp,\n async: false,\n expects: null,\n requirement: ISO_TIMESTAMP_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"timestamp\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/isoWeek/isoWeek.ts\nfunction isoWeek(message) {\n return {\n kind: \"validation\",\n type: \"iso_week\",\n reference: isoWeek,\n async: false,\n expects: null,\n requirement: ISO_WEEK_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"week\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/length/length.ts\nfunction length(requirement, message) {\n return {\n kind: \"validation\",\n type: \"length\",\n reference: length,\n async: false,\n expects: `${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.length !== this.requirement) {\n _addIssue(this, \"length\", dataset, config2, {\n received: `${dataset.value.length}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/mac/mac.ts\nfunction mac(message) {\n return {\n kind: \"validation\",\n type: \"mac\",\n reference: mac,\n async: false,\n expects: null,\n requirement: MAC_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"MAC\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/mac48/mac48.ts\nfunction mac48(message) {\n return {\n kind: \"validation\",\n type: \"mac48\",\n reference: mac48,\n async: false,\n expects: null,\n requirement: MAC48_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"48-bit MAC\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/mac64/mac64.ts\nfunction mac64(message) {\n return {\n kind: \"validation\",\n type: \"mac64\",\n reference: mac64,\n async: false,\n expects: null,\n requirement: MAC64_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"64-bit MAC\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/mapItems/mapItems.ts\nfunction mapItems(operation) {\n return {\n kind: \"transformation\",\n type: \"map_items\",\n reference: mapItems,\n async: false,\n operation,\n \"~run\"(dataset) {\n dataset.value = dataset.value.map(this.operation);\n return dataset;\n }\n };\n}\n\n// src/actions/maxBytes/maxBytes.ts\nfunction maxBytes(requirement, message) {\n return {\n kind: \"validation\",\n type: \"max_bytes\",\n reference: maxBytes,\n async: false,\n expects: `<=${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const length2 = _getByteCount(dataset.value);\n if (length2 > this.requirement) {\n _addIssue(this, \"bytes\", dataset, config2, {\n received: `${length2}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/maxGraphemes/maxGraphemes.ts\nfunction maxGraphemes(requirement, message) {\n return {\n kind: \"validation\",\n type: \"max_graphemes\",\n reference: maxGraphemes,\n async: false,\n expects: `<=${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const count = _getGraphemeCount(dataset.value);\n if (count > this.requirement) {\n _addIssue(this, \"graphemes\", dataset, config2, {\n received: `${count}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/maxLength/maxLength.ts\nfunction maxLength(requirement, message) {\n return {\n kind: \"validation\",\n type: \"max_length\",\n reference: maxLength,\n async: false,\n expects: `<=${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.length > this.requirement) {\n _addIssue(this, \"length\", dataset, config2, {\n received: `${dataset.value.length}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/maxSize/maxSize.ts\nfunction maxSize(requirement, message) {\n return {\n kind: \"validation\",\n type: \"max_size\",\n reference: maxSize,\n async: false,\n expects: `<=${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.size > this.requirement) {\n _addIssue(this, \"size\", dataset, config2, {\n received: `${dataset.value.size}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/maxValue/maxValue.ts\nfunction maxValue(requirement, message) {\n return {\n kind: \"validation\",\n type: \"max_value\",\n reference: maxValue,\n async: false,\n expects: `<=${requirement instanceof Date ? requirement.toJSON() : _stringify(requirement)}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !(dataset.value <= this.requirement)) {\n _addIssue(this, \"value\", dataset, config2, {\n received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value)\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/maxWords/maxWords.ts\nfunction maxWords(locales, requirement, message) {\n return {\n kind: \"validation\",\n type: \"max_words\",\n reference: maxWords,\n async: false,\n expects: `<=${requirement}`,\n locales,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const count = _getWordCount(this.locales, dataset.value);\n if (count > this.requirement) {\n _addIssue(this, \"words\", dataset, config2, {\n received: `${count}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/metadata/metadata.ts\nfunction metadata(metadata_) {\n return {\n kind: \"metadata\",\n type: \"metadata\",\n reference: metadata,\n metadata: metadata_\n };\n}\n\n// src/actions/mimeType/mimeType.ts\nfunction mimeType(requirement, message) {\n return {\n kind: \"validation\",\n type: \"mime_type\",\n reference: mimeType,\n async: false,\n expects: _joinExpects(\n requirement.map((option) => `\"${option}\"`),\n \"|\"\n ),\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.includes(dataset.value.type)) {\n _addIssue(this, \"MIME type\", dataset, config2, {\n received: `\"${dataset.value.type}\"`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/minBytes/minBytes.ts\nfunction minBytes(requirement, message) {\n return {\n kind: \"validation\",\n type: \"min_bytes\",\n reference: minBytes,\n async: false,\n expects: `>=${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const length2 = _getByteCount(dataset.value);\n if (length2 < this.requirement) {\n _addIssue(this, \"bytes\", dataset, config2, {\n received: `${length2}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/minGraphemes/minGraphemes.ts\nfunction minGraphemes(requirement, message) {\n return {\n kind: \"validation\",\n type: \"min_graphemes\",\n reference: minGraphemes,\n async: false,\n expects: `>=${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const count = _getGraphemeCount(dataset.value);\n if (count < this.requirement) {\n _addIssue(this, \"graphemes\", dataset, config2, {\n received: `${count}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/minLength/minLength.ts\nfunction minLength(requirement, message) {\n return {\n kind: \"validation\",\n type: \"min_length\",\n reference: minLength,\n async: false,\n expects: `>=${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.length < this.requirement) {\n _addIssue(this, \"length\", dataset, config2, {\n received: `${dataset.value.length}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/minSize/minSize.ts\nfunction minSize(requirement, message) {\n return {\n kind: \"validation\",\n type: \"min_size\",\n reference: minSize,\n async: false,\n expects: `>=${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.size < this.requirement) {\n _addIssue(this, \"size\", dataset, config2, {\n received: `${dataset.value.size}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/minValue/minValue.ts\nfunction minValue(requirement, message) {\n return {\n kind: \"validation\",\n type: \"min_value\",\n reference: minValue,\n async: false,\n expects: `>=${requirement instanceof Date ? requirement.toJSON() : _stringify(requirement)}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !(dataset.value >= this.requirement)) {\n _addIssue(this, \"value\", dataset, config2, {\n received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value)\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/minWords/minWords.ts\nfunction minWords(locales, requirement, message) {\n return {\n kind: \"validation\",\n type: \"min_words\",\n reference: minWords,\n async: false,\n expects: `>=${requirement}`,\n locales,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const count = _getWordCount(this.locales, dataset.value);\n if (count < this.requirement) {\n _addIssue(this, \"words\", dataset, config2, {\n received: `${count}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/multipleOf/multipleOf.ts\nfunction multipleOf(requirement, message) {\n return {\n kind: \"validation\",\n type: \"multiple_of\",\n reference: multipleOf,\n async: false,\n expects: `%${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value % this.requirement !== 0) {\n _addIssue(this, \"multiple\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/nanoid/nanoid.ts\nfunction nanoid(message) {\n return {\n kind: \"validation\",\n type: \"nanoid\",\n reference: nanoid,\n async: false,\n expects: null,\n requirement: NANO_ID_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"Nano ID\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/nonEmpty/nonEmpty.ts\nfunction nonEmpty(message) {\n return {\n kind: \"validation\",\n type: \"non_empty\",\n reference: nonEmpty,\n async: false,\n expects: \"!0\",\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.length === 0) {\n _addIssue(this, \"length\", dataset, config2, {\n received: \"0\"\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/normalize/normalize.ts\nfunction normalize(form) {\n return {\n kind: \"transformation\",\n type: \"normalize\",\n reference: normalize,\n async: false,\n form,\n \"~run\"(dataset) {\n dataset.value = dataset.value.normalize(this.form);\n return dataset;\n }\n };\n}\n\n// src/actions/notBytes/notBytes.ts\nfunction notBytes(requirement, message) {\n return {\n kind: \"validation\",\n type: \"not_bytes\",\n reference: notBytes,\n async: false,\n expects: `!${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const length2 = _getByteCount(dataset.value);\n if (length2 === this.requirement) {\n _addIssue(this, \"bytes\", dataset, config2, {\n received: `${length2}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/notGraphemes/notGraphemes.ts\nfunction notGraphemes(requirement, message) {\n return {\n kind: \"validation\",\n type: \"not_graphemes\",\n reference: notGraphemes,\n async: false,\n expects: `!${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const count = _getGraphemeCount(dataset.value);\n if (count === this.requirement) {\n _addIssue(this, \"graphemes\", dataset, config2, {\n received: `${count}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/notLength/notLength.ts\nfunction notLength(requirement, message) {\n return {\n kind: \"validation\",\n type: \"not_length\",\n reference: notLength,\n async: false,\n expects: `!${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.length === this.requirement) {\n _addIssue(this, \"length\", dataset, config2, {\n received: `${dataset.value.length}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/notSize/notSize.ts\nfunction notSize(requirement, message) {\n return {\n kind: \"validation\",\n type: \"not_size\",\n reference: notSize,\n async: false,\n expects: `!${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.size === this.requirement) {\n _addIssue(this, \"size\", dataset, config2, {\n received: `${dataset.value.size}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/notValue/notValue.ts\nfunction notValue(requirement, message) {\n return {\n kind: \"validation\",\n type: \"not_value\",\n reference: notValue,\n async: false,\n expects: requirement instanceof Date ? `!${requirement.toJSON()}` : `!${_stringify(requirement)}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && this.requirement <= dataset.value && this.requirement >= dataset.value) {\n _addIssue(this, \"value\", dataset, config2, {\n received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value)\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/notWords/notWords.ts\nfunction notWords(locales, requirement, message) {\n return {\n kind: \"validation\",\n type: \"not_words\",\n reference: notWords,\n async: false,\n expects: `!${requirement}`,\n locales,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const count = _getWordCount(this.locales, dataset.value);\n if (count === this.requirement) {\n _addIssue(this, \"words\", dataset, config2, {\n received: `${count}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/actions/octal/octal.ts\nfunction octal(message) {\n return {\n kind: \"validation\",\n type: \"octal\",\n reference: octal,\n async: false,\n expects: null,\n requirement: OCTAL_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"octal\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/partialCheck/utils/_isPartiallyTyped/_isPartiallyTyped.ts\nfunction _isPartiallyTyped(dataset, pathList) {\n if (dataset.issues) {\n for (const path of pathList) {\n for (const issue of dataset.issues) {\n let typed = false;\n const bound = Math.min(path.length, issue.path?.length ?? 0);\n for (let index = 0; index < bound; index++) {\n if (path[index] !== issue.path[index].key) {\n typed = true;\n break;\n }\n }\n if (!typed) {\n return false;\n }\n }\n }\n }\n return true;\n}\n\n// src/actions/partialCheck/partialCheck.ts\nfunction partialCheck(pathList, requirement, message) {\n return {\n kind: \"validation\",\n type: \"partial_check\",\n reference: partialCheck,\n async: false,\n expects: null,\n pathList,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (_isPartiallyTyped(dataset, pathList) && // @ts-expect-error\n !this.requirement(dataset.value)) {\n _addIssue(this, \"input\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/partialCheck/partialCheckAsync.ts\nfunction partialCheckAsync(pathList, requirement, message) {\n return {\n kind: \"validation\",\n type: \"partial_check\",\n reference: partialCheckAsync,\n async: true,\n expects: null,\n pathList,\n requirement,\n message,\n async \"~run\"(dataset, config2) {\n if (_isPartiallyTyped(dataset, pathList) && // @ts-expect-error\n !await this.requirement(dataset.value)) {\n _addIssue(this, \"input\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/rawCheck/rawCheck.ts\nfunction rawCheck(action) {\n return {\n kind: \"validation\",\n type: \"raw_check\",\n reference: rawCheck,\n async: false,\n expects: null,\n \"~run\"(dataset, config2) {\n action({\n dataset,\n config: config2,\n addIssue: (info) => _addIssue(this, info?.label ?? \"input\", dataset, config2, info)\n });\n return dataset;\n }\n };\n}\n\n// src/actions/rawCheck/rawCheckAsync.ts\nfunction rawCheckAsync(action) {\n return {\n kind: \"validation\",\n type: \"raw_check\",\n reference: rawCheckAsync,\n async: true,\n expects: null,\n async \"~run\"(dataset, config2) {\n await action({\n dataset,\n config: config2,\n addIssue: (info) => _addIssue(this, info?.label ?? \"input\", dataset, config2, info)\n });\n return dataset;\n }\n };\n}\n\n// src/actions/rawTransform/rawTransform.ts\nfunction rawTransform(action) {\n return {\n kind: \"transformation\",\n type: \"raw_transform\",\n reference: rawTransform,\n async: false,\n \"~run\"(dataset, config2) {\n const output = action({\n dataset,\n config: config2,\n addIssue: (info) => _addIssue(this, info?.label ?? \"input\", dataset, config2, info),\n NEVER: null\n });\n if (dataset.issues) {\n dataset.typed = false;\n } else {\n dataset.value = output;\n }\n return dataset;\n }\n };\n}\n\n// src/actions/rawTransform/rawTransformAsync.ts\nfunction rawTransformAsync(action) {\n return {\n kind: \"transformation\",\n type: \"raw_transform\",\n reference: rawTransformAsync,\n async: true,\n async \"~run\"(dataset, config2) {\n const output = await action({\n dataset,\n config: config2,\n addIssue: (info) => _addIssue(this, info?.label ?? \"input\", dataset, config2, info),\n NEVER: null\n });\n if (dataset.issues) {\n dataset.typed = false;\n } else {\n dataset.value = output;\n }\n return dataset;\n }\n };\n}\n\n// src/actions/readonly/readonly.ts\nfunction readonly() {\n return {\n kind: \"transformation\",\n type: \"readonly\",\n reference: readonly,\n async: false,\n \"~run\"(dataset) {\n return dataset;\n }\n };\n}\n\n// src/actions/reduceItems/reduceItems.ts\nfunction reduceItems(operation, initial) {\n return {\n kind: \"transformation\",\n type: \"reduce_items\",\n reference: reduceItems,\n async: false,\n operation,\n initial,\n \"~run\"(dataset) {\n dataset.value = dataset.value.reduce(this.operation, this.initial);\n return dataset;\n }\n };\n}\n\n// src/actions/regex/regex.ts\nfunction regex(requirement, message) {\n return {\n kind: \"validation\",\n type: \"regex\",\n reference: regex,\n async: false,\n expects: `${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"format\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/returns/returns.ts\nfunction returns(schema) {\n return {\n kind: \"transformation\",\n type: \"returns\",\n reference: returns,\n async: false,\n schema,\n \"~run\"(dataset, config2) {\n const func = dataset.value;\n dataset.value = (...args_) => {\n const returnsDataset = this.schema[\"~run\"](\n { value: func(...args_) },\n config2\n );\n if (returnsDataset.issues) {\n throw new ValiError(returnsDataset.issues);\n }\n return returnsDataset.value;\n };\n return dataset;\n }\n };\n}\n\n// src/actions/returns/returnsAsync.ts\nfunction returnsAsync(schema) {\n return {\n kind: \"transformation\",\n type: \"returns\",\n reference: returnsAsync,\n async: false,\n schema,\n \"~run\"(dataset, config2) {\n const func = dataset.value;\n dataset.value = async (...args_) => {\n const returnsDataset = await this.schema[\"~run\"](\n { value: await func(...args_) },\n config2\n );\n if (returnsDataset.issues) {\n throw new ValiError(returnsDataset.issues);\n }\n return returnsDataset.value;\n };\n return dataset;\n }\n };\n}\n\n// src/actions/safeInteger/safeInteger.ts\nfunction safeInteger(message) {\n return {\n kind: \"validation\",\n type: \"safe_integer\",\n reference: safeInteger,\n async: false,\n expects: null,\n requirement: Number.isSafeInteger,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement(dataset.value)) {\n _addIssue(this, \"safe integer\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/size/size.ts\nfunction size(requirement, message) {\n return {\n kind: \"validation\",\n type: \"size\",\n reference: size,\n async: false,\n expects: `${requirement}`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && dataset.value.size !== this.requirement) {\n _addIssue(this, \"size\", dataset, config2, {\n received: `${dataset.value.size}`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/someItem/someItem.ts\nfunction someItem(requirement, message) {\n return {\n kind: \"validation\",\n type: \"some_item\",\n reference: someItem,\n async: false,\n expects: null,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !dataset.value.some(this.requirement)) {\n _addIssue(this, \"item\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/sortItems/sortItems.ts\nfunction sortItems(operation) {\n return {\n kind: \"transformation\",\n type: \"sort_items\",\n reference: sortItems,\n async: false,\n operation,\n \"~run\"(dataset) {\n dataset.value = dataset.value.sort(this.operation);\n return dataset;\n }\n };\n}\n\n// src/actions/startsWith/startsWith.ts\nfunction startsWith(requirement, message) {\n return {\n kind: \"validation\",\n type: \"starts_with\",\n reference: startsWith,\n async: false,\n expects: `\"${requirement}\"`,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !dataset.value.startsWith(this.requirement)) {\n _addIssue(this, \"start\", dataset, config2, {\n received: `\"${dataset.value.slice(0, this.requirement.length)}\"`\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/title/title.ts\nfunction title(title_) {\n return {\n kind: \"metadata\",\n type: \"title\",\n reference: title,\n title: title_\n };\n}\n\n// src/actions/toLowerCase/toLowerCase.ts\nfunction toLowerCase() {\n return {\n kind: \"transformation\",\n type: \"to_lower_case\",\n reference: toLowerCase,\n async: false,\n \"~run\"(dataset) {\n dataset.value = dataset.value.toLowerCase();\n return dataset;\n }\n };\n}\n\n// src/actions/toMaxValue/toMaxValue.ts\nfunction toMaxValue(requirement) {\n return {\n kind: \"transformation\",\n type: \"to_max_value\",\n reference: toMaxValue,\n async: false,\n requirement,\n \"~run\"(dataset) {\n dataset.value = dataset.value > this.requirement ? this.requirement : dataset.value;\n return dataset;\n }\n };\n}\n\n// src/actions/toMinValue/toMinValue.ts\nfunction toMinValue(requirement) {\n return {\n kind: \"transformation\",\n type: \"to_min_value\",\n reference: toMinValue,\n async: false,\n requirement,\n \"~run\"(dataset) {\n dataset.value = dataset.value < this.requirement ? this.requirement : dataset.value;\n return dataset;\n }\n };\n}\n\n// src/actions/toUpperCase/toUpperCase.ts\nfunction toUpperCase() {\n return {\n kind: \"transformation\",\n type: \"to_upper_case\",\n reference: toUpperCase,\n async: false,\n \"~run\"(dataset) {\n dataset.value = dataset.value.toUpperCase();\n return dataset;\n }\n };\n}\n\n// src/actions/transform/transform.ts\nfunction transform(operation) {\n return {\n kind: \"transformation\",\n type: \"transform\",\n reference: transform,\n async: false,\n operation,\n \"~run\"(dataset) {\n dataset.value = this.operation(dataset.value);\n return dataset;\n }\n };\n}\n\n// src/actions/transform/transformAsync.ts\nfunction transformAsync(operation) {\n return {\n kind: \"transformation\",\n type: \"transform\",\n reference: transformAsync,\n async: true,\n operation,\n async \"~run\"(dataset) {\n dataset.value = await this.operation(dataset.value);\n return dataset;\n }\n };\n}\n\n// src/actions/trim/trim.ts\nfunction trim() {\n return {\n kind: \"transformation\",\n type: \"trim\",\n reference: trim,\n async: false,\n \"~run\"(dataset) {\n dataset.value = dataset.value.trim();\n return dataset;\n }\n };\n}\n\n// src/actions/trimEnd/trimEnd.ts\nfunction trimEnd() {\n return {\n kind: \"transformation\",\n type: \"trim_end\",\n reference: trimEnd,\n async: false,\n \"~run\"(dataset) {\n dataset.value = dataset.value.trimEnd();\n return dataset;\n }\n };\n}\n\n// src/actions/trimStart/trimStart.ts\nfunction trimStart() {\n return {\n kind: \"transformation\",\n type: \"trim_start\",\n reference: trimStart,\n async: false,\n \"~run\"(dataset) {\n dataset.value = dataset.value.trimStart();\n return dataset;\n }\n };\n}\n\n// src/actions/ulid/ulid.ts\nfunction ulid(message) {\n return {\n kind: \"validation\",\n type: \"ulid\",\n reference: ulid,\n async: false,\n expects: null,\n requirement: ULID_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"ULID\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/url/url.ts\nfunction url(message) {\n return {\n kind: \"validation\",\n type: \"url\",\n reference: url,\n async: false,\n expects: null,\n requirement(input) {\n try {\n new URL(input);\n return true;\n } catch {\n return false;\n }\n },\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement(dataset.value)) {\n _addIssue(this, \"URL\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/uuid/uuid.ts\nfunction uuid(message) {\n return {\n kind: \"validation\",\n type: \"uuid\",\n reference: uuid,\n async: false,\n expects: null,\n requirement: UUID_REGEX,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !this.requirement.test(dataset.value)) {\n _addIssue(this, \"UUID\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/actions/value/value.ts\nfunction value(requirement, message) {\n return {\n kind: \"validation\",\n type: \"value\",\n reference: value,\n async: false,\n expects: requirement instanceof Date ? requirement.toJSON() : _stringify(requirement),\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed && !(this.requirement <= dataset.value && this.requirement >= dataset.value)) {\n _addIssue(this, \"value\", dataset, config2, {\n received: dataset.value instanceof Date ? dataset.value.toJSON() : _stringify(dataset.value)\n });\n }\n return dataset;\n }\n };\n}\n\n// src/actions/words/words.ts\nfunction words(locales, requirement, message) {\n return {\n kind: \"validation\",\n type: \"words\",\n reference: words,\n async: false,\n expects: `${requirement}`,\n locales,\n requirement,\n message,\n \"~run\"(dataset, config2) {\n if (dataset.typed) {\n const count = _getWordCount(this.locales, dataset.value);\n if (count !== this.requirement) {\n _addIssue(this, \"words\", dataset, config2, {\n received: `${count}`\n });\n }\n }\n return dataset;\n }\n };\n}\n\n// src/methods/assert/assert.ts\nfunction assert(schema, input) {\n const issues = schema[\"~run\"]({ value: input }, { abortEarly: true }).issues;\n if (issues) {\n throw new ValiError(issues);\n }\n}\n\n// src/methods/config/config.ts\nfunction config(schema, config2) {\n return {\n ...schema,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config_) {\n return schema[\"~run\"](dataset, { ...config_, ...config2 });\n }\n };\n}\n\n// src/methods/getFallback/getFallback.ts\nfunction getFallback(schema, dataset, config2) {\n return typeof schema.fallback === \"function\" ? (\n // @ts-expect-error\n schema.fallback(dataset, config2)\n ) : (\n // @ts-expect-error\n schema.fallback\n );\n}\n\n// src/methods/fallback/fallback.ts\nfunction fallback(schema, fallback2) {\n return {\n ...schema,\n fallback: fallback2,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const outputDataset = schema[\"~run\"](dataset, config2);\n return outputDataset.issues ? { typed: true, value: getFallback(this, outputDataset, config2) } : outputDataset;\n }\n };\n}\n\n// src/methods/fallback/fallbackAsync.ts\nfunction fallbackAsync(schema, fallback2) {\n return {\n ...schema,\n fallback: fallback2,\n async: true,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const outputDataset = await schema[\"~run\"](dataset, config2);\n return outputDataset.issues ? {\n typed: true,\n value: await getFallback(this, outputDataset, config2)\n } : outputDataset;\n }\n };\n}\n\n// src/methods/flatten/flatten.ts\nfunction flatten(issues) {\n const flatErrors = {};\n for (const issue of issues) {\n if (issue.path) {\n const dotPath = getDotPath(issue);\n if (dotPath) {\n if (!flatErrors.nested) {\n flatErrors.nested = {};\n }\n if (flatErrors.nested[dotPath]) {\n flatErrors.nested[dotPath].push(issue.message);\n } else {\n flatErrors.nested[dotPath] = [issue.message];\n }\n } else {\n if (flatErrors.other) {\n flatErrors.other.push(issue.message);\n } else {\n flatErrors.other = [issue.message];\n }\n }\n } else {\n if (flatErrors.root) {\n flatErrors.root.push(issue.message);\n } else {\n flatErrors.root = [issue.message];\n }\n }\n }\n return flatErrors;\n}\n\n// src/methods/forward/forward.ts\nfunction forward(action, pathKeys) {\n return {\n ...action,\n \"~run\"(dataset, config2) {\n const prevIssues = dataset.issues && [...dataset.issues];\n dataset = action[\"~run\"](dataset, config2);\n if (dataset.issues) {\n for (const issue of dataset.issues) {\n if (!prevIssues?.includes(issue)) {\n let pathInput = dataset.value;\n for (const key of pathKeys) {\n const pathValue = pathInput[key];\n const pathItem = {\n type: \"unknown\",\n origin: \"value\",\n input: pathInput,\n key,\n value: pathValue\n };\n if (issue.path) {\n issue.path.push(pathItem);\n } else {\n issue.path = [pathItem];\n }\n if (!pathValue) {\n break;\n }\n pathInput = pathValue;\n }\n }\n }\n }\n return dataset;\n }\n };\n}\n\n// src/methods/forward/forwardAsync.ts\nfunction forwardAsync(action, pathKeys) {\n return {\n ...action,\n async: true,\n async \"~run\"(dataset, config2) {\n const prevIssues = dataset.issues && [...dataset.issues];\n dataset = await action[\"~run\"](dataset, config2);\n if (dataset.issues) {\n for (const issue of dataset.issues) {\n if (!prevIssues?.includes(issue)) {\n let pathInput = dataset.value;\n for (const key of pathKeys) {\n const pathValue = pathInput[key];\n const pathItem = {\n type: \"unknown\",\n origin: \"value\",\n input: pathInput,\n key,\n value: pathValue\n };\n if (issue.path) {\n issue.path.push(pathItem);\n } else {\n issue.path = [pathItem];\n }\n if (!pathValue) {\n break;\n }\n pathInput = pathValue;\n }\n }\n }\n }\n return dataset;\n }\n };\n}\n\n// src/methods/getDefault/getDefault.ts\nfunction getDefault(schema, dataset, config2) {\n return typeof schema.default === \"function\" ? (\n // @ts-expect-error\n schema.default(dataset, config2)\n ) : (\n // @ts-expect-error\n schema.default\n );\n}\n\n// src/methods/getDefaults/getDefaults.ts\nfunction getDefaults(schema) {\n if (\"entries\" in schema) {\n const object2 = {};\n for (const key in schema.entries) {\n object2[key] = getDefaults(schema.entries[key]);\n }\n return object2;\n }\n if (\"items\" in schema) {\n return schema.items.map(getDefaults);\n }\n return getDefault(schema);\n}\n\n// src/methods/getDefaults/getDefaultsAsync.ts\nasync function getDefaultsAsync(schema) {\n if (\"entries\" in schema) {\n return Object.fromEntries(\n await Promise.all(\n Object.entries(schema.entries).map(async ([key, value2]) => [\n key,\n await getDefaultsAsync(value2)\n ])\n )\n );\n }\n if (\"items\" in schema) {\n return Promise.all(schema.items.map(getDefaultsAsync));\n }\n return getDefault(schema);\n}\n\n// src/methods/getFallbacks/getFallbacks.ts\nfunction getFallbacks(schema) {\n if (\"entries\" in schema) {\n const object2 = {};\n for (const key in schema.entries) {\n object2[key] = getFallbacks(schema.entries[key]);\n }\n return object2;\n }\n if (\"items\" in schema) {\n return schema.items.map(getFallbacks);\n }\n return getFallback(schema);\n}\n\n// src/methods/getFallbacks/getFallbacksAsync.ts\nasync function getFallbacksAsync(schema) {\n if (\"entries\" in schema) {\n return Object.fromEntries(\n await Promise.all(\n Object.entries(schema.entries).map(async ([key, value2]) => [\n key,\n await getFallbacksAsync(value2)\n ])\n )\n );\n }\n if (\"items\" in schema) {\n return Promise.all(schema.items.map(getFallbacksAsync));\n }\n return getFallback(schema);\n}\n\n// src/methods/is/is.ts\nfunction is(schema, input) {\n return !schema[\"~run\"]({ value: input }, { abortEarly: true }).issues;\n}\n\n// src/schemas/any/any.ts\nfunction any() {\n return {\n kind: \"schema\",\n type: \"any\",\n reference: any,\n expects: \"any\",\n async: false,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset) {\n dataset.typed = true;\n return dataset;\n }\n };\n}\n\n// src/schemas/array/array.ts\nfunction array(item, message) {\n return {\n kind: \"schema\",\n type: \"array\",\n reference: array,\n expects: \"Array\",\n async: false,\n item,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n for (let key = 0; key < input.length; key++) {\n const value2 = input[key];\n const itemDataset = this.item[\"~run\"]({ value: value2 }, config2);\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/array/arrayAsync.ts\nfunction arrayAsync(item, message) {\n return {\n kind: \"schema\",\n type: \"array\",\n reference: arrayAsync,\n expects: \"Array\",\n async: true,\n item,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n const itemDatasets = await Promise.all(\n input.map((value2) => this.item[\"~run\"]({ value: value2 }, config2))\n );\n for (let key = 0; key < itemDatasets.length; key++) {\n const itemDataset = itemDatasets[key];\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: input[key]\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/bigint/bigint.ts\nfunction bigint(message) {\n return {\n kind: \"schema\",\n type: \"bigint\",\n reference: bigint,\n expects: \"bigint\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"bigint\") {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/blob/blob.ts\nfunction blob(message) {\n return {\n kind: \"schema\",\n type: \"blob\",\n reference: blob,\n expects: \"Blob\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value instanceof Blob) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/boolean/boolean.ts\nfunction boolean(message) {\n return {\n kind: \"schema\",\n type: \"boolean\",\n reference: boolean,\n expects: \"boolean\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"boolean\") {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/custom/custom.ts\nfunction custom(check2, message) {\n return {\n kind: \"schema\",\n type: \"custom\",\n reference: custom,\n expects: \"unknown\",\n async: false,\n check: check2,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (this.check(dataset.value)) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/custom/customAsync.ts\nfunction customAsync(check2, message) {\n return {\n kind: \"schema\",\n type: \"custom\",\n reference: customAsync,\n expects: \"unknown\",\n async: true,\n check: check2,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n if (await this.check(dataset.value)) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/date/date.ts\nfunction date(message) {\n return {\n kind: \"schema\",\n type: \"date\",\n reference: date,\n expects: \"Date\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value instanceof Date) {\n if (!isNaN(dataset.value)) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2, {\n received: '\"Invalid Date\"'\n });\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/enum/enum.ts\nfunction enum_(enum__, message) {\n const options = Object.entries(enum__).filter(([key]) => isNaN(+key)).map(([, value2]) => value2);\n return {\n kind: \"schema\",\n type: \"enum\",\n reference: enum_,\n expects: _joinExpects(options.map(_stringify), \"|\"),\n async: false,\n enum: enum__,\n options,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (this.options.includes(dataset.value)) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/file/file.ts\nfunction file(message) {\n return {\n kind: \"schema\",\n type: \"file\",\n reference: file,\n expects: \"File\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value instanceof File) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/function/function.ts\nfunction function_(message) {\n return {\n kind: \"schema\",\n type: \"function\",\n reference: function_,\n expects: \"Function\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"function\") {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/instance/instance.ts\nfunction instance(class_, message) {\n return {\n kind: \"schema\",\n type: \"instance\",\n reference: instance,\n expects: class_.name,\n async: false,\n class: class_,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value instanceof this.class) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/intersect/utils/_merge/_merge.ts\nfunction _merge(value1, value2) {\n if (typeof value1 === typeof value2) {\n if (value1 === value2 || value1 instanceof Date && value2 instanceof Date && +value1 === +value2) {\n return { value: value1 };\n }\n if (value1 && value2 && value1.constructor === Object && value2.constructor === Object) {\n for (const key in value2) {\n if (key in value1) {\n const dataset = _merge(value1[key], value2[key]);\n if (dataset.issue) {\n return dataset;\n }\n value1[key] = dataset.value;\n } else {\n value1[key] = value2[key];\n }\n }\n return { value: value1 };\n }\n if (Array.isArray(value1) && Array.isArray(value2)) {\n if (value1.length === value2.length) {\n for (let index = 0; index < value1.length; index++) {\n const dataset = _merge(value1[index], value2[index]);\n if (dataset.issue) {\n return dataset;\n }\n value1[index] = dataset.value;\n }\n return { value: value1 };\n }\n }\n }\n return { issue: true };\n}\n\n// src/schemas/intersect/intersect.ts\nfunction intersect(options, message) {\n return {\n kind: \"schema\",\n type: \"intersect\",\n reference: intersect,\n expects: _joinExpects(\n options.map((option) => option.expects),\n \"&\"\n ),\n async: false,\n options,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (this.options.length) {\n const input = dataset.value;\n let outputs;\n dataset.typed = true;\n for (const schema of this.options) {\n const optionDataset = schema[\"~run\"]({ value: input }, config2);\n if (optionDataset.issues) {\n if (dataset.issues) {\n dataset.issues.push(...optionDataset.issues);\n } else {\n dataset.issues = optionDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!optionDataset.typed) {\n dataset.typed = false;\n }\n if (dataset.typed) {\n if (outputs) {\n outputs.push(optionDataset.value);\n } else {\n outputs = [optionDataset.value];\n }\n }\n }\n if (dataset.typed) {\n dataset.value = outputs[0];\n for (let index = 1; index < outputs.length; index++) {\n const mergeDataset = _merge(dataset.value, outputs[index]);\n if (mergeDataset.issue) {\n _addIssue(this, \"type\", dataset, config2, {\n received: \"unknown\"\n });\n break;\n }\n dataset.value = mergeDataset.value;\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/intersect/intersectAsync.ts\nfunction intersectAsync(options, message) {\n return {\n kind: \"schema\",\n type: \"intersect\",\n reference: intersectAsync,\n expects: _joinExpects(\n options.map((option) => option.expects),\n \"&\"\n ),\n async: true,\n options,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n if (this.options.length) {\n const input = dataset.value;\n let outputs;\n dataset.typed = true;\n const optionDatasets = await Promise.all(\n this.options.map((schema) => schema[\"~run\"]({ value: input }, config2))\n );\n for (const optionDataset of optionDatasets) {\n if (optionDataset.issues) {\n if (dataset.issues) {\n dataset.issues.push(...optionDataset.issues);\n } else {\n dataset.issues = optionDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!optionDataset.typed) {\n dataset.typed = false;\n }\n if (dataset.typed) {\n if (outputs) {\n outputs.push(optionDataset.value);\n } else {\n outputs = [optionDataset.value];\n }\n }\n }\n if (dataset.typed) {\n dataset.value = outputs[0];\n for (let index = 1; index < outputs.length; index++) {\n const mergeDataset = _merge(dataset.value, outputs[index]);\n if (mergeDataset.issue) {\n _addIssue(this, \"type\", dataset, config2, {\n received: \"unknown\"\n });\n break;\n }\n dataset.value = mergeDataset.value;\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/lazy/lazy.ts\nfunction lazy(getter) {\n return {\n kind: \"schema\",\n type: \"lazy\",\n reference: lazy,\n expects: \"unknown\",\n async: false,\n getter,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n return this.getter(dataset.value)[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/lazy/lazyAsync.ts\nfunction lazyAsync(getter) {\n return {\n kind: \"schema\",\n type: \"lazy\",\n reference: lazyAsync,\n expects: \"unknown\",\n async: true,\n getter,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n return (await this.getter(dataset.value))[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/literal/literal.ts\nfunction literal(literal_, message) {\n return {\n kind: \"schema\",\n type: \"literal\",\n reference: literal,\n expects: _stringify(literal_),\n async: false,\n literal: literal_,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === this.literal) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/looseObject/looseObject.ts\nfunction looseObject(entries, message) {\n return {\n kind: \"schema\",\n type: \"loose_object\",\n reference: looseObject,\n expects: \"Object\",\n async: false,\n entries,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n for (const key in this.entries) {\n const value2 = input[key];\n const valueDataset = this.entries[key][\"~run\"]({ value: value2 }, config2);\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n if (valueDataset.value !== void 0 || key in input) {\n dataset.value[key] = valueDataset.value;\n }\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (const key in input) {\n if (_isValidObjectKey(input, key) && !(key in this.entries)) {\n dataset.value[key] = input[key];\n }\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/looseObject/looseObjectAsync.ts\nfunction looseObjectAsync(entries, message) {\n return {\n kind: \"schema\",\n type: \"loose_object\",\n reference: looseObjectAsync,\n expects: \"Object\",\n async: true,\n entries,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n const valueDatasets = await Promise.all(\n Object.entries(this.entries).map(async ([key, schema]) => {\n const value2 = input[key];\n return [\n key,\n value2,\n await schema[\"~run\"]({ value: value2 }, config2)\n ];\n })\n );\n for (const [key, value2, valueDataset] of valueDatasets) {\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n if (valueDataset.value !== void 0 || key in input) {\n dataset.value[key] = valueDataset.value;\n }\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (const key in input) {\n if (_isValidObjectKey(input, key) && !(key in this.entries)) {\n dataset.value[key] = input[key];\n }\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/looseTuple/looseTuple.ts\nfunction looseTuple(items, message) {\n return {\n kind: \"schema\",\n type: \"loose_tuple\",\n reference: looseTuple,\n expects: \"Array\",\n async: false,\n items,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n for (let key = 0; key < this.items.length; key++) {\n const value2 = input[key];\n const itemDataset = this.items[key][\"~run\"]({ value: value2 }, config2);\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (let key = this.items.length; key < input.length; key++) {\n dataset.value.push(input[key]);\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/looseTuple/looseTupleAsync.ts\nfunction looseTupleAsync(items, message) {\n return {\n kind: \"schema\",\n type: \"loose_tuple\",\n reference: looseTupleAsync,\n expects: \"Array\",\n async: true,\n items,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n const itemDatasets = await Promise.all(\n this.items.map(async (item, key) => {\n const value2 = input[key];\n return [key, value2, await item[\"~run\"]({ value: value2 }, config2)];\n })\n );\n for (const [key, value2, itemDataset] of itemDatasets) {\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (let key = this.items.length; key < input.length; key++) {\n dataset.value.push(input[key]);\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/map/map.ts\nfunction map(key, value2, message) {\n return {\n kind: \"schema\",\n type: \"map\",\n reference: map,\n expects: \"Map\",\n async: false,\n key,\n value: value2,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input instanceof Map) {\n dataset.typed = true;\n dataset.value = /* @__PURE__ */ new Map();\n for (const [inputKey, inputValue] of input) {\n const keyDataset = this.key[\"~run\"]({ value: inputKey }, config2);\n if (keyDataset.issues) {\n const pathItem = {\n type: \"map\",\n origin: \"key\",\n input,\n key: inputKey,\n value: inputValue\n };\n for (const issue of keyDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = keyDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n const valueDataset = this.value[\"~run\"](\n { value: inputValue },\n config2\n );\n if (valueDataset.issues) {\n const pathItem = {\n type: \"map\",\n origin: \"value\",\n input,\n key: inputKey,\n value: inputValue\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!keyDataset.typed || !valueDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.set(keyDataset.value, valueDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/map/mapAsync.ts\nfunction mapAsync(key, value2, message) {\n return {\n kind: \"schema\",\n type: \"map\",\n reference: mapAsync,\n expects: \"Map\",\n async: true,\n key,\n value: value2,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input instanceof Map) {\n dataset.typed = true;\n dataset.value = /* @__PURE__ */ new Map();\n const datasets = await Promise.all(\n [...input].map(\n ([inputKey, inputValue]) => Promise.all([\n inputKey,\n inputValue,\n this.key[\"~run\"]({ value: inputKey }, config2),\n this.value[\"~run\"]({ value: inputValue }, config2)\n ])\n )\n );\n for (const [\n inputKey,\n inputValue,\n keyDataset,\n valueDataset\n ] of datasets) {\n if (keyDataset.issues) {\n const pathItem = {\n type: \"map\",\n origin: \"key\",\n input,\n key: inputKey,\n value: inputValue\n };\n for (const issue of keyDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = keyDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (valueDataset.issues) {\n const pathItem = {\n type: \"map\",\n origin: \"value\",\n input,\n key: inputKey,\n value: inputValue\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!keyDataset.typed || !valueDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.set(keyDataset.value, valueDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/nan/nan.ts\nfunction nan(message) {\n return {\n kind: \"schema\",\n type: \"nan\",\n reference: nan,\n expects: \"NaN\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (Number.isNaN(dataset.value)) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/never/never.ts\nfunction never(message) {\n return {\n kind: \"schema\",\n type: \"never\",\n reference: never,\n expects: \"never\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n _addIssue(this, \"type\", dataset, config2);\n return dataset;\n }\n };\n}\n\n// src/schemas/nonNullable/nonNullable.ts\nfunction nonNullable(wrapped, message) {\n return {\n kind: \"schema\",\n type: \"non_nullable\",\n reference: nonNullable,\n expects: \"!null\",\n async: false,\n wrapped,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value !== null) {\n dataset = this.wrapped[\"~run\"](dataset, config2);\n }\n if (dataset.value === null) {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/nonNullable/nonNullableAsync.ts\nfunction nonNullableAsync(wrapped, message) {\n return {\n kind: \"schema\",\n type: \"non_nullable\",\n reference: nonNullableAsync,\n expects: \"!null\",\n async: true,\n wrapped,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n if (dataset.value !== null) {\n dataset = await this.wrapped[\"~run\"](dataset, config2);\n }\n if (dataset.value === null) {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/nonNullish/nonNullish.ts\nfunction nonNullish(wrapped, message) {\n return {\n kind: \"schema\",\n type: \"non_nullish\",\n reference: nonNullish,\n expects: \"(!null & !undefined)\",\n async: false,\n wrapped,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (!(dataset.value === null || dataset.value === void 0)) {\n dataset = this.wrapped[\"~run\"](dataset, config2);\n }\n if (dataset.value === null || dataset.value === void 0) {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/nonNullish/nonNullishAsync.ts\nfunction nonNullishAsync(wrapped, message) {\n return {\n kind: \"schema\",\n type: \"non_nullish\",\n reference: nonNullishAsync,\n expects: \"(!null & !undefined)\",\n async: true,\n wrapped,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n if (!(dataset.value === null || dataset.value === void 0)) {\n dataset = await this.wrapped[\"~run\"](dataset, config2);\n }\n if (dataset.value === null || dataset.value === void 0) {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/nonOptional/nonOptional.ts\nfunction nonOptional(wrapped, message) {\n return {\n kind: \"schema\",\n type: \"non_optional\",\n reference: nonOptional,\n expects: \"!undefined\",\n async: false,\n wrapped,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value !== void 0) {\n dataset = this.wrapped[\"~run\"](dataset, config2);\n }\n if (dataset.value === void 0) {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/nonOptional/nonOptionalAsync.ts\nfunction nonOptionalAsync(wrapped, message) {\n return {\n kind: \"schema\",\n type: \"non_optional\",\n reference: nonOptionalAsync,\n expects: \"!undefined\",\n async: true,\n wrapped,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n if (dataset.value !== void 0) {\n dataset = await this.wrapped[\"~run\"](dataset, config2);\n }\n if (dataset.value === void 0) {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/null/null.ts\nfunction null_(message) {\n return {\n kind: \"schema\",\n type: \"null\",\n reference: null_,\n expects: \"null\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === null) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/nullable/nullable.ts\nfunction nullable(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"nullable\",\n reference: nullable,\n expects: `(${wrapped.expects} | null)`,\n async: false,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === null) {\n if (this.default !== void 0) {\n dataset.value = getDefault(this, dataset, config2);\n }\n if (dataset.value === null) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/nullable/nullableAsync.ts\nfunction nullableAsync(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"nullable\",\n reference: nullableAsync,\n expects: `(${wrapped.expects} | null)`,\n async: true,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n if (dataset.value === null) {\n if (this.default !== void 0) {\n dataset.value = await getDefault(this, dataset, config2);\n }\n if (dataset.value === null) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/nullish/nullish.ts\nfunction nullish(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"nullish\",\n reference: nullish,\n expects: `(${wrapped.expects} | null | undefined)`,\n async: false,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === null || dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = getDefault(this, dataset, config2);\n }\n if (dataset.value === null || dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/nullish/nullishAsync.ts\nfunction nullishAsync(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"nullish\",\n reference: nullishAsync,\n expects: `(${wrapped.expects} | null | undefined)`,\n async: true,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n if (dataset.value === null || dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = await getDefault(this, dataset, config2);\n }\n if (dataset.value === null || dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/number/number.ts\nfunction number(message) {\n return {\n kind: \"schema\",\n type: \"number\",\n reference: number,\n expects: \"number\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"number\" && !isNaN(dataset.value)) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/object/object.ts\nfunction object(entries, message) {\n return {\n kind: \"schema\",\n type: \"object\",\n reference: object,\n expects: \"Object\",\n async: false,\n entries,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n for (const key in this.entries) {\n const value2 = input[key];\n const valueDataset = this.entries[key][\"~run\"]({ value: value2 }, config2);\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n if (valueDataset.value !== void 0 || key in input) {\n dataset.value[key] = valueDataset.value;\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/object/objectAsync.ts\nfunction objectAsync(entries, message) {\n return {\n kind: \"schema\",\n type: \"object\",\n reference: objectAsync,\n expects: \"Object\",\n async: true,\n entries,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n const valueDatasets = await Promise.all(\n Object.entries(this.entries).map(async ([key, schema]) => {\n const value2 = input[key];\n return [\n key,\n value2,\n await schema[\"~run\"]({ value: value2 }, config2)\n ];\n })\n );\n for (const [key, value2, valueDataset] of valueDatasets) {\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n if (valueDataset.value !== void 0 || key in input) {\n dataset.value[key] = valueDataset.value;\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/objectWithRest/objectWithRest.ts\nfunction objectWithRest(entries, rest, message) {\n return {\n kind: \"schema\",\n type: \"object_with_rest\",\n reference: objectWithRest,\n expects: \"Object\",\n async: false,\n entries,\n rest,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n for (const key in this.entries) {\n const value2 = input[key];\n const valueDataset = this.entries[key][\"~run\"]({ value: value2 }, config2);\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n if (valueDataset.value !== void 0 || key in input) {\n dataset.value[key] = valueDataset.value;\n }\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (const key in input) {\n if (_isValidObjectKey(input, key) && !(key in this.entries)) {\n const value2 = input[key];\n const valueDataset = this.rest[\"~run\"]({ value: value2 }, config2);\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n dataset.value[key] = valueDataset.value;\n }\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/objectWithRest/objectWithRestAsync.ts\nfunction objectWithRestAsync(entries, rest, message) {\n return {\n kind: \"schema\",\n type: \"object_with_rest\",\n reference: objectWithRestAsync,\n expects: \"Object\",\n async: true,\n entries,\n rest,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n const [normalDatasets, restDatasets] = await Promise.all([\n // Parse schema of each normal entry\n // Hint: We do not distinguish between missing and `undefined` entries.\n // The reason for this decision is that it reduces the bundle size, and\n // we also expect that most users will expect this behavior.\n Promise.all(\n Object.entries(this.entries).map(async ([key, schema]) => {\n const value2 = input[key];\n return [\n key,\n value2,\n await schema[\"~run\"]({ value: value2 }, config2)\n ];\n })\n ),\n // Parse other entries with rest schema\n // Hint: We exclude specific keys for security reasons\n Promise.all(\n Object.entries(input).filter(\n ([key]) => _isValidObjectKey(input, key) && !(key in this.entries)\n ).map(\n async ([key, value2]) => [\n key,\n value2,\n await this.rest[\"~run\"]({ value: value2 }, config2)\n ]\n )\n )\n ]);\n for (const [key, value2, valueDataset] of normalDatasets) {\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n if (valueDataset.value !== void 0 || key in input) {\n dataset.value[key] = valueDataset.value;\n }\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (const [key, value2, valueDataset] of restDatasets) {\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n dataset.value[key] = valueDataset.value;\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/optional/optional.ts\nfunction optional(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"optional\",\n reference: optional,\n expects: `(${wrapped.expects} | undefined)`,\n async: false,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = getDefault(this, dataset, config2);\n }\n if (dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/optional/optionalAsync.ts\nfunction optionalAsync(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"optional\",\n reference: optionalAsync,\n expects: `(${wrapped.expects} | undefined)`,\n async: true,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n if (dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = await getDefault(this, dataset, config2);\n }\n if (dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/picklist/picklist.ts\nfunction picklist(options, message) {\n return {\n kind: \"schema\",\n type: \"picklist\",\n reference: picklist,\n expects: _joinExpects(options.map(_stringify), \"|\"),\n async: false,\n options,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (this.options.includes(dataset.value)) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/promise/promise.ts\nfunction promise(message) {\n return {\n kind: \"schema\",\n type: \"promise\",\n reference: promise,\n expects: \"Promise\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value instanceof Promise) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/record/record.ts\nfunction record(key, value2, message) {\n return {\n kind: \"schema\",\n type: \"record\",\n reference: record,\n expects: \"Object\",\n async: false,\n key,\n value: value2,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n for (const entryKey in input) {\n if (_isValidObjectKey(input, entryKey)) {\n const entryValue = input[entryKey];\n const keyDataset = this.key[\"~run\"]({ value: entryKey }, config2);\n if (keyDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"key\",\n input,\n key: entryKey,\n value: entryValue\n };\n for (const issue of keyDataset.issues) {\n issue.path = [pathItem];\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = keyDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n const valueDataset = this.value[\"~run\"](\n { value: entryValue },\n config2\n );\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key: entryKey,\n value: entryValue\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!keyDataset.typed || !valueDataset.typed) {\n dataset.typed = false;\n }\n if (keyDataset.typed) {\n dataset.value[keyDataset.value] = valueDataset.value;\n }\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/record/recordAsync.ts\nfunction recordAsync(key, value2, message) {\n return {\n kind: \"schema\",\n type: \"record\",\n reference: recordAsync,\n expects: \"Object\",\n async: true,\n key,\n value: value2,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n const datasets = await Promise.all(\n Object.entries(input).filter(([key2]) => _isValidObjectKey(input, key2)).map(\n ([entryKey, entryValue]) => Promise.all([\n entryKey,\n entryValue,\n this.key[\"~run\"]({ value: entryKey }, config2),\n this.value[\"~run\"]({ value: entryValue }, config2)\n ])\n )\n );\n for (const [\n entryKey,\n entryValue,\n keyDataset,\n valueDataset\n ] of datasets) {\n if (keyDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"key\",\n input,\n key: entryKey,\n value: entryValue\n };\n for (const issue of keyDataset.issues) {\n issue.path = [pathItem];\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = keyDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key: entryKey,\n value: entryValue\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!keyDataset.typed || !valueDataset.typed) {\n dataset.typed = false;\n }\n if (keyDataset.typed) {\n dataset.value[keyDataset.value] = valueDataset.value;\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/set/set.ts\nfunction set(value2, message) {\n return {\n kind: \"schema\",\n type: \"set\",\n reference: set,\n expects: \"Set\",\n async: false,\n value: value2,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input instanceof Set) {\n dataset.typed = true;\n dataset.value = /* @__PURE__ */ new Set();\n for (const inputValue of input) {\n const valueDataset = this.value[\"~run\"](\n { value: inputValue },\n config2\n );\n if (valueDataset.issues) {\n const pathItem = {\n type: \"set\",\n origin: \"value\",\n input,\n key: null,\n value: inputValue\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.add(valueDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/set/setAsync.ts\nfunction setAsync(value2, message) {\n return {\n kind: \"schema\",\n type: \"set\",\n reference: setAsync,\n expects: \"Set\",\n async: true,\n value: value2,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input instanceof Set) {\n dataset.typed = true;\n dataset.value = /* @__PURE__ */ new Set();\n const valueDatasets = await Promise.all(\n [...input].map(\n async (inputValue) => [\n inputValue,\n await this.value[\"~run\"]({ value: inputValue }, config2)\n ]\n )\n );\n for (const [inputValue, valueDataset] of valueDatasets) {\n if (valueDataset.issues) {\n const pathItem = {\n type: \"set\",\n origin: \"value\",\n input,\n key: null,\n value: inputValue\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.add(valueDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/strictObject/strictObject.ts\nfunction strictObject(entries, message) {\n return {\n kind: \"schema\",\n type: \"strict_object\",\n reference: strictObject,\n expects: \"Object\",\n async: false,\n entries,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n for (const key in this.entries) {\n const value2 = input[key];\n const valueDataset = this.entries[key][\"~run\"]({ value: value2 }, config2);\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n if (valueDataset.value !== void 0 || key in input) {\n dataset.value[key] = valueDataset.value;\n }\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (const key in input) {\n if (!(key in this.entries)) {\n const value2 = input[key];\n _addIssue(this, \"type\", dataset, config2, {\n input: value2,\n expected: \"never\",\n path: [\n {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n }\n ]\n });\n break;\n }\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/strictObject/strictObjectAsync.ts\nfunction strictObjectAsync(entries, message) {\n return {\n kind: \"schema\",\n type: \"strict_object\",\n reference: strictObjectAsync,\n expects: \"Object\",\n async: true,\n entries,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n dataset.typed = true;\n dataset.value = {};\n const valueDatasets = await Promise.all(\n Object.entries(this.entries).map(async ([key, schema]) => {\n const value2 = input[key];\n return [\n key,\n value2,\n await schema[\"~run\"]({ value: value2 }, config2)\n ];\n })\n );\n for (const [key, value2, valueDataset] of valueDatasets) {\n if (valueDataset.issues) {\n const pathItem = {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of valueDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = valueDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!valueDataset.typed) {\n dataset.typed = false;\n }\n if (valueDataset.value !== void 0 || key in input) {\n dataset.value[key] = valueDataset.value;\n }\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (const key in input) {\n if (!(key in this.entries)) {\n const value2 = input[key];\n _addIssue(this, \"type\", dataset, config2, {\n input: value2,\n expected: \"never\",\n path: [\n {\n type: \"object\",\n origin: \"value\",\n input,\n key,\n value: value2\n }\n ]\n });\n break;\n }\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/strictTuple/strictTuple.ts\nfunction strictTuple(items, message) {\n return {\n kind: \"schema\",\n type: \"strict_tuple\",\n reference: strictTuple,\n expects: \"Array\",\n async: false,\n items,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n for (let key = 0; key < this.items.length; key++) {\n const value2 = input[key];\n const itemDataset = this.items[key][\"~run\"]({ value: value2 }, config2);\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n if (!(dataset.issues && config2.abortEarly) && this.items.length < input.length) {\n const value2 = input[items.length];\n _addIssue(this, \"type\", dataset, config2, {\n input: value2,\n expected: \"never\",\n path: [\n {\n type: \"array\",\n origin: \"value\",\n input,\n key: this.items.length,\n value: value2\n }\n ]\n });\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/strictTuple/strictTupleAsync.ts\nfunction strictTupleAsync(items, message) {\n return {\n kind: \"schema\",\n type: \"strict_tuple\",\n reference: strictTupleAsync,\n expects: \"Array\",\n async: true,\n items,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n const itemDatasets = await Promise.all(\n this.items.map(async (item, key) => {\n const value2 = input[key];\n return [key, value2, await item[\"~run\"]({ value: value2 }, config2)];\n })\n );\n for (const [key, value2, itemDataset] of itemDatasets) {\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n if (!(dataset.issues && config2.abortEarly) && this.items.length < input.length) {\n const value2 = input[items.length];\n _addIssue(this, \"type\", dataset, config2, {\n input: value2,\n expected: \"never\",\n path: [\n {\n type: \"array\",\n origin: \"value\",\n input,\n key: this.items.length,\n value: value2\n }\n ]\n });\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/string/string.ts\nfunction string(message) {\n return {\n kind: \"schema\",\n type: \"string\",\n reference: string,\n expects: \"string\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"string\") {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/symbol/symbol.ts\nfunction symbol(message) {\n return {\n kind: \"schema\",\n type: \"symbol\",\n reference: symbol,\n expects: \"symbol\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (typeof dataset.value === \"symbol\") {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/tuple/tuple.ts\nfunction tuple(items, message) {\n return {\n kind: \"schema\",\n type: \"tuple\",\n reference: tuple,\n expects: \"Array\",\n async: false,\n items,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n for (let key = 0; key < this.items.length; key++) {\n const value2 = input[key];\n const itemDataset = this.items[key][\"~run\"]({ value: value2 }, config2);\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/tuple/tupleAsync.ts\nfunction tupleAsync(items, message) {\n return {\n kind: \"schema\",\n type: \"tuple\",\n reference: tupleAsync,\n expects: \"Array\",\n async: true,\n items,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n const itemDatasets = await Promise.all(\n this.items.map(async (item, key) => {\n const value2 = input[key];\n return [key, value2, await item[\"~run\"]({ value: value2 }, config2)];\n })\n );\n for (const [key, value2, itemDataset] of itemDatasets) {\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/tupleWithRest/tupleWithRest.ts\nfunction tupleWithRest(items, rest, message) {\n return {\n kind: \"schema\",\n type: \"tuple_with_rest\",\n reference: tupleWithRest,\n expects: \"Array\",\n async: false,\n items,\n rest,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n for (let key = 0; key < this.items.length; key++) {\n const value2 = input[key];\n const itemDataset = this.items[key][\"~run\"]({ value: value2 }, config2);\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (let key = this.items.length; key < input.length; key++) {\n const value2 = input[key];\n const itemDataset = this.rest[\"~run\"]({ value: value2 }, config2);\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/tupleWithRest/tupleWithRestAsync.ts\nfunction tupleWithRestAsync(items, rest, message) {\n return {\n kind: \"schema\",\n type: \"tuple_with_rest\",\n reference: tupleWithRestAsync,\n expects: \"Array\",\n async: true,\n items,\n rest,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (Array.isArray(input)) {\n dataset.typed = true;\n dataset.value = [];\n const [normalDatasets, restDatasets] = await Promise.all([\n // Parse schema of each normal item\n Promise.all(\n this.items.map(async (item, key) => {\n const value2 = input[key];\n return [\n key,\n value2,\n await item[\"~run\"]({ value: value2 }, config2)\n ];\n })\n ),\n // Parse other items with rest schema\n Promise.all(\n input.slice(this.items.length).map(async (value2, key) => {\n return [\n key + this.items.length,\n value2,\n await this.rest[\"~run\"]({ value: value2 }, config2)\n ];\n })\n )\n ]);\n for (const [key, value2, itemDataset] of normalDatasets) {\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n if (!dataset.issues || !config2.abortEarly) {\n for (const [key, value2, itemDataset] of restDatasets) {\n if (itemDataset.issues) {\n const pathItem = {\n type: \"array\",\n origin: \"value\",\n input,\n key,\n value: value2\n };\n for (const issue of itemDataset.issues) {\n if (issue.path) {\n issue.path.unshift(pathItem);\n } else {\n issue.path = [pathItem];\n }\n dataset.issues?.push(issue);\n }\n if (!dataset.issues) {\n dataset.issues = itemDataset.issues;\n }\n if (config2.abortEarly) {\n dataset.typed = false;\n break;\n }\n }\n if (!itemDataset.typed) {\n dataset.typed = false;\n }\n dataset.value.push(itemDataset.value);\n }\n }\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/undefined/undefined.ts\nfunction undefined_(message) {\n return {\n kind: \"schema\",\n type: \"undefined\",\n reference: undefined_,\n expects: \"undefined\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === void 0) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/undefinedable/undefinedable.ts\nfunction undefinedable(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"undefinedable\",\n reference: undefinedable,\n expects: `(${wrapped.expects} | undefined)`,\n async: false,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = getDefault(this, dataset, config2);\n }\n if (dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/undefinedable/undefinedableAsync.ts\nfunction undefinedableAsync(wrapped, default_) {\n return {\n kind: \"schema\",\n type: \"undefinedable\",\n reference: undefinedableAsync,\n expects: `(${wrapped.expects} | undefined)`,\n async: true,\n wrapped,\n default: default_,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n if (dataset.value === void 0) {\n if (this.default !== void 0) {\n dataset.value = await getDefault(this, dataset, config2);\n }\n if (dataset.value === void 0) {\n dataset.typed = true;\n return dataset;\n }\n }\n return this.wrapped[\"~run\"](dataset, config2);\n }\n };\n}\n\n// src/schemas/union/utils/_subIssues/_subIssues.ts\nfunction _subIssues(datasets) {\n let issues;\n if (datasets) {\n for (const dataset of datasets) {\n if (issues) {\n issues.push(...dataset.issues);\n } else {\n issues = dataset.issues;\n }\n }\n }\n return issues;\n}\n\n// src/schemas/union/union.ts\nfunction union(options, message) {\n return {\n kind: \"schema\",\n type: \"union\",\n reference: union,\n expects: _joinExpects(\n options.map((option) => option.expects),\n \"|\"\n ),\n async: false,\n options,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n let validDataset;\n let typedDatasets;\n let untypedDatasets;\n for (const schema of this.options) {\n const optionDataset = schema[\"~run\"]({ value: dataset.value }, config2);\n if (optionDataset.typed) {\n if (optionDataset.issues) {\n if (typedDatasets) {\n typedDatasets.push(optionDataset);\n } else {\n typedDatasets = [optionDataset];\n }\n } else {\n validDataset = optionDataset;\n break;\n }\n } else {\n if (untypedDatasets) {\n untypedDatasets.push(optionDataset);\n } else {\n untypedDatasets = [optionDataset];\n }\n }\n }\n if (validDataset) {\n return validDataset;\n }\n if (typedDatasets) {\n if (typedDatasets.length === 1) {\n return typedDatasets[0];\n }\n _addIssue(this, \"type\", dataset, config2, {\n issues: _subIssues(typedDatasets)\n });\n dataset.typed = true;\n } else if (untypedDatasets?.length === 1) {\n return untypedDatasets[0];\n } else {\n _addIssue(this, \"type\", dataset, config2, {\n issues: _subIssues(untypedDatasets)\n });\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/union/unionAsync.ts\nfunction unionAsync(options, message) {\n return {\n kind: \"schema\",\n type: \"union\",\n reference: unionAsync,\n expects: _joinExpects(\n options.map((option) => option.expects),\n \"|\"\n ),\n async: true,\n options,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n let validDataset;\n let typedDatasets;\n let untypedDatasets;\n for (const schema of this.options) {\n const optionDataset = await schema[\"~run\"](\n { value: dataset.value },\n config2\n );\n if (optionDataset.typed) {\n if (optionDataset.issues) {\n if (typedDatasets) {\n typedDatasets.push(optionDataset);\n } else {\n typedDatasets = [optionDataset];\n }\n } else {\n validDataset = optionDataset;\n break;\n }\n } else {\n if (untypedDatasets) {\n untypedDatasets.push(optionDataset);\n } else {\n untypedDatasets = [optionDataset];\n }\n }\n }\n if (validDataset) {\n return validDataset;\n }\n if (typedDatasets) {\n if (typedDatasets.length === 1) {\n return typedDatasets[0];\n }\n _addIssue(this, \"type\", dataset, config2, {\n issues: _subIssues(typedDatasets)\n });\n dataset.typed = true;\n } else if (untypedDatasets?.length === 1) {\n return untypedDatasets[0];\n } else {\n _addIssue(this, \"type\", dataset, config2, {\n issues: _subIssues(untypedDatasets)\n });\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/unknown/unknown.ts\nfunction unknown() {\n return {\n kind: \"schema\",\n type: \"unknown\",\n reference: unknown,\n expects: \"unknown\",\n async: false,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset) {\n dataset.typed = true;\n return dataset;\n }\n };\n}\n\n// src/schemas/variant/variant.ts\nfunction variant(key, options, message) {\n return {\n kind: \"schema\",\n type: \"variant\",\n reference: variant,\n expects: \"Object\",\n async: false,\n key,\n options,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n let outputDataset;\n let maxDiscriminatorPriority = 0;\n let invalidDiscriminatorKey = this.key;\n let expectedDiscriminators = [];\n const parseOptions = (variant2, allKeys) => {\n for (const schema of variant2.options) {\n if (schema.type === \"variant\") {\n parseOptions(schema, new Set(allKeys).add(schema.key));\n } else {\n let keysAreValid = true;\n let currentPriority = 0;\n for (const currentKey of allKeys) {\n if (schema.entries[currentKey][\"~run\"](\n // @ts-expect-error\n { typed: false, value: input[currentKey] },\n config2\n ).issues) {\n keysAreValid = false;\n if (invalidDiscriminatorKey !== currentKey && (maxDiscriminatorPriority < currentPriority || maxDiscriminatorPriority === currentPriority && currentKey in input && !(invalidDiscriminatorKey in input))) {\n maxDiscriminatorPriority = currentPriority;\n invalidDiscriminatorKey = currentKey;\n expectedDiscriminators = [];\n }\n if (invalidDiscriminatorKey === currentKey) {\n expectedDiscriminators.push(\n schema.entries[currentKey].expects\n );\n }\n break;\n }\n currentPriority++;\n }\n if (keysAreValid) {\n const optionDataset = schema[\"~run\"]({ value: input }, config2);\n if (!outputDataset || !outputDataset.typed && optionDataset.typed) {\n outputDataset = optionDataset;\n }\n }\n }\n if (outputDataset && !outputDataset.issues) {\n break;\n }\n }\n };\n parseOptions(this, /* @__PURE__ */ new Set([this.key]));\n if (outputDataset) {\n return outputDataset;\n }\n _addIssue(this, \"type\", dataset, config2, {\n // @ts-expect-error\n input: input[invalidDiscriminatorKey],\n expected: _joinExpects(expectedDiscriminators, \"|\"),\n path: [\n {\n type: \"object\",\n origin: \"value\",\n input,\n key: invalidDiscriminatorKey,\n // @ts-expect-error\n value: input[invalidDiscriminatorKey]\n }\n ]\n });\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/variant/variantAsync.ts\nfunction variantAsync(key, options, message) {\n return {\n kind: \"schema\",\n type: \"variant\",\n reference: variantAsync,\n expects: \"Object\",\n async: true,\n key,\n options,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n const input = dataset.value;\n if (input && typeof input === \"object\") {\n let outputDataset;\n let maxDiscriminatorPriority = 0;\n let invalidDiscriminatorKey = this.key;\n let expectedDiscriminators = [];\n const parseOptions = async (variant2, allKeys) => {\n for (const schema of variant2.options) {\n if (schema.type === \"variant\") {\n await parseOptions(schema, new Set(allKeys).add(schema.key));\n } else {\n let keysAreValid = true;\n let currentPriority = 0;\n for (const currentKey of allKeys) {\n if ((await schema.entries[currentKey][\"~run\"](\n // @ts-expect-error\n { typed: false, value: input[currentKey] },\n config2\n )).issues) {\n keysAreValid = false;\n if (invalidDiscriminatorKey !== currentKey && (maxDiscriminatorPriority < currentPriority || maxDiscriminatorPriority === currentPriority && currentKey in input && !(invalidDiscriminatorKey in input))) {\n maxDiscriminatorPriority = currentPriority;\n invalidDiscriminatorKey = currentKey;\n expectedDiscriminators = [];\n }\n if (invalidDiscriminatorKey === currentKey) {\n expectedDiscriminators.push(\n schema.entries[currentKey].expects\n );\n }\n break;\n }\n currentPriority++;\n }\n if (keysAreValid) {\n const optionDataset = await schema[\"~run\"](\n { value: input },\n config2\n );\n if (!outputDataset || !outputDataset.typed && optionDataset.typed) {\n outputDataset = optionDataset;\n }\n }\n }\n if (outputDataset && !outputDataset.issues) {\n break;\n }\n }\n };\n await parseOptions(this, /* @__PURE__ */ new Set([this.key]));\n if (outputDataset) {\n return outputDataset;\n }\n _addIssue(this, \"type\", dataset, config2, {\n // @ts-expect-error\n input: input[invalidDiscriminatorKey],\n expected: _joinExpects(expectedDiscriminators, \"|\"),\n path: [\n {\n type: \"object\",\n origin: \"value\",\n input,\n key: invalidDiscriminatorKey,\n // @ts-expect-error\n value: input[invalidDiscriminatorKey]\n }\n ]\n });\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/schemas/void/void.ts\nfunction void_(message) {\n return {\n kind: \"schema\",\n type: \"void\",\n reference: void_,\n expects: \"void\",\n async: false,\n message,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n if (dataset.value === void 0) {\n dataset.typed = true;\n } else {\n _addIssue(this, \"type\", dataset, config2);\n }\n return dataset;\n }\n };\n}\n\n// src/methods/keyof/keyof.ts\nfunction keyof(schema, message) {\n return picklist(Object.keys(schema.entries), message);\n}\n\n// src/methods/omit/omit.ts\nfunction omit(schema, keys) {\n const entries = {\n ...schema.entries\n };\n for (const key of keys) {\n delete entries[key];\n }\n return {\n ...schema,\n entries,\n get \"~standard\"() {\n return _getStandardProps(this);\n }\n };\n}\n\n// src/methods/parse/parse.ts\nfunction parse(schema, input, config2) {\n const dataset = schema[\"~run\"]({ value: input }, getGlobalConfig(config2));\n if (dataset.issues) {\n throw new ValiError(dataset.issues);\n }\n return dataset.value;\n}\n\n// src/methods/parse/parseAsync.ts\nasync function parseAsync(schema, input, config2) {\n const dataset = await schema[\"~run\"](\n { value: input },\n getGlobalConfig(config2)\n );\n if (dataset.issues) {\n throw new ValiError(dataset.issues);\n }\n return dataset.value;\n}\n\n// src/methods/parser/parser.ts\nfunction parser(schema, config2) {\n const func = (input) => parse(schema, input, config2);\n func.schema = schema;\n func.config = config2;\n return func;\n}\n\n// src/methods/parser/parserAsync.ts\nfunction parserAsync(schema, config2) {\n const func = (input) => parseAsync(schema, input, config2);\n func.schema = schema;\n func.config = config2;\n return func;\n}\n\n// src/methods/partial/partial.ts\nfunction partial(schema, keys) {\n const entries = {};\n for (const key in schema.entries) {\n entries[key] = !keys || keys.includes(key) ? optional(schema.entries[key]) : schema.entries[key];\n }\n return {\n ...schema,\n entries,\n get \"~standard\"() {\n return _getStandardProps(this);\n }\n };\n}\n\n// src/methods/partial/partialAsync.ts\nfunction partialAsync(schema, keys) {\n const entries = {};\n for (const key in schema.entries) {\n entries[key] = !keys || keys.includes(key) ? optionalAsync(schema.entries[key]) : schema.entries[key];\n }\n return {\n ...schema,\n entries,\n get \"~standard\"() {\n return _getStandardProps(this);\n }\n };\n}\n\n// src/methods/pick/pick.ts\nfunction pick(schema, keys) {\n const entries = {};\n for (const key of keys) {\n entries[key] = schema.entries[key];\n }\n return {\n ...schema,\n entries,\n get \"~standard\"() {\n return _getStandardProps(this);\n }\n };\n}\n\n// src/methods/pipe/pipe.ts\nfunction pipe(...pipe2) {\n return {\n ...pipe2[0],\n pipe: pipe2,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n \"~run\"(dataset, config2) {\n for (const item of pipe2) {\n if (item.kind !== \"metadata\") {\n if (dataset.issues && (item.kind === \"schema\" || item.kind === \"transformation\")) {\n dataset.typed = false;\n break;\n }\n if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) {\n dataset = item[\"~run\"](dataset, config2);\n }\n }\n }\n return dataset;\n }\n };\n}\n\n// src/methods/pipe/pipeAsync.ts\nfunction pipeAsync(...pipe2) {\n return {\n ...pipe2[0],\n pipe: pipe2,\n async: true,\n get \"~standard\"() {\n return _getStandardProps(this);\n },\n async \"~run\"(dataset, config2) {\n for (const item of pipe2) {\n if (item.kind !== \"metadata\") {\n if (dataset.issues && (item.kind === \"schema\" || item.kind === \"transformation\")) {\n dataset.typed = false;\n break;\n }\n if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) {\n dataset = await item[\"~run\"](dataset, config2);\n }\n }\n }\n return dataset;\n }\n };\n}\n\n// src/methods/required/required.ts\nfunction required(schema, arg2, arg3) {\n const keys = Array.isArray(arg2) ? arg2 : void 0;\n const message = Array.isArray(arg2) ? arg3 : arg2;\n const entries = {};\n for (const key in schema.entries) {\n entries[key] = !keys || keys.includes(key) ? nonOptional(schema.entries[key], message) : schema.entries[key];\n }\n return {\n ...schema,\n entries,\n get \"~standard\"() {\n return _getStandardProps(this);\n }\n };\n}\n\n// src/methods/required/requiredAsync.ts\nfunction requiredAsync(schema, arg2, arg3) {\n const keys = Array.isArray(arg2) ? arg2 : void 0;\n const message = Array.isArray(arg2) ? arg3 : arg2;\n const entries = {};\n for (const key in schema.entries) {\n entries[key] = !keys || keys.includes(key) ? nonOptionalAsync(schema.entries[key], message) : schema.entries[key];\n }\n return {\n ...schema,\n entries,\n get \"~standard\"() {\n return _getStandardProps(this);\n }\n };\n}\n\n// src/methods/safeParse/safeParse.ts\nfunction safeParse(schema, input, config2) {\n const dataset = schema[\"~run\"]({ value: input }, getGlobalConfig(config2));\n return {\n typed: dataset.typed,\n success: !dataset.issues,\n output: dataset.value,\n issues: dataset.issues\n };\n}\n\n// src/methods/safeParse/safeParseAsync.ts\nasync function safeParseAsync(schema, input, config2) {\n const dataset = await schema[\"~run\"](\n { value: input },\n getGlobalConfig(config2)\n );\n return {\n typed: dataset.typed,\n success: !dataset.issues,\n output: dataset.value,\n issues: dataset.issues\n };\n}\n\n// src/methods/safeParser/safeParser.ts\nfunction safeParser(schema, config2) {\n const func = (input) => safeParse(schema, input, config2);\n func.schema = schema;\n func.config = config2;\n return func;\n}\n\n// src/methods/safeParser/safeParserAsync.ts\nfunction safeParserAsync(schema, config2) {\n const func = (input) => safeParseAsync(schema, input, config2);\n func.schema = schema;\n func.config = config2;\n return func;\n}\n\n// src/methods/unwrap/unwrap.ts\nfunction unwrap(schema) {\n return schema.wrapped;\n}\nexport {\n BASE64_REGEX,\n BIC_REGEX,\n CUID2_REGEX,\n DECIMAL_REGEX,\n DIGITS_REGEX,\n EMAIL_REGEX,\n EMOJI_REGEX,\n HEXADECIMAL_REGEX,\n HEX_COLOR_REGEX,\n IMEI_REGEX,\n IPV4_REGEX,\n IPV6_REGEX,\n IP_REGEX,\n ISO_DATE_REGEX,\n ISO_DATE_TIME_REGEX,\n ISO_TIMESTAMP_REGEX,\n ISO_TIME_REGEX,\n ISO_TIME_SECOND_REGEX,\n ISO_WEEK_REGEX,\n MAC48_REGEX,\n MAC64_REGEX,\n MAC_REGEX,\n NANO_ID_REGEX,\n OCTAL_REGEX,\n ULID_REGEX,\n UUID_REGEX,\n ValiError,\n _addIssue,\n _getByteCount,\n _getGraphemeCount,\n _getStandardProps,\n _getWordCount,\n _isLuhnAlgo,\n _isValidObjectKey,\n _joinExpects,\n _stringify,\n any,\n args,\n argsAsync,\n array,\n arrayAsync,\n assert,\n awaitAsync,\n base64,\n bic,\n bigint,\n blob,\n boolean,\n brand,\n bytes,\n check,\n checkAsync,\n checkItems,\n checkItemsAsync,\n config,\n creditCard,\n cuid2,\n custom,\n customAsync,\n date,\n decimal,\n deleteGlobalConfig,\n deleteGlobalMessage,\n deleteSchemaMessage,\n deleteSpecificMessage,\n description,\n digits,\n email,\n emoji,\n empty,\n endsWith,\n entriesFromList,\n enum_ as enum,\n enum_,\n everyItem,\n excludes,\n fallback,\n fallbackAsync,\n file,\n filterItems,\n findItem,\n finite,\n flatten,\n forward,\n forwardAsync,\n function_ as function,\n function_,\n getDefault,\n getDefaults,\n getDefaultsAsync,\n getDotPath,\n getFallback,\n getFallbacks,\n getFallbacksAsync,\n getGlobalConfig,\n getGlobalMessage,\n getSchemaMessage,\n getSpecificMessage,\n graphemes,\n hash,\n hexColor,\n hexadecimal,\n imei,\n includes,\n instance,\n integer,\n intersect,\n intersectAsync,\n ip,\n ipv4,\n ipv6,\n is,\n isOfKind,\n isOfType,\n isValiError,\n isoDate,\n isoDateTime,\n isoTime,\n isoTimeSecond,\n isoTimestamp,\n isoWeek,\n keyof,\n lazy,\n lazyAsync,\n length,\n literal,\n looseObject,\n looseObjectAsync,\n looseTuple,\n looseTupleAsync,\n mac,\n mac48,\n mac64,\n map,\n mapAsync,\n mapItems,\n maxBytes,\n maxGraphemes,\n maxLength,\n maxSize,\n maxValue,\n maxWords,\n metadata,\n mimeType,\n minBytes,\n minGraphemes,\n minLength,\n minSize,\n minValue,\n minWords,\n multipleOf,\n nan,\n nanoid,\n never,\n nonEmpty,\n nonNullable,\n nonNullableAsync,\n nonNullish,\n nonNullishAsync,\n nonOptional,\n nonOptionalAsync,\n normalize,\n notBytes,\n notGraphemes,\n notLength,\n notSize,\n notValue,\n notWords,\n null_ as null,\n null_,\n nullable,\n nullableAsync,\n nullish,\n nullishAsync,\n number,\n object,\n objectAsync,\n objectWithRest,\n objectWithRestAsync,\n octal,\n omit,\n optional,\n optionalAsync,\n parse,\n parseAsync,\n parser,\n parserAsync,\n partial,\n partialAsync,\n partialCheck,\n partialCheckAsync,\n pick,\n picklist,\n pipe,\n pipeAsync,\n promise,\n rawCheck,\n rawCheckAsync,\n rawTransform,\n rawTransformAsync,\n readonly,\n record,\n recordAsync,\n reduceItems,\n regex,\n required,\n requiredAsync,\n returns,\n returnsAsync,\n safeInteger,\n safeParse,\n safeParseAsync,\n safeParser,\n safeParserAsync,\n set,\n setAsync,\n setGlobalConfig,\n setGlobalMessage,\n setSchemaMessage,\n setSpecificMessage,\n size,\n someItem,\n sortItems,\n startsWith,\n strictObject,\n strictObjectAsync,\n strictTuple,\n strictTupleAsync,\n string,\n symbol,\n title,\n toLowerCase,\n toMaxValue,\n toMinValue,\n toUpperCase,\n transform,\n transformAsync,\n trim,\n trimEnd,\n trimStart,\n tuple,\n tupleAsync,\n tupleWithRest,\n tupleWithRestAsync,\n ulid,\n undefined_ as undefined,\n undefined_,\n undefinedable,\n undefinedableAsync,\n union,\n unionAsync,\n unknown,\n unwrap,\n url,\n uuid,\n value,\n variant,\n variantAsync,\n void_ as void,\n void_,\n words\n};\n"],"names":["store","getGlobalConfig","config2","store2","getGlobalMessage","lang","store3","getSchemaMessage","store4","setSpecificMessage","reference","message","getSpecificMessage","_a","_stringify","input","_b","type","_addIssue","context","label","dataset","other","expected","received","issue","isSchema","_getStandardProps","value2","_joinExpects","values","separator","list","EMAIL_REGEX","check","requirement","email","minLength","transform","operation","forward","action","pathKeys","prevIssues","pathInput","key","pathValue","pathItem","getDefault","schema","array","item","itemDataset","boolean","nullish","wrapped","default_","object","entries","valueDataset","optional","picklist","options","string","unknown","pipe","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